我无法使用 biblatex 生成参考书目。甚至最基本的示例都不起作用。
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{refs.bib}
@BOOK
{KandR,
AUTHOR = "Kernighan, Brian W. and Ritchie, Dennis M.",
TITLE = "{The C Programming Language Second Edition}",
PUBLISHER = "Prentice-Hall, Inc.",
YEAR = 1988
}
\end{filecontents*}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
Hello \cite{KandR}
\printbibliography
\end{document}
据我了解,我在文件(test1.tex)上运行以下命令:
pdflatex test1 (This gets some warnings, but ignore)
biber test1
pdflatex test1
biber 给出警告:
WARN - Warning: Found biblatex control file version 2.5, expected version 2.3
第二个 pdflatex 命令给出警告:
LaTeX Warning: Citation 'KandR' on page 1 undefined on input line 20.
LaTeX Warning: Empty bibliography on input line 21.
LaTex Warning: There were undefined references.
我已经尝试了几件事:
使用 bibtex 命令可以得到:
The top-level auxiliary file: test1.aux I found no \citation commands---while reading file test1.aux I found no \bibdata command---while reading file test1.aux I found no \bibstyle command---while reading file test1.aux
使用 [backend=biber] 不会改变任何东西
一些说明:
- Windows 8
- MikTex 2.9
特克斯沃克斯
-
答案1
我尝试使用后端来编写此代码biber
。对于编译,我使用xelatex
和UTF 格式对于所有文件:
\documentclass{article}
\usepackage{filecontents}
\usepackage[backref=true, %
hyperref=true, %
firstinits=true, %
indexing=true, %
url=false, %
style=alphabetic, % style=debug, alphabetic
backend=biber, %
doi=false,
texencoding=utf8,
bibencoding=utf8]{biblatex}
\usepackage{hyperref}
\hypersetup{pdfauthor={Your name},
pdftitle={Your article},
pdfsubject={My study notes},
pdfkeywords={linear algebra, math, physics, electronics},
pdfpagelayout={TwoPageLeft}, % Displays two pages, odd-numbered pages to the left
pdfcreator={Xelatex}
bookmarks={true}, % A set of Acrobat bookmarks are written
colorlinks={true}, % Colors the text of links and anchors.
anchorcolor={black}, % Color for anchor text.
filecolor={cyan}, % Color for URLs which open local files.
menucolor={red}, % Color for Acrobat menu items.
runcolor={blue} % Color for run links (launch annotations).
}
\addbibresource{refs.bib}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
Hello \cite{KandR}
\printbibliography
\end{document}
请检查文件扩展名是否为桶存在且大小不为零。如果此文件大小为零或不存在,请尝试手动创建它。使用命令行并输入以下内容:
biber yourexample.bcf