3

I am using biblatex with apa style. More or less everything works fine. However, LaTeX produces the following warnings

Package biblatex Warning: Bibliography string 'retrieved' undefined (biblatex) at entry 'eraut2012' on input line 90.

Package biblatex Warning: Bibliography string 'from' undefined (biblatex) at entry 'eraut2012' on input line 90.

Moreover, BibLaTeX prints the "retrieved from" string in small letters and bold type face:

enter image description here

My question therefore is:

How do I fix this problem? Instead of "retrieved from" I need "Retrieved from" to occur in the bibliography.

I already found those discussions: [1] and [2]. However, they did not help.

Ps.: Using \DeclareLanguageMapping{american}{american-apa} produced the same problem. The \DefineBibliographyExtras{english}{... is necessary because otherwise I do not get a publication year in brackets after the author in the bibliography.

PPs.: I know that this reference would not need a URL in an APA-style bibliography. However, it was the first in my list that had one...

MWE:

\documentclass[a4paper]{scrbook}
\usepackage[utf8]{inputenc} 
\usepackage[english]{babel} 
\usepackage{csquotes} 

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

\DeclareLanguageMapping{british}{british-apa}

\AtEveryBibitem{%
  \clearfield{day}%
  \clearfield{month}%
  \clearfield{endday}%
  \clearfield{endmonth}%
}

\DefineBibliographyExtras{english}{%
  \protected\def\mkbibdateapalong#1#2#3{%
    \iffieldundef{#1}%
      {}%
      {\thefield{#1}}%
    \iffieldundef{#2}%
      {}%
      {\iffieldundef{#1}%
        {}%
        {\addcomma\addspace}%
       \mkbibmonth{\thefield{#2}}}%
    \iffieldundef{#3}%
      {}%
      {\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#1}}%
        {}%
        {\addspace}%
       \stripzeros{\thefield{#3}}}}%
  \protected\def\mkbibdateapalongextra#1#2#3{%
    \iffieldundef{#1}%
      {}%
      {\thefield{#1}\printfield{extrayear}}%
    \iffieldundef{#2}%
      {}%
      {\iffieldundef{#1}%
        {}%
        {\addcomma\addspace}%
       \mkbibmonth{\thefield{#2}}}%
    \iffieldundef{#3}%
      {}%
      {\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#1}}%
        {}%
        {\addspace}%
       \stripzeros{\thefield{#3}}}}%
  \protected\def\mkbibdateapalongdmy#1#2#3{%
    \iffieldundef{#3}%
      {}%
      {\stripzeros{\thefield{#3}}}%
    \iffieldundef{#2}%
      {}%
      {\iffieldundef{#3}%
        {}%
        {\addspace}%
       \mkbibmonth{\thefield{#2}}}%
    \iffieldundef{#1}%
      {}%
      {\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#3}}%
        {}%
        {\addspace}%
       \thefield{#1}}}}

\begin{filecontents}{apa-test-bib.bib}

@incollection{eraut2012,
    location = {Dordrecht},
    title = {Developing a broader approach to professional learning},
    isbn = {978-94-007-1723-7 978-94-007-1724-4},
    url = {http://www.springerlink.com/index/10.1007/978-94-007-1724-4_2},
    pages = {21--45},
    booktitle = {Learning trajectories, innovation and identity for professional development},
    publisher = {Springer Netherlands},
    author = {Eraut, Michael},
    editor = {Mc Kee, Anne and Eraut, Michael},
    date = {2012},
    langid = {english}
}

\end{filecontents}

\addbibresource{apa-test-bib.bib}

\begin{document}

This is some text. \cite{eraut2012}
\printbibliography

\end{document}
  • 1
    If you are loading english in babel you need \DeclareLanguageMapping{english}{english-apa}; if you want to use \DeclareLanguageMapping{british}{british-apa} load \usepackage[british]{babel}. The languages have to match exactly. You will find that if you follow either of those suggestions, your \DefineBibliographyExtras{english} block mentioned in the PS will be superfluous. – moewe Jul 15 '16 at 14:03
  • That works perfectly. Would you like to post this as an answer? I am happy to accept it. Many thanks. – phx Jul 15 '16 at 14:20
4

The languages you request for babel and the language mappings need to match.

Either use

\usepackage[british]{babel} 
...
\DeclareLanguageMapping{british}{british-apa}

for British English, or use

\usepackage[english]{babel} 
...
\DeclareLanguageMapping{english}{english-apa}

for American English (without US punctuation).

In your MWE your document is in english, and you told biblatex to request british-apa instead of british, effectively changing nothing for you since you didn't request british in the first place.

Another symptom of this was that you needed the \DefineBibliographyExtras{english} block for the dates. With matching languages that is no longer necessary.

  • This also fixed ! Undefined control sequence. \blx@unitpunct ->\urldatecomma for me, caused by american-apa. – phg Apr 12 '18 at 8:52
  • @phg With recent versions of biblatex and biblatex-apa the \DeclareLanguageMapping should not be needed any more. – moewe Apr 12 '18 at 11:18
  • Good to know. biblatex 3.6 and biblatex-apa 7.2 seem not to be recent enough, though. I should upgrade from TeXLive 2016 some time... – phg Apr 12 '18 at 12:20
  • @phg You'll need at least biblatex 3.8 and biblatex-apa 7.5 from November 2017. The current versions are 3.11 and 7.7 – moewe Apr 12 '18 at 12:23

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.