summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex/latex/cbx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/biblatex/latex/cbx')
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/alphabetic-verb.cbx88
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/alphabetic.cbx145
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle-comp.cbx195
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle-ibid.cbx143
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle-icomp.cbx224
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle-tcomp.cbx90
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle-terse.cbx40
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle-ticomp.cbx100
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authortitle.cbx115
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authoryear-comp.cbx267
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authoryear-ibid.cbx173
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authoryear-icomp.cbx296
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/authoryear.cbx141
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/debug.cbx93
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/draft.cbx73
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/numeric-comp.cbx233
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/numeric-verb.cbx100
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/numeric.cbx156
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/reading.cbx6
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose-ibid.cbx262
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose-inote.cbx321
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose-note.cbx292
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose-trad1.cbx294
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose-trad2.cbx288
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose-trad3.cbx261
-rw-r--r--macros/latex/contrib/biblatex/latex/cbx/verbose.cbx231
26 files changed, 4627 insertions, 0 deletions
diff --git a/macros/latex/contrib/biblatex/latex/cbx/alphabetic-verb.cbx b/macros/latex/contrib/biblatex/latex/cbx/alphabetic-verb.cbx
new file mode 100644
index 0000000000..efcc901a71
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/alphabetic-verb.cbx
@@ -0,0 +1,88 @@
+\ProvidesFile{alphabetic-verb.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labelalpha,autocite=inline}
+
+\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
+
+\providebool{bbx:subentry}
+
+\DeclareFieldFormat{entrysetcount}{\mkbibparens{\mknumalph{#1}}}
+
+\newbibmacro*{cite}{%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelalpha}%
+ \printfield{extraalpha}%
+ \ifbool{bbx:subentry}
+ {\printfield{entrysetcount}}
+ {}}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \printdelim{namelabeldelim}\bibopenbracket
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite}}
+
+\DeclareCiteCommand{\cite}
+ {\bibopenbracket
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \ifnumgreater{\value{citecount}}{1}
+ {\bibopenbracket}
+ {}%
+ \usebibmacro{cite}}
+ {\bibclosebracket\multicitedelim}
+ {\usebibmacro{postnote}%
+ \bibclosebracket}
+
+\DeclareCiteCommand{\parencite}[\mkbibbrackets]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\bibclosebracket}
+ {\usebibmacro{postnote}%
+ \bibclosebracket}
+
+\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+\DeclareMultiCiteCommand{\textcites}{\textcite}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/alphabetic.cbx b/macros/latex/contrib/biblatex/latex/cbx/alphabetic.cbx
new file mode 100644
index 0000000000..e6f4d7d425
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/alphabetic.cbx
@@ -0,0 +1,145 @@
+\ProvidesFile{alphabetic.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labelalpha,autocite=inline}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\providebool{bbx:subentry}
+\newbool{cbx:parens}
+
+\DeclareFieldFormat{entrysetcount}{\mkbibparens{\mknumalph{#1}}}
+
+\newbibmacro*{cite}{%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelalpha}%
+ \printfield{extraalpha}%
+ \ifbool{bbx:subentry}
+ {\printfield{entrysetcount}}
+ {}}}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\multicitedelim}}
+ {\ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{namelabeldelim}\bibopenbracket}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{textcite:init}{%
+ \ifnumless{\value{multicitecount}}{2}
+ {\global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash}
+ {\global\undef\cbx@lasthash}}
+
+\newbibmacro*{textcite:postnote}{%
+ \usebibmacro{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\DeclareCiteCommand{\cite}[\mkbibbrackets]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibbrackets]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{textcite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}[\mkbibbrackets]{\cite}{\multicitedelim}
+\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle-comp.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle-comp.cbx
new file mode 100644
index 0000000000..f27955b113
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle-comp.cbx
@@ -0,0 +1,195 @@
+\ProvidesFile{authortitle-comp.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{uniquename,uniquelist,sortcites,autocite=footnote}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnameundef{labelname}
+ {\ifnumequal{\value{textcitecount}}{\value{textcitetotal}}}
+ {\ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}}
+
+\newbool{cbx:parens}
+
+\newbibmacro*{cite:init}{%
+ \ifnumless{\value{multicitecount}}{2}
+ {\global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash}
+ {\iffieldundef{prenote}
+ {}
+ {\global\undef\cbx@lasthash}}}
+
+\newbibmacro*{cite:reinit}{%
+ \global\undef\cbx@lasthash}
+
+\newbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}}
+ {\printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \usebibmacro{cite:title}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{citetitle}{%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}
+ {\usebibmacro{cite:shorthand}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}}
+ {\printnames{labelname}%
+ \setunit*{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{cite:title}{%
+ \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{textcite:postnote}{%
+ \ifnameundef{labelname}
+ {\setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{extpostnotedelim}\bibopenparen}}
+ {\setunit{\printdelim{postnotedelim}}}%
+ \printfield{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{cite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{cite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\parencites}[\mkbibparens]
+ {\parencite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]
+ {\footcite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]
+ {\footcitetext}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\smartcite}{\setunit{\multicitedelim}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle-ibid.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle-ibid.cbx
new file mode 100644
index 0000000000..4ccfc33cab
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle-ibid.cbx
@@ -0,0 +1,143 @@
+\ProvidesFile{authortitle-ibid.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{uniquename,uniquelist,ibidtracker=constrict,
+ pagetracker,autocite=footnote}
+
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
+
+\newbool{cbx:parens}
+\newbool{cbx:loccit}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+\newbibmacro*{cite}{%
+ \global\boolfalse{cbx:loccit}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{citetitle}{%
+ \global\boolfalse{cbx:loccit}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{textcite}{%
+ \global\boolfalse{cbx:loccit}%
+ \printnames{labelname}%
+ \setunit*{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{cite:title}{%
+ \printtext[bibhyperref]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\booltrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\newbibmacro*{textcite:postnote}{%
+ \ifthenelse{\iffieldundef{postnote}\OR\boolean{cbx:loccit}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen}
+ {}}
+ {\ifbool{cbx:parens}
+ {\printdelim{postnotedelim}}
+ {\printdelim{extpostnotedelim}\bibopenparen}%
+ \printfield{postnote}\bibcloseparen}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {\boolfalse{cbx:parens}}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen\boolfalse{cbx:parens}}
+ {}}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareMultiCiteCommand{\textcites}{\textcite}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle-icomp.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle-icomp.cbx
new file mode 100644
index 0000000000..8109110103
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle-icomp.cbx
@@ -0,0 +1,224 @@
+\ProvidesFile{authortitle-icomp.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{uniquename,uniquelist,ibidtracker=constrict,
+ pagetracker,sortcites,autocite=footnote}
+
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnameundef{labelname}
+ {\ifnumequal{\value{textcitecount}}{\value{textcitetotal}}}
+ {\ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}}
+
+\newbool{cbx:parens}
+\newbool{cbx:loccit}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+\newbibmacro*{cite:init}{%
+ \global\boolfalse{cbx:loccit}%
+ \ifnumless{\value{multicitecount}}{2}
+ {\global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash}
+ {\iffieldundef{prenote}
+ {}
+ {\global\undef\cbx@lasthash}}}
+
+\newbibmacro*{cite:reinit}{%
+ \global\undef\cbx@lasthash}
+
+\newbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}}
+ {\printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{citetitle}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}}
+ {\printnames{labelname}%
+ \setunit*{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{cite:title}{%
+ \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\booltrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\setunit{\printdelim{postnotedelim}}%
+ \printfield{postnote}}}
+
+\newbibmacro*{textcite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\ifnameundef{labelname}
+ {\setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{extpostnotedelim}\bibopenparen}}
+ {\setunit{\printdelim{postnotedelim}}}%
+ \printfield{postnote}}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{cite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{cite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\parencites}[\mkbibparens]
+ {\parencite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]
+ {\footcite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]
+ {\footcitetext}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\smartcite}{\setunit{\multicitedelim}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle-tcomp.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle-tcomp.cbx
new file mode 100644
index 0000000000..33ef145614
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle-tcomp.cbx
@@ -0,0 +1,90 @@
+\ProvidesFile{authortitle-tcomp.cbx}
+[\abx@cbxid]
+
+\RequireCitationStyle{authortitle-comp}
+\ExecuteBibliographyOptions{singletitle,uniquename,uniquelist,autocite=inline}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\renewbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:title}}
+ {\ifnameundef{labelname}
+ {\usebibmacro{cite:title}}
+ {\ifsingletitle
+ {\printtext[bibhyperref]{\printnames{labelname}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nametitledelim}}%
+ \usebibmacro{cite:title}}}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\renewbibmacro*{citetitle}{%
+ \iffieldundef{shorthand}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}}
+ {\savefield{namehash}{\cbx@lasthash}}%
+ \usebibmacro{cite:title}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\renewbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}
+ {\ifnameundef{labelname}
+ {\ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}
+ {\ifthenelse{\ifsingletitle\AND
+ \(\iffieldundef{prenote}\OR\value{citecount}>1\)}
+ {\printtext[bibhyperref]{\printnames{labelname}}}
+ {\printnames{labelname}
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\renewbibmacro*{textcite:postnote}{%
+ \ifbool{cbx:parens}
+ {\setunit{\printdelim{postnotedelim}}}
+ {\setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{extpostnotedelim}\bibopenparen}}%
+ \printfield{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle-terse.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle-terse.cbx
new file mode 100644
index 0000000000..1ffd3ba454
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle-terse.cbx
@@ -0,0 +1,40 @@
+\ProvidesFile{authortitle-terse.cbx}
+[\abx@cbxid]
+
+\RequireCitationStyle{authortitle}
+\ExecuteBibliographyOptions{singletitle,uniquename,uniquelist,autocite=inline}
+
+\renewbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\ifnameundef{labelname}
+ {\usebibmacro{cite:title}}
+ {\ifsingletitle
+ {\printtext[bibhyperref]{\printnames{labelname}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nametitledelim}}%
+ \usebibmacro{cite:title}}}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\renewbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}
+ {\ifthenelse{\ifsingletitle\AND
+ \(\iffieldundef{prenote}\OR\value{citecount}>1\)}
+ {\printtext[bibhyperref]{\printnames{labelname}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle-ticomp.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle-ticomp.cbx
new file mode 100644
index 0000000000..7dd3d8a528
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle-ticomp.cbx
@@ -0,0 +1,100 @@
+\ProvidesFile{authortitle-ticomp.cbx}
+[\abx@cbxid]
+
+\RequireCitationStyle{authortitle-icomp}
+\ExecuteBibliographyOptions{singletitle,uniquename,uniquelist,autocite=inline}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\renewbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:title}}
+ {\ifnameundef{labelname}
+ {\usebibmacro{cite:title}}
+ {\ifsingletitle
+ {\printtext[bibhyperref]{\printnames{labelname}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nametitledelim}}%
+ \usebibmacro{cite:title}}}%
+ \savefield{namehash}{\cbx@lasthash}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\renewbibmacro*{citetitle}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}}
+ {\savefield{namehash}{\cbx@lasthash}}%
+ \usebibmacro{cite:title}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\renewbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\compcitedelim}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}}
+ {\ifnameundef{labelname}
+ {\ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}}
+ {\ifthenelse{\ifsingletitle\AND
+ \(\iffieldundef{prenote}\OR\value{citecount}>1\)}
+ {\printtext[bibhyperref]{\printnames{labelname}}}
+ {\printnames{labelname}
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:title}}}%
+ {\usebibmacro{cite:shorthand}}}}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\renewbibmacro*{textcite:postnote}{%
+ \ifbool{cbx:parens}
+ {\setunit{\printdelim{postnotedelim}}}
+ {\setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{extpostnotedelim}\bibopenparen}}%
+ \printfield{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authortitle.cbx b/macros/latex/contrib/biblatex/latex/cbx/authortitle.cbx
new file mode 100644
index 0000000000..985ead9286
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authortitle.cbx
@@ -0,0 +1,115 @@
+\ProvidesFile{authortitle.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{uniquename,uniquelist,autocite=footnote}
+
+\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
+
+\newbool{cbx:parens}
+
+\newbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{citetitle}{%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{textcite}{%
+ \printnames{labelname}%
+ \setunit*{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nametitledelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\usebibmacro{cite:title}}%
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{cite:title}{%
+ \printtext[bibhyperref]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{textcite:postnote}{%
+ \iffieldundef{postnote}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen}
+ {}}
+ {\ifbool{cbx:parens}
+ {\printdelim{postnotedelim}}
+ {\printdelim{extpostnotedelim}\bibopenparen}%
+ \printfield{postnote}\bibcloseparen}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {\boolfalse{cbx:parens}}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareMultiCiteCommand{\textcites}{\textcite}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authoryear-comp.cbx b/macros/latex/contrib/biblatex/latex/cbx/authoryear-comp.cbx
new file mode 100644
index 0000000000..11d91b054e
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authoryear-comp.cbx
@@ -0,0 +1,267 @@
+\ProvidesFile{authoryear-comp.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labeldateparts,uniquename,uniquelist,sortcites,
+ autocite=inline}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newbool{cbx:parens}
+
+\newbibmacro*{cite:init}{%
+ \ifnumless{\value{multicitecount}}{2}
+ {\global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash
+ \global\undef\cbx@lastyear}
+ {\iffieldundef{prenote}
+ {}
+ {\global\undef\cbx@lasthash
+ \global\undef\cbx@lastyear}}}
+
+\newbibmacro*{cite:reinit}{%
+ \global\undef\cbx@lasthash
+ \global\undef\cbx@lastyear}
+
+\newbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \usebibmacro{cite:reinit}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{citeyear}{%
+ \iffieldundef{shorthand}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}%
+ \usebibmacro{cite:reinit}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\usebibmacro{cite:labeldate+extradate}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\iffieldundef{shorthand}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:shorthand}%
+ \global\undef\cbx@lastyear}}
+ {\ifnameundef{labelname}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:labeldate+extradate}}
+ {\usebibmacro{cite:shorthand}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labeldate+extradate}}%
+ \savefield{labelyear}{\cbx@lastyear}}
+ {\usebibmacro{cite:shorthand}%
+ \global\undef\cbx@lastyear}}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:label}{%
+ \iffieldundef{label}
+ {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
+ {\printtext[bibhyperref]{\printfield{label}}}}
+
+\newbibmacro*{cite:labeldate+extradate}{%
+ \iffieldundef{labelyear}
+ {}
+ {\printtext[bibhyperref]{\printlabeldateextra}}}
+
+\newbibmacro{cite:labelyear+extrayear}{%
+ \blx@warning{bibmacro 'cite:labelyear+extrayear' is deprecated.\MessageBreak
+ Please use 'cite:labeldate+extradate'.\MessageBreak
+ Using 'cite:labeldate+extradate' instead}%
+ \usebibmacro{cite:labeldate+extradate}}
+
+\newbibmacro*{cite:extradate}{%
+ \iffieldundef{extradate}
+ {}
+ {\printtext[bibhyperref]{\printfield{extradate}}}}
+
+\newbibmacro{cite:extrayear}{%
+ \blx@warning{bibmacro 'cite:extrayear' is deprecated.\MessageBreak
+ Please use 'cite:extradate'.\MessageBreak
+ Using 'cite:extradate' instead}%
+ \usebibmacro{cite:extradate}}
+
+\newbibmacro*{textcite:postnote}{%
+ \usebibmacro{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{cite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{cite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}
+ {\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}
+ {\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]
+ {\footcitetext}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\smartcite}{\setunit{\multicitedelim}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authoryear-ibid.cbx b/macros/latex/contrib/biblatex/latex/cbx/authoryear-ibid.cbx
new file mode 100644
index 0000000000..2f361a0033
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authoryear-ibid.cbx
@@ -0,0 +1,173 @@
+\ProvidesFile{authoryear-ibid.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labeldateparts,uniquename,uniquelist,pagetracker,
+ ibidtracker=constrict,autocite=inline}
+
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
+
+\newbool{cbx:parens}
+\newbool{cbx:loccit}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+\newbibmacro*{cite}{%
+ \global\boolfalse{cbx:loccit}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nameyeardelim}}}%
+ \usebibmacro{cite:labeldate+extradate}}}
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{citeyear}{%
+ \global\boolfalse{cbx:loccit}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labeldate+extradate}}}}
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{textcite}{%
+ \global\boolfalse{cbx:loccit}%
+ \ifnameundef{labelname}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:labeldate+extradate}}
+ {\usebibmacro{cite:shorthand}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labeldate+extradate}}}}
+ {\usebibmacro{cite:shorthand}}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\booltrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:label}{%
+ \iffieldundef{label}
+ {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
+ {\printtext[bibhyperref]{\printfield{label}}}}
+
+\newbibmacro*{cite:labeldate+extradate}{%
+ \iffieldundef{labelyear}
+ {}
+ {\printtext[bibhyperref]{\printlabeldateextra}}}
+
+\newbibmacro{cite:labelyear+extrayear}{%
+ \blx@warning{bibmacro 'cite:labelyear+extrayear' is deprecated.\MessageBreak
+ Please use 'cite:labeldate+extradate'.\MessageBreak
+ Using 'cite:labeldate+extradate' instead}%
+ \usebibmacro{cite:labeldate+extradate}}
+
+\newbibmacro*{cite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\newbibmacro*{textcite:postnote}{%
+ \ifthenelse{\iffieldundef{postnote}\OR\boolean{cbx:loccit}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen}
+ {}}
+ {\ifbool{cbx:parens}
+ {\printdelim{postnotedelim}}
+ {\printdelim{extpostnotedelim}\bibopenparen}%
+ \printfield{postnote}\bibcloseparen}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {\boolfalse{cbx:parens}}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareMultiCiteCommand{\textcites}{\textcite}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authoryear-icomp.cbx b/macros/latex/contrib/biblatex/latex/cbx/authoryear-icomp.cbx
new file mode 100644
index 0000000000..a194473bea
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authoryear-icomp.cbx
@@ -0,0 +1,296 @@
+\ProvidesFile{authoryear-icomp.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labeldateparts,uniquename,uniquelist,ibidtracker=constrict,
+ pagetracker,sortcites,autocite=inline}
+
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newbool{cbx:parens}
+\newbool{cbx:loccit}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+\newbibmacro*{cite:init}{%
+ \global\boolfalse{cbx:loccit}%
+ \ifnumless{\value{multicitecount}}{2}
+ {\global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash
+ \global\undef\cbx@lastyear}
+ {\iffieldundef{prenote}
+ {}
+ {\global\undef\cbx@lasthash
+ \global\undef\cbx@lastyear}}}
+
+\newbibmacro*{cite:reinit}{%
+ \global\undef\cbx@lasthash
+ \global\undef\cbx@lastyear}
+
+\newbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \usebibmacro{cite:reinit}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{citeyear}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}%
+ \usebibmacro{cite:reinit}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\usebibmacro{cite:labeldate+extradate}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\iffieldundef{shorthand}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:shorthand}%
+ \global\undef\cbx@lastyear}}
+ {\ifnameundef{labelname}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:labeldate+extradate}}}
+ {\usebibmacro{cite:shorthand}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:labeldate+extradate}}}%
+ \savefield{labelyear}{\cbx@lastyear}}
+ {\usebibmacro{cite:shorthand}%
+ \global\undef\cbx@lastyear}}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:label}{%
+ \iffieldundef{label}
+ {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
+ {\printtext[bibhyperref]{\printfield{label}}}}
+
+\newbibmacro*{cite:labeldate+extradate}{%
+ \iffieldundef{labelyear}
+ {}
+ {\printtext[bibhyperref]{\printlabeldateextra}}}
+
+\newbibmacro{cite:labelyear+extrayear}{%
+ \blx@warning{bibmacro 'cite:labelyear+extrayear' is deprecated.\MessageBreak
+ Please use 'cite:labeldate+extradate'.\MessageBreak
+ Using 'cite:labeldate+extradate' instead}%
+ \usebibmacro{cite:labeldate+extradate}}
+
+\newbibmacro*{cite:extradate}{%
+ \iffieldundef{extradate}
+ {}
+ {\printtext[bibhyperref]{\printfield{extradate}}}}
+
+\newbibmacro{cite:extrayear}{%
+ \blx@warning{bibmacro 'cite:extrayear' is deprecated.\MessageBreak
+ Please use 'cite:extradate'.\MessageBreak
+ Using 'cite:extradate' instead}%
+ \usebibmacro{cite:extradate}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperref]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\booltrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\newbibmacro*{textcite:postnote}{%
+ \ifbool{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{cite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{cite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\parencites}[\mkbibparens]
+ {\parencite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]
+ {\footcite}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]
+ {\footcitetext}{\setunit{\multicitedelim}}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\smartcite}{\setunit{\multicitedelim}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/authoryear.cbx b/macros/latex/contrib/biblatex/latex/cbx/authoryear.cbx
new file mode 100644
index 0000000000..49c8d9d03a
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/authoryear.cbx
@@ -0,0 +1,141 @@
+\ProvidesFile{authoryear.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labeldateparts,uniquename,uniquelist,autocite=inline}
+
+\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
+
+\newbool{cbx:parens}
+
+\newbibmacro*{cite}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}}
+ {\printnames{labelname}%
+ \setunit{\printdelim{nameyeardelim}}}%
+ \usebibmacro{cite:labeldate+extradate}}
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{citeyear}{%
+ \iffieldundef{shorthand}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labeldate+extradate}}}
+ {\usebibmacro{cite:shorthand}}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:labeldate+extradate}}
+ {\usebibmacro{cite:shorthand}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{citeyear}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:label}{%
+ \iffieldundef{label}
+ {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
+ {\printtext[bibhyperref]{\printfield{label}}}}
+
+\newbibmacro*{cite:labeldate+extradate}{%
+ \iffieldundef{labelyear}
+ {}
+ {\printtext[bibhyperref]{\printlabeldateextra}}}
+
+\newbibmacro{cite:labelyear+extrayear}{%
+ \blx@warning{bibmacro 'cite:labelyear+extrayear' is deprecated.\MessageBreak
+ Please use 'cite:labeldate+extradate'.\MessageBreak
+ Using 'cite:labeldate+extradate' instead}%
+ \usebibmacro{cite:labeldate+extradate}}
+
+\newbibmacro*{textcite:postnote}{%
+ \iffieldundef{postnote}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen}
+ {}}
+ {\ifbool{cbx:parens}
+ {\setunit{\printdelim{postnotedelim}}}
+ {\setunit{\printdelim{extpostnotedelim}\bibopenparen}}%
+ \printfield{postnote}\bibcloseparen}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citeyear}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {\boolfalse{cbx:parens}}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareMultiCiteCommand{\textcites}{\textcite}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/debug.cbx b/macros/latex/contrib/biblatex/latex/cbx/debug.cbx
new file mode 100644
index 0000000000..dc3405dd7f
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/debug.cbx
@@ -0,0 +1,93 @@
+\ProvidesFile{debug.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{autocite=plain}
+
+\DeclareUrlCommand{\cbx@citekey}{\urlstyle{citekey}}
+\def\url@citekeystyle{\def\UrlFont{\ttfamily}}
+
+\DeclareFieldFormat{key}{\cbx@citekey{#1}}
+\DeclareFieldFormat{pre}{\texttt{pre=\detokenize{#1}}}
+\DeclareFieldFormat{post}{\texttt{post=\detokenize{#1}}}
+\DeclareFieldFormat{meta}{\texttt{#1}}
+
+\renewbibmacro*{multiprenote}{%
+ \printtext[meta]{[multi}%
+ \setunit{\addspace}%
+ \printfield[pre]{multiprenote}%
+ \setunit{\addspace}%
+ \printfield[post]{multipostnote}%
+ \setunit{\addspace}}
+
+\renewbibmacro*{multipostnote}{%
+ \printtext[meta]{]}}
+
+\newbibmacro*{begin}[1]{%
+ \printtext[meta]{[#1}%
+ \setunit{\addspace}%
+ \printfield[pre]{prenote}%
+ \setunit{\addspace}%
+ \printfield[post]{postnote}%
+ \setunit{\addspace}%
+ \printtext[meta]{key=}}
+
+\newbibmacro*{end}{%
+ \printtext[meta]{]}}
+
+\newbibmacro*{key}{%
+ \printtext[bibhyperref]{\printfield[key]{entrykey}}}
+
+\newbibmacro*{next}{%
+ \printtext[meta]{\addcomma}%
+ \setunit{\addspace}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{begin}{cite}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareCiteCommand{\parencite}
+ {\usebibmacro{begin}{parencite}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareCiteCommand{\footcite}
+ {\usebibmacro{begin}{footcite}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareCiteCommand{\footcitetext}
+ {\usebibmacro{begin}{footcitetext}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{begin}{smartcite}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareCiteCommand{\textcite}
+ {\usebibmacro{begin}{textcite}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareCiteCommand{\supercite}
+ {\usebibmacro{begin}{supercite}}
+ {\usebibmacro{key}}
+ {\usebibmacro{next}}
+ {\usebibmacro{end}}
+
+\DeclareMultiCiteCommand{\cites}{\cite}{\addspace}
+\DeclareMultiCiteCommand{\parencites}{\parencite}{\addspace}
+\DeclareMultiCiteCommand{\footcites}{\footcite}{\addspace}
+\DeclareMultiCiteCommand{\footcitetexts}{\footcitetext}{\addspace}
+\DeclareMultiCiteCommand{\supercites}{\supercite}{\addspace}
+\DeclareMultiCiteCommand{\textcites}{\textcite}{\addspace}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/draft.cbx b/macros/latex/contrib/biblatex/latex/cbx/draft.cbx
new file mode 100644
index 0000000000..9823820769
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/draft.cbx
@@ -0,0 +1,73 @@
+\ProvidesFile{draft.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{autocite=plain}
+
+\DeclareFieldFormat{citekey}{\cbx@mkcitekey{#1}}
+\DeclareUrlCommand{\cbx@mkcitekey}{\urlstyle{citekey}}
+\def\url@citekeystyle{\def\UrlFont{\bfseries}}
+\newbool{cbx:parens}
+
+\newbibmacro*{cite}{%
+ \printtext[bibhyperref]{\printfield[citekey]{entrykey}}}
+
+\newbibmacro*{textcite}{%
+ \printnames{labelname}%
+ \setunit*{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite}}
+
+\newbibmacro*{textcite:postnote}{%
+ \iffieldundef{postnote}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen}
+ {}}
+ {\ifbool{cbx:parens}
+ {\setunit{\printdelim{postnotedelim}}}
+ {\setunit{\addspace\bibopenparen}}%
+ \printfield{postnote}\bibcloseparen}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {\boolfalse{cbx:parens}}
+ {\usebibmacro{textcite}}
+ {\ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \multicitedelim}
+ {\usebibmacro{textcite:postnote}}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/numeric-comp.cbx b/macros/latex/contrib/biblatex/latex/cbx/numeric-comp.cbx
new file mode 100644
index 0000000000..b649cbeaee
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/numeric-comp.cbx
@@ -0,0 +1,233 @@
+\ProvidesFile{numeric-comp.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labelnumber,sortcites,autocite=inline}
+
+\renewcommand*{\multicitedelim}{\addcomma\space}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\providebool{bbx:subentry}
+\newbool{cbx:parens}
+
+\newcounter{cbx@tempcnta}
+\newcounter{cbx@tempcntb}
+
+\DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}
+
+\newbibmacro*{cite:init}{%
+ \global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash
+ \global\undef\cbx@lastnumber
+ \global\undef\cbx@lastprefix
+ \setcounter{cbx@tempcnta}{0}%
+ \setcounter{cbx@tempcntb}{-2}}
+
+\newbibmacro*{cite:comp}{%
+ \addtocounter{cbx@tempcntb}{1}%
+ \iffieldundef{shorthand}
+ {\ifbool{bbx:subentry}
+ {\iffieldundef{entrysetcount}
+ {\usebibmacro{cite:comp:comp}}
+ {\usebibmacro{cite:comp:inset}}}
+ {\usebibmacro{cite:comp:comp}}}
+ {\usebibmacro{cite:comp:shand}}}
+
+\newbibmacro*{cite:comp:comp}{%
+ \ifboolexpr{
+ ( test {\iffieldundef{labelprefix}} and test {\ifundef\cbx@lastprefix} )
+ or
+ test {\iffieldequals{labelprefix}{\cbx@lastprefix}}
+ }
+ {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}}
+ {\savefield{entrykey}{\cbx@lastkey}%
+ \savefield{labelnumber}{\cbx@lastnumber}%
+ \addtocounter{cbx@tempcnta}{1}}
+ {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}-1}
+ {}
+ {\usebibmacro{cite:dump}%
+ \ifnumgreater{\value{cbx@tempcntb}}{-1}
+ {\multicitedelim}
+ {}%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}}}}}
+ {\usebibmacro{cite:comp:end}}%
+ \setcounter{cbx@tempcntb}{\thefield{labelnumber}}%
+ \savefield{labelprefix}{\cbx@lastprefix}}
+
+\newbibmacro*{cite:comp:end}{%
+ \usebibmacro{cite:dump}%
+ \ifnumgreater{\value{cbx@tempcntb}}{-1}
+ {\multicitedelim}
+ {}%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}}}
+
+\newbibmacro*{cite:comp:inset}{%
+ \usebibmacro{cite:dump}%
+ \ifnumgreater{\value{cbx@tempcntb}}{-1}
+ {\multicitedelim}
+ {}%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}%
+ \printfield{entrysetcount}}%
+ \setcounter{cbx@tempcntb}{-1}}
+
+\newbibmacro*{cite:comp:shand}{%
+ \usebibmacro{cite:dump}%
+ \ifnumgreater{\value{cbx@tempcntb}}{-1}
+ {\multicitedelim}
+ {}%
+ \printtext[bibhyperref]{\printfield{shorthand}}%
+ \setcounter{cbx@tempcntb}{-1}}
+
+\newbibmacro*{cite:dump}{%
+ \ifnumgreater{\value{cbx@tempcnta}}{0}
+ {\ifnumgreater{\value{cbx@tempcnta}}{1}
+ {\bibrangedash}
+ {\multicitedelim}%
+ \bibhyperref[\cbx@lastkey]{%
+ \ifdef\cbx@lastprefix
+ {\printtext[labelprefix]{\cbx@lastprefix}}
+ {}%
+ \printtext[labelnumber]{\cbx@lastnumber}}}
+ {}%
+ \setcounter{cbx@tempcnta}{0}%
+ \global\undef\cbx@lastprefix}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\usebibmacro{cite:comp}}
+ {\usebibmacro{cite:dump}%
+ \ifbool{cbx:parens}
+ {\printtext{\bibclosebracket}\global\boolfalse{cbx:parens}}
+ {}%
+ \iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \usebibmacro{cite:init}%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \setunit*{\printdelim{namelabeldelim}}%
+ \printtext{\bibopenbracket}\global\booltrue{cbx:parens}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:comp}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}}
+
+\DeclareCiteCommand{\cite}[\mkbibbrackets]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibbrackets]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}}
+
+\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
+ {\usebibmacro{cite:init}%
+ \let\multicitedelim=\supercitedelim
+ \iffieldundef{prenote}
+ {}
+ {\BibliographyWarning{Ignoring prenote argument}}%
+ \iffieldundef{postnote}
+ {}
+ {\BibliographyWarning{Ignoring postnote argument}}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{cite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{cite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}[\mkbibbrackets]{\cite}{\multicitedelim}
+\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/numeric-verb.cbx b/macros/latex/contrib/biblatex/latex/cbx/numeric-verb.cbx
new file mode 100644
index 0000000000..e64e19e810
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/numeric-verb.cbx
@@ -0,0 +1,100 @@
+\ProvidesFile{numeric-verb.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labelnumber,autocite=inline}
+
+\renewcommand*{\multicitedelim}{\addcomma\space}
+\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
+
+\providebool{bbx:subentry}
+
+\DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}
+
+\newbibmacro*{cite}{%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}%
+ \ifbool{bbx:subentry}
+ {\printfield{entrysetcount}}
+ {}}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \printdelim{namelabeldelim}\bibopenbracket
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite}}
+
+\DeclareCiteCommand{\cite}
+ {\bibopenbracket
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \ifnumgreater{\value{citecount}}{1}
+ {\bibopenbracket}
+ {}%
+ \usebibmacro{cite}}
+ {\bibclosebracket\multicitedelim}
+ {\usebibmacro{postnote}%
+ \bibclosebracket}
+
+\DeclareCiteCommand{\parencite}[\mkbibbrackets]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {}
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}
+ {\bibclosebracket}
+ {\usebibmacro{postnote}%
+ \bibclosebracket}
+
+\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
+ {\iffieldundef{prenote}
+ {}
+ {\BibliographyWarning{Ignoring prenote argument}}%
+ \iffieldundef{postnote}
+ {}
+ {\BibliographyWarning{Ignoring postnote argument}}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\supercitedelim}
+ {}
+
+\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+\DeclareMultiCiteCommand{\textcites}{\textcite}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/numeric.cbx b/macros/latex/contrib/biblatex/latex/cbx/numeric.cbx
new file mode 100644
index 0000000000..8ea47d1338
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/numeric.cbx
@@ -0,0 +1,156 @@
+\ProvidesFile{numeric.cbx}
+[\abx@cbxid]
+
+\ExecuteBibliographyOptions{labelnumber,autocite=inline}
+
+\renewcommand*{\multicitedelim}{\addcomma\space}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\providebool{bbx:subentry}
+\newbool{cbx:parens}
+
+\DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}
+
+\newbibmacro*{cite}{%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}%
+ \ifbool{bbx:subentry}
+ {\printfield{entrysetcount}}
+ {}}}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\multicitedelim}}
+ {\ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \setunit*{\printdelim{namelabeldelim}}%
+ \printtext{\bibopenbracket}\global\booltrue{cbx:parens}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{textcite:init}{%
+ \ifnumless{\value{multicitecount}}{2}
+ {\global\boolfalse{cbx:parens}%
+ \global\undef\cbx@lasthash}
+ {\global\undef\cbx@lasthash}}
+
+\newbibmacro*{textcite:postnote}{%
+ \usebibmacro{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\bibclosebracket\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}}
+
+\DeclareCiteCommand{\cite}[\mkbibbrackets]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibbrackets]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\supercite}[\mkbibsuperscript]
+ {\iffieldundef{prenote}
+ {}
+ {\BibliographyWarning{Ignoring prenote argument}}%
+ \iffieldundef{postnote}
+ {}
+ {\BibliographyWarning{Ignoring postnote argument}}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\supercitedelim}
+ {}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{textcite}}
+ {}
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite]
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{textcite:init}}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[2]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \def\cbx@savedcites{#1}#2\cbx@savedcites\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}[\cbx@textcites@init\cbx@textcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{\UseNextMultiCiteHook}{}{}
+
+\DeclareMultiCiteCommand{\cites}[\mkbibbrackets]{\cite}{\multicitedelim}
+\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/reading.cbx b/macros/latex/contrib/biblatex/latex/cbx/reading.cbx
new file mode 100644
index 0000000000..b9c47701d2
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/reading.cbx
@@ -0,0 +1,6 @@
+\ProvidesFile{reading.cbx}
+[\abx@cbxid]
+
+\RequireCitationStyle{authortitle}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose-ibid.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose-ibid.cbx
new file mode 100644
index 0000000000..7d9457779c
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose-ibid.cbx
@@ -0,0 +1,262 @@
+\ProvidesFile{verbose-ibid.cbx}
+[\abx@cbxid]
+
+\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
+\newcommand*{\cbx@resetcount}{0}
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newtoggle{cbx:loccit}
+
+\newbibmacro*{cite:citepages}{}
+\newbibmacro*{cite:full:citepages}{}
+\newbibmacro*{cite:postnote}{}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{cite:postnote:ibidpage}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
+ pagetracker,autocite=footnote,citepages=permit}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\ifboolexpr{
+ test {\ifciteibid}
+ and
+ not test {\iffirstonpage}
+ }
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:short}}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:short}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\toggletrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{%
+ \printfield{shorthand}}}
+
+\newbibmacro*{cite:postnote:ibidpage}{%
+ \iftoggle{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\@empty\cbx@footcite@args\@empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose-inote.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose-inote.cbx
new file mode 100644
index 0000000000..bb0b045754
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose-inote.cbx
@@ -0,0 +1,321 @@
+\ProvidesFile{verbose-inote.cbx}
+[\abx@cbxid]
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{%
+ \thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}}
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\thefield{entrykey}:\the\value{instcount}}{#1}}
+
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newtoggle{cbx:loccit}
+\newtoggle{cbx:pageref}
+
+\newbibmacro*{cite:citepages}{}
+\newbibmacro*{cite:full:citepages}{}
+\newbibmacro*{cite:postnote}{}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+\DeclareBibliographyOption[boolean]{pageref}[true]{%
+ \settoggle{cbx:pageref}{#1}}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{cite:postnote:ibidpage}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
+ singletitle,pagetracker,autocite=footnote,citepages=permit}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{cite:ibid}}
+ {\usebibmacro{cite:short}}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}%
+ \usebibmacro{cite:save}}}
+
+\newbibmacro*{cite:save}{%
+ \csxdef{cbx@t@\thefield{entrykey}}{\the\value{instcount}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:short}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\toggletrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:postnote:ibidpage}{%
+ \iftoggle{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\newbibmacro*{footcite}{%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}
+ {\usebibmacro{footcite:ibid}}
+ {\usebibmacro{footcite:note}}}
+ {\usebibmacro{footcite:shorthand}}}
+ {\usebibmacro{footcite:full}%
+ \usebibmacro{footcite:save}}}
+
+\newbibmacro*{footcite:save}{%
+ \csxdef{cbx@f@\thefield{entrykey}}{\the\value{instcount}}%
+ \label{cbx@\the\value{instcount}}}
+
+\newbibmacro*{footcite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{footcite:note}{%
+ \ifnameundef{labelname}
+ {\printfield{label}}
+ {\printnames{labelname}}%
+ \ifsingletitle
+ {}
+ {\setunit*{\printdelim{nametitledelim}}%
+ \printfield[title]{labeltitle}}%
+ \setunit*{\addcomma\space}%
+ \printtext{%
+ \bibstring{seenote}\addnbspace
+ \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
+ \iftoggle{cbx:pageref}
+ {\ifsamepage{\the\value{instcount}}
+ {\csuse{cbx@f@\thefield{entrykey}}}
+ {}
+ {\addcomma\space\bibstring{page}\addnbspace
+ \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
+ {}}}
+
+\newbibmacro*{footcite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}}
+
+\newbibmacro*{footcite:ibid}{%
+ \printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
+ \ifloccit
+ {\global\toggletrue{cbx:loccit}}
+ {}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{footcite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{footcite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose-note.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose-note.cbx
new file mode 100644
index 0000000000..b1c8f0683a
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose-note.cbx
@@ -0,0 +1,292 @@
+\ProvidesFile{verbose-note.cbx}
+[\abx@cbxid]
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{%
+ \thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}}
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\thefield{entrykey}:\the\value{instcount}}{#1}}
+
+\newtoggle{cbx:pageref}
+
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newbibmacro*{cite:citepages}{}
+\newbibmacro*{cite:full:citepages}{}
+\newbibmacro*{cite:postnote}{}
+
+\DeclareBibliographyOption[boolean]{pageref}[true]{%
+ \settoggle{cbx:pageref}{#1}%
+ \iftoggle{cbx:pageref}
+ {\ExecuteBibliographyOptions{pagetracker}}
+ {}}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{\usebibmacro{postnote}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{\usebibmacro{postnote}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{\usebibmacro{postnote}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{postnote}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,singletitle,autocite=footnote,
+ citepages=permit}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:short}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}%
+ \usebibmacro{cite:save}}}
+
+\newbibmacro*{cite:save}{%
+ \csxdef{cbx@t@\thefield{entrykey}}{\the\value{instcount}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:short}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}}
+
+\newbibmacro*{footcite}{%
+ \usebibmacro{cite:citepages}%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\usebibmacro{footcite:note}}
+ {\usebibmacro{footcite:shorthand}}}
+ {\usebibmacro{footcite:full}%
+ \usebibmacro{footcite:save}}}
+
+\newbibmacro*{footcite:save}{%
+ \csxdef{cbx@f@\thefield{entrykey}}{\the\value{instcount}}%
+ \label{cbx@\the\value{instcount}}}
+
+\newbibmacro*{footcite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{footcite:note}{%
+ \ifnameundef{labelname}
+ {\printfield{label}}
+ {\printnames{labelname}}%
+ \ifsingletitle
+ {}
+ {\setunit*{\printdelim{nametitledelim}}%
+ \printfield[title]{labeltitle}}%
+ \setunit*{\addcomma\space}%
+ \printtext{%
+ \bibstring{seenote}\addnbspace
+ \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
+ \iftoggle{cbx:pageref}
+ {\ifsamepage{\the\value{instcount}}
+ {\csuse{cbx@f@\thefield{entrykey}}}
+ {}
+ {\addcomma\space\bibstring{page}\addnbspace
+ \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
+ {}}}
+
+\newbibmacro*{footcite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{footcite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{footcite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \iffootnote
+ {\usebibmacro{footcite}}
+ {\usebibmacro{cite}}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose-trad1.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose-trad1.cbx
new file mode 100644
index 0000000000..1f24a4dac9
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose-trad1.cbx
@@ -0,0 +1,294 @@
+\ProvidesFile{verbose-trad1.cbx}
+[\abx@cbxid]
+
+\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
+\newcommand*{\cbx@resetcount}{0}
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newtoggle{cbx:ibidpage}
+\newtoggle{cbx:loccit}
+\newbool{cbx:noidem}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \settoggle{cbx:ibidpage}{#1}}
+
+\DeclareBibliographyOption[boolean]{strict}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{ibidtracker=constrict,idemtracker=constrict}}
+ {\ExecuteBibliographyOptions{ibidtracker=context,idemtracker=context}}}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{cite:postnote:ibidpage}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
+ idemtracker=constrict,opcittracker=context,loccittracker=context,
+ autocite=footnote,citepages=permit}
+
+\newbibmacro*{cite:save}{%
+ \csxdef{cbx@lastcite@\thefield{entrykey}}{\the\value{instcount}}%
+ \global\boolfalse{cbx:noidem}}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
+ \bibhypertarget{cite\the\value{instcount}}{%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\ifciteibid
+ {\usebibmacro{cite:ibid}}
+ {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
+ {\usebibmacro{cite:idem}%
+ \usebibmacro{cite:title}}
+ {\ifnameundef{labelname}
+ {\usebibmacro{cite:title}}
+ {\usebibmacro{cite:name}%
+ \ifopcit
+ {\ifloccit
+ {\usebibmacro{cite:loccit}}
+ {\usebibmacro{cite:opcit}}}
+ {\usebibmacro{cite:title}}}}}%
+ \usebibmacro{cite:save}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}%
+ \usebibmacro{cite:save}}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:name}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}}
+
+\newbibmacro*{cite:idem}{%
+ \bibstring[\mkibid]{idem\thefield{gender}}%
+ \setunit{\printdelim{nametitledelim}}}
+
+\newbibmacro*{cite:title}{%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:opcit}{%
+ \printtext[bibhyperlink]{\bibstring[\mkibid]{opcit}}}
+
+\newbibmacro*{cite:loccit}{%
+ \printtext{%
+ \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
+ \bibstring[\mkibid]{loccit}}}%
+ \global\toggletrue{cbx:loccit}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext{%
+ \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
+ \bibstring[\mkibid]{ibidem}}}%
+ \ifboolexpr{ test {\ifloccit} and togl {cbx:ibidpage} }
+ {\global\toggletrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}%
+ \global\booltrue{cbx:noidem}}
+
+\newbibmacro*{cite:postnote:ibidpage}{%
+ \iftoggle{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose-trad2.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose-trad2.cbx
new file mode 100644
index 0000000000..60e5dfc802
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose-trad2.cbx
@@ -0,0 +1,288 @@
+\ProvidesFile{verbose-trad2.cbx}
+[\abx@cbxid]
+
+\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
+\newcommand*{\cbx@resetcount}{0}
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newtoggle{cbx:fullcite}
+\newtoggle{cbx:loccit}
+\newbool{cbx:noidem}
+
+\newbibmacro*{cite:citepages}{}
+\newbibmacro*{cite:full:citepages}{}
+\newbibmacro*{cite:postnote}{}
+
+\DeclareBibliographyOption[boolean]{ibidpage}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{loccittracker=false}}}
+
+\DeclareBibliographyOption[boolean]{strict}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{ibidtracker=constrict,idemtracker=constrict}}
+ {\ExecuteBibliographyOptions{ibidtracker=context,idemtracker=context}}}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{cite:postnote:ibidpage}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
+ idemtracker=constrict,autocite=footnote,citepages=permit}
+
+\newbibmacro*{cite:save}{%
+ \csxdef{cbx@lastcite@\thefield{entrykey}}{\the\value{instcount}}%
+ \global\boolfalse{cbx:noidem}}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:fullcite}%
+ \global\togglefalse{cbx:loccit}%
+ \bibhypertarget{cite\the\value{instcount}}{%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\ifciteibid
+ {\usebibmacro{cite:ibid}}
+ {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
+ {\usebibmacro{cite:idem}}
+ {\usebibmacro{cite:name}}%
+ \usebibmacro{cite:title}}%
+ \usebibmacro{cite:save}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}%
+ \usebibmacro{cite:save}}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \global\toggletrue{cbx:fullcite}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:name}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}}
+
+\newbibmacro*{cite:idem}{%
+ \bibstring[\mkibid]{idem\thefield{gender}}%
+ \setunit{\printdelim{nametitledelim}}}
+
+\newbibmacro*{cite:title}{%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}%
+ \setunit{\printdelim{nametitledelim}}%
+ \bibstring[\mkibid]{opcit}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext{%
+ \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
+ \bibstring[\mkibid]{ibidem}}}%
+ \ifloccit
+ {\global\toggletrue{cbx:loccit}}
+ {}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}%
+ \global\booltrue{cbx:noidem}}
+
+\newbibmacro*{cite:postnote:ibidpage}{%
+ \iftoggle{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose-trad3.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose-trad3.cbx
new file mode 100644
index 0000000000..c410692b60
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose-trad3.cbx
@@ -0,0 +1,261 @@
+\ProvidesFile{verbose-trad3.cbx}
+[\abx@cbxid]
+
+\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
+\newcommand*{\cbx@resetcount}{0}
+\providecommand*{\mkibid}[1]{#1}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newtoggle{cbx:loccit}
+
+\DeclareBibliographyOption[boolean]{strict}[true]{%
+ \ifstrequal{#1}{true}
+ {\ExecuteBibliographyOptions{ibidtracker=constrict,loccittracker=constrict}}
+ {\ExecuteBibliographyOptions{ibidtracker=context,loccittracker=context}}}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{%
+ \usebibmacro{cite:postnote:ibidpage}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{cite:postnote:ibidpage}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,
+ loccittracker=constrict,autocite=footnote,citepages=permit}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \global\togglefalse{cbx:loccit}%
+ \ifciteseen
+ {\ifciteibid
+ {\ifloccit
+ {\usebibmacro{cite:ibid}}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:opcit}}
+ {\usebibmacro{cite:shorthand}}}}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:short}}
+ {\usebibmacro{cite:shorthand}}}}
+ {\usebibmacro{cite:full}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:short}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:opcit}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \printtext[bibhyperlink]{%
+ \bibstring[\mkibid]{opcit}}}
+
+\newbibmacro*{cite:ibid}{%
+ \printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}%
+ \global\toggletrue{cbx:loccit}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}}
+
+\newbibmacro*{cite:postnote:ibidpage}{%
+ \iftoggle{cbx:loccit}
+ {}
+ {\usebibmacro{postnote}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput
diff --git a/macros/latex/contrib/biblatex/latex/cbx/verbose.cbx b/macros/latex/contrib/biblatex/latex/cbx/verbose.cbx
new file mode 100644
index 0000000000..1291f0dfce
--- /dev/null
+++ b/macros/latex/contrib/biblatex/latex/cbx/verbose.cbx
@@ -0,0 +1,231 @@
+\ProvidesFile{verbose.cbx}
+[\abx@cbxid]
+
+\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}
+
+\DeclareFieldFormat{bibhyperlink}{%
+ \bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+\DeclareFieldFormat{bibhypertarget}{%
+ \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}
+
+\newcommand*{\cbx@resetcount}{0}
+\renewcommand*{\iffinalcitedelim}{%
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}
+
+\newbibmacro*{cite:citepages}{}
+\newbibmacro*{cite:full:citepages}{}
+\newbibmacro*{cite:postnote}{}
+
+\DeclareBibliographyOption[string]{citepages}[permit]{%
+ \ifcsdef{cbx@opt@citepages@#1}
+ {\csuse{cbx@opt@citepages@#1}}
+ {\PackageError{biblatex}
+ {Invalid option 'citepages=#1'}
+ {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}
+
+\providebibmacro*{cite:citepages}{}
+\providebibmacro*{cite:full:citepages}{}
+\providebibmacro*{cite:postnote}{}
+
+\def\cbx@opt@citepages@permit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{}%
+ \renewbibmacro*{cite:postnote}{\usebibmacro{postnote}}}
+
+\def\cbx@opt@citepages@suppress{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \clearfield{pages}%
+ \clearfield{pagetotal}}%
+ \renewbibmacro*{cite:postnote}{\usebibmacro{postnote}}}
+
+\def\cbx@opt@citepages@omit{%
+ \renewbibmacro*{cite:citepages}{}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ test {\iffieldpages{postnote}}
+ }
+ {\clearfield{pages}%
+ \clearfield{pagetotal}}
+ {}}%
+ \renewbibmacro*{cite:postnote}{\usebibmacro{postnote}}}
+
+\def\cbx@opt@citepages@separate{%
+ \providetoggle{cbx:fullcite}%
+ \renewbibmacro*{cite:citepages}{%
+ \global\togglefalse{cbx:fullcite}}%
+ \renewbibmacro*{cite:full:citepages}{%
+ \global\toggletrue{cbx:fullcite}}%
+ \renewbibmacro*{cite:postnote}{%
+ \ifboolexpr{
+ togl {cbx:fullcite}
+ and
+ test {\iffieldpages{postnote}}
+ and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}}
+ and
+ (
+ not test {\iffieldundef{pages}}
+ or
+ not test {\iffieldundef{pagetotal}}
+ )
+ }
+ {\usebibmacro{cite:postnote:pages}}
+ {\usebibmacro{postnote}}}
+ \providebibmacro*{cite:postnote:pages}{%
+ \setunit{\printdelim{postnotedelim}}%
+ \bibstring{thiscite}%
+ \setunit{\addspace}%
+ \printfield{postnote}}}
+
+\ExecuteBibliographyOptions{citetracker=context,autocite=footnote,citepages=permit}
+
+\newbibmacro*{cite}{%
+ \usebibmacro{cite:citepages}%
+ \ifciteseen
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:short}}
+ {\usebibmacro{cite:shorthand}}}
+ {\usebibmacro{cite:full}}}
+
+\newbibmacro*{cite:full}{%
+ \usebibmacro{cite:full:citepages}%
+ \printtext[bibhypertarget]{%
+ \usedriver
+ {\DeclareNameAlias{sortname}{default}}
+ {\thefield{entrytype}}}%
+ \usebibmacro{shorthandintro}}
+
+\newbibmacro*{cite:short}{%
+ \printnames{labelname}%
+ \setunit*{\printdelim{nametitledelim}}%
+ \printtext[bibhyperlink]{%
+ \printfield[citetitle]{labeltitle}}}
+
+\newbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperlink]{\printfield{shorthand}}}
+
+\DeclareCiteCommand{\cite}
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{cite:postnote}}
+
+\newbibmacro*{textcite}{%
+ \ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}}
+
+\newbibmacro*{textcite:init}{%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \iffirstcitekey
+ {\global\undef\cbx@lasthash}
+ {}}
+
+\newbibmacro*{textcite:count}{%
+ \stepcounter{textcitetotal}%
+ \ifnumgreater{\value{uniquelist}}{\value{maxnames}}
+ {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{uniquelist}}}
+ {}}
+ {\ifnumless{\value{labelname}}{\value{maxnames}}
+ {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{labelname}}}
+ {}}
+ {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}
+ {\setcounter{textcitemaxnames}{\value{maxnames}}}
+ {}}}}
+
+\DeclareCiteCommand{\cbx@textcite}
+ {\usebibmacro{textcite:init}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\iffirstcitekey
+ {}
+ {\textcitedelim}%
+ \stepcounter{textcitecount}%
+ \usebibmacro{textcite}%
+ \savefield{namehash}{\cbx@lasthash}}}
+ {}
+ {}
+
+\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
+ {\usebibmacro{textcite:init}%
+ \gdef\cbx@savedkeys{}%
+ \DeferNextCitekeyHook}
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
+ {\protected@xappto\cbx@footcite@args{%
+ (\thefield{multiprenote})(\thefield{multipostnote})}}
+ {}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {}
+ {\usebibmacro{textcite:count}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{\value{citetotal}}
+ {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
+ \protected@xappto\cbx@footcite@args{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}%
+ \iflastcitekey
+ {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}%
+ \protected@xappto\cbx@footcite@args{\nopunct}}
+ {}}
+ {}}
+ {}
+ {}
+
+% textcite has nested \DeclareCiteCommand definitions for textcite and we want to use
+% the normal textcite context
+\DeclareDelimcontextAlias{cbx@textcite}{textcite}
+
+\newrobustcmd{\cbx@textcite@init}[3]{%
+ \setcounter{textcitetotal}{0}%
+ \setcounter{textcitecount}{0}%
+ \setcounter{textcitemaxnames}{0}%
+ \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3%
+ \cbx@textcite@args\empty\cbx@footcite@args\empty}
+
+\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}
+\DeclareMultiCiteCommand{\textcites}
+ [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}
+
+\let\cbx@textcites@init\cbx@textcite@init
+\pretocmd{\cbx@textcites@init}{%
+ \UseNextMultiCiteHook%
+ \AtNextMultiCite{%
+ \renewbibmacro{multiprenote}{}%
+ \renewbibmacro{multipostnote}{}}}{}{}
+
+\endinput