Featured Book

LaTeX Beginners Guide

Partner Sites

TeXwelt - Fragen und Antworten zu LaTeX
Glossaries, Nomenclature, Lists of Symbols and Acronyms PDF Print E-mail
(90 votes, average: 4.02 out of 5)
LaTeX - General
Written by Nicola Talbot   
Wednesday, 18 March 2009 16:58

The glossaries package can be used to define terms, symbols and acronyms that can be used throughout a document. You can then use an indexing application to collate and sort the entries that have been used in the document. It is a highly versatile package, but because of this it has a large manual that some beginners find daunting. This article is an introductory guide to help you get started.

What do I need installed?

The latest version of the glossaries package (at the time of writing this) is version 3.01 and is available on CTAN. In addition, you also need to have the following packages installed: If you want to use any of the glossary styles that use the longtable environment, you will also need to have the longtable package installed, and if you want to use any of the glossary styles that use the supertabular environment, you will also need to have the supertabular package installed.

The above packages, including glossaries, are all distributed with MikTeX and TeX Live. (If you have MiKTeX or TeXLive, you can install or update packages using the MiKTeX Package Manager or the TeXLive Package Manager, respectively.)

In addition to the above LaTeX packages, you also need to have an indexing application installed to collate and sort the entries. The glossaries package is configured to work with makeindex or xindy. Makeindex is distributed with MikTeX, TeX Live and teTeX, so it should be readily available on your system. Xindy is distributed with TeX Live, so you might not have it installed if you use a different TeX distribution.

There is a common misconception that you must have Perl installed to use the glossaries package. There is a Perl script called makeglossaries that acts as a convenient interface to makeindex or xindy, but it is not essential if you only want to use makeindex. However, don't be put off by the need to install Perl. There are a number of useful TeX related Perl scripts (such as xindy and epstopdf) so it really helps, but if you are set against it for some reason, there are instructions below to help you access makeindex explicitly or use the Java MakeGlossariesGUI application instead.

Getting Started

The first thing that you need to do in your document is declare that you want to use the glossaries package:
Note that if you want to use xindy instead of makeindex, you must add the xindy package option:
However you will need to have xindy and Perl installed if you want to use this option.
If you are also using the hyperref package, you must load the glossaries package after the hyperref package:
This is an exception to the general rule that the hyperref package should be loaded last.

If you want your glossaries, list of symbols and list of acronyms to appear in the document's table of contents, you also need to use the toc package option:


Defining a Term or Symbol

Terms and symbols are defined using
The first argument is a label that uniquely defines this entry.
It is best to use only characters that are not active in the label.

The second argument is a comma-separated list of key=value pairs. The most important keys are name and description. These are used to assign the term and a brief description to appear in the glossary, list of symbols or list of acronyms.

This article only covers the commonly used keys. See the section "Defining Glossary Entries" in the manual for a complete list.

For example:

or street closed at one end}}
The above defines an entry whose label is culdesac.
It is generally best to define the terms in the preamble as they must be defined before they are used. Alternatively, you can put all your definitions in a separate file and input it using \input{filename} or \loadglsentries{filename}

Referencing Terms

Once a term has been defined using \newglossaryentry, it can be referenced in the document using:
Returning to the example above, I can reference it using:
If I want the first letter to be converted to upper case, I can do:
or if I want the whole term to appear in capitals, I can do:
The above commands also have optional arguments that aren't discussed in this article. For further information, see the section "Links to Glossary Entries" in the manual.

Let's put it together to make a simple document:



or street closed at one end},plural=culs-de-sac}

I used to live in a \gls{culdesac}. \Gls{culdesac} is another name
for a no-through road.
When I build this document (run it through LaTeX) I get the following warnings:
Package glossaries Warning: \makeglossaries hasn't been used,
the glossaries will not be updated.

Package glossaries Warning: No \printglossary or \printglossaries found.
This document will not have a glossary.
These warnings can be ignored for the moment.

