Source code required:
- Include the package
makeidx
, e.g.\usepackage{makeidx}
. - Call
\makeindex
in your preamble. - Add index to keywords where desired, e.g.
\index{keyword}
,\index{keyword!subkeyword}
, -
\index{keyword!subkeyword!subsubkeyword}
. - Call
\printindex
where 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.idx
file. - Run
makeindex
on 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
texify
on 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.