A distinguishing feature of mathematics is the use of a complex and highly evolved system of two-dimensional symbolic notations. As J. R. Pierce has written in his book on communication theory, mathematics and its notations should not be viewed as one and the same thing [Symbols, Signals and Noise; Appendix; Harper & Row, New York 1961]. Mathematical ideas exist independently of the notations that represent them; indeed, one can convey a great deal of simple mathematics using only ordinary words, as the ancient Babylonians and Indians did. However, the relation between meaning and notation is subtle, and unquestionably, part of the power of mathematics to describe and analyze derives from its ability to represent and manipulate ideas in symbolic form.
Mathematical notations are continually evolving, since their use is in making mathematics easier to do and convey. People are always thinking up new ways of approaching and expressing ideas. The commonplace notations of simple everyday mathematics, even of arithmetic, have not always been the standard ones in use today. For a study of the history of such matters one may refer to F. Cajori's influential volumes [Florian Cajori, History of Mathematical Notation, vol. I & II, New York 1928 & 1929], where one may find an amazing variety of suggestions documented, including many defunct ones, due to the leading mathematical figures of their day. Modern mathematical notation is the product of centuries of refinement, both in terms of practice and of typography.
Even at the simplest level, the notational conventions of subjects like arithmetic are complex. By convention, variables, i.e. letters which stand for numbers, are typeset in an italic font, often a special one subtly distinct from the text italic. Arithmetic expressions are written using digits, variables, and the conventional signs for arithmetical operations. The common arithmetical operations of addition, subtraction, multiplication and division are represented with special signs +, -, x and /. In high quality typesetting, the spacing around these operators is slightly different from that of text, to reflect, for example, that by convention multiplication is a higher precedence operation that addition.
The fact that there are difficulties in displaying even these most common of notations -- we must substitute an "x" for a times symbol, and use a slash instead of a division sign -- underlines the pressing need for dealing with the problem of mathematics for the World Wide Web.
The nature of mathematical notation, and indeed that of all other forms of communication has always been strongly influenced by the technology of communication. As communication technology progressed from clay tablets to papyrus and on to printing, mathematical notation made use of the newly available possibilities. Thus as the idea of a font emerged and was represented physically by the type in a font case, and then font case became larger, variant letters were used as variable names which could be readily distinguished from the run of the mill form. Later many conventions for communication of ideas through printed texts appeared, and each had to be invented at some point. Examples are page-numbering and indexing, and later for mathematics, say, equation numbering and references within a work linking different parts of text. It was some time in the history of printing before mathematical notations and it signs were able to be handled conveniently. G. Peano, whose axioms for the natural numbers are the ones most commonly discussed now, is also credited with the device of decimal-like numbering of sections such as we are using in this document.
In the present era there has arisen a new communication medium, that provided by networked electronic computers. Mathematics is just beginning to be expressed using this channel. With this advance in communication technology, there is an opportunity to once again expand our ability to represent, encode, and ultimately communicate our mathematical insights and understanding with each other. We believe that MathML is an important step in developing Mathematics on , to reflect, for example, that by convention multiplication is a higher precedence operation than addition.
The fact that there are difficulties in displaying even these most common of notations -- we must substitute an "x" for a times symbol, and use a slash instead of a division sign -- underlines the pressing need for dealing with the problem of mathematics for the World Wide Web.
The nature of mathematical notation, and indeed that of all other forms of communication has always been strongly influenced by the technology of communication. As communication technology progressed from clay tablets to papyrus and on to printing, mathematical notation made use of the newly available possibilities. Thus as the idea of a font emerged and was represented physically by the type in a font case, and then font case became larger, variant letters were used as variable names which could be readily distinguished from the run of the mill form. Later many conventions for communication of ideas through printed texts appeared, and each had to be invented at some point. Examples are page-numbering and indexing, and later for mathematics, say, equation numbering and references within a work linking different parts of text. It was some time in the history of printing before mathematical notations and it signs were able to be handled conveniently. G. Peano, whose axioms for the natural numbers are the ones most commonly discussed now, is also credited with the device of decimal-like numbering of sections such as we are using in this document.
In the present era there has arisen a new communication medium, that provided by networked electronic computers. Mathematics is just beginning to be expressed using this channel. With this advance in communication technology, there is an opportunity to once again expand our ability to represent, encode, and ultimately communicate our mathematical insights and understanding with each other. We believe that MathML is an important step in developing Mathematics on the Web.
The World Wide Web was initially conceived and implemented by a scientist, Tim Berners-Lee, for scientists. In fact the members of the high-energy physics community, to whom the Web was first available, write highly mathematical papers. Since its inception, the Web has demonstrated itself to be an very effective method of making information available to widely separated groups of individuals. However, the capability to include mathematical expressions in HTML is very limited. The common practice among scientists before the Web was to write papers in an encoded form based on the ASCII character set, such as Donald Knuth's TeX typesetting language, and e-mail them to each other. This largely remains the state of affairs today.
At present, communicating mathematics on the Web involves using the ordinary HTML image mechanisms to include pictures of scientific notation. Technically adept authors with access to sufficiently sophisticated software can produce mathematical web pages in this way. However, this strategy is inherently flawed both in terms of visual quality, and in making the underlying mathematical structure available for searching, audio rendering, style sheets, or any kind of automatic processing. More to the point, the ordinary users who have been empowered by the ease with which simple HTML markup can be written and displayed, remain frustrated in their attempts to include even the simplest formulas.
Of course, the problem of encoding mathematics for computer processing or electronic communication is older than the Web. An excellent analysis of markup methods for mathematics in wide use in 1992, just before the Web rose to prominence, is given in "Standard dtd's and scientific publishing" by N.A.F.M. Poppelier, E. van Herwijnen, and C.A. Rowley, [EPSIG News 5 (1992) #3, September 1992, p.10-19.]
As the Web came into prominence, however, it became clear that lack of support for scientific communication was a serious problem, and from early on, the World Wide Web Consortium (W3C) has encouraged attention on this issue. Initially, Dave Raggett, the author of HTML 3.0, made a proposal for HTML Math in 1994. Although that proposal was not ultimately incorporated into HTML 3.2, at the WWW IV Conference in Darmstadt in April 1995, a panel discussion was held from which the continued interest of the community in mathematics on the Web was clear. A group was formed to discuss the problem further.
In the intervening two years, the W3C and the math working group have both evolved substantially. The small informal math group has grown, and been formally reconstituted as the W3C HTML-Math working group. The MathML proposal reflects the interests and expertise of a very diverse group, together with a great deal of thought and effort.
Several themes and milestones in the development of MathML deserve special attention. One such theme is the question of accessibility, especially for the visually handicapped. T. V. Raman, whose AsTer system can read mathematics written in TeX encoding aloud, was particularly notable in this regard. Neil Soiffer and Bruce Smith from Wolfram Research provided important stimulation by providing draft documents based on extensive work they had previously done on the problems of representing mathematics in connection with the design of Mathematica 3.0. The relationship of MathML to other math encoding efforts in the SGML community has benefited from the participation of a number of working group members, including Stephen Buswell, Stéphane Dalmas, Stan Devitt, Angel Diaz, Robert Sutor, and Stephen Watt. In particular, MathML has been influenced by the OpenMath project, and by the work of the ISO 12083 working group, lead by E.R. Pike of Stilo Technologies, developing a 'semantic' DTD fragment. Finally, the participation of the American Mathematical Society has played a key role in the development ofMathML. Among other things, it has provided two working group chairs: Ron Whitney led the group from May 1996 to March 1997, and Patrick Ion, who has co-chaired the group with Robert Miner from The Geometry Center, from March 1997 to the present.
HTML 3.2 does not provide an adequate solution for communicating scientific notation over the Web. To illustrate its main weaknesses, consider the following examples.
Example 1: Consider the equation . This equation is sized to match the surrounding line in 14pt type on the system where it was authored. Of course, on other systems, or for other font sizes, the equation is too small or too large.
A second point to observe is that the equation image was generated against a white background. Thus, if a reader or browser resets the page background to the gray default, the anti-aliasing is wrong.
The net effect on most platforms is that the equation is significantly harder to see, read, and comprehend than the surrounding text.
Example 2: Consider the equation . This equation has a descender which places the baseline for the equation at a point about a third of the way from the bottom of the image. One can pad the image like this , so that the centerline of the image and the baseline of the equation coincide, but this causes problems with the inter-line spacing, which also makes the equation difficult to read. Moreover, center alignment of images is handled in slightly different ways by different browsers, making it impossible to guarantee proper alignment on different clients.
Example 3: Print this document. The resolution of the equations will be around 70 dots per inch, while the surrounding text will probably be 300 or more dots per inch. The disparity in quality is judged to be unacceptable by most people.
Example 4: Consider trying to search this page for some part of the example equations, for example the "=10" from the first example. In a similar vein, consider trying to cut and paste an equation into another application. Using image based methods, neither of these common needs can be adequately address. Although the use of ALT text in the document source can help, it is clear that highly interactive Web documents must provide a more sophisticated interface between browsers and mathematical notation.
Example 5: Imagine loading a page with several hundred equation images. Limited bandwidth is a serious issue for many readers and authors. By moving toward content-based markup, more of the rendering process is done by the client machine. Markup describing an equation is typically much smaller than an image of the equation.
The current shortcomings of HTML for mathematical communication illustrated by the preceding examples are of two types. There is an encoding problem and there is an implementation problem.
Some of the problems associated with including math notation as images really amount to implementation problems, such as providing a mechanism for lining up the baseline of the equation with the surrounding text. However, even if image handling in browsers were improved to eliminate the problems with printing and screen display, the future of HTML for scientific communication would still be severely limited, because the information contained in images requires a human reader to be useful.
In planning for the future, it is clear that the ability to process electronic documents automatically in various ways will be of paramount importance. At a simple level, this is necessary to be able to update and maintain large document collections as hardware and software advances. At a deeper level, the ability to search intelligently for information, and to use it in a new way or a new context is a crucial ingredient in the Web. Interconnectivity is the central metaphor for knowledge storage and retrieval in the electronic era, just as classification has been dominant in the print era.
For this reason, the encoding of mathematical notation for the Web is ultimately more important than the short term implementation problem. Neither can be ignored. However, if the encoding problem is solved well, documents authored today will still live on when better implementations become available, as they surely will. By contrast, if we focus to narrowly on implementation issues, we stand to lose a great many documents as the technology they require for display goes out of date.
Because the long term viability of mathematics on the Web depends more on the way it is encoded than on the details of how renderers might be implemented, the development of the Mathematical Markup Language has been the main undertaking of the W3C HTML-Math Working Group. However, developing a means to enable the use of mathematical formalism in Web documents in full generality, is a very large complex of problems. Therefore, the group has selected a restricted, but still wide-reaching, set of more specific goals to work on:
The Working Group intends to develop an open specification for math to be used with HTML that:
The goals of the preceding section focus largely on the encoding problem for mathematics on the Web. At the same time, it is clear that in order to be useful, it must be possible in the near future to implement a renderer for any proposed mathematical markup language.
To this end, the Working Group has identified a short list of implementation goals in addition to the overall goals for MathML. These goals arose from a great deal of experimentation, and attempt to describe concisely the minimal functionality required for MathML to be fully implemented.
The Working Group believes that all of these goals are attainable in the near term by using embedded elements such as Java applets, plug-ins and ActiveX controls to render MathML. However, the extent to which these goals are met depends on the cooperation and support of browser vendors, and other software developers. The HTML Math working group has been encouraged by the willingness to try to accomodate the needs of math which the Document Object Model Working Group of the World Wide Web Consortium has shown.
Implementation Goal 1: MathML equations should render in accordance with reader and author viewing preferences, and at the highest quality possible given the capabilities of the platform.
The two primary stumbling blocks to the widespread acceptance and use of the Web for technical documents are the unacceptably poor quality of rendered technical notation that current image based methods produce, and the difficulty of authoring technical Web documents. These make the cost/benefit ratio too low for widespread acceptance.
Implementation Goal 2: MathML equations should print properly and at high quality printer resolutions.
In order to be widely useful, it must be possible to print technical Web documents. Image-based methods provide unacceptable print quality, while other methods are either undependable, platform dependent, or simply non-existent. The overhead and inconvenience of maintaining a printable version and an electronic version of a document has proven itself too great for widespread acceptance.
Implementation Goal 3: MathML equations should be able to react to mouse gestures, and coordinate communication with other applications through the browser.
The first two implementation goals are meant to insure that HTML Math documents are as useful as their traditional paper counterparts; readers must be able to conveniently read them online, and print them out for use away from the computer. In short, HTML Math documents should be as effective in replacing paper math documents as plain HTML documents are in replacing paper text documents.
However, to realize their potential as electronic documents, HTML Math documents must be able to fully interact with other electronic documents on the web. For example, at a minimum, MathML expressions need to support linking for subexpressions, and cut and paste functionality.
The demand for effective means of electronic scientific communication is high. Increasingly researchers, scientists, engineers, educators, students and technicians find themselves working at a distance and relying on electronic communication. This extended scientific community represents a large commercial market that is not well-served at present. Taken together, these markets represent billions of dollars of business world wide for a robust MathML solution. Consider:
The education community continues to incorporate more and more online materials into the curriculum both in response to the changing education needs of society, and to government incentives. In spite of this, science and mathematics teachers, usually with limited resources of time and equipment, are severely hampered by the difficulty of authoring technical Web documents, and by their subsequent poor quality.
In teaching one often wants to post publicly the neat example, or the lecture notes for the students. One wants to put up exams, receive solutions and post annotated standard answers. You cannot do this without being able to write mathematical notation. Online textbooks are the next level of publication that will be tried. There will be a lot to learn in using the new medium, but there has to be a new medium to fit with the rest of the Web which is widely exploited in the educational community. Management consultant Peter Drucker has recently been prophesying the end of big-campus residential higher education and its distribution over the Web [Forbes 10 Mar 1997, quoted by Gene Klotz]. That will not be true for math if you cannot write it; but it will not be good for the subject either.
In the research community, especially in some areas of physics and mathematics, there has been developing a preprint culture. This is served by highly successful preprint servers, like that at Los Alamos started by Paul Ginsparg. In mathematics there are corresponding collections at Duke, MSRI and SISSA, and on the AMS e-Math server. There are about a dozen electronic math journals too. In addition, databases of information on mathematical research, such as Mathematical Reviews and Zentralblatt für Mathematik, offer millions of records containing math on the Web. There is lots of math there, but it is mostly in TeX as a sort of foreign inclusion within the Web.
What has just been said for the professional math literature holds, with variations, for the literature of science and engineering at large which makes extensive use of formulas and equations. Chemistry is trying to solve similar problems, and there is a development of a chemical markup language, CML, which is also XML-based.
The corporate and academic R & D communities must often spend scarce resources on just communicating technical information in a variety of formats. Results obtained in one computer algebra system are very difficult to share with colleagues using another system, just as papers written in TeX are difficult to share with a colleague using Word. All too frequently, the result is inadequate communication and duplication of effort. Developers of mathematical software, in an attempt to address this problem, formed the OpenMath Consortium in 1993 "to provide a universal protocol for the exchange of mathematical data between programs." Work in this area is ongoing.
The academic research journal market is facing a financial crisis. While library budgets decline, the number of specialized research journals with fixed printing costs increases. As subscriptions decline, the burden of supporting such journals increasingly falls on fewer, larger institutions, in effect decreasing the availability of information. In spite of this substantial financial pressure for low fixed cost, easily distributed electronic journals have had a minimal impact to date, in large part because of the inherent inadequacy of HTML for technical documents, and because of the lack of effective authoring tools.
The commercial publishing community has an interest not only in academic journals, but also in interactive, online texts. This market also utilizes CD-ROM publishing, again because of the inadequacy of HTML for scientific text, and because of the lack of a proven online business model. However, as internet commerce develops further, and the Web further permeates the home environment via Web TV, internet computers and other home-oriented devices, the incentive and market for genuinely online texts will grow rapidly.
Mathematical notation is substantially more difficult to process and render than text. It relies on a rich collection of two dimensional layout schema (schemata), as well as a large collection of symbols. Moreover, the Web environment encourages us not only to think of Web pages as static objects displayed on a computer screen, but as dynamic objects which can render to a variety of other media, from voice synthesizers to mathematical software packages. However, by building on the strengths of existing mathematical markup schemes, and by taking advantage of emerging standards for extending the functionality of HTML, MathML provides a powerful, flexible and practical method of communicating mathematics on the Web.
Without question, one of the most influential mathematical markup languages of the last two decades is the TeX typesetting system developed by Donald Knuth. TeX is a de facto standard in the mathematical research community, and it is pervasive in the scientific community at large.
Inevitably, MathML has been deeply influenced by TeX. However, several factors make TeX itself inappropriate as a markup language for the Web. Foremost among them is that TeX is very much a layout-based markup language. That is, TeX provides authors with precise control over the final appearance of mathematical notation, but imposes very little structure on the methods by which that appearance is obtained. A trivial example is that in an expression like (x + 2)2, the superscript is attached to the closing parenthesis; in TeX the simple markup for this does not express that the superscript is attached to the expression (x + 2) as a whole.
Nonetheless, TeX sets a standard for quality of visual rendering, and a great deal of effort has gone into insuring MathML can provide the same visual rendering quality. Moreover, because of the large body of legacy documents in TeX, and because of the large authoring community versed in TeX, a priority in the design of MathML was the ability to convert TeX math input into MathML format.
A second markup language that has had considerable influence is the ISO 12083 math DTD fragment. ISO 12083 is also a layout-based markup language which primarily describes the visual presentation of mathematical notation. ISO 12083 presentation maths was substantially based on the TeX model, and as such, it shares the same weakness in expressing structure. However, as an SGML application, ISO 12083 is considerably more regular and therefore more suitable for automatic processing.
Another major influence on MathML is the large body of work on encoding the semantics of mathematical expressions, that is, encoding what a math expression means, as opposed to its visual appearance. An important effort in this direction is the Semantic Maths DTD.
Another important body of work comes from the mathematical software community, and in particular from computer algebra systems. Many of the presentational elements of MathML are derived in part from Mathematica ® 3.0 typesetting boxes. The OpenMath project has close ties to both the SGML and computer algebra communities, and has laid a foundation for an SGML-based means of communication between mathematical software packages, among other things.
The ability to capture the semantic meaning of mathematical expressions has been a goal of MathML from the outset. However, none of the currently existing semantic mark up systems is entirely appropriate for MathML. For one thing, describing the semantics of all of mathematics is an impossible task, and even describing the bulk of current mathematics is Herculean in its scope.
Moreover, situations abound where the ability to encode notational structure independently of semantic meaning is necessary. For legacy data, where the author is not available to clarify the semantic meaning, and for new research where the semantics is not yet clear, it is essential to provide a mechanism for notation mark up, in addition to semantic mark up. At times, authors may wish to display notational fragments, which in themselves have no semantic meaning. Even when the semantics of an expression can be expressed, a mechanism is required for encoding different notational forms which express the meaning.
In addition to harmonizing well with the established traditions in mathematical markup described above, MathML must harmonize with the existing HTML environment. This problem is not unique to MathML. The success of HTML has led to enormous pressure to incorporate a wide variety of data types and software applications into the Web. Each new format or application potentially places new demands on HTML, and on browser vendors. Clearly, this situation is ultimately untenable.
In response, two dominant extension mechanisms for the Web seem to be emerging. The first is XML, and in the context of this discussion it can be viewed as a mechanism for extending HTML, though it has considerably wider application in general. The second consists of the various browser extension mechanisms such as Java applets, plug-ins and ActiveX controls. We will refer to these objects generically as embedded objects, and examine their implications for MathML in more detail in the next section.
Extensible Markup Language or XML is a simplified dialect of SGML designed to be suitable for the Web. As its name implies, extensibility is a key feature; XML authors are free to declare and use new tags and attributes. At the same time, the XML syntax carefully enforces document structure to facilitate automatic processing and maintenance of large document collections.
Because of its extensibility and structure, XML is ideal for marking up complex and specialized data. Although large data base applications such as the health care, semiconductor, and aerospace industries are usually cited as motivating examples for XML, XML admirably serves the needs of MathML as well.
In addition to its theoretical advantages, XML has garnered support from major browser vendors as well. Consequently, both on theoretical and pragmatic grounds, it makes a great deal of sense to specify MathML as an XML application, and we have done so.
While XML provides a powerful and flexible way of specifying the structure and syntax of MathML, a mechanism is also required for specifying how MathML should be processed and rendered. Ideally, browsers should natively process and display MathML, and given the importance of technical communication to the scientific and economic infrastructures of society, it is not unreasonable to think this will ultimately be the case.
However, for MathML in the near term, and for XML applications in general, it is necessary both to specify the processing model and to provide a processor. Style sheets provide the mechanism for specifying the processing model, and embedded objects provide a way of doing the processing.
A few short years of Web growth have provided numerous convincing examples of the benefits of separating logical content markup from late-binding style attributes. This philosophy has long been a mainstay in the SGML world, and is being carried forward by XML. Moreover, after an initial dalliance with media-specific extensions to HTML for controlling the visual appearance of a HTML document on the screen, the Web community at large is realizing that a more powerful and general way of controlling style parameters is necessary. Cascading Style Sheets provide this functionality, and are rapidly gaining widespread acceptance. Style sheets provide a way of attaching media-specific rendering instructions that can be controlled from the client device. This results in both better structured, more maintainable documents at the server, and better rendering tailored to the specific characteristics of the client.
However, the rendering style parameters that are currently recognized by major browsers are geared toward primarily text-based content. Thus, in order to process and render content such as MathML (or many other kinds of complex structured data) it is necessary to extend native browser capabilities by providing embedded elements. As one popular slogan puts it, XML gives Java something to do. Part of the HTML Activity at the World Wide Web Consortium focuses on defining a document object model rich enough to facilitate complex interactions between browsers and embedded elements, such as those necessary to provide high quality rendering of MathML.
While work on XML, style sheets, embedded objects, and the document object model is ongoing, the intent of these efforts is to provide an infrastructure capable of supporting sophisticated markup and rendering tasks such as MathML. Moreover, while much remains to be done, enough of this infrastructure is already available to provide a workable, if not ideal, short term solution for the needs of MathML.
The fundamental challenge in defining a mathematics markup language for the Web lies in reconciling the need to encode both the structure of a mathematical notation and the structure of the mathematical idea or object which it represents.
The relationship between a mathematical notation and a mathematical idea is subtle and deep. On a formal level, the results of mathematical logic raise profound and unsettling questions about the correspondence between symbolic logic systems and the phenomenathey model. At a more intuitive level, anyone who uses mathematical notation knows the difference that a good choice of notation can make; the symbolic structure of the notation suggests the logical structure. For example, the Leibniz notation for derivatives "suggests" the chain rule of calculus through the symbolic cancellation of fractions:
Mathematicians and teachers understand this very well; part of their expertise lies in choosing notation that emphasizes key aspects of a problem while hiding or diminishing extraneous aspects. It is commonplace in math and science to write one thing when technically something else is meant, because long experience shows this actually communicates the idea better at some higher level.
At the same time, mathematical notation is capable of prodigious rigor. Used carefully, mathematical notation is virtually free of ambiguity. Even when mathematical notation is "abused" in the way described in the preceding paragraph, a completely precise description of the underlying idea still usually exists. Of course in practice, the more abstract the subject matter, the more difficult and tedious it becomes to give a full description of the concepts under discussion; typically the context is understood between the author and the audience, and notation is used almost as shorthand.
In many other settings, though, the full, precise meaning of mathematical expressions is apparent to both the author and the reader. Moreover, there is great utility in encoding that precise meaning explicitly in the markup language so that it is available for use by other renderers and processors, from computer algebra systems to voice renderers and 3D graphics packages.
Given the complex relationship between mathematical notation and ideas, between authors and readers, and the multiplicity of scenarios in which they interact, the question remains, "What should the content of a mathematical markup language for the Web be?" The answer which MathML gives is this:
MathML is a markup language for describing mathematical expression structure, together with a mathematical context.
In some situations, the mathematical structure may be no more than the symbolic structure of the notation. For these situations, MathML provides tags for all commonly used mathematical presentation schema, such as <MSUP>, <MFRAC> and <MROW>. There are roughly 25 of these presentation tags with around 40 attributes.
In terms of their ability to describe high quality screen and print rendering, the MathML presentation tags are on a par with TeX. More importantly, because the tags describe presentation schema, not visual layout per se, the presentation expression structure is as compatible as possible with the natural underlying mathematical structure.
Consider the notation . Using MathML presentation tags, this might be marked up as:
<MSUP> <MROW> <MF>(</MF> <MROW> <MI>x</MI> <MO>+</MO> <MN>2</MN> </MROW> <MF>)</MF> </MROW> <MN>2</MN> </MSUP>
Note that the superscript schema contains two subexpressions corresponding to the base and exponent, reflecting the natural mathematical structure of the exponentiation operation with two arguments that the notation represents. This contrasts sharply with a markup language like TeX where by default the superscript is attached only to the final parenthesis.
Although a superscript can denote function composition, a derivative, or even a cohomological index, a human reader easily understands from the context that the superscript in the preceding example indicates a power. However, making this information explicit facilitates speech rendering and other automatic processing. Ideally, it should be easy to specify simple mathematical operations completely enough to aid speech rendering, etc., and in MathML it is.
MathML provides around 50 content tags in addition to the presentation tags. Using these tags, the preceding example can be encoded as
<EXPR> <EXPR> x <PLUS/> 2 </EXPR> <POWER/> 2 </EXPR>
Note we do not need to encode the parentheses to specify the meaning, since the scoping is defined by the EXPR elements. However, to display them, one would typically use the "fence" presentation element <MF> as shown below. Similarly, authors can rely on the default behavior of specific renderers, provided this is specified, to correctly render variables and numbers. However, to guarantee proper visual rendering of variables and numbers, an author should use <MI> and <MN> tags:
<EXPR> <EXPR> <MF>(</MF> <MI>x</MI> <PLUS/> <MN>2</MN> <MF>)</MF> </EXPR> <POWER/> <MN>2</MN> </EXPR>
The MathML content tags more or less cover elementary mathematics through basic calculus. It is worth noting that HTML-Math working group expects to provide extension mechanisms to MathML for describing the content of very advanced mathematics as well. However, by mixing the presentation and content tags from the MathML core standard, a great deal of commonly used mathematics can be expressed in a relatively unambiguous way. In situation demanding completely rigorous content specification, such as communication between scientific software packages, an encoding system such as OpenMath is better suited. In many other situations, processors such as voice renderers and computer algebra systems could use heuristic methods to infer much more of the intended mathematical context than is possible from presentational markup alone.
In cases where the semantic meaning of an expression cannot be unambiguously described with MathML tags, there is a way of binding arbitrary semantic interpretation data and presentation structure together. The author is free to provide semantic data in any form, for example as an OpenMath expression, or a computer algebra system expression. This makes the information available for renderers and processors that know how to take advantage of it, while providing a notation for screen and print renderings.
The MathML core specification is designed to encode complex notational and semantic structure in an explicit and flexible way. It is designed to be easy to generate and process. However, in order to facilitate the use of MathML by the widest possible audience, and to enable its smooth evolution to encompass more notational forms and more advanced rendering capabilities, MathML will have to be extended.
One area in which MathML will have to be extended is its interface mechanisms. The most fundamental interface mechanism governs the embedding of Math markup in an HTML document. However, most rendering in the near term will probably be done via embedded elements. Thus, it is reasonable to assume that some of these renderers will provide additional specialized capabilities. Consequently, the MathML core specification provides mechanisms for passing additional information directly to renderers that can take advantage of it.
Another direction in which MathML should be extended is mechanisms for simple authoring. Authors who enter technical markup by hand need terse and easy-to-type input syntaxes. Two extension mechanisms designed to meet this need are macros and alternative input syntaxes. The HTML Math working group intends to investigate these topics further. In particular, Wolfram Research has proposed a short form input syntax. Two renderers which have announced plans to implement MathML, WebEQ and IBM techexplorer will both accept an alternate input syntax based on TeX. The group charter specifies that the working group will release a proposal by May, 1998.