0

I give a minimal example of my issue:

\documentclass[12pt]{book}
\usepackage{hyperref}
\usepackage{minitoc}

\begin{document}
\dominitoc\tableofcontents

\chapter*{Introduction}\label{chp:int}
\addcontentsline{toc}{chapter}{\nameref{chp:int}}

\chapter{Chapter1}
\minitoc % No minitoc appears here on the pdf output
\section{Section 1.A}
\section{Section 1.B}

\chapter{Chapter2}
\minitoc % minitoc of chapter 1 appears here
\section{Section 2.A}
\section{Section 2.B}
\end{document}

The minitoc of chapter 1 is rendered after the chapter 2. The minitoc of chapter 2 is never rendered. See the following illustration:

Wrong minitoc is rendered!

If I remove the line \addcontentsline{toc}{chapter}{\nameref{chp:int}}, the bug is fixed. But then Introduction does not appear in the table of contents.

How can I use minitoc properly in my case ?

  • Shouldn't \dominitoc be after \tableofcontents ? – albert May 16 '18 at 16:41
  • It doesn't matter whether it's before or after. There is still the same bug. – user2682877 May 17 '18 at 9:10
2

There is a conflict between table of contents and minitoc.

The solution is to use the command \adjustmtc after calling \tableofcontents.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.