BibTeX key changed after I imported a bib file

I am new to Zotero, and have just imported my BibTeX file containing over 2000 references into Zotero.
After making some changes, I exported back from Zotero to BibTeX. Strangely, I noticed that all citation-keys have changed! For example, instead of yoon2008participatory, I have yoon_participatory_2008.
I do not care much about the citation format, but, I already have papers written in LaTeX that use the old citation keys. This means these files will not work with the new BibTeX file I export from Zotero!
Is there a way to tell Zotero to keep my old citation keys as they are?

NOTE: I found https://github.com/retorquere/zotero-better-bibtex/wiki/Citation-Keys , where you can make the citation keys fixed. However, I do not see how to keep the citation keys as they are in my old BibTeX file.
  • Is there a way to tell Zotero to keep my old citation keys as they are?
    No. I don't know if Better BibTeX can do that. @emilianoheyns ?

    Otherwise, what's happen if you configure the citekey generator and then import your file?

    https://github.com/retorquere/zotero-better-bibtex/wiki#got-problems-we-got-fixes

    (Be careful and don't forget to backup your Zotero Library.)
  • It seems that Better BibTeX does not support Zotero 5, so I cannot use it.
  • Oh yes, indeed…
  • What kind of changes did you make?

    No export/import route will preserve all data & you're likely better off manipulating the records in Zotero instead.

    But...if you really want to do this despite that advice: The bibtex translator is a file called BibTeX.js in the "translator" directory of your Zotero data folder.
    http://www.zotero.org/support/zotero_data
    You may edit it to use var citeKeyFormat = "%a%y%t";
  • It would be great if we can configure citekey in Zotero preference interface!
  • What's happened to this issue?

    As the OP, I already have LaTeX documents that use the keys in my bib database.

    Now I have imported it into zotero, linked zotero to overleaf, and started to edit a LaTeX document on overleaf.

    Because zotero altered the keys, my LaTeX document cannot find references.
  • If you want to use Zotero with LaTeX, you really should use the BetterBibTeX plugin, which has configurable and pinnable citekeys.
  • > If you want to use Zotero with LaTeX, you really should use the BetterBibTeX plugin,

    Thanks for the advice! I've installed it. My next question is, *How can one tell Zotero or the BetterBibTeX (BBT) plugin to preserve the original keys when Zotero imports my bib file.*

    > which has configurable and pinnable citekeys.

    I tried to configure the "Citation Key Format" item, but I don't know how to tell BBT to preserve the original key. I tried deleting the Citation Key Format, but that wan't allowed.

    What's a pinnable key? (I tried googling it but didn't get relevant hits.)
  • Right click on an item and choose Better BibTeX -> Pin Citation Key. That will add “Citation Key: author1987” to the Extra field. BetterBibTeX will use that “pinned” key on any exports and it won’t change.

    When you import a bib file with BetterBibTeX installed, the citation keys will be added to extra like this automatically.
  • @bwiernik
    > When you import a bib file with BetterBibTeX installed, the citation keys will be added to extra like this automatically.

    That means

    Install BetterBibTeX and import bib files. Then, the original citation keys are preserved!

    Thank you!
Sign In or Register to comment.