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 Texifier

With Texifier there is rarely a need to configure the typeset for indices. Texifier will read the document and automatically configure itself to typeset correctly.

In the rare case that you do wish to manually configure indices, you can do so through the project typeset config screen. First turn off autosense, then choose the indices tab, and then you can turn on and off the indices that you require in that document.



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