Amaya allows you to include mathematical expressions in web pages, following the Mathematical Markup Language (MathML) specification. Mathematical expressions are handled as structured components, exactly in the same way as HTML structures. Therefore, you can manipulate math expressions in the same way you manipulate the rest of HTML documents. All editing commands provided by Amaya for handling text are also available for math, and there are some additional controls to enter mathematical constructs.
Warning: In the current version of Amaya only a part of MathML is implemented. The purpose of this alpha version of the math extension is to show how MathML may improve scientific communication over the Web. A more complete and more robust implementation is planed for future releases.
To create a math expression in a document, move the insertion point to the position where you want to insert that expression, and click the Math button (the rightmost button). It displays a menu that allows you to choose the mathematical construct to be inserted.
The first two items of this menu (Math and MathDisp) allow you to create a new formula, when the caret is in some HTML element (but the caret should not be within a MathML element):
The next items of the Math menu allow you to create new
constructs within a formula. If the caret is not in a formula, a
Math element is created to accept the new construct. In this
version of Amaya, the available constructs are, from top to bottom:
MROOT in MathML:
MSQRT:
MFRAC:
MSUBSUP:
or
MSUP:
MSUB:
MUNDEROVER:
MOVER:
MUNDER:
MF:
MMULTISCRIPTS:
The last item of the Math menu ( ) displays a palette from which you can insert symbols and greek characters in mathematical expressions.
Whenever a document contains some MathML elements, choosing the Show Structure item from the Views menu actually opens two views:
MATH or
MATHDISP tag; their actual contents is not shown.
You can edit math expressions either in the main view or in the Math_Structure view. The Math_Structure view is specially helpful to avoid ambiguity. Consider the following example:
When moving the caret after character b, it is not clear whether you want to add something within the square root or after it. Selecting (or checking) in the Math_Structure view avoids any ambiguity.
To edit math elements, just move the insertion point (the caret) to the desired position, with the mouse or with the arrow keys, and type some characters or select a construct from the Math menu.
When you type a character string in a MathML element, Amaya parses that string
and generates the MO (operator), MN (number),
MI (identifier), MTEXT elements automatically. For
instance, to enter
just type x=2a+b, (don't forget to first click on the Math or
MathDisp item of the Math menu, if you are not in a
mathematical expression) and you will get the following structure (you can
check in the Math_Structure view):
<MI>x</MI><MO>=</MO><MN>2</MN><MI>a</MI><MO>+</MO><MI>b</MI>
The current version of Amaya only implements the Presentation Tags
from MathML, not the Content Markup. All presentation elements are
available, except tables and matrices (MTABLE, MTR,
MTD). MathML attributes are not implemented (except
fontslant which is available in the Attributes
menu when a MI element is selected), but the class
and style attributes from HTML are available: you can associate CSS style to MathML elements.