Amaya: Editing MathML with other XML languages

Irčne Vatton and Vincent Quint (presented by Paul Cheyrou-lagreze)
W3C/INRIA


Abstract

This paper presents an implementation of MathML in the web editor/browser Amaya. It shows the advantages that MathML can bring to the scientific community when implemented in conjunction with other web technologies.

Amaya is a full-featured web client developed by W3C for experimenting and validating web specifications at an early stage of their development. In addition to MathML, the current version supports XHTML 1.0, CSS2, SVG and HTTP/1.1. The latter allows Amaya users to browse the web and to publish pages on remote servers. Authors can create new pages or update existing pages with Amaya, which acts simultaneously as a browser and as an editor.

The math editing/browsing functionality was developed specifically for MathML and follows closely the basic principles of MathML. Mathematical expressions are primarily considered as hierarchical structures, and most editing commands are based on this structure. Manipulating complex trees could be an issue for users, but Amaya provides an adequate user interface and some clever functions that make it easy to use. Thus, authors do not need to provide every structural detail of a complex expression. Instead, a parser analyzes the strings they type, such as y = 2ax + b, and it separates out numbers, identifiers, and operators to produce the right MathML structure: y = 2a InvisibleTimes x + b.

The editor knows the MathML DTD. It can then provide powerful functions, such as generating all the required components of a construct created by the user or building a menu that proposes only the relevant attributes for the selected element. It can also transform the structure of an expression, for instance, a msubsup into a munderover. Also knowing the mathematical presentation rules, it can format and display expressions according to their structural context.

Authors do not create mathematical expressions in isolation, but as part of documents that are usually interspersed with a number of expressions. Integration of text and mathematics is a key issue. Amaya provides a comprehensive environment for editing compound documents. Graphics in SVG and mathematical expressions in MathML can be manipulated at their actual location within XHTML documents. Except for the few specifics mentioned above for mathematics, all editing commands are the same whatever the contents being manipulated. This greatly helps users to get quickly comfortable with the tool. Amaya also allows equations, as well as graphics, to be edited separately in their own windows, and to be saved in separate MathML or SVG files. This allows teachers to prepare material that can be displayed in browsers that do not support MathML (nor SVG) natively. To make this task easier, Amaya also provides a simple mechanism (point and click) to embed those separate objects within XHTML pages.

Tight integration brings more benefits. At no additional cost, other web technologies available in Amaya can be used for mathematics. That is the case for links, style, and metadata. Amaya implements simple links from XLink. The source and the target of such links may be any element in a document tree, a textual element, or any part of a mathematical expression as well. Hypertext no longer applies to text and images only, but also to math.

Amaya also provides an annotation service based on RDF. Anyone, not necessarily the document owner, can associate notes with any web document. These notes are independent documents stored on annotation servers, and they are associated with the documents they comment on by RDF assertions and XPath expressions. As equations are part of the same tree as the rest of the document, notes may be associated with any subexpression within an equation. This functionality makes writing scientific documents with coauthors much easier.

All of these features demonstrate that, when combined with other web technologies, MathML can really be considered as the vehicle of choice for sharing scientific information over the web.