4

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}
4

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}
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.