From: Robert K. <rk...@uc...> - 2004-10-26 20:58:32
|
John Hunter wrote: [snip] > One is to fall back on tex where available as a command line tool (as > pyx does, I believe), and use other command line tools to convert the > dvi to png or some other raster format and then embed it. This would > require a few external libs and utilities, but it's certainly doable. +1 for (relatively) low-hanging fruit. > Another idea I had while reading Knuth's "TeX: The Program" is to use > the layout information in the TFM font metric files. Apparently math > fonts have additional layout information in them, like where to place > superscripts. I've looked at several tfm parsing implementations, and > haven't found one yet that actually extracts this information; most > extract the standard font information but not the special math > information. But if we could access this info, we could include the > tfm files for common raster sizes and use the layout info crafted by > the master himself. I wish you luck! > A third possibility would be to support mathml, using some good mathml > renderer. Is there a good, free mathml rendering library - what does > mozilla use for this? Mozilla's MathML is inextricably linked into Gecko[1] and cannot be torn out of it. I've seen some programs out there that render MathML to either rasters or SVG, but they are either commercial or (L)GPL. They are also usually written in Java or C#. Some possibilities gleaned from http://www.w3.org/Math/implementations.html : * GtkMathView: C++, GPL, already has Perl and PHP bindings http://helm.cs.unibo.it/mml-widget/ Okay, that was the only one I found. In any case, I would not want to be directly writing MathML; it is not intended to be human-writable. There are, however, programs that will convert a restricted mathematical subset of LaTeX to MathML[2]. There are also a few non-TeX syntaxes drifting around with converters to MathML. [1] http://www.mozilla.org/projects/mathml/enable.html [2] http://pear.math.pitt.edu/mathzilla/ -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |