[LyX/master] remove duplicate posbabelpreamble of the main language

Udi Fogiel <[email protected]> Thu, 09 Jul 2026 14:48:54 +0000
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 887e5c26eb346c7ce0773c96e074b51bc4c2d29c
Author: Udi Fogiel <[email protected]>
Date:   Thu Jul 9 17:48:48 2026 +0300

    remove duplicate posbabelpreamble of the main language
---
 src/LaTeXFeatures.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 2700bc1de3..72a5fa6340 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -2036,7 +2036,8 @@ docstring const LaTeXFeatures::getBabelPostsettings() const
 	// add main language
 	langs.insert(bufferParams().language);
 	for (auto const & lang : langs) {
-		if (!lang->babel_postsettings().empty())
+		// the main language's postsettings are added separately below
+		if (lang != bufferParams().language && !lang->babel_postsettings().empty())
 			tmp << lang->babel_postsettings() << '\n';
 		if (lang->babelOptFormat() != "modifier" && lang->useBabelProvide() == 0
 		    && (!params_.useNonTeXFonts || !haveOtherForceProvide())) {
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs