]> git.lyx.org Git - features.git/commitdiff
* src/output_latex.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Wed, 2 Jul 2008 08:34:55 +0000 (08:34 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Wed, 2 Jul 2008 08:34:55 +0000 (08:34 +0000)
- 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

index da12b200128fe8a483b00a1f4e652887baa22ab4..564b345633408182d6a08c48b62cc90c933e6704 100644 (file)
@@ -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())