summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/biblatex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/biblatex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/biblatex.sty146
1 files changed, 95 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex.sty
index 720508a3d4f..91c0618171e 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.3a 2011/03/18 12:20:20 lehman stable $
+% $Id: biblatex.sty,v 1.4 2011/03/31 21:55:36 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.3a 2011/03/18 12:20:20 lehman stable $
+[\abx@rcsid $Id: biblatex.sty,v 1.4 2011/03/31 21:55:36 lehman stable $
programmable bibliographies]
\def\blx@bblversion$#1: #2 ${#2}
-\edef\blx@bblversion{\blx@bblversion$Revision: 1.3 $}
+\edef\blx@bblversion{\blx@bblversion$Revision: 1.4 $}
%% Dependencies
@@ -136,14 +136,21 @@
\l@dold@footnotetext,% ledmac
\l@doldold@footnotetext,% ledmac
\@fntORI}% frenchle
- \def\do#1{%
- \patchcmd#1%
- {\color@begingroup}
- {\color@begingroup\toggletrue{blx@footnote}}
- {}
- {}}%
+ \iftoggle{blx@tempa}% ams classes
+ {\patchcmd\@footnotetext
+ {\@makefntext}
+ {\toggletrue{blx@footnote}\@makefntext}
+ {\togglefalse{blx@tempa}}
+ {}}
+ {}%
\@ifclassloaded{memoir}% memoir
- {\docsvlist{%
+ {\def\do#1{%
+ \patchcmd#1%
+ {\color@begingroup}
+ {\color@begingroup\toggletrue{blx@footnote}}
+ {}
+ {}}%
+ \docsvlist{%
\m@mold@footnotetext,%
\@plainfootnotetext,%
\@twocolfootnotetext,%
@@ -153,12 +160,7 @@
\iftoggle{blx@tempa}
{\blx@warning@noline{%
Patching footnotes failed.\MessageBreak
- Will try to fork \string\@footnotetext}%
- \let\blx@org@footnotetext\@footnotetext
- \long\def\@footnotetext#1{%
- \toggletrue{blx@footnote}%
- \blx@org@footnotetext{#1}%
- \togglefalse{blx@footnote}}}
+ Footnote detection will not work}}
{}%
\@ifpackageloaded{endnotes}
{\patchcmd\theendnotes
@@ -318,10 +320,10 @@
\def\thecitecount{\the\c@citecounter}
\newcounter{savedcitecounter}
\def\thecitecount{\the\c@savedcitecounter}
+\newcounter{uniquelist}
+\def\theuniquelist{\the\c@uniquelist}
\newcounter{uniquename}
\def\theuniquename{\the\c@uniquename}
-\newcounter{saveduniquename}
-\def\thesaveduniquename{\the\c@saveduniquename}
\newcounter{refsection}
\def\therefsection{\the\c@refsection}
\newcounter{refsegment}
@@ -394,6 +396,7 @@
\newtoggle{blx@labelalpha}
\newtoggle{blx@labelnumber}
\newtoggle{blx@labelyear}
+\newtoggle{blx@uniquelist}
\newtoggle{blx@natbib}
\newtoggle{blx@mcite}
\newtoggle{blx@loadfiles}
@@ -3398,8 +3401,10 @@
\blx@endunit}}}
\def\blx@namesetup#1#2#3{%
+ \def\currentname{#3}%
\c@listcount\@ne
- \expandafter\c@listtotal\csname c@#3\endcsname
+ \c@listtotal\csname c@#3\endcsname
+ \blx@namesetup@i{#3}%
\ifblank{#1}
{\c@liststart\@ne}
{\ifnum#1<\@ne
@@ -3409,9 +3414,10 @@
\fi}%
\ifblank{#2}
{\c@liststop\c@listtotal
- \ifnum\c@listtotal>\c@maxnames
- \ifnum\c@listtotal>\c@minnames
- \c@liststop\c@minnames
+ \ifnum\c@liststop>\c@maxnames
+ \c@liststop\c@minnames
+ \ifnum\c@uniquelist>\c@liststop
+ \c@liststop\c@uniquelist
\fi
\fi}
{\ifnum#2>\c@listtotal
@@ -3423,13 +3429,25 @@
\c@liststop#2\relax
\fi
\fi}%
- \def\currentname{#3}%
- \letcs\blx@thedata{abx@name@#3}%
\ifnumequal\blx@backend\blx@backend@biber
{}
- {\let~\bibnamedelima}%
+ {\let~\bibnamedelima}% BibTeX only
\blx@namecodes}
+\def\blx@namesetup@i#1{%
+ \expandafter\expandafter
+ \expandafter\blx@namesetup@ii\csname abx@name@#1\endcsname}
+
+\def\blx@namesetup@ii#1#2{%
+ \c@uniquelist\z@
+ \ifblank{#1}
+ {}
+ {\setkeys{blx@opt@name}{#1}}%
+ \def\blx@thedata{#2}}
+
+\define@key{blx@opt@name}{uniquelist}{\c@uniquelist#1\relax}
+\define@key{blx@opt@name}{uniquename}{\c@uniquename#1\relax}
+
\newrobustcmd*{\bibinitperiod}{\adddot}
\newrobustcmd*{\bibinitdelim}{\addnbspace}
\newrobustcmd*{\bibinithyphendelim}{.\mbox{-}}
@@ -3437,6 +3455,7 @@
\newrobustcmd*{\bibnamedelimb}{\addlowpenspace}
\newrobustcmd*{\bibnamedelimc}{\addhighpenspace}
\newrobustcmd*{\bibnamedelimd}{\addlowpenspace}
+\newrobustcmd*{\bibnamedelimi}{\addnbspace}
% [<format>][<start>-<stop>]{<namelist>}
@@ -3453,9 +3472,20 @@
{}
{\begingroup
\blx@namesetup{#2}{#3}{#4}%
+ \blx@indexnamesetup
\expandafter\blx@nameparser\blx@thedata{}&%
\endgroup}}}
+\def\blx@indexnamesetup{%
+ \let\bibinitperiod\bibindexinitperiod
+ \let\bibinitdelim\bibindexinitdelim
+ \let\bibinithyphendelim\bibindexinithyphendelim
+ \let\bibnamedelima\bibindexnamedelima
+ \let\bibnamedelimb\bibindexnamedelimb
+ \let\bibnamedelimc\bibindexnamedelimc
+ \let\bibnamedelimd\bibindexnamedelimd
+ \let\bibnamedelimi\bibindexnamedelimi}
+
% {<name1>}{<name2>}{...}
\long\def\blx@nameparser#1{%
@@ -3463,7 +3493,7 @@
{\blx@namebreak}
{\ifnum\c@listcount<\c@liststart
\else
- \blx@theformat#1%
+ \blx@nameparser@i#1%
\fi
\advance\c@listcount\@ne
\ifnum\c@listcount>\c@liststop
@@ -3471,6 +3501,12 @@
\fi
\blx@nameparser}}
+\long\def\blx@nameparser@i#1{%
+ \ifblank{#1}
+ {}
+ {\setkeys{blx@opt@name}{#1}}%
+ \blx@theformat}
+
\long\def\blx@namebreak#1&{}
% [<format>][<start>-<stop>]{<plainlist>}
@@ -3492,8 +3528,10 @@
\blx@endunit}}}
\def\blx@listsetup#1#2#3{%
+ \def\currentlist{#3}%
\c@listcount\@ne
\expandafter\c@listtotal\csname c@#3\endcsname
+ \letcs\blx@thedata{abx@list@#3}
\ifblank{#1}
{\c@liststart\@ne}
{\ifnum#1<\@ne
@@ -3504,9 +3542,7 @@
\ifblank{#2}
{\c@liststop\c@listtotal
\ifnum\c@listtotal>\c@maxitems
- \ifnum\c@listtotal>\c@minitems
- \c@liststop\c@minitems
- \fi
+ \c@liststop\c@minitems
\fi}
{\ifnum#2>\c@listtotal
\c@liststop\c@listtotal
@@ -3516,9 +3552,7 @@
\else
\c@liststop#2\relax
\fi
- \fi}%
- \def\currentlist{#3}%
- \letcs\blx@thedata{abx@list@#3}}
+ \fi}}
% [<format>][<start>-<stop>]{<plainlist>}
@@ -4768,7 +4802,6 @@
\abx@dofields\do{execute}\do{options}%
\def\do##1{\togglefalse{abx@bool@##1}}%
\abx@dobooleans
- \c@uniquename\z@
\c@citecounter\z@
\let\do\blx@saved@do}
@@ -4782,7 +4815,6 @@
\abx@dofields\do{execute}\do{options}%
\let\do\blx@savebool
\abx@dobooleans
- \c@saveduniquename\c@uniquename
\c@savedcitecounter\c@citecounter
\let\do\blx@saved@do}
@@ -4957,18 +4989,19 @@
% {<name>}{<itemcount>}{<value>}
-\protected\def\blx@bbl@namedef#1#2#3{%
+\protected\def\blx@bbl@namedef#1#2#3#4{%
\def\NewCount{#2}%
- \def\NewValue{#3}%
+ \def\NewOption{#3}%
+ \def\NewValue{#4}%
\ifcsdef{blx@nih@#1}
- {\csname blx@nih@#1\endcsname{#3}%
+ {\csname blx@nih@#1\endcsname{#4}%
\ifdefvoid\NewValue}
{\@secondoftwo}
{}
{\csxappto\blx@bbl@data{%
\csname c@#1\endcsname\NewCount\relax
\def\expandafter\noexpand\csname abx@name@#1\endcsname
- {\expandonce\NewValue}}}}
+ {{\expandonce\NewOption}{\expandonce\NewValue}}}}}
% {<entrykey>,...}
@@ -5955,9 +5988,9 @@
Use \string\defbibenvironment\space to define it}}
{\def\blx@theenv{#1}}}
-\define@key{blx@bhd}{title}{\long\def\blx@thetitle{#1}}
-\define@key{blx@bib}{title}{\long\def\blx@thetitle{#1}}
-\define@key{blx@los}{title}{\long\def\blx@thetitle{#1}}
+\define@key{blx@bhd}{title}{\def\blx@thetitle{#1}}
+\define@key{blx@bib}{title}{\def\blx@thetitle{#1}}
+\define@key{blx@los}{title}{\def\blx@thetitle{#1}}
\define@key{blx@bib}{prenote}{\blx@key@prenote{#1}}
\define@key{blx@los}{prenote}{\blx@key@prenote{#1}}
@@ -6029,11 +6062,8 @@
\blx@safe@actives
\setkeys{blx@bhd}{#1}%
\blx@rest@actives
- \edef\blx@tempa{\endgroup
- \noexpand\blx@bibheading
- {\expandonce\blx@theheading}
- {\expandonce\blx@thetitle}}%
- \blx@tempa}
+ \blx@bibheading\blx@theheading\blx@thetitle
+ \endgroup}
% [<options>]
@@ -6214,10 +6244,15 @@
\endgroup}
\def\blx@bibheading#1#2{%
+ \begingroup
+ \edef\blx@tempa{\endgroup
+ \noexpand\blx@bibheading@i{\expandonce#1}{\expandonce#2}}%
+ \blx@tempa}
+
+\def\blx@bibheading@i#1#2{%
\let\newrefsection\relax
\let\newrefsegment\relax
- \expandafter\ifblank
- \expandafter{#2}
+ \ifblank{#2}
{\csuse{blx@head@#1}}
{\csuse{blx@head@#1}[#2]}%
\let\newrefsection\blx@newrefsection
@@ -8546,6 +8581,7 @@
\blx@xml@toggle{singletitle}%
\blx@xml@svalue{sortalphaothers}{\sortalphaothers}%
\blx@xml@svalue{sortlos}{\blx@sortlos}%
+ \blx@xml@toggle{uniquelist}%
\blx@xml@svalue{uniquename}{\blx@uniquename}%
\blx@xml@toggle{useauthor}%
\blx@xml@toggle{useeditor}%
@@ -8571,6 +8607,7 @@
\blx@xml@toggle{skipbib}%
\blx@xml@toggle{skiplab}%
\blx@xml@toggle{skiplos}%
+ \blx@xml@toggle{uniquelist}%
\blx@xml@svalue{uniquename}{\blx@uniquename}%
\blx@xml@toggle{useauthor}%
\blx@xml@toggle{useeditor}%
@@ -8599,7 +8636,6 @@
\noexpand\iftoggle{blx@labelalpha}{1}{0}:%
\noexpand\iftoggle{blx@labelyear}{1}{0}:%
\noexpand\iftoggle{blx@singletitle}{1}{0}:%
- \noexpand\blx@uniquename:%
\noexpand\csuse{blx@bibtex@sorting@\noexpand\blx@sorting}:%
\noexpand\blx@sortlos:%
\noexpand\the\c@maxnames:%
@@ -9592,6 +9628,11 @@
\DeclareTypeOption{labelyear}[true]{%
\settoggle{blx@labelyear}{#1}}
+\DeclareBibliographyOption{uniquelist}[true]{%
+ \settoggle{blx@uniquelist}{#1}}
+\DeclareTypeOption{uniquelist}[true]{%
+ \settoggle{blx@uniquelist}{#1}}
+
\DeclareBibliographyOption{uniquename}[true]{%
\ifcsdef{blx@opt@uniquename@#1}
{\letcs\blx@uniquename{blx@opt@uniquename@#1}}
@@ -9603,6 +9644,9 @@
\def\blx@opt@uniquename@false{0}
\def\blx@opt@uniquename@init{1}
\def\blx@opt@uniquename@true{2}
+\def\blx@opt@uniquename@full{2}
+\def\blx@opt@uniquename@allinit{3}
+\def\blx@opt@uniquename@allfull{4}
\DeclareBibliographyOption{singletitle}[true]{%
\settoggle{blx@singletitle}{#1}}
@@ -9876,8 +9920,7 @@
{\pretocmd\subsection{\citereset\blx@inf@creset}
{}
{\blx@err@patch{\string\part}}}%
- \fi
- \blx@checkencoding}
+ \fi}
\def\blx@checkencoding{%
\ifdef\blx@texencoding
@@ -9978,6 +10021,7 @@
\AtBeginDocument{%
\blx@checkbackend{style}%
+ \blx@checkencoding
\if@filesw
\ifnum\blx@backend=\blx@backend@biber
\blx@ifsigned{\jobname}{bcf}