1

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!

5

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

In body of document:

Sample text

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

Sample list

\documentclass{report}
\usepackage{enumitem}

\usepackage[colorlinks]{hyperref}
\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
\begin{equation}
\nabla\cdot E = \frac \rho{\varepsilon_0}
\end{equation}
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.