Ziamath renders MathML or LaTeX Math expressions as SVG paths using only the Python standard library. Does not require a Latex installation, nor rely on any third party services, but rather uses math-enabled fonts, such as STIXTwoMath-Regular which comes included with Ziamath for use by default. The resulting SVGs are drawn entirely with <path> elements, so the image does not depend on having the font available.


To render from MathML:

import ziamath as zm
     <mi> y </mi>
     <mo> = </mo>
     <mi> f </mi>
     <mo> &ApplyFunction; </mo>
       <mo> ( </mo>
       <mi> x </mi>
       <mo> ) </mo>

To render from Latex:



If you appreciate Ziamath, buy me a coffee to show your support!

Source code is available on Bitbucket.

Ziamath is also used by the Ziaplot and Schemdraw Python packages, and was used for rendering the SVG and PNG equations on MathGrabber.