Question

I am hoping to use PyQt to produce an application that will display an equation entered by the user. I had considered matplotlib, but this seems like overkill as I would only be using it to render the latex.

I need to use SymPy anyway, so I was hoping there would be a way to use it to do the rendering also, preferably producing an SVG file for PyQt to use.

I hope this makes sense - many thanks in advance for any help/advice.

Best wishes, Geddes

Was it helpful?

Solution

You could output MathML using SymPy and then use SVGMath to convert it to SVG.

OTHER TIPS

If you just need simple rendering using python, how about trying ipython 0.11 with qtconsole using sympy profile(ipython qtconsole --profile=sympy). It did implement matplotlib, but I consider it quite clean considering mathematical expressions can be rendered directly on the qtconsole. Need to install pyzmq module.

Edited(18 Nov 2011):

I've created a python distribution integrating Ipython with qtconsole for Windows. It serves my needs, it may serve yours. May save someone's trouble installing those packages. Check Python4Math.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top