# List of symbols after equation

Is there way to

• Define the symbols after the use of an equation, AND show that list right after the equation
• Repeat that list at the beginning of the document containing all the used symbols with their defenition

I have tried the nomenclature package and even some more custom functions found on stackexchange.

The custom function wont allow me to use math symbols as variable names (for example \rho) and the nomenclature package wont allow me to list the symbols under the eq and list them at the beginning.

Help is much appricated!

Here is one version using a symbol field separate from the name field:

In body of document:

List of symbols (you may well want to choose a different glossary style for this and/or set the names more carefully):

\documentclass{report}
\usepackage{enumitem}

\usepackage{glossaries}
\makeglossaries

\newcommand{\mathgloss}[3]{%
\newglossaryentry{#1}{name={#1},symbol={#2},description={#3}}%
\begin{description}[labelwidth=3em]%
\item[\glssymbol{#1}]#3%
\end{description}%
}
\setglossarystyle{treenoname}

\begin{document}

Consider the equation
$$\nabla\cdot E = \frac \rho{\varepsilon_0}$$
in which
\mathgloss{E}{\ensuremath{E}}{electric field}
\mathgloss{rho}{\ensuremath{\rho}}{charge densiyt}
\mathgloss{epsilon0}{\ensuremath{\varepsilon_0}}{permittivity of free space}

\printglossaries

\end{document}

• Hi Andrew, thanks for your answer. However, I get an error on the \setglossarystyle{treenoname} (unknown control command). If I remove that line, the output renders wrong (no greek symbols for example...) – Scott Jun 10 '14 at 14:24
• You need to choose a style that displays the symbols. Make sure you have an up-to-date version of the glossaries package, mine is 2014/03/12 v4.06. The command \setglossarystyle was introduced in version 3.08a, it was previously called \glossarystyle. – Andrew Swann Jun 10 '14 at 18:41