I’m writing my Master Thesis using LaTeX (specifically VS Code with the LaTeX Workshop extension and a latexmk recipe) on macOS. I’m using biblatex with biber as the backend for my bibliography management, and my .bib file is managed with JabRef. Details:
JabRef 5.15--2024-07-10--1eb3493
Mac OS X 14.5 aarch64
My compilation fails specifically when it reaches the \printbibliography command in my main .tex file. I don’t get errors if I comment out \printbibliography. Citations is correct in the PDF when it’s commented out
The Errors:
I receive several related errors pointing to the line with \printbibliography. The key recurring ones look like this (from the .log file):
Missing \endcsname inserted.
<to be read again>
\let
LaTeX Warning: Hyper reference `\let ' on page X undefined on input line Y.
Argument of \\blx@imc@printfield has an extra }.
<inserted text>
\par
Runaway argument?
titlecase
Paragraph ended before \\blx@imc@printfield was complete.
<to be read again>
\par
Hey lasse, don’t panic.
The problem you describe sounds like that either something is wrong with the syntax in the bibfile so that biber cannot parse it correctly, or with the bibliography style you are using. Can you please, just for testing purposes, try to set another bibliography style in your latex document and see, if this may be the fault?
I will try to look into your bibfile tonight.
You could also try to use the integrity check of JabRef on your library. Remember: always make a backup of your files if you are experimenting with your library.
Thanks for the quick response guys! I really appriciate it.
The library mode is set to biblatex, even though .bib tells that “@Comment{jabref-meta: databaseType:bibtex;}”
I’ve corrected the entry suggested from @Siedlerchr, but without luck. When running the Check integrity, I get a lot of “smaller” warnings (errors?) about capitalization and so on, but could that course it? Should they be corrected?
There must be an error in your LaTeX document because I set up a minimal example and I can cite from your bib file and it works fine.
From what I read it could also indicate an error in includegraphics.
For finding the root cause I would comment out chapterwise → compile to identify the chapter where it is broken. Bisecting is also helpful to narrow down the root cause.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{biblatex}
\addbibresource{references.bib}
\begin{document}
Let's cite! The Einstein's journal paper \cite{Aksu2024GIFTEval} and the Dirac's
book \cite{Benhamida2020ClustAvg} are physics related items.
\printbibliography
\end{document}
The error came come the cls template i’ve used. It turns out that the the custom \DeclareFieldFormat{title} is the culprit – by wrapping the title in \hyperref[#1]{#1} it was telling BibLaTeX to try and create a link to a label named exactly the title text, which
• generates a spurious \let and
• ends up with an unmatched “}”
every time it formats a title field.
I changed: \DeclareFieldFormat{title}{\mkbibitalic{\hyperref[#1]{#1}}}
into: \DeclareFieldFormat{title}{\mkbibitalic{#1}}
Thanks for all the suggestions by everyone!
Debugging method:
One of the perks of setting up LaTeX in VS Code as a student is the ability to integrate GitHub Copilot, which can fetch relevant web pages and access the codebase. Using this setup, o4-mini was able to identify the mistake.