summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx263
1 files changed, 137 insertions, 126 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx
index 6ae6d0d0b07..e3364b4a476 100644
--- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx
@@ -1,4 +1,4 @@
-%% Copyright 2017 Philip Kime
+%% Copyright 2018 Philip Kime
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -9,10 +9,10 @@
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is Philip Kime.
-\ProvidesFile{apa.bbx}[2017/11/05\space v7.5\space APA biblatex references style]
+\ProvidesFile{apa.bbx}[2018/03/05\space v7.6\space APA biblatex references style]
\RequireBiber[3]
\RequireBibliographyStyle{standard}
\urlstyle{rm} % APA examples all have URLs in same font as text
@@ -100,66 +100,70 @@
% Date formats. Suppress end range of less specific fields
\newcommand*{\mkdaterangeapalong}[1]{%
- \blx@metadateinfo{#1}%
- \iffieldundef{#1year}{}
- {\datecircaprint
- \ifstrequal{#1}{url}% URL dates are unlikely to be BCE ...
- {\printtext{%
- \mkbibdateapalongmdy{#1year}{#1month}{#1day}%
- \iffieldundef{#1endyear}%
- {}%
- {\iffieldequalstr{#1endyear}{}% open-ended range?
- {\mbox{\bibdatedash}}
- {\bibdatedash%
- \iffieldsequal{#1year}{#1endyear}%
- {\iffieldsequal{#1month}{#1endmonth}%
- {\iffieldsequal{#1day}{#1endday}%
- {}%
- {\mkbibdateapalongmdy{}{}{#1endday}}}%
- {\mkbibdateapalongmdy{}{#1endmonth}{#1endday}}}%
- {\mkbibdateapalongmdy{#1endyear}{#1endmonth}{#1endday}}}}%
- \dateuncertainprint}}
- {\printtext{%
- \mkbibdateapalong{#1year}{#1month}{#1day}%
- \dateeraprint{#1year}%
- \iffieldundef{#1endyear}%
- {}%
- {\iffieldequalstr{#1endyear}{}% open-ended range?
- {\mbox{\bibdatedash}}
- {\bibdatedash%
- \iffieldsequal{#1year}{#1endyear}%
- {\iffieldsequal{#1month}{#1endmonth}%
- {\iffieldsequal{#1day}{#1endday}%
- {}%
- {\mkbibdateapalong{}{}{#1endday}}}%
- {\mkbibdateapalong{}{#1endmonth}{#1endday}}}%
- {\mkbibdateapalong{#1endyear}{#1endmonth}{#1endday}%
- \dateeraprint{#1endyear}}}%
- \enddateuncertainprint}}}}}
+ \begingroup
+ \blx@metadateinfo{#1}%
+ \iffieldundef{#1year}{}
+ {\datecircaprint
+ \ifstrequal{#1}{url}% URL dates are unlikely to be BCE ...
+ {\printtext{%
+ \mkbibdateapalongmdy{#1year}{#1month}{#1day}%
+ \iffieldundef{#1endyear}%
+ {}%
+ {\iffieldequalstr{#1endyear}{}% open-ended range?
+ {\mbox{\bibdatedash}}
+ {\bibdatedash%
+ \iffieldsequal{#1year}{#1endyear}%
+ {\iffieldsequal{#1month}{#1endmonth}%
+ {\iffieldsequal{#1day}{#1endday}%
+ {}%
+ {\mkbibdateapalongmdy{}{}{#1endday}}}%
+ {\mkbibdateapalongmdy{}{#1endmonth}{#1endday}}}%
+ {\mkbibdateapalongmdy{#1endyear}{#1endmonth}{#1endday}}}}%
+ \dateuncertainprint}}
+ {\printtext{%
+ \mkbibdateapalong{#1year}{#1month}{#1day}%
+ \dateeraprint{#1year}%
+ \iffieldundef{#1endyear}%
+ {}%
+ {\iffieldequalstr{#1endyear}{}% open-ended range?
+ {\mbox{\bibdatedash}}
+ {\bibdatedash%
+ \iffieldsequal{#1year}{#1endyear}%
+ {\iffieldsequal{#1month}{#1endmonth}%
+ {\iffieldsequal{#1day}{#1endday}%
+ {}%
+ {\mkbibdateapalong{}{}{#1endday}}}%
+ {\mkbibdateapalong{}{#1endmonth}{#1endday}}}%
+ {\mkbibdateapalong{#1endyear}{#1endmonth}{#1endday}%
+ \dateeraprint{#1endyear}}}%
+ \enddateuncertainprint}}}}%
+ \endgroup}
% Only for DATE as only \printdateextra is used
\newcommand*{\mkdaterangeapalongextra}[1]{%
- \blx@metadateinfo{#1}%
- \iffieldundef{#1year}{}
- {\printtext{%
- \datecircaprint
- \mkbibdateapalongextra{#1year}{#1month}{#1day}%
- \dateeraprint{#1year}%
- \dateuncertainprint
- \iffieldundef{#1endyear}%
- {}%
- {\iffieldequalstr{#1endyear}{}% open-ended range?
- {\mbox{\bibdatedash}}
- {\bibdatedash%
- \iffieldsequal{#1year}{#1endyear}%
- {\iffieldsequal{#1month}{#1endmonth}%
- {\iffieldsequal{#1day}{#1endday}%
- {}%
- {\mkbibdateapalongextra{}{}{#1endday}}}
- {\mkbibdateapalongextra{}{#1endmonth}{#1endday}}}
- {\mkbibdateapalongextra{#1endyear}{#1endmonth}{#1endday}%
- \dateeraprint{#1endyear}}}%
- \enddateuncertainprint}}}}
+ \begingroup
+ \blx@metadateinfo{#1}%
+ \iffieldundef{#1year}{}
+ {\printtext{%
+ \datecircaprint
+ \mkbibdateapalongextra{#1year}{#1month}{#1day}%
+ \dateeraprint{#1year}%
+ \dateuncertainprint
+ \iffieldundef{#1endyear}%
+ {}%
+ {\iffieldequalstr{#1endyear}{}% open-ended range?
+ {\mbox{\bibdatedash}}
+ {\bibdatedash%
+ \iffieldsequal{#1year}{#1endyear}%
+ {\iffieldsequal{#1month}{#1endmonth}%
+ {\iffieldsequal{#1day}{#1endday}%
+ {}%
+ {\mkbibdateapalongextra{}{}{#1endday}}}
+ {\mkbibdateapalongextra{}{#1endmonth}{#1endday}}}
+ {\mkbibdateapalongextra{#1endyear}{#1endmonth}{#1endday}%
+ \dateeraprint{#1endyear}}}%
+ \enddateuncertainprint}}}%
+ \endgroup}
\AtEndPreamble{%
\renewcommand*{\datecircaprint}{%
@@ -264,6 +268,7 @@
mincrossrefs=999,%
origdate=apalong,%
pagetracker=true,%
+ sortcites=true,%
sorting=apa,%
uniquelist=minyear,%
uniquename=full,%
@@ -327,7 +332,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 6.30) Sometimes "Vol" is inside the additional
% material parens, sometimes not. This bool
-% tracks if it has been inserted yet.
+% tracks if it has been inserted yet.
% Can't use \clearfield{volume} as some
% later number format tests need to know
% whether volume was defined.
@@ -447,18 +452,21 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 6.27) References section delimiters are ampersands, not " and "
-% Needs to be in this hook otherwise it sets this for all
-% citations too.
% (APA 6.27) Use blank for long lists
% (APA 4.03) Serial comma for lists of three or more
-\DeclareDelimFormat[bib]{finalnamedelim}{%
+\DeclareDelimFormat[bib,biblist]{finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\ifthenelse{\value{liststop}>2}
{\finalandcomma\addspace\&\space}
{\addspace\&\space}}}
+\DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{%
+ \ifthenelse{\value{listcount}>\maxprtauth}
+ {}
+ {\finalandcomma\addspace\&\space}}
+
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -639,7 +647,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 6.29) Additional information for non-periodicals in
-% parenthesis after title. This is ugly but it's
+% parenthesis after title. This is ugly but it's
% hard to put in "optional parens" like this
% around an unknown amount of characters.
@@ -740,20 +748,31 @@
% #4 = name prefix
% #5 = name suffix
+\newbibmacro*{name:delim:apa:family-given}[1]{%
+ \ifnumgreater{\value{listcount}}{\value{liststart}}
+ {\ifboolexpr{
+ test {\ifnumless{\value{listcount}}{\value{liststop}}}
+ or
+ test \ifmorenames
+ }
+ {\printdelim{multinamedelim}}
+ {\printdelim{finalnamedelim:apa:family-given}}}
+ {}}
+
\newbibmacro*{name:apa:family-given}[5]{%
\ifuseprefix
- {\usebibmacro{name:delim}{#4#1}%
+ {\usebibmacro{name:delim:apa:family-given}{#4#1}%
\usebibmacro{name:hook}{#4#1}%
\ifdefvoid{#4}{}{%
- \mkbibnameprefix{#4}%
- \ifpunctmark{'}{}{\addhighpenspace}}%
- \mkbibnamefamily{#1\isdot}%
- \ifdefvoid{#2}{}{\addcomma\addlowpenspace\mkbibnamegiven{#3}\isdot%
- \ifthenelse{\value{uniquename}>1}
- {\addspace\mkbibbrackets{#2}}
- {}}%
- \ifdefvoid{#5}{}{\addcomma\addlowpenspace\mkbibnamesuffix{#5}\isdot}}
- {\usebibmacro{name:delim}{#1}%
+ \mkbibnameprefix{#4}\isdot%
+ \ifprefchar{}{\bibnamedelimc}}%
+ \mkbibnamefamily{#1}\isdot%
+ \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{#3}\isdot%
+ \ifthenelse{\value{uniquename}>1}
+ {\bibnamedelimd\mkbibbrackets{#2}}
+ {}}%
+ \ifdefvoid{#5}{}{\addcomma\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}
+ {\usebibmacro{name:delim:apa:family-given}{#1}%
\usebibmacro{name:hook}{#1}%
\mkbibnamefamily{#1}\isdot
\ifboolexpe{%
@@ -761,37 +780,29 @@
and
test {\ifdefvoid{#4}}}
{}
- {\addcomma}%
- \ifdefvoid{#2}{}{\addlowpenspace\mkbibnamegiven{#3}%
- \ifthenelse{\value{uniquename}>1}
- {\addspace\mkbibbrackets{#2}}
- {}}%
+ {\revsdnamepunct}%
+ \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#3}%
+ \ifthenelse{\value{uniquename}>1}
+ {\bibnamedelimd\mkbibbrackets{#2}}
+ {}}%
\ifdefvoid{#4}{}{%
- \addhighpenspace\mkbibnameprefix{#4}%
- \ifpunctmark{'}{}{\addhighpenspace}}%
- \ifdefvoid{#5}{}{\addcomma\addlowpenspace\mkbibnamesuffix{#5}\isdot}}}
+ \bibnamedelimc\mkbibnameprefix{#4}%
+ \ifprefchar{}{\bibnamedelimc}}%
+ \ifdefvoid{#5}{}{\addcomma\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}}
\newbibmacro*{name:apa:given-family}[5]{%
- \ifuseprefix
- {\usebibmacro{name:delim}{#2}%
- \usebibmacro{name:hook}{#2}%
- \ifdefvoid{#2}{}{\mkbibnamegiven{#3}\isdot%
- \ifthenelse{\value{uniquename}>1}
- {\addspace\mkbibbrackets{#2}}
- {}\addspace}%
- \ifdefvoid{#4}{}{%
- \mkbibnameprefix{#4\isdot}%
- \ifpunctmark{'}{}{\addhighpenspace}}%
- \mkbibnamefamily{#1\isdot}%
- \ifdefvoid{#5}{}{\addlowpenspace\mkbibnamesuffix{#5}\isdot}}
- {\usebibmacro{name:delim}{#1}%
- \usebibmacro{name:hook}{#1}%
- \ifdefvoid{#2}{}{\mkbibnamegiven{#3}\isdot%
- \ifthenelse{\value{uniquename}>1}
- {\addspace\mkbibbrackets{#2}}
- {}\addspace}%
- \mkbibnamefamily{#1}\isdot
- \ifdefvoid{#5}{}{\addcomma\addlowpenspace\mkbibnamesuffix{#5}\isdot}}}
+ \usebibmacro{name:delim}{#2#4#1#5}%
+ \usebibmacro{name:hook}{#2#4#1#5}%
+ \ifdefvoid{#2}{}{\mkbibnamegiven{#3}\isdot%
+ \ifthenelse{\value{uniquename}>1}
+ {\bibnamedelimd\mkbibbrackets{#2}}
+ {}%
+ \bibnamedelimd}%
+ \ifdefvoid{#4}{}{%
+ \mkbibnameprefix{#4}\isdot
+ \ifprefchar{}{\bibnamedelimc}}%
+ \mkbibnamefamily{#1}\isdot%
+ \ifdefvoid{#5}{}{\bibnamedelimd\mkbibnamesuffix{#5}\isdot}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -837,7 +848,7 @@
\clearname{translator}%
\setunit{\adddot}}%
\ifbool{bbx:parens}{\printtext{\bibcloseparen}\global\boolfalse{bbx:parens}}{}}}}
-
+
\newbibmacro*{editor+trans}{%
\ifthenelse{\ifnameundef{editor}\AND%
\ifnameundef{editora}\AND%
@@ -869,10 +880,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% (APA 6.29) Special journal issues
+% (APA 6.29) Special journal issues are periodicals
+\DeclareFieldFormat[periodical]{pages}{#1}
\DeclareFieldFormat[periodical]{title}{#1\isdot}
-\DeclareFieldFormat[periodical]{issuetitle}{\mkbibemph{#1}\isdot}
+\DeclareFieldFormat[periodical]{issuetitle}{\mkbibbrackets{#1}}
+\DeclareFieldFormat[periodical]{volume}{\mkbibemph{\apanum{#1}}}
+\DeclareFieldFormat[periodical]{number}{\mkbibparens{\apanum{#1}}}
+\DeclareListFormat[periodical]{location}{\mkbibemph{#1}}
\renewbibmacro*{periodical}{%
\iffieldundef{title}
@@ -884,10 +899,16 @@
\renewbibmacro*{title+issuetitle}{%
\usebibmacro{periodical}%
- \newunit
- \usebibmacro{issue}%
- \setunit*{\addcomma\addspace}%
- \setunit{\addcomma\space}}
+ \setunit{\addspace}%
+ \printfield{issuetitle}%
+ \notbool{bbx:editorinauthpos}
+ {\newunit
+ \usebibmacro{labelyear+extradate}}
+ {}}
+
+\newbibmacro*{pnumber}{%
+ \printfield{volume}%
+ \printfield{number}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1019,17 +1040,6 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% (APA 6.30) Periodicals emph number, location
-% and pages (with no prefix)
-
-\DeclareFieldFormat[periodical]{pages}{\mkbibemph{#1}}
-\DeclareFieldFormat[periodical]{number}{\mkbibemph{\apanum{#1}}}
-\DeclareListFormat[periodical]{location}{\mkbibemph{#1}}
-
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (APA 7.02 Example 38) Proceedings emph number, location
% and location. Pages have no prefix
@@ -1063,6 +1073,7 @@
% (APA 7.06) Reviews
% The title of the review depends on the entrytype of the thing reviewed
+\newcommand*{\begrelateddelimreviewof}{\addspace}
\DeclareFieldFormat[review]{title}{%
\entrydata*{\thefield{related}}{%
\iffieldequalstr{entrytype}{article}
@@ -1276,7 +1287,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Related entries
@@ -1693,12 +1704,12 @@
\usebibmacro{author/editor}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title+issuetitle}%
+ \setunit{\adddot\addspace}
+ \usebibmacro{journal}%
\setunit{\addcomma\addspace}
\printlist{location}%
\setunit{\addcomma\addspace}
- \printfield{volume}%
- \setunit*{\adddot}%
- \printfield{number}%
+ \usebibmacro{pnumber}%
\setunit{\addcomma\addspace}
\printfield{pages}%
\newunit\newblock
@@ -2128,7 +2139,7 @@
{\href{https://dx.doi.org/#1}{\nolinkurl{#1}}}
{\nolinkurl{#1}}}
-% APA 6th
+% APA 6th
\newbibmacro*{location+publisher}{%
\printlist[default][1-1]{location}%
\setunit*{\addcolon\space}%