Reference Manager Setup

Installing and configuring Zotero.
Author

Michael McCarthy

Published

January 24, 2023

Zotero

Zotero is an open-source reference manager that styles itself as “your personal research assistant.”

If you are using another reference manager you should switch to Zotero, full stop. It’s easy to migrate your data from other reference management tools to Zotero, and will improve your workflow.

Use Zotero’s built-in PDF reader

Zotero has its own built-in PDF reader and it’s really good. Much better than any external PDF readers. Learn more about it in the Zotero documentation.

Installing Zotero

Install Zotero from the Terminal with Homebrew:

brew install --cask zotero

Installing Zotero Connector

Zotero Connector is a browser plugin that allows you to save web content (blogs, articles, etc.) to Zotero with a single click.

The Zotero Connector for Safari is bundled with Zotero. You can enable it from the Extensions pane of the Safari preferences.

Use custom PDF resolvers

Zotero also supports custom PDF resolvers for automatically retrieving PDFs from other sources when Zotero can’t find or access a PDF. You can find some useful examples in Brenton Wiernik’s zotero-tools repository, or by searching something like “zotero pdf resolver” in your favourite search engine.

Installing Zotero extensions

These are the core extensions I use with Zotero. See their documentation for installation instructions:

I also use:

You can find more extensions on the Zotero website.

Configuring Zotero preferences

As far as I’m aware, it isn’t possible to configure preferences in Zotero with dotfiles, so this has to be done manually.

The main preference I need to configure is the citation key formula for Better BibTeX:

authEtAl.lower+"_"+shorttitle(3,3)+"_"+year

Which means:

  • Last name of the authors (with et al. for references with three or more authors)
  • An underscore
  • First three words of the reference’s title in camel case
  • Another underscore
  • Year of publication (if any)

I use this over a authEtAl.lower+"_"+year citation key formula because the titles are a helpful reminder of what I’m citing. However, this citation key formula can make the markdown of a document hard to read, particularly when there are multiple citations in the same sentence or paragraph.

Zotero for iOS

Zotero for iOS is an open source application for working with your Zotero library on an iPad or iPhone. Install it from the App Store.

Configuring Zotero

Things to do after installing Zotero and extensions.

Cloud syncing

Use Zotero’s sync functionality to sync your Zotero library across devices. Zotero syncing has two parts:

  • Data syncing
  • File syncing

Data syncing syncs library items, but doesn’t sync attached files (PDFs, images, etc.). Set up data syncing in the Zotero app by signing into your account.

File syncing syncs attached files of library items. Files can be synced using either:

WebDAV is a standard protocol for transferring files over the web and can be used to sync files in your personal library. There are a number of WebDAV storage providers known to work with Zotero.

Zotero Storage is the file sync option recommended by Zotero. Zotero Storage includes all the features of WebDAV syncing, plus file syncing in group libraries, web-based access to file attachments, easier setup, and guaranteed compatibility.

I currently use WebDAV syncing through 4shared’s free plan, which gives me 15 GB of free space. I chose this option because I don’t need any of the additional features of Zotero Storage, and 15 GBs is more than enough for my personal library.

Turn off automatic tagging

Go to General > Miscellaneous and turn off “Automatically tag items with keywords and subject headings”. I personally found this feature more annoying than helpful, since different sources would use different tags for the same thing, resulting in messy metadata. Instead I manually add tags to items in my library using the following scheme:

  • Subject: name (focus area or field)
  • Topic: name (topic keywords)
  • Data: source (open data set name)
  • Population: characteristic (age group, sex, gender, species, location, etc.)
  • Variable: name (variable measured in the study)
  • Method: name (experimental, observational, literature review, etc.)
  • Analysis: method (statistical method used for analysis)
  • Source: name (for where or how I discovered the item)
  • Status: reading status (unread, read partially, or read)

I like this approach because it makes it easy to drill down a library collection to the items I need or to rediscover an item I forget the name of. It also reduces some of the cognitive overhead of working with tags by taking advantage of Zotero’s autocomplete when adding tags manually, and alphabetic tag sorting.

Using Zotero for citations in Quarto and R Markdown documents

Quarto and R Markdown can use Pandoc to automatically generate formatted citations and bibliography entries in a number of citation styles, specified with a CSL file. The open source Citation Style Language (CSL) project maintains a crowdsourced GitHub repository with over 10,000 free CSL citation styles.

Use CSL JSON for bibliography files

The native format for Pandoc’s citation processor, citeproc, CSL JSON and it is essential to use .json formatted bibliography files to get correctly formatted citations and bibliography entries. All other bibliography file types (e.g., .bib) are internally converted to CSL JSON—a complex and often lossy process that can result in incorrectly formatted citations.

There are two options for generating a bibliography file from Zotero personal or group libraries in Quarto and R Markdown:

I prefer rbbt because allows you to generate a CSL JSON bibliography file dynamically from a Quarto or R Markdown document, rather than using a persistent file. To insert citations in a document interactively I use rbbt’s “Insert Zotero Citation” RStudio addin from a custom Alt-Command-R keyboard shortcut.