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)?)
In case the tables are to be set without table environment, there are two ways to put two tables side-by-side. First just put the two tables in a first one, second minipage. By using the first option \hline have to replaced by \cline.
Generally, the table of contents includes chapters, sections, and subsection. You are also allowed to add entries manually in LaTeX. This is generally done to add the unnumbered sections. To do so, just add the \addcontentsline command, as shown in the above example.
Have you tried the shorttoc package?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With