blob: c99c44e3f3826d626ffc41c4d4e26439a872c951 (
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
|
\ProvidesFile{ext-biblatex-aux.def}
[2019/01/04 v0.6a auxiliaries for extended biblatex citation style (MW)]
\def\extblx@requiredbiblatexversion{3.12}
\def\extblx@requiredbiblatexdate{2018/11/02}
\newrobustcmd*{\extblx@info}[1]{\PackageInfo{biblatex-ext}{#1}}
\newrobustcmd*{\extblx@warning}[1]{\PackageWarning{biblatex-ext}{#1}}
\newrobustcmd*{\extblx@warning@noline}[1]{\PackageWarningNoLine{biblatex-ext}{#1}}
\newrobustcmd*{\extblx@error}[2]{\PackageError{biblatex-ext}{#1}{#2.}}
\@ifpackagelater{biblatex}{\extblx@requiredbiblatexdate}
{}
{\extblx@warning@noline{%
Outdated version of biblatex detected.\MessageBreak
Upgrade to biblatex \extblx@requiredbiblatexversion\space
(\extblx@requiredbiblatexdate) or later.\MessageBreak
I found '\csuse{abx@version} (\csuse{abx@date})'}}
\newrobustcmd*{\extblx@DeclareBTEOption}[2][boolean]{%
\@ifnextchar[%]
{\extblx@DeclareBTEOption@i[#1]{#2}}
{\extblx@DeclareBTEOption@i[#1]{#2}[]}}
\def\extblx@DeclareBTEOption@i[#1]#2[#3]#4{%
\DeclareBibliographyOption[#1]{#2}[#3]{#4}%
\DeclareTypeOption[#1]{#2}[#3]{#4}
\DeclareEntryOption[#1]{#2}[#3]{#4}}
%{<context>}{<opening delim>}{<closing delim>}
\newrobustcmd*{\DeclareOuterCiteDelims}{%
\extblx@declareciteddelims{outer}}
\newrobustcmd*{\DeclareInnerCiteDelims}{%
\extblx@declareciteddelims{inner}}
%{<inner/outer>}{<cite context>}{<opening delim>}{<closing delim>}
\def\extblx@declareciteddelims#1#2#3#4{%
\csdef{extblx@citedelim@#2@#1@open}{#3}%
\csdef{extblx@citedelim@#2@#1@close}{#4}}
%{<context>}
\newrobustcmd*{\UndeclareOuterCiteDelims}{%
\extblx@undeclareciteddelims{outer}}
\newrobustcmd*{\UndeclareInnerCiteDelims}{%
\extblx@undeclareciteddelims{inner}}
%{<inner/outer>}{<cite context>}
\def\extblx@undeclareciteddelims#1#2{%
\csundef{extblx@citedelim@#2@#1@open}%
\csundef{extblx@citedelim@#2@#1@close}}
%{<alias>}{<cite context>}
\newrobustcmd*{\DeclareOuterCiteDelimsAlias}{%
\@ifstar
{\extblx@declareciteddelims@alias@i{outer}}
{\extblx@declareciteddelims@alias{outer}}}
\newrobustcmd*{\DeclareInnerCiteDelimsAlias}{%
\@ifstar
{\extblx@declareciteddelims@alias@i{inner}}
{\extblx@declareciteddelims@alias{inner}}}
%{<inner/outer>}{<alias>}{<cite context>}
\def\extblx@declareciteddelims@alias#1#2#3{%
\csdef{extblx@citedelim@#2@#1@open}{\csuse{extblx@citedelim@#3@#1@open}}%
\csdef{extblx@citedelim@#2@#1@close}{\csuse{extblx@citedelim@#3@#1@close}}}
\def\extblx@declareciteddelims@alias@i#1#2#3{%
\csletcs{extblx@citedelim@#2@#1@open}{extblx@citedelim@#3@#1@open}%
\csletcs{extblx@citedelim@#2@#1@close}{extblx@citedelim@#3@#1@close}}
% declare \mk...delim commands
\newrobustcmd*{\RegisterCiteDelims}[2]{%
\ifcsundef{mk#1#2delims}
{}
{\extblx@error
{Command \expandafter\string\csname mk#1#2delims\endcsname\space
already defined}
{biblatex-ext needs to define this command for the citation delimiter
feature,\MessageBreak
but \expandafter\string\csname mk#1#2delims\endcsname\space
is already defined.\MessageBreak
I don't want to overwrite the existing definition to avoid breaking
your document.\MessageBreak
If you force compilation despite the error, the command will be
overwritten\MessageBreak
with potentially catastrophic consequences}}%
\protected\csdef{mk#1#2delims}##1{%
\begingroup
\blx@blxinit
\blx@setsfcodes
\csuse{extblx@citedelim@#2@#1@open}%
##1%
\csuse{extblx@citedelim@#2@#1@close}%
\endgroup}}
\RegisterCiteDelims{outer}{cite}
\RegisterCiteDelims{outer}{parencite}
\RegisterCiteDelims{outer}{textcite}
\RegisterCiteDelims{outer}{footcite}
\RegisterCiteDelims{outer}{footcitetext}
\DeclareOuterCiteDelimsAlias{footcite}{footcitetext}
\RegisterCiteDelims{inner}{cite}
\RegisterCiteDelims{inner}{parencite}
\RegisterCiteDelims{inner}{textcite}
\RegisterCiteDelims{inner}{footcite}
\RegisterCiteDelims{inner}{footcitetext}
\DeclareInnerCiteDelimsAlias{footcite}{footcitetext}
\newrobustcmd*{\mkextblxfootcite}[1]{%
\mkbibfootnote{%
\mkouterfootcitedelims{#1}}}
\newrobustcmd*{\mkextblxfootcitetext}[1]{%
\mkbibfootnotetext{%
\mkouterfootcitetextdelims{#1}}}
% smartcite is special
% According to the docs it is like \parencite in a footnote and \footcite in
% the body.
% To mirror that as closely as possible, we need to change the delimiter
% context. The delimcontext is set in the pre-code, it is too late to detect
% a footnote at that point (since we will have started the footnote ourselves
% with \mkbibfootnote from the body), so we need to do it earlier.
\newrobustcmd*{\mksmartcite}[1]{%
\iffootnote
{\mkouterparencitedelims{%
\def\extblx@thisdelimcontext{parencite}%
#1}}
{\mkextblxfootcite{%
\def\extblx@thisdelimcontext{footcite}%
#1}}}
% Legacy names
% compability for versions < 0.3
\def\extblx@deprecate@delimcommand@robust#1#2{%
\protected\csedef{#1}{%
\noexpand\extblx@warning{%
\expandafter\string\csname#1\endcsname\space is deprecated.
\MessageBreak
Use \expandafter\string\csname#2\endcsname\space (with s) instead.
\MessageBreak
Using \expandafter\string\csname#2\endcsname}%
\expandonce{\csname#2\endcsname}}}
\extblx@deprecate@delimcommand@robust{DeclareOuterCiteDelim}
{DeclareOuterCiteDelims}
\extblx@deprecate@delimcommand@robust{DeclareInnerCiteDelim}
{DeclareInnerCiteDelims}
\extblx@deprecate@delimcommand@robust{UndeclareOuterCiteDelim}
{UndeclareOuterCiteDelims}
\extblx@deprecate@delimcommand@robust{UndeclareInnerCiteDelim}
{UndeclareInnerCiteDelims}
\extblx@deprecate@delimcommand@robust{DeclareOuterCiteDelimAlias}
{DeclareOuterCiteDelimsAlias}
\extblx@deprecate@delimcommand@robust{DeclareInnerCiteDelimAlias}
{DeclareInnerCiteDelimsAlias}
\newrobustcmd*{\extblx@create@mkcitedelim}{%
\extblx@warning{%
\string\extblx@create@mkcitedelim\space is deprecated.\MessageBreak
Use \string\RegisterCiteDelims\space instead.\MessageBreak
Using \string\RegisterCiteDelims\MessageBreak}
\RegisterCiteDelims}
% Some very rudimentary backwards warning code for old names
% this only warns, it can't salvage anything
\AtEndDocument{%
\ifcsundef{abx@ffd@*@bbx:introcite}
{}
{\extblx@warning@noline{%
Field format 'bbx:introcite' defined.\MessageBreak
The format has been renamed to 'bbx@introcite'.\MessageBreak
This could mean that you are using the old name\MessageBreak
which does not work any more.\MessageBreak
No effort is made to switch to the new name.\MessageBreak
Please use 'bbx@introcite' instead}}%
\ifcsundef{abx@ffd@*@bbx:introcitelabeldate}
{}
{\extblx@warning@noline{%
Field format 'bbx:introcitelabeldate'\MessageBreak
defined.\MessageBreak
The format has been renamed to\MessageBreak
'bbx@introcitelabeldate'.\MessageBreak
This could mean that you are using the old name\MessageBreak
which does not work any more.\MessageBreak
No effort is made to switch to the new name.\MessageBreak
Please use\MessageBreak'bbx@introcitelabeldate'\MessageBreak instead}}%
\ifcsundef{blx@delimcontextalias@bbx:introcite}
{}
{\extblx@warning@noline{%
Delimiter context 'bbx:introcite' detected.\MessageBreak
The context has been renamed to 'bbx@introcite'.\MessageBreak
This could mean that you are using the old name\MessageBreak
which does not work any more.\MessageBreak
No effort is made to switch to the new name.\MessageBreak
Please use 'bbx@introcite' instead}}%
\ifcsundef{extblx@citedelim@bbx:introcite@inner@open}
{}
{\extblx@warning@noline{%
Opening inner delimiter 'bbx:introcite' found.\MessageBreak
The delimiters have been renamed to\MessageBreak
'bbx@introcite'.\MessageBreak
This could mean that you are using the old name\MessageBreak
which does not work any more.\MessageBreak
No effort is made to switch to the new name.\MessageBreak
Please use 'bbx@introcite' instead}}%
\ifcsundef{extblx@citedelim@bbx:introcite@inner@close}
{}
{\extblx@warning@noline{%
Closing inner delimiter 'bbx:introcite' found.\MessageBreak
The delimiters have been renamed to\MessageBreak
'bbx@introcite'.\MessageBreak
This could mean that you are using the old name\MessageBreak
which does not work any more.\MessageBreak
No effort is made to switch to the new name.\MessageBreak
Please use 'bbx@introcite' instead}}%
}
\endinput
%
% This file is part of the biblatex-ext bundle.
% biblatex-ext is released under the LaTeX Project Public License v1.3c
% or later.
%
% A complete list of files included in that package can be found in README.md
% or - failing that - in ext-standard.bbx.
%
% Official releases of this package are on CTAN
% https://www.ctan.org/pkg/biblatex-ext
% development takes place on GitHub
% https://github.com/moewew/biblatex-ext
%
|