I have troubles in getting the right language in nomenclature. Here is a minimal example:






\nomenclature{Item}{Any kind of item}



My document is written in English but some of it has also an Italian translation, hence I load both languages. However by doing so the nomenclature gets Italian text:

enter image description here

As you may guess Elenco dei simboli means List of symbols (or Nomenclature) and pagina 1 means page 1. If I load only English they are in English.

I could just redefine the commands to print those texts:

\renewcommand*{\pagedeclaration}[1]{, page~#1}

but I wondered why they showed up in Italian in first place. Perhaps I am loading the languages in a wrong way (actually I got this source by exporting from LyX, and then trimmed it to the minimum, so it would be its fault).

  1. Package nomencl uses \ProcessOptions without star. That means the options are processed in the order of declaration and not in order of usage. Option italian is declared after option english, therefore italian is executed last.

  2. Even if nomencl would be fixed and would use \ProcessOptions* with star, you are out of luck here, because of the way LaTeX processes its options. If an option is used, its code is only executed once. That allows \newcommand in option code without worrying that the user might call the option twice. Global options are processed first and nomencl will ignore the local option english, because it has seen it already as global option.

  3. Package babel will not help, because package nomencl does not support it and does not use babel's interface for language dependent strings, e.g.

    % nomencl:
    \addto\captionsitalian{\def\nomname{Elenco dei simboli}}
    % document:

A solution is indeed to define the name macros explicitly. Package nomencl defines these in the code for option english:

\def\eqdeclaration#1{, see equation\nobreakspace(#1)}%
\def\pagedeclaration#1{, page\nobreakspace#1
  • Code in lists needs an extra set of indents :-) – Joseph Wright Aug 5 '12 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.