Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fractaledmind/pandoc-templates

Some elementary templates and css files for Pandoc, especially for .docs
https://github.com/fractaledmind/pandoc-templates

Last synced: 2 months ago
JSON representation

Some elementary templates and css files for Pandoc, especially for .docs

Awesome Lists containing this project

README

        

# Pandoc Configuration and Support Files

## Description

A collection of support files for use with [Pandoc](http://johnmacfarlane.net/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 `~/.pandoc/` folder.

## Installation

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.

## Notes

What's included?

+ Under `templates`, some [Pandoc](http://johnmacfarlane.net/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 `html.template`, `latex.template`, and `xelatex.template` files are all forked from KJ Healy's `[pandoc-templates repo](https://github.com/kjhealy/pandoc-templates)`. The `reference.docx` file, however, is of my own creation. It can be used via the `--reference-docx` pandoc option. The `.docx` template uses [Hoefler Text](http://www.typography.com/fonts/hoefler-text/overview/) 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 `latex.template` and `xelatex.template` depend on the style files in [latex-custom-kjh](http://kjhealy.github.com/latex-custom-kjh/).
+ Under `marked`, a single CSS file for generating HTML previews of Markdown documents using [Marked](http://marked2app.com/), a very handy HTML live previewer for markdown files. The `css` file in the `marked/` folder is meant to be used together with pandoc and [Marked](http://markedapp.com/). To have [Marked](http://marked2app.com/) work with [Pandoc](http://johnmacfarlane.net/pandoc/), simply go to Marked > Preferences > Advanced. Then specify the filepath 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 -w html -s -S --bibliography=biblio.bib
```
Then check the box telling Marked to use this by default. The `pandoc` CSS 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 `.docx` file will.
+ 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.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 files are the APA, MLA, and Chicago standard files from the main [CSL styles repository](https://github.com/citation-style-language/styles).
+ Under `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 `.bib` file and a `.docx` file. 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:
```
-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
```

## Contact
Stephen Margheim, `[email protected]`