4

I'm having trouble getting basic APA bibliographies to work. The same thing works with nejm style, but changing the style to apa gives errors:

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

Package biblatex Warning: Macro 'name:apa:last-first' undefined.
(biblatex)                Using \newbibmacro.

Package biblatex Warning: Macro 'name:apa:first-last' undefined.
(biblatex)                Using \newbibmacro.

I'm using texlive 2012, as you can see I'm using biber, yes, I reran biber, and also tried delting the .bbl file and rerunning tools. My source markup is:

\documentclass[12pt]{article}

\usepackage[hidelinks]{hyperref}
\usepackage[backend=biber,style=apa]{biblatex}

\addbibresource{BibResource.bib}

\begin{document}

test\parencite{ormrod2004human}

\clearpage

\printbibliography

\end{document}
5

You need to \DeclareLanguageMapping to provide the macros that biblatex is expecting. Note that this requires you to load the babel package as well. See page 231 of the biblatex manual for more information.

\begin{filecontents}{refs.bib}
@Article{rogers:elements,
  author =   {John T. McArthur and A. U. Thor and Steve Rogers},
  title =    {Elements of {A}merica},
  journaltitle = {The Patriot},
  date =     {2013-09-01}}

@Manual{texbook,
  author =  {Donald Ervin Knuth},
  title =   {The \TeX Book},
  address = {Reading},
  year =    {1986}}

@Book{compandtype,
  author =  {Donald Ervin Knuth},
  title =   {Computers \& Typesetting},
  publisher =   {Addison-Wesley},
  address = {Reading},
  year =    {1986},
  descriptor =  {Typesetting},
  annote =  {Computer modern typefaces}}
\end{filecontents}
\documentclass[biblatex,man]{apa6}

\usepackage[american]{babel}
\DeclareLanguageMapping{american}{american-apa}

\bibliography{refs}

\title{Some Super Psychological Title}
\shorttitle{Psychology Title}
\author{Diligent Student}
\affiliation{\TeX{} StackExchange}

\abstract{This is an abstract!  Woohoo!}
\keywords{example, APA, \LaTeX, education}

\begin{document}
\maketitle

\section{Captain America}
A fake citation \parencite{rogers:elements}.
Some filler text. Typography is cool. How cool?
\emph{Very} cool; see \cite{compandtype}.

\section{Another!}
This document was written with \TeX! See also \cite{texbook}.

\printbibliography
\end{document}

output

  • Captain America references courtesy of an ongoing project I'm doing in vain for my school. – Sean Allred Oct 5 '13 at 18:25
  • This fixes the "Undefined control sequence" error. The two warnings I mentioned persist, but I can ignore those for now. Thanks! – clay Oct 5 '13 at 20:50

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.