For my thesis, I am working with a few chapters separately and I am including these chapters in my main .tex file. I have defined my Preface with \chapter*{Preface}. In order to add the Preface to Table of Contents I have used \addcontentsline. For the header I have used \chaptermark.

\chapter*{Preface}
\chaptermark{Preface}


This worked perfectly until I realized that my mini table of contents of other chapters are no longer appearing after I compiled. I have compiled several times no change. What can I do to make them appear while I have my Preface in the Table of Contents with the correct header.

\begin{document}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}

\dominitoc

\pagenumbering{roman}

\cleardoublepage

\parskip=2ex

\frontmatter

\begin{titlepage}
\maketitle
\end{titlepage}

\chapter{Dedication/dedication}
\chapter{Declaration/declaration}
\chapter{Acknowledgement/acknowledgement}
\chapter{Abstract/abstract}

\tableofcontents
\printnomenclature

\mainmatter
\chapter{Preface/preface}
\chapter{Chapter1/chapter1}
\chapter{Chapter2/chapter2}
\backmatter
\listoffigures

\listoftables
\end{document}


I would be glad if anyone helps in this issue.

Edit: Here I simplified my code to make a working example. Honestly, I don't know if minitoc works in report class since when I comment the Preface part minitoc doesn't work in any case. (Normally I do use a class for thesis and minitoc works if I don't add the Preface in the Table of Contents.)

\documentclass[a4paper]{report}
\usepackage{minitoc}
\begin{document}

\dominitoc
\chapter*{Dedication}
\chapter*{Declaration}
\chapter*{Acknowledgement}
\chapter*{Abstract}

\tableofcontents

\chapter*{Preface}
\chaptermark{Preface}
\chapter{Chapter 1}
We will have two sections here.
\section{AA}
Here, I have my first section.
\section{BB}
This is my second section.
\chapter{Chapter2}
\section{CC}
This is the CC section.
\chapter{Chapter 3}
\section{DD}
This is the DD section.
\listoffigures

\listoftables
\end{document}

• Your document is not compilable, so nobody will be able to test the issue easily. Check the faq in the documentation "2.30 Useful precautions with starred sectionning commands". – Ulrike Fischer Jan 30 '17 at 14:53
• Thanks! I made simplified my code but I am not sure if it will help since I had to change the class in order to make a working example. – physicienne Jan 30 '17 at 15:18
• Did you check the faq? – Ulrike Fischer Jan 30 '17 at 15:38
• Yeap I just tried \mtcaddchapter[Preface] instead of \addcontentsline{toc}{chapter}{Preface} and it seems it is working. Thank you a lot. – physicienne Jan 30 '17 at 16:14
• @physicienne: None of your code given here uses the \minitoc command (unless it is in the several local files you \include) – user31729 Jan 30 '17 at 23:38

Explicit \addcontentsline statements for starred structure units confuse the counting and the several minitoc auxiliary files. This is why \addstarredchapter exists:

\documentclass[a4paper]{report}
\usepackage{minitoc}
\begin{document}

\dominitoc
\chapter*{Dedication}
\chapter*{Declaration}
\chapter*{Acknowledgement}
\chapter*{Abstract}

\tableofcontents

\chapter*{Preface}
\chaptermark{Preface}
\chapter{Chapter 1}
\minitoc
We will have two sections here.
\section{AA}
Here, I have my first section.
\section{BB}
This is my second section.
\chapter{Chapter2}
\minitoc
\section{CC}
This is the CC section.
\chapter{Chapter 3}
\minitoc
\section{DD}
This is the DD section.
\listoffigures

\listoftables
\end{document}

• \addstarredchapter still working June 2017! – s.k Jun 25 '17 at 18:43
• @s.k: what do you mean? – user31729 Jun 25 '17 at 19:09
• I meant the solution is still working. Instead of \addcontentsline. I had the same issue with minitoc that doesn't show up with starred chapter in a report. – s.k Jun 25 '17 at 19:26
• @s.k: Since neither minitoc nor report class really changed, there is no reason why it should not work any longer ;-) – user31729 Jun 25 '17 at 19:40