Basics | Details | Installation | What it looks like | Plugin Parameters | Using <OBJECT>
The Web lacks an effective means for embedding mathematical expressions in Web pages. Hitherto, authors have been forced to use bitmapped images which are slow to load, complex to produce, and look bad when printed.
EzMath provides an easy to learn notation for embedding mathematical expressions in Web pages. The notation is inspired by how expressions are spoken aloud together with a few abbreviations for conciseness.
EzMath covers a widely used subset of mathematics. EzMath focusses on the meaning of mathematical notation rather than just how it looks on paper (or screen). The EzMath editor can be used to create MathML content tags conforming to the W3C mathematical markup language.
The paper on EzMath compares it with previous approaches and gives a definitive list of EzMath features. EzMath is freeware. It was developed by Dave Raggett and Davy Batsalle with the generous support of Hewlett Packard Laboratories. Suggestions for further work, and offers of help are welcomed.
Download the EzMath v1.1 as a zipped file (137k). This contains the following:
EzMath.exe - the standalone editor for EzMath. It has a built-in collection of example expressions to get you started. You can copy expressions to the clipboard as markup ready to past directly into your HTML pages. You can also copy expressions as W3C's MathML format for pasting into other applications that understand MathML.
You can change the foreground and background colors using the colors menu item. By default colors are adjusted to browser safe colors, although you can turn this feature off.
You can alter the font size using the fontsize menu. The editor, when exporting EzMath expressions to the clipboard, automatically sets the color/bgcolor and width/height parameters in the markup.
npezm32.dll - a Netscape plugin for windows '95 or NT. It works with both Netscape 3.0 and 4.0. Just copy it to the Netscape plugins directory. This is a subdirectory of the one that holds the browser executable. It is usually in one of:
c:\Program Files\Netscape\Navigator\Program\plugins c:\Program Files\Netscape\Communicator\Program\plugins
depending on whether you are using Netscape 3.0 or 4.0 (Comunicator). The next time you restart Netscape, it will be able to handle EzMath! It also works with Internet Explorer 4.0 and 5.0, provided you copy the dll to the plugins directory.
The plugin was designed to allow you to click on an expression to pop-up a dialog for exporting to other formats. Unfortunately, we couldn't get Netscape to give us mouse events! If you know how, please get in touch!
Overview.html - the introduction to EzMath as presented at the WWW'7 conference.
EzMathPaper.html - the paper describing the details of EzMath. This is a longer version of the one presented at the WWW'7 conference, in April '98 in Brisbane, Australia.
EzMathInstall.html - the installation notes, that you are reading at this very moment.
Here is a screen shot of the EzMath Editor:
The Ezmath for this expression is:
a^m over a^n = either a^{m-n} when m > n or 1 when m = n or 1 over a^{n-m} when m < n
Here is the markup generated by the editor for the expression:
<embed type="text/ezmath" pluginspage="http://www.w3.org/People/Raggett/EzMath" align=absmiddle width= 181 height=106 fontsize=small color="#FFFF00" bgcolor="#000080" alt="a^m over a^n = either a^{m-n} when m > n or 1 when m = n or 1 over a^{n-m} when m < n">
If you change the clipboard format to MathML, you instead get the following:
<e> <eq/> <apply> <over/> <apply> <power/> <ci>a</ci> <ci>m</ci> </apply> <apply> <power/> <ci>a</ci> <ci>n</ci> </apply> </apply> <ea> <apply> <apply> <power/> <ci>a</ci> <apply> <minus/> <ci>m</ci> <ci>n</ci> </apply> </apply> <st/> <e> <gt/> <ci>m</ci> <ci>n</ci> </e> </apply> <apply> <cn>1</cn> <st/> <e> <eq/> <ci>m</ci> <ci>n</ci> </e> </apply> <apply> <apply> <over/> <cn>1</cn> <apply> <power/> <ci>a</ci> <apply> <minus/> <ci>n</ci> <ci>m</ci> </apply> </apply> </apply> <st/> <e> <lt/> <ci>m</ci> <ci>n</ci> </e> </apply> </ea> </e>
The EzMath plugin supports the following parameters:
type - this must be the value text/ezmath. It is used by the browser to invoke the EzMath plugin.
alt - this gives the EzMath expression. As the name of the attribute suggests, this may be shown in place of the EMBED element if the plugin is unavailable.
width - this gives the width of the expression in pixels. It is required. The EzMath editor works this out for you.
height - this gives the height of the expression in pixels. It is required. The EzMath editor works this out for you.
fontsize - this is optional and can be one of "small", "medium" or "large" (must be in lower case).
color - this is optional and sets the color used to draw the expression, It can be one of the 16 standard color names such as "navy" or a hex code for the color in the #RRGGBB format, e.g. color="#C0C080". The color names must be in lower case.
bgcolor - this is optional and sets the color used to draw the background, It can be one of the 16 standard color names such as "navy" or a hex code for the color in the #RRGGBB format, e.g. color="#C0C080". The color names must be in lower case.
The other paramaters include align, hspace, vspace and border which are as per IMG. The EzMath editor sets align=absmiddle which seems to the best choice when embedding an expression as part of a line of text.
The OBJECT element has the advantage of offering a fallback for all the browsers that don't understand EMBED. The first version of Netscape that supports OBJECT is Netscape 4.0. So if you use OBJECT then earlier versions of Netscape won't recognize it. On the other hand you can include a fallback such as a gif image. An example of how to do this is given below.
Basically, OBJECT works in a similar way to EMBED. Some parameters are given as attributes of the OBJECT start tag, while others are given with PARAM elements. The earlier example can be rewritten as:
<object type="text/ezmath" codebase="http://www.w3.org/People/Raggett/EzMath" align=absmiddle width= 181 height=106> <param name="fontsize" value="small"> <param name="color" value="#FFFF00"> <param name="bgcolor" value="#000080"> <param name="alt" value="a^m over a^n = either a^{m-n} when m > n or 1 when m = n or 1 over a^{n-m} when m < n"> <img src=expr13.gif align=absmiddle width= 181 height=106 alt="a^m over a^n = either a^{m-n} when m > n or 1 when m = n or 1 over a^{n-m} when m < n"> </object>
Printing doesn't work yet! I am having technical problems owing to the lack of source code for working example of a plugin that prints. I hope to fix this in the near future, though.
The for any statement is temporarily out of order and will cause a program crash. I am looking at how this and the declare statement can be adapted to specify meanings, such as E is the electric field strength, while c is the speed of light. My goal is to allow these meanings to pop-up as tooltips as the mouse hovers over identifiers.
The following idioms are not (yet) recognized:
Similarly for other trignometric functions.
I have added tentative support for vector calculus. As an example, you can view Maxwells equations (in cgs-Gaussian units) from the Math!Calculus menu. This illustrates the use of the declare statement and ";" for separating successive equations.
You can now specify complex numbers, e.g.
complex r complex (3, 4) declare p as complex
I wondered about allowing "complex 3+4i" but think that is too likely to cause ambiguities, as well as being a mismatch with other prefixes for vector, matrix etc.
I would like to extend EzMath to support additional areas of mathematics including tensors. Your feedback on which areas you would like to see supported is welcomed! I also plan to extend the plugin to work with MathML as input.