Subject: Re: [docbook] LaTeX math inside docbook, on-the-fly MathML conversion?
Alexey Neyman <firstname.lastname@example.org> wrote on Thu, 29 Jan 2015 12:34:05 -0800: > I found this quite useful for PDF output: > > http://pmml2svg.sourceforge.net/ > > This XSL stylesheet converts MathML to SVG. SVG can be then inserted > into the XSL-FO for PDF output or converted to PNG for HTML. I'm the person behind pmml2svg. I think its output is clearly superior to JEuclid in most cases, mostly because JEclid literally handles stretchy characters by anisotropic scaling of glyphs. Yet I sadly do not eat my own dog food most of the time. The reason is that pmml2svg relies on FOP code handle font metrics, and FOP is currently limited to Unicode plane-0 code points (https://issues.apache.org/jira/browse/FOP-1969), but I often use Mathematical Alphanumeric Symbols (1D400–1D7FF). Since my use case for pmml2svg relies on FOP for PDF output, I have had little motivation to remove pmml2svg's dependency on FOP. Moreover, while I think MathML-to-SVG conversion coded entirely in XSLT is cool and fits well into XML workflows, math rendering is not trivial, and MathML keeps evolving, so implementation and maintenance cannot be done without community help. Perhaps it would be better to try to write a MathML-to-SVG converter and/or a FOP math plugin based on an established math rendering system such as Gecko or MathJax. > If you want to use inline formulas, you'd need a small hack to pass > the baseline shift generated by pMML2SVG (which is stored in the > generated SVG) into the XSL-FO attribute. I have a patch for that > somewhere; I'll dig it up if you're interested. I am :-) For LaTeX-to-MathML conversion I use TTM (http://hutchinson.belmont.ma.us/tth/mml/). In the meantime many other converters have appeared (that I have never felt the pressure to try out). Justus