[LyX/2.5.x] Fix closing of local CJK language with polyglossia (#13315)
Juergen Spitzmueller
spitz at lyx.org
Sat May 16 06:23:05 UTC 2026
commit 8406a6d48dab7448556743614cd988d5540d557f
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Fri May 15 12:56:15 2026 +0200
Fix closing of local CJK language with polyglossia (#13315)
(cherry picked from commit 761599050378c1699ab89ce9f70e11059f0d4722)
---
src/Font.cpp | 3 ++-
status.25x | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Font.cpp b/src/Font.cpp
index f2af680d6f..5a949d454c 100644
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -643,7 +643,8 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
if (closeLanguage
&& language() != base.language() && language() != next.language()
- && (language()->encoding()->package() != Encoding::CJK)) {
+ && (language()->encoding()->package() != Encoding::CJK
+ || (runparams.use_polyglossia && !language()->polyglossia().empty()))) {
os << '}';
++count;
bool const using_begin_end =
diff --git a/status.25x b/status.25x
index a8152dd57e..708f54886a 100644
--- a/status.25x
+++ b/status.25x
@@ -55,6 +55,8 @@ What's new
- Fix problem with nesting of languages.
+- Fix closing of local CJK language with polyglossia (bug 13315).
+
- Prevent duplicate theorem definitions (bug 13302).
- Fix case where the colortbl package has been loaded unnecessarily
More information about the lyx-cvs
mailing list