Skip Navigation.

LaTeX: Indexes and Glossaries

Indexes/Indices

LaTeX can automatically create indexes while you work on your document. To use LaTeX indexing, you must first include the makeidx command in the preamble. The full command is:
\usepackage{makeidx}
\makeindex

When you want to index something, use the command:
\index{Index Entry}

There are several types of index entries that LaTeX can create. These are:

When the document has been processed through LaTeX with the index commands included, it will create a .idx file. You will then need to run the .idx file through the makeindex program by typing:
makeindex filename

The filename here is without a file extension. The program will look for the .idx file and will output a .ind file. This file is used by the command:
\printindex

The print index command goes at the end of your document files (the .tex file) and then takes the information from the .ind file to build and include the full index in your paper.

Glossaries

Glossaries are made in the same manner as indexes. Glossaries simply use the commands:
\makeglossary (this is used in the preamble, like the \makeindex command)
\glossary (this is used for the particular entries, like the \index command)

There are some minor differences in how glossaries and indexes are handled. Please see the books by Lamport or Samarin for more information.

Back