hello,
is there a formula editor availabale for wxPython,
that converts Latex formula to png files.
(so they can be embedded in html)
thanks,
Stef Mientki
hello,
is there a formula editor availabale for wxPython,
that converts Latex formula to png files.
(so they can be embedded in html)
thanks,
Stef Mientki
Stef Mientki wrote:
hello,
is there a formula editor availabale for wxPython,
that converts Latex formula to png files.
(so they can be embedded in html)
I would be gob-smacked if you could find anything pre-built for this.
It's not a simple task. If you know TeX and LaTeX are installed, you
can certainly write your own scripts to do the conversion, but the
TeX/LaTex installation on my hard disk is about 650MB.
OpenOffice has an equation writer that might be usable in other
contexts. That's worth checking.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
You can use Python to script OpenOffice, so that might be doable.
On Dec 13, 7:40 pm, Tim Roberts <t...@probo.com> wrote:
Stef Mientki wrote:
> hello,> is there a formula editor availabale for wxPython,
> that converts Latex formula to png files.
> (so they can be embedded in html)I would be gob-smacked if you could find anything pre-built for this.
It's not a simple task. If you know TeX and LaTeX are installed, you
can certainly write your own scripts to do the conversion, but the
TeX/LaTex installation on my hard disk is about 650MB.OpenOffice has an equation writer that might be usable in other
contexts. That's worth checking.--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
-------------------
Mike Driscoll
If you can live with a subset of Latex, check out matplotlib. It’s a plotting package, but you can have it render straight to screen or png.
dhyams wrote:
If you can live with a subset of Latex, check out matplotlib. It's a
plotting package, but you can have it render straight to screen or
png. --
Oooh, that's a great hint -- I wish I had remembered that first. Here's
a link to a sample:
http://matplotlib.sourceforge.net/users/usetex.html#usetex-tutorial
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Actually, I don’t know if it will help the original poster; he said that he wanted an editor, and certainly matplotlib cannot help with that. I should have read more closely 
thank you all for your comment,
a quick and dirty summary
- Latex itself is much to heavy
- Openoffice component could be a good candidate, but I know nothing
of OO, so getting out some small component seems a lot of hassle
- MatPlotLib could work, but requires a working Latex ( so too
heavy)
- Mimetex.exe seems to be a very good candidate, small and fast. I'm
not sure this will work on other than Windows
With mimetex and 30 lines of code, I made a first version of a
real-time formula editor dialog.
cheers,
Stef

