]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Ignore some more files when building in source tree
[lyx.git] / src / output_latex.cpp
index 4befb3cb6d09b4ef4c79ff72507e6d1cad88b7ca..1185e2d6e343149dbb0e7eddbb740958c9bed6ea 100644 (file)
@@ -818,7 +818,8 @@ void TeXOnePar(Buffer const & buf,
                        // Due to the moving argument, some fragile
                        // commands (labels, index entries)
                        // are output after this command (#2154)
-                       runparams.postpone_fragile_stuff = true;
+                       runparams.postpone_fragile_stuff =
+                               bparams.postpone_fragile_content;
                if (intitle_command)
                        os << '{';
 
@@ -932,7 +933,8 @@ void TeXOnePar(Buffer const & buf,
                        // Due to the moving argument, some fragile
                        // commands (labels, index entries)
                        // are output after this command (#2154)
-                       runparams.postpone_fragile_stuff = true;
+                       runparams.postpone_fragile_stuff =
+                               bparams.postpone_fragile_content;
                os << '{';
        }
 
@@ -1149,7 +1151,8 @@ void TeXOnePar(Buffer const & buf,
                        // Due to the moving argument, some fragile
                        // commands (labels, index entries)
                        // are output after this command (#2154)
-                       runparams.postpone_fragile_stuff = true;
+                       runparams.postpone_fragile_stuff =
+                               bparams.postpone_fragile_content;
        }
 
        Font const outerfont = text.outerFont(pit);
@@ -1375,7 +1378,8 @@ void TeXOnePar(Buffer const & buf,
        if (nextpar && state->open_encoding_ == CJK
                && bparams.encoding().iconvName() != "UTF-8"
                && bparams.encoding().package() != Encoding::CJK
-               && (nextpar_language->encoding()->package() != Encoding::CJK
+               && ((nextpar_language &&
+                       nextpar_language->encoding()->package() != Encoding::CJK)
                        || (nextpar->layout().isEnvironment() && nextpar->isMultiLingual(bparams)))
                // inbetween environments, CJK has to be closed later (nesting!)
                && (!style.isEnvironment() || !nextpar->layout().isEnvironment())) {
@@ -1684,8 +1688,11 @@ void latexParagraphs(Buffer const & buf,
                        //os << '\n';
        }
 
-       // It might be that we only have a title in this document
-       if (was_title && !already_title) {
+       // It might be that we only have a title in this document.
+       // But if we're in a branch, this is not the end of
+       // the document. (There may be some other checks of this
+       // kind that are needed.)
+       if (was_title && !already_title && !runparams.inbranch) {
                if (tclass.titletype() == TITLE_ENVIRONMENT) {
                        os << "\\end{" << from_ascii(tclass.titlename())
                           << "}\n";