From: Jürgen Spitzmüller Date: Mon, 4 Dec 2006 07:27:49 +0000 (+0000) Subject: * src/paragraph.C (corrected_env, endTeXParams): X-Git-Tag: 1.6.10~11654 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a0534e02c1218660a3dfcc1cd60f318f80041b45;p=features.git * src/paragraph.C (corrected_env, endTeXParams): - writeout \begin and \end alignment tags on their own lines (bug 3010). (patch from Gregor Gorjanc and me). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16164 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/paragraph.C b/src/paragraph.C index 23d34acac9..b51641bf29 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -736,7 +736,10 @@ string const corrected_env(string const & suffix, string const & env, output += correction(env); else output += env; - return output + "}"; + output += "}"; + if (suffix == "\\begin") + output += "\n"; + return output; } } // namespace anon @@ -837,24 +840,24 @@ int Paragraph::endTeXParParams(BufferParams const & bparams, case LYX_ALIGN_LEFT: { string output; if (getParLanguage(bparams)->babel() != "hebrew") - output = corrected_env("\\par\\end", "flushleft", ownerCode()); + output = corrected_env("\n\\par\\end", "flushleft", ownerCode()); else - output = corrected_env("\\par\\end", "flushright", ownerCode()); + output = corrected_env("\n\\par\\end", "flushright", ownerCode()); os << from_ascii(output); column += output.size(); break; } case LYX_ALIGN_RIGHT: { string output; if (getParLanguage(bparams)->babel() != "hebrew") - output = corrected_env("\\par\\end", "flushright", ownerCode()); + output = corrected_env("\n\\par\\end", "flushright", ownerCode()); else - output = corrected_env("\\par\\end", "flushleft", ownerCode()); + output = corrected_env("\n\\par\\end", "flushleft", ownerCode()); os << from_ascii(output); column += output.size(); break; } case LYX_ALIGN_CENTER: { string output; - output = corrected_env("\\par\\end", "center", ownerCode()); + output = corrected_env("\n\\par\\end", "center", ownerCode()); os << from_ascii(output); column += output.size(); break;