Time for action – marking words and building the index
Suppose our example would contain information about an enterprise and its structure and further about its network structure and design. We shall mark places in the text where these concepts occur. Finally, we will order LaTeX to typeset the index:
Go back to our example. In the preamble, load the index package and add the command to create the index:
\usepackage{index} \makeindex
In the caption of our enterprise diagram, index this point with the keyword
enterprise
:\caption{\index{enterprise}Enterprise Organizational Chart}
In the third chapter, which contains our diagrams, index by the keyword
network
:\index{network}
Directly before
\end{document}
, create an entry for the index for the table of contents. To ensure that it shows the correct page number, end the page before:\clearpage \addcontentsline{toc}{chapter}{Index}
In the next line, order LaTeX to typeset the index:
\printindex
If you're using TeXworks, choose MakeIndex instead of pdfLaTeX...