如何解决 AucTeX 中 biblatex 的未定义控制序列错误

如何解决 AucTeX 中 biblatex 的未定义控制序列错误

在论坛上读到许多关于 biblatex 的好东西后,我想开始使用它。我尝试了要切换到 biblatex 该怎么做?在一个我已经使用 BibTeX 的文件上,但收到了未定义的控制序列错误\addbibresource

我建立了一个示例文档,从以下文件中复制http://www.ctan.org/tex-archive/macros/latex/contrib/biblatex//doc/examples,(01-introduction.texbiblatex-examples.bib)并得到同样的错误。

我正在使用 AucTeX 11.866 和 TeXLive 2009。下面是我正在尝试编译的文档以及它输出的错误。我正在使用默认引擎并生成 PDF(或尝试生成)。我应该怎么做才能让它工作?

\documentclass[10pt]{article}
\usepackage[T1]{fontenc}

\usepackage[american]{babel}

\usepackage{csquotes}

\usepackage[style=authoryear]{biblatex}

% biblatex-examples.bib is located in ~/Library/texmf/bibtex/bib/
\addbibresource{biblatex-examples.bib}

\begin{document}

\section*{Name of first section here}

This is just filler text \parencite{companion}.

This is just filler text \parencite[59]{companion}.

This is just filler text \parencite[see][]{companion}.

This is just filler text \parencite[see][59--63]{companion}.

\printbibliography

\end{document}

错误如下:

ERROR: Undefined control sequence.

--- TeX said ---
l.11 \addbibresource
                    {biblatex-examples.bib}
--- HELP ---
TeX encountered an unknown command name. You probably misspelled the
name. If this message occurs when a LaTeX command is being processed,
the command is probably in the wrong place---for example, the error
can be produced by an \item command that's not inside a list-making
environment. The error can also be caused by a missing \documentclass
command.

答案1

AUCTeX 与此无关。问题是,它\addbibresource已从 1.2 版添加到 biblatex,而 TeX Live 2009 中没有。

最好的方法是从以下网址下载 MacTeX 2010 进行升级http://tug.org/mactex并运行 TeX Live Manager 来获取最新的发行版(我假设你使用的是 Mac OS X

% biblatex-examples.bib is located in ~/Library/texmf/bibtex/bib/

线)。

相关内容