From 35e14de7066347030b5168216c4e6a82abc67174 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Wed, 2 Jul 2008 08:34:55 +0000 Subject: [PATCH] * src/output_latex.cpp: - no blank lines before environments (bug 4993). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25416 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/output_latex.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/output_latex.cpp b/src/output_latex.cpp index da12b20012..564b345633 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -714,8 +714,12 @@ TeXOnePar(Buffer const & buf, // Note from JMarc: we will re-add a \n explicitely in // TeXEnvironment, because it is needed in this case if (nextpit != paragraphs.end()) { - os << '\n'; - texrow.newline(); + Layout const & next_layout = nextpit->layout(); + // no blank lines before environments! + if (!next_layout.isEnvironment() || style == next_layout) { + os << '\n'; + texrow.newline(); + } } if (nextpit != paragraphs.end()) -- 2.39.2