Latex – Shift with minitoc

By | 2012-12-18

Another post about Latex, but you’re in the middle of your thesis redaction, and you finally found a solution to something that’s been bothering you for quite a time, it’s a good idea to keep it somewhere.

Here, all begun with a problem with the TOC (Table of Contents).

Some items in the TOC where associated with the wrong page numbers after compiling the tex file, so I used the tocbibind package who handles it fine, and finally I can stop fighting with:
\phantomsection
\addcontentsline{toc}{chapter}{}

But, by adding a TOT (Table of Tables) and a TOF (Table of Figures), the intern minitoc within each chapter became shifted. I got the minitoc from chapter 1 in chapter 4…

To prevent this, you should add \mtcaddchapter after declaring each TOC, TOT and TOF:
% TOC
\tableofcontents
\mtcaddchapter
% TOT
\listoftables
\mtcaddchapter
% TOF
\listoffigures
\mtcaddchapter

15 thoughts on “Latex – Shift with minitoc

  1. Bruno

    great, Great, GREAT !!

    I’d to add these lines only for \listoffigures and \listoftables, but it work !

    Thank a lot !

    Reply
  2. max Post author

    Good to know I helped someone with that 😀

    Reply
  3. kamoun

    Excellent (I added the lines only for \listoffigures and \listoftables) 🙂

    Reply
  4. litlesearcher

    Hi thank a lot.
    Your post is awesome.
    I would like to add something.
    For my own document i where using references by chapter, wich shifted my minitoc by one, every chapter.
    so for whom get the same issue, just add \mtcaddchapter after your references part.
    It worked for me

    Reply
  5. litlesearcher

    Hi thank a lot.
    Your post is awesome.
    I would like to add something.
    For my own document i where using bibliography by chapter, wich shifted my minitoc by one, every chapter.
    so, for whom get the same issue, just add \mtcaddchapter after every of your Blibliography call.
    It worked for me

    Reply
  6. ed

    excellent ! i had the issue of minitocs being shifted by one chapter (plus no minitoc displayed on the first chap) and it works fine for me as well when simply added after the \listoffigures and \listoftables.
    thanks a lot !

    Reply

Leave a Reply to sniper Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.