I am trying to use the apa6 package with a more extensive version of this document:
\documentclass[man,a4paper, english]{apa6}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\begin{filecontents}{ref.bib}
@ARTICLE{bradley1990startle,
author = {Bradley, Margaret M and Cuthbert, Bruce N and Lang, Peter J},
title = {Startle reflex modification: Emotion or attention?},
journal = {Psychophysiology},
year = {1990},
month = {11},
day = {3},
volume = {27},
pages = {513--522},
number = {5},
publisher = {Wiley Online Library}
}
\end{filecontents}
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
\addbibresource{ref.bib}
\title{MWE}
\shorttitle{MWE}
\author{Me}
\affiliation{SO}
\leftheader{Me}
\begin{document}
\maketitle
Some more text before the bibliograpy and a citation \parencite{bradley1990startle} of course.
\printbibliography
\end{document}
However when compiling with latex I get this error:
! Undefined control sequence.
<argument> \mkbibdateapalongextra
{year}{month}{day}\iffieldundef {endyear}{...
When I continue compiling with biber main Biber this error pops up:
INFO - No sort tailoring available for locale 'nl_NL.UTF-8'
After the last compile with pdflatex I do get output, however some strange text appears in the bibliography:
Following the topic (Xelatex, Biblatex: biber.exe not working properly (IPC::Run) error) I have tried to compile with biber -f main
, which didn't help either.
I also tried adding:
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}
which didn't help either. I also tried filling out the day and month fields, but even if those are present the text (yearmonthday) still shows up in the bibliography. How do I get rid of that (yearmonthday) text in the bibliography? What does the error about the undefined control sequence \mkbibdataapalongextra
mean?
All files including the complete log can be found here.
Best Answer
The macro
\mkbibdataapalongextra
is defined in the language specific filesamerican-apa.lbx
,austrian-apa.lbx
, etc., so if these are not loaded correctly then that macro is not defined, which leads to the issue you observed.Be default,
biblatex
does not know to loadamerican-apa
, which is why you need\DeclareLanguageMapping{american}{american-apa}
. However, it seems that you also need to tellbabel
to load american explicitly . I wrote "it seems" because I have not investigated in-depth, so I cannot say I fully understand the interdependence. However, the following code fixes your problem (I took the liberty of simplifying your MWE):