I hope to add the contents in the beginning of a chapter. This is an example:
Thank you !!
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}\tableofcontents or \faketableofcontents for the whole document\dominitoc to prepare the minitocs\minitoc in each chapter where you want it printedCode:
\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}
As always, texdoc minitoc is your best friend. The documentation is good.
minitoc? – Paul Stanley May 05 '18 at 11:03minitoc? Thanks – Student May 05 '18 at 11:07