\item [label~2] second item
\item [{$\left[\textrm{ }\right]^{x}$}] Label with space, math and ] in it
\end{lyxlist}
+verbatim:
+\begin{verbatim}
+verbat im % $ 02/19/12
+hjkh
+jkh \ blah
+atesta
+
+
+zzz
+
+\end{verbatim}
and bibliography:
\begin{thebibliography}{9}
\bibitem{FOO} Edward Bar. \emph{The Foo Book}. (1999)
}
else if (name == "verbatim") {
- eat_whitespace(p, os, parent_context, false);
os << "\n\\begin_layout Verbatim\n";
string const s = p.verbatimEnvironment("verbatim");
string::const_iterator it2 = s.begin();
for (string::const_iterator it = s.begin(), et = s.end(); it != et; ++it) {
- if (*it == '\n') {
+ if (*it == '\\')
+ os << "\\backslash ";
+ else if (*it == '\n') {
it2 = it + 1;
// avoid adding an empty paragraph at the end
// if there are 2 consecutive spaces at the end ignore it
// because LyX will re-add a \n
if ((it + 1 != et) && (it + 2 != et || *it2 != '\n'))
os << "\n\\end_layout\n\\begin_layout Verbatim\n";
- } else
+ } else
os << *it;
}
os << "\n\\end_layout\n\n";