blob: 97f51add42c3a7b2aa47f21ae3b12788639fed1a (
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
|
\ProvidesFile{ext-biblatex-aux.def}
[2018/03/20 v0.1a auxiliaries for extended biblatex citation style (MW)]
\def\extblx@requiredbiblatexversion{3.11}
\def\extblx@requiredbiblatexdate{2018/02/20}
\@ifpackagelater{biblatex}{\extblx@requiredbiblatexdate}
{}
{\PackageWarningNoLine{extbiblatex}
{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})'}}
%{<context>}{<opening delim>}{<closing delim>}
\newcommand*{\DeclareOuterCiteDelim}{%
\extblx@declareciteddelim{outer}}
\newrobustcmd*{\DeclareInnerCiteDelim}{%
\extblx@declareciteddelim{inner}}
%{<inner/outer>}{<cite context>}{<opening delim>}{<closing delim>}
\def\extblx@declareciteddelim#1#2#3#4{%
\csdef{extblx@citedelim@#2@#1@open}{#3}%
\csdef{extblx@citedelim@#2@#1@close}{#4}}
%{<context>}
\newcommand*{\UndeclareOuterCiteDelim}{%
\extblx@undeclareciteddelim{outer}}
\newrobustcmd*{\UndeclareInnerCiteDelim}{%
\extblx@undeclareciteddelim{inner}}
%{<inner/outer>}{<cite context>}
\def\extblx@undeclareciteddelim#1#2{%
\csundef{extblx@citedelim@#2@#1@open}%
\csundef{extblx@citedelim@#2@#1@close}}
%{<alias>}{<cite context>}
\newcommand*{\DeclareOuterCiteDelimAlias}{%
\@ifstar
{\extblx@declareciteddelim@alias@i{outer}}
{\extblx@declareciteddelim@alias{outer}}}
\newcommand*{\DeclareInnerCiteDelimAlias}{%
\@ifstar
{\extblx@declareciteddelim@alias@i{inner}}
{\extblx@declareciteddelim@alias{inner}}}
%{<inner/outer>}{<alias>}{<cite context>}
\def\extblx@declareciteddelim@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@declareciteddelim@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*{\extblx@create@mkcitedelim}[2]{%
\protected\csdef{mk#1#2delim}##1{%
\begingroup
\blx@blxinit
\blx@setsfcodes
\csuse{extblx@citedelim@#2@#1@open}%
##1%
\csuse{extblx@citedelim@#2@#1@close}%
\endgroup}}
\extblx@create@mkcitedelim{outer}{cite}
\extblx@create@mkcitedelim{outer}{parencite}
\extblx@create@mkcitedelim{outer}{textcite}
\extblx@create@mkcitedelim{outer}{bibinxrefcite}
\extblx@create@mkcitedelim{inner}{cite}
\extblx@create@mkcitedelim{inner}{parencite}
\extblx@create@mkcitedelim{inner}{textcite}
\extblx@create@mkcitedelim{inner}{footcite}
% 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
{\mkouterparencitedelim{%
\def\extblx@thisdelimcontext{parencite}%
#1}}
{\mkbibfootnote{%
\def\extblx@thisdelimcontext{footcite}%
#1}}}
\endinput
|