Skip to content

Features🔗

Resources🔗

Filters🔗

What are pandoc filters?
Pandoc filters are pipes that read a JSON serialization of the Pandoc AST from stdin, transform it in some way, and write it to stdout.
Available filters:

1
2
3
4
RELEASE_URL=https://github.com/pandoc/lua-filters/releases/latest
PANDOC_DIR=~/.local/share/pandoc
curl -LSs $RELEASE_URL/download/lua-filters.tar.gz | \
    tar --strip-components=1 --one-top-level=$PANDOC_DIR -zvxf -
1
- [revealjs-codeblock](Pandoc.md#^eddf73 "revealjs-codeblock")
  • pandocfilters:A python module for writing pandoc filters
    • tikz.py: process raw latex tikz environments into images
  • pandoc-plot: plots from code blocks for Markdown and LaTeX
  • pandocsql: Embed and execute SQL in Markdown

pandoc-crossref🔗

pandoc-crossref: filter for numbering figures, equations, tables and cross-references to them

Mermaid🔗

mermaid-filter: Pandoc filter for creating diagrams in mermaid syntax blocks in markdown docs ^959dc1

1
npm install --global mermaid-filter

Markdown🔗

YAML frontmatter🔗

See Pandoc templates

Presentations and Slide Shows🔗

See https://pandoc.org/MANUAL.html#slide-shows

  • Structuring
    • change heading level to result in new slide: --shift-heading-level-by=-1
  • Incremental lists
  • Pauses
  • Theme: -V theme=moon

reveal.js🔗

See reveal.js

1
pandoc -t revealjs -s slides.md -o slides.html

Filters🔗

revealjs-codeblock: This lua filter overwrites the code block HTML for revealjs output to enable the code presenting features of reveal.js. A custom template is required to include highlight.js (which comes with reveal.js as a plugin). ^eddf73

Converting🔗

See Pandoc documentation

Convert Markdown to HTML

1
pandoc --standalone --metadata title="" file.md -o file.html

optionally use a custom template file for the header/footer.

Templates🔗