Debian Codegraph @

texmf-dist/doc/latex/minitoc/examples/mtc-apx.tex

raw
1 %%
2 %% This is file `mtc-apx.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% minitoc.dtx (with options: `mtc-apx')
8 %% This is a generated file.
9 %%
10 %%
11 %% This file may be distributed and/or modified under the conditions of
12 %% the LaTeX Project Public License, either version 1.3 of this license
13 %% or (at your option) any later version. The latest version of this
14 %% license is in:
15 %%
16 %% http://www.latex-project.org/lppl.txt
17 %%
18 %% and version 1.3 or later is part of all distributions of LaTeX version
19 %% 2003/12/01 or later.
20 %%
21 %% This work has the LPPL maintenance status "maintained".
22 %%
23 %% The Current Maintainer of this work is GitHub minitoc organisation.
24 %%
25 %% This work consists of all the files listed in the file `minitoc.l'
26 %% distributed with it.
27 %% Copyright 1993 1994 1995 1996 1997 1998 1999 2000
28 %% 2001 2002 2003 2004 2005 2006 2007 2008
29 %% Jean-Pierre F. Drucbert
30 %% Copyright 2018 GitHub minitoc organisation (David Carlisle)
31 \documentclass[oneside]{book}
32 \ProvidesFile{mtc-apx.tex}%
33 [2007/03/22]%
34 \usepackage{lipsum} % provides filling text
35 \usepackage{tocbibind} % adds some entries in the main TOC.
36 \usepackage[tight,listfiles]{minitoc}
37 \setcounter{minitocdepth}{3} \setcounter{parttocdepth}{3}
38 \begin{document}
39 \doparttoc \dominitoc % prepare the mini-tables
40 \tableofcontents
41 \mtcaddchapter % because tocbibind adds a chapter entry in the TOC
42 \chapter{First}
43 \minitoc
44 First chapter
45 \section{First section} \lipsum[1]
46 \section{Second section} \lipsum[2]
47 \chapter{Second}
48 \minitoc
49 Second
50 \section{First section of second chapter} \lipsum[3]
51 \section{Second section of second chapter} \lipsum[4]
52 \appendix % begins the appendices
53 \addcontentsline{toc}{part}{Appendices} % adds a part entry in the TOC
54 \adjustptc % fixes the parttoc counter ptc
55 \mtcsettitle{parttoc}{List of Appendices} % changes the parttoc title
56 \parttoc % adds a partial toc for the appendices
57 \begin{mtchideinmaintoc}[-1] % hides the details of the appendices in the main TOC,
58 \chapter{First appendix}
59 \minitoc
60 First appendix
61 \section{First section} \lipsum[5]
62 \section{Second section} \lipsum[6]
63 \chapter{Second appendix}
64 \minitoc
65 Second appendix
66 \section{First section of second appendix} \lipsum[7]
67 \section{Second section of second appendix} \lipsum[8]
68 \end{mtchideinmaintoc} % end of hiding
69 \end{document}
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136 %%
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176 \endinput
177 %%
178 %% End of file `mtc-apx.tex'.