LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronymsnomenclature/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

Postby Finchen » Mon Jul 12, 2021 10:22 am

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
(14.24 KiB) Downloaded 25 times

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

Postby Finchen » Tue Jul 20, 2021 5:04 pm

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:)

User avatar
Stefan Kottwitz
Site Admin
Posts: 9733
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jul 20, 2021 7:46 pm

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
LaTeX.org admin

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

Postby Finchen » Mon Jul 26, 2021 5:47 pm

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 couldn`t use the \usepackage[nomentbl]{nomenclature} and the same error message appeared.

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

Postby rais » Mon Jul 26, 2021 9:17 pm

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

User avatar
Ijon Tichy
Posts: 526
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Tue Jul 27, 2021 7:54 am

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


Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 5 guests