# How to properly use minitoc after an \addcontentsline statement?

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:

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

## 1 Answer

There is a conflict between table of contents and minitoc.

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