0

Im using APA style in Biblatex and I want to know how I could remove the parantheses around year. I found code for this with authoryear, but nothing for APA. This is my code:

\usepackage[backend=biber,style=apa,natbib=true]{biblatex}
\DeclareLanguageMapping{english}{english-apa} %get year
\usepackage{xpatch}
\addbibresource{example.bib}

...begin document...

\printbibliography[heading=bibintoc]
\xpatchbibmacro{date+extradate}{%
  \printtext[parens]%
}{%
  \setunit*{\addcomma\space}%
  \printtext%
}{}{} 
\printbibliography
\enddocument

PS: its for the thesis so I only added what I think is the relevant parts. Let me know if more is needed!

  • 1
    The apa style isn't really designed to be modified. Is there a reason why you're using it as opposed to authoryear (perhaps with some minor modifications)? You might want to check out the biblatex-ext styles which allow easier modification of the basic styles. – Alan Munn Aug 7 at 16:40
  • @AlanMunn Only because it was the most similar one(I'm very new to biblatex!). Alright, nice I'll look more into modifying authoryear/biblatex-ext then, thanks. – Laksi B Aug 7 at 16:49
1

biblatex-apa was specifically written to meet all the complex requirements of the Publication Manual of the American Psychological Association. This means that it can be quite tricky to modify the style to deviate from its intended APA output.

As Alan Munn mentions in the comments it is usually better to use one of the standard styles or a style of the biblatex-ext bundle as basis for a custom style than to modify biblatex-apa.

In this case there is a fairly simple solution, but you should not count on this in general.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\DeclareFieldFormat{apadate}{%
  \ifboolexpr{ test {\ifdatecirca} or test {\ifdateuncertain} }
    {\printtext{\mkbibbrackets{#1}}}
    {\printtext{#1}}}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson}
\printbibliography
\end{document}

Sigfridsson, E. & Ryde, U. 1998. Comparison of methods for deriving atomic charges from the electrostatic potential and moments. Journal of Computational Chemistry, 19(4), 377–395. doi:10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P

The answers in How to (properly) remove the parentheses around the year in authoryear style? (v3) show how you would remove the parentheses for the standard styles and biblatex-ext (but judging from the code in the question you already know those ...).

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.