texblog

List of symbols or abbreviations (nomenclature)

 
Update (April 2014): This package has not been updated in the past few years. You may want to use the more recent and more flexible glossaries package.


 
Printing a list of abbreviations or symbols is one of these things (like so many) LaTeX provides a very simple and elegant solution for. The nomencl package implements a few basic commands to do that.

 
First load the package in the preamble. The makenomenclature command is required for the generation of the nomenclature file (.nlo). Commenting it out is a convenient way to “switch it off”.

\usepackage{nomencl}
\makenomenclature

Next, add abbreviations together with their description or long form to your document. Ideally, this is done immediately after an abbreviation is mentioned for the first time.

\nomenclature{Fig.}{Figure}
\nomenclature{$A_i$}{Area of the $i^{th}$ component}

This command has an optional argument which provides control over the order of the entries. Consider the following example:

I want $\beta$\nomenclature{$\beta$}{The second letter of the greek alphabet} to be listed after $\alpha$\nomenclature{$\alpha$}{The first letter of the greek alphabet}

Makeindex, the command that generates the list of abbreviations (see below), will automatically sort the entries. Therefore, and will appear in an “alphabetic” order. To change this order manually, one can use a sorting prefix (optional argument), the simplest would just be consecutive numbers, and the symbols will be sorted accordingly.

I want $\beta$
\nomenclature[2]{$\beta$}{The second letter of the greek alphabet}
to be listed after $\alpha$
\nomenclature[1]{$\alpha$}{The first letter of the greek alphabet}

Linebreaks were added for presentation purposes only.

The following command prints the abbreviation/symbol list at the corresponding position of the document.

\printnomenclature

To control the distance between the symbol or abbreviation and the explaining text use the optional distance argument.

\printnomenclature[5em]

To change the name of the list use

\renewcommand{\nomname}{List of Symbols}

Similar to a glossary or bibliography, the document is typesetted once (latex). Next, the nomenclature is generated using makeindex. Finally, the document is typesetted again, adding the nomenclature to it.

latex filename.tex
makeindex filename.nlo -s nomencl.ist -o filename.nls
latex filename.tex

The makeindex command takes the nomenclature file (.nlo), the style file (nomencl.ist) and the name of the output file (.nls) as input arguments.

 
Complete code of a working example and its output

\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{Time Zones}
\begin{document}
UTC\nomenclature{UTC}{Coordinated Universal Time} is 3 hours behind ADT\nomenclature{ADT}{Atlantic Daylight Time} and 10 hours ahead of EST\nomenclature{EST}{Eastern Standard Time}.
\printnomenclature
\small\hfill Created by http://texblog.org
\end{document}

Note, to save some typing, you can define your own nomenclature command that prints the symbol/abbreviation and generates a list entry at the same time.

\newcommand*{\nom}[2]{#1\nomenclature{#1}{#2}}
...
\nom{EST}{Eastern Standard Time}

Refer to the nomencl package documentation for more details.

Exit mobile version