From a0534e02c1218660a3dfcc1cd60f318f80041b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 4 Dec 2006 07:27:49 +0000 Subject: [PATCH] * 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 --- src/paragraph.C | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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;