summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/blx-compat.def
blob: 1a53e333c8d73ff01434117a6ed697032827891a (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
% $Id: blx-compat.def,v 1.3a 2011/03/18 12:20:20 lehman stable $

\ProvidesFile{blx-compat.def}
[\abx@rcsid $Id: blx-compat.def,v 1.3a 2011/03/18 12:20:20 lehman stable $
 biblatex generic compatibility]

% LaTeX

\AtBeginDocument{%
  \renewrobustcmd*{\bibliography}[1]{%
    \blx@error
      {'\string\bibliography' invalid at this point}
      {'\string\bibliography' must be given in the
       preamble.\MessageBreak I'm ignoring the command}}}

\renewrobustcmd*{\bibliographystyle}[1]{%
  \blx@error
    {'\string\bibliographystyle' invalid}
    {Use the package option 'style' instead.\MessageBreak
     I'm ignoring the command}}

% Standard classes

\DeclareOption{openbib}{\ExecuteBibliographyOptions{block=par}}

% biblatex <0.9b

\DeclareBibliographyOption{defernums}[true]{%
  \ExecuteBibliographyOptions{defernumbers=#1}}

\newcommand*{\lbx@fromlang}{%
  \iffieldundef{origlanguage}
    {\unspace}
    {\bibstring{from\thefield{origlanguage}}}}

% LaTeX, biblatex <0.9a

\providecommand*{\thebibliography}{}
\renewenvironment*{thebibliography}
  {\list{}{%
     \leftmargin\bibhang
     \itemindent-\leftmargin
     \itemsep\bibitemsep
     \parsep\bibparsep}}
  {\endlist}
\newcommand*{\thebibitem}{\item}

\defbibenvironment{bibliography}
  {\thebibliography}
  {\endthebibliography}
  {\thebibitem}

\newenvironment*{theshorthands}
  {\list{\thefield{shorthand}}{%
     \labelwidth\shorthandwidth
     \labelsep\biblabelsep
     \leftmargin\labelwidth
     \advance\leftmargin\labelsep
     \itemsep\bibitemsep
     \parsep\bibparsep
     \def\makelabel##1{##1\hss}}}
  {\endlist}
\newcommand*{\thelositem}{\item}

\defbibenvironment{shorthands}
  {\theshorthands}
  {\endtheshorthands}
  {\thelositem}

% Biblatex <0.8d

\DeclareBibliographyOption{bibtex8}[true]{%
  \ifstrequal{#1}{true}
    {\ExecuteBibliographyOptions{backend=bibtex8}}
    {\ExecuteBibliographyOptions{backend=bibtex}}}

% memoir

\ifdef\ifnobibintoc
  {\newcommand*{\ifmemoirbibintoc}{\notbool{nobibintoc}}}
  {\newcommand{\ifmemoirbibintoc}[2]{#2}}

% KOMA-Script

\newcommand{\ifkomabibtotoc}[2]{#2}
\newcommand{\ifkomabibtotocnumbered}[2]{#2}

\ifdef\ds@bibtotoc
  {% xkeyval breaks inheritance of key=value class options
   \ifdef\XKV@classoptionslist
     {\let\blx@classoptionslist\@classoptionslist
      \let\@classoptionslist\XKV@classoptionslist
      \AtEndOfPackage{\let\@classoptionslist\blx@classoptionslist}}
     {}%
   \DeclareOption{bibtotoc}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@secondoftwo}
   \DeclareOption{bibtotocnumbered}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@firstoftwo}%
   \DeclareOption{bibliography=totoc}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@secondoftwo}
   \DeclareOption{bibliography=nottotoc}{%
     \let\ifkomabibtotoc=\@secondoftwo
     \let\ifkomabibtotocnumbered=\@secondoftwo}
   \DeclareOption{bibliography=totocnumbered}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@firstoftwo}%
   \DeclareOption{bibliography=oldstyle}{%
     \ExecuteBibliographyOptions{block=space}}%
   \DeclareOption{bibliography=openstyle}{%
     \ExecuteBibliographyOptions{block=par}}%
   \DeclareOption{toc=bib}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@secondoftwo}%
   \DeclareOption{toc=bibliography}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@secondoftwo}%
   \DeclareOption{toc=bibnumbered}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@firstoftwo}%
   \DeclareOption{toc=numberedbib}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@firstoftwo}%
   \DeclareOption{toc=bibliographynumbered}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@firstoftwo}%
   \DeclareOption{toc=numberedbibliography}{%
     \let\ifkomabibtotoc=\@firstoftwo
     \let\ifkomabibtotocnumbered=\@firstoftwo}}
  {}

\endinput