diff options
author | Karl Berry <karl@freefriends.org> | 2013-07-11 23:36:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-07-11 23:36:27 +0000 |
commit | 275a02abde664ff395868e975c7c06d89276ac0b (patch) | |
tree | c315179a8d6f30c65f89152a70176afa828cc7e7 /Master/texmf-dist/tex/latex/biblatex/cbx | |
parent | 40e239851e66f62ec8d3092c746e61151b445b6f (diff) |
biblatex (10jul13)
git-svn-id: svn://tug.org/texlive/trunk@31176 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/cbx')
22 files changed, 1079 insertions, 234 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic-verb.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic-verb.cbx index 1a590085e28..be019d10e5f 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic-verb.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic-verb.cbx @@ -3,6 +3,8 @@ \ExecuteBibliographyOptions{labelalpha,autocite=inline} +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + \newbibmacro*{cite}{% \printtext[bibhyperref]{% \printfield{prefixnumber}% @@ -11,9 +13,9 @@ \newbibmacro*{textcite}{% \ifnameundef{labelname} - {} - {\printnames{labelname}\space}% - \bibopenbracket + {\printfield[citetitle]{labeltitle}} + {\printnames{labelname}}% + \addspace\bibopenbracket \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -62,12 +64,18 @@ \DeclareCiteCommand{\textcite} {} {\usebibmacro{citeindex}% + \iffirstcitekey + {\setcounter{textcitetotal}{1}} + {\stepcounter{textcitetotal}% + \textcitedelim}% \usebibmacro{textcite}} - {\bibclosebracket\multicitedelim} + {\bibclosebracket} {\usebibmacro{postnote}% \bibclosebracket} \DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim} -\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]{\smartcite}{\multicitedelim} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote] + {\smartcite}{\multicitedelim} +\DeclareMultiCiteCommand{\textcites}{\textcite}{} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic.cbx index 590d77eee9b..d232ebfebc8 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/alphabetic.cbx @@ -3,6 +3,11 @@ \ExecuteBibliographyOptions{labelalpha,autocite=inline} +\renewcommand*{\iffinalcitedelim}{% + \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} + +\newbool{cbx:parens} + \newbibmacro*{cite}{% \printtext[bibhyperref]{% \printfield{prefixnumber}% @@ -11,18 +16,44 @@ \newbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} - {\multicitedelim} - {\cbx@tempa - \ifnameundef{labelname} - {} - {\printnames{labelname}\space}% - \bibopenbracket}% + {\setunit{\multicitedelim}} + {\ifnameundef{labelname} + {\printfield[citetitle]{labeltitle}} + {\printnames{labelname}}% + \setunit{% + \global\booltrue{cbx:parens}% + \addspace\bibopenbracket}% + \stepcounter{textcitecount}% + \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \usebibmacro{cite}% - \savefield{namehash}{\cbx@lasthash}% - \gdef\cbx@tempa{\bibclosebracket\multicitedelim}} + \setunit{% + \ifbool{cbx:parens} + {\bibcloseparen\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} + {\bibcloseparen\global\boolfalse{cbx:parens}} + {}}} + {\setunit{% + \ifbool{cbx:parens} + {\bibcloseparen\global\boolfalse{cbx:parens}} + {}% + \textcitedelim}}} \DeclareCiteCommand{\cite}[\mkbibbrackets] {\usebibmacro{prenote}} @@ -59,17 +90,46 @@ {\multicitedelim} {\usebibmacro{postnote}} -\DeclareCiteCommand{\textcite} - {\let\cbx@tempa=\empty - \undef\cbx@lasthash} +\DeclareCiteCommand{\cbx@textcite} + {\usebibmacro{textcite:init}} {\usebibmacro{citeindex}% \usebibmacro{textcite}} {} - {\usebibmacro{postnote}% - \bibclosebracket} + {\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}}} + +\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} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote] + {\smartcite}{\multicitedelim} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx index d831050b97a..3e6b1c73e90 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx @@ -2,6 +2,12 @@ [\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}{% @@ -44,6 +50,7 @@ \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}}% + \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} @@ -55,7 +62,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \newbibmacro*{cite:title}{% \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} @@ -80,7 +87,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}}} + \textcitedelim}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% @@ -138,19 +145,51 @@ {} {\usebibmacro{postnote}} -\DeclareCiteCommand{\textcite} +\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}}} + +\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}} -\DeclareMultiCiteCommand{\textcites}{\textcite}{} +\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/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx index 8068079eafd..fcf370d48d3 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx @@ -1,8 +1,12 @@ \ProvidesFile{authortitle-ibid.cbx} [\abx@cbxid] -\ExecuteBibliographyOptions{uniquename,uniquelist,ibidtracker=constrict,pagetracker,autocite=footnote} +\ExecuteBibliographyOptions{uniquename,uniquelist,ibidtracker=constrict, + pagetracker,autocite=footnote} + \providecommand*{\mkibid}[1]{#1} +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + \newbool{cbx:parens} \newbool{cbx:loccit} @@ -17,10 +21,10 @@ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\ifnameundef{labelname} - {} - {\printnames{labelname}% + {} + {\printnames{labelname}% \setunit{\nametitledelim}}% - \usebibmacro{cite:title}}}% + \usebibmacro{cite:title}}}% {\usebibmacro{cite:shorthand}}} \newbibmacro*{citetitle}{% @@ -128,11 +132,16 @@ \DeclareCiteCommand{\textcite} {\boolfalse{cbx:parens}} {\usebibmacro{citeindex}% + \iffirstcitekey + {\setcounter{textcitetotal}{1}} + {\stepcounter{textcitetotal}% + \textcitedelim}% \usebibmacro{textcite}} {\ifbool{cbx:parens} {\bibcloseparen\boolfalse{cbx:parens}} - {}% - \multicitedelim} + {}} {\usebibmacro{textcite:postnote}} +\DeclareMultiCiteCommand{\textcites}{\textcite}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx index faec6bea6af..828d44bf526 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx @@ -3,7 +3,13 @@ \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} @@ -57,6 +63,7 @@ \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}}% + \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} @@ -70,7 +77,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \newbibmacro*{cite:title}{% \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}} @@ -109,7 +116,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}}} + \textcitedelim}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% @@ -167,19 +174,51 @@ {} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite} +\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}}} + +\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}} -\DeclareMultiCiteCommand{\textcites}{\textcite}{} +\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/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx index 2764d3031cf..7157e5d67ef 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx @@ -4,6 +4,9 @@ \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} @@ -57,12 +60,13 @@ \iffieldundef{shorthand} {\usebibmacro{cite:title}}% {\usebibmacro{cite:shorthand}}}}% + \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \setunit{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \renewbibmacro*{textcite:postnote}{% \ifbool{cbx:parens} @@ -81,6 +85,6 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}}} + \textcitedelim}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx index 28bfa4e699d..eb19b9de0ae 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx @@ -4,6 +4,9 @@ \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} @@ -67,12 +70,13 @@ {\usebibmacro{cite:ibid}} {\usebibmacro{cite:title}}}% {\usebibmacro{cite:shorthand}}}}% + \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \setunit{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \renewbibmacro*{textcite:postnote}{% \ifbool{cbx:parens} @@ -91,6 +95,6 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}}} + \textcitedelim}}} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx index 4bdb2a94230..0ba18e87837 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx @@ -2,6 +2,9 @@ [\abx@cbxid] \ExecuteBibliographyOptions{uniquename,uniquelist,autocite=footnote} + +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + \newbool{cbx:parens} \newbibmacro*{cite}{% @@ -101,11 +104,16 @@ \DeclareCiteCommand{\textcite} {\boolfalse{cbx:parens}} {\usebibmacro{citeindex}% + \iffirstcitekey + {\setcounter{textcitetotal}{1}} + {\stepcounter{textcitetotal}% + \textcitedelim}% \usebibmacro{textcite}} {\ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} - {}% - \multicitedelim} + {}} {\usebibmacro{textcite:postnote}} +\DeclareMultiCiteCommand{\textcites}{\textcite}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx index 5936fe16d88..a290293d0ae 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx @@ -1,7 +1,12 @@ \ProvidesFile{authoryear-comp.cbx} [\abx@cbxid] -\ExecuteBibliographyOptions{labeldate,uniquename,uniquelist,sortcites,autocite=inline} +\ExecuteBibliographyOptions{labeldate,uniquename,uniquelist,sortcites, + autocite=inline} + +\renewcommand*{\iffinalcitedelim}{% + \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} + \newbool{cbx:parens} \newbibmacro*{cite:init}{% @@ -100,12 +105,13 @@ \savefield{labelyear}{\cbx@lastyear}} {\usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}}% - \savefield{namehash}{\cbx@lasthash}}% + \stepcounter{textcitecount}% + \savefield{namehash}{\cbx@lasthash}}% \setunit{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \newbibmacro*{cite:shorthand}{% \printtext[bibhyperref]{\printfield{shorthand}}} @@ -139,7 +145,7 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}}} + \textcitedelim}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% @@ -197,19 +203,51 @@ {} {\usebibmacro{postnote}} -\DeclareCiteCommand{\textcite} +\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}}} + +\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}} -\DeclareMultiCiteCommand{\textcites}{\textcite}{} +\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/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx index 77c4b1e0033..b0e6eee71b3 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx @@ -3,7 +3,10 @@ \ExecuteBibliographyOptions{labeldate,uniquename,uniquelist,pagetracker, ibidtracker=constrict,autocite=inline} + \providecommand*{\mkibid}[1]{#1} +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + \newbool{cbx:parens} \newbool{cbx:loccit} @@ -18,11 +21,11 @@ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} - {\usebibmacro{cite:label}% + {\usebibmacro{cite:label}% \setunit{\addspace}} - {\printnames{labelname}% + {\printnames{labelname}% \setunit{\nameyeardelim}}% - \usebibmacro{cite:labelyear+extrayear}}} + \usebibmacro{cite:labelyear+extrayear}}} {\usebibmacro{cite:shorthand}}} \newbibmacro*{citeyear}{% @@ -31,8 +34,8 @@ {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\iffieldundef{labelyear} - {\usebibmacro{cite:label}} - {\usebibmacro{cite:labelyear+extrayear}}}} + {\usebibmacro{cite:label}} + {\usebibmacro{cite:labelyear+extrayear}}}} {\usebibmacro{cite:shorthand}}} \newbibmacro*{textcite}{% @@ -40,13 +43,13 @@ \ifnameundef{labelname} {\iffieldundef{shorthand} {\usebibmacro{cite:label}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}} - {}% - \usebibmacro{cite:labelyear+extrayear}} + \setunit{% + \global\booltrue{cbx:parens}% + \addspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1} + {\usebibmacro{prenote}} + {}% + \usebibmacro{cite:labelyear+extrayear}} {\usebibmacro{cite:shorthand}}} {\printnames{labelname}% \setunit{% @@ -58,7 +61,7 @@ \iffieldundef{shorthand} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} - {\iffieldundef{labelyear} + {\iffieldundef{labelyear} {\usebibmacro{cite:label}} {\usebibmacro{cite:labelyear+extrayear}}}} {\usebibmacro{cite:shorthand}}}} @@ -151,11 +154,16 @@ \DeclareCiteCommand{\textcite} {\boolfalse{cbx:parens}} {\usebibmacro{citeindex}% + \iffirstcitekey + {\setcounter{textcitetotal}{1}} + {\stepcounter{textcitetotal}% + \textcitedelim}% \usebibmacro{textcite}} {\ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} - {}% - \multicitedelim} + {}} {\usebibmacro{textcite:postnote}} +\DeclareMultiCiteCommand{\textcites}{\textcite}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx index 0fdb7f60eda..e5841f52d09 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx @@ -3,7 +3,11 @@ \ExecuteBibliographyOptions{labeldate,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} @@ -21,7 +25,7 @@ {\iffieldundef{prenote} {} {\global\undef\cbx@lasthash - \global\undef\cbx@lastyear}}} + \global\undef\cbx@lastyear}}} \newbibmacro*{cite:reinit}{% \global\undef\cbx@lasthash @@ -117,12 +121,13 @@ \savefield{labelyear}{\cbx@lastyear}} {\usebibmacro{cite:shorthand}% \global\undef\cbx@lastyear}}% - \savefield{namehash}{\cbx@lasthash}}% + \stepcounter{textcitecount}% + \savefield{namehash}{\cbx@lasthash}}% \setunit{% \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \multicitedelim}} + \textcitedelim}} \newbibmacro*{cite:shorthand}{% \printtext[bibhyperref]{\printfield{shorthand}}} @@ -163,13 +168,13 @@ {\setunit{}% \printtext{% \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}} - {}}} + {\bibcloseparen\global\boolfalse{cbx:parens}} + {}}} {\setunit{% \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}} - {}% - \multicitedelim}}} + {\bibcloseparen\global\boolfalse{cbx:parens}} + {}% + \textcitedelim}}} \DeclareCiteCommand{\cite} {\usebibmacro{cite:init}% @@ -227,19 +232,51 @@ {} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite} +\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}}} + +\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}} -\DeclareMultiCiteCommand{\textcites}{\textcite}{} +\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/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx index 97a4aa9bf21..c0ac1e0eb07 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx @@ -2,6 +2,9 @@ [\abx@cbxid] \ExecuteBibliographyOptions{labeldate,uniquename,uniquelist,autocite=inline} + +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + \newbool{cbx:parens} \newbibmacro*{cite}{% @@ -25,13 +28,13 @@ \ifnameundef{labelname} {\iffieldundef{shorthand} {\usebibmacro{cite:label}% - \setunit{% - \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% - \ifnumequal{\value{citecount}}{1} - {\usebibmacro{prenote}} - {}% - \usebibmacro{cite:labelyear+extrayear}} + \setunit{% + \global\booltrue{cbx:parens}% + \addspace\bibopenparen}% + \ifnumequal{\value{citecount}}{1} + {\usebibmacro{prenote}} + {}% + \usebibmacro{cite:labelyear+extrayear}} {\usebibmacro{cite:shorthand}}} {\printnames{labelname}% \setunit{% @@ -119,11 +122,16 @@ \DeclareCiteCommand{\textcite} {\boolfalse{cbx:parens}} {\usebibmacro{citeindex}% + \iffirstcitekey + {\setcounter{textcitetotal}{1}} + {\stepcounter{textcitetotal}% + \textcitedelim}% \usebibmacro{textcite}} {\ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} - {}% - \multicitedelim} + {}} {\usebibmacro{textcite:postnote}} +\DeclareMultiCiteCommand{\textcites}{\textcite}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx index 9f5a434b38b..d1ecbd63e9c 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-comp.cbx @@ -2,15 +2,21 @@ [\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\let\cbx@tempa=\empty + \global\boolfalse{cbx:parens}% \global\undef\cbx@lasthash \global\undef\cbx@lastnumber \global\undef\cbx@lastprefix @@ -22,7 +28,7 @@ \iffieldundef{shorthand} {\ifbool{bbx:subentry} {\iffieldundef{entrysetcount} - {\usebibmacro{cite:comp:comp}} + {\usebibmacro{cite:comp:comp}} {\usebibmacro{cite:comp:inset}}} {\usebibmacro{cite:comp:comp}}} {\usebibmacro{cite:comp:shand}}} @@ -35,17 +41,17 @@ } {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}} {\savefield{entrykey}{\cbx@lastkey}% - \savefield{labelnumber}{\cbx@lastnumber}% - \addtocounter{cbx@tempcnta}{1}} + \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{prefixnumber}% - \printfield{labelnumber}}}}} + {} + {\usebibmacro{cite:dump}% + \ifnumgreater{\value{cbx@tempcntb}}{-1} + {\multicitedelim} + {}% + \printtext[bibhyperref]{% + \printfield{prefixnumber}% + \printfield{labelnumber}}}}} {\usebibmacro{cite:comp:end}}% \setcounter{cbx@tempcntb}{\thefield{labelnumber}}% \savefield{prefixnumber}{\cbx@lastprefix}} @@ -86,7 +92,7 @@ \bibhyperref[\cbx@lastkey]{% \ifdef\cbx@lastprefix {\printtext[prefixnumber]{\cbx@lastprefix}} - {}% + {}% \printtext[labelnumber]{\cbx@lastnumber}}} {}% \setcounter{cbx@tempcnta}{0}% @@ -95,18 +101,25 @@ \newbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} {\usebibmacro{cite:comp}} - {\usebibmacro{cite:dump}\cbx@tempa + {\usebibmacro{cite:dump}% + \ifbool{cbx:parens} + {\bibclosebracket\global\boolfalse{cbx:parens}} + {}% + \iffirstcitekey + {} + {\textcitedelim}% \usebibmacro{cite:init}% \ifnameundef{labelname} {\printfield[citetitle]{labeltitle}} {\printnames{labelname}}% - \addspace\bibopenbracket + \global\booltrue{cbx:parens}% + \addspace\bibopenbracket% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% - \usebibmacro{cite:comp}}% - \savefield{namehash}{\cbx@lasthash}% - \gdef\cbx@tempa{\bibclosebracket\multicitedelim}} + \usebibmacro{cite:comp}% + \stepcounter{textcitecount}% + \savefield{namehash}{\cbx@lasthash}}} \DeclareCiteCommand{\cite}[\mkbibbrackets] {\usebibmacro{cite:init}% @@ -153,14 +166,6 @@ {\usebibmacro{cite:dump}% \usebibmacro{postnote}} -\DeclareCiteCommand{\textcite} - {\usebibmacro{cite:init}} - {\usebibmacro{citeindex}% - \usebibmacro{textcite}} - {} - {\usebibmacro{postnote}% - \bibclosebracket} - \DeclareCiteCommand{\supercite}[\mkbibsuperscript] {\usebibmacro{cite:init}% \let\multicitedelim=\supercitedelim @@ -175,8 +180,50 @@ {} {\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}}} + +\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} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote] + {\smartcite}{\multicitedelim} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-verb.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-verb.cbx index 8242120b64d..065f2ad2c7c 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-verb.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric-verb.cbx @@ -2,8 +2,12 @@ [\abx@cbxid] \ExecuteBibliographyOptions{labelnumber,autocite=inline} + \renewcommand*{\multicitedelim}{\addcomma\space} +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + \providebool{bbx:subentry} + \DeclareFieldFormat{entrysetcount}{\mknumalph{#1}} \newbibmacro*{cite}{% @@ -67,8 +71,12 @@ \DeclareCiteCommand{\textcite} {} {\usebibmacro{citeindex}% + \iffirstcitekey + {\setcounter{textcitetotal}{1}} + {\stepcounter{textcitetotal}% + \textcitedelim}% \usebibmacro{textcite}} - {\bibclosebracket\multicitedelim} + {\bibclosebracket} {\usebibmacro{postnote}% \bibclosebracket} @@ -85,6 +93,8 @@ {} \DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim} -\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote]{\smartcite}{\multicitedelim} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote] + {\smartcite}{\multicitedelim} +\DeclareMultiCiteCommand{\textcites}{\textcite}{} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric.cbx index 4f431473601..67af09ca407 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/numeric.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/numeric.cbx @@ -2,8 +2,14 @@ [\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}{% @@ -16,18 +22,44 @@ \newbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} - {\multicitedelim} - {\cbx@tempa - \ifnameundef{labelname} + {\setunit{\multicitedelim}} + {\ifnameundef{labelname} {\printfield[citetitle]{labeltitle}} {\printnames{labelname}}% - \addspace\bibopenbracket}% + \setunit{% + \global\booltrue{cbx:parens}% + \addspace\bibopenbracket}% + \stepcounter{textcitecount}% + \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \usebibmacro{cite}% - \savefield{namehash}{\cbx@lasthash}% - \gdef\cbx@tempa{\bibclosebracket\multicitedelim}} + \setunit{% + \ifbool{cbx:parens} + {\bibcloseparen\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} + {\bibcloseparen\global\boolfalse{cbx:parens}} + {}}} + {\setunit{% + \ifbool{cbx:parens} + {\bibcloseparen\global\boolfalse{cbx:parens}} + {}% + \textcitedelim}}} \DeclareCiteCommand{\cite}[\mkbibbrackets] {\usebibmacro{prenote}} @@ -64,15 +96,6 @@ {\multicitedelim} {\usebibmacro{postnote}} -\DeclareCiteCommand{\textcite} - {\let\cbx@tempa=\empty - \undef\cbx@lasthash} - {\usebibmacro{citeindex}% - \usebibmacro{textcite}} - {} - {\usebibmacro{postnote}% - \bibclosebracket} - \DeclareCiteCommand{\supercite}[\mkbibsuperscript] {\iffieldundef{prenote} {} @@ -85,8 +108,46 @@ {\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}}} + +\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} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibbrackets\mkbibfootnote] + {\smartcite}{\multicitedelim} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx index dff768ed174..c21cc843edd 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx @@ -2,13 +2,19 @@ [\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}{} @@ -86,7 +92,7 @@ \printfield{postnote}}} \ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict, - pagetracker,autocite=footnote,citepages=permit} + pagetracker,autocite=footnote,citepages=permit} \newbibmacro*{cite}{% \usebibmacro{cite:citepages}% @@ -167,17 +173,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} +\newbibmacro*{textcite}{% + \ifnameundef{labelname} + {\printfield[citetitle]{labeltitle}} + {\printnames{labelname}}} -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} +\newbibmacro*{textcite:init}{% + \citetrackerfalse% + \pagetrackerfalse% + \iffirstcitekey + {\global\undef\cbx@lasthash} + {}} + +\newbibmacro*{textcite:count}{% + \stepcounter{textcitetotal}% + \ifnumgreater{\value{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\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}} + {}} + {}} + {} + {} + +\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/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx index fc416ef3ba6..ab58e623dea 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx @@ -2,12 +2,18 @@ [\abx@cbxid] \DeclareFieldFormat{bibhyperlink}{% - \bibhyperlink{\thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}} + \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}{} @@ -86,8 +92,8 @@ \setunit{\addspace}% \printfield{postnote}}} -\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict,singletitle, - pagetracker,autocite=footnote,citepages=permit} +\ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict, + singletitle,pagetracker,autocite=footnote,citepages=permit} \newbibmacro*{cite}{% \usebibmacro{cite:citepages}% @@ -226,17 +232,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} +\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{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + +\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}} + {}} + {}} + {} + {} + +\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} -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites} + [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{% + \UseNextMultiCiteHook% + \AtNextMultiCite{% + \renewbibmacro{multiprenote}{}% + \renewbibmacro{multipostnote}{}}}{}{} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx index 70d697cfeb2..cf73b4c72e9 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx @@ -2,10 +2,16 @@ [\abx@cbxid] \DeclareFieldFormat{bibhyperlink}{% - \bibhyperlink{\thefield{entrykey}:\csuse{cbx@\iffootnote{f}{t}@\thefield{entrykey}}}{#1}} + \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}{} @@ -80,7 +86,8 @@ \setunit{\addspace}% \printfield{postnote}}} -\ExecuteBibliographyOptions{citetracker=context,singletitle,autocite=footnote,citepages=permit} +\ExecuteBibliographyOptions{citetracker=context,singletitle,autocite=footnote, + citepages=permit} \newbibmacro*{cite}{% \usebibmacro{cite:citepages}% @@ -196,17 +203,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} +\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{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + +\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}} + {}} + {}} + {} + {} + +\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} -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites} + [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{% + \UseNextMultiCiteHook% + \AtNextMultiCite{% + \renewbibmacro{multiprenote}{}% + \renewbibmacro{multipostnote}{}}}{}{} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx index 14d863c0b51..eca6a17053e 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx @@ -2,12 +2,17 @@ [\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} @@ -88,9 +93,8 @@ \printfield{postnote}}} \ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict, - idemtracker=constrict,opcittracker=context, - loccittracker=context,autocite=footnote, - citepages=permit} + idemtracker=constrict,opcittracker=context,loccittracker=context, + autocite=footnote,citepages=permit} \newbibmacro*{cite:save}{% \csxdef{cbx@lastcite@\thefield{entrykey}}{\the\value{instcount}}% @@ -201,17 +205,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} +\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{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + +\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}} + {}} + {}} + {} + {} + +\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} -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites} + [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{% + \UseNextMultiCiteHook% + \AtNextMultiCite{% + \renewbibmacro{multiprenote}{}% + \renewbibmacro{multipostnote}{}}}{}{} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx index c87aa5f6623..088d37dfa13 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx @@ -2,15 +2,22 @@ [\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}{} @@ -93,8 +100,7 @@ \printfield{postnote}}} \ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict, - idemtracker=constrict,autocite=footnote, - citepages=permit} + idemtracker=constrict,autocite=footnote,citepages=permit} \newbibmacro*{cite:save}{% \csxdef{cbx@lastcite@\thefield{entrykey}}{\the\value{instcount}}% @@ -193,17 +199,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} +\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{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + +\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}} + {}} + {}} + {} + {} + +\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} -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{} +\DeclareMultiCiteCommand{\textcites} + [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{} -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\let\cbx@textcites@init\cbx@textcite@init +\pretocmd{\cbx@textcites@init}{% + \UseNextMultiCiteHook% + \AtNextMultiCite{% + \renewbibmacro{multiprenote}{}% + \renewbibmacro{multipostnote}{}}}{}{} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx index 0f7cdb4a949..db9f3714719 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx @@ -2,12 +2,17 @@ [\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{strict}[true]{% @@ -83,8 +88,7 @@ \printfield{postnote}}} \ExecuteBibliographyOptions{citetracker=context,ibidtracker=constrict, - loccittracker=constrict,autocite=footnote, - citepages=permit} + loccittracker=constrict,autocite=footnote,citepages=permit} \newbibmacro*{cite}{% \usebibmacro{cite:citepages}% @@ -168,17 +172,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} - -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} - -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\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{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + +\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}} + {}} + {}} + {} + {} + +\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/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx index f219fb6d4d8..bced4a2337f 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx @@ -2,11 +2,16 @@ [\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}{} @@ -62,9 +67,9 @@ test {\ifnumequal{\value{citecount}}{\value{citetotal}}} and ( - not test {\iffieldundef{pages}} - or - not test {\iffieldundef{pagetotal}} + not test {\iffieldundef{pages}} + or + not test {\iffieldundef{pagetotal}} ) } {\usebibmacro{cite:postnote:pages}} @@ -137,17 +142,78 @@ {\multicitedelim} {\usebibmacro{cite:postnote}} -\DeclareCiteCommand{\textcite}[\cbx@textcite\footcite] - {\gdef\cbx@savedkeys{}} - {\printnames{labelname}% - \xappto\cbx@savedkeys{\thefield{entrykey},}} - {\multinamedelim} - {\protected@xappto\cbx@savedcites{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}} - -\newrobustcmd{\cbx@textcite}[2]{% - \def\cbx@savedcites{#1}#2\cbx@savedcites} - -\DeclareMultiCiteCommand{\textcites}[\cbx@textcite\footcites]{\textcite}{\multinamedelim} +\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{labelname}}{\value{textcitemaxnames}} + {\setcounter{textcitemaxnames}{\value{labelname}}} + {}} + +\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}} + {}} + {}} + {} + {} + +\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 |