summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/english/scrbookreportarticle-experts.tex
blob: b718bccf6f834dda38763c853817b5a2c7e833b7 (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
% ======================================================================
% scrbookreportarticle-experts.tex
% Copyright (c) Markus Kohm, 2001-2012
%
% This file is part of the LaTeX2e 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 work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% scrbookreportarticle-experts.tex
% Copyright (c) Markus Kohm, 2001-2012
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
% Die neuste Version dieser Lizenz ist
%   http://www.latex-project.org/lppl.txt
% und Version 1.3c ist Teil aller Verteilungen von LaTeX
% Version 2005/12/01 oder spaeter und dieses Werks.
%
% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
% (allein durch den Autor verwaltet).
%
% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
% 
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
% Chapter about scrbook, scrreprt, and scrartcl of the KOMA-Script guide
% expert part
% Maintained by Markus Kohm
%
% ----------------------------------------------------------------------
%
% Kapitel ueber scrbook, scrreprt und scrartcl im Experten-Teil der
% KOMA-Script-Anleitung
% Verwaltet von Markus Kohm
%
% ============================================================================

\ProvidesFile{scrbookreportarticle-experts.tex}[2012/02/28 KOMA-Script guide
(chapter: scrbook, scrreprt, scrartcl for experts)]

\translator{Gernot Hassenpflug\and Markus Kohm}

% Date of the translated German file: 2012/02/28


\chapter{Additional Information about the Main Classes \Class{scrbook},
  \Class{scrreprt}, and \Class{scrartcl} as well as the Package
  \Package{scrextend}}
\labelbase{maincls-experts}

This chapter gives additional information about the \KOMAScript{} classes
\Class{scrbook}, \Class{scrreprt}, and \Class{scrartcl}. Some of the features
are also available for package \Package{scrextend}. \iffree{Some parts of the
  chapter are subject to the \KOMAScript{} book \cite{book:komascript}
  only. This shouldn't be a problem, because the}{The} average user, who only
want to use the package, won't need the information, that is addressed to
users with non-standard requirements or who want to write their own classes
using a \KOMAScript{} class. Another part of the information describes features
of the classes that exist only because of compatibility to former
releases of \KOMAScript{} or the standard classes. The features, that exist
only because of compatibility to former \KOMAScript{} releases, are printed
with a sans serif font. You shouldn't use them any longer.

\LoadNonFree{scrbookreportarticle-experts}{0}

\section{Additional Information to User Commands}
\label{sec:maincls-experts.addInfos}

\LoadNonFree{scrbookreportarticle-experts}{1}


\section{Cooperation and Coexistence of \KOMAScript{} and Other Packages}
\label{sec:maincls-experts.coexistence}

\LoadNonFree{scrbookreportarticle-experts}{2}


\section{Expert Commands}
\label{sec:maincls-experts.experts}

This sections described commands, that are more or less out of average user's
interest. Nevertheless these commands provide additional features for
experts. Because the information is addressed to experts it's condensed.


\begin{Declaration}
  \Macro{KOMAClassName}\\
  \Macro{ClassName}
\end{Declaration}
\BeginIndex{Cmd}{KOMAClassName}%
\BeginIndex{Cmd}{ClassName}%
\Macro{KOMAClassName} stores the name of the currently used \KOMAScript{}
class. If someone wants to know, whether or not or a \KOMAScript{} class is
used or which \KOMAScript{} is used this may be tested with this command. In
difference to this, \Macro{ClassName} tells which would be the standard class,
that has been replaced by a \KOMAScript{} class.

Please note\textnote{Attention!}, that the existence of
\Macro{KOMAScript}\IndexCmd{KOMAScript} isn't a indication for the usage of a
\KOMAScript{} class. First of all: Every \KOMAScript{} package and not only
\KOMAScript{} classes define \Macro{KOMAScript}. Furthermore other packages
may also define the \KOMAScript{} word mark with this name.%
% 
\EndIndex{Cmd}{ClassName}%
\EndIndex{Cmd}{KOMAClassName}%

\begin{Declaration}
  \Macro{addtocentrydefault}\Parameter{level}\Parameter{number}%
  \Parameter{heading}
\end{Declaration}
\BeginIndex{Cmd}{addtocentrydefault}%
The\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and
  \Class{scrartcl}} \KOMAScript{} classes don't use
\Macro{addcontentsline}\IndexCmd{addcontentsline}%
\important{\Macro{addcontentsline}} directly. Instead they
call \Macro{addtocentrydefault} with similar arguments. The command may be used
for both, entries with and without number. Thereby \PName{level} is the
textual sectioning level, i.\,e.,  \PValue{part},
\PValue{chapter}, \PValue{section}, \PValue{subsection},
\PValue{subsubsection}, \PValue{paragraph}, or \PValue{subparagraph}. The
already formatted sectioning number is given by the second argument,
\PName{number}. This argument may be empty. The text of the entry is given by
argument \PName{heading}. It is recommended to protect fragile commands inside
this argument with prefix
\Macro{protect}\IndexCmd{protect}\important{\Macro{protect}}.

There's one speciality for argument \PName{number}. An empty argument
signalizes, that an entry without number should be generated. \KOMAScript{}
uses
\begin{quote}
  \Macro{addcontentsline}\PParameter{toc}\Parameter{level}%
  \Parameter{heading}
\end{quote}
for this. Nevertheless, if the argument is not empty an entry with number
will be made and \PName{number} is the already formatted heading
number. \KOMAScript{} uses
\begin{quote}\raggedright
  \Macro{addcontentsline}\PParameter{toc}\Parameter{level}%
  \PParameter{\%\\
    \quad\Macro{protect}\Macro{numberline}\Parameter{number}%
    \PName{heading}\%\\
  }
\end{quote}
to make this.

Package authors an authors of wrapper classes may redefined this command to
manipulate the entries. For example\textnote{Example} one could suggest
\begin{lstcode}[belowskip=\dp\strutbox plus 1pt]
  \renewcommand{\addtocentrydefault}[3]{%
    \ifstr{#3}{}{%
      \ifstr{#2}{}{%
        \addcontentsline{toc}{#1}{#3}%
      }{%
        \addcontentsline{toc}{#1}{\protect\numberline{#2}#3}%
      }%
    }%
  }%
\end{lstcode}
to omit entries with empty \PName{heading}. In real live this wouldn't be
needed, because the \KOMAScript{} classes already use another method to
suppress empty entries. See the description of the structuring commands in
\autoref{sec:maincls.structure} from \autopageref{desc:maincls.cmd.part}
onward for this.%
%
\EndIndex{Cmd}{addtocentrydefault}

\begin{Declaration}
  \Macro{addparttocentry}\Parameter{number}\Parameter{heading}\\
  \Macro{addchaptertocentry}\Parameter{number}\Parameter{heading}\\
  \Macro{addsectiontocentry}\Parameter{number}\Parameter{heading}\\
  \Macro{addsubsectiontocentry}\Parameter{number}\Parameter{heading}\\
  \Macro{addsubsubsectiontocentry}\Parameter{number}\Parameter{heading}\\
  \Macro{addparagraphtocentry}\Parameter{number}\Parameter{heading}\\
  \Macro{addsubparagraphtocentry}\Parameter{number}\Parameter{heading}
\end{Declaration}%
\BeginIndex{Cmd}{addparttocentry}%
\BeginIndex{Cmd}{addchaptertocentry}%
\BeginIndex{Cmd}{addsectiontocentry}%
\BeginIndex{Cmd}{addsubsectiontocentry}%
\BeginIndex{Cmd}{addsubsubsectiontocentry}%
\BeginIndex{Cmd}{addparagraphtocentry}%
\BeginIndex{Cmd}{addsubparagraphtocentry}%
The\ChangedAt{v3.08}{\Class{scrbook}\and \Class{scrreprt}\and
  \Class{scrartcl}} \KOMAScript{} classes call the previously described
command \Macro{addtocentrydefault}\IndexCmd{addtocentrydefault}%
\important{\Macro{addtocentrydefault}} directly only if no individual command
for the \PName{level} has been defined or if that command is
\Macro{relax}\IndexCmd{relax}\important{\Macro{relax}}. Nevertheless, the
default definition of all these individual commands simply call
\Macro{addtocentrydefault} with their own \PName{level} passing their
arguments through.%
%
\EndIndex{Cmd}{addsubparagraphtocentry}%
\EndIndex{Cmd}{addsubsubsectiontocentry}%
\EndIndex{Cmd}{addparagraphtocentry}%
\EndIndex{Cmd}{addsubsectiontocentry}%
\EndIndex{Cmd}{addsectiontocentry}%
\EndIndex{Cmd}{addchaptertocentry}%
\EndIndex{Cmd}{addparttocentry}%

\begin{Declaration}
  \Macro{@fontsizefilebase}
\end{Declaration}
\BeginIndex{Cmd}{@fontsizefilebase}%
The prefix \File{scrsize} for file names of font size files, that has been
mentioned\iffree{ in \autoref{sec:maincls-experts.addInfos}}{} at
\autopageref{desc:maincls-experts.option.fontsize} is only the default of the
internal macro \Macro{@fontsizefilebase}\IndexCmd{@fontsizefilebase}. This
default is used only, if the macro hasn't already be defined when loading a
\KOMAScript{} class or package \Package{scrextend}. Authors of wrapper classes
may define this macro with another file name prefix to use completely
different font size files. Also\textnote{Hint!} authors of wrapper classes
could change or deactivate the \emph{fallback} solution for unknown font sizes
by redefinition of macro
\Macro{changefontsizes}\important{\Macro{changefontsizes}}%
\IndexCmd{changefontsize}. This macro has exactly one argument: the wanted
font size.%
%
\EndIndex{Cmd}{@fontsizefilebase}%

\begin{Declaration}
  \Macro{newkomafont}\OParameter{warning message}\Parameter{element}%
                     \Parameter{default}\\
  \Macro{aliaskomafont}\Parameter{alias name}\Parameter{element}
\end{Declaration}
\BeginIndex{Cmd}{newkomafont}%
\BeginIndex{Cmd}{aliaskomafont}%
Experts may use \Macro{newkomafont} to define a \PName{default} for the font
style of an \PName{element}. After this that default may be changed using
commands \Macro{setkomafont} and \Macro{addtokomafont} (see
\autoref{sec:maincls.textmarkup},
\autopageref{desc:maincls.cmd.setkomafont}). Of course this is not enough to
use the defined font style. The expert himself has to prepare his code to use
command
\Macro{usekomafont}\important{\Macro{usekomafont}}\IndexCmd{usekomafont} (see
\autopageref{desc:maincls.cmd.usekomafont}) with that \PName{element} at his
code definitions.

The optional argument \PName{warning message} defines a warning message,
that \KOMAScript{} will show whenever the default font style of that
\PName{element} will be changed. The sender of the warning in such cases will
be the used \KOMAScript{} class or package \Package{scrextend}.

Command \Macro{aliaskomafont} defines an \PName{alias name} to an already
defined \PName{element}. \KOMAScript{} will inform the user automatically
about the real name of the element, whenever an \PName{alias name} will be
used. An\textnote{Hint!} \PName{alias name} may be used, e.\,g., if a
developer finds a better name for an element, that has been defined formerly
with another name, if the old name should still be usable because of
compatibility. Also an \PName{alias name}s may increase usability, because
different users may find different names more or less intuitive. \KOMAScript{}
itself defines a lot of \PName{alias name}s for several \PName{element}s.
%
\EndIndex{Cmd}{aliaskomafont}%
\EndIndex{Cmd}{newkomafont}%

\begin{Declaration}
  \Macro{setparsizes}\Parameter{indent}\Parameter{distance}%^^A
  \Parameter{last line end space}
\end{Declaration}
\BeginIndex{Cmd}{setparsizes}%
With this command \KOMAScript{} provides to set the indent of the first line
of a new paragraph, the distance between paragraphs and the white space that
has to be at the end of the last line of each paragraph. This command should
be used whenever changes should also be recognized by option
\OptionValue{parskip}{relative}. \KOMAScript{}\textnote{Beispiel} itself uses
this command, e.\,g., with
\begin{lstcode}[belowskip=\dp\strutbox plus 1ex]
  \setparsizes{0pt}{0pt}{0pt plus 1fil}
\end{lstcode}
to switch of paragraph indent and distance between paragraphs and to allow any
white space at the end of the last line of paragraphs. This make sense, if a
paragraph consists of a box only, that should be printed without vertical
distance but with the whole column width. If, in opposite to that, the box
should only span the whole width but should be printed with the current
settings of paragraph indent and distance between paragraphs, usage of
\begin{lstcode}[belowskip=\dp\strutbox plus 1ex]
  \setlength{\parfillskip}{0pt plus 1fil}
\end{lstcode}
would be recommended.%
%
\EndIndex{Cmd}{setparsizes}%

\begin{Declaration}
  \Macro{raggedchapterentry}
\end{Declaration}
\BeginIndex{Cmd}{raggedchapterentry}%
This command is not really comparable with commands like
\Macro{raggedsection}. In opposite to those commands, that provide to print
corresponding elements either justified or right- or left-aligned or centered,
\Macro{raggedchapterentry} currently only provides to print chapter entries at
the table of contents justified or left-aligned. Default is justified. For
left-aligned the command has to be redefined to be
\Macro{raggedright}\important{\Macro{raggedright}}\IndexCmd{raggedright}. See
also the limitation note in \autoref{sec:maincls-experts.coexistence},
\autopageref{desc:maincls-experts.cmd.raggedsection} for this.%
%
\EndIndex{Cmd}{raggedchapterentry}

\LoadNonFree{scrbookreportarticle-experts}{3}
\begin{Declaration}
  \Macro{chapterheadstartvskip}\\
  \Macro{chapterheadendvskip}\\
  \Macro{partheadstartvskip}\\
  \Macro{partheadmidvskip}\\
  \Macro{partheadendvskip}\\
  \Macro{partheademptypage}
\end{Declaration}
\BeginIndex{Cmd}{chapterheadstartvskip}%
\BeginIndex{Cmd}{chapterheadendvskip}%
\BeginIndex{Cmd}{partheadstartvskip}%
\BeginIndex{Cmd}{partheadmidvskip}%
\BeginIndex{Cmd}{partheadendvskip}%
\BeginIndex{Cmd}{partheademptypage}%
These\important[i]{\Macro{chapter}\\
  \Macro{part}\\
  \Macro{addchap}\\
  \Macro{addpart}} are used inside of the definition of the headings
\Macro{chapter}\IndexCmd{chapter}, \Macro{part}, \Macro{addchap},
\Macro{addpart} and their star-variations. Thereby
\Macro{chapterheadstartvskip} is designed to be a command, that inserts
vertical distance before the chapter heading. Analogues
\Macro{chapterheadendvskip} is designed to be a command, that inserts vertical
distance after the chapter heading.

Vertical distance above and below part headings will be inserted using the
commands \Macro{partheadstartvskip} and \Macro{partheadendvskip}. A page break
would be interpreted to be part of the vertical distance and therefor is
already part of the default of \Macro{partheadendvskip} in
\Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and
\Class{scrreprt}. Command
\Macro{partheademptypage}\ChangedAt{v3.02}{\Class{scrbook}\and
  \Class{scrreprt}} is used to produce the empty page after the part heading
page of \Class{scrbook} and \Class{scrreprt}.

The \Class{scrbook}\OnlyAt{\Class{scrbook}\and \Class{scrreprt}} and
\Class{scrreprt} default of the six commands are listed in
\autoref{tab:maincls-experts.headvskip} and
\autoref{tab:maincls-experts.headvskip2}. The
\Class{scrartcl}\OnlyAt{\Class{scrartcl}} defaults of the three at this class
defined commands are listed in
\autoref{tab:maincls-experts.headvskip3}. An\textnote{Example!} example, that
redefines \Macro{chapterheadstartvskip} and \Macro{chapterheadendvskip} to
print extra rules above and below the chapter heading, may be found at
\cite{homepage} (in German).%
%
\begin{table}
  \centering
%  \KOMAoptions{captions=topbeside}%
%  \setcapindent{0pt}%
  \caption
%  \begin{captionbeside}
    {%
      defaults of the commands for the vertical distances of chapter headings
      with \Class{scrbook} and \Class{scrreprt}%
    }%
%    [l]
    \begin{tabular}{ll}
      \multicolumn{2}{@{}l}{\bfseries Mit \OptionValue{headings}{big}:}\\
      \toprule
      command & default definition \\
      \midrule
      \Macro{chapterheadstartvskip} &
      \Macro{vspace*}\PParameter{2.3\Macro{baselineskip}} \\
      \Macro{chapterheadendvskip} &
      \Macro{vspace*}\texttt{\{1.725\Macro{baselineskip}} \\ & \quad
      \texttt{plus .115\Macro{baselineskip}} % \\ & \quad
      \texttt{minus .192\Macro{baselineskip}\}} \\
      \bottomrule\\
      \multicolumn{2}{@{}l}{\bfseries Mit \OptionValue{headings}{normal}:}\\
      \toprule
      command & default definition \\
      \midrule
      \Macro{chapterheadstartvskip} &
      \Macro{vspace*}\PParameter{2\Macro{baselineskip}} \\
      \Macro{chapterheadendvskip} &
      \Macro{vspace*}\texttt{\{1.5\Macro{baselineskip}}\\ & \quad
      \texttt{plus .1\Macro{baselineskip}} % \\ & \quad
      \texttt{minus .167\Macro{baselineskip}\}} \\
      \bottomrule\\
      \multicolumn{2}{@{}l}{\bfseries Mit \OptionValue{headings}{small}:}\\
      \toprule
      command & default definition \\
      \midrule
      \Macro{chapterheadstartvskip} &
      \Macro{vspace*}\PParameter{1.8\Macro{baselineskip}} \\
      \Macro{chapterheadendvskip} &
      \Macro{vspace*}\texttt{\{1.35\Macro{baselineskip}}\\ & \quad
      \texttt{plus .09\Macro{baselineskip}} % \\ & \quad
      \texttt{minus .15\Macro{baselineskip}\}} \\
      \bottomrule\\
    \end{tabular}
%  \end{captionbeside}
    \label{tab:maincls-experts.headvskip}%
\end{table}
%
\begin{table}
%  \centering
  \KOMAoptions{captions=topbeside}%
  \setcapindent{0pt}%
%  \caption
  \begin{captionbeside}
    {%
      defaults of the commands for the vertical distances of part headings
      with \Class{scrbook} and \Class{scrreprt}%
    }[l]
  \begin{tabular}[t]{ll}
    \toprule
    command & default definition \\
    \midrule
    \Macro{partheadstartvskip} & \Macro{null}\Macro{vfil} \\
    \Macro{partheadmidvskip} & \Macro{par}\Macro{nobreak}\Macro{vskip} \texttt{20pt}\\
    \Macro{partheadendvskip} & \Macro{vfil}\Macro{newpage} \\
    \Macro{partheademptypage} & \Macro{if@twoside}\Macro{if@openright} \\ &
      \quad\Macro{null}\Macro{thispagestyle}\PParameter{empty}\texttt{\%}\\ &
      \quad\Macro{newpage}\\&
      \Macro{fi}\Macro{fi}\\
    \bottomrule
  \end{tabular}
  \end{captionbeside}
  \label{tab:maincls-experts.headvskip2}%
\end{table}%
%
\begin{table}
%  \centering
  \KOMAoptions{captions=topbeside}%
  \setcapindent{0pt}%
%  \caption
  \begin{captionbeside}
    {%
      defaults of the commands for the vertical distances of part headings
      with \Class{scrartcl}%
    }[l]
    \begin{tabular}[t]{ll}
      \toprule
      command & default definition \\
      \midrule
      \Macro{partheadstartvskip} & \Macro{addvspace}\PParameter{4ex} \\
      \Macro{partheadmidvskip} &  \Macro{par}\Macro{nobreak}\\
      \Macro{partheadendvskip} & \Macro{vskip} \texttt{3ex}\\
      \bottomrule
    \end{tabular}
  \end{captionbeside}
  \label{tab:maincls-experts.headvskip3}%
\end{table}%
%
\EndIndex{Cmd}{partheademptypage}%
\EndIndex{Cmd}{partheadendvskip}%
\EndIndex{Cmd}{partheadmidvskip}%
\EndIndex{Cmd}{partheadstartvskip}%
\EndIndex{Cmd}{chapterheadendvskip}%
\EndIndex{Cmd}{chapterheadstartvskip}%


\begin{Declaration}
  \Macro{appendixmore}
\end{Declaration}%
\BeginIndex{Cmd}{appendixmore}%
There is a peculiarity within the \Macro{appendix} command in the
{\KOMAScript} classes. If the command \Macro{appendixmore} is defined, this
command is executed also by the \Macro{appendix} command. Internally the
{\KOMAScript} classes \Class{scrbook}\OnlyAt{\Class{scrbook}\and
  \Class{scrreprt}} and \Class{scrreprt} take advantage of this behaviour to
implement the options \Option{appendixprefix} (see
\autoref{sec:maincls.structure},
\autopageref{desc:maincls.option.appendixprefix}). You\textnote{Attention!}
should take note of this in case you decide to define or redefine the macro
\Macro{appendixmore}. In case one of this option has been used, you will
receive an error message when using
\verb|\newcommand{\appendixmore}{|\dots\verb|}|. This behaviour is intended to
prevent you from disabling options without noticing it.

\begin{Example}
  You do not want the chapters in the main part of the classes \Class{scrbook}
  or \Class{scrreprt} to be introduced by a prefix line (see layout options
  \Option{chapterprefix} in \autoref{sec:maincls.structure},
  \autopageref{desc:maincls.option.chapterprefix}). For consistency you also
  do not want such a line in the appendix either. Instead, you would like to
  see the word ``Chapter'' in the language of your choice written in front of
  the chapter letter and, simultaneously, in the page headings.  Instead of
  using layout option \Option{appendixprefix}, you would define in the
  document preamble:
%
\begin{lstcode}
  \newcommand*{\appendixmore}{%
    \renewcommand*{\chapterformat}{%
      \appendixname~\thechapter\autodot\enskip}
    \renewcommand*{\chaptermarkformat}{%
      \appendixname~\thechapter\autodot\enskip}
  }
\end{lstcode}
%  
  In case you subsequently change your mind and decide to use the option
  \Option{appendixprefix} at a later stage, you will get an error message
  because of the already defined \Macro{appendixmore} command.  This behaviour
  prevents the definition made above from invisibly changing the settings
  intended with the option.
  
  It is also possible to get a similar behaviour of the appendix for
  the class \Class{scrartcl}. You would write in the preamble of your
  document:
\begin{lstcode}[moretexcs={ifthenelse,equal}]
  \newcommand*{\appendixmore}{%
    \renewcommand*{\othersectionlevelsformat}[3]{%
      \ifthenelse{\equal{##1}{section}}{%
        \appendixname~}{}%
      ##3\autodot\enskip}
    \renewcommand*{\sectionmarkformat}{%
      \appendixname~\thesection\autodot\enskip}}
\end{lstcode}
  In addition, the package \Package{ifthen}\IndexPackage{ifthen} (see
  \cite{package:ifthen}) is required.

  An alternative implementation would be:
\begin{lstcode}
  \newcommand*{\appendixmore}{%
    \renewcommand*{\othersectionlevelsformat}[3]{%
      \ifstr{##1}{section}{\appendixname~}{}%
      ##3\autodot\enskip}
    \renewcommand*{\sectionmarkformat}{%
      \appendixname~\thesection\autodot\enskip}}
\end{lstcode}
  Thereby used command \Macro{ifstr}\IndexCmd[indexmain]{ifstr} is provided by
  \KOMAScript{}. See \autoref{sec:scrbase.if},
  \autopageref{desc:scrbase.cmd.ifstr}.
  
  Redefined commands are explained in more detail in
  \autoref{sec:maincls.structure},
  \autopageref{desc:maincls.cmd.chapterformat} and
  \autopageref{desc:maincls.cmd.chaptermarkformat}.
\end{Example}
%
\EndIndex{Cmd}{appendixmore}%


\begin{Declaration}
  \Macro{newbibstyle}\OParameter{parent style}\Parameter{name}%^^A
  \Parameter{instructions}\\
  \Macro{newblock}\\
  \Macro{@openbib@code}\\
  \Macro{bib@beginhook}\\
  \Macro{bib@endhook}
\end{Declaration}
\BeginIndex{Cmd}{newbibstyle}%
\BeginIndex{Cmd}{newblock}%
\BeginIndex{Cmd}{@openbib@code}%
\BeginIndex{Cmd}{bib@beginhook}%
\BeginIndex{Cmd}{bib@endhook}%
The standard classes\textnote{standard classes} already provide command
\Macro{newblock} for structuring of bibliography entries. The exact purpose of
this command depends on the class options. Using option
\Option{openbib}\important{\Option{openbib}} redefine commands
\Macro{@openbib@code} and \Macro{newblock} at the end of the used standard
class. These classes execute command \Macro{@openbib@code} at the
begin\,---\,or more precise: at the specification of the parameters of
the\,---\,list environment, that will be used for the bibliography. It should
be assumed, that many packages will execute this command in the same kind, if
they redefine the bibliography.

The \KOMAScript{} classes do something similar. Nevertheless, they don't
redefine \Macro{@openbib@code} at the end of the class. Instead of, the
bibliography style \PValue{openstyle} is defined using
\Macro{newbibstyle}. The \PName{instructions}, that has been defined as part
of the implementation, contain the appropriate redefinition of
\Macro{@openbib@code} and \Macro{newblock}. Now, if this bibliography style
will be selected using option \OptionValue{bibliography}{openstyle}%
\IndexOption{bibliography~=\PValue{openstyle}}%
\important{\OptionValue{bibliography}{openstyle}}, then the
\PName{instructions} will be executed immediately. This will redefine
\Macro{@openbib@code} and \Macro{newblock}.

Beside \Macro{@openbib@code} and \Macro{newblock} also \Macro{bib@beginhook}
and \Macro{bib@endhook} may be redefined by the \PName{instructions} of the
style. Command \Macro{bib@beginhook} will be executed immediately after
heading and preamble of the bibliography, but before the begin of the list
with the bibliography entries. Command \Macro{bib@endhook} will be executed
immediately after this list at the end of the bibliography. If
\Macro{BreakBibliography} (see \autoref{sec:maincls.bibliography},
\autopageref{desc:maincls.cmd.BreakBibliography}) intercepts the bibliography,
these commands will also executed at the begin and end of each part of the
bibliography, this would be immediately before and after
\Macro{BreakBibliography}.

The commands \Macro{newblock}, \Macro{@openbib@code}, \Macro{bib@beginhook},
and \Macro{bib@endhook} will be reset to an empty definition at the start of
each new bibliography style. After this the \PName{instructions} of the
\PName{parent style} of the bibliography style will be executed. After this
the \PName{instructions} of the bibliography style itself will be
executed. Because of this these commands has to be defined using
\Macro{renewcommand}\IndexCmd{renewcommand}\important{\Macro{renewcommand}}
not \Macro{newcommand} inside of argument \PName{instructions}.

If the user declares additional \PName{instructions} using
\Macro{AtEndBibliography}%\important[i]{\Macro{AtEndBibliography}\\
%  \Macro{AfterBibliographyPreamble}}% Passt bloeder Weise nicht!
\IndexCmd{AtEndBibliography} and
\Macro{AfterBibliographyPreamble}\IndexCmd{AfterBibliographyPreamble} to be
executed after the preamble or at the end of the bibliography, the
\PName{instructions} of \Macro{AfterBibliographyPreamble} will be executed
only once at the begin of the bibliography but after the \Macro{bib@beginhook}
\PName{instructions}, and the \PName{instructions} of
\Macro{AtEndBibliography} will be executed only once at the end of the
bibliography but before \Macro{bib@endhook}.

Package\textnote{Example!}
\Package{multicol}\IndexPackage{multicol}\important{\Package{multicol}} (see
\cite{package:multicol}) could be used to define a bibliography style for
printing the bibliography with two columns:
% Umbruchkorrektur: listings korrigiert
\begin{lstcode}[belowskip=\dp\strutbox plus 1ex]
  \newbibstyle{twocolumstyle}{%
    \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}%
    \renewcommand*{\bib@endhook}{\end{multicols}}}%
\end{lstcode}
If also an \emph{open}-variation of this style should be defined, one may use
the provided heredity feature and specify a \PName{parent style}:
% Umbruchkorrektur: listings korrigiert
\begin{lstcode}[belowskip=\dp\strutbox plus 1ex]
  \newbibstyle{twocolumopenstyle}[openstyle]{%
    \renewcommand*{\bib@beginhook}{\begin{multicols}{2}}%
    \renewcommand*{\bib@endhook}{\end{multicols}}}%
\end{lstcode}
These new defined styles may be selected using option \Option{bibliography}
as usual.%
%
\EndIndex{Cmd}{bib@endhook}%
\EndIndex{Cmd}{bib@beginhook}%
\EndIndex{Cmd}{@openbib@code}%
\EndIndex{Cmd}{newblock}%
\EndIndex{Cmd}{newbibstyle}%


\section{More or Less Obsolete Options and Commands}
\label{sec:maincls-experts.obsolete}

\LoadNonFree{scrbookreportarticle-experts}{4}

\endinput

%%% Local Variables: 
%%% mode: latex
%%% mode: flyspell
%%% ispell-local-dictionary: "english"
%%% coding: us-ascii
%%% TeX-master: "../guide"
%%% End: