4

I am struggling finding a way to adapt the APA standard. I would like to remove the period after the author part. The bibliography should look like this:

Author XYZ (2017). Title. Abgerufen am 15.11.2017 von https://url.xy

However, with APA it adds a period after the author:

Author XYZ. (2017). Title. Abgerufen am 15.11.2017 von https://url.xy

I tried \renewcommand{\labelnamepunct}{\space} but it just removes the period after the year.

MWE:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage{csquotes}

\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{german}{german-apa}
\addbibresource{sample.bib}
\DefineBibliographyStrings{german}{
   retrieved = {Abgerufen am},
   from = {von},
   nodate = {{}ohne Datum},
}
\DeclareFieldFormat[online]{title}{\mkbibemph{#1}}

\begin{filecontents}{\sample.bib}
   @online{onlinekoerperschaft,
           author = {{Author XYZ}},
           title = "Title",
           url = {https://url.xy},
           urldate = "2017-11-15"
   }
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography
\end{document} 
2
  • 1
    If you alter the code of biblatex-apa in any way, your document is likely not APA compliant any more. If you didn't want to write an APA-compliant document in the first place, you should consider not using biblatex-apa, but one of the standard styles instead. If you are writing a document in neuer deutscher Rechtschreibung (post-1995, say) you should be using ngerman instead of german. Your MWE causes errors because you are missing \NewBibliographyString{from} \NewBibliographyString{retrieved} before the \DefineBibliographyStrings.
    – moewe
    Commented Nov 15, 2017 at 9:03
  • thanks for this input! I indeed need an APA-compliant document but our university added some extras to it. 95% is APA, the rest I need to change.
    – Tina
    Commented Nov 15, 2017 at 9:15

1 Answer 1

3

Update for biblatex-apa v9.0+

Please keep in mind that the period is mandated by APA style, cf. https://apastyle.apa.org/style-grammar-guidelines/references/examples/report-government-agency-references.

For biblatex-apa v9 and above, which implement 7th edition APA style, we can redefine the author/editor bibmacro to use nameyeardelim, which we can then customise as in the standard styles.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=apa]{biblatex}

\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\addspace}
\DeclareDelimAlias*[bib,biblist]{nonameyeardelim}{nameyeardelim}
\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}%
       \setunit{\printdelim{nonameyeardelim}}\newblock}
      {\usebibmacro{editorinauthpos}%
       \setunit{\printdelim{nameyeardelim}}\newblock}}
    {\usebibmacro{author}%
     \setunit{\printdelim{nameyeardelim}}\newblock}%
  %
  \usebibmacro{labelyear+extradate}}

\begin{filecontents}{\jobname.bib}
@report{nci,
  author      = {{National Cancer Institute}},
  year        = {2019},
  title       = {Taking Time},
  subtitle    = {Support for People With Cancer},
  type        = {NIH Publication},
  number      = {18-2059},
  institution = {U.S. Department of Health and Human Services,
                 National Institutes of Health},
  url         = {https://www.cancer.gov/publications/patient-education/takingtime.pdf},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,nci}

\printbibliography
\end{document}

National Cancer Institute (2019). Taking time: Support for people with cancer (NIH Publication No. 18-2059). U.S. Department of Health and Human Services, National Institutes of Health. https://www.cancer.gov/publications/patient-education/takingtime.pdf

See also Adjustments to bibliography / no comma between author and year / no italic font and https://github.com/plk/biblatex-apa/pull/117.


Old answer

You will need to slightly alter two biblatex-apa macros.

\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}}}%
  \setunit{\addspace}\newblock%
  \usebibmacro{labelyear+extradate}}

\renewbibmacro*{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{\addspace}%
       \usebibmacro{labelyear+extradate}%
       \setunit{\adddot\addspace}}}

The only change is before the calls to \usebibmacro{labelyear+extradate}. In the author macro a \newunit was replaced by \setunit{\addspace}; in the editorinauthpos macro it was \setunit{\adddot\addspace}.

This solution assumes the current biblatex-apa version 7.5. If you are running an older version, please consider updating (remember to update biblatex to 3.8a and Biber to 2.8 with it). If that is not at all possible, replace labelyear+extradate with labelyear+extrayear inn the above macros, that should make the code run also with less recent versions of the package.

1
  • Awesome! Thank you very much. It worked with labelyear+extrayear. I am using share latex. Don't know what version of bib latex.
    – Tina
    Commented Nov 15, 2017 at 9:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .