diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx | 167 |
1 files changed, 99 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx index 7d5f3dfa236..199b147c21f 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx @@ -11,21 +11,8 @@ %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is Philip Kime. -%% -%% This work consists of the files: -%% -%% apa.cbx (biblatex citation style) -%% apa.bbx (biblatex references style) -%% apa.dbx (biblatex style data model) -%% *.lbx (localisation files for APA-specific strings) -%% biblatex-apa.pdf (Style documentation) -%% biblatex-apa.tex (Style documentation source) -%% biblatex-apa-test.pdf (Style examples) -%% biblatex-apa-test.tex (Style examples source) -%% biblatex-apa-test-citations.bib (Style examples - citations) -%% biblatex-apa-test-references.bib (Style examples - references) - -\ProvidesFile{apa.bbx}[2012/12/20\space v5.6\space APA biblatex references style] + +\ProvidesFile{apa.bbx}[2012/12/28\space v5.7\space APA biblatex references style] \RequireBiber[3] \RequireBibliographyStyle{standard} \urlstyle{rm} % APA examples all have URLs in same font as text @@ -217,11 +204,10 @@ sorting=apa,% backref=true,% pagetracker=true,% - firstinits=true,% useprefix=true,% usetranslator=true,% uniquelist=true,% - uniquename=init,% + uniquename=full,% citetracker=true,% maxcitenames=2,% mincitenames=1,% @@ -229,9 +215,9 @@ minbibnames=6,% abbreviate=true,% mincrossrefs=999,% - date=apalong, - origdate=apalong, - urldate=apalong, + date=apalong,% + origdate=apalong,% + urldate=apalong,% eventdate=comp} % @@ -360,12 +346,8 @@ {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} {} {\ifthenelse{\iffieldequalstr{doubtfulauthor}{true}} - {\iffirstinits - {\mkbibbrackets{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}?}} - {\mkbibbrackets{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}?}}} - {\iffirstinits - {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}} - {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}}}}% + {\mkbibbrackets{\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}?}} + {\usebibmacro{name:apa:last-first}{#1}{#3}{#4}{#5}{#7}}}}% \ifmorenames{\andothersdelim\bibstring{andothers}}{}} \renewbibmacro*{author}{% @@ -376,8 +358,8 @@ \printfield{nameaddon}% \ifnameundef{with} {} - {\printtext{\bibstring{with}\addspace}% - \printnames[apaauthor][-\value{listtotal}]{with} + {\setunit{}\addspace\mkbibparens{\printtext{\bibstring{with}\addspace}% + \printnames[apaauthor][-\value{listtotal}]{with}} \setunit*{\addspace}}}% \newunit\newblock% \usebibmacro{labelyear+extrayear}} @@ -649,9 +631,7 @@ {\addcomma\addspace\ldots} {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} {} - {\iffirstinits - {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}} - {\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}} + {\usebibmacro{name:apa:first-last}{#1}{#3}{#4}{#5}{#7}}}% \ifmorenames{\andothersdelim\bibstring{andothers}}{}} \renewbibmacro*{author/editor}{% @@ -691,29 +671,68 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27 Name format. Don't capitalise prefixes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 6.27) Name format. Don't capitalise prefixes +% (APA 6.27) Full name disambiguation using brackets + +% #1 = last name +% #2 = first name +% #3 = first name (initials) +% #4 = name prefix, a.k.a. 'von part' +% #5 = name affix, a.k.a. 'junior part' -\renewbibmacro*{name:last-first}[4]{% +\renewbibmacro*{name:apa:last-first}[5]{% + \ifuseprefix + {\usebibmacro{name:delim}{#4#1}% + \usebibmacro{name:hook}{#4#1}% + \ifblank{#4}{}{% + \mkbibnameprefix{#4\isdot}% + \ifpunctmark{'}{}{\addhighpenspace}}% + \mkbibnamelast{#1\isdot}% + \ifblank{#2}{}{\addcomma\addlowpenspace\mkbibnamefirst{#3}\isdot% + \ifthenelse{\value{uniquename}>1} + {\addspace\mkbibbrackets{#2}} + {}}% + \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}} + {\usebibmacro{name:delim}{#1}% + \usebibmacro{name:hook}{#1}% + \mkbibnamelast{#1}\isdot + \ifblank{#2#4}{}{\addcomma}% + \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#2}\isdot}% + \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#3}\isdot% + \ifthenelse{\value{uniquename}>1} + {\addspace\mkbibbrackets{#2}} + {}}% + \ifblank{#4}{}{\addlowpenspace\mkbibnameprefix{#4}\isdot}% + \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}}} + +\renewbibmacro*{name:apa:first-last}[5]{% \ifuseprefix - {\usebibmacro{name:delim}{#3#1}% - \usebibmacro{name:hook}{#3#1}% - \ifblank{#3}{}{% - \mkbibnameprefix{#3\isdot}% + {\usebibmacro{name:delim}{#2}% + \usebibmacro{name:hook}{#2}% + \ifblank{#2}{}{\mkbibnamefirst{#3}\isdot% + \ifthenelse{\value{uniquename}>1} + {\addspace\mkbibbrackets{#2}} + {}\addspace}% + \ifblank{#4}{}{% + \mkbibnameprefix{#4\isdot}% \ifpunctmark{'}{}{\addhighpenspace}}% \mkbibnamelast{#1\isdot}% - \ifblank{#2}{}{\addcomma\addlowpenspace\mkbibnamefirst{#2}\isdot}% - \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}} + \ifblank{#5}{}{\mkbibnameaffix{#5}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% + \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#3}\isdot% + \ifthenelse{\value{uniquename}>1} + {\addspace\mkbibbrackets{#2}} + {}\addspace}% \mkbibnamelast{#1}\isdot - \ifblank{#2#3}{}{\addcomma}% + \ifblank{#2#4}{}{\addcomma}% \ifblank{#2}{}{\addlowpenspace\mkbibnamefirst{#2}\isdot}% - \ifblank{#3}{}{\addlowpenspace\mkbibnameprefix{#3}\isdot}% - \ifblank{#4}{}{\addcomma\addlowpenspace\mkbibnameaffix{#4}\isdot}}} + \ifblank{#4}{}{\addlowpenspace\mkbibnameprefix{#4}\isdot}% + \ifblank{#5}{}{\addcomma\addlowpenspace\mkbibnameaffix{#5}\isdot}}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (APA 6.27) Editor string in parens after author list @@ -763,7 +782,7 @@ \ifnameundef{editorb}\AND% \ifnameundef{editorc}\AND% \ifnameundef{translator}}% - {}% + {\setunit{\adddot\addspace}}% {\ifnamesequal{editor}{translator}% {\usebibmacro{in}% \printnames[apanames][-\value{listtotal}]{editor}% @@ -781,8 +800,8 @@ \clearname{translator}% \setunit{\adddot\addspace}}% \usebibmacro{in}% - \usebibmacro{editorx}}}% - \newunit} + \usebibmacro{editorx}}% + \setunit{\addcomma\addspace}}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1117,23 +1136,24 @@ \DeclareFieldFormat{urldate}{#1} \renewbibmacro*{url+urldate}{% - \ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\)\OR\NOT\iffieldundef{doi}} + \ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}\)\OR\NOT\iffieldundef{doi}} {} - {\iffieldundef{abstracturl} + {\ifthenelse{\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}} {} {\printtext{\bibcpstring{abstract}}\addspace}% - \printtext{\bibstring{retrieved}}% - \setunit{\addspace}% - \iffieldundef{urlyear} - {} - {\printurldate% - \setunit*{\addcomma\addspace}}% - \printtext{\bibstring{from}}% - \setunit*{\addspace}% - \printfield{urldescription}% - \setunit*{\addcolon\addspace}% - \iffieldundef{url}{}{\printfield{url}\renewcommand*{\finentrypunct}{\relax}}% - \iffieldundef{abstracturl}{}{\printfield{abstracturl}\renewcommand*{\finentrypunct}{\relax}}}} + \printtext{\bibstring{retrieved}}% + \setunit{\addspace}% + \iffieldundef{urlyear} + {} + {\printurldate% + \setunit*{\addcomma\addspace}}% + \printtext{\bibstring{from}}% + \setunit*{\addspace}% + \printfield{urldescription}% + \setunit*{\addcolon\addspace}% + \iffieldundef{url}{}{\printfield{url}\renewcommand*{\finentrypunct}{\relax}}% + \iffieldundef{abstractloc}{}{\printfield{abstractloc}\renewcommand*{\finentrypunct}{\relax}} + \iffieldundef{abstracturl}{}{\printfield{abstracturl}\renewcommand*{\finentrypunct}{\relax}}}} % %%%%%%%%%%%%%%%%% @@ -1177,13 +1197,22 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Hacky bits to suppress final period in some cases. +% * If there is an ORIGYEAR field (APA 7.02:21) +% * Unless there is a RELATED and ADDENDUM \newbibmacro*{apa:finpunct}{% - \ifboolexpr{ - test {\iffieldundef{addendum}} - and - test {\iffieldundef{related}}} + \iffieldundef{origyear} + {\ifboolexpr{ + test {\iffieldundef{addendum}} + and + test {\iffieldundef{related}}} {} {\renewcommand*{\finentrypunct}{\relax}}} + {\renewcommand*{\finentrypunct}{\relax}}} + +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Related entries @@ -1212,6 +1241,8 @@ \setunit{\addspace}% \bibstring{byauthor}\addspace \printnames[apanames][-\value{listtotal}]{author}% + \printnames[apanames][-\value{listtotal}]{producer}% + \printnames[apanames][-\value{listtotal}]{director}% \setunit{\addcomma\addspace}% \printdateextra}} @@ -1379,7 +1410,7 @@ \usebibmacro{title}% \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock \usebibmacro{editor+trans}% - \setunit{\addcomma\addspace}\newblock + \newblock \usebibmacro{maintitle+booktitle}% \newblock \usebibmacro{addinfo}% @@ -1441,8 +1472,8 @@ \usebibmacro{editor+trans}% \setunit*{\addcomma\addspace}\newblock \usebibmacro{maintitle+booktitle}% - \setunit{\addcomma\addspace}\newblock - \printeventdate% + \iffieldundef{eventyear}{}{\setunit{\addcomma\addspace}}% + \printeventdate \setunit*{\addspace}\newblock \usebibmacro{addinfo}% \newunit\newblock |