BibLaTeX/Biber compile fails at \printbibliography with \endcsname / titlecase error

Hi everyone,

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

Link to the file

Hope you can help! I am so frustrated by now :sweat_smile:

Best regards,
Lasse

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.

Hi, I did take a look at your bibfile and run Check integrity (and you should set your library properties to biblatex before).

One thing I noticed is the bibtex key in line 318

@InProceedings{Ma’Rufah2023ContrastiveLossFunction,

It could be that entry that is wrong. Try changing the key

@subramit also found some problem that could cause this error, if you used by some character in the citation key that biber may not like:
https://tex.stackexchange.com/questions/631128/error-missing-endcsname-inserted-bibliography-bibtex

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?

Here is the newerst version of the bibliography

Here is the log generated

Please let me know if you need anything further from me :hugs:

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}

I’ve managed to narrow it down to being both (not neither) the literature review or methodology - but that’s also about 95% of citations :smiley:

Any further suggestions on debugging?

Have you tried searching for \let in your bibliography? (e.g. by using ctrl+f in your text-editor). Maybe you find something odd in its surroundings?

There’s no results :blush: Neither in any chapters

SOLVED!

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.

1 Like