[Tutor] Displaying TeX in python GUI

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Mon Dec 2 02:24:03 2002


On Fri, 29 Nov 2002, Paul Hartley wrote:

> Is there a widget that will display TeX, LaTeX or MathML in a python
> widget?

Hi Paul,

Have you gotten an answer to your question yet?  You may want to ask your
question on comp.lang.python if you don't get more feedback from us.
LaTeX isn't as well known as it deserves to be, but I'm positive that
there are some LaTeX enthusiasts on the main newsgroup that can help you.


It might be possible to embed Mozilla's "Gecko" HTML widget using PyXPCOM:

    http://aspn.activestate.com/ASPN/Downloads/Komodo/PyXPCOM/readme
    http://www.mozilla.org/projects/xpcom/

Mozilla has MathML support, so this may be a nice way to approach this
problem.  That being said, I have to admit that I have no idea if this
will work.  Has anyone had luck with it?


Alternatively, you can run 'latex2pdf' or 'dvips' to transform LaTeX math
into an image that can be seen on a canvas, and you can periodically poll
when the math equation changes.  I think the 'xdvi' utility takes this
kind of polling approach to preview math equations.


Best of wishes to you!