This produces a document that contains the following sentences:

I used to live in a cul-de-sac. Cul-de-sac is another name for a no-through road.
It might be worth trying out this simple example to check that you have the required packages installed. (Check Installing things on a (La)TeX system if you're not sure how to install packages.)

Plural Forms

The plural of a term can be obtained using
The default behaviour is to append the letter "s" to the name to create the plural. In the above example, that would produce "cul-de-sacs" which is incorrect. The correct plural is "culs-de-sac". To fix this, I need to modify the definition:
or street closed at one end},plural=culs-de-sac}
As with the singular, I can also make the first letter of the plural form upper case:
or I can make the entire plural form appear in capitals:

Alternative plurals or other grammatical constructs

There are six keys provided that you can use to store additional information, such as alternative plurals or other constructs. For example, you could store alternative plurals in user1 and gerunds in user2:

description={a fully grown female of any bovine animal (plural cows, archaic plural kine)},

description={long, deep sound made by a cow},

You can access the value of the user keys using \glsuseri{label} and \glsuserii{label}, but it's better to define easy to remember synonyms. For example:


You can now use \glsaltpl to produce the alternative plural and \glsing to produce the gerund:



description={a fully grown female of any bovine animal (plural
cows, archaic plural kine)},

description={long, deep sound made by a cow},


The \glsing{low} was so loud it could be heard a mile away from the


The sort key

Later on in this article, I will cover sorting the entries using an indexing application, but when you define an entry, you need to bear in mind that the indexing application may not know how to sort terms that contain LaTeX commands. Consider the following example:
of circumference of circle to its diameter}}
This entry should ideally belong to the "p" group (that is, the group of terms whose first letter is a "p") however neither makeindex nor xindy will be able to sort this entry correctly as they can't interpret LaTeX code. Therefore, we need to tell the indexing application that this entry needs to be sorted according to "pi":
description={ratio of circumference of circle to its diameter}}

Note that in the above example I have used \ensuremath instead of using $ to switch in and out of math mode. This means that I don't need to keep track of what mode I'm in when using the entry. For example:

The ratio of the circumference of a circle to its diameter is given by \gls{pi}:
\gls{pi} = \frac{C}{d}

Accents and non-Latin characters

Makeindex is hard-coded for English, so you will need to use the sort key if the entry's name contains accented or non-Latin characters. For example:
description={person with special diplomatic responsibilities}}
Xindy was designed to overcome makeindex's inflexibility and has rules for various (but not all) languages, so if you are using xindy with the above example, you don't need the sort key:
description={person with special diplomatic responsibilities}}
or if you are using the inputenc package, you can just do:
description={person with special diplomatic responsibilities}}

Care must be taken when the first character has an accent or is a non-Latin character, regardless of whether you use makeindex or xindy. This character must be enclosed in braces if you want to use it with \Gls or \Glspl. For example

group or class}}
or if you are using the inputenc package:
group or class}}
Remember that if you are using makeindex, you also need to use the sort key:
group or class},sort=elite}

Defining an entry with both a name and a symbol

It is also possible to define an entry that has both a name and a symbol. For example:
description=unit of electrical resistance}
I can reference the name as usual:
or I can reference the symbol using:


When you define a term, you can specify that it should appear differently on first use. You can use this facility to define acronyms. For example:
diode},first={light-emitting diode (LED)}}
There is a shortcut command that is equivalent to the above:
\newacronym{led}{LED}{light-emitting diode}
The glossaries package provides other acronym formats, such as making the long form appear in a footnote on first use. These are covered in the section "Acronyms" in the manual.

You can then use the acronym in the same way as any other glossary term. For example:

If this is the first time you have used this entry, it will appear as
light-emitting diode (LED)
otherwise it will appear as

If you define the acronym using \newacronym rather than explicitly using \newglossaryentry, you can access the long and short forms using:

For example:
will produce
light-emitting diode
will produce

