无法使用 Bib 文件

无法使用 Bib 文件

[所以我对 LaTex 还很陌生。我是自学的,所以如果觉得很难相处,我提前道歉。]

我正在尝试为一个班级写一篇论文,我想使用 bib 文件引用我的资料来源。我可以完成基本操作,但由于某种原因,我的 TeX 工作室无法编译我的文档。它似乎停在顶部附近,在“ \begin{document}”行,我不知道为什么。这是我有的:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[
    backend=bibtex,
    style=alphabetic,
    sorting=nyt,
]{biblatex}
\bibliography{wage.bib}
\title{title}
\author{name}
\date{date}


\begin{document}

\maketitle

... [内容]

\printbibliography[title=Works Cited]

\end{document}

我不断收到一条错误消息,提示“扫描 \field 的使用时文件已结束”,其中“开始文档”行以红色突出显示。这是我的 bib 文件:

@article{poverty,
author =       "John Addison and Mickinley Blackburn",
title =        "Minimum Wages and Poverty",
journal =      "Industrial Labor Relations Review",
volume =       "52",
number =       "3",
pages =        "891--921",
year =         "1999",
}

@article{realwage,
author =       "Orley Ashenfelter",
title =        "Comparing Real Wage Rates",
journal =      "American Economic Association",
volume =       "102",
number =       "2",
pages =        "891--921",
year =         "2012",
}

@article{hours,
author =       "Kenneth Couch and David Wittenburg",
title =        "The Resposne of Hours of Work to Increase in the Minimum Wage",
journal =      "Southern Economic Journal",
volume =       "68",
number =       "1",
pages =        "891--921",
year =         "2001",
}

@article{profits,
author =       "Mirko Draca and Stephen Machin and John Van Reenen",
title =        "Minimum Wages and Firm Profitability",
journal =      "American Economic Association",
volume =       "3",
number =       "1",
pages =        "891--921",
year =         "2011",
}

@article{ninefity,
author =       "Joseph Sabia and RIchard Burkenhauser",
title =        "Minimum Wages and Poverty: Will a 9.50 Federal Minimum IWage Really Help the Working Poor?",
journal =      "Southern Economic Journal",
volume =       "76",
number =       "3",
pages =        "891--921",
year =         "2010",
}

@article{politics,
author =       "Russell Sobel",
title =        "Theory and Evidence on the Political Economy of the Minimum Wage",
journal =      "Journal of Political Economy",
volume =       "107",
number =       "4",
pages =        "891--921",
year =         "1999",
}

不久前,我能够顺利编译此文档。这个问题始于我将一些来源(实际上是我的 bib 文件的最后两个来源)复制并粘贴到 bib 文件中。我发现他们用的是括号,而不是引文。但在更正之后,我的文档仍然无法打印。这非常令人沮丧。我尝试过 biber / bibtex 选项,但无济于事;我曾在某处读到我需要在选项 - 配置 TeX - 构建 - 默认编译器下更改编译顺序,但我不太明白这个选项是什么,它似乎也没有多大作用。

此外,当我有参考书目时,我注意到参考书目只会打印我在论文中引用的内容,而不是我的参考书目文件中实际列出的所有来源。这也令人沮丧。

总而言之,我只想打印/编译这份文件,其中所有资料都按字母顺序出现在 bib 文件中。论文的内容已经准备好了,只是编译时出现了问题。

任何帮助都将不胜感激。

答案1

默认情况下,仅包含引用的来源。如果您希望包含所有内容,请添加

\nocite{*}

某处。

您可能需要删除生成的文件才能解决错误。删除.bbl.blg.bcf/或.aux文件并尝试重新编译。您需要确保您的编辑器使用正确的后端,即如果您指定biber(或不指定),则需要使用biber;如果您指定bibtex,则需要使用bibtex

这是我的代码版本,其中包含所有源代码。

\begin{filecontents}{\jobname.bib}
@article{poverty,
author =       "John Addison and Mickinley Blackburn",
title =        "Minimum Wages and Poverty",
journal =      "Industrial Labor Relations Review",
volume =       "52",
number =       "3",
pages =        "891--921",
year =         "1999",
}

@article{realwage,
author =       "Orley Ashenfelter",
title =        "Comparing Real Wage Rates",
journal =      "American Economic Association",
volume =       "102",
number =       "2",
pages =        "891--921",
year =         "2012",
}

@article{hours,
author =       "Kenneth Couch and David Wittenburg",
title =        "The Resposne of Hours of Work to Increase in the Minimum Wage",
journal =      "Southern Economic Journal",
volume =       "68",
number =       "1",
pages =        "891--921",
year =         "2001",
}

@article{profits,
author =       "Mirko Draca and Stephen Machin and John Van Reenen",
title =        "Minimum Wages and Firm Profitability",
journal =      "American Economic Association",
volume =       "3",
number =       "1",
pages =        "891--921",
year =         "2011",
}

@article{ninefity,
author =       "Joseph Sabia and RIchard Burkenhauser",
title =        "Minimum Wages and Poverty: Will a 9.50 Federal Minimum IWage Really Help the Working Poor?",
journal =      "Southern Economic Journal",
volume =       "76",
number =       "3",
pages =        "891--921",
year =         "2010",
}

@article{politics,
author =       "Russell Sobel",
title =        "Theory and Evidence on the Political Economy of the Minimum Wage",
journal =      "Journal of Political Economy",
volume =       "107",
number =       "4",
pages =        "891--921",
year =         "1999",
}
\end{filecontents}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[
    backend=bibtex,
    style=alphabetic,
    sorting=nyt,
]{biblatex}
\bibliography{\jobname.bib}
\title{title}
\author{name}
\date{date}


\begin{document}

\maketitle

\nocite{*}

\printbibliography[title=Works Cited]

\end{document}

所有来源的输出

biber不过,建议使用bibtex而不是 ,因此我建议更改backend=bibtexbackend=biber

这会产生类似的结果:

Biber 作为后端

相关内容