In this post, I want to show you how to set up a very basic system for academic writing in Obsidian. This will be a step-by-step guide, where we start with an empty vault, and enable the following features:
- Adding literature references, which are organized in Zotero, to a Markdown text.
- Exporting this Markdown text to Microsoft Word’s DOCX1 format, including an automatically generated bibliography.
Requirements
For what follows I assume, that you have the following tools installed:
The following instructions are written on a system using Microsoft Windows 11, but none of the tools are strictly platform dependent. All this is also possible on both macOS and your favorite Linux distribution.
To keep this blog post focused, I will assume, that you are already a bit familiar with Obsidian and Zotero.
Use citations from Zotero in Obsidian
In order to make your Zotero play nicely with the Obisidian plugin that we will be using, you need to install the Better BibTex plugin in Zotero: Installation - Better BibTeX for Zotero (retorque.re). If you are unfamiliar with the process of installing Zotero plugins, be sure to download the latest version in XPI format and follow the installation instructions at the link above.
Export the Zotero library in BibTeX format
Once the plugin is installed, create BibTeX based export of your library by performing the following steps:
-
Click
[File]
>[Export Library]
: -
Make sure you set the Format to
Better BibLaTeX
-
Tick the
Keep updated
boxYou will be prompted to choose a file location under which you want to save the file. I prefer to use the path
%AppData%\Roaming\obsidian
under Windows, but it can really be any path that you like.
Enable and configure the citation plugin in Obsidian
In Obsidian, go to settings and enable Community plugins. Once that is done, click [Browse]
and search for the “Citations” plugin by Jon Gauthier:2
Click [Install]
> [Enable]
> [Options]
to install and enable the plugin and to open the settings screen. In the settings do the following:
- Change the value of
Citation database format
toBibLaTeX
- Change the value of
Citation database path
to the full path of the BibLaTex File that you have exported above.
Close the settings and open the Obsidian command palette to run Citations: Refresh citation database
.
Insert your first citation
Now that Zotero and Obsidian are configured, create a new markdown file and do the following:
- Place the cursor anywhere in the file
- From the command palette run
Citations: Insert Markdown citation
- This will show a popup from which the citations can be selected.
- Hit enter to select any of the citations.
This will insert the citation key in the Pandoc Citation syntax: [@key]
. See the linked documentation for how this syntax works. The following patterns are what I personally use most of the time:
- Citation with page number:
[@smith1992, p. 12]
- Citation with page number and footnote
[@smith1992, p. 14, fn. 2 ]
- Multiple citations with page number:
[@smith1992, p. 12; @jones1992, p. 5]
- Inline citation
"According to @smith1992 bla..."
Citations: Insert markdown citation
command. I am using Ctrl-O
Export a markdown document with citations to MS Word
Now let’s see our system in action, by exporting it to a more familiar format. To makes this happen, you need to make sure, that you have Pandoc installed.
In Obsidian, go to settings and then Community plugins. Click [Browse]
and search for the “Pandoc” plugin by Oliver Balfour.
Click [Install]
> [Enable]
> [Options]
to install and enable the plugin and to open the settings screen. In the settings, do the following:
-
Change the value of
Export files from HTML or markdown
toMarkdown
-
Add the following to “
Extra Pandoc Arguments
:-s --toc --citeproc --metadata bibliography="C:\Users\YOURUSER\AppData\Roaming\obsidian\MyLibrary.bib"
-
Use as the Path to the bibliography the full path to your BibLaTex file.
-
Again, make sure that the path does not contain spaces.
-
Go to the document that has the citations from an earlier step.
- From the command menu choose “Pandoc Plugin: Export as Word document”
- This creates a DOCX file, that will have the BibLaTex references expanded to literature citations and builds a Reference list at the end of the file.
Extra: Make reference keys easier to read in Obsidian
-
Install the Pandoc Reference List Plugin by mgmeyers:
- Enable and open the options
- Set the “path to the bibliography file” to your exported BibLaTeX file
Extra: Use a specific citation style
- Default CSL is Harvard
- You might need to use IEEE
-
Or a lot of other output formats like LaTeX or EPUB. But we stick with Word for now, as that is what I assume most people are familiar with. ↩︎
-
The Zotero integration plugin (mgmeyers/obsidian-zotero-integration) also seems to be a popular choice. For this post, I will focus on the citation plugin, as this is the only one that I currently have experience with. ↩︎