Skip to main content
v2026.11,772 entries · CC-BY 4.0

Better BibTeX for Zotero: Setup and Citation Keys

How to install the Better BibTeX plugin, configure and pin its citation-key formula, and set up Auto-Export so your .bib file updates itself as your Zotero library changes.

Ask CASRAI · included with Regulatory Radar

Ask about Better BibTeX for Zotero: Setup and Citation Keys

Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.

150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Written and maintained by CASRAI Editorial Board

Last updated

Better BibTeX (BBT) is a free Zotero plugin that replaces Zotero’s built-in citation-key generator with a customizable one, and adds an auto-updating BibTeX/BibLaTeX export you point LaTeX, Overleaf, or Pandoc at instead of re-exporting by hand. Zotero can export a .bib file on its own, but the export is a one-time snapshot and the citation keys it assigns are not something you can reliably shape or keep stable as a library grows. BBT exists specifically to fix both: a citation-key formula you control, and a library-to-file link that stays current automatically. This guide covers installing it, how its citation-key system actually works (formula, pinning, disambiguation), and how to set up a live-updating export.

Installing Better BibTeX

BBT is a Zotero 7 plugin, not a browser extension — it installs inside the standalone Zotero desktop app, the same app used for the Connector, word-processor plugin, and library sync covered in CASRAI’s general Zotero setup guide.

  1. Download the current release .xpi file from the zotero-better-bibtex GitHub releases page. If your browser tries to open the file instead of saving it, right-click the link and choose “Save link as.”
  2. In Zotero, open Tools > Plugins.
  3. Click the gear icon in the top-right of the Plugins window and choose “Install Plugin From File…”.
  4. Select the downloaded .xpi and confirm the install prompt. Restart Zotero if asked.

After the first manual install, BBT updates itself automatically alongside Zotero’s normal plugin-update check — there is no separate updater to maintain.

How Better BibTeX citation keys actually work

This is the part a generic BibTeX reference doesn’t cover, because it’s specific to this plugin rather than the file format itself: BBT generates a different, more configurable citation key than Zotero’s own default, and gives you three controls over it — the formula, pinning, and disambiguation — that matter once a library gets past a handful of items.

The default formula

Out of the box, BBT builds keys with the pattern auth.lower + shorttitle(3,3) + year: the first author’s last name in lowercase, the first three words of the title (no forced capitalization), and the publication year — e.g. smithstudyexamples2024. This is different from Zotero’s own native key generator, and the two are not interchangeable once a document cites keys in one format.

Changing the formula

The formula lives in Zotero > Settings > Better BibTeX > Citation Keys. BBT’s formula language is a compact, JavaScript-like syntax with four building blocks: functions that pull data from the item (auth, shorttitle, year), field access for a specific Zotero field, filters that transform output and chain with a dot (auth.lower.clean), and literal quoted strings. Pieces combine with + (concatenate), || (fall back to the next value if the first is empty), && (only include if the first value exists), and a ternary (auth ? year : title) for conditional keys. A common alternative to the default is auth.lower + year for shorter keys, or substituting zotero as the pattern to reproduce Zotero’s own native key format instead — useful if you’re adopting BBT mid-project and don’t want to invalidate every cite{} already in a manuscript.

Editing the formula does not retroactively change existing keys. To apply a new formula to items already in your library, select them, right-click, and choose BBT > Refresh. Do this deliberately, not by habit — refreshing keys that are already cited in a document you’re not simultaneously updating will break those citations.

Pinning keys

Because the formula recalculates from item metadata, editing a title or fixing an author’s name after you’ve already cited that key in a manuscript can silently change the key and break the citation. Pinning (right-click an item > Pin BibTeX Key) locks that item’s key to its current value regardless of later metadata edits or formula changes. Pin a source as soon as you start citing it in a document you’re actively writing, not after you notice a key has drifted.

Disambiguating duplicate keys

When two items would generate the same key — two 2024 papers by the same first author with overlapping title words, for instance — BBT appends a postfix automatically. The default is a letter (smith2024a, smith2024b); BBT’s citation-key settings let you switch this to a Zotero-style numeric postfix instead if that better matches an existing document’s convention. Whichever you choose, keep it consistent across a project — mixing postfix styles mid-manuscript after a formula change is a common source of the “undefined citation” errors covered in the BibTeX file format guide.

