TransWikia.com

biblatex APA style shortens to "..." instead of "et al." in reference list

TeX - LaTeX Asked on March 31, 2021

I’m writing my (German) thesis with biblatex-apa and came across this problem.

An article I cite has 13 authors. When cited, it shows in the reference list with all the names included. I want to shorten it to 6 names and add "et al." after the sixth name.

So I know I can manipulate the number of names shown in the reference list with apamaxprtauth = 6 but unfortunately that just fills in "…" between the sixth and last author and no et al. (which seems kinda weird to me?):

Picture of the unwanted output with dots

What i want is the output to be like this:

One, A., Two, A., Three, A., Four, A., Five, A., Six, A. et al. (2020). Important title of important article. Important Journal, 44, 1–16.

extract from my .tex file

documentclass[fontsize=12pt]{scrreprt}
usepackage[ngerman]{babel}
usepackage[autostyle, german=quotes]{csquotes}
usepackage[style=apa, backend=biber,
   apamaxprtauth=6, 
   natbib=true, 
   language=ngerman, 
   doi=true,            
   uniquename=init
   ]{biblatex}
DeclareLanguageMapping{ngerman}{ngerman-apa}
DefineBibliographyStrings{ngerman}{andothers={et aladddot}}  
addbibresource{../literature.bib}


begin{document}
      bla bla bla textcite{lit1}
printbibliography
end{document}

My .bib file entry

  @article{lit1,
   author = {Author One and Author Two and Author Three and Author Four and Author    
     Five and Author Six and Author Seven and Author Eight and Author Nine and Author
     Ten and Author Eleven and Author Twelve and Author Thirteen},
   journal = {Important Journal},
   pages = {1--16},
   title = {Important title of important article},
   volume = {44},
   year = {2020}}

One Answer

The general form of the output you are showing is expected in (and mandated by) APA style.

The current 7th edition of the APA style manual shows up to 19 names before it starts replacing names with ..., see https://apastyle.apa.org/blog/more-than-20-authors and https://apastyle.apa.org/style-grammar-guidelines/references/elements-list-entry#author. The 6th edition of APA style showed up to 6 names before it started replacing names with ....

Since biblatex-apa and biblatex-apa6 are written to exactly follow APA guidelines, it is quite tricky to change this behaviour (because biblatex-apa needs to do quite some work to implement the unusual APA style behaviour in the first place). In particular the standard methods to change the number of names shown in the bibliography (maxbibnames, minbibnames and friends) will not work as expected in biblatex-apa.

With a current version of biblatex-apa (tested with v9.14 from 2020-08-28), the following should work. The idea is to change the two primary biblatex-apa name formats from their original definitions in apa.bbx (ll. 529-574 in v9.14) to only print something for the first maxprtauth names possibly followed by "et al.". The code for apa:andothers is adapted from name:andothers (biblatex.def, ll. 1128-1138 in v3.15a)

documentclass{article}
usepackage[ngerman]{babel}
usepackage[autostyle, german=quotes]{csquotes}
usepackage[backend=biber,
  style=apa,
  apamaxprtauth=6,
  doi=true,
]{biblatex}

DefineBibliographyStrings{ngerman}{andothers={et aladddot}}

makeatletter
DeclareNameFormat{apaauthor}{%
  ifnumgreater{value{listcount}}{maxprtauth}
    {}
    {usebibmacro{name:apa:family-given}%
       {namepartfamily}%
       {namepartgiven}%
       {namepartgiveni}%
       {namepartprefix}%
      {namepartsuffix}%
     usebibmacro{role}{addspace}{mkbibparens}%
     hasitemannotation[currentname][username]
       {addspacemkbibbrackets{getitemannotation[currentname][username]}}
       {}}%
  usebibmacro{apa:andothers}}

DeclareNameFormat{apanames}{%
  ifnumgreater{value{listcount}}{maxprtauth}
    {}
    {usebibmacro{name:apa:given-family}%
       {namepartfamily}%
       {namepartgiven}%
       {namepartgiveni}%
       {namepartprefix}%
       {namepartsuffix}%
     usebibmacro{role}{addcommaspace}{@firstofone}}%
  usebibmacro{apa:andothers}}
makeatother

newbibmacro*{apa:andothers}{%
  ifboolexpr{
    test {ifnumequal{value{listcount}}{maxprtauth}}
    and
    (
       test ifmorenames
       or
       test {ifnumgreater{value{listtotal}}{maxprtauth}}
     )
  }
    {ifnumgreater{value{liststop}}{1}
       {finalandcomma}
       {}%
     printdelim{andothersdelim}bibstring{andothers}}
    {}}

begin{filecontents}{jobname.bib}
@article{lit1,
  author  = {Author One and Author Two and Author Three and Author Four
             and Author Five and Author Six and Author Seven
             and Author Eight and Author Nine and Author Ten
             and Author Eleven and Author Twelve and Author Thirteen},
  journal = {Important Journal},
  pages   = {1--16},
  title   = {Important title of important article},
  volume  = {44},
  year    = {2020},
}
end{filecontents}
addbibresource{jobname.bib}
addbibresource{biblatex-examples.bib}


begin{document}
  bla bla bla textcite{lit1,sigfridsson,worman,aksin,companion}
  printbibliography
end{document}

One, A., Two, A., Three, A., Four, A., Five, A., Six, A. et al. (2020). Important title of important article. Important Journal, 44, 1–16.

Note that I cleaned up some of the options and other biblatex-related code mentioned in my comment in the MWE.

Unrelated to your actual problem, but unless your version of biblatex-apa is really outdated you won't need the DeclareLanguageMapping{ngerman}{ngerman-apa}. The option language=ngerman, in the biblatex call is also superfluous here and usually does not do what people expect unless other options are also activated. I would remove it. The option uniquename=init is already pre-set if you use style=apa,, so I would also drop it.

Correct answer by moewe on March 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP