Scrivener for Scientific Writing — setup

Andrzej Wodecki
4 min readDec 17, 2019


Photo by Alejandro Escamilla on Unsplash

Below please find my final setup for writing a scientific paper/book. Although my requirements seemed to be clear&simple, it took me app. 40 hours to put everything together. And here it is: my final set-up ready :)

My needs

I want my system to support me in:

  1. Managing scientific sources and citations
  2. Insert and enumerate simple equations
  3. Export the final document to MS Word docx format, keeping all Styles (like headings).


  1. Storing all documents and drafts: Google Drive
  2. Managing scientific sources: Zotero (
  3. Making notes and structuring content: MindManager (
  4. Writing: Scrivener (
  5. Exporting: Pandoc (

My Workflow

Initiate the project

  1. set-up a Google Drive folder and create subfolders: {book title},… {book chapters}…, setup
  2. set-up a Zotero folder for all needed resources {book title}
  3. export this folder to Setup Google Drive folder in a BibTex format using Better Bibtex plugin (how to can be found in points 1–5 here) > mylibrary.bib
  4. in the Setup Google Drive folder store: a docx template for Your book (with all proper styles), mylibrary.bib and Your preferred citation style (choose sth from, eg.

Managing knowledge sources

  1. Gather all necessary knowledge resources (books, papers, websites, reports etc.) using Zotero web plugin, it’s ISBN search or just drag&drop files from Your folders
  2. Organize them using TAGS
  3. Make notes: annotate PDFs and then export notes to Zotero using ZotFile, integrate the most important notes into MindManager
  4. Make draft structure (paragraph-detail level) in MindManager


  1. organize all the writing in Scrivener using folders
  2. control targets and writing progress with meta-tags
  3. compile to docx via MultiMarkdown and Pandoc (see compile presets below).



  1. Install Zotero (from

2. Install useful plugins:

  • Better Bibtex plugin (see installation instructions here) > to export Your reference library as a BibTex file
  • ZotFile > for efficient PDF management, especially exporting annotations from PDF to Zotero

3. Install Zotpick-applescript > for a possibility of calling Zotero citation during writing with a single click:


I suggest to purchase it directly from — an AppStore version has some limitations.


For markdown to docx conversion.

  1. from the terminal with brew install pandoc or from this page.
  2. Additionally, install the following pandoc extensions
  • pandoc-citeproc: for managing citations. Installation instructions here, or:

brew install pandoc-citeproc

  • pandoc-eqnos: for enumerating equations. Installation instructions here, or pip install pandoc-fignos


The only, and the most difficult to, setup you need is Scrivener.

(suggested, but not required): import my Scrivener preferences and theme settings from scrivener settings GitHub folder

Compile presets. This is the most important — magic happens here!

From scrivener settings import My Markdown.scrformat.

  • click File > Compile
  • drag and drop My Markdown.scrformat into the Formats panel on the right. Choose “My Formats” option

To see it’s presets: right-click > Edit. I made a lot of changes to Styles, basing mostly on Scrivomatic MarkDown exports (see:

The most important settings are in the Processing script. It took me app 30 hours to get there :). When you click Processing > Edit Script you will see sth like that:

The script itself is below (for Your Copy-Paste convenience — some fine tuning will be necessary):

filename=$(basename "$fullfilename")
pandoc --filter pandoc-citeproc --filter /Applications/Anaconda/anaconda/bin/pandoc-eqnos --bibliography '/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/mylibrary.bib' --csl '/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/ee.csl' $filename -f markdown-auto_identifiers+tex_math_dollars --reference-doc '/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/MS Word - Cambria.docx' -o $fname.docx

IMPORTANT: update paths to Your local settings:

/Applications/Anaconda/anaconda/bin/pandoc-eqnos <<< Your pandas-eqnos installation. Attention: I don’t know why, but even if pandoc-eqnos works perfect from Your terminal, here the full path is needed…

/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/mylibrary.bib — this is a path to Your Google Drive/…/setup/mylibrary.bib file.

/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/ee.csl — this is a path to Your Google Drive/…/setup/{preferred style sheet} file.

/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/MS Word — Cambria.docx — this is a path to Your Google Drive/…/setup/{preferred docx style} file.

That’s it! It should work, although it may be very cumbersome…


Create a New Scrivener Project

Write something


  • Compile for: MultiMarkdown
  • Choose Presets: My Markdown

My Example

I put one example on my GitHub folder:

  1. Open draft project from the main GitHub folder
  2. Compile
  3. And check the output.

Useful resources

My inspirations:

Zotero, Markdown and Pandoc:

All videos on Zotero, Markdown and Pandoc from Nicholas Cifuentes-Goodbody, starting from Great!

Scrivener has its own really great tutorials here.

My Github project with all the files

Happy writing :)