Document Classesminitoc of chapter X shifted to chapter X+1

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
dimarcom
Posts: 26
Joined: Wed Mar 05, 2008 11:03 am

minitoc of chapter X shifted to chapter X+1

Post by dimarcom »

Hi,

I encounter a funny problem, here a bit of code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[13pt]{scrbook}
\usepackage{minitoc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\frontmatter
\chapter{Preface}
blabla

\dominitoc \tableofcontents


\mainmatter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Overview}
blabla
\minitoc

\section{somethingOOO}
\label{sec:somethingOOO}
\subsection{else}
\label{sec:else}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Operation}%
\label{sec:operation}
blabla
\minitoc

\section{somethingPPP}
\label{sec:something2}
\subsection{elsePPP}
\label{sec:else1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

If i put the preface after the \dominitoc command, it's all fine.

\dominitoc \tableofcontents
\chapter{Preface}
blabla


But if i put the preface before the \dominitoc command, the minitoc of the chapters are shifted, i.e. the minitoc in chapter 1 is empty, but the chapter1 minitoc appears in chapter 2, and the minitoc of chapter 2 appears in chapter 3, etc.

\chapter{Preface}
blabla
\dominitoc \tableofcontents


I would like my preface to appear before the toc... any idea ?

thanks
marie

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Re: minitoc of chapter X shifted to chapter X+1

Post by Stefan Kottwitz »

Hi Marie,

put the \dominitoc command before the preface, perhaps even before the frontmatter. That command should be called before the first sectioning command like \chapter, else you may get that disorder in the minitoc tables.

Stefan
LaTeX.org admin
dimarcom
Posts: 26
Joined: Wed Mar 05, 2008 11:03 am

Re: minitoc of chapter X shifted to chapter X+1

Post by dimarcom »

... that was simple enough, thanks a lot !

marie.
Post Reply