[LyX/master] Fix bug reported by Kornel.

Richard Kimberly Heck rikiheck at lyx.org
Fri Mar 20 19:06:28 UTC 2020


commit 438f15da21a4e6aa2594bb1f6d619540fd0ef02c
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Fri Mar 20 15:25:47 2020 -0400

    Fix bug reported by Kornel.
    
    The old code was actually wrong. Obviously, this should be set only
    if we actually do issue the title command.
---
 src/output_latex.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 04d1e17..d495c63 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -1616,11 +1616,11 @@ void latexParagraphs(Buffer const & buf,
 							  ), layout.name()));
 				}
 			} else if (!runparams.issued_title_cmd) {
-				runparams.issued_title_cmd = true;
 				if (tclass.titletype() == TITLE_ENVIRONMENT) {
 					os << "\\begin{"
 							<< from_ascii(tclass.titlename())
 							<< "}\n";
+					runparams.issued_title_cmd = true;
 				}
 			}
 		} else if (runparams.issued_title_cmd &&


More information about the lyx-cvs mailing list