77

How can one have a mini table of contents for the current chapter appear just after the chapter name listing all sections of that chapter?

lockstep
  • 250,273
Robert
  • 947

3 Answers3

81

Have a look at the minitoc package. Here's a minimal example:

\documentclass{book}

\usepackage{minitoc}

\begin{document}

\dominitoc% Initialization
\tableofcontents

\chapter{bla}
\minitoc% Creating an actual minitoc

\section{blubb}

\section{foo}

\end{document}

enter image description here

lockstep
  • 250,273
40

more info here http://www.ctan.org/tex-archive/macros/latex/contrib/minitoc/

for minitoc to be visible you need both \dominitoc \tableofcontents

you can change how deep minitoc goes:

\setcounter{minitocdepth}{1}    % Show until sections in minitoc

\setcounter{minitocdepth}{3}    % Show until subsubsections in minitoc

edit 1: more about formating minitoc (insert in preamble)

\dominitoc[n]      % [n] removes the title "contents"

(this inserts minitoc and won't work without toc

\dominitoc[c]      % [c] centers the title "contents"

(someone please edit how other parameters should be added: [n][v] or [n, c], even if this is not a good example as as c and n don't go together)

\nomtcrule         % removes rules = horizontal lines

\nomtcpagenumbers  % remove page numbers from minitocs

\undotted          % removes just the dots

you did not ask for this but you can also have minilof (for figures) and minilot (for tables)

Splashy
  • 5,915
  • 2
    \tableofcontents is not necessary for creating minitocs - you could use \faketableofcontents instead. – lockstep Dec 02 '10 at 20:40
14

You can also do this with the titletoc package, and avoid some of the interactions that minitoc sometimes has. See this answer for an example. (Although the example uses memoir, titletoc can be used with any of the regular document classes too.)

Alan Munn
  • 218,180