This is SWEET. It is, however, unfair of you not to share.
Did you find mimetex.exe as a download, or did you have to compile it?
Josh
On Tue, Dec 14, 2010 at 1:35 PM, Stef Mientki stef.mientki@gmail.com wrote:
thank you all for your comment,
a quick and dirty summary - Latex itself is much to heavy - Openoffice component could be a good candidate, but I know nothingof OO, so getting out some small component seems a lot of hassle
- MatPlotLib could work, but requires a working Latex ( so tooheavy)
- Mimetex.exe seems to be a very good candidate, small and fast. I'mnot sure this will work on other than Windows
With mimetex and 30 lines of code, I made a first version of areal-time formula editor dialog.
–
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com
a quick and dirty summary
- Latex itself is much to heavy
yup -- I saw some folks working on a project to make a TeX designed for embedding a couple years ago -- it might be worth googling for.
- MatPlotLib could work, but requires a working Latex ( so too heavy)
Ah, I think you missed a feature. MPL can optionally use a full TeX distribution as the engine, but it also has a built-in TeX implementation with a limited feature set for equations (i.e. no paragraph layout, etc). Depending on your needs, it may be OK -- and it's pure Python.
http://matplotlib.sourceforge.net/users/mathtext.html
- Mimetex.exe seems to be a very good candidate, small and fast. I'm not
sure this will work on other than Windows
Why not -- it looks like it's ANSI C, GPL;s and there are binaries for a bunch of OSs. It would be kind of cool to wrap it as a python extension, rather than the CGI interface.
-Chris
On 12/14/10 1:35 PM, Stef Mientki wrote:
--
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.Barker@noaa.gov
OK -- I couldn't help myself, here is a quick and dirty TeX editor, written using Matplotlib.
Enjoy!
-Chris
MPLmath.py (2.74 KB)
On 12/14/10 9:59 PM, Christopher Barker wrote:
- MatPlotLib could work, but requires a working Latex ( so too heavy)
Ah, I think you missed a feature. MPL can optionally use a full TeX
distribution as the engine, but it also has a built-in TeX
implementation with a limited feature set for equations (i.e. no
paragraph layout, etc). Depending on your needs, it may be OK -- and
it's pure Python.
--
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.Barker@noaa.gov
first hit at google:
cheers,
Stef
http://www.biostatisticien.eu/mimetex.html
Josh
On Tue, Dec 14, 2010 at 1:35 PM, StefMientki stef.mientki@gmail.com
wrote:
thank you all foryour comment,
a quick and dirty summary - Latex itself is much to heavy - Openoffice component could be a good candidate, but Iknow nothing of OO, so getting out some small component
seems a lot of hassle- MatPlotLib could work, but requires a working Latex ( sotoo heavy)
- Mimetex.exe seems to be a very good candidate, small andfast. I’m not sure this will work on other than Windows
With mimetex and 30 lines of code, I made a first versionof a real-time formula editor dialog.
-- Josh English Joshua.R.English@gmail.com [http://joshenglish.livejournal.com](http://joshenglish.livejournal.com)
–
To unsubscribe, send email toor visit
wxPython-users+unsubscribe@googlegroups.com
http://groups.google.com/group/wxPython-users?hl=en
- MatPlotLib could work, but requires a working Latex ( so too heavy)
Ah, I think you missed a feature. MPL can optionally use a full TeX
distribution as the engine, but it also has a built-in TeX
implementation with a limited feature set for equations (i.e. no
paragraph layout, etc). Depending on your needs, it may be OK -- and
it's pure Python.OK -- I couldn't help myself, here is a quick and dirty TeX editor, written using Matplotlib.
Great Cristopher,
works smoother than the mimetex version (and pure Python)
Indeed I missed that MPL contained a subset of Latex.
So I think I'm going for your solution,
One other thing, does anyone know a good set with math icons.
The best I could find is
http://us.metamath.org/symbols/symbols.html#downloads
thanks,
Stef Mientki
On 15-12-2010 08:30, Christopher Barker wrote:
On 12/14/10 9:59 PM, Christopher Barker wrote:
Enjoy!
-Chris
From: Stef Mientki
Sent: Wednesday, December 15, 2010 11:30 AM
Subject: Re: [wxPython-users] Re: Latex formula editor ?
- MatPlotLib could work, but requires a working Latex ( so too heavy)
Ah, I think you missed a feature. MPL can optionally use a full TeX
distribution as the engine, but it also has a built-in TeX
implementation with a limited feature set for equations (i.e. no
paragraph layout, etc). Depending on your needs, it may be OK – and
it’s pure Python.
OK – I couldn’t help myself, here is a quick and dirty TeX editor, written using Matplotlib.
Great Cristopher,
works smoother than the mimetex version (and pure Python)
Indeed I missed that MPL contained a subset of Latex.
So I think I’m going for your solution,
One other thing, does anyone know a good set with math icons.
The best I could find is
If you are using the MPL solution why not generate them on the fly or as a part of the build process – then you will be able to a) Generate the size(s) you need and b) be sure that they are all supported by MDL.
Just my 2p worth.
Gadget/Steve
-----Original Message-----
On 15-12-2010 08:30, Christopher Barker wrote:On 12/14/10 9:59 PM, Christopher Barker wrote:
thanks,
Stef Mientki
Enjoy!
-Chris
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
�
One other thing, does anyone know a good set with mathicons.
The best I could find is
If you are using the MPL solution why notgenerate them on the fly or as a part of the build process �
then you will be able to a) Generate the size(s) you need
and b) be sure that they are all supported by MDL.
WelI I want to make a number of groups with different sets of math
symbols,
that will act as a toolbar to insert the corresponding latex info.
So it will cost a lot of work to generate and include them all,
and probably I'll miss a few.
cheers,
Stef
�
Just my 2p worth.
�
Gadget/Steve
Sorry, I applauded too early.
The MPL version, has a number of problems:
- it misses a number of commands, like \small , \tiny
- the image size is fixed (to the original window size ?) with a lot of white space around the formula
(therefor the image size is also much larger than necessary)
cheers,
Stef
On 15-12-2010 12:30, Stef Mientki wrote:
On 15-12-2010 08:30, Christopher Barker wrote:
On 12/14/10 9:59 PM, Christopher Barker wrote:
- MatPlotLib could work, but requires a working Latex ( so too heavy)
Ah, I think you missed a feature. MPL can optionally use a full TeX
distribution as the engine, but it also has a built-in TeX
implementation with a limited feature set for equations (i.e. no
paragraph layout, etc). Depending on your needs, it may be OK -- and
it's pure Python.OK -- I couldn't help myself, here is a quick and dirty TeX editor, written using Matplotlib.
Great Cristopher,
works smoother than the mimetex version (and pure Python)
Indeed I missed that MPL contained a subset of Latex.
So I think I'm going for your solution,
OK -- I couldn't help myself, here is a quick and dirty TeX editor, written using Matplotlib.
Great Christopher,
works smoother than the mimetex version (and pure Python)
Indeed I missed that MPL contained a subset of Latex.
So I think I'm going for your solution,
I'm glad it's helpful.
You might want to take a look at:
matplotlib.mathtext.MathtextBackendBitmap()
A backend to generate standalone mathtext images. No additional
matplotlib backend is required.
That may let you eliminate the MPL figure stuff (though it's not too much coding overhead)
One thing I didn't figure out last night was how to tell how large a given chunk of rendered text is, so that you can do things like center it on the Figure. Some poking into the docs and code may help figure that out, or a question to the MPL list.
One other thing, does anyone know a good set with math icons.
The best I could find is
Perhaps you could generate them with MathtextBackendBitmap().
-Chris
On 12/15/10 3:30 AM, Stef Mientki wrote:
--
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.Barker@noaa.gov
The MPL version, has a number of problems:
- it misses a number of commands, like \small , \tiny
well, it's certainly incomplete -- I don't know how hard it would be to add things like that. Those particular commands could be pretty straightforward.
If you want EVERYTHING, a full LaTeX distribution is your only option. Though maybe mimeTeX has significantly more than MPL.
- the image size is fixed (to the original window size ?) with a lot of white space around the formula
(therefor the image size is also much larger than necessary)
See my previous note -- I suspect you can solve that one.
-Chris
On 12/15/10 10:29 AM, Stef Mientki wrote:
--
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.Barker@noaa.gov
You can use instead OpenType math fonts. I have just
tested the "Cambria Math" font on wxPython 2.9.1 on
Windows 7, all the random code points in the "Mathematical
Operators Unicode code block" I randomly selected are
rendered in a StaticText, a TextCtrl or in a STC.
I have other math fonts I'm using in XeTeX. I did
not test them, they are not installed at the system
level.
jmf
On Dec 15, 12:30 pm, Stef Mientki <stef.mien...@gmail.com> wrote:
One other thing, does anyone know a good set with math icons.