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 | 1938 |
1 files changed, 817 insertions, 1121 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx index eca08b80a94..41480df9df5 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx @@ -12,7 +12,7 @@ %% %% The Current Maintainer of this work is Philip Kime. -\ProvidesFile{apa.bbx}[2019/09/07\space v8.0\space APA biblatex references style] +\ProvidesFile{apa.bbx}[2019/11/23\space v9.0\space APA biblatex references style] \RequireBiber[3] \RequireBibliographyStyle{standard} \urlstyle{rm} % APA examples all have URLs in same font as text @@ -43,62 +43,81 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Used to join citations/references to -% extradate +% Optional parens/brackets +% Thanks to egreg from https://tex.stackexchange.com/questions/53068/how-to-check-if-a-macro-value-is-empty-or-will-not-create-text-with-plain-tex-co +% for this test for expanded emptiness so that we can easily opt to not print parens around nothing +% Without this, it is very messy - you have to test all potential fields for defness first and this +% is messy because the fields in the additional info vary betwee entrytypes +\def\foreverunspace{% + \ifnum\lastnodetype=11 + \unskip\foreverunspace + \else + \ifnum\lastnodetype=12 + \unkern\foreverunspace + \else + \ifnum\lastnodetype=13 + \unpenalty\foreverunspace + \fi + \fi + \fi +} -\newcommand{\apashortdash}{-} +\newrobustcmd{\mkbibparense}[1]{% + \setbox0=\hbox{#1\foreverunspace}% + \ifdim\wd0=0pt + \else + % Since we are evaluating the argument twice and it contains \setunit, + % need to sanitise \setunit second time around. Can't just put in \box0 + % as it might be long and won't linebreak + \mkbibparens{\setunit{}#1}% + \fi} + +\newrobustcmd{\mkbibbracketse}[1]{% + \setbox0=\hbox{#1\foreverunspace}% + \ifdim\wd0=0pt + \else + % Since we are evaluating the argument twice and it contains \setunit, + % need to sanitise \setunit second time around. Can't just put in \box0 + % as it might be long and won't linebreak + \mkbibbrackets{\setunit{}#1}% + \fi} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 9.8) - Allow variable max authors/editors limit +% Default to APA 19 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Allow variable max authors/editors limit - -\newcommand{\maxprtauth}{7} +\newcommand{\maxprtauth}{20} \DeclareBibliographyOption{apamaxprtauth}{% \ifstrempty{#1} {} {\renewcommand{\maxprtauth}{#1}}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.22) Force roman numerals into arabic -% using etoolbox macros +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Force roman numerals into arabic using +% etoolbox macros \newcommand{\apanum}[1]{\ifrmnum{#1}{\rmntonum{#1}}{#1}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Apa defines no particular hanging indent but this makes it look like the -% examples in the style manual. - -\setlength{\bibhang}{2.5em} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 4.16 Example 29) Some DSM macros +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 9.43) Hanging indent of 0.5in -\gdef\DSMIII{\emph{DSM-III}} -\gdef\DSMIIIR{\emph{DSM-III-R}} -\gdef\DSMIV{\emph{DSM-IV}} -\gdef\DSMIVTR{\emph{DSM-IV-TR}} -\gdef\PsycSCAN{\emph{PsycSCAN}} -\gdef\PsycARTICLES{\emph{PsycARTICLES}} +\setlength{\bibhang}{0.5in} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Date formats. Suppress end range of less specific fields + \newcommand*{\mkdaterangeapalong}[1]{% \begingroup \blx@metadateinfo{#1}% @@ -110,7 +129,7 @@ \iffieldundef{#1endyear}% {}% {\iffieldequalstr{#1endyear}{}% open-ended range? - {\mbox{\bibdatedash}} + {\bibdatedash\bibstring{present}} {\bibdatedash% \iffieldsequal{#1year}{#1endyear}% {\iffieldsequal{#1month}{#1endmonth}% @@ -126,7 +145,7 @@ \iffieldundef{#1endyear}% {}% {\iffieldequalstr{#1endyear}{}% open-ended range? - {\mbox{\bibdatedash}} + {\bibdatedash\bibstring{present}} {\bibdatedash% \iffieldsequal{#1year}{#1endyear}% {\iffieldsequal{#1month}{#1endmonth}% @@ -152,7 +171,7 @@ \iffieldundef{#1endyear}% {}% {\iffieldequalstr{#1endyear}{}% open-ended range? - {\mbox{\bibdatedash}} + {\bibdatedash\bibstring{present}} {\bibdatedash% \iffieldsequal{#1year}{#1endyear}% {\iffieldsequal{#1month}{#1endmonth}% @@ -170,33 +189,24 @@ \ifdatecirca{\biblcstring{circa}\printdelim{datecircadelim}}{}}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.09 Example 62) ERIC -% eprint references - -\DeclareFieldFormat{eprint:eric}{% - \printtext{\bibcpstring{retrieved}}% - \setunit{\addspace}% - \printtext{\bibstring{from}}\addspace% - ERIC\addspace database\adddot\addspace% - \mkbibparens{#1}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.12) Five author max before "et al" and a one author truncation policy -% However, only after the first cite, see the labelname format -% in .cbx. It's also overridden per-entry by uniquelist -% (APA 6.x) Citation tracking is global -% (APA 6.14) Use initials to disambiguate shared surnames -% (APA 6.16) Use year postfix to disambiguate multiple items in same year -% (APA 6.10) Never reference anything not cited -% (APA 6.25) Author initials only -% (APA 6.25) Sorting is nyt but we need to account for PUBSTATE which comes -% after all normal cites for the same author +% (APA 8.12) sort citations +% (APA 8.17) More than two authors is truncated to one but overriden for list ambiguity to +% point of no ambiguity +% (APA 8.20) Use initials to disambiguate shared surnames +% (APA 8.19) Use year postfix to disambiguate multiple items in same year +% (APA 9.44, 9.46, 9.47) Sorting is nyt but we need to account for PUBSTATE which comes +% after all normal cites for the same author +% (APA 9.42) Secular Before Common Era dates, approximate dates +% (APA Figure 9.2) Sorting ignores punctuation in names +% (APA 9.47) Ignore "The", "An" and "A" when sorting titles + +\DeclareNosort{ + \nosort{setnames}{\regexp{\p{General_Category=Punctuation}}} + \nosort{settitles}{\regexp{\A(?:The|An|A)\s+}} +} \DeclareSortingTemplate{apa}{ \sort{ @@ -208,12 +218,8 @@ \sort{ \field{sortname} \field{author} + \field{groupauthor} \field{editor} - \field{translator} - \field{writer} - \field{director} - \field{producer} - \field{execproducer} \field{sorttitle} \field{title} } @@ -235,19 +241,24 @@ } } +% Include groupauthor +\DeclareLabelname{% + \field{shortauthor} + \field{author} + \field{groupauthor} + \field{shorteditor} + \field{editor} +} + % Don't fall back on other year fields if there is no year, use % "nodate" string \DeclareLabeldate{% \field{pubstate} \field{date} - \field{year}%legacy - no EDTF support + \field{year}%legacy - no ISO8601 support \literal{nodate} } -% Due to APA strange requirements like truncation after first cite and -% ellipsis from 7th to n-1 in bib, there might be some really strange -% edge cases which can't be handled as this needs treating in the style -% after biber has finished. Very unlikely though. \ExecuteBibliographyOptions{% abbreviate=true,% autocite=inline,% @@ -256,32 +267,35 @@ date=apalong,% dateabbrev=false,% datecirca=true,% - dateera=christian,% - labeldate=apalong,% + dateera=secular,% dateuncertain=true,% eventdate=comp,% + labeldate=apalong,% labeldateparts=true,% - maxbibnames=7,% + maxbibnames=20,% maxcitenames=2,% - minbibnames=6,% + minbibnames=19,% mincitenames=1,% mincrossrefs=999,% + maxitems=999,% origdate=apalong,% pagetracker=true,% sortcites=true,% sorting=apa,% uniquelist=minyear,% - uniquename=full,% + uniquename=init,% uniqueprimaryauthor=true,% urldate=apalong,% useprefix=true,% - usetranslator=true} + usetranslator=true,% + usenarrator=true} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % Enforce ignoring of PUBSTATE if there is a YEAR or DATE field +% (APA 10.2:32) Remove PUBLISHER if it is the same as GROUPAUTHOR + \DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map{ @@ -291,8 +305,16 @@ \map{ \step[fieldsource=date, final] \step[fieldset=pubstate, null] + } + \map{ + \step[typesource=hardware, typetarget=software, final] + } + \map{ + \step[fieldsource=groupauthor, match=\regexp{([^{}]+)}, final] + \step[fieldsource=publisher, match=\regexp{$1}, final]%$ + \step[fieldset=publisher, null] } - } + } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -308,95 +330,119 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.29) Additional material sometimes goes in parens -% after title. This bool tracks the parens. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Flag to say whether the "in" has +% been placed already in IN* +% Reset every bibitem. -\newbool{bbx:parens} -\AtEveryBibitem{\global\boolfalse{bbx:parens}} +\newbool{bbx:in} +\AtEveryBibitem{\global\boolfalse{bbx:in}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.06:47) Reviews are awkward - if no author, date -% position changes so we need a flag to -% track this +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Set up some standard APA formats -\newbool{bbx:noreviewauthor} -\AtEveryBibitem{\global\boolfalse{bbx:noreviewauthor}} +% General format of titles. Ugly Chicago-style lowercasing of English titles +\DeclareFieldFormat{apacase}{\bbx@colon@search\MakeSentenceCase*{#1}} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% HOWPUBLISHED +\DeclareFieldFormat[unpublished]{howpublished}{\mkbibbrackets{% + \ifbibstring{#1}{\bibcpstring{#1}}{#1}}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.30) Sometimes "Vol" is inside the additional -% material parens, sometimes not. This bool -% 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. +% TITLE +\DeclareFieldFormat{title}{\mkbibemph{#1}\isdot} +\DeclareFieldFormat[article]{title}{#1\isdot} +\DeclareFieldFormat[inbook]{title}{#1\isdot} +\DeclareFieldFormat[incollection]{title}{#1\isdot} +\DeclareFieldFormat[inproceedings]{title}{\mkbibemph{#1}\isdot} +\DeclareFieldFormat[proceedings]{title}{\mkbibemph{#1}\isdot} +\DeclareFieldFormat[periodical]{title}{#1\isdot} +\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}} +\DeclareFieldFormat[patent]{title}{\mkbibemph{#1}} +\DeclareFieldFormat[unpublished]{title}{\mkbibemph{#1}} +\DeclareFieldFormat[image]{title}{\mkbibemph{#1}} +\DeclareFieldFormat[misc]{title}{#1\isdot} +\DeclareFieldFormat[audio]{title}{\iffieldundef{maintitle}{\mkbibemph{#1}\isdot}{#1}} +\DeclareFieldFormat[video]{title}{\iffieldundef{maintitle}{\mkbibemph{#1}\isdot}{#1}} -\newbool{bbx:volseen} -\AtEveryBibitem{\global\boolfalse{bbx:volseen}} +% TITLEADDON +\DeclareFieldFormat{titleaddon}{\mkbibbrackets{\bbx@colon@search\MakeSentenceCase*{#1}}} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% MAINTITLEADDON +\DeclareFieldFormat{maintitleaddon}{\mkbibbrackets{\bbx@colon@search\MakeSentenceCase*{#1}}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) This bool tracks if the title was put -% in the author position. -% Can't use \clearfield{title} as some -% later punctuation tests need to know -% whether title was defined. +% BOOKTITLEADDON +\DeclareFieldFormat{booktitleaddon}{\mkbibbrackets{\bbx@colon@search\MakeSentenceCase*{#1}}} -\newbool{bbx:titleinauthpos} -\AtEveryBibitem{\global\boolfalse{bbx:titleinauthpos}} +% ISSUETITLE +\DeclareFieldFormat{issuetitle}{#1\isdot} +\DeclareFieldFormat[periodical]{issuetitle}{\mkbibbrackets{#1}} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ORIGTITLE +\DeclareFieldFormat{origtitle}{\mkbibemph{\bbx@colon@search\MakeSentenceCase*{#1}}\isdot} +\DeclareFieldFormat[article]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} +\DeclareFieldFormat[inbook]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} +\DeclareFieldFormat[incollection]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} +\DeclareFieldFormat[inproceedings]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} +\DeclareFieldFormat[proceedings]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) Need a flag to say when the editor -% is in author position because this -% can effect where the year goes. +% VOLUME +\DeclareFieldFormat{volume}{\iffieldundef{maintitle} + {\bibcpstring{volume}~\apanum{#1}} + {\mkbibemph{\bibcpstring{volume}~\apanum{#1}}}} +\DeclareFieldFormat[article]{volume}{\mkbibemph{\apanum{#1}}} +\DeclareFieldFormat[periodical]{volume}{\mkbibemph{\apanum{#1}}} -\newbool{bbx:editorinauthpos} -\AtEveryBibitem{\global\boolfalse{bbx:editorinauthpos}} +% VOLUMES +\DeclareFieldFormat{volumes}{\bibcpstring{volumes}~#1} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% CHAPTER -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) Flag to say whether the "in" has -% been placed already in IN* -% Reset every bibitem. +\DeclareFieldFormat{chapter}{\bibcpstring{chapter}~\apanum{#1}} -\newbool{bbx:in} -\AtEveryBibitem{\global\boolfalse{bbx:in}} +% NUMBER +\DeclareFieldFormat{number}{\iffieldundef{volume} + {\ifinteger{\thefield{number}} + {\addspace\mkbibemph{\bibcpstring{number}~\apanum{#1}}\adddot} + {\apanum{#1}}} + {\mkbibemph{\apanum{#1}}}} +\DeclareFieldFormat[report]{number}{\apanum{#1}} +\DeclareFieldFormat[article]{number}{\mkbibparens{\apanum{#1}}} +\DeclareFieldFormat[reprint]{number}{\mkbibbrackets{\apanum{#1}}} +\DeclareFieldFormat[periodical]{number}{\mkbibparens{\apanum{#1}}} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% PAGES +\DeclareFieldFormat[inbook]{pages}{\mkpageprefix[bookpagination]{#1}} +\DeclareFieldFormat[incollection]{pages}{\mkpageprefix[bookpagination]{#1}} +\DeclareFieldFormat[periodical]{pages}{#1} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Set up some standard APA formats +% LOCATION +\DeclareListFormat[misc]{location}{\mkbibemph{#1}} +\DeclareListFormat[periodical]{location}{\mkbibemph{#1}} -\DeclareFieldFormat{volume}{\apanum{#1}} -\DeclareFieldFormat{chapter}{\bibcpstring{chapter}~\apanum{#1}} -\DeclareFieldFormat{volumes}{\bibcpstring{volumes}~#1} -\DeclareFieldFormat{addendum}{\mkbibparens{#1}} -\DeclareFieldFormat{part}{#1} +% NAMEADDON +\DeclareFieldFormat[misc]{nameaddon}{\mkbibparens{#1}} -% +% VERSION +\DeclareFieldFormat[dataset]{version}{\bibcpstring{version}~#1} +\DeclareFieldFormat[software]{version}{\bibcpstring{version}~#1} + +% URL +\DeclareFieldFormat{url}{\url{#1}} +\DeclareFieldFormat{urldate}{#1} + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.25) Works by the same author have the full author +% (APA 9.47) Works by the same author have the full author % name, not an eliding dash. Author is always % last name first. -% (APA 6.27) Ellipsis in 7th position and then nothing until last -% (APA 7.10 Example 67) Unknown names and dates -% +% (APA 10.1:4) Ellipsis from 20th position and then nothing until last +% (APA 9.x) Unknown names and dates +% (APA 9.8) Two group authors drop the comma in between % \printnames does different things depending on whether the format you are % calling is the default for the name field or is a custom format: @@ -409,6 +455,16 @@ % to do \printnames[format][-\value{listtotal}]{field} to ensure we get % all of the names in the list to work on +% It's not completely obvious but it's implied that names identical apart from a suffix +% are to be treated as different name lists for extradate calculation so we add suffix +% to the default definition +\DeclareUniquenameTemplate{ + \namepart[use=true, base=true]{prefix} + \namepart[base=true]{family} + \namepart{given} + \namepart{suffix} +} + \DeclareNameAlias{default}{apaauthor} \DeclareNameFormat{apaauthor}{% @@ -416,43 +472,92 @@ {\addcomma\space\ldots\space} {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} {} - {\iffieldannotation{uncertain} - {\mkbibbrackets{\usebibmacro{name:apa:family-given}% - {\namepartfamily}% - {\namepartgiven}% - {\namepartgiveni}% - {\namepartprefix}% - {\namepartsuffix}?}} - {\usebibmacro{name:apa:family-given}% - {\namepartfamily}% - {\namepartgiven}% - {\namepartgiveni}% - {\namepartprefix}% - {\namepartsuffix}}}}% + {\printtext{\usebibmacro{name:apa:family-given}% + {\namepartfamily}% + {\namepartgiven}% + {\namepartgiveni}% + {\namepartprefix}% + {\namepartsuffix}}% + \let\bibstring\bibcplstring + \setunit{\addspace}% + \printtext{\mkbibparense{\usebibmacro{role}}}% + \hasitemannotation[\currentname][username]{\addspace\mkbibbrackets{\getitemannotation[\currentname][username]}}{}}}% \ifthenelse{\value{listcount}=\value{listtotal}}% - {\ifmorenames{\printdelim{andothersdelim}\bibstring{andothers}}{}}{}} + {\ifmorenames + {\printdelim{andothersdelim} + \bibstring{andothers}} + {}% + \let\bibstring\bibcplstring + \setunit{\addspace}% + \printtext{\mkbibparense{\usebibmacro{roles}}}} + {}} -\renewbibmacro*{author}{% - \ifnameundef{author} - {\usebibmacro{labeltitle}} - {\printnames[apaauthor][-\value{listtotal}]{author}% - \setunit*{\addspace}% - \printfield{nameaddon}% - \ifnameundef{with} - {} - {\setunit{}\addspace\mkbibparens{\printtext{\bibstring{with}\addspace}% - \printnames[apaauthor][-\value{listtotal}]{with}} - \setunit*{\addspace}}}% +\DeclareNameFormat{apanames}{% + \ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}} + {\addcomma\space\ldots\space} + {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} + {} + {\printtext{\usebibmacro{name:apa:given-family}% + {\namepartfamily}% + {\namepartgiven}% + {\namepartgiveni}% + {\namepartprefix}% + {\namepartsuffix}}% + \let\bibstring\bibcpsstring + \setunit{\addcomma\addspace}% + \usebibmacro{role}}}% + \ifthenelse{\value{listcount}=\value{listtotal}}% + {\ifmorenames + {\printdelim{andothersdelim}% + \bibstring{andothers}} + {}% + \let\bibstring\bibcplstring + \setunit{\addspace}% + \usebibmacro{roles}} + {}} + +\renewbibmacro*{author/editor}{% + \ifthenelse{\ifnameundef{author}\AND\ifnameundef{groupauthor}} + {\ifnameundef{editor} + {\usebibmacro{title}% + % need to clear all title fields so we don't get them again later + \clearfield{title}% + \clearfield{subtitle}% + \clearfield{titleaddon}} + {\usebibmacro{editorinauthpos}}} + {\usebibmacro{author}}% \newunit\newblock% \usebibmacro{labelyear+extradate}} +\newbibmacro*{editorinauthpos}{% + \printnames[apaauthor][-\value{listtotal}]{editor}% + \setunit{\addspace}% + \ifnameundef{editor} + {} + {\printtext[parens]{\usebibmacro{apaeditorstrg}{editor}}% + % need to clear editor so we don't get an "In" clause later + \clearname{editor}}} + +\renewbibmacro*{author}{% + \ifnameundef{author} + {\printnames[apaauthor][-\value{listtotal}]{groupauthor}} + {\printnames[apaauthor][-\value{listtotal}]{author}}% + \setunit*{\addspace}% + \printfield{nameaddon}% + \ifnameundef{with} + {} + {\setunit{}\addspace\mkbibparens{\printtext{\bibstring{with}\addspace}% + \printnames[apaauthor][-\value{listtotal}]{with}} + \setunit*{\addspace}}} + % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) References section delimiters are ampersands, not " and " -% (APA 6.27) Use blank for long lists -% (APA 4.03) Serial comma for lists of three or more +% (APA 9.8) Author delimiters are ampersands before final author +% Long author lists +% Serial comma for lists of three or more +% Ampersand only (no comma) between two group authors \DeclareDelimFormat[bib,biblist]{finalnamedelim}{% \ifthenelse{\value{listcount}>\maxprtauth} @@ -464,29 +569,22 @@ \DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{% \ifthenelse{\value{listcount}>\maxprtauth} {} - {\finalandcomma\addspace\&\space}} - + {\ifthenelse{\ifcurrentname{groupauthor}\AND% + \value{liststop}=2} + {\addspace\&\space} + {\finalandcomma\addspace\&\space}}} + % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.28) Use "nodate" bibstring for references with no year +% (APA 9.47) Use "nodate" bibstring for references with no year % Months and days go into parenthesis with year, if set -% (APA 6.29) Issue goes where month normally goes if it -% is set. -% (APA 7.10) circa or uncertain dates in brackets +% (APA 8.13, 10.2) circa or uncertain dates in brackets % Make sure endmonth gets an expansion too \DeclareFieldFormat{endmonth}{\mkbibmonth{#1}} -\newbibmacro*{monthorissue}{% - \iffieldundef{issue} - {\iffieldundef{month} - {} - {\addcomma\space\printfield{month}% - \iffieldundef{endmonth}{}{/\printfield{endmonth}}}} - {\addcomma\space\printfield{issue}}} - \newbibmacro*{labelyear+extradate}{% \iffieldundef{labelyear} {\iffieldundef{origyear} @@ -502,71 +600,42 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.29) General format of titles. -% Ugly Chicago-style lowercasing of English titles - -\DeclareFieldFormat{apacase}{\bbx@colon@search\MakeSentenceCase*{#1}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.5) Conference event information -\DeclareFieldFormat{issuetitle}{#1\isdot} -\DeclareFieldFormat{title}{\iffieldequalstr{titleisdescription}{true}{\mkbibbrackets{#1}}{\mkbibemph{#1}\isdot}} -\DeclareFieldFormat{origtitle}{\mkbibemph{\bbx@colon@search\MakeSentenceCase*{#1}}\isdot} -\DeclareFieldFormat[article]{title}{#1\isdot} -\DeclareFieldFormat[article]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} -\DeclareFieldFormat[inbook]{title}{#1\isdot} -\DeclareFieldFormat[inbook]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} -\DeclareFieldFormat[incollection]{title}{#1\isdot} -\DeclareFieldFormat[incollection]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} -\DeclareFieldFormat[inproceedings]{title}{#1\isdot} -\DeclareFieldFormat[inproceedings]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} -\DeclareFieldFormat[proceedings]{title}{#1\isdot} -\DeclareFieldFormat[proceedings]{origtitle}{\bbx@colon@search\MakeSentenceCase*{#1}\isdot} +\newbibmacro*{eventinfo}{% + \printfield{eventtitle}% + \setunit{\addcomma\addspace}% + \usebibmacro{location+publisher}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.01 Example 10) Newspapers have prefix for pages. - -\DeclareFieldFormat[newsarticle]{pages}{% - \DeclareNumChars{.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ}% - \mkpageprefix{#1}% - \DeclareNumChars{.}} -\DeclareFieldFormat[newsarticle]{newspaper}{\mkbibemph{#1}} -\DeclareFieldFormat[newsarticle]{entrysubtype}{\mkbibbrackets{#1}} -\DeclareFieldFormat[newsarticle]{title}{#1} -\DeclareFieldFormat[article]{pages}{#1} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 9.25) No prefix for pages -\newbibmacro*{newspaper}{% - \printfield{newspaper} - \setunit{\addcomma\space}} +\DeclareFieldFormat{pages}{#1} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.29) Additional {main}title information in brackets (using) -% {MAIN}TITLEADDON field. Colon after maintitle. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 9.52) References in a meta-analysis +% Dates ignore month/day in nonacademic +% articles -\DeclareFieldFormat{titleaddon}{\mkbibbrackets{\bbx@colon@search\MakeSentenceCase*{#1}}} -\DeclareFieldFormat{maintitleaddon}{\mkbibbrackets{\bbx@colon@search\MakeSentenceCase*{#1}}} -\DeclareFieldFormat{booktitleaddon}{\mkbibbrackets{\bbx@colon@search\MakeSentenceCase*{#1}}} +\renewbibmacro*{begentry}{% + \ifkeyword{meta}{\textsuperscript{*}}{}} -\newbibmacro*{bookaddinfo}{% - \ifthenelse{\iffieldundef{edition}\AND\iffieldundef{volumes}} - {} - {\printtext{\bibopenparen}% - \printfield{edition}% - \setunit*{\addcomma\addspace}% - \printfield{volumes}% - \setunit{}% - \printtext{\bibcloseparen}}% -} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Title and additional post title information \renewbibmacro*{title}{% \ifthenelse{\iffieldundef{title}\AND\iffieldundef{subtitle}} - {} + {\printfield{titleaddon}} {\iffieldundef{origtitle} {\printtext[title]{% \printfield[apacase]{title}% @@ -579,52 +648,104 @@ \setunit{\subtitlepunct}% \printfield[apacase]{subtitle}}}% \setunit{\addspace}% + \ifentrytype{inbook}{}{\usebibmacro{addinfo1}}% additional info in parens + \setunit{\addspace}% + \iffieldundef{related} + {} + {\ifthenelse{\iffieldequalstr{relatedtype}{reviewofbook}\OR% + \iffieldequalstr{relatedtype}{reviewoffilm}\OR% + \iffieldequalstr{relatedtype}{reviewoftv}\OR% + \iffieldequalstr{relatedtype}{commentonarticle}} + {\usebibmacro{related:init}% + \usebibmacro{related}% + \togglefalse{bbx:related}}% disable default related expansion later on + {}}% + \setunit{\addspace}% \printfield{titleaddon}% - \iffieldequalstr{entrytype}{book}% - {\setunit{\addspace}\usebibmacro{bookaddinfo}}% - {}% - \ifthenelse{% - \ifnameundef{author}\AND% - \(\ifnameundef{editor}\AND\NOT\boolean{bbx:editorinauthpos}\)\AND% - \ifnameundef{producer}\AND% - \ifnameundef{director}\AND% - \ifnameundef{writer}} - {\newunit\newblock - \usebibmacro{labelyear+extradate}} - {}}} - -\renewbibmacro*{maintitle}{% - \ifthenelse{\iffieldundef{maintitle}\AND\iffieldundef{mainsubtitle}} - {} - {\printtext[maintitle]{% - \printfield[apacase]{maintitle}% - \setunit{\subtitlepunct}% - \printfield[apacase]{mainsubtitle}}% - \setunit{\addspace}} - \printfield{maintitleaddon}% - \addcolon} + \setunit{\addspace}% + \usebibmacro{addinfo2}}}% + +\newbibmacro*{addinfo1}{% + \printtext{% + \mkbibparense{% + \usebibmacro{editor+trans+narr}% + \setunit*{\addsemicolon\addspace}% + \printfield{edition}% + \setunit*{\addcomma\addspace}% + \ifthenelse{\ifentrytype{report}\OR% + \ifentrytype{thesis}\OR% + \ifentrytype{unpublished}\OR% + \ifentrytype{dataset}\OR% + \ifentrytype{software}\OR% + \ifentrytype{audio}\OR% + \ifentrytype{patent}\OR% + \ifentrytype{image}}{\usebibmacro{addinfo3}}{}% + \setunit*{\addcomma\addspace}% + \ifentrytype{inbook}{\printfield{pages}}{}% + \setunit*{\addcomma\addspace}% + \ifentrytype{book}{\printfield{volumes}}{}% + \setunit*{\addcomma\addspace}% + \ifentrytype{book}{\printfield{volume}}{}}}} + +% Additional post title information in brackets +\newbibmacro*{addinfo2}{% + \printtext{% + \mkbibbracketse{% + \iffieldbibstring{entrysubtype} + {\bibcplstring{\thefield{entrysubtype}}} + {\printfield{entrysubtype}}% + \setunit*{\addsemicolon\addspace}% + \printfield{note}}}} + +% number/issue information +\newbibmacro*{addinfo3}{% + \iffieldundef{type} + {\iffieldundef{issue} + {\iffieldnums{number}{\bibcpstring{number}~}{}\printfield{number}} + {\printfield{issue}\setunit{\addspace}% + \iffieldundef{number} + {} + {\iffieldnums{number}{\bibcpstring{number}~}{}\printfield{number}}}} + {\printfield{type}\setunit{\addspace}% + \iffieldundef{number} + {} + {\iffieldnums{number}{\bibcpstring{number}~}{}\printfield{number}}}% + \ifthenelse{\ifentrytype{dataset}\OR\ifentrytype{software}} + {\setunit*{\addsemicolon\addspace}% + \printfield{version}} + {}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.30) Format of volume and number for articles +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.1 Example 6) eprints (eLocator) -\DeclareFieldFormat[article]{volume}{\mkbibemph{\apanum{#1}}} -\DeclareFieldFormat[article]{number}{\mkbibparens{\apanum{#1}}} +\renewbibmacro*{eprint}{% + \iffieldundef{eprinttype} + {} + {\printtext{% + \iffieldbibstring{eprinttype}{\bibcpstring{\strfield{eprinttype}}}{\strfield{eprinttype}}% + \setunit{\addspace}}}% + \printfield{eprint}} + +\DeclareFieldFormat{eprint}{#1} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.30) Commas between title and volume for articles +% (APA 10) Commas between title and volume for articles +% (APA 10.6) eLocator is part of journal info \renewbibmacro*{journal+issuetitle}{% \usebibmacro{journal}% \setunit*{\addcomma\addspace}% \printfield{volume}% \printfield{number}% - \setunit{\addspace}\newblock + \setunit*{\addcomma\addspace}% + \usebibmacro{eprint}% + \newunit\newblock \usebibmacro{issuename}% \newunit} @@ -639,42 +760,11 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.29) Additional information for non-periodicals in -% parenthesis after title. This is ugly but it's -% hard to put in "optional parens" like this -% around an unknown amount of characters. - -\newbibmacro*{addinfo}{% - \ifthenelse{\iffieldundef{edition}\AND% - \iffieldundef{chapter}\AND% - \iffieldundef{volumes}\AND% - \iffieldundef{pages}\AND% - \iffieldundef{number}\AND% - \(\iffieldundef{volume}\OR\boolean{bbx:volseen}\)} - {} - {\printtext{\bibopenparen}% - \printfield{edition}% - \setunit*{\addcomma\addspace}% - \printfield{chapter}% - \setunit*{\addcomma\addspace}% - \notbool{bbx:volseen}% - {\iffieldundef{volume}{}{\global\booltrue{bbx:volseen}}% - \printfield{volume}% - \iffieldundef{part}{}{\printfield{part}}}{}% - \setunit*{\addcomma\addspace}% - \printfield{volumes}% - \setunit*{\addcomma\addspace}% - \printfield{pages}% - \setunit{}% - \printtext{\bibcloseparen}}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) "In " precedes editor/trans list, no colon - +% "In" precedes editor/trans list, no colon +% Use a flag to track as it could be inserted in more +% than one potential location + \newbibmacro*{in}{% \ifbool{bbx:in}% {}% @@ -685,60 +775,88 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) Editors have first names first ... -% (APA 7.02 Example 27) ... unless there is no author - -\DeclareNameFormat{apanames}{% - \ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}} - {\addcomma\space\ldots\space} - {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} - {} - {\usebibmacro{name:apa:given-family}% - {\namepartfamily}% - {\namepartgiven}% - {\namepartgiveni}% - {\namepartprefix}% - {\namepartsuffix}}}% - \ifthenelse{\value{listcount}=\value{listtotal}}% - {\ifmorenames{\printdelim{andothersdelim}\bibstring{andothers}}{}}{}} - -\renewbibmacro*{author/editor}{% - \ifnameundef{author} - {\ifnameundef{editor} - {} - {\usebibmacro{editorinauthpos}}} - {\global\boolfalse{bbx:editorinauthpos}% - \usebibmacro{author}}} - -\newbibmacro*{editorinauthpos}{% - \global\booltrue{bbx:editorinauthpos}% - \printnames[apaauthor][-\value{listtotal}]{editor}% - \setunit{\addspace}% - \ifnameundef{editor} - {} - {\printtext[parens]{\usebibmacro{apaeditorstrg}{editor}}% - % need to clear editor so we don't get an "In" clause later - % But we also need to set a flag to say we did this so we - % don't lose sight of the fact we once had an editor for - % various year placement tests - \clearname{editor}% - \setunit{\adddot\addspace}% - \usebibmacro{labelyear+extradate}% - \setunit{\adddot\addspace}}} +% Names + +% Individual name roles +\newbibmacro*{role}{% + \hasitemannotation[\currentname][role]% + {\getitemannotation[\currentname][role]} + {\ifitemannotation[\currentname][role]{writer} + {\bibstring{writer}% + \setunit{\addspace\&\addspace}} + {}% + \ifitemannotation[\currentname][role]{director} + {\bibstring{director}% + \setunit{\addspace\&\addspace}} + {}% + \ifitemannotation[\currentname][role]{execproducer} + {\bibstring{execproducer}% + \setunit{\addspace\&\addspace}} + {}% + \ifitemannotation[\currentname][role]{producer} + {\bibstring{producer}% + \setunit{\addspace\&\addspace}} + {}% + \ifitemannotation[\currentname][role]{host} + {\bibstring{host}% + \setunit{\addspace\&\addspace}} + {}% + \ifitemannotation[\currentname][role]{chair} + {\bibstring{chair}% + \setunit{\addspace\&\addspace}} + {}% + \ifitemannotation[\currentname][role]{guestexpert} + {\bibstring{guestexpert}% + \setunit{\addspace\&\addspace}} + {}}% + \setunit{}} + +% roles for complete name lists +\newbibmacro*{roles}{% + \hasfieldannotation[\currentname][role]% + {\getfieldannotation[\currentname][role]} + {\iffieldannotation[\currentname][role]{writers} + {\bibstring{writers}% + \setunit{\addspace\&\addspace}} + {}% + \iffieldannotation[\currentname][role]{directors} + {\bibstring{directors}% + \setunit{\addspace\&\addspace}} + {}% + \iffieldannotation[\currentname][role]{execproducers} + {\bibstring{execproducers}% + \setunit{\addspace\&\addspace}} + {}% + \iffieldannotation[\currentname][role]{producers} + {\bibstring{producers}% + \setunit{\addspace\&\addspace}} + {}% + \iffieldannotation[\currentname][role]{hosts} + {\bibstring{hosts}% + \setunit{\addspace\&\addspace}} + {}% + \iffieldannotation[\currentname][role]{chairs} + {\bibstring{chairs}% + \setunit{\addspace\&\addspace}} + {}% + \iffieldannotation[\currentname][role]{guestexperts} + {\bibstring{guestexperts}% + \setunit{\addspace\&\addspace}} + {}}% + \setunit{}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) Name format. Don't capitalise prefixes -% (APA 6.27) Full name disambiguation using brackets +% Name format % #1 = family name % #2 = given name % #3 = given name (initials) % #4 = name prefix % #5 = name suffix - + \newbibmacro*{name:delim:apa:family-given}[1]{% \ifnumgreater{\value{listcount}}{\value{liststart}} {\ifboolexpr{ @@ -799,46 +917,44 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.27) Editor string in parens after author list -% (APA 7.02 Example 21) Collapse editor and trans if same -% (APA 7.02 Example 26) Translator - - -% Separated out into book and in* macros because otherwise -% this makes one ugly, huge, unreadable beast. +% (APA 9.10) Role strings in parens after author list +% Collapse roles if same person +% (APA 10.1 Example 10) Translator +% (APA 10.2 Example 22) Narrator -\newbibmacro*{book:editor+trans}{% +\newbibmacro*{editor+trans+narr}{% \ifthenelse{\ifnameundef{editor}\AND% \ifnameundef{editora}\AND% \ifnameundef{editorb}\AND% \ifnameundef{editorc}\AND% - \ifnameundef{translator}}% - {}% + \ifnameundef{translator}\AND% + \ifnameundef{narrator}}% + {\printtext{}}% Print nothing, so the puncutation tracker is kept informed {\ifnamesequal{editor}{translator}% - {\printtext{\bibopenparen}\global\booltrue{bbx:parens}% - \printnames[apanames][-\value{listtotal}]{editor}% + {\printnames[apanames][-\value{listtotal}]{editor}% \setunit*{\addcomma\addspace}% \usebibmacro{apaeditorstrg}{editor}% \setunit*{\addspace\&\space}% - \printtext{\bibcpstring{translator}}% - \ifbool{bbx:parens}{\printtext{\bibcloseparen}\global\boolfalse{bbx:parens}}{}} - {\printtext{\bibopenparen}\global\booltrue{bbx:parens}% - \ifnameundef{editor}% + \printtext{\bibcpstring{translator}}} + {\ifnameundef{editor}% {}% {\printnames[apanames][-\value{listtotal}]{editor}% \setunit{\addcomma\addspace}% \usebibmacro{apaeditorstrg}{editor}% \clearname{editor}% - \setunit{\adddot}% \setunit*{\addspace\&\space}}% \ifnameundef{translator}% {\setunit{}}% {\printnames[apanames][-\value{listtotal}]{translator}% \setunit{\addcomma\addspace}% \printtext{\bibcpstring{translator}}% - \clearname{translator}% - \setunit{\adddot}}% - \ifbool{bbx:parens}{\printtext{\bibcloseparen}\global\boolfalse{bbx:parens}}{}}}} + \clearname{translator}}% + \ifnameundef{narrator}% + {\setunit{}}% + {\printnames[apanames][-\value{listtotal}]{narrator}% + \setunit{\addcomma\addspace}% + \printtext{\bibcpstring{narrator}}% + \clearname{narrator}}}}} \newbibmacro*{editor+trans}{% \ifthenelse{\ifnameundef{editor}\AND% @@ -850,35 +966,28 @@ {\ifnamesequal{editor}{translator}% {\usebibmacro{in}% \printnames[apanames][-\value{listtotal}]{editor}% - \setunit{\addspace\bibopenparen\global\booltrue{bbx:parens}}% - \usebibmacro{apaeditorstrg}{editor}% - \setunit*{\addspace\&\space}% - \printtext{\bibcpstring{translator}}% - \ifbool{bbx:parens}{\printtext{\bibcloseparen}\global\boolfalse{bbx:parens}}{}} + \setunit{\addspace}% + \printtext[parens]{% + \usebibmacro{apaeditorstrg}{editor}% + \setunit*{\addspace\&\space}% + \bibcpstring{translator}}} {\ifnameundef{translator}% {}% {\setunit{\addspace}% \printtext[parens]{\printnames[apanames][-\value{listtotal}]{translator}% - \setunit{\addcomma\addspace}% - \printtext{\bibcpstring{translator}}}% + \setunit{\addcomma\addspace}% + \bibcpstring{translator}}% \clearname{translator}% \setunit{\adddot\addspace}}% \usebibmacro{in}% \usebibmacro{editorx}}% \setunit{\addcomma\addspace}}} - + % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.29) Special journal issues are periodicals - -\DeclareFieldFormat[periodical]{pages}{#1} -\DeclareFieldFormat[periodical]{title}{#1\isdot} -\DeclareFieldFormat[periodical]{issuetitle}{\mkbibbrackets{#1}} -\DeclareFieldFormat[periodical]{volume}{\mkbibemph{\apanum{#1}}} -\DeclareFieldFormat[periodical]{number}{\mkbibparens{\apanum{#1}}} -\DeclareListFormat[periodical]{location}{\mkbibemph{#1}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Special journal issues are periodicals \renewbibmacro*{periodical}{% \iffieldundef{title} @@ -891,21 +1000,17 @@ \renewbibmacro*{title+issuetitle}{% \usebibmacro{periodical}% \setunit{\addspace}% - \printfield{issuetitle}% - \notbool{bbx:editorinauthpos} - {\newunit - \usebibmacro{labelyear+extradate}} - {}} + \printfield{issuetitle}}% \newbibmacro*{pnumber}{% \printfield{volume}% \printfield{number}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.02 Example 21) Original year +% (APA 10.1 Example 10) Original year % Only give ORIGYEAR in references if both: % YEAR is also given @@ -916,15 +1021,15 @@ not test {\iffieldundef{origyear}} not test {\iffieldundef{labelyear}} and not test {\iffieldsequal{labelyear}{origyear}}} - {\printtext{\mkbibparens{\bibcpstring{origyear}~\printorigdate}}} - {}} + {\printtext{\mkbibparens{\bibcpstring{origyear}~\printorigdate}}% + \renewcommand*{\finentrypunct}{\relax}} + {}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.02) "In " before booktitle, edited or not -% (APA 6.30) Non-periodical volume number followed by "." +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.3) Reference work references \renewbibmacro*{maintitle+title}{% \iffieldsequal{maintitle}{title} @@ -937,8 +1042,7 @@ \newunit\newblock \iffieldundef{volume} {} - {\setunit{\global\booltrue{bbx:volseen}}% - \printfield{volume}% + {\printfield{volume}% \printfield{part}% \setunit{\adddot\space}}}}% \usebibmacro{title}% @@ -954,11 +1058,22 @@ \newunit\newblock \iffieldundef{volume} {} - {\setunit{\addspace\global\booltrue{bbx:volseen}}% - \printfield{volume}% + {\printfield{volume}% \printfield{part}% \setunit{\adddot\addspace}}}% - \usebibmacro{booktitle}}} + \usebibmacro{booktitle}% + \setunit{\addspace}% + \usebibmacro{addinfo1}}} + +\renewbibmacro*{maintitle}{% + \ifthenelse{\iffieldundef{maintitle}\AND\iffieldundef{mainsubtitle}} + {} + {\printtext[maintitle]{% + \printfield[apacase]{maintitle}% + \setunit{\subtitlepunct}% + \printfield[apacase]{mainsubtitle}}% + \setunit{\addspace}} + \printfield{maintitleaddon}} \renewbibmacro*{booktitle}{% \ifthenelse{\iffieldundef{booktitle}\AND\iffieldundef{booksubtitle}} @@ -971,360 +1086,222 @@ \printfield{booktitleaddon}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.29) Colon separates title/subtitle -% Skip if following terminating punctuation +% Colon separates title/subtitle +% Skip if following terminating punctuation \renewcommand*{\subtitlepunct}{\ifterm{}{\addcolon}\space} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.30) Format of volume depends on whether -% there is a maintitle (what APA calls "series") or not. - -\DeclareFieldFormat{volume}{\iffieldundef{maintitle} - {\bibcpstring{volume}~\apanum{#1}} - {\mkbibemph{\bibcpstring{volume}~\apanum{#1}}}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.30) Number for reports with no prefix if not -% a numeral. Report number is optional and so must be -% the parens. - -\DeclareFieldFormat{number}{\iffieldundef{volume} - {\ifinteger{\thefield{number}} - {\addspace\mkbibemph{\bibcpstring{number}~\apanum{#1}}\adddot} - {\apanum{#1}}} - {\mkbibemph{\apanum{#1}}}} - -\DeclareFieldFormat[report]{number}{\mkbibparens{\iffieldundef{type} - {} - {\printfield{type}\setunit{\addspace}}% - \bibcpstring{number}~\apanum{#1}}} - -\newbibmacro*{apa:reportnum}{% - \iffieldundef{number}% - {}% - {\printfield{number}}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 6.30) Location only shows first item +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.2.24) Multiple publishers, semi-colon sep -\DeclareListFormat{default}{% - \usebibmacro{list:delim}{#1}% +\DeclareListFormat{publisher}{% + \usebibmacro{publisher:delim}{#1}% #1\isdot} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.02 Example 38) Proceedings emph number, location -% and location. Pages have no prefix - -\DeclareListFormat[proceedings]{location}{\mkbibemph{#1}} -\DeclareFieldFormat[proceedings]{pages}{#1} -\DeclareFieldFormat[proceedings]{number}{\mkbibemph{\apanum{#1}}} -\DeclareFieldFormat[proceedings]{volume}{\mkbibemph{\apanum{#1}}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.02 Example 40--44) Theses titles and volume -% Titles are not emph if only an abstract +\newbibmacro*{publisher:delim}[1]{% + \ifnumgreater{\value{listcount}}{\value{liststart}} + {\printdelim[publisher]{multilistdelim}} + {}} -\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}} +\DeclareDelimFormat[publisher]{multilistdelim}{\addsemicolon\space} +\DeclareDelimFormat[publisher]{finallistdelim}{\addsemicolon\space} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.05) Unpublished theses +%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.10) Software -\DeclareFieldFormat[unpublished]{title}{\mkbibemph{#1}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newbibmacro*{appentry}{% + \iffieldundef{appentry} + {\newunit\newblock} + {\printfield[apacase]{appentry}% + \newunit\newblock + \usebibmacro{in}% + \setunit{\addspace}}} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (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}}{% - \ifentrytype{article} - {\mkbibemph{\printtext[apacase]{\thefield{savedtitle}}}} - {\printtext[apacase]{\thefield{savedtitle}}}}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.1 Example 18) Comment on article -\DeclareFieldFormat[review]{pages}{#1} -\DeclareFieldFormat[review]{volume}{\mkbibemph{\apanum{#1}}} -\DeclareFieldFormat[review]{number}{\mkbibparens{\apanum{#1}}} +\newcommand*{\begrelateddelimcommentonarticle}{\addspace} +\DeclareFieldFormat{related:commentonarticle}{\def\bibstring{\blx@imc@bibcpstring}\mkbibbrackets{#1}} -\newbibmacro*{reviewauthor}{% - \ifnameundef{author} - {\booltrue{bbx:noreviewauthor}} - {\usebibmacro{author}}} +\renewbibmacro*{related:commentonarticle}[1]{% + \entrydata*{#1}{% + \printtext{\mkbibquote{\printfield[apacase]{title}}}}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Media authors - -\newbibmacro*{producer}{% - \ifnameundef{producer} - {} - {\printnames[apaauthor][-\value{listtotal}]{producer}% - \addspace - \printtext[parens]{\bibcpstring{producer}}% - \setunit*{\addcomma\addspace\&\addspace}}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newbibmacro*{director}{% - \ifnameundef{director} - {} - {\printnames[apaauthor][-\value{listtotal}]{director}% - \addspace - \printtext[parens]{\bibcpstring{director}}% - \setunit*{\addcomma\addspace\&\addspace}}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.7) Reviews - role strings need to be the +% short versions in reviews -\newbibmacro*{writer}{% - \ifnameundef{writer} - {} - {\printnames[apaauthor][-\value{listtotal}]{writer}% - \addspace - \printtext[parens]{\bibcpstring{writer}}% - \setunit*{\addcomma\addspace\&\addspace}}} +\newcommand*{\begrelateddelimreviewofbook}{\addspace} +\DeclareFieldFormat{related:reviewofbook}{\def\bibstring{\blx@imc@bibcpsstring}\mkbibbrackets{#1}} +\newbibmacro*{related:reviewofbook}[1]{\usebibmacro{related:reviewofx}{#1}} -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand*{\begrelateddelimreviewoffilm}{\addspace} +\DeclareFieldFormat{related:reviewoffilm}{\def\bibstring{\blx@imc@bibcpsstring}\mkbibbrackets{#1}} +\newbibmacro*{related:reviewoffilm}[1]{\usebibmacro{related:reviewofx}{#1}} -%%%%%%%%%%%%%%%%% -% (APA 7.07) Misc and data +\newcommand*{\begrelateddelimreviewoftv}{\addspace} +\DeclareFieldFormat{related:reviewoftv}{\def\bibstring{\blx@imc@bibcpsstring}\mkbibbrackets{#1}} +\newbibmacro*{related:reviewoftv}[1]{\usebibmacro{related:reviewofx}{#1}} -\DeclareFieldFormat[data]{title}{\mkbibemph{#1}} -\DeclareFieldFormat[data]{entrysubtype}{\mkbibbrackets{#1}} -\DeclareFieldFormat[misc]{entrysubtype}{\mkbibbrackets{#1}} -\DeclareFieldFormat[misc]{nameaddon}{\mkbibparens{#1}} -\DeclareFieldFormat[misc]{title}{\iffieldequalstr{titleisdescription}{true}{\mkbibbrackets{#1}}{{#1}\isdot}} +\DeclareFieldFormat{reviewtitle}{% + \iffieldequalstr{entrysubtype}{tvepisode} + {\mkbibquote{\bbx@colon@search\MakeSentenceCase*{#1}}} + {\bbx@colon@search\MakeSentenceCase*{#1}}} -\newbibmacro*{datatitle}{% - \iffieldundef{title} - {\iffieldundef{entrysubtype} - {} - {\printfield{entrysubtype}}} - {\iffieldundef{entrysubtype} - {} - {\usebibmacro{title}\addspace - \printfield{entrysubtype}}}} - -% -%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.07) Audiovisual - -\DeclareFieldFormat[video]{title}{\iffieldundef{maintitle}{\mkbibemph{#1}}{#1}} -\DeclareFieldFormat[video]{maintitle}{\mkbibemph{#1}} -\DeclareFieldFormat[video]{entrysubtype}{\mkbibbrackets{#1}} -\DeclareFieldFormat[audio]{entrysubtype}{\mkbibbrackets{#1}} -\DeclareFieldFormat[music]{title}{#1} -\DeclareFieldFormat[music]{maintitle}{\mkbibemph{#1}} -\DeclareFieldFormat[music]{mainsubtitle}{\mkbibemph{#1}} -\DeclareFieldFormat[audio]{howpublished}{\mkbibparens{#1}} - -\newbibmacro*{tvseries}{% - \iffieldundef{maintitle} - {} - {\usebibmacro{in}% - \ifnameundef{execproducer} - {} - {\printnames[apanames][-\value{listtotal}]{execproducer}% - \addspace - \printtext[parens]{\bibcpstring{execproducer}}} - \setunit{\addcomma\addspace}% - \usebibmacro{avmaintitle}% - \newunit}} +\newbibmacro*{related:reviewofx}[1]{% + \entrydata*{#1}{% + \printtext{\mkbibemph{% + \printfield[reviewtitle]{title}% + \iffieldundef{subtitle} + {} + {\setunit{\addcolon\addspace}% + \printfield[reviewtitle]{subtitle}}}% + \setunit{\addcomma\addspace}% + \biblstring{byauthor}% + \setunit{\addspace}% + \printnames[apanames][-\value{listtotal}]{author}}}} + +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newbibmacro*{avmaintitle}{% - \ifthenelse{\iffieldundef{maintitle}\AND\iffieldundef{mainsubtitle}} - {} - {\printtext[maintitle]{% - \printfield[apacase]{maintitle}% - \setunit{\subtitlepunct}% - \printfield[apacase]{mainsubtitle}}% - \setunit{\addspace}} - \printfield{maintitleaddon}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.13) Audio -\newbibmacro*{album}{% - \iffieldundef{maintitle} - {} - {\bibcpstring{on}% +\newbibmacro*{mainaudio}{% + \iffieldundef{maintitle}{} + {\iffieldequalstr{entrysubtype}{podcastepisode}{\bibcpstring{in}}{\bibcpstring{on}}% \setunit{\addspace}% - \usebibmacro{avmaintitle}% - \newunit}} - - -% -%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%% -% (APA 7.10) Letter/Letters - -\DeclareFieldFormat[letter]{title}{\mkbibbrackets{#1}} -\DeclareFieldFormat[letters]{title}{#1} -\DeclareFieldFormat[letter]{number}{\mkbibparens{#1}} -\DeclareFieldFormat[letters]{number}{\mkbibparens{#1}} - -% -%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%% -% (APA 6.31) URLs - -\DeclareFieldFormat{url}{\url{#1}} -\DeclareFieldFormat{abstracturl}{\url{#1}} -\DeclareFieldFormat{urldate}{#1} - -\renewbibmacro*{url+urldate}{% - \ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}\)\OR\NOT\iffieldundef{doi}} - {} - {\ifthenelse{\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}} - {} - {\printtext{\bibcpstring{abstract}}\addspace}% - \iffieldequalstr{entrysubtype}{{DVD}} - {\printtext{\bibstring{available}}} - {\printtext{\bibstring{retrieved}}}% - \setunit{\addspace}% - \iffieldundef{urlyear} - {} - {\printtext{\printurldate}% - \setunit*{\urldatecomma}}% - \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}}}} - -% -%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.11) Non-emph titles for online items -% Subtype in brackets - - -\DeclareFieldFormat[online]{title}{#1} -\DeclareFieldFormat[online]{entrysubtype}{\mkbibbrackets{#1}} + \printfield{maintitle}}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA A7.07) Emph titles for patents +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.12) Audiovisual -\DeclareFieldFormat[patent]{title}{\mkbibemph{#1}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.08 Example 56) Software has version in title - -\DeclareFieldFormat[software]{title}{#1} -\DeclareFieldFormat[software]{version}{\mkbibparens{\bibcpstring{version}~#1}} - -\newbibmacro*{apa:softwaretitle}{% - \printtext[title]{% - \printfield[apacase]{title}% - \setunit{\subtitlepunct}% - \printfield[apacase]{subtitle}}% - \setunit{\addspace}% - \iffieldundef{version}% - {} - {\printfield{version}} - \printfield{titleaddon}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% 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}{% - \iffieldundef{origyear} - {\ifboolexpr{ - test {\iffieldundef{addendum}} - and - test {\iffieldundef{related}}} - {} - {\renewcommand*{\finentrypunct}{\relax}}} - {\renewcommand*{\finentrypunct}{\relax}}} +\newbibmacro*{mainvideo}{% + \iffieldundef{maintitle}{} + {\usebibmacro{in}% + \printnames[apanames][-\value{listtotal}]{execproducer}% + \setunit{\addspace}% + \printtext{\mkbibparens{\bibcplstring{execproducers}}}% + \setunit{\addcomma\addspace}% + \printfield{maintitle}}} % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Related entries +% +% Have to force capitlisation bibstring variant because the delim +% has no printable char and this breaks default capitalisation -\DeclareFieldFormat{related:reprintfrom}{\mkbibparens{#1}} +% Suppress final period after reprints in parens +\renewbibmacro*{endrelated}{% + \iffieldequalstr{relatedtype}{reprintfrom} + {\renewcommand*{\finentrypunct}{\relax}} + {}} + +\newcommand*{\begrelateddelimreprintfrom}{\addperiod\addspace} +\DeclareFieldFormat{related:reprintfrom}{\let\bibstring\bibcpstring\mkbibparens{#1}} \DeclareFieldFormat{related:reviewof}{\mkbibbrackets{#1}} \renewbibmacro*{related:reprintfrom}[1]{% \entrydata*{#1}{% - \printtext{\mkbibemph{\printfield[apacase]{title}}}% - \setunit{\bibpagespunct}% - \printfield{pages}% - \setunit{\addcomma\addspace}% - \bibstring{byauthor}\addspace - \ifnameundef{editor} - {} - {\printnames[apanames][-\value{listtotal}]{editor}% + \ifentrytype{article} + {\mkbibquote{% + \printfield[apacase]{title}% + \setunit{\subtitlepunct}% + \printfield[apacase]{subtitle}}% + \setunit{\addcomma\addspace}% + \printlabeldateextra + \setunit{\addcomma\addspace}% + \usebibmacro{journal}% + \setunit*{\addcomma\addspace}% + \printfield{volume}% + \printfield[reprint]{number}% + \setunit*{\addcomma\addspace}% + \usebibmacro{eprint}% + \setunit{\addcomma\addspace}% + \iffieldundef{issuetitle} + {} + {\printtext[issuetitle]{% + \printfield[noformat]{issuetitle}% + \setunit{\subtitlepunct}% + \printfield[noformat]{issuesubtitle}}}% + \setunit{\addcomma\addspace}% + \printfield{pages}% + \setunit{\addcomma\addspace}% + \printfield{note}% + \setunit{\addcomma\addspace}% + \usebibmacro{location+publisher}% + \setunit{\addcomma\addspace}% + \usebibmacro{doi+url}% + \setunit{}} + {\ifentrytype{incollection} + {\mkbibemph{% + \printfield[apacase]{title}% + \setunit{\subtitlepunct}% + \printfield[apacase]{subtitle}}% + \setunit{\addcomma\addspace}% + \printfield{pages}% + \setunit{\addcomma\addspace}% + \biblstring{byauthor}\space + \printnames[apanames][-\value{listtotal}]{editor}% \setunit{\addcomma\addspace}% \usebibmacro{apaeditorstrg}{editor}% \setunit{\addcomma\addspace}% \printlabeldateextra - \setunit{\addcomma\addspace}}% - \printnames[apanames][-\value{listtotal}]{author}% - \setunit{\addcomma\addspace}% - \usebibmacro{location+publisher}% - \newunit\newblock - \usebibmacro{related}}} - -\newbibmacro*{related:reviewof}[1]{% - \setunit{}% Sanitise this in case no author - \entrydata*{#1}{% - \ifentrytype{article} - {\printtext{\printfield[apacase]{title}}} - {\printtext{\mkbibemph{\printfield[apacase]{title}}}}% - \setunit{\addspace}% - \bibstring{byauthor}\addspace - \printnames[apanames][-\value{listtotal}]{author}% - \printnames[apanames][-\value{listtotal}]{producer}% - \printnames[apanames][-\value{listtotal}]{director}% - \setunit{\addcomma\addspace}% - \printdateextra - \newunit\newblock - \usebibmacro{related}}} + \setunit{\addcomma\addspace}% + \usebibmacro{location+publisher}% + \setunit{\addcomma\addspace}% + \usebibmacro{doi+url}% + \setunit{}} + {}}}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.x) General type layouts +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 9.51) Annotations + +\renewbibmacro*{annotation}{% + \iffieldundef{annotation} + {} + {\begingroup + \togglefalse{blx@bibliography}% + \newline + \setunit{}% + \printfield{annotation}% + \endgroup}} + +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 10.x) General entrytype drivers + +% Custom driver to make a cleaner example for 9.44 +\DeclareBibliographyDriver{nameonly}{% + \usebibmacro{begentry}% + \printnames[apaauthor][-\value{listtotal}]{author}% + \usebibmacro{finentry}} \DeclareBibliographyDriver{article}{% \usebibmacro{bibindex}% @@ -1339,43 +1316,43 @@ \newunit\newblock \printfield{note}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+url}% + \newblock + \usebibmacro{origyear}% \newunit\newblock \printfield{addendum}% - \newunit\newblock + \setunit{\addspace}\newblock \iftoggle{bbx:related} {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{apa:finpunct}% \usebibmacro{apa:pageref}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{newsarticle}{% +\DeclareBibliographyDriver{audio}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% \newunit\newblock - \usebibmacro{newspaper}% - \setunit{\bibpagespunct}% - \printfield{pages}% - \newunit\newblock - \printfield{entrysubtype}% + \usebibmacro{mainaudio}% \newunit\newblock - \printfield{note}% + \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+url}% + \newblock + \usebibmacro{origyear}% \newunit\newblock \printfield{addendum}% - \newunit\newblock + \setunit{\addspace}\newblock \iftoggle{bbx:related} {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{apa:finpunct}% \usebibmacro{apa:pageref}% + \usebibmacro{annotation}% \usebibmacro{finentry}} \DeclareBibliographyDriver{book}{% @@ -1384,15 +1361,11 @@ \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{maintitle+title}% - \setunit{\addspace}\newblock - \usebibmacro{book:editor+trans}% - \newunit\newblock - \printfield{note}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \usebibmacro{origyear}% \newunit\newblock \printfield{addendum}% @@ -1402,59 +1375,28 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{booklet}{% +\DeclareBibliographyDriver{dataset}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% \newunit\newblock - \printfield{howpublished}% - \newunit\newblock \printfield{type}% - \newunit\newblock + \newunit \printfield{note}% \newunit\newblock - \usebibmacro{location+publisher}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \printfield{addendum}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{proceedings}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% + \printlist{organization}% \newunit\newblock - \usebibmacro{booktitle}% - \setunit{\addcomma\addspace}\newblock \usebibmacro{location+publisher}% - \setunit{\addcomma\addspace}% - \printfield{volume}% - \setunit*{\adddot}% - \printfield{number}% - \setunit{\addcomma\addspace} - \printfield{pages}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \printlist{organization}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \printlist{institution}% \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1462,10 +1404,10 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{collection}{% +\DeclareBibliographyDriver{image}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% @@ -1473,13 +1415,9 @@ \usebibmacro{title}% \newunit\newblock \usebibmacro{location+publisher}% - \setunit{\addcomma\addspace}% - \printfield{number}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1487,28 +1425,26 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} \DeclareBibliographyDriver{inbook}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock + \newunit\newblock \usebibmacro{editor+trans}% \newblock \usebibmacro{maintitle+booktitle}% - \newblock - \usebibmacro{addinfo}% \newunit\newblock \printfield{note}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \setunit*{\addspace}\newblock + \usebibmacro{doi+url}% + \newblock \usebibmacro{origyear}% \newunit\newblock \printfield{addendum}% @@ -1518,21 +1454,19 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} \DeclareBibliographyDriver{incollection}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock + \newunit\newblock \usebibmacro{editor+trans}% \setunit*{\addcomma\addspace}\newblock \usebibmacro{maintitle+booktitle}% - \newblock - \usebibmacro{addinfo}% \newunit\newblock \printfield{note}% \newunit\newblock @@ -1540,8 +1474,8 @@ \newunit\newblock \usebibmacro{origyear}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1549,41 +1483,35 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} \DeclareBibliographyDriver{inproceedings}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock + \newunit\newblock \usebibmacro{editor+trans}% \setunit*{\addcomma\addspace}\newblock \usebibmacro{maintitle+booktitle}% - \iffieldundef{eventyear}{}{\setunit{\addcomma\addspace}}% - \printeventdate - \setunit*{\addspace}\newblock - \usebibmacro{addinfo}% + \newunit\newblock + \usebibmacro{eventinfo}% \newunit\newblock \printfield{note}% \newunit\newblock \printlist{organization}% \newunit - \printfield[apacase]{eventtitle}% - \newunit \printfield{venue}% \iffieldundef{pages} {\setunit{\addcomma\addspace}} {\newunit}% \newblock - \usebibmacro{location+publisher}% - \newunit\newblock \usebibmacro{origyear}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1591,7 +1519,7 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} \DeclareBibliographyDriver{manual}{% @@ -1601,8 +1529,6 @@ \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% \newunit\newblock - \printfield{edition}% - \newunit\newblock \printfield{type}% \newunit \printfield{version}% @@ -1613,40 +1539,8 @@ \newunit \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \printfield{addendum}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{online}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \ifthenelse{\iffieldundef{title}\AND\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock - \printfield{entrysubtype}% - \addperiod\addspace - \iftoggle{bbx:doi} - {\printfield{doi}% - \iffieldundef{doi}{}{\renewcommand*{\finentrypunct}{\relax}}} - {}% - \newunit\newblock - \iftoggle{bbx:eprint} - {\usebibmacro{eprint}% - \iffieldundef{eprint}{}{\renewcommand*{\finentrypunct}{\relax}}} - {}% - \newunit\newblock - \usebibmacro{url+urldate}% - \iffieldundef{url}{}{\renewcommand*{\finentrypunct}{\relax}} - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1654,27 +1548,20 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{patent}{% +\DeclareBibliographyDriver{misc}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock - \setunit*{\addspace}% - \printfield{number}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{byholder}% - \newunit\newblock - \printfield{note}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1682,28 +1569,21 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{periodical}{% +\DeclareBibliographyDriver{online}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title+issuetitle}% - \setunit{\adddot\addspace} - \usebibmacro{journal}% - \setunit{\addcomma\addspace} - \printlist{location}% - \setunit{\addcomma\addspace} - \usebibmacro{pnumber}% - \setunit{\addcomma\addspace} - \printfield{pages}% - \newunit\newblock - \printfield{note}% + \usebibmacro{title}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \printlist{organization}% + \addperiod\addspace \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1711,47 +1591,21 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{report}{% +\DeclareBibliographyDriver{patent}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \usebibmacro{apa:reportnum}% - \newunit\newblock - \printlist{institution}% - \newunit\newblock - \printfield{note}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \printfield{addendum}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{thesis}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock - \usebibmacro{type+institution}% - \newunit\newblock \printfield{note}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+url}% \newunit\newblock \printfield{addendum}% \newunit\newblock @@ -1760,89 +1614,26 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{review}{% +\DeclareBibliographyDriver{periodical}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{reviewauthor}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \newunit\newblock - \ifbool{bbx:noreviewauthor}{\usebibmacro{labelyear+extradate}}{}% - \newunit\newblock - \usebibmacro{journal+issuetitle}% - \newunit\newblock - \printfield{note}% - \setunit{\bibpagespunct}% + \usebibmacro{title+issuetitle}% + \setunit{\adddot\addspace} + \usebibmacro{journal}% + \setunit{\addcomma\addspace} + \printlist{location}% + \setunit{\addcomma\addspace} + \usebibmacro{pnumber}% + \setunit{\addcomma\addspace} \printfield{pages}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \printfield{addendum}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{misc}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \ifthenelse{\iffieldundef{title}\AND\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock - \printfield{entrysubtype}% - \newunit\newblock - \printfield{howpublished}% - \newunit\newblock - \printfield{type}% - \newunit - \printfield{version}% - \newunit \printfield{note}% \newunit\newblock - \printlist{organization}% - \newunit\newblock - \printlist{institution}% - \setunit*{\addcomma\addspace}% - \usebibmacro{location+publisher}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \printfield{addendum}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{data}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{datatitle}% - \newunit\newblock - \printfield{type}% - \newunit - \printfield{version}% - \newunit - \printfield{note}% - \newunit\newblock - \printlist{organization}% - \newunit\newblock - \usebibmacro{location+publisher}% - \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+url}% \newunit\newblock \printfield{addendum}% \newunit\newblock @@ -1851,26 +1642,32 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{letter}{% +\DeclareBibliographyDriver{proceedings}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% \newunit\newblock - \printlist{institution}% - \setunit{\addspace}\newblock + \usebibmacro{eventinfo}% + \setunit{\addcomma\addspace}% + \usebibmacro{booktitle}% + \setunit{\addcomma\addspace}% + \printfield{volume}% + \setunit*{\adddot}% \printfield{number}% + \setunit{\addcomma\addspace} + \printfield{pages}% \newunit\newblock \printfield{note}% - \setunit{\addcomma\addspace}\newblock - \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \printlist{organization}% \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1878,10 +1675,10 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{letters}{% +\DeclareBibliographyDriver{report}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% @@ -1889,15 +1686,13 @@ \usebibmacro{title}% \newunit\newblock \printlist{institution}% - \setunit{\addspace}\newblock - \printfield{number}% \newunit\newblock \printfield{note}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1905,28 +1700,21 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{video}{% +\DeclareBibliographyDriver{software}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{writer}% - \usebibmacro{director}% - \usebibmacro{producer}% - \newunit\newblock - \usebibmacro{labelyear+extradate}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock + \usebibmacro{appentry}% \usebibmacro{title}% - \setunit{\addspace}\newblock - \printfield{entrysubtype}% - \newunit\newblock - \usebibmacro{tvseries}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -1934,54 +1722,23 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{movie}{% +\DeclareBibliographyDriver{thesis}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{writer}% - \usebibmacro{director}% - \usebibmacro{producer}% - \newunit\newblock - \usebibmacro{labelyear+extradate}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \setunit{\addspace}\newblock - \printfield{entrysubtype}% \newunit\newblock - \usebibmacro{tvseries}% + \printlist{institution}% \newunit\newblock \usebibmacro{location+publisher}% \newunit\newblock - \usebibmacro{doi+eprint+url}% - \newunit\newblock - \printfield{addendum}% - \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{audio}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{writer}% - \usebibmacro{director}% - \usebibmacro{producer}% - \newunit\newblock - \usebibmacro{labelyear+extradate}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{title}% - \setunit{\addspace}\newblock - \printfield{entrysubtype}% - \newunit\newblock - \usebibmacro{location+publisher}% + \printfield{note}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+url}% \newunit\newblock \printfield{addendum}% \newunit\newblock @@ -1990,39 +1747,26 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{music}{% +\DeclareBibliographyDriver{unpublished}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% + \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% - \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock - \usebibmacro{album}% - \newunit\newblock - \usebibmacro{location+publisher}% - \printfield{addendum}% + \setunit{\addspace}% + \printfield{howpublished}% \newunit\newblock - \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% - \usebibmacro{finentry}} - -\DeclareBibliographyDriver{software}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor}% - \setunit{\printdelim{nametitledelim}}\newblock - \usebibmacro{apa:softwaretitle}% + \printlist{location}% + \setunit{\addcomma\addspace} + \printlist{institution}% \newunit\newblock - \usebibmacro{location+publisher}% + \printfield{note}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -2030,29 +1774,22 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct}% + \usebibmacro{annotation}% \usebibmacro{finentry}} -\DeclareBibliographyDriver{unpublished}{% +\DeclareBibliographyDriver{video}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor}% \setunit{\printdelim{nametitledelim}}\newblock \usebibmacro{title}% \newunit\newblock - \printfield{howpublished}% - \iflistundef{institution} - {\newunit} - {\setunit{\addcomma\addspace}}% - \newblock - \printlist{institution}% - \setunit*{\addcomma\addspace}\newblock - \printfield{note}% - \setunit*{\addcomma\addspace}\newblock - \printlist{location}% + \usebibmacro{mainvideo}% \newunit\newblock - \usebibmacro{doi+eprint+url}% + \usebibmacro{location+publisher}% \newunit\newblock + \usebibmacro{doi+url}% + \newblock \printfield{addendum}% \newunit\newblock \iftoggle{bbx:related} @@ -2060,7 +1797,7 @@ \usebibmacro{related}} {}% \usebibmacro{apa:pageref}% - \usebibmacro{apa:finpunct} + \usebibmacro{annotation}% \usebibmacro{finentry}} % @@ -2108,69 +1845,34 @@ {\bibcpstring{type\thefield{#1type}s}} {\bibcpstring{type\thefield{#1type}}}}} -\renewbibmacro*{doi+eprint+url}{% - \iftoggle{bbx:doi} - {\printfield{doi}% - \iffieldundef{doi}{}{\renewcommand*{\finentrypunct}{\relax}}} - {}% - \newunit\newblock - \iftoggle{bbx:eprint} - {\usebibmacro{eprint}% - \iffieldundef{eprint}{}{\renewcommand*{\finentrypunct}{\relax}}} - {}% - \newunit\newblock - \iftoggle{bbx:url} - {\usebibmacro{url+urldate}% - \iffieldundef{url}{}{\renewcommand*{\finentrypunct}{\relax}}} - {}} +%(APA 9.35) No periods after URLS +\newbibmacro*{doi+url}{% + \iffieldundef{doi} + {\iffieldundef{url}{\newunit}{\usebibmacro{url+urldate}\setunit{\addspace}}} + {\printfield{doi}\renewcommand*{\finentrypunct}{\relax}\setunit{\addspace}}} +\renewbibmacro*{url+urldate}{% + \ifthenelse{\iffieldundef{url}\OR\NOT\iffieldundef{doi}} + {} + {\iffieldundef{urlyear} + {} + {\printtext{\bibstring{retrieved}}% + \addspace + \printurldate + \setunit{\urldatecomma}% + \bibstring{from}% + \setunit{\addspace}}% + \iffieldundef{url}{}{\printfield{url}\renewcommand*{\finentrypunct}{\relax}}}} \DeclareFieldFormat{doi}{% - doi\addcolon \ifhyperref - {\href{https://doi.org/#1}{\nolinkurl{#1}}} - {\nolinkurl{#1}}} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% (APA 7.02) No LOCATION/PUBLISHER if there is a DOI -% (Inconsistent in 2nd printing, see 7.04:39 which -% is incorrect in 2nd printing) + {\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}} + {\nolinkurl{https://doi.org/#1}}} \newbibmacro*{location+publisher}{% - \iffieldundef{doi} - {\printlist[default][1-1]{location}% - \setunit*{\addcolon\space}% - \printlist{publisher}% - \newunit} - {}} - -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\newbibmacro*{type+institution}{% - \setunit{\addspace}% - \ifboolexpr{ test {\iffieldundef{type}} and test {\iflistundef{institution}} } - {} - {\printtext[parens]{% - \iflistundef{institution} - {\setunit*{\addspace}} - {\setunit*{\addcolon\space}}% - \printfield{type}% - \setunit*{\addcomma\space}% - \printlist{institution}% - \setunit*{\addcomma\space}% - \printlist{location}}% - \newunit}} - -\newbibmacro*{labeltitle}{% - \iffieldundef{label} - {\printfield{title}% - \clearfield{title}% - \setunit{\addspace}% - \printfield{entrysubtype}% - \clearfield{entrysubtype}% - \global\booltrue{bbx:titleinauthpos}} - {\printfield{label}}} + \printlist{location}% + \setunit*{\addcomma\space}% + \printlist{publisher}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2185,8 +1887,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% - % Unchanged from authoryear-comp \DeclareBibliographyOption{dashed}[true]{% @@ -2199,10 +1899,6 @@ \DeclareFieldFormat{shorthandwidth}{#1} \setlength{\bibitemsep}{0pt} -\DeclareNameAlias{author}{sortname} -\DeclareNameAlias{editor}{sortname} -\DeclareNameAlias{translator}{sortname} - \defbibenvironment{bibliography} {\list {} |