commit 9eab66ebb4e2aacfdec6ca472733fdeee9205bea
Author: Juergen Spitzmueller <[email protected]>
Date: Thu Sep 30 12:53:41 2021 +0200
Close font switches before comments
---
src/Paragraph.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 6248d8e..e437b65 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2694,7 +2694,12 @@ void Paragraph::latex(BufferParams const & bparams,
&& getInset(i)
&& getInset(i)->allowMultiPar()
&& getInset(i)->lyxCode() != ERT_CODE
- && getInset(i)->producesOutput();
+ && (getInset(i)->producesOutput()
+ // FIXME Something more general?
+ // Comments do not "produce output" but are
still
+ // part of the TeX source and require font
switches
+ // to be closed (otherwise LaTeX fails).
+ || getInset(i)->layoutName() ==
"Note:Comment");
bool closeLanguage = false;
bool lang_switched_at_inset = false;
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs