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 7af6575cf6)
This commit is contained in:
Richard Kimberly Heck 2020-03-17 01:33:44 -04:00
parent 7898e07412
commit b4e613828e
2 changed files with 8 additions and 3 deletions

View 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";

View 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