This repository contains several filters to be used with Pandoc, the excellent document processing system that converts several text markup formats. These Pandoc filters were created in Python using the Panflute library and are called by Pandoc during the conversion process, resulting in transformations of the final source. Several useful filters can be found at:
- Pandoc Filters
- jgm/pandocfilters: A python module for writing pandoc filters, with a collection of examples
- sergiocorreia/panflute-filters: Pandoc filters that use Panflute
- pandoc/lua-filters: A collection of lua filters for pandoc
- ickc/pantable: CSV Tables in Markdown: Pandoc Filter for CSV Tables
In short, the filters in this repo are:
adoc-admonitions.py
- Simplified syntax to create admonition boxes to present notes, warnings, tips, etc.
beamer-twocol.py
- Specific for generating slides with LaTeX beamer, adding an easier syntax to create content in two columns
divs-to-latex.py
- This is a LaTeX (beamer) specific filter transforming Markdown's fenced Divs into latex environments. An alternative is chdemko/pandoc-latex-environment: Pandoc filter for adding LaTeX environment on specific div
super-links.py
- Facilitate the creation of links using a configurable and alternative syntax
-
Install python 3 (version >3.9 required) and pandoc
-
Install Panflute python libraries
pip3 install panflute
-
Download and place the file in directory:
~/.pandoc/filters
- See Pandoc User’s Guide instructions at (
-F PROGRAM, --filter=PROGRAM
)
- See Pandoc User’s Guide instructions at (
pandoc -s test.md -t beamer --filter adoc-admonitions.py
pandoc -s test.md -t html -F super-links.py
- See Pandoc User’s Guide instructions at (
-F PROGRAM, --filter=PROGRAM
)
Prof. Georgios Pappas Jr
University of Brasilia (UnB) - Brazil