> 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?
When lyxrc.language_global_options is true babel is not called when the document language has an
empty babel language.
But babel is called when there are other languages than the document language to handle the
\foreignlanguage command.
So my comment in the code:
// if the armscii8 or a CJK encoding is used, babel has to be called
// for foreign languages
should be better:
// babel has to be called anyway when foreign languages are used
I just se that the case, when e.g. the document language is Chinese and Japanese is the only foreign
language, is not yet handled. In this case babel must not be called, otherwise you'll get
LaTeX-errors about an empty babel language.
regards Uwe