mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Amend fc605cf138
Use proper option if main and a secondary language have BabelProvide 2
This commit is contained in:
parent
68b7378db8
commit
686b55e70d
@ -133,7 +133,8 @@
|
|||||||
# if a corresponding language module exists.
|
# if a corresponding language module exists.
|
||||||
# * BabelProvide determines if and when a language should be loaded from
|
# * BabelProvide determines if and when a language should be loaded from
|
||||||
# babel *.ini files with babel. Possible values:
|
# babel *.ini files with babel. Possible values:
|
||||||
# 0 (= never, default), 1 (always), 2 (with Unicode engines/non-TeX fonts)
|
# 0 (= never, default), 1 (always), 2 (with Unicode engines/non-TeX fonts).
|
||||||
|
# The latter advises babel to ignore existing *.ldf files.
|
||||||
# * BabelOpts are comma separated, no matter how they shall be represented
|
# * BabelOpts are comma separated, no matter how they shall be represented
|
||||||
# in the output.
|
# in the output.
|
||||||
# * BabelOptFormat specifies how the language-specific options shall be
|
# * BabelOptFormat specifies how the language-specific options shall be
|
||||||
|
@ -3502,6 +3502,7 @@ string BufferParams::babelCall(LaTeXFeatures const & features, string lang_opts,
|
|||||||
langs.insert(language);
|
langs.insert(language);
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
string force_provide;
|
string force_provide;
|
||||||
|
bool have_main_forceprovide = false;
|
||||||
for (auto const & l : langs) {
|
for (auto const & l : langs) {
|
||||||
string blang = l->babel();
|
string blang = l->babel();
|
||||||
bool use_opt = langoptions;
|
bool use_opt = langoptions;
|
||||||
@ -3534,12 +3535,15 @@ string BufferParams::babelCall(LaTeXFeatures const & features, string lang_opts,
|
|||||||
if (bp == 2 && useNonTeXFonts) {
|
if (bp == 2 && useNonTeXFonts) {
|
||||||
// here we need to tell babel to use the ini
|
// here we need to tell babel to use the ini
|
||||||
// even though an *.ldf exists
|
// even though an *.ldf exists
|
||||||
if (l == language)
|
if (l == language) {
|
||||||
force_provide = force_provide.empty()
|
force_provide = force_provide.empty()
|
||||||
? "provide=*"
|
? "provide=*"
|
||||||
: "provide*=*";
|
: "provide*=*";
|
||||||
else
|
have_main_forceprovide = true;
|
||||||
force_provide = "provide+=*";
|
} else
|
||||||
|
force_provide = have_main_forceprovide
|
||||||
|
? "provide*=*"
|
||||||
|
: "provide+=*";
|
||||||
have_mods = true;
|
have_mods = true;
|
||||||
}
|
}
|
||||||
if (bp != 1 && use_opt)
|
if (bp != 1 && use_opt)
|
||||||
|
Loading…
Reference in New Issue
Block a user