Markdown + Pandoc <3

Paul Götzinger

7.5.2020

What is Markdown

Markdown is a lightweight markup language with plain-text-formatting syntax.

Why you should care

Wall of shame

Syntax

  • Headers
  • Blockquotes

  • Lists
    1. bullet lists
    2. ordered lists
  • Code blocks

    int maint() {
       return 0;
    }
  • Inline code

  • Horizontal rules


  • External link
  • References
  • Emphasis (italic)
  • Strong emphasis (bold)
  • Images:

Markdown variants

  • Common Mark
  • GitHub Flavored Markdown (GFM)
  • GitLab Flavored Markdown (GFM)
  • Pandoc’s Markdown

Extensions

  • Fenced code blocks
  • Tables
  • forced line breaks
  • Task lists
  • Strikethrough
  • Math
  • Metadata blocks

Extension support

Extension CommonMark GFM Gitlab Pandoc
Fenced code blocks X X X X
Tables X X X
forced line breaks X X X X
Task lists X X X
Strikethrough X X X
Math X X
Metadata blocks X X

Pandoc

The ultimative document converter

Why should I care

Inputs:

  • Markdown
  • Html
  • Epub
  • LaTeX
  • Docx
  • Odt
  • org-mode

Outputs:

  • Everything from Inputs
  • AsciiDoc
  • PDF (using pdflatex or other tools)
  • LaTeX Beamer
  • Various HTML presentation frameworks
  • pptx

Use cases

  • direct conversion between differen formats
  • export to pdf
  • creation of ebooks
  • html \(\rightarrow\) markdown \(\rightarrow\) ebook
  • creation of (this) slideshows

Let’s give it a try

The End