]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Typo.
[lyx.git] / 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())