7

I would like the minitoc to print e.g. subsubsections, as the toc does in the following minimal example. But the minitoc does not print the subsubsection "Subsubsection not show up in minitoc" in the following:

\documentclass{book}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{minitoc}

\begin{document}
\dominitoc
\tableofcontents

\chapter{Chapter title}

\minitoc

\section{Test 1}
hello

\section{Test 2}
hello

\subsection{Test 2 subsection}
hello

\subsubsection{Subsubsection not show up in minitoc}
hello
\end{document}
Xu Wang
  • 1,239

1 Answers1

7

Like this?

deeper mini-toc

I'm assuming the manual for minitoc explains this, assuming it has one, but, in all honesty, I just guessed.

\documentclass{book}
\usepackage{minitoc}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\setcounter{minitocdepth}{5}

\begin{document}
\dominitoc
\tableofcontents

\chapter{Chapter title}

\minitoc

\section{Test 1}
hello

\section{Test 2}
hello

\subsection{Test 2 subsection}
hello

\subsubsection{Subsubsection not show up in minitoc}
hello
\end{document}
cfr
  • 198,882
  • Ah yes I should have guessed that! Maybe you can edit answer to remove hardcode of 5. For example, I find \setcounter{minitocdepth}{\value{tocdepth}} to be more elegant. I'm not sure that is correct way so I don't edit myself. Thank you for helping. – Xu Wang Jan 12 '17 at 14:15