term | definition |
---|---|
Plugin | A plug-in (or plugin, add-in, addin, add-on, or addon) is a software component that adds a specific feature to an existing computer program. ([Wikipedia] |
Zotero Integration with Obsidian
Academic Workflow
In the first part of this annotation tutorial, I have described the different annotation types in Zotero version 7 and how to use them. In this second part, I will explain a simple method for importing Zotero annotations into Obsidian. These Obsidian notes will link to the source of the annotation (quote) in Zotero.
These backlinks are essential because one cannot always remember the original context of the citation. Especially if the creation of the annotation happened long ago or if the original purpose of the quote for a specific publication/research issue has changed, you need to check and reassess the context of the quote. Only by looking up the annotation in the source document can you prevent redundant and superfluous information from remembering the context of the quote.
After reading and annotating, it is crucial to elaborate on the highlighted content. The general strategy is to add, reformulate, and include the citations in the paper that is in progress. Whatever these changes are in the initial annotations, it is vital for an efficient workflow to always have a reference to the original position of the citation.
There are two strategies for the integration of your “research assistant” (Zotero) with your note-taking app (Obsidian):
- Creating a note inside Zotero and importing it into Obsidian (this post).
- Extracting all annotation directly from the document programmatically (the third part of the annotation tutorial).
In both cases, you need to install two plugins: Better BibTeX in Zotero and Zotero Integration in Obsidian.
Notes in Zotero
Child and Standalone Notes
Zotero knows two types of notes. (The type names are my inventions to facilitate the explanation):
- Child Note or Items Note belongs to the item where it was created. It lives inside the Zotero item.
- Standalone Notes lives in the appropriate Zotero item collection but does not belong to any specific Zotero item. This note type is helpful for writing notes for multiple items.
Only the child note is an annotation because it fulfills the requirement of the annotation: It is anchored to specific text – even if it consists itself of (a collection of) annotations.
Both types of notes can be created either as individual notes or as a note that collects all highlights:
- Individual note: This is a new, empty note item. You can write your text into the note directly or drag and drop annotations from the left column.
- Highlights note: This note collects and copies all content created with the annotation types, as mentioned earlier. You are always free to add or change the note content.
The distinctions between child and standalone notes are not carved in stone, as you can always drag a standalone note into an appropriate Zotero item, and so it converts into a child note. You can also drag the child note as an item itself in the Zotero middle pane, and so it converts into a standalone note.
You can create as many notes as you want. However, only child notes will be imported into Obsidian using the Zotero Integration plugin.
How to create a child note
Add Note from Annotations
- Select the Zotero item or the document (PDF, ePUB-eBook, website snapshot) inside the Zotero item.
- Open the context menu (right mouse click on my installation)
- Select “Add Note from Annotations”
Add (empty) Note
- Select the Zotero item (not the document).
- Open the context menu (right mouse click on my installation)
- Select “Add Note”
To repeat: An “child note” is a note that is sorted under a Zotero item, independently of where it was created initially.
We generate child notes as the easiest way to export notes into Obsidian. This has the disadvantage that changes in the Zotero annotations need another export to Obsidian. We will, therefore, cover in the third part of the tutorial an alternative, a more complex way where the Obsidian plugin extracts the annotations programmatically from the Zotero document.
Installing Plugins
Better BibTeX and Zotero Integration
For the import of annotations into Obsidian, we need two plugins. At the side of Zotero Better BibTeX and in Obsidian the Zotero Integration.
- Better BibTex makes it easier to manage bibliographic data, especially for people authoring documents using a text-based tool chains (e.g., based on LaTeX / Markdown). This plugin has a rich functionality, but we are using it for the Obsidian-Zotero integration just for one feature: To create a file with citations and consistent pandoc cite keys.
- Zotero Integration does the main work: It inserts and imports citations, bibliographies, notes, and PDF annotations from Zotero into Obsidian. For this functionality, it needs the installation of the Better BibTeX plugin as an enhancement for Zotero.
Install “Better BibTeX”
To install a plugin in Zotero, download its
.xpi
file to your computer. Then, in Zotero, click “Tools → Add-ons” and drag the.xpi
onto the Add-ons window. (Plugins for Zotero)
To find the latest version of the Better BibTeX .xpi
file click at this link here.
For a more detailed installation procedure see here.
Install “Zotero Integration”
In Obsidian, open Settings; on the left, under Options, open Community Plugins, on Community Plugins, select Browse and search for ‘Zotero Integration’ (Help, How do I install the Plugin?).
For more details, especially troubleshooting the installation, see the README file of Better BibTeX.
Zotero Integration Settings
Introduction
The last task is to adapt the settings of the Obsidian Zotero Integration plugin.
- Open Preferences with the menu “Obsidian → Preferences…” or
CMD+,
(macOS) /CTRL+,
(Windows). - Scroll the left column down to “Zotero Integration” and select this plugin.
You will get a window with content similar to that in Figure 2. The look may differ depending on the Obsidian theme you are using. (I am using Cybertron)
The configuration setting page for the “Zotero Integration” plugin is complex. It consists of four parts:
- General Settings
- Citation Formats
- Import Formats (see third part of the annotation tutorial) and
- Import Image Settings
Although there are many preferences for the simple import method used in In this post, we will only need to complete the general settings.
General Settings
The first two settings provide the path to the main utility program for extracting data from PDFs. pdfannots2json.js should work immediately after the installation of the “Zotero Integration” plugin. Otherwise, you must download the tool and provide a path to it.
In the third field, you specify the program you will use. The plugin supports Zotero and the Jurism project, specializing in legal research, and is also based on the Zotero reference manager. For advanced usage, you also have the option to specify a custom port number. The default port where Zotero is listening to 23119
. You don’t need to change it in a standard configuration. Only for a special Zotero configuration, e.g., when using Zotero on a terminal server, you must provide another port number.
In the following field, you specify the path in Obsidian where the Zotero annotations should be stored. I have used with “zotero” a subdirectory of “annotation” because I have with Calibre another app where I am importing annotations into Obsidian.
The following two fields determine if Obsidian should open the imported file and in the case, you have imported several at once, which of the imported files.
The last option of the general settings is enabling the concatenation of annotations. This feature could be nice if your highlight is spread over two PDF pages. I tried it out, but it didn’t work for me.
Import Annotation into Obsidian without Template
For this procedure, you need to create the annotation file in Zotero manually, as I have already explained in Section 2.2.1.
- Now change to Obsidian and choose either “Import notes” or “Insert notes into the current document” from the command palette. If you attach shortcuts to these procedures, you don’t need to call the command using the Obsidian palette.
- You have to wait until a window with the Zotero database appears, where you can select the appropriate Zotero item. All note files inside the Zotero item will be exported. The first command (“Import notes”) creates a new file; the second command inserts the annotations into the cursor position of the current Obsidian document.
- The results are annotations with two links: “Go to annotation” and the citation using the appropriate Zotero citation style. “Go to annotation” opens the PDF and jumps to the annotation’s location in the original document. The citation link selects the appropriate bibliography item in the Zotero middle pane.
Summary
In this post, I have explained how to integrate your “research assistant.” tool Zotero with the note-taking app Obsidian.
Import Annotations from Zotero into Obsidian (without template)
- Highlight or use other annotation methods in Zotero as explained in the first part of this tutorial.
- Create a note with the annotations in Zotero.
- Install the necessary plugins: Better BibTeX in Zotero and Zotero Integration in Obsidian.
- Complete the ’General Settings” part of the “Zotero Integration.” plugin in Obsidian.
- Choose either “Import notes” or “Include notes into current document” into Obsidian.
- Wait for the Zotero dialog window and choose the Zotero item with the annotations.
- Inspect the imported file content and test the links.
You can now elaborate on your notes using all the advanced features Obsidian offers!
In the third part of the annotation tutorial, I will explain how to use templates to programmatically extract annotations from Zotero documents. This has several advantages, but it is more complex to apply.
Are you satisfied with our result from this second part of the tutorial? Then, you can skip the last part or read it later when the need for better management of your different types of annotation arises.