0

I'm new to Harvard style. I've been trying to create a new LaTeX document for an article I'm writing. Unfortunately, I always get errors when compiling the file. The citations are not displayed, and the reference section doesn't show. At first, I thought I was doing something wrong when linking an external .bib file. Still, the error persists even when the reference is inside the document. Here's the MWE:

\documentclass[12pt,spanish,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{csquotes}
\usepackage{lipsum}

\begin{filecontents}{refs.bib} @inproceedings{Nielsen1994, author = {Nielsen, Jakob}, booktitle = {Conference on Human Factors in Computing Systems - Proceedings}, doi = {10.1145/259963.260531}, pages = {413--414}, title = {{Usability Inspection Methods}}, volume = {1994-April}, year = {1994} } \end{filecontents}

\usepackage[style=authoryear-ibid,backend=biber]{biblatex} \addbibresource{refs.bib}

\begin{document} \title{Article Title} \author{Name Surname} \maketitle

\lipsum[1] \parencite{Nielsen1994}, \textcite{Nielsen1994}, and \cite{Nielsen1994}.

\printbibliography

\end{document}

The error I get is the following:

INFO - This is Biber 2.16
INFO - Logfile is 'harvard.blg'
INFO - Reading 'harvard.bcf'
INFO - Found 1 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'refs.bib' for section 0
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'refs.bib'
ERROR - BibTeX subsystem: /var/folders/sb/q38wrlkd7jl7mz_c99ktflmw0000gn/T/biber_tmp_tDMZ/8fe4c9854184545302f21ebf0d47516c_82448.utf8, line 11, syntax error: at end of input, expected end of entry ("}" or ")") (skipping to next "@")
INFO - ERRORS: 1
Alan Munn
  • 218,180
killthepixelnow
  • 454
  • 5
  • 14
  • 1
    A little off-topic: You don't need to load spanish twice. In the documentclass or babel is enough. – lukeflo Jul 21 '23 at 17:04
  • 1
    your document compiles fine for me. Which error do you get? – Ulrike Fischer Jul 21 '23 at 17:15
  • I just added the detail if the error on my post. Besides that, the references are not displayed in the document and no list of references appear. – killthepixelnow Jul 21 '23 at 17:24
  • I do not get this error (or indeed any other error) from your code example. Note that filecontents will not overwrite an existing file, so in case you already had a refs.bib in your document folder from earlier tests or you change the file contents afterwards you might not actually run the MWE you think you are running. So try again in a new, empty folder. – moewe Jul 21 '23 at 17:58
  • It's frustrating, I tried on a new folder and nothing. I even get the same error when linking an external .bib file. – killthepixelnow Jul 21 '23 at 18:01
  • 2
    What happens if you cite sigfridsson from biblatex-examples.bib (the file is installed on all systems with biblatex and will be found automatically: you don't have to create or download it)? Can you try deleting the Biber cache (https://tex.stackexchange.com/q/140814/35864). Biber 2.16 is slightly outdated, but not too much. Still, maybe you can update? – moewe Jul 21 '23 at 18:30
  • Blimey! Deleting Biber cache worked like a charm. I downloaded the last version of Biber from SoundForge, but I don't have any idea how to install it. I'm using a Mac, just in case. – killthepixelnow Jul 21 '23 at 18:42
  • 2
    Aha! Please don't update Biber by manually downloading binaries from SourceForge or elsewhere. Instead update your whole TeX system (via the usual ways) https://tex.stackexchange.com/q/55437/35864. That way your TeX distribution takes care of downloading everything for you and you don't have to worry about package mismatches. (Do note though that TeX Live and MacTeX have yearly versions that cannot be updated once the successor version is released, so you may have to install the current system for an update: https://tex.stackexchange.com/q/107017/35864) – moewe Jul 21 '23 at 18:44

0 Answers0