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?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI 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?
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
\newcommand\addtotoc[1]{
\refstepcounter{dummy}
\addcontentsline{toc}{chapter}{#1}}
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.
\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