Writing workflow: Pandoc scripts
tl;dr I uploaded my Pandoc workflow to GitHub, feel free to use it
Having an unobtrusive workflow is important.
There are things about writing that just take too much time when done by hand. Text formatting and file converting are two that I especially hate. People expect different things. Some want
.pdfs, all complying with a set of strict formatting rules. Often enough a faithful conversion of
.docx means spending hours on fiddling with margins, fonts, and other details. And do not get me started on ‘We want
I think that writing itself should be separated from such mundane worries. While I absolutely love a good-looking document, if you have something to write, then write it and do not worry about the looks. Write in Notepad, in
.txt, in Word, in TeX, whatever. Worry about the final format and aesthetics later.
Pandoc is a command-line universal document converter. Html,
.epub, LaTeX, Markdown,
.doc, anything can be converted to anything. You just need to set some rules.
I uploaded my Pandoc scripts on GitHub. I use Scrivener for most of my writing, but I believe in writing in plain text. So i export my Scrivener projects to Markdown. I set up the script to accept .md file and a .bib file. As most of the times I need a
.tex reference, Pandoc converts
Example, a draft-looking PDF:
A little bit better looking PDF:
.md file just needs to have a title field in the YAML metadata.
If you do not use
.bib for your bibliography, Mendeley and other apps have export to bibtex option. In Mendeley you can make it so that every time you add a record to your library, a .bib file is automatically updated. Symlink that file to Pandoc script’s directory and you are good to go.
I know there are more academic-oriented Pandoc templates (pandoc-scholar), Pandoc automation tools (pandocomatic), and even Scrivener Ruby script for compiling for pandocomatic (scrivomatic). While these are great, they are too robust for my needs.