Bottom line: At present, there is no solution which does everything perfectly, or even well. You must negotiate a tradeoff between the criteria above. If you would like a second opinion on all this, see these sites:
Here are a couple examples
| HTML CODE | Results |
|---|---|
<font face=symbol>m</font> = <font face=symbol>S</font><font size=-2> <sub><i>i</i>=1</sub> <sup><i>n</i></sup></font> <i>X</i><font size=-2><sub><i>i </i></sub></font> Pr(<i>X<font size=-2><sub>i </sub></i></font>) |
m = Si=1 nXi Pr(Xi) |
<font face=symbol>ò</font>sin <sup>2</sup><i>>v dv</i> = ½<i>v</i> + ½sin <i>v</i> cos <i>v</i> + <i>C</i> | òsin2v dv = ½v + ½sin v cos v + C |
Manual HTML encoding of math will work for people with just a few equations or special symbols, if they can stand the tedium. The resultant HTML will display on any browser with the symbol font set available, is compact and will both display and print in good quality. If you need a character outside of the symbol set, you are probably out of luck. If you need to set equations which require vertical alignment, which CAN be done using the HTML <TABLE> tag, it soon crosses my threshold of tolerance. But see the tth program, in the LATEX section below.
You can also use a standard word processor like MS Word. Use the Insert..Symbol menu to pluck special characters and place them in your document. Then when you Save..As HTML it will do the FONT mark-up for you.
Web purists decry this approach since it depends on the client's computer having the desired set of fonts. Someone in a nation that uses a completely different character set will probably not get the correct display. The Unicode character set solves this problem by separating the font problem from the character set problem, and building one giant character set for all the worlds languages; see http://charts.unicode.org. But until browsers and computers have the font sets to render the Unicode characters the above is a solution that will probably work in the English-speaking world.
The MS Word 97 software has a built-in equation editor. You will find it under the menu Insert..Object then choose Microsoft Equation Editor 3.0. (Be sure to un-check the "Float on Top" box.) This will give you a new window in which to create a mathematical display using fairly intuitive menus. When you return to Word, the object will be inserted into the document as a graphic element. At the end of the operation, when you do i Save..As HTML, the graphic will be saved as a GIF.
Converting equations to GIFs has several drawbacks. The GIFs produced by the Equation Editor loose quality when printed. You may also have some trouble getting the equations to position correctly with respect to the text. It is hard to make the font used in the equations match the font used in the document text. Before wasting too much time, check out the Equation Editor Tips and Tricks page. You will have to supply your email address to sign in.
MathType is essentially the full-feature version of the Equation Editor. Besides having more math symbols and structures, it also produces GIFs of higher quality, and the newest version (4.0) has hooks for saving as LATEX and MathML. See their Web page at http://www.mathtype.com.
Because your document will have a separate GIF file for every equation and math symbol, a document of any length can have scores of separate image files. This will be inconvenient to upload and potentially a real mess if you ever have to make revisions. It will probably not go smoothly into WCB or BB. Also watch out that the names of the GIF files (usually starting at image1.gif and going up) and the names referred to on the IMG tags (Image1.gif etc.) agree in case.
Saving equations as GIF images seems the best way at present to put mathematical material into PowerPoint slides.
Here is a sample of HTML with math GIFs made by the Equation Editor in MS Word:
|
Here is a display on a single line:
This one takes up more vertical space:
This one uses the root operator:
|
If your math is already encoded in a LATEX document, you probably do not want to go through the trouble of retyping the material in a different format. LATEX can be converted for use on the Web in several ways. To illustrate these I've prepared a simple LATEX file with several sample equations. You can see the original file here.
A program on the Alpha system called tth will take an LATEX document and convert it to HTML, using standard HTML coding and the symbol font to render the math. Although you are limited in the character set, it is really quite clever in its operation. Any LATEX symbol or structure which cannot be rendered is ignored (so you have to check the output very carefully). And the vertical alignment, done with HTML <TABLES> tags, does not approach typeset quality. Both display and printing have good resolution.
At present the tth program is in the test directory on the Alphas, so you will execute it as follows:
/usr/local/test/bin/tth <filename.tex >filename.html
You can view the HTML for my test page here.
You can learn more about the program from its source: http://hutchinson.belmont.ma.us/tth/. An online manual is available at http://www.uwm.edu/IMT/MiscDocs/tth_manual.html.
Another Alpha program which converts LATEX to HTML is latex2html. By default, the original document is broken up into a set of separate HTML documents. All the math and special symbols are converted to GIF images. The resultant files will display on any graphics browser, but the print quality of the GIFS will probably leave much to be desired. Because the resultant document can easily consist of hundreds of short HTML pages and GIFs, making revisions is difficult. Trying to include it into a WCB or BB page (not just a link to it) would be very difficult.
Run latex2html with the following command at the Alpha prompt:
latex2html -no_math -html_version 3.2,math filename.tex
This will generate an entire directory structure named filename containing the HTML and GIFs, and a index.html file. You might as well do this in your WWW directory and save some trouble moving it all.
You can view the HTML for my test page here.
You can learn more about the program from its source: http://cbl.leeds.ac.uk/nikos/tex2html/doc/latex2html/latex2html.html. There is no UNIX man page but you can find an online manual at the URL above. There are many command-line options to modify and potentially improve the output quality, but I have not had time to experiment with them.
The tools are available on the Alpha system to convert LATEX to PDF files, which can be displayed by the Adobe Acrobat reader. Assuming you are using the latest version of LATEX (2e) (which is located in the test directory at present), make a dvi file in the usual manner. Be sure to use a PostScript font (I used the times.sty package). Then convert the dvi file to PostScript with the test version of the dvips program:
/usr/local/test/bin/dvips filename.dvi
This will produce a PostScript file filename.ps. Then convert the file to PDF format with the Alpha program ps2pdf:
ps2pdf filename.ps filename.pdf
The resultant PDF file will have good display and print quality. It will, however, be LARGE; a 10-page LATEX document could easily become a megabyte-plus PDF and take a long time for viewers to download over a dialup connection. Some features possible in a PDF, such as links, cannot be included.
You can view the PDF rendering of my test document here.
An alternative which will be attractive to Web purists would be to skip the final conversion and place the PostScript files on the Web. These can be viewed with the free GhostScript viewer. Or you can investigate LATEX packages which produce PDF directly without the intermediate steps.
There are several viewers (browser plugins) which can directly display LATEX documents. All the free ones have weaknesses which prevent them from being an ideal solution. The one I like best is IBM techexplorer. If you have it installed, you can see the techexplorer display of my test document here.
IBM techexplorer comes in two versions, the introductory (free) version and the professional ($30) version. The free version does a very nice job of displaying LATEX documents (and MathML, see below) but DOES NOT ALLOW PRINTING. To print, you have to pop for the pro version for each browser which will be viewing (printing) the document.
Another package which displays LATEX documents is Scientific Notebook. I have had trouble configuring the program to work with my browsers (or vice versa). But others use the program successfully.
So far, we have considered only one problem: taking math notation in some form and placing it on the Web for dissemination. But there is a second problem which is the reverse of this: taking math from the Web and bringing it into some application program.
MathML (Math Markup Language) is "specification" developed by the World Wide Web Consortium, and is extensively documented on their site:http://www.w3.org/Math. (This is also a good starting place to investigate other avenues for placing math on the Web.) Based in XML, it aims to solve the two-way communication problem between the Web and other applications which perform mathematical manipulation.
MathML markup is very verbose and you do not want to try to create it by had. The latest versions of math analysis programs like Maple, Mathematica, and Scientific Workplace offer MathML as an output option, and some math display programs like the latest edition of MathType will also write MathML. The W3C has a free MathML editor called Amaya. Amaya can also serve as a Web Browser to view MathML documents, as well as ordinary HTML. (It does have limitations which prevent it from being used as your everyday browser, however.) (And it has limitations as an editor, too, being counterintuitive, unforgiving and without documentation.)
Besides Amaya, the IBM techexplorer plugin displays MathML, as does Scientific Notebook, Web EQ, and several other programs. Ultimately it should be possible to use a program such as Maple to recognize the MathML and start directly from the browser. I don't know how far this goal is from realization. There are efforts underway to convince Netscape (and probably Microsoft) from adding MathML support to future browser releases.
Here is a link to an HTML file which contains an EMBDEDed MathML file. Techexplorer will hopefully be able to open it: mathmlex1.html. (I've had better luck with InternetExplorer than Netscape.)
MathML has the potential to solve the problem of how to put math on the Web, and much more. Unfortunately, it is not quite ready for prime time yet.