From: Andrew S. <and...@ma...> - 2010-08-02 14:41:35
|
Dear Python Markdowners, Is anyone interested in helping to write an extension that would convert LaTeX(ish) syntax to MathML? There is a c++ library called itex2MML which converts a subset of LaTeX mathematics syntax to MathML. Using swig, it can be compiled with the appropriate "hooks" to allow it to be called from a python script. Using a bit of "cargo cult" programming (a term I've just heard about and which describes my approach to programming perfectly), I've written a CGI script that uses this to convert this LaTeXish language (known as iTeX) to MathML. Combining it with the existent python program SVGMath, and the libcairo extensions, it is possible to convert it further to SVG and thence to PNG, if required (thus meaning that it can _internally_ cope with different browser requirements). It strikes me that this would be an extremely useful thing to add to the python markdown suite. This already exists in one of the Ruby variants of Markdown (Maruku) and is used in the Instiki wiki engine. I've written the PHP code necessary to do this and am using it in a PHP forum. Having a python implementation would enable things like the OSQA platform to be used for proper mathematics. Indeed, because python already has the SVGMath program, there are considerable advantages in having this for python than any of the other languages. The only drawback is that I've no experience of programming in python, beyond that little hackery needed for the CGI script. So I wondered if there was anyone here who would be interested in doing the python bit of it. To be clear: I already have the extensions, and from doing the PHP version I already know some of the potential pitfalls that may be encountered. So it really is just the ability to program in python that I'm lacking! And much as I would benefit from learning another language, it would be far quicker and produce a far more robust extension if someone who knew about python already was prepared to help! To see the CGI script in action, go to: http://www.mathforge.org/itex/itex.html Thanks, Andrew Stacey |