Index
Published on 30 Nov 2007Tags #LaTeX
This note introduces commands to add an index to your document:
Document layout:
% ...
\usepackage{makeidx}
\makeindex
%...
\begin{document}
%...
\printindex
%...
\end{document}
Creating entries:
-
Plain:`index{blarg}`
-
Subcategory:`index{blarg!foobar}`
-
Reference:`index{blarg|see{blarg!foobar}}`
Makeindex command line:
makeindex <file>.idx
Alphabetical headers
- Create index.ist with the following content:
quote '+'
headings_flag 1
heading_prefix "{\\bf "
heading_suffix "}\\nopagebreak%\n \\indexspace\\nopagebreak%"
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
delim_r "~--~"
suffix_2p "\\,f."
suffix_3p "\\,ff."
- Modify the makeindex command line:
makeindex -s index.ist <file>.idx
Using Fancy Page Headings
For some obscure reason the index page will not use fancy headers unless you include the following line into your index.ist:
preamble "\\begin{theindex}\n\\thispagestyle{fancy}\n"