plk / biblatex

biblatex is a sophisticated bibliography system for LaTeX users. It has considerably more features than traditional bibtex and supports UTF-8
518 stars 118 forks source link

Can't compile with quantumarticle.cls #1356

Open araujoms opened 6 months ago

araujoms commented 6 months ago

If I try to compile with the document class quantumarticle, which is the default class for the journal Quantum, I get the cryptic error

! Package biblatex Error: Patching \addtocontents failed.

This is a regression, as it used to work in TeXLive 2020. I upgraded to TeXLive 2023 (together with the arXiv), and now it doesn't.

MWE:

\documentclass[a4paper]{quantumarticle}
\pdfoutput=1
\usepackage{hyperref}
\usepackage{biblatex}

\begin{document}
\title{title}
\maketitle
\end{document}
moewew commented 6 months ago

Should hopefully be fixed in https://github.com/plk/biblatex/commit/ac2456c2492861451547659702ae4a72264e4997.

The class loads bits of RevTeX and thus has a non-standard definition of \addtocontents that we cannot patch. The fix adds code to deal also with RevTeX's definition of \addtocontents.

araujoms commented 6 months ago

This specific problem was fixed, but another appeared: the numbering of references doesn't work (with the style phys), they all get the number 0. I tried with both the bibtex and biber backends.

moewew commented 6 months ago

Hmmm, ... fascinating. Somehow ltxgrid and biblatex clash so that the .aux file is closed before we can write all our data to that file. I'll see if I can isolate the problem more precisely.

cgogolin commented 3 months ago

Am an one of the developers of quantumarticle. Thanks for looking into this! Is there anything we could do on our end to make resolving this easier?

moewew commented 3 months ago

@cgogolin Thanks for getting in touch. I'm not sure there is any immediate relief you could offer (because I assume you need ltxgrid and can't just drop it). But if you want to, you can help us figure out why ltxgrid prematurely closes the .aux for biblatex.

I haven't looked at this in the last weeks, but when I investigated the issue after the initial report it seemed pretty tricky. So I don't think I can promise any progress in the near future.