Empty field in a BibTeX file causing Biber failing
(I'm writing on behalf of Overleaf Support.)
If one exports a BibTeX or BibLaTeX file from Zotero via the API that Overleaf connects to, an empty Zotero item causes Biber to crash.
The issue is that the empty item reads "@article{noauthor_notitle_nodate}" but Biber needs the comma there to be able to parse this: "@article{noauthor_notitle_nodate,}".
This comes up a lot in Overleaf Support as many Zotero users accidentally create an empty bibliography item.
One could argue that this is a bug in Biber, but I think it would be easier for Zotero to add this comma, as this would solve the issue also retrospectively, whereas a new Biber version would only available in new TeX Live versions.
You can check the issue using the following links:
This uses the original exported file and it crashes:
https://www.overleaf.com/read/tfnwcfvqnpss
This has the comma added and it works:
https://www.overleaf.com/read/mcqqxtpknpff
Thanks s lot,
Tom
—
Tom Hejda
LaTeX Support & Product Specialist
www.overleaf.com
If one exports a BibTeX or BibLaTeX file from Zotero via the API that Overleaf connects to, an empty Zotero item causes Biber to crash.
The issue is that the empty item reads "@article{noauthor_notitle_nodate}" but Biber needs the comma there to be able to parse this: "@article{noauthor_notitle_nodate,}".
This comes up a lot in Overleaf Support as many Zotero users accidentally create an empty bibliography item.
One could argue that this is a bug in Biber, but I think it would be easier for Zotero to add this comma, as this would solve the issue also retrospectively, whereas a new Biber version would only available in new TeX Live versions.
You can check the issue using the following links:
This uses the original exported file and it crashes:
https://www.overleaf.com/read/tfnwcfvqnpss
This has the comma added and it works:
https://www.overleaf.com/read/mcqqxtpknpff
Thanks s lot,
Tom
—
Tom Hejda
LaTeX Support & Product Specialist
www.overleaf.com
(Not sure when I have time to look at this, so PRs by anyone reading along more than welcome)
(a) remove the comma on line 289;
(b) add Zotero.write(",") on line 320 at the end of writeField;
(c) add + "," to Zotero.write on line 527
And the same changes for translators/BibTeX.js on lines (a) 1051, (b) 1070, (c) 1358
I would do it myself, but I wasn't able to find instructions to PRs. I suppose there is some versioning going on etc.