I have almost done with my document, but the problem is that when I print my Index, the table of contents is not showing me the corresponding number (I want to make it as a chapter). So, I used
\makeindex[columns=3, title=Indice Analitico, intoc, options= -s example_style.ist]
at the beginning, and then \printindex
, but the result inside the toc is not the expected one. Here there is a small example of my issue:
\usepackage{imakeidx}
\makeindex[columns=3, title=Index, intoc,
options= -s example_style.ist]
\begin{document}
\tableofcontents
\chapter{First Chapter}
This is the first \index{first} chapter
\printindex
\chapter{Third Chapter}
\end{document}
Best Answer
Edit Thanks for the example!
You didn't provide a compilable example, butthe case is covered in the package documentation.Here's an answer assuming that you are using the
book
class. Meaning that you want the TOC to include a numbered\chapter
-level index.The same holds for the
article
class, mutatis mutandis (you want the index to be on the\section
level).Disable the option
intoc
of\makeindex
and use instead the optionlevel
of\indexsetup
. From p. 5 of the documentation:(emphasis mine.) The default value is the starred version of either
\chapter
or\section
, which produces an unnumbered chapter/section. Change this to the unstarred version.And here's the new TOC.