## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ nomenclature/nomentbl: error Illegal pream-token (s): c' used

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Finchen
Posts: 3
Joined: Mon Jul 12, 2021 9:53 am

### nomenclature/nomentbl: error Illegal pream-token (s): c' used

Hello everyone!
I've got a problem with the nomentbl option of the nomencl package: pdflatex just doesn't want to compile the pdf with the error message "%Filename%.nls:2: Package array Error: Illegal pream-token (s): c' used". Does anyone has an idea what is wrong?
Here is the minimal example:
\documentclass{scrreport}
\usepackage[noprefix, nomentbl]{nomencl}
\makenomenclature
\begin{document}
\nomenclature[z]{$z$}{Weg}{meter m}{xyz}
\printnomenclature
\end{document}

And this is the .nls file:
\begin{thenomenclature}
\nomgroup{Z}
\item &{$z$}&\begingroup Weg\endgroup &\begingroup meter m\endgroup &\begingroup xyz\endgroup &\begingroup \nomeqref {0.0}\nompageref{1}
\end{thenomenclature}

I already implemented the "makeindex" -command in my LaTeX-Editor (LaTeX-workshop in VS Code) and I also tried to execute the command in the terminal, so I think there shouldn't be a problem with generating the .nls file from .nlo. I installed TeXLive 2021 on my computer.

You find the .log file in the attachment. I am new to this forum, so please tell me if you need any other information or file for solving this problem. I hope for your help!
Attachments
BA_V2.log

LaTeXguide.org • LaTeX-Cookbook.net

Finchen
Posts: 3
Joined: Mon Jul 12, 2021 9:53 am

### nomenclature/nomentbl: error Illegal pream-token (s): c' used

I found a solution - although it's not the best, because it uses the package "nomentbl" instead of the package "nomencl" with option "nomentbl". But at least it works, I just couldn't make it work with the nomencl package.

If anyone has a similar problem and is interested in my solution:
I downloaded the nomentbl package from this link: https://ctan.org/pkg/nomentbl?lang=de . Then I ran the nomentbl.ins file in the TeX Works Editor to generate nomentbl.ist. Afterwards, I put nomentbl.ist and nomentbl.sty in the same directory as my .tex document. I added the \usepackage{longtabe} and changed \usepackage[nomentbl]{nomencl} to \usepackage{nomentbl}.

I read that this is not recommended because nomentbl is an old package. So if anyone has a better idea how to overcome the error, I am happy to hear it:)

Stefan Kottwitz
Posts: 9880
Joined: Mon Mar 10, 2008 9:44 pm

### nomenclature/nomentbl: error Illegal pream-token (s): c' used

Hi Finchen,

thank you for letting us know your solution!

Regarding the original problem, possibly you use makeindex -s nomencl.ist but should use makeindex -s nomentbl.ist.

Stefan

Finchen
Posts: 3
Joined: Mon Jul 12, 2021 9:53 am

### nomenclature/nomentbl: error Illegal pream-token (s): c' used

Stefan Kottwitz wrote:Regarding the original problem, possibly you use makeindex -s nomencl.ist but should use makeindex -s nomentbl.ist.

Stefan

Hi Stefan,

thank you for your answer, but I think that this is not the mistake. I copy the LaTeX tool "makeindex" that I added in the settings.json file of VSCode down here:

{"name": "makeindex",
"command": "makeindex",
"args":[
"%DOCFILE%.nlo",
"-s",
"nomentbl.ist",
"-o",
"%DOCFILE%.nls"
],
"env": {}
},
Additionally, I added the "makeindex" command in a new LaTeX recipe like this:
{
"name": "pdflatex ➞ makeindex ➞ pdflatex × 2",
"tools": [
"pdflatex",
"makeindex",
"pdflatex",
"pdflatex"
]
}
And the recipe works in combination with the nomentbl usepackage.

Also with the nomentbl.ist file in the same folder I couldnt use the \usepackage[nomentbl]{nomenclature} and the same error message appeared.

rais
Posts: 332
Joined: Sun Nov 16, 2014 8:51 pm

### nomenclature/nomentbl: error Illegal pream-token (s): c' used

I don't think it's a good idea to mix the nomentbl.ist file (written for nomentbl package) with nomencl package and its nomentbl option.
In fact, I haven't found any indication in the most recent documentation of the nomencl package, that anything else than -s nomencl.ist' should be given to makeindex when using nomencl package---regardless of its nomentbl option.
To me it rather looks like something else has changed, say, siunitx no longer provides an s-column, but nomencl tries to utilize it...
\documentclass{scrreport}
\usepackage[noprefix, nomentbl]{nomencl}
\makenomenclature
\setnomtableformat{lp{0.4\textwidth}lp{0.3\textwidth}@{}l}
\begin{document}
\nomenclature[z]{$z$}{Weg}{meter m}{xyz}
x
\printnomenclature
\end{document}


should work then, because it tells nomencl not to use the s column...
Also note the x': without text for output, there won't be any nomenclature
KR
Rainer

Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

### nomenclature/nomentbl: error Illegal pream-token (s): c' used

Another suggestion would be to emulate the s`-column. See section 5 of the current siunitx manual for more information.

And because this is an incompatibility of current nomencl with current siunitx, you should report the bug: →https://github.com/borisveytsman/nomencl/issues
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms.