Library wrapper of Mathematical for Asciidoctor
Latest commit cd67650 Jan 9, 2017 Tobias Stumm New version to remove dev-Tag


Alternative stem processor for asciidoctor based on Mathematical.


asciidoctor-mathematical processes latexmath and stem blocks and inline macros and replaces them with generated SVG or PNG images, thus enables stem contents on a much wider range of asciidoctor backends. Currently, it is tested to works well with the html, docbook, pdf and latex backends. For stem blocks and macros, only the latexmath type is supported.

Package Specific Attributes

These attributes can be set to tweak behaviors of this package:

attribute description valid values default value
mathematical-format format of generated images svg, png png
mathematical-ppi ppi of generated images, only valid for png files any positive number 300.0


asciidoctor-pdf -r asciidoctor-mathematical -o test.pdf sample.adoc


asciidoctor-mathematical is now available on RubyGems. Installation is done by gem install asciidoctor-mathematical. Install dependencies first.


make, gobject, glib, gio, gdk-pixbuf, gdk, cairo, pangocairo, libxml, bison, flex

For the runtime, the following ttf fonts should be installed: cmr10, cmmi10, cmex10 and cmsy10. They are provided by the lyx-fonts package in fedora, and the ttf-lyx package in debian/ubuntu.


Make sure you brew install glib gdk-pixbuf cairo pango cmake

You can install the font dependencies by using

cd ~/Library/Fonts
curl -LO \
     -LO \
     -LO \
     -LO \
     -LO \
     -LO \
     -LO \

If you experience any compilation errors (caused by Mathematical) try running: brew link gettext --force (you can unlink the libraries later if you want).


sudo apt-get -qq -y install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev ttf-lyx