# minitoc: \parttoc does not work for several chapters

I have another problem with minitoc package (and command parttoc).

I have 3 parts in the document, asking for a content within each part. LaTex actually places three contents, but they are all the same (for part 1).

I was trying to simulate the example, it does not give me exactly the same thing, but it does not work neither. I have Part* at the begining, and Chapters* within the Parts. As it was advised I have added \addstarredpart{ } but it does not help.

Do you have any suggestions how to fix the above code?

\documentclass{book}

\usepackage{minitoc}

\begin{document}

\doparttoc
\tableofcontents

\part{First Part}
\parttoc

\chapter{Part1 Chapter1}
\section{Part1  Section1}
\subsection{Part1 Subsections3}

\part{Second Part}
\parttoc

\chapter{Part2 Chapter1}
\section{Part2  Section1}
\subsection{Part2 Subsections3}

\part{Third Part}
\parttoc

\chapter{Part3 Chapter1}
\section{Part3  Section1}
\subsection{Part3 Subsections3}

\end{document}

• For code blocks you should indent four spaces and not use backticks. The backticks are for code snippets in larger paragraphs. Don't worry about this: it can take a while to get used to the formatting and it's easy for someone who knows to fix. Far better to ensure that you have good examples, as you do (again). – Loop Space Oct 12 '11 at 13:16

No explanation, but a solution (or at least a workaround): Instead of using \part* plus \addstarredpart, use the tocvsec2 package and its \setcecnumdepth and \resetsecnumdepth macros to create an unnumbered "Part Zero".

\documentclass{book}

\usepackage{minitoc}
\usepackage{tocvsec2}

\begin{document}

\doparttoc

\setsecnumdepth{none}

\tableofcontents

\part{Part Zero}

\resetsecnumdepth

\part{First Part}
\parttoc

\chapter{Part1 Chapter1}
\section{Part1  Section1}
\subsection{Part1 Subsections3}

\part{Second Part}
\parttoc

\chapter{Part2 Chapter1}
\section{Part2  Section1}
\subsection{Part2 Subsections3}

\part{Third Part}
\parttoc

\chapter{Part3 Chapter1}
\section{Part3  Section1}
\subsection{Part3 Subsections3}

\end{document}

• Thank you! Now this sample-file works... But in my original file (where I also replaced all the part* and chapter* as you suggested), no more any tables of contents inside the parts... It does not include nothing... May \bibliography{} be a reason? Or what else can we do? The mos annoying thing, that if I include one additional dummy part* in the begining, it includes toc in all parts but all the tables the same for part 1. if i take out this part* - none of the toc appears.... – Natalia Oct 12 '11 at 15:52
• @Natalia: In this case, try to nail down the difference between my example and a trimmed-down version of your original file. (The minitoc manual is close to useless because of its breadth, and so I'd like to have as much information as possible before delving into it.) – lockstep Oct 12 '11 at 15:56
• uffff that works... I was trying to make a small example and I found out what else was blocking. I have specified the following (in order to change, make smaller, the titles of the parts): – Natalia Oct 12 '11 at 16:24
• \makeatletter \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi \markboth{}{}% {\centering \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >-2\relax \huge\bfseries \partname\nobreakspace\thepart \par \vskip 20\p@ \fi \LARGE \bfseries #2\par}% was Huge as default \@endpart} \makeatother – Natalia Oct 12 '11 at 16:24
• If you add this to the file, it would not work, while it is working after your correction. So, I took this out of my original file, and it works perfectly. Though I will need to change manually the fonts of my parts, which is not actually a big deal. Could you please have a look on the code for changing size of parts' titles? where is the problem? why it blocks \parttoc, and if I add part*{smth} before the first part, it will produce TOC for each chapters but all the same... – Natalia Oct 12 '11 at 16:25