Configuration

The Better BibTeX Configuration can be found under the regular Zotero preferences pane, tab ‘Better Bib(La)TeX’.

The configuration of Better BibTeX is a little baroque compared to the standard Zotero Bib(La)TeX exporters (which only have hidden preferences). The defaults should just work, but here’s an attempt to describe what they do.

Making any change here will drop your entire export cache. This is usually not a problem unless you have a really large library, but you can read about what is involved here.

Citation keys

LaTeX command

default: cite

Used for drag-and-drop/quick copy citations. In the Zotero “Export” pane, choose, “Better BibTeX Quick Copy” as the default export format for quick copy, then set the desired LaTeX citation command here. If you set this to citep, drag-and-drop citations will yield \citep{key1,key2,...}

Citation key format

default: [zotero]

Set the pattern used to generate citation keys. The format of the keys is documented here.

Force citation key to ASCII

default: true

If you have deviated from the default citation key format pattern by specifying your own, you may wind up with non-ASCII characters in your citation keys. You can prevent that using the fold function at the appropriate place in your pattern, but checking this checkbox will just apply fold to all your keys.

On conflict, non-pinned keys will be

default: keep

This determines what happens if you pin a key to a value that is already in use in a different reference but not pinned there. Neither are ideal, you just get to pick your poison. The options are:

Auto-pin citation keys

default: manual

By default, Better BibTeX assigns dynamic keys to your references; if your reference changes, your citation key will also likely change (depending on which fields you changed). If you don’t want this, you can “pin” the citation key; if you have bibtex: <something> in the extra field of your reference, <something> will be used as the citation key regardless of what your reference says.

You can have Better BibTeX do this pinning for you automatically. This behavior is off by default, but you can have it automatically pin the key after the first change to the reference (this generally means at reference creation), or at export (and auto-exports count as exports). This is mainly useful to do if you share your library, to make sure you and your co-authors have the same keys, or if you work from multiple workstations. Please note that “on change” does not mean that the reference will be re-pinned on change. Once pinned, no more changes are made to your keys by Better BibTeX itself.

Note: This option requires webdav/zotero sync to be off, or automatic. If you don’t sync your references/attachments, it’s considered off. If you have syncing set up but not on automatic, this option will be greyed out. Each pinned key change (or clearing of a pinned key) means a change to the reference, and that means the item will be synced if you have that set up. Bulk key changes causing bulk reference changes (which can easily happen if you have on-export and you export your full library) could overwhelm the Zotero sync service if presented all at once; automatic syncing ameliorates that problem. Not doing this would risk sync being permanently impossible, as the Zotero server will kick you out if a sync takes too long.

Show citekey instead of ‘extra’ field in reference list

default: false

If you enable this, the extra column in the Zotero reference list (if you have selected it to be shown) will display the citation key instead of the extra field.

QuickCopy format

default: latex

Used for drag-and-drop/quick copy citations. You can select the output format here: LaTeX (in combination with the Citation command preference), Pandoc, or Org-mode

Export

When a reference has both a DOI and an URL, export

default: both

Does what it says on the tin, really. If a reference has both a DOI and an URL, you can choose to have them both exported, or either one of them.

Export BibLaTeX as ASCII

default: false

BibLaTeX actually has really good Unicode support, so you generally want this off. But for some geezers such as me it is simply more pleasing to have things like accented characters translated to their equivalent LaTeX constructs on export.

Export BibTeX as ASCII

default: true

BibTeX has really spotty Unicode support, so you generally want this on. It will translate things like accented characters to their equivalent LaTeX constructs on export.

Omit title and mimetype for attachments

default: false

By default, Better BibTeX will export attachments including a title and their mimetype, in a format supported by JabRef. Many but not all BibTeX managers support this format, but if yours (like emacs ebib) doesn’t, enable this to export only the filename.

Assume single-word strings to be externally-defined @string vars, and thus not surrounded by braces

default: false

When enabled, single-word strings will be assumed to be externally-defined @string vars, and thus not surrounded by braces. If you don’t know what this means, leave it off.

Disregard name prefixes when sorting

default: false

Name handling is a lot more complex than I had ever thought it to be. A lot more complex. BibTeX has really limited ways of dealing with names with particles (van, von, de, etc). If you turn this on, BBT will add code to have van Gogh sorted under Gogh.

Fields to omit from export (comma-separated)

default: empty

If there are some fields you don’t want in your bibtex files (such as note for example), add a list of them here, separated by comma’s.

Add URLs to BibTeX export

default: off

BibLaTeX supports urls in your references natively; BibTeX does not. For this reason, URLs are omitted from BibTeX exports by default. Using this setting you can have them added to your exports either in a note field (not as clean, but compatible with BibTeX out of the box), or in an url field (requires extra packages to be loaded, or bibtex will error out).

Use BibLaTeX extended name format (requires biblatex 3.5)

default: false

In the latest release, biblatex has a new (less ambiguous) way to store creator names. It’s technically superior, but the LaTeX world moves slowly, so many people won’t have it yet. But if you’re an early adapter, you can enable it here

Use the extended biber 2.7 format for names with particles - only works in BibLaTeX 3.5 or later

Journal abbreviations

Automatically abbreviate journal title if none is set explicitly

default: false

If set, generates journal abbreviations on export using the Zotero journal abbreviator, according to the abbreviation style selected in the list below the checkbox.

Abbreviation style:

default: empty

Select the style for auto-abbreviation.

Automatic export

Automatic export

default: idle

