News:
Chaos World - created with itex2mml and served with mod_rewrite
Methodology
...Putting the pieces together
MathZilla | MathML | Mozilla | Itex2mml | Tex4Moz | Methodology
MathZilla: Home

Mathml: Overview

Mozilla:
Comments & Issues

Tex4Moz:
Use and Issues
Download/Install
Report bugs

Itex2MML:
Download - Use
Demonstration
Convert a file
Introduction to itex
Report bugs

Methodology:
Putting the pieces together

Examples: (Index)
Markup of Week
Chaos
Fermat's Theorem
Papers 1   2

Screenshots: (Index)

Even with Mozilla able to display MathML, and convenient MathML authoring tools, there are a variety of problems confronting anyone wishing to put math on the web.

What follows is a discussion of these problems, and a possible solution. If you have other problems or solutions (on this topic), I'd welcome them for inclusion here.

The Problem

`Legacy' browsers such IE5.x and Netscape 4.x are not able to render MathML directly. How can we best serve visitors to our math intensive website?

Solution:

The answer is simple: for each base document, prepare multiple presentations, each presentation suitable for a certain group of visitors (and their browsers). In particular, xhtml and MathML for visitors using Mozilla; and either html and symbol fonts, or html and applets, for other visitors.

However this immediately leads to two subsidiary problems...

How can we maintain all these multiple presentations?

More precisely, as we update one document (find a typo, and a few lines of explanation), we will have to update each presentation. This will be a tedious business.

Solution:

Prepare one base document, containing html and itex, perhaps with a `.mhtml' suffix to indicate its type. Only ever edit this document. To get alternative presentations, apply `tidy -4mz' to the document, and then either itex2mml or itex2applets or itex2html (not yet available), to create the corresponding MathML, html and applets or html and symbol fonts.

Note also that a convenient way to prepare a html+itex document (provided you have easy Web access) is to prepare the file in your favorite editor, or html authoring tool (Composer, Word (hohum)...), have the itex2mml file conversion page open in Mozilla, and carry out a `edit document, save, press file upload button on the form, view mathml page ... and repeat' sequence. Not exactly WYSIWYG ... but quite useful.

Itex2applets converts a html + itex page into a html page with WebEq applets. (If you do this, then avoid using the itex extensions over webtex.) These applets display well in most legacy browsers, and have some neat interactive features corresponding to MathML's <maction> tag. However they are slow to display. A convenient solution is to download a plugin available free from Design Science. The plugin is fairly small - about 500k - and with it installed, the applets display pretty much instantaneously. I note that the WebEq applets were originally created at the University of Minnesota Geometry Center, under NSF funding (ie `our money').

Itex2applets uses tex to determine the size of the applets. So it can only be used if you have tex installed. Further, itex2applets is written in Python. -If you have a linux or other unix box, then you're all set. If you dont ... well, for the moment too bad. I'll think of some solution in the future. (Or better you can!)

Itex2applets can be downloaded now. But its in a rather primitive state at present. I'll release a better version `soon'.

Itex2html will convert html and itex to htm and symbol fonts, similarly to tth. But I haven't written it yet :-). Currently I use tth and some random scripts. This has problems when it comes to arrays and matrices.

How can we serve the right page to the right browser?

The simplest solution is to let the user decide. This strategy is used on the original Chaos World, where links are presented both to html+symbols and MathML pages.

But can we do better and automatically serve the right page?

Solution:

One technique, assuming your webserver is Apache, is to use mod_rewrite. Mod_rewrite is a commonly used Apache module which (among other things) automatically redirects a browser requesting a page to another page depending on the type of browser. In particular, mod_rewrite can redirect browsers requesting a pagename.mhtml to pagename.xml (a mathml page) if the browser is Mozilla, or to pagename.html (a html and symbol fonts page) otherwise.

This is the approach taken with the local copy of Chaos World. Here you will notice that the user is not presented with a choice of mathml or html pages. Instead, the pages containing math have a `.mhtml' suffix. Clicking on a link to such a page will either take you to a mathml page if you are using Mozilla, or to a html page if you are using Netscape, for example.

An alternative to using mod_rewrite is a CGI script to do the redirecting. But, at least in my Department, the systems administrator wont allow CGI scripts on the department webserver. However, (localized) mod_rewrite wont be a problem.

If you'd like more details on using mod_rewrite, email me: gartside@math.pitt.edu.

Final Remark: The above is the Wrong Way (TM):

The solutions described above are Wrong! Wrong in the sense that, we should only be using itex as an input format. The base document should be in MathML, and the presentations generated from this MathML document - probably using XSLT stylesheets.

However, at present we dont have tools to easily edit MathML. Whereas, for an experienced Latex user, html + itex are easy to edit by hand.

MathZilla | MathML | Mozilla | Examples | Tex4moz | Itex2mml | Methodology

(C)   March 2001   Paul Gartside     email: gartside@math.pitt.edu