Source code required:
- Include the package
makeidx, e.g.\usepackage{makeidx}. - Call
\makeindexin your preamble. - Add index to keywords where desired, e.g.
\index{keyword},\index{keyword!subkeyword}, -
\index{keyword!subkeyword!subsubkeyword}. - Call
\printindexwhere your want the index to be generated (usually at the end of the document).
Compiling:
- Run latex on your main latex file, e.g.
latex main.tex. This will create amain.idxfile. - Run
makeindexon the index file, e.g.makeindex main.idx, to generate the index filemain.ind. - Run latex again on your main file, e.g.
latex main.tex.
or
- Run
texifyon your main latex file (e.g.texify main.tex) to automatically do all the necessary steps outlined above (and more if necessary).
Example:
\documentclass{book}
\usepackage{index}
\makeindex
\begin{document}
This is some very important text about
Latex \index{latex}. Here is some more.
\printindex
\end{document}
References
- Leslie Lamport, MakeIndex: An Index Processor For Latex, 1987.