The attached fixes the bug that in ERT (and in fact in URL too) a single blank gets doubled up.
I changed the signature of simpleTeXBlanks(). I looks like runparams.verbatim should be changed all over to runparams.passthru for consistency... next project. - Martin
Index: Paragraph.cpp =================================================================== --- Paragraph.cpp (revision 21197) +++ Paragraph.cpp (working copy) @@ -102,7 +102,7 @@ /// Output a space in appropriate formatting (or a surrogate pair /// if the next character is a combining character). /// \return whether a surrogate pair was output. - bool simpleTeXBlanks(Encoding const &, + bool simpleTeXBlanks(OutputParams const &, odocstream &, TexRow & texrow, pos_type i, unsigned int & column, @@ -523,19 +523,20 @@ } -bool Paragraph::Private::simpleTeXBlanks(Encoding const & encoding, +bool Paragraph::Private::simpleTeXBlanks(OutputParams const & runparams, odocstream & os, TexRow & texrow, pos_type i, unsigned int & column, Font const & font, Layout const & style) { - if (style.pass_thru) + if (style.pass_thru || runparams.verbatim) return false; if (i + 1 < int(text_.size())) { char_type next = text_[i + 1]; if (Encodings::isCombiningChar(next)) { + Encoding const & encoding = *(runparams.encoding); // This space has an accent, so we must always output it. column += latexSurrogatePair(os, ' ', next, encoding) - 1; return true; @@ -1992,7 +1993,7 @@ // style->pass_thru is false. if (i != body_pos - 1) { if (d->simpleTeXBlanks( - *(runparams.encoding), os, texrow, + runparams, os, texrow, i, column, font, *style)) { // A surrogate pair was output. We // must not call latexSpecialChar