using std::endl;
using std::string;
+/// Special value of toclevel for layouts that to not belong in a TOC
+const int LyXLayout::NOT_IN_TOC = -1000;
// The order of the LayoutTags enum is no more important. [asierra300396]
// Tags indexes.
LT_TOPSEP,
LT_TOCLEVEL,
LT_INNERTAG,
+ LT_LABELTAG,
+ LT_ITEMTAG,
LT_INTITLE // keep this last!
};
free_spacing = false;
pass_thru = false;
is_environment = false;
- toclevel = 0;
+ toclevel = NOT_IN_TOC;
commanddepth = 0;
}
{ "innertag", LT_INNERTAG },
{ "intitle", LT_INTITLE },
{ "itemsep", LT_ITEMSEP },
+ { "itemtag", LT_ITEMTAG },
{ "keepempty", LT_KEEPEMPTY },
{ "labelbottomsep", LT_LABEL_BOTTOMSEP },
{ "labelcounter", LT_LABELCOUNTER },
{ "labelsep", LT_LABELSEP },
{ "labelstring", LT_LABELSTRING },
{ "labelstringappendix", LT_LABELSTRING_APPENDIX },
+ { "labeltag", LT_LABELTAG },
{ "labeltype", LT_LABELTYPE },
{ "latexfooter", LT_LATEXFOOTER },
{ "latexheader", LT_LATEXHEADER },
case LT_COPYSTYLE: // initialize with a known style
if (lexrc.next()) {
- string const style = lexrc.getString();
+ string const style = subst(lexrc.getString(),
+ '_', ' ');
if (tclass.hasLayout(style)) {
string const tmpname = name_;
case LT_LATEXPARAM:
if (lexrc.next())
- latexparam_ = lexrc.getString();
+ latexparam_ = subst(lexrc.getString(), """, "\"");
break;
case LT_INNERTAG:
innertag_ = lexrc.getString();
break;
+ case LT_LABELTAG:
+ if (lexrc.next())
+ labeltag_ = lexrc.getString();
+ break;
+
+ case LT_ITEMTAG:
+ if (lexrc.next())
+ itemtag_ = lexrc.getString();
+ break;
+
case LT_PREAMBLE:
preamble_ = lexrc.getLongString("EndPreamble");
break;
break;
case ST_OTHER:
lexrc.next();
- spacing.set(Spacing::Other, lexrc.getFloat());
+ spacing.set(Spacing::Other, lexrc.getString());
break;
}
}