Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
445 lines (263 sloc) 15.3 KB

Write Markdown


# Heading 1

## Heading 2

### Heading 3

#### Heading 4

##### Heading 5


Emphasis, aka italics, with *asterisks* or _underscores_.

Strong emphasis, aka bold, with **asterisks** or __underscores__.

Combined emphasis with **asterisks and _underscores_**.

Strikethrough uses two tildes. ~~Scratch this.~~


1. First ordered list item
2. Another item
⋅⋅* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
⋅⋅1. Ordered sub-list
4. And another item.

⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

* Unordered list can use asterisks
- Or minuses
+ Or pluses


[I'm an inline-style link](

[I'm an inline-style link with title]( "Google's Homepage")

[I'm a relative reference to a repository file](../blob/master/

[You can use numbers for reference-style link definitions][1]

Or leave it empty and use the [link text itself].

URLs and URLs in angle brackets will automatically get turned into links. or <> and sometimes (but not on Github, for example).


Save your image (jpg or png format only) to `template/` and insert it like this:

![Figure caption text](images/example.jpg "Logo Title Text 1")


Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

Table: Table captions are done like this.

There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3


> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.

Quote break.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.


Footnotes are best placed right after the paragraph first used.[^footnote]

[^footnote]: But you can also put them at the end of the document.

If you want to use endnotes instead turn them on in document options.


<!-- Comments are not shown in the final PDF. -->

Citations and bibliographies

Citations JabRef

  1. Open template/references.bib with JabRef.

  2. Insert, delete or modify references (set the CiteKey and memorize it for later use)

  3. Save the file


Add citations to your document

Citations go inside square brackets and are separated by semicolons. Each citation must have a key, composed of ‘@’ + the citation identifier from the database, and may optionally have a prefix, a locator, and a suffix. Here are some examples:

Blah blah [see @doe99, pp. 33-35; also @smith04, ch. 1].

Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].

Blah blah [@smith04; @doe99].

A minus sign (-) before the @ will suppress mention of the author in the citation. This can be useful when the author is already mentioned in the text:

Smith says blah [-@smith04].

You can also write an in-text citation, as follows:

@smith04 says blah.

@smith04 [p. 33] says blah.

Change citations style

Choose a style from the list CSL-Repository (or its corresponding GitHub Repo) and overwrite template/style.csl.


The last heading without any text following will be the heading for the bibliography.

Advanced Formatting (Taken from Pandoc Manual)

The Academic Pandoc Template already comes with a predefined header block in template/ which looks like this:

# 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 Undertitel"
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."

# Bibliography
csl: style.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

# Formatting
toc: true # Table of contents
toc_depth: 2
lof: true # List of figures
lot: true # List of tables
fontsize: 12pt
linestretch: 1.5
mainfont: "Merriweather" # See for fonts
sansfont: "Raleway"
monofont: "IBM Plex Mono"
documentclass: report # See for more classes and options
classoption: [notitlepage, onecolumn, openany]
geometry: [a4paper, bindingoffset=0mm, inner=30mm, outer=30mm, top=30mm, bottom=30mm] # See for more options
  - \clubpenalty10000
  - \widowpenalty10000
  - \interfootnotelinepenalty=10000
  - \usepackage{float} # keep figures where there are in the text
  - \floatplacement{figure}{H} # keep figures where there are in the text

You can easily add, remove or modify these variables by editing the corresponding value.

Variables set by pandoc

Some variables are set automatically by pandoc. These vary somewhat depending on the output format, but include the following:

  • sourcefile, outputfile

    source and destination filenames, as given on the command line. sourcefile can also be a list if input comes from multiple files, or empty if input is from stdin. You can use the following snippet in your template to distinguish them:$if(sourcefile)$ $for(sourcefile)$ $sourcefile$ $endfor$ $else$ (stdin) $endif$Similarly, outputfile can be - if output goes to the terminal.

  • title, author, date

    allow identification of basic aspects of the document. Included in PDF metadata through LaTeX and ConTeXt. These can be set through a pandoc title block, which allows for multiple authors, or through a YAML metadata block:--- author: - Aristotle - Peter Abelard ...

  • subtitle

    document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and Word docx; renders in LaTeX only when using a document class that supports \subtitle, such as beamer or the KOMA-Scriptseries (scrartcl, scrreprt, scrbook).1

  • institute

    author affiliations (in LaTeX and Beamer only). Can be a list, when there are multiple authors.

  • abstract

    document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx

  • keywords

    list of keywords to be included in HTML, PDF, and AsciiDoc metadata; may be repeated as for author, above

  • header-includes

    contents specified by -H/--include-in-header (may have multiple values)

  • toc

    non-null value if --toc/--table-of-contents was specified

  • toc-title

    title of table of contents (works only with EPUB, opendocument, odt, docx, pptx)

  • include-before

    contents specified by -B/--include-before-body (may have multiple values)

  • include-after

    contents specified by -A/--include-after-body (may have multiple values)

  • body

    body of document

  • meta-json

    JSON representation of all of the document’s metadata. Field values are transformed to the selected output format.

Language variables

  • lang

    identifies the main language of the document, using a code according to BCP 47 (e.g. en or en-GB). For some output formats, pandoc will convert it to an appropriate format stored in the additional variables babel-lang, polyglossia-lang (LaTeX) and context-lang (ConTeXt).Native pandoc Spans and Divs with the lang attribute (value in BCP 47) can be used to switch the language in that range. In LaTeX output, babel-otherlangs and polyglossia-otherlangsvariables will be generated automatically based on the lang attributes of Spans and Divs in the document.

  • dir

    the base direction of the document, either rtl (right-to-left) or ltr (left-to-right).For bidirectional documents, native pandoc spans and divs with the dir attribute (value rtl or ltr) can be used to override the base direction in some output formats. This may not always be necessary if the final renderer (e.g. the browser, when generating HTML) supports the Unicode Bidirectional Algorithm.When using LaTeX for bidirectional documents, only the xelatex engine is fully supported (use --pdf-engine=xelatex).

Variables for slides

Variables are available for producing slide shows with pandoc, including all reveal.js configuration options.

  • titlegraphic

    title graphic for Beamer documents

  • logo

    logo for Beamer documents

  • theme, colortheme, fonttheme, innertheme, outertheme

    themes for LaTeX beamer documents

  • themeoptions

    options for LaTeX beamer themes (a list).

  • navigation

    controls navigation symbols in beamer documents (default is empty for no navigation symbols; other valid values are frame, vertical, and horizontal).

  • section-titles

    enables on “title pages” for new sections in beamer documents (default = true).

  • beamerarticle

    when true, the beamerarticle package is loaded (for producing an article from beamer slides).

  • aspectratio

    aspect ratio of slides (for beamer only, 1610 for 16:10, 169 for 16:9, 149 for 14:9, 141 for 1.41:1, 54 for 5:4, 43 for 4:3 which is the default, and 32 for 3:2).

Variables for LaTeX

LaTeX variables are used when creating a PDF.

  • papersize

    paper size, e.g. letter, a4

  • fontsize

    font size for body text (e.g. 10pt, 12pt)

  • documentclass

    document class, e.g. article, report, book, memoir

  • classoption

    option for document class, e.g. oneside; may be repeated for multiple options

  • beameroption

    In beamer, add extra beamer option with \setbeameroption{}

  • geometry

    option for geometry package, e.g. margin=1in; may be repeated for multiple options

  • margin-left, margin-right, margin-top, margin-bottom

    sets margins, if geometry is not used (otherwise geometry overrides these)

  • linestretch

    adjusts line spacing using the setspace package, e.g. 1.25, 1.5

  • fontfamily

    font package for use with pdflatex: TeX Live includes many options, documented in the LaTeX Font Catalogue. The default is Latin Modern.

  • fontfamilyoptions

    options for package used as fontfamily: e.g. osf,sc with fontfamily set to mathpazoprovides Palatino with old-style figures and true small caps; may be repeated for multiple options

  • mainfont, sansfont, monofont, mathfont, CJKmainfont

    font families for use with xelatex or lualatex: take the name of any system font, using the fontspec package. Note that if CJKmainfont is used, the xecjk package must be available.

  • mainfontoptions, sansfontoptions, monofontoptions, mathfontoptions, CJKoptions

    options to use with mainfont, sansfont, monofont, mathfont, CJKmainfont in xelatex and lualatex. Allow for any choices available through fontspec, such as the OpenType features Numbers=OldStyle,Numbers=Proportional. May be repeated for multiple options.

  • fontenc

    allows font encoding to be specified through fontenc package (with pdflatex); default is T1(see guide to LaTeX font encodings)

  • microtypeoptions

    options to pass to the microtype package

  • colorlinks

    add color to link text; automatically enabled if any of linkcolor, citecolor, urlcolor, or toccolor are set

  • linkcolor, citecolor, urlcolor, toccolor

    color for internal links, citation links, external links, and links in table of contents: uses options allowed by xcolor, including the dvipsnames, svgnames, and x11names lists

  • links-as-notes

    causes links to be printed as footnotes

  • indent

    uses document class settings for indentation (the default LaTeX template otherwise removes indentation and adds space between paragraphs)

  • subparagraph

    disables default behavior of LaTeX template that redefines (sub)paragraphs as sections, changing the appearance of nested headings in some classes

  • thanks

    specifies contents of acknowledgments footnote after document title.

  • toc

    include table of contents (can also be set using --toc/--table-of-contents)

  • toc-depth

    level of section to include in table of contents

  • secnumdepth

    numbering depth for sections, if sections are numbered

  • lof, lot

    include list of figures, list of tables

  • bibliography

    bibliography to use for resolving references

  • biblio-style

    bibliography style, when used with --natbib and --biblatex.

  • biblio-title

    bibliography title, when used with --natbib and --biblatex.

  • biblatexoptions

    list of options for biblatex.

  • natbiboptions

    list of options for natbib.

  • pagestyle

    An option for LaTeX’s \pagestyle{}. The default article class supports ‘plain’ (default), ‘empty’, and ‘headings’; headings puts section titles in the header.