LaTeX: List of Notations (Nomenclature)

LaTeX: List of Notations (Nomenclature)

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:


\renewcommand{\nomname}{List of Notations}


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.




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




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 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\bin\makeindex.exe in my case). Then add -s "%bm.nlo" -o "%bm.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:




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 symbols.tex, then insert this anywhere in your document body with \input{symbols}. 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 %bm 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.



Submitted by Anonymous (not verified) Thu, 07/05/2012 - 00:09

Hi, I got exactly I was looking for. Thanks a lot.
Submitted by Anonymous (not verified) Mon, 12/17/2012 - 11:53

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!!
Submitted by Anonymous (not verified) Fri, 01/18/2013 - 13:17

Thank you and thank god for this article. Much better than what the guy Bernd Schandl wrote. As opposed to that "main" article of Bernd, this actually works!!!! Using Texmaker, all I did is: 1) Open the main "name.tex" file 2) Put: " \usepackage[refpage]{nomencl} \renewcommand{\nomname}{List of Notations} \renewcommand*{\pagedeclaration}[1]{\unskip\dotfill\hyperpage{#1}} \makenomenclature \usepackage{makeidx} \makeindex " between "\documentclass[11pt]{report}" and "\begin{document}" 3) Compile with "Quick Build" 4) Type "makeindex name.nlo -s -o name.nls" into the black command window. In Texmaker its under "Tools" and "Open Terminal". 5) Then I compiled by switching from mode "Quick Build" to "MakeIndex" and I compile. 6) Go back to "Quick Build" and compile. That's it then I was happy to see my list of notations.
Submitted by Anonymous (not verified) Fri, 01/25/2013 - 02:35

Great little tutorial. Saved me a lot of trouble. Thank you.
Submitted by Anonymous (not verified) Thu, 04/11/2013 - 04:27

Thanks for great tips, Simon! You probably saved me from several hours' work. :)
Submitted by Anonymous (not verified) Mon, 08/26/2013 - 22:24

Did the steps using Miktex 2.9 and Texnic Center 2.0 Beta and everything worked like a charm following the provided steps!!

Add new comment


  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.