If you feel that is far too much typing, you can enable the shortcuts using the shortcuts package option:

You can now use \acs instead of \acrshort and \acl instead of \acrlong.
Other acronym related commands are described in the manual. In addition to the section called "Acronyms", there is also a section that covers resetting and unsetting entries.

Multiple Glossaries

You may have as many glossaries, lists of symbols or lists of acronyms as you like in your document. The default is to just have one glossary. You can add a list of acronyms using the acronym package option:
Any acronyms defined using \newacronym will automatically be added to the list of acronyms rather than the main glossary if the acronym package option is used. If you want an additional glossary, for example a list of symbols, you need to define it using:
\newglossary[log ext]{glossary label}{in-ext}{out-ext}{title}
The glossary label is a label that uniquely identifies this glossary. Again, it is best to use non-active characters such as alphanumerics (a-z,A-Z,0-9) in the label. The title is used as the section or chapter header for that glossary.

The remaining arguments specify the extensions for the files that contain the glossary information. The in-ext argument indicates the extension of the file that is created by the indexing application. This file is read in by the glossaries package's \printglossaries command, but obviously it can only be read once it has been created by the indexing application. (This is covered in more detail in the next section.) The out-ext argument indicates the extension of the file that is read in by the indexing application and written out by the glossaries package.

The first optional argument log ext is the extension for the indexing transcript file. This is only needed if you use the makeglossaries Perl script or the Java makeglossariesgui application.

There is a second optional argument to \newglossary that isn't covered here. See the section "Defining New Glossaries" in the manual for further details.

For example, suppose I want to create a list of symbols. I can define a glossary called "symbols" as follows:

\newglossary{symbols}{sym}{sbl}{List of Symbols}
When I define an entry to go in this glossary, I need to use the type key to specify the glossary label. For example:
description={ratio of circumference of circle to its diameter}}
If the type key is omitted, the main glossary is assumed.

Using makeindex or xindy

So far I have only covered how to define a term, symbol or acronym and how to use it in the document, but it is likely that you will also want a sorted list of these entries. This is where things start to get a bit complicated and is often a source of confusion for beginners.

The first thing that you must do is add the command

to your preamble. (This needs to come after any occurrence of \newglossary.)

The next step is to put the command

where you want your glossaries, lists of symbols or acronyms to appear. This will typically be either in your front matter (with the table of contents, list of figures etc) or back matter (with the bibliography etc).
If you want to rearrange your glossaries or have some in the front matter and some in the back matter, you can use \printglossary which is described in the section "Displaying a glossary" in the manual.

Here is an example document:


% Load hyperref before glossaries

% Define a new glossary type
\newglossary[slg]{symbols}{sym}{sbl}{List of Symbols}


% The following definitions will go in the main glossary

or street closed at one end},plural=culs-de-sac}

group or class},sort=elite}

of dominance by an \gls{elite}},sort=elitism}

description={person with special diplomatic responsibilities}}

% The following definitions will go in the list of acronyms

\newacronym{led}{LED}{light-emitting diode}

\newacronym{eeprom}{EEPROM}{electrically erasable programmable
read-only memory}

% The following definitions will go in the list of symbols

description=unit of electrical resistance}

description={non-SI unit of length}}


\section{Diplomatic Memoirs}

When I was an \gls{attache}, I lived in a \gls{culdesac}, but
I didn't much care for it as I found there was a fair amount
of \gls{elitism} amongst my neighbours.

\section{Student Memoirs}

When I was a student I often left bits of electronic circuitry
in my pockets, such as \glspl{led} and \glspl{eeprom}, which
often ended up in the washing machine. The \glspl{led} didn't
fair too badly, but the \glspl{eeprom} frequently broke.


The \gls{angstrom} is commonly used in structural biology,
whereas the \gls{ohm} is used in electronics.


