3

I have been trying to print an automated nomenclature using nomencl in a multilingual document. It does not work, here is a MWE.

Removing everything hebrew from it (from the babel definition and everything from \begin{otherlanguage}...) generates a nomenclature. This has led me to believe that the reason the nomenclature does not print is the babel messing up with makeindex.

\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}
\usepackage{nomencl}
\makenomenclature

\begin{document}
blah blah blah 
\begin{otherlanguage}{hebrew}
נסיון
\end{otherlanguage}
\nomenclature{ab}{a aand b}
\printnomenclature
\end{document}

makeindex on CTAN has a hebrew support readme file, but none of the mirrors for the download provided in that file work.

In addition, I am currently working with Overleaf, and would prefer not resorting to installing extra support, as that would require installing extra editors on several computers...

My question is this: Is the problem really with makeindex ? And whether it is or isn't, how do I solve the problem ?

UPDATE:

glossaries package has a no makeindex option (option 1 in the CTAN documentation). This enables for the automatic generation of acronym and symbols list. This solves my problem only partly, as most of my work is written using /nomenclature definitions in the body of the text, reverting to glossaries would require moving all these definitions to the preamble. Still waiting for a better solution.

UPDATE 2.0:

Here is the log of the makeindex run:

This is makeindex, version 2.15 [MiKTeX 2.9] (kpathsea + Thai support).
Scanning style file C:/Program Files (x86)/MiKTeX 2.9/makeindex/nomencl/nomencl.ist.......
** Input style error (file = C:/Program Files (x86)/MiKTeX 2.9/makeindex/nomencl/nomencl.ist, line = 70):
   -- Unknown specifier lethead_prefix.
** Input style error (file = C:/Program Files (x86)/MiKTeX 2.9/makeindex/nomencl/nomencl.ist, line = 71):
   -- Unknown specifier lethead_suffix.
** Input style error (file = C:/Program Files (x86)/MiKTeX 2.9/makeindex/nomencl/nomencl.ist, line = 72):
   -- Unknown specifier lethead_flag.
...done (10 attributes redefined, 3 ignored).
Scanning input file filename.nlo...
!! Input index error (file = filename.nlo, line = 1):
   -- Illegal space within numerals in second argument.
done (0 entries accepted, 1 rejected).
Nothing written in filename.nls.
Transcript written in filename.ilg.

the content of filename.nlo

\nomenclatureentry{aab@[{ab}]\begingroup a aand b\nomeqref {\@@number {\@@number {0}}}|nompageref}{\@@number {1}}
9
  • what are your makeindex settings?
    – naphaneal
    Commented Jun 29, 2016 at 12:39
  • what messages does makeindex report? (makeindex should have written information to a transcript file.) Commented Jun 29, 2016 at 14:03
  • @naphaneal I'm using makeindex filename.nlo -s nomencl.ist -o filename.nls. @Nicola Talbot I edited the question to add the makeindex log. There does seem to be a problem there
    – Elad Den
    Commented Jun 29, 2016 at 17:09
  • What does filename.nlo contain? Looks like makeindex is complaining about the page number. As far as I know, makeindex only recognises arabic numerals (0, 1, ...) latin letters (a, b, ..., A, B, ...) and roman numerals (i, ii, ..., I, II, ...) in the location (optionally with a separator). Commented Jun 29, 2016 at 21:42
  • edited again to add nlo content
    – Elad Den
    Commented Jun 29, 2016 at 22:21

1 Answer 1

1

I have found the solution, following @Nicola Talbots remark, and following This problem with Babel and Algorithm2e I came up with the following solution:

\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}
\usepackage{nomencl}
\makenomenclature

\makeatletter
\def\@number#1{\number#1}
\makeatother

\begin{document}
blah blah blah

\begin{otherlanguage}{hebrew}
נסיון
\end{otherlanguage}
\nomenclature{ab}{a aand b}
\nomenclature{ba}{b aand a}
\printnomenclature
\end{document} 

The definition of \@number removes the \@@number from the .nlo file. Now when running pdflatex->makeindex->pdflatex the nomenclature works.

This makes my MWE run perfectly, however I am pretty sure the @number macro has some sort of significance, I cannot check what other problems this patch gives rise to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .