8

Does anyone know how to show mathematical equations in QTextEdit written in any format (TXT, MathML, MML, LaTeX, HTML, XML or anything) using only Python, that is without using 3rd party packages like Latex itself.? I tried to find the MathML Widget from Qt but it disappeared from their web site and I couldn't find it anywhere.

I'm not fussed about the equation source (either a string or a file). I just can't figure out how to show them nicely (the same way as they appear on a web page, e.g. http://en.wikipedia.org/wiki/MathML).

My QTextEdit currently gets an HTML string. I tried embedding the MathML example from that Wikipedia article, but it doesn't show it properly, it ignores all those MathML tags.

Will really appreciate your help. Thank you.

linuxoid
  • 1,415
  • 3
  • 14
  • 32
  • You asked the [exact same question yesterday](http://stackoverflow.com/questions/5385740/pyqt-how-to-show-math-equations-in-qtextedit). Your solution will probably end up being to use SVGMath library to translate MathML to SVG, displayed with QSvgWidget, as [mentioned here](http://stackoverflow.com/questions/5265226/problem-displaying-sympy-rendered-svg-in-python) – samplebias Mar 23 '11 at 23:58
  • re-asking the same question isn't acceptable behavior here. If you want to draw attention to your question, you will be allowed to [place a bounty on it](http://stackoverflow.com/faq#bounty) after two days. You can also [edit your question](http://stackoverflow.com/posts/5219937/edit) to add additional information, which may make your question easier to understand and answer. –  Mar 31 '11 at 12:57

1 Answers1

0

You can use this: http://qwt.sourceforge.net/

It definitely seems funny that I cannot find the MathML widget in Qt.

EDIT: I think they are trying to replace it with webkit support, but it isn't implemented yet: http://developer.qt.nokia.com/wiki/Qt_Webkit_HTML5_Score

Dhaivat Pandya
  • 6,499
  • 4
  • 29
  • 43
  • how can I show equations with it in QTextEdit? It seems to have its own widget which displays its own QwtText which can take a MathML for example. But I need to show MathML in QTextEdit. – linuxoid Mar 22 '11 at 03:52