無法使用書目文件

無法使用書目文件

[所以我是 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 的使用時結束”,其中“開始文件”行以紅色突出顯示。這是我的圍脖文件:

@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 作為後端

相關內容