Creating indices and glossaries using Makeindex

Generating indices, glossaries and other lists of terms in your LaTeX document is achieved by adding MakeIndex-based commands to your source code and running the makeindex tool when typesetting.

What is Makeindex

MakeIndex uses the output files generated by the first run of the underlying tool such as pdflatex. Indices are added to your LaTeX document using command \index{entry} for each entry to be indexed and printed via \printindex. A small example is as follows

A basic example for creating an index
This is a test {\it index entry}\index{index entry}.

This generate a PDF including indices. When pdflatex runs on such a LaTeX file file.tex, it generates an intermediate file file.idx. Makeindex is then run on this file via the following command,

makeindex -t file.ilg -o file.ind file.idx

or simply,

makeindex file.idx

Other types of listings such as glossaries lead to file.glo being generated by pdflatex, acronyms file.acn, etc. These intermediate files are then fed into makeindex.

Running Makeindex for glossaries
makeindex -s -t file.alg -o file.acr file.acn
makeindex -s -t file.glg -o file.gls file.glo
makeindex -s -t file.slg -o file.syi file.syg

Quirks of LaTeX mean that pdflatex must be run twice after running makeindex in order to generate all the listings properly.

MakeIndex in Texpad

With Texpad, creating indices, glossaries, lists of acronyms, etc could not be easier. It simplifies the set of steps above by encapsulating them into a single typesetter, the Makeindex typesetter. The Makeindex typesetter may be run using Cmd- I, is available from the Typeset menu


or may be selected via the list of typesetters on the toolbar


It is capable of detecting and adjusting the underlying commands to generate the necessary listings.


Following are some sample files illustrating how to use MakeIndex:

Summary URL
A simple example of using makeindex to create indices makeindex-example.tex
An example illustrating generating a list of acronyms acronyms-example.tex
An example illustrating generating a list of glossaries glossaries-example.tex
Generating German glossaries german-glossaries-example.tex
Generating Nomenclature nomenclature-example.tex
Indices, glossaries and acronyms, all in one file makeindex-uber-example.tex