]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
* src/LyXRC.{cpp,h}:
[lyx.git] / src / output_latex.cpp
index 8532b403fa7559736a7de6885869cf03059391fd..52348c44cd0648a24770833a8c1ae48cfd6dd4e0 100644 (file)
@@ -254,15 +254,18 @@ TeXOnePar(Buffer const & buf,
        LayoutPtr style;
 
        if (runparams_in.verbatim) {
-               Font const outerfont =
-                       outerFont(std::distance(paragraphs.begin(), pit),
-                                 paragraphs);
+               int const dist = std::distance(paragraphs.begin(), pit);
+               Font const outerfont = outerFont(dist, paragraphs);
+
+               // No newline if only one paragraph in this lyxtext
+               if (dist > 0) {
+                       os << '\n';
+                       texrow.newline();
+               }
 
                /*bool need_par = */ pit->latex(buf, bparams, outerfont,
                        os, texrow, runparams_in);
 
-               os << '\n';
-               texrow.newline();
                return ++pit;
        }