Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

aafigure extension for Python Markdown

Project description

Markdown aafigure

This is an extension for Python Markdown which renders diagrams using aafigure.


MIT License Supported Python Versions PyCalVer v201904.0005 PyPI Version PyPI Downloads

Code Quality/CI:

Build Status Type Checked with mypy Code Coverage Code Style: sjfmt

Name role since until
Manuel Barkhau ( author/maintainer 2018-05 -

INFO: You may want to consider using the markdown-svgbob extension instead of this one. svgbob has an online editor and supports a wider range of shapes and diagrams. Its main disadvantage is that it "only" has builtin support for x86_64 on Windows, Linux and Mac, in contrast to aafigure which is pure python and supported everywhere.


$ pip install markdown-aafigure
$ pip install Pillow    # only if you want to render as png


In your markdown text you can define the block:

      +-----+   ^
      |     |   |
  --->+     +---o--->
      |     |   |
      +-----+   V

Parameters can be set for individual figures. Availabale parameters

```aafigure {"foreground": "#ff0000"}
      +-----+   ^
      |     |   |
  --->+     +---o--->
      |     |   |
      +-----+   V


$ git clone
$ cd markdown_aafigure
$ make install
$ make lint mypy test

MkDocs Integration

In your mkdocs.yml add this to markdown_extensions.

  - markdown_aafigure:
      tag_type: inline_svg

Valid options for tag_type are inline_svg (the default), img_utf8_svg, img_base64_svg, img_base64_png.

Changelog for


  • Add: Support for inline svg
  • Add: tag_type option for better control of embedding
  • Depricated: format parameter


  • Add: Support of format: png extension configuration (requires Pillow)
  • Fix: Use base64 encoding for image uri


  • Fix #3: escape xml in image data uri
  • Fix: cleanup debug output
  • Change: Move to
  • Change: Switch to pycalver
  • Change: Project packaging updates

0.2.0 (2018-05-28)

  • Initial release

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
markdown_aafigure-201904.5-py2.py3-none-any.whl (7.6 kB) Copy SHA256 hash SHA256 Wheel py2.py3
markdown_aafigure-201904.5.tar.gz (10.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page