diff options
author | Karl Berry <karl@freefriends.org> | 2010-10-09 23:32:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-10-09 23:32:31 +0000 |
commit | 2b1aece05c5cfa5fb2237f33be13352b8152c50d (patch) | |
tree | e6fa6a1b23534f63f5f03213f5378c2eb43a6966 /Master/texmf-dist/tex/latex/biblatex/biblatex.sty | |
parent | ad2a0c99a6985997ce7dadc86f280f1f54817c0a (diff) |
biblatex 0.9e (9oct10)
git-svn-id: svn://tug.org/texlive/trunk@20029 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/biblatex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex/biblatex.sty | 415 |
1 files changed, 254 insertions, 161 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty index 4af84cc06db..4d9db8f3182 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty @@ -1,4 +1,4 @@ -% $Id: biblatex.sty,v 0.9d 2010/09/03 20:11:58 lehman beta $ +% $Id: biblatex.sty,v 0.9e 2010/10/09 16:39:36 lehman beta $ % Copyright (c) 2006-2010 Philipp Lehman. % @@ -21,11 +21,11 @@ \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{biblatex} -[\abx@rcsid $Id: biblatex.sty,v 0.9d 2010/09/03 20:11:58 lehman beta $ +[\abx@rcsid $Id: biblatex.sty,v 0.9e 2010/10/09 16:39:36 lehman beta $ programmable bibliographies] -\def\blx@version$#1: #2 ${#2} -\edef\blx@version{\blx@version$Revision: 0.9c $} +\def\blx@bblversion$#1: #2 ${#2} +\edef\blx@bblversion{\blx@bblversion$Revision: 0.9e $} %% Compatibility and requirements @@ -153,10 +153,10 @@ {}% \@ifpackageloaded{showkeys} {\ifdef\SK@ - {\ifundef\SK@cite % = 'notcite' disabled - {\AtEveryBibitem{\SK@\SK@@label{\thefield{entrykey}}}% - \AtEveryLositem{\SK@\SK@@label{\thefield{entrykey}}}% - \AtEveryCitekey{\SK@\SK@@ref{\thefield{entrykey}}}} + {\AtEveryBibitem{\SK@\SK@@label{\thefield{entrykey}}}% + \AtEveryLositem{\SK@\SK@@label{\thefield{entrykey}}}% + \ifundef\SK@cite % = 'notcite' disabled + {\AtEveryCitekey{\SK@\SK@@ref{\thefield{entrykey}}}} {}} {}} {}% @@ -231,15 +231,18 @@ \addtocontents{toc}{% \string\boolfalse{citerequest}% \string\boolfalse{citetracker}% - \string\boolfalse{pagetracker}}% + \string\boolfalse{pagetracker}% + \string\boolfalse{backtracker}}% \addtocontents{lof}{% \string\boolfalse{citerequest}% \string\boolfalse{citetracker}% - \string\boolfalse{pagetracker}}% + \string\boolfalse{pagetracker}% + \string\boolfalse{backtracker}}% \addtocontents{lot}{% \string\boolfalse{citerequest}% \string\boolfalse{citetracker}% - \string\boolfalse{pagetracker}}% + \string\boolfalse{pagetracker}% + \string\boolfalse{backtracker}}% \let\do\noexpand} \begingroup @@ -352,6 +355,7 @@ \newbool{citetracker} \newbool{pagetracker} +\newbool{backtracker} \newbool{citerequest} \booltrue{citerequest} @@ -364,7 +368,8 @@ \newtoggle{blx@insert} \newtoggle{blx@lastins} \newtoggle{blx@debug} -\newtoggle{blx@cssort} +\newtoggle{blx@sortcase} +\newtoggle{blx@sortupper} \newtoggle{blx@autolang} \newtoggle{blx@clearlang} \newtoggle{blx@defernumbers} @@ -601,11 +606,7 @@ \ifx\blx@tempb\blx@tempc \else \blx@warning@noline{% - File '#1.#2' created\MessageBreak - by wrong version of - \ifnumequal\blx@backend\blx@backend@biber - {Biber} - {biblatex}}% + File '#1.#2' created by wrong version} \fi \else \blx@error @@ -623,14 +624,14 @@ \expandafter\endgroup\blx@tempa} \def\blx@sig@bib{@Comment{$ biblatex control file $}} -\edef\blx@ver@bib{@Comment{$ biblatex version \blx@version\space $}} +\edef\blx@ver@bib{@Comment{$ biblatex version \blx@bblversion\space $}} \edef\blx@sig@aux{\@percentchar\space $ biblatex auxiliary file $} -\edef\blx@ver@aux{\@percentchar\space$ biblatex version \blx@version\space $} +\edef\blx@ver@aux{\@percentchar\space$ biblatex version \blx@bblversion\space $} \let\blx@sig@bbl\blx@sig@aux \let\blx@ver@bbl\blx@ver@aux \edef\blx@sig@bcf{\detokenize{<?xml version="1.0" encoding="UTF-8"?>}} \edef\blx@ver@bcf{% - \detokenize{<bcf:controlfile version="}\blx@version + \detokenize{<bcf:controlfile version="}\blx@bblversion \detokenize{" xmlns:bcf="https://sourceforge.net/projects/biblatex">}} \edef\blx@msg@aux{% @@ -1751,7 +1752,7 @@ \ifcsundef{abx@macro@\detokenize{#1}} {\blx@defbibmacro\new@command{#1}} {\blx@warning{% - Bibliography macro '\detokenize{#1}' already defined.\MessageBreak + Macro '\detokenize{#1}' already defined.\MessageBreak Using \string\renewbibmacro} \blx@defbibmacro\renew@command{#1}}} @@ -1761,7 +1762,7 @@ \def\blx@renewbibmacro#1{% \ifcsundef{abx@macro@\detokenize{#1}} {\blx@warning{% - Bibliography macro '\detokenize{#1}' undefined.\MessageBreak + Macro '\detokenize{#1}' undefined.\MessageBreak Using \string\newbibmacro} \blx@defbibmacro\new@command{#1}} {\blx@defbibmacro\renew@command{#1}}} @@ -3371,11 +3372,8 @@ \def\blx@entryset#1{% \blx@ifdata{#1} {\begingroup -% \begingroup + \blx@imc@clearlist{pageref}% \blx@getdata{#1}% -% \edef\blx@tempa{\endgroup -% \def\noexpand\abx@field@entrytype{\abx@field@entrytype}}% -% \blx@tempa \def\abx@field@entrysetcount{1}% \blx@set@precode \blx@driver{\blx@imc@thefield{entrytype}}% @@ -3539,17 +3537,17 @@ \let\blx@hook@uc\relax \let\blx@hook@lc\relax -\expandafter\patchcmd\csname MakeUppercase \endcsname - {\protected@edef} - {\blx@hook@uc\protected@edef} - {} - {\blx@err@patch{\string\MakeUppercase}} - -\expandafter\patchcmd\csname MakeLowercase \endcsname - {\protected@edef} - {\blx@hook@lc\protected@edef} - {} - {\blx@err@patch{\string\MakeLowercase}} +\AtEndPreamble{% + \expandafter\patchcmd\csname MakeUppercase \endcsname + {\protected@edef} + {\blx@hook@uc\protected@edef} + {} + {\blx@err@patch{\string\MakeUppercase}}% + \expandafter\patchcmd\csname MakeLowercase \endcsname + {\protected@edef} + {\blx@hook@lc\protected@edef} + {} + {\blx@err@patch{\string\MakeLowercase}}} \appto\blx@blxinit{% \def\blx@hook@uc{% @@ -3992,14 +3990,14 @@ {\expandafter\expandafter\expandafter\blx@lbxinput@i \expandafter\expandafter\expandafter{% \csname blx@lng@#1\endcsname}{#1}} - {\blx@lbxinput@ii{#1}{#1.lbx}{language '#1'}}} + {\blx@lbxinput@ii{#1}{#1}{language '#1'}}} % {<mapping>}{<language>} \def\blx@lbxinput@i#1#2{% \global\csundef{blx@lng@#2}% \IfFileExists{#1.lbx} - {\blx@lbxinput@ii{#2}{#1.lbx}{language '#2' -> '#1'}} + {\blx@lbxinput@ii{#2}{#1}{language '#2' -> '#1'}} {\blx@warning@noline{% File '#1.lbx' not found!\MessageBreak Ignoring mapping '#2' -> '#1'}% @@ -4011,12 +4009,13 @@ \begingroup \setbox\@tempboxa=\hbox\bgroup \aftergroup\endgroup - \blx@inputonce{#2}{#3} + \blx@inputonce{#2.lbx}{#3} {\global\cslet{abx@strings@#1}\@empty \global\cslet{abx@extras@#1}\@empty \global\cslet{abx@noextras@#1}\@empty \blx@maplang{#1}{#1}% - \def\InheritBibliographyStrings{\blx@letbibstrings{#1}}% + \def\InheritBibliographyStrings{% + \blx@letbibstrings{#1}}% \def\DeclareBibliographyStrings####1{% \begingroup \let\blx@defstring\blx@lbx@defstring @@ -4030,20 +4029,18 @@ \blx@saneccodes \makeatletter} {\endgroup - \blx@lbxinput@iii{strings}{#1}% - \blx@lbxinput@iii{extras}{#1}% - \blx@lbxinput@iii{noextras}{#1}% - \blx@lbxinput@iii{hyph}{#1}} + \csuse{blx@hook@strings@#1}% + \csuse{blx@hook@strings@#2}% + \csuse{blx@hook@extras@#1}% + \csuse{blx@hook@extras@#2}% + \csuse{blx@hook@noextras@#1}% + \csuse{blx@hook@noextras@#2}% + \csuse{blx@hook@hyph@#1}% + \csuse{blx@hook@hyph@#2}} {\aftergroup\@firstoftwo} {\aftergroup\@secondoftwo}% \egroup} -\def\blx@lbxinput@iii#1#2{% - \ifcsdef{blx@hook@#1@#2} - {\csuse{blx@hook@#1@#2}% - \global\csundef{blx@hook@#1@#2}} - {}} - % {<language>} \def\blx@langsetup#1{% @@ -4148,7 +4145,8 @@ \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}% \printfield{extrayear}}}}}} -\newrobustcmd*{\mkbibrangeiso}[1]{% +\expandafter\newrobustcmd +\expandafter*\csname mkbibrangeiso8601\endcsname[1]{% \iffieldundef{#1year} {} {\printtext{% @@ -4157,7 +4155,8 @@ {} {\addslash\blx@isodate{#1endyear}{#1endmonth}{#1endday}}}}} -\newrobustcmd*{\mkbibrangeisoextra}[1]{% +\expandafter\newrobustcmd +\expandafter*\csname mkbibrangeiso8601extra\endcsname[1]{% \iffieldundef{#1year} {} {\printtext{% @@ -4547,7 +4546,7 @@ % {<entrykey>}{<refsection>}{<field>}{<value>} \long\def\blx@bbl@addentryfield#1#2#3#4{% - \csxappto{blx@data@#2@\detokenize{#1}}{% + \csxappto{blx@data@#2@#1}{% \def\expandafter\noexpand\csname abx@field@#3\endcsname{#4}}} % {<field>}{<value>} @@ -4860,6 +4859,9 @@ \protected\def\blx@bbl@endentry{% \csuse\blx@bbl@data + \ifcsundef{blx@pref@\the\c@refsection @\abx@field@entrykey} + {} + {\blx@addpageref{\abx@field@entrykey}}% \iftoggle{blx@setonly} {\global\toggletrue{blx@addset}% \toggletrue{blx@skipbib}% @@ -4872,10 +4874,7 @@ \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}} - {}% - \ifcsundef{blx@pref@\the\c@refsection @\abx@field@entrykey} - {} - {\blx@addpageref{\abx@field@entrykey}}}% + {}}% \iftoggle{blx@skiplos} {} {\blx@bbl@shorthand}% @@ -5109,7 +5108,7 @@ % {<instcount>}{<entrykey>}{<refsection>}{<labelnumber>} \protected\def\blx@aux@number#1#2#3#4{% - \blx@bbl@addentryfield{#2}{#3}{localnumber}{#4}% + \blx@bbl@addentryfield{\detokenize{#2}}{#3}{localnumber}{#4}% \ifblank{#4} {} {\csgdef{blx@labelnumber@#3}{#4}% @@ -5121,33 +5120,41 @@ % {<entrykey>}{<refsection>}{<numberprefix>} \protected\def\blx@aux@numprefix#1#2#3{% - \blx@bbl@addentryfield{#1}{#2}{prefixnumber}{#3}} + \blx@bbl@addentryfield{\detokenize{#1}}{#2}{prefixnumber}{#3}} \def\blx@addlabelnumber{% - \iftoggle{blx@skiplab} - {} - {\begingroup - \edef\blx@bbl@data{blx@data@\the\c@refsection @\abx@field@entrykey}% - \iftoggle{blx@omitnumbers} - {\blx@auxwrite\@mainaux{}{% - \string\abx@aux@number{\the\c@instcount}{\abx@field@entrykey}{\the\c@refsection}{}}} + \begingroup + \iftoggle{blx@labelnumber} + {\nottoggle{blx@skiplab} {\ifundef\abx@field@shorthand {\ifundef\abx@field@localnumber - {\csnumgdef{blx@labelnumber@\the\c@refsection}{% - \csuse{blx@labelnumber@\the\c@refsection}+1}% - \blx@auxwrite\@mainaux{}{% + {\iftoggle{blx@omitnumbers} + {\let\abx@field@localnumber\@empty} + {\csnumgdef{blx@labelnumber@\the\c@refsection}{% + \csuse{blx@labelnumber@\the\c@refsection}+1}% + \edef\abx@field@localnumber{\csuse{blx@labelnumber@\the\c@refsection}}% + \blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% + {localnumber}{\abx@field@localnumber}}% + \blx@auxwrite\@mainaux{}{% \string\abx@aux@number{\the\c@instcount}{\abx@field@entrykey}% - {\the\c@refsection}{\csuse{blx@labelnumber@\the\c@refsection}}}} - {}} - {}}% - \ifdef\blx@prefixnumbers - {\ifundef\abx@field@shorthand - {\blx@auxwrite\@mainaux{}{% - \string\blx@aux@numprefix{\abx@field@entrykey}% - {\the\c@refsection}{\expandonce\blx@prefixnumbers}}} + {\the\c@refsection}{\abx@field@localnumber}}} + {}} + {}% + \ifdef\blx@prefixnumbers + {\ifundef\abx@field@shorthand + {\edef\abx@field@prefixnumber{\expandonce\blx@prefixnumbers}% + \ifundef\abx@field@prefixnumber + {\blx@bbl@addentryfield{\abx@field@entrykey}{\the\c@refsection}% + {prefixnumber}{\expandonce\abx@field@prefixnumber}} + {}% + \blx@auxwrite\@mainaux{}{% + \string\blx@aux@numprefix{\abx@field@entrykey}% + {\the\c@refsection}{\expandonce\abx@field@prefixnumber}}} + {}} {}} - {}% - \endgroup}} + {}} + {}% + \endgroup} \def\blx@bbl@lossort{% \begingroup @@ -5603,7 +5610,7 @@ \define@key{blx@bib}{resetnumbers}[true]{% \ifstrequal{#1}{true} {\iftoggle{blx@defernumbers} - {\csnumdef{blx@labelnumber@0}{0}} + {\csnumdef{blx@labelnumber@\the\c@refsection}{0}} {\blx@warning{% Option 'resetnumbers' requires 'defernumbers=true'.\MessageBreak Ignoring 'resetnumbers=true'}}} @@ -5620,7 +5627,7 @@ \define@key{blx@bib}{prefixnumbers}{% \iftoggle{blx@defernumbers} - {\csnumdef{blx@labelnumber@0}{0}% + {\csnumdef{blx@labelnumber@\the\c@refsection}{0}% \def\blx@prefixnumbers{#1}} {\blx@warning{% Option 'prefixnumbers' requires 'defernumbers=true'.\MessageBreak @@ -5690,7 +5697,7 @@ \let\blx@theprenote\@empty \let\blx@thepostnote\@empty \let\blx@thetitle\@empty - \c@refsection\@ne + \c@refsection\z@ \blx@safe@actives \setkeys{blx@bbs}{#1}% \blx@rest@actives @@ -5885,12 +5892,14 @@ {}} \def\blx@initsep{% - \ifnum\c@instcount>\@ne - \blx@imc@iffieldequals{sortinit}\blx@previnit - {} - {\addvspace{\bibinitsep}}% - \fi - \global\let\blx@previnit\abx@field@sortinit} + \blx@imc@iffieldundef{sortinit} + {} + {\ifnum\c@instcount>\@ne + \blx@imc@iffieldequals{sortinit}\blx@previnit + {} + {\addvspace{\bibinitsep}}% + \fi + \global\let\blx@previnit\abx@field@sortinit}} \def\blx@namesep{% \ifnum\c@instcount>\@ne @@ -6443,7 +6452,7 @@ \blx@entrysetcount \blx@setoptions@type\abx@field@entrytype \blx@setoptions@entry - \blx@backref + \blx@backref{#1}% \blx@pagetracker \csuse{blx@hook@citekey}% \csuse{blx@hook@citekey@next}% @@ -6789,21 +6798,63 @@ \global\undef\blx@saved@trackkeys@foot \endgroup} -\def\blx@backref@global{% - \blx@leavevmode - \if@filesw - \protected@write\@mainaux{}{\string\abx@aux@backref - {\the\c@instcount}{\abx@field@entrykey}% - {\the\c@refsection}{\thepage}{\noexpand\the\c@page}}% +\def\blx@addbackref#1{% + \ifcsdef{blx@setp@\the\c@refsection @#1} + {\ifcase\blx@backrefsetstyle + \blx@addbackref@i{#1}% + \or + \blx@addbackref@ii{setp}{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \blx@addbackref@ii{setp}{#1}% + \or + \blx@addbackref@i{#1}% + \blx@addbackref@ii{setp}{#1}% + \fi} + {\ifcsdef{blx@setc@\the\c@refsection @#1} + {\ifcase\blx@backrefsetstyle + \blx@addbackref@ii{setc}{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \blx@addbackref@ii{setc}{#1}% + \or + \blx@addbackref@i{#1}% + \or + \blx@addbackref@i{#1}% + \blx@addbackref@ii{setc}{#1}% + \fi} + {\blx@addbackref@i{#1}}}} + +\def\blx@addbackref@i#1{% + \ifbacktracker + \blx@leavevmode + \if@filesw + \protected@write\@mainaux{}{\string\abx@aux@backref + {\the\c@instcount}{#1}{\the\c@refsection}% + {\thepage}{\noexpand\the\c@page}}% + \fi \fi} +\def\blx@addbackref@ii#1#2{% + \expandafter\expandafter\expandafter\forcsvlist + \expandafter\expandafter\expandafter\blx@addbackref@i + \expandafter\expandafter\expandafter{% + \csname blx@#1@\the\c@refsection @#2\endcsname}} + % {<instcount>}{<entrykey>}{<refsection>}{<page>}{<page int>} \protected\def\blx@aux@backref#1#2#3#4#5{% \ifcsundef{blx@pref@#3@\detokenize{#2}} {\global\cslet{blx@pref@#3@\detokenize{#2}}\@empty - \expandafter\blx@onlypreamble - \expandafter{\csname blx@pref@#3@\detokenize{#2}\endcsname}} + \expandafter\blx@onlypreamble\csname blx@pref@#3@\detokenize{#2}\endcsname} {}% \ifinlistcs{#4}{blx@pref@#3@\detokenize{#2}} {} @@ -7843,7 +7894,9 @@ \def\blx@bcf@options@global{% \blx@bcf@comment{global}% \blx@bcf@options{biblatex}{global}{% - \blx@bcf@svalue{alphaothers}{\detokenize\expandafter{\labelalphaothers}}% + \iftoggle{blx@labelalpha} + {\blx@bcf@svalue{alphaothers}{\detokenize\expandafter{\labelalphaothers}}} + {}% \blx@bcf@toggle{labelalpha}% \blx@bcf@mvalue{labelname}{\blx@bcf@labelname@global}% \iftoggle{blx@labelyear} @@ -7854,7 +7907,9 @@ \blx@bcf@svalue{minitems}{\the\c@minitems}% \blx@bcf@svalue{minnames}{\the\c@minnames}% \blx@bcf@toggle{singletitle}% - \blx@bcf@svalue{sortalphaothers}{\detokenize\expandafter{\labelalphaothers}}% + \iftoggle{blx@labelalpha} + {\blx@bcf@svalue{sortalphaothers}{\detokenize\expandafter{\labelalphaothers}}} + {}% \blx@bcf@svalue{sortlos}{\blx@sortlos}% \blx@bcf@toggle{terseinits}% \blx@bcf@svalue{uniquename}{\blx@uniquename}% @@ -7889,25 +7944,27 @@ }% } -\AtEndPreamble{% - \xdef\blx@biber@options{\blx@bcf@options@global}% - \begingroup - \def\do#1{% - \blx@setoptions@type{#1}% - \xappto\blx@biber@options{\blx@bcf@options@type{#1}}}% - \ifdef\blx@opts@type - {\dolistloop\blx@opts@type} - {}% - \def\do#1{% - \ifcsdef{blx@biber@sorting@\blx@sorting @#1}% - {\blx@bcf@comment{#1}% - \csuse{blx@biber@sorting@\blx@sorting @#1}} - {}}% - \xdef\blx@biber@sorting{% - \ifcsdef{blx@biber@sorting@\blx@sorting} - {\dolistcsloop{blx@biber@sorting@\blx@sorting}} - {}}% - \endgroup} +\AtBeginDocument{% + \ifnum\blx@backend=\blx@backend@biber + \xdef\blx@biber@options{\blx@bcf@options@global}% + \begingroup + \def\do#1{% + \blx@setoptions@type{#1}% + \xappto\blx@biber@options{\blx@bcf@options@type{#1}}}% + \ifdef\blx@opts@type + {\dolistloop\blx@opts@type} + {}% + \def\do#1{% + \ifcsdef{blx@biber@sorting@\blx@sorting @#1}% + {\blx@bcf@comment{#1}% + \csuse{blx@biber@sorting@\blx@sorting @#1}} + {}}% + \xdef\blx@biber@sorting{% + \ifcsdef{blx@biber@sorting@\blx@sorting} + {\dolistcsloop{blx@biber@sorting@\blx@sorting}} + {}}% + \endgroup + \fi} % [<entrytype>]{<name>}{<spec>} @@ -8155,14 +8212,14 @@ \blx@msg@bib @Control\string{biblatex-control,\blx@nl \space\space options = \string{% - \blx@version:% + \blx@bblversion:% \noexpand\iftoggle{blx@debug}{1}{0}:% \noexpand\ifnum\noexpand\blx@backend=\noexpand\blx@backend@bibtexviii 1:% \noexpand\else 0:% \noexpand\fi - \noexpand\iftoggle{blx@cssort}{1}{0}:% + \noexpand\iftoggle{blx@sortcase}{1}{0}:% \noexpand\iftoggle{blx@terseinits}{1}{0}:% \noexpand\iftoggle{blx@useprefix}{1}{0}:% \noexpand\iftoggle{blx@useauthor}{1}{0}:% @@ -8172,7 +8229,7 @@ \noexpand\iftoggle{blx@labelyear}{1}{0}:% \noexpand\iftoggle{blx@singletitle}{1}{0}:% \noexpand\blx@uniquename:% - \noexpand\csuse{blx@opt@sorting@\noexpand\blx@sorting}:% + \noexpand\csuse{blx@bibtex@sorting@\noexpand\blx@sorting}:% \noexpand\blx@sortlos:% \noexpand\the\c@maxnames:% \noexpand\the\c@minnames:% @@ -8186,11 +8243,15 @@ \blx@bcf@file \blx@bcf@comment{BIBER OPTIONS}% \blx@bcf@options{biber}{global}{% + \blx@bcf@svalue{bblencoding}{\blx@inputencoding}% \blx@bcf@svalue{bibencoding}{\blx@bibencoding}% - \blx@bcf@toggle{cssort}% \blx@bcf@toggle{debug}% - \blx@bcf@svalue{inputenc}{\blx@inputenc}% \blx@bcf@svalue{mincrossrefs}{\blx@mincrossrefs}% + \blx@bcf@toggle{sortcase}% + \ifdef\blx@sortlocale + {\blx@bcf@svalue{sortlocale}{\blx@sortlocale}} + {}% + \blx@bcf@toggle{sortupper}% }% \blx@bcf@comment{BIBLATEX OPTIONS}% \csuse{blx@biber@options}% @@ -8276,21 +8337,40 @@ \def\blx@bibencoding{#1}} \DeclareBibliographyOption{sorting}{% - \ifcsdef{blx@opt@sorting@#1} - {\def\blx@sorting{#1}} - {\blx@err@invopt{sorting=#1}{}}} -\def\blx@opt@sorting@none{0} -\def\blx@opt@sorting@nty{1} -\def\blx@opt@sorting@nyt{2} -\def\blx@opt@sorting@nyvt{3} -\def\blx@opt@sorting@anyt{12} -\def\blx@opt@sorting@anyvt{13} -\def\blx@opt@sorting@ynt{21} -\def\blx@opt@sorting@ydnt{22} -\def\blx@opt@sorting@debug{99} + \def\blx@sorting{#1}} +\def\blx@bibtex@sorting@none{0} +\def\blx@bibtex@sorting@nty{1} +\def\blx@bibtex@sorting@nyt{2} +\def\blx@bibtex@sorting@nyvt{3} +\def\blx@bibtex@sorting@anyt{12} +\def\blx@bibtex@sorting@anyvt{13} +\def\blx@bibtex@sorting@ynt{21} +\def\blx@bibtex@sorting@ydnt{22} +\def\blx@bibtex@sorting@debug{99} + +\AtEndPreamble{% + \ifnum\blx@backend=\blx@backend@biber + \ifcsdef{blx@biber@sorting@\blx@sorting @global} + {} + {\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} \DeclareBibliographyOption{sortcase}[true]{% - \settoggle{blx@cssort}{#1}} + \settoggle{blx@sortcase}{#1}} + +\DeclareBibliographyOption{sortupper}[true]{% + \settoggle{blx@sortupper}{#1}} + +\DeclareBibliographyOption{sortlocale}{% + \ifblank{#1} + {\undef\blx@sortlocale} + {\edef\blx@sortlocale{\detokenize{#1}}}} \DeclareBibliographyOption{sortlos}{% \ifcsdef{blx@opt@sortlos@#1} @@ -8451,10 +8531,23 @@ \DeclareBibliographyOption{backref}[true]{% \ifstrequal{#1}{true} - {\let\blx@backref\blx@backref@global - \let\abx@aux@backref\blx@aux@backref} - {\let\blx@backref\relax - \let\abx@aux@backref\@gobblefive}} + {\let\blx@backref\blx@addbackref + \let\abx@aux@backref\blx@aux@backref + \booltrue{backtracker}} + {\let\blx@backref\@gobble + \let\abx@aux@backref\@gobblefive + \boolfalse{backtracker}}} + +\DeclareBibliographyOption{backrefsetstyle}{% + \ifcsdef{blx@opt@backrefsetstyle@#1} + {\letcs\blx@backrefsetstyle{blx@opt@backrefsetstyle@#1}} + {\blx@err@invopt{backrefsetstyle=#1}{}}} +\def\blx@opt@backrefsetstyle@setonly{0} +\def\blx@opt@backrefsetstyle@memonly{1} +\def\blx@opt@backrefsetstyle@setormem{2} +\def\blx@opt@backrefsetstyle@setandmem{3} +\def\blx@opt@backrefsetstyle@memandset{4} +\def\blx@opt@backrefsetstyle@setplusmem{5} \appto\blx@mkhyperref{% \ifHy@plainpages @@ -8751,8 +8844,8 @@ \settoggle{blx@labelnumber}{#1}% \iftoggle{blx@labelnumber} {} - {\KV@blx@opt@pre@defernumbers{false}}} -\DeclareTypeOption{labelnumber}[true]{% FIXME: per-type check + {\setkeys{blx@opt@pre}{defernumbers=false}}} +\DeclareTypeOption{labelnumber}[true]{% \settoggle{blx@labelnumber}{#1}} \DeclareBibliographyOption{labelalpha}[true]{% @@ -8785,7 +8878,7 @@ \DeclareBibliographyOption{defernumbers}[true]{% \settoggle{blx@defernumbers}{#1}% \iftoggle{blx@defernumbers} - {\KV@blx@opt@pre@labelnumber{true}% + {\setkeys{blx@opt@pre}{labelnumber}% \let\blx@thelabelnumber\blx@addlabelnumber \let\abx@aux@number\blx@aux@number} {\let\blx@thelabelnumber\relax @@ -8908,12 +9001,12 @@ \setkeys{blx@opt@ldt}{style=numeric} \setkeys{blx@opt@pre}{% - sorting=nty,sortlos=los,sortcase,sortcites=false,maxnames=3,minnames=1, + sorting=nty,sortlos=los,sortcase,sortupper,sortcites=false,maxnames=3,minnames=1, maxitems=3,minitems=1,mincrossrefs=2,useauthor=true,useeditor=true, usetranslator=false,indexing=false,abbreviate=true,dateabbrev=true, - backref=false,pagetracker=false,ibidtracker=false,idemtracker=false, - opcittracker=false,loccittracker=false,citetracker=false,block=none, - language=auto,clearlang=true,babel=none,date=comp,origdate=comp, + backref=false,backrefsetstyle=setonly,pagetracker=false,ibidtracker=false, + idemtracker=false,opcittracker=false,loccittracker=false,citetracker=false, + block=none,language=auto,clearlang=true,babel=none,date=comp,origdate=comp, eventdate=comp,urldate=short,autopunct=true,punctfont=false, defernumbers=false,refsection=none,refsegment=none,citereset=none, hyperref=auto,maxline=79,parentracker,maxparens=3,bibwarn} @@ -9052,28 +9145,28 @@ \ifundef\inputencodingname {\ifundef\XeTeXrevision {\ifundef\luatexversion - {\def\blx@inputenc{ascii}% + {\def\blx@inputencoding{ascii}% \blx@info@noline{% No input encoding detected.\MessageBreak - Assuming '\blx@inputenc'}} - {\def\blx@inputenc{utf8}% + Assuming '\blx@inputencoding'}} + {\def\blx@inputencoding{utf8}% \blx@info@noline{% LuaTeX detected.\MessageBreak - Assuming input encoding '\blx@inputenc'}}} - {\def\blx@inputenc{utf8}% + Assuming input encoding '\blx@inputencoding'}}} + {\def\blx@inputencoding{utf8}% \blx@info@noline{% XeTeX detected.\MessageBreak - Assuming input encoding '\blx@inputenc'}}} - {\let\blx@inputenc\inputencodingname + Assuming input encoding '\blx@inputencoding'}}} + {\let\blx@inputencoding\inputencodingname \ifboolexpr{ - test {\ifdefstring\blx@inputenc{utf8x}} + test {\ifdefstring\blx@inputencoding{utf8x}} or - test {\ifdefstring\blx@inputenc{lutf8}} + test {\ifdefstring\blx@inputencoding{lutf8}} } - {\def\blx@inputenc{utf8}} + {\def\blx@inputencoding{utf8}} {}% \blx@info@noline{% - Input encoding '\blx@inputenc' detected}}% + Input encoding '\blx@inputencoding' detected}}% \ifdef\blx@bibencoding {\ifdefstring\blx@bibencoding{ascii} {\blx@info@noline{% @@ -9081,12 +9174,12 @@ No need to reencode data}% \togglefalse{blx@reencode}} {\ifdefstring\blx@bibencoding{inputenc} - {\let\blx@bibencoding\blx@inputenc + {\let\blx@bibencoding\blx@inputencoding \blx@info@noline{% Data encoding '\blx@bibencoding' specified.\MessageBreak No need to reencode data} \togglefalse{blx@reencode}} - {\ifdefequal\blx@bibencoding\blx@inputenc + {\ifdefequal\blx@bibencoding\blx@inputencoding {\blx@info@noline{% Data encoding '\blx@bibencoding' specified.\MessageBreak No need to reencode data}% |