views:

1126

answers:

2

I would like to make a LaTeX document with two tables of contents, like:

Contents overview

  • 1 - Introduction
  • 2 - Solution

Detailed contents

  • 1 - Introduction
    • 1.1 - The problem
    • 1.2 - Why?
  • 2 - Solution
    • 2.1 - Phase A
    • 2.2 - Phase B

I tried with

\setcounter{tocdepth}{1}
\tableofcontents

\setcounter{tocdepth}{2}
\tableofcontents

but this only displays the first table of contents as required. The second table of contents is empty... (The second table of contents is actually empty even without the two \setcounter lines.)

(A related question: how to change the title of the table of contents (to something different than the default Contents)?)

+5  A: 

Have you tried the shorttoc package?

Hao Lian
Voila! Thanks, this solved it precisely!
Ole Lynge
A: 

You can change the name of the ToC with \renewcommand,

\renewcommand{\contentsname}{My New Table Of Contents}

Example:

\documentclass{amsart}
\usepackage{hyperref}
\renewcommand{\contentsname}{My New Table of Contents}
\begin{document}

\setcounter{tocdepth}{3}
\tableofcontents
\newpage

\newpage
\section{Section a}
Some a text.
\subsection{Subsection b}
Some b text.
\subsubsection{Subsubsection c}
Some c text.

\newpage
\section{Section d}
Some d text.
\subsection{Subsection e}
Some e text.

\end{document}

I have customized the look of the \maketitle command using \renewcommand, so you might want to look into renewing \tableofcontents.

Derek E
It does not seem to change the title of the table of contents. I don't know how to use that...
Ole Lynge
You put the command inside your preamble. I'll edit-in an example.
Derek E