3

Yet another APA-style modification for biblatex, sorry folks :/

Please be gentle, I am using Latex about 10 hours now...

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{refs.bib}
@article{GeeraertsEenzondagspakHet2001,
    langid = {dutch},
    title = {Een zondagspak? Het Nederlands in Vlaanderen: gedrag, beleid, attitudes},
    volume = {44},
    journaltitle = {Ons Erfdeel},
    date = {2001},
    pages = {337--344},
    author = {Geeraerts, Dirk}}
}
\end{filecontents*}
\usepackage[style=apa,citestyle=authoryear-ibid,backend=biber]{biblatex}
\addbibresource{refs.bib}

\begin{document}

In 1988 C was totally awesome. \parencite[338]{GeeraertsEenzondagspakHet2001}

\printbibliography 
\end{document}

I need 2 changes to the output of \printbibliography:

Geeraerts, D. (2001). Een zondagspak? Het Nederlands in Vlaanderen: gedrag, beleid, attitudes. Ons Erfdeel, 44, 337–344.

should be

Geeraerts, D. (2001). Een zondagspak? Het Nederlands in Vlaanderen: gedrag, beleid, attitudes. Ons Erfdeel 44, 337–344.

  1. "Geeraerts, D. (2001)." needs to be bold
  2. Ons Erfdeel, 44, 337–344. => Ons Erfdeel 44, 337–344.

Close observers can see that "44" is no longer in italics and has lost the comma in front of it.


I am currently using biblatex because my Zotero exports nicely to that format. I am on Windows 10, MikTeX 2.9.6637, and TexStudio 2.12.6.

Thank you for your help!

[I am wiling to change bib-package if needed]

  • Welcome to TeX.SE. I changed the references to "Harvard style" to "APA style". "Harvard style" generally refers to a specific style of the citation call-outs (aka "authoryear-style"). It looks like you're looking to modify the appearance of the formatted bib entries, not that of the citation call-outs, right? – Mico Mar 28 '18 at 16:42
  • @Mico, I have no idea what you are trying to ask from me :) I do understand the difference between APA-style and Harvard-formatting. And I do think I need to have the 'reference' list modified as moewe did... Does this answer your question? – LooselySubtle Mar 28 '18 at 16:45
  • So you've just confirmed my guess, which was that you were not looking to change the appearance of the citation call-outs (which might be called "harvard style"). – Mico Mar 28 '18 at 16:51
  • I have made some minor changes to the \cite{} printout but those were not relevant for this particular question... – LooselySubtle Mar 28 '18 at 16:55
2

You are using biblatex-apa, a style that will give you full-blown APA style and not "Harvard style" (Harvard style is not a well defined term and generally means just author-year citations). If you modify anything with biblatex-apa your document is not APA compliant any more.

In general I would avoid heavily customised styles such as biblatex-apa if I do not have to follow the exact style guide that it implements. Customised styles are not designed to allow for heavy modifications, so they can be a bit harder to modify than the standard styles, which were written with the need for easy modification in mind. If the changes you need to apply to biblatex-apa are minute, you may get away with modifying that style. But as soon as the changes get more copious and complicated, one of the standard styles is almost always a better choice.

OK, so what did we do here?

  • We modified the author and editorinauthpos macros to turn the author name and year bold. In both of these cases the only thing we did was to add \printtext[bold]{...} around the original definition from apa.bbx.
  • With \DeclareFieldFormat[article]{volume}{\apanum{#1}} we made sure that the volume number is not italic any more.
  • Finally, in the journal+issuetitle macro (also from apa.bbx) we replaced two commas by spaces to remove the comma before the volume.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{refs.bib}
@article{GeeraertsEenzondagspakHet2001,
    langid = {dutch},
    title = {Een zondagspak? Het Nederlands in Vlaanderen: gedrag, beleid, attitudes},
    volume = {44},
    journaltitle = {Ons Erfdeel},
    date = {2001},
    pages = {337--344},
    author = {Geeraerts, Dirk}}
}
\end{filecontents*}
\usepackage[style=apa,citestyle=authoryear-ibid,backend=biber]{biblatex}
\addbibresource{refs.bib}

\DeclareFieldFormat{bold}{\mkbibbold{#1}}
\renewbibmacro*{author}{%
  \printtext[bold]{%
    \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}}}%
    \newunit\newblock
    \usebibmacro{labelyear+extradate}}}

\renewbibmacro*{editorinauthpos}{%
  \printtext[bold]{%
    \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\space}%
       \usebibmacro{labelyear+extradate}%
       \setunit{\adddot\space}}}}

\DeclareFieldFormat[article]{volume}{\apanum{#1}}
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}
     \setunit{\addspace}}%
  \printfield{volume}%
  \printfield{number}%
  \setunit{\addspace}\newblock
  \usebibmacro{issuename}%
  \newunit}

\begin{document}
In 1988 C was totally awesome. \parencite[338]{GeeraertsEenzondagspakHet2001}

\printbibliography 
\end{document}

enter image description here

  • If I understand you correctly, best practice is not to touch APA at all and just ask my teachers at the university if APA is good enough for them... They will prolly not want to ditch the harvard-formatting (not style), given the 70-somehting document they wrote about it... Your modifications seem to be bang on. I will test them tomorrow (at home now). Could you please elaborate on your latex-fu? How on earth does one begin to write modifications like you did...? – LooselySubtle Mar 28 '18 at 16:51
  • @LooselySubtle Asking if your teachers can accept other styles is always worth a try. I've always dealt with very sensible lecturers that accepted any bibliography/citation style that was consistent and complete. But if your lecturers are adamant and insist on a particular style, then you will have to try to implement that for better or worse. In that case it is often better to start from one of biblatex's standard styles instead of a heavily modified custom style such as biblatex-apa or biblatex-chicago. ... – moewe Mar 28 '18 at 16:58
  • ... But that is a judgement call. If the styles already get you very far and the expected modifications are not that complicated, starting from a custom style is of course acceptable. Of course you can't always tell from the outset whether or not the modifications will be simple. A good primer for biblatex customisations is tex.stackexchange.com/q/12806/35864. You'll find thousands of questions on this site that can give you an idea of how one does these things. – moewe Mar 28 '18 at 17:00
  • 1
    Unless you're working in psychology or related social science fields, APA style usually means "some version of author-year" and doesn't really mean full blown APA style. And if you require special formatting different from the proper APA format, then it's likely that this is how the term "APA style" is being used by your teachers. It's usually in contrast to, e.g. MLA style which is the one commonly taught in high schools (at least in N. America) where writing is usually taught in the context of literature not science. – Alan Munn Mar 28 '18 at 17:02
  • @moewe, I would like to take up your advice and omit style=apa so I can start from biblatex's standard styles. Where do you find those macro's and FieldFormats for copy/pasting and editing? – LooselySubtle Mar 29 '18 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.