I have to put a index on my report because the report is too long. How I create and what packages I have to use to make a index for a report? I need a index appropriate to a report. I wanna the index in the second page of my report. (after the cover)
\documentclass{article}
\usepackage{imakeidx}
\makeindex[program=xindy, options=-C utf8 -L portuguese]
\begin{document}
\printindex
\begin{abstract} Estudou-se o valor da acelera\c{c}\~{a}o grav\'{i}tica
\end{abstract}
\section{Objectivos do Trabalho}
A finalidade da experi\^{e}ncia\index{finalidade da experi\^{e}ncia} de:
\end{document}
Best Answer
I suggest making it with
xindy
, which has the advantage to understandutf8
if you have accented letters. Loading theimakeidx
package, you obtain the index in one compilation.You need two commands:
\makeindex[options to pass to the index compiler]
in the preamble, andprintindex
at the place where you want it in your document. However, unless I've missed something, there seems to be one restriction:\printindex
has to be used only after all items are indexed. Theindex{…}
commands which appear afterwards won't be written in the.idx
file.Here is a code:
If you really need your index at the beginning of your document, you can load the
makeidx
package, insert the\makeindex
command in the preamble and\printindex
in the document body. Then compile withpdflatex + makeindex + pdflatex
. As accented letters are not understood bymakeindex
, you have to index items with\index{sortingtext@text-with-accents}
. Here is an example: