Debian Codegraph @

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

raw
1 %%
2 %% This is file `mtc-art.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% minitoc.dtx (with options: `mtc-art')
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 %% mtc-art.tex
32 %% This file contains a set of tests for minitoc
33 %% package. You can alter most of parameters to test.
34 %% article (\section must be defined)
35 \documentclass[12pt,a4paper]{article}
36 \ProvidesFile{mtc-art.tex}%
37 [2007/06/06]
38 \usepackage{lipsum} % provides filling text
39 %% \usepackage{hyperref} % If used, load it BEFORE minitoc
40 \usepackage[tight,insection]{minitoc}
41 \setcounter{secnumdepth}{5} % depth of numbering of sectionning commands
42 \setcounter{tocdepth}{3} % depth of table of contents
43 \setlength{\stcindent}{24pt} % indentation of secttocs, default
44 %% % font for secttocs, default
45 \renewcommand{\stcfont}{\small\rmfamily\upshape\mdseries}%
46 %% % font for secttocs, subsections
47 %% \renewcommand{\stcSSfont}{\small\sf}%
48 %% % you can make experiments with
49 %% % \stcSSSfont, \stcPfont and \stcSPfont
50 %% % but it is ``fontomania''...
51 \raggedbottom % or \flushbottom, at your choice
52 %%% TEST: uncomment the next line to test
53 %%% resetting section number in each part
54 %%% \makeatletter \@addtoreset{section}{part} \makeatother
55 %%% END TEST
56 \begin{document}
57 \dosecttoc
58 \dosectlof[c] % center titles of the sectlofs
59 \dosectlot
60 \doparttoc % test of parttoc/partlof stuff
61 \dopartlof % added in version #15
62 \dopartlot % added in version #15
63 \faketableofcontents % or \tableofcontents
64 \fakelistoffigures % to check compatibility
65 \fakelistoftables % to check compatibility
66 \part{First Part} \parttoc \partlof[r] \partlot
67 \twocolumn\sloppy % the secttoc in twocolumn layout is ugly,
68 % but works. Ideas to make it better?
69 \section{AAAAA} % a section with a lot of sections
70 \secttoc[r] % secttoc title on the right
71 \mtcskip \sectlof %ADDED
72 \lipsum[1]
73 \subsection{S1} \lipsum[2]
74 \subsection{S2} \lipsum[3]
75 \subsection{S3} \lipsum[4]
76 \subsection*{S4}
77 %% \addcontentsline{toc}{starsubsection}{*S4*}
78 \lipsum[5]
79 \subsection{S5} \lipsum[6]
80 \subsection{S6} \lipsum[7]
81 \subsection{S7} \lipsum[8]
82 \subsection{S8} \lipsum[9]
83 \subsection{S9} \lipsum[10]
84 \subsection{S10} \lipsum[11]
85 \subsection{S11} \lipsum[12]
86 \subsection{S12} \lipsum[13]
87 \subsection{S13} \lipsum[14]
88 \subsection{S14} \lipsum[15]
89 \subsection{S15} \lipsum[16]
90 \subsection{S16} \lipsum[17]
91 \subsection{S17} \lipsum[18]
92 \subsection{S18} \lipsum[19]
93 \subsection{S19} \lipsum[20]
94 \subsection{S20} \lipsum[21]
95 \subsection{S21} \lipsum[22]
96 \subsection{S22} \lipsum[23]
97 \subsection{S23} \lipsum[24]
98 \subsection{S24} \lipsum[25]
99 \subsection{S25} \lipsum[26]
100 \subsection{S26} \lipsum[27]
101 \subsection{S27} \lipsum[28]
102 \subsection{S28} \lipsum[29]
103 \subsection{S29} \lipsum[30]
104 \subsection{S30} \lipsum[31]
105 \onecolumn\fussy % back to one column
106 \section{BBBBB}
107 \secttoc
108 \mtcskip % put some skip here
109 \sectlof % a sectlof
110 \lipsum[32]
111 \subsection{T1} \lipsum[33]
112 \begin{figure}[t] % tests compatibility with floating bodies
113 \setlength{\unitlength}{1mm}
114 \begin{picture}(100,50) \end{picture}
115 \caption{F1} % (I have not tested tables, but it is similar)
116 \end{figure}
117 \FloatBarrier
118 \subsubsection[tt1]{TT1} % tests optional arg. of a sectionning command
119 \lipsum[34]
120 \paragraph{TTT1} \lipsum[35]
121 \subparagraph{TTTT1} \lipsum[36]
122 \begin{figure}[t]
123 \setlength{\unitlength}{1mm}
124 \begin{picture}(100,50) \end{picture}
125 \caption[f2]{F2} % tests optional arg. of a caption
126 \end{figure}
127 \FloatBarrier
128 \subsection{T2} \lipsum[37]
129 \section*{CCCCC} % tests a pseudo-section. should have no secttoc
130 %% \addstarredsection{CCCCC}
131 \mtcaddsection[CCCCC]
132 \secttoc \mtcskip \sectlof %ADDED
133 \lipsum[38]
134 \subsection{U1} \lipsum[39]
135 \subsubsection{UU1} \lipsum[40]
136 \paragraph{UUU1} \lipsum[41]
137 \subparagraph{UUUU1} \lipsum[42]
138 \subsection{U2} \lipsum[43]
139 \part{Second Part}
140 \parttoc
141 \partlof[c]
142 \partlot
143 %% % the following section should have no secttoc,
144 \section{DDDDD} % but if you uncomment \secttoc,
145 %% \secttoc
146 \mtcskip \sectlof %ADDED
147 \lipsum[44]
148 \subsection{V1} \lipsum[45]
149 \subsubsection{VV1} \lipsum[46]
150 \paragraph{VVV1} \lipsum[47]
151 \subparagraph{VVVV1} \lipsum[48]
152 \begin{figure}[t] % tests compatibility with floating bodies
153 \setlength{\unitlength}{1mm}
154 \begin{picture}(100,50) \end{picture}
155 \caption{F3} % (I have not tested tables, but it is similar)
156 \end{figure}
157 \FloatBarrier
158 \lipsum[49] \subsection{V2} \lipsum[50]
159 \section{EEEEE} % this section should have a secttoc
160 {% % left brace, see below
161 \setcounter{secttocdepth}{3} % depth of sect table of contents;
162 % try with different values.
163 \secttoc
164 \mtcskip \sectlof %ADDED
165 } % right brace
166 %% this pair of braces is used to keep local the change on secttocdepth.
167 \lipsum[51]
168 \subsection{W1} % with the given depth
169 \lipsum[52]
170 \subsubsection{WW1} \lipsum[53]
171 \paragraph{WWW1} \lipsum[54]
172 \begin{figure}[t] % tests compatibility with floating bodies
173 \setlength{\unitlength}{1mm}
174 \begin{picture}(100,50) \end{picture}
175 \caption{F4} % (I have not tested tables, but it is similar)
176 \end{figure}
177 \FloatBarrier
178 bla bla bla bla bla bla bla bla bla bla bla
179 \subparagraph{WWWW1} \lipsum[55]
180 \subsection{W2} \lipsum[56]
181 \part{Appendices}
182 \parttoc \mtcskip
183 \partlof \mtcskip
184 \partlot
185 \FloatBarrier
186 \appendix
187 \section{Comments} \lipsum[57]
188 \secttoc
189 \mtcskip \sectlof %ADDED
190 \subsection{C1} \lipsum[58]
191 \subsection{C2} \lipsum[59]
192 \subsection{C3} \lipsum[60]
193 \begin{figure}[hb] % tests compatibility with floating bodies
194 \setlength{\unitlength}{1mm}
195 \begin{picture}(100,50) \end{picture}
196 \caption{F5} % (I have not tested tables, but it is similar)
197 \end{figure}
198 \FloatBarrier
199 \subsection{C4} \lipsum[61]
200 \FloatBarrier
201 \section{Evolution}
202 \secttoc
203 \sectlof % empty
204 \sectlot % empty
205 \lipsum[62]
206 \subsection{D1} \lipsum[63] \subsection{D2} \lipsum[64]
207 \subsection{D3} \lipsum[65] \subsection{D4} \lipsum[66]
208 \end{document}
209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
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 \endinput
316 %%
317 %% End of file `mtc-art.tex'.