]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Improve verbatim for RTL
[lyx.git] / src / output_latex.cpp
index bf04a243c35e73af5ccdd1e063dbdf791a444859..92c1ca77d54d3e087f9bf9a30ea81f0a99f074ed 100644 (file)
@@ -253,6 +253,18 @@ TeXOnePar(Buffer const & buf,
        BufferParams const & bparams = buf.params();
        LayoutPtr style;
 
+       if (runparams_in.verbatim) {
+               Font const outerfont =
+                       outerFont(std::distance(paragraphs.begin(), pit),
+                                 paragraphs);
+               // FIXME UNICODE
+               bool need_par = pit->latex(buf, bparams, outerfont,
+                                            os, texrow, runparams_in);
+               os << '\n';
+               texrow.newline();
+               return ++pit;
+       }
+
        // In an inset with unlimited length (all in one row),
        // force layout to default
        if (!pit->forceDefaultParagraphs())
@@ -558,7 +570,7 @@ TeXOnePar(Buffer const & buf,
        if (closing_rtl_ltr_environment)
                os << "}";
 
-       if (pending_newline && !runparams.verbatim) {
+       if (pending_newline) {
                os << '\n';
                texrow.newline();
        }