Render LaTeX markup and equations to compact, self-aligning, scalable SVG (Python3 & commandline)
Python wrapper and CLI utility to render LaTeX markup and equations as SVG using
dvisvgm and svgo.
Based on the original work by Tino Wagner, this version has enhanced features.
The design goals are:
- Auto vertical alignment without any further styling.
- by adding a
style="vertical-align:"
to the SVG attributes
- by adding a
- Auto scaling on font size/zoom change.
- by using
em
units forwidth
,height
andstyle
- by using
- Unique IDs so multiple SVGs on one page won’t corrupt each other.
- by generating random 4-character ID prefixes within the SVG
- Minified SVG for direct inclusion.
- by using
svgo
(a Node app)
- by using
- For e-book readers and dictionaries:
- Good legibility.
- Direct inclusion as
, not necessarily
.
- Possibility for easy CSS styling, i.e. using
fill
. - Compatibility with
pyglossary