我的书目无法工作 - “空书目!

我的书目无法工作 - “空书目!

这个问题已经困扰了我好几个小时了。我使用的是 MiKTeX 2.9,编辑器是 Texmaker。我一直想把一个.bib文件用作外部参考书目,我已经把它输入到文本文档中了。我看过的每一本指南都说我需要“运行” bibtex,它们说的好像bibtex是一个程序,但我无论如何也找不到bibtex互联网上任何地方的软件。

以下是我的主要文件的重要部分:

\documentclass[11pt,a4paper]{article}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage{amsmath}
\usepackage[
backend=bibtex,
style=alphabetic,
sorting=ynt
]{biblatex}
\usepackage{float}

\bibliography{biblio}
\addbibresource{biblio.bib}

\begin{document}

Document text here.

\printbibliography


\end{document}

以下是我的参考书目:http://www.filedropper.com/biblio

它给了我一些警告。

1: 'babel/polyglossia' detected but 'csquotes' missing. 
1: 'Data encoding is 'utf8'
131: 'Citation 'EPS' on page 6 undefined (defined in the .bib file
134: 'Empty bibliography' This is the big one. Bibliography clearly not empty!
1: 'There were undefined references'
1: 'Please (re)run BibTeX on one file(s): (biblatex)diss (biblatex) and rerun latex afterwards'

我不明白我怎么能“跑” ?语言biblatex不是吗?biblatex

我究竟做错了什么?

答案1

您没有引用任何文献,这就是出现“书目为空”消息的原因。我添加了一个\cite命令。请参阅 mwe 中的注释\nocite{*}。您可以使用它来测试 bib 文件(它显示书目中的所有 bib 条目)。

为了消除您提到的其他错误/警告,我稍微改变了您的代码(参见标记<===========)。

复制以下 MWE,命名mwe.tex并首先用 编译它。然后您将获得下一步所需的pdflatex mwe.tex文件。现在使用BiBTeX 创建参考书目,之后 重复两次。mwe.auxbibtex mwepdflatex mwe.tex

因为您使用编码 utf-8,所以最好使用biber而不是bibtex。然后将行更改backend=bibtexbackend=biber并使用biber mwebibtex mwe创建参考书目。

MWE(包filecontents仅用于在一个mwe中包含bib文件和tex代码):

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Book{CS,
  Title                    = {Chemistry in Space. From Interstellar Matter to Organic Life},
  Author                   = {Dieter Rehder},
  Publisher                = {John Wiley and Sons},
  Year                     = {2010},
  ISBN                     = {9783527326891},
  Keywords                 = {physics}
}

@Article{EPS,
  Title                    = {Energy Production in Stars},
  Author                   = {Hans Albrecht Bethe},
  Journal                  = {Physical Review},
  Year                     = {1939},
  Number                   = {5},
  Pages                    = {434--456},
  Volume                   = {55},
  DOI                      = {http://journals.aps.org/pr/abstract/10.1103/PhysRev.55.434},
  Keywords                 = {physics}
}

@Book{FP,
  Title                    = {Fusion Physics},
  Author                   = {Mitsuru Kikuchi and Karl Lackner and Minh Quang Tran},
  Publisher                = {International Atomic Energy Agency},
  Year                     = {2012},
  Series                   = {International Atomic Energy Agency},
  ISBN                     = {9789201304100},
  Keywords                 = {physics}
}

@Book{INP,
  Title                    = {Introductory Nuclear Physics},
  Author                   = {Kenneth S. Krane},
  Publisher                = {John Wiley and Sons},
  Year                     = {1987},
  ISBN                     = {9780471805533},
  Keywords                 = {physics}
}

@Book{PIF,
  Title                    = {The Physics of Inertial Fusion},
  Author                   = {Stefano Atzeni},
  Publisher                = {Oxford University Press},
  Year                     = {2009},
  Series                   = {International Series of Monographs on Physics},
  ISBN                     = {9780199568017},
  Keywords                 = {physics}
}

@Article{SES,
  Title                    = {Synthesis of the Elements in Stars},
  Author                   = {K. MARGARET BURBIDGE and G. R. BURBIDGE and WILLIAM A. FOWLER and F. HOYLE},
  Journal                  = {Reviews of Modern Physics},
  Year                     = {1957},
  Number                   = {4},
  Pages                    = {547--650},
  Volume                   = {29},
  DOI                      = {http://journals.aps.org/rmp/abstract/10.1103/RevModPhys.29.547},
  Keywords                 = {physics}
}

@Article{SEWMS,
  Title                    = {Stellar Evolution Within and off the Main Sequence},
  Author                   = {Icko Iben},
  Journal                  = {Annual Review of Astronomy and Astrophysics},
  Year                     = {1966},
  Pages                    = {571--626},
  Volume                   = {5},
  DOI                      = {http://adsabs.harvard.edu/full/1967ARA%26A...5..571I},
  Keywords                 = {physics}
}
\end{filecontents*}


\documentclass[11pt,a4paper]{article}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage{amsmath}
\usepackage{csquotes} % <==================================
\usepackage[%
  backend=bibtex, % biber bibtex % <=======================
  style=alphabetic,
  sorting=ynt,
]{biblatex}
\usepackage{float}

%\bibliography{biblio} % <===============not needed =======
\addbibresource{\jobname.bib}


\begin{document}
Document text here. \cite{CS} % <==========================
%\nocite{*} %                   <==========================
\printbibliography
\end{document}

结果:

在此处输入图片描述

顺便说一句:biblatex这是一个使书目布局变得更容易的软件包。它与 Biber 配合得很好,知道使用 utf-8 编码。今天你应该biblatex与 Biber 一起使用。

附言:我删除了你的代码@preamble,因为这里似乎不需要它。它是从哪里来的?你确定你真的需要它吗?

相关内容