On 2013-03-10, Boris Kheyfets wrote:
>> Since Docutils Release 0.8 (2011-07-07)
>> mathematical formulas are supported without need for an extension.
>> The --math-output=mathml setting supports a subset of LaTeX math syntax
>> (including the above examples).
> ... It works if I compile with
> rst2html.py --math-output=mathml
> -- but I can't get sphinx to output mathml. As far as I know sphinx
> doesn't use rst2html.py
Both sphinx and rst2html.py use the same HTML writer which is part of Docutils
via the Docutils API (publish_...).
Without loading a Sphinx math extension, the Docutils version of the
math directive should be used - either MathJax or, with a current daily
snapshot (Docutils 0.11 [repository]) HTML+CSS.
I don't know how to configure Docutils when used from Sphinx. It may be
that the default configuration files are not used. However, it may be
worth a try to edit one of the `configuration files`__ and include
math-output=MathML
in the [HTML4css1 writer] section. This should do the trick.
With the "html4css1" writer, the resulting HTML document does not
validate, as there is no DTD for MathML + XHTML Transitional. However,
MathML-enabled browsers will render it fine.
Günter
__
http://docutils.sourceforge.net/docs/user/config.html#configuration-files