![使用 biber 时在 BibLatex 中出现 \printbibliography 错误](https://linux22.com/image/443256/%E4%BD%BF%E7%94%A8%20biber%20%E6%97%B6%E5%9C%A8%20Bi%E2%80%8B%E2%80%8BbLatex%20%E4%B8%AD%E5%87%BA%E7%8E%B0%20%5Cprintbibliography%20%E9%94%99%E8%AF%AF%20.png)
我是 Latex 的新手,我必须为学校写一篇论文,其中必须引用不同的来源。我尝试阅读如何制作参考书目,并得出结论,我应该使用BibLatex
作为biber
后端,因为它更新,更灵活。
但是当我尝试使用BibLatex
时biber
没有得到参考书目,\printbibliography
并且我得到了 3 个错误
This is BibTeX, Version 0.99d (MiKTeX 21.6)
The top-level auxiliary file: diho.aux
I found no \citation commands---while reading file diho.aux
I found no \bibdata command---while reading file diho.aux
I found no \bibstyle command---while reading file diho.aux
(There were 3 error messages)
Process exited with error(s)
这很奇怪,因为我没有使用bibtex
作为后端。然后我尝试使用bibtex
作为后端,它按预期工作。
这是我使用时的代码biber
\documentclass[a4paper,12pt]{article}
\usepackage{datetime}
\usepackage[danish]{babel}
\usepackage{blindtext}
\usepackage[backend=biber,style=numeric]{biblatex}
\addbibresource{uni.bib}
\begin{document}
\title{Efterkrigstid og Albert Camus}
\author{Rasmus Enevoldsen}
\maketitle
\section{Introdution}
\parencite{Camus42}
\blindtext
\parencite{Seeberg62}
\printbibliography
\end{document}
还有我的 .bib 文件
@articel{Camus42,
author = "Albert Camus",
title = "Le Mythe de Sisyphe. (Fransk) [Sisyfos-myten]",
year = "1942"
}
@incollection{Seeberg62,
author = "Seeberg, Peter",
title = "Hjulet",
booktitle = "eftersøgningen og andre noveller",
isbn = "9788702234862",
year = "1962"
}
答案1
这是您的代码,经过了一些小的改进。
- 使用
@article
而不是@articel
- 使用带有花括号的现代语法。
\documentclass[a4paper,12pt]{article}
\begin{filecontents*}[overwrite]{uni.bib}
@article{Camus42,
author = {Albert Camus},
title = {Le Mythe de Sisyphe. (Fransk) [Sisyfos-myten]},
year = {1942}
}
@incollection{Seeberg62,
author = {Seeberg, Peter},
title = {Hjulet},
booktitle = {eftersøgningen og andre noveller},
isbn = {9788702234862},
year = {1962}
}
\end{filecontents*}
\usepackage{blindtext}
\usepackage[backend=biber,style=numeric]{biblatex}
\addbibresource{uni.bib}
\title{Efterkrigstid og Albert Camus}
\author{Rasmus Enevoldsen}
\begin{document}
\maketitle
\section{Introdution}
\parencite{Camus42}
\blindtext
\parencite{Seeberg62}
\printbibliography
\end{document}
按以下顺序进行编译。
pdflatex filename.tex
biber filename # note that I have avoided .tex extension
pdflatex filename.tex
pdflatex filename.tex