0

I have to write a report using APA style bibliography, using this minimal example:

\documentclass{article}

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

\usepackage{filecontents}

\begin{filecontents*}{\jobname.bib}
  @book{Knu86,
    author = {Knuth, Donald E.},
    year = {1986},
    title = {The \TeX book},
  }
\end{filecontents*}

\addbibresource{\jobname.bib}

\begin{document}

\cite{*}

\printbibliography

\end{document}

Doesn't end processing, the bibliography is never printed, instead:

Package biblatex Info: No input encoding detected.
(biblatex)             Assuming 'ascii'.
Package biblatex Info: Automatic encoding selection.
(biblatex)             Assuming data encoding 'ascii'.
\openout3 = `test.bcf'.

Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'test.bbl' found.
(./test.bbl)
Package biblatex Info: Reference section=0 on input line 19.
Package biblatex Info: Reference segment=0 on input line 19.


LaTeX Warning: Citation '*' on page 1 undefined on input line 21.

! Undefined control sequence.
<argument> \mkbibdateapalongextra 
                                  {year}{month}{day}\iffieldundef {endyear}{...
l.24 

is found in the log file. If I use citestyle, this error doesn't appear. style produces the same problem. This answer makes allusion that I need to define just one language in babel, but using language=american as recommended produce the same result.

  • See also problems using apa6e with biblatex-apa. Where in the answer did you find the allusion that one may only load one language? In the example it was important that one could not alias english to american-apa with \DeclareLanguageMapping{english}{american-apa}. I have now added a short paragraph about the general problem to the answer. But please let me know what I can do to avoid misunderstandings. – moewe Feb 29 '16 at 6:19
1

After having re-read again the manual, I saw in the "Use" section:

Specify the style in the usual way when loading BibLATEX. If you are using babel:

\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

I wasn't using the \DeclareLanguageMapping command that matched my babel preferences. Using

\usepackage[spanish]{babel}
\usepackage{csquotes}
\usepackage{url}

\usepackage[backend=biber,
sorting=none,
citestyle=numeric,
url=true,
backref=true,
bibstyle=apa
]
{biblatex}
\DeclareLanguageMapping{spanish}{spanish-apa}

Fixed the issue. Must make sure that babel's and DeclareLanguageMapping languages matches, and that <texmf>/tex/latex/biblatex/lbx/<language>-apa.lbx has the language present.

  • More recent versions of biblatex-apa apply \DeclareLanguageMapping automatically for all languages. So now the only bottleneck is whether or not biblatex-apa has a <language>-apa.lbx for your document language <language>. – moewe Feb 20 at 8:45
  • @moewe that's super. Do you have in hand the specific commit/version for this change? I tried reading the RELEASE file, but I remember still needing it in late '17 on Debian testing, which shouldn't happen. – Braiam Feb 21 at 15:19
  • biblatex-apa v7.5 (2017-11-05) and biblatex 3.8 (2017-11-04). – moewe Feb 21 at 15:20

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.