If we run this document through pdflatex, we get the following warnings (amongst others):
pdfTeX warning (dest): name{glo:ohm} has been referenced but do
es not exist, replaced by a fixed one

pdfTeX warning (dest): name{glo:angstrom} has been referenced but does not exis
t, replaced by a fixed one

pdfTeX warning (dest): name{glo:eeprom} has been referenced but does not exist,
replaced by a fixed one

pdfTeX warning (dest): name{glo:led} has been referenced but does not exist, re
placed by a fixed one

pdfTeX warning (dest): name{glo:elitism} has been referenced but does not exist
, replaced by a fixed one

pdfTeX warning (dest): name{glo:culdesac} has been referenced but does not exis
t, replaced by a fixed one

pdfTeX warning (dest): name{glo:attache} has been referenced but does not exist
, replaced by a fixed one
These warnings are due to the fact that I have used the hyperref package, which creates hyperlinks from the terms to their definition in the relevant glossary, list of acronyms or list of symbols, but the targets don't exist yet. If you try this example and view the resulting PDF/DVI file, you will see that the glossaries haven't appeared yet. You may also notice that the terms generated by \gls and \glspl have all appeared in red. This is the default colour used by the hyperref package for internal links when used with the colorlinks option. (See the hyperref documentation for further details.)

The next step is to use an indexing application to create the glossaries, but if you want to use either xindy or makeglossaries you must ensure you have Perl installed.

Installing Perl

Perl usually comes with Unix-like operating systems, but if you are a Windows user you will need to install it. There are various options including Strawberry Perl and ActivePerl. I rarely use Windows, but Strawberry Perl seems popular and easy to install.

Using makeglossaries

The easiest way of creating the glossaries is to use the makeglossaries Perl script that comes with the glossaries package. If you are using MikTeX, this will probably be located in C:\Program Files\MikTeX 2.7\scripts\glossaries. If you are using a Unix style system, it should be in the same location as makeindex (or there may be a symbolic link to it from that location).

Note that makeglossaries, makeindex and xindy are all command line applications, but most front-ends provide a way to run them from a menu item or button press. Here, I will demonstrate using TeXWorks, which is a cross-platform front-end. (At the end of this article, there is advice for TeXnicCenter and WinEdt users. If you use something else, you'll have to consult your front-end's manual to find out how to do it or search the relevant forum.)

TeXWorks The image here shows the example listed above in TeXWorks (click on it to view a larger version). The first latex run doesn't produce any glossaries (and the table of contents is also empty).

Next, you need to add makeglossaries to the list of applications that can be run in TeXWorks, so select Edit → Preferences...

Edit Preferences Menu Item

This will open the Preferences dialog box. You need to make sure the Typesetting tab is selected:

Preferences Dialog Box

Click on the lower plus (+) symbol next to the "Processing tools" list. This will display the "Tool Configuration" window:

Tool Configuration Window

Enter the name of the tool (MakeGlossaries) and use the Browse button to select the makeglossaries script (makeglossaries.bat for Windows users):

MakeGlossaries Tool Configuration

(You don't need the "View PDF after running" box selected as running makeglossaries doesn't modify the PDF file.) Next click on the plus (+) symbol and type $basename:

Configuring Make Glossaries Tool

Click on "OK" and you should now see MakeGlossaries present in the drop-down tool list:

Select MakeGlossaries from drop-down list

TeXWorks Select "MakeGlossaries" and click on the green run button. You won't see anything different in the PDF yet. Use the drop-down box to select pdfLaTeX again and click on the green run button. Your document should now be updated and the glossaries should be present. (Click on image to view larger version.)

Note that the glossary (page 1), list of acronyms (page 1) and list of symbols (page 2) haven't appeared in the table of contents. Another run (click the green button) is required.

The numbers after each glossary entry indicate the page number on which that entry was used. The numbers are red because the hyperref package has been used, and they link to the corresponding page. You can use the glossaries package option nonumberlist to suppress the number list.

