blob: e658ea8b0189fcb07b5503df783e411e1db616d1 (
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
|
%%
%% This is file `tocbasic.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tocbasic.dtx (with options: `package')
%% scrlogo.dtx (with options: `logo')
%%
%% Copyright (c) 2007-2012
%% Markus Kohm and any individual authors listed elsewhere in this file.
%%
%% This file was generated from file(s) of the KOMA-Script bundle.
%% ---------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, version 1.3c of the license.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later and of this work.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% The Current Maintainer and author of this work is Markus Kohm.
%%
%% This file may only be distributed together with the files
%% `scrlogo.dtx' and `tocbasic.dtx'. You may however distribute the files
%% `scrlogo.dtx' and `tocbasic.dtx' without this file.
%% See also `tocbasic.dtx' for additional information.
%%
%% If this file is a beta version, you are not allowed to distribute it.
%%
%% Currently there is only a short english manual at `tocbasic.dtx', that
%% should also be found as `tocbasic.pdf'.
%%
%% The KOMA-Script bundle (but maybe not this file) was based upon the
%% LaTeX2.09 Script family created by Frank Neukam 1993 and the LaTeX2e
%% standard classes created by The LaTeX3 Project 1994-1996.
%%
%%% From File: tocbasic.dtx
\def\tocbasicversion{2011/05/30 v3.09a}
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{tocbasic}
[\tocbasicversion\space KOMA-Script package
(handling toc-files)%
]
\ProcessOptions\relax
\RequirePackage{keyval}
\newcommand*{\tb@listoftocs}{}
\newcommand{\ifattoclist}[1]{%
\begingroup
\def\do##1##2{%
\edef\reserved@a{##1}%
\ifx\reserved@a\reserved@b\@tempswatrue\fi
}%
\edef\reserved@b{#1}\@tempswafalse\tb@listoftocs
\if@tempswa\aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi
\endgroup
}
\newcommand*{\addtotoclist}{%
\@ifnextchar [%]
\scr@@addtotoclist\scr@addtotoclist
}
\newcommand*{\scr@addtotoclist}{%
\ifx\@currname\@empty
\def\reserved@a{\scr@@addtotoclist[]}%
\else
\edef\reserved@a{\noexpand\scr@@addtotoclist[\@currname.\@currext]}%
\fi
\reserved@a
}
\newcommand*{\scr@@addtotoclist}[2][]{%
\ifattoclist{#2}{%
\PackageError{tocbasic}{%
file extension `#2' cannot be used twice
}{%
File extension `#2' is already used by a toc-file, while
\ifx\relax#1\relax someone\else #2\fi\MessageBreak
tried to use it again for a toc-file.\MessageBreak
This may be either an incompatibility of packages, an error at a
package,\MessageBreak
or a mistake by the user.\MessageBreak
}%
}{%
\begingroup
\protected@edef\reserved@a{%
\noexpand\g@addto@macro\noexpand\tb@listoftocs{%
\noexpand\do{#2}{#1}}}\reserved@a
\endgroup
\ifx\relax #1\relax\else
\@ifundefined{tb@#1@add@hook}{}{%
\edef\reserved@a{%
\noexpand\def\noexpand\@currext{#2}%
\noexpand\@nameuse{tb@#1@add@hook}%
\noexpand\def\noexpand\@currext{\@currext}%
}\reserved@a
}%
\fi
\edef\reserved@a{%
\noexpand\def\noexpand\@currext{#2}%
\noexpand\@nameuse{tb@@add@hook}%
\noexpand\def\noexpand\@currext{\@currext}%
}\reserved@a
}%
}
\newcommand*{\AtAddToTocList}{%
\@ifnextchar [%]
\@@AtAddToTocList\@AtAddToTocList
}
\newcommand*{\@AtAddToTocList}{%
\ifx\@currname\@empty
\def\reserved@a{\@@AtAddToTocList[]}%
\else
\edef\reserved@a{\noexpand\@@AtAddToTocList[\@currname.\@currext]}%
\fi
\reserved@a
}
\newcommand*{\@@AtAddToTocList}[1][]{%
\@ifundefined{tb@#1@add@hook}{\@namedef{tb@#1@add@hook}{}}{}%
\expandafter\g@addto@macro\csname tb@#1@add@hook\endcsname
}
\newcommand*{\tocbasic@extend@babel}[1]{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\ifx\csname bbl@set@language\endcsname\relax
\PackageInfo{tocbasic}{babel extension for `#1' omitted\MessageBreak
because of missing \string\bbl@set@language}%
\else
\iftocfeature{#1}{nobabel}{%
\PackageInfo{tocbasic}{omitting babel extension for `#1'\MessageBreak
because of feature `nobabel' available\MessageBreak
for `#1'}%
}{%
\PackageInfo{tocbasic}{setting babel extension for `#1'}%
\expandafter\gdef\expandafter\bbl@set@language\expandafter##\expandafter1%
\expandafter{%
\bbl@set@language{##1}%
\addtocontents{#1}{\xstring\select@language{\languagename}}%
}%
}%
\fi
}
\AtAddToTocList[]{\expandafter\tocbasic@extend@babel\expandafter{\@currext}}
\newcommand*{\removefromtoclist}{%
\@ifnextchar [%]
\@removefromtoclist\@@removefromtoclist
}
\newcommand*{\@removefromtoclist}[2][]{%
\begingroup
\let\tb@oldlist\tb@listoftocs
\def\do##1##2{%
\edef\reserved@a{##1}%
\ifx\reserved@a\reserved@b
\begingroup
\edef\reserved@a{##2}%
\edef\reserved@b{#1}%
\ifx\reserved@a\reserved@b\else
\g@addto@macro\tb@listoftocs{\do{##1}{##2}}%
\fi
\endgroup
\else
\g@addto@macro\tb@listoftocs{\do{##1}{##2}}%
\fi
}%
\edef\reserved@b{#2}\let\tb@listoftocs\@empty
\tb@oldlist
\endgroup
}
\newcommand*{\@@removefromtoclist}[1]{%
\begingroup
\let\tb@oldlist\tb@listoftocs
\def\do##1##2{%
\edef\reserved@a{##1}%
\ifx\reserved@a\reserved@b\else
\g@addto@macro\tb@listoftocs{\do{##1}{##2}}%
\fi
}%
\edef\reserved@b{#1}\let\tb@listoftocs\@empty
\tb@oldlist
\endgroup
}
\newcommand{\doforeachtocfile}{%
\@ifnextchar [%]
\@doforeachtocfile\@@doforeachtocfile
}
\newcommand{\@doforeachtocfile}[2][]{%
\def\do##1##2{%
\edef\reserved@a{#1}\edef\reserved@b{##2}\ifx\reserved@a\reserved@b
\edef\@currext{##1}#2%
\fi
}%
\edef\reserved@a{%
\noexpand\tb@listoftocs
\noexpand\def\noexpand\@currext{\@currext}%
}\reserved@a
\let\do\relax
}
\newcommand{\@@doforeachtocfile}[1]{%
\def\do##1##2{%
\edef\@currext{##1}#1%
}%
\edef\reserved@a{%
\noexpand\tb@listoftocs
\noexpand\def\noexpand\@currext{\@currext}%
}\reserved@a
\let\do\relax
}
\newcommand{\addtoeachtocfile}{%
\@ifnextchar [%]
\@addtoeachtocfile\@@addtoeachtocfile
}
\newcommand{\@addtoeachtocfile}[2][]{%
\doforeachtocfile[{#1}]{\addtocontents{\@currext}{#2}}%
}
\newcommand{\@@addtoeachtocfile}[1]{%
\doforeachtocfile{\addtocontents{\@currext}{#1}}%
}
\newcommand{\addcontentslinetoeachtocfile}{%
\@ifnextchar [%]
\@addcontentslinetoeachtocfile\@@addcontentslinetoeachtocfile
}
\newcommand{\@addcontentslinetoeachtocfile}[3][]{%
\doforeachtocfile[{#1}]{\addcontentsline{\@currext}{#2}{#3}}%
}
\newcommand{\@@addcontentslinetoeachtocfile}[2]{%
\doforeachtocfile{\addcontentsline{\@currext}{#1}{#2}}%
}
\newcommand*{\tocbasic@starttoc}[1]{%
\begingroup
\setlength{\parskip}{\z@}%
\setlength{\parindent}{\z@}%
\setlength{\parfillskip}{\z@\@plus 1fil}%
\edef\@currext{#1}%
\csname tocbasic@@before@hook\endcsname
\csname tb@#1@before@hook\endcsname
\@starttoc{#1}%
\csname tb@#1@after@hook\endcsname
\csname tocbasic@@after@hook\endcsname
\endgroup
}
\newcommand*{\tocbasic@@before@hook}{}
\newcommand*{\tocbasic@@after@hook}{}
\newcommand{\BeforeStartingTOC}[2][]{%
\ifx\relax#1\relax
\g@addto@macro\tocbasic@@before@hook{#2}%
\else
\@ifundefined{tb@#1@before@hook}{%
\PackageInfo{tocbasic}{defining new hook before starting `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@before@hook\endcsname
\@empty
}{}%
\expandafter\g@addto@macro\csname tb@#1@before@hook\endcsname{#2}%
\fi
}
\newcommand{\AfterStartingTOC}[2][]{%
\ifx\relax#1\relax
\g@addto@macro\tocbasic@@after@hook{#2}%
\else
\@ifundefined{tb@#1@after@hook}{%
\PackageInfo{tocbasic}{defining new hook after starting `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@after@hook\endcsname
\@empty
}{}%
\expandafter\g@addto@macro\csname tb@#1@after@hook\endcsname{#2}%
\fi
}
\newcommand*{\listoftoc}{%
\@ifstar \tocbasic@starttoc\@listoftoc
}
\newcommand*{\@listoftoc}[2][\list@fname]{%
\begingroup
\@ifundefined{listof#2name}{%
\let\list@fname\relax
\ifx\relax#1\relax
\PackageWarning{tocbasic}{%
You should either define \expandafter\string\csname
listof#2name\endcsname\MessageBreak
or use the optional argument of \string\listoftoc\space\MessageBreak
to set the term to be used for the\MessageBreak
heading of list of #2}%
\def\list@fname{\listofname~#2}%
\fi
}{%
\expandafter\let\expandafter\list@fname\csname listof#2name\endcsname
}%
\edef\@currext{#2}%
\iftocfeature{\@currext}{onecolumn}{%
\iftocfeature{\@currext}{leveldown}{}{%
\if@twocolumn
\aftergroup\twocolumn\onecolumn
\fi
}%
}{}%
\tocbasic@listhead{#1}%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname microtypesetup\endcsname\relax
\else
\iftocfeature{\@currext}{noprotrusion}{}{%
\microtypesetup{protrusion=false}%
\PackageInfo{tocbasic}{character protrusion at \@currext\space deactivated}%
}%
\fi
\tocbasic@starttoc{#2}%
\endgroup
}
\newcommand*{\listofname}{List of}
\newcommand*{\listofeachtoc}{%
\@ifnextchar [%]
\@listofeachtoc\@@listofeachtoc
}
\newcommand{\@listofeachtoc}[1][]{%
\doforeachtocfile[{#1}]{\listoftoc{\@currext}}%
}
\newcommand{\@@listofeachtoc}[1]{%
\doforeachtocfile{\listoftoc{\@currext}}%
}
\newcommand*{\tocbasic@listhead}[1]{%
\@ifundefined{tocbasic@listhead@\@currext}{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname chapter\endcsname\relax
\expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
\iftocfeature{\@currext}{leveldown}{%
\iftocfeature{\@currext}{numbered}{%
\subsection[##1]{##1}%
}{%
\subsection*{##1}%
\ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi
\iftocfeature{\@currext}{totoc}{%
\addcontentsline{toc}{subsection}{##1}%
}{}%
}%
}{%
\iftocfeature{\@currext}{numbered}{%
\section[##1]{##1}%
}{%
\section*{##1}%
\@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
\iftocfeature{\@currext}{totoc}{%
\addcontentsline{toc}{section}{##1}%
}{}%
}%
}%
}%
\else
\expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
\iftocfeature{\@currext}{leveldown}{%
\iftocfeature{\@currext}{numbered}{%
\section{##1}%
}{%
\section*{##1}%
\iftocfeature{\@currext}{totoc}{%
\addcontentsline{toc}{section}{##1}%
}{}%
\ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi
}%
}{%
\iftocfeature{\@currext}{numbered}{%
\chapter[##1]{##1}%
}{%
\chapter*{##1}%
\@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
\iftocfeature{\@currext}{totoc}{%
\addcontentsline{toc}{chapter}{##1}%
}{}%
}%
}%
}%
\fi
}{}%
\csname tb@@beforehead@hook\endcsname
\csname tb@\@currext @beforehead@hook\endcsname
\csname tocbasic@listhead@\@currext\endcsname{#1}%
\csname tb@\@currext @afterhead@hook\endcsname
\csname tb@@afterhead@hook\endcsname
}
\newcommand{\BeforeTOCHead}[2][]{%
\@ifundefined{tb@#1@beforehead@hook}{%
\PackageInfo{tocbasic}{defining new hook before heading of `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@beforehead@hook\endcsname
\@empty
}{}%
\expandafter\g@addto@macro\csname tb@#1@beforehead@hook\endcsname{#2}%
}
\newcommand{\AfterTOCHead}[2][]{%
\@ifundefined{tb@#1@afterhead@hook}{%
\PackageInfo{tocbasic}{defining new hook after heading of `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@afterhead@hook\endcsname
\@empty
}{}%
\expandafter\g@addto@macro\csname tb@#1@afterhead@hook\endcsname{#2}%
}
\AtBeginDocument{%
\@ifundefined{MakeMarkcase}{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname KOMAClassName\endcsname\relax
\let\MakeMarkcase\MakeUppercase
\else
\let\MakeMarkcase\@firstofone
\fi
}{}%
}
\newcommand*{\deftocheading}[1]{%
\@namedef{tocbasic@listhead@#1}##1}
\newcommand*{\setuptoc}[2]{%
\@for\@tempa:=#2\do{%
\expandafter\tb@@sp@def\expandafter\@tempa\expandafter{\@tempa}%
\@namedef{tocbasic@#1@feature@\@tempa}{}%
}%
}
\newcommand*{\unsettoc}[2]{%
\@for\@tempa:=#2\do{%
\expandafter\tb@@sp@def\expandafter\@tempa\expandafter{\@tempa}%
\expandafter\let\csname tocbasic@#1@feature@\@tempa\endcsname\relax
}%
}
\def\@tempa#1{%
\def\tb@@sp@def##1##2{%
\futurelet\tb@sp@tempa\tb@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
\def\tb@@sp@d{%
\ifx\tb@sp@tempa\@sptoken
\expandafter\tb@@sp@b
\else
\expandafter\tb@@sp@b\expandafter#1%
\fi}%
\def\tb@@sp@b#1##1 \@nil{\tb@@sp@c##1}%
}
\@tempa{ }
\def\tb@@sp@c#1\@nil#2\relax#3{\@temptokena{#1}\edef#3{\the\@temptokena}}
\setuptoc{toc}{nobabel}
\setuptoc{lof}{nobabel}
\setuptoc{lot}{nobabel}
\newcommand*{\iftocfeature}[2]{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname tocbasic@#1@feature@#2\endcsname\relax
\expandafter\@secondoftwo
\else
\expandafter\@firstoftwo
\fi
}
\newcommand*{\tocbasicautomode}{%
\let\tb@saved@starttoc\@starttoc
\let\@starttoc\tocbasic@starttoc
\BeforeStartingTOC{%
\let\@starttoc\tb@saved@starttoc
\expandafter\ifattoclist\expandafter{\@currext}{}{%
\addtotoclist[tocbasicautomode]{\@currext}%
}%
}%
}
\define@key{tocbasic}{type}{%
\tb@ifvalueisnotempty{type}{#1}{\edef\tb@nt@type{#1}}%
}
\define@key{tocbasic}{counterwithin}{%
\edef\tb@nt@counterwithin{#1}%
}
\define@key{tocbasic}{types}{%
\tb@ifvalueisnotempty{types}{#1}{\edef\tb@nt@types{#1}}%
}
\define@key{tocbasic}{extension}{%
\tb@ifvalueisnotempty{extension}{#1}{\edef\tb@nt@ext{#1}}%
}
\define@key{tocbasic}{owner}{%
\tb@ifvalueisnotempty{owner}{#1}{\edef\tb@nt@owner{#1}}%
}
\define@key{tocbasic}{name}{%
\tb@ifvalueisnotempty{name}{#1}{\edef\tb@nt@name{#1}}%
}
\define@key{tocbasic}{listname}{%
\tb@ifvalueisnotempty{listname}{#1}{\edef\tb@nt@listname{#1}}%
}
\newif\iftb@forcenames
\define@key{tocbasic}{forcenames}[true]{%
\lowercase{\tb@boolkey{#1}}{forcenames}%
}
\define@key{tocbasic}{level}{%
\tb@ifvalueisnotempty{level}{#1}{\tb@numkey\tb@nt@level{#1}}%
}
\define@key{tocbasic}{indent}{%
\tb@ifvalueisnotempty{indent}{#1}{\tb@dimkey\tb@nt@indent{#1}}%
}
\define@key{tocbasic}{hang}{%
\tb@ifvalueisnotempty{hang}{#1}{\tb@dimkey\tb@nt@hang{#1}}%
}
\newif\iftb@float
\define@key{tocbasic}{float}[true]{%
\lowercase{\tb@boolkey{#1}}{float}%
}
\newif\iftb@nonfloat
\define@key{tocbasic}{nonfloat}[true]{%
\lowercase{\tb@boolkey{#1}}{nonfloat}%
}
\define@key{tocbasic}{floattype}{%
\tb@ifvalueisnotempty{floattype}{#1}{\tb@numkey\tb@nt@floattype{#1}}%
}
\define@key{tocbasic}{floatpos}{%
\tb@ifvalueisnotempty{floatpos}{#1}{\edef\tb@nt@floatpos{#1}}%
}
\define@key{tocbasic}{atbegin}{%
\tb@ifvalueisnotempty{atbegin}{#1}{\def\tb@nt@atbegin{#1}}%
}
\define@key{tocbasic}{atend}{%
\tb@ifvalueisnotempty{atend}{#1}{\def\tb@nt@atend{#1}}%
}
\newcommand*{\DeclareNewTOC}[2][]{%
\tb@floatfalse
\tb@nonfloatfalse
\tb@forcenamesfalse
\def\tb@nt@floattype{\tb@nt@autofloattype}%
\def\tb@nt@floatpos{tbp}%
\def\tb@nt@ext{#2}%
\def\tb@nt@type{#2}%
\def\tb@nt@types{\tb@nt@type s}%
\def\tb@nt@owner{float}%
\def\tb@nt@name{\expandafter\MakeUppercase\tb@nt@type}%
\def\tb@nt@listname{List of \expandafter\MakeUppercase\tb@nt@types}%
\def\tb@nt@level{1}%
\def\tb@nt@indent{1em}%
\def\tb@nt@hang{1.5em}%
\let\tb@nt@counterwithin\@empty
\let\tb@nt@atbegin\@empty
\let\tb@nt@atend\@empty
\setkeys{tocbasic}{#1}%
\expandafter\newcommand\csname ext@\tb@nt@type\endcsname{}%
\expandafter\let\csname ext@\tb@nt@type\endcsname\tb@nt@ext
\addtotoclist[\tb@nt@owner]{\csname ext@\tb@nt@type\endcsname}%
\@ifundefined{\tb@nt@type name}{%
\expandafter\let\csname \tb@nt@type name\endcsname\tb@nt@name
}{%
\iftb@forcenames
\expandafter\let\csname \tb@nt@type name\endcsname\tb@nt@name
\fi
}%
\@ifundefined{list\tb@nt@type name}{%
\expandafter\let\csname list\tb@nt@type name\endcsname\tb@nt@listname
}{%
\iftb@forcenames
\expandafter\let\csname list\tb@nt@type name\endcsname\tb@nt@listname
\fi
}%
\expandafter\newcommand\csname listof\tb@nt@ext name\expandafter\endcsname
\expandafter{\csname list\tb@nt@type name\endcsname}%
\begingroup\edef\@tempa{\endgroup
\noexpand\newcommand*\csname listof\tb@nt@types\endcsname{%
\noexpand\listoftoc{\tb@nt@ext}%
}%
}\@tempa
\begingroup\edef\@tempa{\endgroup
\noexpand\newcommand*\csname l@\tb@nt@type\endcsname{%
\noexpand\@dottedtocline{\tb@nt@level}{\tb@nt@indent}{\tb@nt@hang}%
}%
}\@tempa
\begingroup\edef\@tempa{\endgroup
\noexpand\newcommand*\csname setup\tb@nt@types\endcsname{%
\noexpand\setuptoc{\tb@nt@ext}%
}%
}\@tempa
\@tempswafalse
\iftb@float
\expandafter\newcommand\expandafter*\csname fps@\tb@nt@type\expandafter
\endcsname{\tb@nt@floatpos}%
\expandafter\newcommand\expandafter*\csname ftype@\tb@nt@type\expandafter
\endcsname{\tb@nt@floattype}%
\begingroup
\edef\@tempa{%
\noexpand\endgroup
\noexpand\newenvironment{\tb@nt@type}{%
\noexpand\@ifnextchar[%]
{\noexpand\tb@atbegin@after\noexpand\@float{\tb@nt@type}}%
{\noexpand\tb@atbegin@after\noexpand\@float{\tb@nt@type}%
[\expandafter\noexpand\csname fps@\tb@nt@type\endcsname]}%
}{%
\noexpand\csname \tb@nt@type @atend\noexpand\endcsname
\noexpand\end@float
}%
\noexpand\newenvironment{\tb@nt@type*}{%
\noexpand\@ifnextchar[%]
{\noexpand\tb@atbegin@after\noexpand\@dblfloat{\tb@nt@type}}%
{\noexpand\tb@atbegin@after\noexpand\@dblfloat{\tb@nt@type}%
[\expandafter\noexpand\csname fps@\tb@nt@type\endcsname]}%
}{%
\noexpand\csname \tb@nt@type @atend\noexpand\endcsname
\noexpand\end@dblfloat
}%
}%
\@tempa
\@tempswatrue
\fi
\iftb@nonfloat
\begingroup
\edef\@tempa{%
\noexpand\endgroup
\noexpand\newenvironment{\tb@nt@type-}{%
\noexpand\trivlist\noexpand\item\noexpand\relax
\noexpand\minipage{\noexpand\linewidth}%
\noexpand\def\noexpand\@captype{\tb@nt@type}%
\noexpand\csname \tb@nt@type @atbegin\noexpand\endcsname
}{%
\noexpand\csname \tb@nt@type @atend\noexpand\endcsname
\noexpand\endminipage\noexpand\endtrivlist
}%
}%
\@tempa
\@tempswatrue
\fi
\if@tempswa
\@ifundefined{c@\tb@nt@type}{%
\newcounter{\tb@nt@type}%
}{%
\PackageWarning{tocbasic}{using already defined counter `\tb@nt@type'}%
}%
\ifx\tb@nt@counterwithin\@empty\else
\@addtoreset{\tb@nt@type}{\tb@nt@counterwithin}%
\begingroup\edef\@tempa{%
\noexpand\endgroup
\noexpand\renewcommand*\expandafter\noexpand
\csname the\tb@nt@type\endcsname{%
\expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname
.\noexpand\arabic{\tb@nt@type}%
}%
}\@tempa
\fi
\begingroup
\edef\@tempa{%
\noexpand\endgroup
\noexpand\newcommand*\expandafter\noexpand
\csname \tb@nt@type format\endcsname{%
\expandafter\noexpand\csname \tb@nt@type name\endcsname
\noexpand\nobreakspace
\expandafter\noexpand\csname the\tb@nt@type\endcsname
\csname autodot\endcsname
}%
\noexpand\newcommand*\expandafter\noexpand
\csname fnum@\tb@nt@type\endcsname{%
\expandafter\noexpand\csname \tb@nt@type format\endcsname
}%
}%
\@tempa
\expandafter\newcommand\expandafter*\csname \tb@nt@type @atbegin\expandafter
\endcsname\expandafter{\tb@nt@atbegin}%
\expandafter\newcommand\expandafter*\csname \tb@nt@type @atend\expandafter
\endcsname\expandafter{\tb@nt@atend}%
\fi
}
\newcommand*{\tb@atbegin@after}[3]{}
\def\tb@atbegin@after#1#2[#3]{%
#1{#2}[#3]%
\csname #2@atbegin\endcsname
}
\newcommand*{\tb@ifvalueisnotempty}[2]{%
\begingroup
\edef\@tempa{#2}\ifx\@tempa\@empty
\PackageError{tocbasic}{empty value for key `#1'}{%
The argument of key `#1' may not by empty!}%
\aftergroup\@gobble
\else
\aftergroup\@firstofone
\fi
\endgroup
}
\newcommand*{\tb@boolkey}[2]{%
\csname tb@#2\ifx\relax#1\relax true\else#1\fi\endcsname
}
\newcommand*{\tb@dimkey}[2]{%
\begingroup
\@defaultunits\@tempdima#2pt\relax\@nnil
\edef\@tempa{\noexpand\endgroup\noexpand\def\noexpand#1{\the\@tempdima}}
\@tempa
}
\newcommand*{\tb@numkey}[2]{%
\begingroup
\afterassignment\remove@to@nnil\@tempcnta#2\relax\@nnil
\edef\@tempa{\noexpand\endgroup\noexpand\def\noexpand#1{\the\@tempcnta}}
\@tempa
}
\newcommand*{\tb@nt@autofloattype}{16}
%%% From File: scrlogo.dtx
\@ifundefined{KOMAScript}{%
\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
M\kern.05em A\kern.1em-\kern.1em Script}}}{}
\endinput
%%
%% End of file `tocbasic.sty'.
|