Now that we have verbatim, why not use it... - Martin
Index: output_latex.cpp =================================================================== --- output_latex.cpp (revision 21080) +++ output_latex.cpp (working copy) @@ -558,7 +558,7 @@ if (closing_rtl_ltr_environment) os << "}"; - if (pending_newline) { + if (pending_newline && !runparams.verbatim) { os << '\n'; texrow.newline(); } Index: insets/InsetERT.cpp =================================================================== --- insets/InsetERT.cpp (revision 21080) +++ insets/InsetERT.cpp (working copy) @@ -29,6 +29,7 @@ #include "Lexer.h" #include "TextClass.h" #include "MetricsInfo.h" +#include "OutputParams.h" #include "ParagraphParameters.h" #include "Paragraph.h" @@ -139,30 +140,12 @@ } -int InsetERT::latex(Buffer const &, odocstream & os, - OutputParams const &) const +int InsetERT::latex(Buffer const & buf, odocstream & os, + OutputParams const & op) const { - ParagraphList::const_iterator par = paragraphs().begin(); - ParagraphList::const_iterator end = paragraphs().end(); - - int lines = 0; - while (par != end) { - pos_type siz = par->size(); - for (pos_type i = 0; i < siz; ++i) { - // ignore all struck out text - if (par->isDeleted(i)) - continue; - - os.put(par->getChar(i)); - } - ++par; - if (par != end) { - os << "\n"; - ++lines; - } - } - - return lines; + OutputParams op2 = op; + op2.verbatim = true; + return InsetText::latex(buf, os, op2); } @@ -176,6 +159,7 @@ int InsetERT::docbook(Buffer const &, odocstream & os, OutputParams const &) const { + // FIXME can we do the same thing here as for LaTeX? ParagraphList::const_iterator par = paragraphs().begin(); ParagraphList::const_iterator end = paragraphs().end();