A collection of support files for use with Pandoc, and specifically for helping to turn pandoc markdown files into nice HTML, LaTeX, and PDF output. These files go in your ~/.pandoc/
folder and are designed to work with the style and configuration material provided in latex-custom-kjh, socbibs, and the Emacs Starter Kit for the Social Sciences. The only real dependencies are the latex class and style files in latex-custom-kjh, however.
What's included?
-
Some Pandoc templates for an article in PDF (vita LaTeX) or HTML. These go in
~/.pandoc/templates
. These can be be pointed to directly with the--template=
switch as appropriate. Thelatex.template
andxelatex.template
depend on the style files in latex-custom-kjh. -
I preview HTML documents generated by Pandoc using Marked, a very handy HTML live previewer for markdown files. The
css
files in themarked/
folder are meant to be used together with pandoc and Marked. The shell script in themarked/
folder,panmarked.sh
is what I previously had Marked use as a custom processor to create its HTML. You point to it in Marked > Preferences > Behavior. In the current version of the application, Marked 2, this is not needed anymore. You still tell Marked to use pandoc as its custom processor. Go to Marked > Preferences > Behavior. Then specify the file Path to Pandoc like this (e.g.):/usr/bin/pandoc
and the various switches and arguments to pandoc in the 'Args' field below it, like this:-r markdown+simple_tables+table_captions+yaml_metadata_block -w html -s -S --template=/Users/kjhealy/.pandoc/templates/html.template --filter pandoc-citeproc --bibliography=/Users/kjhealy/Documents/bibs/socbib-pandoc.bib
Then check the box telling Marked to use this by default.
-
The CSS files can be added in Marked > Style > Custom CSS. Marked can then use them to format the HTML output.
-
In R, knitr's
knit()
function will turn.Rmd
files into.md
files. The configuration file in theknitr/
folder is an example to help you produce HTML or.tex
using knitr'spandoc()
helper function. -
The CSL files in the
csl/
folder format the bibliography generated by pandoc and citeproc. (For simplicity we avoid dealing with biblatex directly at all.) Thechicago-syllabus.csl
file makes a tiny change to a standard Chicago Notes CSL file so you can use it to output citation information in the body text of a document. This makes it useful for lists of references in CVs and course syllabuses. The other two files are APSA and AJPS standard files from the main CSL styles repository. -
The Makefile in the
makefile/
folder helps you generate HTML, LaTeX, and PDF output from your markdown files in a convenient way. It is meant to go in the folder where you are writing your paper. It looks for.md
files in the working directory and converts them to nice HTML, PDF, and LaTeX files using the templates provided here, the style files in latex-custom-kjh, and the bibliography files in socbibs. You can of course change the bibliography and template files as desired.
Kieran Healy, @kjhealy