summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/minitoc/minitoc-ex.tex
blob: 9062d7ea9b97138f4f1114f987b7ed1ac0ebadf5 (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
%%
%% This is file `minitoc-ex.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% minitoc.dtx  (with options: `minitoc-ex')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2005, 2006 by:
%% Jean-Pierre F. Drucbert (JPFD)
%% <jean-pierre.drucbert@onera.fr>
%% 
%% 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 "author-maintained".
%% 
%% This Current Maintainer of this work is Jean-Pierre F. Drucbert (JPFD).
%% 
%% This work consists of all the files listed in the file `minitoc.l'
%% distributed with it.
%% 
%%%%%%%%%%%%%%%%%%%%% A example file (differs from previous versions)
%% minitoc-ex.tex
%% This file contains a set of tests for the minitoc.sty version #46
%% package file. You can alter most of parameters to test.
%% book/report (\chapter must be defined).
%% You can use a copy of this file to play with minitoc
%% commands and parameters.
\documentclass[12pt,a4paper]{report} % the report class uses less pages
%%\documentclass[12pt,a4paper]{book}
\usepackage{lipsum} % provides filling text
%%\usepackage{hyperref} % if used, load it BEFORE minitoc
%%\usepackage{mtcoff}
\usepackage[tight,listfiles]{minitoc} % tight option make shorter mini-tables
\setcounter{secnumdepth}{5} % depth of numbering of sectionning commands
\setcounter{tocdepth}{3}               % depth of table of contents
\setlength{\mtcindent}{24pt}           % indentation of minitocs, default
\renewcommand{\mtcfont}{\small\rm}     % font for minitocs, default
\renewcommand{\mtcSfont}{\small\bf}    % font for minitocs, sections, default
%%\renewcommand{\mtcSSfont}{\small\sf} % font for minitocs, subsections
%% you can make experiments with \mtcSSSfont, \mtcPfont and \mtcSPfont
%% but it is ``fontomania''...
\raggedbottom                   % or \flushbottom, at your choice
%%% TEST: uncomment the 3 next lines to test
%%% resetting chapter number in each part
%%\makeatletter
%%\@addtoreset{chapter}{part}
%%\makeatother
%%% END TEST
\begin{document}
\mtcpagenumbers
\noptcrule
%% \nomtcrule                    % suppresses minitoc rules
%% \nomtcpagenumbers             % suppresses minitoc page numbers
%% \nomlfpagenumbers             % ---------- minilof ---- -------
%% \nomltpagenumbers             % ---------- minilot ---- -------
\dominitoc
\dominilof[c]                   % centers title of minilof's
\dominilot
\doparttoc                      % test of parttoc/partlof stuff
\dopartlof                      % added in version #15
\dopartlot                      % added in version #15
\tableofcontents            % or \faketableofcontents
\listoffigures              % or \fakelistoffigures
\fakelistoftables           % or \listoftables
%%\addtocounter{chapter}{-1} % to begin with Chapter 0
\part{First Part}
\parttoc
\partlof[r]
\partlot[r]
\twocolumn\sloppy               % the minitoc in twocolumn layout is ugly,
\chapter{AAAAA}                 % a chapter with a lot of sections
\minitoc[r]                     % minitoc title on the right
\lipsum[1]
\section{S1}
\lipsum[2]
\section{S2}
\lipsum[3]
\section{S3}
\lipsum[4]
\section*{S4}
\addcontentsline{toc}{section}{\protect\numberline{}{S4}}
\lipsum[5]
\section{S5}
\lipsum[6]
\section{S6}
\lipsum[6]
\section{S7}
\lipsum[7]
\section{S8}
\lipsum[9]
\section{S9}
\lipsum[10]
\section{S10}
\lipsum[11]
\section{S11}
\lipsum[12]
\section{S12}
\lipsum[13]
\section{S13}
\lipsum[14]
\section{S14}
\lipsum[15]
\section{S15}
\lipsum[16]
\section{S16}
\lipsum[17]
\section{S17}
\lipsum[18]
\section{S18}
\lipsum[19]
\section{S19}
\lipsum[20]
\section{S20}
\lipsum[21]
\section{S21}
\lipsum[22]
\section{S22}
\lipsum[23]
\section{S23}
\lipsum[24]
\section{S24}
\lipsum[25]
\section{S25}
\lipsum[26]
\section{S26}
\lipsum[27]
\section{S27}
\lipsum[28]
\section{S28}
\lipsum[29]
\section{S29}
\lipsum[30]
\section{S30}
\lipsum[31]
\subsection{SS1}
\lipsum[32]
\section{S31}
\lipsum[33]
\onecolumn\fussy        % back to one column
\chapter{BBBBB}
\minitoc
\mtcskip                % put some skip here
\minilof                % a minilof
\mtcskip                % put some skip here
\minilot                % a minilot
\lipsum[34]
\section{T1}
\lipsum[35]
\begin{figure}[t]       % tests compatibility with floating bodies
\setlength{\unitlength}{1mm}
\begin{picture}(100,50)
\end{picture}
\caption{F1}            % (tables are similar)
\end{figure}
\begin{table}[b]        % tests compatibility with floating bodies
\setlength{\unitlength}{1mm}
\begin{picture}(100,50)
\end{picture}
\caption{T1}            % (tables are similar)
\end{table}
\clearpage
\subsection[tt1]{TT1}   % tests optionnal arg. of a sectionning command
\lipsum[36]
\subsubsection{TTT1}
\lipsum[37]
\paragraph{TTTT1}
\lipsum[38]
\begin{figure}
\setlength{\unitlength}{1mm}
\begin{picture}(100,50)
\end{picture}
\caption[f2]{F2}        % tests optionnal arg. of a caption
\end{figure}
\section{T2}
\lipsum[39]
\chapter*{CCCCC}        % tests a pseudo-chapter; could have a minitoc.
\addstarredchapter{CCCCC}
\lipsum[40]
\section*{U1}
\addcontentsline{toc}{section}{U1}
\lipsum[41]
\subsection*{UU1}
\addcontentsline{toc}{subsection}{UU1}
\lipsum[42]
\subsubsection*{UUU1}
\addcontentsline{toc}{subsubsection}{UUU1}
\lipsum[43]
\paragraph*{UUUU1}
\addcontentsline{toc}{paragraph}{UUUU1}
\lipsum[44]
\section*{U2}
\addcontentsline{toc}{section}{U2}
\lipsum[45]
\part{Second Part}
\parttoc
\partlof[c]
%%                       % the following chapter should have no minitoc,
\chapter{DDDDD}          % but if you uncomment \minitoc,
%%\minitoc               % the minitoc appears
\lipsum[46]
\section{V1}
\lipsum[47]
\subsection{VV1}
\lipsum[48]
\subsubsection{VVV1}
\lipsum[48]
\paragraph{VVVV1}
\lipsum[49]
\begin{figure}[t]        % tests compatibility with floating bodies
\setlength{\unitlength}{1mm}
\begin{picture}(100,50)
\end{picture}
\caption{F3}             % (I have not tested tables, but it is similar)
\end{figure}
\lipsum[50]
\section{V2}
\lipsum[51]
\chapter{EEEEE}                 % this chapter should have a minitoc
{%                              % left brace, see below
\setcounter{minitocdepth}{3}    % depth of mini table of contents;
                                % try with different values.
\minitoc
}                               % right brace
%% this pair of braces is used to keep local the change
%% on minitocdepth.
\lipsum[52]
\section{W1}                    % with the given depth
\lipsum[53]
\subsection{WW1}
\lipsum[54]
\subsubsection{WWW1}
\lipsum[55]
\begin{figure}[t]        % tests compatibility with floating bodies
\setlength{\unitlength}{1mm}
\begin{picture}(100,50)
\end{picture}
\caption{F4}             % (I have not tested tables here, but it is similar)
\end{figure}
\lipsum[56]
\paragraph{WWWW1}
\lipsum[57]
\subparagraph{WWWWW1}
\lipsum[58]
\section{W2}
\lipsum[59]
\appendix
\part{Appendices}
\parttoc
\begin{mtchideinmaintoc}[-1]
\chapter{Comments}
\minitoc
\section{C1}
\lipsum[60]
\section{C2}
\lipsum[61]
\section{C3}
\lipsum[62]
\begin{figure}[t]        % tests compatibility with floating bodies
\setlength{\unitlength}{1mm}
\begin{picture}(100,50)
\end{picture}
\caption{F5}             % (I have not tested tables, but it is similar)
\end{figure}
\section{C4}
\chapter{Evolution}
\minitoc
\minilof %Empty => invisible
\minilot %Empty => invisible
\section{D1}
\lipsum[62]
\section{D2}
\lipsum[63]
\section{D3}
\lipsum[64]
\section{D4}
%% this line closes the omitted part
\addtocontents{toc}{\protect\partbegin}
%% this line restore the depth in the main TOC
\end{mtchideinmaintoc}
\lipsum[65]
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
%% End of file `minitoc-ex.tex'.