3

So I'm still working on this big essay and today I noticed that the notes we added in the .bib file are not showing up in the bibliography. It is only happening when I'm using the apa style. Maybe printing the note data field is not implemented, just like the ISBN? (Biblatex not showing ISBN with apa style) Otherwise, what am I doing wrong?

MWE:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=apa,citestyle=apa]{biblatex}
\DeclareLanguageMapping{english}{english-apa}
\addbibresource{sources.bib}

\begin{document}
Content. \parencite{something_one} More content \parencite{something-else_one} more content.
\printbibliography
\end{document}

And the sources.bib file:

@online{something_one,
author      =   {Some One},
title       =   {Something},
year        =   {nodate},
url         =   {https://somesite.org/somepage},
urldate     =   {2017-12-19},
note        =   {I'm a note}
}

@online{something-else_one,
author      =   {Some One},
title       =   {Something else},
year        =   {nodate},
url         =   {https://somesite.org/someotherpage},
urldate     =   {2017-12-19},
note        =   {I'm another note}
}
Bassie-c
  • 147
  • 10
  • Welcome to TeX.se, and thanks for posting a minimal example document. The bibliography driver for online elements isn't set up to print the note. What are you using the note field for, exactly? – Alan Munn Jan 07 '18 at 23:49
  • Multiple uses, but for example, I'm citing from Wikipedia and I would like to have the date of last revision in the bibliography. – Bassie-c Jan 08 '18 at 00:08
  • 2
    Ok. For that you should use the urldate field. See §4.2.2 of the biblatex-apa documentation. – Alan Munn Jan 08 '18 at 00:37
  • 1
    I notice that the @online entry type supports the addendum field. In contrast to the note field, the addendum field prints after the url and urdate. But perhaps it would suit you. – David Purton Jan 08 '18 at 09:49
  • @AlanMunn isn't urldate used for "retrieved on"? APA§4.2.2 actually also says so. What if you want both "Retrieved on: " and "Published on/Last updated on: " (obtainable from the website infos)? – thymaro Jan 09 '18 at 00:35
  • @AlanMunn The urldate is indeed used for the date I checked out the webpage. Apart from that I also want to note the date when then the last change to the wikipage was made. – Bassie-c Jan 09 '18 at 00:43
  • @DavidPurton Thank you! I think I'm going to use this, but I'm sure there must be some way to get the "note" data field to work as well. If I find something I will post it here. – Bassie-c Jan 09 '18 at 00:45
  • Bassie-c: @DavidPurton is correct that the addendum can be used. Where in the entry would the "Last Updated on" information go relative to other elements in the reference? I don't have the actual APA guide to find out. If it's where the addendum should go, then you're not gaining much with making a version for using the note field. – Alan Munn Jan 09 '18 at 01:04
  • It is possible to patch the @online output to include the note field. It just depends on the APA guidelines where things should go. – David Purton Jan 09 '18 at 01:27

1 Answers1

5

In addition to the comments above, this is how to patch the @online entry type driver to include the note field.

  1. Have a look in the file apa.bbx and find the online driver (search for \DeclareBibliographyDriver{online}).
  2. Have a look through this driver and see where you want to put the note field. Most drivers put the note field before any doi or url.
  3. You'll see that immediately before the doi field there is \printfield{entrysubtype}.
  4. We can patch the driver using xpatch to insert the note field after this with a period and space in between like this:

    \usepackage{xpatch}% load the xpatch package
    \xpatchbibdriver{online}% patch the online driver:
      {\printfield{entrysubtype}}% replace this line
      {\printfield{entrysubtype}%  with these lines
       \newunit\newblock
       \printfield{note}}
      {}
      {}
    

Full MWE

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{something_one,
  author  = {Some One},
  title   = {Something},
  year    = {nodate},
  url     = {https://somesite.org/somepage},
  urldate = {2017-12-19},
  note    = {I'm a note}
}
@online{something-else_one,
  author  = {Some One},
  title   = {Something else},
  year    = {nodate},
  url     = {https://somesite.org/someotherpage},
  urldate = {2017-12-19},
  note    = {I'm another note}
}
\end{filecontents}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{english}{english-apa}
\usepackage{xpatch}
\xpatchbibdriver{online}
  {\printfield{entrysubtype}}
  {\printfield{entrysubtype}%
   \newunit\newblock
   \printfield{note}}
  {}
  {}
\addbibresource{\jobname.bib}
\pagestyle{empty}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

David Purton
  • 25,884