# How to get two tableofcontents (general and detailled)?

I often see two table of contents in books - one for the big overview, one very detailled. I would like to have that too for a book based on Springers svmono template.

I have numbered chapters and unnumbered sections in the book. The tableofcontent produced only shows the parts and the numbered chapters. That ok for an overview. I would like to have another tableofcontent behind the first one showing all the unnumbered sections too - is that possible, and how can I achieve this?

-

Here's a possible solution using the titlesec and titletoc packages. titletoc allows you to easily create partial ToCs; in this case, we can easily create a detailed ToC. The explicit option for titlesec was used to easily redefine \section* so as to include the section title in this new detailed table of contents:

\documentclass{book}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}

\titleformat{name=\section,numberless}

\begin{document}

\renewcommand\contentsname{General Contents}
\tableofcontents
\startcontents
\printcontents{}{-1}{\chapter*{Detailed Contents}}

\part{Test Part One}
\chapter{Test Chapter One}
\section*{Test Section One One}
\section*{Test Section One Two}
\section*{Test Section One Three}
\chapter{Test Chapter Two}
\section*{Test Section Two One}
\section*{Test Section Two Two}
\section*{Test Section Two Three}
\part{Test Part Two}
\chapter{Test Chapter One}
\section*{Test Section One One}
\section*{Test Section One Two}
\section*{Test Section One Three}
\chapter{Test Chapter Two}
\section*{Test Section Two One}
\section*{Test Section Two Two}
\section*{Test Section Two Three}

\end{document}


The two ToCs obtained: the one (general, short ToC) produced by \tableofcontents:

and the detailed one produced by titletoc's \printcontents:

-
Great solution - works out of the box for me, thanks a lot! Only some of the section titles seem too long for the ToC, but I seem to remember a package like 'shorttitle' or so (?) that allows to give an alternative shorter title to a section. – user17106 Aug 11 '12 at 22:24
@user17106 I don't know of any such package... Perhaps you could ask a follow-up question? – Gonzalo Medina Aug 11 '12 at 22:36
There is already a related question here, I just found it, its simply done by: \section[toc title]{main \\ title} – user17106 Aug 11 '12 at 23:14
@user17106 Yes, the optional argument works for numbered sections; I thought you were talking about unnumbered sections, which would require a little extra work. – Gonzalo Medina Aug 11 '12 at 23:15

Use the shorttocpackage:

\usepackage{shorttoc}


Now you can make a second table of contents with the name and depth you like. For example

\shorttableofcontents{Overview}{0}
\tableofcontents


This examples produces a TOC "Overview" with only parts and chapters. You can change the number 0 to a higher one if you like, to get sections and so on too.

-
Will this new "Overview" ToC include the unnumbered sections as the OP requested? – Gonzalo Medina Aug 11 '12 at 21:49
No, this method doesn't change the normal TOC itself. Springer itself uses \section*{Problems} \addcontentsline{toc}{section}{Problems} in the template. If the OP follows this approach, the shorttocmethod works. Otherwise he has to use your method (which also works with svmono). – Ivo Aug 11 '12 at 21:57
@Ivo thanks for you answer - I used the other solution, but yours would have been a nice alternative too. – user17106 Aug 11 '12 at 22:26