On 2016-01-07, Georg Baum wrote:
> Guenter Milde wrote:
>> Generally, it is good to have the options globally, so that other packages
>> can pick this up.
>> In this document, however, the indexing is confused somehow to use one of
>> the secondary languages (given before "english").
> Yes. It is a bug in nomencl.sty: It does not process global language options
> in the same (unintuitive) order as babel.
BTW: this order (last wins) is the default for many LaTeX packages
(inputenc, fontenc, babel). I find it as intutitive as "first wins".
Polyglossia deliberately reversed this order (either because it
found it "unintuitive" or to "stand out"). However, I don't think
nomencl.sty behaviour is due to polyglossia compatiblility.
Rather, the case of multiple document languages as global document
options is not considered.
> The first language wins for nomencl.sty. I fear there is not much LyX
> can do, except looking for a better alternative for nomencl (it seems
> to be unmaintained).
I had the idea that LyX could
* Hand all languages directly to babel, and
* in addition, put the main language in the global options (for packages
like nomencl)
However, a test revealed that this does not work: As babel parses first
global options and then the local ones and in the process ignores double
entries, the document language comes out wrong :-(
(This is, indeed, a design flaw in babel.)
Second idea: feed supported languages (croatian, danish, english, french,
german, italian, polish, portuguese, russian, spanish, ukrainian)
directly to nomencl.
Test result:
* does not work, global options are processed in additon to local ones.
* actually, not the order of the languages in the source file is
important, but the order of option definitin in nomnecl.sty: i.e. with
multiple (supported) languages, the one last in alphabetical order wins!
(e.g. [ngerman,spanish,french] will print página (Spanish for page).)
So, short of fixing nomencl, ...
>> ... we need a document specific setting for this.
>> (But see also my other post exploring the issue.)
> I think so. In general, any lyxrc setting that changes how documents are
> exported to .tex is bad IMHO, since this makes documents depend on the
> installation. The lyxrc setting should be replacved by a document specific
> setting, and the default for this setting would then be determined by the
> template for new documents.
Seconded.
To make documents independent of the installation, this should also be
implemented for
* the language package preference,
* the font encoding
* bibliography processor and options
* index generation
* nomenclature command
Günter