Integrating Zotero and Scrivener

Access: LimitedShow Details
  • This Doc can be read by: Anyone
  • This Doc can be edited by: The Doc author only
  • Comments are visible to: Anyone
  • Comments can be posted by: Logged-in Users
  • History can be viewed by: Anyone
Hide Details

While there is no simple method to get Zotero to integrate with Scrivener, or vice versa, there are three methods that take advantage of at least some of Zotero’s functionality in Scrivener. Scrivener does not have a plugin like the ones available for LibreOffice and MS Word, nor is there ever likely to be one, so using the two programs together will always require some level of kludge.

 

The Essentially Manual Method

You can drag and drop citations into Scrivener footnotes from Zotero, thus avoiding the typing or cut-and-pasting of citation info.

To do this, simply create a footnote pane in Scrivener (Format–>Footnote), and click-and-drag the bibliographic entry from your Zotero collection. The footnote will export in whatever default format you have selected within Zotero using the menu choices Edit–>Preferences–>Export.

 

The Slightly Dynamic Method: RTF Scan

This workflow will export a footnoted manuscript that does not have dynamic, updateable citations, but the citations will refresh any time Scrivener compiles the manuscript, so a new compile after making changes in Zotero will contain the new information. (Of course, that requires you NOT to make other changes in your compiled manuscript, unless you’re willing to go back and input them into the Scrivener project.)

This method requires only what you already have – Zotero and Scrivener. You will use Zotero to put placeholders into your Scrivener document; those placeholders will in turn tell Zotero (when it scans the exported ODF document) where and how to put the formatted citations in. (“Placeholder” isn’t quite the right way to think of it. Really, what you’re doing is inserting the citation formatted in a certain way that the RTF scan will recognize and be able to convert.)

  1. Insert placeholders
  2. Compile Scrivener document as an RTF file
  3. Scan the RTF file using Zotero to replace placeholders with full citations in your chosen style

There are two ways of inserting the placeholders. One requires no setup but does require manual entry; the other requires you to install a little JavaScript file into your Zotero application folder, and then you can drag and drop your citations.

Manual Placeholder Citations

The advantage of this method is that it’s hands-on, and it lends itself to writing with an uninterrupted flow.

Where you need a footnote, you type in a formatted citation like so: {Author, YEAR}. You do NOT use the Scrivener footnote format or field. When you’ve finished, Zotero will go through an RTF file, recognize the curly brackets, and match your short citation to the full citation you have stored in your Zotero folders.

There are a few additional possible formats to use, which you can find here: https://www.zotero.org/support/rtf_scan

Drag-and-Drop Placeholder Citations

To make this option work, you have to install a little extra file into your Zotero installation. It’s very easy! Just go to https://www.zotero.org/styles?q=id%3Artf-scan.

On the page that opens, click on the RTF Scan link, and the file should install automatically into your local copy of Zotero.

Then, choose RTF Scan as your export preference in Zotero’s top menu: Edit–>Preferences–>Export

Now you can drag citations out of Zotero and drop them into your Scrivener doc.

 

The Almost as Good as a Plugin Method

Unlike the other two methods, this one gets Scrivener to export a manuscript with dynamic, sync-able footnotes and endnotes. There are a number of steps to get the framework set up to make it possible, but you only have to do it once. If it’s at all likely that you will have significant updating to do in your citations, this work is worth it.

Here are all the steps:

  1. Install LibreOffice
  2. Install LibreOffice Add-in in Zotero
  3. Install Java Runtime (if not already installed)
  4. Download ODF Scan plugin from Github; in Zotero, enable ODF Scan in Tools–>Add-ons–>settings–>Install Add-on from File
  5. Download Scannable Cite translator; save in Users/yourusername/Zotero/translators. Now choose Scannable Cite from the list of Quick Export options.
  6. In Scrivener, add footnotes by dragging from Zotero.
  7. Compile ms., using ODT as output.
  8. In Zotero, choose Tools–>ODF Scan, choose compiled ms. as input, and give name to output
  9. Open output ms.

That list may seem daunting, but here comes an explanation of each step.

 

1. Install LibreOffice.

LibreOffice is an open-source office tools platform, much like the Word office suite, except free. Because it is open source, it is easy for developers to create plugins that integrate it with other software or extend its functionality. That’s why the workflow for the fullest Scrivener-Zotero integration requires a trip through LibreOffice: The only plugin that has been written to create a dynamic manuscript from Zotero citations, ODT Scan, was written for this program.

