A basic template to make Pandoc-generated PDFs look better.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



This repo contains a Latex template file for Pandoc to generate a decent looking PDF right off the bat. If you have any recommendations, or tweaks to make it better, please let me know. I would love to hear from you.

A sample PDF can be seen at sample/The Name of the Document.pdf.


  • pandoc
  • A TexLive package.

Note: On a Mac, I used BasicTex with the packages below installed using tlmgr.

Tex Packages:

  • tocloft
  • textpos
  • changepage
  • titling
  • placeins
  • lastpage
  • sectsty


pandoc --latex-engine=xelatex --template={/path/to/w8sPDF.template} -V subject="{subject}" -V keywords="{keywords}" -V today="{today}" -V subtitle="{subtitle}" -V draft="{draft}" -V color="{color}" -V iconpath="path/to/icon.png" -V brandingpath="path/to/brandingfile.eps" -f markdown+auto_identifiers --toc -o "{subtitle}.pdf" {mdfile}"

Helper Script

I included a Python script that will run the above command using keywords you define in the script. I find it's a bit easier to use that.

To run it cd into sample and run python generation_script.py.