APA + biber + biblatex 的问题

APA + biber + biblatex 的问题

我无法让基本的 APA 书目正常工作。同样的事情也适用于 nejm 样式,但将样式更改为 apa 时会出现错误:

! 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.

我使用的是 texlive 2012,如您所见,我使用的是 biber,是的,我重新运行了 biber,还尝试删除 .bbl 文件并重新运行工具。我的源标记是:

\documentclass[12pt]{article}

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

\addbibresource{BibResource.bib}

\begin{document}

test\parencite{ormrod2004human}

\clearpage

\printbibliography

\end{document}

答案1

您需要\DeclareLanguageMapping提供所需的宏。请注意,这还biblatex需要您加载包。有关更多信息,请参阅手册第 231 页。babelbiblatex

\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}

输出

相关内容