summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/scrkernel-bibliography.dtx
blob: 0963bc4d7abaf2ee5dc8becca1f1531785da0a0b (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
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
% \CheckSum{421}
% \iffalse meta-comment
% ======================================================================
% scrkernel-bibliography.dtx
% Copyright (c) Markus Kohm, 2002-2018
%
% 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.
% ----------------------------------------------------------------------
% scrkernel-bibliography.dtx
% Copyright (c) Markus Kohm, 2002-2018
%
% 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.
% ======================================================================
% \fi
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \iffalse
%%% From File: $Id: scrkernel-bibliography.dtx 3016 2018-09-03 11:40:59Z kohm $
%<option>%%%            (run: option)
%<body>%%%            (run: body)
%<*dtx>
% \fi
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
  \filedate$Date: 2018-09-03 13:40:59 +0200 (Mon, 03 Sep 2018) $
  \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
  \filerevision$Revision: 1872 $
  \edef\reserved@a{%
    \noexpand\endgroup
    \noexpand\ProvidesFile{scrkernel-bibliography.dtx}%
                          [\filedate\space\filerevision\space
                           KOMA-Script source
                           (bibliography)]%
  }%
\reserved@a
% \iffalse
\documentclass[parskip=half-]{scrdoc}
\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc}
\CodelineIndex
\RecordChanges
\GetFileInfo{scrkernel-bibliography.dtx}
\title{\KOMAScript{} \partname\ \texttt{\filename}%
  \footnote{Dies ist Version \fileversion\ von Datei
    \texttt{\filename}.}}
\date{\filedate}
\author{Markus Kohm}

\begin{document}
  \maketitle
  \tableofcontents
  \DocInput{\filename}
