summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/minitoc/apx.tex
blob: 9cc8ded101a9bacb7c38979be4d029ad6de92541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
\documentclass{book}
\usepackage{tocbibind} % adds some entries in the main TOC.
\usepackage{lipsum} % provides filling text
\usepackage[tight]{minitoc}
\setcounter{minitocdepth}{3}
\setcounter{parttocdepth}{3}
\begin{document}
\doparttoc
\dominitoc
\tableofcontents
\mtcaddchapter % because tocbibind adds a chapter entry in the TOC
\chapter{First}
\minitoc
First chapter
\section{First section}
\lipsum
\section{Second section}
\lipsum
\chapter{Second}
\minitoc
Second
\section{First section of second chapter}
\lipsum
\section{Second section of second chapter}
\lipsum
\appendix      % begins the appendices
\addcontentsline{toc}{part}{Appendices} % adds a part entry in the TOC
\adjustptc     % fixes the parttoc counter ptc
\parttoc       % adds a partial toc for the appendices
\begin{mtchideinmaintoc}[-1] % hides the details of the
%              % appendices in the main TOC, but chapter-level
%              % entries would be still visible if you use 0
%              % in place of -1 as optional argument.
\chapter{First appendix}
\minitoc
First appendix
\section{First section}
\lipsum
\section{Second section}
\lipsum
\chapter{Second appendix}
\minitoc
Second appendix
\section{First section of second appendix}
\lipsum
\section{Second section of second appendix}
\lipsum
\end{mtchideinmaintoc} % end of hiding
\end{document}