Longer documents, such as technical books, often contain an index. This is usually placed at the end of the document. It contains a list of words and the page numbers at which a reader can find them in the document. Such a list may contain key words, topics, or person's names.
Indexing may be done at the very end. Reading through the document, a command \index{keyword}
should be placed for each place relevant to that key word. A good place can be right before the occurrence of that key word in the text. Don't leave a space between the \index{...}
command and the indexed word.
We will use the makeidx
package. We will now insert the indexing commands while writing by following these steps:
Start with a document class. We will use the same class that we used in the previous recipes:
\documentclass[parskip=half]{scrartcl}
Load the
makeidx
package:\usepackage{makeidx}
Use the this command to generate the index:
\makeindex
Begin the document:
\begin{document}
Write the...