Citation Keys Changed

edited December 15, 2017
Zotero installed an update for Microsoft Word, which I don't use. I'm exporting my library using Better Bib(La)Tex and compiling in TexMaker. After the update all of my citation keys changed. A message popped up about it (I think), but I was trying to get a thought down and closed the message quickly without reading it thoroughly. I'm kicking myself for this, but I can't figure out how to roll the citation keys back to their previous values.

Example:
Old key: author_firstwordoftitle_year
New key: authormostofthetitleyear (all smashed together)

I think I'm inching closer to a solution. Trying this: [auth:fold:lower]_[Title:nopunct:skipwords:select,1,1:lower]_[year]

based off of this page: https://github.com/retorquere/zotero-better-bibtex/issues/212

I'm still having issues when I compile but I feel like I'm closer than before. I'll report back- sorry for the excessive posts. I condensed the second into this one- mods feel free to delete the second one.

Thanks!
  • edited December 15, 2017
    The message said

    Your citekey pattern is set to the default '[auth][shorttitle][year]'. Please make sure this is the pattern you want, or change it in the preferences -- references will have citekeys formatted by it. If you have references generated by the default Zotero BibTeX exporters, you will want to change it to '[zotero:clean]'
  • (as you've noticed, you will only get this message once, on first run when you got the default pattern)

    To roll your keys back, change the pattern in the BBT prefs, select all your references, right-click, and choose "refresh".
  • On a general note, for BBT support, your best bet is to head over to https://github.com/retorquere/zotero-better-bibtex/issues . I don't frequent these forums much.
  • Thanks so much, this is exactly what I needed. It solved my issue straight away. I'll check out the other site in the future.
    Cheers!

  • edited November 24, 2018
    It is very hard to understand why it was decided to change the default cite key format.

    Old key: author_firstwordoftitle_year
    New key: authormostofthetitleyear (all smashed together)

    Is it not possible to provide a specification, in JabRef BibTeX key generator format (https://help.jabref.org/en/BibtexKeyPatterns), that would allow one to recreate the default export key format of earlier Zotero versions?
  • @ronan.mt.fleming: Reconsider your tone or don't post here.

    This thread is about a third-party plugin. It has nothing to do with the Zotero developers or the default BibTeX support in Zotero. As noted above, if you have a question about BBT, you should post to its GitHub Issues. If you have a question about Zotero's default BibTeX support, you should start a new thread.
  • Did the default citation key format for a Zotero BibTeX export change between Zotero v4 and v5?

    If so, this is a Zotero issue, not an issue with BBT.

    The problem with changing the default citation key format is that many people will have bibtex dependent manuscripts with the old default citation key format and when they go to update the manuscript, they will find that the citation keys in their manuscripts no longer correspond to the default export from Zotero after a Zotero update.

    This leaves the problem of trying to reverse engineer what the default export format was for Zotero v4, in the style of the JabRef BibTeX key generator format.
  • e.g.
    To recreate v4, with BBT, how to get

    @article{haraldsdottir_chrr_2017,
    title = {{{CHRR}}: Coordinate Hit-and-Run with Rounding for Uniform Sampling of Constraint-Based Models},
    volume = {33},
    doi = {10.1093/bioinformatics/btx052},
    shorttitle = {{{CHRR}}},
    number = {11},
    journaltitle = {Bioinformatics},
    shortjournal = {Bioinformatics},
    date = {2017-01-06},
    pages = {1741-1743},
    author = {Haraldsdóttir, Hulda S. and Cousins, Ben and Thiele, Ines and Fleming, Ronan M. T. and Vempala, Santosh}
    }

    to export instead as

    @article{haraldsdottir_chrr:_2017,
    title = {{{CHRR}}: Coordinate Hit-and-Run with Rounding for Uniform Sampling of Constraint-Based Models},
    volume = {33},
    doi = {10.1093/bioinformatics/btx052},
    shorttitle = {{{CHRR}}},
    number = {11},
    journaltitle = {Bioinformatics},
    shortjournal = {Bioinformatics},
    date = {2017-01-06},
    pages = {1741-1743},
    author = {Haraldsdóttir, Hulda S. and Cousins, Ben and Thiele, Ines and Fleming, Ronan M. T. and Vempala, Santosh}
    }

    This seems close:
    [auth:fold:lower]_[Title:skipwords:select,1,1:lower]_[year]
    but returns the key haraldsdottir_chrr_2017, rather than haraldsdottir_chrr:_2017 as desired.
  • edited November 24, 2018
    Did the default citation key format for a Zotero BibTeX export change between Zotero v4 and v5?
    No. BibTeX key generation is done in the Zotero translator, not in the main code, so it wouldn't have changed between Zotero 4 and 5. You can see the translator change history on GitHub. There haven't been any changes to keys in the last year.

    Again, this thread is about BBT export.
  • OK, when was the last version when the default citation key format for Zotero BibTeX export changed?
  • I linked to the change history — you can review that yourself to see what changed in the BibTeX translator and the reasons for it. I'm not involved with that.

    There's not currently a field to store a citation key in Zotero, so changes to the generation algorithm, which have been necessary a few times over the years to fix bugs, will unavoidably break links to existing documents. That's part of the reason people who use BibTeX-based workflows use BBT. A future version of Zotero will add a native citation key field, which will help with this aspect, but BBT is likely to remain useful, since BibTeX isn't Zotero's primary concern.
  • edited November 27, 2018
    @ronan.mt.fleming @dstillman is absolutely right -- this is a BBT issue, so that would make me "the developer with the really daft idea". I realized this change would pose in inconvenience on those who already had (or, for reasons which elude me, prefer) the zotero-style citation keys (which have *not* changed since the pax romana was established as far as I can tell), so on first run, BBT will pop up a message box saying

    BBT will generate citation keys for your references.
    The citekey generation is highly configurable, and
    you can choose to override the generation, but you
    will need to select the default now. You can always
    go into the preferences and change this at any time

    ( ) I have used BBT before
    ( ) I am new to BBT but have used Zotero-generated BibTeX before
    ( ) I have not used Zotero for BibTeX management before
    If you click any of the options above, the explanation right under the radio buttons changes accordingly to respectively:

    • Choose this option if you have documents that refer to keys generated by BBT; your citation keys will look like goffmanForms1981

    • Choose this option if you have documents that refer to keys generated by Zotero without the help of BBT; your citation keys will look like goffman_forms_1981

    • Choosing this option will select the BBT default format; your citation keys will look like goffmanForms1981

    It is possible BBT did not pick up your existing keys (which it should have); for that you can open an issue at https://github.com/retorquere/zotero-better-bibtex/issues and then I can have a look.
  • @dstillman how do I hail a user with periods in the username on this forum? I don't get @roman.mt.fleming in the auto-complete. I think I know why the old keys appeared lost and it's fixable, but I'll need his help.
  • edited November 27, 2018
    @emilianoeheyns You are just spelling the name wrong. It’s Ronan, not Roman

    @ronan.mt.fleming
  • @bwiernik I was indeed spelling it wrong just above, but I did spell it right two posts above this one, and even when I type it right, the autosuggest list disappears entirely when I type the period; for the case of users with spaces in their name I saw the same kind of behavior, and those would not get a notification.

    Anyhow, probably got one now.
  • You have to type names with periods manually. For spaces, replace them with %20
  • edited November 28, 2018
    edit: @ronan.mt.fleming there's a very good chance that the keys you had before are recoverable but I will need your help to get them. If you open an issue on https://github.com/retorquere/zotero-better-bibtex/issues I can have a look.
  • @emilianoeheyns I know you are somewhat frustrated, but the tone probably isn't helpful.
Sign In or Register to comment.