The nomencl package

Builds a list of symbols: \nomenclature{symbol}{description} records an entry where the symbol is introduced, and \printnomenclature prints the sorted list.

Loading the package

\usepackage{nomencl}

You write each \nomenclature entry next to the formula that introduces the symbol. The command prints nothing at that place. The entries are collected in a file with the extension .nlo.

The program MakeIndex sorts this file, but it needs the style file of the package and other file names than for an index: makeindex main.nlo -s nomencl.ist -o main.nls. The next LaTeX run reads main.nls and prints the list. Without this step the document compiles and \printnomenclature prints nothing; the example below shows its list only after it.

Main commands

\makenomenclaturePreamble: switches on the .nlo file.
\nomenclature{$F$}{Force}Records a symbol and its description.
\nomenclature[G]{$\alpha$}{Angle}The optional argument is a sort key that is put in front of the symbol, here to move Greek letters behind the Latin ones.
\nomunit{N}Inside the description: prints a unit at the right margin of the entry.
\printnomenclature[2cm]Prints the list; the optional argument is the width of the symbol column.
\renewcommand{\nomname}{List of symbols}Heading of the list; the default is "Nomenclature".
\usepackage[intoc]{nomencl}Adds the list to the table of contents.

Complete example

\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{List of symbols}
\begin{document}
\section{Motion}
Newton's second law reads $F = m a$.%
\nomenclature{$F$}{Force \nomunit{N}}%
\nomenclature{$m$}{Mass \nomunit{kg}}%
\nomenclature{$a$}{Acceleration}
The angle $\alpha$ is measured against the horizontal.%
\nomenclature[G]{$\alpha$}{Angle}

\printnomenclature[1.5cm]
\end{document}
Result
The compiled example

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

Pitfalls

Related pages