A collection of support files for use with Pandoc, and specifically for helping to turn pandoc markdown files
into nice HTML, LaTeX, PDF, and Microsoft Word Document output. These files go in your
To install, simply run this command from your Terminal:
git clone https://github.com/smargh/pandoc-templates.git ~/.pandoc
This will clone this repositorty into the appropriate Pandoc templates directory.
templates, some Pandoc templates for an article in PDF (via LaTeX) or HTML. These can be be pointed to directly with the
--template=switch as appropriate. The
xelatex.templatefiles are all forked from KJ Healy’s
pandoc-templates repo. The
reference.docxfile, however, is of my own creation. It can be used via the
--reference-docxpandoc option. The
.docxtemplate uses Hoefler Text as its font. It is double spaced, with small caps headers and 1” indented, single-line block quotes. It works well for academic papers. The
xelatex.templatedepend on the style files in latex-custom-kjh.
marked, a single CSS file for generating HTML previews of Markdown documents using Marked, a very handy HTML live previewer for markdown files. The
cssfile in the
marked/folder is meant to be used together with pandoc and Marked. To have Marked work with Pandoc, simply go to Marked > Preferences > Advanced. Then specify the filepath to Pandoc like this (e.g.):
/usr/bin/pandocand the various switches and arguments to pandoc in the ‘Args’ field below it, like this:
shell -r markdown -w html -s -S --bibliography=biblio.bibThen check the box telling Marked to use this by default. The
pandocCSS file can be added in Marked > Style > Custom CSS. Marked can then use it to format the HTML output such that it looks like the final
- 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.) The
chicago-syllabus.cslfile 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 files are the APA, MLA, and Chicago standard files from the main CSL styles repository.
defaults, you will find all of Pandoc’s standard templates for the many of its output formats. These can be helpful in creating your own templates.
- Finally, under
examples, you will find one plain text Markdown file, one BibTeX
.bibfile and a
.docxfile. These demonstrate how these templates can be used to generate a beautiful Microsoft Word file from Pandoc. To generate the files for youself, use this pandoc command:
shell -r markdown -w docx -s -S --bibliography=Thesis.bib --csl=/Users/smargheim/Documents/GitHub/pandoc-templates/csl/chicago-author-date.csl --reference-docx=/Users/smargheim/Documents/GitHub/pandoc-templates/templates/reference.docx academic_test.txt --output=academic_test.docx