Skip to Main Content

BibTeX, natbib, biblatex: Managing Citations in LaTeX: Zotero and LaTeX

A short guide linking to documentation, resources for bibliographic citation styles, and other useful tools to use when citing sources using .bib files and associated packages.

Why Zotero?

Zotero is an open source citation management tool, available on all desktop platforms and on iOS. It can scrape metadata down from publisher websites so you can build your library, and it is often able to automatically download and add PDFs to your library (as long as you can normally download them from the journal website or library-subscribed aggregator; it won't download paywalled content unless you have access to it through your library).

With Zotero, you can:

– Create folders for specific projects
– Make group libraries for your collaborations
– Annotate and tag PDFs within Zotero
– Back up your references to the cloud (note: you'll also want to make a hard copy backup of your Zotero database)
– Directly insert citations into Word and Google Docs
– Add plugins that add advanced functionality based on what you need in a reference management tool, including a plugin to make .bib files really easy to create

Yale Library also subscribes to the extra storage feature on behalf of all university affiliates. This means that you won't run out of space. We recommend signing up with both a Yale email and a personal email, as you are able to add multiple email addresses in your account settings.

When you write in LaTeX and use Zotero, Better BibTeX is the best plugin to use, including for Overleaf users. While Overleaf can connect to Zotero and pull in references, LaTeX sometimes finds it difficult to work with the citation key format that Zotero generates by default due to the way that underscores are handled, and there isn't any built-in support for the newer options in Biblatex. The connector will also pull in every reference in your library, and you won't be able to edit the bib file for things like special characters or to make it more compact. 

Fortunately, the Better BibTeX extension enables you to customize the way citation keys appear in bib files. For example, if you want the last name of the first author, first three words of the title, and year, you can do that — and it can save time identifying the correct citation if you are referencing multiple works by the same person. The plugin provides multiple options for exporting, including a drag-and-drop feature and a continuous update that is useful to connect to Dropbox or GitHub if you are moving between Overleaf and a desktop editor.

Better BibTeX can clean up most citations, which is very helpful — many databases don't export "clean" bib entries, and you don't want to spend all of your writing time hunting down stray ampersands.

Video Tutorial on Using Better BibTeX (Zotero Plugin)

This is a video tutorial that goes through the same content that is in the boxes below on this page. To view a specific portion of the video, click the up arrow button at the base of the video — that will pull up the table of contents.

Better BibTeX Settings and Auto-Export

When you are customizing Better BibTeX, here are a few things to keep in mind. All of these instructions make use of the tab in Zotero's settings/preferences for Better BibTeX, which will appear here after you've installed the plugin.

1. Customize your citation keys.

The documentation on the Better BibTeX website describes how to customize your Better BibTeX citation keys. This is located in the settings/preferences menu in the Better BibTeX settings tab. The image below shows an example in the settings in which the first author's last name (auth.lower) is added to a short form of the title (shorttitle(3,3) — three words, with all words capitalized) and the year.

This shows visually what was just described in the text about customizing citation keys in the settings.

2. Configure your full bib entries so they convert unicode to the appropriate LaTeX command format.

You will need to do this in both the BibTeX tab and the BibLaTeX tab under the Better BibTeX Export settings (note: this is different from the main export settings menu — there are nested settings tabs, which can be a bit confusing, so make sure you're looking at the ones within the Better BibTeX settings). The image below shows that exporting unicode has been set.

This illustrates what was just said about checking off the box to export the unicode commands as plain text.

3. If you want to have a file that continuously updates on the backend, you can manage what happens to it in the settings here.

Right-clicking (or double-tapping on a Mac) over any folder within your Zotero library will surface many export options. In the menu that appears, you will have an option "Export Collection …" that will give you the ability to pick your format. Choose Better BibTeX or Better BibLaTeX.

This visually shows where in the right-click or double-tap menu the Export Collection … option is located. 

This visually shows where the Keep Updated checkbox is located in the dialog box.

If you only want a bib file now, choose your options and follow the prompt to save the file. If you want the file to continuously update, check "Keep Updated." This file can be placed anywhere you want (including in a GitHub or Dropbox folder that is syncing to an Overleaf document project!). If you choose to keep a file updated, remember to edit the item information within Zotero, as it will overwrite any changes you make. We recommend copying the file to a new bib file when you do your final proofreading and using that file so that any proofreading you do is retained in your LaTeX document.

This visually shows where the automatic export management is located in the Better BibTeX settings.

You can edit or update any of your "keep updated" bib files within the Better BibTeX settings menu. It is located in Better BibTeX's Automatic Export tab. There are options to manually update or to configure the file to use journal abbreviations. You can also remove an auto-update if you no longer need it.

Better BibTeX: Using Quick Copy

If you want to enable drag and drop BibTeX citation, start by downloading and installing Better BibTeX. Once you have installed it, open up Zotero's preferences/settings (it's in different places depending on whether you're on a Mac or PC). You'll be able to do the following modifications to make your writing environment work well for you.

First, go to the tab in the settings called "Export" and make a few changes. Ensure that the item format is set to Better BibTeX or Better BibLaTeX (depending on what you are using to write). Make sure that you've set your drag-and-drop limit to account for the number of references you'll be pulling into Overleaf at one time.

The item format area and Disable Quick Copy area are circled in this image just in case people need help finding them in the page.

Next, go into the Better BibTeX menu (the last icon at the top of the settings dialog box should be it unless you'e installed other plugins). Here, there is another Export tab (without an icon), and there are more tabs that give you options. There is a Quick-Copy area here. Make sure that this tab is set to export a full LaTeX citation, not just the in-text citation for your LaTeX document.

This has circled where the quick copy area in the Better BibTeX section is located for visually finding it.

Once this is set up, you can drag and drop into your .bib file (when the file is open in Overleaf or in a text editor) by selecting the references you want (use SHIFT + Click or CTRL/CMD + Click, depending on whether you want a range or to select specific ones).

Dragging and dropping into Overleaf