2

Could someone please give me a hint on how to get rid of the dot after the url before the addendum in the bibliography list?

Here's my MWE:

\documentclass[12pt,a4paper,parskip=half,abstracton]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[backend=biber,bibencoding=utf8,style=apa,citestyle=authoryear,natbib,maxcitenames=2,maxbibnames=99,firstinits=true]{biblatex}
\ExecuteBibliographyOptions{sorting=nyt,bibwarn=true,url=true}
\DefineBibliographyStrings{ngerman}{%
   nodate = {o.J.},
   retrieved = {Internet:},
   from = {},
}
\usepackage{hyperref}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand*{\nameyeardelim}{\addspace}
\renewcommand{\labelnamepunct}{\addcolon\space}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{citetitle}{#1}
\urlstyle{same}

\addbibresource{db.bib}

\begin{document} 
\nocite{*}
\printbibliography

\end{document}

And two sample .bib entries:

@ELECTRONIC{Rothenberg2018,
   AUTHOR = {Rothenberg, Valentin}, 
   YEAR = {2018},
   TITLE = {AWS, Azure oder Google Cloud. Eine ausführliche Analyse aus Management-Sicht},
   URL = {https://t3n.de/news/aws-azure-google-cloud-878305},
   ADDENDUM = {30. September 2018},
}
@article{Waldrop2016, 
    AUTHOR={Waldrop, M. Mitchell}, 
    YEAR={2016}, 
    TITLE = {More than Moore}, 
    JOURNAL={Nature}, 
    VOLUME={530}, 
    PAGES={144-147},
    URL={https://www.nature.com/polopoly_fs/1.19338!/menu/main/topColumns/topLeftColumn/pdf/530144a.pdf},
    ADDENDUM = {28. September 2018},
}

Which results in this: enter image description here

2
  • 2
    Do not use addendum to display the access date of the URL, use urldate = {2018-09-28}.
    – moewe
    Sep 30, 2018 at 16:44
  • Got it working, but urldate is displayed before the url and not in paranthesis. How can I move it to the very end of the entry and add the paranthesis? The required format has to be: Lastname, F. (20XX): Title of the Article. [Optional journal info]. Internet: http://www.myurl.com (28. September 2018)
    – Mattes
    Sep 30, 2018 at 17:49

1 Answer 1

0

Ideally you would use the urldate field to give the access date of an online source.

biblatex-apa shows the urldate before the URL, though, so we need to move it back to after the URL. That can be done by redefining url+urldate (the macro has been simplified at the cost of abstracturl and abstractloc). I have also modernised a few other bits and bobs in your code.

\documentclass[12pt,a4paper,parskip=half,abstracton]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[backend=biber, style=apa, citestyle=authoryear, sorting=nyt, natbib,
            maxcitenames=2, maxbibnames=99, giveninits=true, uniquename=init,
            urldate=long]{biblatex}

\DefineBibliographyStrings{german}{%
  nodate = {o.J\adddot},
  url    = {Internet},
}

\usepackage{hyperref}

\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareDelimFormat{nameyeardelim}{\addspace}
\renewcommand{\labelnamepunct}{\addcolon\space}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{citetitle}{#1}
\urlstyle{same}

\DeclareFieldFormat{url}{\bibstring{url}\addcolon\space\url{#1}}
\DeclareFieldFormat*{urldate}{\mkbibparens{#1}}
\renewbibmacro*{url+urldate}{%
  \ifboolexpr{       test {\iffieldundef{url}}
              or not test {\iffieldundef{doi}}}
    {}
    {\printfield{url}%
     \setunit{\addspace}%
     \printurldate}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{Rothenberg2018,
  author  = {Rothenberg, Valentin}, 
  year    = {2018},
  title   = {AWS, Azure oder Google Cloud. Eine ausführliche Analyse aus Management-Sicht},
  url     = {https://t3n.de/news/aws-azure-google-cloud-878305},
  urldate = {2018-09-28},
}
@article{Waldrop2016, 
  author  = {Waldrop, M. Mitchell}, 
  year    = {2016},  
  title   = {More than Moore}, 
  journal = {Nature}, 
  volume  = {530}, 
  pages   = {144-147},
  url     = {https://www.nature.com/polopoly_fs/1.19338!/menu/main/topColumns/topLeftColumn/pdf/530144a.pdf},
  urldate = {2018-09-28}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document} 
\nocite{*}
\printbibliography
\end{document}

Rothenberg, V. (2018): AWS, Azure oder Google Cloud. Eine ausführliche Analyse aus Management-Sicht. Internet: https://t3n.de/news/aws-azure-google-cloud-878305 (28. September 2018)//Waldrop, M. M. (2016): More than Moore. Nature, 530, 144–147. Internet: https://www.nature.com/polopoly_fs/1.19338!/menu/main/topColumns/topLeftColumn/pdf/530144a.pdf (28. September 2018)

Note that it is usually a bad idea to mix style=apa with other bibstyles or citestyles: One should only use biblatex-apa if one wants APA style citations and an APA bibliography. For everything else biblatex-apa can be very hard to modify since it is purpose-built to give the output required by the APA. If you are looking to customise a style, it is usually better to pick one of the standard styles and start from there.

3
  • Thank you so much! Unfortunately I can't upvote yet, but this deserves a big thumbs up! Where do you guys get all the info about field names and stuff like that? I clicked through half a dozen documentations but i never find what I'm looking for
    – Mattes
    Oct 1, 2018 at 11:28
  • @Mattes Glad I could help. For field names the biblatex documentation, chapter 2 is the best way to get started. It explains all entry types and fields available in the standard data model (custom styles may define additional stuff, that would normally be mentioned in the style documentation). Usually you can only really find out which macros to modify if you look at the code (.bbx and .cbx).
    – moewe
    Oct 1, 2018 at 11:32
  • Cheers, mate! Great tip with the .bbx files!
    – Mattes
    Oct 1, 2018 at 12:29

You must log in to answer this question.

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