使用 documentclass elsarticle 加载 APA6 引用样式时出错

使用 documentclass elsarticle 加载 APA6 引用样式时出错

我正在撰写一篇将在 Elsevier 期刊上发表的文章,该文章需要 apa6 引用样式和格式。在我的文件中,我仅使用以下命令执行此操作:

\documentclass[final,3p,times,twocolumn]{elsarticle} 
\usepackage[style=apa6]{biblatex}

即使文档上的结果符合预期,但我在编译时收到以下错误:

l.155 \blx@packageincompatibility
                                 
The 'natbib' package and biblatex are incompatible.

我很难理解问题的根源。我尝试使用其他软件包(如 apacite),但到现在为止都不起作用。

之前有其他人遇到过这个问题吗?

提前谢谢您!

答案1

该类elsarticle实际上与并不兼容biblatex

该课程提供了nonatbib选项,但在这方面并不完整,natbib即使发出了选项,也会使用东西。

修复:

% we need to provide something to fool the setting of \bibsep
\newdimen\bibsep
%%%

\documentclass[final,3p,times,twocolumn,nonatbib]{elsarticle}

% biblatex wants to do \newcounter{author} and \newcommand{\bibfont}
\expandafter\let\csname c@author\endcsname\relax
\let\bibfont\relax
%%%

\usepackage[style=apa6]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}

\cite{angenendt}

\cite{cotton}

\printbibliography

\end{document}

在此处输入图片描述

答案2

以下解决方案利用了apacite引文管理包和相关书目样式实现 APA 书目格式指南第 6 版并使用 BibTeX 来实现这一事实。请注意,必须运行\newlength\bibsep \documentclass并采用nonatbib选择权。

在此处输入图片描述

\newlength\bibsep % minor kludge
\documentclass[final,3p,times,twocolumn,nonatbib]{elsarticle} 

\begin{filecontents}[overwrite]{mybib.bib}
@misc{ao:3001,
  author = {Alpha and Omega},
  title  = {Thoughts},
  year   = 3001,
}
\end{filecontents}

\usepackage{apacite}
\bibliographystyle{apacite}

\begin{document}
\cite{ao:3001}
\bibliography{mybib}
\end{document}

相关内容