Re: Minitocs in sections: how? (book class)



In article <87iq4ahw03.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Merciadri Luca <Luca.Merciadri@xxxxxxxxxxxxxxxxx> wrote:

I'm using the book class, and I would like to put minitocs in some
given sections, because such sections are sometimes long (and, no,
they can't be split to a higher hierarchy). The minitoc's author
apparently did everything to prevent the user from doing this, but I
need to do it... I'm using \dominitoc, \doparttoc, and \dosecttoc,
\minitoc, but I receive such errors:

==
! Package minitoc Error: <E0037>
(minitoc) The \dosecttoc command is incompatible
(minitoc) with the document class.


Everything you can do with minitoc you can do with titletoc (I think).
So maybe you should switch to that.

The following will give you an idea. Check the titletoc documentation
(which is part of titlesec) for more details, including how to format
the TOCs. -Alan


\documentclass{book}
\usepackage{lipsum}
\usepackage{titletoc}

\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A long section}
\startcontents[section]
\printcontents[section]{}{2}{\setcounter{tocdepth}{3}}
\lipsum[1-2]
\subsection{SubA}
\subsubsection{SSub-a}
\subsection{SubB}
\subsubsection{SSub-b}
\subsection{SubC}
\end{document}
.