I'm working on the same problem.
I've coded the equations as LaTeX formulae out of force of habit. I'll probably retain the Latex for the pure ASCII version, use
itex2MML to convert to MathML to futureproof it, and use
pmml2svg to convert the MathML to SVG for an epub2 version.
I might also use
dvisvg to convert the LaTeX directly to SVG.