summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/biblatex.sty
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-02 18:35:15 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2011-08-02 18:35:15 +0000
commitc047122dd76be17f819bf86afd136bddf9f8c41f (patch)
treeb0068c3692a312dbad2025085e4e40bf0300d8dc /Master/texmf-dist/tex/latex/biblatex/biblatex.sty
parenta9aa077338c951ba3f5d90d923b4bb548dc7b3d8 (diff)
biblatex 1.6 2011/07/29
git-svn-id: svn://tug.org/texlive/trunk@23324 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.sty687
1 files changed, 404 insertions, 283 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty
index 691a718af65..ea050248981 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 1.5 2011/06/08 18:45:46 lehman stable $
+% $Id: biblatex.sty,v 1.6 2011/07/29 19:21:28 lehman stable $
% Copyright (c) 2006-2011 Philipp Lehman.
%
@@ -21,11 +21,11 @@
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{biblatex}
-[\abx@rcsid $Id: biblatex.sty,v 1.5 2011/06/08 18:45:46 lehman stable $
+[\abx@rcsid $Id: biblatex.sty,v 1.6 2011/07/29 19:21:28 lehman stable $
programmable bibliographies]
\def\blx@bblversion$#1: #2 ${#2}
-\edef\blx@bblversion{\blx@bblversion$Revision: 1.5 $}
+\edef\blx@bblversion{\blx@bblversion$Revision: 1.6 $}
%% Dependencies
@@ -235,8 +235,6 @@
\newcount\@quotereset
\newcommand*{\@setquotesfcodes}{}%
\let\@setquotesfcodes\relax
- \newcommand*{\@ifquotemarker}{}%
- \let\@ifquotemarker\@secondoftwo
\newrobustcmd*{\initoquote}{\@quotelevel\@ne}%
\newrobustcmd*{\initiquote}{\@quotelevel\tw@}%
\newrobustcmd*{\textooquote}{``}%
@@ -354,6 +352,7 @@
\newcount\blx@tempcnta
\newcount\blx@tempcntb
+\newcount\blx@tempcntc
\newcount\blx@maxsection
\newcount\blx@maxsegment
\newcount\blx@notetype
@@ -363,10 +362,12 @@
\def\blx@backend{0}
\def\blx@uniquename{0}
\def\blx@uniquelist{0}
-\def\blx@maxbibnames{\c@maxnames}
-\def\blx@minbibnames{\c@minnames}
-\def\blx@maxcitenames{\c@maxnames}
-\def\blx@mincitenames{\c@minnames}
+\def\blx@maxbibnames{0}
+\def\blx@minbibnames{0}
+\def\blx@maxcitenames{0}
+\def\blx@mincitenames{0}
+\def\blx@maxalphanames{0}
+\def\blx@minalphanames{0}
\newlength{\labelnumberwidth}
\newlength{\labelalphawidth}
@@ -630,7 +631,7 @@
\@addtofilelist{#1}}
{#5}}
-% {<string>}
+% {<write>}{<precode>}{<string>}
\protected\def\blx@auxwrite#1#2#3{%
\if@filesw
@@ -833,11 +834,8 @@
\def\blx@err@nodocdiv#1{%
\blx@error
- {Failed to hook into \@backslashchar#1}
- {There are two possible reasons for this error.
- Either\MessageBreak the document class does not
- support chapters or the\MessageBreak implementation
- is not compatible with biblatex}}
+ {\@backslashchar#1 not provided by class}
+ {The document class does not seems to support #1s}}
\def\blx@err@nosec#1{%
\blx@error
@@ -917,6 +915,9 @@
\def\blx@warn@conflopt#1{%
\blx@warning{Conflicting options.\MessageBreak#1}}
+\def\blx@warn@depropt#1{%
+ \blx@warning{Deprecated option.\MessageBreak Ignoring '#1'}}
+
\def\blx@warn@bibempty{%
\@latex@warning{Empty bibliography}}
@@ -2736,40 +2737,185 @@
\long\def\blx@mkpagetotal@i[#1]#2{#1{#2}\endgroup}
-% [<pagination>][<postpro>]{<string>}
-% <*>[<postpro>]{<string>}
+\newcounter{mincomprange}
+\newcounter{maxcomprange}
+\newcounter{mincompwidth}
+\setcounter{mincomprange}{10}
+\setcounter{maxcomprange}{100000}
+\setcounter{mincompwidth}{1}
+\def\abx@rangeproclimit{100000}
-\protected\def\blx@imc@mkpagefirst{%
- \@ifstar
- {\@ifnextchar[%]
- {\blx@pagefirst@i}
- {\blx@pagefirst@i[\@firstofone]}}
- {\blx@pagefirst@ii}}
+% [<postpro>]{<string>}
-\long\def\blx@pagefirst@i[#1]#2{%
+\newrobustcmd*{\mkcomprange}[2][\@firstofone]{%
\begingroup
+ \let\blx@tempa\@empty
+ \protected\def\blx@range@out{\appto\blx@tempa}%
+ \let\blx@range@split\blx@comprange@split
+ \blx@imc@ifpages{#2}
+ {\blx@range@chunk{#2}}
+ {\blx@range@out{#2}}%
\edef\blx@tempa{\endgroup
- \unexpanded{#1}{\blx@pagefirst@iii#2\bibrangedash&}}%
+ \unexpanded{#1}{\expandonce\blx@tempa}}%
\blx@tempa}
-\newrobustcmd*{\blx@pagefirst@ii}[1][pagination]{%
- \@ifnextchar[%]
- {\blx@pagefirst@iiA{#1}}
- {\blx@pagefirst@iiA{#1}[\@firstofone]}}
+\def\blx@comprange@split#1{%
+ \def\blx@comprange@abort{\blx@range@out{#1}}%
+ \blx@comprange@range#1\bibrangedash\bibrangedash&}
+
+\def\blx@comprange@range#1\bibrangedash#2\bibrangedash#3&{%
+ \ifblank{#3}
+ {\blx@comprange@hyphen#1--&}
+ {\ifblank{#2}
+ {\blx@range@out{#1\bibrangedash}}
+ {\ifblank{#1}
+ {\blx@range@out{\bibrangedash#2}}
+ {\blx@comprange@check{#1}{#2}}}}}
+
+\def\blx@comprange@hyphen#1-#2-#3&{%
+ \ifblank{#3}
+ {\blx@comprange@abort}
+ {\ifblank{#2}
+ {\ifblank{#1}
+ {\let\blx@tempb\@empty}
+ {\def\blx@tempb{#1}}%
+ \blx@comprange@hyphen@i#3&}
+ {\ifblank{#1}
+ {\blx@range@out{\bibrangedash#2}}
+ {\blx@comprange@check{#1}{#2}}}}}
+
+\def\blx@comprange@hyphen@i#1-#2&{%
+ \ifblank{#1#2}
+ {\expandafter\blx@range@out
+ \expandafter{\blx@tempb\bibrangedash}}
+ {\notblank{#1}
+ {\ifdefempty\blx@tempb
+ {\blx@range@out{\bibrangedash#1}}
+ {\expandafter\blx@comprange@check
+ \expandafter{\blx@tempb}{#1}}}
+ {\blx@comprange@hyphen@i#2&}}}
+
+\def\blx@comprange@check#1#2{%
+ \blx@imc@ifinteger{#1}
+ {\blx@imc@ifinteger{#2}
+ {\blx@comprange@comp{#1}{#2}}
+ {\blx@range@out{#1\bibrangedash#2}}}
+ {\blx@range@out{#1\bibrangedash#2}}}
+
+\def\blx@comprange@comp#1#2{%
+ \def\blx@tempb{#1}%
+ \def\blx@tempc{#2}%
+ \let\blx@tempd\blx@tempc
+ \ifnum\c@maxcomprange<\abx@rangeproclimit\relax
+ \numdef\blx@tempe\abx@rangeproclimit
+ \else
+ \numdef\blx@tempe\c@maxcomprange
+ \fi
+ \blx@tempcntc=\blx@tempe\relax
+ \ifnum
+ \ifnum\c@mincompwidth<1\space1\fi
+ \ifnum\c@maxcomprange<10\space1\fi
+ \ifnum\c@mincomprange<\blx@tempb\space\else1\fi
+ \ifnum\blx@tempb<\numexpr\blx@tempcntc*10\relax\else1\fi
+ 0=\z@
+ \expandafter\blx@comprange@comp@div
+ \else
+ \expandafter\blx@comprange@end
+ \fi}
+
+\def\blx@comprange@end{%
+ \numdef\blx@tempb\blx@tempb
+ \ifnum\blx@tempe>\c@maxcomprange\relax
+ \numdef\blx@tempc\blx@tempc
+ \else
+ \numdef\blx@tempc\blx@tempd
+ \fi
+ \edef\blx@tempb{\blx@range@out{\blx@tempb\noexpand\bibrangedash\blx@tempc}}%
+ \blx@tempb}
+
+\def\blx@comprange@comp@div{%
+ \unless\ifnum\blx@tempb<\blx@tempcntc
+ \blx@tempcnta\blx@tempb\relax
+ \blx@tempcntb\blx@tempc\relax
+ \divide\blx@tempcnta\blx@tempcntc
+ \divide\blx@tempcntb\blx@tempcntc
+ \ifnum\blx@tempcnta=\blx@tempcntb
+ \edef\blx@tempd{\expandafter\@gobble\blx@tempd}%
+ \numdef\blx@tempe\blx@tempcntc
+ \fi
+ \fi
+ \divide\blx@tempcntc10\relax
+ \ifnum
+ \ifnum\blx@tempcntc<10 1\fi
+ \ifnum\blx@tempcntc>\c@mincompwidth\else 1\fi
+ 0=\z@
+ \expandafter\blx@comprange@comp@div
+ \else
+ \expandafter\blx@comprange@end
+ \fi}
+
+\def\blx@range@chunk#1{%
+ \blx@range@chunk@semcol#1;&}
+
+\def\blx@range@chunk@semcol#1;#2&{%
+ \notblank{#1}
+ {\blx@range@chunk@comma#1,&}
+ {}%
+ \notblank{#2}
+ {\notblank{#1}{\blx@range@out{;\space}}{}%
+ \blx@range@chunk@semcol#2&}
+ {}}
+
+\def\blx@range@chunk@comma#1,#2&{%
+ \notblank{#1}
+ {\expandafter\blx@range@split
+ \expandafter{\@firstofone#1}}
+ {}%
+ \notblank{#2}
+ {\notblank{#1}{\blx@range@out{,\space}}{}%
+ \blx@range@chunk@comma#2&}
+ {}}
-\protected\long\def\blx@pagefirst@iiA#1[#2]#3{%
+% [<postpro>]{<string>}
+
+\newrobustcmd*{\mkfirstpage}[2][\@firstofone]{%
\begingroup
- \def\blx@tempa{\endgroup\mkpageprefix[#1][#2]}%
- \eappto\blx@tempa{{\blx@pagefirst@iii#3\bibrangedash&}}%
+ \let\blx@tempa\@empty
+ \protected\def\blx@range@out{\appto\blx@tempa}%
+ \let\blx@range@split\blx@firstpage@split
+ \blx@imc@ifpages{#2}
+ {\blx@range@chunk{#2}}
+ {\blx@range@out{#2}}%
+ \edef\blx@tempa{\endgroup
+ \unexpanded{#1}{\expandonce\blx@tempa}}%
\blx@tempa}
-\long\def\blx@pagefirst@iii#1\bibrangedash#2&{%
- \blx@pagefirst@iv#1\textendash&}
-\long\def\blx@pagefirst@iv#1\textendash#2&{%
- \blx@pagefirst@v#1\textemdash&}
-\long\def\blx@pagefirst@v#1\textemdash#2&{%
- \blx@pagefirst@vi#1-&}
-\long\def\blx@pagefirst@vi#1-#2&{#1}
+\def\blx@firstpage@split#1{%
+ \def\blx@firstpage@abort{\blx@range@out{#1}}%
+ \blx@firstpage@range#1\bibrangedash\bibrangedash&}
+
+\def\blx@firstpage@range#1\bibrangedash#2\bibrangedash#3&{%
+ \ifblank{#3}
+ {\blx@firstpage@hyphen#1--&}
+ {\ifblank{#1}
+ {\blx@range@out{\bibrangedash#2}}
+ {\blx@range@out{#1}}}}
+
+\def\blx@firstpage@hyphen#1-#2-#3&{%
+ \ifblank{#3}
+ {\blx@firstpage@abort}
+ {\ifblank{#1}
+ {\ifblank{#2}
+ {\blx@firstpage@hyphen@i#3&}
+ {\blx@range@out{\bibrangedash#2}}}
+ {\blx@range@out{#1}}}}
+
+\def\blx@firstpage@hyphen@i#1-#2&{%
+ \ifblank{#1}
+ {\ifblank{#2}
+ {\blx@firstpage@abort}
+ {\blx@firstpage@hyphen@i#2&}}
+ {\blx@range@out{\bibrangedash#1}}}
\newcommand*{\ppspace}{\addnbspace}
\newcommand*{\sqspace}{\addnbspace}
@@ -2812,11 +2958,6 @@
\global\let\blx@unitpunct\newunitpunct
\blx@imc@resetpunctfont}
-\def\blx@nounit{%
- \global\togglefalse{blx@lastins}}
-
-\def\blx@unitmark{23sp}
-
\def\blx@begunit{%
\toggletrue{blx@tempa}%
\iftoggle{blx@insert}
@@ -2824,6 +2965,7 @@
{\begingroup
\let\blx@begunit\@empty
\let\blx@endunit\@empty
+ \let\blx@endnounit\@empty
\blx@unitpunct\blx@postpunct
\endgroup
\global\togglefalse{blx@unit}%
@@ -2833,6 +2975,7 @@
{\begingroup
\let\blx@begunit\@empty
\let\blx@endunit\@empty
+ \let\blx@endnounit\@empty
\newblockpunct
\endgroup
\global\togglefalse{blx@block}%
@@ -2845,22 +2988,18 @@
{}
{\global\togglefalse{blx@insert}}%
\blx@leavevmode
- \@ifquotemarker
- {}
- {\penalty\@M
- \hskip-\blx@unitmark\relax
- \hskip\blx@unitmark\relax}%
\begingroup}
\def\blx@endunit{%
\endgroup
- \ifdim\lastskip=\blx@unitmark
- \unskip\unskip\unpenalty
- \global\togglefalse{blx@lastins}%
- \else
- \global\toggletrue{blx@insert}%
- \global\toggletrue{blx@lastins}%
- \fi}
+ \global\toggletrue{blx@insert}%
+ \global\toggletrue{blx@lastins}}
+
+\def\blx@nounit{%
+ \global\togglefalse{blx@lastins}}
+
+\def\blx@endnounit{%
+ \endgroup\blx@nounit}
\protected\def\blx@imc@newblock{%
\global\toggletrue{blx@block}}%
@@ -3456,6 +3595,7 @@
\define@key{blx@opt@name}{uniquelist}{\c@uniquelist#1\relax}
\define@key{blx@opt@name}{uniquename}{\c@uniquename#1\relax}
+\define@key{blx@opt@name}{hash}{\edef\abx@field@hash{\detokenize{#1}}}
\newrobustcmd*{\bibinitperiod}{\adddot}
\newrobustcmd*{\bibinitdelim}{\addnbspace}
@@ -3675,11 +3815,12 @@
\let\bibsstring\blx@imc@bibxsstring
\lowercase{\edef\blx@tempa{#3}}%
\ifcsundef{#2@\blx@tempa}
- {\blx@warn@nostring\blx@tempa}
+ {\blx@warn@nostring\blx@tempa
+ \blx@endnounit}
{\blx@imc@ifcapital
{#1{\MakeCapital{\csuse{#2@\blx@tempa}}}}
- {#1{\csuse{#2@\blx@tempa}}}}%
- \blx@endunit}
+ {#1{\csuse{#2@\blx@tempa}}}%
+ \blx@endunit}}
% [<wrapper>]{<string>}
@@ -3700,9 +3841,10 @@
\let\bibsstring\blx@imc@bibxsstring
\lowercase{\edef\blx@tempa{#3}}%
\ifcsundef{#2@\blx@tempa}
- {\blx@warn@nostring\blx@tempa}
- {#1{\MakeCapital{\csuse{#2@\blx@tempa}}}}%
- \blx@endunit}
+ {\blx@warn@nostring\blx@tempa
+ \blx@endnounit}
+ {#1{\MakeCapital{\csuse{#2@\blx@tempa}}}%
+ \blx@endunit}}
% [<wrapper>]{<string>}
@@ -3723,9 +3865,10 @@
\let\bibsstring\blx@imc@bibxsstring
\lowercase{\edef\blx@tempa{#3}}%
\ifcsundef{#2@\blx@tempa}
- {\blx@warn@nostring\blx@tempa}
- {#1{\MakeLowercase{\csuse{#2@\blx@tempa}}}}%
- \blx@endunit}
+ {\blx@warn@nostring\blx@tempa
+ \blx@endnounit}
+ {#1{\MakeLowercase{\csuse{#2@\blx@tempa}}}%
+ \blx@endunit}}
% [<wrapper>]{<string>}
@@ -3746,9 +3889,10 @@
\let\bibsstring\blx@imc@bibxsstring
\lowercase{\edef\blx@tempa{#3}}%
\ifcsundef{#2@\blx@tempa}
- {\blx@warn@nostring\blx@tempa}
- {#1{\MakeUppercase{\csuse{#2@\blx@tempa}}}}%
- \blx@endunit}
+ {\blx@warn@nostring\blx@tempa
+ \blx@endnounit}
+ {#1{\MakeUppercase{\csuse{#2@\blx@tempa}}}%
+ \blx@endunit}}
% {<string>}
@@ -5939,54 +6083,6 @@
{The check '#1' could not be found.\MessageBreak
Use \string\defbibcheck\space to define it}}}
-\define@key{blx@bib}{maxnames}{\blx@key@maxnames{#1}}
-\define@key{blx@los}{maxnames}{\blx@key@maxnames{#1}}
-\define@key{blx@bbs}{maxnames}{\blx@key@maxnames{#1}}
-\define@key{blx@bbg}{maxnames}{\blx@key@maxnames{#1}}
-\define@key{blx@bbc}{maxnames}{\blx@key@maxnames{#1}}
-
-\def\blx@key@maxnames#1{%
- \ifnum#1<\c@maxnames
- \blx@err@confopt{maxnames}{%
- The value may not be smaller than the
- global 'maxnames' (=\the\c@maxnames)}%
- \else
- \blx@setmaxval{names}{#1}%
- \fi}
-
-\def\blx@setmaxbibnames{%
- \c@maxnames=\blx@premaxnames\relax
- \c@maxnames=\blx@maxbibnames\relax
- \c@minnames=\blx@preminnames\relax
- \c@minnames=\blx@minbibnames\relax}
-
-\define@key{blx@bib}{minnames}{\blx@key@minnames{#1}}
-\define@key{blx@los}{minnames}{\blx@key@minnames{#1}}
-\define@key{blx@bbs}{minnames}{\blx@key@minnames{#1}}
-\define@key{blx@bbg}{minnames}{\blx@key@minnames{#1}}
-\define@key{blx@bbc}{minnames}{\blx@key@minnames{#1}}
-
-\def\blx@key@minnames#1{%
- \ifnum#1<\c@minnames
- \blx@err@confopt{minnames}{%
- The value may not be smaller than the
- global 'minnames' (=\the\c@minnames)}%
- \else
- \blx@setminval{names}{#1}%
- \fi}
-
-\define@key{blx@bib}{maxitems}{\blx@setmaxitems{#1}}
-\define@key{blx@los}{maxitems}{\blx@setmaxitems{#1}}
-\define@key{blx@bbs}{maxitems}{\blx@setmaxitems{#1}}
-\define@key{blx@bbg}{maxitems}{\blx@setmaxitems{#1}}
-\define@key{blx@bbc}{maxitems}{\blx@setmaxitems{#1}}
-
-\define@key{blx@bib}{minitems}{\blx@setminitems{#1}}
-\define@key{blx@los}{minitems}{\blx@setminitems{#1}}
-\define@key{blx@bbs}{minitems}{\blx@setminitems{#1}}
-\define@key{blx@bbg}{minitems}{\blx@setminitems{#1}}
-\define@key{blx@bbc}{minitems}{\blx@setminitems{#1}}
-
\define@key{blx@bhd}{heading}{\blx@key@heading{#1}}
\define@key{blx@bib}{heading}{\blx@key@heading{#1}}
\define@key{blx@los}{heading}{\blx@key@heading{#1}}
@@ -6110,7 +6206,8 @@
\let\blx@theprenote\@empty
\let\blx@thepostnote\@empty
\let\blx@thetitle\@empty
- \blx@setmaxbibnames
+ \c@maxnames\blx@maxbibnames\relax
+ \c@minnames\blx@minbibnames\relax
\blx@safe@actives
\setkeys{blx@bib}{#1}%
\blx@rest@actives
@@ -6137,7 +6234,8 @@
\let\blx@thepostnote\@empty
\let\blx@thetitle\@empty
\c@refsection\z@
- \blx@setmaxbibnames
+ \c@maxnames\blx@maxbibnames\relax
+ \c@minnames\blx@minbibnames\relax
\blx@safe@actives
\setkeys{blx@bbs}{#1}%
\blx@rest@actives
@@ -6178,7 +6276,8 @@
\let\blx@thetitle\@empty
\c@refsection\z@
\c@refsegment\@ne
- \blx@setmaxbibnames
+ \c@maxnames\blx@maxbibnames\relax
+ \c@minnames\blx@minbibnames\relax
\blx@safe@actives
\setkeys{blx@bbg}{#1}%
\blx@rest@actives
@@ -6221,7 +6320,8 @@
\let\blx@thetitle\@empty
\c@refsection\z@
\blx@safe@actives
- \blx@setmaxbibnames
+ \c@maxnames\blx@maxbibnames\relax
+ \c@minnames\blx@minbibnames\relax
\setkeys{blx@bbc}{#1}%
\blx@rest@actives
\togglefalse{blx@tempa}%
@@ -6441,7 +6541,8 @@
\let\blx@thepostnote\@empty
\let\blx@thetitle\@empty
\let\blx@printbibchecks\relax
- \blx@setmaxbibnames
+ \c@maxnames\blx@maxbibnames\relax
+ \c@minnames\blx@minbibnames\relax
\blx@safe@actives
\setkeys{blx@los}{#1}%
\blx@rest@actives
@@ -6674,6 +6775,63 @@
\def\blx@endrefsegment{%
\global\c@refsegment\z@}
+% Reference section/segment auto-reset
+
+\def\blx@refpatch@part#1{%
+ \ifundef\part
+ {\blx@err@nodocdiv{part}}
+ {\toggletrue{blx@tempa}%
+ \def\do##1{%
+ \patchcmd##1{\@endpart}{#1\@endpart}
+ {\togglefalse{blx@tempa}\listbreak}
+ {}}%
+ \docsvlist{%
+ \H@old@part,% hyperref
+ \NR@part,% nameref
+ \@part}% latex/koma-script/memoir
+ \iftoggle{blx@tempa}
+ {\blx@err@patch{\string\@part}}
+ {}%
+ \let\do\noexpand}}
+
+\def\blx@refpatch@chapter#1{%
+ \ifundef\chapter
+ {\blx@err@nodocdiv{chapter}}
+ {\apptocmd\@makechapterhead{#1}
+ {}
+ {\blx@err@patch{\string\@makechapterhead}}}}
+
+\def\blx@refpatch@sect#1{%
+ \ifcsundef{#1}
+ {\blx@err@nodocdiv{#1}\@gobbletwo}
+ {\blx@refpatch@sect@i}}
+
+\edef\blx@refpatch@sect@i#1#2{%
+ \def\noexpand\do##1{%
+ \patchcmd##1%
+ {\noexpand\@xsect}
+ {\noexpand\blx@refpatch@sect@ii{#1}{#2}{\string#2}\noexpand\@xsect}
+ {\togglefalse{blx@tempa}\noexpand\listbreak}
+ {}}%
+ \noexpand\blx@refpatch@sect@iii}
+
+\def\blx@refpatch@sect@ii#1#2#3{%
+ \ifnumequal{#2}{#3}{#1}{}}
+
+\def\blx@refpatch@sect@iii{%
+ \toggletrue{blx@tempa}%
+ \docsvlist{% order does matter:
+ \H@old@sectm@m,% memoir+hyperref (what a mess...)
+ \M@sect,% memoir
+ \H@old@sect,% hyperref
+ \NR@sect,% nameref
+ \scr@sect,% koma-script 3.x
+ \@sect}% latex
+ \iftoggle{blx@tempa}
+ {\blx@err@patch{\string\@sect}}
+ {}%
+ \let\do\noexpand}
+
% Bibliography categories
\let\blx@categories\@empty
@@ -8479,21 +8637,20 @@
\def\blx@volcitecmd@ii[#1]#2{%
\appto\blx@tempa{[#1]}%
+ \blx@getformat\blx@tempb{ffd}{}{volcitevolume}%
\@ifnextchar[%]
{\blx@volcitecmd@iii{#2}}
- {\blx@tempa[\blx@volcite@vol{#2}]}}
+ {\edef\blx@tempa{\expandonce\blx@tempa[{%
+ \expandonce{\blx@tempb{#2}}}]}%
+ \blx@tempa}}
\def\blx@volcitecmd@iii#1[#2]{%
- \blx@tempa[\blx@volcite@vol{#1}\blx@volcite@page{#2}]}
-
-\protected\def\blx@volcite@vol#1{%
- \bibstring{volume}\ppspace#1}
-\protected\def\blx@volcite@page#1{%
- \addcomma\space\mkpageprefix{#1}}
-
-\appto\blx@hook@ifpages{%
- \let\blx@volcite@vol\@gobble
- \let\blx@volcite@page\@firstofone}
+ \blx@getformat\blx@tempc{ffd}{}{volcitepages}%
+ \edef\blx@tempa{\expandonce\blx@tempa[{%
+ \expandonce{\blx@tempb{#1}}%
+ \noexpand\addcomma\noexpand\space
+ \expandonce{\blx@tempc{#2}}}]}
+ \blx@tempa}
%% Control file
@@ -8542,7 +8699,7 @@
#1%
~~~~</bcf:inherit>\blx@nl}
\xdef\blx@xml@inherit@type#1#2#3{%
- ~~~~~~<bcf:type_pair source="#1" target="#2"#3/>\blx@nl}
+ ~~~~~~<bcf:type\string_pair source="#1" target="#2"#3/>\blx@nl}
\xdef\blx@xml@inherit@field#1#2#3{%
~~~~~~<bcf:field source="#1" target="#2"#3/>\blx@nl}
\xdef\blx@xml@inherit@block#1{%
@@ -8602,10 +8759,14 @@
\blx@xml@mvalue{labelnamespec}{\blx@bcf@labelnamespec}%
\blx@xml@toggle{labelyear}%
\blx@xml@mvalue{labelyearspec}{\blx@bcf@labelyearspec}%
+ \blx@xml@svalue{maxalphanames}{\blx@maxalphanames}%
+ \blx@xml@svalue{maxbibnames}{\blx@maxbibnames}%
\blx@xml@svalue{maxitems}{\the\c@maxitems}%
- \blx@xml@svalue{maxnames}{\the\c@maxnames}%
+ \blx@xml@svalue{maxnames}{\blx@maxcitenames}%
+ \blx@xml@svalue{minalphanames}{\blx@minalphanames}%
+ \blx@xml@svalue{minbibnames}{\blx@minbibnames}%
\blx@xml@svalue{minitems}{\the\c@minitems}%
- \blx@xml@svalue{minnames}{\the\c@minnames}%
+ \blx@xml@svalue{minnames}{\blx@mincitenames}%
\blx@xml@toggle{singletitle}%
\blx@xml@svalue{sortalphaothers}{\sortalphaothers}%
\blx@xml@svalue{sortlos}{\blx@sortlos}%
@@ -8666,8 +8827,8 @@
\noexpand\iftoggle{blx@singletitle}{1}{0}:%
\noexpand\csuse{blx@bibtex@sorting@\noexpand\blx@sorting}:%
\noexpand\blx@sortlos:%
- \noexpand\the\c@maxnames:%
- \noexpand\the\c@minnames:%
+ \noexpand\blx@maxcitenames:%
+ \noexpand\blx@mincitenames:%
\noexpand\blx@maxline:%
\noexpand\detokenize\noexpand\expandafter{\noexpand\labelalphaothers}%
\string},\blx@nl
@@ -8834,8 +8995,8 @@
\define@key{blx@inherit@field}{override}[true]{% true|false
\ifstrequal{#1}{true}
- {\def\blx@tempc{ override_target="true"}}
- {\def\blx@tempc{ override_target="false"}}}
+ {\edef\blx@tempc{ override\string_target="true"}}
+ {\edef\blx@tempc{ override\string_target="false"}}}
\newrobustcmd*{\ResetDataInheritance}{%
\global\csundef{blx@biber@inherit@data}}
@@ -8873,8 +9034,8 @@
\define@key{blx@sortdef@sort}{direction}{% ascending|descending
\ifstrequal{#1}{ascending}
- {\appto\blx@tempc{ sort_direction="ascending"}}
- {\appto\blx@tempc{ sort_direction="descending"}}}
+ {\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"}}
@@ -8905,19 +9066,19 @@
\define@key{blx@sortdef@field}{padside}{% left|right
\ifstrequal{#1}{right}
- {\appto\blx@tempd{ pad_side="right"}}
- {\appto\blx@tempd{ pad_side="left"}}}
+ {\eappto\blx@tempd{ pad\string_side="right"}}
+ {\eappto\blx@tempd{ pad\string_side="left"}}}
\define@key{blx@sortdef@field}{padwidth}{% integer
- \appto\blx@tempd{ pad_width="#1"}}
+ \eappto\blx@tempd{ pad\string_width="#1"}}
\define@key{blx@sortdef@field}{padchar}{% character
\blx@xmlsanitizeafter{\def\blx@tempe}{#1}%
- \eappto\blx@tempd{ pad_char="\blx@tempe"}}
+ \eappto\blx@tempd{ pad\string_char="\blx@tempe"}}
\define@key{blx@sortdef@field}{strside}{% left|right
\ifstrequal{#1}{right}
- {\appto\blx@tempd{ substring_side="right"}}
- {\appto\blx@tempd{ substring_side="left"}}}
+ {\eappto\blx@tempd{ substring\string_side="right"}}
+ {\eappto\blx@tempd{ substring\string_side="left"}}}
\define@key{blx@sortdef@field}{strwidth}{% integer
- \appto\blx@tempd{ substring_width="#1"}}
+ \eappto\blx@tempd{ substring\string_width="#1"}}
\def\blx@sortdef@literal#1{%
\advance\blx@tempcntb\@ne
@@ -9123,8 +9284,29 @@
\def\blx@opt@sortlos@bib{0}
\def\blx@opt@sortlos@los{1}
-\DeclareBibliographyOption{maxnames}{\blx@setmaxval{names}{#1}}
-\DeclareBibliographyOption{minnames}{\blx@setminval{names}{#1}}
+\DeclareBibliographyOption{maxnames}{%
+ \blx@setmaxval{names}{#1}%
+ \numdef\blx@maxbibnames{#1}%
+ \numdef\blx@maxcitenames{#1}}
+\DeclareBibliographyOption{minnames}{%
+ \blx@setminval{names}{#1}%
+ \numdef\blx@minbibnames{#1}%
+ \numdef\blx@mincitenames{#1}}
+
+\DeclareBibliographyOption{maxbibnames}{%
+ \blx@defmaxval{bibnames}{#1}}
+\DeclareBibliographyOption{minbibnames}{%
+ \blx@defminval{bibnames}{#1}}
+
+\DeclareBibliographyOption{maxcitenames}{%
+ \blx@defmaxval{citenames}{#1}}
+\DeclareBibliographyOption{mincitenames}{%
+ \blx@defminval{citenames}{#1}}
+
+\DeclareBibliographyOption{maxalphanames}{%
+ \blx@defmaxval{alphanames}{#1}}
+\DeclareBibliographyOption{minalphanames}{%
+ \blx@defminval{alphanames}{#1}}
\def\blx@setmaxval#1#2{%
\ifnumless{#2}\@ne
@@ -9144,12 +9326,6 @@
'min#1' must be less than or equal to 'max#1'}}
{\defcounter{min#1}{#2}}}}
-\DeclareBibliographyOption{maxbibnames}{\blx@defmaxval{bibnames}{#1}}
-\DeclareBibliographyOption{minbibnames}{\blx@defminval{bibnames}{#1}}
-
-\DeclareBibliographyOption{maxcitenames}{\blx@defmaxval{citenames}{#1}}
-\DeclareBibliographyOption{mincitenames}{\blx@defminval{citenames}{#1}}
-
\def\blx@defmaxval#1#2{%
\ifnumless{#2}\@ne
{\blx@err@invopt{max#1=#2}{%
@@ -9168,34 +9344,10 @@
'min#1' must be less than or equal to 'max#1'}}
{\csnumdef{blx@min#1}{#2}}}}
-\DeclareBibliographyOption{maxitems}{\blx@setmaxitems{#1}}
-\DeclareBibliographyOption{minitems}{\blx@setminitems{#1}}
-
-\def\blx@setmaxitems#1{%
- \ifnum#1<\@ne
- \blx@err@invopt{maxitems=#1}
- {'maxitems' must be greater than zero}%
- \else
- \ifnum#1<\c@minitems
- \blx@err@confopt{maxitems/minitems}
- {'maxitems' must be greater than or equal to 'minitems'}%
- \else
- \c@maxitems#1\relax
- \fi
- \fi}
-
-\def\blx@setminitems#1{%
- \ifnum#1<\@ne
- \blx@err@invopt{minitems=#1}
- {'minitems' must be greater than zero}%
- \else
- \ifnum#1>\c@maxitems
- \blx@err@confopt{maxitems/minitems}
- {'minitems' must be less than or equal to 'maxitems'}%
- \else
- \c@minitems#1\relax
- \fi
- \fi}
+\DeclareBibliographyOption{maxitems}{%
+ \blx@setmaxval{items}{#1}}
+\DeclareBibliographyOption{minitems}{%
+ \blx@setminval{items}{#1}}
\DeclareBibliographyOption{maxline}{%
\ifnum#1<49
@@ -9701,7 +9853,7 @@
\DeclareBibliographyOption{refsection}{%
\ifcsdef{blx@opt@refsection@#1}
- {\letcs\blx@refhook@section{blx@opt@refsection@#1}}
+ {\letcs\blx@refsecreset@level{blx@opt@refsection@#1}}
{\blx@err@invopt{refsection=#1}{}}}
\def\blx@opt@refsection@none{0}
\def\blx@opt@refsection@part{1}
@@ -9709,9 +9861,21 @@
\def\blx@opt@refsection@section{3}
\def\blx@opt@refsection@subsection{4}
+\AtEndPreamble{%
+ \ifcase\blx@refsecreset@level
+ \or % 1
+ \blx@refpatch@part\newrefsection
+ \or % 2
+ \blx@refpatch@chapter\newrefsection
+ \or % 3
+ \blx@refpatch@sect{section}{\newrefsection}{1}%
+ \or % 4
+ \blx@refpatch@sect{subsection}{\newrefsection}{2}%
+ \fi}
+
\DeclareBibliographyOption{refsegment}{%
\ifcsdef{blx@opt@refsegment@#1}
- {\letcs\blx@refhook@segment{blx@opt@refsegment@#1}}
+ {\letcs\blx@refsegreset@level{blx@opt@refsegment@#1}}
{\blx@err@invopt{refsegment=#1}{}}}
\def\blx@opt@refsegment@none{0}
\def\blx@opt@refsegment@part{1}
@@ -9719,9 +9883,31 @@
\def\blx@opt@refsegment@section{3}
\def\blx@opt@refsegment@subsection{4}
+\AtEndPreamble{%
+ \ifnumgreater\blx@refsegreset@level\z@
+ {\ifnumgreater\blx@refsegreset@level\blx@refsecreset@level
+ {}
+ {\blx@err@confopt
+ {refsegment/refsection}
+ {The 'refsegment' option must point to a
+ lower-level\MessageBreak document division
+ than 'refsection'}%
+ \def\blx@refsegreset@level{0}}}
+ {}%
+ \ifcase\blx@refsegreset@level
+ \or % 1
+ \blx@refpatch@part\newrefsegment
+ \or % 2
+ \blx@refpatch@chapter\newrefsegment
+ \or % 3
+ \blx@refpatch@sect{section}{\newrefsegment}{1}%
+ \or % 4
+ \blx@refpatch@sect{subsection}{\newrefsegment}{2}%
+ \fi}
+
\DeclareBibliographyOption{citereset}{%
\ifcsdef{blx@opt@citereset@#1}
- {\letcs\blx@resethook{blx@opt@citereset@#1}}
+ {\letcs\blx@citereset@level{blx@opt@citereset@#1}}
{\blx@err@invopt{citereset=#1}{}}}
\def\blx@opt@citereset@none{0}
\def\blx@opt@citereset@part{1}
@@ -9729,6 +9915,18 @@
\def\blx@opt@citereset@section{3}
\def\blx@opt@citereset@subsection{4}
+\AtEndPreamble{%
+ \ifcase\blx@citereset@level
+ \or % 1
+ \blx@refpatch@part{\citereset\blx@inf@creset}%
+ \or % 2
+ \blx@refpatch@chapter{\citereset\blx@inf@creset}%
+ \or % 3
+ \blx@refpatch@sect{section}{\citereset\blx@inf@creset}{1}%
+ \or % 4
+ \blx@refpatch@sect{subsection}{\citereset\blx@inf@creset}{2}%
+ \fi}
+
\DeclareBibliographyOption{bibwarn}[true]{%
\ifstrequal{#1}{true}
{\let\blx@bbl@thewarn\blx@bbl@warn}
@@ -9816,7 +10014,8 @@
\setkeys{blx@opt@ldt}{style=numeric}
\setkeys{blx@opt@pre}{%
- sorting=nty,sortlos=los,sortcase,sortupper,sortcites=false,maxnames=3,minnames=1,
+ sorting=nty,sortlos=los,sortcase,sortupper,sortcites=false,
+ maxnames=3,minnames=1,maxalphanames=3,minalphanames=1,
maxitems=3,minitems=1,mincrossrefs=2,useauthor=true,useeditor=true,
usetranslator=false,indexing=false,abbreviate=true,dateabbrev=true,
backref=false,backrefsetstyle=setonly,pagetracker=false,ibidtracker=false,
@@ -9862,6 +10061,18 @@
% Deferred setup at end of preamble
\AtEndPreamble{%
+ \ifnumless\blx@maxbibnames\blx@maxcitenames
+ {\blx@warn@conflopt{%
+ 'maxbibnames' (=\the\numexpr\blx@maxbibnames\relax)
+ should not be smaller than\MessageBreak
+ 'maxcitenames' (=\the\numexpr\blx@maxcitenames\relax)}}
+ {}%
+ \ifnumless\blx@minbibnames\blx@mincitenames
+ {\blx@warn@conflopt{%
+ 'minbibnames' (=\the\numexpr\blx@minbibnames\relax)
+ should not be smaller than\MessageBreak
+ 'mincitenames' (=\the\numexpr\blx@mincitenames\relax)}}
+ {}%
\iftoggle{blx@firstinits}
{\ifnumequal\blx@uniquename\blx@opt@uniquename@full
{\blx@warn@conflopt{%
@@ -9889,95 +10100,7 @@
Setting 'uniquelist=true'}%
\setkeys{blx@opt@pre}{uniquelist}}
{}}
- {}%
- \ifnumgreater\blx@refhook@segment\z@
- {\ifnumgreater\blx@refhook@segment\blx@refhook@section
- {}
- {\blx@err@confopt
- {refsegment/refsection}
- {The 'refsegment' option must point to a
- lower-level\MessageBreak document division
- than 'refsection'}%
- \def\blx@refhook@segment{0}}}
- {}%
- \ifcase\blx@refhook@segment
- \or % 1
- \ifundef\part
- {\blx@err@nodocdiv{part}}
- {\pretocmd\part{\newrefsegment}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 2
- \ifundef\chapter
- {\blx@err@nodocdiv{chapter}}
- {\pretocmd\chapter{\newrefsegment}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 3
- \ifundef\section
- {\blx@err@nodocdiv{section}}
- {\pretocmd\section{\newrefsegment}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 4
- \ifundef\subsection
- {\blx@err@nodocdiv{subsection}}
- {\pretocmd\subsection{\newrefsegment}
- {}
- {\blx@err@patch{\string\part}}}%
- \fi
- \ifcase\blx@refhook@section
- \or % 1
- \ifundef\part
- {\blx@err@nodocdiv{part}}
- {\pretocmd\part{\newrefsection}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 2
- \ifundef\chapter
- {\blx@err@nodocdiv{chapter}}
- {\pretocmd\chapter{\newrefsection}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 3
- \ifundef\section
- {\blx@err@nodocdiv{section}}
- {\pretocmd\section{\newrefsection}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 4
- \ifundef\subsection
- {\blx@err@nodocdiv{subsection}}
- {\pretocmd\subsection{\newrefsection}
- {}
- {\blx@err@patch{\string\part}}}%
- \fi
- \ifcase\blx@resethook
- \or % 1
- \ifundef\part
- {\blx@err@nodocdiv{part}}
- {\pretocmd\part{\citereset\blx@inf@creset}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 2
- \ifundef\chapter
- {\blx@err@nodocdiv{chapter}}
- {\pretocmd\chapter{\citereset\blx@inf@creset}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 3
- \ifundef\section
- {\blx@err@nodocdiv{section}}
- {\pretocmd\section{\citereset\blx@inf@creset}
- {}
- {\blx@err@patch{\string\part}}}%
- \or % 4
- \ifundef\subsection
- {\blx@err@nodocdiv{subsection}}
- {\pretocmd\subsection{\citereset\blx@inf@creset}
- {}
- {\blx@err@patch{\string\part}}}%
- \fi}
+ {}}
\def\blx@checkencoding{%
\ifdef\blx@texencoding
@@ -10067,7 +10190,7 @@
or
test {\@ifpackageloaded{inputenx}} )
}
- {\def\blx@texencoding{ascii}
+ {\def\blx@texencoding{ascii}%
\blx@info@noline{%
Input encoding '\blx@texencoding' forced by\MessageBreak
'safeinputenc' option}}
@@ -10079,6 +10202,8 @@
\AtBeginDocument{%
\blx@checkbackend{style}%
\blx@checkencoding
+ \c@maxnames\blx@maxcitenames\relax
+ \c@minnames\blx@mincitenames\relax
\if@filesw
\ifnum\blx@backend=\blx@backend@biber
\blx@ifsigned{\jobname}{bcf}
@@ -10099,11 +10224,7 @@
\csuse{abx@preamble}%
\blx@checkbackend{.bib file}%
\blx@inf@refsec
- \blx@inf@refseg
- \numdef\blx@premaxnames{\c@maxnames}%
- \numdef\blx@preminnames{\c@minnames}%
- \c@maxnames\blx@maxcitenames\relax
- \c@minnames\blx@mincitenames\relax}
+ \blx@inf@refseg}
\AtEndOfPackage{%
\AtBeginDocument{%