My problem with the nomencl
package is that I have to call \nomenclature
manually every time I use a new symbol.
For example the following code
\documentclass{article}
\usepackage{xspace,ifthen}
\usepackage[intoc]{nomencl}
\renewcommand{\nomname}{List of Notations}
\renewcommand*{\pagedeclaration}[1]{\dotfill\hyperpage{#1}}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{R}}{\item[\textbf{Roman Symbols}]}{%
\ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek Symbols}]}{%
\ifthenelse{\equal{#1}{P}}{\item[\textbf{Superscripts}]}{%
\ifthenelse{\equal{#1}{B}}{\item[\textbf{Subscripts}]}{%
\ifthenelse{\equal{#1}{S}}{\item[\textbf{Symbols}]}{%
}}}}}}
\makenomenclature
\newcommand{\symbI}{\ensuremath{F}\xspace}
\newcommand{\symbII}{\ensuremath{M}\xspace}
\newcommand{\symbIII}{\ensuremath{\alpha}\xspace}
\newcommand{\symbIV}{\ensuremath{U}\xspace}
\begin{document}
\printnomenclature[1.5cm]
\section*{Math section}
\begin{equation}
\symbI = \symbII \symbIII
\end{equation}
\nomenclature[rsymbI ]{\symbI}{some explanation for F}
\nomenclature[rsymbII ]{\symbII}{some explanation for M}
\nomenclature[gsymbIII ]{\symbIII}{some explanation for \alpha}
\end{document}
would produce
Is there any way, let say, that one defines all the symbols once and only those that used in the text appear in the list of nomenclature? Something similar to citation maybe.
For example to have the following way in order to produce the above nomenclature list?
\documentclass{article}
\usepackage{xspace}
\anicecommand{\symbI}{Roman sympbol}{\ensuremath{F}\xspace}{some explanation for $F$}
\anicecommand{\symbII}{Roman sympbol}{\ensuremath{M}\xspace}{some explanation for $M$}
\anicecommand{\symbIII}{Greek sympbol}{\ensuremath{\alpha}\xspace}{some explanation for $\alpha$}
\anicecommand{\symbIV}{Roman sympbol}{\ensuremath{U}\xspace}{some explanation for $U$}
\begin{document}
\printnomenclature[1.5cm]
\section*{Math section}
\begin{equation}
\symbI = \symbII \symbIII
\end{equation}
\end{document}