diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-07 23:27:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-07 23:27:17 +0000 |
commit | c48ccf7d508e674e10d9771d333993da3a957589 (patch) | |
tree | 8b07dc3139c7af20c5818eb3958bcf0ac71586e7 /Master/texmf-dist/tex/latex/biblatex | |
parent | 7a90070ab1c2a78ee48e025706907db2b5fb4384 (diff) |
biblatex 3.3 (7mar16)
git-svn-id: svn://tug.org/texlive/trunk@39966 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex')
32 files changed, 3377 insertions, 1194 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx index 557a8e44704..a3f26dd9fe2 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/authortitle.bbx @@ -4,7 +4,7 @@ \RequireBibliographyStyle{standard} \ExecuteBibliographyOptions{pagetracker} -\DeclareBibliographyOption{dashed}[true]{% +\DeclareBibliographyOption[boolean]{dashed}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{pagetracker}% \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}} diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx index f4413275e39..6b3984ebade 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx @@ -3,13 +3,13 @@ \RequireBibliographyStyle{standard} -\DeclareBibliographyOption{dashed}[true]{% +\DeclareBibliographyOption[boolean]{dashed}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{pagetracker}% \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}} {\renewbibmacro*{bbx:savehash}{}}} -\DeclareBibliographyOption{mergedate}[true]{% +\DeclareBibliographyOption[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/debug.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/debug.bbx index afd8b5e311e..319b26e0553 100644 --- a/Master/texmf-dist/tex/latex/biblatex/bbx/debug.bbx +++ b/Master/texmf-dist/tex/latex/biblatex/bbx/debug.bbx @@ -35,22 +35,38 @@ {\endlist} {\item} -\DeclareNameFormat{debug}{% - \bbx@mklabel{\currentname}% - \ifblank{#3}{}{\detokenize{#3}\space}% - \ifblank{#5}{}{\detokenize{#5}\ifpunctmark{'}{}{\space}}% - \detokenize{#1}% - \ifblank{#7}{}{\space\detokenize{#7}}% - \ifblank{#3}{}{\bbx@mksublabel{first}\detokenize{#3}}% - \ifblank{#1}{}{\bbx@mksublabel{last}\detokenize{#1}}% - \ifblank{#5}{}{\bbx@mksublabel{prefix}\detokenize{#5}}% - \ifblank{#7}{}{\bbx@mksublabel{affix}\detokenize{#7}}% - \bbx@mksublabel{inits}% - \ifblank{#4}{}{\detokenize{#4}\space}% - \ifblank{#6}{}{\detokenize{#6}\ifpunctmark{'}{}{\space}}% - \detokenize{#2}% - \ifblank{#8}{}{\space\detokenize{#8}}% -} +\@ifpackageloaded{biblatex_legacy} + {\DeclareNameFormat{debug}{% + \bbx@mklabel{\currentname}% + \ifblank{#3}{}{\detokenize{#3}\space}% + \ifblank{#5}{}{\detokenize{#5}\ifpunctmark{'}{}{\space}}% + \detokenize{#1}% + \ifblank{#7}{}{\space\detokenize{#7}}% + \ifblank{#3}{}{\bbx@mksublabel{given}\detokenize{#3}}% + \ifblank{#1}{}{\bbx@mksublabel{family}\detokenize{#1}}% + \ifblank{#5}{}{\bbx@mksublabel{prefix}\detokenize{#5}}% + \ifblank{#7}{}{\bbx@mksublabel{affix}\detokenize{#7}}% + \bbx@mksublabel{inits}% + \ifblank{#4}{}{\detokenize{#4}\space}% + \ifblank{#6}{}{\detokenize{#6}\ifpunctmark{'}{}{\space}}% + \detokenize{#2}% + \ifblank{#8}{}{\space\detokenize{#8}}}} + {\DeclareNameFormat{debug}{% + \nameparts{#1}% + \bbx@mklabel{\currentname}% + \ifdefvoid{\namepartgiven}{}{\expandafter\detokenize\expandafter{\namepartgiven}\space}% + \ifdefvoid{\namepartprefix}{}{\expandafter\detokenize\expandafter{\namepartprefix}\ifpunctmark{'}{}{\space}}% + \expandafter\detokenize\expandafter{\namepartfamily}% + \ifdefvoid{\namepartsuffix}{}{\expandafter\space\expandafter\detokenize\expandafter{\namepartsuffix}}% + \ifdefvoid{\namepartgiven}{}{\bbx@mksublabel{given}\expandafter\detokenize\expandafter{\namepartgiven}}% + \ifdefvoid{\namepartfamily}{}{\bbx@mksublabel{family}\expandafter\detokenize\expandafter{\namepartfamily}}% + \ifdefvoid{\namepartprefix}{}{\bbx@mksublabel{prefix}\expandafter\detokenize\expandafter{\namepartprefix}}% + \ifdefvoid{\namepartsuffix}{}{\bbx@mksublabel{suffix}\expandafter\detokenize\expandafter{\namepartsuffix}}% + \bbx@mksublabel{inits}% + \ifdefvoid{\namepartgiveni}{}{\expandafter\detokenize\expandafter{\namepartgiveni}\space}% + \ifdefvoid{\namepartprefixi}{}{\expandafter\detokenize\expandafter{\namepartprefixi}\ifpunctmark{'}{}{\space}}% + \expandafter\detokenize\expandafter{\namepartfamilyi}% + \ifdefvoid{\namepartsuffixi}{}{\expandafter\space\expandafter\detokenize\expandafter{\namepartsuffixi}}}} \DeclareListFormat{debug}{% \bbx@mklabel{\currentlist}% diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx index ddbd31b81c0..02299df2a6a 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{subentry}[true]{% +\DeclareBibliographyOption[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 f571a5a633c..6e9e25be2d1 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{entryhead}[true]{% +\DeclareBibliographyOption[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{entrykey}[true]{% +\DeclareBibliographyOption[boolean]{entrykey}[true]{% \setbool{bbx:entrykey}{#1}} -\DeclareBibliographyOption{annotation}[true]{% +\DeclareBibliographyOption[boolean]{annotation}[true]{% \setbool{bbx:annotation}{#1}} -\DeclareBibliographyOption{abstract}[true]{% +\DeclareBibliographyOption[boolean]{abstract}[true]{% \setbool{bbx:abstract}{#1}} -\DeclareBibliographyOption{library}[true]{% +\DeclareBibliographyOption[boolean]{library}[true]{% \setbool{bbx:library}{#1}} -\DeclareBibliographyOption{file}[true]{% +\DeclareBibliographyOption[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 f81dd4aaaad..c1d480d4d70 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{isbn}[true]{% +\DeclareBibliographyOption[boolean]{isbn}[true]{% \settoggle{bbx:isbn}{#1}} -\DeclareBibliographyOption{url}[true]{% +\DeclareBibliographyOption[boolean]{url}[true]{% \settoggle{bbx:url}{#1}} -\DeclareBibliographyOption{doi}[true]{% +\DeclareBibliographyOption[boolean]{doi}[true]{% \settoggle{bbx:doi}{#1}} -\DeclareBibliographyOption{eprint}[true]{% +\DeclareBibliographyOption[boolean]{eprint}[true]{% \settoggle{bbx:eprint}{#1}} -\DeclareBibliographyOption{related}[true]{% +\DeclareBibliographyOption[boolean]{related}[true]{% \settoggle{bbx:related}{#1}} \ExecuteBibliographyOptions{isbn,url,doi,eprint,related} diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty index 2effcae5d26..3271b7b39a5 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty @@ -3,8 +3,8 @@ %% % Set up the version strings here, so they are the same for both branches -\def\abx@date{2015/12/22} -\def\abx@version{3.2} +\def\abx@date{2016/03/03} +\def\abx@version{3.3} \def\abx@bbxid{\abx@date\space v\abx@version\space biblatex bibliography style (PK/JW/AB)} \def\abx@cbxid{\abx@date\space v\abx@version\space biblatex citation style (PK/JW/AB)} \def\abx@lbxid{\abx@date\space v\abx@version\space biblatex localization (PK/JW/AB)} @@ -12,18 +12,18 @@ % This is not updated by build script as the controlfile version % does not necessarily change with the package version. % This is used when writing the .bcf -\def\blx@bcfversion{2.9} +\def\blx@bcfversion{3.0} % 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{2.5} +\def\blx@bblversion{2.6} \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{biblatex} [\abx@date\space v\abx@version\space programmable bibliographies (PK/JW/AB)] % Set up a switch for choosing the version -\newif\ifblx@load@version@one +\newif\ifblx@load@version@legacy % A switch so we can issue a message about the backend \newif\ifblx@load@backend@seen @@ -31,31 +31,31 @@ % Fake keyval options to detect the backend % All basically the same, so passing the backend is done simply \DeclareOption{backend=bibtex}{% - \PassOptionsToPackage{\CurrentOption}{biblatex1}% - \blx@load@version@onetrue + \PassOptionsToPackage{\CurrentOption}{biblatex_legacy}% + \blx@load@version@legacytrue \blx@load@backend@seentrue } \DeclareOption{backend=bibtex8}{% - \PassOptionsToPackage{\CurrentOption}{biblatex1}% - \blx@load@version@onetrue + \PassOptionsToPackage{\CurrentOption}{biblatex_legacy}% + \blx@load@version@legacytrue \blx@load@backend@seentrue } \DeclareOption{backend=bibtexu}{% - \PassOptionsToPackage{\CurrentOption}{biblatex1}% - \blx@load@version@onetrue + \PassOptionsToPackage{\CurrentOption}{biblatex_legacy}% + \blx@load@version@legacytrue \blx@load@backend@seentrue } \DeclareOption{backend=biber}{% - \blx@load@version@onefalse + \blx@load@version@legacyfalse \blx@load@backend@seentrue } \DeclareOption*{% - \PassOptionsToPackage{\CurrentOption}{biblatex1}% - \PassOptionsToPackage{\CurrentOption}{biblatex2}% + \PassOptionsToPackage{\CurrentOption}{biblatex_legacy}% + \PassOptionsToPackage{\CurrentOption}{biblatex_}% } % Default to the Biber backend -\blx@load@version@onefalse +\blx@load@version@legacyfalse \ProcessOptions\relax \ifblx@load@backend@seen @@ -70,25 +70,16 @@ % Now do the loading: avoid any awkward stuff with the conditional by % expanding first -\ifblx@load@version@one +\ifblx@load@version@legacy \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi - {% - % A few things not defined by v1 so has to be handled if using v1 - \protected\long\def\DeclareDriverSourcemap[#1]#2{}% - \protected\long\def\DeclareLabelalphaTemplate#1{}% - \protected\long\def\DeclareLabeltitle#1{}% - \protected\long\def\DeclareLabelname#1{}% - \protected\long\def\DeclareLabeldate#1{}% - \protected\long\def\abx@dointernalfields{}% - \RequirePackage{biblatex1}% - } - {\RequirePackage{biblatex2}} + {\RequirePackage{biblatex_legacy}} + {\RequirePackage{biblatex_}} %% Copyright (C) 2006-2011 Philipp Lehman -%% 2012-2014 Philip Kime, Audrey Boruvka, Joseph Wright +%% 2012-2016 Philip Kime, Audrey Boruvka, Joseph Wright %% %% It may be distributed and/or modified under the conditions of %% the LaTeX Project Public License (LPPL), either version 1.3c of diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.def b/Master/texmf-dist/tex/latex/biblatex/biblatex_.def index 51414258a7d..1ac6cc1f723 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex.def +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex_.def @@ -1,5 +1,5 @@ % -*- mode: LaTeX -*- -\ProvidesFile{biblatex.def} +\ProvidesFile{biblatex_.def} % ------------------------------------------------------------------ % FORMATTING COMMANDS @@ -10,10 +10,19 @@ % Used in citations, bibliography and bibliography lists -\newcommand*{\mkbibnamefirst}[1]{#1} -\newcommand*{\mkbibnamelast}[1]{#1} -\newcommand*{\mkbibnameprefix}[1]{#1} -\newcommand*{\mkbibnameaffix}[1]{#1} +% Define namepart keys from datamodel constant list +% \namepart<namepart> - e.g. \namepartfamily +% \namepart<namepart>i - e.g. \namepartfamilyi +\def\nameparts#1{\setkeys{blx@opt@namepart}{#1}} +\def\do#1{% + \csdef{mkbibname#1}##1{##1}% + \define@key{blx@opt@namepart}{#1}{\csdef{namepart#1}{##1}}% + \define@key{blx@opt@namepart}{#1_i}{\csdef{namepart#1i}{##1}}} +\expandafter\docsvlist\expandafter{\blx@datamodel@constant@nameparts} + +\newcommand*{\mkbibnamefirst}[1]{#1}% legacy alias +\newcommand*{\mkbibnamelast}[1]{#1}% legacy alias +\newcommand*{\mkbibnameaffix}[1]{#1}% legacy alias \newcommand*{\bibellipsis}{[\textellipsis\unkern]\midsentence} % Delimiters used in citations, bibliography and bibliography lists @@ -38,8 +47,10 @@ \newcommand*{\supercitedelim}{\addcomma} \newcommand*{\prenotedelim}{\addspace} \newcommand*{\postnotedelim}{\addcomma\space} +\newcommand*{\extpostnotedelim}{\addspace} \newcommand*{\nametitledelim}{\addcomma\space} \newcommand*{\nameyeardelim}{\addspace} +\newcommand*{\nonameyeardelim}{\addspace} \newcommand*{\volcitedelim}{\addcomma\space} \newcommand*{\textcitedelim}{% \iffinalcitedelim @@ -267,7 +278,7 @@ % Style of compressed page ranges in back references -\DeclareBibliographyOption{backrefstyle}{% +\DeclareBibliographyOption[string]{backrefstyle}{% \ifcsdef{abx@opt@pagerefstyle@#1} {\letcs\abx@pagerefstyle{abx@opt@pagerefstyle@#1}} {\PackageError{biblatex} @@ -290,7 +301,7 @@ % pdf = PDF version % format = format selector -\DeclareBibliographyOption{arxiv}{\def\abx@arxivpath{#1}} +\DeclareBibliographyOption[string]{arxiv}{\def\abx@arxivpath{#1}} \newcommand*{\abx@arxivpath}{abs} % ------------------------------------------------------------------ @@ -661,52 +672,84 @@ % NAME LIST FORMATS % ------------------------------------------------------------------ -% Argments passed to formatting directives for name lists: -% -% #1 = last name -% #2 = last name (initials) -% #3 = first name -% #4 = first name (initials) -% #5 = name prefix, a.k.a. 'von part' -% #6 = name prefix (initials) -% #7 = name affix, a.k.a. 'junior part' -% #8 = name affix (initials) - % Formatting directives for name lists % ------------------------------------------------------------------ -\DeclareNameFormat{first-last}{% - \iffirstinits - {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}} - {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}% +\DeclareNameAlias{first-last}{given-family}% legacy alias +\DeclareNameFormat{given-family}{% + \nameparts{#1}% + \ifgiveninits + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefix} + {\namepartsuffix}} + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}}% \usebibmacro{name:andothers}} -\DeclareNameFormat{last-first}{% - \iffirstinits - {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}} - {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}% +\DeclareNameAlias{last-first}{family-given}% legacy alias +\DeclareNameFormat{family-given}{% + \nameparts{#1}% + \ifgiveninits + {\usebibmacro{name:family-given} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefix} + {\namepartsuffix}} + {\usebibmacro{name:family-given} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}}% \usebibmacro{name:andothers}} -\DeclareNameFormat{last-first/first-last}{% +\DeclareNameAlias{last-first/first-last}{family-given/given-family}% legacy aliAs +\DeclareNameFormat{family-given/given-family}{% + \nameparts{#1}% \ifnumequal{\value{listcount}}{1} - {\iffirstinits - {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}} - {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}% - \ifblank{#3#5} + {\ifgiveninits + {\usebibmacro{name:family-given} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefix} + {\namepartsuffix}} + {\usebibmacro{name:family-given} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}}% + \ifempty{\namepartgiven\namepartprefix} {} {\usebibmacro{name:revsdelim}}} - {\iffirstinits - {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}} - {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}% + {\ifgiveninits + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefix} + {\namepartsuffix}} + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}}}% \usebibmacro{name:andothers}} \DeclareNameFormat{initsonly}{% - \usebibmacro{name:first-last}{#2}{#4}{#6}{#8}% + \nameparts{#1}% + \usebibmacro{name:given-family} + {\namepartfamilyi} + {\namepartgiveni} + {\namepartprefixi} + {\namepartsuffixi}% \usebibmacro{name:andothers}} % Fallback used by \printnames -\DeclareNameAlias{default}{first-last} +\DeclareNameAlias{default}{given-family} % Default used by \citename @@ -715,20 +758,37 @@ % Used in some citations \DeclareNameFormat{labelname}{% + \nameparts{#1}% \ifcase\value{uniquename}% - \usebibmacro{name:last}{#1}{#3}{#5}{#7}% + \usebibmacro{name:family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% \or \ifuseprefix - {\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}} - {\usebibmacro{name:first-last}{#1}{#4}{#6}{#8}}% + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefix} + {\namepartsuffixi}} + {\usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiveni} + {\namepartprefixi} + {\namepartsuffixi}}% \or - \usebibmacro{name:first-last}{#1}{#3}{#5}{#7}% + \usebibmacro{name:given-family} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% \fi \usebibmacro{name:andothers}} % Used in the bibliography -\DeclareNameAlias{sortname}{last-first/first-last} +\DeclareNameAlias{sortname}{family-given/given-family} \DeclareNameAlias{author}{default} \DeclareNameAlias{bookauthor}{author} @@ -758,11 +818,11 @@ % Auxiliary macros for name formatting directives % ------------------------------------------------------------------ -\newbibmacro*{name:last}[4]{% +\newbibmacro*{name:family}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% - \ifblank{#3} + \ifempty{#3} {} {\ifcapital {\mkbibnameprefix{\MakeCapital{#3}}\isdot} @@ -770,39 +830,51 @@ \ifprefchar{}{\bibnamedelimc}}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}}% - \mkbibnamelast{#1}\isdot}% + \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}} -\newbibmacro*{name:first-last}[4]{% +\newbibmacro*{name:given-family}[4]{% \usebibmacro{name:delim}{#2#3#1}% \usebibmacro{name:hook}{#2#3#1}% - \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}% - \ifblank{#3}{}{% + \ifempty{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}% + \ifempty{#3}{}{% \mkbibnameprefix{#3}\isdot - \ifprefchar{} + \ifprefchar {} {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% - \mkbibnamelast{#1}\isdot - \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}} - -\newbibmacro*{name:last-first}[4]{% + \mkbibnamefamily{#1}\isdot + \ifempty{#4}{}{\bibnamedelimd\mkbibnameaffix{#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}} + +\newbibmacro*{name:family-given}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% - \ifblank{#3}{}{% + \ifempty{#3}{}{% \ifcapital {\mkbibnameprefix{\MakeCapital{#3}}\isdot} {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% - \mkbibnamelast{#1}\isdot - \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% - \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{#2}\isdot}} + \mkbibnamefamily{#1}\isdot + \ifempty{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% + \ifempty{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% - \mkbibnamelast{#1}\isdot - \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% - \ifblank{#2#3}{}{\revsdnamepunct}% - \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}% - \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}} + \mkbibnamefamily{#1}\isdot + \ifempty{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% + \ifempty{#2#3}{}{\revsdnamepunct}% + \ifempty{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% + \ifempty{#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'}% + \usebibmacro{name:family-given}{#1}{#2}{#3}{#4}} \newbibmacro*{name:hook}[1]{% \ifnumequal{\value{listcount}}{1} @@ -891,24 +963,19 @@ % INDEX FORMATS FOR NAME LISTS % ------------------------------------------------------------------ -% Argments passed to indexing directives for name lists: -% -% #1 = last name -% #2 = last name (initials) -% #3 = first name -% #4 = first name (initials) -% #5 = name prefix, a.k.a 'von part' -% #6 = name prefix (initials) -% #7 = name affix, a.k.a 'junior part' -% #8 = name affix (initials) - % Indexing directives for name lists % ------------------------------------------------------------------ % The fallback used by \indexnames \DeclareIndexNameFormat{default}{% - \usebibmacro{index:name}{\index}{#1}{#3}{#5}{#7}} + \nameparts{#1}% + \usebibmacro{index:name} + {\index} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}} % Used in citations @@ -925,15 +992,13 @@ % When generating an index entry, we need to test which parts of a % name are actually available to prevent spurious punctuation and -% spaces. Since those parts which are not available yield an empty -% argument, we can use the \ifblank test from etoolbox.sty to analyze -% the name. +% spaces. % % Note that the standard LaTeX \index command simply writes its % argument to the .idx file without preventing expansion. This means -% that all \ifblank tests are expanded on the way and will not end +% that all \ifblank etc. tests are expanded on the way and will not end % up in the index. The index package, however, prevents expansion. -% This would lead to \ifblank ending up in the .idx file. To avoid +% This would lead to \ifblank etc. ending up in the .idx file. To avoid % that, we preprocess the index entry inside an \edef. We use % \unexpanded to protect the \index command and the actual data from % expansion. This definition will work with both index.sty and the @@ -953,7 +1018,7 @@ \newbibmacro*{index:name}[5]{% \usebibmacro{index:entry}{#1}{\mkbibindexname{#2}{#3}{#4}{#5}}} -% {<last name>}{<first name>}{<first initials>}{<last name prefix>} +% {<family name>}{<given name>}{<given initials>}{<family name prefix>} \newcommand*{\mkbibindexname}[4]{% \ifuseprefix @@ -1029,129 +1094,6 @@ } } -\DeclareDriverSourcemap[datatype=endnotexml]{ - \map{ - \step[typesource={Aggregated Database}, typetarget=misc] - \step[typesource={Ancient Text}, typetarget=misc] - \step[typesource=Artwork, typetarget=artwork] - \step[typesource={Audiovisual Material}, typetarget=misc] - \step[typesource=Bill, typetarget=jurisdiction] - \step[typesource=Blog, typetarget=online] - \step[typesource=Book, typetarget=book] - \step[typesource={Book Section}, typetarget=inbook] - \step[typesource=Case, typetarget=jurisdiction] - \step[typesource=Catalog, typetarget=misc] - \step[typesource={Chart or Table}, typetarget=misc] - \step[typesource={Classical Work}, typetarget=misc] - \step[typesource={Computer Program}, typetarget=software] - \step[typesource={Conference Paper}, typetarget=inproceedings] - \step[typesource={Conference Proceedings}, typetarget=proceedings] - \step[typesource=Dictionary, typetarget=inreference] - \step[typesource={Edited Book}, typetarget=collection] - \step[typesource={Electronic Article}, typetarget=article] - \step[typesource={Electronic Book}, typetarget=book] - \step[typesource={Encyclopedia}, typetarget=reference] - \step[typesource=Equation, typetarget=misc] - \step[typesource=Figure, typetarget=misc] - \step[typesource={Film or Broadcast}, typetarget=movie] - \step[typesource={Government Document}, typetarget=report] - \step[typesource=Grant, typetarget=misc] - \step[typesource=Hearing, typetarget=jurisdiction] - \step[typesource={Journal Article}, typetarget=article] - \step[typesource={Legal Rule or Regulation}, typetarget=legislation] - \step[typesource={Magazine Article}, typetarget=article] - \step[typesource=Manuscript, typetarget=unpublished] - \step[typesource=Map, typetarget=misc] - \step[typesource={Newspaper Article}, typetarget=article] - \step[typesource={Online Database}, typetarget=online] - \step[typesource={Online Multimedia}, typetarget=online] - \step[typesource=Pamphlet, typetarget=booklet] - \step[typesource=Patent, typetarget=patent] - \step[typesource={Personal Communication}, typetarget=letter] - \step[typesource=Report, typetarget=report] - \step[typesource=Serial, typetarget=periodical] - \step[typesource=Standard, typetarget=standard] - \step[typesource=Statute, typetarget=legislation] - \step[typesource=Thesis, typetarget=thesis] - \step[typesource={Unpublished Work}, typetarget=unpublished] - \step[typesource={Web Page}, typetarget=online] - } - \map{ - \step[fieldsource={electronic-resource-num}, fieldtarget=eprint] - \step[fieldsource={alt-title}, fieldtarget=shorttitle] - \step[fieldsource={meeting-place}, fieldtarget=venue] - \step[fieldsource={pub-location}, fieldtarget=location] - \step[fieldsource={orig-pub}, fieldtarget=origpublisher] - \step[fieldsource={authors}, fieldtarget=author] - \step[fieldsource={secondary-authors}, fieldtarget=editor] - \step[fieldsource={tertiary-authors}, fieldtarget=commentator] - \step[fieldsource={subsidiary-authors}, fieldtarget=translator] - \step[fieldsource={year}, fieldtarget=date] - \step[fieldsource={pub-dates}, fieldtarget=date] - \step[fieldsource={num-vols}, fieldtarget=volumes] - \step[fieldsource={call-num}, fieldtarget=library] - \step[fieldsource={notes}, fieldtarget=note] - \step[fieldsource={secondary-title}, fieldtarget=subtitle] - \step[fieldsource={work-type}, fieldtarget=type] - } - \map{ - \pertype{Edited Book} - \step[fieldsource=contributors/authors, fieldtarget=contributors/editor] - } - \map{ - \pertype{Electronic Article} - \pertype{Journal Article} - \pertype{Magazine Article} - \pertype{Newspaper Article} - \step[fieldsource=isbn, fieldtarget=issn] - } - \map{ - \pertype{Patent} - \pertype{Report} - \pertype{Government Document} - \pertype{Legal Rule or Regulation} - \step[fieldsource=isbn, fieldtarget=number] - } - \map{ - \pertype{Blog} - \pertype{Online Database} - \pertype{Online Multimedia} - \pertype{Web Page} - \step[fieldsource={titles/secondary-title}, fieldtarget={titles/title}] - } - \map{ - \pertype{Book Section} - \step[fieldsource={titles/secondary-title}, fieldtarget={titles/booktitle}] - } - \map{ - \pertype{Book} - \pertype{Electronic Book} - \pertype{Manuscript} - \pertype{Unpublished Work} - \step[fieldsource={titles/secondary-title}, fieldtarget={titles/series}] - } - \map{ - \pertype{Conference Paper} - \pertype{Conference Proceedings} - \step[fieldsource={titles/secondary-title}, fieldtarget={titles/eventtitle}] - } - \map{ - \pertype{Electronic Article} - \pertype{Journal Article} - \pertype{Magazine Article} - \pertype{Newspaper Article} - \step[fieldsource={titles/secondary-title}, fieldtarget={titles/journaltitle}] - } - \map{ - \pertype{Book Section} - \step[fieldsource={titles/tertiary-title}, fieldtarget={titles/booktitle}] - } - \map{ - \pertype{Conference Proceedings} - \pertype{periodical} - \step[fieldsource={titles/tertiary-title}, fieldtarget={titles/series}] - } -} \DeclareDriverSourcemap[datatype=ris]{ \map{ \step[typesource=ART, typetarget=artwork] @@ -1211,109 +1153,6 @@ \step[fieldsource=L1, fieldtarget=file] } } -\DeclareDriverSourcemap[datatype=zoterordfxml]{ - \map{ - \step[typesource=conferencePaper, typetarget=inproceedings] - \step[typesource=bookSection, typetarget=inbook] - \step[typesource=journalArticle, typetarget=article] - \step[typesource=magazineArticle, typetarget=article] - \step[typesource=newspaperArticle, typetarget=article] - \step[typesource=encyclopediaArticle, typetarget=inreference] - \step[typesource=manuscript, typetarget=unpublished] - \step[typesource=document, typetarget=misc] - \step[typesource=dictionaryEntry, typetarget=inreference] - \step[typesource=interview, typetarget=misc] - \step[typesource=film, typetarget=movie] - \step[typesource=webpage, typetarget=online] - \step[typesource=note, typetarget=misc] - \step[typesource=attachment, typetarget=misc] - \step[typesource=bill, typetarget=legislation] - \step[typesource=case, typetarget=jurisdiction] - \step[typesource=hearing, typetarget=jurisdiction] - \step[typesource=statute, typetarget=legislation] - \step[typesource=email, typetarget=letter] - \step[typesource=map, typetarget=image] - \step[typesource=blogPost, typetarget=online] - \step[typesource=instantMessage, typetarget=letter] - \step[typesource=forumPost, typetarget=online] - \step[typesource=audioRecording, typetarget=audio] - \step[typesource=presentation, typetarget=inproceedings] - \step[typesource=videoRecording, typetarget=video] - \step[typesource=tvBroadcast, typetarget=misc] - \step[typesource=radioBroadcast, typetarget=misc] - \step[typesource=podcast, typetarget=online] - \step[typesource=computerProgram, typetarget=software] - } - \map{ - \step[fieldsource=bib:contributors, fieldtarget=author] - \step[fieldsource=bib:authors, fieldtarget=author] - \step[fieldsource=z:interviewers, fieldtarget=author] - \step[fieldsource=z:directors, fieldtarget=author] - \step[fieldsource=z:scriptwriters, fieldtarget=author] - \step[fieldsource=z:bookAuthor, fieldtarget=author] - \step[fieldsource=z:inventors, fieldtarget=author] - \step[fieldsource=z:recipients, fieldtarget=author] - \step[fieldsource=z:counsels, fieldtarget=author] - \step[fieldsource=z:artists, fieldtarget=author] - \step[fieldsource=z:podcasters, fieldtarget=author] - \step[fieldsource=z:presenters, fieldtarget=author] - \step[fieldsource=z:commenters, fieldtarget=author] - \step[fieldsource=z:programers, fieldtarget=author] - \step[fieldsource=z:composers, fieldtarget=author] - \step[fieldsource=z:producers, fieldtarget=author] - \step[fieldsource=z:performers, fieldtarget=author] - \step[fieldsource=bib:editors, fieldtarget=editor] - \step[fieldsource=z:translators, fieldtarget=translator] - \step[fieldsource=z:seriesEditors, fieldtarget=editor] - \step[fieldsource=dc:date, fieldtarget=date] - \step[fieldsource=bib:pages, fieldtarget=pages] - \step[fieldsource=dc:title, fieldtarget=title] - \step[fieldsource=z:proceedingsTitle, fieldtarget=title] - \step[fieldsource=z:encyclopediaTitle, fieldtarget=title] - \step[fieldsource=z:dictionaryTitle, fieldtarget=title] - \step[fieldsource=z:websiteTitle, fieldtarget=title] - \step[fieldsource=z:forumTitle, fieldtarget=title] - \step[fieldsource=z:blogTitle, fieldtarget=title] - \step[fieldsource=z:nameOfAct, fieldtarget=title] - \step[fieldsource=z:caseName, fieldtarget=title] - \step[fieldsource=z:meetingName, fieldtarget=eventtitle] - \step[fieldsource=prism:volume, fieldtarget=volume] - \step[fieldsource=numberOfVolumes, fieldtarget=volumes] - \step[fieldsource=z:numPages, fieldtarget=pagetotal] - \step[fieldsource=prism:edition, fieldtarget=edition] - \step[fieldsource=dc:description, fieldtarget=note] - \step[fieldsource=dc:alternative, fieldtarget=shortjournal] - \step[fieldsource=dcterms:abstract, fieldtarget=abstract] - \step[fieldsource=dc:type, fieldtarget=type] - \step[fieldsource=z:shortTitle, fieldtarget=shorttitle] - \step[fieldsource=z:bookTitle, fieldtarget=booktitle] - \step[fieldsource=prism:number, fieldtarget=number] - \step[fieldsource=z:patentNumber, fieldtarget=number] - \step[fieldsource=z:codeNumber, fieldtarget=number] - \step[fieldsource=z:reportNumber, fieldtarget=number] - \step[fieldsource=z:billNumber, fieldtarget=number] - \step[fieldsource=z:documentNumber, fieldtarget=number] - \step[fieldsource=z:publicLawNumber, fieldtarget=number] - \step[fieldsource=z:applicationNumber, fieldtarget=number] - \step[fieldsource=z:episodeNumber, fieldtarget=number] - \step[fieldsource=dc:coverage, fieldtarget=location] - \step[fieldsource=z:university, fieldtarget=institution] - \step[fieldsource=z:language, fieldtarget=language] - \step[fieldsource=z:version, fieldtarget=version] - \step[fieldsource=z:libraryCatalog, fieldtarget=library] - \step[fieldsource=dcterms:isPartOf, fieldtarget=BIBERCUSTOMpartof] - \step[fieldsource=dc:identifier, fieldtarget=BIBERCUSTOMidentifier] - \step[fieldsource=dc:publisher, fieldtarget=BIBERCUSTOMpublisher] - \step[fieldsource=dc:presentedAt, fieldtarget=BIBERCUSTOMpresentedat] - \step[fieldsource=dc:subject, fieldtarget=BIBERCUSTOMsubject] - \step[fieldsource={dcterms:BIBERCUSTOMpartof/bib:Journal}, - fieldtarget={dcterms:BIBERCUSTOMpartof/periodical}] - \step[fieldsource={dcterms:BIBERCUSTOMpartof/bib:Book}, - fieldtarget={dcterms:BIBERCUSTOMpartof/book}] - \step[fieldsource={dcterms:BIBERCUSTOMpartof/bib:ConferenceProceedings}, - fieldtarget={dcterms:BIBERCUSTOMpartof/proceedings}] - } -} % ------------------------------------------------------------------ % META-FIELDS @@ -1360,6 +1199,24 @@ % SORTING % ------------------------------------------------------------------ +\DeclareSortingNamekeyScheme{ + \keypart{ + \namepart[use=true]{prefix} + } + \keypart{ + \namepart{family} + } + \keypart{ + \namepart{given} + } + \keypart{ + \namepart{suffix} + } + \keypart{ + \namepart[use=false]{prefix} + } +} + \DeclarePresort{mm} \DeclareSortingScheme{shorthand}{ diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex_.sty index 75d6b1a3372..0bc186ad0f0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex_.sty @@ -1,4 +1,5 @@ % Copyright (c) 2006-2011 Philipp Lehman. +% 2012-2016 Philip Kime, Audrey Boruvka, Joseph Wright % % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License @@ -10,7 +11,7 @@ % particular purpose. \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{biblatex2} +\ProvidesPackage{biblatex_} [\abx@date\space v\abx@version\space programmable bibliographies (biber) (PK/JW/AB)] %% Dependencies @@ -31,6 +32,12 @@ This is a fatal error. I'm aborting now.}% \endinput} +% Tests for emptiness, regardless whether the arg is macro or literal +% Expand everything and test as string +\def\ifempty#1{% + \edef\z{#1}% + \expandafter\ifblank\expandafter{\z}} + %% Category codes \def\blx@docatcodes{% @@ -475,8 +482,8 @@ \newtoggle{blx@loadfiles} \newtoggle{blx@singletitle} \newtoggle{blx@terseinits} -\newtoggle{blx@firstinits} -\newtoggle{blx@sortfirstinits} +\newtoggle{blx@giveninits} +\newtoggle{blx@sortgiveninits} \newtoggle{blx@useprefix} \newtoggle{blx@addset} \newtoggle{blx@setonly} @@ -506,14 +513,14 @@ \dolistcsloop{abx@rnames}% } -% Option scope trackers for passing to .bcf -\global\let\blx@globalopts\@empty -\global\let\blx@typeopts\@empty -\global\let\blx@entryopts\@empty +% Used to track sorting name key specifications +\global\let\blx@biber@sortingnamekeyspecs\@empty % Initialise some lists which track changing citations/sortschemes % etc. between runs \global\let\blx@cites\@empty +\global\let\blx@sortnamekeyschemes\@empty +\global\let\blx@lastsortnamekeyschemes\@empty \global\let\blx@sortschemes\@empty \global\let\blx@lastsortschemes\@empty \global\let\blx@biblists\@empty @@ -532,18 +539,10 @@ \do\blx@onlypreamble} %% Initialization - \def\blx@blxinit{% \let\blx@blxinit\relax \blx@initunit} -\newcommand*{\labelalphaothers}{+} -\newcommand*{\sortalphaothers}{\labelalphaothers} -\listadd\blx@globalopts{alphaothers}% for passing to the .bcf -\listadd\blx@typeopts{alphaothers}% for passing to the .bcf -\listadd\blx@globalopts{sortalphaothers}% for passing to the .bcf -\listadd\blx@typeopts{sortalphaothers}% for passing to the .bcf - \def\blx@secinit{% \csgdef{blx@sections@\the\c@refsection}{true}% just to say we have a section for tests later \ifcsundef{blx@bsee@\the\c@refsection} @@ -769,7 +768,6 @@ \edef\blx@ver@bcf{% \detokenize{<bcf:controlfile version="}\blx@bcfversion \detokenize{" xmlns:bcf="https://sourceforge.net/projects/biblatex">}} -\listadd\blx@globalopts{controlversion}% for passing to the .bcf % {<true>}{<false>} \newrobustcmd*{\lbx@ifutfinput}{\ifboolexpr{% @@ -966,6 +964,9 @@ \def\blx@warn@conflopt#1{% \blx@warning{Conflicting options.\MessageBreak#1}} +\def\blx@warn@badoptdt#1{% + \blx@warning{Invalid option datatype '#1'.\MessageBreak Defaulting to 'boolean'}} + \def\blx@warn@depropt#1{% \blx@warning{Deprecated option.\MessageBreak Ignoring '#1'}} @@ -995,7 +996,8 @@ \def\blx@msg@cundefon#1{% Citation '#1' on page \the\c@page\space undefined} -% Dummy as biblatex 2 is biber only. Some style may still use this though. +% Dummy as backend is biber by default. Some style may still use this to +% check though. \newrobustcmd*{\RequireBiber}[1][2]{} % \blx@list@active active aux files (basename) @@ -1741,56 +1743,6 @@ \expandafter\noexpand\csname blx@bbx@#2\endcsname}} \@onlypreamble\DeclareBibliographyAlias -% {<key>}[<value>]{<code>} -\newrobustcmd*{\DeclareBibliographyOption}[1]{% - \ifinlist{#1}\blx@globalopts - {} - {\listadd\blx@globalopts{#1}}% - \@ifnextchar[%] - {\blx@defbibopt{#1}} - {\blx@defbibopt{#1}[]}} - -\long\def\blx@defbibopt#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}}} - -% {<key>}[<value>]{<code>} -\newrobustcmd*{\DeclareTypeOption}[1]{% - \ifinlist{#1}\blx@typeopts - {} - {\listadd\blx@typeopts{#1}}% - \@ifnextchar[%] - {\blx@deftypeopt{#1}} - {\blx@deftypeopt{#1}[]}} - -\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}}} - -% {<key>}[<value>]{<code>} -\newrobustcmd*{\DeclareEntryOption}[1]{% - \ifinlist{#1}\blx@entryopts - {} - {\listadd\blx@entryopts{#1}}% - \@ifnextchar[%] - {\blx@defentryopt{#1}} - {\blx@defentryopt{#1}[]}} - -\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}}} - %% Auxiliary commands \newrobustcmd*{\citereset}{% \csuse{blx@hook@cbxinit}% @@ -1904,9 +1856,21 @@ % {<plainlist>} \def\blx@imc@thelist#1{\csuse{abx@list@#1}} +\def\blx@imc@strlist#1{% + \ifcsdef{abx@list@#1} + {\detokenize\expandafter\expandafter\expandafter + {\csname abx@list@#1\endcsname}} + {}} + % {<namelist>} \def\blx@imc@thename#1{\csuse{abx@name@#1}} +\def\blx@imc@strname#1{% + \ifcsdef{abx@name@#1} + {\detokenize\expandafter\expandafter\expandafter + {\csname abx@name@#1\endcsname}} + {}} + % {<field>} \protected\def\blx@imc@clearfield#1{% \csundef{abx@field@#1}} @@ -2015,11 +1979,12 @@ {\blx@ifnamesequal@iii#1% \blx@ifnamesequal@ii}} -\def\blx@ifnamesequal@iii#1#2#3#4#5#6#7#8#9{% +\def\blx@ifnamesequal@iii#1#2{% \setkeys{blx@opt@name}{#1}% + \setkeys{blx@opt@namepart}{#2}% \ifdef\abx@field@hash {\eappto\blx@tempa{{\abx@field@hash}}} - {\appto\blx@tempa{{{#2}{#4}{#6}{#8}}}}} + {\eappto\blx@tempa{{{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}}}} % {<field>}{<macro>}{<true>}{<false>} \def\blx@imc@iffieldequals#1#2{% @@ -3164,7 +3129,7 @@ \global\toggletrue{blx@block}} \blx@regimcs{% - \ifdriver \thefield \strfield \csfield \usefield \thelist \thename + \ifdriver \thefield \strfield \csfield \usefield \thelist \strlist \thename \strname \clearfield \clearlist \clearname \restorefield \restorelist \restorename \ifcategory \ifentrycategory \ifkeyword \ifentrykeyword \ifciteseen \ifentryseen \ifentryinbib \ifciteibid \ifciteidem \ifopcit \ifloccit @@ -3190,7 +3155,8 @@ \def\iffootnote{\iftoggle{blx@footnote}}% \def\ifuseprefix{\iftoggle{blx@useprefix}}% \def\ifterseinits{\iftoggle{blx@terseinits}}% - \def\iffirstinits{\iftoggle{blx@firstinits}}% + \def\iffirstinits{\iftoggle{blx@giveninits}}% legacy name for \ifgiveninits + \def\ifgiveninits{\iftoggle{blx@giveninits}}% \def\ifsingletitle{\iftoggle{abx@bool@singletitle}}% \def\ifandothers#1{\iftoggle{abx@bool@more#1}}% \protected\def\pno{\bibstring{page}}% @@ -3467,6 +3433,7 @@ \@ifstar {\blx@defformat\blx@defnameformat{nfd}*} {\blx@defformat\blx@defnameformat{nfd}{}}} + \newrobustcmd*{\DeclareIndexNameFormat}{% \@ifstar {\blx@defformat\blx@defnameformat{nid}*} @@ -3519,7 +3486,7 @@ \long\def\blx@defformat@d##1} \def\blx@defnameformat{% - \long\def\blx@defformat@d##1##2##3##4##5##6##7##8} + \long\def\blx@defformat@d##1} \def\blx@resetformat#1#2{% \let\blx@saved@do\do @@ -3716,12 +3683,19 @@ \c@uniquelist\z@ \ifblank{#1} {} - {\setkeys{blx@opt@name}{#1}}% + {\setkeys{blx@opt@namelist}{#1}}% \def\blx@thedata{#2}} -\define@key{blx@opt@name}{uniquelist}{\c@uniquelist#1\relax} +% 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}{sortnamekeyscheme}{\def\blx@refcontext@sortingnamekey{#1}} + +% Per-name options \define@key{blx@opt@name}{uniquename}{\c@uniquename#1\relax} \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}{sortnamekeyscheme}{\def\blx@refcontext@sortingnamekey{#1}} \newrobustcmd*{\bibinitperiod}{\adddot} \newrobustcmd*{\bibinitdelim}{\addnbspace} @@ -3777,6 +3751,11 @@ \ifblank{#1} {} {\setkeys{blx@opt@name}{#1}}% + % reset all the nameparts to empty between names + \def\do##1{% + \cslet{namepart##1}\@empty + \cslet{namepart##1i}\@empty}% + \expandafter\docsvlist\expandafter{\blx@datamodel@constant@nameparts}% \blx@theformat} \long\def\blx@namebreak#1&{} @@ -5072,6 +5051,119 @@ % Override with user-defined data model if there is one \blx@inputonce{biblatex-dm.cfg}{biblatex custom data model}{}{}{}{} +% Initialise option datatypes lists +\global\let\blx@bcf@options@scope@global\@empty +\global\let\blx@bcf@options@scope@type\@empty +\global\let\blx@bcf@options@scope@entry\@empty +\global\let\blx@bcf@options@scope@namelist\@empty +\global\let\blx@bcf@options@scope@name\@empty +\global\let\blx@globalopts@datatypes\@empty +\global\let\blx@typeopts@datatypes\@empty +\global\let\blx@entryopts@datatypes\@empty +\global\let\blx@namelistopts@datatypes\@empty +\global\let\blx@nameopts@datatypes\@empty +\def\do#1{% + \global\cslet{blx@globalopts@#1}\@empty + \global\cslet{blx@typeopts@#1}\@empty + \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} + +% Helper for collecting options and datatypes +% {<datatype>}{<scope>}{<name>} +\def\blx@collectopts#1#2#3{% + \ifinlistcs{#1}{#2@datatypes} + {} + {\listcsgadd{#2@datatypes}{#1}}% + \ifinlistcs{#3}{#2@#1} + {} + {\listcsgadd{#2@#1}{#3}}} + +% 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 + +% sortnamekeyscheme namelist/name scope +\blx@collectopts{string}{blx@namelistopts}{sortnamekeyscheme}% for passing to bcf +\blx@collectopts{string}{blx@nameopts}{sortnamekeyscheme}% 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 + +% 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@tempa{boolean}} + {\ifcsundef{blx@globalopts@#1} + {\blx@warn@badoptdt{#1}% + \def\blx@tempa{boolean}} + {\def\blx@tempa{#1}}}% + \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@globalopts}{#2}% + \@ifnextchar[%] + {\blx@defbibopt{#2}} + {\blx@defbibopt{#2}[]}} + +\long\def\blx@defbibopt#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}}} + +% [<datatype>]{<key>}[<value>]{<code>} +\newrobustcmd*{\DeclareTypeOption}[2][]{% + \ifblank{#1} + {\def\blx@tempa{boolean}} + {\ifcsundef{blx@typeopts@#1} + {\blx@warn@badoptdt{#1}% + \def\blx@tempa{boolean}} + {\def\blx@tempa{#1}}}% + \expandafter\blx@collectopts\expandafter{\blx@tempa}{blx@typeopts}{#2}% + \@ifnextchar[%] + {\blx@deftypeopt{#2}} + {\blx@deftypeopt{#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}}} + +% [<datatype>]{<key>}[<value>]{<code>} +\newrobustcmd*{\DeclareEntryOption}[2][]{% + \ifblank{#1} + {\def\blx@tempa{boolean}} + {\ifcsundef{blx@entryopts@#1} + {\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}[]}} + + \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}}} + % These are internal fields which are not part of the data model but % which need to be dealt with along with data model fields in places \def\abx@dointernalfields{% @@ -5100,7 +5192,6 @@ \def\abx@dobooleans{% \do{singletitle}} - % Name toggles like \ifauthor etc. need to be dynamically created for all % name datatypes in the data model and we have to do this here after the % datamodel is available. Need to be careful about expansions here as these @@ -5124,9 +5215,9 @@ \appto\blx@blxinit{\appto\blx@TE@hook{\blx@nametogglesite}} % Define \ifuse<name> options scope for biber -\def\do#1{\listadd\blx@globalopts{use#1}% - \listadd\blx@typeopts{use#1}% - \listadd\blx@entryopts{use#1}} +\def\do#1{\blx@collectopts{boolean}{blx@globalopts}{use#1}% + \blx@collectopts{boolean}{blx@typeopts}{use#1}% + \blx@collectopts{boolean}{blx@entryopts}{use#1}} \dolistcsloop{blx@biber@datamodel@names} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -5442,11 +5533,11 @@ \unexpanded{#1}\ifblank{#2}{}{=\unexpanded{#2}}}}} \def\blx@ifdata#1{% - \ifcsdef{blx@data@\the\c@refsection @\blx@refcontext@sorting @#1}} + \ifcsdef{blx@data@\the\c@refsection @\blx@refcontext@context @#1}} \let\blx@imc@ifentryinbib\blx@ifdata \def\blx@getdata#1{% - \csuse{blx@data@\the\c@refsection @\blx@refcontext@sorting @#1}% + \csuse{blx@data@\the\c@refsection @\blx@refcontext@context @#1}% % Here we resolve label* bib fields to their real fields. Doing this here % dynamically means that we can vary the field chosen depending on the refcontext. % biber used to resolve these and materialise them in the .bbl but this @@ -5554,6 +5645,17 @@ \csgdef{blx@keyalias@\the\c@refsection @#1}{\detokenize{#2}}% \listcsgadd{blx@keyaliases@\the\c@refsection}{#1}} +% blx@slist@list@<section>@<scheme> - a list of list items in a scheme in a +% section (for tracking bibliography lists, +% obeys skipbiblist) +% blx@slist@entry@<section>@<scheme> - a list of normal entries in a scheme in a +% section (for tracking bibliographies, +% obeys skipbib) +% blx@slist@centry@<section>@<scheme> - a list of normal entries in a scheme in a +% section (for tracking citations, +% obeys skipbib). Same as @entry@ but +% with added set children + % {<entrykey>}{<entrytype>}{<options>} \protected\def\blx@bbl@entry#1#2#3{% \begingroup @@ -5561,7 +5663,7 @@ \blx@setoptions@type{#2}% \blx@bbl@options{#3}% \blx@setoptions@entry - \edef\blx@bbl@data{blx@data@\the\c@refsection @\blx@slist@scheme @\abx@field@entrykey}% + \edef\blx@bbl@data{blx@data@\the\c@refsection @\blx@slist@name @\abx@field@entrykey}% \csuse\blx@bbl@data \blx@bbl@addfield{entrykey}{\abx@field@entrykey}% \blx@bbl@addfield{entrytype}{#2}% @@ -5575,20 +5677,26 @@ {} {\blx@addpageref{\abx@field@entrykey}}% \nottoggle{blx@setonly} - {\listcsxadd{blx@slists@\the\c@refsection @entry@\blx@slist@scheme}{\abx@field@entrykey}} + {} {\global\toggletrue{blx@addset}% \toggletrue{blx@skipbib}% \toggletrue{blx@skipbiblist}% \toggletrue{blx@skiplab}}% \nottoggle{blx@skipbib} - {\listcsxadd{blx@slistsbib@\the\c@refsection @entry@\blx@slist@scheme}{\abx@field@entrykey}% - \listcsxadd{blx@type@\the\c@refsection @\abx@field@entrytype}{\abx@field@entrykey}% - \ifdef\abx@field@entrysubtype - {\listcsxadd{blx@subt@\the\c@refsection @\abx@field@entrysubtype}{\abx@field@entrykey}} - {}} + {\expandafter\ifstrequal\expandafter{\blx@slist@type}{entry} + {\listcsxadd{blx@slist@entry@\the\c@refsection @\blx@slist@name}{\abx@field@entrykey}% + \listcsxadd{blx@slist@centry@\the\c@refsection @\blx@slist@name}{\abx@field@entrykey}% + \listcsxadd{blx@type@\the\c@refsection @\abx@field@entrytype}{\abx@field@entrykey}% + \ifdef\abx@field@entrysubtype + {\listcsxadd{blx@subt@\the\c@refsection @\abx@field@entrysubtype}{\abx@field@entrykey}} + {}} + {}}% {}% \nottoggle{blx@skipbiblist} - {\blx@bbl@labelfields} + {\expandafter\ifstrequal\expandafter{\blx@slist@type}{list} + {\blx@bbl@labelfields + \listcsxadd{blx@slist@\blx@slist@type @\the\c@refsection @\blx@slist@name}{\abx@field@entrykey}} + {}}% {}% \nottoggle{blx@skiplab} {\iftoggle{blx@labelnumber} @@ -5612,20 +5720,22 @@ \blx@bbl@hooks \endgroup} -% This, at the end of the .bbl, puts any set parents into the -% current context sort list of citations as this is needed for the subentry citing +% This, at the end of the .bbl, puts any set parent children into the +% current context sort list of citations (a separate list *@centry@* to the +% bibliography *@entry@* which doesn't want the children adding if they weren't +% cited) as this is needed for the subentry citing % when sortcites is enabled as for sortcites, the current context sorting list % is used and the parent set of a subentry is not necessarily % available in the current context sortlist. \def\blx@addset{% \begingroup - \letcs\blx@tempa{blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting}% - \global\cslet{blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting}\@empty + \letcs\blx@tempa{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}% + \global\cslet{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}\@empty \forlistloop\blx@addset@i\blx@tempa \endgroup} \def\blx@addset@i#1{% - \listcsgadd{blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting}{#1}% + \listcsgadd{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}{#1}% \ifcsdef{blx@setp@\the\c@refsection @#1} {\expandafter\expandafter\expandafter\forcsvlist \expandafter\expandafter\expandafter\blx@addset@ii @@ -5634,7 +5744,7 @@ {}} \def\blx@addset@ii#1{% - \listcsgadd{blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting}{#1}} + \listcsgadd{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}{#1}} \def\blx@bbl@labelfields{% \def\do##1{% @@ -5671,12 +5781,12 @@ % in cite styles like numeric-comp will die. {\ifundef\abx@field@localnumber {\numdef\abx@field@localnumber{0}% - \blx@bbl@fielddef{labelnumber}{0}} + \blx@bbl@fielddef{labelnumber}{0}} {}} - {\csnumgdef{blx@labelnumber@\the\c@refsection @\blx@slist@scheme}{% - \csuse{blx@labelnumber@\the\c@refsection @\blx@slist@scheme}+1}% + {\csnumgdef{blx@labelnumber@\the\c@refsection @\blx@slist@name}{% + \csuse{blx@labelnumber@\the\c@refsection @\blx@slist@name}+1}% \edef\abx@field@localnumber{% - \csuse{blx@labelnumber@\the\c@refsection @\blx@slist@scheme}}% + \csuse{blx@labelnumber@\the\c@refsection @\blx@slist@name}}% \blx@bbl@fieldedef{labelnumber}{\abx@field@localnumber}}% \iftoggle{blx@skipbib} {} @@ -5809,6 +5919,11 @@ \protected\def\abx@aux@sortscheme#1{% \listgadd{\blx@lastsortschemes}{#1}} +% {<sortnamekeyschemename>} +% Get the saved information on which sorting name key schemes were mentioned last run +\protected\def\abx@aux@sortnamekeyscheme#1{% + \listgadd{\blx@lastsortnamekeyschemes}{#1}} + % {<sortschemename>} % Get the saved information on which shorthand sorting schemes were mentioned last run \protected\def\abx@aux@biblist#1{% @@ -5854,6 +5969,14 @@ {} {\blx@logreq@active{}}} {}% + % Test if we removed any mention of a sorting name key scheme since last run. + % If we did, we need to re-run biber + \def\do#1{\ifinlist{#1}{\blx@sortnamekeyschemes}{}{\blx@logreq@active{}}\relax}% + \dolistloop\blx@lastsortnamekeyschemes + % Test if we added any mention of a sorting name key scheme since last run + % If we did, we need to re-run biber + \def\do#1{\ifinlist{#1}{\blx@lastsortnamekeyschemes}{}{\blx@logreq@active{}}\relax}% + \dolistloop\blx@sortnamekeyschemes % Test if we removed any mention of a sorting scheme since last run. % If we did, we need to re-run biber \def\do#1{\ifinlist{#1}{\blx@sortschemes}{}{\blx@logreq@active{}}\relax}% @@ -5866,7 +5989,7 @@ % If we did, we need to re-run biber \def\do#1{\ifinlist{#1}{\blx@biblists}{}{\blx@logreq@active{}}\relax}% \dolistloop\blx@lastbiblists - % Test to see if we added any mention of a biblist sorting scheme since last run. + % Test to see if we added any mention of a biblist since last run. % If we did, we need to re-run biber \def\do#1{\ifinlist{#1}{\blx@lastbiblists}{}{\blx@logreq@active{}}\relax}% \dolistloop\blx@biblists @@ -5908,12 +6031,12 @@ test {\ifcsundef{blx@defer@\the\c@refsection @\abx@field@entrykey}} } {\iftoggle{blx@omitnumbers} {\let\abx@field@localnumber\@empty} - {\csnumgdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@sorting}{% - \csuse{blx@labelnumber@\the\c@refsection @\blx@refcontext@sorting}+1}% + {\csnumgdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@context}{% + \csuse{blx@labelnumber@\the\c@refsection @\blx@refcontext@context}+1}% \edef\abx@field@localnumber{% - \csuse{blx@labelnumber@\the\c@refsection @\blx@refcontext@sorting}}% + \csuse{blx@labelnumber@\the\c@refsection @\blx@refcontext@context}}% \blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% - {localnumber}{\blx@refcontext@sorting}{\abx@field@localnumber}}} + {localnumber}{\blx@refcontext@context}{\abx@field@localnumber}}} {}% % If localnumbers were already in the .aux, add them % again from the .aux. This prevents some cycling @@ -5927,7 +6050,7 @@ {\the\c@instcount}% {\abx@field@entrykey}% {\the\c@refsection}% - {\blx@refcontext@sorting}% + {\blx@refcontext@context}% {\abx@field@localnumber}}% % record that we have already generated and output localnum % for this key in this refsection @@ -5945,11 +6068,11 @@ {\edef\abx@field@prefixnumber{\expandonce\blx@prefixnumbers}% \ifundef\abx@field@prefixnumber {\blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% - {prefixnumber}{\blx@refcontext@sorting}{\expandonce\abx@field@prefixnumber}} + {prefixnumber}{\blx@refcontext@context}{\expandonce\abx@field@prefixnumber}} {}% \blx@auxwrite\@mainaux{}{% \string\blx@aux@numprefix{\abx@field@entrykey}% - {\the\c@refsection}{\blx@refcontext@sorting}{\expandonce\abx@field@prefixnumber}}} + {\the\c@refsection}{\blx@refcontext@context}{\expandonce\abx@field@prefixnumber}}} {}} {}} {}} @@ -5958,14 +6081,17 @@ \protected\def\blx@aux@numprefix#1#2#3#4{% \blx@bbl@addentryfield{\detokenize{#1}}{#2}{prefixnumber}{#3}{#4}} -% {<sortlistname>}{<sortlistsortscheme>} -\def\blx@bbl@slist#1#2{% +% {<sortlistname>} +\def\blx@bbl@slist[#1]#2{% \begingroup - \def\blx@slist@scheme{#2}% + \def\blx@slist@type{#1}% + \def\blx@slist@name{#2}} + % This macro (\key) will only be called in sortlists of type "list" - \def\key##1{\listcsxadd{blx@slistsbib@\the\c@refsection @#1@#2}{\detokenize{##1}}}} +% \def\key##1{\listcsxadd{blx@slists@\the\c@refsection @#1}{\detokenize{##1}}}} + \def\blx@bbl@endslist{% - \csnumgdef{blx@labelnumber@\the\c@refsection @\blx@slist@scheme}{0}% + \csnumgdef{blx@labelnumber@\the\c@refsection @\blx@slist@name}{0}% \endgroup} \def\blx@addpageref#1{% @@ -6383,10 +6509,10 @@ \define@key{blx@bib2}{resetnumbers}[true]{% \iftoggle{blx@defernumbers} {\ifstrequal{#1}{true} - {\csnumdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@sorting}{0}} + {\csnumdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@context}{0}} {\ifstrequal{#1}{false} {} - {\csnumdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@sorting}{#1-1}}}} + {\csnumdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@context}{#1-1}}}} {\blx@warning{% Option 'resetnumbers' requires 'defernumbers=true'.\MessageBreak Ignoring 'resetnumbers=true'}}} @@ -6403,7 +6529,7 @@ \define@key{blx@bib2}{prefixnumbers}{% \def\blx@prefixnumbers{#1}% \iftoggle{blx@defernumbers} - {\csnumdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@sorting}{0}} + {\csnumdef{blx@labelnumber@\the\c@refsection @\blx@refcontext@context}{0}} {\iftoggle{blx@labelnumber} {\blx@warning{% Option 'prefixnumbers' requires global\MessageBreak @@ -6454,35 +6580,32 @@ \csuse{blx@biber@sorting@\blx@refcontext@sorting}}}% default to context \edef\blx@tempe{\the\c@refsection}% default refsection is current \blx@safe@actives - % Add the sortscheme to the list of sortschemes - % so we can compare on next run - \xifinlist{\blx@refcontext@sorting}{\blx@sortschemes} - {} - {\listxadd\blx@sortschemes{\blx@refcontext@sorting}% - \blx@auxwrite\@mainaux{}{\string\abx@aux@sortscheme{\blx@refcontext@sorting}}}% - \edef\blx@tempd{% - \blx@xml@sorting{% - \ifcsdef{blx@sortdef@locale@\blx@refcontext@sorting} - { locale="\csuse{blx@sortdef@locale@\blx@refcontext@sorting}"} - {}}{% + % Add the sortscheme to the list of sortschemes + % so we can compare on next run + \xifinlist{\blx@refcontext@sorting}{\blx@sortschemes} + {} + {\listxadd\blx@sortschemes{\blx@refcontext@sorting}% + \blx@auxwrite\@mainaux{}{\string\abx@aux@sortscheme{\blx@refcontext@sorting}}}% + \edef\blx@tempd{% + \blx@xml@sorting{% + \ifcsdef{blx@sortdef@locale@\blx@refcontext@sorting} + { locale="\csuse{blx@sortdef@locale@\blx@refcontext@sorting}"} + {}}{% \csuse{blx@biber@sorting@\blx@refcontext@sorting}}}% \setkeys{blx@bib1}{#1}% Set section only, if present ... \blx@rest@actives - \ifcsvoid{blx@slistsbib@\blx@tempe @entry@\blx@refcontext@sorting} + \ifcsvoid{blx@slist@entry@\blx@tempe @\blx@refcontext@context} {} - {\letcs\blx@tempa{blx@slistsbib@\blx@tempe @entry@\blx@refcontext@sorting}}% - {\ifcsvoid{blx@sbib@\blx@tempe} - {} - {\letcs\blx@tempa{blx@sbib@\blx@tempe}}}% + {\letcs\blx@tempa{blx@slist@entry@\blx@tempe @\blx@refcontext@context}}% \blx@safe@actives - % Must reset omitnumbers as it's a global macro and if we don't, any + % Must reset omitnumbers as it's a global macro and if we don't, any % \printbibliography following one with this set will inherit any % previous "true" value \togglefalse{blx@omitnumbers}% \setkeys{blx@bib2}{#1}% ... now we have correct \blx@tempa, set rest of options \blx@rest@actives - \csxappto{blx@xml@slistsbib}{% - \blx@xml@slist{\blx@refcontext@sorting}{entry}{\blx@tempe}{\blx@refcontext@sorting}{\blx@tempd}{}}% + \csxappto{blx@biber@slists}{% + \blx@xml@slist{\blx@refcontext@context}{entry}{\blx@tempe}{\blx@refcontext@sorting}{\blx@refcontext@sortingnamekey}{\blx@tempd}{}}% \ifdefvoid\blx@tempa {\blx@warn@bibempty\endgroup} {\blx@bibliography\blx@tempa}} @@ -6512,11 +6635,11 @@ \blx@refsections} \def\blx@refsections{% - \ifcsvoid{blx@slistsbib@\the\c@refsection @entry@\blx@refcontext@sorting} + \ifcsvoid{blx@slist@entry@\the\c@refsection @\blx@refcontext@context} {} {\toggletrue{blx@tempa}% \begingroup - \expandafter\blx@bibliography\csname blx@slistsbib@\the\c@refsection @entry@\blx@refcontext@sorting\endcsname}% + \expandafter\blx@bibliography\csname blx@slist@entry@\the\c@refsection @\blx@refcontext@context\endcsname}% \ifnum\c@refsection<\blx@maxsection \advance\c@refsection\@ne \expandafter\blx@refsections @@ -6555,9 +6678,9 @@ {\toggletrue{blx@tempa}% \begingroup \let\blx@tempa\@empty - \ifcsvoid{blx@slistsbib@\the\c@refsection @entry@\blx@refcontext@sorting} + \ifcsvoid{blx@slist@entry@\the\c@refsection @\blx@refcontext@context} {} - {\letcs\blx@tempa{blx@slistsbib@\the\c@refsection @entry@\blx@refcontext@sorting}}% + {\letcs\blx@tempa{blx@slist@entry@\the\c@refsection @\blx@refcontext@context}}% \blx@filter\blx@tempa{blx@segm@\the\c@refsection @\the\c@refsegment}% \blx@bibliography\blx@tempa}% \ifnum\c@refsegment<\csname blx@maxsegment@\the\c@refsection\endcsname @@ -6600,9 +6723,9 @@ \begingroup \blx@key@heading{#1}% \let\blx@tempa\@empty - \ifcsvoid{blx@slistsbib@\the\c@refsection @entry@\blx@refcontext@sorting} + \ifcsvoid{blx@slist@entry@\the\c@refsection @\blx@refcontext@context} {} - {\letcs\blx@tempa{blx@slistsbib@\the\c@refsection @entry@\blx@refcontext@sorting}}% + {\letcs\blx@tempa{blx@slist@entry@\the\c@refsection @\blx@refcontext@context}}% \blx@filter\blx@tempa{blx@catg@#1}% \blx@bibliography\blx@tempa}}% @@ -6828,19 +6951,20 @@ \ifcsdef{blx@biber@sorting@#2} {#2} {\blx@refcontext@sorting}}% + % locally define this since we want to fetch data from the slist named + % after the list we are printing rather than the data in refcontext list + \edef\blx@refcontext@context{\blx@tempc/\blx@refcontext@sortingnamekey}% \edef\blx@tempd{% \blx@xml@sorting {\ifcsdef{blx@sortdef@locale@#2} { locale="\csuse{blx@sortdef@locale@#2}"} {}} - {\ifcsdef{blx@biber@sorting@#2} - {\csuse{blx@biber@sorting@#2}} - {\csuse{blx@biber@sorting@\blx@refcontext@sorting}}}}% + {\csuse{blx@biber@sorting@\blx@tempc}}}% \let\blx@printbibchecks\relax \edef\blx@tempe{\the\c@refsection}% default refsection is current \blx@safe@actives \blx@printbibchecks - % Add the sortscheme to the list of sortschemes for this biblist + % Add the sortscheme to the list of sortschemes for this biblist % so we can compare on next run \xifinlist{\blx@tempc}{\blx@biblists} {} @@ -6854,9 +6978,9 @@ \csuse{blx@biber@sorting@\blx@tempc}}}% \setkeys{blx@biblist1}{#1}% Set section only, if present ... \blx@rest@actives - \ifcsvoid{blx@slistsbib@\blx@tempe @#2@\blx@tempc} + \ifcsvoid{blx@slist@list@\blx@tempe @\blx@refcontext@context} {} - {\letcs\blx@tempa{blx@slistsbib@\blx@tempe @#2@\blx@tempc}}% + {\letcs\blx@tempa{blx@slist@list@\blx@tempe @\blx@refcontext@context}}% \blx@safe@actives \setkeys{blx@biblist2}{#1}% ... now we have correct \blx@tempa, set rest of options \ifundef\blx@bibcheck @@ -6865,8 +6989,8 @@ {}} {}% \blx@rest@actives - \csxappto{blx@xml@slistsbib}{% - \blx@xml@slist{#2}{list}{\blx@tempe}{\blx@tempc}{\blx@tempd}{\csuse{blx@biber@biblistfilters@#2}}}% + \csxappto{blx@biber@slists}{% + \blx@xml@slist{\blx@refcontext@context}{list}{\blx@tempe}{\blx@tempc}{\blx@refcontext@sortingnamekey}{\blx@tempd}{\csuse{blx@biber@biblistfilters@#2}}}% \ifdefvoid\blx@tempa {\blx@warn@biblistempty{#2}\endgroup} {\blx@biblist\blx@tempa}} @@ -6961,16 +7085,52 @@ \endrefcontext} {\toggletrue{blx@refcontext}% \setkeys{blx@refcontext}{#1}% + \xdef\blx@refcontext@context{\blx@refcontext@sorting/\blx@refcontext@sortingnamekey}% \ifcsundef{blx@biber@sorting@\blx@refcontext@sorting} {\blx@err@invopt{sorting=\blx@refcontext@sorting}{}} {}}} -% Reset to global sorting when we leave a ref context (since they can't be nested) +% Reset to global sorting etc. when we leave a ref context (since they can't be nested) \protected\def\endrefcontext{% \togglefalse{blx@refcontext}% - \xdef\blx@refcontext@sorting{\blx@sorting}} + \xdef\blx@refcontext@sorting{\blx@sorting}% + \gdef\blx@refcontext@sortingnamekey{global}% + \xdef\blx@refcontext@context{\blx@refcontext@sorting/\blx@refcontext@sortingnamekey}} \define@key{blx@refcontext}{sorting}{\gdef\blx@refcontext@sorting{#1}} +\define@key{blx@refcontext}{sortingnamekeyscheme}{\gdef\blx@refcontext@sortingnamekey{#1}} + +% [refcontext keys]{<keyword1>,<keyword2>,...} +\def\assignrefcontextkeyws[#1]#2{% + \edef\blx@tempa{\blx@sorting}% + \def\blx@tempb{global}% + \setkeys{blx@assignrefcontext}{#1}% + \def\do##1{% + \listxadd\blx@assignedrefcontextkeywlist{##1}% + \csxdef{blx@assignedrefcontextkeyws@\the\c@refsection @##1}{\blx@tempa/\blx@tempb}} + \docsvlist{#2}} + +% [refcontext keys]{<category1>,<category2>,...} +\def\assignrefcontextcats[#1]#2{% + \edef\blx@tempa{\blx@sorting}% + \def\blx@tempb{global}% + \setkeys{blx@assignrefcontext}{#1}% + \def\do##1{% + \listxadd\blx@assignedrefcontextcatlist{##1}% + \csxdef{blx@assignedrefcontextcats@\the\c@refsection @##1}{\blx@tempa/\blx@tempb}} + \docsvlist{#2}} + +% [refcontext keys]{<entrykey1>,<entrykey2>,...} +\def\assignrefcontextentries[#1]#2{% + \edef\blx@tempa{\blx@sorting}% + \def\blx@tempb{global}% + \setkeys{blx@assignrefcontext}{#1}% + \def\do##1{% + \csxdef{blx@assignedrefcontextkeys@\the\c@refsection @##1}{\blx@tempa/\blx@tempb}}% + \docsvlist{#2}} + +\define@key{blx@assignrefcontext}{sorting}{\def\blx@tempa{#1}} +\define@key{blx@assignrefcontext}{sortingnamekeyscheme}{\def\blx@tempb{#1}} % Reference sections \newrobustcmd*{\newrefsection}{% @@ -7451,8 +7611,8 @@ {\blx@bibreq{*}% \global\csletcs {blx@segm@\the\c@refsection @\the\c@refsegment} - {blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting}% - \ifcsvoid{blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting} + {blx@slist@entry@\the\c@refsection @\blx@refcontext@context}% + \ifcsvoid{blx@slist@entry@\the\c@refsection @\blx@refcontext@context} {\blx@logreq@active{}} {}} {}} @@ -7526,7 +7686,7 @@ \multicitedelim \fi \fi - \letcs\blx@tempb{blx@slists@\the\c@refsection @entry@\blx@refcontext@sorting}% + \letcs\blx@tempb{blx@slist@centry@\the\c@refsection @\blx@refcontext@context}% \blx@thecitesort \edef\blx@tempa{\endgroup \c@citecount\z@ @@ -7564,8 +7724,32 @@ \expandafter\abx@missing\expandafter{\blx@realkey}% \advance\blx@tempcntb\@ne}} +% set refcontext for one citation key from auto-assign \assignrefcontext* +% macros, if any +% <entrykey> +\def\blx@getrefcontext#1{% + \let\blx@refcontext@context@saved\blx@refcontext@context + \ifdef\blx@assignedrefcontextkeywlist + {\def\do##1{% + \blx@imc@ifentrykeyword{#1}{##1} + {\letcs\blx@refcontext@context{blx@assignedrefcontextkeyws@\the\c@refsection @##1}} + {}}% + \dolistloop\blx@assignedrefcontextkeywlist} + {}% + \ifdef\blx@assignedrefcontextcatlist + {\def\do##1{% + \blx@imc@ifentrycategory{#1}{##1} + {\letcs\blx@refcontext@context{blx@assignedrefcontextcats@\the\c@refsection @##1}} + {}}% + \dolistloop\blx@assignedrefcontextcatlist} + {}% + \ifcsdef{blx@assignedrefcontextkeys@\the\c@refsection @#1} + {\letcs\blx@refcontext@context{blx@assignedrefcontextkeys@\the\c@refsection @#1}} + {}} + % {<entrykey>} \protected\def\blx@citeprint#1{% + \blx@getrefcontext{#1}% \advance\c@citecount\@ne \addtocounter{instcount}\@ne \ifnum\c@citecount=\@ne @@ -7602,7 +7786,8 @@ \blx@postcode \fi \blx@endlangcite - \endgroup} + \endgroup + \let\blx@refcontext@context\blx@refcontext@context@saved} % cite counter @@ -8672,7 +8857,8 @@ \def\iffootnote{\blx@TE{\iftoggle{blx@footnote}}}% \def\ifuseprefix{\blx@TE{\iftoggle{blx@useprefix}}}% \def\ifterseinits{\blx@TE{\iftoggle{blx@terseinits}}}% - \def\iffirstinits{\blx@TE{\iftoggle{blx@firstinits}}}% + \def\iffirstinits{\blx@TE{\iftoggle{blx@giveninits}}}% legacy name for \ifgiveninits + \def\ifgiveninits{\blx@TE{\iftoggle{blx@giveninits}}}% \def\ifsingletitle{\blx@TE{\iftoggle{abx@bool@singletitle}}}% \def\ifandothers#1{\blx@TE{\iftoggle{abx@bool@more#1}}}}} @@ -9137,6 +9323,22 @@ \xdef\blx@xml@nolabelwidthcount#1{% ~~~~<bcf:nolabelwidthcount value="#1"/>\blx@nl} +\xdef\blx@xml@sortingnamekey#1#2{% + ~~<bcf:sortingnamekey keyscheme="#1">\blx@nl% + #2% + ~~</bcf:sortingnamekey>\blx@nl} + +\xdef\blx@xml@sortingnamekeykeypart#1#2{% + ~~~~<bcf:keypart#1>\blx@nl + #2% + ~~~~</bcf:keypart>\blx@nl} + +\xdef\blx@xml@sortingnamekeynamepart#1#2#3{% + ~~~~~~<bcf:part type="namepart"#1#2>#3</bcf:part>\blx@nl} + +\xdef\blx@xml@sortingnamekeyliteral#1#2{% + ~~~~~~<bcf:part type="literal"#1>#2</bcf:part>\blx@nl} + \xdef\blx@xml@sorting#1#2{% ~~<bcf:sorting#1>\blx@nl% #2% @@ -9162,10 +9364,10 @@ \xdef\blx@xml@endsection{% ~~</bcf:section>} -\xdef\blx@xml@slist#1#2#3#4#5#6{% - ~~<bcf:sortlist section="#3" name="#1" type="#2" sortscheme="#4">\blx@nl +\xdef\blx@xml@slist#1#2#3#4#5#6#7{% + ~~<bcf:sortlist section="#3" name="#1" type="#2" sortscheme="#4" sortnamekeyscheme="#5">\blx@nl + #7% #6% - #5% ~~</bcf:sortlist>\blx@nl} \xdef\blx@xml@slistfilterorbegin{% ~~~~<bcf:filteror>\blx@nl} @@ -9198,18 +9400,10 @@ ~~<bcf:optionscope type="#1">\blx@nl #2% ~~</bcf:optionscope>\blx@nl} -\xdef\blx@xml@option@scope#1{% - ~~~~<bcf:option>#1</bcf:option>\blx@nl} +\xdef\blx@xml@option@scope#1#2{% + ~~~~<bcf:option datatype="#1">#2</bcf:option>\blx@nl} \endgroup -\def\blx@bcf@options@scope{% - \blx@xml@options@scope{GLOBAL}{% - \forlistloop\blx@xml@option@scope\blx@globalopts}% - \blx@xml@options@scope{PER_TYPE}{% - \forlistloop\blx@xml@option@scope\blx@typeopts}% - \blx@xml@options@scope{PER_ENTRY}{% - \forlistloop\blx@xml@option@scope\blx@entryopts}} - \def\blx@bcf@options@global{% \blx@xml@comment{GLOBAL}% \blx@xml@options{biblatex}{global}{% @@ -9300,7 +9494,7 @@ \blx@xml@toggle{debug}% \blx@xml@svalue{mincrossrefs}{\blx@mincrossrefs}% \blx@xml@toggle{sortcase}% - \blx@xml@toggle{sortfirstinits}% + \blx@xml@toggle{sortgiveninits}% \blx@xml@toggle{sortupper}% }% \blx@xml@comment{BIBLATEX OPTIONS}% @@ -9323,36 +9517,76 @@ \dolistloop\blx@opts@type} {}% % options scope + % GLOBAL + \def\do##1{% + \begingroup + \def\do####1{\xappto\blx@bcf@options@scope@global{\blx@xml@option@scope{##1}{####1}}}% + \dolistcsloop{blx@globalopts@##1}% + \endgroup}% + \dolistloop\blx@globalopts@datatypes + % ENTRYTYPE + \def\do##1{% + \begingroup + \def\do####1{\xappto\blx@bcf@options@scope@type{\blx@xml@option@scope{##1}{####1}}}% + \dolistcsloop{blx@typeopts@##1}% + \endgroup}% + \dolistloop\blx@typeopts@datatypes + % ENTRY + \def\do##1{% + \begingroup + \def\do####1{\xappto\blx@bcf@options@scope@entry{\blx@xml@option@scope{##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}}}% + \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}}}% + \dolistcsloop{blx@nameopts@##1}% + \endgroup}% + \dolistloop\blx@entryopts@datatypes + \eappto\blx@tempa{% \blx@xml@comment{BIBLATEX OPTION SCOPE}% - \blx@bcf@options@scope} + \blx@xml@options@scope{GLOBAL}{\blx@bcf@options@scope@global}% + \blx@xml@options@scope{ENTRYTYPE}{\blx@bcf@options@scope@type}% + \blx@xml@options@scope{ENTRY}{\blx@bcf@options@scope@entry}% + \blx@xml@options@scope{NAMELIST}{\blx@bcf@options@scope@namelist}% + \blx@xml@options@scope{NAME}{\blx@bcf@options@scope@name}} % sourcemap \ifbool{sourcemap} - {\eappto\blx@tempa{% + {\eappto\blx@tempa{% \blx@xml@comment{SOURCEMAP}% \blx@xml@sourcemap{% \ifcsdef{blx@biber@sourcemap@user} - {\csuse{blx@biber@sourcemap@user}} - {}% + {\csuse{blx@biber@sourcemap@user}} + {}% \ifcsdef{blx@biber@sourcemap@style} - {\csuse{blx@biber@sourcemap@style}} - {}% + {\csuse{blx@biber@sourcemap@style}} + {}% \ifcsdef{blx@biber@sourcemap@defaults@bibtex} - {\csuse{blx@biber@sourcemap@defaults@bibtex}} - {}% + {\csuse{blx@biber@sourcemap@defaults@bibtex}} + {}% \ifcsdef{blx@biber@sourcemap@defaults@biblatexml} - {\csuse{blx@biber@sourcemap@defaults@biblatexml}} - {}% + {\csuse{blx@biber@sourcemap@defaults@biblatexml}} + {}% \ifcsdef{blx@biber@sourcemap@defaults@endnotexml} - {\csuse{blx@biber@sourcemap@defaults@endnotexml}} - {}% + {\csuse{blx@biber@sourcemap@defaults@endnotexml}} + {}% \ifcsdef{blx@biber@sourcemap@defaults@ris} - {\csuse{blx@biber@sourcemap@defaults@ris}} - {}% + {\csuse{blx@biber@sourcemap@defaults@ris}} + {}% \ifcsdef{blx@biber@sourcemap@defaults@zoterordfxml} - {\csuse{blx@biber@sourcemap@defaults@zoterordfxml}} - {}}}} - {}% + {\csuse{blx@biber@sourcemap@defaults@zoterordfxml}} + {}}}} + {}% % labelalpha template \eappto\blx@tempa{% \blx@xml@comment{LABELALPHA TEMPLATE}}% @@ -9407,6 +9641,13 @@ }% }} {}% + % sortingnamekey + \eappto\blx@tempa{\blx@xml@comment{SORTING NAME KEY}}% + \def\do##1{% + \eappto\blx@tempa{% + \blx@xml@sortingnamekey{##1}{% + \csuse{blx@biber@sortingnamekey@##1}}}}% + \dolistloop\blx@biber@sortingnamekeyspecs % sorting \def\do##1{% \eappto\blx@bcf@presort{\csuse{blx@bcf@presort@##1}}% @@ -9424,6 +9665,9 @@ \eappto\blx@tempa{% \blx@xml@comment{DATA MODEL}% \blx@xml@datamodel{% + \blx@xml@datamodel@constants{% + \blx@bcf@datamodel@constants + }% \blx@xml@datamodel@entrytypes{% \blx@bcf@datamodel@entrytypes }% @@ -9450,7 +9694,7 @@ \AfterEndDocument{% \blx@auxwrite\blx@bcfout{}{% \blx@xml@endsection\blx@nl - \csuse{blx@xml@slistsbib}% + \csuse{blx@biber@slists}% \blx@xml@endfile}% \immediate\closeout\blx@bcfout}} @@ -9602,6 +9846,8 @@ \ifstrequal{#1}{true} {\appto\blx@tempm{ map\string_overwrite="1"}} {}} +\define@key{blx@sourcemap@map}{foreach}{% characters + \eappto\blx@tempm{ map\string_foreach="#1"}} \newcommand*{\blx@sourcemap@perdatasource}[1]{% \eappto\blx@tempe{% @@ -9652,6 +9898,12 @@ \ifstrequal{#1}{true} {\appto\blx@tempf{ map\string_entry\string_null="1"}} {}} +\define@key{blx@sourcemap@step}{entrynew}{% characters + \appto\blx@tempf{ map\string_entry\string_new="#1"}} +\define@key{blx@sourcemap@step}{entrynewtype}{% characters + \appto\blx@tempf{ map\string_entry\string_newtype="#1"}} +\define@key{blx@sourcemap@step}{entrytarget}{% characters + \appto\blx@tempf{ map\string_entrytarget="#1"}} \define@key{blx@sourcemap@step}{entryclone}{% characters \appto\blx@tempf{ map\string_entry\string_clone="#1"}} \define@key{blx@sourcemap@step}{origfield}[true]{% true|false @@ -9680,8 +9932,8 @@ {\blx@biber@latem{#2}{global}} {\forcsvlist{\blx@biber@latem{#2}}{#1}}} \@onlypreamble\DeclareLabelalphaTemplate -\listadd\blx@globalopts{labelalphatemplate}% for passing to the .bcf -\listadd\blx@typeopts{labelalphatemplate}% for passing to the .bcf +\blx@collectopts{xml}{blx@globalopts}{labelalphatemplate}% for passing to the .bcf +\blx@collectopts{xml}{blx@typeopts}{labelalphatemplate}% for passing to the .bcf \def\blx@biber@latem#1#2{% \begingroup @@ -9720,8 +9972,6 @@ \eappto\blx@tempb{% \blx@xml@labelalpha@part{\blx@tempc}{#2}}} -\define@key{blx@latem@field}{lang}{% - \appto\blx@tempc{ lang="#1"}} \define@key{blx@latem@field}{uppercase}[true]{% true|false \ifstrequal{#1}{true} {\appto\blx@tempc{ uppercase="1"}} @@ -9769,7 +10019,9 @@ \define@key{blx@latem@field}{ifnames}{% \eappto\blx@tempc{ ifnamecount="#1"}} \define@key{blx@latem@field}{names}{% - \eappto\blx@tempc{ namecount="#1"}} + \eappto\blx@tempc{ namerange="#1"}} +\define@key{blx@latem@field}{noalphaothers}[true]{% + \eappto\blx@tempc{ noalphaothers="1"}} \define@key{blx@latem@field}{padchar}{% \blx@xmlsanitizeafter{\def\blx@temps}{#1}% \eappto\blx@tempc{ pad\string_char="\expandafter\regexp\expandafter{\blx@temps}"}} @@ -9841,7 +10093,7 @@ \def\blx@inherit@ii#1#2{% \eappto\blx@tempa{\blx@xml@inherit@type{#1}{#2}{}}} -\listadd\blx@globalopts{inheritance}% for passing to the .bcf +\blx@collectopts{xml}{blx@globalopts}{inheritance}% for passing to the .bcf % [<options>]{<source>}{<target>} \newcommand*{\blx@inherit@field}[3][]{% @@ -9896,6 +10148,68 @@ \def\do#1{\DeclareBiblistFilter{#1}{\filter[type=field,filter=#1]}} \abx@dolabelfields +% [<specname>]{<spec>} +\newrobustcmd*{\DeclareSortingNamekeyScheme}[2][]{% + \begingroup + \ifblank{#1} + {\def\blx@biber@snkname{global}}% default + {\def\blx@biber@snkname{#1}}% + \let\namepart\blx@sortnk@namepart + \let\keypart\blx@sortnk@keypart + \let\literal\blx@sortnk@literal + \let\blx@tempa\@empty + \blx@tempcnta\z@ + #2% + \global\cslet{blx@biber@sortingnamekey@\blx@biber@snkname}\blx@tempa + \xifinlist{\blx@biber@snkname}{\blx@biber@sortingnamekeyspecs} + {} + {\listxadd\blx@biber@sortingnamekeyspecs{\blx@biber@snkname}}% + % Add the sortnamekeyscheme to the list of sortnamekeyschemes + % so we can compare on next run + \xifinlist{\blx@biber@snkname}{\blx@sortnamekeyschemes} + {} + {\listxadd\blx@sortnamekeyschemes{\blx@biber@snkname}}% + \endgroup} +\@onlypreamble\DeclareSortingNamekeyScheme +\blx@collectopts{xml}{blx@globalopts}{sortingnamekey}% for passing to the .bcf +\DeclareEntryOption[string]{sortnamekeyscheme}{% + \def\blx@refcontext@sortingnamekey{#1}} + +% User-mode macro for checking sorting name key scheme +\def\ifsortnamekeyscheme#1{% + \expandafter\ifstrequal\expandafter{\blx@refcontext@sortingnamekey}{#1}} + +\newcommand*{\blx@sortnk@keypart}[1]{% + \advance\blx@tempcnta\@ne + \blx@tempcntb\z@ + \edef\blx@tempd{ order="\the\blx@tempcnta"}% + \let\blx@tempb\@empty + #1% + \eappto\blx@tempa{% + \blx@xml@sortingnamekeykeypart{\blx@tempd}{\blx@tempb}}} + +\newcommand*{\blx@sortnk@literal}[1]{% + \advance\blx@tempcntb\@ne + \edef\blx@tempe{ order="\the\blx@tempcntb"}% + \let\blx@tempc\@empty + \eappto\blx@tempb{% + \blx@xml@sortingnamekeyliteral{\blx@tempe}{#1}}} + +\newcommand*{\blx@sortnk@namepart}[2][]{% + \advance\blx@tempcntb\@ne + \edef\blx@tempe{ order="\the\blx@tempcntb"}% + \let\blx@tempc\@empty + \ifblank{#1} + {} + {\setkeys{blx@sortnk@namepart}{#1}}% + \eappto\blx@tempb{% + \blx@xml@sortingnamekeynamepart{\blx@tempe}{\blx@tempc}{#2}}} + +\define@key{blx@sortnk@namepart}{use}[true]{% use* option for namepart true|false + \ifstrequal{#1}{true} + {\appto\blx@tempc{ use="1"}} + {\appto\blx@tempc{ use="0"}}} + % {<name>}{<spec>} \newrobustcmd*{\DeclareSortingScheme}[3][]{% \ifblank{#1} @@ -9915,7 +10229,7 @@ \global\cslet{blx@biber@sorting@#2}\blx@tempa \endgroup} \@onlypreamble\DeclareSortingScheme -\listadd\blx@globalopts{sortscheme}% for passing to the .bcf +\blx@collectopts{xml}{blx@globalopts}{sortscheme}% for passing to the .bcf \define@key{blx@sortdef@sorting}{locale}{% locale name \def\blx@templ{#1}} @@ -9961,11 +10275,6 @@ \eappto\blx@tempb{% \blx@xml@sortitem{\blx@tempd}{#2}}} -% script form - original | translated | romanised | uniform -\define@key{blx@sortdef@field}{form}{% - \appto\blx@tempd{ form="#1"}} -\define@key{blx@sortdef@field}{lang}{% - \appto\blx@tempd{ lang="#1"}} \define@key{blx@sortdef@field}{padside}{% left|right \ifstrequal{#1}{right} {\eappto\blx@tempd{ pad\string_side="right"}} @@ -10000,9 +10309,9 @@ {\forcsvlist\blx@undefpresort{#1}}}% \endgroup} \@onlypreamble\DeclarePresort -\listadd\blx@globalopts{presort}% for passing to the .bcf -\listadd\blx@typeopts{presort}% for passing to the .bcf -\listadd\blx@entryopts{presort}% for passing to the .bcf +\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 \def\blx@defpresort#1#2{% \csxdef{blx@bcf@presort@#2}{\blx@xml@presort{#2}{#1}}} @@ -10011,7 +10320,7 @@ \newrobustcmd*{\DeclareSortExclusion}[2]{% \forcsvlist{\blx@sortexlude{#2}}{#1}} -\listadd\blx@typeopts{sortexclusion}% for passing to the .bcf +\blx@collectopts{xml}{blx@typeopts}{sortexclusion}% for passing to the .bcf \def\blx@sortexlude#1#2{% \begingroup @@ -10041,8 +10350,8 @@ #2% \endgroup} \@onlypreamble\DeclareLabelname -\listadd\blx@globalopts{labelnamespec}% for passing to the .bcf -\listadd\blx@typeopts{labelnamespec}% for passing to the .bcf +\blx@collectopts{xml}{blx@globalopts}{labelnamespec}% for passing to the .bcf +\blx@collectopts{xml}{blx@typeopts}{labelnamespec}% for passing to the .bcf \newrobustcmd*{\DeclareLabeltitle}[2][]{% \begingroup @@ -10057,8 +10366,8 @@ #2% \endgroup} \@onlypreamble\DeclareLabeltitle -\listadd\blx@globalopts{labeltitlespec}% for passing to the .bcf -\listadd\blx@typeopts{labeltitlespec}% for passing to the .bcf +\blx@collectopts{xml}{blx@globalopts}{labeltitlespec}% for passing to the .bcf +\blx@collectopts{xml}{blx@typeopts}{labeltitlespec}% for passing to the .bcf \newrobustcmd*{\DeclareLabelyear}[2][]{% \blx@warning@noline{% @@ -10078,8 +10387,8 @@ #2% \endgroup} \@onlypreamble\DeclareLabeldate -\listadd\blx@globalopts{labeldatespec}% for passing to the .bcf -\listadd\blx@typeopts{labeldatespec}% for passing to the .bcf +\blx@collectopts{xml}{blx@globalopts}{labeldatespec}% for passing to the .bcf +\blx@collectopts{xml}{blx@typeopts}{labeldatespec}% for passing to the .bcf \newcommand*{\blx@ordered@field}[2][]{% \let\blx@tempc\@empty @@ -10122,11 +10431,6 @@ \noexpand\blx@xml@ordered{\the\blx@tempcnta}{ type="string"}{#1}}}% \expandafter\docsvlist\expandafter{\blx@tempa}}} -\define@key{blx@ordered@field}{form}{% - \appto\blx@tempc{ form="#1"}} -\define@key{blx@ordered@field}{lang}{% - \appto\blx@tempc{ lang="#1"}} - %% Package options % [<entrytype,entrytype,...>]{<options>} @@ -10174,19 +10478,19 @@ % load-time and preamble -\DeclareBibliographyOption{backend}{ +\DeclareBibliographyOption[string]{backend}{ \blx@error {'backend' is load-time only option} {The 'backend' option is load-time only and cannot be\MessageBreak set after package loading}} -\DeclareBibliographyOption{debug}[true]{% +\DeclareBibliographyOption[boolean]{debug}[true]{% \settoggle{blx@debug}{#1}} -\DeclareBibliographyOption{loadfiles}[true]{% +\DeclareBibliographyOption[boolean]{loadfiles}[true]{% \settoggle{blx@loadfiles}{#1}} -\DeclareBibliographyOption{mincrossrefs}{% +\DeclareBibliographyOption[integer]{mincrossrefs}{% \ifnum#1<\z@ \def\blx@mincrossrefs{1}% \def\blx@minxrefs{1}% @@ -10196,12 +10500,12 @@ \fi} \def\blx@minxrefs{2} -\DeclareBibliographyOption{texencoding}{% +\DeclareBibliographyOption[string]{texencoding}{% \ifstrequal{#1}{auto} {\undef\blx@texencoding} {\def\blx@texencoding{#1}}} -\DeclareBibliographyOption{bibencoding}{% +\DeclareBibliographyOption[string]{bibencoding}{% \ifcsdef{blx@bibenc@#1} {\letcs\blx@bibencoding{blx@bibenc@#1}} {\def\blx@bibencoding{#1}}} @@ -10215,11 +10519,11 @@ \abx@mapinpenc{lutf8}{utf8} \abx@mapinpenc{x-ascii}{ascii} -\DeclareBibliographyOption{safeinputenc}[true]{% +\DeclareBibliographyOption[boolean]{safeinputenc}[true]{% \settoggle{blx@safeinputenc}{#1}} \newtoggle{blx@safeinputenc} -\DeclareBibliographyOption{sorting}{% +\DeclareBibliographyOption[string]{sorting}{% \def\blx@sorting{#1}% \def\blx@refcontext@sorting{#1}} @@ -10229,79 +10533,81 @@ {\blx@err@invopt{sorting=\blx@sorting}{}% \def\blx@sorting{nty}% \def\blx@refcontext@sorting{nty}}% - \listxadd\blx@sortschemes{\blx@sorting}} + \listxadd\blx@sortschemes{\blx@sorting}% + \def\blx@refcontext@sortingnamekey{global}% + \xdef\blx@refcontext@context{\blx@refcontext@sorting/\blx@refcontext@sortingnamekey}} -\DeclareBibliographyOption{sortcase}[true]{% +\DeclareBibliographyOption[boolean]{sortcase}[true]{% \settoggle{blx@sortcase}{#1}} -\DeclareBibliographyOption{sortupper}[true]{% +\DeclareBibliographyOption[boolean]{sortupper}[true]{% \settoggle{blx@sortupper}{#1}} -\DeclareBibliographyOption{sortlos}{% +\DeclareBibliographyOption[string]{sortlos}{% \blx@warning@noline{% sortlos option is deprecated, use 'sorting' option to \string\printbiblist}} -\DeclareBibliographyOption{maxnames}{% +\DeclareBibliographyOption[integer]{maxnames}{% \numdef\blx@maxcitenames{#1}% \numdef\blx@maxbibnames{#1}} -\DeclareBibliographyOption{minnames}{% +\DeclareBibliographyOption[integer]{minnames}{% \numdef\blx@mincitenames{#1}% \numdef\blx@minbibnames{#1}} -\DeclareTypeOption{maxnames}{% +\DeclareTypeOption[integer]{maxnames}{% \numdef\blx@maxcitenames@type{#1}% \numdef\blx@maxbibnames@type{#1}% \c@maxnames#1\relax} -\DeclareTypeOption{minnames}{% +\DeclareTypeOption[integer]{minnames}{% \numdef\blx@mincitenames@type{#1}% \numdef\blx@minbibnames@type{#1}% \c@minnames#1\relax} -\DeclareEntryOption{maxnames}{% +\DeclareEntryOption[integer]{maxnames}{% \c@maxnames#1\relax} -\DeclareEntryOption{minnames}{% +\DeclareEntryOption[integer]{minnames}{% \c@minnames#1\relax} -\DeclareBibliographyOption{maxbibnames}{% +\DeclareBibliographyOption[integer]{maxbibnames}{% \numdef\blx@maxbibnames{#1}} -\DeclareBibliographyOption{minbibnames}{% +\DeclareBibliographyOption[integer]{minbibnames}{% \numdef\blx@minbibnames{#1}} -\DeclareTypeOption{maxbibnames}{% +\DeclareTypeOption[integer]{maxbibnames}{% \numdef\blx@maxbibnames@type{#1}% \iftoggle{blx@bibliography} {\c@maxnames#1\relax} {}} -\DeclareTypeOption{minbibnames}{% +\DeclareTypeOption[integer]{minbibnames}{% \numdef\blx@minbibnames@type{#1}% \iftoggle{blx@bibliography} {\c@minnames#1\relax} {}} -\DeclareEntryOption{maxbibnames}{% +\DeclareEntryOption[integer]{maxbibnames}{% \iftoggle{blx@bibliography} {\c@maxnames#1\relax} {}} -\DeclareEntryOption{minbibnames}{% +\DeclareEntryOption[integer]{minbibnames}{% \iftoggle{blx@bibliography} {\c@minnames#1\relax} {}} -\DeclareBibliographyOption{maxcitenames}{% +\DeclareBibliographyOption[integer]{maxcitenames}{% \numdef\blx@maxcitenames{#1}} -\DeclareBibliographyOption{mincitenames}{% +\DeclareBibliographyOption[integer]{mincitenames}{% \numdef\blx@mincitenames{#1}} -\DeclareTypeOption{maxcitenames}{% +\DeclareTypeOption[integer]{maxcitenames}{% \numdef\blx@maxcitenames@type{#1}% \iftoggle{blx@bibliography} {} {\c@maxnames#1\relax}} -\DeclareTypeOption{mincitenames}{% +\DeclareTypeOption[integer]{mincitenames}{% \numdef\blx@mincitenames@type{#1}% \iftoggle{blx@bibliography} {} {\c@minnames#1\relax}} -\DeclareEntryOption{maxcitenames}{% +\DeclareEntryOption[integer]{maxcitenames}{% \iftoggle{blx@bibliography} {} {\c@maxnames#1\relax}} -\DeclareEntryOption{mincitenames}{% +\DeclareEntryOption[integer]{mincitenames}{% \iftoggle{blx@bibliography} {} {\c@minnames#1\relax}} @@ -10315,19 +10621,19 @@ \appto\blx@checkoptions@entry{% \blx@maxmin@cnt{maxnames}{minnames}\c@maxnames\c@minnames} -\DeclareBibliographyOption{maxitems}{% +\DeclareBibliographyOption[integer]{maxitems}{% \numdef\blx@maxitems{#1}} -\DeclareBibliographyOption{minitems}{% +\DeclareBibliographyOption[integer]{minitems}{% \numdef\blx@minitems{#1}} -\DeclareTypeOption{maxitems}{% +\DeclareTypeOption[integer]{maxitems}{% \numdef\blx@maxitems@type{#1}% \c@maxitems#1\relax} -\DeclareTypeOption{minitems}{% +\DeclareTypeOption[integer]{minitems}{% \numdef\blx@minitems@type{#1}% \c@minitems#1\relax} -\DeclareEntryOption{maxitems}{% +\DeclareEntryOption[integer]{maxitems}{% \c@maxitems#1\relax} -\DeclareEntryOption{minitems}{% +\DeclareEntryOption[integer]{minitems}{% \c@minitems#1\relax} \appto\blx@checkoptions@global{% @@ -10337,17 +10643,17 @@ \appto\blx@checkoptions@entry{% \blx@maxmin@cnt{maxitems}{minitems}\c@maxitems\blx@minitems} -\DeclareBibliographyOption{maxalphanames}{% +\DeclareBibliographyOption[integer]{maxalphanames}{% \numdef\blx@maxalphanames{#1}} -\DeclareBibliographyOption{minalphanames}{% +\DeclareBibliographyOption[integer]{minalphanames}{% \numdef\blx@minalphanames{#1}} -\DeclareTypeOption{maxalphanames}{% +\DeclareTypeOption[integer]{maxalphanames}{% \numdef\blx@maxalphanames{#1}} -\DeclareTypeOption{minalphanames}{% +\DeclareTypeOption[integer]{minalphanames}{% \numdef\blx@minalphanames{#1}} -\DeclareEntryOption{maxalphanames}{% +\DeclareEntryOption[integer]{maxalphanames}{% \numdef\blx@maxalphanames{#1}} -\DeclareEntryOption{minalphanames}{% +\DeclareEntryOption[integer]{minalphanames}{% \numdef\blx@minalphanames{#1}} \appto\blx@checkoptions@global{% @@ -10383,7 +10689,7 @@ #3=#4} {}} -\DeclareBibliographyOption{terseinits}[true]{% +\DeclareBibliographyOption[boolean]{terseinits}[true]{% \ifstrequal{#1}{true} {\toggletrue{blx@terseinits} \renewrobustcmd*{\bibinitperiod}{} @@ -10394,26 +10700,38 @@ \renewrobustcmd*{\bibinitdelim}{\addnbspace} \renewrobustcmd*{\bibinithyphendelim}{\adddot\mbox{-}}}} -\DeclareBibliographyOption{firstinits}[true]{% - \settoggle{blx@firstinits}{#1}} +% Legacy for giveninits +\DeclareBibliographyOption[boolean]{firstinits}[true]{% + \blx@warning@noline{% + 'firstinits' option is deprecated, use 'giveninits' instead}% + \settoggle{blx@giveninits}{#1}} + +% Legacy for sortgiveninits +\DeclareBibliographyOption[boolean]{sortfirstinits}[true]{% + \blx@warning@noline{% + 'sortfirstinits' option is deprecated, use 'sortgiveninits' instead}% + \settoggle{blx@sortgiveninits}{#1}} -\DeclareBibliographyOption{sortfirstinits}[true]{% - \settoggle{blx@sortfirstinits}{#1}} +\DeclareBibliographyOption[boolean]{giveninits}[true]{% + \settoggle{blx@giveninits}{#1}} -\DeclareBibliographyOption{abbreviate}[true]{% +\DeclareBibliographyOption[boolean]{sortgiveninits}[true]{% + \settoggle{blx@sortgiveninits}{#1}} + +\DeclareBibliographyOption[boolean]{abbreviate}[true]{% \ifstrequal{#1}{true} {\def\abx@str{abx@sstr}} {\def\abx@str{abx@lstr}}} -\DeclareBibliographyOption{dateabbrev}[true]{% +\DeclareBibliographyOption[boolean]{dateabbrev}[true]{% \ifstrequal{#1}{true} {\let\abx@bibmonth\blx@imc@bibsstring} {\let\abx@bibmonth\blx@imc@biblstring}} -\DeclareBibliographyOption{sortlocale}{% +\DeclareBibliographyOption[string]{sortlocale}{% \edef\blx@sortlocale{\detokenize{#1}}} -\DeclareBibliographyOption{language}{% +\DeclareBibliographyOption[string]{language}{% \togglefalse{blx@autolangbib}% \togglefalse{blx@autolangcite}% \ifboolexpr{ @@ -10442,15 +10760,15 @@ {Language '#1' not supported} {Failed to find a matching '#1.lbx' file}}}} -\DeclareBibliographyOption{clearlang}[true]{% +\DeclareBibliographyOption[boolean]{clearlang}[true]{% \settoggle{blx@clearlang}{#1}} -\DeclareBibliographyOption{babel}{% +\DeclareBibliographyOption[string]{babel}{% \blx@warning@noline{% 'babel' option is deprecated, use 'autolang' instead}% \blx@autolang@i{#1}} -\DeclareBibliographyOption{autolang}{% +\DeclareBibliographyOption[string]{autolang}{% \blx@autolang@i{#1}} \def\blx@autolang@i#1{% @@ -10481,11 +10799,11 @@ \def\blx@hook@initlang{\@quotereset\@ne}% \def\blx@hook@endlang{\blx@postpunct}} -\DeclareBibliographyOption{indexing}[true]{% +\DeclareBibliographyOption[boolean]{indexing}[true]{% \blx@opt@index{#1}} -\DeclareTypeOption{indexing}[true]{% +\DeclareTypeOption[boolean]{indexing}[true]{% \blx@opt@index{#1}} -\DeclareEntryOption{indexing}[true]{% +\DeclareEntryOption[boolean]{indexing}[true]{% \blx@opt@index{#1}} \def\blx@opt@index#1{% \ifcsdef{blx@opt@index@#1} @@ -10504,14 +10822,14 @@ \togglefalse{blx@citeindex}% \toggletrue{blx@bibindex}} -\DeclareBibliographyOption{sortcites}[true]{% +\DeclareBibliographyOption[boolean]{sortcites}[true]{% \ifstrequal{#1}{true} {\let\blx@thecitesort\blx@citesort \let\blx@thenotecheck\blx@notecheck} {\let\blx@thecitesort\blx@citenosort \let\blx@thenotecheck\relax}} -\DeclareBibliographyOption{hyperref}[true]{% +\DeclareBibliographyOption[boolean]{hyperref}[true]{% \ifcsdef{blx@opt@hyperref@#1} {\letcs\blx@hyperref{blx@opt@hyperref@#1}} {\blx@err@invopt{hyperref=#1}{}}} @@ -10519,7 +10837,7 @@ \def\blx@opt@hyperref@true{1} \def\blx@opt@hyperref@auto{2} -\DeclareBibliographyOption{backref}[true]{% +\DeclareBibliographyOption[boolean]{backref}[true]{% \ifstrequal{#1}{true} {\let\blx@backref\blx@addbackref \let\abx@aux@backref\blx@aux@backref @@ -10528,7 +10846,7 @@ \let\abx@aux@backref\@gobblefive \boolfalse{backtracker}}} -\DeclareBibliographyOption{backrefsetstyle}{% +\DeclareBibliographyOption[string]{backrefsetstyle}{% \ifcsdef{blx@opt@backrefsetstyle@#1} {\letcs\blx@backrefsetstyle{blx@opt@backrefsetstyle@#1}} {\blx@err@invopt{backrefsetstyle=#1}{}}} @@ -10553,7 +10871,7 @@ references. 'pageanchor=true' is required}% \fi} -\DeclareBibliographyOption{block}{% +\DeclareBibliographyOption[string]{block}{% \ifcsdef{blx@opt@block@#1} {\csuse{blx@opt@block@#1}} {\blx@err@invopt{block=#1}{}}} @@ -10578,7 +10896,7 @@ \def\newblockpunct{% \unspace\penalty-9\relax\space}} -\DeclareBibliographyOption{pagetracker}[true]{% +\DeclareBibliographyOption[boolean]{pagetracker}[true]{% \ifcsdef{blx@opt@pagetracker@#1} {\csuse{blx@opt@pagetracker@#1}} {\blx@err@invopt{pagetracker=#1}{}}} @@ -10611,7 +10929,7 @@ \blx@opt@pagetracker@page \fi} -\DeclareBibliographyOption{citecounter}[true]{% +\DeclareBibliographyOption[boolean]{citecounter}[true]{% \ifcsdef{blx@opt@citecounter@#1} {\csuse{blx@opt@citecounter@#1}} {\blx@err@invopt{citecounter=#1}{}}} @@ -10633,7 +10951,7 @@ \let\abx@aux@count\@gobbletwo \let\abx@aux@fncount\@gobbletwo} -\DeclareBibliographyOption{citetracker}[true]{% +\DeclareBibliographyOption[boolean]{citetracker}[true]{% \ifcsdef{blx@opt@citetracker@#1} {\csuse{blx@opt@citetracker@#1}} {\blx@err@invopt{citetracker=#1}{}}} @@ -10664,7 +10982,7 @@ \blx@ifcitesingle{\blx@citetracker@context}{}}% \booltrue{citetracker}} -\DeclareBibliographyOption{ibidtracker}[true]{% +\DeclareBibliographyOption[boolean]{ibidtracker}[true]{% \ifcsdef{blx@opt@ibidtracker@#1} {\csuse{blx@opt@ibidtracker@#1}} {\blx@err@invopt{ibidtracker=#1}{}}} @@ -10693,7 +11011,7 @@ \let\blx@ibidreset\blx@ibidreset@context \booltrue{citetracker}} -\DeclareBibliographyOption{idemtracker}[true]{% +\DeclareBibliographyOption[boolean]{idemtracker}[true]{% \ifcsdef{blx@opt@idemtracker@#1} {\csuse{blx@opt@idemtracker@#1}} {\blx@err@invopt{idemtracker=#1}{}}} @@ -10722,7 +11040,7 @@ \let\blx@idemreset\blx@idemreset@context \booltrue{citetracker}} -\DeclareBibliographyOption{opcittracker}[true]{% +\DeclareBibliographyOption[boolean]{opcittracker}[true]{% \ifcsdef{blx@opt@opcittracker@#1} {\csuse{blx@opt@opcittracker@#1}} {\blx@err@invopt{opcittracker=#1}{}}} @@ -10751,7 +11069,7 @@ \let\blx@opcitreset\blx@opcitreset@context \booltrue{citetracker}} -\DeclareBibliographyOption{loccittracker}[true]{% +\DeclareBibliographyOption[boolean]{loccittracker}[true]{% \ifcsdef{blx@opt@loccittracker@#1} {\csuse{blx@opt@loccittracker@#1}} {\blx@err@invopt{loccittracker=#1}{}}} @@ -10780,7 +11098,7 @@ \let\blx@loccitreset\blx@loccitreset@context \booltrue{citetracker}} -\DeclareBibliographyOption{parentracker}[true]{% +\DeclareBibliographyOption[boolean]{parentracker}[true]{% \ifstrequal{#1}{true} {\let\bibopenparen\blx@bibopenparen \let\bibcloseparen\blx@bibcloseparen @@ -10791,18 +11109,18 @@ \protected\def\bibopenbracket{\bibleftbracket}% \protected\def\bibclosebracket{\bibrightbracket}}} -\DeclareBibliographyOption{maxparens}{% +\DeclareBibliographyOption[integer]{maxparens}{% \ifnumless{#1}{1} {\blx@err@invopt{maxparens=#1}{}} {\setcounter{maxparens}{#1}}} -\DeclareBibliographyOption{date}{% +\DeclareBibliographyOption[string]{date}{% \ifcsdef{mkbibrange#1} {\protected\def\blx@imc@printdate{\csuse{mkbibrange#1}{}}% \protected\def\blx@imc@printdateextra{\csuse{mkbibrange#1extra}{}}} {\blx@err@invopt{date=#1}{}}} -\DeclareBibliographyOption{datelabel}{% +\DeclareBibliographyOption[string]{datelabel}{% \ifcsdef{mkbibrange#1} {\protected\def\blx@imc@printdatelabel{% \blx@imc@iffieldundef{year} @@ -10814,31 +11132,31 @@ {\csuse{mkbibrange#1extra}{}}}} {\blx@err@invopt{datelabel=#1}{}}} -\DeclareBibliographyOption{urldate}{% +\DeclareBibliographyOption[string]{urldate}{% \ifcsdef{mkbibrange#1} {\protected\def\blx@imc@printurldate{\csuse{mkbibrange#1}{url}}} {\blx@err@invopt{urldate=#1}{}}} -\DeclareBibliographyOption{eventdate}{% +\DeclareBibliographyOption[string]{eventdate}{% \ifcsdef{mkbibrange#1} {\protected\def\blx@imc@printeventdate{\csuse{mkbibrange#1}{event}}} {\blx@err@invopt{eventdate=#1}{}}} -\DeclareBibliographyOption{origdate}{% +\DeclareBibliographyOption[string]{origdate}{% \ifcsdef{mkbibrange#1} {\protected\def\blx@imc@printorigdate{\csuse{mkbibrange#1}{orig}}} {\blx@err@invopt{origdate=#1}{}}} -\DeclareBibliographyOption{alldates}{% +\DeclareBibliographyOption[string]{alldates}{% \ExecuteBibliographyOptions{% date=#1,datelabel=#1,urldate=#1,eventdate=#1,origdate=#1}} -\DeclareBibliographyOption{datezeros}[true]{% +\DeclareBibliographyOption[boolean]{datezeros}[true]{% \ifstrequal{#1}{true} {\let\blx@imc@mkdatezeros\@firstofone} {\let\blx@imc@mkdatezeros\blx@imc@stripzeros}} -\DeclareBibliographyOption{autocite}{% +\DeclareBibliographyOption[string]{autocite}{% \ifcsundef{blx@acite@#1} {\blx@error {Autocite command '#1' undefined} @@ -10847,7 +11165,7 @@ {\letcs\autocite{blx@acite@#1}% \letcs\autocites{blx@macite@#1}}} -\DeclareBibliographyOption{notetype}{% +\DeclareBibliographyOption[string]{notetype}{% \ifcsdef{blx@opt@notetype@#1} {\blx@notetype\csuse{blx@opt@notetype@#1}} {\blx@err@invopt{notetype=#1}{}}} @@ -10855,62 +11173,62 @@ \let\blx@opt@notetype@footonly\@ne \let\blx@opt@notetype@endonly\tw@ -\DeclareBibliographyOption{autopunct}[true]{% +\DeclareBibliographyOption[boolean]{autopunct}[true]{% \ifstrequal{#1}{true} {\DeclareAutoPunctuation{.,;:!?}} {\DeclareAutoPunctuation{}}} -\DeclareBibliographyOption{punctfont}[true]{% +\DeclareBibliographyOption[boolean]{punctfont}[true]{% \ifstrequal{#1}{true} {\let\blx@ifpuncthook\@firstoftwo} {\let\blx@ifpuncthook\@secondoftwo}} -\DeclareBibliographyOption{labelnumber}[true]{% +\DeclareBibliographyOption[boolean]{labelnumber}[true]{% \settoggle{blx@labelnumber}{#1}% \iftoggle{blx@labelnumber} {} {\setkeys{blx@opt@pre}{defernumbers=false}}} -\DeclareTypeOption{labelnumber}[true]{% +\DeclareTypeOption[boolean]{labelnumber}[true]{% \settoggle{blx@labelnumber}{#1}} -\DeclareBibliographyOption{labelalpha}[true]{% +\DeclareBibliographyOption[boolean]{labelalpha}[true]{% \settoggle{blx@labelalpha}{#1}} -\DeclareTypeOption{labelalpha}[true]{% +\DeclareTypeOption[boolean]{labelalpha}[true]{% \settoggle{blx@labelalpha}{#1}} -\DeclareBibliographyOption{labeltitle}[true]{% +\DeclareBibliographyOption[boolean]{labeltitle}[true]{% \settoggle{blx@labeltitle}{#1}} -\DeclareTypeOption{labeltitle}[true]{% +\DeclareTypeOption[boolean]{labeltitle}[true]{% \settoggle{blx@labeltitle}{#1}} -\DeclareBibliographyOption{labeltitleyear}[true]{% +\DeclareBibliographyOption[boolean]{labeltitleyear}[true]{% \settoggle{blx@labeltitleyear}{#1}} -\DeclareTypeOption{labeltitleyear}[true]{% +\DeclareTypeOption[boolean]{labeltitleyear}[true]{% \settoggle{blx@labeltitleyear}{#1}} -\DeclareBibliographyOption{labeldate}[true]{% +\DeclareBibliographyOption[boolean]{labeldate}[true]{% \settoggle{blx@labeldate}{#1}} -\DeclareTypeOption{labeldate}[true]{% +\DeclareTypeOption[boolean]{labeldate}[true]{% \settoggle{blx@labeldate}{#1}} -\DeclareBibliographyOption{labelyear}[true]{% +\DeclareBibliographyOption[boolean]{labelyear}[true]{% \blx@warning@noline{% 'labelyear' option is deprecated, use 'labeldate' instead}% \settoggle{blx@labeldate}{#1}} -\DeclareTypeOption{labelyear}[true]{% +\DeclareTypeOption[boolean]{labelyear}[true]{% \blx@warning@noline{% 'labelyear' option is deprecated, use 'labeldate' instead}% \settoggle{blx@labeldate}{#1}} -\DeclareBibliographyOption{uniquelist}[true]{% +\DeclareBibliographyOption[boolean]{uniquelist}[true]{% \ifcsdef{blx@opt@uniquelist@#1} {\letcs\blx@uniquelist{blx@opt@uniquelist@#1}} {\blx@err@invopt{uniquelist=#1}{}}} -\DeclareTypeOption{uniquelist}[true]{% +\DeclareTypeOption[boolean]{uniquelist}[true]{% \ifcsdef{blx@opt@uniquelist@#1} {\letcs\blx@uniquelist{blx@opt@uniquelist@#1}} {\blx@err@invopt{uniquelist=#1}{}}} -\DeclareEntryOption{uniquelist}[true]{% +\DeclareEntryOption[boolean]{uniquelist}[true]{% \ifcsdef{blx@opt@uniquelist@#1} {\letcs\blx@uniquelist{blx@opt@uniquelist@#1}} {\blx@err@invopt{uniquelist=#1}{}}} @@ -10918,15 +11236,15 @@ \def\blx@opt@uniquelist@true{1} \def\blx@opt@uniquelist@minyear{2} -\DeclareBibliographyOption{uniquename}[true]{% +\DeclareBibliographyOption[boolean]{uniquename}[true]{% \ifcsdef{blx@opt@uniquename@#1} {\letcs\blx@uniquename{blx@opt@uniquename@#1}} {\blx@err@invopt{uniquename=#1}{}}} -\DeclareTypeOption{uniquename}[true]{% +\DeclareTypeOption[boolean]{uniquename}[true]{% \ifcsdef{blx@opt@uniquename@#1} {\letcs\blx@uniquename{blx@opt@uniquename@#1}} {\blx@err@invopt{uniquename=#1}{}}} -\DeclareEntryOption{uniquename}[true]{% +\DeclareEntryOption[boolean]{uniquename}[true]{% \ifcsdef{blx@opt@uniquename@#1} {\letcs\blx@uniquename{blx@opt@uniquename@#1}} {\blx@err@invopt{uniquename=#1}{}}} @@ -10939,12 +11257,12 @@ \def\blx@opt@uniquename@mininit{5} \def\blx@opt@uniquename@minfull{6} -\DeclareBibliographyOption{singletitle}[true]{% +\DeclareBibliographyOption[boolean]{singletitle}[true]{% \settoggle{blx@singletitle}{#1}} -\DeclareTypeOption{singletitle}[true]{% +\DeclareTypeOption[boolean]{singletitle}[true]{% \settoggle{blx@singletitle}{#1}} -\DeclareBibliographyOption{defernumbers}[true]{% +\DeclareBibliographyOption[boolean]{defernumbers}[true]{% \settoggle{blx@defernumbers}{#1}% \iftoggle{blx@defernumbers} {\setkeys{blx@opt@pre}{labelnumber}% @@ -10953,7 +11271,7 @@ {\let\blx@thelabelnumber\relax \let\abx@aux@number\@gobblefive}} -\DeclareBibliographyOption{refsection}{% +\DeclareBibliographyOption[string]{refsection}{% \ifcsdef{blx@opt@refsection@#1} {\letcs\blx@refsecreset@level{blx@opt@refsection@#1}} {\blx@err@invopt{refsection=#1}{}}} @@ -10975,7 +11293,7 @@ \blx@refpatch@sect{subsection}{\newrefsection}{2}% \fi} -\DeclareBibliographyOption{refsegment}{% +\DeclareBibliographyOption[string]{refsegment}{% \ifcsdef{blx@opt@refsegment@#1} {\letcs\blx@refsegreset@level{blx@opt@refsegment@#1}} {\blx@err@invopt{refsegment=#1}{}}} @@ -11007,7 +11325,7 @@ \blx@refpatch@sect{subsection}{\newrefsegment}{2}% \fi} -\DeclareBibliographyOption{citereset}{% +\DeclareBibliographyOption[string]{citereset}{% \ifcsdef{blx@opt@citereset@#1} {\letcs\blx@citereset@level{blx@opt@citereset@#1}} {\blx@err@invopt{citereset=#1}{}}} @@ -11029,58 +11347,58 @@ \blx@refpatch@sect{subsection}{\citereset\blx@inf@creset}{2}% \fi} -\DeclareBibliographyOption{bibwarn}[true]{% +\DeclareBibliographyOption[boolean]{bibwarn}[true]{% \ifstrequal{#1}{true} {\let\blx@bbl@thewarn\blx@bbl@warn} {\let\blx@bbl@thewarn\@gobble}} % Name field options \def\do#1{% - \DeclareBibliographyOption{use#1}[true]{% + \DeclareBibliographyOption[boolean]{use#1}[true]{% \settoggle{blx@use#1}{##1}} - \DeclareTypeOption{use#1}[true]{% + \DeclareTypeOption[boolean]{use#1}[true]{% \settoggle{blx@use#1}{##1}} - \DeclareEntryOption{use#1}[true]{% + \DeclareEntryOption[boolean]{use#1}[true]{% \settoggle{blx@use#1}{##1}}} \dolistcsloop{blx@biber@datamodel@names} % Entry options -\DeclareBibliographyOption{useprefix}[true]{% +\DeclareBibliographyOption[boolean]{useprefix}[true]{% \settoggle{blx@useprefix}{#1}} -\DeclareTypeOption{useprefix}[true]{% +\DeclareTypeOption[boolean]{useprefix}[true]{% \settoggle{blx@useprefix}{#1}} -\DeclareEntryOption{useprefix}[true]{% +\DeclareEntryOption[boolean]{useprefix}[true]{% \settoggle{blx@useprefix}{#1}} -\DeclareTypeOption{skipbib}[true]{% +\DeclareTypeOption[boolean]{skipbib}[true]{% \settoggle{blx@skipbib}{#1}} -\DeclareEntryOption{skipbib}[true]{% +\DeclareEntryOption[boolean]{skipbib}[true]{% \settoggle{blx@skipbib}{#1}} -\DeclareTypeOption{skiplos}{% +\DeclareTypeOption[boolean]{skiplos}{% \blx@warning@noline{% skiplos option is deprecated, use 'skipbiblist' instead}% \settoggle{blx@skipbiblist}{#1}} -\DeclareEntryOption{skiplos}{% +\DeclareEntryOption[boolean]{skiplos}{% \blx@warning@noline{% skiplos option is deprecated, use 'skipbiblist' instead}% \settoggle{blx@skipbiblist}{#1}} -\DeclareTypeOption{skipbiblist}[true]{% +\DeclareTypeOption[boolean]{skipbiblist}[true]{% \settoggle{blx@skipbiblist}{#1}} -\DeclareEntryOption{skipbiblist}[true]{% +\DeclareEntryOption[boolean]{skipbiblist}[true]{% \settoggle{blx@skipbiblist}{#1}} -\DeclareTypeOption{skiplab}[true]{% +\DeclareTypeOption[boolean]{skiplab}[true]{% \settoggle{blx@skiplab}{#1}} -\DeclareEntryOption{skiplab}[true]{% +\DeclareEntryOption[boolean]{skiplab}[true]{% \settoggle{blx@skiplab}{#1}} -\DeclareTypeOption{dataonly}[true]{% +\DeclareTypeOption[boolean]{dataonly}[true]{% \settoggle{blx@skipbib}{#1}% \settoggle{blx@skipbiblist}{#1}% \settoggle{blx@skiplab}{#1}} -\DeclareEntryOption{dataonly}[true]{% +\DeclareEntryOption[boolean]{dataonly}[true]{% \settoggle{blx@skipbib}{#1}% \settoggle{blx@skipbiblist}{#1}% \settoggle{blx@skiplab}{#1}} @@ -11139,7 +11457,7 @@ % Load citation and bibliography styles, configuration file -\blx@inputonce{biblatex.def}{generic definitions}{}{}{}{} +\blx@inputonce{biblatex_.def}{generic definitions}{}{}{}{} \iftoggle{blx@natbib} {\blx@inputonce{blx-natbib.def}{natbib compatibility}{}{}{}{}} {} @@ -11164,22 +11482,22 @@ \c@minnames\blx@mincitenames\relax \c@maxitems\blx@maxitems\relax \c@minitems\blx@minitems\relax - \iftoggle{blx@firstinits} + \iftoggle{blx@giveninits} {\ifnumequal\blx@uniquename\blx@opt@uniquename@full {\blx@warn@conflopt{% - 'firstinits' conflicts with 'uniquename=full'.\MessageBreak + 'giveninits' conflicts with 'uniquename=full'.\MessageBreak Setting 'uniquename=init'}% \setkeys{blx@opt@pre}{uniquename=init}} {}% \ifnumequal\blx@uniquename\blx@opt@uniquename@allfull {\blx@warn@conflopt{% - 'firstinits' conflicts with 'uniquename=allfull'.\MessageBreak + 'giveninits' conflicts with 'uniquename=allfull'.\MessageBreak Setting 'uniquename=allinit}% \setkeys{blx@opt@pre}{uniquename=allinit}} {}% \ifnumequal\blx@uniquename\blx@opt@uniquename@minfull {\blx@warn@conflopt{% - 'firstinits' conflicts with 'uniquename=minfull'.\MessageBreak + 'giveninits' conflicts with 'uniquename=minfull'.\MessageBreak Setting 'uniquename=mininit}% \setkeys{blx@opt@pre}{uniquename=mininit}} {}} @@ -11256,6 +11574,9 @@ \AtBeginDocument{% \blx@auxwrite\@mainaux{}{\string\abx@aux@sortscheme{\blx@sorting}}% + \def\do#1{% + \blx@auxwrite\@mainaux{}{\string\abx@aux@sortnamekeyscheme{#1}}} + \dolistloop\blx@sortnamekeyschemes \blx@checkencoding \if@filesw \blx@ctrlwrite@biber @@ -11277,6 +11598,7 @@ \renewcommand*{\DeclareDatamodelFields}[2][]{\blx@warn@dm{DeclareDatamodelFields}} \renewcommand*{\DeclareDatamodelEntryfields}[2][]{\blx@warn@dm{DeclareDatamodelEntryfields}} \renewcommand*{\DeclareDatamodelConstraints}[2][]{\blx@warn@dm{DeclareDatamodelConstraints}} + \renewcommand*{\DeclareDatamodelConstant}[3][]{\blx@warn@dm{DeclareDatamodelConstant}} \AtBeginDocument{% \let\do\undef \blx@dopreamblecmds diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex_legacy.def b/Master/texmf-dist/tex/latex/biblatex/biblatex_legacy.def new file mode 100644 index 00000000000..602e84205f1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex_legacy.def @@ -0,0 +1,2262 @@ +% -*- mode: LaTeX -*- +\ProvidesFile{biblatex_legacy.def} + +% ------------------------------------------------------------------ +% FORMATTING COMMANDS +% ------------------------------------------------------------------ + +% Generic formatting commands and hooks +% ------------------------------------------------------------------ + +% Used in citations, bibliography and bibliography lists + +\newcommand*{\mkbibnamegiven}[1]{#1} +\newcommand*{\mkbibnamefirst}[1]{#1}% legacy alias +\newcommand*{\mkbibnamefamily}[1]{#1} +\newcommand*{\mkbibnamelast}[1]{#1}% legacy alias +\newcommand*{\mkbibnameprefix}[1]{#1} +\newcommand*{\mkbibnameaffix}[1]{#1} +\newcommand*{\bibellipsis}{[\textellipsis\unkern]\midsentence} + +% Delimiters used in citations, bibliography and bibliography lists + +\newcommand*{\multinamedelim}{\addcomma\space} +\newcommand*{\finalnamedelim}{% + \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% + \addspace\bibstring{and}\space} +\newcommand*{\revsdnamedelim}{} +\newcommand*{\andothersdelim}{\addspace} + +\newcommand*{\multilistdelim}{\addcomma\space} +\newcommand*{\finallistdelim}{% + \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% + \addspace\bibstring{and}\space} +\newcommand*{\andmoredelim}{\addspace} + +% Used in citations + +\newcommand*{\multicitedelim}{\addsemicolon\space} +\newcommand*{\compcitedelim}{\addcomma\space} +\newcommand*{\supercitedelim}{\addcomma} +\newcommand*{\prenotedelim}{\addspace} +\newcommand*{\postnotedelim}{\addcomma\space} +\newcommand*{\extpostnotedelim}{\addspace} +\newcommand*{\nametitledelim}{\addcomma\space} +\newcommand*{\nameyeardelim}{\addspace} +\newcommand*{\nonameyeardelim}{\addspace} +\newcommand*{\volcitedelim}{\addcomma\space} +\newcommand*{\textcitedelim}{% + \iffinalcitedelim + {\ifnumgreater{\value{textcitetotal}}{2} + {\iftextcitepunct{\finalandsemicolon}{\finalandcomma}}{}% + \addspace\bibstring{and}} + {\iftextcitepunct{\addsemicolon}{\addcomma}}% + \space} + +% This is a provisional definition for \iffinalcitedelim{<true>}{<false>}, a +% test that should expand <true> if the next non-compact citation delimiter +% is the last one in the citation list printed by \textcite or \textcites. +\newcommand*{\iffinalcitedelim}{\@secondoftwo} + +% Expand <true> if the citation labels in the citation list printed by \textcite +% or \textcites contains the serial comma \finalandcomma +\newcommand*{\iftextcitepunct}{% + \ifboolexpr{ not test {\ifdefempty{\finalandsemicolon}} + and test {\ifnumgreater{\value{textcitemaxnames}}{2}} }} + +% Counters for the number of citation labels separated by non-compact delimiters +% in the citation list printed by \textcite or \textcites. Counter values should +% be managed by the citation style. +\newcounter{textcitecount} +\newcounter{textcitetotal} +\setcounter{textcitecount}{0} +\setcounter{textcitetotal}{0} + +% Counters for the maximum number of names among citation labels in the citation +% list printed by \textcite or \textcites. Counter value should be managed by +% the citation style. +\newcounter{textcitemaxnames} +\setcounter{textcitemaxnames}{0} + +% Used in the bibliography and bibliography lists + +\newcommand*{\newunitpunct}{\addperiod\space} +\newcommand*{\entrysetpunct}{\addsemicolon\space} +\newcommand*{\finentrypunct}{\addperiod} +\newcommand*{\labelnamepunct}{\newunitpunct} +\newcommand*{\subtitlepunct}{\newunitpunct} +\newcommand*{\intitlepunct}{\addcolon\space} +\newcommand*{\bibpagespunct}{\addcomma\space} +\newcommand*{\bibpagerefpunct}{\addspace} +\newcommand*{\revsdnamepunct}{\addcomma} +\newcommand*{\bibnamedash}{% + \ifdimless{\leftmargin}{0.75em} + {\mbox{\textemdash\space}} + {\makebox[\leftmargin][l]{% + \ifdimless{\leftmargin}{1.25em} + {\textendash} + {\textemdash}}}} +\newcommand*{\relatedpunct}{\addspace} +\newcommand*{\relateddelim}{\adddot\par\nobreak} +\newcommand{\mkrelatedstring}{\mainlang} + +% Used for indexing + +\newcommand*{\bibindexnamedelima}{ } +\newcommand*{\bibindexnamedelimb}{ } +\newcommand*{\bibindexnamedelimc}{ } +\newcommand*{\bibindexnamedelimd}{ } +\newcommand*{\bibindexnamedelimi}{ } +\newcommand*{\bibindexinitperiod}{.} +\newcommand*{\bibindexinitdelim}{ } +\newcommand*{\bibindexinithyphendelim}{.-} + +% \bibsetup is a generic hook controlling the (low-level) layout of +% the bibliography and bibliography lists. The default +% definition should work fine in most cases. + +\newcommand*{\bibsetup}{% + \interlinepenalty=5000\relax + \widowpenalty=10000\relax + \clubpenalty=10000\relax + \raggedbottom + \frenchspacing + \biburlsetup} + +% The penalties above are not specific to biblatex. These are +% low-level TeX features. \interlinepenalty is the penalty assigned +% to page breaks within a paragraph (i.e., in this case, a +% bibliography entry); \clubpenalty is an additional penalty +% assigned to page breaks after the first line of a paragraph; +% \widowpenalty is an additional penalty assigned to page breaks +% before the last line of a paragraph. Note that the value 10000 +% means 'infinite' as far as TeX is concerned. Setting a penalty to +% 10000 will unconditionally suppress the respective breakpoint. +% +% The net effect of the above settings is as follows. Breaking a +% bibliography entry across pages is discouraged, but not suppressed +% altogether. If a bibliography entry spans less than four lines, +% TeX will always keep it on one page. If it spans four or more +% lines, it may be broken across pages, provided that there are at +% least two lines on the page before and after the break. +% +% These penalties should normally be used in conjunction with +% \raggedbottom. If you don't like that and remove \raggedbottom +% from the definition of \bibsetup, make sure to provide some +% stretchability between bibliography entries by setting \bibitemsep +% to a suitable value, e.g.: +% +% \setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip} +% +% Using \frenchspacing in the bibliography is recommended. If you +% want more visual separation, try the package option 'block=space'. +% This will yield better results than \nonfrenchspacing. + +% \citesetup is a generic hook for citations. + +\newcommand*{\citesetup}{% + \biburlsetup} + +% Local setup for \url; see comments in url.sty for details. + +\newcounter{biburlnumpenalty} +\newcounter{biburlucpenalty} +\newcounter{biburllcpenalty} + +\newcommand*{\biburlsetup}{% + \Urlmuskip=0mu plus 3mu\relax + \mathchardef\UrlBigBreakPenalty=100\relax + \mathchardef\UrlBreakPenalty=200\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}}}}% + \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}}}}% + \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}}}}% + \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} + {}% + \let\do=\noexpand} + +% The above code allows linebreaks before numbers and letters. +% This is often the only way to break DOIs. It also allows breaks +% after hyphens and adjusts \Urlmuskip to add some stretchability +% to URLs. + +% The default font of the bibliography and the bibliography lists. +% We simply reset the current font to the global defaults. + +\newcommand*{\bibfont}{\normalfont\normalsize} + +% Some length registers which may be used to fine-tune the +% (high-level) layout of the bibliography. + +% Default \bibhang to 1em if \parindent is 0 for some reason +\setlength{\bibhang}{\ifnumequal{\parindent}{0}{1em}{\parindent}} +\setlength{\biblabelsep}{2\labelsep} +\setlength{\bibitemsep}{\itemsep} +\setlength{\bibnamesep}{0pt} +\setlength{\bibinitsep}{0pt} +\setlength{\bibparsep}{0pt} + +% Miscellaneous facilities +% ------------------------------------------------------------------ + +% The counter 'abbrvpenalty' holds the penalty used in short or +% abbreviated bibliography strings. For example, a linebreak in +% expressions such as "et al." or "ed. by" is unfortunate, but should +% still be possible to prevent overfull boxes. We use TeX's +% \hyphenpenalty (normally 50) as the default value. The idea is +% making TeX treat the whole expression as if it were a single, +% hyphenatable word as far as line-breaking is concerned. If you +% dislike such linebreaks, use a higher value. If you do not mind +% them at all, set this counter to zero. If you want to suppress them +% unconditionally, set it to 10000. +\defcounter{abbrvpenalty}{\hyphenpenalty} + +% The counter 'highnamepenalty' also holds a penalty affecting the +% line-breaking of names. This penalty is inserted between smaller +% chunks of a name, for example between the first and the middle +% name. The default value is \hyphenpenalty. If you dislike such +% linebreaks, use a higher value. If you do not mind them at all, +% set this counter to zero. If you prefer the traditional BibTeX +% behavior, set it to 10000. +\defcounter{highnamepenalty}{\hyphenpenalty} + +% The counter 'lownamepenalty' holds a penalty which affects the +% line-breaking of names. This penalty is inserted between larger +% chunks of a name, for example between the chunk consisting of all +% first names and the last name. The default value is half the +% \hyphenpenalty. If you dislike such linebreaks, use a higher +% value. If you do not mind them at all, set this counter to zero. +\defcounter{lownamepenalty}{\hyphenpenalty/2} + +% Note that default values assigned to the above counters are +% deliberately very low to prevent overfull boxes. This implies that +% you will hardly notice any effect on line-breaking if the text is +% set justified. If you set these counters to 10000 to suppress the +% respective breakpoints, you will notice their effect but you may +% also be confronted with overfull boxes. Keep in mind that +% line-breaking in the bibliography is often more difficult than in +% the body text and that you can not resort to rephrasing a +% sentence. In some cases it may be preferable to set the entire +% bibliography \raggedright (by modifying \bibsetup) to prevent +% suboptimal linebreaks. In this case, even the very low default +% penalties will make a visible difference. + +% File name prefixes for external abstracts and annotations +\newcommand*{\bibabstractprefix}{bibabstract-} +\newcommand*{\bibannotationprefix}{bibannotation-} + +% Print acronyms in small caps if possible +\newcommand*{\mkbibacro}[1]{% + \ifcsundef{\f@encoding/\f@family/\f@series/sc} + {#1} + {\textsc{\MakeLowercase{#1}}}} + +% ------------------------------------------------------------------ +% ADDITIONAL PACKAGE OPTIONS +% ------------------------------------------------------------------ + +% Style of compressed page ranges in back references + +\DeclareBibliographyOption[string]{backrefstyle}{% + \ifcsdef{abx@opt@pagerefstyle@#1} + {\letcs\abx@pagerefstyle{abx@opt@pagerefstyle@#1}} + {\PackageError{biblatex} + {Option 'backrefstyle=#1' invalid} + {The option you have supplied is invalid.\MessageBreak + See the biblatex manual for valid option keys + and possible values}}} +\newcommand*{\abx@pagerefstyle}{1} +\csdef{abx@opt@pagerefstyle@none}{-1} +\csdef{abx@opt@pagerefstyle@two}{0} +\csdef{abx@opt@pagerefstyle@three}{1} +\csdef{abx@opt@pagerefstyle@two+}{2} +\csdef{abx@opt@pagerefstyle@three+}{3} +\csdef{abx@opt@pagerefstyle@all+}{4} + +% arXiv path/format selector +% +% abs = abstract page +% ps = PostScript version +% pdf = PDF version +% format = format selector + +\DeclareBibliographyOption[string]{arxiv}{\def\abx@arxivpath{#1}} +\newcommand*{\abx@arxivpath}{abs} + +% ------------------------------------------------------------------ +% FIELD FORMATS (#1 is the value of the field) +% ------------------------------------------------------------------ + +% The fallback used by \printfield + +\DeclareFieldFormat{default}{#1} + +% The default used by \citefield + +\DeclareFieldFormat{citefield}{#1} + +% Used in citations + +\DeclareFieldFormat{citetitle}{\mkbibemph{#1}} +\DeclareFieldFormat + [article,inbook,incollection,inproceedings,patent,thesis,unpublished] + {citetitle}{\mkbibquote{#1\isdot}} +\DeclareFieldFormat + [suppbook,suppcollection,suppperiodical] + {citetitle}{#1} +% labelyear can be a localisation string to allow for "no date" etc. +\DeclareFieldFormat{labelyear}{% = the '1995' part in 'Jones 1995a' + \ifbibstring{#1}{\bibstring{#1}}{\stripzeros{#1}}} +\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a' + \iffieldnums{labelyear} + {\mknumalph{#1}} + {\mkbibparens{\mknumalph{#1}}}} +\DeclareFieldFormat{labelalpha}{#1}% = the 'Jon95' part of 'Jon95a' +\DeclareFieldFormat{extraalpha}{\mknumalph{#1}}% = the 'a' in 'Jon95a' +\DeclareFieldFormat{shorthand}{#1\isdot} +\DeclareFieldFormat{shorthandintro}{% + \ifcapital{\MakeCapital{#1}}{#1}\isdot} +% citation commands +\DeclareFieldFormat{prenote}{#1\isdot} +\DeclareFieldFormat{postnote}{\mkpageprefix[pagination]{#1}} +\DeclareFieldFormat{volcitevolume}{\bibstring{volume}\ppspace#1} +\DeclareFieldFormat{volcitepages}{\mkpageprefix[pagination]{#1}} +\DeclareFieldFormat{volcitenote}{\mkvolcitenote#1} +\newrobustcmd*{\mkvolcitenote}[2]{% + \printtext[volcitevolume]{#1}% + \ifblank{#2}{}{\volcitedelim\printtext[volcitepages]{#2}}} + +% multicite commands +\DeclareFieldFormat{multiprenote}{#1\isdot} +\DeclareFieldFormat{multipostnote}{\mkpageprefix[pagination]{#1}} + +% Used by \citeurl + +\DeclareFieldFormat{citeurl}{\url{#1}} + +% Used in the bibliography and bibliography lists + +\DeclareFieldFormat{doi}{% + \mkbibacro{DOI}\addcolon\space + \ifhyperref + {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}} + {\nolinkurl{#1}}} +\DeclareFieldFormat{edition}{% + \ifinteger{#1} + {\mkbibordedition{#1}~\bibstring{edition}} + {#1\isdot}} +\DeclareFieldFormat{eprint}{% + \iffieldundef{eprinttype} + {eprint} + {\thefield{eprinttype}}% + \addcolon\space + \ifhyperref + {\url{#1}} + {\nolinkurl{#1}}% + \iffieldundef{eprintclass} + {} + {\addspace\mkbibparens{\thefield{eprintclass}}}} +\DeclareFieldFormat{eprint:hdl}{% + HDL\addcolon\space + \ifhyperref + {\href{http://hdl.handle.net/#1}{\nolinkurl{#1}}} + {\nolinkurl{#1}}} +\DeclareFieldAlias{eprint:HDL}{eprint:hdl} +\DeclareFieldFormat{eprint:arxiv}{% + arXiv\addcolon\space + \ifhyperref + {\href{http://arxiv.org/\abx@arxivpath/#1}{% + \nolinkurl{#1}% + \iffieldundef{eprintclass} + {} + {\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}} + {\nolinkurl{#1} + \iffieldundef{eprintclass} + {} + {\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}} +\DeclareFieldAlias{eprint:arXiv}{eprint:arxiv} +\DeclareFieldFormat{eprint:jstor}{% + JSTOR\addcolon\space + \ifhyperref + {\href{http://www.jstor.org/stable/#1}{\nolinkurl{#1}}} + {\nolinkurl{#1}}} +\DeclareFieldAlias{eprint:JSTOR}{eprint:jstor} +\DeclareFieldFormat{eprint:pubmed}{% + PMID\addcolon\space + \ifhyperref + {\href{http://www.ncbi.nlm.nih.gov/pubmed/#1}{\nolinkurl{#1}}} + {\nolinkurl{#1}}} +\DeclareFieldAlias{eprint:PubMed}{eprint:pubmed} +\DeclareFieldFormat{eprint:googlebooks}{% + Google Books\addcolon\space + \ifhyperref + {\href{http://books.google.com/books?id=#1}{\nolinkurl{#1}}} + {\nolinkurl{#1}}} +\DeclareFieldAlias{eprint:Google Books}{eprint:googlebooks} +\DeclareFieldFormat{file}{\url{#1}} +\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{issuetitle}{\mkbibemph{#1}} +\DeclareFieldFormat{maintitle}{\mkbibemph{#1}} +\DeclareFieldFormat{booktitle}{\mkbibemph{#1}} +\DeclareFieldFormat{chapter}{\bibstring{chapter}~#1} +\DeclareFieldFormat{month}{\mkbibmonth{#1}} +\DeclareFieldFormat{note}{#1\isdot} +\DeclareFieldFormat{number}{#1}% number in a series +\DeclareFieldFormat[article,periodical]{number}{#1}% number of a journal +\DeclareFieldFormat{pages}{\mkpageprefix[bookpagination]{#1}} +\DeclareFieldFormat{pagetotal}{\mkpagetotal[bookpagination]{#1}} +\DeclareFieldFormat{part}{.#1}% physical part of a logical volume +\DeclareFieldFormat{series}{#1}% publication series +\DeclareFieldFormat[article,periodical]{series}{% series of a journal + \ifinteger{#1} + {\mkbibordseries{#1}~\bibstring{jourser}} + {\ifbibstring{#1}{\bibstring{#1}}{#1}}} +\DeclareFieldFormat{pubstate}{\ifbibstring{#1}{\bibstring{#1}}{#1}} +\DeclareFieldFormat{title}{\mkbibemph{#1}} +\DeclareFieldFormat + [article,inbook,incollection,inproceedings,patent,thesis,unpublished] + {title}{\mkbibquote{#1\isdot}} +\DeclareFieldFormat + [suppbook,suppcollection,suppperiodical] + {title}{#1} +\DeclareFieldFormat{type}{\ifbibstring{#1}{\bibstring{#1}}{#1}} +\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}} +\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}} +\DeclareFieldFormat{version}{\bibstring{version}~#1} +\DeclareFieldFormat{volume}{\bibstring{volume}~#1}% volume of a book +\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal +\DeclareFieldFormat{volumes}{#1~\bibstring{volumes}} +\DeclareFieldFormat{related}{#1} +\DeclareFieldFormat{related:multivolume}{\par\nobreak#1} +\DeclareFieldFormat{related:origpubin}{\mkbibparens{#1}} +\DeclareFieldFormat{related:origpubas}{\mkbibparens{#1}} +\DeclareFieldFormat{relatedstring:default}{#1\printunit{\relatedpunct}} +\DeclareFieldFormat{relatedstring:reprintfrom}{#1\addspace} + +% Generic formats for \printtext and \printfield + +\DeclareFieldFormat{emph}{\mkbibemph{#1}} +\DeclareFieldFormat{bold}{\textbf{#1}} +\DeclareFieldFormat{smallcaps}{\textsc{#1}} +\DeclareFieldFormat{parens}{\mkbibparens{#1}} +\DeclareFieldFormat{brackets}{\mkbibbrackets{#1}} +\DeclareFieldFormat{bibhyperref}{\bibhyperref{#1}} +\DeclareFieldFormat{bibhyperlink}{\bibhyperlink{\thefield{entrykey}}{#1}} +\DeclareFieldFormat{bibhypertarget}{\bibhypertarget{\thefield{entrykey}}{#1}} +\DeclareFieldFormat{titlecase}{#1} +\DeclareFieldFormat{noformat}{#1} + +% ------------------------------------------------------------------ +% LITERAL LIST FORMATS (#1 is the current item) +% ------------------------------------------------------------------ + +% Formatting directives for literal lists +% ------------------------------------------------------------------ + +% The fallback used by \printlist + +\DeclareListFormat{default}{% + \usebibmacro{list:delim}{#1}% + #1\isdot + \usebibmacro{list:andothers}} + +% The default used by \citelist + +\DeclareListAlias{citelist}{default} + +% Used in the bibliography + +\DeclareListFormat{publisher}{% + \usebibmacro{list:delim}{#1}% + #1\isdot + \usebibmacro{list:andothers}} + +\DeclareListFormat{language}{% + \usebibmacro{list:delim}{% + \ifbibstring{#1} + {\bibxstring{#1}} + {\ifbibstring{lang#1} + {\bibxstring{lang#1}} + {#1}}}% + \ifbibstring{#1} + {\bibstring{#1}} + {\ifbibstring{lang#1} + {\bibstring{lang#1}} + {#1}}% + \usebibmacro{list:andothers}} + +\DeclareListFormat{location}{% + \usebibmacro{list:delim}{#1}% + #1\isdot + \usebibmacro{list:andothers}} + +\DeclareListFormat[patent]{location}{% + \usebibmacro{list:plain}% + \ifbibstring{#1}{\bibstring{#1}}{#1\isdot}% + \usebibmacro{list:andothers}} + +\DeclareListFormat{pageref}{% + \ifnumless{\abx@pagerefstyle}{0} + {\usebibmacro{list:plain}% + \ifhyperref + {\hyperlink{page.#1}{#1}} + {#1}} + {\ifnumequal{\value{listcount}}{1} + {\usebibmacro{pageref:init}} + {}% + \usebibmacro{pageref:comp}{#1}% + \ifnumequal{\value{listcount}}{\value{liststop}} + {\usebibmacro{pageref:dump}} + {}}} + +\DeclareListAlias{origlocation}{location} +\DeclareListAlias{origpublisher}{publisher} +\DeclareListAlias{institution}{default} +\DeclareListAlias{organization}{default} + +% Auxiliary macros for list formatting directives +% ------------------------------------------------------------------ + +\newbibmacro*{list:delim}[1]{% + \ifnumgreater{\value{listcount}}{\value{liststart}} + {\ifboolexpr{ + test {\ifnumless{\value{listcount}}{\value{liststop}}} + or + test \ifmoreitems + } + {\multilistdelim} + {\lbx@finallistdelim{#1}}} + {}} + +\newbibmacro*{list:plain}{% + \ifnumgreater{\value{listcount}}{\value{liststart}} + {\multilistdelim} + {}} + +\newbibmacro*{list:andothers}{% + \ifboolexpr{ + test {\ifnumequal{\value{listcount}}{\value{liststop}}} + and + test \ifmoreitems + } + {\ifnumgreater{\value{liststop}}{1} + {\finalandcomma} + {}% + \andmoredelim\bibstring{andmore}} + {}} + +\newbibmacro*{pageref:init}{% + \let\abx@range@hold=\empty + \def\abx@range@diff{0}% + \def\abx@range@prev{-1}% + \def\abx@range@this{0}% + \def\abx@range@last{-1}} + +\newbibmacro*{pageref:comp}[1]{% + \numdef\abx@range@prev{\abx@range@prev+1}% + \ifinteger{#1} + {\def\abx@range@num{#1}% + \def\abx@range@this{1}% + \ifnumequal{\abx@range@this}{\abx@range@last} + {} + {\def\abx@range@prev{-1}}} + {\ifrmnum{#1} + {\numdef\abx@range@num{\rmntonum{#1}}% + \def\abx@range@this{2}% + \ifnumequal{\abx@range@this}{\abx@range@last} + {} + {\def\abx@range@prev{-1}}} + {\undef\abx@range@num + \def\abx@range@this{0}% + \def\abx@range@prev{-1}}}% + \ifdef\abx@range@num + {\ifnumequal{\abx@range@num}{\abx@range@prev} + {\def\abx@range@hold{#1}% + \numdef\abx@range@diff{\abx@range@diff+1}} + {\usebibmacro{pageref:dump}% + \ifnumgreater{\abx@range@last}{-1} + {\multilistdelim} + {}% + \ifhyperref + {\hyperlink{page.#1}{#1}} + {#1}}% + \edef\abx@range@prev{\abx@range@num}} + {\usebibmacro{pageref:dump}% + \ifnumgreater{\abx@range@last}{-1} + {\multilistdelim} + {}% + \ifhyperref + {\hyperlink{page.#1}{#1}} + {#1}% + \def\abx@range@prev{-1}}% + \edef\abx@range@last{\abx@range@this}} + +\newbibmacro*{pageref:dump}{% + \ifnumgreater{\abx@range@diff}{0} + {\ifcase\abx@pagerefstyle\relax % two + \bibrangedash + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\abx@range@hold}} + {\abx@range@hold}% + \or % three + \ifnumless{\abx@range@diff}{2} + {\multilistdelim} + {\bibrangedash}% + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\abx@range@hold}} + {\abx@range@hold}% + \or % two+ + \ifnumless{\abx@range@diff}{2} + {\sqspace + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}} + {\bibstring{sequens}}} + {\bibrangedash + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\abx@range@hold}} + {\abx@range@hold}}% + \or % three+ + \ifnumless{\abx@range@diff}{2} + {\sqspace + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}} + {\bibstring{sequens}}} + {\ifnumless{\abx@range@diff}{3} + {\sqspace + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\bibstring{sequentes}}} + {\bibstring{sequentes}}} + {\bibrangedash + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\abx@range@hold}} + {\abx@range@hold}}}% + \else % all+ + \ifnumless{\abx@range@diff}{2} + {\sqspace + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\bibstring{sequens}}} + {\bibstring{sequens}}} + {\sqspace + \ifhyperref + {\hyperlink{page.\abx@range@hold}{\bibstring{sequentes}}} + {\bibstring{sequentes}}}% + \fi + \def\abx@range@diff{0}} + {}} + +% ------------------------------------------------------------------ +% NAME LIST FORMATS +% ------------------------------------------------------------------ + +% Arguments passed to formatting directives for name lists: +% +% #1 = family name(s) +% #2 = family name(s) (initials) +% #3 = given name(s) +% #4 = given name(s) (initials) +% #5 = detachable name prefix +% #6 = detachable name prefix (initials) +% #7 = detachable name suffix +% #8 = detachable name suffix (initials) + +% Formatting directives for name lists +% ------------------------------------------------------------------ + +\DeclareNameAlias{first-last}{given-family}% legacy alias +\DeclareNameFormat{given-family}{% + \ifgiveninits + {\usebibmacro{name:given-family}{#1}{#4}{#5}{#7}} + {\usebibmacro{name:given-family}{#1}{#3}{#5}{#7}}% + \usebibmacro{name:andothers}} + +\DeclareNameAlias{last-first}{family-given}% legacy alias +\DeclareNameFormat{family-given}{% + \ifgiveninits + {\usebibmacro{name:family-given}{#1}{#4}{#5}{#7}} + {\usebibmacro{name:family-given}{#1}{#3}{#5}{#7}}% + \usebibmacro{name:andothers}} + +\DeclareNameAlias{last-first/first-last}{family-given/given-family}% legacy alias +\DeclareNameFormat{family-given/given-family}{% + \ifnumequal{\value{listcount}}{1} + {\ifgiveninits + {\usebibmacro{name:family-given}{#1}{#4}{#5}{#7}} + {\usebibmacro{name:family-given}{#1}{#3}{#5}{#7}}% + \ifblank{#3#5} + {} + {\usebibmacro{name:revsdelim}}} + {\ifgiveninits + {\usebibmacro{name:given-family}{#1}{#4}{#5}{#7}} + {\usebibmacro{name:given-family}{#1}{#3}{#5}{#7}}}% + \usebibmacro{name:andothers}} + +\DeclareNameFormat{initsonly}{% + \usebibmacro{name:given-family}{#2}{#4}{#6}{#8}% + \usebibmacro{name:andothers}} + +% Fallback used by \printnames + +\DeclareNameAlias{default}{given-family} + +% Default used by \citename + +\DeclareNameAlias{citename}{default} + +% Used in some citations + +\DeclareNameFormat{labelname}{% + \ifcase\value{uniquename}% + \usebibmacro{name:family}{#1}{#3}{#5}{#7}% + \or + \ifuseprefix + {\usebibmacro{name:given-family}{#1}{#4}{#5}{#8}} + {\usebibmacro{name:given-family}{#1}{#4}{#6}{#8}}% + \or + \usebibmacro{name:given-family}{#1}{#3}{#5}{#7}% + \fi + \usebibmacro{name:andothers}} + +% Used in the bibliography + +\DeclareNameAlias{sortname}{family-given/given-family} + +\DeclareNameAlias{author}{default} +\DeclareNameAlias{bookauthor}{author} +\DeclareNameAlias{editor}{default} +\DeclareNameAlias{editora}{editor} +\DeclareNameAlias{editorb}{editor} +\DeclareNameAlias{editorc}{editor} +\DeclareNameAlias{translator}{default} + +\DeclareNameAlias{byauthor}{default} +\DeclareNameAlias{bybookauthor}{byauthor} +\DeclareNameAlias{byeditor}{default} +\DeclareNameAlias{byeditora}{byeditor} +\DeclareNameAlias{byeditorb}{byeditor} +\DeclareNameAlias{byeditorc}{byeditor} +\DeclareNameAlias{bytranslator}{default} + +\DeclareNameAlias{withcommentator}{default} +\DeclareNameAlias{withannotator}{default} +\DeclareNameAlias{withintroduction}{default} +\DeclareNameAlias{withforeword}{default} +\DeclareNameAlias{withafterword}{default} + +\DeclareFieldFormat{authortype}{#1} +\DeclareFieldFormat{editortype}{#1} + +% Auxiliary macros for name formatting directives +% ------------------------------------------------------------------ + +\newbibmacro*{name:family}[4]{% + \ifuseprefix + {\usebibmacro{name:delim}{#3#1}% + \usebibmacro{name:hook}{#3#1}% + \ifblank{#3} + {} + {\ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{#3}\isdot}% + \ifprefchar{}{\bibnamedelimc}}} + {\usebibmacro{name:delim}{#1}% + \usebibmacro{name:hook}{#1}}% + \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}} + +\newbibmacro*{name:given-family}[4]{% + \usebibmacro{name:delim}{#2#3#1}% + \usebibmacro{name:hook}{#2#3#1}% + \ifblank{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}% + \ifblank{#3}{}{% + \mkbibnameprefix{#3}\isdot + \ifprefchar + {} + {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}% + \mkbibnamefamily{#1}\isdot + \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#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}} + +\newbibmacro*{name:family-given}[4]{% + \ifuseprefix + {\usebibmacro{name:delim}{#3#1}% + \usebibmacro{name:hook}{#3#1}% + \ifblank{#3}{}{% + \ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{#3}\isdot}% + \ifprefchar{}{\bibnamedelimc}}% + \mkbibnamefamily{#1}\isdot + \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% + \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#2}\isdot}} + {\usebibmacro{name:delim}{#1}% + \usebibmacro{name:hook}{#1}% + \mkbibnamefamily{#1}\isdot + \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% + \ifblank{#2#3}{}{\revsdnamepunct}% + \ifblank{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}% + \ifblank{#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'}% + \usebibmacro{name:family-given}{#1}{#2}{#3}{#4}} + +\newbibmacro*{name:hook}[1]{% + \ifnumequal{\value{listcount}}{1} + {\lbx@initnamehook{#1}} + {}} + +\newbibmacro*{name:delim}[1]{% + \ifnumgreater{\value{listcount}}{\value{liststart}} + {\ifboolexpr{ + test {\ifnumless{\value{listcount}}{\value{liststop}}} + or + test \ifmorenames + } + {\multinamedelim} + {\lbx@finalnamedelim{#1}}} + {}} + +\newbibmacro*{name:revsdelim}{% + \ifboolexpr{ + ( + test {\ifnumequal{\value{liststop}}{1}} + and + test \ifmorenames + ) + or + test {\ifnumequal{\value{liststop}}{2}} + } + {\revsdnamedelim} + {}} + +\newbibmacro*{name:andothers}{% + \ifboolexpr{ + test {\ifnumequal{\value{listcount}}{\value{liststop}}} + and + test \ifmorenames + } + {\ifnumgreater{\value{liststop}}{1} + {\finalandcomma} + {}% + \andothersdelim\bibstring{andothers}} + {}} + +% ------------------------------------------------------------------ +% INDEX FORMATS FOR FIELDS (#1 is the value of the field) +% ------------------------------------------------------------------ + +% There is no need to test if a field to be indexed is empty because +% \indexfield performs this test implicitly. + +% The fallback used by \indexfield + +\DeclareIndexFieldFormat{default}{\index{#1}} + +% Used in the bibliography and in citations + +\DeclareIndexFieldFormat{indextitle}{% + \usebibmacro{index:title}{\index}{#1}} + +\newbibmacro*{index:title}[2]{% + \usebibmacro{index:field}{#1}{\thefield{indexsorttitle}}{\emph{#2}}} + +\newbibmacro*{index:field}[3]{% + \usebibmacro{index:entry}{#1}{\mkbibindexfield{#2}{#3}}} + +% Auxiliary macros for field indexing directives +% ------------------------------------------------------------------ + +\newbibmacro*{index:entry}[2]{% + \begingroup + \protected@edef\theindexentry{\unexpanded{#1}{#2}}% + \theindexentry + \endgroup} + +\newcommand*{\mkbibindexfield}[2]{\mkbibindexentry{#1}{\unexpanded{#2}}} +\newcommand*{\mkbibindexentry}[2]{#1\actualoperator#2} + +% ------------------------------------------------------------------ +% INDEX FORMATS FOR LITERAL LISTS (#1 is the current item) +% ------------------------------------------------------------------ + +% The fallback used by \indexlist + +\DeclareIndexListFormat{default}{\index{#1}} + +% ------------------------------------------------------------------ +% INDEX FORMATS FOR NAME LISTS +% ------------------------------------------------------------------ + +% Argments passed to indexing directives for name lists: +% +% #1 = family name(s) +% #2 = family name(s) (initials) +% #3 = given name(s) +% #4 = given name(s) (initials) +% #5 = detachable name prefix +% #6 = detachable name prefix (initials) +% #7 = detachable name suffix +% #8 = detachable name suffix (initials) + +% Indexing directives for name lists +% ------------------------------------------------------------------ + +% The fallback used by \indexnames + +\DeclareIndexNameFormat{default}{% + \usebibmacro{index:name}{\index}{#1}{#3}{#5}{#7}} + +% Used in citations + +\DeclareIndexNameAlias{labelname}{default} + +% Used in the bibliography + +\DeclareIndexNameAlias{author}{default} +\DeclareIndexNameAlias{editor}{default} +\DeclareIndexNameAlias{bookauthor}{default} + +% Auxiliary macros for name indexing directives +% ------------------------------------------------------------------ + +% When generating an index entry, we need to test which parts of a +% name are actually available to prevent spurious punctuation and +% spaces. Since those parts which are not available yield an empty +% argument, we can use the \ifblank test from etoolbox.sty to analyze +% the name. +% +% Note that the standard LaTeX \index command simply writes its +% argument to the .idx file without preventing expansion. This means +% that all \ifblank tests are expanded on the way and will not end +% up in the index. The index package, however, prevents expansion. +% This would lead to \ifblank ending up in the .idx file. To avoid +% that, we preprocess the index entry inside an \edef. We use +% \unexpanded to protect the \index command and the actual data from +% expansion. This definition will work with both index.sty and the +% standard indexing facilities. +% +% We also use \ifuseprefix to ensure that the name prefix is handled +% properly. \actualoperator is the so-called actual operator, as +% defined by the 'actual' specifier in the .ist file. The makeindex +% program will use the part preceeding the \actualoperator +% delimiter for sorting. The part after the delimiter is used as the +% index is printed. Note that this is not specific to biblatex, see +% the makeindex documentation for details. + +\newcommand*{\actualoperator}{@} +\newcommand*{\subentryoperator}{!} + +\newbibmacro*{index:name}[5]{% + \usebibmacro{index:entry}{#1}{\mkbibindexname{#2}{#3}{#4}{#5}}} + +% {<family name>}{<given name>}{<given initials>}{<family name prefix>} + +\newcommand*{\mkbibindexname}[4]{% + \ifuseprefix + {\ifblank{#3}{}{#3 }% + \@firstofone #1% remove spurious braces + \ifblank{#4}{}{ #4}% + \ifblank{#2}{}{, #2}% + \actualoperator + \ifblank{#3}{}{\MakeCapital{#3} }% + #1% + \ifblank{#4}{}{ #4}% + \ifblank{#2}{}{, #2}} + {\@firstofone #1% remove spurious braces + \ifblank{#4}{}{ #4}% + \ifblank{#2#3}{}{,}% + \ifblank{#2}{}{ #2}% + \ifblank{#3}{}{ #3}}} + +% {<control sequence>}{<control sequence>} + +\newcommand*{\mkbibindexsubentry}[2]{% + \ifblank{#1}{}{\subentryoperator#1\actualoperator#2}} + +% Additional macros with subentries + +\newbibmacro*{index:name:field}[6]{% + \usebibmacro{index:name:subentry}{#1}{#2}{#3}{#4}{#5} + {\thefield{#6}}{\csfield{#6}}} + +\newbibmacro*{index:name:title}[5]{% + \usebibmacro{index:name:subentry}{#1}{#2}{#3}{#4}{#5} + {\thefield{indexsorttitle}}{\emph{\csfield{indextitle}}}} + +\newbibmacro*{index:name:subentry}[7]{% + \usebibmacro{index:entry}{#1}{% + \mkbibindexname{#2}{#3}{#4}{#5}\mkbibindexsubentry{#6}{#7}}} + +% ------------------------------------------------------------------ +% MACROS FOR LBX FILES +% ------------------------------------------------------------------ + +\newcommand*{\lbx@initnamehook}[1]{} +\newcommand*{\lbx@inittitlehook}[1]{} +\newcommand*{\lbx@finalnamedelim}[1]{\finalnamedelim} +\newcommand*{\lbx@finallistdelim}[1]{\finallistdelim} + +\newcommand*{\lbx@lfromlang}{% + \iffieldundef{origlanguage} + {\unspace} + {\biblstring{from\thefield{origlanguage}}}} + +\newcommand*{\lbx@sfromlang}{% + \iffieldundef{origlanguage} + {\unspace} + {\bibsstring{from\thefield{origlanguage}}}} + +% ------------------------------------------------------------------ +% MISCELLANEOUS +% ------------------------------------------------------------------ + +% ordinals + +\newcommand*{\mkbibordedition}{\mkbibordinal} +\newcommand*{\mkbibordseries}{\mkbibordinal} + +% american + +\newrobustcmd*{\uspunctuation}{% + \DeclareQuotePunctuation{.,}% + \DeclarePunctuationPairs{comma}{*}} +\newrobustcmd*{\stdpunctuation}{% + \DeclareQuotePunctuation{}% + \DeclarePunctuationPairs{comma}{*!?}} + +% catalan and french + +\newtoggle{smartof} +\newrobustcmd*{\smartof}{\global\toggletrue{smartof}} +\newrobustcmd*{\forceD}[1]{#1} +\newrobustcmd*{\forceDE}[1]{#1} + +\AtBeginDocument{% + \@ifpackageloaded{babel} + {\ifdef\AutoSpaceBeforeFDP + {\newrobustcmd*{\EnsureAutoSpaceBeforeFDP}{% + \iflanguage{french} + {\AutoSpaceBeforeFDP} + {}}% + \appto\bibsetup{\EnsureAutoSpaceBeforeFDP}% + \appto\citesetup{\EnsureAutoSpaceBeforeFDP}} + {}} + {}} + +% spanish + +\newcounter{smartand} +\defcounter{smartand}{1} +\newrobustcmd*{\forceY}[1]{#1} +\newrobustcmd*{\forceE}[1]{#1} + +% ------------------------------------------------------------------ +% PREDEFINED HEADINGS +% ------------------------------------------------------------------ + +\newcommand*{\abx@classtype}{0} +\@ifclassloaded{article} + {} + {\@ifclassloaded{book} + {\def\abx@classtype{1}} + {\@ifclassloaded{report} + {\def\abx@classtype{1}} + {\@ifclassloaded{scrartcl} + {\def\abx@classtype{2}} + {\@ifclassloaded{scrbook} + {\def\abx@classtype{3}} + {\@ifclassloaded{scrreprt} + {\def\abx@classtype{3}} + {\@ifclassloaded{memoir} + {\ifbool{artopt} + {\def\abx@classtype{4}} + {\def\abx@classtype{5}}} + {\ifundef\chapter + {} + {\def\abx@classtype{1}}}}}}}}} + +\defbibheading{none}{} + +\ifcase\abx@classtype\relax % article + \defbibheading{bibliography}[\refname]{% + \section*{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{biblist}[\biblistname]{% + \section*{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{bibintoc}[\refname]{% + \section*{#1}% + \addcontentsline{toc}{section}{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{biblistintoc}[\biblistname]{% + \section*{#1}% + \addcontentsline{toc}{section}{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{bibnumbered}[\refname]{% + \section{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{biblistnumbered}[\biblistname]{% + \section{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{subbibliography}[\refname]{% + \subsection*{#1}} + \defbibheading{subbibintoc}[\refname]{% + \subsection*{#1}% + \addcontentsline{toc}{subsection}{#1}} + \defbibheading{subbibnumbered}[\refname]{% + \subsection{#1}} + +\or % book/report + \defbibheading{bibliography}[\bibname]{% + \chapter*{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{biblist}[\biblistname]{% + \chapter*{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{bibintoc}[\bibname]{% + \chapter*{#1}% + \addcontentsline{toc}{chapter}{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{biblistintoc}[\biblistname]{% + \chapter*{#1}% + \addcontentsline{toc}{chapter}{#1}% + \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}} + \defbibheading{bibnumbered}[\bibname]{% + \chapter{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{biblistnumbered}[\biblistname]{% + \chapter{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{subbibliography}[\refname]{% + \section*{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{subbibintoc}[\refname]{% + \section*{#1}% + \addcontentsline{toc}{section}{#1}% + \if@twoside\markright{\MakeUppercase{#1}}\fi} + \defbibheading{subbibnumbered}[\refname]{% + \section{#1}} + +\or % scrartcl + \defbibheading{bibliography}[\refname]{% + \ifkomabibtotocnumbered + {\section{#1}} + {\ifkomabibtotoc + {\addsec{#1}} + {\section*{#1}}% + \markboth{#1}{#1}}} + \defbibheading{biblist}[\biblistname]{% + \ifkomabibtotocnumbered + {\section{#1}} + {\ifkomabibtotoc + {\addsec{#1}} + {\section*{#1}}% + \markboth{#1}{#1}}} + \defbibheading{bibintoc}[\refname]{% + \addsec{#1}% + \markboth{#1}{#1}} + \defbibheading{biblistintoc}[\biblistname]{% + \addsec{#1}% + \markboth{#1}{#1}} + \defbibheading{bibnumbered}[\refname]{% + \section{#1}% + \markboth{\sectionmarkformat#1}{\sectionmarkformat#1}} + \defbibheading{biblistnumbered}[\biblistname]{% + \section{#1}% + \markboth{\sectionmarkformat#1}{\sectionmarkformat#1}} + \defbibheading{subbibliography}[\refname]{% + \subsection*{#1}} + \defbibheading{subbibintoc}[\refname]{% + \subsection*{#1}% + \addcontentsline{toc}{subsection}{#1}} + \defbibheading{subbibnumbered}[\refname]{% + \subsection{#1}} + +\or % scrbook/scrreprt + \defbibheading{bibliography}[\bibname]{% + \ifkomabibtotocnumbered + {\chapter{#1}} + {\ifkomabibtotoc + {\addchap{#1}} + {\chapter*{#1}}% + \markboth{#1}{#1}}} + \defbibheading{biblist}[\biblistname]{% + \ifkomabibtotocnumbered + {\chapter{#1}} + {\ifkomabibtotoc + {\addchap{#1}} + {\chapter*{#1}}% + \markboth{#1}{#1}}} + \defbibheading{bibintoc}[\bibname]{% + \addchap{#1}% + \markboth{#1}{#1}} + \defbibheading{biblistintoc}[\biblistname]{% + \addchap{#1}% + \markboth{#1}{#1}} + \defbibheading{bibnumbered}[\bibname]{% + \chapter{#1}% + \markboth{\chaptermarkformat#1}{\chaptermarkformat#1}} + \defbibheading{biblistnumbered}[\biblistname]{% + \chapter{#1}% + \markboth{\chaptermarkformat#1}{\chaptermarkformat#1}} + \defbibheading{subbibliography}[\refname]{% + \section*{#1}% + \if@twoside\markright{#1}\fi} + \defbibheading{subbibintoc}[\refname]{% + \addsec{#1}% + \markboth{#1}{#1}} + \defbibheading{subbibnumbered}[\refname]{% + \section{#1}} + +\or % memoir (article) + \ifdef\memUChead{}{\let\memUChead\MakeUppercase} + \defbibheading{bibliography}[\refname]{% + \chapter*{#1}% + \ifmemoirbibintoc + {\phantomsection + \addcontentsline{toc}{chapter}{#1}} + {}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{biblist}[\biblistname]{% + \chapter*{#1}% + \ifmemoirbibintoc + {\phantomsection + \addcontentsline{toc}{chapter}{#1}} + {}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{bibintoc}[\refname]{% + \chapter*{#1}% + \phantomsection + \addcontentsline{toc}{chapter}{#1}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{biblistintoc}[\biblistname]{% + \chapter*{#1}% + \phantomsection + \addcontentsline{toc}{chapter}{#1}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{bibnumbered}[\refname]{% + \chapter{#1}} + \defbibheading{biblistnumbered}[\biblistname]{% + \chapter{#1}} + \defbibheading{subbibliography}[\refname]{% + \section*{#1}% + \ifmemoirbibintoc + {\phantomsection + \addcontentsline{toc}{section}{#1}} + {}% + \if@twoside\markright{\memUChead{#1}}\fi} + \defbibheading{subbibintoc}[\refname]{% + \section*{#1}% + \phantomsection + \addcontentsline{toc}{section}{#1}% + \if@twoside\markright{\memUChead{#1}}\fi} + \defbibheading{subbibnumbered}[\refname]{% + \section{#1}} + +\or % memoir (book) + \ifdef\memUChead{}{\let\memUChead\MakeUppercase} + \defbibheading{bibliography}[\bibname]{% + \chapter*{#1}% + \ifmemoirbibintoc + {\phantomsection + \addcontentsline{toc}{chapter}{#1}} + {}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{biblist}[\biblistname]{% + \chapter*{#1}% + \ifmemoirbibintoc + {\phantomsection + \addcontentsline{toc}{chapter}{#1}} + {}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{bibintoc}[\bibname]{% + \chapter*{#1}% + \phantomsection + \addcontentsline{toc}{chapter}{#1}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{biblistintoc}[\biblistname]{% + \chapter*{#1}% + \phantomsection + \addcontentsline{toc}{chapter}{#1}% + \markboth{\memUChead{#1}}{\memUChead{#1}}} + \defbibheading{bibnumbered}[\bibname]{% + \chapter{#1}% + \if@twoside\markright{\memUChead{#1}}\fi} + \defbibheading{biblistnumbered}[\biblistname]{% + \chapter{#1}% + \if@twoside\markright{\memUChead{#1}}\fi} + \defbibheading{subbibliography}[\refname]{% + \section*{#1}% + \ifmemoirbibintoc + {\phantomsection + \addcontentsline{toc}{section}{#1}} + {}% + \if@twoside\markright{\memUChead{#1}}\fi} + \defbibheading{subbibintoc}[\refname]{% + \section*{#1}% + \phantomsection + \addcontentsline{toc}{section}{#1}% + \if@twoside\markright{\memUChead{#1}}\fi} + \defbibheading{subbibnumbered}[\refname]{% + \section{#1}} + +\fi + +% ------------------------------------------------------------------ +% GENERIC CITATION COMMANDS +% ------------------------------------------------------------------ + +\DeclareCiteCommand{\fullcite} + {\usebibmacro{prenote}} + {\usedriver + {\DeclareNameAlias{sortname}{default}} + {\thefield{entrytype}}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\footfullcite}[\mkbibfootnote] + {\usebibmacro{prenote}} + {\usedriver + {\DeclareNameAlias{sortname}{default}} + {\thefield{entrytype}}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\citeauthor} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\ifciteindex + {\indexnames{labelname}} + {}% + \printnames{labelname}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand*{\citeauthor} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\ifciteindex + {\indexnames{labelname}} + {}% + \printnames[][1-1]{labelname}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\citetitle} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\ifciteindex + {\indexfield{indextitle}} + {}% + \printfield[citetitle]{labeltitle}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand*{\citetitle} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\ifciteindex + {\indexfield{indextitle}} + {}% + \printfield[citetitle]{title}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\citeyear} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printfield{year}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand*{\citeyear} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printfield{year}\printfield{extrayear}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\citedate} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printdate} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand*{\citedate} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printdateextra} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\citeurl} + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}} + {\printfield[citeurl]{url}} + {\multicitedelim} + {\usebibmacro{postnote}} + +\DeclareCiteCommand{\notecite} + {\printfield{prenote}% + \setunit*{\prenotedelim}} + {\nocite{\thefield{entrykey}}} + {} + {\printfield{postnote}} + +\DeclareCiteCommand{\pnotecite}[\mkbibparens] + {\printfield{prenote}% + \setunit*{\prenotedelim}} + {\nocite{\thefield{entrykey}}} + {} + {\printfield{postnote}} + +\DeclareCiteCommand{\fnotecite}[\mkbibfootnote] + {\printfield{prenote}% + \setunit*{\prenotedelim}} + {\nocite{\thefield{entrykey}}} + {} + {\printfield{postnote}} + +\newrobustcmd*{\volcite}{\volcitecmd\cite} +\newrobustcmd*{\pvolcite}{\volcitecmd\parencite} +\newrobustcmd*{\fvolcite}{\volcitecmd\footcite} +\newrobustcmd*{\ftvolcite}{\volcitecmd\footcitetext} +\newrobustcmd*{\svolcite}{\volcitecmd\smartcite} +\newrobustcmd*{\tvolcite}{\volcitecmd\textcite} +\newrobustcmd*{\avolcite}{\volcitecmd\autocite} + +\newrobustcmd*{\volcites}{\multivolcitecmd\cites} +\newrobustcmd*{\pvolcites}{\multivolcitecmd\parencites} +\newrobustcmd*{\fvolcites}{\multivolcitecmd\footcites} +\newrobustcmd*{\ftvolcites}{\multivolcitecmd\footcitetexts} +\newrobustcmd*{\svolcites}{\multivolcitecmd\smartcites} +\newrobustcmd*{\tvolcites}{\multivolcitecmd\textcites} +\newrobustcmd*{\avolcites}{\multivolcitecmd\autocites} + +\newrobustcmd*{\Cite}{\bibsentence\cite} +\newrobustcmd*{\Parencite}{\bibsentence\parencite} +\newrobustcmd*{\Footcite}{\footcite} +\newrobustcmd*{\Footcitetext}{\footcitetext} +\newrobustcmd*{\Smartcite}{\bibsentence\smartcite} +\newrobustcmd*{\Textcite}{\bibsentence\textcite} +\newrobustcmd*{\Citeauthor}{% + \@ifstar{\bibsentence\citeauthor*}{\bibsentence\citeauthor}} +\newrobustcmd*{\Citetitle}{\bibsentence\citetitle} + +\newrobustcmd*{\Volcite}{\volcitecmd\Cite} +\newrobustcmd*{\Pvolcite}{\volcitecmd\Parencite} +\newrobustcmd*{\Fvolcite}{\volcitecmd\Footcite} +\newrobustcmd*{\Ftvolcite}{\volcitecmd\Footcitetext} +\newrobustcmd*{\Svolcite}{\volcitecmd\Smartcite} +\newrobustcmd*{\Tvolcite}{\volcitecmd\Textcite} +\newrobustcmd*{\Avolcite}{\volcitecmd\Autocite} + +\newrobustcmd*{\Volcites}{\multivolcitecmd\Cites} +\newrobustcmd*{\Pvolcites}{\multivolcitecmd\Parencites} +\newrobustcmd*{\Fvolcites}{\multivolcitecmd\Footcites} +\newrobustcmd*{\Ftvolcites}{\multivolcitecmd\Footcitetext} +\newrobustcmd*{\Svolcites}{\multivolcitecmd\Smartcites} +\newrobustcmd*{\Tvolcites}{\multivolcitecmd\Textcites} +\newrobustcmd*{\Avolcites}{\multivolcitecmd\Autocites} + +\newrobustcmd*{\Notecite}{\bibsentence\notecite} +\newrobustcmd*{\Pnotecite}{\bibsentence\pnotecite} +\newrobustcmd*{\Fnotecite}{\fnotecite} + +\DeclareMultiCiteCommand{\cites}{\cite}{\multicitedelim} +\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\multicitedelim} +\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{\multicitedelim} +\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext] + {\footcitetext}{\multicitedelim} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote] + {\smartcite}{\multicitedelim} +\DeclareMultiCiteCommand{\supercites}[\mkbibsuperscript] + {\supercite}{\supercitedelim} +\DeclareMultiCiteCommand{\textcites}{\textcite}{\multicitedelim} + +\newrobustcmd*{\Cites}{\bibsentence\cites} +\newrobustcmd*{\Parencites}{\bibsentence\parencites} +\newrobustcmd*{\Footcites}{\footcites} +\newrobustcmd*{\Footcitetexts}{\footcitetexts} +\newrobustcmd*{\Smartcites}{\bibsentence\smartcites} +\newrobustcmd*{\Textcites}{\bibsentence\textcites} + +\DeclareAutoCiteCommand{plain}{\cite}{\cites} +\DeclareAutoCiteCommand{inline}{\parencite}{\parencites} +%\DeclareAutoCiteCommand{footnote}[l]{\footcite}{\footcites} +\DeclareAutoCiteCommand{footnote}[f]{\smartcite}{\smartcites} +\DeclareAutoCiteCommand{superscript}[l]{\supercite}{\supercites} + +\newrobustcmd*{\Autocite}{\bibsentence\autocite} +\newrobustcmd*{\Autocites}{\bibsentence\autocites} + +% ------------------------------------------------------------------ +% GENERIC CITATION MACROS +% ------------------------------------------------------------------ + +\newbibmacro*{citeindex}{% + \ifciteindex + {\indexnames{labelname}% + \indexfield{indextitle}} + {}} + +\newbibmacro*{shorthandintro}{% + \iffieldundef{shorthandintro} + {\iffieldundef{shorthand} + {} + {\setunit{\addspace}% + \printtext[parens]{% + \bibstring{citedas}\space + \printfield{shorthand}}}} + {\setunit{\addspace}% + \printtext[parens]{\printfield{shorthandintro}}}} + +% citation commands + +\newbibmacro*{prenote}{% + \iffieldundef{prenote} + {} + {\printfield{prenote}% + \setunit{\prenotedelim}}} + +\newbibmacro*{postnote}{% + \iffieldundef{postnote} + {} + {\setunit{\postnotedelim}% + \printfield{postnote}}} + +% multicite commands + +\newbibmacro*{multiprenote}{% + \iffieldundef{multiprenote} + {} + {\printfield{multiprenote}% + \prenotedelim}} + +\newbibmacro*{multipostnote}{% + \iffieldundef{multipostnote} + {} + {\postnotedelim + \printfield{multipostnote}}} + +% ------------------------------------------------------------------ +% GENERIC BIBLIOGRAPHY MACROS +% ------------------------------------------------------------------ + +\newbibmacro*{bibindex}{% + \ifbibindex + {\indexnames{labelname}% + \indexfield{indextitle}} + {}} + +\newbibmacro*{author/editor}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{author}} + {\usebibmacro{editor}}} + +\newbibmacro*{author/editor+others}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{author}} + {\usebibmacro{editor+others}}} + +\newbibmacro*{author/translator}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{author}} + {\usebibmacro{translator}}} + +\newbibmacro*{author/translator+others}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{author}} + {\usebibmacro{translator+others}}} + +\newbibmacro*{author/editor/translator}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{author}} + {\ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{editor}} + {\usebibmacro{translator}}}} + +\newbibmacro*{author/editor+others/translator+others}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\usebibmacro{author}} + {\ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{editor+others}} + {\usebibmacro{translator+others}}}} + +\newbibmacro*{author}{% + \ifboolexpr{ + test \ifuseauthor + and + not test {\ifnameundef{author}} + } + {\printnames{author}% + \iffieldundef{authortype} + {} + {\setunit{\addcomma\space}% + \usebibmacro{authorstrg}}} + {}} + +\newbibmacro*{editor}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\printnames{editor}% + \setunit{\addcomma\space}% + \usebibmacro{editorstrg}% + \clearname{editor}} + {}} + +\newbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\printnames{editor}% + \setunit{\addcomma\space}% + \usebibmacro{editor+othersstrg}% + \clearname{editor}} + {}} + +\newbibmacro*{translator}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } + {\printnames{translator}% + \setunit{\addcomma\space}% + \usebibmacro{translatorstrg}% + \clearname{translator}} + {}} + +\newbibmacro*{translator+others}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } + {\printnames{translator}% + \setunit{\addcomma\space}% + \usebibmacro{translator+othersstrg}% + \clearname{translator}} + {}} + +\newbibmacro*{authorstrg}{% + \iffieldundef{authortype} + {} + {\printtext[authortype]{% + \ifbibxstring{\thefield{authortype}} + {\ifboolexpr{ + test {\ifnumgreater{\value{author}}{1}} + or + test {\ifandothers{author}} + } + {\bibstring{\thefield{authortype}s}} + {\bibstring{\thefield{authortype}}}} + {\thefield{authortype}}}}} + +\newbibmacro*{editorstrg}{% + \printtext[editortype]{% + \iffieldundef{editortype} + {\ifboolexpr{ + test {\ifnumgreater{\value{editor}}{1}} + or + test {\ifandothers{editor}} + } + {\bibstring{editors}} + {\bibstring{editor}}} + {\ifbibxstring{\thefield{editortype}} + {\ifboolexpr{ + test {\ifnumgreater{\value{editor}}{1}} + or + test {\ifandothers{editor}} + } + {\bibstring{\thefield{editortype}s}} + {\bibstring{\thefield{editortype}}}} + {\thefield{editortype}}}}} + +\newbibmacro*{editor+othersstrg}{% + \iffieldundef{editortype} + {\ifboolexpr{ + test {\ifnumgreater{\value{editor}}{1}} + or + test {\ifandothers{editor}} + } + {\def\abx@tempa{editors}} + {\def\abx@tempa{editor}}} + {\ifboolexpr{ + test {\ifnumgreater{\value{editor}}{1}} + or + test {\ifandothers{editor}} + } + {\edef\abx@tempa{\thefield{editortype}s}} + {\edef\abx@tempa{\thefield{editortype}}}}% + \let\abx@tempb=\empty + \ifnamesequal{editor}{translator} + {\appto\abx@tempa{tr}% + \appto\abx@tempb{\clearname{translator}}} + {}% + \ifnamesequal{editor}{commentator} + {\appto\abx@tempa{co}% + \appto\abx@tempb{\clearname{commentator}}} + {\ifnamesequal{editor}{annotator} + {\appto\abx@tempa{an}% + \appto\abx@tempb{\clearname{annotator}}} + {}}% + \ifnamesequal{editor}{introduction} + {\appto\abx@tempa{in}% + \appto\abx@tempb{\clearname{introduction}}} + {\ifnamesequal{editor}{foreword} + {\appto\abx@tempa{fo}% + \appto\abx@tempb{\clearname{foreword}}} + {\ifnamesequal{editor}{afterword} + {\appto\abx@tempa{af}% + \appto\abx@tempb{\clearname{afterword}}} + {}}}% + \ifbibxstring{\abx@tempa} + {\printtext[editortype]{\bibstring{\abx@tempa}}\abx@tempb} + {\usebibmacro{editorstrg}}} + +\newbibmacro*{translatorstrg}{% + \ifboolexpr{ + test {\ifnumgreater{\value{translator}}{1}} + or + test {\ifandothers{translator}} + } + {\bibstring{translators}} + {\bibstring{translator}}} + +\newbibmacro*{translator+othersstrg}{% + \ifboolexpr{ + test {\ifnumgreater{\value{translator}}{1}} + or + test {\ifandothers{translator}} + } + {\def\abx@tempa{translators}} + {\def\abx@tempa{translator}}% + \ifnamesequal{translator}{commentator} + {\appto\abx@tempa{co}% + \clearname{commentator}} + {\ifnamesequal{translator}{annotator} + {\appto\abx@tempa{an}% + \clearname{annotator}} + {}}% + \ifnamesequal{translator}{introduction} + {\appto\abx@tempa{in}% + \clearname{introduction}} + {\ifnamesequal{translator}{foreword} + {\appto\abx@tempa{fo}% + \clearname{foreword}} + {\ifnamesequal{translator}{afterword} + {\appto\abx@tempa{af}% + \clearname{afterword}} + {}}}% + \bibstring{\abx@tempa}} + +\newbibmacro*{byauthor}{% + \ifboolexpr{ + test \ifuseauthor + or + test {\ifnameundef{author}} + } + {} + {\usebibmacro{bytypestrg}{author}{author}% + \setunit{\addspace}% + \printnames[byauthor]{author}}} + +\newbibmacro*{bybookauthor}{% + \ifnamesequal{author}{bookauthor} + {} + {\printnames{bookauthor}}} + +\newbibmacro*{byeditor}{% + \ifnameundef{editor} + {} + {\usebibmacro{bytypestrg}{editor}{editor}% + \setunit{\addspace}% + \printnames[byeditor]{editor}% + \newunit}% + \usebibmacro{byeditorx}} + +\newbibmacro*{byeditorx}{% + \ifnameundef{editora} + {} + {\usebibmacro{bytypestrg}{editora}{editor}% + \setunit{\addspace}% + \printnames[byeditora]{editora}% + \newunit}% + \ifnameundef{editorb} + {} + {\usebibmacro{bytypestrg}{editorb}{editor}% + \setunit{\addspace}% + \printnames[byeditorb]{editorb}% + \newunit}% + \ifnameundef{editorc} + {} + {\usebibmacro{bytypestrg}{editorc}{editor}% + \setunit{\addspace}% + \printnames[byeditorc]{editorc}% + \newunit}} + +\newbibmacro*{bytranslator}{% + \ifnameundef{translator} + {} + {\bibstring{bytranslator}% + \setunit{\addspace}% + \printnames[bytranslator]{translator}}} + +\newbibmacro*{byholder}{% + \printnames{holder}} + +\newbibmacro*{byeditor+others}{% + \ifnameundef{editor} + {} + {\usebibmacro{byeditor+othersstrg}% + \setunit{\addspace}% + \printnames[byeditor]{editor}% + \clearname{editor}% + \newunit}% + \usebibmacro{byeditorx}% + \usebibmacro{bytranslator+others}} + +\newbibmacro*{bytranslator+others}{% + \ifnameundef{translator} + {} + {\usebibmacro{bytranslator+othersstrg}% + \setunit{\addspace}% + \printnames[bytranslator]{translator}% + \clearname{translator}% + \newunit}% + \usebibmacro{withothers}} + +\newbibmacro*{bytypestrg}[2]{% + \iffieldundef{#1type} + {\bibstring{by#2}} + {\ifbibxstring{by\thefield{#1type}} + {\bibstring{by\thefield{#1type}}} + {\printtext{\thefield{#1type}}}}} + +\newbibmacro*{byeditor+othersstrg}{% + \iffieldundef{editortype} + {\def\abx@tempa{byeditor}} + {\edef\abx@tempa{by\thefield{editortype}}}% + \let\abx@tempb=\empty + \ifnamesequal{editor}{translator} + {\appto\abx@tempa{tr}% + \appto\abx@tempb{\clearname{translator}}} + {}% + \ifnamesequal{editor}{commentator} + {\appto\abx@tempa{co}% + \appto\abx@tempb{\clearname{commentator}}} + {\ifnamesequal{editor}{annotator} + {\appto\abx@tempa{an}% + \appto\abx@tempb{\clearname{annotator}}} + {}}% + \ifnamesequal{editor}{introduction} + {\appto\abx@tempa{in}% + \appto\abx@tempb{\clearname{introduction}}} + {\ifnamesequal{editor}{foreword} + {\appto\abx@tempa{fo}% + \appto\abx@tempb{\clearname{foreword}}} + {\ifnamesequal{editor}{afterword} + {\appto\abx@tempa{af}% + \appto\abx@tempb{\clearname{afterword}}} + {}}}% + \ifbibxstring{\abx@tempa} + {\printtext{\bibstring{\abx@tempa}}\abx@tempb} + {\usebibmacro{bytypestrg}{editor}{editor}}} + +\newbibmacro*{bytranslator+othersstrg}{% + \def\abx@tempa{bytranslator}% + \ifnamesequal{translator}{commentator} + {\appto\abx@tempa{co}% + \clearname{commentator}} + {\ifnamesequal{translator}{annotator} + {\appto\abx@tempa{an}% + \clearname{annotator}} + {}}% + \ifnamesequal{translator}{introduction} + {\appto\abx@tempa{in}% + \clearname{introduction}} + {\ifnamesequal{translator}{foreword} + {\appto\abx@tempa{fo}% + \clearname{foreword}} + {\ifnamesequal{translator}{afterword} + {\appto\abx@tempa{af}% + \clearname{afterword}} + {}}}% + \bibstring{\abx@tempa}} + +\newbibmacro*{withcommentator}{% + \ifnameundef{commentator} + {} + {\bibstring{withcommentator}% + \setunit{\addspace}% + \printnames[withcommentator]{commentator}}} + +\newbibmacro*{withannotator}{% + \ifnameundef{annotator} + {} + {\bibstring{withannotator}% + \setunit{\addspace}% + \printnames[withannotator]{annotator}}} + +\newbibmacro*{withintroduction}{% + \ifnameundef{introduction} + {} + {\bibstring{withintroduction}% + \setunit{\addspace}% + \printnames[withintroduction]{introduction}}} + +\newbibmacro*{withforeword}{% + \ifnameundef{foreword} + {} + {\bibstring{withforeword}% + \setunit{\addspace}% + \printnames[withforeword]{foreword}}} + +\newbibmacro*{withafterword}{% + \ifnameundef{afterword} + {} + {\bibstring{withafterword}% + \setunit{\addspace}% + \printnames[withafterword]{afterword}}} + +\newbibmacro*{withothers}{% + \usebibmacro{withcommentator}% + \clearname{commentator}% + \newunit + \usebibmacro{withannotator}% + \clearname{annotator}% + \newunit + \usebibmacro{withintroduction}% + \clearname{introduction}% + \newunit + \usebibmacro{withforeword}% + \clearname{foreword}% + \newunit + \usebibmacro{withafterword}% + \clearname{afterword}} + +\newbibmacro*{title}{% + \ifboolexpr{ + test {\iffieldundef{title}} + and + test {\iffieldundef{subtitle}} + } + {} + {\printtext[title]{% + \printfield[titlecase]{title}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{subtitle}}% + \newunit}% + \printfield{titleaddon}} + +\newbibmacro*{booktitle}{% + \ifboolexpr{ + test {\iffieldundef{booktitle}} + and + test {\iffieldundef{booksubtitle}} + } + {} + {\printtext[booktitle]{% + \printfield[titlecase]{booktitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{booksubtitle}}% + \newunit}% + \printfield{booktitleaddon}} + +\newbibmacro*{maintitle}{% + \ifboolexpr{ + test {\iffieldundef{maintitle}} + and + test {\iffieldundef{mainsubtitle}} + } + {} + {\printtext[maintitle]{% + \printfield[titlecase]{maintitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{mainsubtitle}}% + \newunit}% + \printfield{maintitleaddon}} + +\newbibmacro*{journal}{% + \iffieldundef{journaltitle} + {} + {\printtext[journaltitle]{% + \printfield[titlecase]{journaltitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{journalsubtitle}}}} + +\newbibmacro*{periodical}{% + \iffieldundef{title} + {} + {\printtext[title]{% + \printfield[titlecase]{title}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{subtitle}}}} + +\newbibmacro*{issue}{% + \iffieldundef{issuetitle} + {} + {\printtext[issuetitle]{% + \printfield[titlecase]{issuetitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{issuesubtitle}}}} + +\newbibmacro*{in:}{% + \printtext{% + \bibstring{in}\intitlepunct}} + +\newbibmacro*{date}{\printdate} + +\newbibmacro*{url+urldate}{% + \usebibmacro{url}% + \iffieldundef{urlyear} + {} + {\setunit*{\addspace}% + \usebibmacro{urldate}}} + +\newbibmacro*{url}{\printfield{url}} +\newbibmacro*{urldate}{\printurldate} + +\newbibmacro*{pageref}{% + \iflistundef{pageref} + {} + {\printtext[parens]{% + \ifnumgreater{\value{pageref}}{1} + {\bibstring{backrefpages}\ppspace} + {\bibstring{backrefpage}\ppspace}% + \printlist[pageref][-\value{listtotal}]{pageref}}}} + +\newbibmacro*{setpageref}{% + \iflistundef{pageref} + {} + {\printtext{% + \ifnumgreater{\value{pageref}}{1} + {\bibstring{backrefpages}\ppspace} + {\bibstring{backrefpage}\ppspace}% + \printlist[pageref][-\value{listtotal}]{pageref}}}} + +\newbibmacro*{eprint}{% + \iffieldundef{eprinttype} + {\printfield{eprint}} + {\printfield[eprint:\strfield{eprinttype}]{eprint}}} + +\newbibmacro*{annotation}{% + \iffieldundef{annotation} + {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}} + {\printfield{annotation}}} + +\newbibmacro*{abstract}{% + \iffieldundef{abstract} + {\printfile[abstract]{\bibabstractprefix\thefield{entrykey}.tex}} + {\printfield{abstract}}} + +\newbibmacro*{related:default}[1]{% + \entrydata*{#1}{% + \usedriver + {\ifnameundef{savedauthor} + {\ifnameundef{savededitor} + {} + {\ifnamesequal{editor}{savededitor} + {\clearname{editor}} + {}}} + {\ifnamesequal{author}{savedauthor} + {\clearname{author}} + {}}% + \renewbibmacro*{related:init}{}% + \DeclareNameAlias{sortname}{default}% + \ifbibmacroundef{date+extrayear} + {} + {\renewbibmacro*{date+extrayear}{}% + \renewbibmacro*{date}{\printdate}}% + \renewbibmacro*{pageref}{}} + {\thefield{entrytype}}}} + +\newbibmacro*{related:bytranslator}[1]{% + \entrydata{#1}{% + \renewbibmacro*{name:hook}[1]{% + \ifnumequal{\value{listcount}}{1} + {\begingroup + \mkrelatedstring% + \lbx@initnamehook{#1}% + \endgroup} + {}}% + \printnames[bytranslator]{translator}% + \setunit*{\addspace\bibstring[\mkrelatedstring]{astitle}\space}% + \usebibmacro{title}% + \setunit{\addspace}% + \printtext[parens]{% + \printlist{location}% + \iflistundef{publisher} + {\setunit*{\addcomma\space}} + {\setunit*{\addcolon\space}}% + \printlist{publisher}% + \setunit*{\addcomma\space}% + \printdate}}} + +\newbibmacro*{related:multivolume}[1]{% + \entrydata*{#1}{% + \printtext{% + \printfield{volume}% + \printfield{part}}% + \setunit*{\addcolon\space}% + \usebibmacro{title}% + \ifboolexpr{ + test {\ifnamesequal{author}{savedauthor}} + or + test {\ifnameundef{author}} + } + {} + {\usebibmacro{bytypestrg}{author}{author}% + \setunit{\addspace}% + \printnames[byauthor]{author} + \newunit\newblock}% + \ifboolexpr{ + test {\ifnamesequal{editor}{savededitor}} + or + test {\ifnameundef{editor}} + } + {} + {\usebibmacro{byeditor+others}% + \newunit\newblock}% + \printdate}} + +\newbibmacro*{related:origpubin}[1]{% + \entrydata*{#1}{% + \printfield{year}% + \ifboolexpr{ + test {\iflistsequal{publisher}{savedpublisher}} + or + test {\iflistundef{publisher}} + } + {} + {\setunit{\addspace\bibstring[\mkrelatedstring]{bypublisher}\space}% + \printlist{publisher}% + \setunit{\addcomma\space}% + \iflistsequal{location}{savedlocation} + {} + {\printlist{location}}}}} + +\newbibmacro*{related:origpubas}[1]{% + \entrydata*{#1}{% + \usebibmacro{title}% + \ifboolexpr{ + test {\iflistsequal{publisher}{savedpublisher}} + or + test {\iflistundef{publisher}} + } + {} + {\setunit{\addspace\bibstring[\mkrelatedstring]{bypublisher}\space}% + \printlist{publisher}% + \setunit{\addcomma\space}% + \iflistsequal{location}{savedlocation} + {} + {\printlist{location}}}}} + +\DeclareFieldFormat{title:hook}{% + \begingroup + \mkrelatedstring% + \lbx@inittitlehook{#1}% + \endgroup + \mkbibemph{#1}} + +\newbibmacro*{related:reprintfrom}[1]{% + \entrydata*{#1}{% + \iffieldundef{journaltitle} + {\iffieldundef{maintitle} + {\printfield[title:hook]{booktitle}} + {\printfield[title:hook]{maintitle}}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{edition}% + \newunit + \iffieldundef{volume} + {} + {\printfield{volume}% + \printfield{part}} + \newunit\newblock + \usebibmacro{series+number}% + \newunit\newblock + \printfield{note}% + \newunit\newblock + \usebibmacro{publisher+location+date}% + \newunit\newblock + \usebibmacro{chapter+pages}} + {\printfield[title:hook]{journaltitle}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \usebibmacro{note+pages}}}} + +\endinput diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex_legacy.sty index 6f25355af52..11c339aef93 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex_legacy.sty @@ -1,7 +1,7 @@ % $Id: biblatex.sty,v 1.7 2011/11/13 19:09:07 lehman stable $ % Copyright (c) 2006-2011 Philipp Lehman. -% +% 2012-2016 Philip Kime, Audrey Boruvka, Joseph Wright % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License % (LPPL), version 1.3. @@ -15,7 +15,7 @@ % particular purpose. \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{biblatex1} +\ProvidesPackage{biblatex_legacy} [\abx@date\space v\abx@version\space programmable bibliographies (bibtex) (PK/JW/AB)] %% Dependencies @@ -460,7 +460,7 @@ \newtoggle{blx@loadfiles} \newtoggle{blx@singletitle} \newtoggle{blx@terseinits} -\newtoggle{blx@firstinits} +\newtoggle{blx@giveninits} \newtoggle{blx@useauthor} \newtoggle{blx@useeditor} \newtoggle{blx@usetranslator} @@ -1018,13 +1018,13 @@ \newrobustcmd*{\RequireBiber}[1][2]{% \ifnumgreater{#1}\blx@reqbiber {\numgdef\blx@reqbiber{#1}} - {}} + {}% + \blx@checkbackend{style}} \@onlypreamble\RequireBiber \let\blx@reqbiber\z@ \def\blx@checkbackend#1{% - \ifnumequal\blx@backend\blx@backend@biber - {} + \ifblx@load@version@legacy {\ifcase\blx@reqbiber \or \blx@info@noline{% @@ -1039,7 +1039,8 @@ {The selected style or one of the .bib files requires backend=biber.\MessageBreak It will not work at all with any other backend}% - \fi}} + \fi} + {}} % \blx@list@active active aux files (basename) % [internal list] @@ -1070,78 +1071,32 @@ \def\blx@check@logreq{% \begingroup - \ifnum\blx@backend=\blx@backend@biber - \ltxrequest{biblatex}{{\iftoggle{blx@runltx}{1}{0}}}{% - \provides[type=dynamic]{ - \file{\jobname.bcf} - } - \requires[type=dynamic]{ - \file{\jobname.bbl} - } - \ifdef\blx@list@req@edit - {\requires[type=editable]{ - \forlistloop\file\blx@list@req@edit - }} - {} - \ifdef\blx@list@req@stat - {\requires[type=static]{ - \forlistloop\file\blx@list@req@stat - }} - {} - }% - \logrequest[package=biblatex,priority=5,active={{\iftoggle{blx@runbtx}{1}{0}}}]{% - \generic{biber} - \cmdline{ - \binary{biber} - \infile{\jobname} - } - \input{ - \file{\jobname.bcf} - } - \output{ - \file{\jobname.bbl} - } - \provides[type=dynamic]{ - \file{\jobname.bbl} - } - \requires[type=dynamic]{ - \file{\jobname.bcf} - } - \ifcsdef{blx@list@bibfiles@\jobname} - {\requires[type=editable]{ - \def\do{\file} - \dolistcsloop{blx@list@bibfiles@\jobname} - }} - {} - }% - \else - \ltxrequest{biblatex}{{\iftoggle{blx@runltx}{1}{0}}}{% - \provides[type=dynamic]{ - \def\do##1{\file{##1.aux}} - \dolistloop\blx@list@inactive - \file{\blx@ctrlfile@bibtex\blxauxsuffix.bib} - } - \requires[type=dynamic]{ - \def\do##1{\file{##1.bbl}} - \dolistloop\blx@list@inactive - } - \ifdef\blx@list@req@edit - {\requires[type=editable]{ - \forlistloop\file\blx@list@req@edit - }} - {} - \ifdef\blx@list@req@stat - {\requires[type=static]{ - \forlistloop\file\blx@list@req@stat - }} - {} - }% - \def\do##1{% - \ifinlist{##1}{\blx@list@active} - {\blx@logreq@bibtex{1}{##1}} - {\blx@logreq@bibtex{0}{##1}}}% - \dolistloop\blx@list@inactive - \fi + \ltxrequest{biblatex}{{\iftoggle{blx@runltx}{1}{0}}}{% + \provides[type=dynamic]{ + \def\do##1{\file{##1.aux}} + \dolistloop\blx@list@inactive + \file{\blx@ctrlfile@bibtex\blxauxsuffix.bib} + } + \requires[type=dynamic]{ + \def\do##1{\file{##1.bbl}} + \dolistloop\blx@list@inactive + } + \ifdef\blx@list@req@edit + {\requires[type=editable]{ + \forlistloop\file\blx@list@req@edit + }} + {} + \ifdef\blx@list@req@stat + {\requires[type=static]{ + \forlistloop\file\blx@list@req@stat + }} + {} + }% + \def\do##1{% + \ifinlist{##1}{\blx@list@active} + {\blx@logreq@bibtex{1}{##1}} + {\blx@logreq@bibtex{0}{##1}}}% + \dolistloop\blx@list@inactive \endgroup} \def\blx@logreq@bibtex#1#2{% @@ -1196,12 +1151,9 @@ } \def\blx@logreq@active#1{% - \ifnum\blx@backend=\blx@backend@biber - \else - \xifinlist{\blx@auxfile@bibtex}{\blx@list@active} - {} - {\listxadd\blx@list@active{\blx@auxfile@bibtex}}% - \fi + \xifinlist{\blx@auxfile@bibtex}{\blx@list@active} + {} + {\listxadd\blx@list@active{\blx@auxfile@bibtex}}% \ifblank{#1} {} {\@latex@warning{#1}}% @@ -1209,12 +1161,9 @@ \blx@rerun@bibtex} \def\blx@logreq@inactive{% - \ifnum\blx@backend=\blx@backend@biber - \else - \xifinlist{\blx@auxfile@bibtex}{\blx@list@inactive} - {} - {\listxadd\blx@list@inactive{\blx@auxfile@bibtex}}% - \fi} + \xifinlist{\blx@auxfile@bibtex}{\blx@list@inactive} + {} + {\listxadd\blx@list@inactive{\blx@auxfile@bibtex}}} \def\blx@rerun@latex{% \G@refundefinedtrue @@ -1278,15 +1227,9 @@ \def\blx@warn@auxlist{% \begingroup - \ifnum\blx@backend=\blx@backend@biber - \edef\blx@tempa{% - Please (re)run Biber on the file:\MessageBreak - \jobname}% - \else - \edef\blx@tempa{Please (re)run BibTeX on the file(s):}% - \def\do##1{\appto\blx@tempa{\MessageBreak##1}}% - \dolistloop\blx@list@active - \fi + \edef\blx@tempa{Please (re)run BibTeX on the file(s):}% + \def\do##1{\appto\blx@tempa{\MessageBreak##1}}% + \dolistloop\blx@list@active \blx@warning@noline{% \blx@tempa\MessageBreak and rerun LaTeX afterwards}% @@ -1309,7 +1252,7 @@ % 1009 suppress punctuation % 1010 new paragaph -\mathchardef\blx@sf@apo=1001 +\mathchardef\blx@sf@prefixchar=1001 \mathchardef\blx@sf@dot=1002 \mathchardef\blx@sf@comma=1003 \mathchardef\blx@sf@semicolon=1004 @@ -1375,12 +1318,52 @@ \sfcode`\?=3002 } +% Defining characters that count as prefices in names like d'Argent +% Code from moewe +\let\blx@prefchars\@empty + +\def\blx@defprefchars@loop#1{% + \ifx#1\relax + \else + \listadd{\blx@prefchars}{#1}% + \expandafter\blx@defprefchars@loop + \fi} + +\def\blx@defprefchars#1{% + \expandafter\blx@defprefchars@loop\detokenize{#1}\relax} + +\newrobustcmd*{\DeclarePrefChars}{% + \@ifstar + {\blx@defprefchars} + {\let\blx@prefchars\@empty + \blx@defprefchars}} +\DeclarePrefChars{'} + +\protected\def\blx@imc@ifprefchar{% + \ifhmode + \begingroup + \ifnum\spacefactor=\blx@sf@prefixchar + \endgroup + \expandafter\expandafter + \expandafter\@firstoftwo + \else + \endgroup + \expandafter\expandafter + \expandafter\@secondoftwo + \fi + \else + \expandafter\@secondoftwo + \fi} + +\blx@regimcs{\ifprefchar} + \def\blx@namecodes{% \ifnum\sfcode`\A=\@m \else \blx@setazcodes \fi - \sfcode`\'=\blx@sf@apo + \def\do##1{\sfcode`##1=\blx@sf@prefixchar}% + \dolistloop\blx@prefchars } \begingroup @@ -1523,7 +1506,7 @@ \newrobustcmd*{\DeclarePunctuationPairs}[2]{% \ifcsdef{blx@sf@\detokenize{#1}} - {\ifnum\csname blx@sf@\detokenize{#1}\endcsname>\blx@sf@apo + {\ifnum\csname blx@sf@\detokenize{#1}\endcsname>\blx@sf@prefixchar \ifnum\csname blx@sf@\detokenize{#1}\endcsname<\blx@sf@nopunct \expandafter\blx@defpunctpairs \expandafter{\the\csname blx@sf@\detokenize{#1}\endcsname}{#2}% @@ -1556,7 +1539,7 @@ \def\blx@defpair#1{% \ifx% \else - \ifnum\the\sfcode`#1>\blx@sf@apo + \ifnum\the\sfcode`#1>\blx@sf@prefixchar \ifnum\the\sfcode`#1<\blx@sf@nopunct \eappto\blx@tempb{% \cslet{blx@pp@\blx@tempa @\the\sfcode`#1}\noexpand\@empty}% @@ -1850,12 +1833,12 @@ \expandafter\noexpand\csname blx@bbx@#2\endcsname}} \@onlypreamble\DeclareBibliographyAlias +% Ignore first optional argument - only used in biblatex2.sty and biber % {<key>}[<value>]{<code>} - -\newrobustcmd*{\DeclareBibliographyOption}[1]{% +\newrobustcmd*{\DeclareBibliographyOption}[2][]{% \@ifnextchar[%] - {\blx@defbibopt{#1}} - {\blx@defbibopt{#1}[]}} + {\blx@defbibopt{#2}} + {\blx@defbibopt{#2}[]}} \long\def\blx@defbibopt#1[#2]#3{% \ifcsundef{KV@blx@opt@ldt@#1} @@ -1866,12 +1849,12 @@ {\blx@err@optdef{#1}}} {\blx@err@optdef{#1}}} +% Ignore first optional argument - only used in biblatex2.sty and biber % {<key>}[<value>]{<code>} - -\newrobustcmd*{\DeclareTypeOption}[1]{% +\newrobustcmd*{\DeclareTypeOption}[2][]{% \@ifnextchar[%] - {\blx@deftypeopt{#1}} - {\blx@deftypeopt{#1}[]}} + {\blx@deftypeopt{#2}} + {\blx@deftypeopt{#2}[]}} \long\def\blx@deftypeopt#1[#2]#3{% \ifcsundef{KV@blx@opt@typ@#1} @@ -1880,12 +1863,12 @@ {\define@key{blx@opt@typ}{#1}[#2]{#3}}} {\blx@err@optdef{#1}}} +% Ignore first optional argument - only used in biblatex2.sty and biber % {<key>}[<value>]{<code>} - -\newrobustcmd*{\DeclareEntryOption}[1]{% +\newrobustcmd*{\DeclareEntryOption}[2][]{% \@ifnextchar[%] - {\blx@defentryopt{#1}} - {\blx@defentryopt{#1}[]}} + {\blx@defentryopt{#2}} + {\blx@defentryopt{#2}[]}} \long\def\blx@defentryopt#1[#2]#3{% \ifcsundef{KV@blx@opt@ent@#1} @@ -3336,7 +3319,8 @@ \def\ifuseeditor{\iftoggle{blx@useeditor}}% \def\ifusetranslator{\iftoggle{blx@usetranslator}}% \def\ifterseinits{\iftoggle{blx@terseinits}}% - \def\iffirstinits{\iftoggle{blx@firstinits}}% + \def\iffirstinits{\iftoggle{blx@giveninits}}% legacy alias for \ifgiveninits + \def\ifgiveninits{\iftoggle{blx@giveninits}}% \def\ifsingletitle{\iftoggle{abx@bool@singletitle}}% \def\ifandothers#1{\iftoggle{abx@bool@more#1}}% \protected\def\pno{\bibstring{page}}% @@ -3871,9 +3855,7 @@ \c@liststop#2\relax \fi \fi}% - \ifnumequal\blx@backend\blx@backend@biber - {} - {\let~\bibnamedelima}% BibTeX only + \let~\bibnamedelima \blx@namecodes} \def\blx@namesetup@i#1{% @@ -5408,6 +5390,10 @@ \do{singletitle}% } +% Used in some styles but biber-only, here to prevent warnings. +\protected\long\def\abx@dointernalfields{}% +\protected\long\def\DeclareLabelalphaTemplate#1{}% + \def\do#1{% \newcounter{#1}% \newcounter{saved#1}% @@ -5480,12 +5466,7 @@ \def\item{\MessageBreak-\space}% \def\break{\MessageBreak\space\space}% \edef\blx@tempa{% - \ifnum\blx@backend=\blx@backend@biber - Biber - \else - BibTeX - \fi - reported the following issues% + BibTeX reported the following issues% \ifdef\abx@field@entrykey {\MessageBreak with '\abx@field@entrykey'} {}% @@ -5654,14 +5635,12 @@ \csxdef{blx@seti@\the\c@refsection @#1}{\the\blx@tempcnta}} % {<entrykey>} - \protected\def\blx@bbl@inset#1{% \toggletrue{blx@setonly}% \blx@bbl@fieldedef{entryset}{\detokenize{#1}}% \csxdef{blx@setc@\the\c@refsection @\abx@field@entrykey}{\detokenize{#1}}} % {<entrykey>} - \protected\def\blx@bbl@xref#1{% BibTeX only \ifcsdef{blx@refp@\the\c@refsection @\detokenize{#1}} {} @@ -5893,9 +5872,7 @@ {}% \blx@bbl@prefixnumber} {}% - \ifnumless\blx@backend\blx@backend@biber - {\blx@bbl@labelname} - {}% + \blx@bbl@labelname \blx@bbl@titles \blx@bbl@hooks \endgroup} @@ -6206,10 +6183,8 @@ {}% \blx@info@noline{Trying to load bibliographic data..}% \blx@blxinit - \ifnumequal\blx@backend\blx@backend@biber - {\blx@bblfile@biber} - {\blx@bblfile@bibtex - \blx@bblsecs@bibtex}% + \blx@bblfile@bibtex + \blx@bblsecs@bibtex \endgroup \iftoggle{blx@reencode} {\ifdef\@enablequotes @@ -7140,11 +7115,7 @@ {\let\blx@bibfiles\@empty \blx@xsanitizeafter{\forcsvlist\blx@refsection@addfile}{#1}% \forlistloop{\listadd\blx@bibfiles}\blx@bibfiles@global}% - \ifnum\blx@backend=\blx@backend@biber - \blx@refsection@biber - \else - \blx@refsection@bibtex - \fi + \blx@refsection@bibtex \fi \blx@info{Setting label 'refsection:\the\c@refsection'}% \label{refsection:\the\c@refsection}% @@ -7189,11 +7160,7 @@ \def\blx@endrefsection{% \blx@endrefsegment - \ifnum\blx@backend=\blx@backend@biber - \blx@endrefsection@biber - \else - \blx@endrefsection@bibtex - \fi + \blx@endrefsection@bibtex \global\c@refsection\z@} \def\blx@endrefsection@biber{% @@ -7535,13 +7502,11 @@ \def\blx@citation#1#2{% \ifbool{citerequest} - {\ifnumless\blx@backend\blx@backend@biber % BibTeX only - {\ifcsdef{blx@setp@\the\c@refsection @#1} - {\blx@citation@set{#1}{#2}} - {\ifcsdef{blx@setc@\the\c@refsection @#1} - {\blx@citation@inset{#1}{#2}} - {\blx@citation@entry{#1}{#2}}}} - {\blx@citation@entry{#1}{#2}}% + {\ifcsdef{blx@setp@\the\c@refsection @#1} + {\blx@citation@set{#1}{#2}} + {\ifcsdef{blx@setc@\the\c@refsection @#1} + {\blx@citation@inset{#1}{#2}} + {\blx@citation@entry{#1}{#2}}}% \ifcsdef{blx@refc@\the\c@refsection @#1}% BibTeX only {\blx@citation@xref{#1}} {}} @@ -7612,14 +7577,7 @@ {}} \protected\def\blx@bibreq#1{% - \ifnum\blx@backend=\blx@backend@biber - \begingroup - \blx@xmlsanitizeafter{\def\blx@tempa}{#1}% - \blx@auxwrite\blx@auxout{}{\blx@xml@citekey{\blx@tempa}}% - \endgroup - \else - \blx@auxwrite\blx@auxout@bibtex{}{\string\citation{#1}}% - \fi} + \blx@auxwrite\blx@auxout@bibtex{}{\string\citation{#1}}} % {<set>}{<key1,key2,key3>} @@ -7642,10 +7600,7 @@ \csuse{blx@set@\the\c@refsection @\blx@tempa}\MessageBreak new: \blx@tempa\space = \blx@tempb\MessageBreak I'm ignoring the new definition}}} - {\global\cslet{blx@set@\the\c@refsection @\blx@tempa}\blx@tempb - \edef\blx@tempa{% - \AfterPreamble{\blx@setreq{\blx@tempa}{\blx@tempb}}}% - \blx@tempa}% + {\global\cslet{blx@set@\the\c@refsection @\blx@tempa}\blx@tempb}% \endgroup \@esphack} @@ -7653,15 +7608,6 @@ \edef\blx@tempb{\blx@tempb\blx@tempc#1}% \def\blx@tempc{,}} -\protected\def\blx@setreq#1#2{% - \ifnum\blx@backend=\blx@backend@biber - \begingroup - \blx@xmlsanitizeafter{\def\blx@tempa}{#1}% - \blx@xmlsanitizeafter{\def\blx@tempb}{#2}% - \blx@auxwrite\blx@auxout{}{\blx@xml@citeset{\blx@tempa}{\blx@tempb}}% - \endgroup - \fi} - % {<entrykey>,...} \protected\def\blx@citeloop#1{% @@ -8834,7 +8780,8 @@ \def\ifuseeditor{\blx@TE{\iftoggle{blx@useeditor}}}% \def\ifusetranslator{\blx@TE{\iftoggle{blx@usetranslator}}}% \def\ifterseinits{\blx@TE{\iftoggle{blx@terseinits}}}% - \def\iffirstinits{\blx@TE{\iftoggle{blx@firstinits}}}% + \def\iffirstinits{\blx@TE{\iftoggle{blx@giveninits}}}% legacy alias for \ifgiveninits + \def\ifgiveninits{\blx@TE{\iftoggle{blx@giveninits}}}% \def\ifsingletitle{\blx@TE{\iftoggle{abx@bool@singletitle}}}% \def\ifandothers#1{\blx@TE{\iftoggle{abx@bool@more#1}}}}} @@ -9481,212 +9428,6 @@ \blx@xml@endfile}% \immediate\closeout\blx@auxout}} -%% Customization - -% [<exceptions>]{<options>} - -\newrobustcmd*{\DefaultInheritance}[2][]{% - \begingroup - \ifblank{#2} - {} - {\setkeys{blx@inherit@default}{#2}}% - \edef\blx@tempa{\space - inherit\string_all="\iftoggle{blx@inherit@all}{true}{false}"\space - override\string_target="\iftoggle{blx@inherit@override}{true}{false}"}% - \let\blx@tempb\@empty - \let\except\blx@inherit@except - #1% - \xdef\blx@biber@inherit@default{% - \blx@xml@inherit@defaults{\blx@tempa}{\blx@tempb}}% - \endgroup} -\@onlypreamble\DefaultInheritance - -\newtoggle{blx@inherit@all} -\newtoggle{blx@inherit@override} - -\define@key{blx@inherit@default}{all}[true]{% true|false - \settoggle{blx@inherit@all}{#1}} -\define@key{blx@inherit@default}{override}[true]{% true|false - \settoggle{blx@inherit@override}{#1}} - -% {<source>}{<target>}{<options>} - -\newcommand{\blx@inherit@except}[3]{% - \let\blx@tempc\@empty - \ifblank{#3} - {} - {\setkeys{blx@inherit@except}{#3}}% - \eappto\blx@tempb{% - \blx@xml@inherit@type{#1}{#2}{\blx@tempc}}} - -\define@key{blx@inherit@except}{all}[true]{% true|false - \eappto\blx@tempc{ inherit\string_all="#1"}} -\define@key{blx@inherit@except}{override}[true]{% true|false - \eappto\blx@tempc{ override\string_target="#1"}} - -% {<type,type,...>}{<type,type,...>}{<spec>} - -\newrobustcmd*{\DeclareDataInheritance}[3]{% - \begingroup - \let\blx@tempa\@empty - \forcsvlist{\blx@inherit@i{#2}}{#1}% - \let\blx@tempb\@empty - \let\inherit\blx@inherit@field - \let\noinherit\blx@inherit@block - #3% - \xappto\blx@biber@inherit@data{% - \blx@xml@inherit@data{% - \blx@tempa - \blx@tempb}}% - \endgroup} -\@onlypreamble\DeclareDataInheritance - -\def\blx@inherit@i#1#2{% - \forcsvlist{\blx@inherit@ii{#2}}{#1}} - -\def\blx@inherit@ii#1#2{% - \eappto\blx@tempa{\blx@xml@inherit@type{#1}{#2}{}}} - -% [<options>]{<source>}{<target>} - -\newcommand{\blx@inherit@field}[3][]{% - \let\blx@tempc\@empty - \ifblank{#1} - {} - {\setkeys{blx@inherit@field}{#1}}% - \eappto\blx@tempb{% - \blx@xml@inherit@field{#2}{#3}{\blx@tempc}}} - -\newcommand{\blx@inherit@block}[1]{% - \eappto\blx@tempb{\blx@xml@inherit@block{#1}}} - -\define@key{blx@inherit@field}{override}[true]{% true|false - \ifstrequal{#1}{true} - {\edef\blx@tempc{ override\string_target="true"}} - {\edef\blx@tempc{ override\string_target="false"}}} - -\newrobustcmd*{\ResetDataInheritance}{% - \global\csundef{blx@biber@inherit@data}} -\@onlypreamble\ResetDataInheritance - -% {<name>}{<spec>} - -\newrobustcmd*{\DeclareSortingScheme}[2]{% - \begingroup - \let\sort\blx@sortdef@sort - \let\name\blx@sortdef@list - \let\list\blx@sortdef@list - \let\field\blx@sortdef@field - \let\literal\blx@sortdef@literal - \def\citeorder{\blx@sortdef@field{citeorder}}% - \blx@tempcnta\z@ - \let\blx@tempa\@empty - #2% - \global\cslet{blx@biber@sorting@#1}\blx@tempa - \endgroup} -\@onlypreamble\DeclareSortingScheme - -\newcommand{\blx@sortdef@sort}[2][]{% - \advance\blx@tempcnta\@ne - \blx@tempcntb\z@ - \let\blx@tempb\@empty - \edef\blx@tempc{order="\the\blx@tempcnta"}% - \ifblank{#1} - {} - {\setkeys{blx@sortdef@sort}{#1}}% - \let\do\@firstofone - #2% - \eappto\blx@tempa{% - \blx@xml@sort{\blx@tempc}{\blx@tempb}}} - -\define@key{blx@sortdef@sort}{direction}{% ascending|descending - \ifstrequal{#1}{ascending} - {\eappto\blx@tempc{ sort\string_direction="ascending"}} - {\eappto\blx@tempc{ sort\string_direction="descending"}}} -\define@key{blx@sortdef@sort}{final}[true]{% true|false - \ifstrequal{#1}{true} - {\appto\blx@tempc{ final="1"}} - {}} -\define@key{blx@sortdef@sort}{sortcase}[true]{% true|false - \ifstrequal{#1}{true} - {\appto\blx@tempc{ sortcase="1"}} - {\appto\blx@tempc{ sortcase="0"}}} -\define@key{blx@sortdef@sort}{sortupper}[true]{% true|false - \ifstrequal{#1}{true} - {\appto\blx@tempc{ sortupper="1"}} - {\appto\blx@tempc{ sortupper="0"}}} - -\def\blx@sortdef@list#1{% - \advance\blx@tempcntb\@ne - \edef\blx@tempd{order="\the\blx@tempcntb"}% - \eappto\blx@tempb{% - \blx@xml@sortitem{\blx@tempd}{#1}}} - -\newcommand*{\blx@sortdef@field}[2][]{% - \advance\blx@tempcntb\@ne - \edef\blx@tempd{order="\the\blx@tempcntb"}% - \ifblank{#1} - {} - {\setkeys{blx@sortdef@field}{#1}}% - \eappto\blx@tempb{% - \blx@xml@sortitem{\blx@tempd}{#2}}} - -\define@key{blx@sortdef@field}{padside}{% left|right - \ifstrequal{#1}{right} - {\eappto\blx@tempd{ pad\string_side="right"}} - {\eappto\blx@tempd{ pad\string_side="left"}}} -\define@key{blx@sortdef@field}{padwidth}{% integer - \eappto\blx@tempd{ pad\string_width="#1"}} -\define@key{blx@sortdef@field}{padchar}{% character - \blx@xmlsanitizeafter{\def\blx@tempe}{#1}% - \eappto\blx@tempd{ pad\string_char="\blx@tempe"}} -\define@key{blx@sortdef@field}{strside}{% left|right - \ifstrequal{#1}{right} - {\eappto\blx@tempd{ substring\string_side="right"}} - {\eappto\blx@tempd{ substring\string_side="left"}}} -\define@key{blx@sortdef@field}{strwidth}{% integer - \eappto\blx@tempd{ substring\string_width="#1"}} - -\def\blx@sortdef@literal#1{% - \advance\blx@tempcntb\@ne - \blx@xmlsanitizeafter{\def\blx@tempe}{#1}% - \eappto\blx@tempb{% - \blx@xml@sortitem{order="\the\blx@tempcntb"}{\blx@tempe}}} - -% [<type,type,...>]{<string>} - -\newrobustcmd*{\DeclarePresort}[2][]{% - \begingroup - \blx@xmlsanitizeafter{\def\blx@tempa}{#2}% - \ifblank{#1} - {\xdef\blx@bcf@presort{\blx@xml@presort{}{\blx@tempa}}} - {\notblank{#2} - {\forcsvlist{\blx@defpresort\blx@tempa}{#1}} - {\forcsvlist\blx@undefpresort{#1}}}% - \endgroup} -\@onlypreamble\DeclarePresort - -\def\blx@defpresort#1#2{% - \csxdef{blx@bcf@presort@#2}{\blx@xml@presort{#2}{#1}}} -\def\blx@undefpresort#1{% - \global\csundef{blx@bcf@presort@#1}} - -\newrobustcmd*{\DeclareSortExclusion}[2]{% - \forcsvlist{\blx@sortexlude{#2}}{#1}} - -\def\blx@sortexlude#1#2{% - \begingroup - \ifblank{#1} - {\global\csundef{blx@bcf@exclude@#2}} - {\let\blx@tempa\@empty - \forcsvlist\blx@sortexlude@i{#1}% - \csxdef{blx@bcf@exclude@#2}{% - \blx@xml@sortexclude{#2}{\blx@tempa}}} - \endgroup} - -\def\blx@sortexlude@i#1{% - \appto\blx@tempa{\blx@xml@exclude{#1}}} - %% Package options % [<entrytype,entrytype,...>]{<options>} @@ -9740,7 +9481,6 @@ \chardef\blx@backend@bibtex=0 \chardef\blx@backend@bibtexe=1 \chardef\blx@backend@bibtexu=2 -\chardef\blx@backend@biber=3 \cslet{blx@backend@bibtex8}\blx@backend@bibtexe \DeclareBibliographyOption{loadfiles}[true]{% @@ -9792,17 +9532,10 @@ \def\blx@bibtex@sorting@debug{99} \AtEndPreamble{% - \ifnum\blx@backend=\blx@backend@biber - \ifcsdef{blx@biber@sorting@\blx@sorting} - {} - {\blx@err@invopt{sorting=\blx@sorting}{}% - \def\blx@sorting{nty}}% - \else - \ifcsdef{blx@bibtex@sorting@\blx@sorting} - {} - {\blx@err@invopt{sorting=\blx@sorting}{}% - \def\blx@sorting{nty}}% - \fi} + \ifcsdef{blx@bibtex@sorting@\blx@sorting} + {} + {\blx@err@invopt{sorting=\blx@sorting}{}% + \def\blx@sorting{nty}}} \DeclareBibliographyOption{sortcase}[true]{% \settoggle{blx@sortcase}{#1}} @@ -9981,9 +9714,15 @@ \renewrobustcmd*{\bibinitperiod}{\adddot} \renewrobustcmd*{\bibinitdelim}{\addnbspace} \renewrobustcmd*{\bibinithyphendelim}{\adddot\mbox{-}}}} - + +% Legacy for giveninits \DeclareBibliographyOption{firstinits}[true]{% - \settoggle{blx@firstinits}{#1}} + \blx@warning@noline{% + 'firstinits' option is deprecated, use 'giveninits' instead}% + \settoggle{blx@giveninits}{#1}} + +\DeclareBibliographyOption{giveninits}[true]{% + \settoggle{blx@giveninits}{#1}} \DeclareBibliographyOption{abbreviate}[true]{% \ifstrequal{#1}{true} @@ -10709,7 +10448,7 @@ % Load citation and bibliography styles, configuration file -\blx@inputonce{biblatex.def}{generic definitions}{}{}{}{} +\blx@inputonce{biblatex_legacy.def}{generic definitions}{}{}{}{} \iftoggle{blx@natbib} {\blx@inputonce{blx-natbib.def}{natbib compatibility}{}{}{}{}} {} @@ -10734,22 +10473,22 @@ \c@minnames\blx@mincitenames\relax \c@maxitems\blx@maxitems\relax \c@minitems\blx@minitems\relax - \iftoggle{blx@firstinits} + \iftoggle{blx@giveninits} {\ifnumequal\blx@uniquename\blx@opt@uniquename@full {\blx@warn@conflopt{% - 'firstinits' conflicts with 'uniquename=full'.\MessageBreak + 'giveninits' conflicts with 'uniquename=full'.\MessageBreak Setting 'uniquename=init'}% \setkeys{blx@opt@pre}{uniquename=init}} {}% \ifnumequal\blx@uniquename\blx@opt@uniquename@allfull {\blx@warn@conflopt{% - 'firstinits' conflicts with 'uniquename=allfull'.\MessageBreak + 'giveninits' conflicts with 'uniquename=allfull'.\MessageBreak Setting 'uniquename=allinit}% \setkeys{blx@opt@pre}{uniquename=allinit}} {}% \ifnumequal\blx@uniquename\blx@opt@uniquename@minfull {\blx@warn@conflopt{% - 'firstinits' conflicts with 'uniquename=minfull'.\MessageBreak + 'giveninits' conflicts with 'uniquename=minfull'.\MessageBreak Setting 'uniquename=mininit}% \setkeys{blx@opt@pre}{uniquename=mininit}} {}} @@ -10804,14 +10543,9 @@ Data encoding '\blx@bibencoding' specified.\MessageBreak No need to reencode data}% \togglefalse{blx@reencode}} - {\ifnumequal\blx@backend\blx@backend@biber - {\blx@info@noline{% - Data encoding '\blx@bibencoding' specified.\MessageBreak - Backend will reencode on the fly}% - \togglefalse{blx@reencode}} - {\blx@info@noline{% - Data encoding '\blx@bibencoding' specified.\MessageBreak - Reencoding not supported by backend.\MessageBreak + {\blx@info@noline{% + Data encoding '\blx@bibencoding' specified.\MessageBreak + Reencoding not supported by backend.\MessageBreak Falling back to reencoding with inputenc}% \@ifpackageloaded{inputenc} {\toggletrue{blx@reencode}} @@ -10822,7 +10556,7 @@ this setup. Load the 'inputenc/inputenx'\MessageBreak package or use backend=biber. 'luainputenc'\MessageBreak is not supported (use backend=biber instead)}% - \togglefalse{blx@reencode}}}}}}}} + \togglefalse{blx@reencode}}}}}}} {\def\blx@bibencoding{ascii}% \blx@info@noline{% Data encoding not specified.\MessageBreak @@ -10843,40 +10577,20 @@ {\blx@warning@noline{% Data encoding is '\blx@bibencoding'.\MessageBreak Use backend=bibtex8 or backend=biber}}}}% - \ifboolexpr{% - togl {blx@safeinputenc} - and test {\ifnumequal\blx@backend\blx@backend@biber} - and ( test {\@ifpackageloaded{inputenc}} - or - test {\@ifpackageloaded{inputenx}} ) - } - {\def\blx@texencoding{ascii}% - \blx@info@noline{% - Input encoding '\blx@texencoding' forced by\MessageBreak - 'safeinputenc' option}} - {}% } % Deferred last minute setup \AtBeginDocument{% - \blx@checkbackend{style}% \blx@checkencoding \if@filesw - \ifnum\blx@backend=\blx@backend@biber - \blx@ifsigned{\jobname}{bcf} - {\blx@ctrlwrite@biber} - {}% - \blx@bblinput - \else - \blx@auxinit@bibtex\blx@bibfiles - \blx@ifsigned{\blx@ctrlfile@bibtex\blxauxsuffix}{bib} - {\blx@ctrlwrite@bibtex} - {}% - \ifnumless\blx@reqbiber\thr@@ - {\blx@bblinput} - {}% - \fi + \blx@auxinit@bibtex\blx@bibfiles + \blx@ifsigned{\blx@ctrlfile@bibtex\blxauxsuffix}{bib} + {\blx@ctrlwrite@bibtex} + {}% + \ifnumless\blx@reqbiber\thr@@ + {\blx@bblinput} + {}% \blx@maxsection\z@ \fi \let\blx@reqbiber\z@ diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-compat.def b/Master/texmf-dist/tex/latex/biblatex/blx-compat.def index 32562dc6497..dfead5ff694 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-compat.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-compat.def @@ -22,7 +22,7 @@ % biblatex <0.9b -\DeclareBibliographyOption{defernums}[true]{% +\DeclareBibliographyOption[boolean]{defernums}[true]{% \ExecuteBibliographyOptions{defernumbers=#1}} \providecommand*{\lbx@fromlang}{% diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def index 864c5cec58b..d5e65b6fbdb 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def @@ -3,13 +3,17 @@ \newbool{dmskipout}% \newbool{dmlabelfield}% -\listadd\blx@globalopts{datamodel}% for passing to the .bcf - % Data model .bcf output macros \xdef\blx@xml@datamodel#1{% ~~<bcf:datamodel>\blx@nl #1% ~~</bcf:datamodel>\blx@nl} +\xdef\blx@xml@datamodel@constants#1{% + ~~~~<bcf:constants>\blx@nl + #1% + ~~~~</bcf:constants>\blx@nl} +\xdef\blx@xml@datamodel@constant#1#2#3{% + ~~~~~~<bcf:constant type="#1" name="#2">#3</bcf:constant>\blx@nl} \xdef\blx@xml@datamodel@entrytypes#1{% ~~~~<bcf:entrytypes>\blx@nl #1% @@ -61,6 +65,7 @@ \xdef\blx@xml@datamodel@constraintfieldsub#1{% ~~~~~~~~~~<bcf:field>#1</bcf:field>\blx@nl} + % Data model specification macros \newrobustcmd*{\ResetDatamodelEntrytypes}{% \global\cslet{blx@bcf@datamodel@entrytypes}\@empty @@ -203,6 +208,20 @@ \booltrue{dmlabelfield}} {}} +\newrobustcmd*{\DeclareDatamodelConstant}[3][]{% + \begingroup + \let\blx@tempa\@empty + \ifblank{#1} + {\def\blx@tempa{string}} + {\setkeys{blx@datamodel@constant}{#1}}% + \xappto\blx@bcf@datamodel@constants{\blx@xml@datamodel@constant{\blx@tempa}{#2}{#3}}% + \csxdef{blx@datamodel@constant@#2}{#3}% + \csxdef{blx@datamodel@constanttype@#2}{\blx@tempa}% + \endgroup} + +\define@key{blx@datamodel@constant}{type}{% + \def\blx@tempa{#1}} + \newrobustcmd*{\DeclareDatamodelEntryfields}[2][]{% \begingroup \let\blx@tempa\@empty @@ -300,6 +319,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Data model specification +\DeclareDatamodelConstant[type=list]{gender}{sf,sm,sn,pf,pm,pn,pp} +\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given} +\DeclareDatamodelConstant[type=list]{optiondatatypes}{boolean,integer,string,xml} \DeclareDatamodelEntrytypes{ article, @@ -1571,7 +1593,6 @@ \DeclareDatamodelConstraints[inproceedings]{ \constraint[type=mandatory]{ \constraintfield{author} - \constraintfield{editor} \constraintfield{title} \constraintfield{booktitle} } 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 3e6b1c73e90..d5e5183de32 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-comp.cbx @@ -49,7 +49,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}}% + \nametitledelim\bibopenparen}}% \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} @@ -74,7 +74,7 @@ \ifnameundef{labelname} {\setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}} + \extpostnotedelim\bibopenparen}} {\setunit{\postnotedelim}}% \printfield{postnote}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} 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 fcf370d48d3..2f7c68df495 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ibid.cbx @@ -10,7 +10,7 @@ \newbool{cbx:parens} \newbool{cbx:loccit} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} @@ -42,7 +42,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}}% + \nametitledelim\bibopenparen}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -77,7 +77,7 @@ {}} {\ifbool{cbx:parens} {\postnotedelim} - {\addspace\bibopenparen}% + {\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 828d44bf526..9d248a215eb 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-icomp.cbx @@ -13,7 +13,7 @@ \newbool{cbx:parens} \newbool{cbx:loccit} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} @@ -62,7 +62,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}}% + \nametitledelim\bibopenparen}}% \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}% \ifnumequal{\value{citecount}}{1} @@ -103,7 +103,7 @@ {\ifnameundef{labelname} {\setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}} + \extpostnotedelim\bibopenparen}} {\setunit{\postnotedelim}}% \printfield{postnote}}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} 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 7157e5d67ef..c0e8a1fe57c 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-tcomp.cbx @@ -53,7 +53,7 @@ {\printnames{labelname} \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nametitledelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -73,7 +73,7 @@ {\setunit{\postnotedelim}} {\setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}}% + \extpostnotedelim\bibopenparen}}% \printfield{postnote}% \ifthenelse{\value{multicitecount}=\value{multicitetotal}} {\setunit{}% diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-terse.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-terse.cbx index 2e3015ef651..a0f7fef85ac 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-terse.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-terse.cbx @@ -29,7 +29,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nametitledelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% 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 eb19b9de0ae..e485f4fadd9 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle-ticomp.cbx @@ -61,7 +61,7 @@ {\printnames{labelname} \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nametitledelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -83,7 +83,7 @@ {\setunit{\postnotedelim}} {\setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}}% + \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 0ba18e87837..aff0a63a496 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authortitle.cbx @@ -27,7 +27,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}}% + \nametitledelim\bibopenparen}}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -49,7 +49,7 @@ {}} {\ifbool{cbx:parens} {\postnotedelim} - {\addspace\bibopenparen}% + {\extpostnotedelim\bibopenparen}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx index a290293d0ae..966e516fafa 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-comp.cbx @@ -27,7 +27,7 @@ \iffieldundef{shorthand} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% - \setunit{\addspace}% + \setunit{\nonameyeardelim}% \usebibmacro{cite:labelyear+extrayear}% \usebibmacro{cite:reinit}} {\iffieldequals{namehash}{\cbx@lasthash} @@ -85,7 +85,7 @@ {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nonameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -94,7 +94,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% 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 b0e6eee71b3..bf8cc731263 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-ibid.cbx @@ -10,7 +10,7 @@ \newbool{cbx:parens} \newbool{cbx:loccit} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} @@ -22,7 +22,7 @@ {\usebibmacro{cite:ibid}} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% - \setunit{\addspace}} + \setunit{\nonameyeardelim}} {\printnames{labelname}% \setunit{\nameyeardelim}}% \usebibmacro{cite:labelyear+extrayear}}} @@ -45,7 +45,7 @@ {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nonameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -54,7 +54,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -99,7 +99,7 @@ {}} {\ifbool{cbx:parens} {\postnotedelim} - {\addspace\bibopenparen}% + {\extpostnotedelim\bibopenparen}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx index e5841f52d09..d662299bcb0 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear-icomp.cbx @@ -11,7 +11,7 @@ \newbool{cbx:parens} \newbool{cbx:loccit} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} @@ -37,7 +37,7 @@ {\usebibmacro{cite:ibid}} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% - \setunit{\addspace}% + \setunit{\nonameyeardelim}% \usebibmacro{cite:labelyear+extrayear}% \usebibmacro{cite:reinit}} {\iffieldequals{namehash}{\cbx@lasthash} @@ -97,7 +97,7 @@ {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nonameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -108,7 +108,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx index c0ac1e0eb07..c36c9729b8a 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/authoryear.cbx @@ -11,7 +11,7 @@ \iffieldundef{shorthand} {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} {\usebibmacro{cite:label}% - \setunit{\addspace}} + \setunit{\nonameyeardelim}} {\printnames{labelname}% \setunit{\nameyeardelim}}% \usebibmacro{cite:labelyear+extrayear}} @@ -30,7 +30,7 @@ {\usebibmacro{cite:label}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nonameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -39,7 +39,7 @@ {\printnames{labelname}% \setunit{% \global\booltrue{cbx:parens}% - \addspace\bibopenparen}% + \nameyeardelim\bibopenparen}% \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% @@ -67,7 +67,7 @@ {}} {\ifbool{cbx:parens} {\setunit{\postnotedelim}} - {\setunit{\addspace\bibopenparen}}% + {\setunit{\extpostnotedelim\bibopenparen}}% \printfield{postnote}\bibcloseparen}} \DeclareCiteCommand{\cite} 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 7792b77e9b0..846a0f75f38 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-ibid.cbx @@ -19,12 +19,12 @@ \newbibmacro*{cite:full:citepages}{} \newbibmacro*{cite:postnote}{} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} 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 848f3628893..df81985a88b 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-inote.cbx @@ -18,14 +18,14 @@ \newbibmacro*{cite:full:citepages}{} \newbibmacro*{cite:postnote}{} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} -\DeclareBibliographyOption{pageref}[true]{% +\DeclareBibliographyOption[boolean]{pageref}[true]{% \settoggle{cbx:pageref}{#1}} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} 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 087ba067fb4..b22c4da3cb9 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-note.cbx @@ -16,13 +16,13 @@ \newbibmacro*{cite:full:citepages}{} \newbibmacro*{cite:postnote}{} -\DeclareBibliographyOption{pageref}[true]{% +\DeclareBibliographyOption[boolean]{pageref}[true]{% \settoggle{cbx:pageref}{#1}% \iftoggle{cbx:pageref} {\ExecuteBibliographyOptions{pagetracker}} {}} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} 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 0fb8dfbdde8..b1729fe0d91 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad1.cbx @@ -17,15 +17,15 @@ \newtoggle{cbx:loccit} \newbool{cbx:noidem} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \settoggle{cbx:ibidpage}{#1}} -\DeclareBibliographyOption{strict}[true]{% +\DeclareBibliographyOption[boolean]{strict}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{ibidtracker=constrict,idemtracker=constrict}} {\ExecuteBibliographyOptions{ibidtracker=context,idemtracker=context}}} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} 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 a287832b6ee..6cdd7b1cde3 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad2.cbx @@ -22,17 +22,17 @@ \newbibmacro*{cite:full:citepages}{} \newbibmacro*{cite:postnote}{} -\DeclareBibliographyOption{ibidpage}[true]{% +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{loccittracker=constrict}} {\ExecuteBibliographyOptions{loccittracker=false}}} -\DeclareBibliographyOption{strict}[true]{% +\DeclareBibliographyOption[boolean]{strict}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{ibidtracker=constrict,idemtracker=constrict}} {\ExecuteBibliographyOptions{ibidtracker=context,idemtracker=context}}} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} 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 13f8d641633..5ef371196da 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose-trad3.cbx @@ -15,12 +15,12 @@ \newtoggle{cbx:loccit} -\DeclareBibliographyOption{strict}[true]{% +\DeclareBibliographyOption[boolean]{strict}[true]{% \ifstrequal{#1}{true} {\ExecuteBibliographyOptions{ibidtracker=constrict,loccittracker=constrict}} {\ExecuteBibliographyOptions{ibidtracker=context,loccittracker=context}}} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} diff --git a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx index 04d65224ecc..f373895c82a 100644 --- a/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx +++ b/Master/texmf-dist/tex/latex/biblatex/cbx/verbose.cbx @@ -16,7 +16,7 @@ \newbibmacro*{cite:full:citepages}{} \newbibmacro*{cite:postnote}{} -\DeclareBibliographyOption{citepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1} {\csuse{cbx@opt@citepages@#1}} {\PackageError{biblatex} diff --git a/Master/texmf-dist/tex/latex/biblatex/lbx/french.lbx b/Master/texmf-dist/tex/latex/biblatex/lbx/french.lbx index 74336b003a9..298d948840b 100644 --- a/Master/texmf-dist/tex/latex/biblatex/lbx/french.lbx +++ b/Master/texmf-dist/tex/latex/biblatex/lbx/french.lbx @@ -54,12 +54,12 @@ \FDP@thinspace\abx@puncthook{?}}% \savecommand\lbx@initnamehook \savecommand\lbx@inittitlehook - \savecommand\mkbibnamelast + \savecommand\mkbibnamefamily \savecommand\mkbibordedition \savecommand\mkbibordseries \let\lbx@initnamehook=\lbx@fr@smartof \let\lbx@inittitlehook=\lbx@fr@smartof - \protected\def\mkbibnamelast#1{% + \protected\def\mkbibnamefamily#1{% \textsc{\textnohyphenation{#1}}}% \def\mkbibordedition{\mkbibfemord}% \def\mkbibordseries{\mkbibfemord}% @@ -68,7 +68,7 @@ \UndeclareBibliographyExtras{% \restorecommand\lbx@initnamehook \restorecommand\lbx@inittitlehook - \restorecommand\mkbibnamelast + \restorecommand\mkbibnamefamily \restorecommand\mkbibordedition \restorecommand\mkbibordseries } |