0

EDIT: The issue was something completely different. The Better BibTex plugin for Zotero changes the way citation keys are generated. This can be changed in Preferences -> Better BibTex -> Open Better BibTex preferences -> Citation keys -> typing "[zotero]" for the "Citation key formula". Then, you must go to the entries in your Zotero library -> right click -> Better BibTex -> Refresh BibTex Key. Do this for each entry. Then export the collection/library as .bib file for use with .tex file.

When or how the citation keys started being generated differently, I have no clue, and never will.


Orignal post: I am writing a paper using Overleaf and using Zotero to manage the references. I export the collection from Zotero as refs.bib in 'Better BibLaTex' format and use the following code in the preamble of the .tex document:

\usepackage[style=numeric,sorting=none]{biblatex} 
\addbibresource{refs.bib}

and I am using \cite{} in the text to create citations. The paper was compiling fine until I re-exported the collection from Zotero and re-uploaded it to Overleaf. Now, instead of rendering in the text as "[1]", a citation will render as "[<first author>•<first word of title>•<year>]".

This has happened before, and my memory is that there was some bad character somewhere in the .bib file (coming from Zotero). When I delete all of the references except for 1 for a MWE, then everything compiles fine.

I cannot find which reference in the .bib file it is that is causing the issue, and am wondering if there is any guidance for sanitizing the .bib file to correct this issue, or anything else. Is it possible to upload my .bib file for others to look at?

8
  • 1
    Also, to be quite clear: There are new references in the re-exported, re-uploaded refs.bib file. However, I have already tried deleting those specific references (and their in-text citation), and this error persists. Hence, I believe there is something wrong with the .bib file generated by Zotero, possibly some uninterpreted character in one of my old references. I remember figuring this issue out last time it happened, but am totally flummoxed this time... Commented Nov 30, 2023 at 5:26
  • Actually, I am realizing some completely different issue, namely the "identifier" given to each reference is completely different in the new refs.bib file. God what a mess. So basically I am now using all completely incorrect identifiers for my citations. Commented Nov 30, 2023 at 5:41
  • Use the Better BibTeX for Zotero extension... Commented Nov 30, 2023 at 6:31
  • 1
    Using the wrong identifiers usually result in not expanded references in the text, but showing the keys only. So the result is exactly the expected one for undefined references (also reported in the log-file). Replacing the old keys by the new (or the new in the bib-file by the old from the document) should be a (diligent but) routine piece of work. For the future, I recommend to compare new an old bib-file before replacing the original one or simply use a new name for the new file and only change the \addbibresource command (or add a new one).
    – cabohah
    Commented Nov 30, 2023 at 7:39
  • Thanks for your comment @cabohah. I'm pretty much going to delete this post because the issue ended up being something arcane with how the Better BibTex plugin for Zotero changed the formatting of the citation keys and the way to change that. Totally unrelated to what I thought... Commented Dec 1, 2023 at 2:49

1 Answer 1

1

The solution to this problem ended up being very different than what I thought the original problem was.

The Better BibTex plugin for Zotero changes the way citation keys are generated. Zotero has a default format which the Better BibTex plugin modifies.

This can be changed in Preferences -> Better BibTex -> Open Better BibTex preferences -> Citation keys -> typing "[zotero]" for the "Citation key formula". Then, you must go to the entries in your Zotero library -> right click -> Better BibTex -> Refresh BibTex Key. Do this for each entry. Then export the collection/library as .bib file for use with .tex file.

I have no clue when this behavior emerged as I was working on this paper a few months ago without issue, then returned to it last week and all of the citation keys were different. Infuriating.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .