13

I'm writing my Thesis and I want the general table of contents at the beginning of the document and the toc for every chapter at beginning of every chapter. For doing so I use the minitoc package.

If I put the \tableofcontents command at the end of the document all goes right. If instead I put it at the begin of the document the minitoc of first Chapter is not printed and the next ones are shifted. The second chapter has the minitoc of the first one, the third of the second and so on so forth.

\documentclass[a4paper,11pt,twoside]{memoir}
\usepackage{minitoc}

\dominitoc

\begin{document}

\tableofcontents
\listoffigures

\chapter{first}
\minitoc
\section{first first}
\section{first second}

\chapter{second}
\minitoc
\section{second first}
\section{second second}

\chapter{third}
\minitoc
\section{third first}
\section{third second}


\end{document}

1 Answer 1

29

memoir does some redefinitions of ToC features and apparently minitoc is confused by this.

However, there is a solution for this: minitoc provides the \adjustmtc[...] command, the optional argument is meant for adjusting the number of the minitoc, defaulting to one.

Saying \adjustmtc before the first \minitoc appears cures the problem.

I found this nice command hidden in the minitoc documentation when I tried to find a solution for this question: How can I put a minitoc before a chapter, on the facing page?.

Please note that minitoc is a package that is basically unmaintained since its author, J.P. Drucbert, died in 2009.

\documentclass[a4paper,11pt,twoside]{memoir}
\usepackage{minitoc}

\dominitoc

\begin{document}

\tableofcontents
\adjustmtc
\listoffigures
\adjustmtc
\chapter{first}

\minitoc
\section{first first}
\section{first second}

\chapter{second}
\minitoc
\section{second first}
\section{second second}

\chapter{third}
\minitoc
\section{third first}
\section{third second}


\end{document}

enter image description here

10
  • 1
    thanks! this works until there is no \listoffigures command after \tableofcontents. Do you know why?
    – Red
    Commented Feb 8, 2016 at 8:37
  • 1
    @Red: I'll try to figure out
    – user31729
    Commented Feb 8, 2016 at 8:39
  • 1
    Don't worry, I just got the solution. It is sufficient to add another \adjustmtc after \listoffigures
    – Red
    Commented Feb 8, 2016 at 8:41
  • @Red: Yes, found it too :-) But apparently, memoir and minitoc are not the best combination
    – user31729
    Commented Feb 8, 2016 at 8:42
  • 1
    Yes, I figured it out.. but unfortunately I'm too close to the deadline for changing this evil combination :-)
    – Red
    Commented Feb 8, 2016 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .