9.8 EzMath

 < Day Day Up > 



9.8 EzMath

EzMath is a markup language for equations, and the markup language corresponds closely to the way mathematics is spoken. It was developed by Dave Raggett and Davy Batsalle. EzMath is closely related to content MathML in its structure and can be used as a convenient input method for authoring content MathML. As with content MathML, EzMath notation covers most mathematical concepts covered in high schools in the United States.

The EzMath markup for any equation is based on the English language transliteration of the corresponding content MathML. For example, here is the EzMath markup for the solution of the quadratic equation:

    x = {-b plus or minus square root of         {b squared - 4ac}}/2a 

An integral would be represented in EzMath markup as shown below.

 integral from 0 to pi of sin x wrt x 

Compared to MathML, EzMath is much more concise as well as easier to write and understand. You can download a plug-in for displaying EzMath markup in a browser as well as the EzMath Editor application. Just go to http://www.w3.org/People/Raggett/ezmath1_1.zip. The plug-in is no longer very useful now that other methods are available for viewing MathML in browsers. However, the EzMath language is still useful as a way of authoring MathML. This is because the EzMath Editor can generate the content MathML encoding for any piece of EzMath markup. Thus, using the EzMath notation as an input language and the Editor as a translation mechanism is a simple and convenient method for authoring content MathML equations.

The EzMath Editor window (Figure 9.22) has three menus: Math, Edit, and Help. The Math menu contains examples of mathematical notation organized under several submenus, such as Arithmetic and Algebra, Theory of Sets, Trigonometry, Linear Algebra, and Calculus. If you choose one of these examples, the corresponding formula is displayed in the EzMath window. You can view the EzMath markup for the example by choosing View expression from the Edit window or by clicking a button in the taskbar.

click to expand
Figure 9.22: The EzMath Editor window.

This opens an Expression Editor window (Figure 9.23), which shows the markup for the equation. You can directly edit the markup in the window and then click OK. The notation displayed in the main window is automatically updated.

click to expand
Figure 9.23: The EzMath Expression Editor window.

When you have finished editing the equation, you can import it as content MathML. To do this, follow these steps:

  1. Set the clipboard format to MathML by clicking the appropriate button on the toolbar.

  2. Choose Copy to Clipboard from the Edit menu (or click the Copy button on the toolbar). This copies the equation to the clipboard in the format you specified.

  3. Choose View Clipboard from the Edit menu (or click the Clipboard button on the toolbar) to view the contents of the clipboard.

  4. Copy the HTML tag or the content MathML encoding from the Clipboard window (Figure 9.24) and paste it into your HTML document.

click to expand
Figure 9.24: The EzMath Clipboard window.



 < Day Day Up > 



The MathML Handbook
The MathML Handbook (Charles River Media Internet & Web Design)
ISBN: 1584502495
EAN: 2147483647
Year: 2003
Pages: 127
Authors: Pavi Sandhu

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net