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/biblatex1.sty | |
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/biblatex1.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex/biblatex1.sty | 581 |
1 files changed, 320 insertions, 261 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty index 8cdc5134eff..1a33fa547ed 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty @@ -69,7 +69,11 @@ amsrefs,apacite,babelbib,backref,bibtopic,bibunits,chapterbib, cite,citeref,drftcite,footbib,inlinebib,jurabib,mcite,mciteplus, mlbib,multibbl,multibib,natbib,opcit,overcite,splitbib,ucs}% - \@ifpackageloaded{babel} + \ifboolexpr{ + test {\@ifpackageloaded{babel}} + and + not test {\@ifpackageloaded{polyglossia}} + } {\iftoggle{blx@autolang} {\blx@mkbabel} {\blx@mknobabel}} @@ -137,10 +141,10 @@ \@ifclassloaded{memoir} {\def\do#1{% \patchcmd#1% - {\color@begingroup} - {\color@begingroup\toggletrue{blx@footnote}} - {} - {}}% + {\color@begingroup} + {\color@begingroup\toggletrue{blx@footnote}} + {} + {}}% \docsvlist{% \m@mold@footnotetext,% \@plainfootnotetext,% @@ -149,10 +153,10 @@ \@parafootnotetext}% \def\do#1{% \patchcmd#1% - {\color@begingroup\@makefntext} - {\color@begingroup\toggletrue{blx@footnote}\@makefntext} - {} - {}}% + {\color@begingroup\@makefntext} + {\color@begingroup\toggletrue{blx@footnote}\@makefntext} + {} + {}}% \docsvlist{% \@footnotetext,% patch twice \H@@footnotetext,% patch twice @@ -847,7 +851,7 @@ {Argument '#1' invalid} {\ifblank{#2} {The argument you have supplied is invalid.\MessageBreak - See the biblatex manual for details} + See the biblatex manual for details} {#2}}} \def\blx@err@invopt#1#2{% @@ -855,8 +859,8 @@ {Option '#1' invalid} {\ifblank{#2} {The option you have supplied is invalid.\MessageBreak - See the biblatex manual for valid option keys and - possible values} + See the biblatex manual for valid option keys and + possible values} {#2}}} \def\blx@err@confopt#1#2{% @@ -864,7 +868,7 @@ {Conflicting options\ifblank{#1}{}{ (#1)}} {\ifblank{#2} {The option you have supplied conflicts with another one.\MessageBreak - See the biblatex manual for valid option keys and possible values} + See the biblatex manual for valid option keys and possible values} {#2}}} \def\blx@err@optdef#1{% @@ -1001,20 +1005,20 @@ \or \blx@warning@noline{% backend=biber required by #1.\MessageBreak - Some features may not work properly}% + Some features may not work properly}% \else \blx@error {backend=biber required by #1} - {The selected style or one of the .bib files - requires backend=biber.\MessageBreak It will - not work at all with any other backend}% + {The selected style or one of the .bib files + requires backend=biber.\MessageBreak It will + not work at all with any other backend}% \fi}} -% \blx@list@active active aux files (basename) +% \blx@list@active active aux files (basename) % [internal list] -% \blx@list@inactive inactive aux files (basename) +% \blx@list@inactive inactive aux files (basename) % [internal list] -% \blx@list@bibfiles@<auxfile> aux file -> bib file mapping (refsections) +% \blx@list@bibfiles@<auxfile> aux file -> bib file mapping (refsections) % aux file (basename) -> bib files (full) % [internal list] @@ -1042,7 +1046,7 @@ \ifnum\blx@backend=\blx@backend@biber \ltxrequest{biblatex}{{\iftoggle{blx@runltx}{1}{0}}}{% \provides[type=dynamic]{ - \file{\jobname.bcf} + \file{\jobname.bcf} } \requires[type=dynamic]{ \file{\jobname.bbl} @@ -1050,65 +1054,65 @@ \ifdef\blx@list@req@edit {\requires[type=editable]{ \forlistloop\file\blx@list@req@edit - }} - {} + }} + {} \ifdef\blx@list@req@stat {\requires[type=static]{ \forlistloop\file\blx@list@req@stat - }} - {} + }} + {} }% \logrequest[package=biblatex,priority=5,active={{\iftoggle{blx@runbtx}{1}{0}}}]{% \generic{biber} \cmdline{ - \binary{biber} - \infile{\jobname} + \binary{biber} + \infile{\jobname} } \input{ - \file{\jobname.bcf} + \file{\jobname.bcf} } \output{ - \file{\jobname.bbl} + \file{\jobname.bbl} } \provides[type=dynamic]{ - \file{\jobname.bbl} + \file{\jobname.bbl} } \requires[type=dynamic]{ - \file{\jobname.bcf} + \file{\jobname.bcf} } \ifcsdef{blx@list@bibfiles@\jobname} - {\requires[type=editable]{ - \def\do{\file} - \dolistcsloop{blx@list@bibfiles@\jobname} - }} - {} + {\requires[type=editable]{ + \def\do{\file} + \dolistcsloop{blx@list@bibfiles@\jobname} + }} + {} }% \else \ltxrequest{biblatex}{{\iftoggle{blx@runltx}{1}{0}}}{% \provides[type=dynamic]{ - \def\do##1{\file{##1.aux}} - \dolistloop\blx@list@inactive - \file{\blx@ctrlfile@bibtex\blxauxsuffix.bib} + \def\do##1{\file{##1.aux}} + \dolistloop\blx@list@inactive + \file{\blx@ctrlfile@bibtex\blxauxsuffix.bib} } \requires[type=dynamic]{ - \def\do##1{\file{##1.bbl}} - \dolistloop\blx@list@inactive + \def\do##1{\file{##1.bbl}} + \dolistloop\blx@list@inactive } \ifdef\blx@list@req@edit {\requires[type=editable]{ \forlistloop\file\blx@list@req@edit - }} - {} + }} + {} \ifdef\blx@list@req@stat {\requires[type=static]{ \forlistloop\file\blx@list@req@stat - }} - {} + }} + {} }% \def\do##1{% \ifinlist{##1}{\blx@list@active} {\blx@logreq@bibtex{1}{##1}} - {\blx@logreq@bibtex{0}{##1}}}% + {\blx@logreq@bibtex{0}{##1}}}% \dolistloop\blx@list@inactive \fi \endgroup} @@ -1119,14 +1123,14 @@ \cmdline{% \ifcase\blx@backend \binary{bibtex} - \option{-min-crossrefs \blx@mincrossrefs} + \option{-min-crossrefs \blx@mincrossrefs} \or \binary{bibtex8} \option{--wolfgang} \option{--min\string_crossrefs \blx@mincrossrefs} - \ifdef\blx@csfencoding - {\option{--csfile \blx@csfencoding.csf}} - {}% + \ifdef\blx@csfencoding + {\option{--csfile \blx@csfencoding.csf}} + {}% \or \binary{bibtexu} \option{--wolfgang} @@ -1145,21 +1149,21 @@ } \requires[type=dynamic]{ \file{#2.aux} - \file{\blx@ctrlfile@bibtex\blxauxsuffix.bib} + \file{\blx@ctrlfile@bibtex\blxauxsuffix.bib} } \requires[type=editable]{ - \ifcsdef{blx@list@bibfiles@#2} - {\def\do{\file} - \dolistcsloop{blx@list@bibfiles@#2}} - {} + \ifcsdef{blx@list@bibfiles@#2} + {\def\do{\file} + \dolistcsloop{blx@list@bibfiles@#2}} + {} } \requires[type=static]{ \file{biblatex.bst} - \ifnum\blx@backend=\blx@backend@bibtexe - \ifdef\blx@csfencoding - {\file{\blx@csfencoding.csf}} - {}% - \fi + \ifnum\blx@backend=\blx@backend@bibtexe + \ifdef\blx@csfencoding + {\file{\blx@csfencoding.csf}} + {}% + \fi } }% } @@ -1223,7 +1227,7 @@ {\ifx\blx@checksum@old\blx@checksum@new \ifx\blx@pagesum@old\blx@pagesum@new \else - \blx@tempcnta\@ne + \blx@tempcnta\@ne \fi \else \blx@tempcnta\@ne @@ -1666,8 +1670,8 @@ {\ifdimgreater\lastskip\z@ {\unskip\unspace} {\ifnumgreater\lastpenalty\z@ - {\unpenalty\unspace} - {}}} + {\unpenalty\unspace} + {}}} {}} \newrobustcmd*{\bibsentence}{% @@ -1800,13 +1804,13 @@ {\ifcsdef{blx@bbx@*} {\blx@warning{% No driver for entry type '#1'.\MessageBreak - Using fallback driver}% + Using fallback driver}% \csuse{blx@bbx@*}} {\blx@error {No driver found} - {I can't find a driver for the entry type - '\abx@field@entrytype'\MessageBreak - and there is no fallback driver either}}}} + {I can't find a driver for the entry type + '\abx@field@entrytype'\MessageBreak + and there is no fallback driver either}}}} % {<type>}{<true>}{<false>} @@ -2324,6 +2328,19 @@ \expandafter\@secondoftwo \fi}}} +% {<true>}{<false>} + +\def\blx@imc@iffirstcitekey{% + \ifboolexpr{ ( test {\ifnumequal\c@multicitetotal\z@} + and test {\ifnumequal\c@citecount\@ne} ) + or ( test {\ifnumgreater\c@multicitetotal\z@} + and test {\ifnumequal\c@multicitecount\@ne} + and test {\ifnumequal\c@citecount\@ne} ) }} + +\def\blx@imc@iflastcitekey{% + \ifboolexpr{ test {\ifnumequal\c@citecount\c@citetotal} + and test {\ifnumequal\c@multicitecount\c@multicitetotal} }} + % {<category>}{<true>}{<false>} \protected\def\blx@imc@ifcategory{% @@ -2455,10 +2472,10 @@ {\blx@imc@iffieldundef{namehash} {\@secondoftwo} {\iftoggle{blx@footnote} - {\blx@ifmpfncheck + {\blx@ifmpfncheck {\blx@imc@iffieldequalcs{entrykey}{blx@lastkey@foot@\abx@field@namehash}} {\@secondoftwo}} - {\blx@imc@iffieldequalcs{entrykey}{blx@lastkey@text@\abx@field@namehash}}}} + {\blx@imc@iffieldequalcs{entrykey}{blx@lastkey@text@\abx@field@namehash}}}} {\@secondoftwo}}% % {<true>}{<false>} @@ -2780,8 +2797,8 @@ {\iffieldequalstr{#1}{none} {\def\blx@tempa{\blx@mkpageprefix@i}} {\iffieldbibstring{#1} - {\edef\blx@tempa{\blx@mkpageprefix{\thefield{#1}}}} - {\blx@warning@entry{% + {\edef\blx@tempa{\blx@mkpageprefix{\thefield{#1}}}} + {\blx@warning@entry{% Unknown pagination type '\strfield{#1}'}}}}% \@ifnextchar[%] {\blx@tempa} @@ -2808,8 +2825,8 @@ {\iffieldequalstr{#1}{none} {\def\blx@tempa{\blx@mkpagetotal@i}} {\iffieldbibstring{#1} - {\edef\blx@tempa{\blx@mkpagetotal{\thefield{#1}}}} - {\blx@warning@entry{% + {\edef\blx@tempa{\blx@mkpagetotal{\thefield{#1}}}} + {\blx@warning@entry{% Unknown pagination type '\strfield{#1}'}}}}% \@ifnextchar[%] {\blx@tempa} @@ -2925,8 +2942,8 @@ {\ifblank{#2} {\blx@range@out@value{#1\bibrangedash}} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} - {\blx@comprange@check{#1}{#2}}}}} + {\blx@range@out@value{\bibrangedash#2}} + {\blx@comprange@check{#1}{#2}}}}} \def\blx@comprange@hyphen#1-#2-#3&{% \ifblank{#3} @@ -2934,11 +2951,11 @@ {\ifblank{#2} {\ifblank{#1} {\let\blx@tempb\@empty} - {\def\blx@tempb{#1}}% + {\def\blx@tempb{#1}}% \blx@comprange@hyphen@i#3&} {\ifblank{#1} {\blx@range@out@value{\bibrangedash#2}} - {\blx@comprange@check{#1}{#2}}}}} + {\blx@comprange@check{#1}{#2}}}}} \def\blx@comprange@hyphen@i#1-#2&{% \ifblank{#1#2} @@ -2947,7 +2964,7 @@ {\notblank{#1} {\ifdefempty\blx@tempb {\blx@range@out@value{\bibrangedash#1}} - {\expandafter\blx@comprange@check + {\expandafter\blx@comprange@check \expandafter{\blx@tempb}{#1}}} {\blx@comprange@hyphen@i#2&}}} @@ -3077,7 +3094,7 @@ {\ifblank{#1} {\ifblank{#2} {\blx@firstpage@hyphen@i#3&} - {\blx@range@out@value{\bibrangedash#2}}} + {\blx@range@out@value{\bibrangedash#2}}} {\blx@range@out@value{#1}}}} \def\blx@firstpage@hyphen@i#1-#2&{% @@ -3224,11 +3241,12 @@ \ifdriver \thefield \strfield \csfield \usefield \thelist \thename \clearfield \clearlist \clearname \restorefield \restorelist \restorename \ifcategory \ifentrycategory \ifkeyword \ifentrykeyword - \ifciteseen \ifentryseen \ifciteibid \ifciteidem \ifopcit \ifloccit + \ifciteseen \ifentryseen \ifentryinbib \ifciteibid \ifciteidem \ifopcit \ifloccit \ifcurrentfield \ifcurrentlist \ifcurrentname \ifentrytype \iffieldequalcs \iffieldequals \iffieldequalstr \iffieldsequal \ifbibmacroundef \iffieldundef \iffieldxref \iflistequalcs \iflistequals - \iflistsequal \iflistundef \iflistxref \ifmorenames \ifmoreitems + \iflistsequal \iflistundef \iflistxref + \ifmorenames \ifmoreitems \iffirstcitekey \iflastcitekey \ifnameequalcs \ifnameequals \ifnamesequal \ifnameundef \ifnamexref \iffirstonpage \ifsamepage \savefield \savefieldcs \savelist \savelistcs \savename \savenamecs \usedriver @@ -3772,7 +3790,7 @@ \ifnum\c@liststop>\c@maxnames \c@liststop\c@minnames \ifnum\c@uniquelist>\c@liststop - \c@liststop\c@uniquelist + \c@liststop\c@uniquelist \fi \fi} {\ifnum#2>\c@listtotal @@ -3828,7 +3846,7 @@ {} {\begingroup \blx@namesetup{#2}{#3}{#4}% - \blx@indexnamesetup + \blx@indexnamesetup \expandafter\blx@nameparser\blx@thedata{}&% \endgroup}}} @@ -4151,7 +4169,7 @@ {\@secondoftwo} {\ifcsundef{\abx@str @\detokenize\expandafter \expandafter\expandafter{% - \csname abx@field@#1\endcsname}} + \csname abx@field@#1\endcsname}} {\@secondoftwo} {\@firstoftwo}}} @@ -4491,6 +4509,7 @@ \do{langitalian}% \do{langlatin}% \do{langnorwegian}% + \do{langpolish}% \do{langportuguese}% \do{langrussian}% \do{langspanish}% @@ -4510,6 +4529,7 @@ \do{fromitalian}% \do{fromlatin}% \do{fromnorwegian}% + \do{frompolish}% \do{fromportuguese}% \do{fromrussian}% \do{fromspanish}% @@ -4777,63 +4797,63 @@ {\printtext[#2date]{% \csuse{mkbibdate#1}{#2year}{#2month}{#2day}% \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} + {} + {\iffieldequalstr{#2endyear}{} {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + {\bibdatedash + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \newrobustcmd*{\mkbibrangetrunc}[2]{% \iffieldundef{#2year} {} {\printtext[#2date]{% \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} + {\iffieldsequal{#2month}{#2endmonth} {\csuse{mkbibdate#1}{}{}{#2day}} - {\csuse{mkbibdate#1}{}{#2month}{#2day}}} - {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% + {\csuse{mkbibdate#1}{}{#2month}{#2day}}} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% \iffieldundef{#2endyear} - {} - {\iffieldequalstr{#2endyear}{} + {} + {\iffieldequalstr{#2endyear}{} {\mbox{\bibdatedash}} - {\bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} + {\bibdatedash + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}}}}} \newrobustcmd*{\mkbibrangefullextra}[2]{% \iffieldundef{#2year} {} {\printtext[#2date]{% \printtext{% - \csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% + \csuse{mkbibdate#1}{#2year}{#2month}{#2day}}% \iffieldundef{#2endyear} - {\printfield{extrayear}} - {\iffieldequalstr{#2endyear}{} - {\printfield{extrayear}% - \printtext{\mbox{\bibdatedash}}} - {\printtext{% - \bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% - \printfield{extrayear}}}}}}} + {\printfield{extrayear}} + {\iffieldequalstr{#2endyear}{} + {\printfield{extrayear}% + \printtext{\mbox{\bibdatedash}}} + {\printtext{% + \bibdatedash + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% + \printfield{extrayear}}}}}}} \newrobustcmd*{\mkbibrangetruncextra}[2]{% \iffieldundef{#2year} {} {\printtext[#2date]{% \printtext{% - \iffieldsequal{#2year}{#2endyear} - {\iffieldsequal{#2month}{#2endmonth} + \iffieldsequal{#2year}{#2endyear} + {\iffieldsequal{#2month}{#2endmonth} {\csuse{mkbibdate#1}{}{}{#2day}} - {\csuse{mkbibdate#1}{}{#2month}{#2day}}} - {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}}% + {\csuse{mkbibdate#1}{}{#2month}{#2day}}} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}}}% \iffieldundef{#2endyear} - {\printfield{extrayear}} - {\iffieldequalstr{#2endyear}{} - {\printfield{extrayear}% - \printtext{\mbox{\bibdatedash}}} - {\printtext{% - \bibdatedash - \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% - \printfield{extrayear}}}}}}} + {\printfield{extrayear}} + {\iffieldequalstr{#2endyear}{} + {\printfield{extrayear}% + \printtext{\mbox{\bibdatedash}}} + {\printtext{% + \bibdatedash + \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% + \printfield{extrayear}}}}}}} \expandafter\newrobustcmd \expandafter*\csname mkbibrangeiso8601\endcsname[1]{% @@ -4842,8 +4862,8 @@ {\printtext[#1date]{% \blx@isodate{#1year}{#1month}{#1day}% \iffieldundef{#1endyear} - {} - {\addslash\blx@isodate{#1endyear}{#1endmonth}{#1endday}}}}} + {} + {\addslash\blx@isodate{#1endyear}{#1endmonth}{#1endday}}}}} \expandafter\newrobustcmd \expandafter*\csname mkbibrangeiso8601extra\endcsname[1]{% @@ -4852,8 +4872,8 @@ {\printtext[#1date]{% \blx@isodate[extrayear]{#1year}{#1month}{#1day}% \iffieldundef{#1endyear} - {} - {\addslash\blx@isodate{#1endyear}{#1endmonth}{#1endday}}}}} + {} + {\addslash\blx@isodate{#1endyear}{#1endmonth}{#1endday}}}}} \newrobustcmd*{\blx@isodate}[4][]{% \thefield{#2}\ifblank{#1}{}{\printfield{#1}}% @@ -4865,6 +4885,7 @@ \newrobustcmd*{\bibrangedash}{\textendash} \newrobustcmd*{\bibdatedash}{\bibrangedash} \newrobustcmd*{\finalandcomma}{} +\newrobustcmd*{\finalandsemicolon}{} \newrobustcmd*{\mkbibordinal}[1]{#1} \newrobustcmd*{\mkbibmascord}{\mkbibordinal} \newrobustcmd*{\mkbibfemord}{\mkbibordinal} @@ -4963,7 +4984,7 @@ \csname end\blx@thelangenv\endcsname \endgroup}% \csname\blx@thelangenv\expandafter\endcsname - \expandafter{\abx@field@hyphenation}}}}}% + \expandafter{\abx@field@hyphenation}}}}} {}% \def\blx@imc@mainlang{\select@language{\bbl@main@language}}% \blx@langsetup\bbl@main@language} @@ -5421,7 +5442,7 @@ % {<counter>}{<value>} -\protected\long\def\blx@bbl@countdef#1#2{% +\protected\long\def\blx@bbl@cntdef#1#2{% \csxappto\blx@bbl@data{% \csname c@#1\endcsname#2\relax}} @@ -5446,9 +5467,9 @@ {\@secondoftwo} {} {\csxappto\blx@bbl@data{% - \csname c@#1\endcsname\NewCount\relax - \def\expandafter\noexpand\csname abx@list@#1\endcsname - {\expandonce\NewValue}}}} + \csname c@#1\endcsname\NewCount\relax + \def\expandafter\noexpand\csname abx@list@#1\endcsname + {\expandonce\NewValue}}}} % {<name>}{<itemcount>}{<value>} @@ -5463,9 +5484,9 @@ {\@secondoftwo} {} {\csxappto\blx@bbl@data{% - \csname c@#1\endcsname\NewCount\relax - \def\expandafter\noexpand\csname abx@name@#1\endcsname - {{\expandonce\NewOption}{\expandonce\NewValue}}}}} + \csname c@#1\endcsname\NewCount\relax + \def\expandafter\noexpand\csname abx@name@#1\endcsname + {{\expandonce\NewOption}{\expandonce\NewValue}}}}} % {<entrykey>,...} @@ -5582,16 +5603,17 @@ % key -> pages [internal list] % \blx@refs@<section> xref hash, temporary % section -> parents [internal list] -% (BibTeX only) +% (BibTeX only) % \blx@refp@<section>@<entrykey> parent -> child mapping (xrefs), temporary % key -> keys [internal list] -% (BibTeX only) +% (BibTeX only) % \blx@refc@<section>@<entrykey> child -> parent mapping (xrefs) % key -> key [internal list] -% (BibTeX only) +% (BibTeX only) \def\blx@ifdata#1{% \ifcsdef{blx@data@\the\c@refsection @#1}} +\let\blx@imc@ifentryinbib\blx@ifdata \def\blx@getdata#1{% \csuse{blx@data@\the\c@refsection @#1}% @@ -5605,10 +5627,10 @@ \blx@ifdata{#1} {\def\abx@field@childentrykey{#1}% \begingroup - \blx@getdata{#1}% - \edef\blx@tempa{\endgroup - \def\noexpand\abx@field@childentrytype{\abx@field@entrytype}}% - \blx@tempa} + \blx@getdata{#1}% + \edef\blx@tempa{\endgroup + \def\noexpand\abx@field@childentrytype{\abx@field@entrytype}}% + \blx@tempa} {}} {\blx@getdata{#1}}% \ifcsdef{blx@seti@\the\c@refsection @#1} @@ -5759,25 +5781,25 @@ {} {\ifundef\abx@field@shorthand {\ifdef\abx@field@localnumber - {} - {\csnumgdef{blx@labelnumber@\the\c@refsection}{% + {} + {\csnumgdef{blx@labelnumber@\the\c@refsection}{% \csuse{blx@labelnumber@\the\c@refsection}+1}% \edef\abx@field@localnumber{% \csuse{blx@labelnumber@\the\c@refsection}}}% - \blx@bbl@fieldedef{labelnumber}{\abx@field@localnumber}% - \iftoggle{blx@skipbib} - {} - {\blx@setlabwidth{\labelnumberwidth}{% + \blx@bbl@fieldedef{labelnumber}{\abx@field@localnumber}% + \iftoggle{blx@skipbib} + {} + {\blx@setlabwidth{\labelnumberwidth}{% \csuse{abx@ffd@*@labelnumberwidth}{% - \ifdef\abx@field@prefixnumber - {\csuse{abx@ffd@*@prefixnumber}{\abx@field@prefixnumber}} - {}% - \abx@field@localnumber}}}} + \ifdef\abx@field@prefixnumber + {\csuse{abx@ffd@*@prefixnumber}{\abx@field@prefixnumber}} + {}% + \abx@field@localnumber}}}} {\csgappto\blx@bbl@data{% - \let\abx@field@labelnumber\abx@field@shorthand}% - \iftoggle{blx@skipbib} - {} - {\blx@setlabwidth{\labelnumberwidth}{% + \let\abx@field@labelnumber\abx@field@shorthand}% + \iftoggle{blx@skipbib} + {} + {\blx@setlabwidth{\labelnumberwidth}{% \csuse{abx@ffd@*@labelnumberwidth}{\abx@field@shorthand}}}}}} \def\blx@bbl@prefixnumber{% @@ -5798,9 +5820,9 @@ {} {\blx@setlabwidth{\labelalphawidth}{% \csuse{abx@ffd@*@labelalphawidth}{% - \ifdef\abx@field@prefixnumber - {\csuse{abx@ffd@*@prefixnumber}{\abx@field@prefixnumber}} - {}% + \ifdef\abx@field@prefixnumber + {\csuse{abx@ffd@*@prefixnumber}{\abx@field@prefixnumber}} + {}% \csuse{abx@ffd@*@labelalpha}{\abx@field@labelalpha}% \ifundef\abx@field@extraalpha {} @@ -5928,7 +5950,7 @@ \let\list\blx@bbl@listdef \let\field\blx@bbl@fielddef \let\strng\blx@bbl@stringdef - \let\count\blx@bbl@countdef + \let\cnt\blx@bbl@cntdef \let\true\blx@bbl@booltrue \let\false\blx@bbl@boolfalse \let\verb\blx@bbl@verbdef @@ -5967,19 +5989,19 @@ \nottoggle{blx@skiplab} {\iftoggle{blx@labelnumber} {\ifundef\abx@field@shorthand - {\ifundef\abx@field@localnumber - {\iftoggle{blx@omitnumbers} - {\let\abx@field@localnumber\@empty} - {\csnumgdef{blx@labelnumber@\the\c@refsection}{% - \csuse{blx@labelnumber@\the\c@refsection}+1}% - \edef\abx@field@localnumber{\csuse{blx@labelnumber@\the\c@refsection}}% - \blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% - {localnumber}{\abx@field@localnumber}}% - \blx@auxwrite\@mainaux{}{% - \string\abx@aux@number{\the\c@instcount}{\abx@field@entrykey}% - {\the\c@refsection}{\abx@field@localnumber}}} - {}} - {}}% + {\ifundef\abx@field@localnumber + {\iftoggle{blx@omitnumbers} + {\let\abx@field@localnumber\@empty} + {\csnumgdef{blx@labelnumber@\the\c@refsection}{% + \csuse{blx@labelnumber@\the\c@refsection}+1}% + \edef\abx@field@localnumber{\csuse{blx@labelnumber@\the\c@refsection}}% + \blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% + {localnumber}{\abx@field@localnumber}}% + \blx@auxwrite\@mainaux{}{% + \string\abx@aux@number{\the\c@instcount}{\abx@field@entrykey}% + {\the\c@refsection}{\abx@field@localnumber}}} + {}} + {}}% {}} {}% \endgroup} @@ -5988,15 +6010,15 @@ \nottoggle{blx@skiplab} {\ifdef\blx@prefixnumbers {\ifundef\abx@field@shorthand - {\edef\abx@field@prefixnumber{\expandonce\blx@prefixnumbers}% - \ifundef\abx@field@prefixnumber + {\edef\abx@field@prefixnumber{\expandonce\blx@prefixnumbers}% + \ifundef\abx@field@prefixnumber {\blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% - {prefixnumber}{\expandonce\abx@field@prefixnumber}} - {}% - \blx@auxwrite\@mainaux{}{% - \string\blx@aux@numprefix{\abx@field@entrykey}% - {\the\c@refsection}{\expandonce\abx@field@prefixnumber}}} - {}} + {prefixnumber}{\expandonce\abx@field@prefixnumber}} + {}% + \blx@auxwrite\@mainaux{}{% + \string\blx@aux@numprefix{\abx@field@entrykey}% + {\the\c@refsection}{\expandonce\abx@field@prefixnumber}}} + {}} {}} {}} @@ -6196,7 +6218,7 @@ {} {\ifcsdef{blx@flt@#1} {\csname blx@flt@#1\endcsname} - {\blx@flt@error}}} + {\blx@flt@error}}} {\ifcsdef{blx@flt@#1} {\csname blx@flt@#1\endcsname{\detokenize{#2}}} {\blx@flt@error}}} @@ -6280,9 +6302,9 @@ \blx@error {'type' used multiple times} {When passing multiple filter options, each entry\MessageBreak - must satisfy all conditions (AND conjunction),\MessageBreak - hence some options may not be used twice.\MessageBreak - Use 'filter' and '\string\defbibfilter' with OR conjunctions}}}} + must satisfy all conditions (AND conjunction),\MessageBreak + hence some options may not be used twice.\MessageBreak + Use 'filter' and '\string\defbibfilter' with OR conjunctions}}}} \define@key{blx@bib}{nottype}{\blx@key@nottype{#1}} \define@key{blx@los}{nottype}{\blx@key@nottype{#1}} @@ -6308,9 +6330,9 @@ \blx@error {'subtype' used multiple times} {When passing multiple filter options, each entry\MessageBreak - must satisfy all conditions (AND conjunction),\MessageBreak - hence some options may not be used twice.\MessageBreak - Use 'filter' and '\string\defbibfilter' with OR conjunctions}}}} + must satisfy all conditions (AND conjunction),\MessageBreak + hence some options may not be used twice.\MessageBreak + Use 'filter' and '\string\defbibfilter' with OR conjunctions}}}} \define@key{blx@bib}{notsubtype}{\blx@key@notsubtype{#1}} \define@key{blx@los}{notsubtype}{\blx@key@notsubtype{#1}} @@ -6395,7 +6417,7 @@ {\blx@error {Heading '#1' not found} {The heading '#1' could not be found.\MessageBreak - Use \string\defbibheading\space to define it}} + Use \string\defbibheading\space to define it}} {\def\blx@theheading{#1}}} \define@key{blx@bib}{env}{\blx@key@env{#1}} @@ -6409,7 +6431,7 @@ {\blx@error {Environment '#1' not found} {The environment '#1' could not be found.\MessageBreak - Use \string\defbibenvironment\space to define it}} + Use \string\defbibenvironment\space to define it}} {\def\blx@theenv{#1}}} \define@key{blx@bhd}{title}{\def\blx@thetitle{#1}} @@ -6426,7 +6448,7 @@ {\blx@error {Note '#1' not found} {The note '#1' could not be found.\MessageBreak - Use \string\defbibnote\space to define it}} + Use \string\defbibnote\space to define it}} {\def\blx@theprenote{#1}}} \define@key{blx@bib}{postnote}{\blx@key@postnote{#1}} @@ -6440,7 +6462,7 @@ {\blx@error {Note '#1' not found} {The note '#1' could not be found.\MessageBreak - Use \string\defbibnote\space to define it}} + Use \string\defbibnote\space to define it}} {\def\blx@thepostnote{#1}}} \define@key{blx@bib}{resetnumbers}[true]{% @@ -6737,8 +6759,8 @@ {} {\ifnum\c@instcount>\@ne \blx@imc@iffieldequals{sortinit}\blx@previnit - {} - {\addvspace{\bibinitsep}}% + {} + {\addvspace{\bibinitsep}}% \fi \global\let\blx@previnit\abx@field@sortinit}} @@ -6755,6 +6777,10 @@ \@onlypreamble\AtBeginBibliography \@onlypreamble\AtEveryBibitem +\def\blx@imc@UseBibitemHook{\csuse{blx@hook@bibitem}} + +\blx@regimcs{\UseBibitemHook} + \newrobustcmd*{\AtNextBibliography}{% \ifundef\blx@hook@bibinit@next {\gdef\blx@hook@bibinit@next{\global\undef\blx@hook@bibinit@next}} @@ -7083,15 +7109,15 @@ {\toggletrue{blx@tempa}% \def\do##1{% \pretocmd##1{#1} - {\togglefalse{blx@tempa}\listbreak} - {}}% + {\togglefalse{blx@tempa}\listbreak} + {}}% \docsvlist{% - \H@old@part,% hyperref - \NR@part,% nameref - \@part}% latex/koma-script/memoir + \H@old@part,% hyperref + \NR@part,% nameref + \@part}% latex/koma-script/memoir \iftoggle{blx@tempa} - {\blx@err@patch{\string\@part}} - {}% + {\blx@err@patch{\string\@part}} + {}% \let\do\noexpand}} \def\blx@refpatch@chapter#1{% @@ -7242,10 +7268,10 @@ \define@key{blx@addbib}{location}{\def\blx@tempc{#1}} \define@key{blx@addbib}{label}{\edef\blx@tempd{\detokenize{#1}}} -% \blx@res@type@<resource> resource -> type -% \blx@res@data@<resource> resource -> datatype -% \blx@res@loca@<resource> resource -> datatype -% \blx@res@labl@<resource> label -> resource +% \blx@res@type@<resource> resource -> type +% \blx@res@data@<resource> resource -> datatype +% \blx@res@loca@<resource> resource -> datatype +% \blx@res@labl@<resource> label -> resource \def\blx@addbib@register#1{% \csxdef{blx@res@type@#1}{\blx@tempa}% @@ -7275,19 +7301,25 @@ \eappto#1{% \blx@xml@datasource {\ifcsdef{blx@res@type@#2} - {\csuse{blx@res@type@#2}} - {file}} + {\csuse{blx@res@type@#2}} + {file}} {\ifcsdef{blx@res@data@#2} - {\csuse{blx@res@data@#2}} - {bibtex}} + {\csuse{blx@res@data@#2}} + {bibtex}} {#3}}} %% Citations \newrobustcmd*{\AtEveryCite}{\gappto\blx@hook@cite} \newrobustcmd*{\AtEveryCitekey}{\gappto\blx@hook@citekey} +\newrobustcmd*{\AtEveryMultiCite}{\gappto\blx@hook@mcite} \@onlypreamble\AtEveryCite \@onlypreamble\AtEveryCitekey +\@onlypreamble\AtEveryMultiCite + +\def\blx@imc@UseEveryCiteHook{\csuse{blx@hook@cite}} +\def\blx@imc@UseEveryCitekeyHook{\csuse{blx@hook@citekey}} +\def\blx@imc@UseEveryMultiCiteHook{\csuse{blx@hook@mcite}} \newrobustcmd*{\AtNextCite}{% \ifundef\blx@hook@cite@next @@ -7301,7 +7333,24 @@ {}% \gappto\blx@hook@citekey@next} -% {<style>] +\newrobustcmd*{\AtNextMultiCite}{% + \ifundef\blx@hook@mcite@next + {\gdef\blx@hook@mcite@next{\global\undef\blx@hook@mcite@next}} + {}% + \gappto\blx@hook@mcite@next} + +\def\blx@imc@UseNextCiteHook{\csuse{blx@hook@cite@next}} +\def\blx@imc@UseNextCitekeyHook{\csuse{blx@hook@citekey@next}} +\def\blx@imc@UseNextMultiCiteHook{\csuse{blx@hook@mcite@next}} + +\def\blx@imc@DeferNextCitekeyHook{\undef\blx@hook@citekey@next} + +\blx@regimcs{% + \UseEveryCiteHook \UseEveryCitekeyHook \UseEveryMultiCiteHook + \UseNextCiteHook \UseNextCitekeyHook \UseNextMultiCiteHook + \DeferNextCitekeyHook} + +% {<style>} \newrobustcmd*{\RequireCitationStyle}[1]{% \blx@inputonce{#1.cbx}{citation style '#1'}{}{}{} @@ -7333,8 +7382,8 @@ \ifbool{citerequest} {\ifnumless\blx@backend\blx@backend@biber % BibTeX only {\ifcsdef{blx@setp@\the\c@refsection @#1} - {\blx@citation@set{#1}{#2}} - {\ifcsdef{blx@setc@\the\c@refsection @#1} + {\blx@citation@set{#1}{#2}} + {\ifcsdef{blx@setc@\the\c@refsection @#1} {\blx@citation@inset{#1}{#2}} {\blx@citation@entry{#1}{#2}}}} {\blx@citation@entry{#1}{#2}}% @@ -7352,8 +7401,8 @@ {} {\ifcsdef{blx@miss@\the\c@refsection} {\ifinlistcs{#1}{blx@miss@\the\c@refsection} - {} - {\blx@logreq@active{#2{#1}}}} + {} + {\blx@logreq@active{#2{#1}}}} {\blx@logreq@active{#2{#1}}}}} \def\blx@citation@set#1#2{% @@ -7432,12 +7481,12 @@ \blx@tempb {} {\blx@error - {Conflicting definitions of '\blx@tempa'} - {The entry set '\blx@tempa' been defined before.\MessageBreak - old: \blx@tempa\space = % - \csuse{blx@set@\the\c@refsection @\blx@tempa}\MessageBreak - new: \blx@tempa\space = \blx@tempb\MessageBreak - I'm ignoring the new definition}}} + {Conflicting definitions of '\blx@tempa'} + {The entry set '\blx@tempa' been defined before.\MessageBreak + old: \blx@tempa\space = % + \csuse{blx@set@\the\c@refsection @\blx@tempa}\MessageBreak + new: \blx@tempa\space = \blx@tempb\MessageBreak + I'm ignoring the new definition}}} {\global\cslet{blx@set@\the\c@refsection @\blx@tempa}\blx@tempb \edef\blx@tempa{% \AfterPreamble{\blx@setreq{\blx@tempa}{\blx@tempb}}}% @@ -7553,8 +7602,8 @@ \ifbool{@filesw} {\ifbool{citetracker} {\immediate\write\@mainaux{% - \string\abx@aux@count - {\the\c@refsection}{\abx@field@entrykey}}} + \string\abx@aux@count + {\the\c@refsection}{\abx@field@entrykey}}} {}} {}} @@ -7562,10 +7611,10 @@ \ifbool{@filesw} {\ifbool{citetracker} {\immediate\write\@mainaux{% - \iftoggle{blx@footnote} - {\string\abx@aux@fncount} - {\string\abx@aux@count}% - {\the\c@refsection}{\abx@field@entrykey}}} + \iftoggle{blx@footnote} + {\string\abx@aux@fncount} + {\string\abx@aux@count}% + {\the\c@refsection}{\abx@field@entrykey}}} {}} {}} @@ -7939,19 +7988,19 @@ {\ifcsdef{blx@setc@\the\c@refsection @#1} {\ifcase\blx@backrefsetstyle \blx@addbackref@ii{setc}{#1}% - \or - \blx@addbackref@i{#1}% - \or - \blx@addbackref@i{#1}% - \or - \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% \blx@addbackref@ii{setc}{#1}% - \or - \blx@addbackref@i{#1}% - \or - \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% \blx@addbackref@ii{setc}{#1}% - \fi} + \fi} {\blx@addbackref@i{#1}}}} \def\blx@addbackref@i#1{% @@ -7959,8 +8008,8 @@ \blx@leavevmode \if@filesw \protected@write\@mainaux{}{\string\abx@aux@backref - {\the\c@instcount}{#1}{\the\c@refsection}% - {\thepage}{\noexpand\the\c@page}}% + {\the\c@instcount}{#1}{\the\c@refsection}% + {\thepage}{\noexpand\the\c@page}}% \fi \fi} @@ -8008,7 +8057,7 @@ \blx@sfsave}\blx@sfrest}% \protected\long\def\blx@imc@bibhyperlink#1#2{% \blx@sfsave\hyperlink{cite.\the\c@refsection:#1}{\blx@sfrest - #2% + #2% \blx@sfsave}\blx@sfrest}% \protected\long\def\blx@imc@bibhypertarget#1#2{% \blx@sfsave\hypertarget{cite.\the\c@refsection:#1}{\blx@sfrest @@ -8055,8 +8104,8 @@ \iftoggle{blx@bibliography} {} {\ifstrequal{*}{#1} - {\blx@citation@all} - {\blx@xsanitizeafter{\forcsvlist\blx@nocite@do}{#1}}}}% + {\blx@citation@all} + {\blx@xsanitizeafter{\forcsvlist\blx@nocite@do}{#1}}}}% \@esphack} \def\blx@nocite@do#1{\blx@citation{#1}\blx@msg@cundef} @@ -8127,8 +8176,10 @@ \fi \blx@checkpunct@ii} \def\blx@checkpunct@iii#1\blx@checkpunct@ii{% + \global\undef\abx@field@postpunct \blx@tempa{\blx@postpunct}} \def\blx@checkpunct@iv#1\blx@checkpunct@ii#2{% + \gdef\abx@field@postpunct{#3}% \edef\blx@tempa{% \expandonce\blx@tempa{% \ifcsdef{blx@pm@\detokenize{#3}} @@ -8259,6 +8310,8 @@ \ifnum\c@multicitetotal>\@ne \let\blx@ifcitesingle\@secondoftwo \fi + \csuse{blx@hook@mcite}% + \csuse{blx@hook@mcite@next}% \ifblank{#2}% {} {\def\abx@field@multiprenote{#2}}% @@ -8312,6 +8365,7 @@ \def\blx@multicite#1#2#3#4{% \begingroup + \csuse{blx@hook@mcite@before}% \def\blx@tempa{#1}% \def\blx@tempb{#2}% \def\blx@tempc{#3}% @@ -8572,8 +8626,11 @@ \def\ifhyperref{\blx@TE\blx@imc@ifhyperref}% \def\ifmorenames{\blx@TE\blx@imc@ifmorenames}% \def\ifmoreitems{\blx@TE\blx@imc@ifmoreitems}% + \def\iffirstcitekey{\blx@TE\blx@imc@iffirstcitekey}% + \def\iflastcitekey{\blx@TE\blx@imc@iflastcitekey}% \def\ifciteseen{\blx@TE\blx@imc@ifciteseen}% \def\ifentryseen{\blx@TE\blx@imc@ifentryseen}% + \def\ifentryinbib{\blx@TE\blx@imc@ifentryinbib}% \def\ifciteibid{\blx@TE\blx@imc@ifciteibid}% \def\ifciteidem{\blx@TE\blx@imc@ifciteidem}% \def\ifopcit{\blx@TE\blx@imc@ifopcit}% @@ -8588,6 +8645,7 @@ \def\iffieldequals#1#2{\blx@TE{\blx@imc@iffieldequals{#1}{#2}}}% \def\iffieldequalstr#1#2{\blx@TE{\blx@imc@iffieldequalstr{#1}{#2}}}% \def\iffieldsequal#1#2{\blx@TE{\blx@imc@iffieldsequal{#1}{#2}}}% + \def\ifbibmacroundef#1{\blx@TE{\blx@imc@ifbibmacroundef{#1}}}% \def\iffieldundef#1{\blx@TE{\blx@imc@iffieldundef{#1}}}% \def\ifnameequalcs#1#2{\blx@TE{\blx@imc@ifnameequalcs{#1}{#2}}}% \def\ifnameequals#1#2{\blx@TE{\blx@imc@ifnameequals{#1}{#2}}}% @@ -8897,8 +8955,8 @@ {\ifdef\pagenote {\def\blx@theendnote{\pagenote}% \ifdef\pagenotetext - {\def\blx@theendnotetext{\pagenotetext}} - {}} + {\def\blx@theendnotetext{\pagenotetext}} + {}} {}}} \newrobustcmd*{\mknumalph}[1]{% @@ -8922,35 +8980,36 @@ n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\else \blx@warning@entry{Value out of range}\number#1\fi} -\newrobustcmd*{\volcitecmd}[1]{% - \begingroup - \def\blx@tempa{\endgroup#1}% - \@ifstar - {\appto\blx@tempa{*}% - \blx@volcitecmd@i} - {\blx@volcitecmd@i}} +% {<macro>}[<pre>]{<vol>}[<post>] => <macro>{<pre>}{{<vol>}{<post>}} -\def\blx@volcitecmd@i{% +\newrobustcmd*{\volcitecmd}{% + \AtNextCite{\DeclareFieldAlias{postnote}{volcitenote}}% + \begingroup\let\blx@citeargs\blx@volciteargs} + +\protected\def\blx@volciteargs#1{% + \endgroup \@ifnextchar[%] - {\blx@volcitecmd@ii} - {\blx@volcitecmd@ii[]}} + {\blx@volciteargs@i{#1}} + {\blx@volciteargs@i{#1}[]}} -\def\blx@volcitecmd@ii[#1]#2{% - \appto\blx@tempa{[#1]}% - \blx@getformat\blx@tempb{ffd}{}{volcitevolume}% +\long\def\blx@volciteargs@i#1[#2]#3{% \@ifnextchar[%] - {\blx@volcitecmd@iii{#2}} - {\edef\blx@tempa{\expandonce\blx@tempa[{% - \expandonce{\blx@tempb{#2}}}]}% - \blx@tempa}} + {\blx@volciteargs@ii{#1}{#2}{#3}} + {\blx@citeargs@iii{#1{#2}{{#3}{}}}}} -\def\blx@volcitecmd@iii#1[#2]{% - \blx@getformat\blx@tempc{ffd}{}{volcitepages}% - \edef\blx@tempa{\expandonce\blx@tempa[{% - \expandonce{\blx@tempb{#1}}% - \noexpand\volcitedelim - \expandonce{\blx@tempc{#2}}}]}% - \blx@tempa} +\long\def\blx@volciteargs@ii#1#2#3[#4]{% + \blx@citeargs@iii{#1{#2}{{#3}{#4}}}} + +\newrobustcmd*{\multivolcitecmd}{% + \AtNextCite{\DeclareFieldAlias{postnote}{volcitenote}}% + \def\blx@hook@mcite@before{% + \global\undef\blx@hook@mcite@before + \let\blx@citeargs\blx@volmciteargs}} + +\protected\def\blx@volmciteargs#1{% + \@ifnextchar[%] + {\blx@volciteargs@i{#1}} + {\blx@volciteargs@i{#1}[]}} %% Control file |