Presented at MathML Conference 2002

# MathML in e-Learning with Amaya

Vincent Quint, Irène Vatton, W3C

30 March 2002

Abstract: This paper discusses some issues related to e-learning in scientific areas and proposes solutions based on MathML and other W3C specifications. It first identifies requirements for the technology that can best help in teaching mathematics and other sciences. It then presents how those requirements are addressed in Amaya, W3C's Web client. The emphasis is put on editing mathematical expressions in teaching material, mainly from the student's perspective. The focus is on the user interface. Other services are also considered, such as sharing documents through a Web server, using specialized XML objects containing MathML expressions, relying on CSS to adapt documents to various users. Finally the paper presents a flexible annotation framework that is well suited for collaboration and discussion on documents containing equations in MathML.

The Web has a strong and increasing impact on learning and education. The use of the Web to deliver teaching/training material is now commonplace but until recently there were limitations in scientific areas, due to the difficulty to represent and manipulate mathematical notations in Web pages. With the advent of MathML [1], teachers and students in science and technology can now fully benefit from the Web. To contribute to the deployment of MathML at school and in universities, W3C has made some recent developments in its Web client Amaya [2] that address many of the specific needs of education.

A technology such as MathML, while necessary, is not sufficient to solve the issue. MathML has to be implemented in tools that pupils and students can use easily. Those tools should be able not only to display Web pages with equations, but also to provide complementary services that facilitate the various tasks involved in the teaching process. In this paper, we focus on those aspects. We first address issues related with the manipulation of MathML expressions. We then present some services that complement MathML in an e-learning environment.

## Manipulating MathML expressions

### Requirements

An important requirement is to allow students to see and read scientific material on the Web, but this is not enough. Students should also be able to create their own documents or to complete documents written by teachers. A Web client must provide both browsing and editing functionalities.

The issue then is that an authoring tool is usually much more complex to use than a browser. The challenge is to provide powerful editing features through an easy to use interface. In education, this is of paramount importance, as students should focus on the actual content of the document they are writing, rather than struggling with the tool. This requirement implies that a textual notation to enter mathematical expressions is not an option. Students should not have to learn such a language at the same time they learn the mathematical language itself. This would be confusing. A direct manipulation style of interface is required.

Even a WYSIWYG interface may represent an important cognitive load for a pupil. It should be as simple as possible, providing only the commands the user can understand. But it should also be flexible enough to allow teachers to use the same tool in various classes. The right option then would be to make it customizable.

Another important aspect of ease of use is consistency. As users do not manipulate equations in isolation but rather within documents that also contain text and graphics, it is important that a uniform environment be provided for manipulating all those contents in a consistent way.

### Implementation

Most of the above requirements were taken into account when designing Amaya. Amaya is a full featured client that integrates seamlessly the editing and browsing functionalities. It can display and print Web pages fetched from Web servers or stored on local files. It can edit those pages or create new ones. Moreover, it can save them either locally or on remote Web servers. From the user's point of view, there is no difference between documents stored in the local file system or on remote servers. The same operations can be performed on both with the same tool at the same time.

#### Entering mathematical expressions

For editing equations within Web pages [3], Amaya closely follows the MathML 2.0 specification. But as the primary goal is to allow users to easily enter possibly complex expressions, the emphasis was put on the presentation part of MathML. The content part is not implemented, but all the presentation tags and attributes are available. This leads to a quite natural user interface, very close to the way mathematics are written by hand. An important feature in that regard is that the user is not required to enter all the details of the MathML structure. The low level elements such as `mn`, `mo`, `mi`, `mtext` are generated automatically by the editor, based on simple heuristics that recognize numbers, operators, function names, etc. This works particularly well when only a few functions and operators are used, which is the case in most mathematics classes. For instance, to enter an expression such as $y=2\mathrm{sin}x$, the user simply types a sequence of seven characters: `y`, `=`, `2`, `s`, `i`, `n`, `x`, but the actual structure generated by the editor clearly separates the basic elements and the expression is formatted and displayed based on this structure (variables are set in italic, some space is added around the = sign.)

It is only when the written representation is not linear that the user has to enter commands. Those commands generate the main constructs of presentational MathML: `mfrac`, `munderover`, `msub`, etc. A dozen of such constructs can be created through a palette that is used only when editing mathematics. Trained users can of course avoid using the mouse and keep typing when entering these constructs, as shortcuts are available for all the buttons in the palette.

#### Moving around

