You are on page 1of 2

16/08/12

LaTeX: List of Notations (Nomenclature) | Simon Silk

Simon Silk

Home

Education

Research

Experience

Extracurricular

Blog

About

Contact

LaTeX: List of Notations (Nomenclature)


Mon, 06/27/2011 - 17:02 SimonSilk Update for MikTeX 2.9 below. I've been working on my thesis for a couple of months now, and frequently I have to look up ways to tweak certain Latex components, so I'm going to start posting about these tweaks, even if it's just to link to another page about how to do something. If I end up having a good collection at the end of my thesis, then I can write a final post aggregating them in a logical order so they can serve as a guide to formatting a thesis in Latex. I'm using TeXnic Center (TXC) 2 Alpha 3 to edit and MikTeX to build. I originally installed both using ProTeXt which packages TXC1, MikTeX, Ghostscript, and Ghostgum. I later installed TXC2 which provides a much-needed overhaul to the interface so that toolbars don't shift all over the place whenever you resize the window. Today, I decided to add a List of Notations (aka list of Symbols) to my thesis. This is handy in a scientific thesis to let readers quickly refer to the list in case there's a symbol they're unfamiliar with. It's also nice if you can do your Related Work review (Lit Review) using one common set of notation, which will allow readers to more easily understand the relationship between various other papers you're reviewing in case they don't share notation. The list of notations can be generated using glossaries, or even manually, but it's best done using the package nomencl, which was designed for this purpose. If you're using MikTex, then you should have this already. Anyway, as outlined here, adding a list of notations can be done in 4 simple steps: 1. Add the following code to your preamble:

Resume (CV)
PDF Version

Things I Follow
CBC Technology and Science News Energy Efficiency and Retrofits Gabriel Silk IEEE Energywise Stephen Fry's Tech Blog Steve on Image Processing

\usepackage[refpage]{nomencl} \renewcommand{\nomname}{List of Notations} \renewcommand*{\pagedeclaration}[1]{\unskip\dotfill\hyperpage{#1}} \makenomenclature

\usepackage{makeidx} \makeindex
The first line invokes the nomenclature package, and the option refpage means that the list will include, for each symbol in the list, the page number on which you added it with the \nomenclature command. Leave it out to remove page numbers. The second line is the title at the top of the list of notations. The third line changes the page numbers in the list so they are right-justified with a line of dots connecting them back to the description of the symbol. By default, they follow the description after a comma and the word "page." The last line tells Latex you're using nomenclature so it will generate and look for the associated intermediate files during successive runs. The last two lines are likely somewhere in your preamble already, but if not add them because nomencl depends on makeindex. 2. Add the following where you want the nomenclature to appear. For example, you might place it right after \listoffigures.

\printnomenclature
3. Use the following command when you want to add a new symbol.

\nomenclature{$symbol$}{Description}
For example, you might say:

\nomenclature{$\alpha$}{Angular Velocities}
4. Run latex (or pdflatex, xelatex, etc.), then makeidx twice, then latex again, just like when you want to generate an index. Check your results. If you're using TeXnic center, this won't work automatically just

www.simonsilk.com/content/simonsilk/2011-jun/latex-list-notations-nomenclature

1/2

16/08/12

LaTeX: List of Notations (Nomenclature) | Simon Silk


using successive builds. See below. For a complete code example, please see this post.

Using nomencl in TeXnic center.


As oultined here, you need to add makeindex with nomencl arguments as a post-processor option. To do so, go Build > Define Output Profiles, and choose your desired output profile, e.g. LaTeX => PDF. Go to the postprocessor tab and add a new postprocessor using the button that looks like a New Folder in TXC2. Give it a name, then add the path to the makeindex executable (C:\Program Files (x86)\MiKTeX 2.8\miktex\b in\makeindex.exe in my case). Then add -s nomencl.ist "%b m.nlo" -o "%b m.nls" to the arguments list. Now three builds in TXC should produce an updated nomenclature with page references.

Optional Tweaks
Column spacing in the list of notations If some of your symbol entries are too long, they will push their description to the right in your table, but others will stay where they are, which is ugly. You can fix this with the label width option, inserted in the preamble just before \makenomenclature:

\nomlabelwidth= 5 m 2m
The default is 0.5cm. Where to inset \nomenclature commands. If you don't want page numbers, and don't really care where in your document this command is given, you can just place all the \nomenclature commands in one tex file, say symb ols.tex, then insert this anywhere in your document body with \input{symb ols}. This can be handy if you've already written your lit review using multiple authors' notations and you now want to bring them under one common notation set; just do this first to make your list of notations, then print yourself a copy and go through your lit review updating notation where necessary. Update for MikTeX 2.9 As per this post, with newer versions of Makeindex, makeindex.exe needs to be passed a relative rather than absolute pathname. This can be achieved by replacing %b m with %tm in the output profiles of TeXnice Center. Don't forget to change it in the post-processor tab as well so that Nomenclature will work. LaTeX SimonSilk's blog Add new comment

Thanks
Wed, 07/04/2012 - 23:09 Anonymous Hi, I got exactly I was looking for. Thanks a lot. reply

Copyright 2010 Simon Silk

www.simonsilk.com/content/simonsilk/2011-jun/latex-list-notations-nomenclature

2/2

You might also like