4

I hope to add the contents in the beginning of a chapter. This is an example:

enter image description here

Thank you !!

Student
  • 1,134
  • 2
  • 9
  • 27

1 Answers1

2

There are (as comments have noted) a number of possible ways to do this. One is the minitoc package. Basically it picks up entries from the table of contents. The minimal use involves

  • \usepackage{minitoc}
  • add \tableofcontents or \faketableofcontents for the whole document
  • add \dominitoc to prepare the minitocs
  • add \minitoc in each chapter where you want it printed

Code:

\documentclass{book}
\usepackage{minitoc}
\begin{document}
\dominitoc% <-- Get it ready
\tableofcontents%<-- or \faketableofcontents if you don't actually want one
\chapter{Blah}
\minitoc
\section{Blah blah}
\section{Blah blah blah}
\section{Foo! Bah!}
\end{document}

enter image description here

As always, texdoc minitoc is your best friend. The documentation is good.

Paul Stanley
  • 18,151