commit 4bd0b89a6cfe25a3fa5869ec9051edc8a87dfc8a
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Aug 29 11:05:09 2025 +0200
Fix crossref definitions for secondary languages
need to be manually wrapped into \addto\captions*
---
src/LaTeXFeatures.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 8f51ad9815..f0f12450ce 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -2436,7 +2436,12 @@ docstring const
LaTeXFeatures::getTClassI18nPreamble(bool use_babel,
use_polyglossia, false));
for (lang_it lit = lbeg; lit != lend; ++lit) {
if (!thmxref.empty())
- snippets.insert(i18npreamble(thmxref,
+
snippets.insert(i18npreamble("\\addto\\captions$$lang{" + rtrim(thmxref, "\n")
+ "}\n",
+ *lit,
+
buffer().params().encoding(),
+
use_polyglossia, false));
+ if (!xxref.empty())
+
snippets.insert(i18npreamble("\\addto\\captions$$lang{" + rtrim(xxref, "\n") +
"}\n",
*lit,
buffer().params().encoding(),
use_polyglossia, false));
@@ -2501,11 +2506,12 @@ docstring const
LaTeXFeatures::getTClassI18nPreamble(bool use_babel,
type, name, *lit,
buffer().params().encoding(),
use_polyglossia));
- if (!prettyreffloatdefs.empty())
-
snippets.insert(i18npreamble(prettyreffloatdefs,
+ if (!prettyreffloatdefs.empty()) {
+
snippets.insert(i18npreamble("\\addto\\captions$$lang{" +
rtrim(prettyreffloatdefs, "\n") + "}\n",
*lit,
buffer().params().encoding(),
use_polyglossia, false));
+ }
}
}
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs