[uf-new] an equation/MathML/TeX microformat?

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Sat Oct 27 06:24:33 PDT 2007

On Thu, 2007-10-25 at 15:39 -0700, Paul Topping wrote:

> I'm aware of the effort to support MathML in HTML5 but this effort seems
> unlikely to bear fruit. Besides, I'm looking to create something that
> will work in "plain old HTML" which, as I understand it, is part of the
> microformat philosophy. As I stated, MathML was originally intended to
> be implemented in browsers but the actuality leaves something to be
> desired. With HTML5, I would simply be waiting for yet another thing to
> be implemented in browsers. Exactly what I want to avoid.

Personally, I believe wanting to use MathML is one of the rare
use-cases that justifies choosing XHTML over HTML 4.01, in which case
you can inline MathML directly into your markup.

Can you provide some more details about the problem you're trying to
solve, in particular:

1. What are the deficiencies of existing techniques for using
mathematical markup in conjunction with HTML that you are realistically
expecting to overcome?

2. What are the key existing consuming agents you'd like the solution to
those deficiencies to work with? e.g. What platforms, browsers, and
assistive technology?

Currently, your company's MathPlayer ActiveX plugin can already speak
maths and has MSAA support for assistive technology:


Gecko has built-in support for a subset of MathML; the FireVox extension
turns Firefox into a self-voicing browser on all three major platforms
and can read MathML using Abraham Nemeth's Mathspeak rules:


The next version of Opera will include support for a subset of MathML
and restore (some level of) support for assistive technologies on
Windows and Mac: 



The only major engine missing support for MathML at all is WebKit:


This situation could be a /lot/ better. 

Your problem seems very similar to the problem of inlining RDF in HTML:



The suggested approach of dumping XML markup inside comments was
actually used by Creative Commons and Moveable Type's Trackback system:


But I can't really see how embedding MathML markup inside HTML comments
is supposed to improve things with existing (or even future) consuming
agents. You did say this:

> Also, I want to put the MathML or TeX in the page, not in separate
> documents. Typical pages with math in them might have dozens of
> equations. Having their representation in separate files is
> inefficient but perhaps the biggest problem is that it makes authoring
> a lot more tedious as lots of small files have to be managed. 

The web stack tends to work by stitching together lots of different
resources to make up the final presentation the user experiences when
she visits a URI: multiple HTML documents, scripts, stylesheets, images,
Flash movies, and so on all get bound together by a master document. I'm
generally sceptical about attempts to fight against this model in the
name of efficiency without changing the HTML specification itself. 

There's also an issue of efficiency for consuming agents that don't
support MathML and would have to waste bandwidth on MathML embedded in

Having said that, additional requests are more expensive than additional
bytes. But even if you have to externalize MathML outside the main HTML
document, you could (I guess) cut down the additional requests to just
one by using fragment identifiers to pinpoint individual equations in an
XML document containing a series of equations. You could even make the
referenced document an XHTML version of the HTML document, and use a
<link rel="alternate" type="application/xhtml+xml"> element to point to
the XHTML version from the HEAD of the HTML version, and use the HTML
HREF and LONGDESC attributes to point to fragment identifiers for
particular equations. HTTP content negotiation could perhaps be used to
send supporting consuming agents to the XHTML version in the first

For very short equations, you might be able to do away with the external
document altogether by using data URIs instead of referencing an actual
external document:



If authoring tools make creating master documents hard, I think that
highlights a flaw in the authoring tools in question, and the authoring
tools are likely to be a little easier to "fix" than consuming agents.
OpenDocuments consist of an archive of multiple resources, but the user
experience of editing an OpenDocument in OpenOffice.org is of editing a
seamless document.

Using HTML comments to hide stuff is generally a bad idea since comments
should be disposable and sometimes are discarded. There are cases where
that doesn't matter. For example, it doesn't matter when conditional
comments are used to serve different styles to IE are okay because, if
content has been kept separate from presentation, it should be possible
to use the browser's default CSS to achieve a usable presentation of the
document. Now there could be cases where using comments is worth the
risk even for data that is important to understanding a document, but I
don't really see sufficient advantages in this particular case to offset
the costs.

Benjamin Hawkes-Lewis

More information about the microformats-new mailing list