Currently, BufferParams::babelCall reads like:
string const BufferParams::babelCall(string const & lang_opts) const
{
string tmp = lyxrc.language_package;
if (!lyxrc.language_global_options && tmp == "\\usepackage{babel}")
tmp = string("\\usepackage[") + lang_opts + "]{babel}";
// suppress the babel call when there is no babel language defined
// in the lib/languages file
if (lyxrc.language_global_options && tmp == "\\usepackage{babel}" &&
language->babel().empty() ) {
// if the armscii8 or a CJK encoding is used, babel has to be
called
// for foreign languages
if (!lang_opts.empty())
tmp = string("\\usepackage[") + lang_opts + "]{babel}";
else
tmp.clear();
}
return tmp;
}
Uwe, I do not understand why lang_opts is passed to babel in the
second if() when lyxrc.language_global_options is true. What was your
intention?
JMarc