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
|
%%
%% This is file `tudscrbase.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tudscr-version.dtx (with options: `package')
%% tudscr-base.dtx (with options: `package')
%%
%% ============================================================================
%%
%% TUD-KOMA-Script
%% Copyright (c) Falk Hanisch <tudscr@gmail.com>, 2012-2016
%%
%% ============================================================================
%%
%% 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 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 Falk Hanisch.
%%
%% ----------------------------------------------------------------------------
%%
%% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
%% in der Version 1.3c, verteilt und/oder veraendert werden. Die aktuelle
%% Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
%% Version 1.3c oder spaeter ist Teil aller Verteilungen von LaTeX 2005/12/01
%% oder spaeter und dieses Werks. Dieses Werk hat den LPPL-Verwaltungs-Status
%% "author-maintained", wird somit allein durch den Autor verwaltet. Der
%% aktuelle Verwalter und Autor dieses Werkes ist Falk Hanisch.
%%
%% ============================================================================
%%
%%% From File: tudscr-version.dtx
\begingroup%
\catcode`\@11\relax%
\ifx\TUDVersion\undefined%
\newcommand*\@TUDVersion[1]{\gdef\TUDVersion{#1}}%
\else%
\newcommand*\@TUDVersion[1]{%
\def\@tempa{#1}%
\ifx\TUDVersion\@tempa\else%
\@latex@warning@no@line{%
\noexpand\TUDVersion\space is `\TUDVersion',\MessageBreak%
but `#1' was expected!\MessageBreak%
You should not use classes, packages or files from\MessageBreak%
different TUD-KOMA-Script-Bundle versions%
}%
\fi%
}%
\fi%
\@TUDVersion{2016/03/26 v2.04d TUD-KOMA-Script}%
\endgroup%
\providecommand*\tudscrmail{tudscr@gmail.com}
\@ifundefined{TUDScript}{%
\DeclareRobustCommand{\TUDScript}{%
\ifdin{TUD-KOMA-SCRIPT}{%
\textsf{T\kern.05em U\kern.05em D\kern.1em-\kern.1em}\KOMAScript%
}\csname xspace\endcsname%
}%
}{}
%%% From File: tudscr-base.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tudscrbase}[%
2016/03/26 v2.04d TUD-KOMA-Script
package
(basics for the bundle)%
]
\RequirePackage{scrbase}[2013/12/19]
\RequirePackage{kvsetkeys}[2012/04/25]
\RequirePackage{etoolbox}[2011/01/03]
\newcommand*\ifxblank{\expandafter\ifblank\expandafter}
\newcommand*\ifxnumber[1]{%
\if\relax\detokenize\expandafter{\romannumeral-0#1}\relax%
\expandafter\@firstoftwo%
\else%
\expandafter\@secondoftwo%
\fi%
}
\newcommand*\ifstrbool[4]{%
\ifstr{#1}{true}{#2}{%
\ifstr{#1}{on}{#2}{%
\ifstr{#1}{yes}{#2}{%
\ifstr{#1}{false}{#3}{%
\ifstr{#1}{no}{#3}{%
\ifstr{#1}{off}{#3}{%
#4%
}%
}%
}%
}%
}%
}%
}
\providecommand*\protected@expandtwoargs[3]{%
\protected@edef\reserved@a{\noexpand#1{#2}{#3}}\reserved@a%
}
\newcommand*\tud@divide[3]{%
\begingroup%
\@defaultunits\@tempdima #2pt\relax\@nnil%
\@defaultunits\@tempdimb #3pt\relax\@nnil%
\ifdim\@tempdima>\@tempdimb\relax%
\@whiledim\@tempdimb>1pt\relax\do{%
\setlength\@tempdima{.1\@tempdima}%
\setlength\@tempdimb{.1\@tempdimb}%
}%
\setlength\@tempdimc{\@tempdima}%
\else%
\@whiledim\@tempdima>1pt\relax\do{%
\setlength\@tempdima{.1\@tempdima}%
\setlength\@tempdimb{.1\@tempdimb}%
}%
\setlength\@tempdimc{\@tempdimb}%
\fi%
\@tempcnta=1\relax%
\@whiledim\dimexpr\@tempcnta\@tempdimc\relax<.01\maxdimen\do{%
\multiply\@tempcnta by 10\relax%
}%
\setlength{\@tempdimc}{%
\dimexpr(\@tempcnta\@tempdima / \@tempdimb * \p@)\relax%
}%
\setlength{\@tempdimc}{\dimexpr \@tempdimc/\@tempcnta\relax}%
\edef\@tempa{\endgroup\def\noexpand#1{\strip@pt\@tempdimc}}%
\@tempa%
}
\newcommand*\tud@lowerstring[2]{%
\protected@edef#1{#2}%
\lowercase\expandafter{%
\expandafter\def\expandafter #1\expandafter{#1}%
}%
}
\DefineFamily{TUD}
\newcommand*\TUDProcessOptions{\FamilyProcessOptions{TUD}}
\newcommand*\TUDExecuteOptions{\FamilyExecuteOptions{TUD}}
\newcommand*\TUDoptions{\FamilyOptions{TUD}}
\newcommand*\TUDoption{\FamilyOption{TUD}}
\newcommand*\TUD@noworlater{\AtEndOfClass}
\AtEndOfClass{\let\TUD@noworlater\@firstofone}
\newcommand*\TUD@key[2][.\@currname.\@currext]{%
\DefineFamilyMember{TUD}%
\kernel@ifnextchar[%]
{\TUD@@key[#1]{#2}}{\TUD@@@key[#1]{#2}}%
}
\newcommand*\TUD@@key{}
\def\TUD@@key[#1]#2[#3]#4{%
\DefineFamilyKey[#1]{TUD}{#2}[{#3}]{\TUD@noworlater{#4}}%
}
\newcommand*\TUD@@@key{}
\def\TUD@@@key[#1]#2#3{%
\DefineFamilyKey[#1]{TUD}{#2}{\TUD@noworlater{#3}}%
}
\newcommand*\TUD@ifkey[1][.\@currname.\@currext]{%
\DefineFamilyMember{TUD}%
\FamilyBoolKey[#1]{TUD}%
}
\newcommand*\TUD@set@ifkey{\FamilySetBool{TUD}}
\newcommand*\TUD@numkey[1][.\@currname.\@currext]{%
\DefineFamilyMember{TUD}%
\FamilyNumericalKey[#1]{TUD}%
}
\newcommand*\TUD@numkey@bool{%
{false}{0},{off}{0},{no}{0},{true}{1},{on}{1},{yes}{1}%
}
\newcommand*\TUD@set@numkey{\FamilySetNumerical{TUD}}
\newcommand*\TUD@lengthkey[1][.\@currname.\@currext]{%
\DefineFamilyMember{TUD}%
\FamilyLengthKey[#1]{TUD}%
}
\newcommand*\TUD@set@lengthkey{\FamilySetLength{TUD}}
\newcommand*\TUD@unknown@keyval{\FamilyUnknownKeyValue{TUD}}
\newcommand*\TUD@key@lock[2][.\@currname.\@currext]{%
\newbool{@tud@#2@locked}%
\TUD@key[{#1}]{#2}%
}
\newcommand*\TUD@std@ifkey@lock[2]{%
\ifbool{@tud@#1@locked}{}{%
\TUDoption{#1}{#2}%
\boolfalse{@tud@#1@locked}%
}%
}
\newcommand*\TUD@set@ifkey@lock[1]{%
\booltrue{@tud@#1@locked}%
\TUD@set@ifkey{#1}%
}
\let\TUD@std@numkey@lock\TUD@std@ifkey@lock
\newcommand*\TUD@set@numkey@lock[1]{%
\booltrue{@tud@#1@locked}%
\TUD@set@numkey{#1}%
}
\newcommand*\cs@lock[2]{%
\expandafter\newcommand\expandafter*\csname#1\endcsname{#2}%
\newbool{#1@locked}%
}
\newcommand*\cs@std@lock[2]{%
\ifbool{#1@locked}{}{%
\csdef{#1}{#2}%
\boolfalse{#1@locked}%
}%
}
\newcommand*\cs@set@lock[2]{%
\csdef{#1}{#2}%
\booltrue{#1@locked}%
}
\newcommand*\bool@lock[2][false]{%
\newbool{#2}%
\newbool{#2@locked}%
\setbool{#2}{#1}%
}
\newcommand*\bool@std@lock[2]{%
\ifbool{#1@locked}{}{%
\setbool{#1}{#2}%
\boolfalse{#1@locked}%
}%
}
\newcommand*\bool@set@lock[2]{%
\setbool{#1}{#2}%
\booltrue{#1@locked}%
}
\newcommand*\tud@cmd@store[1]{%
\tud@cmd@check{#1}%
\ifcsdef{@@tud@#1}{}{\csletcs{@@tud@#1}{#1}}%
}
\newcommand*\tud@cmd@restore[1]{%
\tud@cmd@check{#1}%
\ifcsdef{@@tud@#1}{%
\csletcs{#1}{@@tud@#1}%
\csundef{@@tud@#1}%
}{}%
}
\newcommand*\tud@cmd@reset[1]{%
\tud@cmd@check{#1}%
\ifcsdef{@@tud@#1}{\csletcs{#1}{@@tud@#1}}{}%
}
\newcommand*\tud@cmd@update[1]{%
\tud@cmd@check{#1}%
\ifcsdef{@@tud@#1}{\csletcs{@@tud@#1}{#1}}{}%
}
\newcommand*\tud@cmd@use[1]{%
\tud@cmd@check{#1}%
\ifcsdef{@@tud@#1}{%
\@nameuse{@@tud@#1}%
}{%
\@nameuse{#1}%
}%
}
\newcommand*\tud@cmd@check[1]{%
\ifcsdef{#1}{}{%
\PackageError{tudscrbase}{%
`\@backslashchar#1' is not defined%
}{%
The command `\@backslashchar#1' was never defined.\MessageBreak%
Please contact the TUD-KOMA-Script maintainer\MessageBreak%
via \tudscrmail. A bugfix is urgently required.%
}%
}%
}
\newcommand*\tud@skip@store[1]{%
\ifcsdef{@@tud@skip@#1}{}{%
\@tempswafalse%
\ifisskip{\csname #1\endcsname}{\@tempswatrue}{}%
\ifisdimen{\csname #1\endcsname}{\@tempswatrue}{}%
\if@tempswa%
\csedef{@@tud@skip@#1}{\expandafter\the\csname #1\endcsname}%
\fi%
}%
}
\newcommand*\tud@skip@restore[1]{%
\ifcsdef{@@tud@skip@#1}{%
\csname #1\endcsname=\csname @@tud@skip@#1\endcsname%
\csundef{@@tud@skip@#1}%
}{}%
}
\newcommand*\tud@skip@set[2]{%
\ifdef{#1}{%
\@tempswafalse%
\ifisskip{#1}{\@tempswatrue}{}%
\ifisdimen{#1}{\@tempswatrue}{}%
\if@tempswa%
\setlength#1{#2}%
\fi%
}{}%
}
\newcommand*\tud@patch@wrn[1]{%
\PackageWarning{tudscrbase}{%
It wasn't possible to patch `\@backslashchar#1'.\MessageBreak%
Please contact the TUD-KOMA-Script maintainer\MessageBreak%
via \tudscrmail. Without a bugfix an\MessageBreak%
erroneous output may occur%
}%
}
\newcommand*\TUD@parameter@family{}%
\newcommand*\TUD@parameter[2]{%
\ifxblank{#1}{}{\xdef\TUD@parameter@family{#1}}%
#2%
\global\let\TUD@parameter@family\relax%
}
\let\TUD@parameter@family\relax%
\newcommand*\TUD@parameter@checkfamily[1]{%
\ifx\TUD@parameter@family\relax%
\PackageError{tudscrbase}{%
No family for keys given%
}{%
You have to use \string#1\space within the\MessageBreak%
second argument of \string\TUD@parameter. The first \MessageBreak%
argument of \string\TUD@parameter\space has to be a unique family name.%
}%
\fi%
}
\newcommand*\TUD@parameter@define[1][]{%
\ifxblank{#1}{%
\TUD@parameter@checkfamily{\TUD@parameter@define}%
\expandafter\define@key\expandafter{\TUD@parameter@family}%
}{%
\expandafter\define@key\expandafter{#1}%
}%
}
\newcommand*\TUD@parameter@let[3][]{%
\ifxblank{#1}{%
\TUD@parameter@checkfamily{\TUD@parameter@let}%
\@expandtwoargs{\csletcs}{%
KV@\TUD@parameter@family @#2%
}{%
KV@\TUD@parameter@family @#3%
}%
\@expandtwoargs{\csletcs}{%
KV@\TUD@parameter@family @#2@default%
}{%
KV@\TUD@parameter@family @#3@default%
}%
}{%
\@expandtwoargs{\csletcs}{KV@#1@#2}{KV@#1@#3}%
\@expandtwoargs{\csletcs}{KV@#1@#2@default}{KV@#1@#3@default}%
}%
}
\newcommand*\TUD@parameter@sethandler[1][]{%
\ifxblank{#1}{%
\TUD@parameter@checkfamily{\TUD@parameter@sethandler}%
\expandafter\kv@set@family@handler\expandafter{\TUD@parameter@family}%
}{%
\expandafter\kv@set@family@handler\expandafter{#1}%
}%
}
\newcommand*\TUD@parameter@set[2]{\@expandtwoargs\kvsetkeys{#1}{#2}}
\newcommand*\TUD@parameter@error[2]{%
\PackageError{tudscrbase}{Unsupported value for parameter `#1'}{%
`#1' can only be used with values:\MessageBreak#2%
}%
}
\newcommand*\TUD@AfterPackage@Set[1]{%
\newbool{@tud@#1@loaded}%
\AfterPackage!{#1}{\booltrue{@tud@#1@loaded}}
}
\newcommand*\TUD@AfterPackage[2]{%
\ifcsdef{if@tud@#1@loaded}{%
\if@atdocument%
\ifbool{@tud@#1@loaded}{#2}{}%
\else%
\AfterPackage!{#1}{#2}%
\fi%
}{%
\PackageError{tudscrbase}{\string\TUD@AfterPackage@Set{#1} missing}{%
You have to set \string\TUD@AfterPackage@Set{#1} before\MessageBreak%
the usage of \string\TUD@AfterPackage{#1}{<code>} is\MessageBreak%
possible.%
}%
}%
}
\endinput
%%
%% End of file `tudscrbase.sty'.
|