On Wed, Aug 29, 2012 at 5:19 AM, mirari
> Is there now a good way to render LaTeX in a wxPython?
full featured? no.
> following Christopher Barker's suggestion in the thread "Latex and wxpython"
being quoted means I kind of have to reply, yes ;)
> but as far as I can tell this does not seem to be suitable for more than
> one-liners,
Indeed -- the TeX implementation in MPL is very limited, and designed
for putting small equations on a plot, and the like. In fact, it
doesn't support paragraph formatting and the like at all.
HOnestly, I doubt you'd ever be able to get a ful featured TeX system,
other than TeX itself, so if you want to support full-on LaTeX, you're
going to need TeX one way or another. There has been some noise about
an embedable TeX system, but last I looked, it was only noise. So you
need to either:
pre-render the LaTex to PDF or html -- pdf will look nicer, but you'll
pretty much have to rely on the system pdf renderer to show it -- I
don't hink there is a good embedded PDF render for wx. It's possible
that tex2html will produce old-fashioned enough html to render with
wxHTML -- that would be a nice controllable option for online help. If
not, you can embed the system browser, or use wxWebKit, which is
getting pretty mature:
https://gitorious.org/+wxwebkit-developers/webkit/wxwebkit
Another cool option would be to write a DVI renderer in wx -- not
trivial, but not impossible, either. And maybe someone has done a DVI
renderer in Python somewhere.
If you can rely on a system TeX installation, you can use tex2png or
dvipng, or???
http://xyne.archlinux.ca/projects/tex2png/ Tex2png
Then render the Pngs in wx on the fly.
Now that I think about it -- you could pre-render them, and then show
the pages that way -- each page of the doc could be a PNg file --
that could be pretty easy and look great.
HTH,
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R
(206) 526-6959 voice
7600 Sand Point Way NE
(206) 526-6329 fax
Seattle, WA 98115
(206) 526-6317 main reception
Chris....@noaa.gov