inComment(false),
inDeletedInset(0), changeOfDeletedInset(Change::UNCHANGED),
par_begin(0), par_end(0),
- dryrun(false)
+ dryrun(false), verbatim(false)
{}
};
special_phrase const special_phrases[] = {
- { "LyX", from_ascii("\\LyX{}"), false },
- { "TeX", from_ascii("\\TeX{}"), true },
- { "LaTeX2e", from_ascii("\\LaTeXe{}"), true },
- { "LaTeX", from_ascii("\\LaTeX{}"), true },
+ { "LyX", from_ascii("\\protect\\LyX{}"), false },
+ { "TeX", from_ascii("\\protect\\TeX{}"), true },
+ { "LaTeX2e", from_ascii("\\protect\\LaTeXe{}"), true },
+ { "LaTeX", from_ascii("\\protect\\LaTeX{}"), true },
};
size_t const phrases_nr = sizeof(special_phrases)/sizeof(special_phrase);
unsigned int & column,
value_type const c)
{
+ if (runparams.verbatim) {
+ os.put(c);
+ return;
+ }
+
switch (c) {
case '\\':
os << "\\textbackslash{}";
os << from_utf8(layout_.latexparam);
}
}
- int i = InsetText::latex(buf, os, runparams);
+ OutputParams rp = runparams;
+ if (layout_.verbatim)
+ rp.verbatim = true;
+ int i = InsetText::latex(buf, os, rp);
if (!layout_.latexname.empty()) {
if (layout_.latextype == "command") {
os << "}";