The list of symbols doesn't show the corresponding symbol for each entry. This is because the default style ignores the symbol. Try changing the package options to:

See the section "Glossary Styles" in the manual for a list of predefined styles.

In general, you need to perform at least three steps to ensure the glossaries are up-to-date:

  1. Run (pdf)latex
  2. Run makeglossaries (or MakeGlossariesGUI described below)
  3. Run (pdf)latex

Sometimes (as above) step 3 needs to be repeated. If your glossaries contain cross-references, you may need five steps:

  1. Run (pdf)latex
  2. Run makeglossaries (or MakeGlossariesGUI described below)
  3. Run (pdf)latex
  4. Run makeglossaries (or MakeGlossariesGUI described below)
  5. Run (pdf)latex


There is a Java alternative to makeglossaries called MakeGlossariesGUI. This doesn't come with MikTeX or TeXLive, but can be downloaded from CTAN. (Make sure you first have an up-to-date version of the Java Runtime Environment installed.) Windows users should download and run makeglossariesgui-setup.exe. Users of other operating systems need to download makeglossariesgui.zip and follow the installation instructions in the README file. When you run MakeGlossariesGUI for the first time, you will be prompted for the paths to makeindex and xindy. (If you don't want to use xindy, you can leave that box blank. Similarly, if you only intend to use xindy, you can leave the makeindex box blank.) After that you should see the following window:

MakeGlossariesGUI window

Use the open button or the File → Open menu item to load the auxiliary file created when you latexed your document. For example, my document was called "sample2.tex", so I need to load "sample2.aux":

Open Auxiliary File

Once you load the file, the application will automatically call makeindex or xindy for each defined glossary. The glossaries information will be displayed in the window:

MakeGlossaries Window

If any problems occur, you can check the "Diagnostics" tab for help. For example, suppose I forgot to add \makeglossaries, then I'll get an error message saying "Can't determine indexer" and the diagnostics tab will display the message:

Your document doesn't seem to have used \makeglossaries.

If you modify your document, run latex as usual and then reload the auxiliary file in MakeGlossariesGUI using the reload button or the File → Reload menu item.

Using makeindex explicitly

