diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-24 20:53:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-24 20:53:26 +0000 |
commit | 0b2e3d90de5730215a88a0bcf9b18495d512a23b (patch) | |
tree | 266db2ba05a0028a1fec4b50160b054478c78b7c /Master/texmf-dist/tex/latex/biblatex | |
parent | 84f8a525e2b7f097efa0065802286d59857225a4 (diff) |
biblatex (24aug19)
git-svn-id: svn://tug.org/texlive/trunk@51953 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex')
31 files changed, 1709 insertions, 907 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/alphabetic.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/alphabetic.bbx index 8a41db44fa8..fa603e87ac4 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/alphabetic.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/alphabetic.bbx @@ -6,7 +6,7 @@ \providebool{bbx:subentry} -\DeclareBibliographyOption[boolean]{subentry}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{subentry}[true]{% \setbool{bbx:subentry}{#1}} \DeclareNameAlias{author}{default} diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx index b7f558329da..d8e156cd36b 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx @@ -9,7 +9,7 @@ \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}} {\renewbibmacro*{bbx:savehash}{}}} -\DeclareBibliographyOption[boolean]{mergedate}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{mergedate}[true]{% \ifcsdef{bbx@opt@mergedate@#1} {\csuse{bbx@opt@mergedate@#1}} {\PackageError{biblatex} diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx index 70c2134c4eb..4bf46c3ff8a 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx @@ -6,7 +6,7 @@ \providebool{bbx:subentry} -\DeclareBibliographyOption[boolean]{subentry}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{subentry}[true]{% \setbool{bbx:subentry}{#1}} \DeclareNameAlias{author}{default} diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/reading.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/reading.bbx index 6e9e25be2d1..547510c37df 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/reading.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/reading.bbx @@ -102,21 +102,21 @@ \newbool{bbx:library} \newbool{bbx:file} -\DeclareBibliographyOption[boolean]{entryhead}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{entryhead}[true]{% \ifcsdef{bbx@item@#1} {\letcs\bbx@item{bbx@item@#1}} {\PackageError{biblatex} {Invalid option 'header=#1'} {Valid values: header=true, false, full, name.}}} -\DeclareBibliographyOption[boolean]{entrykey}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{entrykey}[true]{% \setbool{bbx:entrykey}{#1}} -\DeclareBibliographyOption[boolean]{annotation}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{annotation}[true]{% \setbool{bbx:annotation}{#1}} -\DeclareBibliographyOption[boolean]{abstract}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{abstract}[true]{% \setbool{bbx:abstract}{#1}} -\DeclareBibliographyOption[boolean]{library}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{library}[true]{% \setbool{bbx:library}{#1}} -\DeclareBibliographyOption[boolean]{file}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{file}[true]{% \setbool{bbx:file}{#1}} \ExecuteBibliographyOptions{loadfiles,entryhead,entrykey,annotation,abstract,library,file} diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx index 9e48d9a235e..3046bd10e89 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx @@ -7,15 +7,15 @@ \newtoggle{bbx:eprint} \newtoggle{bbx:related} -\DeclareBibliographyOption[boolean]{isbn}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{isbn}[true]{% \settoggle{bbx:isbn}{#1}} -\DeclareBibliographyOption[boolean]{url}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{url}[true]{% \settoggle{bbx:url}{#1}} -\DeclareBibliographyOption[boolean]{doi}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{doi}[true]{% \settoggle{bbx:doi}{#1}} -\DeclareBibliographyOption[boolean]{eprint}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{eprint}[true]{% \settoggle{bbx:eprint}{#1}} -\DeclareBibliographyOption[boolean]{related}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{related}[true]{% \settoggle{bbx:related}{#1}} \ExecuteBibliographyOptions{isbn,url,doi,eprint,related} @@ -343,6 +343,45 @@ {}% \usebibmacro{finentry}} +\DeclareBibliographyDriver{dataset}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{type}% + \newunit + \printfield{edition}% + \newunit + \printfield{version}% + \newunit\newblock + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \printlist{organization}% + \newunit + \usebibmacro{publisher+location+date}% + \newunit\newblock + \usebibmacro{doi+eprint+url}% + \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} + \DeclareBibliographyDriver{manual}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -446,6 +485,10 @@ \newunit\newblock \usebibmacro{date}% \newunit\newblock + \iftoggle{bbx:doi} + {\printfield{doi}} + {}% + \newunit\newblock \iftoggle{bbx:eprint} {\usebibmacro{eprint}} {}% @@ -713,6 +756,7 @@ \DeclareBibliographyAlias{inreference}{incollection} \DeclareBibliographyAlias{suppperiodical}{article} \DeclareBibliographyAlias{review}{article} +\DeclareBibliographyAlias{software}{misc} \DeclareBibliographyAlias{*}{misc} \newbibmacro*{maintitle+title}{% @@ -921,7 +965,11 @@ \ifnumgreater{\value{bbx:relatedcount}}{1} {\ifcsundef{relateddelim\strfield{relatedtype}} {\printunit{\relateddelim}} - {\printunit{\csuse{relateddelim\strfield{relatedtype}}}}} + {\expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\printunit + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter{% + \csuse{relateddelim\strfield{relatedtype}}}}} {}}% \ifbibmacroundef{related:\strfield{relatedtype}} {\appto{\do}{\usebibmacro{related:default}}} diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.def b/Master/texmf-dist/tex/latex/biblatex/biblatex.def index 3cb0eaa94f9..e2a1728aae0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex.def +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex.def @@ -97,9 +97,11 @@ \newcommand*{\multicitedelim}{\addsemicolon\space} \newcommand*{\compcitedelim}{\addcomma\space} \newcommand*{\supercitedelim}{\addcomma} -\newcommand*{\prenotedelim}{\addspace} -\newcommand*{\postnotedelim}{\addcomma\space} -\newcommand*{\extpostnotedelim}{\addspace} +\DeclareDelimFormat{prenotedelim}{\addspace} +\DeclareDelimFormat{postnotedelim}{\addcomma\space} +\DeclareDelimAlias{multiprenotedelim}{prenotedelim} +\DeclareDelimAlias{multipostnotedelim}{postnotedelim} +\DeclareDelimFormat{extpostnotedelim}{\addspace} \newcommand*{\volcitedelim}{\addcomma\space} \newcommand*{\textcitedelim}{% \iffinalcitedelim @@ -243,30 +245,64 @@ % Local setup for \url; see comments in url.sty for details. +\newcounter{biburlbigbreakpenalty} +\newcounter{biburlbreakpenalty} \newcounter{biburlnumpenalty} \newcounter{biburlucpenalty} \newcounter{biburllcpenalty} +\setcounter{biburlbigbreakpenalty}{100} +\setcounter{biburlbreakpenalty}{200} + +\newmuskip\biburlbigskip +\newmuskip\biburlnumskip +\newmuskip\biburlucskip +\newmuskip\biburllcskip + +% I'd have preferred \setlength here, but calc does not support +% muglue (yet?). +% https://github.com/plk/biblatex/issues/889 +% See also https://tex.stackexchange.com/q/188215/ +\biburlbigskip=0mu plus 3mu\relax +\biburlnumskip=0mu\relax +\biburlucskip=0mu\relax +\biburllcskip=0mu\relax + \newcommand*{\biburlsetup}{% - \Urlmuskip=0mu plus 3mu\relax - \mathchardef\UrlBigBreakPenalty=100\relax - \mathchardef\UrlBreakPenalty=200\relax + \Urlmuskip\biburlbigskip + \mathchardef\UrlBigBreakPenalty=\value{biburlbigbreakpenalty}\relax + \mathchardef\UrlBreakPenalty=\value{biburlbreakpenalty}\relax \def\UrlBigBreaks{\do\:\do\-}% \def\UrlBreaks{% \do\.\do\@\do\/\do\\\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\}% \do\,\do\?\do\'\do\+\do\=\do\#\do\$\do\&\do\*\do\^\do\"}% \ifnumgreater{\value{biburlnumpenalty}}{0} - {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlnumpenalty}}}}% + {\def\do##1{% + \appto\UrlSpecials{% + \do##1{% + \mathchar`##1 + \mskip\biburlnumskip + \penalty\value{biburlnumpenalty}}}}% \do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0} {}% \ifnumgreater{\value{biburlucpenalty}}{0} - {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlucpenalty}}}}% + {\def\do##1{% + \appto\UrlSpecials{% + \do##1{% + \mathchar`##1 + \mskip\biburlucskip + \penalty\value{biburlucpenalty}}}}% \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J \do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T \do\U\do\V\do\W\do\X\do\Y\do\Z} {}% \ifnumgreater{\value{biburllcpenalty}}{0} - {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburllcpenalty}}}}% + {\def\do##1{% + \appto\UrlSpecials{% + \do##1{% + \mathchar`##1 + \mskip\biburllcskip + \penalty\value{biburllcpenalty}}}}% \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t \do\u\do\v\do\w\do\x\do\y\do\z} @@ -503,7 +539,7 @@ \DeclareFieldFormat{isbn}{\mkbibacro{ISBN}\addcolon\space #1} \DeclareFieldFormat{isrn}{\mkbibacro{ISRN}\addcolon\space #1} \DeclareFieldFormat{issn}{\mkbibacro{ISSN}\addcolon\space #1} -\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}} +\DeclareFieldFormat{journaltitle}{\mkbibemph{#1\isdot}} \DeclareFieldFormat{issuetitle}{\mkbibemph{#1}} \DeclareFieldFormat{maintitle}{\mkbibemph{#1}} \DeclareFieldFormat{booktitle}{\mkbibemph{#1}} @@ -842,7 +878,7 @@ {\namepartprefix} {\namepartsuffix}}% \usebibmacro{name:andothers}} - + \DeprecateNameFormatWithReplacement{last-first}{family-given} @@ -955,64 +991,92 @@ % Auxiliary macros for name formatting directives % ------------------------------------------------------------------ +\newcommand{\mkbibcompletename}[1]{#1} + +\newcommand{\mkbibcompletenamefamily}{\mkbibcompletename} + \newbibmacro*{name:family}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% - \ifdefvoid{#3} - {} - {\ifcapital - {\mkbibnameprefix{\MakeCapital{#3}}\isdot} - {\mkbibnameprefix{#3}\isdot}% - \ifprefchar{}{\bibnamedelimc}}} + \mkbibcompletenamefamily{% + \ifdefvoid{#3} + {} + {\ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{#3}\isdot}% + \ifprefchar{}{\bibnamedelimc}}% + \mkbibnamefamily{#1}\isdot}} {\usebibmacro{name:delim}{#1}% - \usebibmacro{name:hook}{#1}}% - \mkbibnamefamily{#1}\isdot}% + \usebibmacro{name:hook}{#1}% + \mkbibcompletenamefamily{% + \mkbibnamefamily{#1}\isdot}}}% \newbibmacro*{name:last}[4]{% legacy alias \blx@warning@noline{% 'name:last' is deprecated, please use 'name:family'}% \usebibmacro{name:family}{#1}{#2}{#3}{#4}} +\newcommand{\mkbibcompletenamegivenfamily}{\mkbibcompletename} + \newbibmacro*{name:given-family}[4]{% \usebibmacro{name:delim}{#2#3#1}% \usebibmacro{name:hook}{#2#3#1}% - \ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}% - \ifdefvoid{#3}{}{% - \mkbibnameprefix{#3}\isdot - \ifprefchar + \mkbibcompletenamegivenfamily{% + \ifdefvoid{#2} + {} + {\mkbibnamegiven{#2}\isdot\bibnamedelimd}% + \ifdefvoid{#3} {} - {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% - \mkbibnamefamily{#1}\isdot - \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} + {\mkbibnameprefix{#3}\isdot + \ifprefchar + {} + {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% + \mkbibnamefamily{#1}\isdot + \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}} \newbibmacro*{name:first-last}[4]{% legacy alias \blx@warning@noline{% 'name:first-last' is deprecated, please use 'name:given-family'}% \usebibmacro{name:given-family}{#1}{#2}{#3}{#4}} +\newcommand{\mkbibcompletenamefamilygiven}{\mkbibcompletename} + \newbibmacro*{name:family-given}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% - \ifdefvoid{#3}{}{% - \ifcapital - {\mkbibnameprefix{\MakeCapital{#3}}\isdot} - {\mkbibnameprefix{#3}\isdot}% - \ifprefchar{}{\bibnamedelimc}}% - \mkbibnamefamily{#1}\isdot - \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}} + \mkbibcompletenamefamilygiven{% + \ifdefvoid{#3} + {} + {\ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{#3}\isdot}% + \ifprefchar{}{\bibnamedelimc}}% + \mkbibnamefamily{#1}\isdot + \ifdefvoid{#4} + {} + {\bibnamedelimd\mkbibnamesuffix{#4}\isdot}% + \ifdefvoid{#2} + {} + {\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% - \mkbibnamefamily{#1}\isdot - \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}% - \ifboolexpe{% - test {\ifdefvoid{#2}} - and - test {\ifdefvoid{#3}}} - {} - {\revsdnamepunct}% - \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% - \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}} + \mkbibcompletenamefamilygiven{% + \mkbibnamefamily{#1}\isdot + \ifdefvoid{#4} + {} + {\bibnamedelimd\mkbibnamesuffix{#4}\isdot}% + \ifboolexpe{% + test {\ifdefvoid{#2}} + and + test {\ifdefvoid{#3}}} + {} + {\revsdnamepunct}% + \ifdefvoid{#2} + {} + {\bibnamedelimd\mkbibnamegiven{#2}\isdot}% + \ifdefvoid{#3} + {} + {\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}} \newbibmacro*{name:last-first}[4]{% legacy alias \blx@warning@noline{% 'name:last-first' is deprecated, please use 'name:family-given'}% @@ -1170,11 +1234,12 @@ \@firstofone #1% remove spurious braces \ifdefvoid{#4}{}{ #4}% \ifdefvoid{#2}{}{, #2}% - \actualoperator - \ifdefvoid{#3}{}{\MakeCapital{#3} }% - #1% - \ifdefvoid{#4}{}{ #4}% - \ifdefvoid{#2}{}{, #2}} + \ifdefvoid{#3}{}{% + \actualoperator + \MakeCapital{#3} % + #1% + \ifdefvoid{#4}{}{ #4}% + \ifdefvoid{#2}{}{, #2}}} {\@firstofone #1% remove spurious braces \ifdefvoid{#4}{}{ #4}% \ifboolexpe{% @@ -2143,21 +2208,21 @@ \DeclareCiteCommand{\notecite} {\printfield{prenote}% - \setunit*{\prenotedelim}} + \setunit*{\printdelim{prenotedelim}}} {\nocite{\thefield{entrykey}}} {} {\printfield{postnote}} \DeclareCiteCommand{\pnotecite}[\mkbibparens] {\printfield{prenote}% - \setunit*{\prenotedelim}} + \setunit*{\printdelim{prenotedelim}}} {\nocite{\thefield{entrykey}}} {} {\printfield{postnote}} \DeclareCiteCommand{\fnotecite}[\mkbibfootnote] {\printfield{prenote}% - \setunit*{\prenotedelim}} + \setunit*{\printdelim{prenotedelim}}} {\nocite{\thefield{entrykey}}} {} {\printfield{postnote}} @@ -2262,12 +2327,12 @@ \iffieldundef{prenote} {} {\printfield{prenote}% - \setunit{\prenotedelim}}} + \setunit{\printdelim{prenotedelim}}}} \newbibmacro*{postnote}{% \iffieldundef{postnote} {} - {\setunit{\postnotedelim}% + {\setunit{\printdelim{postnotedelim}}% \printfield{postnote}}} % multicite commands @@ -2276,12 +2341,12 @@ \iffieldundef{multiprenote} {} {\printfield{multiprenote}% - \prenotedelim}} + \printdelim{multiprenotedelim}}} \newbibmacro*{multipostnote}{% \iffieldundef{multipostnote} {} - {\postnotedelim + {\printdelim{multipostnotedelim} \printfield{multipostnote}}} % ------------------------------------------------------------------ diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty index 85de524be78..ba4c8dc7b54 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty @@ -12,8 +12,8 @@ % particular purpose. % Set up the version strings here -\def\abx@date{2018/11/02} -\def\abx@version{3.12} +\def\abx@date{2019/08/17} +\def\abx@version{3.13} \def\abx@bbxid{\abx@date\space v\abx@version\space biblatex bibliography style (PK/MW)} \def\abx@cbxid{\abx@date\space v\abx@version\space biblatex citation style (PK/MW)} \def\abx@lbxid{\abx@date\space v\abx@version\space biblatex localization (PK/MW)} @@ -22,12 +22,12 @@ % This is not updated by build script as the control file version % does not necessarily change with the package version. % This is used when writing the .bcf -\def\blx@bcfversion{3.5} +\def\blx@bcfversion{3.6} % This is not updated by build script as the bbl version % does not necessarily change with the package version. % This is used when checking the .bbl -\def\blx@bblversion{3.0} +\def\blx@bblversion{3.1} \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{biblatex} @@ -209,7 +209,18 @@ {\def\blx@sortlocale{english}}} {}% \@ifpackageloaded{polyglossia} - {% This is required for languages which are never explicitly selected + {% polyglossia support is not great when it comes to language variants, + % so we better warn about it. + \ifundef\blx@nowarnpolyglossia + {\blx@warning@noline{% + Package 'polyglossia' detected.\MessageBreak + Please note that biblatex's polyglossia\MessageBreak + interface has some rough edges.\MessageBreak + Language variants are not picked up correctly.\MessageBreak + You can disable this warning by defining the macro\MessageBreak + '\string\blx@nowarnpolyglossia' in the preamble}} + {}% + % This is required for languages which are never explicitly selected % This check because \xpg@loaded is not defined in polyglossia <= v1.42.0 \ifundef\xpg@loaded {\let\xpg@loaded\@empty @@ -510,6 +521,29 @@ \let\HAR@checkdef\@empty \providecommand{\@gobblefive}[5]{} +\providecommand{\@gobblethree}[3]{} + +% etoolbox helpers + +% \ifinlist{<item>}{<list>} is not a good idea +% for printable stuff according to the etoolbox docs +% for \ifinlist (p. 31) +\newrobustcmd{\blx@ifprintableinlist}[2]{% + \begingroup + \def\blx@tempa{\endgroup + \@secondoftwo}% + \renewcommand*{\do}[1]{% + \ifstrequal{##1}{#1} + {\def\blx@tempa{\endgroup + \@firstoftwo}% + \listbreak} + {}}% + \dolistloop{#2}% + \expandafter\blx@tempa} + +\newrobustcmd{\blx@ifprintableinlistcs}[2]{% + \expandafter\blx@ifprintableinlistcs@i\csname #2\endcsname{#1}} +\long\def\blx@ifprintableinlistcs@i#1#2{\blx@ifprintableinlist{#2}{#1}} \ifundef\pdf@mdfivesum {\let\blx@mdfivesum\@firstofone @@ -651,27 +685,18 @@ \expandafter\newcount\csname blx@sectionciteorder@0\endcsname \newcount\blx@entrysetcounter - -\def\blx@uniquename{0} -\def\blx@uniquelist{0} +\def\blx@uniquename{false} +\def\blx@uniquelist{false} \def\blx@maxbibnames{0} \def\blx@minbibnames{0} \def\blx@maxcitenames{0} \def\blx@mincitenames{0} \def\blx@maxsortnames{0} \def\blx@minsortnames{0} -\def\blx@maxbibnames@type{\blx@maxbibnames} -\def\blx@minbibnames@type{\blx@minbibnames} -\def\blx@maxcitenames@type{\blx@maxcitenames} -\def\blx@mincitenames@type{\blx@mincitenames} -\def\blx@maxsortnames@type{\blx@maxsortnames} -\def\blx@minsortnames@type{\blx@minsortnames} \def\blx@maxalphanames{0} \def\blx@minalphanames{0} \def\blx@maxitems{0} \def\blx@minitems{0} -\def\blx@maxitems@type{\blx@maxitems} -\def\blx@minitems@type{\blx@minitems} \newlength{\labelnumberwidth} \newlength{\labelalphawidth} @@ -721,17 +746,11 @@ \newtoggle{blx@labeltitleyear} \newtoggle{blx@labeldateparts} \newtoggle{blx@natbib} -\newtoggle{blx@noroman} \newtoggle{blx@mcite} \newtoggle{blx@loadfiles} -\newtoggle{blx@singletitle} \newtoggle{blx@sortsets} \newtoggle{blx@crossrefsource} \newtoggle{blx@xrefsource} -\newtoggle{blx@uniqueprimaryauthor} -\newtoggle{blx@uniquetitle} -\newtoggle{blx@uniquebaretitle} -\newtoggle{blx@uniquework} \newtoggle{blx@terseinits} \newtoggle{blx@useprefix} \newtoggle{blx@addset} @@ -741,11 +760,20 @@ \newtoggle{blx@skipbiblist} \newtoggle{blx@skiplab} \newtoggle{blx@citation} +\newtoggle{blx@volcite} \newtoggle{blx@bibliography} \newtoggle{blx@citeindex} \newtoggle{blx@bibindex} \newtoggle{blx@localnumber} \newtoggle{blx@refcontext} +\newtoggle{blx@noroman} +\newtoggle{blx@nohashothers} +\newtoggle{blx@nosortothers} +\newtoggle{blx@singletitle} +\newtoggle{blx@uniquebaretitle} +\newtoggle{blx@uniqueprimaryauthor} +\newtoggle{blx@uniquetitle} +\newtoggle{blx@uniquework} \newcommand*{\blx@xifstrequal}[2]{% \begingroup @@ -1176,10 +1204,10 @@ See the biblatex manual for valid option keys and possible values} {#2}}} -\def\blx@err@optdef#1{% +\def\blx@err@optdef#1#2{% \blx@error - {Conflicting options} - {The option '#1' is already defined}} + {Option '#1' already defined} + {The option '#1' is already defined in scope '#2'}} \def\blx@err@nodocdiv#1{% \blx@error @@ -1991,8 +2019,13 @@ \providerobustcmd*{\allowhyphens}{% \nobreak\hskip\z@skip} +% Idea from Peter Wilson's hyphenat package +% https://ctan.org/pkg/hyphenat +% also https://texfaq.org/FAQ-hyphoff +\newlanguage\blx@langwohyphens + \providerobustcmd*{\nohyphenation}{% - \lefthyphenmin\@m} + \language\blx@langwohyphens} \providerobustcmd*{\textnohyphenation}[1]{% \bgroup\nohyphenation#1\egroup} @@ -2034,7 +2067,7 @@ Using fallback driver}% \csuse{blx@bbx@*}} {\blx@error - {No driver found} + {No driver for '\abx@field@entrytype' found} {I can't find a driver for the entry type '\abx@field@entrytype'\MessageBreak and there is no fallback driver either}}}} @@ -2185,6 +2218,85 @@ {\csname abx@list@#1\endcsname}} {}} +\def\blx@imc@thefirstlistitem#1{% + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \blx@imc@thefirstlistitem@grab + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + {\csuse{abx@list@#1}}} + +\def\blx@imc@thefirstlistitem@grab#1{% + \blx@imc@thefirstlistitem@grab@i + #1{}{}% + \blx@imc@thefirstlistitem@grab@i@end} +\def\blx@imc@thefirstlistitem@grab@i#1#2\blx@imc@thefirstlistitem@grab@i@end{#1} + +% {<command>}{<field>} +% needs 7 levels of expansion, i.e. 2^7-1=127 '\expandafter's +\def\blx@imc@usefirstlistitem#1#2{% + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter + #1% + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter + {\blx@imc@thefirstlistitem{#2}}} + +\def\blx@imc@strfirstlistitem#1{% + \ifcsdef{abx@list@#1} + {\blx@imc@usefirstlistitem{\detokenize}{#1}} + {}} + % {<namelist>} \def\blx@imc@thename#1{\csuse{abx@name@#1}} @@ -3100,25 +3212,32 @@ {\blx@range@aux\blx@normrange@i}} \def\blx@range@aux#1{% - \@ifnextchar[{#1}{#1[\@firstofone]}} + \@ifnextchar[{\blx@range@aux@i#1}{#1[\@firstofone][\@firstofone]}} + +\def\blx@range@aux@i#1[#2]{% + \@ifnextchar[{#1[#2]}{#1[#2][\@firstofone]}} -\def\blx@normrange@i[#1]#2{% +\def\blx@normrange@i[#1][#2]#3{% \let\blx@tempa\@empty \protected\def\blx@range@out@value{\appto\blx@tempa}% + \def\blx@range@out@item@process{#2}% \let\blx@range@out@delim\blx@range@out@value - \let\blx@range@split\blx@normrange@split + \let\blx@range@split\blx@genrange@split \let\blx@range@process\blx@normrange@process - \blx@range@chunk{#2}% + \blx@range@chunk{#3}% + \begingroup \edef\blx@tempa{\endgroup \unexpanded{#1}{\expandonce\blx@tempa}}% - \blx@tempa} + \blx@tempa + \endgroup} -\def\blx@normrange@ii[#1]#2{% +\def\blx@normrange@ii[#1][#2]#3{% \protected\def\blx@range@out@value{#1}% + \def\blx@range@out@item@process{#2}% \let\blx@range@out@delim\@firstofone - \let\blx@range@split\blx@normrange@split + \let\blx@range@split\blx@genrange@split \let\blx@range@process\blx@normrange@process - \blx@range@chunk{#2}% + \blx@range@chunk{#3}% \endgroup} \def\blx@range@chunk#1{% @@ -3153,8 +3272,10 @@ {}} % Unicode en-dashes are supported in blx-unicode.def -\def\blx@normrange@split#1{% - \def\blx@normrange@abort{\blx@range@out@value{#1}}% +\def\blx@genrange@split#1{% + \edef\blx@normrange@abort{% + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}}}% \blx@imc@ifpages{#1} {\blx@normrange@range#1\bibrangedash\bibrangedash&} {\blx@normrange@abort}} @@ -3163,9 +3284,20 @@ \ifblank{#3} {\blx@normrange@hyphen#1--&} {\ifblank{#2} - {\blx@range@out@value{#1\bibrangedash}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}% + \noexpand\bibrangedash}}% + \blx@tempc} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{% + \unexpanded{#2}}}}% + \blx@tempc} {\blx@range@process{#1}{#2}}}}} \def\blx@normrange@hyphen#1-#2-#3&{% @@ -3177,22 +3309,44 @@ {\def\blx@tempb{#1}}% \blx@normrange@hyphen@i#3&} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{% + \unexpanded{#2}}}}% + \blx@tempc} {\blx@range@process{#1}{#2}}}}} \def\blx@normrange@hyphen@i#1-#2&{% \ifblank{#1#2} - {\expandafter\blx@range@out@value - \expandafter{\blx@tempb\bibrangedash}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\expandonce\blx@tempb}% + \noexpand\bibrangedash}}% + \blx@tempc} {\notblank{#1} {\ifdefempty\blx@tempb - {\blx@range@out@value{\bibrangedash#1}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{% + \unexpanded{#1}}}}% + \blx@tempc} {\expandafter\blx@range@process \expandafter{\blx@tempb}{#1}}} {\blx@normrange@hyphen@i#2&}}} \def\blx@normrange@process#1#2{% - \blx@range@out@value{#1\bibrangedash#2}} + \begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\unexpanded{#2}}}}% + \blx@tempc} % <*>[<postpro>]{<string>} \newrobustcmd*{\mkcomprange}{% @@ -3201,31 +3355,43 @@ {\blx@range@aux\blx@comprange@ii} {\blx@range@aux\blx@comprange@i}} -\def\blx@comprange@i[#1]#2{% +\def\blx@comprange@i[#1][#2]#3{% \let\blx@tempa\@empty \protected\def\blx@range@out@value{\appto\blx@tempa}% + \def\blx@range@out@item@process{#2}% \let\blx@range@out@delim\blx@range@out@value - \let\blx@range@split\blx@normrange@split + \let\blx@range@split\blx@genrange@split \let\blx@range@process\blx@comprange@check - \blx@range@chunk{#2}% + \blx@range@chunk{#3}% + \begingroup \edef\blx@tempa{\endgroup \unexpanded{#1}{\expandonce\blx@tempa}}% - \blx@tempa} + \blx@tempa + \endgroup} -\def\blx@comprange@ii[#1]#2{% +\def\blx@comprange@ii[#1][#2]#3{% \protected\def\blx@range@out@value{#1}% + \def\blx@range@out@item@process{#2}% \let\blx@range@out@delim\@firstofone - \let\blx@range@split\blx@normrange@split + \let\blx@range@split\blx@genrange@split \let\blx@range@process\blx@comprange@check - \blx@range@chunk{#2}% + \blx@range@chunk{#3}% \endgroup} \def\blx@comprange@check#1#2{% \blx@imc@ifinteger{#1} {\blx@imc@ifinteger{#2} - {\blx@comprange@comp{#1}{#2}} - {\blx@range@out@value{#1\bibrangedash#2}}} - {\blx@range@out@value{#1\bibrangedash#2}}} + {\@firstoftwo} + {\@secondoftwo}} + {\@secondoftwo} + {\blx@comprange@comp{#1}{#2}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\unexpanded{#2}}}}% + \blx@tempc}} \def\blx@comprange@comp#1#2{% \def\blx@tempb{#1}% @@ -3255,8 +3421,12 @@ \else \numdef\blx@tempc\blx@tempd \fi - \edef\blx@tempb{% - \blx@range@out@value{\blx@tempb\noexpand\bibrangedash\blx@tempc}}% + \begingroup + \edef\blx@tempb{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\blx@tempb}% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\blx@tempc}}}% \blx@tempb} \def\blx@comprange@comp@div{% @@ -3284,40 +3454,52 @@ \newrobustcmd*{\mkfirstpage}{% \begingroup \@ifstar - {\blx@firstpage\blx@firstpage@ii} - {\blx@firstpage\blx@firstpage@i}} - -\def\blx@firstpage#1{% - \@ifnextchar[{#1}{#1[\@firstofone]}} + {\blx@range@aux\blx@firstpage@ii} + {\blx@range@aux\blx@firstpage@i}} -\def\blx@firstpage@i[#1]#2{% +\def\blx@firstpage@i[#1][#2]#3{% \let\blx@tempa\@empty \protected\def\blx@range@out@value{\appto\blx@tempa}% + \def\blx@range@out@item@process{#2}% \let\blx@range@out@delim\blx@range@out@value \let\blx@range@split\blx@firstpage@split - \blx@range@chunk{#2}% + \blx@range@chunk{#3}% + \begingroup \edef\blx@tempa{\endgroup \unexpanded{#1}{\expandonce\blx@tempa}}% - \blx@tempa} + \blx@tempa + \endgroup} -\def\blx@firstpage@ii[#1]#2{% +\def\blx@firstpage@ii[#1][#2]#3{% \protected\def\blx@range@out@value{#1}% + \def\blx@range@out@item@process{#2}% \let\blx@range@out@delim\@firstofone \let\blx@range@split\blx@firstpage@split - \blx@range@chunk{#2}% + \blx@range@chunk{#3}% \endgroup} % Unicode en-dashes are supported in blx-unicode.def \def\blx@firstpage@split#1{% - \def\blx@firstpage@abort{\blx@range@out@value{#1}}% + \edef\blx@firstpage@abort{% + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}}}% \blx@firstpage@range#1\bibrangedash\bibrangedash&} \def\blx@firstpage@range#1\bibrangedash#2\bibrangedash#3&{% \ifblank{#3} {\blx@firstpage@hyphen#1--&} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} - {\blx@range@out@value{#1}}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\unexpanded{#2}}}}% + \blx@tempc} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}}}% + \blx@tempc}}} \def\blx@firstpage@hyphen#1-#2-#3&{% \ifblank{#3} @@ -3325,15 +3507,31 @@ {\ifblank{#1} {\ifblank{#2} {\blx@firstpage@hyphen@i#3&} - {\blx@range@out@value{\bibrangedash#2}}} - {\blx@range@out@value{#1}}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{% + \unexpanded{#2}}}}% + \blx@tempc}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}}}% + \blx@tempc}}} \def\blx@firstpage@hyphen@i#1-#2&{% \ifblank{#1} {\ifblank{#2} {\blx@firstpage@abort} {\blx@firstpage@hyphen@i#2&}} - {\blx@range@out@value{\bibrangedash#1}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{% + \unexpanded{#1}}}}% + \blx@tempc}} \newcommand*{\ppspace}{\addnbspace} \newcommand*{\sqspace}{\addnbspace} @@ -3489,9 +3687,9 @@ % {<init>}{<entrytype>} \protected\def\blx@imc@usedriver#1#2{% \begingroup + \delimcontext{bib}% \csuse{blx@hook@usedriver}% \csuse{blx@hook@bbxinit}#1% - \delimcontext{bib}% \blx@beglangbib \blx@driver{#2}% \blx@endlangbib @@ -3637,7 +3835,9 @@ and test {\iffieldsequal{#1dateera}{#2dateera}}}} \blx@regimcs{% - \ifdriver \thefield \strfield \csfield \usefield \thelist \strlist \thename \strname + \ifdriver \thefield \strfield \csfield \usefield \thelist \strlist + \thefirstlistitem \usefirstlistitem \strfirstlistitem + \thename \strname \clearfield \clearlist \clearname \restorefield \restorelist \restorename \ifcategory \ifkeyword \ifciteseen \ifciteibid \ifciteidem \ifopcit \ifloccit @@ -3660,6 +3860,7 @@ \appto\blx@blxinit{% \def\ifnatbibmode{\iftoggle{blx@natbib}}% \def\ifcitation{\iftoggle{blx@citation}}% + \def\ifvolcite{\iftoggle{blx@volcite}}% \def\ifbibliography{\iftoggle{blx@bibliography}}% \def\ifciteindex{\iftoggle{blx@citeindex}}% \def\ifbibindex{\iftoggle{blx@bibindex}}% @@ -3675,6 +3876,7 @@ \def\ifuniquework{\iftoggle{abx@bool@uniquework}}% \def\ifuniqueprimaryauthor{\iftoggle{abx@bool@uniqueprimaryauthor}}% \def\ifandothers#1{\iftoggle{abx@bool@more#1}}% + \protected\def\pnfmt{\printtext[postnote]}% \protected\def\pno{\bibstring{page}}% \protected\def\ppno{\bibstring{pages}}% \let\nopp\relax @@ -3692,7 +3894,7 @@ \protected\def#1{\ERROR}% \fi }% - \docsvlist{\pno,\ppno,\nopp,\psq,\psqq}% + \docsvlist{\pnfmt,\pno,\ppno,\nopp,\psq,\psqq}% } %% Global formatting hooks @@ -4320,25 +4522,15 @@ {\setkeys{blx@opt@namelist}{#1}}% \def\blx@thedata{#2}} -% These are options in the .bbl that biber makes explicit as they are needed in biblatex -% for various reasons. Not all namelist/name scope options are necessary in the .bbl as -% some are used by biber only and are not needed by biblatex after biber has finished -% generating the .bbl -% Per-namelist options -\define@key{blx@opt@namelist}{uniquelist}{\c@uniquelist#1\relax} -\define@key{blx@opt@namelist}{useprefix}{\settoggle{blx@useprefix}{#1}} -\define@key{blx@opt@namelist}{sortingnamekeytemplatename}{\def\blx@refcontext@sortingnamekeytemplatename{#1}} -\define@key{blx@opt@namelist}{uniquenametemplatename}{\def\blx@refcontext@uniquenametemplatename{#1}} -\define@key{blx@opt@namelist}{labelalphanametemplatename}{\def\blx@refcontext@labelalphanametemplatename{#1}} - -% Per-name options -\define@key{blx@opt@name}{uniquename}{\c@uniquename#1\relax} +% Biber-calculated info passed back to biblatex as an option in the .bbl +% unlike stuff defined with \DeclareBiblatexOption and +% \blx@DeclareBackendOption these are not 'real' options +\define@key{blx@opt@namelist}{ul}{\c@uniquelist#1\relax} + +\define@key{blx@opt@name}{un}{\c@uniquename#1\relax} \define@key{blx@opt@name}{uniquepart}{\def\abx@field@uniquepart{#1}} \define@key{blx@opt@name}{hash}{\edef\abx@field@hash{\detokenize{#1}}} -\define@key{blx@opt@name}{useprefix}{\settoggle{blx@useprefix}{#1}} -\define@key{blx@opt@name}{sortingnamekeytemplatename}{\def\blx@refcontext@sortingnamekeytemplatename{#1}} -\define@key{blx@opt@name}{uniquenametemplatename}{\def\blx@refcontext@uniquenametemplatename{#1}} -\define@key{blx@opt@name}{labelalphanametemplatename}{\def\blx@refcontext@labelalphanametemplatename{#1}} + \newrobustcmd*{\bibinitperiod}{\adddot} \newrobustcmd*{\bibinitdelim}{\addnbspace} @@ -5398,14 +5590,14 @@ \def\blx@lbx@input@postprocess@all#1{% \blx@lbx@input@postprocess@strings{#1}% \blx@lbx@input@postprocess@extras{#1}% - \csuse{blx@hook@hyph@#1}} + \csuse{blx@hook@hyph@#1}% + \blx@maplang{#1}{#1}} % {<language>}{<lbxfile>}{<message>} \def\blx@lbxinput@iv#1#2#3{% \begingroup \blx@lbx@input@handler{#2.lbx}{#3} - {\blx@maplang{#1}{#1}% - \let\InheritBibliographyStrings\@gobble + {\let\InheritBibliographyStrings\@gobble \let\DeclareBibliographyStrings\@gobble \let\InheritBibliographyExtras\@gobble \let\DeclareBibliographyExtras\@gobble @@ -5523,6 +5715,29 @@ \iftoggle{blx@seconds}{} {\blx@imc@clearfield{#1#2second}}} +\newcommand*{\blx@if@printtime}[2]{% + \ifboolexpr{% + togl {blx@#1dateusetime} + and + not test {\iffieldundef{#1#2hour}}}} + +\newcommand*{\blx@if@printanytimes}[1]{% + \ifboolexpr{ + togl {blx@#1dateusetime} + and + ( not test {\iffieldundef{#1hour}} + or not test {\iffieldundef{#1endhour}})}} + +% {<datetype>}{'' | end} +\newrobustcmd*{\blx@printtime}[2]{% + \blx@if@printtime{#1}{#2} + {\blx@timepre{#1}{#2}% + \printtext{\bibdatetimesep}% + \printtext[#1time]{% + \csuse{mkbibtime\csuse{blx@timeformat@#1time}} + {#1#2hour}{#1#2minute}{#1#2second}{#1#2timezone}}} + {}} + % {<short|long>}{<datetype>} \newrobustcmd*{\mkdaterangefull}[2]{% \begingroup @@ -5546,7 +5761,7 @@ {\mbox{\bibdaterangesep}} {\bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% % Optionally print the time after the date \blx@printtime{#2}{end}} @@ -5555,7 +5770,46 @@ \dateeraprint{#2endyear}}}}}% \endgroup} +\newrobustcmd*{\mkdaterangefullextra}[2]{% + \begingroup + \blx@metadateinfo{#2}% + \iffieldundef{#2year} + {\blx@nounit} + {\printtext[#2date]{% + \datecircaprint + % Such a season component can only come from an ISO8601 season which replaces + % a normal month so if it exists, we know that a normal date print is ruled out + \iffieldundef{#2season} + {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% + % Optionally print the time after the date + \blx@printtime{#2}{}} + {\csuse{mkbibseasondate#1}{#2year}{#2season}}% + \dateuncertainprint + \dateeraprint{#2year}% + \iffieldundef{#2endyear} + {\printfield{extradate}} + {\iffieldequalstr{#2endyear}{} + {\printfield{extradate}% + \printtext{\mbox{\bibdaterangesep}}} + {\printtext{% + \bibdaterangesep + \enddatecircaprint + \iffieldundef{#2endseason} + {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% + % Optionally print the time after the date + \blx@printtime{#2}{end}} + {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}% + \printfield{extradate}% + \enddateuncertainprint + \dateeraprint{#2endyear}}}}}% + \endgroup} + \newrobustcmd*{\mkdaterangetrunc}[2]{% + \blx@if@printanytimes{#2} + {\mkdaterangefull{#1}{#2}} + {\mkdaterangetrunc@i{#1}{#2}}} + +\newrobustcmd*{\mkdaterangetrunc@i}[2]{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} @@ -5584,48 +5838,19 @@ {\mbox{\bibdaterangesep}} {\bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}} {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}% \enddateuncertainprint \dateeraprint{#2endyear}}}}}% \endgroup} -\newrobustcmd*{\mkdaterangefullextra}[2]{% - \begingroup - \blx@metadateinfo{#2}% - \iffieldundef{#2year} - {\blx@nounit} - {\printtext[#2date]{% - \datecircaprint - % Such a season component can only come from an ISO8601 season which replaces - % a normal month so if it exists, we know that a normal date print is ruled out - \iffieldundef{#2season} - {\csuse{mkbibdate#1}{#2year}{#2month}{#2day}% - % Optionally print the time after the date - \blx@printtime{#2}{}} - {\csuse{mkbibseasondate#1}{#2year}{#2season}}% - \dateuncertainprint - \dateeraprint{#2year}% - \iffieldundef{#2endyear} - {\printfield{extradate}} - {\iffieldequalstr{#2endyear}{} - {\printfield{extradate}% - \printtext{\mbox{\bibdaterangesep}}} - {\printtext{% - \bibdaterangesep - \enddatecircaprint - \iffieldundef{#2season} - {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% - % Optionally print the time after the date - \blx@printtime{#2}{end}} - {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}% - \printfield{extradate}% - \enddateuncertainprint - \dateeraprint{#2endyear}}}}}% - \endgroup} - \newrobustcmd*{\mkdaterangetruncextra}[2]{% + \blx@if@printanytimes{#2} + {\mkdaterangefullextra{#1}{#2}} + {\mkdaterangetruncextra@i{#1}{#2}}} + +\newrobustcmd*{\mkdaterangetruncextra@i}[2]{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} @@ -5656,7 +5881,7 @@ {\printtext{% \bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}} {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}}% \printfield{extradate}% @@ -5776,17 +6001,6 @@ {}% \mkdaterangefullextra{short}{#1}} -% {<datetype>}{'' | end} -\newrobustcmd*{\blx@printtime}[2]{% - \ifboolexpr{% - togl {blx@#1dateusetime} - and - not test {\iffieldundef{#1#2hour}}} - {\blx@timepre{#1}{#2}% - \printtext{\bibdatetimesep}% - \printtext[#1time]{\csuse{mkbibtime\csuse{blx@timeformat@#1time}}{#1#2hour}{#1#2minute}{#1#2second}{#1#2timezone}}} - {}} - \newrobustcmd*{\mkdaterangeiso}[1]{% \begingroup \blx@metadateinfo{#1}% @@ -6010,6 +6224,7 @@ \iffieldundef{#1}{}{\space}% \dateeraprintpre{#1}\mkyearzeros{\thefield{#1}}} +\newrobustcmd*{\bibdatedash}{\bibrangedash} \newrobustcmd*{\finalandcomma}{} \newrobustcmd*{\finalandsemicolon}{} \newrobustcmd*{\mkbibordinal}[1]{% @@ -6112,13 +6327,13 @@ % {<language>}{<strings>} \def\blx@maplang#1#2{% - \csxappto{extras#1}{% - \noexpand\blx@resetpunct - \expandafter\noexpand\csname abx@extras@#2\endcsname - \expandafter\noexpand\csname abx@strings@#2\endcsname}% - \csxappto{noextras#1}{% - \noexpand\blx@resetpunct - \expandafter\noexpand\csname abx@noextras@#2\endcsname}} + \csgappto{extras#1}{% + \blx@resetpunct + \csuse{abx@extras@#2}% + \csuse{abx@strings@#2}}% + \csgappto{noextras#1}{% + \blx@resetpunct + \csuse{abx@noextras@#2}}} %% babel/polyglossia interface \def\blx@beglang{\blx@clearlang\begingroup} @@ -6385,7 +6600,10 @@ \global\cslet{blx@entryopts@#1}\@empty \global\cslet{blx@namelistopts@#1}\@empty \global\cslet{blx@nameopts@#1}\@empty} -\expandafter\expandafter\expandafter\docsvlist\expandafter\expandafter\expandafter{\csname blx@datamodel@constant@optiondatatypes\endcsname} +\expandafter\expandafter\expandafter +\docsvlist +\expandafter\expandafter\expandafter +{\csname blx@datamodel@constant@optiondatatypes\endcsname} % Helper for collecting options and datatypes % {<datatype>}{<scope>}{<name>} @@ -6397,121 +6615,175 @@ {} {\listcsgadd{#2@#1}{#3}}} -% date, eventdate, urldate etc. -\def\abx@dodates{\dolistloop\blx@datamodel@dates} -% year, endyear, month, endmonth etc. -\def\abx@dodateparts{\expandafter\docsvlist\expandafter{\blx@dateparts}} - -% '', event, url, orig etc. -\def\do#1{% - \blx@stripfromendinto{#1}{date}\blx@datetype - \listxadd\blx@datetypes{\blx@datetype}} -\abx@dodates -% main date field has an empty prefix (''date) which can't be added to a list -% and so do it explicity -% This is one of the few (only?) hard-coded datamodel assumptions but it is -% very unlikely that anyone would *remove* the main date field in a custom application ... -\def\abx@dodatetypes{\do{}\dolistloop\blx@datetypes} -% per-entry inheritance blocking option for biber -\blx@collectopts{string}{blx@entryopts}{noinherit} +% entry, namelist, name scopes are input/handled on the backend side +% if we want to see the info back on the biblatex side, we need the backend +% to pass the info through via the .bbl file +\def\blx@declareblxopt@extrahandler@entry#1{% + \csgdef{blx@bcf@backendout@entry@#1}{1}} +\def\blx@declareblxopt@extrahandler@namelist#1{% + \csgdef{blx@bcf@backendout@namelist@#1}{1}} +\def\blx@declareblxopt@extrahandler@name#1{% + \csgdef{blx@bcf@backendout@name@#1}{1}} -% useprefix namelist/name scope -\blx@collectopts{boolean}{blx@namelistopts}{useprefix}% for passing to bcf -\blx@collectopts{boolean}{blx@nameopts}{useprefix}% for passing to the .bcf - -% nametemplates meta-option entry/namelist/name scope -\blx@collectopts{string}{blx@entryopts}{nametemplates} -\blx@collectopts{string}{blx@namelistopts}{nametemplates}% for passing to bcf -\blx@collectopts{string}{blx@nameopts}{nametemplates}% for passing to the .bcf - -% sortingnamekeytemplate namelist/name scope -\blx@collectopts{string}{blx@namelistopts}{sortingnamekeytemplatename}% for passing to bcf -\blx@collectopts{string}{blx@nameopts}{sortingnamekeytemplatename}% for passing to the .bcf - -% uniquenametemplate namelist/name scope -\blx@collectopts{string}{blx@namelistopts}{uniquenametemplatename}% for passing to bcf -\blx@collectopts{string}{blx@nameopts}{uniquenametemplatename}% for passing to the .bcf - -% labelalphanametemplate namelist/name scope -\blx@collectopts{string}{blx@namelistopts}{labelalphanametemplatename}% for passing to bcf -\blx@collectopts{string}{blx@nameopts}{labelalphanametemplatename}% for passing to the .bcf - -% Misc globalopts -\blx@collectopts{xml}{blx@globalopts}{datamodel}% for passing to the .bcf -\blx@collectopts{string}{blx@globalopts}{controlversion}% for passing to the .bcf - -\newcommand*{\labelalphaothers}{+} -\newcommand*{\sortalphaothers}{\labelalphaothers} -\blx@collectopts{string}{blx@globalopts}{alphaothers}% for passing to the .bcf -\blx@collectopts{string}{blx@typeopts}{alphaothers}% for passing to the .bcf -\blx@collectopts{string}{blx@globalopts}{sortalphaothers}% for passing to the .bcf -\blx@collectopts{string}{blx@typeopts}{sortalphaothers}% for passing to the .bcf +% {<option scope>}[<datatype>]{<key>}[<value>]{<code>} +\protected\def\blx@declareblxopt#1{% + \@ifnextchar[%] + {\blx@declareblxopt@i#1} + {\blx@declareblxopt@i#1[]}} -% The Declare*Option macros are for options which need to be visible -% to biblatex. For options which only biber needs to see, they can be -% passed to the .bcf directly using \blx@collectopts -% [<datatype>]{<key>}[<value>]{<code>} -\newrobustcmd*{\DeclareBibliographyOption}[2][]{% - \ifblank{#1} +\def\blx@declareblxopt@i#1[#2]#3{% + \begingroup + \ifblank{#2} {\def\blx@tempa{boolean}} - {\ifcsundef{blx@globalopts@#1} - {\blx@warn@badoptdt{#1}% + {\ifcsundef{blx@#1opts@#2} + {\blx@warn@badoptdt{#2}% \def\blx@tempa{boolean}} - {\def\blx@tempa{#1}}}% - \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@globalopts}{#2}% + {\def\blx@tempa{#2}}}% + \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@#1opts}{#3}% + \ifcsundef{blx@declareblxopt@extrahandler@#1} + {} + {\csuse{blx@declareblxopt@extrahandler@#1}{#3}}% + \endgroup \@ifnextchar[%] - {\blx@defbibopt{#2}} - {\blx@defbibopt{#2}[]}} + {\csuse{blx@defblxopt@#1opt}{#3}} + {\csuse{blx@defblxopt@#1opt}{#3}[]}} -\long\def\blx@defbibopt#1[#2]#3{% +\long\def\blx@defblxopt@globalopt#1[#2]#3{% \ifcsundef{KV@blx@opt@ldt@#1} {\ifcsundef{KV@blx@opt@pre@#1} {\ifblank{#2} {\define@key{blx@opt@pre}{#1}{#3}} {\define@key{blx@opt@pre}{#1}[#2]{#3}}} - {\blx@err@optdef{#1}}} - {\blx@err@optdef{#1}}} + {\blx@err@optdef{#1}{pre/global}}} + {\blx@err@optdef{#1}{ldt/global}}} + +\long\def\blx@defblxopt@typeentryopt#1#2[#3]#4{% + \ifcsundef{KV@blx@opt@#1@#2} + {\ifblank{#3} + {\define@key{blx@opt@#1}{#2}{#4}} + {\define@key{blx@opt@#1}{#2}[#3]{#4}}} + {\blx@err@optdef{#2}{#1}}} + +\def\blx@defblxopt@typeopt{\blx@defblxopt@typeentryopt{typ}} +\def\blx@defblxopt@entryopt{\blx@defblxopt@typeentryopt{ent}} +\def\blx@defblxopt@nameopt{\blx@defblxopt@typeentryopt{name}} +\def\blx@defblxopt@namelistopt{\blx@defblxopt@typeentryopt{namelist}} + +% The Declare*Option macros are for options which need to be visible +% to biblatex. For options which only biber needs to see, they can be +% passed to the .bcf directly using \blx@collectopts +% [<datatype>]{<key>}[<default value>]{<code>} +\newcommand*{\DeclareBibliographyOption}{\blx@declareblxopt{global}} +\newcommand*{\DeclareTypeOption}{\blx@declareblxopt{type}} +\newcommand*{\DeclareEntryOption}{\blx@declareblxopt{entry}} -% [<datatype>]{<key>}[<value>]{<code>} -\newrobustcmd*{\DeclareTypeOption}[2][]{% +% we'll assume that \blx@optscopes is non-empty from now on +\newcommand*{\blx@optscopes}{} +\forcsvlist{\listadd\blx@optscopes}{global,type,entry} + +\long\def\blx@defblxopt@loopscopes@i#1[#2]#3#4{% + \csuse{blx@defblxopt@#4opt}{#1}[#2]{#3}} + +\long\def\blx@defblxopt@loopscopes#1[#2]#3{% + \forlistloop{\blx@defblxopt@loopscopes@i{#1}[#2]{#3}}{\blx@optscopes}} + +% {<option scopes>}[<datatype>]{<key>}[<default value>]{<code>} +\newrobustcmd*{\DeclareBiblatexOption}[1]{% + \let\blx@optscopes\@empty + \forcsvlist{\listadd\blx@optscopes}{#1}% + \blx@DeclareBiblatexOption@i} + +\newrobustcmd*{\blx@DeclareBiblatexOption@i}[2][]{% + \begingroup \ifblank{#1} {\def\blx@tempa{boolean}} - {\ifcsundef{blx@typeopts@#1} + {\let\blx@tempb\@secondoftwo + \def\do##1{% + \ifcsundef{blx@##1opts@#1} + {\let\blx@tempb\@firstoftwo\listbreak} + {}}% + \dolistloop{\blx@optscopes}% + \blx@tempb {\blx@warn@badoptdt{#1}% \def\blx@tempa{boolean}} {\def\blx@tempa{#1}}}% - \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@typeopts}{#2}% + \def\do##1{% + \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@##1opts}{#2}% + \ifcsundef{blx@declareblxopt@extrahandler@##1} + {} + {\csuse{blx@declareblxopt@extrahandler@##1}{#2}}}% + \dolistloop{\blx@optscopes}% + \endgroup \@ifnextchar[%] - {\blx@deftypeopt{#2}} - {\blx@deftypeopt{#2}[]}} + {\blx@defblxopt@loopscopes{#2}} + {\blx@defblxopt@loopscopes{#2}[]}} -\long\def\blx@deftypeopt#1[#2]#3{% - \ifcsundef{KV@blx@opt@typ@#1} - {\ifblank{#2} - {\define@key{blx@opt@typ}{#1}{#3}} - {\define@key{blx@opt@typ}{#1}[#2]{#3}}} - {\blx@err@optdef{#1}}} +% this macro is internal for now because options declared with it need +% support on the backend side and are not useful for document or style authors +% {<option scopes>}[<datatype>]{<key>} +\newrobustcmd*{\blx@DeclareBackendOption}[1]{% + \let\blx@optscopes\@empty + \forcsvlist{\listadd\blx@optscopes}{#1}% + \blx@DeclareBackendOption@i} -% [<datatype>]{<key>}[<value>]{<code>} -\newrobustcmd*{\DeclareEntryOption}[2][]{% +\newrobustcmd*{\blx@DeclareBackendOption@i}[2][]{% + \begingroup \ifblank{#1} {\def\blx@tempa{boolean}} - {\ifcsundef{blx@entryopts@#1} + {\let\blx@tempb\@secondoftwo + \def\do##1{% + \ifcsundef{blx@##1opts@#1} + {\let\blx@tempb\@firstoftwo\listbreak} + {}}% + \dolistloop{\blx@optscopes}% + \blx@tempb {\blx@warn@badoptdt{#1}% \def\blx@tempa{boolean}} {\def\blx@tempa{#1}}}% - \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@entryopts}{#2}% - \@ifnextchar[%] - {\blx@defentryopt{#2}} - {\blx@defentryopt{#2}[]}} + \def\do##1{% + \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@##1opts}{#2}}% + \dolistloop{\blx@optscopes}% + \endgroup} - \long\def\blx@defentryopt#1[#2]#3{% - \ifcsundef{KV@blx@opt@ent@#1} - {\ifblank{#2} - {\define@key{blx@opt@ent}{#1}{#3}} - {\define@key{blx@opt@ent}{#1}[#2]{#3}}} - {\blx@err@optdef{#1}}} +% per-entry inheritance blocking option for biber +\blx@DeclareBackendOption{entry}[string]{noinherit} + + +% nametemplates meta-option entry/namelist/name scope +% this meta option is resolved by Biber +\blx@DeclareBackendOption{entry,namelist,name}[string]{nametemplates} +\gdef\blx@bcf@backendin@entry@nametemplates{sortingnamekeytemplatename,% + uniquenametemplatename,labelalphanametemplatename}% +\gdef\blx@bcf@backendin@namelist@nametemplates{sortingnamekeytemplatename,% + uniquenametemplatename,labelalphanametemplatename}% +\gdef\blx@bcf@backendin@name@nametemplates{sortingnamekeytemplatename,% + uniquenametemplatename,labelalphanametemplatename}% + +% Misc globalopts +\blx@DeclareBackendOption{global}[xml]{datamodel} +\blx@collectopts{string}{blx@globalopts}{controlversion} + +\newcommand*{\labelalphaothers}{+} +\newcommand*{\sortalphaothers}{\labelalphaothers} +\blx@DeclareBackendOption{global,type}[string]{alphaothers} +\blx@DeclareBackendOption{global,type}[string]{sortalphaothers} + +% date, eventdate, urldate etc. +\def\abx@dodates{\dolistloop\blx@datamodel@dates} +% year, endyear, month, endmonth etc. +\def\abx@dodateparts{\expandafter\docsvlist\expandafter{\blx@dateparts}} + +% '', event, url, orig etc. +\def\do#1{% + \blx@stripfromendinto{#1}{date}\blx@datetype + \listxadd\blx@datetypes{\blx@datetype}} +\abx@dodates +% main date field has an empty prefix (''date) which can't be added to a list +% and so do it explicity +% This is one of the few (only?) hard-coded datamodel assumptions but it is +% very unlikely that anyone would *remove* the main date field in a custom application ... +\def\abx@dodatetypes{\do{}\dolistloop\blx@datetypes} % Sanity check on date field names - they *must* end in 'date' to make things easier/possible later \def\do#1{% @@ -6519,7 +6791,7 @@ {} {\blx@error {Invalid date field name '#1'} - {Date fields in the datemodel must end in the string 'date' but '#1' doesn't}}} + {Date fields in the datamodel must end in the string 'date' but '#1' doesn't}}} \abx@dodates % date meta-information option fallbacks @@ -6812,15 +7084,13 @@ \csdef{if#1inits}{\iftoggle{abx@bool@#1inits}}% \appto\blx@TE@hook{% \csdef{if#1inits}{\blx@TE{\iftoggle{abx@bool@#1inits}}}}}% - \DeclareBibliographyOption[boolean]{#1inits}[true]{% + \DeclareBiblatexOption{global,type,entry,namelist,name}[boolean]{#1inits}[true]{% \settoggle{abx@bool@#1inits}{##1}}} \abx@donameparts \def\do#1{% % Define use<name> options scope for biber - \blx@collectopts{boolean}{blx@globalopts}{use#1}% - \blx@collectopts{boolean}{blx@typeopts}{use#1}% - \blx@collectopts{boolean}{blx@entryopts}{use#1}% + \blx@DeclareBackendOption{global,type,entry}[boolean]{use#1}% % Define name toggles \newtoggle{blx@use#1}\toggletrue{blx@use#1}% % Define tests @@ -7651,8 +7921,11 @@ \def\do##1{% \ifcsundef{abx@field@##1source} {} - {\csname c@##1\expandafter\endcsname\expandafter\the\csname c@\csuse{abx@field@##1source}\endcsname - \csletcs{abx@name@##1}{abx@name@\csuse{abx@field@##1source}}}}% + {\csname c@##1\expandafter\endcsname\expandafter + \the\csname c@\csuse{abx@field@##1source}\endcsname + \csletcs{abx@name@##1}{abx@name@\csuse{abx@field@##1source}}% + \csletcs{etb@tgl@abx@bool@more##1}{% + etb@tgl@abx@bool@more\csuse{abx@field@##1source}}}}% \dolistloop\abx@rnames% % Resolve labeldate % Note that here we can't refer to labelyear as this is where we create it, hence the @@ -7980,10 +8253,10 @@ \csletcs{#1}{abx@tmp@theformat}} \def\blx@labelwidth@resetlocal{% - \locallabelnumberwidth0pt\relax - \locallabelalphawidth0pt\relax + \locallabelnumberwidth\z@ + \locallabelalphawidth\z@ \def\do##1{% - \csname local##1width\endcsname0pt\relax}% + \csname local##1width\endcsname\z@}% \abx@dolabelfields} \def\blx@labelwidth@settolocal{% @@ -8215,17 +8488,23 @@ % {<entrykey>} % Get the saved information on which citations were mentioned last run \protected\def\abx@aux@cite#1{% - \listxadd\blx@lastcites{\detokenize{#1}}} + \xifinlist{\detokenize{#1}}\blx@lastcites + {} + {\listxadd\blx@lastcites{\detokenize{#1}}}} % {<refcontext>} % Get the saved information on which refcontexts were mentioned last run \protected\def\abx@aux@refcontext#1{% - \listxadd\blx@lastrefcontexts{\detokenize{#1}}} + \xifinlist{\detokenize{#1}}\blx@lastrefcontexts + {} + {\listxadd\blx@lastrefcontexts{\detokenize{#1}}}} % {<sortingtemplatename>} % Get the saved information on which shorthand sorting templates were mentioned last run \protected\def\abx@aux@biblist#1{% - \listgadd\blx@lastbiblists{#1}} + \ifinlist{#1}\blx@lastbiblists + {} + {\listgadd\blx@lastbiblists{#1}}} % Here we mustn't change the checksum if we used localnumbers from the % .aux file as this means that deferred numbering is @@ -8372,7 +8651,7 @@ \advance\blx@tempcnta\@ne}% \dolistcsloop{blx@pref@\the\c@refsection @#1}% \edef\blx@tempa{\endgroup\noexpand\blx@bbl@listdef - {pageref}{\the\blx@tempcnta}{\blx@tempa}}% + {pageref}{\the\blx@tempcnta}{\expandonce{\blx@tempa}}}% \blx@tempa} %% Data input @@ -8700,6 +8979,8 @@ \define@key{blx@bib2}{check}{\blx@key@bibcheck{#1}} \define@key{blx@biblist2}{check}{\blx@key@bibcheck{#1}} +% empty bibcheck does nothing +\cslet{blx@bibcheck@}\relax \def\blx@key@bibcheck#1{% \ifcsdef{blx@bibcheck@#1} {\letcs\blx@bibcheck{blx@bibcheck@#1}} @@ -8709,74 +8990,103 @@ {The check '#1' could not be found.\MessageBreak Use \string\defbibcheck\space to define it}}} -\define@key{blx@bhd}{heading}{\blx@key@heading{#1}} -\define@key{blx@bib2}{heading}{\blx@key@heading{#1}} -\define@key{blx@biblist2}{heading}{\blx@key@heading{#1}} -\define@key{blx@bbs}{heading}{\blx@key@heading{#1}} -\define@key{blx@bbg}{heading}{\blx@key@heading{#1}} - -\def\blx@key@heading#1{% - \ifcsundef{blx@head@#1} +\def\blx@default@theheading{bibliography} +\define@key{blx@bibdefaults}{heading}{% + \blx@key@heading{\blx@default@theheading}{#1}} +\define@key{blx@bhd}{heading}{% + \blx@key@heading{\blx@theheading}{#1}} +\define@key{blx@bib2}{heading}{% + \blx@key@heading{\blx@theheading}{#1}} +\define@key{blx@biblist2}{heading}{% + \blx@key@heading{\blx@theheading}{#1}} +\define@key{blx@bbs}{heading}{% + \blx@key@heading{\blx@theheading}{#1}} +\define@key{blx@bbg}{heading}{% + \blx@key@heading{\blx@theheading}{#1}} + +\def\blx@key@heading#1#2{% + \ifcsundef{blx@head@#2} {\blx@error - {Heading '#1' not found} - {The heading '#1' could not be found.\MessageBreak + {Heading '#2' not found} + {The heading '#2' could not be found.\MessageBreak Use \string\defbibheading\space to define it}} - {\def\blx@theheading{#1}}} - -\define@key{blx@bib2}{env}{\blx@key@env{#1}} -\define@key{blx@biblist2}{env}{\blx@key@env{#1}} -\define@key{blx@bbs}{env}{\blx@key@env{#1}} -\define@key{blx@bbg}{env}{\blx@key@env{#1}} -\define@key{blx@bbc}{env}{\blx@key@env{#1}} - -\def\blx@key@env#1{% - \ifcsundef{blx@env@#1} + {\def#1{#2}}} + +\def\blx@default@theenv{bibliography} +\define@key{blx@bibdefaults}{env}{% + \blx@key@env{\blx@default@theenv}{#1}} +\define@key{blx@bib2}{env}{\blx@key@env{\blx@theenv}{#1}} +\define@key{blx@biblist2}{env}{\blx@key@env{\blx@theenv}{#1}} +\define@key{blx@bbs}{env}{\blx@key@env{\blx@theenv}{#1}} +\define@key{blx@bbg}{env}{\blx@key@env{\blx@theenv}{#1}} +\define@key{blx@bbc}{env}{\blx@key@env{\blx@theenv}{#1}} + +\def\blx@key@env#1#2{% + \ifcsundef{blx@env@#2} {\blx@error - {Environment '#1' not found} - {The environment '#1' could not be found.\MessageBreak + {Environment '#2' not found} + {The environment '#2' could not be found.\MessageBreak Use \string\defbibenvironment\space to define it}} - {\def\blx@theenv{#1}}} + {\def#1{#2}}} +\let\blx@default@thetitle\@empty +\define@key{blx@bibdefaults}{title}{% + \def\blx@default@thetitle{#1}} \define@key{blx@bhd}{title}{\def\blx@thetitle{#1}} \define@key{blx@bib2}{title}{\def\blx@thetitle{#1}} \define@key{blx@biblist2}{title}{\def\blx@thetitle{#1}} -\define@key{blx@bib2}{prenote}{\blx@key@prenote{#1}} -\define@key{blx@biblist2}{prenote}{\blx@key@prenote{#1}} -\define@key{blx@bbs}{prenote}{\blx@key@prenote{#1}} -\define@key{blx@bbg}{prenote}{\blx@key@prenote{#1}} -\define@key{blx@bbc}{prenote}{\blx@key@prenote{#1}} -\def\blx@key@prenote#1{% - \ifcsundef{blx@note@#1} - {\blx@error - {Note '#1' not found} - {The note '#1' could not be found.\MessageBreak - Use \string\defbibnote\space to define it}} - {\def\blx@theprenote{#1}}} - -\define@key{blx@bib2}{postnote}{\blx@key@postnote{#1}} -\define@key{blx@biblist2}{postnote}{\blx@key@postnote{#1}} -\define@key{blx@bbs}{postnote}{\blx@key@postnote{#1}} -\define@key{blx@bbg}{postnote}{\blx@key@postnote{#1}} -\define@key{blx@bbc}{postnote}{\blx@key@postnote{#1}} - -\def\blx@key@postnote#1{% - \ifcsundef{blx@note@#1} - {\blx@error - {Note '#1' not found} - {The note '#1' could not be found.\MessageBreak - Use \string\defbibnote\space to define it}} - {\def\blx@thepostnote{#1}}} - +\cslet{blx@note@}\@empty +\def\blx@key@bibnote#1#2{% + \ifcsundef{blx@note@#2} + {\blx@error + {Note '#2' not found} + {The note '#2' could not be found.\MessageBreak + Use \string\defbibnote\space to define it}} + {\def#1{#2}}} + +\let\blx@default@theprenote\@empty +\define@key{blx@bibdefaults}{prenote}{% + \blx@key@bibnote{\blx@default@theprenote}{#1}} +\define@key{blx@bib2}{prenote}{% + \blx@key@bibnote{\blx@theprenote}{#1}} +\define@key{blx@biblist2}{prenote}{% + \blx@key@bibnote{\blx@theprenote}{#1}} +\define@key{blx@bbs}{prenote}{% + \blx@key@bibnote{\blx@theprenote}{#1}} +\define@key{blx@bbg}{prenote}{% + \blx@key@bibnote{\blx@theprenote}{#1}} +\define@key{blx@bbc}{prenote}{% + \blx@key@bibnote{\blx@theprenote}{#1}} + +\let\blx@default@thepostnote\@empty +\define@key{blx@bibdefaults}{postnote}{% + \blx@key@bibnote{\blx@default@thepostnote}{#1}} +\define@key{blx@bib2}{postnote}{% + \blx@key@bibnote{\blx@thepostnote}{#1}} +\define@key{blx@biblist2}{postnote}{% + \blx@key@bibnote{\blx@thepostnote}{#1}} +\define@key{blx@bbs}{postnote}{% + \blx@key@bibnote{\blx@thepostnote}{#1}} +\define@key{blx@bbg}{postnote}{% + \blx@key@bibnote{\blx@thepostnote}{#1}} +\define@key{blx@bbc}{postnote}{% + \blx@key@bibnote{\blx@thepostnote}{#1}} + +\let\abx@default@locallabelwidth\@gobble +\define@key{blx@bibdefaults}{locallabelwidth}{% + \blx@key@locallabelwidth{\abx@default@locallabelwidth}{#1}} \define@key{blx@bib1}{locallabelwidth}[]{} \define@key{blx@biblist1}{locallabelwidth}[]{} -\define@key{blx@bib2}{locallabelwidth}[true]{\blx@key@locallabelwidth{#1}} -\define@key{blx@biblist2}{locallabelwidth}[true]{\blx@key@locallabelwidth{#1}} +\define@key{blx@bib2}{locallabelwidth}[true]{% + \blx@key@locallabelwidth{\abx@locallabelwidth}{#1}} +\define@key{blx@biblist2}{locallabelwidth}[true]{% + \blx@key@locallabelwidth{\abx@locallabelwidth}{#1}} -\def\blx@key@locallabelwidth#1{% - \ifstrequal{#1}{true} - {\def\abx@locallabelwidth{\blx@locallabelwidth}} - {\let\abx@locallabelwidth\@gobble}} +\def\blx@key@locallabelwidth#1#2{% + \ifstrequal{#2}{true} + {\def#1{\blx@locallabelwidth}} + {\let#1\@gobble}} \define@key{blx@bib2}{resetnumbers}[true]{% \iftoggle{blx@defernumbers} @@ -8798,6 +9108,10 @@ Ignoring 'omitnumbers=true'}}} {}} + +\newrobustcmd*{\DeclarePrintbibliographyDefaults}{% + \setkeys{blx@bibdefaults}} + % [<options>] \newrobustcmd*{\printbibheading}{% \begingroup @@ -8807,8 +9121,8 @@ {\blx@printbibheading[]}} \def\blx@printbibheading[#1]{% - \def\blx@theheading{bibliography}% - \let\blx@thetitle\@empty + \let\blx@theheading\blx@default@theheading + \let\blx@thetitle\blx@default@thetitle \blx@safe@actives \setkeys{blx@bhd}{#1}% \blx@rest@actives @@ -8833,11 +9147,11 @@ \def\blx@printbibliography[#1]{% \toggletrue{blx@tempa}% \toggletrue{blx@tempb}% - \def\blx@theheading{bibliography}% - \def\blx@theenv{bibliography}% - \let\blx@theprenote\@empty - \let\blx@thepostnote\@empty - \let\blx@thetitle\@empty + \let\blx@theheading\blx@default@theheading + \let\blx@theenv\blx@default@theenv + \let\blx@theprenote\blx@default@theprenote + \let\blx@thepostnote\blx@default@thepostnote + \let\blx@thetitle\blx@default@thetitle % defaults \let\blx@tempa\@empty% before there is a .bbl, this must not be undef \edef\blx@tempe{\the\c@refsection}% default refsection is current @@ -8885,11 +9199,11 @@ {\blx@bibbysection[]}} \def\blx@bibbysection[#1]{% - \def\blx@theheading{bibliography}% - \def\blx@theenv{bibliography}% - \let\blx@theprenote\@empty - \let\blx@thepostnote\@empty - \let\blx@thetitle\@empty + \let\blx@theheading\blx@default@theheading + \let\blx@theenv\blx@default@theenv + \let\blx@theprenote\blx@default@theprenote + \let\blx@thepostnote\blx@default@thepostnote + \let\blx@thetitle\blx@default@thetitle \c@refsection\z@ \blx@safe@actives \setkeys{blx@bbs}{#1}% @@ -8924,11 +9238,11 @@ {\blx@bibbysegment[]}} \def\blx@bibbysegment[#1]{% - \def\blx@theheading{bibliography}% - \def\blx@theenv{bibliography}% - \let\blx@theprenote\@empty - \let\blx@thepostnote\@empty - \let\blx@thetitle\@empty + \let\blx@theheading\blx@default@theheading + \let\blx@theenv\blx@default@theenv + \let\blx@theprenote\blx@default@theprenote + \let\blx@thepostnote\blx@default@thepostnote + \let\blx@thetitle\blx@default@thetitle \c@refsegment\@ne \blx@safe@actives \setkeys{blx@bbg}{#1}% @@ -8968,11 +9282,11 @@ {\blx@bibbycategory[]}} \def\blx@bibbycategory[#1]{% - \def\blx@theheading{bibliography}% - \def\blx@theenv{bibliography}% - \let\blx@theprenote\@empty - \let\blx@thepostnote\@empty - \let\blx@thetitle\@empty + \let\blx@theheading\blx@default@theheading + \let\blx@theenv\blx@default@theenv + \let\blx@theprenote\blx@default@theprenote + \let\blx@thepostnote\blx@default@thepostnote + \let\blx@thetitle\blx@default@thetitle \c@refsection\z@ \blx@safe@actives \setkeys{blx@bbc}{#1}% @@ -8986,7 +9300,7 @@ {} {\toggletrue{blx@tempa}% \begingroup - \blx@key@heading{#1}% + \blx@key@heading{\blx@theheading}{#1}% \let\blx@tempa\@empty \ifcsvoid{blx@dlist@entry@\the\c@refsection @\blx@refcontext@context} {} @@ -9147,6 +9461,10 @@ \csxdef{blx@assignedrefcontextbib@#1@#2}{\detokenize{#3}}} \def\abx@aux@refcontextdefaultsdone{% \global\boolfalse{refcontextdefaults}} +% \abx@aux@defaultlabelprefix is a dummy only used by BibTeX to implement a +% simple labelprefix not based on full refcontexts, which BibTeX does not +% support. +\let\abx@aux@defaultlabelprefix\@gobblethree \AtEndDocument{% % write the .aux to say we don't need to re-run to consume refcontext defaults @@ -9290,7 +9608,11 @@ % Note that the name must be unique so we prepend "#2:" because the combination of % options might not generate a unique name since sortschemename has a fallback to the % refcontext scheme if there is no sortscheme named after the list - \blx@edef@refcontext{#2:\blx@tempc/\blx@refcontext@sortingnamekeytemplatename/\blx@refcontext@labelprefix/\blx@refcontext@uniquenametemplatename/\blx@refcontext@labelalphanametemplatename}% + \blx@edef@refcontext{#2:\blx@tempc/% + \blx@refcontext@sortingnamekeytemplatename/% + \blx@refcontext@labelprefix/% + \blx@refcontext@uniquenametemplatename/% + \blx@refcontext@labelalphanametemplatename}% \xifinlist\blx@tempc\blx@sortingtemplatenames {} {\listxadd\blx@sortingtemplatenames\blx@tempc}% @@ -9302,8 +9624,8 @@ % so we can compare on next run \xifinlist\blx@tempc\blx@biblists {} - {\listxadd\blx@biblists\blx@tempc - \blx@auxwrite\@mainaux{}{\string\abx@aux@biblist{\blx@tempc}}}% + {\listxadd\blx@biblists\blx@tempc}% + \blx@auxwrite\@mainaux{}{\string\abx@aux@biblist{\blx@tempc}}% \setkeys{blx@biblist1}{#1}% Set section only, if present ... \blx@rest@actives \ifcsvoid{blx@dlist@list@\blx@tempe @\blx@refcontext@context} @@ -9430,7 +9752,9 @@ % Set refcontext from named refcontext, if given \ifblank{#2} {} - {\edef\z{\noexpand\setkeys{blx@refcontext}{\csuse{blx@refcontext@name@#2}}}\z}% + {\edef\z{% + \noexpand\setkeys{blx@refcontext}{\csuse{blx@refcontext@name@#2}}}% + \z}% % Override with explicit refcontext keyvals, if given \setkeys{blx@refcontext}{#1}% % Add the sortingtemplate to the list of sortingtemplates so we can track @@ -9438,12 +9762,17 @@ \xifinlist\blx@refcontext@sortingtemplatename\blx@sortingtemplatenames {} {\listxadd\blx@sortingtemplatenames\blx@refcontext@sortingtemplatename}% - \blx@xdef@refcontext{\blx@refcontext@sortingtemplatename/\blx@refcontext@sortingnamekeytemplatename/\blx@refcontext@labelprefix/\blx@refcontext@uniquenametemplatename/\blx@refcontext@labelalphanametemplatename}% + \blx@xdef@refcontext{% + \blx@refcontext@sortingtemplatename/% + \blx@refcontext@sortingnamekeytemplatename/% + \blx@refcontext@labelprefix/% + \blx@refcontext@uniquenametemplatename/% + \blx@refcontext@labelalphanametemplatename}% % Add the refcontext to the list of refcontexts so we can compare on next run \xifinlist\blx@refcontext@context\blx@refcontexts {} - {\listxadd\blx@refcontexts\blx@refcontext@context - \blx@auxwrite\@mainaux{}{\string\abx@aux@refcontext{\blx@refcontext@context}}}% + {\listxadd\blx@refcontexts\blx@refcontext@context}% + \blx@auxwrite\@mainaux{}{\string\abx@aux@refcontext{\blx@refcontext@context}}% \ifcsundef{blx@sortingtemplate@\blx@refcontext@sortingtemplatename} {\blx@err@invopt{sorting=\blx@refcontext@sortingtemplatename}{}} {}% @@ -9466,7 +9795,12 @@ \gdef\blx@refcontext@sortingnamekeytemplatename{global}% \gdef\blx@refcontext@uniquenametemplatename{global}% \gdef\blx@refcontext@labelalphanametemplatename{global}% - \blx@xdef@refcontext{\blx@refcontext@sortingtemplatename/\blx@refcontext@sortingnamekeytemplatename//\blx@refcontext@uniquenametemplatename/\blx@refcontext@labelalphanametemplatename}} + \blx@xdef@refcontext{% + \blx@refcontext@sortingtemplatename/% + \blx@refcontext@sortingnamekeytemplatename/% + /% + \blx@refcontext@uniquenametemplatename/% + \blx@refcontext@labelalphanametemplatename}} % Meta option to set all name template options \define@key{blx@refcontext}{nametemplates}{% @@ -9720,64 +10054,185 @@ % we are prepending to the commands so that the resets happen before % the part title is typeset otherwise \cites in there could be "ibid" % which makes no sense + +% option switch +%{<option level counter>}{<patch>}{<pre>}{<post>} +\def\blx@patchsection@switch#1#2#3#4{% + \AtEndPreamble{% + #3% + \ifcase#1 + \or % 1: part + \blx@refpatch@part{#2}% + \or % 2: chapter + \blx@refpatch@chapter{#2}% + \or % 3: section + \blx@refpatch@sect{section}{#2}{1}% + \or % 4: subsection + \blx@refpatch@sect{subsection}{#2}{2}% + \or % 5: chapter+ = part, chapter + \blx@refpatch@part{#2}% + \blx@refpatch@chapter{#2}% + \or % 6: section+ = part, chapter, section + \blx@refpatch@part{#2}% + \ifundef\chapter + {} + {\blx@refpatch@chapter{#2}}% + \blx@refpatch@sect{section}{#2}{1}% + \or % 7: subsection+ = part, chapter, section, subsection + \blx@refpatch@part{#2}% + \ifundef\chapter + {} + {\blx@refpatch@chapter{#2}}% + \blx@refpatch@sect{section}{#2}{1}% + \blx@refpatch@sect{subsection}{#2}{2}% + \fi + #4% + }% +} + +%% Patching all the different document classes and their sectioning +%% commands is ... messy at best +%% For now we do the big three: (1) Standard classes, (2) KOMA-Script +%% and (3) memoir. +%% +%% Timing of the patch can be tricky. +%% Ideally we want the code to be executed when all counters have +%% been increased so the labels attach to the right thing, but +%% at the same time we want the code to be executed before the heading +%% is typeset so it already applies to the text in the heading. +%% Bonus points for actually executing the code on the correct page. + +%% memoir has hooks for section headings that we can use here +%% see 18.25 'Heading Hooks' of the manual (v3.7h, 2018/12/12) +%% they are in a good position, when the counters have been +%% increased but heading text not yet typeset. +%% The manual suggests this hooks have been around since 2005 or so, +%% so we take them for granted. + +%% Newer versions of KOMA-Script (>=3.27) (will) have a hook system +%% that we can use for that purpose as well. +%% This is fairly new, so we need to have a fallback for older versions. + +%% The standard classes are tricky. They have no good hooks and just +%% for sections at least \pretocmd-ing executes the code before +%% counters are increased, so the labels attach to the wrong thing. + +%% Test for correct KOMA patch method +% KOMA 3.27 has \AddtoDoHook +\newcommand*{\blx@ifkoma@AddtoDoHook}{% + \ifboolexpr{not test {\ifcsundef{KOMAClassName}} + and not test {\ifcsundef{AddtoDoHook}}}} + +% KOMA 3.26 has \startsection@secnumdepth for some testing +\newcommand*{\blx@ifkoma@startsection}{% + \ifboolexpr{not test {\ifcsundef{KOMAClassName}} + and not test {\ifcsundef{startsection@secnumdepth}}}} + +\newcommand*{\blx@ifmemoir}{\@ifclassloaded{memoir}} + +% Note that \ExecuteDoHook always feeds an argument to the code, here that is +% going to be an empty group, which we explicitly gobble to avoid trouble. +\def\blx@refpatch@koma@AddtoDoHook#1#2{% + \AddtoDoHook{heading/begingroup/#1}{#2\@gobble}} + +% \part +\def\blx@refpatch@part@memoir#1{% + \apptocmd\mempartinfo{#1} + {}{\blx@err@patch{\string\mempartinfo}}% + \apptocmd\mempartstarinfo{#1} + {}{\blx@err@patch{\string\mempartstarinfo}}} + +\def\blx@refpatch@part@std#1{% + \toggletrue{blx@tempa}% + \def\do##1{% + \pretocmd##1{#1} + {\togglefalse{blx@tempa}\listbreak} + {}}% + \docsvlist{% + \H@old@part,% hyperref + \NR@part,% nameref + \@part}% latex/koma-script/memoir + \iftoggle{blx@tempa} + {\blx@err@patch{\string\@part}} + {}% + \let\do\noexpand} + \def\blx@refpatch@part#1{% - \ifundef\part - {\blx@err@nodocdiv{part}} - {\toggletrue{blx@tempa}% - \def\do##1{% - \pretocmd##1{#1} - {\togglefalse{blx@tempa}\listbreak} - {}}% - \docsvlist{% - \H@old@part,% hyperref - \NR@part,% nameref - \@part}% latex/koma-script/memoir - \iftoggle{blx@tempa} - {\blx@err@patch{\string\@part}} - {}% - \let\do\noexpand}} + \ifundef\part + {\blx@err@nodocdiv{part}} + {\blx@ifkoma@AddtoDoHook + {\blx@refpatch@koma@AddtoDoHook{part}{#1}} + {\blx@ifmemoir + {\blx@refpatch@part@memoir{#1}} + {\blx@refpatch@part@std{#1}}}}} + +% \chapter +\def\blx@refpatch@chapter@memoir#1{% + \apptocmd\memchapinfo{#1} + {}{\blx@err@patch{\string\memchapinfo}}% + \apptocmd\memchapstarinfo{#1} + {}{\blx@err@patch{\string\memchapstarinfo}}} + +\def\blx@refpatch@chapter@std#1{% + \pretocmd\@makechapterhead{#1} + {} + {\blx@err@patch{\string\@makechapterhead}} + \pretocmd\@makeschapterhead{#1} + {} + {\blx@err@patch{\string\@makeschapterhead}}} \def\blx@refpatch@chapter#1{% \ifundef\chapter {\blx@err@nodocdiv{chapter}} - {% the \ifcsundef{KOMAClassName} should be redundant, but you never know - \ifboolexpr{test {\ifcsundef{KOMAClassName}} - or test {\ifcsundef{startsection@secnumdepth}}} - {\pretocmd\@makechapterhead{#1} - {} - {\blx@err@patch{\string\@makechapterhead}} - \pretocmd\@makeschapterhead{#1} - {} - {\blx@err@patch{\string\@makeschapterhead}}} - {% <- new KOMA >= 3.26 defines \startsection@secnumdepth - \At@startsection{\ifnumequal{\startsection@secnumdepth}{0}{#1}{}}}}} - -\def\blx@refpatch@sect#1{% + {\blx@ifkoma@AddtoDoHook + {\blx@refpatch@koma@AddtoDoHook{chapter}{#1}} + {\blx@ifmemoir + {\blx@refpatch@chapter@memoir{#1}} + {\blx@refpatch@chapter@std{#1}}}}} + +% \section, \subsection +% {<section csname>}{<precode>}{<section level number>} +\def\blx@refpatch@sect#1#2#3{% \ifcsundef{#1} {\blx@err@nodocdiv{#1}\@gobbletwo} - {% the \ifcsundef{KOMAClassName} should be redundant, but you never know - \ifboolexpr{test {\ifcsundef{KOMAClassName}} - or test {\ifcsundef{startsection@secnumdepth}}} - {\blx@refpatch@sect@i} - {\blx@refpatch@sect@koma}}} + {\blx@ifkoma@AddtoDoHook + {\blx@refpatch@koma@AddtoDoHook{#1}{#2}} + {\blx@ifkoma@startsection + {\blx@refpatch@sect@koma@startsection{#2}{#3}} + {\blx@ifmemoir + {\blx@refpatch@sect@memoir{#1}{#2}} + {\blx@refpatch@sect@std{#2}{#3}}}}}} % KOMA >= 3.26 defines \startsection@secnumdepth to check the sectioning level, -% so we can now use \At@startsection -\def\blx@refpatch@sect@koma#1#2{% +% so we can now use \At@startsection. +% Starting from 3.27 we use AddtoDoHook, so this is a short-lived +% intermezzo. +\def\blx@refpatch@sect@koma@startsection#1#2{% \At@startsection{\ifnumequal{\startsection@secnumdepth}{#2}{#1}{}}} -\edef\blx@refpatch@sect@i#1#2{% +\edef\blx@refpatch@sect@memoir#1#2{% + \apptocmd\noexpand\memsecinfo + {\noexpand\blx@refpatch@sect@memoir@i{\string#1}{#1}{#2}} + {}{\noexpand\blx@err@patch{\string\memsecinfo}}% + \apptocmd\noexpand\memsecstarinfo + {\noexpand\blx@refpatch@sect@memoir@i{\string#1}{#1}{#2}} + {}{\noexpand\blx@err@patch{\string\memsecstarinfo}}} + +\def\blx@refpatch@sect@memoir@i#1#2#3{% + \ifstrequal{#1}{#2}{#3}{}} + +\edef\blx@refpatch@sect@std#1#2{% \def\noexpand\do##1{% \pretocmd##1% - {\noexpand\blx@refpatch@sect@ii{#1}{#2}{\string#2}} + {\noexpand\blx@refpatch@sect@std@i{#1}{#2}{\string#2}} {\togglefalse{blx@tempa}\noexpand\listbreak} {}}% - \noexpand\blx@refpatch@sect@iii} + \noexpand\blx@refpatch@sect@std@ii} -\def\blx@refpatch@sect@ii#1#2#3{% +\def\blx@refpatch@sect@std@i#1#2#3{% \ifnumequal{#2}{#3}{#1}{}} -\def\blx@refpatch@sect@iii{% +\def\blx@refpatch@sect@std@ii{% \toggletrue{blx@tempa}% \docsvlist{% order does matter: \H@old@sectm@m,% memoir+hyperref (what a mess...) @@ -10050,12 +10505,14 @@ \blx@bibreq{#1}% \ifinlist{#1}\blx@cites {} - {\listgadd{\blx@cites}{#1}% - \blx@auxwrite\@mainaux{}{\string\abx@aux@cite{#1}}}% + {\listgadd{\blx@cites}{#1}}% + \blx@auxwrite\@mainaux{}{\string\abx@aux@cite{#1}}% \ifinlistcs{#1}{blx@segm@\the\c@refsection @\the\c@refsegment} {} {\listcsgadd{blx@segm@\the\c@refsection @\the\c@refsegment}{#1}}% - \blx@auxwrite\@mainaux{}{\string\abx@aux@segm{\the\c@refsection}{\the\c@refsegment}{\detokenize{#1}}}% + \blx@auxwrite\@mainaux{}{\string\abx@aux@segm{\the\c@refsection}% + {\the\c@refsegment}% + {\detokenize{#1}}}% \blx@ifdata{#1} {} {\ifcsdef{blx@miss@\the\c@refsection} @@ -10065,7 +10522,9 @@ {\blx@logreq@active{#2{#1}}}}} \protected\def\abx@aux@segm#1#2#3{% - \listcsxadd{blx@segm@#1@#2}{\detokenize{#3}}} + \xifinlistcs{\detokenize{#3}}{blx@segm@#1@#2} + {} + {\listcsxadd{blx@segm@#1@#2}{\detokenize{#3}}}} \def\blx@nocitation@all{% \ifinlist{*}\blx@nocites @@ -10120,7 +10579,8 @@ {} {\blx@error {Conflicting definitions of '\blx@tempa'} - {The entry set '\blx@tempa' been defined before.\MessageBreak + {The entry set '\blx@tempa' has been defined before.% + \MessageBreak old: \blx@tempa\space = % \csuse{blx@set@\the\c@refsection @\blx@tempa}\MessageBreak new: \blx@tempa\space = \blx@tempb\MessageBreak @@ -10778,7 +11238,7 @@ {\global\cslet{blx@pref@#3@\detokenize{#2}}\@empty \expandafter\blx@onlypreamble\csname blx@pref@#3@\detokenize{#2}\endcsname} {}% - \ifinlistcs{#4}{blx@pref@#3@\detokenize{#2}} + \blx@ifprintableinlistcs{#4}{blx@pref@#3@\detokenize{#2}} {} {\listcsgadd{blx@pref@#3@\detokenize{#2}}{#4}}% \blx@addpagesum{#1}{#5}} @@ -10850,11 +11310,9 @@ \def\blx@nocite#1{% \@bsphack \AfterPreamble{% - \iftoggle{blx@bibliography} - {} - {\ifstrequal{*}{#1} - {\blx@nocitation@all} - {\blx@xsanitizeafter{\forcsvlist\blx@nocite@do}{#1}}}}% + \ifstrequal{*}{#1} + {\blx@nocitation@all} + {\blx@xsanitizeafter{\forcsvlist\blx@nocite@do}{#1}}}% \@esphack} \def\blx@nocite@do#1{% @@ -11038,7 +11496,10 @@ {\def\abx@field@prenote{##1}}% \ifblank{##2} {\let\blx@thenotecheck\relax} - {\def\abx@field@postnote{##2}}% + {\def\abx@field@postnote{##2}% + \iftoggle{blx@volcite} + {\blx@defvolcitepostnote##2} + {}}% \def\blx@precode{\delimcontext{#1}#2}% \def\blx@loopcode{#3}% \def\blx@dlimcode{#4}% @@ -11479,6 +11940,7 @@ \def\iffieldbibstring#1{\blx@TE{\blx@imc@iffieldbibstring{#1}}}% \def\ifnatbibmode{\blx@TE{\iftoggle{blx@natbib}}}% \def\ifcitation{\blx@TE{\iftoggle{blx@citation}}}% + \def\ifvolcite{\blx@TE{\iftoggle{blx@volcite}}}% \def\ifbibliography{\blx@TE{\iftoggle{blx@bibliography}}}% \def\ifciteindex{\blx@TE{\iftoggle{blx@citeindex}}}% \def\ifbibindex{\blx@TE{\iftoggle{blx@bibindex}}}% @@ -11818,7 +12280,9 @@ % {<macro>}[<pre>]{<vol>}[<post>] => <macro>{<pre>}{{<vol>}{<post>}} \newrobustcmd*{\volcitecmd}{% - \AtNextCite{\DeclareFieldAlias{postnote}{volcitenote}}% + \AtNextCite{% + \toggletrue{blx@volcite}% + \csuse{blx@hook@volcite}}% \begingroup\let\blx@citeargs\blx@volciteargs} \protected\def\blx@volciteargs#1{% @@ -11836,7 +12300,9 @@ \blx@citeargs@iii{#1{#2}{{#3}{#4}}}} \newrobustcmd*{\multivolcitecmd}{% - \AtNextCite{\DeclareFieldAlias{postnote}{volcitenote}}% + \AtNextCite{% + \toggletrue{blx@volcite}% + \csuse{blx@hook@volcite}}% \def\blx@hook@mcite@before{% \global\undef\blx@hook@mcite@before \let\blx@citeargs\blx@volmciteargs}} @@ -11846,6 +12312,24 @@ {\blx@volciteargs@i{#1}} {\blx@volciteargs@i{#1}[]}} +\long\def\blx@defvolcitepostnote#1#2{% + \def\abx@field@volcitevolume{#1}% + \ifblank{#2} + {} + {\def\abx@field@volcitepages{#2}}} + +\newrobustcmd*{\AtVolcite}{% + \@ifstar + {\global\undef\blx@hook@volcite + \gappto\blx@hook@volcite} + {\gappto\blx@hook@volcite}} +\@onlypreamble\AtVolcite +\def\blx@imc@UseVolciteHook{\csuse{blx@hook@volcite}} +\blx@regimcs{\UseVolciteHook} + +\AtVolcite{% + \DeclareFieldAlias{postnote}{volcitenote}} + %% Control file \begingroup @@ -12092,8 +12576,14 @@ ~~<bcf:optionscope type="#1">\blx@nl #2% ~~</bcf:optionscope>\blx@nl} -\xdef\blx@xml@option@scope#1#2{% +\xdef\blx@xml@option@scope#1#2{% GLOBAL/TYPE scope ~~~~<bcf:option datatype="#1">#2</bcf:option>\blx@nl} +\xdef\blx@xml@option@entryscope#1#2{% ENTRY scope + ~~~~<bcf:option datatype="#1"\noexpand\ifcsdef{blx@bcf@backendout@entry@#2}{ backendout="1"}{}\noexpand\ifcsdef{blx@bcf@backendin@entry@#2}{ backendin="\noexpand\csuse{blx@bcf@backendin@entry@#2}"}{}>#2</bcf:option>\blx@nl} +\xdef\blx@xml@option@namelistscope#1#2{% NAMELIST scope + ~~~~<bcf:option datatype="#1"\noexpand\ifcsdef{blx@bcf@backendout@namelist@#2}{ backendout="1"}{}\noexpand\ifcsdef{blx@bcf@backendin@namelist@#2}{ backendin="\noexpand\csuse{blx@bcf@backendin@namelist@#2}"}{}>#2</bcf:option>\blx@nl} +\xdef\blx@xml@option@namescope#1#2{% NAME scope + ~~~~<bcf:option datatype="#1"\noexpand\ifcsdef{blx@bcf@backendout@name@#2}{ backendout="1"}{}\noexpand\ifcsdef{blx@bcf@backendin@name@#2}{ backendin="\noexpand\csuse{blx@bcf@backendin@name@#2}"}{}>#2</bcf:option>\blx@nl} \endgroup \def\blx@bcf@options@global{% @@ -12119,7 +12609,13 @@ \blx@xml@svalue{mincitenames}{\blx@mincitenames}% \blx@xml@svalue{minsortnames}{\blx@minsortnames}% \blx@xml@svalue{minitems}{\blx@minitems}% + \blx@xml@toggle{nohashothers}% + \blx@xml@toggle{noroman}% + \blx@xml@toggle{nosortothers}% \blx@xml@toggle{singletitle}% + \blx@xml@toggle{skipbib}% + \blx@xml@toggle{skipbiblist}% + \blx@xml@toggle{skiplab}% \blx@xml@svalue{sortalphaothers}{\sortalphaothers}% \blx@xml@svalue{sortlocale}{\blx@sortlocale}% \blx@xml@svalue{sortingtemplatename}{\blx@sorting}% @@ -12155,15 +12651,18 @@ {\csuse{blx@bcf@labeldatespec@#1}} {\blx@bcf@labeldatespec}}% \blx@xml@svalue{maxalphanames}{\blx@maxalphanames}% - \blx@xml@svalue{maxbibnames}{\blx@maxbibnames@type}% - \blx@xml@svalue{maxcitenames}{\blx@maxcitenames@type}% - \blx@xml@svalue{maxsortnames}{\blx@maxsortnames@type}% - \blx@xml@svalue{maxitems}{\blx@maxitems@type}% + \blx@xml@svalue{maxbibnames}{\blx@maxbibnames}% + \blx@xml@svalue{maxcitenames}{\blx@maxcitenames}% + \blx@xml@svalue{maxsortnames}{\blx@maxsortnames}% + \blx@xml@svalue{maxitems}{\blx@maxitems}% \blx@xml@svalue{minalphanames}{\blx@minalphanames}% - \blx@xml@svalue{minbibnames}{\blx@minbibnames@type}% - \blx@xml@svalue{mincitenames}{\blx@mincitenames@type}% - \blx@xml@svalue{minsortnames}{\blx@minsortnames@type}% - \blx@xml@svalue{minitems}{\blx@minitems@type}% + \blx@xml@svalue{minbibnames}{\blx@minbibnames}% + \blx@xml@svalue{mincitenames}{\blx@mincitenames}% + \blx@xml@svalue{minsortnames}{\blx@minsortnames}% + \blx@xml@svalue{minitems}{\blx@minitems}% + \blx@xml@toggle{nohashothers}% + \blx@xml@toggle{noroman}% + \blx@xml@toggle{nosortothers}% \blx@xml@toggle{singletitle}% \blx@xml@toggle{skipbib}% \blx@xml@toggle{skiplab}% @@ -12239,21 +12738,21 @@ % ENTRY \def\do##1{% \begingroup - \def\do####1{\xappto\blx@bcf@options@scope@entry{\blx@xml@option@scope{##1}{####1}}}% + \def\do####1{\xappto\blx@bcf@options@scope@entry{\blx@xml@option@entryscope{##1}{####1}}}% \dolistcsloop{blx@entryopts@##1}% \endgroup}% \dolistloop\blx@entryopts@datatypes % NAMELIST \def\do##1{% \begingroup - \def\do####1{\xappto\blx@bcf@options@scope@namelist{\blx@xml@option@scope{##1}{####1}}}% + \def\do####1{\xappto\blx@bcf@options@scope@namelist{\blx@xml@option@namelistscope{##1}{####1}}}% \dolistcsloop{blx@namelistopts@##1}% \endgroup}% \dolistloop\blx@entryopts@datatypes % NAME \def\do##1{% \begingroup - \def\do####1{\xappto\blx@bcf@options@scope@name{\blx@xml@option@scope{##1}{####1}}}% + \def\do####1{\xappto\blx@bcf@options@scope@name{\blx@xml@option@namescope{##1}{####1}}}% \dolistcsloop{blx@nameopts@##1}% \endgroup}% \dolistloop\blx@entryopts@datatypes @@ -12669,6 +13168,10 @@ \ifstrequal{#1}{true} {\appto\blx@tempf{ map\string_append="1"}} {}} +\define@key{blx@sourcemap@step}{appendstrict}[true]{% true|false + \ifstrequal{#1}{true} + {\appto\blx@tempf{ map\string_appendstrict="1"}} + {}} \define@key{blx@sourcemap@step}{null}[true]{% true|false \ifstrequal{#1}{true} {\appto\blx@tempf{ map\string_null="1"}} @@ -12728,8 +13231,8 @@ {\listxadd\blx@lantemplatespecs\blx@lantname}% \endgroup} \@onlypreamble\DeclareLabelalphaNameTemplate -\blx@collectopts{xml}{blx@globalopts}{labelalphanametemplate}% for passing to the .bcf -\DeclareEntryOption[string]{labelalphanametemplatename}{% +\blx@DeclareBackendOption{global}[xml]{labelalphanametemplate} +\DeclareBiblatexOption{entry,namelist,name}[string]{labelalphanametemplatename}{% \def\blx@refcontext@labelalphanametemplatename{#1}} \newcommand*{\blx@lantem@namepart}[2][]{% @@ -12771,8 +13274,7 @@ {\blx@latem{#2}{global}} {\forcsvlist{\blx@latem{#2}}{#1}}} \@onlypreamble\DeclareLabelalphaTemplate -\blx@collectopts{xml}{blx@globalopts}{labelalphatemplate}% for passing to the .bcf -\blx@collectopts{xml}{blx@typeopts}{labelalphatemplate}% for passing to the .bcf +\blx@DeclareBackendOption{global,type}[xml]{labelalphatemplate} \def\blx@latem#1#2{% \begingroup @@ -12932,7 +13434,7 @@ \def\blx@inherit@ii#1#2{% \eappto\blx@tempa{\blx@xml@inherit@type{#1}{#2}{}}} -\blx@collectopts{xml}{blx@globalopts}{inheritance}% for passing to the .bcf +\blx@DeclareBackendOption{global}[xml]{inheritance} % [<options>]{<source>}{<target>} \newcommand*{\blx@inherit@field}[3][]{% @@ -13016,8 +13518,7 @@ {\listxadd\blx@translits\blx@tempa}% \endgroup} \@onlypreamble\DeclareSortTranslit -\blx@collectopts{xml}{blx@globalopts}{translit}% for passing to the .bcf -\blx@collectopts{xml}{blx@typeopts}{translit}% for passing to the .bcf +\blx@DeclareBackendOption{global,type}[xml]{translit} \newcommand*{\blx@translit@setup}[4][]{% \eappto\blx@tempb{% @@ -13041,8 +13542,8 @@ {\listxadd\blx@untemplatespecs\blx@untname}% \endgroup} \@onlypreamble\DeclareUniquenameTemplate -\blx@collectopts{xml}{blx@globalopts}{uniquenametemplate}% for passing to the .bcf -\DeclareEntryOption[string]{uniquenametemplatename}{% +\blx@DeclareBackendOption{global}[xml]{uniquenametemplate} +\DeclareBiblatexOption{entry,namelist,name}[string]{uniquenametemplatename}{% \def\blx@refcontext@uniquenametemplatename{#1}} \newcommand*{\blx@untemp@namepart}[2][]{% @@ -13086,8 +13587,8 @@ {\listxadd\blx@sortingnamekeytemplates\blx@snkname}% \endgroup} \@onlypreamble\DeclareSortingNamekeyTemplate -\blx@collectopts{xml}{blx@globalopts}{sortingnamekeytemplate}% for passing to the .bcf -\DeclareEntryOption[string]{sortingnamekeytemplatename}{% +\blx@DeclareBackendOption{global}[xml]{sortingnamekeytemplate} +\DeclareBiblatexOption{entry,namelist,name}[string]{sortingnamekeytemplatename}{% \def\blx@refcontext@sortingnamekeytemplatename{#1}} % User-mode macro for checking sorting name template options @@ -13159,7 +13660,7 @@ \global\cslet{blx@sortingtemplate@#2}\blx@tempa \endgroup} \@onlypreamble\DeclareSortingTemplate -\blx@collectopts{xml}{blx@globalopts}{sortingtemplate}% for passing to the .bcf +\blx@DeclareBackendOption{global}[xml]{sortingtemplate} \define@key{blx@sortdef@sorting}{locale}{% locale name \def\blx@templ{#1}} @@ -13225,7 +13726,7 @@ \advance\blx@tempcntb\@ne \blx@xmlsanitizeafter{\def\blx@tempe}{#1}% \eappto\blx@tempb{% - \blx@xml@sortitem{order="\the\blx@tempcntb"}{\blx@tempe}}} + \blx@xml@sortitem{literal="1" order="\the\blx@tempcntb"}{\blx@tempe}}} % [<type,type,...>]{<string>} \newrobustcmd*{\DeclarePresort}[2][]{% @@ -13238,9 +13739,7 @@ {\forcsvlist\blx@undefpresort{#1}}}% \endgroup} \@onlypreamble\DeclarePresort -\blx@collectopts{string}{blx@globalopts}{presort}% for passing to the .bcf -\blx@collectopts{string}{blx@typeopts}{presort}% for passing to the .bcf -\blx@collectopts{string}{blx@entryopts}{presort}% for passing to the .bcf +\blx@DeclareBackendOption{global,type,entry}[string]{presort} \def\blx@defpresort#1#2{% \csxdef{blx@bcf@presort@#2}{\blx@xml@presort{#2}{#1}}} @@ -13250,7 +13749,7 @@ % {<entrytype,...>}{<field,...>} \newrobustcmd*{\DeclareSortExclusion}[2]{% \forcsvlist{\blx@sortexclude{#2}}{#1}} -\blx@collectopts{xml}{blx@typeopts}{sortexclusion}% for passing to the .bcf +\blx@DeclareBackendOption{type}[xml]{sortexclusion} % {<field>}{<entrytype>} \def\blx@sortexclude#1#2{% @@ -13269,7 +13768,7 @@ % {<entrytype,...>}{<field,...>} \newrobustcmd*{\DeclareSortInclusion}[2]{% \forcsvlist{\blx@sortinclude{#2}}{#1}} -\blx@collectopts{xml}{blx@typeopts}{sortinclusion}% for passing to the .bcf +\blx@DeclareBackendOption{type}[xml]{sortinclusion} % {<field>}{<entrytype>} \def\blx@sortinclude#1#2{% @@ -13294,7 +13793,7 @@ \global\let\blx@bcf@extradatespec\blx@tempa \endgroup} \@onlypreamble\DeclareExtradate -\blx@collectopts{xml}{blx@globalopts}{extradatespec}% for passing to the .bcf +\blx@DeclareBackendOption{global}[xml]{extradatespec} \newrobustcmd*{\blx@extradate@scope}[1]{% \let\blx@tempb\@empty @@ -13322,8 +13821,7 @@ #2% \endgroup} \@onlypreamble\DeclareLabelname -\blx@collectopts{xml}{blx@globalopts}{labelnamespec}% for passing to the .bcf -\blx@collectopts{xml}{blx@typeopts}{labelnamespec}% for passing to the .bcf +\blx@DeclareBackendOption{global,type}[xml]{labelnamespec} \newrobustcmd*{\DeclareLabeltitle}[2][]{% \begingroup @@ -13338,8 +13836,7 @@ #2% \endgroup} \@onlypreamble\DeclareLabeltitle -\blx@collectopts{xml}{blx@globalopts}{labeltitlespec}% for passing to the .bcf -\blx@collectopts{xml}{blx@typeopts}{labeltitlespec}% for passing to the .bcf +\blx@DeclareBackendOption{global,type}[xml]{labeltitlespec} \newrobustcmd*{\DeclareLabeldate}[2][]{% \begingroup @@ -13355,8 +13852,7 @@ #2% \endgroup} \@onlypreamble\DeclareLabeldate -\blx@collectopts{xml}{blx@globalopts}{labeldatespec}% for passing to the .bcf -\blx@collectopts{xml}{blx@typeopts}{labeldatespec}% for passing to the .bcf +\blx@DeclareBackendOption{global,type}[xml]{labeldatespec} \newcommand*{\blx@ordered@field}[2][]{% \let\blx@tempc\@empty @@ -13521,7 +14017,7 @@ \define@key{blx@opt@pre}{sorting}{% \def\blx@sorting{#1}% \def\blx@refcontext@sortingtemplatename{#1}} -\blx@collectopts{string}{blx@globalopts}{sortingtemplatename}% for passing to the .bcf +\blx@DeclareBackendOption{global}[string]{sortingtemplatename} \AtEndPreamble{% \ifcsdef{blx@sortingtemplate@\blx@sorting} @@ -13535,7 +14031,12 @@ \let\blx@refcontext@labelprefix@real\@empty \def\blx@refcontext@uniquenametemplatename{global}% \def\blx@refcontext@labelalphanametemplatename{global}% - \blx@xdef@refcontext{\blx@refcontext@sortingtemplatename/\blx@refcontext@sortingnamekeytemplatename/\blx@refcontext@labelprefix/\blx@refcontext@uniquenametemplatename/\blx@refcontext@labelalphanametemplatename}% + \blx@xdef@refcontext{% + \blx@refcontext@sortingtemplatename/% + \blx@refcontext@sortingnamekeytemplatename/% + \blx@refcontext@labelprefix/% + \blx@refcontext@uniquenametemplatename/% + \blx@refcontext@labelalphanametemplatename}% \listxadd\blx@refcontexts\blx@refcontext@context} \DeclareBibliographyOption[boolean]{sortcase}[true]{% @@ -13544,134 +14045,80 @@ \DeclareBibliographyOption[boolean]{sortupper}[true]{% \settoggle{blx@sortupper}{#1}} -\DeclareBibliographyOption[integer]{maxnames}{% +\DeclareBiblatexOption{global,type}[integer]{maxnames}{% \numdef\blx@maxcitenames{#1}% \numdef\blx@maxbibnames{#1}% - \numdef\blx@maxsortnames{#1}} -\DeclareBibliographyOption[integer]{minnames}{% + \numdef\blx@maxsortnames{#1}% + \c@maxnames#1\relax} +\DeclareBiblatexOption{global,type}[integer]{minnames}{% \numdef\blx@mincitenames{#1}% \numdef\blx@minbibnames{#1}% - \numdef\blx@minsortnames{#1}} -\DeclareTypeOption[integer]{maxnames}{% - \numdef\blx@maxcitenames@type{#1}% - \numdef\blx@maxbibnames@type{#1}% - \numdef\blx@maxsortnames@type{#1}% - \c@maxnames#1\relax} -\DeclareTypeOption[integer]{minnames}{% - \numdef\blx@mincitenames@type{#1}% - \numdef\blx@minbibnames@type{#1}% - \numdef\blx@minsortnames@type{#1}% - \c@minnames#1\relax} -\DeclareEntryOption[integer]{maxnames}{% - \c@maxnames#1\relax} -\DeclareEntryOption[integer]{minnames}{% + \numdef\blx@minsortnames{#1}% \c@minnames#1\relax} +% the per-entry option is resolved by Biber directly +\blx@DeclareBackendOption{entry}[integer]{maxnames} +\blx@DeclareBackendOption{entry}[integer]{minnames} +\gdef\blx@bcf@backendin@entry@maxnames{maxcitenames,maxbibnames,maxsortnames}% +\gdef\blx@bcf@backendin@entry@minnames{mincitenames,minbibnames,minsortnames}% -\DeclareBibliographyOption[integer]{maxbibnames}{% + +\DeclareBiblatexOption{global,type,entry}[integer]{maxbibnames}{% \numdef\blx@maxbibnames{#1}% - \numdef\blx@maxsortnames{#1}} -\DeclareBibliographyOption[integer]{minbibnames}{% - \numdef\blx@minbibnames{#1}% - \numdef\blx@minsortnames{#1}} -\DeclareTypeOption[integer]{maxbibnames}{% - \numdef\blx@maxbibnames@type{#1}% - \numdef\blx@maxsortnames@type{#1}% - \iftoggle{blx@bibliography} - {\c@maxnames#1\relax} - {}} -\DeclareTypeOption[integer]{minbibnames}{% - \numdef\blx@minbibnames@type{#1}% - \numdef\blx@minsortnames@type{#1}% - \iftoggle{blx@bibliography} - {\c@minnames#1\relax} - {}} -\DeclareEntryOption[integer]{maxbibnames}{% + \numdef\blx@maxsortnames{#1}% \iftoggle{blx@bibliography} {\c@maxnames#1\relax} {}} -\DeclareEntryOption[integer]{minbibnames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{minbibnames}{% + \numdef\blx@minbibnames{#1}% + \numdef\blx@minsortnames{#1}% \iftoggle{blx@bibliography} {\c@minnames#1\relax} {}} -\DeclareBibliographyOption[integer]{maxcitenames}{% - \numdef\blx@maxcitenames{#1}} -\DeclareBibliographyOption[integer]{mincitenames}{% - \numdef\blx@mincitenames{#1}} -\DeclareTypeOption[integer]{maxcitenames}{% - \numdef\blx@maxcitenames@type{#1}% - \iftoggle{blx@bibliography} - {} - {\c@maxnames#1\relax}} -\DeclareTypeOption[integer]{mincitenames}{% - \numdef\blx@mincitenames@type{#1}% - \iftoggle{blx@bibliography} - {} - {\c@minnames#1\relax}} -\DeclareEntryOption[integer]{maxcitenames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{maxcitenames}{% + \numdef\blx@maxcitenames{#1}% \iftoggle{blx@bibliography} {} {\c@maxnames#1\relax}} -\DeclareEntryOption[integer]{mincitenames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{mincitenames}{% + \numdef\blx@mincitenames{#1}% \iftoggle{blx@bibliography} {} {\c@minnames#1\relax}} -\DeclareBibliographyOption[integer]{maxsortnames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{maxsortnames}{% \numdef\blx@maxsortnames{#1}} -\DeclareBibliographyOption[integer]{minsortnames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{minsortnames}{% \numdef\blx@minsortnames{#1}} -\DeclareTypeOption[integer]{maxsortnames}{% - \numdef\blx@maxsortnames@type{#1}} -\DeclareTypeOption[integer]{minsortnames}{% - \numdef\blx@minsortnames@type{#1}} -\DeclareEntryOption[integer]{maxsortnames}{} -\DeclareEntryOption[integer]{minsortnames}{} \appto\blx@checkoptions@global{% \blx@maxmin@num{maxbibnames}{minbibnames}\blx@maxbibnames\blx@minbibnames \blx@maxmin@num{maxcitenames}{mincitenames}\blx@maxcitenames\blx@mincitenames \blx@maxmin@num{maxsortnames}{minsortnames}\blx@maxsortnames\blx@minsortnames} \appto\blx@checkoptions@type{% - \blx@maxmin@num{maxbibnames}{minbibnames}\blx@maxbibnames@type\blx@minbibnames@type - \blx@maxmin@num{maxcitenames}{mincitenames}\blx@maxcitenames@type\blx@mincitenames@type - \blx@maxmin@num{maxsortnames}{minsortnames}\blx@maxsortnames@type\blx@minsortnames@type} + \blx@maxmin@num{maxbibnames}{minbibnames}\blx@maxbibnames\blx@minbibnames + \blx@maxmin@num{maxcitenames}{mincitenames}\blx@maxcitenames\blx@mincitenames + \blx@maxmin@num{maxsortnames}{minsortnames}\blx@maxsortnames\blx@minsortnames} \appto\blx@checkoptions@entry{% \blx@maxmin@cnt{maxnames}{minnames}\c@maxnames\c@minnames} -\DeclareBibliographyOption[integer]{maxitems}{% - \numdef\blx@maxitems{#1}} -\DeclareBibliographyOption[integer]{minitems}{% - \numdef\blx@minitems{#1}} -\DeclareTypeOption[integer]{maxitems}{% - \numdef\blx@maxitems@type{#1}% - \c@maxitems#1\relax} -\DeclareTypeOption[integer]{minitems}{% - \numdef\blx@minitems@type{#1}% - \c@minitems#1\relax} -\DeclareEntryOption[integer]{maxitems}{% +\DeclareBiblatexOption{global,type,entry}[integer]{maxitems}{% + \numdef\blx@maxitems{#1}% \c@maxitems#1\relax} -\DeclareEntryOption[integer]{minitems}{% +\DeclareBiblatexOption{global,type,entry}[integer]{minitems}{% + \numdef\blx@minitems{#1}% \c@minitems#1\relax} \appto\blx@checkoptions@global{% \blx@maxmin@num{maxitems}{minitems}\blx@maxitems\blx@minitems} \appto\blx@checkoptions@type{% - \blx@maxmin@num{maxitems}{minitems}\blx@maxitems@type\blx@minitems@type} + \blx@maxmin@num{maxitems}{minitems}\blx@maxitems\blx@minitems} \appto\blx@checkoptions@entry{% \blx@maxmin@cnt{maxitems}{minitems}\c@maxitems\blx@minitems} -\DeclareBibliographyOption[integer]{maxalphanames}{% - \numdef\blx@maxalphanames{#1}} -\DeclareBibliographyOption[integer]{minalphanames}{% - \numdef\blx@minalphanames{#1}} -\DeclareTypeOption[integer]{maxalphanames}{% - \numdef\blx@maxalphanames{#1}} -\DeclareTypeOption[integer]{minalphanames}{% - \numdef\blx@minalphanames{#1}} -\DeclareEntryOption[integer]{maxalphanames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{maxalphanames}{% \numdef\blx@maxalphanames{#1}} -\DeclareEntryOption[integer]{minalphanames}{% +\DeclareBiblatexOption{global,type,entry}[integer]{minalphanames}{% \numdef\blx@minalphanames{#1}} \appto\blx@checkoptions@global{% @@ -13707,7 +14154,7 @@ #3=#4} {}} -\DeclareBibliographyOption[boolean]{terseinits}[true]{% +\DeclareBiblatexOption{global,type,entry,namelist,name}[boolean]{terseinits}[true]{% \ifstrequal{#1}{true} {\toggletrue{blx@terseinits} \renewrobustcmd*{\bibinitperiod}{} @@ -13718,12 +14165,12 @@ \renewrobustcmd*{\bibinitdelim}{\addnbspace} \renewrobustcmd*{\bibinithyphendelim}{\adddot\mbox{-}}}} -\DeclareBibliographyOption[boolean]{abbreviate}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{abbreviate}[true]{% \ifstrequal{#1}{true} {\def\abx@str{abx@sstr}} {\def\abx@str{abx@lstr}}} -\DeclareBibliographyOption[boolean]{dateabbrev}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{dateabbrev}[true]{% \ifstrequal{#1}{true} {\let\abx@bibmonth\blx@imc@bibsstring \let\abx@bibseason\blx@imc@bibsstring} @@ -13736,6 +14183,8 @@ \DeclareBibliographyOption[string]{language}{% \togglefalse{blx@autolangbib}% \togglefalse{blx@autolangcite}% + \undef\blx@languagename + \undef\blx@forcelanguagename \ifboolexpr{ test {\ifstrequal{#1}{auto}} or @@ -13765,7 +14214,7 @@ {Language '#1' not supported} {Failed to find a matching '#1.lbx' file}}}} -\DeclareBibliographyOption[boolean]{clearlang}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{clearlang}[true]{% \settoggle{blx@clearlang}{#1}} \DeclareBibliographyOption[string]{autolang}{% @@ -13799,11 +14248,7 @@ \def\blx@hook@initlang{\@quotereset\@ne}% \def\blx@hook@endlang{\blx@postpunct}} -\DeclareBibliographyOption[boolean]{indexing}[true]{% - \blx@opt@index{#1}} -\DeclareTypeOption[boolean]{indexing}[true]{% - \blx@opt@index{#1}} -\DeclareEntryOption[boolean]{indexing}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{indexing}[true]{% \blx@opt@index{#1}} \def\blx@opt@index#1{% \ifcsdef{blx@opt@index@#1} @@ -13833,7 +14278,7 @@ \DeclareBibliographyOption[boolean]{sortsets}[true]{% \settoggle{blx@sortsets}{#1}} -\DeclareBibliographyOption[boolean]{hyperref}[true]{% +\DeclareBibliographyOption[string]{hyperref}[true]{% \ifcsdef{blx@opt@hyperref@#1} {\letcs\blx@hyperref{blx@opt@hyperref@#1}} {\blx@err@invopt{hyperref=#1}{}}} @@ -13929,7 +14374,7 @@ \def\newblockpunct{% \unspace\penalty-9\relax\space}} -\DeclareBibliographyOption[boolean]{pagetracker}[true]{% +\DeclareBibliographyOption[string]{pagetracker}[true]{% \ifcsdef{blx@opt@pagetracker@#1} {\csuse{blx@opt@pagetracker@#1}} {\blx@err@invopt{pagetracker=#1}{}}} @@ -13962,7 +14407,7 @@ \blx@opt@pagetracker@page \fi} -\DeclareBibliographyOption[boolean]{citecounter}[true]{% +\DeclareBibliographyOption[string]{citecounter}[true]{% \ifcsdef{blx@opt@citecounter@#1} {\csuse{blx@opt@citecounter@#1}} {\blx@err@invopt{citecounter=#1}{}}} @@ -13984,7 +14429,7 @@ \let\abx@aux@count\@gobbletwo \let\abx@aux@fncount\@gobbletwo} -\DeclareBibliographyOption[boolean]{citetracker}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{citetracker}[true]{% \ifcsdef{blx@opt@citetracker@#1} {\csuse{blx@opt@citetracker@#1}} {\blx@err@invopt{citetracker=#1}{}}} @@ -14015,7 +14460,7 @@ \blx@ifcitesingle{\blx@citetracker@context}{}}% \booltrue{citetracker}} -\DeclareBibliographyOption[boolean]{ibidtracker}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{ibidtracker}[true]{% \ifcsdef{blx@opt@ibidtracker@#1} {\csuse{blx@opt@ibidtracker@#1}} {\blx@err@invopt{ibidtracker=#1}{}}} @@ -14044,7 +14489,7 @@ \let\blx@ibidreset\blx@ibidreset@context \booltrue{citetracker}} -\DeclareBibliographyOption[boolean]{idemtracker}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{idemtracker}[true]{% \ifcsdef{blx@opt@idemtracker@#1} {\csuse{blx@opt@idemtracker@#1}} {\blx@err@invopt{idemtracker=#1}{}}} @@ -14073,7 +14518,7 @@ \let\blx@idemreset\blx@idemreset@context \booltrue{citetracker}} -\DeclareBibliographyOption[boolean]{opcittracker}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{opcittracker}[true]{% \ifcsdef{blx@opt@opcittracker@#1} {\csuse{blx@opt@opcittracker@#1}} {\blx@err@invopt{opcittracker=#1}{}}} @@ -14102,7 +14547,7 @@ \let\blx@opcitreset\blx@opcitreset@context \booltrue{citetracker}} -\DeclareBibliographyOption[boolean]{loccittracker}[true]{% +\DeclareBiblatexOption{global,type,entry}[string]{loccittracker}[true]{% \ifcsdef{blx@opt@loccittracker@#1} {\csuse{blx@opt@loccittracker@#1}} {\blx@err@invopt{loccittracker=#1}{}}} @@ -14398,95 +14843,78 @@ \iftoggle{blx@labelnumber} {} {\setkeys{blx@opt@pre}{defernumbers=false}}} -\DeclareTypeOption[boolean]{labelnumber}[true]{% +\DeclareBiblatexOption{type,entry}[boolean]{labelnumber}[true]{% \settoggle{blx@labelnumber}{#1}} -\DeclareBibliographyOption[boolean]{labelalpha}[true]{% - \settoggle{blx@labelalpha}{#1}} -\DeclareTypeOption[boolean]{labelalpha}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{labelalpha}[true]{% \settoggle{blx@labelalpha}{#1}} -\DeclareBibliographyOption[boolean]{labeltitle}[true]{% - \settoggle{blx@labeltitle}{#1}} -\DeclareTypeOption[boolean]{labeltitle}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{labeltitle}[true]{% \settoggle{blx@labeltitle}{#1}} -\DeclareBibliographyOption[boolean]{labeltitleyear}[true]{% - \settoggle{blx@labeltitleyear}{#1}} -\DeclareTypeOption[boolean]{labeltitleyear}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{labeltitleyear}[true]{% \settoggle{blx@labeltitleyear}{#1}} -\DeclareBibliographyOption[boolean]{labeldateparts}[true]{% - \settoggle{blx@labeldateparts}{#1}} -\DeclareTypeOption[boolean]{labeldateparts}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{labeldateparts}[true]{% \settoggle{blx@labeldateparts}{#1}} -\DeclareBibliographyOption[boolean]{uniquelist}[true]{% +\DeclareBiblatexOption{global,type}[string]{uniquelist}[true]{% \ifcsdef{blx@opt@uniquelist@#1} {\letcs\blx@uniquelist{blx@opt@uniquelist@#1}} {\blx@err@invopt{uniquelist=#1}{}}} -\DeclareTypeOption[boolean]{uniquelist}[true]{% - \ifcsdef{blx@opt@uniquelist@#1} - {\letcs\blx@uniquelist{blx@opt@uniquelist@#1}} - {\blx@err@invopt{uniquelist=#1}{}}} -\DeclareEntryOption[boolean]{uniquelist}[true]{% - \ifcsdef{blx@opt@uniquelist@#1} - {\letcs\blx@uniquelist{blx@opt@uniquelist@#1}} - {\blx@err@invopt{uniquelist=#1}{}}} -\def\blx@opt@uniquelist@false{0} -\def\blx@opt@uniquelist@true{1} -\def\blx@opt@uniquelist@minyear{2} +\def\blx@opt@uniquelist@false{false} +\def\blx@opt@uniquelist@true{true} +\def\blx@opt@uniquelist@minyear{minyear} -\DeclareBibliographyOption[boolean]{uniquename}[true]{% - \ifcsdef{blx@opt@uniquename@#1} - {\letcs\blx@uniquename{blx@opt@uniquename@#1}} - {\blx@err@invopt{uniquename=#1}{}}} -\DeclareTypeOption[boolean]{uniquename}[true]{% - \ifcsdef{blx@opt@uniquename@#1} - {\letcs\blx@uniquename{blx@opt@uniquename@#1}} - {\blx@err@invopt{uniquename=#1}{}}} -\DeclareEntryOption[boolean]{uniquename}[true]{% +\blx@DeclareBackendOption{entry,namelist}[string]{uniquelist} + +\DeclareBiblatexOption{global,type}[boolean]{nohashothers}[true]{% + \settoggle{blx@nohashothers}{#1}} +\blx@DeclareBackendOption{entry,namelist}[boolean]{nohashothers} + +\DeclareBiblatexOption{global,type}[boolean]{nosortothers}[true]{% + \settoggle{blx@nosortothers}{#1}} +\blx@DeclareBackendOption{entry,namelist}[boolean]{nosortothers} + +\DeclareBiblatexOption{global,type}[string]{uniquename}[true]{% \ifcsdef{blx@opt@uniquename@#1} {\letcs\blx@uniquename{blx@opt@uniquename@#1}} {\blx@err@invopt{uniquename=#1}{}}} -\def\blx@opt@uniquename@false{0} -\def\blx@opt@uniquename@init{1} -\def\blx@opt@uniquename@true{2} -\def\blx@opt@uniquename@full{2} -\def\blx@opt@uniquename@allinit{3} -\def\blx@opt@uniquename@allfull{4} -\def\blx@opt@uniquename@mininit{5} -\def\blx@opt@uniquename@minfull{6} - -\DeclareBibliographyOption[boolean]{noroman}[true]{% - \settoggle{blx@noroman}{#1}} -\DeclareTypeOption[boolean]{noroman}[true]{% - \settoggle{blx@noroman}{#1}} -\DeclareEntryOption[boolean]{noroman}[true]{% +\def\blx@opt@uniquename@false{false} +\def\blx@opt@uniquename@init{init} +\def\blx@opt@uniquename@true{full} +\def\blx@opt@uniquename@full{full} +\def\blx@opt@uniquename@allinit{allinit} +\def\blx@opt@uniquename@allfull{allfull} +\def\blx@opt@uniquename@mininit{mininit} +\def\blx@opt@uniquename@minfull{minfull} + +\blx@DeclareBackendOption{entry,namelist,name}[string]{uniquename} + +\DeclareBiblatexOption{global,type}[boolean]{noroman}[true]{% \settoggle{blx@noroman}{#1}} +\blx@DeclareBackendOption{entry}[boolean]{noroman} -\DeclareBibliographyOption[boolean]{singletitle}[true]{% - \settoggle{blx@singletitle}{#1}} -\DeclareTypeOption[boolean]{singletitle}[true]{% +\DeclareBiblatexOption{global,type}[boolean]{singletitle}[true]{% \settoggle{blx@singletitle}{#1}} +\blx@DeclareBackendOption{entry}[boolean]{singletitle} -\DeclareBibliographyOption[boolean]{uniquetitle}[true]{% - \settoggle{blx@uniquetitle}{#1}} -\DeclareTypeOption[boolean]{uniquetitle}[true]{% +\DeclareBiblatexOption{global,type}[boolean]{uniquetitle}[true]{% \settoggle{blx@uniquetitle}{#1}} +\blx@DeclareBackendOption{entry}[boolean]{uniquetitle} -\DeclareBibliographyOption[boolean]{uniquebaretitle}[true]{% - \settoggle{blx@uniquebaretitle}{#1}} -\DeclareTypeOption[boolean]{uniquebaretitle}[true]{% +\DeclareBiblatexOption{global,type}[boolean]{uniquebaretitle}[true]{% \settoggle{blx@uniquebaretitle}{#1}} +\blx@DeclareBackendOption{entry}[boolean]{uniquebaretitle} -\DeclareBibliographyOption[boolean]{uniquework}[true]{% - \settoggle{blx@uniquework}{#1}} -\DeclareTypeOption[boolean]{uniquework}[true]{% +\DeclareBiblatexOption{global,type}[boolean]{uniquework}[true]{% \settoggle{blx@uniquework}{#1}} +\blx@DeclareBackendOption{entry}[boolean]{uniquework} -\DeclareBibliographyOption[boolean]{uniqueprimaryauthor}[true]{% +\DeclareBiblatexOption{global,type}[boolean]{uniqueprimaryauthor}[true]{% \settoggle{blx@uniqueprimaryauthor}{#1}} +\blx@DeclareBackendOption{entry}[boolean]{uniqueprimaryauthor} + \DeclareBibliographyOption[boolean]{defernumbers}[true]{% \settoggle{blx@defernumbers}{#1}% @@ -14498,41 +14926,8 @@ \let\abx@aux@number\@gobblefive}} \DeclareBibliographyOption[boolean]{locallabelwidth}[true]{% - \blx@key@locallabelwidth{#1}} + \blx@key@locallabelwidth{\abx@locallabelwidth}{#1}} -%{<switch>}{<patch>}{<pre>}{<post>} -\def\blx@patchsection@switch#1#2#3#4{% - \AtEndPreamble{% - #3% - \ifcase#1 - \or % 1: part - \blx@refpatch@part{#2}% - \or % 2: chapter - \blx@refpatch@chapter{#2}% - \or % 3: section - \blx@refpatch@sect{section}{#2}{1}% - \or % 4: subsection - \blx@refpatch@sect{subsection}{#2}{2}% - \or % 5: chapter+ = part, chapter - \blx@refpatch@part{#2}% - \blx@refpatch@chapter{#2}% - \or % 6: section+ = part, chapter, section - \blx@refpatch@part{#2}% - \ifundef\chapter - {} - {\blx@refpatch@chapter{#2}}% - \blx@refpatch@sect{section}{#2}{1}% - \or % 7: subsection+ = part, chapter, section, subsection - \blx@refpatch@part{#2}% - \ifundef\chapter - {} - {\blx@refpatch@chapter{#2}}% - \blx@refpatch@sect{section}{#2}{1}% - \blx@refpatch@sect{subsection}{#2}{2}% - \fi - #4% - }% -} \DeclareBibliographyOption[string]{refsection}{% \ifcsdef{blx@opt@refsection@#1} @@ -14598,45 +14993,37 @@ % Name field options \def\do#1{% - \DeclareBibliographyOption[boolean]{use#1}[true]{% - \settoggle{blx@use#1}{##1}} - \DeclareTypeOption[boolean]{use#1}[true]{% - \settoggle{blx@use#1}{##1}} - \DeclareEntryOption[boolean]{use#1}[true]{% + \DeclareBiblatexOption{global,type,entry}[boolean]{use#1}[true]{% \settoggle{blx@use#1}{##1}}} \abx@donames % Entry options -\DeclareBibliographyOption[boolean]{useprefix}[true]{% - \settoggle{blx@useprefix}{#1}} -\DeclareTypeOption[boolean]{useprefix}[true]{% - \settoggle{blx@useprefix}{#1}} -\DeclareEntryOption[boolean]{useprefix}[true]{% +\DeclareBiblatexOption{global,type,entry,namelist,name}[boolean]{useprefix}[true]{% \settoggle{blx@useprefix}{#1}} -\DeclareTypeOption[boolean]{skipbib}[true]{% - \settoggle{blx@skipbib}{#1}} -\DeclareEntryOption[boolean]{skipbib}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{skipbib}[true]{% \settoggle{blx@skipbib}{#1}} -\DeclareTypeOption[boolean]{skipbiblist}[true]{% - \settoggle{blx@skipbiblist}{#1}} -\DeclareEntryOption[boolean]{skipbiblist}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{skipbiblist}[true]{% \settoggle{blx@skipbiblist}{#1}} -\DeclareTypeOption[boolean]{skiplab}[true]{% - \settoggle{blx@skiplab}{#1}} -\DeclareEntryOption[boolean]{skiplab}[true]{% +\DeclareBiblatexOption{global,type,entry}[boolean]{skiplab}[true]{% \settoggle{blx@skiplab}{#1}} -\DeclareTypeOption[boolean]{dataonly}[true]{% - \settoggle{blx@skipbib}{#1}% - \settoggle{blx@skipbiblist}{#1}% - \settoggle{blx@skiplab}{#1}} -\DeclareEntryOption[boolean]{dataonly}[true]{% +\DeclareBiblatexOption{global,type}[boolean]{dataonly}[true]{% \settoggle{blx@skipbib}{#1}% \settoggle{blx@skipbiblist}{#1}% \settoggle{blx@skiplab}{#1}} +% the entry option is resolved by Biber +\blx@DeclareBackendOption{entry}[boolean]{dataonly} +% This is handled in a special way by by biber. It indicates what to set for various options +% if the dataonly option is "true". If biber finds dataonly=false +% in an entry, the booleans here will be reversed (skip*) and the unique* options (which are not +% booleans) will be ignored, defaulting to higher scope values. biber assumes +% that \blx@bcf@backendin@entry@* options are boolean options as otherwise, negating them +% per-entry makes little sense and it is not clear what to do with such lower-scope overrides. +\gdef\blx@bcf@backendin@entry@dataonly{uniquename=false,uniquelist=false,% + skipbib=true,skipbiblist=true,skiplab=true} % Option processor/scheduler \DeclareOption*{% @@ -14728,19 +15115,19 @@ \def\do#1{\iftoggle{abx@bool@#1inits}{\toggletrue{abx@bool@xinits}}{}} \abx@donameparts \iftoggle{abx@bool@xinits} - {\ifnumequal\blx@uniquename\blx@opt@uniquename@full + {\ifdefstrequal\blx@uniquename\blx@opt@uniquename@full {\blx@warn@conflopt{% '<namepart>inits' conflicts with 'uniquename=full'.\MessageBreak Setting 'uniquename=init'}% \setkeys{blx@opt@pre}{uniquename=init}} {}% - \ifnumequal\blx@uniquename\blx@opt@uniquename@allfull + \ifdefstrequal\blx@uniquename\blx@opt@uniquename@allfull {\blx@warn@conflopt{% '<namepart>inits' conflicts with 'uniquename=allfull'.\MessageBreak Setting 'uniquename=allinit}% \setkeys{blx@opt@pre}{uniquename=allinit}} {}% - \ifnumequal\blx@uniquename\blx@opt@uniquename@minfull + \ifdefstrequal\blx@uniquename\blx@opt@uniquename@minfull {\blx@warn@conflopt{% '<namepart>inits' conflicts with 'uniquename=minfull'.\MessageBreak Setting 'uniquename=mininit}% @@ -14748,7 +15135,7 @@ {}} {}% \nottoggle{blx@labeldateparts} - {\ifnumequal\blx@uniquelist\blx@opt@uniquelist@minyear + {\ifdefstrequal\blx@uniquelist\blx@opt@uniquelist@minyear {\blx@warn@conflopt{% 'uniquelist=minyear' requires 'labeldateparts'.\MessageBreak Setting 'uniquelist=true'}% @@ -14886,5 +15273,6 @@ \let\do\noexpand}} \def\BiblatexHungarianWarningOff{\global\let\lbx@hu@loadinfo\@empty} +\def\BiblatexLatvianWarningOff{\global\let\lbx@lv@loadinfo\@empty} \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-bibtex.def b/Master/texmf-dist/tex/latex/biblatex/blx-bibtex.def index 5e04996998e..84dd53e8197 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-bibtex.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-bibtex.def @@ -54,7 +54,7 @@ \def\blx@sig@bib{@Comment{$ biblatex control file $}} \edef\blx@ver@bib{% - @Comment{$ biblatex bbl format version \blx@bblversion\space $}} + @Comment{$ biblatex bcf format version \blx@bcfversion\space $}} \let\blx@sig@aux\blx@sig@bbl \let\blx@ver@aux\blx@ver@bbl @@ -374,7 +374,7 @@ \ifcsdef{blx@setp@\the\c@refsection @#1} {\blx@citation@set{#1}} {\blx@citation@entry{#1}}} - + \def\blx@citation@xref#1{% \begingroup \edef\blx@tempa{blx@refp@\the\c@refsection @% @@ -395,13 +395,125 @@ \csname blx@refc@\the\c@refsection @#1\endcsname}\blx@msg@cundef \fi} +% refcontexts are out, but we can try to save labelprefix + +% Luckily all refcontext names use \blx@refcontext@labelprefix, so if we +% don't modify that macro, we don't actually change the refcontext. +% Remember that \blx@refcontext@labelprefix contains a hash of the labelprefix +% and that \blx@refcontext@labelprefix@real contains the value. +% Effectively we always stay in \blx@sorting/global/global//global/global, +% and additionally carry around the labelprefix value +% in \blx@refcontext@labelprefix@real and pass it to the aux file. +% There are differences to the result obtained with Biber, +% but it should be good enough for very simple applications. +% One example is that for BibTeX 'resetnumbers' is explicitly required, +% while Biber's labelprefix implementation sets 'resetnumbers' implicitly. +\define@key{blx@refcontext}{labelprefix}{% + \xdef\blx@refcontext@labelprefix@real{#1}% + \iftoggle{blx@defernumbers} + {}% + {\iftoggle{blx@labelnumber} + {\blx@warning{% + Option 'labelprefix' requires global\MessageBreak + 'defernumbers=true'}} + {}}% + \ifundef{\blx@bibtexwarn@labelprefix@used} + {\blx@warning@noline{% + The option 'labelprefix' may need explicit\MessageBreak + 'resetnumbers' for split bibliographies\MessageBreak + and is overall restricted when used with BibTeX.\MessageBreak + Consider using Biber instead}% + \global\let\blx@bibtexwarn@labelprefix@used\@empty} + {}} + +\def\blx@warn@bibtexrefcontext#1{% + \blx@warning{% + The refcontext option\MessageBreak + '#1'\MessageBreak + is not supported by the BibTeX backend.\MessageBreak + Consider switching to Biber instead.\MessageBreak + The option will be ignored}} + +\def\blx@bibtexrefcontext@disable#1{% + \define@key{blx@refcontext}{#1}{% + \blx@warn@bibtexrefcontext{#1}}} + +\forcsvlist{\blx@bibtexrefcontext@disable}{% + nametemplates,sorting,sortingnamekeytemplatename,uniquenametemplatename, + labelalphanametemplatename} + +\def\blx@assignrefcontext@disable#1{% + \blx@warning{% + BibTeX does not support refcontext assignments with\MessageBreak + '\string\assignrefcontext#1'.\MessageBreak + Consider using Biber instead.\MessageBreak + Ignoring the refconext assignment}} + +\def\blx@assignrefcontextkeyws[#1][#2]#3{% + \blx@assignrefcontext@disable{keyws}} +\def\blx@assignrefcontextcats[#1][#2]#3{% + \blx@assignrefcontext@disable{cats}} +\def\blx@assignrefcontextentries[#1][#2]#3{% + \blx@assignrefcontext@disable{entries}} + +\apptocmd{\blx@setdefaultrefcontext} + {\csxdef{blx@assignedlabelprefix@\the\c@refsection @#1}{% + \blx@refcontext@labelprefix@real}} + {} + {\blx@error + {Failed to patch '\string\blx@setdefaultrefcontext'} + {Patching '\string\blx@setdefaultrefcontext' failed for some reason. + \MessageBreak + Please report this bug}} + +\def\abx@aux@defaultlabelprefix#1#2#3{% + \csgdef{blx@assignedlabelprefix@#1@#2}{#3}} + +\apptocmd{\blx@bbl@entry} + {\ifcsundef{blx@assignedlabelprefix@\the\c@refsection @\thefield{entrykey}} + {} + {\blx@bbl@addfield{labelprefix}{% + \csuse{blx@assignedlabelprefix@\the\c@refsection + @\thefield{entrykey}}}}} + {} + {\blx@error + {Failed to patch '\string\blx@bbl@entry'} + {Patching '\string\blx@bbl@entry' failed for some reason. + \MessageBreak + Please report this bug}} + +\AtEndDocument{% + % always add default labelprefix declarations to .aux + \iftoggle{blx@bbldone} + {\def\do#1{% + \begingroup + \def\do##1{% + \blx@auxwrite\@mainaux{}{\string\abx@aux@defaultlabelprefix{#1}{##1}{% + \csuse{blx@assignedlabelprefix@#1@##1}}}}% + \dolistcsloop{blx@defaultrefcontexts@#1}% + \endgroup} + \dolistloop\blx@allrefsections} + {}} + + +% Translate sorting schemes to BibTeX form +\def\blx@sorting@none{0} +\def\blx@sorting@nty{1} +\def\blx@sorting@nyt{2} +\def\blx@sorting@nyvt{3} +\def\blx@sorting@anyt{12} +\def\blx@sorting@anyvt{13} +\def\blx@sorting@ynt{21} +\def\blx@sorting@ydnt{22} +\def\blx@sorting@debug{99} + % Control file \edef\blx@ctrl{% \blx@msg@bib @Control\string{biblatex-control,\blx@nl \space\space options = \string{% - \blx@bblversion:% + \blx@bcfversion:% \noexpand\iftoggle{blx@debug}{1}{0}:% \noexpand\iftoggle{blx@bibtex8}{1}{0}:% \noexpand\iftoggle{blx@sortcase}{1}{0}:% @@ -415,6 +527,10 @@ \noexpand\csuse{blx@sorting@\noexpand\blx@sorting}:% \noexpand\blx@maxcitenames:% \noexpand\blx@mincitenames:% + \noexpand\blx@maxsortnames:% + \noexpand\blx@minsortnames:% + \noexpand\iftoggle{blx@nohashothers}{1}{0}:% + \noexpand\iftoggle{blx@nosortothers}{1}{0}:% \noexpand\blx@maxalphanames:% \noexpand\blx@minalphanames:% \noexpand\blx@maxline:% @@ -433,18 +549,6 @@ \blx@auxwrite\blx@write{}{\blx@ctrl}% \immediate\closeout\blx@write} -% Translate sorting schemes to BibTeX form - -\def\blx@sorting@none{0} -\def\blx@sorting@nty{1} -\def\blx@sorting@nyt{2} -\def\blx@sorting@nyvt{3} -\def\blx@sorting@anyt{12} -\def\blx@sorting@anyvt{13} -\def\blx@sorting@ynt{21} -\def\blx@sorting@ydnt{22} -\def\blx@sorting@debug{99} - % Disable some interfaces \renewrobustcmd*{\DeclareSortingScheme}[3][]{} diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-compat.def b/Master/texmf-dist/tex/latex/biblatex/blx-compat.def index c83884f0076..e315c5cc882 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-compat.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-compat.def @@ -306,8 +306,6 @@ Please use '\string\mkdaterangeisoextra'}% \mkdaterangeisoextra} -\newrobustcmd*{\bibdatedash}{\bibrangedash}%LEGACY(<3.5) - % biblatex < 3.8 \define@key{blx@refcontext}{sortingnamekeyscheme}{% \blx@warning@noline{'sortingnamekeyscheme' is deprecated.\MessageBreak diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def index cbac63571bf..c9097281b1e 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def @@ -407,6 +407,7 @@ customd, custome, customf, + dataset, inbook, incollection, inproceedings, @@ -716,8 +717,7 @@ year} \DeclareDatamodelEntryfields[set]{ - entryset, - crossref} + entryset} \DeclareDatamodelEntryfields[article]{ addendum, @@ -1035,6 +1035,30 @@ volume, volumes} +\DeclareDatamodelEntryfields[dataset]{ + addendum, + author, + doi, + edition, + editor, + editortype, + eprint, + eprintclass, + eprinttype, + language, + location, + note, + number, + organization, + publisher, + pubstate, + series, + subtitle, + title, + titleaddon, + type, + version} + \DeclareDatamodelEntryfields[manual]{ addendum, author, @@ -1063,7 +1087,7 @@ type, version} -\DeclareDatamodelEntryfields[misc]{ +\DeclareDatamodelEntryfields[misc,software]{ addendum, author, doi, @@ -1403,7 +1427,6 @@ \DeclareDatamodelConstraints[set]{ \constraint[type=mandatory]{ \constraintfield{entryset} - \constraintfield{crossref} } } @@ -1456,13 +1479,19 @@ } } +\DeclareDatamodelConstraints[dataset]{ + \constraint[type=mandatory]{ + \constraintfield{title} + } +} + \DeclareDatamodelConstraints[manual]{ \constraint[type=mandatory]{ \constraintfield{title} } } -\DeclareDatamodelConstraints[misc]{ +\DeclareDatamodelConstraints[misc,software]{ \constraint[type=mandatory]{ \constraintfield{title} } @@ -1471,7 +1500,11 @@ \DeclareDatamodelConstraints[online]{ \constraint[type=mandatory]{ \constraintfield{title} - \constraintfield{url} + \constraintfieldsor{ + \constraintfield{url} + \constraintfield{doi} + \constraintfield{eprint} + } } } diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-unicode.def b/Master/texmf-dist/tex/latex/biblatex/blx-unicode.def index a3339b0b869..c615a6652b3 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-unicode.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-unicode.def @@ -45,32 +45,71 @@ \ifblank{#3} {\blx@normrange@endash#1––&} {\ifblank{#2} - {\blx@range@out@value{#1\bibrangedash}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}% + \noexpand\bibrangedash}}% + \blx@tempc} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} - {\blx@range@process{#1}{#2}}}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{% + \unexpanded{#2}}}}% + \blx@tempc} + {\blx@pages@process{#1}{#2}}}}} \def\blx@normrange@endash#1–#2–#3&{% \ifblank{#3} {\blx@normrange@hyphen#1--&} {\ifblank{#2} - {\blx@range@out@value{#1\bibrangedash}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}% + \noexpand\bibrangedash}}% + \blx@tempc} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} - {\blx@range@process{#1}{#2}}}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\unexpanded{#2}}}}% + \blx@tempc} + {\blx@pages@process{#1}{#2}}}}} \def\blx@firstpage@range#1\bibrangedash#2\bibrangedash#3&{% \ifblank{#3} {\blx@firstpage@endash#1––&} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} - {\blx@range@out@value{#1}}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\unexpanded{#2}}}}% + \blx@tempc} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}}}% + \blx@tempc}}} \def\blx@firstpage@endash#1–#2–#3&{% \ifblank{#3} {\blx@firstpage@hyphen#1--&} {\ifblank{#1} - {\blx@range@out@value{\bibrangedash#2}} - {\blx@range@out@value{#1}}}} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \noexpand\bibrangedash + \expandonce\blx@range@out@item@process{\unexpanded{#2}}}}% + \blx@tempc} + {\begingroup + \edef\blx@tempc{\endgroup + \blx@range@out@value{% + \expandonce\blx@range@out@item@process{\unexpanded{#1}}}}% + \blx@tempc}}} \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 6d0daecea0a..f27955b1136 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx @@ -70,8 +70,8 @@ \ifnameundef{labelname} {\setunit{% \global\booltrue{cbx:parens}% - \extpostnotedelim\bibopenparen}} - {\setunit{\postnotedelim}}% + \printdelim{extpostnotedelim}\bibopenparen}} + {\setunit{\printdelim{postnotedelim}}}% \printfield{postnote}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} {\setunit{}% 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 4c901a43b78..4ccfc33cab0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx @@ -72,8 +72,8 @@ {\bibcloseparen} {}} {\ifbool{cbx:parens} - {\postnotedelim} - {\extpostnotedelim\bibopenparen}% + {\printdelim{postnotedelim}} + {\printdelim{extpostnotedelim}\bibopenparen}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} 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 3ae9a578027..81091101032 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx @@ -90,7 +90,7 @@ \newbibmacro*{cite:postnote}{% \ifbool{cbx:loccit} {} - {\setunit{\postnotedelim}% + {\setunit{\printdelim{postnotedelim}}% \printfield{postnote}}} \newbibmacro*{textcite:postnote}{% @@ -99,8 +99,8 @@ {\ifnameundef{labelname} {\setunit{% \global\booltrue{cbx:parens}% - \extpostnotedelim\bibopenparen}} - {\setunit{\postnotedelim}}% + \printdelim{extpostnotedelim}\bibopenparen}} + {\setunit{\printdelim{postnotedelim}}}% \printfield{postnote}}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} {\setunit{}% 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 bd463aa5a28..33ef1456149 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx @@ -70,10 +70,10 @@ \renewbibmacro*{textcite:postnote}{% \ifbool{cbx:parens} - {\setunit{\postnotedelim}} + {\setunit{\printdelim{postnotedelim}}} {\setunit{% \global\booltrue{cbx:parens}% - \extpostnotedelim\bibopenparen}}% + \printdelim{extpostnotedelim}\bibopenparen}}% \printfield{postnote}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} {\setunit{}% 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 1fe4075cf31..7dd3d8a5289 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx @@ -80,10 +80,10 @@ \renewbibmacro*{textcite:postnote}{% \ifbool{cbx:parens} - {\setunit{\postnotedelim}} + {\setunit{\printdelim{postnotedelim}}} {\setunit{% \global\booltrue{cbx:parens}% - \extpostnotedelim\bibopenparen}}% + \printdelim{extpostnotedelim}\bibopenparen}}% \printfield{postnote}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} {\setunit{}% diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx index 3b3ed80deb7..985ead92867 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx @@ -44,8 +44,8 @@ {\bibcloseparen} {}} {\ifbool{cbx:parens} - {\postnotedelim} - {\extpostnotedelim\bibopenparen}% + {\printdelim{postnotedelim}} + {\printdelim{extpostnotedelim}\bibopenparen}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} 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 fe4c499ea93..2f361a0033e 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx @@ -102,8 +102,8 @@ {\bibcloseparen} {}} {\ifbool{cbx:parens} - {\postnotedelim} - {\extpostnotedelim\bibopenparen}% + {\printdelim{postnotedelim}} + {\printdelim{extpostnotedelim}\bibopenparen}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx index 04fdf152f55..49c8d9d03a0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx @@ -70,8 +70,8 @@ {\bibcloseparen} {}} {\ifbool{cbx:parens} - {\setunit{\postnotedelim}} - {\setunit{\extpostnotedelim\bibopenparen}}% + {\setunit{\printdelim{postnotedelim}}} + {\setunit{\printdelim{extpostnotedelim}\bibopenparen}}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/draft.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/draft.cbx index af32a89c6e6..98238207696 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/draft.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/draft.cbx @@ -27,7 +27,7 @@ {\bibcloseparen} {}} {\ifbool{cbx:parens} - {\setunit{\postnotedelim}} + {\setunit{\printdelim{postnotedelim}}} {\setunit{\addspace\bibopenparen}}% \printfield{postnote}\bibcloseparen}} 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 02a7aad2d89..7d9457779c0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx @@ -86,7 +86,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{cite:postnote:ibidpage}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} 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 5749af7793d..bb0b0457549 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx @@ -87,7 +87,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{cite:postnote:ibidpage}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} 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 5b67757ce4d..b1c8f0683aa 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx @@ -81,7 +81,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{postnote}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} 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 a361766f169..1f24a4dac93 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx @@ -87,7 +87,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{cite:postnote:ibidpage}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} 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 9ad583e1992..60e5dfc8021 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx @@ -94,7 +94,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{cite:postnote:ibidpage}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} 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 1fab909cc4f..c410692b600 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx @@ -82,7 +82,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{cite:postnote:ibidpage}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx index c36465fe08f..1291f0dfce0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx @@ -75,7 +75,7 @@ {\usebibmacro{cite:postnote:pages}} {\usebibmacro{postnote}}} \providebibmacro*{cite:postnote:pages}{% - \setunit{\postnotedelim}% + \setunit{\printdelim{postnotedelim}}% \bibstring{thiscite}% \setunit{\addspace}% \printfield{postnote}}} diff --git a/Master/texmf-dist/tex/latex/biblatex/lbx/danish.lbx b/Master/texmf-dist/tex/latex/biblatex/lbx/danish.lbx index aff486227e3..2c57242bd92 100644 --- a/Master/texmf-dist/tex/latex/biblatex/lbx/danish.lbx +++ b/Master/texmf-dist/tex/latex/biblatex/lbx/danish.lbx @@ -74,122 +74,122 @@ references = {{Litteraturhenvisninger}{Litteratur}}, shorthands = {{Forkortelser}{Forkortelser}}, editor = {{redakt\o r}{red\adddot}}, - editors = {{redakt\o rer}{redd\adddot}}, + editors = {{redakt\o rer}{red\adddot}}, compiler = {{kompilator}{kompilator}}, compilers = {{kompilatorer}{kompilatorer}}, redactor = {{medredakt\o r}{medred\adddot}}, - redactors = {{medredakt\o rer}{medredd\adddot}}, + redactors = {{medredakt\o rer}{medred\adddot}}, reviser = {{revision}{rev\adddot}}, - revisers = {{revision}{revv\adddot}}, + revisers = {{revision}{rev\adddot}}, founder = {{stifter}{stifter}}, founders = {{stiftere}{stiftere}}, - continuator = {{videref{\o}rer}{videref\adddot}}, - continuators = {{videref{\o}rere}{videreff\adddot}}, + continuator = {{videref\o rer}{videref\adddot}}, + continuators = {{videref\o rere}{videref\adddot}}, collaborator = {{medarbejder}{medarb\adddot}}, - collaborators = {{medarbejdere}{medarbb\adddot}}, + collaborators = {{medarbejdere}{medarb\adddot}}, translator = {{overs\ae tter}{overs\adddot}}, - translators = {{overs\ae ttere}{overss\adddot}}, + translators = {{overs\ae ttere}{overs\adddot}}, commentator = {{kommentator}{komm\adddot}}, commentators = {{kommentatorer}{komm\adddot}}, annotator = {{kommentator}{komm\adddot}}, annotators = {{kommentatorer}{komm\adddot}}, commentary = {{kommentar}{komm\adddot}}, - annotations = {{annoteringer}{ann.\adddot}}, + annotations = {{annoteringer}{ann\adddot}}, introduction = {{indledning}{indl\adddot}}, foreword = {{forord}{forord}}, afterword = {{efterord}{efterord}}, editortr = {{redakt\o r og overs\ae tter}% {red\adddotspace og overs\adddot}}, editorstr = {{redakt\o rer og overs\ae ttere}% - {redd\adddotspace og overss\adddot}}, + {red\adddotspace og overs\adddot}}, editorco = {{redakt\o r og kommentator} {red\adddotspace og komm\adddot}}, editorsco = {{redakt\o rer og kommentatorer} - {redd\adddotspace og komm\adddot}}, + {red\adddotspace og komm\adddot}}, editoran = {{redakt\o r og kommentator}% {red\adddotspace og komm\adddot}}, editorsan = {{redakt\o rer og kommentatorer}% - {redd\adddotspace og komm\adddot}}, + {red\adddotspace og komm\adddot}}, editorin = {{redaktion og indledning}% {red\adddotspace og indl\adddot}}, editorsin = {{redaktion og indledning}% - {redd\adddotspace og indl\adddot}}, + {red\adddotspace og indl\adddot}}, editorfo = {{redaktion og forord}% {red\adddotspace og forord}}, editorsfo = {{redaktion og forord}% - {redd\adddotspace og forord}}, + {red\adddotspace og forord}}, editoraf = {{redaktion og efterord}% {red\adddotspace og efterord}}, editorsaf = {{redaktion og efterord}% - {redd\adddotspace og efterord}}, + {red\adddotspace og efterord}}, editortrco = {{redakt\o r, overs\ae tter og kommentator}% {red.,\addabbrvspace overs\adddotspace og komm\adddot}}, editorstrco = {{redakt\o rer, overs\ae ttere og kommentatorer}% - {redd.,\addabbrvspace overss\adddotspace og komm\adddot}}, + {red.,\addabbrvspace overs\adddotspace og komm\adddot}}, editortran = {{redakt\o r, overs\ae tter og kommentator}% {red.,\addabbrvspace overs\adddotspace og komm\adddot}}, editorstran = {{redakt\o rer, overs\ae ttere og kommentatorer}% - {redd.,\addabbrvspace overss\adddotspace og komm\adddot}}, + {red.,\addabbrvspace overs\adddotspace og komm\adddot}}, editortrin = {{redaktion, overs\ae ttelse og indledning}% {red.,\addabbrvspace overs\adddotspace og indl\adddot}}, editorstrin = {{redaktion, overs\ae ttelse og indledning}% - {redd.,\addabbrvspace overs\adddotspace og indl\adddot}}, + {red.,\addabbrvspace overs\adddotspace og indl\adddot}}, editortrfo = {{redaktion, overs\ae ttelse og forord}% {red.,\addabbrvspace overs\adddotspace og forord}}, editorstrfo = {{redaktion, overs\ae ttelse og forord}% - {redd.,\addabbrvspace overs\adddotspace og forord}}, + {red.,\addabbrvspace overs\adddotspace og forord}}, editortraf = {{redaktion, overs\ae ttelse og efterord}% {red.,\addabbrvspace overs\adddotspace og efterord}}, editorstraf = {{redaktion, overs\ae ttelse og efterord}% - {redd.,\addabbrvspace overs\adddotspace og efterord}}, + {red.,\addabbrvspace overs\adddotspace og efterord}}, editorcoin = {{redaktion, kommentarer og indledning}% {red.,\addabbrvspace komm\adddotspace og indl\adddot}}, editorscoin = {{redaktion, kommentarer og indledning}% - {redd.,\addabbrvspace komm\adddotspace og indl\adddot}}, + {red.,\addabbrvspace komm\adddotspace og indl\adddot}}, editorcofo = {{redaktion, kommentarer og forord}% {red.,\addabbrvspace komm\adddotspace og forord}}, editorscofo = {{redaktion, kommentarer og forord}% - {redd.,\addabbrvspace komm\adddotspace og forord}}, + {red.,\addabbrvspace komm\adddotspace og forord}}, editorcoaf = {{redaktion, kommentarer og efterord}% {red.,\addabbrvspace komm\adddotspace og efterord}}, editorscoaf = {{redaktion, kommentarer og efterord}% - {redd.,\addabbrvspace komm\adddotspace og efterord}}, + {red.,\addabbrvspace komm\adddotspace og efterord}}, editoranin = {{redaktion, annoteringer og indledning}% {red.,\addabbrvspace ann\adddotspace og indl\adddot}}, editorsanin = {{redaktion, \adddotspace og indledning}% - {redd.,\addabbrvspace ann\adddotspace og indl\adddot}}, + {red.,\addabbrvspace ann\adddotspace og indl\adddot}}, editoranfo = {{redaktion, \adddotspace og forord}% {red.,\addabbrvspace ann\adddotspace og forord}}, editorsanfo = {{redaktion, annoteringer og forord}% - {redd.,\addabbrvspace ann\adddotspace og forord}}, + {red.,\addabbrvspace ann\adddotspace og forord}}, editoranaf = {{redaktion, annoteringer og efterord}% {red.,\addabbrvspace ann\adddotspace og efterord}}, editorsanaf = {{redaktion, annoteringer og efterord}% - {redd.,\addabbrvspace ann\adddotspace og efterord}}, + {red.,\addabbrvspace ann\adddotspace og efterord}}, editortrcoin = {{redaktion, overs\ae ttelse, kommentarer og indledning}% {red.,\addabbrvspace overs., komm\adddotspace og indl\adddot}}, editorstrcoin = {{redaktion, overs\ae ttelse, kommentarer og indledning}% - {redd.,\addabbrvspace overs., komm\adddotspace og indl\adddot}}, + {red.,\addabbrvspace overs., komm\adddotspace og indl\adddot}}, editortrcofo = {{redaktion, overs\ae ttelse, kommentarer og forord}% {red.,\addabbrvspace overs., komm\adddotspace og forord}}, editorstrcofo = {{redaktion, overs\ae ttelse, kommentarer og forord}% - {redd.,\addabbrvspace overs., komm\adddotspace og forord}}, + {red.,\addabbrvspace overs., komm\adddotspace og forord}}, editortrcoaf = {{redaktion, overs\ae ttelse, kommentarer og efterord}% {red.,\addabbrvspace overs., komm\adddotspace og efterord}}, editorstrcoaf = {{redaktion, overs\ae ttelse, kommentarer og efterord}% - {redd.,\addabbrvspace overs., komm\adddotspace og efterord}}, + {red.,\addabbrvspace overs., komm\adddotspace og efterord}}, editortranin = {{redaktion, overs\ae ttelse, annoteringer og indledning}% {red.,\addabbrvspace overs., ann\adddotspace og indl\adddot}}, editorstranin = {{redaktion, overs\ae ttelse, annoteringer og indledning}% - {redd.,\addabbrvspace overs., ann\adddotspace og indl\adddot}}, + {red.,\addabbrvspace overs., ann\adddotspace og indl\adddot}}, editortranfo = {{redaktion, overs\ae ttelse, annoteringer og forord}% {red.,\addabbrvspace overs., ann\adddotspace og forord}}, editorstranfo = {{redaktion, overs\ae ttelse, annoteringer og forord}% - {redd.,\addabbrvspace overs., ann\adddotspace og forord}}, + {red.,\addabbrvspace overs., ann\adddotspace og forord}}, editortranaf = {{redaktion, overs\ae ttelse, annoteringer og efterord}% {red.,\addabbrvspace overs., ann\adddotspace og efterord}}, editorstranaf = {{redaktion, overs\ae ttelse, annoteringer og efterord}% - {redd.,\addabbrvspace overs., ann\adddotspace og efterord}}, + {red.,\addabbrvspace overs., ann\adddotspace og efterord}}, translatorco = {{overs\ae ttelse og kommentarer}% {overs\adddotspace og komm\adddot}}, translatorsco = {{overs\ae ttelse og kommentarer}% @@ -235,14 +235,14 @@ translatorsanaf = {{overs\ae ttelse, annoteringer og efterord}% {overs., ann\adddotspace og efterord}}, organizer = {{organisator}{org\adddot}}, - organizers = {{organisatorer}{orgg\adddot}}, + organizers = {{organisatorer}{org\adddot}}, byorganizer = {{organiseret af}{org\adddotspace av}}, byauthor = {{af}{af}}, - byeditor = {{udgivet af}{udg\adddotspace af}}, + byeditor = {{redigeret af}{red\adddotspace af}}, bycompiler = {{kompileret af}{komp\adddotspace af}}, byredactor = {{bearbejdet af}{bearb\adddotspace af}}, byreviser = {{revideret af}{rev\adddotspace af}}, - byreviewer = {{bed\o mt af}{bed\o mt af}}, + byreviewer = {{bed\o mt af}{bed\adddotspace af}}, byfounder = {{stiftet af}{stiftet af}}, bycontinuator = {{videref\o rt af}{videref\adddotspace af}}, bycollaborator = {{i samarbejde med}{i samarb\adddotspace m\adddotspace}}, @@ -255,52 +255,52 @@ withintroduction = {{med indledning af}{m\adddotspace indl\adddot\ af}}, withforeword = {{med forord af}{m\adddotspace forord af}}, withafterword = {{med efterord af}{m\adddotspace efterord af}}, - byeditortr = {{udgivet og oversat \lbx@lfromlang\ af}% - {udg\adddotspace og overs\adddot \lbx@sfromlang\ af}}, - byeditorco = {{udgivet og kommenteret af}% - {udg\adddotspace og komm\adddot\ af}}, - byeditoran = {{udgivet med annoteringer af}% - {udg\adddotspace m\adddotspace ann\adddotspace af}}, - byeditorin = {{udgivet med indledning af}% - {udg\adddotspace med indl\adddot\ af}}, - byeditorfo = {{udgivet med forord af}% - {udg\adddotspace med forord af}}, - byeditoraf = {{udgivet med efterord af}% - {udg\adddotspace med efterord af}}, - byeditortrco = {{udgivet, oversat \lbx@lfromlang\ og kommenteret af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og komm\adddot\ af}}, - byeditortran = {{udgivet, oversat \lbx@lfromlang\ og annoteret af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og ann\adddot\ af}}, - byeditortrin = {{udgivet, oversat \lbx@lfromlang\ og med indledning af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og indl\adddot\ af}}, - byeditortrfo = {{udgivet, oversat \lbx@lfromlang\ og med forord af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og forord af}}, - byeditortraf = {{udgivet, oversat \lbx@lfromlang\ og med efterord af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og efterord af}}, - byeditorcoin = {{udgivet, kommenteret og med indledning af}% - {udg.,\addabbrvspace komm\adddot\ og indl\adddotspace af}}, - byeditorcofo = {{udgivet, kommenteret og med forord af}% - {udg.,\addabbrvspace komm\adddot\ og forord af}}, - byeditorcoaf = {{udgivet, kommenteret og med efterord af}% - {udg.,\addabbrvspace komm\adddot\ og efterord af}}, - byeditoranin = {{udgivet, annoteret og med indledning af}% - {udg.,\addabbrvspace ann\adddot\ og indl\adddot\ af}}, - byeditoranfo = {{udgivet, annoteret og med forord af}% - {udg.,\addabbrvspace ann\adddot\ og forord af}}, - byeditoranaf = {{udgivet, annoteret og med efterord af}% - {udg.,\addabbrvspace ann\adddot\ og efterord af}}, - byeditortrcoin = {{udgivet, oversat \lbx@lfromlang, kommenteret og med indledning af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang, komm\adddot\ og indl\adddot\ af}}, - byeditortrcofo = {{udgivet, oversat \lbx@lfromlang, kommenteret og med forord af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang, komm\adddot\ og forord af}}, - byeditortrcoaf = {{udgivet, oversat \lbx@lfromlang, kommenteret og med efterord af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang, komm\adddot\ og efterord af}}, - byeditortranin = {{udgivet, oversat \lbx@lfromlang, med annoteringer og indledning af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang, ann\adddot\ og indl\adddot\ af}}, - byeditortranfo = {{udgivet, oversat \lbx@lfromlang, med annoteringer og forord af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang, ann\adddot\ og forord af}}, - byeditortranaf = {{udgivet, oversat \lbx@lfromlang, med annoteringer og efterord af}% - {udg.,\addabbrvspace overs\adddot\ \lbx@sfromlang, ann\adddot\ og efterord af}}, + byeditortr = {{redigeret og oversat \lbx@lfromlang\ af}% + {red\adddotspace og overs\adddot \lbx@sfromlang\ af}}, + byeditorco = {{redigeret og kommenteret af}% + {red\adddotspace og komm\adddot\ af}}, + byeditoran = {{redigeret med annoteringer af}% + {red\adddotspace m\adddotspace ann\adddotspace af}}, + byeditorin = {{redigeret med indledning af}% + {red\adddotspace med indl\adddot\ af}}, + byeditorfo = {{redigeret med forord af}% + {red\adddotspace med forord af}}, + byeditoraf = {{redigeret med efterord af}% + {red\adddotspace med efterord af}}, + byeditortrco = {{redigeret, oversat \lbx@lfromlang\ og kommenteret af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og komm\adddot\ af}}, + byeditortran = {{redigeret, oversat \lbx@lfromlang\ og annoteret af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og ann\adddot\ af}}, + byeditortrin = {{redigeret, oversat \lbx@lfromlang\ og med indledning af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og indl\adddot\ af}}, + byeditortrfo = {{redigeret, oversat \lbx@lfromlang\ og med forord af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og forord af}}, + byeditortraf = {{redigeret, oversat \lbx@lfromlang\ og med efterord af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang\ og efterord af}}, + byeditorcoin = {{redigeret, kommenteret og med indledning af}% + {red.,\addabbrvspace komm\adddot\ og indl\adddotspace af}}, + byeditorcofo = {{redigeret, kommenteret og med forord af}% + {red.,\addabbrvspace komm\adddot\ og forord af}}, + byeditorcoaf = {{redigeret, kommenteret og med efterord af}% + {red.,\addabbrvspace komm\adddot\ og efterord af}}, + byeditoranin = {{redigeret, annoteret og med indledning af}% + {red.,\addabbrvspace ann\adddot\ og indl\adddot\ af}}, + byeditoranfo = {{redigeret, annoteret og med forord af}% + {red.,\addabbrvspace ann\adddot\ og forord af}}, + byeditoranaf = {{redigeret, annoteret og med efterord af}% + {red.,\addabbrvspace ann\adddot\ og efterord af}}, + byeditortrcoin = {{redigeret, oversat \lbx@lfromlang, kommenteret og med indledning af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang, komm\adddot\ og indl\adddot\ af}}, + byeditortrcofo = {{redigeret, oversat \lbx@lfromlang, kommenteret og med forord af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang, komm\adddot\ og forord af}}, + byeditortrcoaf = {{redigeret, oversat \lbx@lfromlang, kommenteret og med efterord af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang, komm\adddot\ og efterord af}}, + byeditortranin = {{redigeret, oversat \lbx@lfromlang, med annoteringer og indledning af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang, ann\adddot\ og indl\adddot\ af}}, + byeditortranfo = {{redigeret, oversat \lbx@lfromlang, med annoteringer og forord af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang, ann\adddot\ og forord af}}, + byeditortranaf = {{redigeret, oversat \lbx@lfromlang, med annoteringer og efterord af}% + {red.,\addabbrvspace overs\adddot\ \lbx@sfromlang, ann\adddot\ og efterord af}}, bytranslatorco = {{oversat \lbx@lfromlang\ med kommentarer af}% {overs\adddot\ \lbx@sfromlang\ m\adddotspace komm\adddot\ af}}, bytranslatoran = {{oversat \lbx@lfromlang\ og annoteret af}% @@ -327,7 +327,7 @@ andothers = {{med flere}{m.fl\adddot}}, andmore = {{med mere}{m.m\adddot}}, volume = {{bind}{bd\adddot}}, - volumes = {{bind}{bdd\adddot}}, + volumes = {{bind}{bd\adddot}}, involumes = {{i}{i}}, jourvol = {{\aa rgang}{\aa rg\adddot}}, jourser = {{r\ae kke}{rk\adddot}}, @@ -349,40 +349,40 @@ origpubin = {{oprindeligt udgivet i}{opr\adddot\ udg\adddot\ i}}, astitle = {{under titlen}{under titlen}}, bypublisher = {{af}{af}}, - nodate = {{udateret}{udat\adddot}}, + nodate = {{uden \aa rstal}{u.\aa\adddot}}, page = {{side}{s\adddot}}, - pages = {{sider}{ss\adddot}}, + pages = {{sider}{s\adddot}}, column = {{spalte}{sp\adddot}}, - columns = {{spalter}{spp\adddot}}, + columns = {{spalter}{sp\adddot}}, line = {{linje}{l\adddot}}, lines = {{linjer}{l\adddot}}, verse = {{vers}{v\adddot}}, - verses = {{vers}{vv\adddot}}, + verses = {{vers}{v\adddot}}, section = {{paragraf}{par\adddot}}, - sections = {{paragraffer}{parr\adddot}}, + sections = {{paragraffer}{par\adddot}}, paragraph = {{afsnit}{afsn\adddot}}, - paragraphs = {{afsnit}{afsnn\adddot}}, + paragraphs = {{afsnit}{afsn\adddot}}, pagetotal = {{side}{s\adddot}}, - pagetotals = {{sider}{ss\adddot}}, + pagetotals = {{sider}{s\adddot}}, columntotal = {{spalte}{sp\adddot}}, - columntotals = {{spalter}{spp\adddot}}, + columntotals = {{spalter}{sp\adddot}}, line = {{linje}{l\adddot}}, - lines = {{linjer}{ll\adddot}}, + lines = {{linjer}{l\adddot}}, verse = {{vers}{v\adddot}}, - verses = {{vers}{vv\adddot}}, + verses = {{vers}{v\adddot}}, linetotal = {{linje}{l\adddot}}, - linetotals = {{linje}{ll\adddot}}, + linetotals = {{linje}{l\adddot}}, versetotal = {{vers}{v\adddot}}, - versetotals = {{vers}{vv\adddot}}, + versetotals = {{vers}{v\adddot}}, sectiontotal = {{paragraf}{par\adddot}}, - sectiontotals = {{paragraffer}{parr\adddot}}, + sectiontotals = {{paragraffer}{par\adddot}}, paragraphtotal = {{afsnit}{afsn\adddot}}, - paragraphtotals = {{afsnit}{afsnn\adddot}},% + paragraphtotals = {{afsnit}{afsn\adddot}},% in = {{i}{i}}, inseries = {{i r\ae kken}{i rk\adddot}}, ofseries = {{fra r\ae kken}{fra rk\adddot}}, number = {{nummer}{nr\adddot}}, -% numbers = {{numre}{nrr\adddot}}, +% numbers = {{numre}{nr\adddot}}, chapter = {{kapitel}{kap\adddot}}, bathesis = {{bachelorafhandling}{bachelorafh\adddot}}, mathesis = {{masterafhandling}{masterafh\adddot}}, @@ -396,7 +396,7 @@ version = {{version}{vers\adddot}}, url = {{webadresse}{webadr\adddot}}, urlfrom = {{tilg\ae ngelig fra}{tilg\adddotspace fra}}, - urlseen = {{senest bes\o gt}{senest bes\adddot}}, + urlseen = {{bes\o gt}{bes\adddot}}, inpreparation = {{under udarbejdelse}{under udarb\adddot}}, submitted = {{indleveret}{indlev\adddot}}, forthcoming = {{under udgivelse}{under udgiv\adddot}}, @@ -424,7 +424,7 @@ see = {{se}{s\adddot}}, seealso = {{se ogs\aa}{se ogs\aa}}, backrefpage = {{se side}{se s\adddot}}, - backrefpages = {{se siderne}{se ss\adddot}}, + backrefpages = {{se siderne}{se s\adddot}}, january = {{januar}{jan\adddot}}, february = {{februar}{feb\adddot}}, march = {{marts}{mar\adddot}}, @@ -514,7 +514,7 @@ patrequk = {{britisk patentans\o gning}{brit\adddot\ pat\adddot\ ans\o gn\adddot}}, patrequs = {{amerikansk patentans\o gning}{am\adddot\ pat\adddot\ ans\o gn\adddot}}, file = {{fil}{fil}}, - library = {{bibliotek}{bibliotek}}, + library = {{bibliotek}{bibl\adddot}}, abstract = {{resum\'{e}}{resum\'{e}}}, annotation = {{kommentarer}{komm\adddot}}, commonera = {{efter vor tidsregning}{e\adddot v\adddot t\adddot}}, diff --git a/Master/texmf-dist/tex/latex/biblatex/lbx/english.lbx b/Master/texmf-dist/tex/latex/biblatex/lbx/english.lbx index d8d9c73d80e..109014dafb3 100644 --- a/Master/texmf-dist/tex/latex/biblatex/lbx/english.lbx +++ b/Master/texmf-dist/tex/latex/biblatex/lbx/english.lbx @@ -559,6 +559,11 @@ canadian,australian,newzealand,USenglish,UKenglish} } \protected\gdef\lbx@us@mkdaterangetrunc@long#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefull{#1}{#2}} + {\lbx@us@mkdaterangetrunc@long@i{#1}{#2}}} + +\protected\gdef\lbx@us@mkdaterangetrunc@long@i#1#2{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} @@ -581,7 +586,7 @@ canadian,australian,newzealand,USenglish,UKenglish} {\mbox{\bibdaterangesep}} {\bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\ifdateyearsequal{#2}{#2end} {\iffieldsequal{#2month}{#2endmonth} {\csuse{mkbibdate#1}{#2endyear}{}{#2endday}} @@ -593,6 +598,11 @@ canadian,australian,newzealand,USenglish,UKenglish} \endgroup} \protected\gdef\lbx@us@mkdaterangetrunc@short#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefull{#1}{#2}} + {\lbx@us@mkdaterangetrunc@short@i{#1}{#2}}} + +\protected\gdef\lbx@us@mkdaterangetrunc@short@i#1#2{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} @@ -615,12 +625,17 @@ canadian,australian,newzealand,USenglish,UKenglish} {\mbox{\bibdaterangesep}} {\bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}} {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}% \enddateuncertainprint \dateeraprint{#2endyear}}}}}% - \endngroup} + \endgroup} + +\protected\gdef\lbx@us@mkdaterangetruncextra@long#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefullextra{#1}{#2}} + {\lbx@us@mkdaterangetruncextra@long@i{#1}{#2}}} \protected\gdef\lbx@us@mkdaterangetruncextra@long#1#2{% \begingroup @@ -646,7 +661,7 @@ canadian,australian,newzealand,USenglish,UKenglish} \mbox{\bibdaterangesep}} {\bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\ifdateyearsequal{#2}{#2end} {\iffieldsequal{#2month}{#2endmonth} {\csuse{mkbibdate#1}{#2endyear}{}{#2endday}} @@ -659,6 +674,11 @@ canadian,australian,newzealand,USenglish,UKenglish} \endgroup} \protected\gdef\lbx@us@mkdaterangetruncextra@short#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefullextra{#1}{#2}} + {\lbx@us@mkdaterangetruncextra@short@i{#1}{#2}}} + +\protected\gdef\lbx@us@mkdaterangetruncextra@short#1#2{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} @@ -682,7 +702,7 @@ canadian,australian,newzealand,USenglish,UKenglish} \mbox{\bibdaterangesep}} {\bibdaterangesep \enddatecircaprint - \iffieldundef{#2season} + \iffieldundef{#2endseason} {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}} {\csuse{mkbibseasondate#1}{#2endyear}{#2endseason}}% \printfield{extradate}% diff --git a/Master/texmf-dist/tex/latex/biblatex/lbx/latvian.lbx b/Master/texmf-dist/tex/latex/biblatex/lbx/latvian.lbx index 7a86097a8d6..33a95360cbc 100644 --- a/Master/texmf-dist/tex/latex/biblatex/lbx/latvian.lbx +++ b/Master/texmf-dist/tex/latex/biblatex/lbx/latvian.lbx @@ -1,6 +1,20 @@ \ProvidesFile{latvian.lbx} [\abx@lbxid] +\ifundef{\lbx@lv@loadinfo} + {\blx@warning@noline{% + Latvian localisation module for biblatex loaded.\MessageBreak + This module changes more definitions than usual.\MessageBreak + Please refer to the documentation for hints and\MessageBreak + check the output carefully, especially with non-\MessageBreak + standard styles or customisations to field formats.\MessageBreak + This warning can be disabled by calling\MessageBreak + '\string\BiblatexLatvianWarningOff'\MessageBreak + after 'biblatex' has been loaded, but before\MessageBreak + the localisation is loaded for the first time}% + \global\let\lbx@lv@loadinfo\@empty} + {} + \DeclareRedundantLanguages{latvian}{latvian} \NewBibliographyString{% @@ -123,6 +137,67 @@ \expandafter\lbx@lv@makewhendate@i \expandafter{\lbx@lv@whendate@formats}}% %\lbx@lv@makewhendate{eventdate}% + \def\lbx@lv@mkdottednormrange@i#1{% + \ifinteger{#1} + {\mkbibordinal{#1}} + {#1}} + \protected\def\lbx@lv@mkdottednormrange#1{% + \mknormrange*[\@firstofone][\lbx@lv@mkdottednormrange@i]{#1}}% + % this redefines \mkpageprefix to put the page number as suffix + \savecommand\blx@mkpageprefix + \protected\long\def\blx@mkpageprefix#1[#2]#3{% + \blx@mkpageprefix@i[#2]{#3}% + \ifnumeral{#3} + {\ppspace\bibstring{#1}} + {\ifnumerals{#3} + {\ppspace\bibstring{#1s}} + {\def\pno{\bibstring{#1}}% + \def\ppno{\bibstring{#1s}}}}}% + % NOTE: a few field formats are redefined here, this overrides + % corresponding style and preamble definitions. + % If you want to overwrite the changes made here, use + % \DefineBibliographyExtras{magyar}{...} + % Do not forget to make these changes undone with + % \UndefineBibliographyExtras{magyar}{...} + % to avoid them spilling out later. + \savefieldformat{pages}% + \DeclareFieldFormat{pages}{% + \mkpageprefix[bookpagination][\lbx@lv@mkdottednormrange]{#1}}% + \savefieldformat{postnote}% + \DeclareFieldFormat{postnote}{% + \mkpageprefix[bookpagination][\lbx@lv@mkdottednormrange]{#1}}% + \savefieldformat{volcitepages}% + \DeclareFieldFormat{volcitepages}{% + \mkpageprefix[pagination][\lbx@lv@mkdottednormrange]{#1}}% + \savefieldformat{multipostnote}% + \DeclareFieldFormat{multipostnote}{% + \mkpageprefix[pagination][\lbx@lv@mkdottednormrange]{#1}}% + \savefieldformat{chapter}% + \DeclareFieldFormat{chapter}{% + \ifnumerals{#1}{\mkbibordinal{#1}}{#1} + \addnbspace + \bibstring{chapter}}% + \savefieldformat{volume}% + \DeclareFieldFormat{volume}{% + \ifnumerals{#1}{\mkbibordinal{#1}}{#1} + \addnbspace + \bibstring{volume}}% + \savefieldformat{part}% + \DeclareFieldFormat{part}{% + \addcomma\space% <- this is *really* bad, don't try this at home + % In general leading or trailing punctuation in field formats should be + % avoided and should instead be dealt with in the appropriate bibmacros. + % The part field is special because its standard definition is '.#1'. + % Additionally, \printfield{part} is called all over the place, so we + % can't simply redefine a macro here. + \ifnumerals{#1}{\mkbibordinal{#1}}{#1}% + \addnbspace + \bibstring{part}}% + \savefieldformat{version}% + \DeclareFieldFormat{version}{% + \ifnumerals{#1}{\mkbibordinal{#1}}{#1} + \addnbspace + \bibstring{version}}% } \UndeclareBibliographyExtras{% @@ -138,6 +213,16 @@ %\lbx@lv@restorewhendate{eventdate}% \restorecommand\mkdaterangecomp \restorecommand\mkdaterangecompextra + \restorecommand\mknormrange + \restorecommand\blx@mkpageprefix + \restorefieldformat{pages}% + \restorefieldformat{postnote}% + \restorefieldformat{volcitepages}% + \restorefieldformat{multipostnote}% + \restorefieldformat{chapter}% + \restorefieldformat{volume}% + \restorefieldformat{part}% + \restorefieldformat{version}% } \DeclareBibliographyStrings{% @@ -518,7 +603,7 @@ langgalician = {{galsie\v{s}u}{galsie\v{s}u}}, langgerman = {{v\={a}cu}{v\={a}cu}}, langgreek = {{grie\c{k}u}{grie\c{k}u}}, -% langhungarian = {{}{}}, % FIXME: missing + langhungarian = {{ung\={a}ru}{ung\={a}ru}}, langitalian = {{it\={a}\c{l}u}{it\={a}\c{l}u}}, langjapanese = {{jap\={a}\c{n}u}{jap\={a}\c{n}u}}, langlatin = {{lat\={\i}\c{n}u}{lat\={\i}\c{n}u}}, @@ -547,7 +632,7 @@ fromgalician = {{no galsie\v{s}u}{no galsie\v{s}u}}, fromgerman = {{no v\={a}cu}{no v\={a}cu}}, fromgreek = {{no grie\c{k}u}{no grie\c{k}u}}, -% fromhungarian = {{}{}}, % FIXME: missing + fromhungarian = {{no ung\={a}ru}{no ung\={a}ru}}, fromitalian = {{no it\={a}\c{l}u}{no it\={a}\c{l}u}}, fromjapanese = {{no jap\={a}\c{n}u}{no jap\={a}\c{n}u}}, fromlatin = {{no lat\={\i}\c{n}u}{no lat\={\i}\c{n}u}}, @@ -622,6 +707,11 @@ \fi}% \protected\gdef\lbx@lv@mkdaterangetrunc@long#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefull{#1}{#2}} + {\lbx@lv@mkdaterangetrunc@long@i{#1}{#2}}} + +\protected\gdef\lbx@lv@mkdaterangetrunc@long@i#1#2{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} @@ -655,6 +745,11 @@ \endgroup} \protected\gdef\lbx@lv@mkdaterangetruncextra@long#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefullextra{#1}{#2}} + {\lbx@lv@mkdaterangetruncextra@long@i{#1}{#2}}} + +\protected\gdef\lbx@lv@mkdaterangetruncextra@long@i#1#2{% \begingroup \blx@metadateinfo{#2}% \iffieldundef{#2year} diff --git a/Master/texmf-dist/tex/latex/biblatex/lbx/magyar.lbx b/Master/texmf-dist/tex/latex/biblatex/lbx/magyar.lbx index c4d102ce63f..f94e50eaa85 100644 --- a/Master/texmf-dist/tex/latex/biblatex/lbx/magyar.lbx +++ b/Master/texmf-dist/tex/latex/biblatex/lbx/magyar.lbx @@ -6,10 +6,12 @@ Hungarian localisation module for biblatex loaded.\MessageBreak This module changes more definitions than usual.\MessageBreak Please refer to the documentation for hints and\MessageBreak - check the output, especially with non-standard\MessageBreak - styles or customisations to field formats.\MessageBreak - This warning can be disabled with\MessageBreak - '\string\BiblatexHungarianWarningOff'}% + check the output carefully, especially with non-\MessageBreak + standard styles or customisations to field formats.\MessageBreak + This warning can be disabled by calling\MessageBreak + '\string\BiblatexHungarianWarningOff'\MessageBreak + after 'biblatex' has been loaded, but before\MessageBreak + the localisation is loaded for the first time}% \global\let\lbx@hu@loadinfo\@empty} {} @@ -109,15 +111,15 @@ % this redefines \mkpageprefix to put the page number as suffix \savecommand\blx@mkpageprefix \protected\long\def\blx@mkpageprefix#1[#2]#3{% - \blx@mkpageprefix@i[#2]{#3}% - \ifnumeral{#3} - {\ppspace\bibstring{#1}} - {\ifnumerals{#3} - {\ppspace\bibstring{#1s}} - {\def\pno{\bibstring{#1}}% - \def\ppno{\bibstring{#1s}}}}}% - % NOTE: a few field formats are redefined here, this overrides corresponding - % style and preamble definitions. + \blx@mkpageprefix@i[#2]{#3}% + \ifnumeral{#3} + {\ppspace\bibstring{#1}} + {\ifnumerals{#3} + {\ppspace\bibstring{#1s}} + {\def\pno{\bibstring{#1}}% + \def\ppno{\bibstring{#1s}}}}}% + % NOTE: a few field formats are redefined here, this overrides + % corresponding style and preamble definitions. % If you want to overwrite the changes made here, use % \DefineBibliographyExtras{magyar}{...} % Do not forget to make these changes undone with @@ -647,6 +649,11 @@ or not togl {blx@#1dateusetime})}} \protected\gdef\lbx@hu@mkdaterangetrunc#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefull{#1}{#2}} + {\lbx@hu@mkdaterangetrunc@i{#1}{#2}}} + +\protected\gdef\lbx@hu@mkdaterangetrunc@i#1#2{% \begingroup \blx@metadateinfo{#2}% \edef\lbx@hu@dayrange{\lbx@hu@dayrange@i{#2}}% @@ -682,6 +689,11 @@ \endgroup} \protected\gdef\lbx@hu@mkdaterangetruncextra#1#2{% + \blx@if@printanytimes{#2} + {\mkdaterangefullextra{#1}{#2}} + {\lbx@hu@mkdaterangetruncextra@i{#1}{#2}}} + +\protected\gdef\lbx@hu@mkdaterangetruncextra@i#1#2{% \begingroup \blx@metadateinfo{#2}% \edef\lbx@hu@dayrange{\lbx@hu@dayrange@i{#2}}% |