# Minitoc + thesis template + pdflatex

I added the package minitoc \usepackage[nohints]{minitoc} to this template and did as I read: add \dominitoc before \tableofcontents and \minitoc after a chapter's creation, but it doesn't appear.

What am I missing?

-

## migrated from stackoverflow.comDec 1 '11 at 20:34

This question came from our site for professional and enthusiast programmers.

minitoc produces a file <jobname>.mtc? for each of the chapter-level sectioning commands in the thesis template (here ? denotes the current chapter-level section). So, if <jobname> is Thesis,

• Thesis.mtc1 corresponds to "Declaration of Authorship"
• Thesis.mtc2 corresponds to "Abstract"
• Thesis.mtc3 corresponds to "Acknowledgements"
• Thesis.mtc4 corresponds to "List of Figures"
• Thesis.mtc5 corresponds to "List of Tables"
• Thesis.mtc6 corresponds to "Abbreviations"
• Thesis.mtc7 corresponds to "Physical Constants"
• Thesis.mtc8 corresponds to "Symbols"
• Thesis.mtc9 corresponds to "1 Chapter Title Here"
• Thesis.mtc10 corresponds to "A Appendix Title Here"
• Thesis.mtc11 corresponds to "Bibliography"

These files are created with a call to \dominitoc, which cycles through the chapter-level commands and extracts the relevant ToC entries associated with each chapter. The thesis documentclass Thesis.cls defines a command

\refstepcounter{dummy}

used throughout to add elements to the ToC at the chapter-level. As such, minitoc mistakenly mixes up the chapter numbering, as given above in the files generated after issuing \dominitoc.

To help minitoc in choosing the appropriate .mtc? file, we can set the minitoc ToC counter, or mtc, to the appropriate number before the chapter so that the extraction for the actual \minitoc associated with Chapter 1 is used. As such, use

\setcounter{mtc}{8}
\input{./Chapters/Chapter1} % Introduction
%...

since mtc is incremented with \chapter.

On a side note, one can see that only Thesis.mtc9 has a file size greater than 0 bytes, while all others are empty, since they produce no sub-chapter-level ToC entries.

-
Thank you so much! :D It has worked perfectly for me too. I wanted to up-vote you but I don't have enough reputation x.x . Thanks again! :D – Carlos Dec 2 '11 at 13:42
Arf.. I just spent four hours wasting my time looking for answer between my mtc files and other comments, and here it is... So clearly explained, thank you so much! – user18028 Aug 26 '12 at 12:45
I spent many hours trying all the solutions I could find in the Internet, but none was working. Until I found this post. Thanks a lot for your clear and complete explanation! It worked like a charm. In case it's useful for someone else, I'll add that I'm using the standard "book" template and that my minitocs were desynchronised with the chapters, and that some chapters were not showing a minitoc at all. Just by adding the command \setcounter{mtc}{X} before the \include{} or \input{} of the first chapter, where "X" is the number of entries showing in the TOC before that "includ – NunonuN Jun 29 '13 at 15:18

## protected by Community♦Jan 18 '14 at 20:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.