If you don't have Perl (or Java and MakeGlossariesGUI) installed you can run makeindex explicitly. Let's suppose that your document is called myDoc.tex. If you are using makeindex (that is, you haven't used the xindy package option) then you need to use makeindex for each defined glossary. This includes the list of acronyms if you have used the acronym package option. The above example document has three glossaries: the main one, the list of acronyms and the list of symbols. The main glossary is created using:

makeindex -s myDoc.ist -t myDoc.glg -o myDoc.gls myDoc.glo
The list of acronyms is created with:
makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn
The list of symbols is created with:
makeindex -s myDoc.ist -t myDoc.slg -o myDoc.sym myDoc.sbl

This means that you need to set up three separate tools in your editor. For TeXWorks, you need to go to the "Edit Preferences" window and create a new tool called, say "make main glossary", select the path to makeindex and add the appropriate arguments:

Configuring Make Main Glossary

Similarly for the list of acronyms:

Configuring Make Acronyms

and for the list of symbols:

Configuring Make Symbols Tool

Now, everytime you modify your document, you need to:

  1. Select the pdfLaTeX tool and click run button
  2. Switch to the Make Main Glossary tool and click run button
  3. Switch to the Make Acronyms tool and click run button
  4. Switch to the Make Symbols tool and click run button
  5. Switch to the pdfLaTeX tool and click run button

Depending on your document, you may need to return to step 2.


You can add makeglossaries to the build profile of TeXnicCenter as follows:
  1. Install Perl (you will need to quit TeXnicCenter and restart it after installing Perl)
  2. Select the menu item Build → Output Profiles...
  3. Select the desired output profile from the box on the left (e.g. LaTeX=>PDF)
  4. Select the "Postprocessor" tab from the box on the right
    Image of profile dialog box
  5. Click on the "New (insert)" icon. (This looks like a dashed rectangle to the left of the red cross.)
  6. Type in makeglossaries
    Image of profile dialog box
  7. Type in the full path name of makeglossaries.bat into the executable box or use the ellipsis button on the right to browse the filing system. (On my Windows partition, the file can be found in the folder C:\Program Files\MiKTeX 2.7\scripts\glossaries but it may be somewhere else on your system.)
    Image of file dialog box
    The full path name must be surrounded by double quotes if it contains spaces.
  8. Type "%bm" in the Arguments box
    Image of profile dialog box
  9. Repeat for each output profile as desired.
  10. Click on okay


There is a thread on comp.text.tex that discusses how to use makeglossaries with WinEdt.


avatar foxtrott
Really nice.. Tank you very much
avatar Korosh
I really like this idea - it would be very usuefl to so many people. I wish I could do the same but my system really discourages listing/naming particular items and I figure they would really hit the roof if I used pictures.
avatar zroutik
Dear Nicola, dear Latex users,

is there a command, please, to show the glossary entry in text (as with \gls{} command), point it to the Glossary (when created), but do not create a new page number and a new back-referencin g link? Page numbers and back-referencin g links (in the Glossary list) would be created and pointed only for the first use of \gls{} or the appropriate command.

Thank you very much for listening,
avatar zroutik
(note on previous)

links in the text pointing to the Glossary list are very good. But many page numbers back-referencin g from the Glossary list to the text are a nice mess, IMO.

Thank you,
avatar spkmn
Hi... first, I love the package. I have a problem that I'm looking for advice on. I have a glossary entry that contains a reference to another glossary entry.

\newglossaryentr y{Hi}{description={This is an \gls{entry}},name={Hi}}
\newglossaryentr y{There}{description={There is a whole world out there.},name={Hi}}

Inside of a table cell, I want to use \gls{Hi}.

When it prints, I get "This is an ``gls --There''" inside of the table...

This entry appears fine in the \printglossaries and if I use it outside of a table.

avatar spkmn
sorry.... it should be

\newglossaryentr y{Hi}{description={This is an \gls{There}},name={Hi}}
\newglossaryentr y{There}{description={There is a whole world out there.},name={Hi}}

avatar nlct

it's better to post requests for help in the forum as you'll get a quicker response and more people are likely to see it. It's also helpful to provide a http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/" rel="nofollow" target="_blank">minimal working example that illustrates the problem.

Nicola Talbot
avatar nlct
Sorry, that link got a bit mangled.
avatar horacv
i am having a couple of problems with the definition of several glossaries. In particular, i have two separate input files. Where do i indicate this to the
\newglossary command?
i defined it this way:


inside acr.tex i defined each entry, this way:

\newglossaryentr y{rz}{

and, inside not.tex, exactly the same way, except i didn't defined the type.
The output pdflates produces the same list (the one in acr.tex) two times. Any ideas what i am doing wrong?
thanks for the help
avatar nlct
If you have problems with the glossaries package, please post your query to the forum rather than as a comment here. Other people are more likely to search the forum than the comments if they have a similar problem.
Please login to post comments or replies.

Latest Forum Posts

Problem using a figure to cover two collumns space document
25/07/2014 19:24, yperionas

Re: Remove blank page
25/07/2014 14:38, mike1264

Re: Remove blank page
25/07/2014 14:20, mike1264

Re: Remove blank page
25/07/2014 13:47, esdd

Re: What is wrong with this bibtex entry?????
25/07/2014 10:36, Johannes_B

Re: Lyx and pdf quality issue
25/07/2014 01:38, hilbert

Re: After the pseudocode =0 is added
24/07/2014 23:49, Stefan_K

What is wrong with this bibtex entry?????
24/07/2014 22:20, jamin

Remove blank page
24/07/2014 20:17, mike1264

After the pseudocode =0 is added
24/07/2014 18:49, tommy33