5

A professional indexer has done an index for my book. I have created a new index chapter, pasted and formatted the index into it's own chapter.

When I compile the book the ToC includes the Index with a chapter number e.g.

10 Last Chapter.....400
Bibliography.........410
11 Index...............415

I want it to look like this:

10 Last Chapter.....400
Bibliography..........410
Index....................415

That is with no chapter number.

Here is my MWE with some packages that my be pertinent:

\documentclass[paper=6.125in:9.25in,pagesize=pdftex,10pt]{scrbook}
\areaset[0.375in]{4.5in}{8in}
\KOMAoptions{numbers=noendperiod} % get rid of last dot in eg Figure 3.1. 
\usepackage{natbib} % style bibliograprhy (citations)
\usepackage{tocloft}
\setlength{\cftsecnumwidth}{2.5em} % this adds a gap in 13.10 and 13.11
\begin{document}
\frontmatter
\mainmatter
\tableofcontents
\include{somechapter}
\bibliographystyle{ieeetr}
\raggedright
\clearpage
\addcontentsline{toc}{chapter}{Bibliography}
\bibliography{somebibdeskfile}
\include{index} 
\end{document}
3
  • Without seeing inside the actual file, my guess is that in the index file, change from chapter{Index} to chapter*{Index} Commented May 26, 2013 at 2:16
  • Good idea but it removes the Index listing entirely from the TOC. The index.tex file has this code \chapter{Index} and then some formatting code, so it's very basic.
    – BruceMcG
    Commented May 26, 2013 at 2:22
  • 3
    Add \backmatter before \include{index}.
    – lockstep
    Commented May 26, 2013 at 2:25

3 Answers 3

9

As you're using the scrbook class (it would also work for, e.g., book or memoir), you may simply add \backmatter before \include{index}. This way, any following chapters won't be numbered, but will still be added to the ToC (and feature correct headers).

3

You can also do one of two things:

  • A general fix for adding chapters to ToC sans numbers: use \chapter*{index} then include the index title in the ToC while also allowing proper linking (e.g. if using hyperref package) by adding the below:
\chapter*{Index}
\phantomsection
\addcontentsline{toc}{chapter}{Index}
  • Add \usepackage{makeidx} and \makeindex in document preamble. Exchange \printindex for \include{index}. Then redefine the index environment like so:
%Redefine the index environment
\makeatletter
\renewenvironment{theindex}{%
    \renewcommand{\leftmark}{Index}
    \chapter*{Index}
    \phantomsecion
    \addcontentsline{toc}{chapter}{Index}
    \vspace{1em}
    \columnseprule \z@
    \columnsep 35\p@
    \idx@heading
    \index@preamble\par\nobreak
    \thispagestyle{\indexpagestyle}\parindent\z@
    \setlength{\parskip}{\z@ \@plus .3\p@}%
    \setlength{\parfillskip}{\z@ \@plus 1fil}%
    \begin{multicols}{2}%
    \let\item\@idxitem
}{\end{multicols}\clearpage}   
\makeatother
1
  • You saved my day, because I have a very complicated Latex-Template and needed a solution for a simple glossary.
    – user7581
    Commented Nov 13, 2015 at 13:51
1

Since you're using a koma class (scrbook), you can just use the koma index class option. For example:

% arara: pdflatex
% arara: makeindex
% arara: pdflatex
% arara: pdflatex
\documentclass[index=totoc]{scrbook}

\usepackage{makeidx}
\makeindex

\begin{document}
\tableofcontents

\chapter{Sample}

Some text with a sample\index{sample} entry.

\printindex
\end{document}

(Note that two extra LaTeX runs are required after the makeindex run to ensure the table of contents is up-to-date.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .