summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/bbx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-09 23:01:42 +0000
committerKarl Berry <karl@freefriends.org>2013-05-09 23:01:42 +0000
commit8542531ab70ed2628cb4e1c8674fee9821f81c6a (patch)
tree013384ef6495b9f19cd419d89b270b2b2570402a /Master/texmf-dist/tex/latex/biblatex/bbx
parent3316f6f00b0df5fa5871c2c3c1214501eced9b7a (diff)
biblatex 2.6 (9may13)
git-svn-id: svn://tug.org/texlive/trunk@30358 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/bbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx20
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx2
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx173
3 files changed, 140 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx
index feff034590c..11184cb886e 100644
--- a/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex/bbx/authoryear.bbx
@@ -1,6 +1,16 @@
\ProvidesFile{authoryear.bbx}
[\abx@bbxid]
+% authoryear styles are special in the following way:
+
+% The citation labels are "labelname (labelyear)" and since citation
+% labels are the keys into the references section, the fact that the
+% citation uses labelyear means that the references must also. This
+% means we use a special \printdate[extra]label macro to generate the
+% references section main date for an entry. Otherwise, if labeldate selects
+% anything other than DATE (or equivalently, YEAR/MONTH), then the
+% citation won't match the reference.
+
\RequireBibliographyStyle{standard}
\DeclareBibliographyOption{dashed}[true]{%
@@ -23,21 +33,21 @@
\def\bbx@opt@mergedate@maximum{%
\renewbibmacro*{date+extrayear}{%
- \iffieldundef{year}
+ \iffieldundef{labelyear}
{}
{\printtext[parens]{%
\printfield{issue}%
\setunit*{\addspace}%
- \printdateextra}}}%
+ \printdateextralabel}}}%
\renewbibmacro*{date}{}%
\renewbibmacro*{issue+date}{}%
}
\def\bbx@opt@mergedate@compact{%
\renewbibmacro*{date+extrayear}{%
- \iffieldundef{year}
+ \iffieldundef{labelyear}
{}
- {\printtext[parens]{\printdateextra}}}%
+ {\printtext[parens]{\printdateextralabel}}}%
\renewbibmacro*{date}{}%
\renewbibmacro*{issue+date}{%
\iffieldundef{issue}
@@ -118,7 +128,7 @@
\newunit}%
}
-\ExecuteBibliographyOptions{labelyear,sorting=nyt,pagetracker,mergedate}
+\ExecuteBibliographyOptions{labeldate,sorting=nyt,pagetracker,mergedate}
\DeclareFieldFormat{shorthandwidth}{#1}
\setlength{\bibitemsep}{0pt}
diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx
index 5ae940ff95b..d70de1fd075 100644
--- a/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx
@@ -49,7 +49,7 @@
\entryset
{\ifbool{bbx:subentry}
{\printfield[bibentrysetcount]{entrysetcount}%
- \setunit*{\addnbspace}}
+ \printunit*{\addnbspace}}
{}}
{}%
\newunit\newblock
diff --git a/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx b/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx
index 06d73b16a75..7af574d54c9 100644
--- a/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex/bbx/standard.bbx
@@ -55,7 +55,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{book}{%
@@ -100,7 +103,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{booklet}{%
@@ -134,7 +140,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{collection}{%
@@ -177,7 +186,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inbook}{%
@@ -225,7 +237,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{incollection}{%
@@ -271,7 +286,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{inproceedings}{%
@@ -319,7 +337,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{manual}{%
@@ -363,7 +384,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{misc}{%
@@ -395,7 +419,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{online}{%
@@ -429,7 +456,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{patent}{%
@@ -464,7 +494,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{periodical}{%
@@ -490,7 +523,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{proceedings}{%
@@ -535,7 +571,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{report}{%
@@ -573,7 +612,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{thesis}{%
@@ -607,7 +649,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{unpublished}{%
@@ -635,7 +680,10 @@
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
- \usebibmacro{related}%
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
\usebibmacro{finentry}}
\DeclareBibliographyDriver{shorthands}{%
@@ -833,42 +881,69 @@
\newcounter{bbx:relatedcount}
\newcounter{bbx:relatedtotal}
+\newbibmacro*{related:init}{%
+ \csundef{bbx:relatedloop}}
+
+\newbibmacro*{begrelated}{}
+\newbibmacro*{endrelated}{}
+
+\def\ifrelatedloop{%
+ \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}
+ or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}
+
\newbibmacro*{related}{%
- \ifboolexpr{
- not test {\iftoggle{bbx:related}}
- or
- test {\iffieldundef{related}}
- }
+ \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }
{}
- {\setcounter{bbx:relatedcount}{0}%
+ {\def\bbx@tempa{}%
\setcounter{bbx:relatedtotal}{0}%
- \def\do##1{\stepcounter{bbx:relatedtotal}}%
+ \def\do##1{%
+ \entrydata{##1}{%
+ \ifrelatedloop
+ {}
+ {\stepcounter{bbx:relatedtotal}%
+ \gappto{\bbx@tempa}{##1,}}}}%
\docsvfield{related}%
- \def\do{%
- \stepcounter{bbx:relatedcount}%
- \ifnumgreater{\value{bbx:relatedcount}}{1}
- {\printtext{\relateddelim}}
- {}}%
- \ifbibmacroundef{related:\strfield{relatedtype}}
- {\appto{\do}{\usebibmacro{related:default}}}
- {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
- \iffieldformatundef{related:\strfield{relatedtype}}
- {\def\bbx@tempa{related}}
- {\def\bbx@tempa{related:\strfield{relatedtype}}}%
- \printtext[\bbx@tempa]{%
- \iffieldundef{relatedstring}
- {\ifboolexpr{
- test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}
- and
- test {\ifbibxstring{\thefield{relatedtype}s}}
- }
- {\printtext{\bibstring{\thefield{relatedtype}s}\relatedpunct}}
- {\iffieldbibstring{relatedtype}
- {\printtext{\bibstring{\thefield{relatedtype}}\relatedpunct}}
- {}}}
- {\iffieldbibstring{relatedstring}
- {\printtext{\bibstring{\thefield{relatedstring}}\relatedpunct}}
- {\printtext{\printfield{relatedstring}\relatedpunct}}}%
- \docsvfield{related}}}}
+ \restorefield{related}{\bbx@tempa}%
+ \ifnumgreater{\value{bbx:relatedtotal}}{0}
+ {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}%
+ \iffieldundef{clonesourcekey}
+ {}
+ {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}%
+ \setcounter{bbx:relatedcount}{0}%
+ \def\do{%
+ \stepcounter{bbx:relatedcount}%
+ \ifnumgreater{\value{bbx:relatedcount}}{1}
+ {\printtext{\relateddelim}}
+ {}}%
+ \ifbibmacroundef{related:\strfield{relatedtype}}
+ {\appto{\do}{\usebibmacro{related:default}}}
+ {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
+ \iffieldformatundef{related:\strfield{relatedtype}}
+ {\def\bbx@tempa{related}}
+ {\def\bbx@tempa{related:\strfield{relatedtype}}}%
+ \iffieldformatundef{relatedstring:\strfield{relatedtype}}
+ {\def\bbx@tempb{relatedstring:default}}
+ {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}%
+ \printtext[\bbx@tempa]{%
+ \usebibmacro{begrelated}%
+ \iffieldundef{relatedstring}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}
+ and
+ test {\ifbibxstring{\thefield{relatedtype}s}}
+ }
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedtype}s}}}
+ {\iffieldbibstring{relatedtype}
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedtype}}}}
+ {}}}
+ {\iffieldbibstring{relatedstring}
+ {\printtext[\bbx@tempb]{%
+ \bibstring[\mkrelatedstring]{\thefield{relatedstring}}}}
+ {\printfield[\bbx@tempb]{relatedstring}}}%
+ \docsvfield{related}%
+ \usebibmacro{endrelated}}}%
+ {}}}
\endinput