3

I want to get minitoc for each section. My following code provides the minitoc for the whole chapter but I need minitoc for only sections. Any help will be highly appreciated. Thanks

% Document Class
\documentclass[a4paper,12pt]{book}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{minitoc}

% Begin Document
\begin{document}

\dominitoc
\tableofcontents

\mainmatter
%\pagestyle{Special}

\chapter{First Chapter}
\minitoc
\section{Introduction}

\minitoc
\subsection{Intro1}
\subsection{Intro2}

% Blind Text
\blindtext[1]

\section{Material \& Method}

% Blind Text
\blindmathpaper

% End Document
\end{document}
  • The minitoc documentation says that section ToCs are not available for the report and book classes. – LaRiFaRi Mar 30 '15 at 15:11
  • @LaRiFaRi: Please see the answer of karlkoeller. – MYaseen208 Mar 30 '15 at 15:46
6

minitocs at section level are not available with the book class, to avoid having too many small ToCs throughout the document.

If you really want something like that, you can try the titletoc package and its \startcontents and \printcontents commands.

Here's an example:

% Document Class
\documentclass[a4paper,12pt]{book}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{titletoc}

% Begin Document
\begin{document}

\tableofcontents

\mainmatter
%\pagestyle{Special}

\chapter{First Chapter}
\startcontents[chapters]
\printcontents[chapters]{}{1}{}

\section{Introduction}
\startcontents[sections]
\printcontents[sections]{}{2}{}

\subsection{Intro1}
\subsection{Intro2}

% Blind Text
\blindtext[1]

\section{Material \& Method}

% Blind Text
\blindmathpaper

% End Document
\end{document} 

Output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.