Re: math on the Web - I

Eric Behr (behr@math.niu.edu)
Tue, 17 Mar 1998 21:12:31 -0600 (CST)

I passed some of this on to David who brought up LaTeX, but since then I
subscribed to WM so David, please, don't resend it! ;-)

In article <Pine.3.89.9803171448.A22179-0100000@corn.cso.niu.edu>,
scheidenhelm carol <webmasters@sun.soci.niu.edu> wrote:
>Does anyone have a suggestion for a good wordprocessing program that (1)
>can reproduce mathematical symbols and (2) can be converted easily to
>html?
>
>I have several faculty members who are interested in placing course
>materials on the web but who have experienced difficulty with symbols and
>equations.

We've been struggling with this for quite a while.

The trouble with the new HTML tags which Mark mentioned (and which
will almost certainly become a part of the standard) is that they are
impossible to use by hand. Look at http://www.w3.org/TR/WD-math to
see the draft.

Right now support for math is extremely limited. Conversion programs
which are supposed to produce HTML from various word-processing formats
either fail on anything more complex, or have to use inline images
(very ugly!).

We are doing nearly all of our document preparation in TeX and LaTeX,
which isn't for the faint hearted, but gives results accepted as the
norm in the mathematical community. The problem is that HTML conversion
programs - again - resort to .gif kludges, and generally do a poor job
with anything more complex than an occasional subscript...

The current preferred solution for us is to produce a final result in
PostScript or PDF and let the browser handle it with a helper app,
essentially bypassing HTML altogether. Since not everyone has Ghostview
or Acrobat Reader installed, this isn't ideal, but at least the
recipient gets exactly what we want him to get. One of the problems is
that campus labs are not equipped to _print_ PDF, but this is being
worked on.

There are also promising experiments in using Java to render math on
the fly (see e.g. http://www.geom.umn.edu/java/idvi/), but given the
current shaky support for Java on the part of browsers, hardware and
industry in general, this has shortcomings and might turn out to be a
dead end.

It seems to me that if you are going to use a lot of relatively
complicated math, then you are stuck with the following:

TeX, LaTeX, or equivalent (e.g. Sci. Workplace)
->
PostScript
->
(possibly) Distiller
-> HTTP ->
Acrobat Reader or ghostview

When the math tags become implemented in mainstream browsers, _and_
someone writes a good TeX-to-HTML converter using them, the PS or PDF
stage could be omitted, thus creating a "real" Web way of doing things.

But I think that there will always be incompatibilities and limitations
in rendering math in browsers: the two are essentially incompatible.
First, HTML should be relatively simple and _not_ assume much about
fonts, etc. Implementing even a basic set of math notation will lead
to awful bloat. Moreover, the whole idea of HTML was to let the browser
do most of the formatting, while in math symbolism this approach simply
won't fly for obvious reasons.

It seems to me that what we need is not only the HTML tags (which might
do for simple in-line formulas - but even here I have doubts), but also
some sort of limited implementation of Display PostScript embedded in
browsers, so I could render complicated displayed equations, matrices
etc. with high accuracy. The HTML document would contain something like
a <TeX> </TeX> tag inside which I could use the familiar TeX commands,
the server would process the content using a full-fledged TeX typesetter,
and would mark the result as a displayed formula to be rendered with the
browser's PostScript.

Sorry to ramble so much, but this topic is very important to us and
I'd like to hear about any elegant solutions that might be found.
I'll ramble some more about TeX in the next letter.

-- 
Eric Behr         | NIU Mathematical Sciences      | (815) 753 6727
behr@math.niu.edu | http://www.math.niu.edu/~behr/ |  fax: 753 1112