biblatex,错误:\addbibresource{sample.bib} 是未定义的控制序列

biblatex,错误:\addbibresource{sample.bib} 是未定义的控制序列

编辑:

我喜欢学习如何使用biblatex。为此,我安装了biblatex编辑器(winedt)并将其调整biber为后端。为了进行测试,我使用了来自的最小示例gist.github.com/moewew按照建议莫威

\documentclass{article}
\usepackage[style=authoryear, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}

我立即收到错误:

undefined control sequence
<recently read> \addbibresource

l.54     \addbibresource{sample.bib} 

我尝试使用 pdfLaTeX 以及 pdfLaTeXify。在两种情况下我都遇到了相同的错误。我使用最新的 64 位 MikTeX 和最新的 WinEdt 编辑器。

使用˙latex i obtain the followingblg`文件编译后:

[0] Config.pm:304> INFO - This is Biber 2.12
[0] Config.pm:307> INFO - Logfile is 'biblatex_test-1.blg'
[44] biber-MSWIN64:315> INFO - === 
[66] Utils.pm:209> ERROR - biblatex_test-1.bcf is malformed, last biblatex run probably failed. Deleted biblatex_test-1.bbl
[66] Biber.pm:114> INFO - ERRORS: 1

.log 文件很长,但我认为相关部分是:

(C:/localtexmf\tex\latex\biblatex\latex\biblatex.def
File: biblatex.def 2009/07/04 v0.8e biblatex generic definitions
\c@smartand=\count143
)
Package biblatex Info: Trying to load bibliography style 'authoryear'...
Package biblatex Info: ... file 'authoryear.bbx' found.

(C:/localtexmf\tex\latex\biblatex\latex\bbx\authoryear.bbx
File: authoryear.bbx 2009/07/04 v0.8e biblatex bibliography style
Package biblatex Info: Trying to load bibliography style 'standard'...
Package biblatex Info: ... file 'standard.bbx' found.

(C:/localtexmf\tex\latex\biblatex\latex\bbx\standard.bbx
File: standard.bbx 2009/07/04 v0.8e biblatex bibliography style
))
Package biblatex Info: Trying to load citation style 'authoryear'...
Package biblatex Info: ... file 'authoryear.cbx' found.

(C:/localtexmf\tex\latex\biblatex\latex\cbx\authoryear.cbx
File: authoryear.cbx 2009/07/04 v0.8e biblatex citation style
Package biblatex Info: Redefining '\cite'.
Package biblatex Info: Redefining '\parencite'.
Package biblatex Info: Redefining '\footcite'.
Package biblatex Info: Redefining '\textcite'.
)
Package biblatex Info: Trying to load configuration file...
Package biblatex Info: ... file 'biblatex.cfg' found.

(C:/localtexmf\tex\latex\biblatex\latex\biblatex.cfg
File: biblatex.cfg 
))
! Undefined control sequence.
<recently read> \addbibresource 

l.3 \addbibresource
                   {biblatex-examples.bib}
? 

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

答案1

.log文件显示biblarex您的目录中有 2009 年 7 月(九年多以前)的古老版本 v0.8e C:/localtexmf

顺便说一句,这是我建立旧版本档案时能找到来源的最旧版本biblatex,该版本的文档警告

请注意,此软件包处于测试阶段并已发布以供测试。一旦被认为适合普遍分发,版本号将升级为 1.0。

我假设那C:/localtexmf是您用于实验和本地软件包安装的本地texmf树。该目录通常优先于通过 TeX 发行版安装的软件包版本。我建议您删除biblatex该文件夹中的手动安装。您可能还想在那里查看其他旧版本的 TeX 软件包。也许您可以将它们卖给收藏家——但至少您可以确保您不会将系统限制在积极开发的 TeX 软件包的旧版本上。


仅出于完整性考虑:根据扩展的更新日志(在 PDF 版本中注释掉) ,在 1.2 版(2011 年 2 月发布)中\addbibresource作为替代品引入,因此在您的版本发布一年半之后。\bibliographybiblatexbiblatex.tex

相关内容