Awesome Open Source
Awesome Open Source

Academic Pandoc template

Write beautifully typeset academic texts with distraction-free Markdown and Pandoc.

GitHub issues GitHub forks GitHub stars GitHub license DOI


Getting Started

Read the documentation and make sure you have a Markdown editor like Zettlr and a Bibtex editor like JabRef installed.

Use it online

  1. Fork the academic-pandoc-template
  2. Edit /template/ according to the Markdown guide online, with Zettlr or with your favorite Markdown editor
  3. Edit /template/references.bib online, with JabRef or with your favorite Bibtex editor
  4. Commit your changes
  5. GitHub actions will compile an updated PDF and a DOCX document and store these artifacts

Use it locally

Install all prerequisites

Open your command line and execute the following commands.

pandoc --defaults pdf.yaml
pandoc --defaults docx.yaml


YAML metadata blocks

Pandoc allows to write different variables into the document via YAML metadata blocks in template/

# Front matter
lang: de-CH

# Vowort


Front matter

lang: de-CH # Use language codes like de, de-DE, en, en-UK, en-US, fr, it, ...
title: 'Ein schöner Titel'
subtitle: 'ein wundervoller Untertitel'
author: 'Petra Muster'
date: 30-06-2018
abstract: 'Hier Vorgang ihm als reiße. Ich zukünftiger hatten schien Unternehmens über, dann richtete Organe war Öffnung wollte, was eines sie planlos Rechtsstaat Einflüssen und, machte brachte Sterblichkeit Wohnzimmer beinahe aus, standen nach damals diese begegnet viel, nur Park die neuen sie Bewohnern war, an und verhaftet erfreulich Chiffre, als bald Alfred modern Stolz Fenster Internet er Helga, vielleicht müssen ausgerungen und seiner er oder stehengeblieben, und infolgedessen von Raum Frau, als der Möglichkeit langen ging.'
keywords: 'Schlagworte, Worte'
thanks: 'Herzlichen Dank an Gabriela Muster für die wertvollen Kommentare.'


csl: # See for more styles.
bibliography: references.bib # See for more formats.
suppress-bibliography: false
link-citations: true
color-links: true # See for colors
linkcolor: black
urlcolor: black
citecolor: black
endnote: false


toc-title: 'Inhaltsverzeichnis'
toc: true # Table of contents
toc_depth: 2
lof: true # List of figures
lot: true # List of tables
fontsize: 12pt
linestretch: 1.5
mainfont: # See for fonts
sansfont: # See for fonts
monofont: # See for fonts
mathfont: # See for fonts
documentclass: report # See
classoption: [notitlepage, onecolumn, openany]
geometry: [a4paper, bindingoffset=0mm, inner=30mm, outer=30mm, top=30mm, bottom=30mm] # See for more options

Default files

Pandoc accepts options via default files for PDF-files in pdf.yaml and for Docx-files in docx.yaml.

cite-method: citeproc # citeproc, natbib, or biblatex
citeproc: true
file-scope: false # Parse each file individually before combining for multifile documents. This will allow footnotes in different files with the same identifiers to work as expected. If this option is set, footnotes and links will not work across files.
from: markdown
highlight-style: pygments # kate, monochrome, breezeDark, espresso, zenburn, haddock, tango
input-files: [template/]
log-file: log/pdf.log.json
output-file: output/academic-pandoc-template.pdf
pdf-engine: tectonic # wkhtmltopdf, weasyprint, prince, pdflatex, lualatex, xelatex, latexmk, pdfroff, context
reference-location: block # block, section, or document
resource-path: [template]
standalone: true
to: pdf
top-level-division: chapter # part, chapter, section, or default:

LaTeX snippets

# LaTeX snippets
  - |
    \linepenalty=10 % the penalty added to the badness of each line within a paragraph (no associated penalty node) Increasing the value makes tex try to have fewer lines in the paragraph.
    \interlinepenalty=0 % value of the penalty (node) added after each line of a paragraph.
    \hyphenpenalty=50 % the penalty for line breaking at an automatically inserted hyphen
    \exhyphenpenalty=50 % the penalty for line breaking at an explicit hyphen
    \binoppenalty=700 % the penalty for breaking a line at a binary operator
    \relpenalty=500 % the penalty for breaking a line at a relation
    \clubpenalty=150 % extra penalty for breaking after first line of a paragraph
    \widowpenalty=150 % extra penalty for breaking before last line of a paragraph
    \displaywidowpenalty=50 % extra penalty for breaking before last line before a display math
    \brokenpenalty=100 % extra penalty for page breaking after a hyphenated line
    \predisplaypenalty=10000 % penalty for breaking before a display
    \postdisplaypenalty=0 % penalty for breaking after a display
    \floatingpenalty = 20000 % penalty for splitting an insertion (can only be split footnote in standard LaTeX)
  - |
    \raggedbottom % or \flushbottom
  - |
    % keep figures where there are in the text
  - |
    % add custom hyphentation rules
    \hyphenation{Hyphenate-me-like-this Dontyoueverhyphenateme}

Linting and formatting

Install the latest version of Node and all dependencies.

npm install

To use linting and formatting, use the following commands.

npm run check
npm run format

Conventional Commits

Use Conventional Commits for adding human and machine readable meaning to commit messages. Install commitizen.

npm install commitizen -g

To use Conventional Commits, use the following commands.

npm run commit


This project is maintained by @maehr. Please understand that we won't be able to provide individual support via email. We also believe that help is much more valuable if it's shared publicly, so that more people can benefit from it.

Type Platforms
🚨 Bug Reports GitHub Issue Tracker
🎁 Feature Requests GitHub Issue Tracker
🛡 Report a security vulnerability GitHub Issue Tracker

Built With


No changes are currently planned.


Please read for details on our code of conduct, and the process for submitting pull requests to us.


We use SemVer for versioning. For the versions available, see the tags on this repository.


  • Moritz Mähr - Initial work - maehr

See also the list of contributors who participated in this project.


This project is licensed under the MIT License - see the file for details


Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Editor (32,037
Markdown (28,225
Tex (19,400
Tracker (10,236
Latex (10,068
Github Actions (4,533
Academic (2,410
Pandoc (2,324
Bibtex (1,393
Docx (1,074
Latex Template (1,062
Markdown Converter (138
Pdf Generator (131
Docx Generator (39
Pandoc Template (37
Academic Publishing (30
Tectonics (22