I am looking at converting a standard mathematical user input such as
int(3cos(x)+2)
To latex
$\int cos(3x) dx$
And then converting that latex expression to a typsetted math image that can be used on a GUI in real time
How could this be done?
I am looking at converting a standard mathematical user input such as
int(3cos(x)+2)
To latex
$\int cos(3x) dx$
And then converting that latex expression to a typsetted math image that can be used on a GUI in real time
How could this be done?
You can also generate the latex expression into an image with sympy
.
Check the documentation of sympy. Here's an example:
latexexpr = sin(sqrt(x**2 + 20)) + 1
preview(latexexpr, viewer='file', filename='result.png')