Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

The Bibliography with the (yearmonthday) text.

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.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The macro \mkbibdataapalongextra is defined in the language specific files american-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 load american-apa, which is why you need \DeclareLanguageMapping{american}{american-apa}. However, it seems that you also need to tell babel 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):


\documentclass{article}
\usepackage[english, american]{babel}

\usepackage{csquotes}

\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{english}{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}

\addbibresource{ref.bib}

\begin{document}


Some more text before the bibliograpy and a citation \parencite{bradley1990startle} of course.

\printbibliography

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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