O'Reilly logo

Firefox Hacks by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #61. Make MathML Content

MathML (Mathematical Markup Language) provides the set of tags with which to express mathematical equations on web pages.

Before MathML there was TEX (pronounced "Tek"), a typesetting system developed prior to the Web by Donald Knuth in the 70s and 80s. TEX has set the standard for professional-looking math on digital devices, especially for print media. TEX and an extension called LATEX have traditionally been what math people use for mathematical documents.

MathML is meant to play a similar role on the Web. Firefox's Gecko layout system has built-in TEX-quality support for mathematics that can be styled and scripted to achieve exciting dynamic effects visually and computationally. MathML is another of those things that really set Firefox apart from other web browsers. Figure 6-2 shows an example of MathML content.

Built-in MathML rendering in Firefox

Figure 6-2. Built-in MathML rendering in Firefox

No, the screenshot shown in Figure 6-2 is not made up of images produced by LATEX2HTML (or some such) and included in the page with <img> tags. Nor is the page displayed using plug-ins. What you see is Firefox mastering mathematics with as much dexterity as any mathematician. Firefox does the formatting natively. Now, you too can harness this TEX-quality math power by using MathML.

The example in this hack zooms into a basic template typeset according to W3C standards. It shows how the screenshot ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required