[Tex/LaTex] Minitoc + thesis template + pdflatex

minitoctable of contentsthesis

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?

Best Answer

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


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

\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.

enter image description here

Related Question