Setting up Auto-Export: a .bib file that updates itself

The other half of what BBT adds is Auto-Export — a library-to-file link that rewrites your exported bibliography automatically whenever the underlying Zotero collection changes, instead of you re-running File > Export every time you add a source.

  1. Right-click a Collection (not the whole library — Auto-Export is scoped to one collection at a time) and choose Export Collection….
  2. Choose a BBT export format: Better BibLaTeX if your LaTeX document uses the modern biblatex package, or Better BibTeX for the classic bibtex/natbib workflow. They are not interchangeable — a biblatex document expects fields BibLaTeX exports (like date instead of separate year/month) that classic BibTeX output doesn’t always populate the same way.
  3. Check “Keep updated” in the export dialog, then choose a save location.

From then on, adding, editing, or removing an item in that collection rewrites the exported file automatically as long as the Zotero desktop app is running in the background — it does not need to be the active window. This is the mechanism that makes an Overleaf-synced or locally-compiled LaTeX bibliography stay current without a manual export step; point your document’s bibliography{} (or your BibLaTeX addbibresource{}) at the exported path and BBT keeps it in sync from there.

Common problems

Symptom Likely cause Fix
A citation key changed on its own between compiles The item’s title, author, or year was edited after the key was generated, or Zotero’s sync merged in a metadata change from another device Pin the key (right-click > Pin BibTeX Key) as soon as you start citing an item
Auto-Export file stopped updating Zotero desktop was closed, or the export was scoped to the wrong collection Confirm Zotero is running in the background; re-check which collection the export is attached to under File > Export Library history is not kept, so re-create the Auto-Export if it was accidentally removed
Two items generated the same citation key Same first author, overlapping title words, same year — the default formula collides This is expected; BBT appends a letter (or numeric, if configured) postfix automatically. If the wrong one got cited, re-check which item BBT actually assigned the base key to
Keys look completely different after installing BBT BBT’s default formula differs from Zotero’s own native key generator Set the citation-key formula to the literal pattern zotero in Better BibTeX preferences to reproduce Zotero’s native keys, or accept the new format and run BBT > Refresh deliberately across the library before citing further

Frequently asked questions

Is Better BibTeX free?

Yes. It’s free, open-source software (GPL-licensed, maintained by Emiliano Heyns/retorquere on GitHub) and does not require a paid Zotero account or storage tier — it works with a fully free Zotero library.

Does Better BibTeX work with Zotero’s Word or Google Docs citation plugin?

They’re independent features. The word-processor citation plugin (covered in Zotero for Researchers) inserts formatted in-text citations and a bibliography directly into a document; BBT’s citation keys and Auto-Export are for LaTeX/Markdown/Pandoc workflows that cite by key rather than through a word-processor plugin. A single library can support both at once without conflict.

Will changing the citation-key formula break citations already in my manuscript?

Only if you also refresh the affected items’ keys. Changing the formula in preferences has no effect on existing items until you explicitly select them and run BBT > Refresh — so it’s safe to experiment with formula settings before you’ve cited anything, and something to do deliberately, one library-wide pass, once you have.

What’s the difference between the “Better BibLaTeX” and “Better BibTeX” export formats?

Both are BBT’s own export formats, distinct from Zotero’s built-in plain BibTeX exporter. Better BibLaTeX targets the modern biblatex LaTeX package and its richer field set; Better BibTeX targets the classic bibtex/natbib toolchain. Pick the one matching your document’s LaTeX bibliography package, not just “BibTeX” generically.

For the underlying file format itself — entry types, required fields, and the syntax errors that break a LaTeX compile — see The BibTeX File Format Explained. For Zotero setup and sync troubleshooting beyond BBT specifically, see Zotero Setup and Troubleshooting. If you’re pulling a single reference into BibTeX from a DOI rather than a full library export, see Getting Clean BibTeX from a DOI. Researchers writing in Overleaf specifically may also want What Is Overleaf?.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 72,264 indexed passages, and every answer cites the ones it drew on.