summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/minitoc/examples/mtc-ads.tex
blob: 6cd83698d203ac289f28c27aa5a19e45b172e993 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
%%
%% This is file `mtc-ads.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% minitoc.dtx  (with options: `mtc-ads')
%% This is a generated file.
%% 
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% The Current Maintainer of this work is GitHub minitoc organisation.
%% 
%% This work consists of all the files listed in the file `minitoc.l'
%% distributed with it.
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000
%%           2001 2002 2003 2004 2005 2006 2007 2008
%% Jean-Pierre F. Drucbert
%% Copyright 2018 GitHub minitoc organisation (David Carlisle)
\documentclass[oneside,12pt,a4paper]{article}
\ProvidesFile{mtc-ads.tex}%
  [2007/01/04]
\usepackage{url,tocbibind,makeidx}
\makeatletter \newif\ifscan@allowed \scan@allowedtrue \makeatother
\def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}%
\def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
           \dotfil~\ignorespaces}%
\usepackage[tight,hints,insection]{minitoc}
%% \usepackage{mtcoff}
\makeindex
\begin{document}
\doparttoc \dopartlof \dopartlot
\dosecttoc \dosectlof \dosectlot
\setcounter{tocdepth}{6}
\setcounter{parttocdepth}{6}
\setcounter{secttocdepth}{6}
\tableofcontents \mtcaddsection
\listoffigures   \mtcaddsection
\listoftables    \mtcaddsection
\part{Part~1}
\parttoc \mtcskip \partlof \mtcskip \partlot

\section{First section}
\index{section!normal}
\secttoc \mtcskip \sectlof \mtcskip \sectlot
\subsection{First subsection}

\begin{figure}[tp] \caption{First figure} \end{figure}
\begin{table}[tp] \caption{First table} \end{table}

\subsection{Second subsection}
A small nice citation from~\cite{dark}:\\
\index{small}\index{citation}\index{nice}\index{A}%
\index{a}\index{and}\index{bird}\index{But}%
\index{cannot}\index{claim}\index{great}\index{he}%
\index{I}\index{imagine}\index{it}\index{know}%
\index{land}\index{on}\index{once}\index{that}%
\index{to}\index{tree}\index{would}\index{yes}%
A bird cannot land once on a great tree and claim to know it.
But I imagine that he would, yes.\\
\hbox{}\hfill Iain~M.~\textsc{Banks} (1993), \textsl{Against a dark background.}%
\index{Iain}\index{Banks}\index{Against}\index{dark}\index{background}
\begin{figure}[tp] \caption{Second figure} \end{figure}
\begin{table} \caption{Second table} \end{table}
\section*{Second section, starred}
\index{section!starred}
%% UNCOMMENT ONE AND ONLY ONE OF THE 4 FOLLOWING LINES
\mtcaddsection[Second section, starred] % OK
%% \mtcaddsection[]     % BAD
%% \mtcaddsection[~]    % produces a (strange) correct result.
%% \mtcaddsection       % BAD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\index{tests}

This is a starred section; you can test here variations on
the \verb|\mtcaddsection| command. Just uncomment one (and
only one) of the \verb|\mtcaddsection| commands after
\verb|\section*| in the source code of \texttt{mtc-add.tex}.
For each case, look at the \index{Table of Contents}Table of Contents
and at this section.
\index{a}\index{added}\index{after}\index{also}\index{and}%
\index{at}\index{can}\index{case}\index{section}%
\index{code}\index{command}\index{commands}%
\index{Contents}\index{each}\index{entries}\index{For}%
\index{here}\index{I}\index{in}\index{index}\index{is}%
\index{Just}\index{just}\index{look}\index{lot}%
\index{of}\index{on}\index{one}\index{only}\index{source}%
\index{starred}\index{Table}\index{test}\index{the}%
\index{This}\index{this}\index{to}\index{uncomment}%
\index{variations}\index{you}%
I also added a lot of index entries, just to test.

\section{Third section}
\index{section!normal}
\secttoc \mtcskip \sectlof \mtcskip \sectlot
\subsection{Third subsection}

\begin{figure} \caption{Third figure} \end{figure}
\begin{table} \caption{Third table} \end{table}

\subsection{Fourth subsection}

\begin{figure} \caption{Fourth figure} \end{figure}
\begin{table} \caption{Fourth table} \end{table}

\subsubsection{Even a sub-sub-section!}
\subsubsection{And yet another one}

\part{Part~2}
\parttoc \mtcskip \partlof \mtcskip \partlot

\section{Fourth section}
\index{section!normal}
\secttoc \mtcskip \sectlof \mtcskip \sectlot
\subsection{Fifth subsection}

\begin{figure}[tp] \caption{Fifth figure} \end{figure}
\begin{table}[tp] \caption{Fifth table} \end{table}

\subsection{Sixth subsection}
A small nice citation from~\cite{dark}:\\
\index{small}\index{citation}\index{nice}\index{A}%
\index{a}\index{and}\index{bird}\index{But}%
\index{cannot}\index{claim}\index{great}\index{he}%
\index{I}\index{imagine}\index{it}\index{know}%
\index{land}\index{on}\index{once}\index{that}%
\index{to}\index{tree}\index{would}\index{yes}%
A bird cannot land once on a great tree and claim to know it.
But I imagine that he would, yes.\\
\hbox{}\hfill
Iain~M.~\textsc{Banks} (1993), \textsl{Against a dark background.}%
\index{Iain}\index{Banks}\index{Against}\index{dark}\index{background}

\begin{figure}[tp] \caption{Sixth figure} \end{figure}
\begin{table} \caption{Sixth table} \end{table}

\section*{Fifth section, starred}
\index{section!starred}
%% UNCOMMENT ONE AND ONLY ONE OF THE 4 FOLLOWING LINES
\mtcaddsection[Fifth section, starred] % OK
%% \mtcaddsection[]     % OK
%% \mtcaddsection[~]    % produces a (strange) correct result.
%% \mtcaddsection       % OK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\index{tests}

This is a starred section; you can test here variations on
the \verb|\mtcaddsection| command. Just uncomment one (and
only one) of the \verb|\mtcaddsection| commands after
\verb|\section*| in the source code of \texttt{mtc-add.tex}.
For each case, look at the \index{Table of Contents}Table of Contents
and at this section.\index{a}%
\index{added}\index{after}\index{also}\index{and}%
\index{at}\index{can}\index{case}\index{section}%
\index{code}\index{command}\index{commands}\index{Contents}%
\index{each}\index{entries}\index{For}\index{here}%
\index{I}\index{in}\index{index}\index{is}%
\index{Just}\index{just}\index{look}\index{lot}%
\index{of}\index{on}\index{one}\index{only}%
\index{source}\index{starred}\index{Table}\index{test}%
\index{the}\index{This}\index{this}\index{to}%
\index{uncomment}\index{variations}\index{you}%
I also added a lot of index entries, just to test.

\section{Sixth section}
\index{section!normal}
\secttoc \mtcskip \sectlof \mtcskip \sectlot
\subsection{Seventh subsection}

\begin{figure} \caption{Seventh figure} \end{figure}
\begin{table} \caption{Seventh table} \end{table}

\subsection{Eighth subsection}

\begin{figure} \caption{Eighth figure} \end{figure}
\begin{table} \caption{Eighth table} \end{table}
\nocite*
\def\noopsort#1{\relax}
\bibliographystyle{plain}
\bibliography{mtc-add}
\adjuststc
\printindex
\mtcfixindex % use this OR the 3 following lines
%% \addcontentsline{lof}{xsect}{}
%% \addcontentsline{lot}{xsect}{}
%% \mtcaddsection

\appendix
\section{App.~1}
\index{section!appendix}
\secttoc \mtcskip \sectlof \mtcskip \sectlot
\subsection{Ninth subsection}

\begin{figure} \caption{Ninth figure} \end{figure}
\begin{table} \caption{Ninth table} \end{table}

\subsection{Tenth subsection}

\begin{figure} \caption{Tenth figure} \end{figure}
\begin{table} \caption{Tenth table} \end{table}

\section{App.~2}
\index{section!appendix}
%% contains no tables but asks for a sectlot! No sectlot printed.
\secttoc \mtcskip \sectlof \mtcskip \sectlot
\subsection{Eleventh subsection}

\begin{figure} \caption{Eleventh figure} \end{figure}
\begin{figure} \caption{Twelfth figure} \end{figure}

\subsection{Twelfth subsection}

\begin{figure} \caption{Thirdteenth figure} \end{figure}
\begin{figure} \caption{Fourteenth figure} \end{figure}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

































































%%







































\endinput
%%
%% End of file `mtc-ads.tex'.