Question

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)?)

Was it helpful?

Solution

Have you tried the shorttoc package?

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top