[Boost-docs] [docbook->html] support for MathML

Subject: [Boost-docs] [docbook->html] support for MathML
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-10-19 21:27:27


AMDG

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.

 - Getting the path correct to load the
   file from the XSL stylesheet is a pain.
   I had to add an extra XSL parameter to
   act as the root.
 - The DTD is downloaded for each mml file
   that is loaded. This makes it really
   slow. Fixing this means adding another
   entry to boostbook_catalog.xml and
   more Boost.Build configuration.

Altogether, the extra code ends up looking like:

In user-config.jam:

using mathml : /path/to/mathml2 ;

In the Jamfile:
path-constant here : . ;
<xsl:param>file://$(here)/html

It's possible to make the <xsl:param> automatic,
but there's no way around the configuration.
Do people find this acceptable? I really
don't like it, since configuring the documentation
tools is already complex enough. I suppose
I could create a target that automatically
downloads the DTD once.

It would also be possible to use inline MML
(or inline LaTeX) in the Math docs. This
is straightforward to implement, but requires
more rejiggering on the Boost.Math side.
John?

In Christ,
Steven Watanabe




This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:41 UTC