30 October 2003
MathML is "the next big thing in online mathematics." This paper looks at existing methods for displaying MathML on the Web, why and how MathML was developed, how MathML can be used, and assesses current browser support for MathML.
This work has been completed as part of an MSc dissertation at the Nottingham Trent University, supervised by Tony Sackfield.
Semantic information is used by computers to discern some meaning from data. For example, a person viewing an equation might deduce "e" refers to the base of natural logarithms rather than a variable "e", while a computer program is at a loss without some semantic information. The problem occurs often in mathematics notation, where one concept might be described by various notations, or one notation might be used for various concepts. Most methods for encoding mathematics do not record this information.
The World Wide Web Consortium (W3C) Web Accessibility Initiative (WAI) publishes guidelines intended to help people access information on the Web regardless of disability, technology or particular constraints they might be operating under (see Chisholm, Vanderheiden and Jacobs, 1999). This includes: "When an appropriate markup language exists, use markup rather than images to convey information. For example, use MathML to mark up mathematical equations."
Most existing methods for displaying mathematics online are affected by these guidelines. For example, images, ASCII art and Java applets should all be accompanied by a text equivalent.
An important consideration is how screen readers deal with mathematics. These are programs which attempt to aurally represent the data given onscreen used, for example, by visually impaired web users. Current techniques make translating webpage mathematics into audio difficult (at best!). If the computer were able to access the equation data it could be programmed to read the equation, perhaps even in a way customised by the user to their own preferences for spoken mathematics.-go to contents.
Problems displaying mathematics on the World Wide Web stem from the fact that the language webpages are written using, HyperText Markup Language (HTML), has very little support for mathematical notation. Attempts to increase support for mathematics in HTML have failed, due to the complexity of implementation. However, this work lead to the founding of the group which ultimately produced the MathML specification.
A common method used for rendering simple mathematics, particularly in email (according to Boye, 1998), is to use a plain text linear notation written as American Standard Code for Information Interchange (ASCII) text. For example, x squared is x^2, one half is 1/2, etc. However, ASCII only supports a limited number of characters and is one-dimensional, so writing any complex mathematics is difficult using this method. Also there are potentially problems with ambiguity, such as: "1/2x".
/ A+X B+Y \ ( ----- , ----- ) \ 2 2 /
Figure 2.1.1 - An example of ASCII mathematics (source: The Math Forum)
ASCII mathematics is ASCII art as defined by the W3C's WAI guidelines. These guidelines require that a text equivalent should be made available for any ASCII art element on a page and that a link should be provided to allow users to skip over this section. ASCII mathematics is not accessible.
A common method for putting mathematics on a webpage requires that equations be produced as images (see Topping, 1999).
Nielson, 1997 reports on studies into user response times suggesting webpages ought to load in less than 10 seconds (in fact, ideally less than a single second). Otherwise the user may become frustrated with the process, and may even give up on the site altogether. Certainly, a page full of equation images would take time to load, and frustration is hardly the correct state to be viewing a page.
Another issue with images, described by Topping, is that of printing. A well-optimised image will typically be at a screen resolution not suitable for printing. Then, if the equations are well-optimised images they will produce poor quality printouts. If they are optimised for print, they will be at a higher resolution and the download time increases yet further.
And of course, text in images is not machine-readable, so screen readers cannot penetrate the image, the browser cannot offer to vary the size or colourings of the equation. And for the author, properly encoded information is simple to edit; an equation stored as a picture will likely need remaking in order to perform small edits.
TEX is a system aimed at typesetting text and mathematical formulae. Oetiker, et al, 2003 have that TEX was created between 1977 and 1989 by Donald E. Knuth "to explore the potential of the digital printing equipment" in the hope of reversing "the trend of deteriorating typographical quality" which Knuth regarded as affecting his published work. Mittelbach and Rowley, 1999 regard TEX as "a world-wide de facto standard for high quality typesetting."
According to Oetiker, et al, LATEX was written by Leslie Lamport and is a "macro package that enables authors to typeset and print their work at the highest typographical quality, using a redefined, professional layout." It uses the TEX formatter as its typesetting engine. Mittelbach and Rowley state that "TEX is fully programmable," allowing for the development of user interfaces which are processed for TEX's typesetting engine. They introduce LATEX as such an interface, designed "to support the needs of long documents such as textbooks and manuals." They go on to outline the use of LATEX as "the standard method of communicating and publishing documents in many academic disciplines," and it's spread to non-academic environments.
Wolfram Research stress that the use of TEX to display mathematics is limited to mathematical typesetting and not computation. They regard mathematical typesetting as being "fairly simple", involving only a limited number of constructs: "superscript, subscript, vertical and horizontal stacking, a set of special letters, and a few odd-ball notations like square roots." They go on to point out ambiguities that arise when computer systems try to analyse equations formatted only for typesetting and not semantic meaning, concluding that such languages are not suitable as input for computer mathematics systems.
In fact, Wolfram Research regards as a "danger" averted the possibility that mathematical representation on the Web might be based on a typesetting language like TEX, stating that this "would have precluded, or made far more difficult, meaningful computational interaction with mathematical expressions found on the web." It is for this stated reason that Wolfram Research became involved with the development of the MathML standard.
Boye mentions "numerous" attempts to display mathematics in Java applets but states that these fail to "solve some of the basic needs for a math markup language on the web." Another method by which mathematics is displayed online is using Macromedia Flash. This method still only displays the mathematics as text displayed using special alignment, or as images.
Portable Document Format (PDF) and PostScript are common formats for the display of documents which originated in a typesetting language. Hutchinson, 2003 states: "If you require your readers to see an exact replication of what your document looks like to you, then you cannot use HTML to transmit it." Hutchinson recommends the use of PDF or PostScript if this control is needed, but warns that defining documents in a "page layout language" impedes browsing. In fact, the reasons listed for using such as page layout language: precise control over the location of every symbol on the page, the ability to transmit "an exact replication of what your document looks like to you," are precisely why such formats fall short when assessed for accessibility and usability.
In the late 1970s the need arose for a language capable of storing large quantities of data. This language, SGML, has great power and flexibility, but is very complex to use. HTML is a constrained version of SGML, which sacrifices the power of SGML for a reduction in the complexity, and is widely recognised as the standard language for the publishing of information on the Web. Extensible Markup Language (XML) was designed to regain the power and flexibility of SGML whilst avoiding its complexity. XML is widely regarded as being the future standard for the exchange of information on the Web. MathML is an application of XML.
Realising that browser development is largely driven by economic factors, Miner, 1998a accepts that the scientific community provides too small a niche market for full browser implementation of a language like TEX. This highlights the advantages to MathML of being an XML application; with more possible applications, XML is a language browsers do intend to support. Thus MathML is far more likely to gain popular browser support.
The first MathML Specification was published by the W3C in 1998, with the most recent version in 2001. According to Miner, 1998b, the original intention for MathML was to create a language "roughly comparable to TeX or HTML." However, Miner reports that this goal turned out to be unrealistic, due to "technical, political and economic constraints," and so the working group was "obliged" to work towards something "achievable." Miner believes that the main problem with MathML is one of "public image." The complexity of MathML is often cited as an insurmountable problem. Sushkin, 1997 states: "I don't want to type [MathML], no way. It's ridiculous." It is not difficult to sympathise with this point of view; see figure 2.2.1 for a comparison between MathML and LATEX code for a simple equation.
(x+2)^2 <msup> <mrow> <mo>(</mo> <mi>x</mi> <mo>+</mo> <mn>2</mn> <mo>)</mo> </mrow> <mn>2</mn> </msup>
Figure 2.2.1 - Comparing LATEX (left) vs. (Presentation) MathML code for a simple equation (source: Sushkin, 1997).
However, MathML was not intended to be authored manually, it was intended as a low-level language for editors and conversion programs. Miner, 1997a discusses MathML as the "bottom layer of a layered design architecture." The idea is that various input methods can be written for the differing needs of mathematical notation systems (simple to type, machine-readable, simple to process, etc.), all of which translate to MathML. See below for examples of input methods and translators.
The issue is raised by Wheeler, 1997, who claims that all previous mathematical input systems use a simpler notation. However, Miner, 1997b replies that such programs use a complex parser to translate the simple input into a data structure like that of the MathML encoding. Indeed, Wolfram Research claim that the key ideas for MathML are "derived directly from Wolfram Research's typesetting technology," a claim backed up by Miner.
Miner believes people are evaluating MathML "at the wrong level." Miner suggests authors compare MathML with a language like PostScript, which is a low-level processing language. An author may not wish to directly edit a PostScript file, preferring instead to edit the corresponding LATEX source file, for example. Similarly, MathML files should not be edited directly but input using a simpler system, such as LATEX or a MathML input program.
A list of MathML implementations is maintained by Ion and Froumentin, 2003. This section will describe some of these in general terms, more to demonstrate the potential of MathML than to evaluate the current state of technology.
Necessarily, the majority of these implementations deal with the input or conversion of MathML. It is vital to the wide implementation of MathML that relatively 'painless' methods of producing MathML code exist.
Fairbairns, 2003 addresses the issues of converting TEX and LATEX to documents suitable for viewing on the Web, and claims evidence that users of TEX and LATEX are starting to use MathML-capable browsers.
Given the semantic advantage of MathML over previous formats for mathematics, one might wonder how converters from existing formats are possible. Inferring semantics in a mathematical expression is clearly a difficult task. Fateman, 1998 reports that LATEX to MathML translators assume a context for LATEX source that allows them to impute semantics. This is of course not always successful, but works on common notation.
LATEX to MathML conversion can be seen as an important step in MathML development. LATEX is a language with which many mathematicians are already familiar, and outputting one's LATEX as MathML rather than as PostScript or any other format should not be too much of a change in methods.
A number of programs exist which provide a graphic interface to produce MathML code. In addition, a number of computer algebra systems will output documents as MathML, as will the Microsoft Word (with a plugin) and Open Office word processing systems. The advantage of these products is that they provide simple to use methods of producing MathML code, or use systems with which potential authors may already be familiar.
In addition to such interfaces, EzMath provides a notation "inspired by how expressions are spoken aloud together with a few abbreviations for conciseness". So, EzMath accepts input such as "integral from 0 to pi of sin ax wrt x", and provides conversion to Content MathML (see Raggett and Batsalle, 1998).
Of course, implementation of translators to other formats from MathML are also important to development. It could be considered useful to be able to copy and paste a MathML expression into a computer algebra package, or translators from MathML to LATEX for printing of information found on webpages, say. Indeed, Thomas, 2000 imagines right-clicking on a piece of MathML in a browser and being presented with: "Solve for x", inserted by a favourite computer algebra system.
Bhuvanesh, 2001 contains details of a system of MathML import/export for a Texas graphic calculator. The implications for handheld computing are huge here; MathML expressions (questions, perhaps) can be imported to the calculator, solved and published back to the Web (or a computer manipulation or mathematical typesetting system). One could imagine the usefulness of this to a student, who could download questions and then type the answers without access to a computer.
Another important conversion process is that of translation of MathML to earlier mathematics display formats. By using a program which converts MathML to images on loading of the page, one is able to produce MathML code and yet serve images to browsers not able to render it correctly.
An interesting conversion program is BraMaNet, which translates MathML into French Mathematical Braille. This development, while ostensibly only useful to readers of French Mathematical Braille, shows the huge potential of MathML for accessibility. If published mathematics webpages can readily be printed as Braille, this greatly improves potential access of mathematics to users with visual impairment.
It seems disappointing that the list maintained by Ion and Froumentin contains no MathML to speech conversion programs. Distler, 2003 reports that "a certain amount of optimism back in 2000" has not yet lead to screen reader software which can read MathML. "Right now," Distler regards the recommendation to use MathML for accessibility as "wishful thinking," but includes his equations as MathML anyway, regarding rendering equations as images as "almost the definition of inaccessibility" and MathML as "only sensible [way] to put math on the web."-go to contents.
This section deals with the support for MathML offered by the major web browsers. While it is recognised that browsers such as W3C's Amaya and ICESoft's Java browser have support for MathML, this section concentrates on the browsers noted in a recent web browser study by OneStat.com. Of course, it is important to realise that these are general statistics for Web use and are not necessarily representative of a particular set of users.
OneStat.com has statistics claiming Internet Explorer is used by 94.3% of Web users, Mozilla and Netscape browsers together comprise about 4.1 percent and the Opera and Safari browsers are used by 0.6% and 0.25%, respectively.
Experiments reveal Internet Explorer has some native support for MathML, but Design Science's MathPlayer plugin adds full MathML support. Miner and Topping, 2003 claim that MathPlayer had over 100,000 downloads at September 2003. They mention that Microsoft has licensed the MathPlayer plugin for use with the MSN "Math Homework Help feature" and thus predict MathML browser support for "many millions of desktops over the coming months."
The Mozilla browser will render MathML. According to The Mozilla Foundation, Mozilla is cross platform, with support for "Linux, Mac OS X, Windows, and others platforms."
Opera claims no support for MathML. Opera Customer Service, 2002 states: "For this version , we have concentrated on standards that will actually improve browsing for most users," claiming: "you have to be in pretty special circles to even stumble upon [MathML]." It is unclear whether Opera support for MathML will be available in the future.
Miner and Topping state that Apple's Safari browser (recently included as default on the OS X operating system) currently has no MathML support, but hope that Safari developers will listen to the results of recent "informal polls" for requested features, in which MathML "ranks high."-go to contents.
Right now, MathML can bring faster download (and thus faster assimilation by students) of mathematics webpages. MathML pages will look attractive at differing resolution, onscreen or printed. If properly implemented, MathML will bring us search engines able to pick up particular equations, even particular mathematical concepts. It will bring software able to read mathematics unambiguously to the visually impaired. It will bring great integration between mathematics software and the web.
MathML authoring tools exist, much commonly used software has MathML output. Converters from, say, LATEX to MathML exist. One could set up MathML webpages with an image-based version of each page produced automatically if needed by a particular student, to bridge the gap in technology until all students are able to access MathML. Students using Internet Explorer, or those using the cross-platform browser Mozilla, can access MathML code today.
MathML is here and ready to use. It would seem the only reason MathML is not widely used is that few people are using it!-go to contents.
BHUVANESH, B., 2001. TIMathML: MathML import/export for the TI-89/92+, Version 1.01 [online]. Towson, MD, USA: Towson University. Available at: http://triton.towson.edu/users/bbhatt1/ti/TIMathML.htm [Accessed: 20 October 2003].
BOYE, J., 1998. MathML - What's in it for us? [online]. irt.org. Available at: http://tech.irt.org/articles/js081/index.htm [Accessed: 7 October 2003].
CHISHOLM, W, ed., VANDERHEIDEN, G, ed. and JACOBS, I, ed., 1999. Web Content Accessibility Guidelines 1.0 [online]. World Wide Web Consortium (W3C). Available at: http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/ [Accessed: 9 October 2003].
DISTLER, J., 2003. MathML and Accessibility [online]. Austin, TX, USA: Musings: Thoughts on Science, Computing, and Life on Earth. Available at: http://golem.ph.utexas.edu/~distler/blog/archives/000199.html [Accessed: 20 October 2003].
FAIRBAIRNS, R, ed., 2003. The UK List of TeX Frequently Asked Questions [online]. UK TeX Users' Group. Available at: http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes [Accessed: 10 Ocotber 2003].
FATEMAN, R.J., 1998. 'syntax/ responses to firstname.lastname@example.org.' www-math [online], 7 May. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 17 October 2003].
HUTCHINSON, I., 2003. Should I translate TeX to HTML or not? [online]. TTH: the TeX to HTML translator. Available at: http://hutchinson.belmont.ma.us/tth/shouldi.html [Accessed: 11 October 2003].
ION, P, ed. and FROUMENTIN, M, ed., 2003. MathML Software [online]. World Wide Web Consortium (W3C). Available at: http://www.w3.org/Math/implementations [Accessed: 20 October 2003].
MINER, R., 1997a. 'Re: Math Markup is too awkward..' www-math [online], 25 July. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 14 October 2003].
MINER, R., 1997b. 'RE: MathML: Unacceptable. Way too complex and not backward-compatible.' www-math [online], 17 August. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 14 October 2003].
MINER, R., 1998a. 'Re: MathML vs HTML math, vs ???.' www-math [online], 27 January. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 14 October 2003].
MINER, R., 1998b. 'Re: Goals verses syntax in MathML.' www-math [online], 7 May. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 17 October 2003].
MINER, R. and TOPPING, P., 2003. Math on the Web: A Status Report [online]. CA, USA: Design Science. Available at: http://www.dessci.com/en/reference/webmath/status/status_Sep_03.htm [Accessed: 17 October 2003].
MITTELBACH, F. and ROWLEY, C., 1999. The LaTeX3 Project [online]. Available at: http://www.latex-project.org/guides/ltx3info/ [Accessed: 10 October 2003].
MOZILLA FOUNDATION, 2003. Why Use Mozilla [online]. The Mozilla Foundation. Available at: http://www.mozilla.org/why/ [Accessed: 19 October 2003].
NIELSON, J., 1997. The Need for Speed [online]. Available at: http://www.useit.com/alertbox/9703a.html [Accessed: 7 October 2003].
OETIKER, T., et al, 2003. The Not So Short Introduciton to LaTeX2E [online]. Available at: http://ctan.tug.org/tex-archive/info/lshort/english/lshort.pdf [Accessed: 10 October 2003].
ONESTAT.COM, 2003. Microsoft's IE 6 global usage share continues to rise according to OneStat.com [online]. Available at: http://www.onestat.com/html/aboutus_pressbox23.html [Accessed: 17 October 2003].
OPERA CUSTOMER SERVICE, 2002. 'Re: where is mathml, svg etc. support?.' MyOpera Forums [online], 15 November. Available at: http://my.opera.com/forums/ [Accessed: 19 October 2003].
RAGGETT, D. and BATSALLE, D., 1998. Add Math to Web pages with HP EzMath v1.1 [online]. Available at: http://www.w3.org/People/Raggett/EzMath/ [Accessed: 20 October 2003].
SUSHKIN, N., 1997. 'Math Markup is too awkward.' www-math [online], 7 May. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 20 October 2003].
THE MATH FORUM, 2003. Math Typesetting for the Internet [online]. Drexel University, PA, USA: The Math Forum. Available at: http://mathforum.org/typesetting/ [Accessed: 9 October 2003].
THOMAS, M., 2000. 'Reader Opinion: MathML's Viability', MozillaZine, Available at: http://www.mozillazine.org/articles/article572.html [Accessed: 12 October 2003].
TOPPING, P., 1999. Mathematics on the Web: MathML and MathType [online]. CA, USA: Design Science. Available at: http://www.dessci.com/en/reference/white_papers/mt_mathml.htm [Accessed: 7 October 2003].
WHEELER, D., 1997. 'MathML: Unacceptable. Way too complex and not backward-compatible.' www-math [online], 15 August. Available at: http://lists.w3.org/Archives/Public/www-math/ [Accessed: 14 October 2003].
WOLFRAM RESEARCH, 2003. History of MathML [online]. Champaign, IL, USA: Wolfram Research. Available at: http://www.mathmlcentral.com/history.html [Accessed: 8 October 2003].