]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
BufferParams.cpp: make Lithuanian documents compilable, fixes http://bugzilla.lyx...
[lyx.git] / src / output_latex.cpp
index a165439546b7267e5e99368f5c7c9508de1b458a..646e836480751b3c6323d1ea1cd8ce3888f36b2e 100644 (file)
@@ -294,7 +294,10 @@ TeXOnePar(Buffer const & buf,
        if (nextpit != paragraphs.end())
                ++nextpit;
 
-       if (runparams_in.verbatim) {
+       OutputParams runparams = runparams_in;
+       runparams.isLastPar = nextpit == paragraphs.end();
+
+       if (runparams.verbatim) {
                int const dist = distance(paragraphs.begin(), pit);
                Font const outerfont = outerFont(dist, paragraphs);
 
@@ -305,14 +308,13 @@ TeXOnePar(Buffer const & buf,
                }
 
                /*bool need_par = */ pit->latex(bparams, outerfont,
-                       os, texrow, runparams_in);
+                       os, texrow, runparams);
                return nextpit;
        }
 
        Layout const style = pit->forcePlainLayout() ?
                bparams.documentClass().plainLayout() : pit->layout();
 
-       OutputParams runparams = runparams_in;
        runparams.moving_arg |= style.needprotect;
 
        bool const maintext = text.isMainText(buf);
@@ -918,9 +920,11 @@ pair<bool, int> switchEncoding(odocstream & os, BufferParams const & bparams,
                                open_encoding_ = none;
                                count += 7;
                        }
-                       if (runparams.local_font != 0 && oldEnc.package() == Encoding::CJK) {
-                               // within insets, \inputenc switches need to be 
-                               // embraced within \bgroup ... \egroup; else CJK fails.
+                       if (runparams.local_font != 0
+                           && oldEnc.package() == Encoding::CJK) {
+                               // within insets, \inputenc switches need
+                               // to be embraced within \bgroup...\egroup;
+                               // else CJK fails.
                                os << "\\bgroup";
                                count += 7;
                                open_encoding_ = inputenc;