\end{document}
%</dtx>
% \fi
% \selectlanguage{ngerman}
%
% \changes{v2.95}{2002/06/30}{%
%   erste Version aus der Aufteilung von \texttt{scrclass.dtx}}
%
% \section{Literaturverzeichnis}
%
% Das Literaturverzeichnis unterscheidet sich bei \KOMAScript{} nicht
% wesentlich von den Standardklassen.
%
% Briefe haben kein Literaturverzeichnis.
%
% \StopEventually{\PrintIndex\PrintChanges}
%
% \iffalse
%<*!letter>
% \fi
%
% \iffalse
%<*option>
% \fi
% \subsection{Anweisungen, die für die Optionen benötigt werden}
%
% Einige Anweisungen werden über Optionen verändert. Dazu müssen sie aber
% bereits vor der Abarbeitung der Optionen definiert sein.
%
% \subsubsection{Literaturverzeichnisstile}
%
% \begin{macro}{\newbibstyle}
%   \changes{v2.98c}{2008/02/15}{Neu}^^A
%   \changes{v3.17}{2015/03/12}{interne Speicherung des Werts für Option
%     \texttt{bibliography}}^^A
% Neue Literaturverzeichnisstile müssen mit dieser Anweisung definiert werden,
% wenn sie von der Fehlermeldung korrekt angezeigt werden sollen. Das erste,
% optionale Argument ist der Name eines Elternstils. Das zweite
% Argument ist der Name des Stils. Das dritte Argument ist Code für den
% Stil. Darin sollten normalerweise Umdefinierungen für \cs{@openbib@code},
% \cs{newblock}, \cs{bib@beginhook}, \cs{bib@endhook} enthalten sein. Die
% genannten Makros werden am Anfang des Stils zurückgesetzt. Danach wird der
% Elternstil geladen und dann die eigenen Definitionen.
%    \begin{macrocode}
\newcommand{\newbibstyle}[3][]{%
  \scr@ifundefinedorrelax{scr@bibstyle@#2}{%
    \scr@ifundefinedorrelax{scr@bibstyle@#1}{%
      \ClassError{\KOMAClassName}{%
        parent bibliography style `#1' does not exist}{%
        You've told me to define the new bibliography style `#2'\MessageBreak
        to be a child of bibliography style `#1', but bibliography
        style\MessageBreak
        `#1' does not exist.\MessageBreak
        You have to remove the parent declaration or use an existing parent!
        See the KOMA-Script manual for more information.%
      }%
    }{%
      \@namedef{scr@bibstyle@#2}{%
        \let\@openbib@code\@empty
        \let\newblock\@empty
        \let\bib@beginhook\@empty
        \let\bib@endhook\@empty
%    \end{macrocode}
% \begin{macro}{\scr@current@bibstyle}
%   \changes{v3.17}{2015/03/12}{Neu (intern)}^^A
% Das Makro \cs{scr@current@bibstyle} wird benötigt, um den aktuellen Wert von
% Option \texttt{bibliography} korrigieren zu können. Es wird direkt vom Stil
% definiert, der auch die Korrektur des Optionenwerts durchführt.
%    \begin{macrocode}
        \@ifundefined{scr@current@bibstyle}{}{%
          \ifstr{\scr@current@bibstyle}{}{}{%
            \edef\reserved@a{%
              \noexpand\KOMA@kav@remove{.\KOMAClassFileName}{bibliography}%
                                       {\scr@current@bibstyle}%
            }\reserved@a
          }%
        }%
        \def\scr@current@bibstyle{#2}%
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
        \KOMA@kav@xadd{.\KOMAClassFileName}{bibliography}{#2}%
        \csname scr@bibstyle@#1\endcsname
        #3%
      }%
      \g@addto@macro\scr@bibstylelist{, `#2'}%
    }%
  }{%
    \ClassError{\KOMAClassName}{bibliography style `#2' already exists}{%
      You've told me to define the new bibliography style `#2',\MessageBreak
      but this style already exists.\MessageBreak
      You have to use another bibliography style name.\MessageBreak
      See the KOMA-Script manual for more information.%
    }%
  }%
}
%    \end{macrocode}
% \begin{macro}{\scr@bibstyle@}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}%
%   Nur ein Dummy, wenn kein Elternstil existiert.
%    \begin{macrocode}
\newcommand*{\scr@bibstyle@}{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\bib@beginhook}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}%
% \begin{macro}{\bib@endhook}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}%
% Die beiden Haken, wie sie durch den Literaturverzeichnisstil vorgegeben
% werden.
%    \begin{macrocode}
\newcommand*{\bib@beginhook}{}
\newcommand*{\bib@endhook}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\scr@bibstylelist}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}%
% Liste der mit \cs{newbibstyle} definierten und daher bekannten
% Literaturverzeichnisstile.
% \begin{macro}{\@openbib@code}
%   \changes{v2.3g}{1996/01/14}{Neu (intern)}^^A
%   \changes{v2.98c}{2008/02/15}{wird nun früher definiert}^^A
% Code, der am Anfang des Literaturverzeichnisses ausgeführt wird und
% normalerweise ursprünglich für die \texttt{openbib}-Funktionalität verwendet
% wurde. Inzwischen wird er für die komplette Stilauswahl verwendet.
% \begin{macro}{\newblock}
%   \changes{v2.3g}{1996/01/14}{Grundeinstellung geändert}^^A
%   \changes{v2.98c}{2008/02/15}{wird nun früher definiert}^^A
%    \begin{macrocode}
\newcommand*{\scr@bibstylelist}{\@gobble}
\newcommand*{\@openbib@code}{}
\newcommand*{\newblock}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\scr@bibstyle@openstyle}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}%
% Vordefiniert sind zwei Stile.  Mit dem Bibliographystil \texttt{openstyle}
% kann eine alternative Darstellung der Literatureinträge aktiviert
% werden. Dabei fügt \cs{newblock} keinen horizontalen Abstand mehr ein,
% sondern beginnt einen neuen Absatz (in Form einer neuen Zeile).
% \begin{macro}{\scr@bibstyle@oldstyle}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}^^A
% Der Stil \texttt{oldstyle} entspricht hingegen der Voreinstellung.
%    \begin{macrocode}
\newbibstyle{openstyle}{%
  \renewcommand*{\@openbib@code}{%
    \advance\leftmargin\bibindent
    \itemindent -\bibindent
    \listparindent \itemindent
    \parsep \z@
  }%
  \renewcommand*{\newblock}{\par}%
}
\newbibstyle{oldstyle}{%
  \renewcommand*{\newblock}{\hskip .11em\@plus.33em\@minus.07em}%
}
\scr@bibstyle@oldstyle
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \subsubsection{Überschrift des Literaturverzeichnisses}
%
% \begin{macro}{\bib@heading}
% \changes{v2.3h}{1995/01/21}{neu (intern)}^^A
% \changes{v2.6c}{2000/06/10}{die Präambel wird gesetzt}^^A
% \changes{v2.7b}{2001/01/05}{\cs{setchapterpreamble} wird verwendet}^^A
% \changes{v2.7j}{2001/06/27}{Setzen der Präambel in die
%   \texttt{thebibliography}-Umgebung verschoben}^^A
% \changes{v2.98c}{2008/02/15}{wird nun früher definiert}^^A
% \changes{v3.10}{2011/08/31}{\cs{MakeMarkcase} wird beachtet}^^A
% \changes{v3.12}{2012/02/06}{\cs{ifbib@leveldown} wird beachtet}^^A
% \changes{v3.13b}{2014/10/10}{running head with \texttt{leveldown}^^A
%   fixed}^^A
% \changes{v3.25}{2017/10/13}{use always \cs{@mkright} and \cs{@mkdouble}}^^A
% \changes{v3.25}{2017/10/13}{using \cs{bibliography@heading}}^^A
% \begin{macro}{\bibliography@heading}
% \changes{v3.25}{2017/10/13}{neu (intern)}
% \changes{v3.26}{2018/09/03}{Verwendung von \cs{addsecmark}
%   oder \cs{subsectionmark} statt \cs{@mkright}}^^A
% Befehl zum Setzen der Überschrift des Literaturverzeichnisses.
%    \begin{macrocode}
\newcommand*{\bib@heading}{%
%<article>  \bibliography@heading{\refname}%
%<book|report>  \bibliography@heading{\bibname}%
}
\newcommand*{\bibliography@heading}[1]{%
  \ifbib@leveldown
%<article>    \subsection*{#1}%
%<book|report>    \section*{#1}%
%<book|report>    \addsecmark{#1}%
%<*article>
    \begingroup
      \c@secnumdepth=-\maxdimen
      \subsectionmark{#1}%
    \endgroup
%</article>  
  \else
%<article>    \section*{#1}%
%<book|report>    \chapter*{#1}%
    \@mkdouble{\MakeMarkcase{#1}}%
  \fi
}%
%    \end{macrocode}
% \end{macro}
% \end{macro}%
%
%
% \subsection{Optionen für das Literaturverzeichnis}
%
% \begin{option}{bibliography}
%   \changes{v2.98c}{2008/02/15}{Neu}^^A
%   \changes{v3.10}{2011/08/31}{\cs{MakeMarkcase} wird beachtet}^^A
%   \changes{v3.12}{2013/02/06}{neuer Wert \texttt{leveldown}}^^A
%   \changes{v3.12}{2013/02/06}{neuer Wert \texttt{standardlevel}}^^A
%   \changes{v3.12}{2013/03/05}{an die Änderungen in \textsf{scrbase}^^A
%     angepasst}^^A
%   \changes{v3.12}{2013/09/28}{Verwendung von \cs{addxcontentsline} statt
%     \cs{addcontentsline}}^^A
%   \changes{v3.12}{2013/09/28}{Es werden keine Kapiteleinträge in andere
%     Verzeichnisse geschrieben.}^^A
%   \changes{v3.17}{2015/03/12}{interne Speicherung der Werte}^^A
%   \changes{v3.25}{2017/10/13}{use always \cs{@mkright} and
%     \cs{@mkdouble}}^^A
%   \changes{v3.25}{2017/10/13}{redefines \cs{bibliography@heading} instead of
%     \cs{bib@heading}}^^A
%   Dies ist der Generalschlüssel für alle Optionen, die das
%   Literaturverzeichnis betreffen. Neu ist, dass verschiedene Stile definiert
%   werden können. Desweiteren kann man \texttt{totoc} und
%   \texttt{totocnumbered} wieder mit \texttt{nottotoc} aufgeben.
% \begin{macro}{\ifbib@leveldown}
%   \changes{v3.12}{2013/02/06}{neuer Schalter (intern)}^^A
%   Für den ab Version~3.12 neuen Wert \texttt{leveldown} und dessen
%   Gegenstück \texttt{standardlevel} wird außerdem ein Schalter benötigt.
%    \begin{macrocode}
\newif\ifbib@leveldown
\KOMA@key{bibliography}{%
  \scr@ifundefinedorrelax{scr@bibstyle@#1}{%
    \KOMA@set@ncmdkey{bibliography}{@tempa}{%
      {notoc}{0},{nottotoc}{0},{plainheading}{0},%
      {totoc}{1},{toc}{1},{notnumbered}{1},%
      {numbered}{2},{totocnumbered}{2},{tocnumbered}{2},{numberedtotoc}{2},%
      {numberedtoc}{2},%
      {leveldown}{3},%
      {standardlevel}{4}%
    }{#1}%
    \ifcase \@tempa\relax % notoc
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}%
      \KOMA@kav@add{.\KOMAClassFileName}{toc}{nobibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}%
      \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{notoc}%
      \renewcommand*{\bibliography@heading}[1]{%
        \ifbib@leveldown
%<article>          \subsection*{##1}%
%<book|report>          \section*{##1}%
          \@mkright{\MakeMarkcase{##1}}%
        \else
%<article>          \section*{##1}%
%<book|report>          \chapter*{##1}%
          \@mkdouble{\MakeMarkcase{##1}}%
        \fi
      }%
    \or% totoc
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}%
      \KOMA@kav@add{.\KOMAClassFileName}{toc}{bibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}%
      \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{totoc}%
      \renewcommand*{\bibliography@heading}[1]{%
%<*article>
        \ifbib@leveldown
%    \end{macrocode}
% \changes{v3.23}{2017/02/23}{Verwendung von \cs{ext@toc}}^^A
% \changes{v3.25}{2017/10/13}{Verwendung von \cs{addsubsectiontocentry} statt
%   \cs{addxcontentsline}}^^A
% Ab Version 3.23 wird das von \textsf{tocbasic} bereitgestellte
% \cs{ext@toc} statt dem hart codierten \texttt{toc} verwendet.
%    \begin{macrocode}
          \subsection*{%
                \addsubsectiontocentry{}{##1}%
                ##1%
              }%
          \@mkright{\MakeMarkcase{##1}}%
        \else
          \addsec{##1}%
          \@mkdouble{\MakeMarkcase{##1}}%
        \fi
%</article>
%<*book|report>
        \ifbib@leveldown
          \addsec{##1}%
        \else
          \if@chaptertolists
            \@chaptertolistsfalse\addchap{##1}\@chaptertoliststrue
          \else
            \addchap{##1}%
          \fi
          \@mkdouble{\MakeMarkcase{##1}}%
        \fi
%</book|report>
      }%
    \or% numbered
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{nobibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliography}%
      \KOMA@kav@remove{.\KOMAClassFileName}{toc}{bibliographynumbered}%
      \KOMA@kav@add{.\KOMAClassFileName}{toc}{bibliographynumbered}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{notoc}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{totoc}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{numbered}%
      \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{numbered}%
      \renewcommand*{\bibliography@heading}[1]{%
%<*article>
        \ifbib@leveldown
          \subsection{##1}%
        \else
          \section{##1}%
          \@mkdouble{\MakeMarkcase{\sectionmarkformat ##1}}%
        \fi
%</article>
%<*book|report>
        \ifbib@leveldown
          \section{##1}%
        \else
          \if@chaptertolists
            \@chaptertolistsfalse\chapter{##1}\@chaptertoliststrue
          \else
            \chapter{##1}
          \fi
          \@mkdouble{\MakeMarkcase{\chaptermarkformat ##1}}%
        \fi
%</book|report>
      }
    \or% leveldown
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{leveldown}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{standardlevel}%
      \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{leveldown}%
      \bib@leveldowntrue
    \or% standardlevel
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{leveldown}%
      \KOMA@kav@remove{.\KOMAClassFileName}{bibliography}{standardlevel}%
      \KOMA@kav@add{.\KOMAClassFileName}{bibliography}{standardlevel}%
      \bib@leveldownfalse
    \fi
  }{%
    \FamilyKeyStateProcessed
    \edef\reserved@a{%
      \noexpand\KOMA@kav@remove{.\KOMAClassFileName}{bibliography}%
                               {\scr@current@bibstyle}%
    }\reserved@a
    \csname scr@bibstyle@#1\endcsname
  }%
}
%    \end{macrocode}
% \end{macro}
% \end{option}
%
% \begin{option}{openbib}
%   \changes{v2.3g}{1996/01/14}{\cs{if@openbib} (\cs{@openbibtrue},
%     \cs{@openbibfalse}) entfernt}
%   \changes{v2.3g}{1996/01/14}{Definition der openbib Option neu
%     implementiert}^^A
%   \changes{v2.98c}{2008/02/15}{obsolete}^^A
%   \changes{v3.01a}{2008/11/21}{standard statt obsolet}^^A
% Mit dieser Option kann eine alternative Darstellung der
% Literatureinträge aktiviert werden. Dabei fügt \cs{newblock} keinen
% horizontalen Abstand mehr ein, sondern beginnt einen neuen Absatz
% (in Form einer neuen Zeile).
%    \begin{macrocode}
\KOMA@DeclareStandardOption{openbib}{bibliography=openstyle}
%    \end{macrocode}
% \end{option}
%
% \begin{option}{bibtotoc}
%   \changes{v2.3h}{1995/01/21}{neue Option}^^A
%   \changes{v2.6b}{2000/05/26}{\cs{@mkboth} eingefügt}
%   \changes{v2.6c}{2000/06/10}{\cs{bibpreamble} eingefügt}
%   \changes{v2.7}{2001/01/03}{Klammerung korrigiert}^^A
%   \changes{v2.7j}{2001/06/27}{Setzen der Präambel in die
%     thebibliography-Umgebung verschoben}^^A
%   \changes{v2.98c}{2008/02/15}{obsolete}^^A
%   \changes{v3.01a}{2008/11/20}{deprecated}^^A
% \begin{option}{bibtotocnumbered}
%   \changes{v2.3h}{1995/01/21}{neue Option}^^A
%   \changes{v2.6b}{2000/05/26}{\cs{@mkboth} eingefügt}
%   \changes{v2.6c}{2000/06/10}{\cs{bibpreamble} eingefügt}
%   \changes{v2.7}{2001/01/03}{Klammerung korrigiert}^^A
%   \changes{v2.7b}{2001/01/05}{\cs{setchapterpreamble} wird
%     verwendet}
%   \changes{v2.7i}{2001/05/17}{\cs{chapter} statt \cs{addchap}}
%   \changes{v2.7j}{2001/06/27}{Setzen der Präambel in die
%     thebibliography-Umgebung verschoben}^^A
%   \changes{v2.9p}{2003/07/07}{Nummerierung im Kolumnentitel}^^A
%   \changes{v2.98c}{2008/02/15}{obsolete}^^A
%   \changes{v3.01a}{2008/11/20}{deprecated}^^A
% Die Option \texttt{bibtotoc} sorgt dafür, dass das
% Literaturverzeichnis im Inhaltsverzeichnis aufgeführt wird.
% Demgegenüber erweitert die Option \texttt{bibtotocnumbered} zu einem
% normalen Kapitel einschließlich Nummerierung.
%    \begin{macrocode}
\KOMA@DeclareDeprecatedOption{bibtotoc}{bibliography=totoc}
\KOMA@DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered}
%    \end{macrocode}
% \end{option}
% \end{option}
%
%
% \iffalse
%</option>
%<*body>
% \fi
%
%
% \subsection{Standardbezeichner}
%
% \begin{macro}{\refname}
% \begin{macro}{\bibname}
% Je nach Klasse wird \cs{refname} oder \cs{bibname} verwendet.
%    \begin{macrocode}
%<article>\newcommand*\refname{References}
%<book|report>\newcommand*\bibname{Bibliography}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \subsection{Definitionen für das Literaturverzeichnis}
%
% \begin{macro}{\setbibpreamble}
%   \changes{v2.6c}{2000/06/10}{neu}^^A
%   \changes{v2.7j}{2001/05/27}{\cs{renewcommand} durch \cs{def}
%     ersetzt zur Erhöhung der \textsf{natbib}-Kompatibilität}
% \begin{macro}{\bibpreamble}
%   \changes{v2.6c}{2000/06/10}{neue (intern)}^^A
%   \changes{v2.6d}{2000/07/20}{Makro funktioniert nachdem \cs{let}^^A
%     durch \cs{newcommand*} ersetzt wurde}
%   \changes{v2.8q}{2002/01/10}{wieder \cs{let}}
%  \cs{bibpreamble} kann vom Benutzer mit \cs{setbibpreamble} auf
%  einen Text gesetzt werden, der nach der Überschrift eingefügt
%  wird. Dasselbe Makro wird von \textsf{natbib} als \cs{relax}
%  definiert; aus Kompatibilitätsgründen wird hier vergleichbar
%  verfahren und \cs{let} bzw. \cs{def} statt \cs{renewcommand}
%  verwendet.
%   \changes{v2.7j}{2001/05/27}{Setzen der Präambel in die
%     \texttt{thebibliography}-Umgebung verschoben}
%  Außerdem wird ab Version 2.7j die Präambel nicht mehr in
%  \cs{bib@heading} gesetzt, sondern in der
%  \texttt{thebibliography}-Umgebung. Dies dient ebenfalls der
%  Kompatibilität mit natbib. Trotz aller Kompatibilität ist
%  \cs{bibpreamble} als internes Makro zu betrachten.
%    \begin{macrocode}
\newcommand*{\bibpreamble}{\relax}
\let\bibpreamble\relax
\newcommand{\setbibpreamble}[1]{\def\bibpreamble{#1}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{Length}{bibindent}
% Der Einzug der Einträge bei \texttt{openbib}. Voreingestellt sind
% 1,5\,em.
%    \begin{macrocode}
\newdimen\bibindent
\bibindent=1.5em
%    \end{macrocode}
% \end{Length}
%
% \begin{environment}{thebibliography}
%   \changes{v2.2a}{1995/02/01}{in \textsf{scrartcl} \cs{bibname}
%     vollständig durch \cs{refname} ersetzt}
%   \changes{v2.3h}{1995/01/21}{Verwendung von \cs{bib@heading}}
%   \changes{v2.8q}{2002/01/10}{Erkennung und gesonderte Behandlung
%     leerer Präambeln}^^A
%   \changes{v2.9o}{2003/03/06}{Vergleich \cs{bibpreamble} mit \cs{@empty}
%     korrigiert}
%   \changes{v2.98c}{2008/02/15}{Neue Haken \cs{bib@before@hook} und
%     \cs{bib@after@hook} eingefügt}
% Nun werden noch die Umgebung für das Literaturverzeichnis und der
% Befehl für die einzelnen Einträge definiert.
%    \begin{macrocode}
\newenvironment{thebibliography}[1]{%
  \if@bib@break@
    \bib@beginhook
  \else
%<*book|report>
    \ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else
        \setchapterpreamble{\bibpreamble}%
    \fi\fi
%</book|report>
    \bib@heading
%<*article>
    \ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else
        \noindent\bibpreamble\par\nobreak
    \fi\fi
%</article>
    \bib@beginhook
    \bib@before@hook
  \fi
%    \end{macrocode}
% \begin{macro}{\BreakBibliography}
%   \changes{v2.98c}{2008/02/15}{Neu}^^A
% An dieser Stelle wird \cs{BreakBibliography} passend umdefiniert.
%    \begin{macrocode}
  \renewcommand{\BreakBibliography}[1]{%
    \@bib@break
    \end{thebibliography}%
    \begingroup ##1\endgroup
    \begin{thebibliography}{#1}
  }%
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
% Hier geht es jetzt mit \texttt{thebibliography} weiter.
  \list{%
    \@biblabel{\@arabic\c@enumiv}%
  }{%
    \settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \@openbib@code
    \if@bib@break@
      \edef\@tempa{%
        \noexpand\usecounter{enumiv}%
        \noexpand\setcounter{enumiv}{\the\c@enumiv}%
      }\@tempa
      \no@bib@break
    \else
      \usecounter{enumiv}%
    \fi
    \let\p@enumiv\@empty
    \renewcommand*\theenumiv{\@arabic\c@enumiv}%
  }%
  \sloppy\clubpenalty4000 \widowpenalty4000
  \sfcode`\.=\@m
}{%
  \if@bib@break@
    \def\@noitemerr{%
      \@latex@warning{%
        \string\BreakBibliography\space at begin of `thebibliography'
        environment\MessageBreak
        or following \string\BreakBibliography}%
    }%
  \else
    \def\@noitemerr{%
      \@latex@warning{%
        Empty `thebibliography' environment or
        \string\BreakBibliography\MessageBreak
        before end of `thebibliography' environment}%
    }%
  \fi
  \endlist
  \if@bib@break@
  \else
    \bib@after@hook
    \let\bib@before@hook\@empty
    \let\bib@after@hook\@empty
  \fi
  \bib@endhook
}
%    \end{macrocode}
% \begin{macro}{\if@bib@break@}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}^^A
% \begin{macro}{\no@bib@break}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}^^A
% \begin{macro}{\@bib@break}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}^^A
% Dieser Hilfsschalter arbeitet immer global!
%    \begin{macrocode}
\newif\if@bib@break@
\newcommand{\no@bib@break}{\global\let\if@bib@break@\iffalse}
\newcommand*{\@bib@break}{\global\let\if@bib@break@\iftrue}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\bib@before@hook}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}^^A
% \begin{macro}{\bib@after@hook}
%   \changes{v2.98c}{2008/02/15}{Neu (intern)}^^A
%    \begin{macrocode}
\newcommand*{\bib@before@hook}{}
\newcommand*{\bib@after@hook}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{environment}
%
% \begin{macro}{\BreakBibliography}
%   \changes{v2.98c}{2008/02/15}{Neu}^^A
% Diese Anweisung unterbricht normalerweise das Literaturverzeichnis für ein
% paar eigene Anweisungen (z. B. Unterüberschriften). Wenn jedoch nicht das
% \KOMAScript-Literaturverzeichnis verwendet wird, dann gibt es eine Warnung
% aus.
%    \begin{macrocode}
\newcommand{\BreakBibliography}[1]{%
  \ClassWarning{\KOMAClassName}{%
    You've used \string\BreakBibliography\space either outside of\MessageBreak
    the bibliography or `thebibliography' was redefined\MessageBreak
    incompatible, e.g., using a bibliography package.\MessageBreak
    \string\BreakBibliography\space ignored%
  }%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AfterBibliographyPreamble}
%   \changes{v2.98c}{2008/02/15}{Neu}^^A
% \begin{macro}{\AtEndBibliography}
%   \changes{v2.98c}{2008/02/15}{Neu}^^A
% Zwei neue Anweisungen, um am Anfang des Literaturverzeichnisses, nach
% Überschrift und Präambel, und am Ende des Literaturverzeichnisses, nach
% Abschluss der Liste, Code einschleusen zu können. Das funktioniert natürlich
% nur so lange, wie keine Paket verwendet wird, das die Umgebung umdefiniert.
%    \begin{macrocode}
\newcommand{\AfterBibliographyPreamble}{\g@addto@macro\bib@before@hook}
\newcommand{\AtEndBibliography}{\g@addto@macro\bib@after@hook}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \iffalse
%</body>
% \fi
%
% \iffalse
%</!letter>
% \fi
%
% \Finale
%
\endinput
%
% end of file `scrkernel-bibliography.dtx'
%%% Local Variables:
%%% mode: doctex
%%% TeX-master: t
%%% End: