[Tex/LaTex] Mini Table of Content \minitoc drove itself crazy (i was on board) … how to fix

minitoctable of contents

I am using minitoc.

In the main file,

\usepackage[english,tight]{minitoc} 

... 

...


\begin{document}
\dominitoc
\frontmatter 
...
...
\input(myChapter_one)

And at each chapter (separate file)

\chapter{Chapter name}

\minitoc


...

...

It was working fine until today. Now, what I can see, for example in chapter 5, minitoc is not synchronized, it says chapter 4 like, 4.1.2 .. ..4.2….

AND,

There is no minitoc on chapter One! [\minitoc command is still on the chapter one too!]

Can you please give me some clues?

Best Answer

It looks like the important thing missing from your document is either \tableofcontents or \faketableofcontents.

Without one of these, the minitoc package will not update the \jobname.mtc* files appropriately. From your description, it sounds like the minitoc package is working from 'old' \jobname.mtc* because you are seeing chapter 4's minitoc in chapter 5.

Here is MWE

\documentclass{report}
\usepackage{minitoc}

\begin{document}

\dominitoc
\faketableofcontents    % need either this line 
%\tableofcontents       % or this one for minitoc to work

\include{chapter1}

\end{document}

If this doesn't help, please post more details in your question.