Generating representations of equations in python / on the web

Is it possible to take something like x ^ 2 + 5 and generate this: http://imgur.com/Muq2X.gif

I will use Python so that everything that was in Python works, but I am open to other solutions, such as latex output.

+4
source share
3 answers

Sympy can output LaTeX and MathML code , from there you can create images or other forms of display depending on what you need. You will find some methods for this in this old fooobar.com/questions/563802 / ....

In theory, MathML is ideal for displaying equations in a browser, but not for all browsers that support MathML.

+3
source

You can take a look at this LaTeX module for Python: http://www.pytex.org/

+2
source

You might need SVGMath , this is pure python and will convert MathML to SVG.

+1
source

Source: https://habr.com/ru/post/1315191/


All Articles