Output arguments required by arguments with default or preset arg

Fixes: #9128
This commit is contained in:
Juergen Spitzmueller 2014-05-21 13:12:14 +02:00
parent ad723c41b6
commit 994155b2a6
2 changed files with 14 additions and 0 deletions

View File

@ -331,6 +331,18 @@ void getArgInsets(otexstream & os, OutputParams const & runparams, Layout::LaTeX
if (argnr == 0) if (argnr == 0)
return; return;
// Default and preset args are always output, so if they require
// other arguments, consider this.
Layout::LaTeXArgMap::const_iterator lit = latexargs.begin();
Layout::LaTeXArgMap::const_iterator const lend = latexargs.end();
for (; lit != lend; ++lit) {
Layout::latexarg arg = (*lit).second;
if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.requires.empty()) {
vector<string> req = getVectorFromString(arg.requires);
required.insert(required.end(), req.begin(), req.end());
}
}
for (unsigned int i = 1; i <= argnr; ++i) { for (unsigned int i = 1; i <= argnr; ++i) {
map<int, InsetArgument const *>::const_iterator lit = ilist.find(i); map<int, InsetArgument const *>::const_iterator lit = ilist.find(i);
bool inserted = false; bool inserted = false;

View File

@ -86,6 +86,8 @@ What's new
- Fix some nesting problems in reversion of some beamer environments to 2.0 format. - Fix some nesting problems in reversion of some beamer environments to 2.0 format.
- Output arguments required by arguments with DefaultArg or PresetArg (bug 9128).
* USER INTERFACE * USER INTERFACE