[Tex/LaTex] \minitoc on the \part-page

minitocpartssectioningtable of contents

I would like to modify the \partpage such that it shows a table of contents of that part. Preferably also one or two levels deeper than the toc in the beginning of the document.

In styling the \part page Alan Munn shows how to edit the page,

\documentclass{report}

\usepackage{titlesec,minitoc}  
\titleclass{\part}{top}
\titleformat{\part}
{\centering\normalfont\Huge\bfseries} 
{} 
{0pt} 
{}

\begin{document}
\tabkeofcontents

\part{This is the Part}
\minitoc %\parttoc,\doparttoc

\chapter{This is its first chapter}
\chapter{This is its second chapter}
\end{document}

but how do I add the 'minitoc'? In the above snippet neither \minitoc nor \parttocor \doparttoc have any effect. \minitoc only works for chapters – not parts. Is there any other option or a smart modification I did not find?

Best Answer

Since you are using titlesec it's not convenient to use minitoc. The following remark appears in the minitoc documentation:

The titlesec package redefines the sectionning commands in a way completely alien to the standard LaTeX way; hence minitoc and titlesec-titletoc are fundamentaly incompatible, and it is very sad.

However, you can easily produce the ToCs using titletoc:

\documentclass{report}
\usepackage{titlesec,titletoc}  

\titleclass{\part}{top}
\titleformat{\part}
  {\centering\normalfont\Huge\bfseries}{}{0pt}{}

\setcounter{secnumdepth}{5}

\begin{document}
\tableofcontents

\part{This is the Part}
\startcontents[parts]
\printcontents[parts]{}{-1}{\setcounter{tocdepth}{5}}

\chapter{First part. This is its first chapter}
\section{First part. Section}
\subsection{First part. Subsection}
\subsubsection{First part. Subsubsection}
\paragraph{First part. Paragraph}
\subparagraph{First part. Subparagraph}
\chapter{First part. This is its second chapter}

\stopcontents[parts]

\part{This is the Part}
\startcontents[parts]
\printcontents[parts]{}{-1}{\setcounter{tocdepth}{5}}

\chapter{Second part. This is its first chapter}
\section{Second part. Section}
\subsection{Second part. Subsection}
\subsubsection{Second part. Subsubsection}
\paragraph{Second part. Paragraph}
\subparagraph{Second part. Subparagraph}

\end{document}