Re: [docbook->html] support for MathML

John Maddock <[email protected]>
Newsgroups gmane.comp.lib.boost.documentation
Message-ID <E138B8852E114D84ADD058DD1487217A@acerlaptop>
>I've just implemented support for LaTeX
>using MathJax.  The next step is to support
>MathML as well.  This would mainly be used by
>the Math library.  I'm running into more
>problems with this however:

>* How should the MathML be represented in
>  the DocBook file?

>Based on what Boost.Math does for the PNG
>and SVG versions, I tried
><imageobject role="mml">
>  <imagedata fileref="..."/>
></imageobject>
>
>This doesn't really work very well.

No, shouldn't we be doing it like this:

http://www.sagehill.net/docbookxsl/MathML.html

Using:

<inlineequation>
<mml:math>...</mml:math>
</inlineequation>

The <mml:math> block would of course be replaced by an <xi:include> that 
includes the mml file.

But there are some problems - the existing .mml files are actually html 
files (because that's what the GUI I used to create them insisted on 
creating), so amoungst other things there's no namespace on the mml elements 
and there's also a <html> wrapper around it all - it should be pretty easy 
to write a script to convert them all on mass though (in fact I *almost* 
have such a beast already).  We would also need to use the MathML "enhanced" 
version of the Docbook DTD: http://www.docbook.org/schemas/mathml and change 
all our docbook headers to point to this :-(

Possibly we could include the extensions in our customisation layer or 
directly in the document as well: 
http://www.sagehill.net/docbookxsl/MathML.html but this would need some kind 
of XSL param to turn it on just for specific documents?

Certainly this feels like the "right" way to do this - if the Docbook side 
of things can be made to work?

HTH, John.

PS Not sure why but I always have trouble reading your emails Steven - they 
appear with the content as an attachment which is a real PITA to read - I 
don't have the same issues with anyone else's posts to the list BTW - some 
mail setting at your end maybe?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.