LibreOffice is available for Windows, Mac, and Linux at https://www.libreoffice.org/download/download/. I personally use the last stable release, which is (as of December 2020) 6.4.7, rather than the newest version.

2. Install the LibreOffice add-on in Zotero.

This should been installed already when you installed Zotero and restarted (or started) LibreOffice. If there are no Zotero tools in the LibreOffice toolbar, open Zotero, go to Edit–>Preferences–>Cite–>Word Processors, and click “Reinstall LibreOffice Add-in.”

3. Install Java Runtime, if necessary.

If you need to do this step, your computer will prompt you when you try to open LibreOffice for the first time. The process is entirely straightforward – just follow the instructions on your screen.

4. Add ODF Scan to Zotero.

Get the ODF Scan add-on by opening the GitHub project (https://zotero-odf-scan.github.io/zotero-odf-scan/). Click “Download ODF Scan” on the left side of the page. On the page that appears, click the top link (zotero-odf-scan-v2.0.43.xpi) to download the plugin to your computer. DON’T try to open this file. Instead, open Zotero again. In the top menu, choose Tools–>Add-ons. On this page, go up to the gear menu above the list of add-ons; choose Install from File and then find and click on the “zotero-odf-scan-v2.0.43.xpi” file to activate it.

Now there should be an ODF Scan option under the Tools menu. If there isn’t one there, close Zotero and reopen it.

5. Install Scannable Cite.js, if necessary.

The Scannable Cite option should have been installed as a Quick Copy option with the ODF Scan add-on. Sometimes, however, it doesn’t load for reasons no one can explain. Check to see if you have it: Go to Edit–>Preferences–>Export. In the Default Format drop-down menu, Scannable Cite should be found after the list of citation styles, near the end of the list of options.

If it isn’t there, right-click on this link and choose “Save link as…” DON’T click on the link to open it. Save the Scannable Cite.js file in the Zotero translators folder, which you’ll find under Users/your username/Zotero/translators. Restart Zotero, and check the Quick Copy drop-down menu again. Choose Scannable Cite, which should now be there, and you’re ready for the next step.

6. Add your citations.

This part will take as long as writing your paper/thesis/dissertation takes you. Your regular writing workflow will include dragging citations from Zotero to Scrivener, where they’ll appear like this: { | Carroll, 1872 | | |zu:3742221:H96JYAJP}

If you want to amend particular citations, you can do that fairly easily (once you’ve mastered the syntax). For instance, instead of simply (Jones, 2010), you might want your parenthetical citation to read (see Jones, 2010, for a full list of occurrences). You can achieve this by adding to the placeholder using the specific Zotero ODF syntax. Particulars of this can be found on the plugin’s documentation page at https://zotero-odf-scan.github.io/zotero-odf-scan/.

As an example, an often-used amendment may be adding a specific page number for an in-text citation, which you would do by adding it into the placeholder’s third section like so: { | Carroll, 1872 |p. 45 | |zu:3742221:H96JYAJP} If this were output in the CMS 17 author-date style, it would look thus: (Carroll 1872, p. 45).

7. Compile your manuscript as an OpenDocument (.odt) file.

Once your draft is finished in Scrivener, you’ll compile it as an ODT file. You do that by choosing Compile from the File menu. A dialog box will pop up, and next to “Compile for:” you’ll select OpenDocument Format (.odt). (By clicking the down arrow next to the “Format As” field above that, you can select which parts of your Scrivener document you want compiled into your manuscript. If you leave it alone, Scrivener will compile the whole thing.) Scrivener will generate a compiled file, which you’ll save under whatever filename you like.

8. Run an ODF scan with Zotero.

Now open Zotero. Under the Tools menu, choose ODF Scan. Zotero will request that you choose an input file, and you’ll choose the compiled Scrivener manuscript. Zotero will also require you to choose where to save an output file; by default, Zotero names the file the same thing as the compiled manuscript with the addition of “(citations)” to the filename.

9. Open the finished, Zotero’d manuscript.

Open your output file in LibreOffice, and you’ve got a manuscript with citations pulled dynamically from Zotero! You can view the dynamic process by choosing a citation in Zotero, making a change, and then refreshing the file in LibreOffice in the Zotero menu.