How do I sort the entries corresponding to each section of my document under abbreviations and symbols? In other words, I want a structure like this:
Abbreviations
Section 1
Section 2
...
Last section
Symbols
Section 1
Section 2
...
Last section
My code so far:
\vspace{-4em}
\makenomenclature
\renewcommand{\nomname}{}
% This code creates the groups
% -------------------------------------------
\renewcommand\nomgroup[1]{%
\item[\bfseries
\ifstrequal{#1}{A}{Abbreviations}{%
\ifstrequal{#1}{B}{Symbols}{%
\ifstrequal{#1}{O}{Other Symbols}{}}}%
]}
% -------------------------------------------
\begin{document}
% Add abbreviations and symbols below
% [A] = abbreviation, [B] = symbol
\nomenclature[A]{TA}{Test abbreviation}
\nomenclature[B]{$\alpha$}{Test symbol}
\printnomenclature[5 em]
\end{document}
This code only produces continuous lists of the abbreviations and symbols regardless of which section these entries belong to.
