summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-ext/ext-authoryear.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-ext/ext-authoryear.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-ext/ext-authoryear.cbx127
1 files changed, 127 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-ext/ext-authoryear.cbx b/Master/texmf-dist/tex/latex/biblatex-ext/ext-authoryear.cbx
new file mode 100644
index 00000000000..520179ffaa3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-ext/ext-authoryear.cbx
@@ -0,0 +1,127 @@
+\ProvidesFile{ext-authoryear.cbx}
+ [2018/03/18 v0.1 extended biblatex authoryear citation style (MW)]
+
+\blx@inputonce{ext-biblatex-aux.def}{auxiliary code for ext-biblatex}{}{}{}{}
+
+\RequireCitationStyle{authoryear}
+
+\DeclareOuterCiteDelim{parencite}{\bibopenparen}{\bibcloseparen}
+
+\DeclareInnerCiteDelim{textcite}{\bibopenparen}{\bibcloseparen}
+
+\DeclareFieldFormat{extblx@innercitedelim}{%
+ \csuse{mkpairedinner\blx@delimcontext delim}{#1}}
+\DeclareFieldFormat{extblx@innerparencitedelim}{%
+ \csuse{mkpairedinner\blx@delimcontext delim}{#1}}
+\DeclareFieldFormat{extblx@innertextcitedelim}{#1}
+\DeclareFieldFormat{extblx@innerfootcitedelim}{%
+ \csuse{mkpairedinner\blx@delimcontext delim}{#1}}
+
+\DeclareFieldFormat{citelabeldate}{#1}
+\DeclareFieldFormat{parencitelabeldate}{#1}
+\DeclareFieldFormat{textcitelabeldate}{#1}
+\DeclareFieldFormat{footcitelabeldate}{#1}
+
+\renewbibmacro*{cite:labeldate+extradate}{%
+ \iffieldundef{labelyear}
+ {}
+ {\printtext[extblx@inner\blx@delimcontext delim]{%
+ \printtext[bibhyperref]{%
+ \printtext[\blx@delimcontext labeldate]{%
+ \printlabeldateextra}}}}}
+
+\renewbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}%
+ \csuse{extblx@citedelim@textcite@inner@open}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:labeldate+extradate}}
+ {\usebibmacro{cite:shorthand}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}%
+ \csuse{extblx@citedelim@textcite@inner@open}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{citeyear}}}
+
+\renewbibmacro*{textcite:postnote}{%
+ \iffieldundef{postnote}
+ {\ifbool{cbx:parens}
+ {\csuse{extblx@citedelim@textcite@inner@close}}
+ {}}
+ {\ifbool{cbx:parens}
+ {\setunit{\postnotedelim}}
+ {\setunit{\extpostnotedelim
+ \csuse{extblx@citedelim@textcite@inner@open}}}%
+ \printfield{postnote}\csuse{extblx@citedelim@textcite@inner@close}}}
+
+\DeclareCiteCommand{\cite}[\mkoutercitedelim]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\cite}[\mkoutercitedelim]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkouterparencitedelim]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkouterparencitedelim]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkouterparencitedelim\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+
+\DeclareCiteCommand{\textcite}[\mkoutertextcitedelim]
+ {\boolfalse{cbx:parens}}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\csuse{extblx@citedelim@textcite@inner@close}%
+ \global\boolfalse{cbx:parens}}
+ {}}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareMultiCiteCommand{\cites}[\mkoutercitedelim]{\cite}{\multicitedelim}
+\DeclareMultiCiteCommand{\parencites}[\mkouterparencitedelim]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkouterparencitedelim\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+\DeclareMultiCiteCommand{\textcites}[\mkoutertextcitedelim]{\textcite}{}
+
+\DeclareFieldFormat{bbx:introcitelabeldate}{#1}
+\DeclareFieldFormat{extblx@innerbbx:introcitedelim}{%
+ \csuse{mkpairedinner\blx@delimcontext delim}{#1}}
+
+\endinput