Debian Codegraph @

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

raw
1 %%
2 %% This is file `mtc-ads.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% minitoc.dtx (with options: `mtc-ads')
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,12pt,a4paper]{article}
32 \ProvidesFile{mtc-ads.tex}%
33 [2007/01/04]
34 \usepackage{url,tocbibind,makeidx}
35 \makeatletter \newif\ifscan@allowed \scan@allowedtrue \makeatother
36 \def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
37 \def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
38 \dotfil~\ignorespaces}%
39 \usepackage[tight,hints,insection]{minitoc}
40 %% \usepackage{mtcoff}
41 \makeindex
42 \begin{document}
43 \doparttoc \dopartlof \dopartlot
44 \dosecttoc \dosectlof \dosectlot
45 \setcounter{tocdepth}{6}
46 \setcounter{parttocdepth}{6}
47 \setcounter{secttocdepth}{6}
48 \tableofcontents \mtcaddsection
49 \listoffigures \mtcaddsection
50 \listoftables \mtcaddsection
51 \part{Part~1}
52 \parttoc \mtcskip \partlof \mtcskip \partlot
53
54 \section{First section}
55 \index{section!normal}
56 \secttoc \mtcskip \sectlof \mtcskip \sectlot
57 \subsection{First subsection}
58
59 \begin{figure}[tp] \caption{First figure} \end{figure}
60 \begin{table}[tp] \caption{First table} \end{table}
61
62 \subsection{Second subsection}
63 A small nice citation from~\cite{dark}:\\
64 \index{small}\index{citation}\index{nice}\index{A}%
65 \index{a}\index{and}\index{bird}\index{But}%
66 \index{cannot}\index{claim}\index{great}\index{he}%
67 \index{I}\index{imagine}\index{it}\index{know}%
68 \index{land}\index{on}\index{once}\index{that}%
69 \index{to}\index{tree}\index{would}\index{yes}%
70 A bird cannot land once on a great tree and claim to know it.
71 But I imagine that he would, yes.\\
72 \hbox{}\hfill Iain~M.~\textsc{Banks} (1993), \textsl{Against a dark background.}%
73 \index{Iain}\index{Banks}\index{Against}\index{dark}\index{background}
74 \begin{figure}[tp] \caption{Second figure} \end{figure}
75 \begin{table} \caption{Second table} \end{table}
76 \section*{Second section, starred}
77 \index{section!starred}
78 %% UNCOMMENT ONE AND ONLY ONE OF THE 4 FOLLOWING LINES
79 \mtcaddsection[Second section, starred] % OK
80 %% \mtcaddsection[] % BAD
81 %% \mtcaddsection[~] % produces a (strange) correct result.
82 %% \mtcaddsection % BAD
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84 \index{tests}
85
86 This is a starred section; you can test here variations on
87 the \verb|\mtcaddsection| command. Just uncomment one (and
88 only one) of the \verb|\mtcaddsection| commands after
89 \verb|\section*| in the source code of \texttt{mtc-add.tex}.
90 For each case, look at the \index{Table of Contents}Table of Contents
91 and at this section.
92 \index{a}\index{added}\index{after}\index{also}\index{and}%
93 \index{at}\index{can}\index{case}\index{section}%
94 \index{code}\index{command}\index{commands}%
95 \index{Contents}\index{each}\index{entries}\index{For}%
96 \index{here}\index{I}\index{in}\index{index}\index{is}%
97 \index{Just}\index{just}\index{look}\index{lot}%
98 \index{of}\index{on}\index{one}\index{only}\index{source}%
99 \index{starred}\index{Table}\index{test}\index{the}%
100 \index{This}\index{this}\index{to}\index{uncomment}%
101 \index{variations}\index{you}%
102 I also added a lot of index entries, just to test.
103
104 \section{Third section}
105 \index{section!normal}
106 \secttoc \mtcskip \sectlof \mtcskip \sectlot
107 \subsection{Third subsection}
108
109 \begin{figure} \caption{Third figure} \end{figure}
110 \begin{table} \caption{Third table} \end{table}
111
112 \subsection{Fourth subsection}
113
114 \begin{figure} \caption{Fourth figure} \end{figure}
115 \begin{table} \caption{Fourth table} \end{table}
116
117 \subsubsection{Even a sub-sub-section!}
118 \subsubsection{And yet another one}
119
120 \part{Part~2}
121 \parttoc \mtcskip \partlof \mtcskip \partlot
122
123 \section{Fourth section}
124 \index{section!normal}
125 \secttoc \mtcskip \sectlof \mtcskip \sectlot
126 \subsection{Fifth subsection}
127
128 \begin{figure}[tp] \caption{Fifth figure} \end{figure}
129 \begin{table}[tp] \caption{Fifth table} \end{table}
130
131 \subsection{Sixth subsection}
132 A small nice citation from~\cite{dark}:\\
133 \index{small}\index{citation}\index{nice}\index{A}%
134 \index{a}\index{and}\index{bird}\index{But}%
135 \index{cannot}\index{claim}\index{great}\index{he}%
136 \index{I}\index{imagine}\index{it}\index{know}%
137 \index{land}\index{on}\index{once}\index{that}%
138 \index{to}\index{tree}\index{would}\index{yes}%
139 A bird cannot land once on a great tree and claim to know it.
140 But I imagine that he would, yes.\\
141 \hbox{}\hfill
142 Iain~M.~\textsc{Banks} (1993), \textsl{Against a dark background.}%
143 \index{Iain}\index{Banks}\index{Against}\index{dark}\index{background}
144
145 \begin{figure}[tp] \caption{Sixth figure} \end{figure}
146 \begin{table} \caption{Sixth table} \end{table}
147
148 \section*{Fifth section, starred}
149 \index{section!starred}
150 %% UNCOMMENT ONE AND ONLY ONE OF THE 4 FOLLOWING LINES
151 \mtcaddsection[Fifth section, starred] % OK
152 %% \mtcaddsection[] % OK
153 %% \mtcaddsection[~] % produces a (strange) correct result.
154 %% \mtcaddsection % OK
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 \index{tests}
157
158 This is a starred section; you can test here variations on
159 the \verb|\mtcaddsection| command. Just uncomment one (and
160 only one) of the \verb|\mtcaddsection| commands after
161 \verb|\section*| in the source code of \texttt{mtc-add.tex}.
162 For each case, look at the \index{Table of Contents}Table of Contents
163 and at this section.\index{a}%
164 \index{added}\index{after}\index{also}\index{and}%
165 \index{at}\index{can}\index{case}\index{section}%
166 \index{code}\index{command}\index{commands}\index{Contents}%
167 \index{each}\index{entries}\index{For}\index{here}%
168 \index{I}\index{in}\index{index}\index{is}%
169 \index{Just}\index{just}\index{look}\index{lot}%
170 \index{of}\index{on}\index{one}\index{only}%
171 \index{source}\index{starred}\index{Table}\index{test}%
172 \index{the}\index{This}\index{this}\index{to}%
173 \index{uncomment}\index{variations}\index{you}%
174 I also added a lot of index entries, just to test.
175
176 \section{Sixth section}
177 \index{section!normal}
178 \secttoc \mtcskip \sectlof \mtcskip \sectlot
179 \subsection{Seventh subsection}
180
181 \begin{figure} \caption{Seventh figure} \end{figure}
182 \begin{table} \caption{Seventh table} \end{table}
183
184 \subsection{Eighth subsection}
185
186 \begin{figure} \caption{Eighth figure} \end{figure}
187 \begin{table} \caption{Eighth table} \end{table}
188 \nocite*
189 \def\noopsort#1{\relax}
190 \bibliographystyle{plain}
191 \bibliography{mtc-add}
192 \adjuststc
193 \printindex
194 \mtcfixindex % use this OR the 3 following lines
195 %% \addcontentsline{lof}{xsect}{}
196 %% \addcontentsline{lot}{xsect}{}
197 %% \mtcaddsection
198
199 \appendix
200 \section{App.~1}
201 \index{section!appendix}
202 \secttoc \mtcskip \sectlof \mtcskip \sectlot
203 \subsection{Ninth subsection}
204
205 \begin{figure} \caption{Ninth figure} \end{figure}
206 \begin{table} \caption{Ninth table} \end{table}
207
208 \subsection{Tenth subsection}
209
210 \begin{figure} \caption{Tenth figure} \end{figure}
211 \begin{table} \caption{Tenth table} \end{table}
212
213 \section{App.~2}
214 \index{section!appendix}
215 %% contains no tables but asks for a sectlot! No sectlot printed.
216 \secttoc \mtcskip \sectlof \mtcskip \sectlot
217 \subsection{Eleventh subsection}
218
219 \begin{figure} \caption{Eleventh figure} \end{figure}
220 \begin{figure} \caption{Twelfth figure} \end{figure}
221
222 \subsection{Twelfth subsection}
223
224 \begin{figure} \caption{Thirdteenth figure} \end{figure}
225 \begin{figure} \caption{Fourteenth figure} \end{figure}
226
227 \end{document}
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334 \endinput
335 %%
336 %% End of file `mtc-ads.tex'.