# Two tables of content

See the min expl below. I would like to have two ToC: one giving only the rough structure of the document and a second one giving all the details down to subsubsections. The code pasted below should do just that but the second ToC is not displayed which I do not understand.

\documentclass{report}

\begin{document}

\setcounter{tocdepth}{1}
\setcounter{secnumdepth}{3}

\tableofcontents

\renewcommand*\contentsname{Contents (detailed)}

\setcounter{tocdepth}{3}

\tableofcontents

\chapter{XXX}
\section{YYY}
\subsection{WER}
\subsubsection{ABC}
\subsubsection{DEF}
\subsection{ZTR}
\subsubsection{OIU}
\subsubsection{OIZ}
\subsubsection{POI}
\section{YYY}
\subsection{WER}
\subsubsection{EDC}
\subsubsection{RFV}
\subsection{TGB}
\subsubsection{ZHN}
\subsubsection{OUH}
\subsubsection{WEK}
\chapter{ZZZ}
\chapter{AAA}

\end{document}


Just noticed there is still a problem with hyperref:

\documentclass[10pt, a4paper]{report}
\usepackage{shorttoc}
\usepackage{hyperref}
\begin{document}

\setcounter{secnumdepth}{3}

\pdfbookmark[1]{Contents}{toc}
\shorttoc{Contents}{1}

\pdfbookmark[1]{Contents (detailed)}{toc}
\shorttoc{Contents (detailed)}{3}

\tableofcontents

\chapter{XXX}
\section{YYY}
\subsection{WER}
\subsubsection{ABC}
\subsubsection{DEF}
\subsection{ZTR}
\subsubsection{OIU}
\subsubsection{OIZ}
\subsubsection{POI}
\section{YYY}
\subsection{WER}
\subsubsection{EDC}
\subsubsection{RFV}
\subsection{TGB}
\subsubsection{ZHN}
\subsubsection{OUH}
\subsubsection{WEK}
\chapter{ZZZ}
\chapter{AAA}

\end{document}


By what does {toc} has to be replaced in the second \pdfbookmark? [Sorry, had problem with editing the above comment --> administrator please delete it!]

-

The package you need is shorttoc:

\documentclass[10pt, a4paper]{report}
\usepackage{shorttoc}

\renewcommand*\contentsname{Contents (detailed)}

\begin{document}

\shorttoc{Contents}{1} % Only sections

\tableofcontents


The important thing is that \shorttoc comes before \tableofcontents; you can specify any depth you want with the second argument.

In case you want to use hyperref, then here's how:

\documentclass[10pt, a4paper]{report}
\usepackage{shorttoc}
\usepackage{hyperref}

\renewcommand*\contentsname{Contents (detailed)}

\begin{document}

\pdfbookmark[1]{Contents}{toc}
\shorttoc{Contents}{1}

\cleardoublepage
\pdfbookmark[1]{Contents (detailed)}{toc (detailed)}
\tableofcontents


Notice that you don't have to specify \shorttoc for the detailed contents, but only \tableofcontents.

-
Perfect, problem solved. –  lpdbw Jul 23 '12 at 9:30
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8471542596817017, "perplexity": 3691.5259626061875}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-10/segments/1393999654396/warc/CC-MAIN-20140305060734-00005-ip-10-183-142-35.ec2.internal.warc.gz"}