------Making an index
Depending on the type of document you are writing, you might want to include an index. This is a bit like making a bibliography, as it uses auxiliary files. Luckily, this is all automated by the imakeidx package. We need three instructions to LaTeX:
The
\makeindexcommand, which enables creation of an indexThe
\indexcommand, which marks up index entriesThe
\printindexcommand, which prints the index
We've shown two features of indexing here: subdivision using !, and printing something different from the 'sort text' of an index entry using @. There is a lot of customisation possible with an index; try out the example and see how it works.