From: Jürgen Spitzmüller Date: Sat, 17 Sep 2011 15:25:14 +0000 (+0000) Subject: finally commit the fix for #7607. X-Git-Tag: 2.1.0beta1~2699 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5118d369e104710e3508e22cfd209e36c5261666;p=features.git finally commit the fix for #7607. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39696 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/output_latex.cpp b/src/output_latex.cpp index c2ec939d7e..0b3580875d 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -719,6 +719,7 @@ void TeXOnePar(Buffer const & buf, } bool pending_newline = false; + bool unskip_newline = false; switch (style.latextype) { case LATEX_ITEM_ENVIRONMENT: case LATEX_LIST_ENVIRONMENT: @@ -792,6 +793,7 @@ void TeXOnePar(Buffer const & buf, "$$lang", current_lang)); pending_newline = true; + unskip_newline = true; } } else if (!par_lang.empty()) { os << from_ascii(subst( @@ -799,14 +801,19 @@ void TeXOnePar(Buffer const & buf, "$$lang", par_lang)); pending_newline = true; + unskip_newline = true; } } } if (closing_rtl_ltr_environment) os << "}"; - if (pending_newline) + if (pending_newline) { + if (unskip_newline) + // prevent unwanted whitespace + os << '%'; os << '\n'; + } // if this is a CJK-paragraph and the next isn't, close CJK // also if the next paragraph is a multilingual environment (because of nesting)