LT_LEFTDELIM,
LT_LEFTMARGIN,
LT_NEED_CPROTECT,
+ LT_NEED_MBOXPROTECT,
LT_NEED_PROTECT,
LT_NEWLINE,
LT_NEXTNOINDENT,
inpreamble = false;
needprotect = false;
needcprotect = false;
+ needmboxprotect = false;
keepempty = false;
font = inherit_font;
labelfont = inherit_font;
{ "leftmargin", LT_LEFTMARGIN },
{ "margin", LT_MARGIN },
{ "needcprotect", LT_NEED_CPROTECT },
+ { "needmboxprotect", LT_NEED_MBOXPROTECT },
{ "needprotect", LT_NEED_PROTECT },
{ "newline", LT_NEWLINE },
{ "nextnoindent", LT_NEXTNOINDENT },
lex >> needcprotect;
break;
+ case LT_NEED_MBOXPROTECT:
+ lex >> needmboxprotect;
+ break;
+
case LT_KEEPEMPTY:
lex >> keepempty;
break;
lex.eatLine();
vector<string> const req =
getVectorFromString(lex.getString(true));
- requires_.insert(req.begin(), req.end());
+ required_.insert(req.begin(), req.end());
break;
}
case LT_AUTONESTS: {
- docstring const autonest =
- subst(subst(subst(lex.getLongString(from_ascii("EndAutoNests")),
- from_ascii("\n"), docstring()),
- from_ascii(" "), docstring()),
- from_ascii("\t"), docstring());
+ docstring autonest = lex.getLongString(from_ascii("EndAutoNests"));
+ autonest = subst(autonest, from_ascii("\n"), docstring());
+ autonest = subst(autonest, from_ascii("\t"), docstring());
+ autonest = subst(autonest, from_ascii("\""), docstring());
+ autonest = subst(autonest, '_', ' ');
vector<docstring> const autonests =
- getVectorFromString(autonest);
+ getVectorFromString(autonest, from_ascii(","), false, true);
autonests_.insert(autonests.begin(), autonests.end());
break;
}
case LT_AUTONESTEDBY: {
- docstring const autonest =
- subst(subst(subst(lex.getLongString(from_ascii("EndIsAutoNestedBy")),
- from_ascii("\n"), docstring()),
- from_ascii(" "), docstring()),
- from_ascii("\t"), docstring());
+ docstring autonest = lex.getLongString(from_ascii("EndIsAutoNestedBy"));
+ autonest = subst(autonest, from_ascii("\n"), docstring());
+ autonest = subst(autonest, from_ascii("\t"), docstring());
+ autonest = subst(autonest, from_ascii("\""), docstring());
+ autonest = subst(autonest, '_', ' ');
vector<docstring> const autonests =
- getVectorFromString(autonest);
+ getVectorFromString(autonest, from_ascii(","), false, true);
autonested_by_.insert(autonests.begin(), autonests.end());
break;
}
arg.nodelims = false;
arg.autoinsert = false;
arg.insertcotext = false;
+ arg.insertonnewline = false;
bool error = false;
bool finished = false;
arg.font = inherit_font;
arg.labelfont = inherit_font;
arg.is_toc_caption = false;
arg.passthru = PT_INHERITED;
+ arg.free_spacing = false;
string id;
lex >> id;
bool const itemarg = prefixIs(id, "item:");
arg.tooltip = lex.getDocString();
} else if (tok == "requires") {
lex.next();
- arg.requires = lex.getString();
+ arg.required = lex.getString();
} else if (tok == "decoration") {
lex.next();
arg.decoration = lex.getString();
+ } else if (tok == "newlinecmd") {
+ lex.next();
+ arg.newlinecmd = lex.getString();
} else if (tok == "font") {
arg.font = lyxRead(lex, arg.font);
} else if (tok == "labelfont") {
} else if (tok == "istoccaption") {
lex.next();
arg.is_toc_caption = lex.getBool();
+ } else if (tok == "freespacing") {
+ lex.next();
+ arg.free_spacing = lex.getBool();
} else {
lex.printError("Unknown tag");
error = true;
os << "\t\tPresetArg \"" << to_utf8(arg.presetarg) << "\"\n";
if (!arg.tooltip.empty())
os << "\t\tToolTip \"" << to_utf8(arg.tooltip) << "\"\n";
- if (!arg.requires.empty())
- os << "\t\tRequires \"" << arg.requires << "\"\n";
+ if (!arg.required.empty())
+ os << "\t\tRequires \"" << arg.required << "\"\n";
if (!arg.decoration.empty())
os << "\t\tDecoration \"" << arg.decoration << "\"\n";
+ if (!arg.newlinecmd.empty())
+ os << "\t\tNewlineCmd \"" << arg.newlinecmd << "\"\n";
if (arg.font != inherit_font)
lyxWrite(os, arg.font, "Font", 2);
if (arg.labelfont != inherit_font)
}
if (!arg.pass_thru_chars.empty())
os << "\t\tPassThruChars \"" << to_utf8(arg.pass_thru_chars) << "\"\n";
+ if (arg.free_spacing)
+ os << "\t\tFreeSpacing " << arg.free_spacing << "\n";
os << "\tEndArgument\n";
}
writeArgument(os, it->first, it->second);
os << "\tNeedProtect " << needprotect << "\n"
"\tNeedCProtect " << needcprotect << "\n"
+ "\tNeedMBoxProtect " << needmboxprotect << "\n"
"\tKeepEmpty " << keepempty << '\n';
if (labelfont == font)
lyxWrite(os, font, "Font", 1);
case Spacing::Default:
break;
}
- if (!requires_.empty()) {
+ if (!required_.empty()) {
os << "\tRequires ";
- for (set<string>::const_iterator it = requires_.begin();
- it != requires_.end(); ++it) {
- if (it != requires_.begin())
+ for (set<string>::const_iterator it = required_.begin();
+ it != required_.end(); ++it) {
+ if (it != required_.begin())
os << ',';
os << *it;
}