summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx28
1 files changed, 15 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
index a43548160c3..4312c0b854f 100644
--- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
@@ -1,4 +1,4 @@
-%% apa.cbx v2.6
+%% apa.cbx v2.7
%% Copyright 2011 Philip Kime
%%
%% This work may be distributed and/or modified under the
@@ -68,9 +68,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% (APA 6.12) 3-5 authors have "et al." after first cite. This doesn't
-% work properly in general with disambiguation of "et al"s
-% due to BibTeX limitations, see docs.
+% (APA 6.12) 3-5 authors have "et al." after first cite
% #1 = last name
% #2 = last name (initials)
@@ -91,19 +89,23 @@
\fi
\usebibmacro{name:andothers}}
+% Can't do this with the built-in printnames as APA requires truncation
+% and disambiguation only after first cite
\DeclareNameFormat{labelname}{%
\ifthenelse{\value{listcount}=1\OR\value{listtotal}=2}
{\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}
- {\ifthenelse{\value{listtotal}>5}
- {\ifnum\value{listcount}=2 \andothersdelim\bibstring{andothers}\fi
- \ifnum\value{listcount}>2 \relax\fi}
- {\ifciteseen
- {\ifnum\value{listcount}=2 \andothersdelim\bibstring{andothers}\fi
- \ifnum\value{listcount}=3 \relax\fi
- \ifnum\value{listcount}=4 \relax\fi
- \ifnum\value{listcount}=5 \relax\fi}
- {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}}}
+ {\ifthenelse{\ifciteseen\OR\value{listtotal}>5}
+ {\ifnumcomp{\value{listcount}}{<}{\value{uniquelist} + 1}% normal name
+ {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}%
+ {}%
+ \ifnumcomp{\value{listcount}}{=}{\value{uniquelist} + 1}% first past ul is et al
+ {\andothersdelim\bibstring{andothers}}%
+ {}%
+ \ifnumcomp{\value{listcount}}{>}{\value{uniquelist} + 1}% nothing thereafter
+ {\relax}%
+ {}}%
+ {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%