generating equation representations in python/on the web
Is it possible to take something like x^2+5 and have it generate this: http://imgur.com/Muq2X.gif
I'll be using Pytho开发者_运维技巧n so anything based in Python would work, but I'm open to other solutions such as latex output.
Sympy can output LaTeX code and MathML, from there you can create images or other forms of display, depending on what exactly you need. You'll find some methods for that in this old StackOverflow question.
In theory, MathML would be ideal to display equations in a browser, but not all browsers support MathML.
You might take a look at this LaTeX module for Python: http://www.pytex.org/
May be you need SVGMath, it is pure python and converts MathML expressions to SVG.
精彩评论