os << "\n\\babelprovide[import";
if (l == language)
os << ", main";
- if (!babelLangOptions(l->lang()).empty())
+ if (!babelLangOptions(l->lang(), true).empty())
os << ", " << babelLangOptions(l->lang());
os << "]{" << blang << "}";
have_mods = true;
}
if ((bp == 2 && useNonTeXFonts) || have_other_forceprovide) {
// Options need to go to \babeprovide
- if (!babelLangOptions(l->lang()).empty())
+ // but only those set in document settings
+ if (!babelLangOptions(l->lang(), true).empty())
os << "\n\\babelprovide["
<< babelLangOptions(l->lang())
<< "]{" << blang << "}";
}
-string const BufferParams::babelLangOptions(string const & lang) const
+string const BufferParams::babelLangOptions(string const & lang, bool const onlycust) const
{
if (lang_options_babel_.find(lang) == lang_options_babel_.end()) {
Language const * l = languages.getLanguage(lang);
- return l ? l->babelOpts() :string();
+ return (l && !onlycust) ? l->babelOpts() : string();
}
return lang_options_babel_.find(lang)->second;
}
/// babel language options
std::map<std::string, std::string> lang_options_babel_;
///
- std::string const babelLangOptions(std::string const & lang) const;
+ std::string const babelLangOptions(std::string const & lang,
+ bool const onlycust = false) const;
///
void setBabelLangOptions(std::string const & lang, std::string const & opts)
{ lang_options_babel_[lang] = opts; }