Debian Codegraph @

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

raw
1 %%
2 %% This is file `mtc-bk.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% minitoc.dtx (with options: `mtc-bk')
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 %%%%%%%%%%%%%%%%%%%%% A example file (differs from previous versions)
32 %% mtc-bk.tex
33 %% This file contains a set of tests for minitoc package file.
34 %% You can alter most of parameters to test.
35 %% Class: book/report (\chapter must be defined).
36 %% You can use a copy of this file to play with minitoc commands and parameters.
37 \documentclass[12pt,a4paper]{report} % the report class uses less pages
38 %% \documentclass[12pt,a4paper]{book}
39 \ProvidesFile{mtc-bk.tex}%
40 [2007/06/06]
41 \usepackage{lipsum} % provides filling text
42 %% \usepackage{hyperref} % if used, load it BEFORE minitoc
43 %% \usepackage{mtcoff}
44 \usepackage[tight]{minitoc} % tight option make shorter mini-tables
45 \setcounter{secnumdepth}{5} % depth of numbering of sectionning commands
46 \setcounter{tocdepth}{3} % depth of table of contents
47 \setlength{\mtcindent}{24pt} % indentation of minitocs, default
48 \renewcommand{\mtcfont}{\small\rm} % font for minitocs, default
49 \renewcommand{\mtcSfont}{\small\bf} % font for minitocs, sections, default
50 %% \renewcommand{\mtcSSfont}{\small\sf} % font for minitocs, subsections
51 %% you can make experiments with \mtcSSSfont, \mtcPfont and \mtcSPfont
52 %% but it is ``fontomania''...
53 \raggedbottom % or \flushbottom, at your choice
54 %%% TEST: uncomment the next line to test resetting chapter number in each part
55 %% \makeatletter \@addtoreset{chapter}{part} \makeatother
56 %%% END TEST
57 \begin{document}
58 \mtcpagenumbers
59 \noptcrule
60 %% \nomtcrule % suppresses minitoc rules
61 %% \nomtcpagenumbers % suppresses minitoc page numbers
62 %% \nomlfpagenumbers % ---------- minilof ---- -------
63 %% \nomltpagenumbers % ---------- minilot ---- -------
64 \dominitoc
65 \dominilof[c] % centers title of minilof's
66 \dominilot
67 \doparttoc % test of parttoc/partlof stuff
68 \dopartlof % added in version #15
69 \dopartlot % added in version #15
70 \tableofcontents % or \faketableofcontents
71 \listoffigures % or \fakelistoffigures
72 \fakelistoftables % or \listoftables
73 %% \addtocounter{chapter}{-1} % to begin with Chapter 0
74 \part{First Part}
75 \parttoc \partlof[r] \partlot[r]
76 \twocolumn\sloppy % the minitoc in twocolumn layout is ugly,
77 \chapter{AAAAA} % a chapter with a lot of sections
78 \minitoc[r] % minitoc title on the right
79 \lipsum[1]
80 \section{S1} \lipsum[2]
81 \section{S2} \lipsum[3]
82 \section{S3} \lipsum[4]
83 \section*{S4}
84 \addcontentsline{toc}{section}{\protect\numberline{}{S4}}
85 \lipsum[5]
86 \section{S5} \lipsum[6]
87 \section{S6} \lipsum[6]
88 \section{S7} \lipsum[7]
89 \section{S8} \lipsum[9]
90 \section{S9} \lipsum[10]
91 \section{S10} \lipsum[11]
92 \section{S11} \lipsum[12]
93 \section{S12} \lipsum[13]
94 \section{S13} \lipsum[14]
95 \section{S14} \lipsum[15]
96 \section{S15} \lipsum[16]
97 \section{S16} \lipsum[17]
98 \section{S17} \lipsum[18]
99 \section{S18} \lipsum[19]
100 \section{S19} \lipsum[20]
101 \section{S20} \lipsum[21]
102 \section{S21} \lipsum[22]
103 \section{S22} \lipsum[23]
104 \section{S23} \lipsum[24]
105 \section{S24} \lipsum[25]
106 \section{S25} \lipsum[26]
107 \section{S26} \lipsum[27]
108 \section{S27} \lipsum[28]
109 \section{S28} \lipsum[29]
110 \section{S29} \lipsum[30]
111 \section{S30} \lipsum[31]
112 \subsection{SS1} \lipsum[32]
113 \section{S31} \lipsum[33]
114 \onecolumn\fussy % back to one column
115 \chapter{BBBBB}
116 \minitoc
117 \mtcskip % put some skip here
118 \minilof % a minilof
119 \mtcskip % put some skip here
120 \minilot % a minilot
121 \lipsum[34]
122 \section{T1} \lipsum[35]
123 \begin{figure}[t] % tests compatibility with floating bodies
124 \setlength{\unitlength}{1mm}
125 \begin{picture}(100,50)
126 \end{picture}
127 \caption{F1} % (tables are similar)
128 \end{figure}
129 \begin{table}[b] % tests compatibility with floating bodies
130 \setlength{\unitlength}{1mm}
131 \begin{picture}(100,50)
132 \end{picture}
133 \caption{T1} % (tables are similar)
134 \end{table}
135 \clearpage
136 \subsection[tt1]{TT1} % tests optional arg. of a sectionning command
137 \lipsum[36]
138 \subsubsection{TTT1} \lipsum[37]
139 \paragraph{TTTT1} \lipsum[38]
140 \begin{figure}
141 \setlength{\unitlength}{1mm}
142 \begin{picture}(100,50)
143 \end{picture}
144 \caption[f2]{F2} % tests optional arg. of a caption
145 \end{figure}
146 \section{T2} \lipsum[39]
147 \chapter*{CCCCC} % tests a pseudo-chapter; could have a minitoc.
148 \addstarredchapter{CCCCC}
149 \lipsum[40]
150 \section*{U1}
151 \addcontentsline{toc}{section}{U1}
152 \lipsum[41]
153 \subsection*{UU1}
154 \addcontentsline{toc}{subsection}{UU1}
155 \lipsum[42]
156 \subsubsection*{UUU1}
157 \addcontentsline{toc}{subsubsection}{UUU1}
158 \lipsum[43]
159 \paragraph*{UUUU1}
160 \addcontentsline{toc}{paragraph}{UUUU1}
161 \lipsum[44]
162 \section*{U2}
163 \addcontentsline{toc}{section}{U2}
164 \lipsum[45]
165 \part{Second Part}
166 \parttoc
167 \partlof[c]
168 %% % the following chapter should have no minitoc,
169 \chapter{DDDDD} % but if you uncomment \minitoc,
170 %% \minitoc % the minitoc appears
171 \lipsum[46]
172 \section{V1} \lipsum[47]
173 \subsection{VV1} \lipsum[48]
174 \subsubsection{VVV1} \lipsum[49]
175 \paragraph{VVVV1} \lipsum[50]
176 \begin{figure}[t] % tests compatibility with floating bodies
177 \setlength{\unitlength}{1mm}
178 \begin{picture}(100,50)
179 \end{picture}
180 \caption{F3} % (I have not tested tables, but it is similar)
181 \end{figure}
182 \lipsum[51]
183 \section{V2} \lipsum[52]
184 \chapter{EEEEE} % this chapter should have a minitoc
185 {% % left brace, see below
186 \setcounter{minitocdepth}{3} % depth of mini table of contents;
187 % try with different values.
188 \minitoc
189 } % right brace
190 %% this pair of braces is used to keep local the change
191 %% on minitocdepth.
192 \lipsum[53]
193 \section{W1} % with the given depth
194 \lipsum[54]
195 \subsection{WW1} \lipsum[55]
196 \subsubsection{WWW1} \lipsum[56]
197 \begin{figure}[t] % tests compatibility with floating bodies
198 \setlength{\unitlength}{1mm}
199 \begin{picture}(100,50)
200 \end{picture}
201 \caption{F4} % (I have not tested tables here, but it is similar)
202 \end{figure}
203 \lipsum[57]
204 \paragraph{WWWW1} \lipsum[58]
205 \subparagraph{WWWWW1} \lipsum[59]
206 \section{W2} \lipsum[60]
207 \appendix
208 \part{Appendices}
209 \parttoc
210 \begin{mtchideinmaintoc}[-1]
211 \chapter{Comments}
212 \minitoc
213 \section{C1} \lipsum[61]
214 \section{C2} \lipsum[62]
215 \section{C3} \lipsum[63]
216 \begin{figure}[t] % tests compatibility with floating bodies
217 \setlength{\unitlength}{1mm}
218 \begin{picture}(100,50)
219 \end{picture}
220 \caption{F5} % (I have not tested tables, but it is similar)
221 \end{figure}
222 \section{C4}
223 \chapter{Evolution}
224 \minitoc
225 \minilof %Empty => invisible
226 \minilot %Empty => invisible
227 \section{D1} \lipsum[64]
228 \section{D2} \lipsum[65]
229 \section{D3} \lipsum[66]
230 \section{D4} \lipsum[67]
231 %% this line closes the omitted part
232 \addtocontents{toc}{\protect\partbegin}
233 %% this line restore the depth in the main TOC
234 \end{mtchideinmaintoc}
235 \lipsum[68]
236 \end{document}
237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303 %%
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343 \endinput
344 %%
345 %% End of file `mtc-bk.tex'.