A simple mechanism is needed to help the user move around in an expression and understand where the current position is in the mathematical structure. For that purpose an exception was made to the principle of a uniform user interface for all types of contents. While for text the arrow keys move the caret to the next character displayed on the screen in the direction of the arrow, for mathematics, the horizontal arrows move it to the closest character in the MathML structure. For instance, in an construct with both a subscript and a superscript (`msubsup` in MathML), like ${x}_{k}^{2}+1$, when the caret is on the right side of the subscript, the arrow-right key moves it to the left side of the superscript, not to the sign +, which is the closest position on the right. This has proven to be much more efficient and less confusing than purely geometric moves, specially when entering a new expression. Hitting the arrow-right key always allows you to enter the next sub-expression in a logical order.

The position of the caret may be ambiguous in some cases. When it is at the end of a square root, will the next character be entered within the root or right after it? When such ambiguous cases arise, two complementary means help the user understand the situation. The status line always displays the current position in the structure (actually the path from the current position to the document root). The size and the shape of the caret also helps (it is taller after the root than within the root).

#### Customization

As we have seen above, customization is a key issue. Amaya provides some flexibility in that regard. The usual features in that area are available, such as changing the language of the user interface. This includes changing the names of the MathML elements and attributes when they appear in messages, for instance in the status line. The teacher can for instance replace `mo` by `operator`, or `opérateur` if he teaches in French.

Another aspect of customizability is the content of the palette which allows users to enter some characters and symbols that are not available on the keyboard. The teacher can decide what characters are available on that palette, thus presenting the user only with the ones he/she can understand. If many such characters have to be made available, they can be grouped, to find them more easily. In fact, with the recent introduction of Unicode in Amaya and the support of specialized fonts, such as the STIX fonts, many symbols are available, which make customizable palettes a requirement to prevent inexperienced users from getting lost.

#### Compound documents

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.

## Complementary services

### MathML in XML documents

An important feature of Amaya is its publication functionality. Using the PUT method from HTTP 1.1, saving a file on a remote Web server is as easy as saving it locally. Students and teachers can send assignments and mathematical questions to each other just by putting them that way on a Web server. Sharing teaching material becomes very easy. Up to now we have supposed that this material is written in XHTML. XHTML is certainly adequate for many types of documents, but if some more specific document structures are required, the whole range of XML documents is available.

An important extension of Amaya has been undertaken to support not only a few specific XML applications, such as XHTML, MathML and SVG, but also any XML document. MathML expressions and SVG drawings can be inserted, displayed and edited within those XML documents exactly in the same way as with XHTML pages. The layout of XML structures is done through CSS style sheets. Actually the full power of CSS is available for any structured document that Amaya handles, and for any part of it. For teaching material, CSS can bring a number of advantages in customizing the same documents in different ways, according to the task to be performed or the level of the user. Material can then be shared and reused more efficiently.

Full internationalization is also an advantage. The introduction of Unicode in Amaya not only brings a number of mathematical symbols, but also the support for almost all written languages on the planet. One can teach in any language, using multilingual documents.

### Shared annotations

As mentioned earlier, sharing documents on the Web is key for collaboration between teachers and students. In Amaya, this basic mechanism is complemented by a collaborative annotation tool, Annotea [4]. Anyone can annotate Web pages in a very flexible way. Annotations are comments, notes, explanations, questions, or other types of external remarks that can be attached to any Web document or to a selected part of the document, without actually needing to modify the document. When the user browses a document, he or she can also load the annotations attached to it from a selected annotation server or from several servers. Annotations can annotate other annotations, thus making threads of discussions between teachers and students.

Based on RDF and XPointer, this annotation framework is highly customizable. Specific annotation types can be defined, as well as related icons. XPointer in particular is precise enough to associate annotations to parts of mathematical expressions, even to a single character. The body of an annotation can be any XML content. So, equations and drawings may be used in annotations, which are created and edited with the Amaya editor. There is no need to learn how to use another tool.

## Conclusion

With the recent developments briefly presented in this paper, we believe Amaya can play an important role in e-learning. Based on well recognized standards, the framework described above is not restricted to Amaya. Other tools may be used as well to access the same material, provided they comply with the standards involved. Regarding Amaya, more developments are expected, as it seems that the e-learning community will contribute more and more to this Open Source project.

## References

1. M. Froumentin, W3C Math Home, http://www.w3.org/Math/
2. V. Quint, I. Vatton, An Introduction to Amaya, W3C Note, http://www.w3.org/TR/NOTE-amaya, 20 February 1997.
3. I. Vatton, V. Quint, Editing MathML on the Web with Amaya, MathML Conference 2000, October 20-21, 2000, Urbana-Champaign, IL, USA.
4. J. Kahan, M.-R. Koivunen, E. Prud'Hommeaux, R. Swick, Annotea: An Open RDF Infrastructure for Shared Web Annotations, Proceedings of the Tenth International World Wide Web Conference, Hong Kong, May 1-5, 2001, ACM Press, pp. 623-632.