0

I am unsuccessfully trying to implement biblatex in my project, so that I can cite other content. I get an error that looks loke this:

Undefined control sequence. <argument> \mkbibdateapalongextra 
                                  {year}{month}{day}\iffieldundef {endyear}{... l.15     \printbibliography[heading=bibempty]
                                              The control sequence at the end of the top line of your error message was never \def'ed. If
you have misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget
about whatever was undefined.

Can you help me to solve the problem? A minimum code example would look like this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage[style=apa,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
\addbibresource{bibliography.bib} % BibTeX bibliography file
\defbibheading{bibempty}{}

\begin{document}
    My text with a cite\cite{1_nielsen_2011}.

    \printbibliography[heading=bibempty]
\end{document}

And the bibliography.bib file has this content:

@misc{1_nielsen_2011,
author={Nielsen, Oskar Herrik},
title={Oldmoney.dk | Din genvej til gamle penge},
url={http://www.oldmoney.dk/},
urldate={2015-9-11},
journal={Oldmoney.dk},
year={2011}
}
engineer
  • 801
7heViking
  • 1,183
  • 2
    This is the classic biblatex-apa thing, you need \DeclareLanguageMapping{english}{english-apa} or the appropriate mappping for your language: \DeclareLanguageMapping{ngerman}{ngerman-apa} or \DeclareLanguageMapping{dutch}{dutch-apa}. Unfortunately, there is no Danish language file as of now. – moewe Sep 12 '15 at 09:17
  • 1
  • If you need Danish language support, you could start from one of the Norwegian language files (nynorsk-apa.lbx, norsk-apa.lbx, norwegian-apa.lbx) or just directly from english-apa.lbx. If you get a nice danish-apa.lbx done I suspect the biblatex-apa maintainer would really appreciate your sharing it with him (at github). – moewe Sep 12 '15 at 09:25
  • @moewe can't I use English even though the document is in danish? I just tried for testing if it worked, so I copied the English language mapping into the line just before \addbibresource{bibliography.bib} – 7heViking Sep 12 '15 at 09:36
  • If you document is Danish for TeX (i.e. you have babel loaded and Danish specified as your document language by \usepackage[danish]{babel}) that will not be enough. But if you don't load babel it can work. I would however recommend to load babel (or polyglossia on XeLaTeX/LuaLaTeX). – moewe Sep 12 '15 at 09:40
  • In your MWE above, \DeclareLanguageMapping{english}{english-apa} will work. But if you write a document in a language other than American English, you probably want to load babel with the appropriate language (\usepackage[dutch]{babel}) in which case you will need the appropriate language mapping for your document language (\DeclareLanguageMapping{dutch}{dutch-apa}). – moewe Sep 12 '15 at 09:44
  • Did you get anywhere? – moewe Sep 13 '15 at 06:20
  • @moewe Right now I am wondering if there is another ref. style, that is good for both websites and documents and which support Danish. I am not bound to the apa style and it would remove the problem. – 7heViking Sep 13 '15 at 06:28
  • Standard authoryear is also fine. And the standard biblatex styles even speak Danish. But if you can invest the time into helping to translate english-apa.lbx into Danish, that would help other people with the same problem. – moewe Sep 13 '15 at 06:31
  • @moewe that is true – 7heViking Sep 13 '15 at 06:37
  • Anyhow, would you mind if we were to close this question as a duplicate of Problem with APA + biber + biblatex? – moewe Sep 13 '15 at 06:38
  • @moewe not it is almost the same so you can mark it as a duplicate. – 7heViking Sep 13 '15 at 06:40
  • @moewe There is just one thing. When I exhange the apa style with authoryear, it compiles fine. However, it still produces this warning:

    Biber reported the following issues with '1_nielsen_2011': - Datamodel: Entry '1_nielsen_2011' (bibliography.bib): Invalid format '2015-9-11' of date field 'urldate' - ignoring.

    – 7heViking Sep 13 '15 at 06:49
  • Yup, that is because the date format is invalid, the correct format is YYYY-MM-DD so you need 2015-09-11, leading zeroes are necessary. I had noticed that earlier, but forgot to point it out, sorry. – moewe Sep 13 '15 at 06:50

0 Answers0