Many technical documents use terms or acronyms unknown to the general population. It is common practice to add a glossary to make such documents more accessible.


Getting Started
  1. Introduction
  2. Installation
  3. Installing Extra Packages
  4. Basics
  5. How to get help

Common Elements

  1. Document Structure
  2. Text Formatting
  3. Paragraph Formatting
  4. Colors
  5. Fonts
  6. List Structures
  7. Special Characters
  8. Internationalization
  9. Rotations
  10. Tables
  11. Title creation
  12. Page Layout
  13. Customizing Page Headers and Footers‎
  14. Importing Graphics
  15. Floats, Figures and Captions
  16. Footnotes and Margin Notes
  17. Hyperlinks
  18. Labels and Cross-referencing
  19. Initials


  1. Errors and Warnings
  2. Lengths
  3. Counters
  4. Boxes
  5. Rules and Struts

Technical Text

  1. Mathematics
  2. Advanced Mathematics
  3. Theorems
  4. Chemical Graphics
  5. Algorithms
  6. Source Code Listings
  7. Linguistics

Special Pages

  1. Indexing
  2. Glossary
  3. Bibliography Management
  4. More Bibliographies

Special Documents

  1. Scientific Reports (Bachelor Report, Master Thesis, Dissertation)
  2. Letters
  3. Presentations
  4. Teacher's Corner
  5. Curriculum Vitae
  6. Academic Journals (MLA, APA, etc.)

Creating Graphics

  1. Introducing Procedural Graphics
  2. MetaPost
  3. Picture
  4. PGF/TikZ
  5. PSTricks
  6. Xy-pic
  7. Creating 3D graphics


  1. Macros
  2. Plain TeX
  3. Creating Packages
  4. Creating Package Documentation
  5. Themes


  1. Modular Documents
  2. Collaborative Writing of LaTeX Documents
  3. Export To Other Formats

Help and Recommendations

  1. FAQ
  2. Tips and Tricks


  1. Authors
  2. Links
  3. Package Reference
  4. Sample LaTeX documents
  5. Index
  6. Command Glossary

edit this boxedit the TOC

The glossaries package can be used to create glossaries. It supports multiple glossaries, acronyms, and symbols. This package replaces the glossary package and can be used instead of the nomencl package.[1] Users requiring a simpler solution should consider hand-coding their entries by using the description environment, or the longtabu environment provided by the tabu package.

Jump start


Place \usepackage{glossaries} and \makeglossaries in your preamble (after \usepackage{hyperref} if present). Then define any number of \newglossaryentry and \newacronym glossary and acronym entries in your preamble (recommended) or before first use in your document proper. Finally add a \printglossaries call to locate the glossaries list within your document structure. Then pepper your writing with \gls{mylabel} macros (and similar) to simultaneously insert your predefined text and build the associated glossary. File processing must now include a call to makeglossaries document_name_without_extension followed by at least one further invocation of latex or pdflatex.

Using glossaries


To use the glossaries package, you have to load it explicitly:


if you wish to use xindy (superior indexing tool[2]) for the indexing phase, as opposed to makeindex (the default), you need to specify the xindy option:


For the glossary to show up in your Table of Contents, you need to specify the toc option:


See also Custom Name at the bottom of this page.

Finally, place the following command in your document preamble in order to generate the glossary:


Any links in resulting glossary will not be "clickable" unless you load the glossaries package after the hyperref package.

In addition, users who wish to make use of makeglossaries will need to have Perl installed — this is not normally present by default on Microsoft Windows platforms. That said, makeglossaries simply provides a convenient interface to makeindex and xindy and is not essential.

Defining glossary entries


To use an entry from a glossary you first need to define it. There are few ways to define an entry depending on what you define and how it is going to be used.

Note that a defined entry won't be included in the printed glossary unless it is used in the document. This enables you to create a glossary of general terms and just \include it in all your documents.

Defining terms


To define a term in glossary you use the \newglossaryentry macro:


<label> is a unique label used to identify an entry in glossary, <settings> are comma separated key=value pairs used to define an entry.

For example, to define a computer entry:

  description={is a programmable machine that receives input,
               stores and manipulates data, and provides
               output in a useful format}

The above example defines an entry that has the same label and entry name. This is not always the case as the next entry will show:

  description={is a French loanword (adjective, form of naïf)
               indicating having or showing a lack of experience,
               understanding or sophistication}

