]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Amend b280fed1: 3rdparty/dtl: Use preprocessor value on Windows
[lyx.git] / src / output_latex.cpp
index 4aa797b98b8c91ab7ce93a38e4a7cfb2ef4a22c5..1185e2d6e343149dbb0e7eddbb740958c9bed6ea 100644 (file)
@@ -1688,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";