#include <config.h>
#include "Layout.h"
-#include "Encoding.h"
#include "FontInfo.h"
#include "Language.h"
#include "Lexer.h"
LT_FREE_SPACING,
LT_PASS_THRU,
LT_PARBREAK_IS_NEWLINE,
+ LT_ITEMCOMMAND,
LT_ITEMSEP,
LT_KEEPEMPTY,
LT_LABEL_BOTTOMSEP,
htmlforcecss_ = false;
htmltitle_ = false;
spellcheck = true;
+ itemcommand_ = "item";
}
{ "innertag", LT_INNERTAG },
{ "inpreamble", LT_INPREAMBLE },
{ "intitle", LT_INTITLE },
+ { "itemcommand", LT_ITEMCOMMAND },
{ "itemsep", LT_ITEMSEP },
{ "itemtag", LT_ITEMTAG },
{ "keepempty", LT_KEEPEMPTY },
if (reset) {
latexargs_.clear();
itemargs_.clear();
+ postcommandargs_.clear();
}
break;
lex >> itemtag_;
break;
+ case LT_ITEMCOMMAND:
+ lex >> itemcommand_;
+ break;
+
case LT_PREAMBLE:
preamble_ = from_utf8(lex.getLongString("EndPreamble"));
break;
string id;
lex >> id;
bool const itemarg = prefixIs(id, "item:");
+ bool const postcmd = prefixIs(id, "post:");
while (!finished && lex.isOK() && !error) {
lex.next();
LYXERR0("Incomplete Argument definition!");
else if (itemarg)
itemargs_[id] = arg;
+ else if (postcmd)
+ postcommandargs_[id] = arg;
else
latexargs_[id] = arg;
}
Layout::LaTeXArgMap Layout::args() const
{
LaTeXArgMap args = latexargs_;
+ if (!postcommandargs_.empty())
+ args.insert(postcommandargs_.begin(), postcommandargs_.end());
if (!itemargs_.empty())
args.insert(itemargs_.begin(), itemargs_.end());
return args;
if (!(*it).second.mandatory)
++nr;
}
+ LaTeXArgMap::const_iterator iit = postcommandargs_.begin();
+ for (; iit != postcommandargs_.end(); ++iit) {
+ if (!(*iit).second.mandatory)
+ ++nr;
+ }
return nr;
}
if ((*it).second.mandatory)
++nr;
}
+ LaTeXArgMap::const_iterator iit = postcommandargs_.begin();
+ for (; iit != postcommandargs_.end(); ++iit) {
+ if (!(*iit).second.mandatory)
+ ++nr;
+ }
return nr;
}