X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_latex.cpp;h=1185e2d6e343149dbb0e7eddbb740958c9bed6ea;hb=bcde3d00165789db1e1ef183fab968c091faab8c;hp=4aa797b98b8c91ab7ce93a38e4a7cfb2ef4a22c5;hpb=fc790bc1f54c0c0175c3a5bd192211990f08fbb0;p=lyx.git diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 4aa797b98b..1185e2d6e3 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -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";