]> git.lyx.org Git - features.git/commitdiff
Fix bug #11787.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 17 Mar 2020 05:33:44 +0000 (01:33 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 5 May 2020 03:30:52 +0000 (23:30 -0400)
Make sure we are actually at the end of the document before issuing
\maketitle because we are at the end of the document.

(cherry picked from commit 7af6575cf6cd764b8b567b358907ac9a7a8e322b)

src/output_latex.cpp
status.23x

index 26a0357d1127aab69c3c6adb6ab5bd82f07515ab..08958aabb22288945b20ab6d6e5224891f60e6f7 100644 (file)
@@ -1540,8 +1540,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";
index 2f045e82dda6b704b8196a466086faf4f3dca8d0..1d99bb5ed9f06a9db0715b70e6cb3116a5026381 100644 (file)
@@ -71,7 +71,9 @@ What's new
 
 - Fix tablefootnote loading order (bug 11841).
 
-- Fix reloading of changed include inset (11842).
+- Fix reloading of changed include inset (bug 11842).
+
+- Don't output \maketitle twice with branches (bug 11787)
 
 
 * USER INTERFACE