I am grouping my nomenclature symbols. I'm using the answer from this post: How to make section in Nomenclature?
The syntax I've used is this:
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{C}}{\item[\textbf{Variables}]}{%
\ifthenelse{\equal{#1}{V}}{\item[\textbf{sets}]}{}}
}
If I set prefixes to C and V, the grouping works well. However, it does not work when I try to use numeric prefixes such as 5 and 6, i.e.
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{6}}{\item[\textbf{Variables}]}{%
\ifthenelse{\equal{#1}{5}}{\item[\textbf{sets}]}{}}
}
I am not sure why this is the case. I cannot use letters because I have many letters, in both capitals case and lower case. For my document, numbers makes a lot more sense.
The documentation suggest the quote below but I don't know what this means.
Note that for symbols and numbers you have to check for the strings “Symbols”and “Numbers”. http://texdoc.net/texmf-dist/doc/latex/nomencl/nomencl.pdf
How do I overcome this issue?
EDIT: 04/04/2019 1941GMT MWE:
\documentclass[a4paper,openany]{book}
\usepackage{siunitx}
\usepackage{nomencl}
\usepackage{ifthen}
\makenomenclature
\setlength{\nomlabelwidth}{1.45cm}
\renewcommand{\nompreamble}{text here.}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{6}}{\item[\textbf{Variables}]}{%
\ifthenelse{\equal{#1}{V}}{\item[\textbf{sets}]}{}}
}
\begin{document}
test
\printnomenclature
\nomenclature[C1]{$\overline{\text{C}_{\text{F}}}$}{up, [1/s]}
\nomenclature[V2]{$\text{V}_{\text{D}}$}{down, [$\SI{}{\meter\per\second}$]}
\nomenclature[W]{$\overline{\text{We}}$}{left}
\nomenclature[O]{$\overline{\text{Oh}}$}{right}
\nomenclature[6K1]{$k$}{in}
\end{document}

6andV; if neither of them appears, nothing is done. And6K1is not the same as6. – egreg Apr 04 '19 at 20:076K1should be valid. It should not matter what comes after. Please look at the link first where this is clear for letters: https://tex.stackexchange.com/questions/223376/how-to-make-section-in-nomenclatureAs I explained earlier, the behaviour works for letters. My problem is that when I try to use numbers in the same way, it does not work. The package documentation hints that something extra needs to be done but does not explain further.
– slew123 Apr 04 '19 at 21:04