Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

February 7, 2003

MathML in Safari

So Dave Hyatt wants to hear where we’d like Safari to go.

I’d like to see MathML support come to Safari (WebCore, really). I realize that ain’t exactly mass-market, but then neither is the demographic of Safari’s early-adopters. And MathML in WebCore would open up a bunch of nifty possibilities for other applications (Keynote, spreadsheets, …) which would like to render mathematical formulas.

Anyway, how does one get from here to there?

  1. An XML parser (supposedly working in WebCore now).
  2. Really good CSS-handling (from Dave’s posts, it sounds like WebCore has pretty much arrived).
  3. A converter to translate the MathML box model to CSS frames.

That’s the approach the Mozilla MathML Project took for their implementation:

A mathematical expression can be represented as an aggregate set of boxes. These are the bounding boxes that would enclose mathematical entities (literal symbol, operator, delimiter, etc). With rules governing the positioning of these entities (subscript, superscript, fraction, etc), it is possible to construct the box-model in a recursive manner by traversing the parsing tree of the expression.

With the object-oriented paradigm, each box can be viewed as an object that has its own specific properties and shares a common set of properties with other objects. With the CSS paradigm, each box can be viewed as a CSS frame that possibly embeds other CSS frames. Hence there is a direct correspondence between the two paradigms.

MathML offers two formats for representing an equation: presentational tags and semantic/content tags. Given an equation in either format, the MathML project will ultimately aim at constructing a lump of CSS frames that can then be passed onto Gecko for layout and display.

[Currently, they support only MathML Presentational Tags.]

Substitute “KHTML” for “Gecko” above, and one has the semblance of a plan.

Posted by distler at February 7, 2003 10:54 PM

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/93

5 Comments & 3 Trackbacks

Read the post Dave Thomas Wouldn't Stand for This
Weblog: chrishiller.net
Excerpt: So apparently there was a Wendy’s ad recently which claimed one could choose groups of three from Wendy’s 99 cent value meal of ten items and end up with 1,000 possible combinations. So, until Safari implements MathML (the blog Musings...
Tracked: October 12, 2003 5:23 PM
Read the post Dave Thomas Wouldn't Stand for This
Weblog: chrishiller.net
Excerpt: Wendy's failed combinatorics
Tracked: February 22, 2004 4:17 PM
Read the post We still need MathML for Safari
Weblog: Mengjuei - Blog
Excerpt: I really think MathML is very important for scientists, teachers, college students and many high school students. I hope MathML is still on the to-do list of WebCore feature. Voices: Prof. Distler KHTML Wish List My Wish List Dave Hyatt's...
Tracked: May 12, 2005 1:32 PM

Re: MathML in Safari

GtkMathView provides a highly adaptable, high quality rendering engine for MathML markup. It can be interfaced with different frontends (= ways of retrieving the markup) and different backends (= ways of displaying the markup). The Gtk in the name is just because of historical reasons, in fact the latest version can be compiled without Gtk and the main engine is pure C++ code.

I’ve been wondering for a while what would be the right approach to seek collaboration for integrating gtkmathview and safari somehow, but the world of apple developers is totally unknown to me. So, if you have any feeling that an integration is at all possible, I’d be more than glad to hear about it.

More information about gtkmathview here:

http://helm.cs.unibo.it/software/mml-widget/

Posted by: Luca Padovani on June 10, 2005 2:23 PM | Permalink | Reply to this

Re: MathML in Safari

A lot of people in the scientific community are familiar with creating equations in LaTeX. I would like to know, why is it not possible to create a plug-in that will render LaTeX code written in HTML into equation images which can be seen where the page is displayed. The equation code would be searchable.

Posted by: Carl Hepburn on January 2, 2007 4:27 PM | Permalink | Reply to this

Re: MathML in Safari

what’s the latest on MathMl for Safari browser used in Apple iPhone or iToch ?

Posted by: girish desai on December 15, 2008 12:13 AM | Permalink | Reply to this

Re: MathML in Safari

You might be happy to see MathML support in Safari 5.1.

Posted by: Edward O'Connor on July 22, 2011 1:04 PM | Permalink | Reply to this

Re: MathML in Safari

Preliminary MathML support.

I run Webkit nightlies to monitor its progress. I can attest that it’s still quite rudimentary. Definitely not good enough for production work, and much inferior (even) to MathJax rendering, which is what we send to Safari, by default.

If you want to see the difference, view, say, this page in Safari, with the default UA string, and then with the UA string set to imitate Firefox. Neither is great, but one is much worse than the other.

But, yes, it’s good to see that they’ve started to work on MathML support…

Posted by: Jacques Distler on July 23, 2011 2:34 AM | Permalink | PGP Sig | Reply to this

Post a New Comment