Any idea of how to create a mini table of contents (TOC) in the beginning of a chapter? Not the ordinary TOC in the beginning of the report, but a mini TOC in the beginning of a chapter (like, containing the specific chapter).
[Tex/LaTex] Insert Table of Contents in chapter
etocminitoctable of contents
Related Solutions
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}
The minitoc
package provides \mtcaddchapter[...]
for addition of starred chapters to the ToC. This will maintain the ability for a minitoc
as well -- see page 72 of the current minitoc
documentation and make sure to use \mtcaddchapter
after \chapter*
!
\documentclass[12pt,french]{report}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\usepackage[Lenny]{fncychap}
\usepackage{minitoc}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=3cm,rmargin=3cm,headheight=16pt}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{float}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nomencl}
\usepackage{enumitem}%pou les puces
% the following is useful when we have the old nomencl.sty package
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\onehalfspacing
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%/usepackage{t1enc}% un second package
\usepackage[francais]{babel}
% un troisième package
%\usepackage{layout}
\usepackage{fancyhdr}
\usepackage[section]{placeins}
\usepackage{lettrine}
\usepackage{blindtext}
\usepackage{chngcntr}
\floatstyle{boxed}
\title{Rapport de Projet De Fin D'Études}
\author{Amina GHABRI}
\usepackage{palatino}%police
\renewcommand{\baselinestretch}{1.5}
\AtBeginDocument{%
\def\labelitemi{\normalfont\bfseries{--}}
}
\addto\extrasfrench{%
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\leftmark}
\fancyhead[RE,LO]{\ }
\fancyfoot[CE,CO]{\thepage}
\fancyfoot[RE,LO]{\ }
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\rmfamily
\makeatletter
\addto\extrasfrench{%
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{0mm}%
{-\baselineskip}%
{.5\baselineskip}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{%
\@startsection{subparagraph}{4}{0mm}%
{-\baselineskip}%
{.5\baselineskip}%
{\normalfont\normalsize\bfseries}}
\makeatother
\dominitoc
\begin{document}
\maketitle
\tableofcontents{}\listoffigures
\listoftables
\chapter*{Introduction générale}
\mtcaddchapter[Introduction générale]
\markboth{}{}
\minitoc
\label{sec:IntroductionGénérale}
\counterwithout{section}{chapter}
\section{Some content in this starred chapter}
Conçu originellement comme un système d’exploitation réservé pour les terminaux mobiles (Smartphones, Tablettes etc.), Android a bouleversé plusieurs domaines d’utilisation comme les téléviseurs, les autoradios et même les voitures. Il a changé automatiquement le fonctionnement des entreprises et leurs environnements professionnels.
\blindtext[5]
\counterwithin{section}{chapter}
\chapter{Présenation du projet}
\label{sec:PrésenationDuProjet}
\minitoc\clearpage
\addcontentsline{toc}{section}{\protect\numberline{}Introduction}% Add title to ToC
\section*{Introduction}
\label{sec:Introduction}
\lettrine[lines=2,loversize=0.08]{L}{}e succès retentissant des Smartphones sous Android a entrainé l'émergence quotidienne de nouvelles applications et services qui reposent sur la technologie Wi-Fi.
La première partie du chapitre est consacrée à la présentation du projet et à la spécification des besoins.
\end{document}
Best Answer
Here is a quick (stock) answer for this:
The easiest way is to use
etoc
package and its\localtableofcontents
macro, at the appropriate place. The manual is at https://ctan.org/pkg/etoc.Edit Here is the
memoir
version.For some reasons I can't figure out (the manual of
etoc
is not really clear in this case) it's necessary to use\localtableofcontents*
. The individualtocdepth
can be controlled with the\etocsettocdepth.toc{sectionlevel}
command (note the.toc
in the macro name`)