Determines when automatic exports are kicked off: * Disabled: disable automatic exports (but still marks them when changes occur) * On Change: export whenever a reference in the export changes/is added/is removed. * When Idle: export marked collections when your computer is idle. You mostly want this if your computer is performance-constrained (aka slow)

Advanced

Better BibTeX extended debug logging. Restart Firefox/Zotero to activate, persists over reboots. Affects performance, so turn off when done.

default: false

This will generate more verbose logs. This really does affect performance, so only enable this if you’re trying to diagnose a problem in Better BibTeX.

Retain LaTeX markup on BibTeX import

default: false

Enables hardcore mode. You like Zotero in some ways, but really just want it to be a BibTeX manager. If you enable this, any BibTeX files you import will retain all the LaTeX commands they have, and marks the entry to be exported without any translation.

Add ‘%b’ to the Zotfile pattern generator (requires restart)

default: true

Adds a ‘%b’ formatter to Zotfile which retrieves the BibTeX citation key. This is going to be deprecated soon, as it’s much safer to have this done on the ZotFile side.

Re-scan pinned citekeys after restart

default: true

There have been occasions where Better BibTeX seemed to ignore keys you have specified manually by having bibtex: <whatever> in the extra field of your reference. I haven’t seen this in ages, but enabling this and then restarting Zotero will force a re-scan to find them. This slows down startup tremendously if you have a big library. The checkbox will automatically clear after restart.

Show reference ID instead of ‘call number’ field in reference list (requires restart)

default: false

If you enable this, the call number column in the Zotero reference list (if you have selected it to be shown) will display the internal reference ID instead of the call number field. Only useful for debugging.

Warn me when changing citation keys in bulk

default: 10

For those who are curious about what the “Clear/Generate BibTeX key” right-click options do, this will warn you if you are doing this on more than 10 (default) at the same time, to prevent your curiosity from changing all your citation keys at once.

Postscript

default: empty

Snippet of javascript to run after each reference generation.

Hidden preferences

You can edit most BBT preferences through the Preferences window. However, the preferences window does not include all of the different ways you can customize BBT. To view the the full list of BBT’s preferences, including many hidden preferences, type about:config into the Firefox location bar and enter better-bibtex into the Filter field at the top of the list that comes up. In Zotero Standalone you can access about:config from the Advanced pane of the preferences. You can change all preferences here but I strongly recommend changing the regular preferences through the preferences UI rather than here – it is possible to enter unexpected values here, and not all of these cases have been tested.

All Zotero hidden preferences are preceded by extensions.zotero.translators.better-bibtex.

extensions.zotero.translators.better-bibtex.langID

default: babel

Switches between babel and polyglossia, except I haven’t gotten around to polyglossia yet.

extensions.zotero.translators.better-bibtex.autoExportIdleWait

default: 10

Number of seconds to wait after your system goes idle before kicking off auto-exports.

extensions.zotero.translators.better-bibtex.cacheFlushInterval

default: 5

How often the Better BibTeX database should be saved to disk. Defaults to once every 5 seconds. Note that your database is always saved when your computer goes idle, or when you exit Zotero.

extensions.zotero.translators.better-bibtex.confirmCacheResetSize

default: 1000

On upgrading to a new version, Better BibTeX drops your cache to make sure you get the latest export implementation. For large libraries, this may be undesirable because Better BibTeX updates frequently, and export on an empty cache is really slow. If you have more than N entries in your cache, you will be asked if you want to keep the cache (and forego the benefits of the upgrade until the relevant entries change to change their cache).

extensions.zotero.translators.better-bibtex.caching

default: true

You really want this on. Better BibTeX has a very involved process of generating BibTeX output, and the caching mechanism makes sure it doesn’t happen any more frequently than necessary.

extensions.zotero.translators.better-bibtex.csquotes

default: empty

Enables csquotes support.

extensions.zotero.translators.better-bibtex.skipWords

default: a,ab,aboar…

list of words to skip in title when generating citation keys

extensions.zotero.translators.better-bibtex.tests

default: empty

Unit tests to run

extensions.zotero.translators.better-bibtex.jabrefGroups

default: 4

Export JabRef groups for collections. zero means disable, “3” means format 3, which is (IMO) opinion better but depracated (but JabRef will read it for the foreseeable future), “4” means the new format.

extensions.zotero.translators.better-bibtex.defaultDateParserLocale

default: empty

The Better BibTeX date parser uses locale hints when provided with ambiguous dates such as 1/2/2008 (which is either 1st of February, or 2nd of Januari). Better BibTeX will first look at the language specified in your reference and fall back to your system locale otherwise, but if you add a language code here, this will be used as a fallback. I use en-GB here myself as I generally prefer the en-US locale for my systems, but not the wacky idea of date formatting that comes with it.

extensions.zotero.translators.better-bibtex.jurismPreferredLanguage

default: zh-alalc97

When language alternates are present in Juris-M, this is the language BBT will pick.

extensions.zotero.translators.better-bibtex.qualityReport

default: false

Generate quality reports for exported references.

extensions.zotero.translators.better-bibtex.biblatexExtendedDateFormat

default: false

Support for ambiguous dates

extensions.zotero.translators.better-bibtex.suppressTitleCase

default: false

If you’re dead-set on ignoring both BibTeX/BibLaTeX best practice and the Zotero recommendations on title/sentence casing, set this preference to “true” to suppress title casing for English references.

extensions.zotero.translators.better-bibtex.itemObserverDelay

default: 100

I’ve had reports where Zotero notifies extensions that references have changed, but if BBT then actually retrieves those same references, Zotero complains they “haven’t been saved yet”. Super. This preference sets the number of microseconds BBT should wait after being notified before acting on the changed references.