diff options
author | Norbert Preining <norbert@preining.info> | 2022-06-24 03:01:47 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-06-24 03:01:47 +0000 |
commit | 1ef4c041ba74d4619dd62209ae48a2b24563954c (patch) | |
tree | b45a2e8da583a0f219e75f9536d9696f9af2aca7 /macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx | |
parent | 00e67dfd87c53faeafcf0c9e66c8c2c7a410fcb8 (diff) |
CTAN sync 202206240301
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx')
-rw-r--r-- | macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx index 22e489feaa..591fa50aea 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-apa/apa.cbx @@ -12,7 +12,7 @@ %% %% The Current Maintainer of this work is Philip Kime. -\ProvidesFile{apa.cbx}[2021/12/24\space v9.15\space APA biblatex citation style] +\ProvidesFile{apa.cbx}[2022/06/22\space v9.16\space APA biblatex citation style] \RequireBiber[3] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -45,7 +45,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (APA 8.10) Suffices are not shown in citations -% (APA 8.17) 3+ authors have "et al." % (APA 8.20) Initials only for primary author and only when not unique across all *primary* authors \newbibmacro*{labelname:doname}[8]{% @@ -118,12 +117,12 @@ \def\citeresetapa{\global\let\cbx@apa@names\@empty} \citeresetapa \def\cbx@apa@ifnamesaved{% - \xifinlist{\thefield{fullhash}}{\cbx@apa@names} + \xifinlist{\thefield{namehash}}{\cbx@apa@names} {\@firstoftwo} {\@secondoftwo}} \newbibmacro*{cite:author}{% - \iffieldequals{fullhash}{\cbx@lasthash} + \iffieldequals{namehash}{\cbx@lasthash} % Multiple cites in one command {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}}% @@ -131,7 +130,7 @@ {\ifnameundef{labelname} % No author/editor {\usebibmacro{cite:noname}% - \savefield{fullhash}{\cbx@lasthash}} + \savefield{namehash}{\cbx@lasthash}} % Normal cite {\ifnameundef{shortauthor} {\printnames{labelname}}% @@ -139,20 +138,11 @@ {\printnames{shortauthor}} {\printnames[labelname]{author}% \addspace\printnames[sabrackets]{shortauthor}}}% - \savefield{fullhash}{\cbx@lasthash}}}% + \savefield{namehash}{\cbx@lasthash}}}% \setunit{\multicitedelim}} -% Using fullhash instead of namehash otherwise we may omit namelist for -% lists which are equal only because of minnames truncation i.e: -% -% X and Y and Z (2009) -% X and W and V (2010) -% -% which have the same namehash due to minnames visibility truncation to 1 -% would be printed incorrectly as -% \cite{one, two} -> X, Y & Z 2009, 2010 \newbibmacro*{cite}{% - \iffieldequals{fullhash}{\cbx@lasthash} + \iffieldequals{namehash}{\cbx@lasthash} % Multiple cites in one command {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}}% @@ -162,7 +152,7 @@ {\usebibmacro{cite:noname}% \setunit{\printdelim{nameyeardelim}}% \usebibmacro{cite:plabelyear+extradate}% - \savefield{fullhash}{\cbx@lasthash}} + \savefield{namehash}{\cbx@lasthash}} % Normal cite {\ifnameundef{shortauthor} {\printnames{labelname}}% @@ -172,14 +162,14 @@ \addspace\printnames[sabrackets]{shortauthor}}}% \setunit{\printdelim{nameyeardelim}}% \usebibmacro{cite:plabelyear+extradate}% - \savefield{fullhash}{\cbx@lasthash}}}% + \savefield{namehash}{\cbx@lasthash}}}% \setunit{\multicitedelim}} \renewcommand*{\iffinalcitedelim}{% \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}} \newbibmacro*{textcite}{% - \iffieldequals{fullhash}{\cbx@lasthash} + \iffieldequals{namehash}{\cbx@lasthash} % Compact cite - more than one thing for same author {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}} @@ -226,7 +216,7 @@ % Actual year printing \usebibmacro{cite:plabelyear+extradate}% % Save name hash for checks later - \savefield{fullhash}{\cbx@lasthash}}% + \savefield{namehash}{\cbx@lasthash}}% \stepcounter{textcitecount}}} \newbibmacro*{cite:plabelyear+extradate}{% @@ -236,6 +226,8 @@ \clearfield{labelday}% don't want days in citations \clearfield{labelendmonth}% don't want months in citations \clearfield{labelendday}% don't want days in citations + \clearfield{labelyeardivision}% don't want yeardivisions in citations + \clearfield{labelendyeardivision}% don't want yeardivisions in citations \iffieldsequal{labelyear}{labelendyear}% Don't want no-op year ranges {\clearfield{labelendyear}} {}% @@ -364,11 +356,11 @@ \newbibmacro*{citeyear}{% \iffieldundef{labelyear} {\usebibmacro{cite:init}} - {\iffieldequals{fullhash}{\cbx@lasthash} + {\iffieldequals{namehash}{\cbx@lasthash} {\setunit{\compcitedelim}% \usebibmacro{cite:plabelyear+extradate}} {\usebibmacro{cite:plabelyear+extradate}% - \savefield{fullhash}{\cbx@lasthash}}}% + \savefield{namehash}{\cbx@lasthash}}}% \setunit{\multicitedelim}} % @@ -424,9 +416,9 @@ \global\undef\cbx@lasthash} \newbibmacro*{cite:post}{% - \xifinlist{\thefield{fullhash}}{\cbx@apa@names} + \xifinlist{\thefield{namehash}}{\cbx@apa@names} {} - {\listxadd{\cbx@apa@names}{\thefield{fullhash}}}} + {\listxadd{\cbx@apa@names}{\thefield{namehash}}}} \newbibmacro*{cite:labelyear}{% \printfield{labelyear}} |