[Tex/LaTex] Can’t Use Bib File

biblatexbibliographiesbibtexcompilingerrors

[So I am new to LaTex. I am self taught, so I apologize ahead of time if I am difficult to work with.]

I am trying to write a paper for a class, and I'd like to cite my sources using a bib file. I am able to do the basics, but for some reason my TeX studio will not compile my document. It appears to stop near the top, at the " \begin{document}" line, and I cannot figure out why. Here is what I have:

\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

… [content]

\printbibliography[title=Works Cited]

\end{document}

I keep getting an error that says "! File ended while scanning use of \field", with the "begin document" line highlighted in red. Here is my bib file:

@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",
}

It was not too long ago when I was able to compile this document just fine. This trouble started when I copy and pasted some sources (in fact, the last two sources of my bib file) into the bib file. I discovered that they had the braces on, instead of the quotations. But after correcting this my document still won't print. This is very frustrating. I've plaid around with the biber / bibtex option, to no avail ; I have read somewhere that I need to change the compiling order under Options – Configure TeX – Build – Default Compiler, but I do not quite understand what this option is, nor does it appear to be doing much.

In addition, when I had a bibliography, I noticed that the bibliography would only print the things I cited within the paper, instead of all of the sources actually listed in my bib file. This was also frustrating.

To summarize, I just want to print/compile this document, with all of the sources in my bib file appearing, in alphabetical order. The contents of the paper is already prepared, it is just the compiling that I am having issue with.

Any and all help would be appreciated.

Best Answer

By default, only cited sources are included. If you wish to include everything add

\nocite{*}

somewhere.

You may need to remove generated files to get past the error. Delete the .bbl, .blg, .bcf and/or .aux file and try recompiling. You do need to ensure that your editor uses the correct backend i.e. if you specify biber (or nothing), it needs to use biber; if you specify bibtex, it needs to use bibtex.

Here's my version of your code, with all sources included.

\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}

output with all sources

biber is recommended over bibtex, though, so I'd suggest changing backend=bibtex to backend=biber.

This produces a similar result:

Biber as backend

Related Question