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.cbx81
1 files changed, 43 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
index e3fd66cfa82..8fdc1f2c0f4 100644
--- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx
@@ -12,14 +12,14 @@
%%
%% The Current Maintainer of this work is Philip Kime.
-\ProvidesFile{apa.cbx}[2017/01/06\space v7.4\space APA biblatex citation style]
+\ProvidesFile{apa.cbx}[2017/11/05\space v7.5\space APA biblatex citation style]
\RequireBiber[3]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 6.16) labelyear postfix is not emphasised or italic
% Dashes between labelyear and non-numeric year (or pseudo-year)
-\DeclareFieldFormat{extrayear}{\iffieldnums{labelyear}{\mknumalph{#1}}{\apashortdash\mknumalph{#1}}}
+\DeclareFieldFormat{extradate}{\iffieldnums{labelyear}{\mknumalph{#1}}{\apashortdash\mknumalph{#1}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -27,7 +27,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 6.11) requires comma separator between authors and years
-\renewcommand*{\nameyeardelim}{\addcomma\space}
+\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
+\DeclareDelimFormat[textcite]{nameyeardelim}{\addcomma\space}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -36,7 +37,7 @@
% (APA 6.12) No comma before "et al" if there is only one name
% preceding it
-\renewcommand*{\andothersdelim}{\ifnum\value{listcount}>2 \finalandcomma\fi\addspace}
+\DeclareDelimFormat{andothersdelim}{\ifnum\value{listcount}>2 \finalandcomma\fi\addspace}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -44,9 +45,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 6.12) ampersand separator in parenthetical cites
+\DeclareDelimFormat[parencite]{finalnamedelim}
+ {\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}
+
\DeclareCiteCommand{\parencite}[\mkbibparens]
- {\renewcommand{\finalnamedelim}{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}%
- \usebibmacro{cite:init}%
+ {\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
@@ -55,8 +58,7 @@
\usebibmacro{cite:post}}
\DeclareCiteCommand*{\parencite}[\mkbibparens]
- {\renewcommand{\finalnamedelim}{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}%
- \usebibmacro{cite:init}%
+ {\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{citeyear}}
@@ -147,7 +149,7 @@
% least one more element after the current potential truncation point
% so that "et al" covers at least two elements.
{\ifnumcomp{\value{listcount}}{<}{\value{listtotal}}
- {\andothersdelim\bibstring{andothers}}
+ {\printdelim{andothersdelim}\bibstring{andothers}}
{\usebibmacro{labelname:doname}%
{\namepartfamily}%
{\namepartfamilyi}%
@@ -214,7 +216,7 @@
% (APA 6.13) Deal with SHORTAUTHOR fields
% (APA 6.16) Multiple same author cites in a compact citation call do not
% need to be repeated but the full years must be repeated with
-% their extrayear postfixes
+% their extradate postfixes
% (APA 6.18) Cite ORIGYEAR/YEAR if ORIGYEAR present
% (APA 6.28) ISSUE after year when available
\def\citeresetapa{\global\let\cbx@apa@names\@empty}
@@ -228,7 +230,7 @@
\iffieldequals{fullhash}{\cbx@lasthash}
% Multiple cites in one command
{\setunit{\compcitedelim}%
- \usebibmacro{cite:plabelyear+extrayear}}%
+ \usebibmacro{cite:plabelyear+extradate}}%
% Single cite
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldequalstr{entrytype}{patent}}
% No author/editor
@@ -256,13 +258,13 @@
\iffieldequals{fullhash}{\cbx@lasthash}
% Multiple cites in one command
{\setunit{\compcitedelim}%
- \usebibmacro{cite:plabelyear+extrayear}}%
+ \usebibmacro{cite:plabelyear+extradate}}%
% Single cite
{\ifthenelse{\ifnameundef{labelname}\OR\iffieldequalstr{entrytype}{patent}}
% No author/editor
{\usebibmacro{cite:noname}%
- \setunit{\nameyeardelim}%
- \usebibmacro{cite:plabelyear+extrayear}%
+ \setunit{\printdelim{nameyeardelim}}%
+ \usebibmacro{cite:plabelyear+extradate}%
\savefield{fullhash}{\cbx@lasthash}}
% Normal cite
{\ifnameundef{shortauthor}
@@ -270,8 +272,8 @@
{\cbx@apa@ifnamesaved
{\printnames{shortauthor}}
{\printnames[labelname][-\value{listtotal}]{author}\addspace\printnames[sabrackets]{shortauthor}}}%
- \setunit{\nameyeardelim}%
- \usebibmacro{cite:plabelyear+extrayear}%
+ \setunit{\printdelim{nameyeardelim}}%
+ \usebibmacro{cite:plabelyear+extradate}%
\savefield{fullhash}{\cbx@lasthash}}}%
\setunit{\multicitedelim}}
@@ -279,7 +281,7 @@
\iffieldequals{fullhash}{\cbx@lasthash}
% Compact cite - more than one thing for same author
{\setunit{\compcitedelim}%
- \usebibmacro{cite:plabelyear+extrayear}}
+ \usebibmacro{cite:plabelyear+extradate}}
% New cite
{%
\ifbool{cbx:parens}
@@ -292,9 +294,9 @@
% Cite using title
{\usebibmacro{cite:noname}%
\setunit{\ifbool{cbx:np}%
- {\nameyeardelim}%
+ {\printdelim{nameyeardelim}}%
{\global\booltrue{cbx:parens}\addspace\bibopenparen}}%
- \usebibmacro{cite:plabelyear+extrayear}}
+ \usebibmacro{cite:plabelyear+extradate}}
% Cite using shorthand
{\usebibmacro{cite:shorthand}}}
% Normal cite with author/editor
@@ -308,20 +310,20 @@
{\printnames[labelname][-\value{listtotal}]{author}}}%
% Year
\setunit{\ifbool{cbx:np}
- {\nameyeardelim}
+ {\printdelim{nameyeardelim}}
{\global\booltrue{cbx:parens}\addspace\bibopenparen}}%
% Put the shortauthor inside the year brackets if necessary
\ifnameundef{shortauthor}
{}
{\cbx@apa@ifnamesaved
{}
- {\printnames{shortauthor}\setunit{\nameyeardelim}}}%
+ {\printnames{shortauthor}\setunit{\printdelim{nameyeardelim}}}}%
% Actual year printing
- \usebibmacro{cite:plabelyear+extrayear}%
+ \usebibmacro{cite:plabelyear+extradate}%
% Save name hash for checks later
\savefield{fullhash}{\cbx@lasthash}}}}
-\newbibmacro*{cite:plabelyear+extrayear}{%
+\newbibmacro*{cite:plabelyear+extradate}{%
\iffieldundef{labelyear}{}
{\printtext[bibhyperref]{%
\clearfield{labelmonth}% don't want months in citations
@@ -347,7 +349,7 @@
\ifciteseen
{\printfield{shorthand}}
{\printnames[labelname][-\value{listtotal}]{labelname}%
- \setunit{\nameyeardelim}%
+ \setunit{\printdelim{nameyeardelim}}%
\printfield{title}\space\printfield{shorthand}}}
%
@@ -374,11 +376,12 @@
% (APA 6.21) No parens round year for cites when the cite is in
% parentheses. Use new command \nptextcite for such cites.
+\DeclareDelimFormat[nptextcite]{finalnamedelim}
+ {\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}
\DeclareMultiCiteCommand{\nptextcites}{\nptextcite}{\multicitedelim}
\DeclareCiteCommand{\nptextcite}
- {\renewcommand{\finalnamedelim}{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}%
- \usebibmacro{cite:init}%
+ {\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\global\booltrue{cbx:np}%
@@ -387,7 +390,7 @@
{}
{\iffieldundef{postnote}
{}
- {\nameyeardelim
+ {\printdelim{nameyeardelim}%
\printfield{postnote}}%
\usebibmacro{cite:post}}
@@ -402,8 +405,8 @@
{\usebibmacro{cite:init}}
{\iffieldequals{fullhash}{\cbx@lasthash}
{\setunit{\compcitedelim}%
- \usebibmacro{cite:plabelyear+extrayear}}
- {\usebibmacro{cite:plabelyear+extrayear}%
+ \usebibmacro{cite:plabelyear+extradate}}
+ {\usebibmacro{cite:plabelyear+extradate}%
\savefield{fullhash}{\cbx@lasthash}}}%
\setunit{\multicitedelim}}
@@ -414,9 +417,12 @@
% Fullcite should use "&"
% Also need to reset the global booleans which are normally done at
% every bib item but since these aren't bib items, they are not reset
+
+\DeclareDelimFormat[fullcite,fullcitebib]{finalnamedelim}
+ {\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}
+
\DeclareCiteCommand{\fullcite}
- {\renewcommand{\finalnamedelim}{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}%
- \usebibmacro{prenote}}
+ {\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{default}%
\global\boolfalse{bbx:parens}%
@@ -431,8 +437,7 @@
\usebibmacro{cite:post}}
\DeclareCiteCommand{\fullcitebib}
- {\renewcommand{\finalnamedelim}{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}%
- \list{}
+ {\list{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
@@ -473,20 +478,20 @@
\newbibmacro*{cite:labelyear}{%
\printfield{labelyear}}
-\newbibmacro*{cite:extrayear}{%
- \printfield{extrayear}}
+\newbibmacro*{cite:extradate}{%
+ \printfield{extradate}}
-\newbibmacro*{cite:labelyear+extrayear}{%
+\newbibmacro*{cite:labelyear+extradate}{%
\iffieldundef{labelyear}
{}
{\printfield{labelyear}%
- \printfield{extrayear}}}
+ \printfield{extradate}}}
\DeclareCiteCommand{\citeyear}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
- {\usebibmacro{cite:plabelyear+extrayear}}
+ {\usebibmacro{cite:plabelyear+extradate}}
{\multinamedelim}
{\usebibmacro{postnote}}