LT_NEED_PROTECT,
LT_NEWLINE,
LT_NEXTNOINDENT,
+ LT_PAR_GROUP,
LT_PARINDENT,
LT_PARSEP,
LT_PARSKIP,
LT_RIGHTDELIM,
LT_FORCELOCAL,
LT_TOGGLE_INDENT,
+ LT_ADDTOTOC,
+ LT_ISTOCCAPTION,
LT_INTITLE // keep this last!
};
/////////////////////
Layout::Layout()
+ : add_to_toc_(false), is_toc_caption_(false)
{
unknown_ = false;
margintype = MARGIN_STATIC;
forcelocal = 0;
itemcommand_ = "item";
toggle_indent = ITOGGLE_DOCUMENT_DEFAULT;
+ par_group_ = false;
}
{
// This table is sorted alphabetically [asierra 30March96]
LexerKeyword layoutTags[] = {
+ { "addtotoc", LT_ADDTOTOC },
{ "align", LT_ALIGN },
{ "alignpossible", LT_ALIGNPOSSIBLE },
{ "argument", LT_ARGUMENT },
{ "innertag", LT_INNERTAG },
{ "inpreamble", LT_INPREAMBLE },
{ "intitle", LT_INTITLE },
+ { "istoccaption", LT_ISTOCCAPTION },
{ "itemcommand", LT_ITEMCOMMAND },
{ "itemsep", LT_ITEMSEP },
{ "itemtag", LT_ITEMTAG },
{ "newline", LT_NEWLINE },
{ "nextnoindent", LT_NEXTNOINDENT },
{ "obsoletedby", LT_OBSOLETEDBY },
+ { "paragraphgroup", LT_PAR_GROUP },
{ "parbreakisnewline", LT_PARBREAK_IS_NEWLINE },
{ "parindent", LT_PARINDENT },
{ "parsep", LT_PARSEP },
counter = trim(counter);
break;
+ case LT_PAR_GROUP:
+ lex >> par_group_;
+ break;
+
case LT_FREE_SPACING:
lex >> free_spacing;
break;
case LT_REQUIRES: {
lex.eatLine();
- vector<string> const req =
- getVectorFromString(lex.getString());
+ vector<string> const req =
+ getVectorFromString(lex.getString(true));
requires_.insert(req.begin(), req.end());
break;
}
case LT_FORCELOCAL:
lex >> forcelocal;
break;
+
+ case LT_ADDTOTOC:
+ lex >> toc_type_;
+ add_to_toc_ = !toc_type_.empty();
+ break;
+
+ case LT_ISTOCCAPTION:
+ lex >> is_toc_caption_;
+ break;
+
}
}
lex.popTable();
return;
case LATEX_PARAGRAPH:
case LATEX_COMMAND:
- case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT:
- case LATEX_BIB_ENVIRONMENT:
case LATEX_LIST_ENVIRONMENT:
latextype = static_cast<LatexType>(le);
break;
+ case LATEX_ENVIRONMENT:
+ case LATEX_BIB_ENVIRONMENT:
+ latextype = static_cast<LatexType>(le);
+ par_group_ = true;
+ break;
default:
LYXERR0("Unhandled value " << le);
break;
// writeArgument() makes use of these default values
arg.mandatory = false;
arg.autoinsert = false;
+ arg.insertcotext = false;
bool error = false;
bool finished = false;
arg.font = inherit_font;
arg.labelfont = inherit_font;
+ arg.is_toc_caption = false;
string id;
lex >> id;
bool const itemarg = prefixIs(id, "item:");
} else if (tok == "autoinsert") {
lex.next();
arg.autoinsert = lex.getBool();
+ } else if (tok == "insertcotext") {
+ lex.next();
+ arg.insertcotext = lex.getBool();
} else if (tok == "leftdelim") {
lex.next();
arg.ldelim = lex.getDocString();
} else if (tok == "passthruchars") {
lex.next();
arg.pass_thru_chars = lex.getDocString();
+ } else if (tok == "istoccaption") {
+ lex.next();
+ arg.is_toc_caption = lex.getBool();
} else {
lex.printError("Unknown tag");
error = true;
os << "\t\tMandatory " << arg.mandatory << '\n';
if (arg.autoinsert)
os << "\t\tAutoinsert " << arg.autoinsert << '\n';
+ if (arg.insertcotext)
+ os << "\t\tInsertCotext " << arg.insertcotext << '\n';
if (!arg.ldelim.empty())
os << "\t\tLeftDelim \""
<< to_utf8(subst(arg.ldelim, from_ascii("\n"), from_ascii("<br/>")))
lyxWrite(os, arg.font, "Font", 2);
if (arg.labelfont != inherit_font)
lyxWrite(os, arg.labelfont, "LabelFont", 2);
+ if (!arg.pass_thru_chars.empty())
+ os << "\t\tPassThruChars \"" << to_utf8(arg.pass_thru_chars) << "\"\n";
os << "\tEndArgument\n";
}
os << "\tEndLabelType Static\n";
break;
}
+ os << "\tParagraphGroup \"" << par_group_ << "\"\n";
if (!leftmargin.empty())
os << "\tLeftMargin \"" << to_utf8(leftmargin) << "\"\n";
if (!rightmargin.empty())
bool first = true;
os << "\tAlignPossible";
if (alignpossible & LYX_ALIGN_BLOCK) {
- if (!first)
- os << ',';
os << " Block";
first = false;
}