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.
Dror Atariah
Maybe worth adding that one should add
# for nomenclature
add_cus_dep(“nlo”, “nls”, 0, “nlo2nls”);
sub nlo2nls {
system(“makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg”);
}
to the .latexmkrc file for this method to work hand in hand with latexmk.
tom
Thanks for your comment!
For those not familiar with
latexmk
, see here.Best, Tom.
Frits
Nice read.
Recently I also posted about adding a nomenclature to LaTeX documents, without making use of either xindy or makeindex (as many TeXers find that rather difficult). Read it here: http://www.howtotex.com/packages/create-a-simple-nomenclature-with-the-longtable-package/
At the bottom of that post some alternatives are also given, one of which the way described here.
tom
Hi Frits,
Thanks for the link. The drawback is, you point it out in your post, you have to collect and type everything out manually.
Nice site by the way!
Best, Tom.
Sailesh
How can I have List of Symbols and List of Abbreviations in the thesis using nomenclature??
tom
Hi Sailesh,
The documentation describes how to create subgroups and I put together their example below. If you require two separate lists, I suggest using the glossaries package, which is more flexible.
Best, Tom.
Fer
Hi, I’m using nomenclature after \listoftables and \listoffigures, and before the beginning of the first chapter.
My problem is that every of the firsts commands create a second blank page with only the header and page number, however nomenclature don’t, and there is a second blank page after nomenclature with the header of listoffigures. It seems like latex don’t know listoffigures end before nomenclature or something like that. By the way, listoffigures, of tables, etc. are not in the index (makeindex), and nomenclature does.
Please help!!
tom
Hi Fer,
See here for a solution to your double page break problem. It’s got to do with the
documentclass
optionopenright
.How to add the list of figures/table to the table of contents is explained here under point 6 (among other things).
makeindex
creates the nomenclature, not the table of contents as the name might suggest.Let me know if your problems are still facing problems.
Best, Tom.
Sarah
Hi Tom,
I have tried looking at the pages you suggest, but I have still not been able to find a solution to my problem.
I am currently writing my master thesis with document class [10pt,twoside]{book}. I have created the nomenclature as a long table, but when I include the nomenclature after the list of tables the page number for the nomenclature becomes incorrect (it says X in the table of contents instead of IX). Also on the page after the nomenclature it says “list of tables” at the top.
Do you have any ideas?
Thanks, Sarah
tom
Hi Sarah,
I suggest you try the more recent glossaries package. You can find some examples here. If you still see the same issue, please provide a minimal working example and I’ll look into it.
Best, Tom
shd89
Hi,
how can I print the nomenclature list in two columns??
tom
Hi!
Try the multicol package. Alternatively, you may find some of the information in this article useful.
If nothing works, please send a minimal working example.
Best,
Tom
ash
Hi!
i use a simple command to \listoftables and \listoffigure and how to create list of symbols
Martha
Hi Tom. I have been trying to follow your examples, but I still can’t make the list of abbreviations. I copied your Time Zone-example into TeXshop, but it doesn’t seem like the \printnomenclature works. Any suggestions? Thanks anyway:-)
tom
Hi Martha,
Did you run
makeindex
to generate the index file as described above? You might also take a look at the answer given here for a more user-friendly solution.HTH,
Tom
Martha
This might help:-) thanks a lot!
Kris
Hi Tom,
How (or where) do you run makeindex?
I indeed noticed this part in the documentation above:
latex filename.tex
makeindex filename.nlo -s nomencl.ist -o filename.nls
latex filename.tex
However, it is unclear to me what I have to do with this code?
tom
Hey Kris,
Usually, this would be done in the terminal/command-line, unless your editor provides an interface/button for it.
Best, Tom.
Raghu Ram
I used the nomencl pakage as you suggested in another post. Everything is working fine, but the title appears as centered, unlike the List of Tables and List of Figures page, where the title appears on the left. One more thing is that the fontsize of the title is also small compared to the fontsize of the List of Figures page.
Here is the code:
I haven’t included any image as such in this code, but I have done so in my thesis.
tom
Hi,
You redefine the
titleformat
. Just remove or comment out lines 11-13 (and possibly 15) and you’ll get the standard behavior.Cheers, Tom.
konstantin
HI
i attempt the ‘Complete code of a working example and its output’ in my texwork and it only displays the sentence UTC is 3 hours behind ADT and 10 hours ahead of EST
please advise
tom
Hi!
The package requires running
latex, makeindex, latex
as described in the post.Best, Tom
Magical Marshmallow
Hi,
I’ve a problem with my list of Nomenclature and Abbreviations and a fancyhdr. My list works fine, but when it runs over to a second page, the header appears only on the second page, not on the first. Very strange. Anyone have any ideas for a solution please?
My code is:
tom
Hi,
The first page of your abbreviations and nomenclature is a “chapter start page”. By default, headers are empty on these pages. To change that, you would have to redefine the chapter command.
A note: you redefine
\nomname
, why don’t you use it further below. I.e.:Cheers, Tom.
Magical Marshmallow
Hey Tom,
Thanks for the reply. Hadn’t thought of the
\nomname
, probably because I was working on this at silly o’clock!My header shows up when I have a new chapter page in the main body of text and also on the TOC pages, so I don’t follow what you mean when you say a ‘Chapter start page’.
My fancy header shows up on all my LOF, LOT, TOC
Can you direct me to somewhere that might explain what I need to do to sort this out
Cheers
tom
Hello,
You might want to give this a try (from nomencl documentation:
If that doesn’t work, it would help if you provided an example that can be typeset. The code on latex-community.org is somewhat more complete, but packages are missing and the document is empty.
Here are some pointers you might find useful:
http://tex.stackexchange.com/questions/31586/nomenclature-as-a-chapter
http://tex.stackexchange.com/questions/63620/how-to-modify-the-typesetting-of-nomencl-header
http://www.latex-community.org/forum/viewtopic.php?f=47&t=14427
Best, Tom
Magical Marshmallow
and BOOM! Cheers Tom
eman
Hi Tom,
really liked the way you explained it all. i have a question that i can’t seem to find the answer for online and am running out of time and options. could you please help me? 🙂
it sounds silly, but … I’m a newbie…so here goes:
how do i install packages in latex?
I’ve had to manually do many functions for which a package is available like splitting a long table!
please help! 🙂
tom
Hi eman,
There are essentially two ways:
HTH, Tom
Michal
Hi Tom,
I would like to have more than one nomenclature in my document:
1. Below every equation
2. At the begining of the document a complete nomentclature of all symbols used.
Do you know whether it is possible to do this using nomencl package ?
Or in other words, how to make \nomenclature visible ?
Thank you in advance 🙂
tom
Hi Michal,
I suggest using the glossaries package (documentation), it supports multiple glossaries/list of acronyms. Take a look at the package documentation for details on how to use it.
Tom
Michal
Thanks Tom 🙂
I took me a while…but I’ve found how to do this, using glossaries package:
http://stackoverflow.com/a/4741556
tom
Thanks for following up and posting your solution. Best, Tom
Lego
Saved me so much time. Thank you very much!
tom
Glad to hear, thanks for the feedback! Tom
Lego
Incidentally, I have also used
\textbf
that is able to set letters as boldfaced. For example,will bold face first letters of words. Personally felt this appears better in abbreviations.
tom
Thanks for sharing this. Best, Tom.
Tim
Hi Tom,
I was wondering if it’s possible to use the package so that you can have two different symbols for the same variable. The use would be having a ‘math’ symbol and a ‘code’ symbol. Ideally, it would accept an extra argument, and an input of:
\nomenclature{$\sigma$}{stdDev}{Standard deviation}
Would output something resembling:
$\sigma$ \tt{stdDev} Standard Deviation
Any ideas?
Thanks,
Tim
tom
What I can think of is to create a command which takes 3 arguments and call
\nomenclature
from there:And you might need extra space for the label (see documentation):
Let me know if this helps.