# \minitoc on the \part-page

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?

-
... edited the code snippet –  D.Roepo Nov 9 '11 at 17:59

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}

-
adding \usepackage{hyperref} to the solution yields an error perhaps a missing \item in the created '.ptc' file. I am not able to solve this, is it best to post a new question? –  D.Roepo Jul 8 '13 at 18:53
@D.Roepo I just did a test adding hyperref to my answer and everything worked OK (no errors) on my system (TeX Live2013). If you are getting some error(s), it would be best to open a new follow-up question including there a MWE allowing us to reproduce the problem (and perhaps providing a link to this question). –  Gonzalo Medina Jul 8 '13 at 20:25
Is it possible to alter the tocdepth of the 'minitoc' displayed on the part page within a part? I do not want multi-page tocs in the middle of the document. Simply changing it by \printcontents[parts]{}{-1}{\setcounter{tocdepth}{1}} did not do it... –  D.Roepo Nov 28 '13 at 11:13