Skip to content
A Pandoc AST filter rendering PlantUML code blocks into vector diagrams.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A Pandoc AST filter rendering PlantUML code blocks into vector diagrams.

This filter produces TikZ code that can be rendered as vector diagrams in PDF documents, or as raster graphics by using another filter such as


A PlantUML diagram in an example Pandoc Markdown file

header-includes: \usepackage{tikz}

```{.puml .centered caption="Courtesy protocol" width=\columnwidth}
Bob->Alice : hello
Alice->Bob : hi

Using the helper scripts

java -jar pandoc-filter-plantuml.jar <&0

Can be rendered as a vector resource in a PDF by running:

% pandoc \
         --output=example.pdf \

Or as a raster image using in an HTML document with the following command:

% pandoc \ \
         --output=example.html \


The following rendering options can be supplied as fenced code attributes:

  • .centered: centers the diagram horizontally on the page
  • caption="Some caption": adds a figure caption below the diagram
  • label="somelabel": adds a label to the figure
  • width=\columnwidth and height=100pt: resize the diagram using the \resizebox command, keeping the aspect ration of only one of the two is given


The project can be built using the Gradle build task.

An autonomous jar file can be generated using the jar task.


Copyright (C) 2018 Pacien TRAN-GIRARD

pandoc-filter-plantmul is distributed under the terms of GNU Affero General Public License v3.0, as detailed in the attached file.

Builds of this software embed and make use of the following Libraries:

  • Kotlin Standard Library, licensed under the Apache 2.0 License
  • Jackson JSON processor streaming parser/generator, licensed under the Apache 2.0 License
  • PlantUML, licensed under the GNU General Public License
You can’t perform that action at this time.