Personalize BibLatex ID

Is there a way to personalize the IDs that Zotero builds when you export in BibLatex format?

For example, in my Latex document, I don't want to see

\cite{kaplan_financial_2003}

Bu rather

\cite{kaplan_financial_contracting_theory_meets_2003}

So I want the first 4 words of the article title instead of the first one. In this way I can recognize immediatelywhich article we are referring too when I am writing. Thanks
  • No, it's not possible but planned.

    The Better Bib(La)TeX plugin allows for custom citekeys: https://zotplus.github.io/better-bibtex/
    Please note that BBT does not yet work with Zotero 5.0.
  • This part of BBT now does work; BBT is not feature-complete for Z5 but currently passes all my import-export tests. The beta can be downloaded here (search for the last "bleep bloop" message).
  • This has changed all my citation keys. Can I restore the citation keys back to what they were? My latex file don't compile correctly anymore, in the pdf file the references are not found. Or do I have to change the citation keys manually?
  • With "this" you mean installing BBT? Changed compared to what?
  • I had Zotero 5 without BBT. I had a database and I exported this database in .bib format using Zotero. (File-Export Library and in Format select BibLateX)
    This .bib files had citation keys in the format "[Author 1]_[Word 1 of the title]_[year]". So for example in the Latex file I have "\parencite{hellmann_allocation_1998}"

    I installed BBT. I exported to .bib using BBT while selecting the "keep update" option.
    My citation keys changed to something like "[Author 1][some words of the title][year]". For example the citation key of the previous article is now "HellmannAllocationControlRights1998"

    This of course broke my latex file. I want the old citation keys in Zotero, or, equivalenty, to automatically convert the old citation keys to the new ones in the Latex file
  • edited October 25, 2017
    The default pattern of BBT is different from Zotero; if you want a pattern that closely emulates the Zotero default you need to go into the BBT preferences and set the pattern to [zotero].

    After that, select all your preferences, right-click, and select "Refresh". The keys should now look like Zotero would generate them.

    This is wholly a BBT issue BTW; for BBT support I prefer to use GitHub, both because it's easier to track for me, and so as not to pollute the Zotero forums with questions specific to extensions (for which the Zotero devs bear no responsibility).

    "Keep updated" does not yet work; the state of affairs of the BBT rewrite is tracked on Trello until the port is feature complete; after that, regular GitHub issue will be used.
  • This works indeed. Thank you and thank you for the extension
  • "Keep updated" works now BTW.
  • edited October 25, 2017
    ([zotero] used to be the default but the it exactly implements the zotero key generation algorithm which has a few edge cases where it generates keys not accepted by all citation processors. I had to choose between making the transition easy coming from the standard Zotero keys, and keys without such edge cases)
  • @Gracile flexible citation keys in stock Zotero BibTeX export is planned? Is this work already underway? I'd probably want to tap into that rather than keeping a separate key generator.
  • Not underway as such -- it's just going to be a regular field in 5.1, I'd expect.
  • @adamsmith this field would be optionally filled by the user? Pre-filled in some way?
  • I don't think it's been decided, so input welcome. My view would be that it'd be pre-filled using the same algorithm the current standard BibTeX uses. Customization perhaps as a hidden pref? Not sure.
  • edited January 8, 2018
    I'd have the same concerns that once kicked off BBT;

    * will the key generation algorithm be configurable (your answer seems to imply "possibly"), and if so, how
    * will plugins such as BBT be allowed to influence the key generation behavior, and if so
    * how will contention for filling that field be dealt with
    * will the Zotero-generated keys change when the reference changes, and if so
    * will it be possible to block that behavior (pin the key)
    * will the keys be enforced to be unique, and if so
    * will this be globally for the user, or per library/group

    Probably more, but this is what comes to mind first
  • Coming to this 7 years later. Is there a way to do this now by any chance?
  • Almost nothing changed -- BBT still exists and allows this, stock Zotero doesn't.
    The only update is that Zotero's API (and web library) will now recognize and use pinned stable citekeys set by BBT
Sign In or Register to comment.