Title: Pandoc Pelican Practice Date: 2016-04-10 Modified: 2016-04-10 Category: Tags: meta, colophon, workflow Slug: workflow Authors: Carl Reynolds Summary: Carl's Pandoc Pelican Practice Image: https://s-media-cache-ak0.pinimg.com/736x/c4/8b/fe/c48bfed346eeb72df0d2418a809c7756.jpg
bibliography: /home/sam/Dropbox/Documents/myblog/content/computers/IPFAEA.bib csl: /home/sam/Dropbox/Documents/myblog/content/computers/the-new-england-journal-of-medicine.csl
This is written in a thingy called markdown It's good because in addition to letting you do links and being easy to read and type you can do lists and things. (it's then made into a blog by running pelican on the content and pushing it to my githubs...)
- Like this
- List of things
- blah blah
Or you can do points
- point one
- point two
And you can include pictures from the interweb
And stress things lots etc etc. I haven't really yet learnt all the markdown things one can do but what really makes it ace is there is then a thingy called pandoc that converts this thingy into all the other things.
Yup. And footers are a thing too1
For example if we save this as Cppp.md we can then run the command
'pandoc Cppp.md -o Cppp.doc'
to make a word doc. Just change the '.doc' for '.pdf' or '.html' etc and you can have that too. Examples attached. I think it's quite good anyway....Note that actually to get a .doc/.pdf/.html with citations the command is different (see below).
A major feature in support for inline html and referencing using whatever you like [@Albin1999]. Here I'm using my asbestos researches bibliography file 'IPFAEA.bib' specified above in the metadata and specifying that it be formatted for the nejm.
To make a pdf the command becomes:
'pandoc Cppp.md --filter pandoc-citeproc -o Cppp.pdf'
To make a doc the command becomes:
'pandoc Cppp.md --filter pandoc-citeproc -o Cppp.docx'
And it can make tables using a variety of input formats (that you'd automagically generate using a tool) e.g grid table
+---------------+---------------+--------------------+ | Fruit | Price | Advantages | +===============+===============+====================+ | Bananas | $1.34 | - built-in wrapper | | | | - bright color | +---------------+---------------+--------------------+ | Oranges | $2.10 | - cures scurvy | | | | - tasty | +---------------+---------------+--------------------+
It's even useful for making slides. Just need to stick reveal.js folder in the same directory as the markdown then run e.g pandoc -t revealjs --self-contained -s Cppp.md -o Cppp.html
Note that a thing which isn't quite right (yet) is that the metadata needs to be structured as above for pelican but for pandoc all the things need to be enclosed between ---
Footnotes
-
totally a supported thing. ↩