Creating Math Web Documents using Word 2007

If you use Word 2007 to create a document containing mathematical equations and expressions and save it as a web page, it looks just as good in Internet Explorer as it does in Word 2007! The equations look as though they had been typeset by TeX or in some ways even better. How did this come to pass? Well Word 2007 saves mathematical formulas in an HTML document in two ways: 1) the original OMML contained inside comments, and 2) png’s for programs that don’t know how to distill the OMML out of the comments, or don’t know how to display OMML even if they could retrieve it.

Currently at least Internet Explorer knows nothing about OMML and only knows how to display MathML if a math behavior facility such as Design Science’s MathPlayer is installed. So Internet Explorer bypasses the comments in favor of the png’s and they look really fine unless you zoom them (which makes them get fuzzy) or change the background color (which may make them unreadable).

Needless-to-say, David Carlisle, web/XML/TeX/LaTeX/MathML/etc. whiz, was intrigued by this situation. He figured that with a little help Word 2007 could do “the right thing” and create HTML documents with embedded MathML instead of OMML. He next concluded that the right thing for him to do was to prove it. In the process, he discovered and fixed some bugs in Microsoft’s omml2mml.xsl file, which Word uses to export MathML. You can download David’s handy work from his post on the subject. Qualifies as exceedingly cool!