I would like to know how to sort a nomenclature according to the description, and not the symbol, whilst still making use of subgroups (e.g. separate groups for subscripts, superscripts etc)? The following, suggested defining a new command \Nomenclature
for sorting according to the description rather than symbol:
\documentclass[a4paper]{report}
\usepackage{nomencl}
\makenomenclature
\newcommand\Nomenclature[2]{\nomenclature[#2]{#1}{#2}}
\begin{document}
Text% to produce a non-empty page
\Nomenclature{$\omega$}{Absolute Frequency}
\Nomenclature{HOA}{Acetic acid}
\Nomenclature{Al}{Aluminium}
\Nomenclature{ASTM}{American Standard Testing Machine}
\printnomenclature
\end{document}
However, I am not sure how to get this to work with subgroups, which I have created using the \nomgroup
command in the following way:
\renewcommand\nomgroup[1]{%
\item[\large\bfseries
\ifstrequal{#1}{A}{Acronyms}{%
\ifstrequal{#1}{R}{Roman Symbols}{%
\ifstrequal{#1}{G}{Greek Symbols}{%
\ifstrequal{#1}{S}{Superscripts}{%
\ifstrequal{#1}{U}{Subscripts}{%
\ifstrequal{#1}{X}{Other Symbols}{}}}}}}]
\insertnomheaders
}
Any suggestions? Thanks
Best Answer
It is possible, but you have to declare your
\Nomenclature
command to have three argument:Also the command
\insertnomheaders
is undefined. I've redefined\nomgroup
without it (and changed a little):When you use
\Nomenclature
you have to specify the first optional argument to be one of the ones listed in\nomgroup
so to be inserted in the right subgroup. If you omit the optional argument the default isX
.A MWE:
Output:
As you can see, the elements are placed in the right subgroup and ordered according to their description.