OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] LaTeX math inside docbook, on-the-fly MathML conversion?


On 01/29/2015 12:25 PM, Warren Young wrote:
On Jan 29, 2015, at 12:46 PM, Marco Giebel <marco-giebel@gmx.de> wrote:

These formulas should be interpreted on the fly to MathML
Are you sure you want to prevent the correct viewing of your document in stock versions of Chrome, IE, and Opera?

     http://caniuse.com/#search=mathml

Yes, I know there are browser plugins and hacks like MathJax that can fix this, but…ech.

If you’re also targeting PDF, most XSL-FO processors don’t support MathML, either.  Last time I checked, only Antenna House did.  I see that they have included it in the commercial version, but it’s still a paid add-on for the Lite version:

     http://www.antennahouse.com/product/mathml.htm

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.

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.

Regards,
Alexey.


When I created the f/Calc manual, I built a bit of Makefile hackery to turn LaTeX fragments into PNG for the HTML version and PDF for insertion into the PDF version by the XSL-FO processor:

     http://fcalc.net/manual/
     http://fcalc.net/manual.pdf

I think the result is fairly seamless, and it works on all browsers, going back to ancient days.

If you want, I can dig up the recipe.  It’s simple enough to be quickly reinvented.  I’d post it now, but I don’t have the code on hand where I am now.
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]