Using the nomenclature package with amsart, I get a compiling error if the PDF output is long but not if it is short. Here is the shortest example of the problem I could make.

\immediate\write18{makeindex "\jobname.nlo" -s nomencl.ist -o "\jobname.nls"}


\title{Nomenclature error} 

\nomenclature[Lx]{L}{The distribution of random variable $X$.}
We write $\mathcal{L}_X$ for the distribution of $X$. 


Using the "Typset" command in TeXShop 4.42, with a fresh MacTeX install (from mactex-20190508.pkg, downloaded just this morning). The second time I run "Typset" the console gives me the following.

LaTeX2e <2018-12-01>
Document Class: amsart 2017/10/31 v2.20.4
For additional information on amsmath, use the `?' option.
(./mwe.aux) (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd) (./mwe.toc)
Underfull \vbox (badness 10000) has occurred while \output is active [2]
./mwe.tex:21: Undefined control sequence.
<argument> \list@fname 

l.21 \end{document}


If I hit return to ignore the error the compile completes with correct output.

The same error occurs if I replace \printnomenclature with the content of the file mwe.nls, which is the following:

  \item [{L}]\begingroup The distribution of random variable $X$.\nomeqref {0}\nompageref{1}


However, if in the main TeX file I include the \lipsum command just one time rather than two times, the error does not occur.

The error also doesn't occur if I use article rather than amsart.

  • can't reproduce your problem. your code works fine for me. I get the same underful warning, but that can be ignored (but it's best to deal with warnings the same way as with errors). have you run an update on your packages?
    – naphaneal
    Oct 2 '19 at 17:54

The difference between the short and long version is that on page 3 the code tries to write the name of the nomenclature in the header. And as amsart does a number of unusual things something clashes.

Possible workarounds:



\makeatletter\let\list@fname\nomname \makeatother
  • The main problem seems to be that amsart redefines \@starttoc to take two arguments instead of one, while tocbasic expects the standard definition. I'd go with notocbasic.
    – egreg
    Oct 2 '19 at 20:02
  • notocbasic solved the problem for me. I tried to read the doc of package nomencl but I do not understand what are the implications of switching off this option. In fact I do not see why toc stuff is involved in the default mode notintoc.
    – Arnaud
    Oct 21 '20 at 9:41

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.