When you define terms, you need to remember that they will be sorted by makeindex or xindy. While xindy is a bit more LaTeX aware, it does it by omitting latex macros (\"{\i}) thus incorrectly sorting the above example as nave. makeindex won't fare much better, because it doesn't understand TeX macros, it will interpret the word exactly as it was defined, putting it inside symbol class, before words beginning with naa. Therefore it's needed to extend our example and specify how to sort the word:

  description={is a French loanword (adjective, form of naïf)
               indicating having or showing a lack of experience,
               understanding or sophistication},

You can also specify plural forms, if they are not formed by adding “s” (we will learn how to use them in next section):

  description={is a generic term referring to the family of Unix-like
               computer operating systems that use the Linux kernel},

Or, for acronyms:

\newacronym[longplural={Frames per Second}]{fpsLabel}{FPS}{Frame per Second}

This will avoid the wrong long plural: Frame per Seconds.

So far, the glossary entries have been defined as key-value lists. Sometimes, a description is more complex than just a paragraph. For example, you may want to have multiple paragraphs, itemized lists, figures, tables, etc. For such glossary entries use the command longnewglossaryentry in which the description follows the key-value list. The computer entry then looks like this:

  {is a programmable machine that receives input,
               stores and manipulates data, and provides
               output in a useful format}

Defining symbols


Defined entries can also be symbols:

  description={ratio of circumference of circle to its

You can also define both a name and a symbol:

\newglossaryentry{real number}
  name={real number},
  description={include both rational numbers, such as $42$ and 
               $\frac{-23}{129}$, and irrational numbers, 
               such as $\pi$ and the square root of two; or,
               a real number can be given by an infinite decimal
               representation, such as $2.4871773339\ldots$ where
               the digits continue in some way; or, the real
               numbers may be thought of as points on an infinitely
               long number line},

Note that not all glossary styles show defined symbols.

Defining acronyms


To define a new acronym you use the \newacronym macro:


where <label> is the unique label identifying the acronym, <abbrv> is the abbreviated form of the acronym and <full> is the expanded text. For example:

\newacronym{lvm}{LVM}{Logical Volume Manager}

Defined acronyms can be put in separate list if you use acronym package option:


Using defined terms


When you have defined a term, you can use it in a document. There are many different commands used to refer to glossary terms.

General references


A general reference is used with \gls command. If, for example, you have glossary entries defined as those above, you might use it in this way:

\Gls{naiive} people don't know about
alternative \gls{computer} operating systems:
\glspl{Linux}, BSDs and GNU/Hurd.

Naïve people don't know about alternative computer opera-
ting systems: Linuces, BSDs and GNU/Hurd.

Description of commands used in above example:


This command prints the term associated with <label> passed as its argument. If the hyperref package was loaded before glossaries it will also be hyperlinked to the entry in glossary.


This command prints the plural of the defined term, other than that it behaves in the same way as gls.


This command prints the singular form of the term with the first character converted to upper case.


This command prints the plural form with first letter of the term converted to upper case.

\glslink{<label>}{<alternate text>}

This command creates the link as usual, but typesets the alternate text instead. It can also take several options which changes its default behavior (see the documentation).


This command prints what ever is defined in \newglossaryentry{<label>}{symbol={Output of glssymbol}, ...}


This command prints what ever is defined in \newglossaryentry{<label>}{description={Output of glsdesc}, ...}

Referring acronyms


Acronyms behave a bit differently to normal glossary terms. On first use the \gls command will display "<full> (<abbrv>)". On subsequent uses only the abbreviation will be displayed. If this isn't happening, setting \setacronymstyle{long-short} is required.

To reset the first use of an acronym, use the command:


or, if you want to reset the use status of all acronyms:


Similarly, to unset the first use of an acronym so that only the abbreviation will be displayed, use:


or, for all acronyms:


If you just want to print the long version of an acronym without the abbreviation "<full>", use :


If you just want to print the long version of an acronym with the abbreviation "<full> (<abbrv>)", use :


If you just want to print the abbreviation "<abbrv>", use :


Displaying the Glossary


To display the sorted list of terms you need to add:


at the place you want the glossary and the list of acronyms to appear.

If all entries are to be printed the command


can be inserted before \printglossaries. You may also want to use \usepackage[nonumberlist]{glossaries} to suppress the location list within the glossary.

Separate Glossary and List of Acronyms


\printglossaries will display all the glossaries in the order in which they were defined.[3] If no custom glossaries are defined, the default glossary and the list of acronyms will be displayed.

The glossary and the list of acronyms can be displayed separately in different places[4]:


\printglossary[type=\acronymtype] % prints just the list of acronyms

Some text between the list of acronyms and the glossary.

\printglossary % if no option is supplied the default glossary is printed.

Dual entries with reference to a glossary entry from an acronym


It may be useful to have both an acronym and a glossary entry for the same term. To link these two, define the acronym with a reference to the glossary entry like this:

\newglossaryentry{gls-OWD} {
  name={One-Way Delay},
  description={The time a packet uses through a network from one host to another},
\newacronym[see={[Glossary:]{gls-OWD}}]{OWD}{OWD}{One-Way Delay\glsadd{gls-OWD}}
Refer to acronym with \gls{OWD} and the glossary with \gls{gls-OWD}

To make this easier, we can use this command (modified from example in the official docs):

Syntax: \newdualentry[glossary options][acronym options]{label}{abbrv}{long}{description}
\DeclareDocumentCommand{\newdualentry}{ O{} O{} m m m m } {

then, define new (dual) entries for glossary and acronym list like this:

\newdualentry{OWD} % label
  {OWD}            % abbreviation
  {One-Way Delay}  % long form
  {The time a packet uses through a network from one host to another} % description

Custom Name


The name of the glossary section can be replaced with a custom name or translated to a different language. Add the option title to \printglossary to specify the glossary's title. Add the option toctitle to specify a the title used in the table of content (if not used, title is used as default). [5]

\printglossary[title=List of Terms,toctitle=Terms and abbreviations]

Remove the point


To omit the dot at the end of each description, use this code:


Changing Glossary Entry Presentation Using Glossary Styles


A number of pre-built styles are available, and can be changed easily using

% Must be issued before \printglossaries

Commonly used styles include

  • list
My Term Has some long description 7, 9
  • altlist (inserts newline after term and indents description)
My Term 
   Has some long description 7, 9
  • altlistgroup or listgroup (group adds grouping based on the first letters of the terms)
My First Term 
   Has some long description 7, 9
My Second Term 
   Has some long description 7, 9
  • altlisthypergroup or listhypergroup (hyper adds an hyperlinked 'index' at the top of each glossary to jump to a group)
A First term 
   Has some long description 7, 9
Barely missed first 
   Has some long description 7, 9

Building your document


To add glossary into your final document requires:

  1. build your LaTeX document — this will also generate the aux file/s required by the makeglossaries
  2. invoke makeglossaries — a script which selects the correct character encodings and language settings and which will also run xindy or makeindex if these are specified in your document file
  3. build your LaTeX document again — to produce a document with glossary entries


latex doc
makeglossaries doc
latex doc

where latex is your usual build call, perhaps pdflatex, lualatex and doc is the name of your LaTeX master file without file extention. Option -d out can be used topoint where aux and other intermediate files are. If your entries are interlinked (entries themselves link to other entries with \gls calls), you will need to run steps 1 and 2 twice, that is, in the following order: 1, 2, 1, 2, 3.

Any issues will be reported in doc.log and doc.glg files.

Example for use in windows with Texmaker


Compile glossary with xindy - In Windows with Texmaker


In TeX Live and since June 2015 in MikTeX xindy is already included.

There is only one issue with path of the install directory of MikTeX containing spaces. It can be solved via the following edit:

You need to restart Texmaker after installation of xindy, to update PATH references to xindy and Perl binaries.

Then, in Texmaker, go to User -> User Commands -> Edit User Commands.
Choose command 1

  1. Menuitem = makeglossaries
  2. Command = makeglossaries %

Now push Alt+Shift+F1and then ->F1

Note, for use with the "use build directory" option of Texmaker: makeglossaries needs to find the aux file. Thankfully, while Texmaker does not help there, the option -d <dir> of makeglossaries provides for the subdirectory case. Hence the Command in this case should be:
Command = makeglossaries -d build % instead.

Document preamble


In preamble should be included (note, hyperref should be loaded before the glossaries):

\usepackage[nomain,acronym,xindy,toc]{glossaries} % nomain, if you define glossaries in a file, and you use \include{INP-00-glossary}

Glossary definitions


Write all your glossaries/acronyms in a file: Ex: INP-00-glossary.tex

\newacronym{ddye}{D$_{\text{dye}}$}{donor dye, ex. Alexa 488}
\newacronym[description={\glslink{r0}{F\"{o}rster distance}}]{R0}{$R_{0}$}{F\"{o}rster distance}
\newglossaryentry{r0}{name=\glslink{R0}{\ensuremath{R_{0}}},text=F\"{o}rster distance,description={F\"{o}rster distance, where 50\% ...}, sort=R}
\newglossaryentry{kdeac}{name=\glslink{R0}{\ensuremath{k_{DEAC}}},text=$k_{DEAC}$, description={is the rate of deactivation from ... and emission)}, sort=k}

Include glossary definitions and print glossary


Include glossary definitions in the preamble (Before "\begin{document}")

% or using \input:


Print glossaries, near end



  • Using LaTeX to Write a PhD Thesis, Nicola L.C. Talbot, [1]
  • Glossaries, Nomenclature, Lists of Symbols and Acronyms, Nicola L. C. Talbot, link


To do:

  • Add advanced usage
  • Add examples of styles

Previous: Indexing Index Next: Bibliography Management