如何同时使用 biblatex 和 XeLaTeX?

如何同时使用 biblatex 和 XeLaTeX?

我尝试寻找类似的问题,但找不到。我希望任何有经验的人都能让我更深入地了解 我应该如何将 biblatex 与 XeLaTeX 结合使用?我认为 biblatex 完全支持 UTF-8......

我使用以下代码(不是真正的 MWE,因为您没有参考书目)

     \documentclass{article}
\usepackage{fontspec,xltxtra}
\usepackage{polyglossia}
    \setmainlanguage{english}
    \usepackage{csquotes}
    \usepackage[bibstyle=numeric, citestyle=numeric-comp, sorting=none]{biblatex}
    \bibliography{cluster}
    \begin{document}
    sometext sometextsometextsom
    test \citep{Wu2004}
    \printbibliography
    \end{document}

我收到以下错误:Package csquotes Warning: Using preliminary 'polyglossia' interface. (csquotes) Some of the multilingual features may not (csquotes) work as expected.

因此,我的引用仍然未定义:

Latex warning Citation 'Wu2004' on page 1 undefined on input line 15

根据评论,我对脚本做了以下修改,以利用支持 UTF8 的 biber。但是它无法完全正常工作:

\documentclass{article}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage{csquotes}
\usepackage[bibstyle=numeric, citestyle=numeric-comp, sorting=none,backend=biber]{biblatex}%this style compresses the numbering 
\bibliography{cluster}

\begin{document}
sometext sometextsometextsom
test \cite{Wu2004}
\printbibliography
\end{document}

在 Texnic 中心(我的编辑)我做了以下改编:

  • 更改为使用 biber 而不是 bibtex:路径:C:\additional Tex packages\biber\biber.exe并且我将以下参数传递给它:(%pm主文件的完整路径)

出现以下错误,似乎没有创建 bbl 文件..我做错了什么?

Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'testA.bbl' not found.

No file testA.bbl.
Package biblatex Info: Reference section=0 on input line 11.
Package biblatex Info: Reference segment=0 on input line 11.

LaTeX Warning: Citation 'Wu2004' on page 1 undefined on input line 13.


LaTeX Warning: Empty bibliography on input line 14.

[1] (H:\xetex_testing\testA.aux)

LaTeX Warning: There were undefined references.

答案1

感谢大家的帮助,我找到了解决方案,问题是,我把完整的 tex 文件名传递给了 biber,而不是没有扩展名的文件名(biber 需要运行 latex 后创建的 *.bcf 文件,而不是 *.tex 文件)

解决方案:

首先,确保你的硬盘上有 biber.exe。使用以下前言加载 biblatex 包\usepackage[backend=biber]{biblatex}

此后,将您的 latex 编辑器设置为使用 biber.exe 进行处理,在 TexnicCenter 中,其工作方式如下(但可以在 biber.pdf 文档中找到其他编辑器(如 emacs)的示例)

从顶部菜单:Build/Define Output Profiles/

bibtex 可执行文件的路径: <fill in location of biber.exe>

传递给 Bibtex 的命令行参数:( "%bm"与主文件的完整路径相同,没有扩展名)

再次感谢所有帮助

相关内容