summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/scrkbase.sty
blob: a839a1f0d138fce3f665046917bb5f635617ac03 (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
%%
%% This is file `scrkbase.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% scrkvers.dtx  (with options: `package,scrkbase')
%% scrkbase.dtx  (with options: `package,option,koma')
%% scrkfont.dtx  (with options: `package,option,scrkbase')
%% scrlfile.dtx  (with options: `load')
%% scrkbase.dtx  (with options: `package,body,koma')
%% scrkfont.dtx  (with options: `package,body,scrkbase')
%% scrlogo.dtx  (with options: `logo')
%% 
%% Copyright (c) 1994-2012
%% Markus Kohm and any individual authors listed elsewhere in this file.
%% 
%% This file was generated from file(s) of the KOMA-Script bundle.
%% ---------------------------------------------------------------
%% 
%% It may be distributed under the conditions of the
%% LaTeX Project Public License in the version distributed together
%% with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'.
%% 
%% This file may only be distributed together with a copy of the
%% KOMA-Script bundle.  You may however distribute the
%% KOMA-Script bundle without all such generated files.  See also
%% `lppl.txt' or `lppl-de.txt' for additional information.
%% 
%% The list of files belonging to KOMA-Script distribution is given in
%% the file `manifest.txt'.  See also `lppl.txt' or `lppl-de.txt' for
%% additional information.
%% 
%% If this file is a beta version, you may not be allowed to distribute
%% it.  Look at the comments below to see if this is the case.
%% 
%% English and German manuals are part of KOMA-Script bundle.
%% ----------------------------------------------------------
%% 
%% See `README'.
%% 
%% The KOMA-Script bundle (but maybe not this file) was based upon the
%% LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e
%% standard classes created by The LaTeX3 Project 1994-1996.  You may
%% find a complete unmodified copy of LaTeX2e at
%% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>.
%% 
%%% From File: scrkvers.dtx
\begingroup
  \makeatletter
  \ifx\KOMAScriptVersion\undefined
    \newcommand*{\@CheckKOMAScriptVersion}[1]{%
      \gdef\KOMAScriptVersion{#1}%
    }%
  \else
    \newcommand*{\@CheckKOMAScriptVersion}[1]{%
      \def\@tempa{#1}%
      \ifx\KOMAScriptVersion\@tempa\else
        \@latex@warning@no@line{%
          \noexpand\KOMAScriptVersion\space is
          `\KOMAScriptVersion',\MessageBreak
          but `#1' was expected!\MessageBreak
          You should not use classes, packages or files
          from\MessageBreak
          different KOMA-Script versions%
        }%
      \fi
    }
  \fi
  \@CheckKOMAScriptVersion{2012/03/08 v3.10a KOMA-Script}%
\endgroup
%%% From File: scrkbase.dtx
\ProvidesPackage{%
  scrkbase%
}[%
  \KOMAScriptVersion\space package
  (KOMA-Script-dependent basics and keyval usage)]
\RequirePackage{scrbase}[\KOMAScriptVersion]
\newcommand*{\KOMA@key}[1][.\@currname.\@currext]{%
  \DefineFamilyMember{KOMA}%
  \DefineFamilyKey[#1]{KOMA}%
}
\newcommand*{\KOMAProcessOptions}{\FamilyProcessOptions{KOMA}}
\@onlypreamble\KOMAProcessOptions
\KOMAProcessOptions\relax
%%% From File: scrkfont.dtx
%%% From File: scrlfile.dtx
\def\scrlfileversion{2011/03/09 v3.09}
\edef\@tempa{\noexpand\RequirePackage{scrlfile}[\scrlfileversion]}
\@tempa
%%% From File: scrkbase.dtx
\newcommand*{\KOMAExecuteOptions}{\FamilyExecuteOptions{KOMA}}
\@onlypreamble\KOMAExecuteOptions
\newcommand*{\KOMAoptions}[1]{%
  \let\post@kopt@hook\@empty
  \KOMA@options{#1}{%
    \PackageError{scrkbase}{%
      unknown KOMA option `\scr@key@name'%
    }{%
      You have used \string\KOMAoptions\space to set
      `\scr@key@atlist',\MessageBreak
      but KOMA-Script does not know any option named
      `\scr@key@name'.\MessageBreak
      See the KOMA-Script manual for more informations about options
      and\MessageBreak
      their values.%
    }%
  }%
  \post@kopt@hook\let\post@kopt@hook\relax
}
\newcommand*{\KOMA@options}{\Family@Options{KOMA}}
\newcommand*{\post@kopt@hook}{}
\let\post@kopt@hook\relax
\newcommand*{\AfterKOMAoptions}{%
  \ifx\post@kopt@hook\relax
    \PackageWarning{scrkbase}{%
      \string\AfterKOMAoptions\space can only be used inside a\MessageBreak
      KOMA-Script option that is called using \string\KOMAoptions.\MessageBreak
      Because of this, command will be ignored%
    }%
    \expandafter\@gobbletwo
  \else
    \expandafter\l@addto@macro
  \fi
  \post@kopt@hook
}
\newcommand*{\KOMAoption}[2]{%
  \let\post@kopt@hook\@empty
  \Family@Option{KOMA}{#1}{#2}{%
    \PackageError{scrkbase}{%
      unknown KOMA option `\scr@key@name'%
    }{%
      You have used \string\KOMAoption\space to set
      `\scr@key@name',\MessageBreak
      but KOMA-Script does not know any option named
      `\scr@key@name'.\MessageBreak
      See the KOMA-Script manual for more informations about options
      and\MessageBreak
      their values.%
    }%
  }%
  \post@kopt@hook\let\post@kopt@hook\relax
}
\newcommand*{\KOMA@unknown@keyval}{\FamilyUnknownKeyValue{KOMA}}
\newcommand*{\KOMA@ifkey}{%
  \DefineFamilyMember{KOMA}%
  \FamilyBoolKey{KOMA}%
}
\newcommand*{\KOMA@set@ifkey}{\FamilySetBool{KOMA}}
\newcommand*{\KOMA@ncmdkey}{%
  \DefineFamilyMember{KOMA}%
  \FamilyNumericalKey{KOMA}%
}
\newcommand*{\KOMA@set@ncmdkey}{\FamilySetNumerical{KOMA}}
\newcommand*{\KOMA@DeclareDeprecatedOption}{%
  \@ifnextchar [%]
  {\KOMA@@DeclareDeprecatedOption}%
  {\KOMA@@@DeclareDeprecatedOption{\ClassWarningNoLine{\KOMAClassName}}}%
}
\newcommand*{\KOMA@@DeclareDeprecatedOption}[1][]{%
  \KOMA@@@DeclareDeprecatedOption{\PackageWarningNoLine{#1}}%
}
\newcommand*{\KOMA@@@DeclareDeprecatedOption}[3]{%
  \DeclareOption{#2}{\KOMA@UseDeprecatedOption{#1}{#2}{#3}}%
}
\newcommand*{\KOMA@UseDeprecatedOption}[3]{%
  \let\scr@sr@co\CurrentOption
  #1{%
    You've used obsolete option `#2'.\MessageBreak
    Usage of this option indicates an old document and\MessageBreak
    changes compatibility level using\MessageBreak
    `#3,version=first'.\MessageBreak
    If you don't want this, you should simply replace\MessageBreak
    usage of option `#2' by `#3'%
  }%
  \KOMAExecuteOptions{#3,version=first}%
  \let\CurrentOption\scr@sr@co
}
\newcommand*{\KOMA@DeclareStandardOption}{%
  \@ifnextchar [%]
  {\KOMA@@DeclareStandardOption}%
  {\KOMA@@@DeclareStandardOption{\ClassInfoNoLine{\KOMAClassName}}}%
}
\newcommand*{\KOMA@@DeclareStandardOption}[1][]{%
  \KOMA@@@DeclareStandardOption{\PackageInfoNoLine{#1}}%
}
\newcommand*{\KOMA@@@DeclareStandardOption}[3]{%
  \DeclareOption{#2}{\KOMA@UseStandardOption{#1}{#2}{#3}}%
}
\newcommand*{\KOMA@UseStandardOption}[3]{%
  \let\scr@sr@co\CurrentOption
  #1{%
    You've used standard option `#2'.\MessageBreak
    This is correct!\MessageBreak
    Internally I'm using `#3'.\MessageBreak
    If you'd like to set the option with \string\KOMAoptions,\MessageBreak
    you'd have to use `#3' there\MessageBreak
    instead of `#2', too%
  }%
  \KOMAExecuteOptions{#3}%
  \let\CurrentOption\scr@sr@co
}
\newcommand*{\KOMA@DeclareObsoleteOption}{%
  \@ifnextchar [%]
  {\KOMA@@DeclareObsoleteOption}%
  {\KOMA@@DeclareObsoleteOption[\@gobbletwo]}%
}
\newcommand*{\KOMA@@DeclareObsoleteOption}{}
\def\KOMA@@DeclareObsoleteOption[#1]{%
  \@ifnextchar [%]
  {\KOMA@@@DeclareObsoleteOption{#1}}%
  {\KOMA@@@DeclareObsoleteOption{#1}[]}%
}
\newcommand*{\KOMA@@@DeclareObsoleteOption}{}
\def\KOMA@@@DeclareObsoleteOption#1[#2]#3#4{%
  \ifstr{#2}{}{%
    \KOMA@iv@DeclareObsoleteOption{#1}{\@currname}{#3}{#4}%
  }{%
    \KOMA@UseObsoleteOption{#1}{#2}{#3}{#4}%
  }%
}
\newcommand*{\KOMA@iv@DeclareObsoleteOption}[4]{%
  \DeclareOption{#3}{\KOMA@UseObsoleteOption{#1{#2}}{#3}{#4}}%
}
\newcommand*{\KOMA@UseObsoleteOption}[3]{%
  \let\scr@sr@co\CurrentOption
  #1{%
    You've used obsolete option `#2'.\MessageBreak
    \protect\KOMAExecuteOptions{#3} will be\MessageBreak
    used instead.\MessageBreak
    You may simply replace `#2'\MessageBreak
    by `#3'%
  }%
  \KOMAExecuteOptions{#3}%
  \let\CurrentOption\scr@sr@co
}
\newcommand*{\scr@sr@co}{}
\newcommand*{\KOMA@newobsoletecommand}[3][\@gobbletwo]{%
  \newcommand*{#2}{\KOMA@UseObsoleteCommand{#1}{\string#2}{#3}}%
}
\newcommand*{\KOMA@UseObsoleteCommand}[3]{%
  #1{%
    scrkbase%
  }{%
    You've used the obsolete command `#2'.\MessageBreak
    \protect\KOMAoptions{#3} will be used instead.\MessageBreak
    You should also replace `#2' by `\protect\KOMAoptions{#3}'%
  }%
  \KOMAoptions{#3}%
}
%%% From File: scrkfont.dtx
\newcommand*{\setkomafont}[2]{%
  \@ifundefined{scr@fnt@#1}{%
    \@ifundefined{scr@fnt@instead@#1}{%
      \PackageError{scrkbase}{%
        font of element `#1' can't be set}{%
        You've told me to redefine the font selection of the
        element,\MessageBreak%
        but either no such element is known by
        KOMA-Script\MessageBreak%
        or the element does not use a special font selection%
      }%
    }{%
      \PackageInfo{scrkbase}{%
        You've told me to redefine the font selection of the\MessageBreak
        element `#1' that is an alias of element\MessageBreak
        `\csname scr@fnt@instead@#1\endcsname'%
      }%
      \expandafter\setkomafont\expandafter{%
        \csname scr@fnt@instead@#1\endcsname}{#2}%
    }%
  }{%
    \expandafter\expandafter\expandafter\def\csname scr@fnt@#1\endcsname{#2}%
  }%
  \@ifundefined{scr@fnt@wrn@#1}{}{%
    \PackageWarning{scrkbase}{%
      \csname scr@fnt@wrn@#1\endcsname{#1}%
    }%
  }%
}
\newcommand*{\addtokomafont}[2]{%
  \@ifundefined{scr@fnt@#1}{%
    \@ifundefined{scr@fnt@instead@#1}{%
      \PackageError{scrkbase}{%
        font of element `#1' can't be extended%
      }{%
        You've told me to extend the font selection of the
        element,\MessageBreak
        but either no such element is known by
        KOMA-Script\MessageBreak
        or the element does not use a special font selection%
      }%
    }{%
      \PackageInfo{scrkbase}{%
        You've told me to extend the font selection of the\MessageBreak
        element `#1' that is an alias of element\MessageBreak
        `\csname scr@fnt@instead@#1\endcsname'%
      }%
      \expandafter\addtokomafont\expandafter{%
        \csname scr@fnt@instead@#1\endcsname}{#2}%
    }%
  }{%
    \expandafter\expandafter\expandafter\l@addto@macro
    \csname scr@fnt@#1\endcsname{#2}%
  }%
  \@ifundefined{scr@fnt@wrn@#1}{}{%
    \PackageWarning{scrkbase}{%
      \csname scr@fnt@wrn@#1\endcsname{#1}%
    }%
  }%
}
\newcommand*{\usekomafont}[1]{%
  \@ifundefined{scr@fnt@#1}{%
    \@ifundefined{scr@fnt@instead@#1}{%
      \PackageError{scrkbase}{%
        font of element `#1' can't be used%
      }{%
        You've told me to use the font selection of the
        element,\MessageBreak
        but either no such element is known by
        KOMA-Script\MessageBreak
        or the element does not use a special font selection%
      }%
    }{%
      \PackageInfo{scrkbase}{%
        You've told me to use the font selection of the
        element\MessageBreak
        `#1' that is an alias of element `\csname
        scr@fnt@instead@#1\endcsname'\MessageBreak
      }%
      \expandafter\expandafter\expandafter\usekomafont
      \expandafter\expandafter\expandafter{%
        \csname scr@fnt@instead@#1\endcsname}%
    }%
  }{%
    \@nameuse{scr@fnt@#1}%
  }%
}
\newcommand*{\newkomafont}[3][\relax]{%
  \expandafter\newcommand\expandafter*\csname @#2font\endcsname{#3}%
  \expandafter\expandafter\expandafter\newcommand
  \expandafter\expandafter\expandafter*%
  \expandafter\csname scr@fnt@#2\expandafter\endcsname\expandafter{%
    \csname @#2font\endcsname%
  }%
  \ifx\relax#1\relax\else
    \expandafter\newcommand\expandafter*\csname scr@fnt@wrn@#2\endcsname{#1}%
  \fi
}
\newcommand*{\aliaskomafont}[2]{%
  \expandafter\newcommand\expandafter*\csname scr@fnt@instead@#1\endcsname{%
    #2%
  }%
}
%%% 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 `scrkbase.sty'.