Mathematics on the Web
A White Paper
MacKichan Software, Inc.
December 2001
The problem of displaying mathematics on the web
Currently, there are no completely satisfactory methods of displaying
mathematics on the web. The standard for formatting documents on the web, the
HyperText Markup Language or HTML, does not have a rich enough set of
primitives to construct and display mathematical expressions. This means that
without a helper application or a plug-in, the standard web browsers cannot
display mathematics unless it is represented as graphics.
The situation will improve in the future. A successor to HTML, an eXtensible
Markup Language or XML, gives authors more control, and an emerging standard,
called MathML, standardizes a method of representing mathematics in XML.
Browsers are beginning to support XML, but there is not yet native support for
MathML in the browsers. It is possible to have a plug-in display MathML
mathematics, but this solution is still not satisfactory for in-line
mathematics, since there is no way currently for the browser to communicate to
the plug-in where the base line of the current text line is.
MacKichan Software is a corporate member of the MathML standard committee, and
is committed to supporting XML and MathML. With Version 4.0 of our products,
you can export a document to HTML format with the mathematics rendered as
graphics or as MathML. As MathML rendering software becomes available, it may
become the preferred method for displaying mathematics on the web.
All of the currently available methods of displaying mathematics on the web
have disadvantages and advantages. This white paper discusses and compares the
alternatives.
Some solutions for displaying mathematics on the web
We list here some of the possible solutions for displaying mathematics on the
web. Since displaying mathematics in HTML is generally impossible, each of
these solutions requires some special software for the author of the web,
and/or some special software for the readers of the web. Each of these
solutions has advantages and disadvantages.
Scientific Viewer
Our recommended solution for displaying mathematics on the web is for the
author to use one of our mathematical word processors, and for the readers to
use our free Scientific Viewer software. All CDs for Scientific Notebook and
for Version 3.0 or later of Scientific WorkPlace and Scientific Word contain a
directory named \Viewer. The directory contains a version of
Scientific Notebook that does not allow saving documents but does allow
printing read-only documents. It is, in effect, a web browser for the files
(with extension .tex) produced by any of our products.
The free Scientific Viewer is also available for download from our website, at
a href="http://www.mackichan.com/licensing.net/dnloadreq.aspx" target="_top". Also, it is
available on the Comprehensive Tex Archives Network (CTAN). The Scientific
Viewer may be freely distributed.
With any of our products, an author can create a complete web that displays
mathematics correctly and cleanly. The documents on the web can include
graphics and hyperlinks; together, they can together create a rich and
beautiful web.
An example of such a web is the WebMath project at Texas A&M University.
To view this web, run Version 3.0 or later of Scientific WorkPlace or
Scientific Word, or run Scientific Notebook or Scientific Viewer. From the
File menu, choose Open Location and enter this URL:
http://www.math.tamu.edu/~webcalc/mindex.tex.
Advantages of using Scientific Viewer
-
There are no limits to the mathematics you can display.
You can display any mathematics that you can enter with the premier
tools for publishing mathematical papers and books.
-
The files will be small and will download quickly. The
files are created in TeX, a mathematical typesetting language that consists of
compact ASCII codes for mathematical objects. Contrast this with other
solutions that replace mathematical text with graphics.
-
Your users can print high quality documents from your web.
Since the mathematics in your web pages has not been converted to
bitmap graphics, it will not appear dotty or grainy when it is printed.
-
This solution is inexpensive for the author and the readers.
The writing tool can be Scientific Notebook ($199.00), and the reading
tool, Scientific Viewer, is free.
-
Links to HTML files and links to TEX files can be intermixed.
Readers can access both kinds of files.
Disadvantages of using Scientific Viewer
-
The readers must download the free viewer before browsing
your web. The size of the viewer download file is about 5 megabytes.
-
The viewer is currently available for Windows® platforms
only.
HTML exported from a MacKichan Software product
Beginning with version 4.0, Scientific WorkPlace, Scientific Word, and
Scientific Notebook support exporting any document as an HTML document (or
more precisely, XHTML). The mathematics can be rendered as MathML or as
graphics in these graphics formats: .bmp, .dib, .emf, .gif, .jpg, .png, or
.wmf.
Advantages of using HTML export
-
The HTML output filter creates an accurate HTML version of
your document.
-
Readers can view your documents on many computer platforms
with recent versions of the most popular browsers.
-
The author can further manipulate the HTML files with other
web authoring tools.
-
The HTML filter interprets any HTML commands in the document.
The author can insert HTML commands in special HTML fields.
Disadvantages of using HTML export
-
The files download relatively slowly. However,
downloading is faster than MathML.
-
The mathematics is not live. Your readers cannot
perform computations on the mathematics in downloaded files.
Adobe Acrobat
If you have the Adobe Acrobat writer (Distiller) installed, you have a printer
driver called Distiller Assistant. When you print a file from Scientific
WorkPlace, Scientific Word, or Scientific Notebook using this print driver,
it creates a file with the extension .pdf. Using Acrobat Exchange, you can
insert hyperlinks into the file, and you can post the file on the web. This
will create a web of PDF files. You must set the parameters for the Distiller
correctly, so that all fonts are embedded in the file, and so that graphics
are not severely compressed. Otherwise, your document will not display
correctly on computers that do not have Scientific WorkPlace, Scientific Word,
or Scientific Notebook installed.
Advantages of using PDF files
-
There are no limits to the mathematics you can display.
The PDF files are an accurate representation of the files that you
create with Scientific WorkPlace, Scientific Word, or Scientific Notebook.
-
The files will be moderately sized, and will download
moderately quickly. The PDF files created will be significantly smaller
than graphics files, but significantly larger than TeX files.
-
Your readers can print high-quality documents from your web.
Since the mathematics in your web pages has not been converted to
bitmap graphics, it will not appear dotty or grainy when it is printed.
-
This solution is inexpensive for the readers, and only
moderately expensive for the author. The writing tool costs about $150
in addition to the program that writes the mathematics, such as Scientific
Notebook. Adobe Reader is freely available from Adobe's website.
-
Links to HTML files and links to PDF files can be intermixed.
The Adobe Reader is available as a plug-in, so the PDF file can be read
within the browser.
Disadvantages of using PDF files
-
The readers must download the free viewer before browsing
your web. The size of the Acrobat Reader download file is about 1
megabyte. This disadvantage is mitigated by the fact that the Adobe Reader is
so common that many readers may have downloaded it already.
-
The author must manually add hyperlinks into the file.
Web development becomes more time-consuming when manual processes are
involved.
Latex2Html
All files produced by Scientific WorkPlace, Scientific Word, and Scientific
Notebook are LaTeX files. LaTeX{}is a mathematical typesetting language.
Latex2Html is a freeware program that converts LaTeX files to HTML. Since HTML
is not able to display mathematics directly, Latex2Html converts mathematics
to graphics (GIF) files.
Advantages of using Latex2Html
-
The results will display, with some problems, in any browser
since all browsers support the combination of HTML and graphics that is
produced.
-
This solution is inexpensive for the author and the readers.
The author's program is freely available on the web, and the readers do
not need anything in addition to their current browsers.
Disadvantages of using Latex2Html
The conversion of mathematics to graphics causes several problems:
-
The file sizes grow quickly when a document contains much
mathematics in the document. Large documents slow the browsing of your
web. If your web consists of more than 30 or 40 pages, your readers will save
time in the long run by downloading Scientific Viewer.
-
The graphics files are compressed bitmaps. They will
look acceptable on the screen, but when they are printed they will look
"dotty" and grainy.
-
The mathematics graphics files will match only one size of
text. Web browsers allow users to select the magnification of the text.
However, because the graphics files will match only a single text size, they
may look small compared to the text size chosen by one user and large compared
to the text size chosen by another user.
-
Visually impaired users will be unable to magnify the
mathematics graphics files.
-
The baselines of text lines and mathematics in the graphics
files will not always line up.
Hevea
Hevea is a freeware program that converts LaTeX files to HTML, without using
graphics. It uses characters from the Symbol font to represent some
mathematics; however, because many common mathematical symbols are not in the
Symbol font, they will not appear.
Advantages of using Hevea
-
Some simple mathematics is converted to true HTML.
Depending on your requirements, this may be adequate.
-
The resulting files are small and download quickly.
-
This solution is inexpensive for both the author and the
readers. The author's program is freely available on the web, and the
readers do not need anything in addition to their browsers.
Disadvantages of using Hevea
-
The variety of mathematics that can be converted successfully
is limited. Mathematical symbols that are not in the Symbol font will
not be represented.
-
The display of the mathematics is relatively crude.
Gaps exist in integral signs and limited sub- and superscripts.
IBM TechExplorer
IBM TechExplorer, a free program developed by IBM, displays a subset of LaTeX
in a browser plug-in. A professional version is available for sale.
Advantages of using IBM TechExplorer
-
The plug-in integrates well with browsers.
-
The display of mathematics looks good on the screen and
prints well. Since IBM TechExplorer does not convert the mathematics to
graphics, the mathematics will print as sharp as other text.
-
The files are compact and download quickly. The file
sizes are comparable to those of Scientific Notebook.
-
Scientific WorkPlace and Scientific Word are good authoring
tool for IBM TechExplorer files. Some LaTeX typesetting specifications
for Scientific WorkPlace and Scientific Word are optimized for use with
TechExplorer. (Since authoring for IBM TechExplorer requires control over the
LaTeX that is produced, Scientific Notebook is not a good choice for an
authoring tool.)
-
Links in Scientific WorkPlace and Scientific Word documents
are preserved if the author uses the correct LaTeX typesetting
specifications with Scientific Word.
Disadvantages of using IBM TechExplorer
-
IBM TechExplorer displays only a subset of LaTeX, so not all
mathematics will display properly. It does much better than Hevea, but
not as well as Scientific Viewer.
-
Readers need to download free software of about two
megabytes before they can view your files.
-
The author has limited control over the format and appearance
of the pages. IBM TechExplorer uses a single set of LaTeX typesetting
specifications, which cannot be changed by the author.
-
The Macintosh platform is not supported. Windows and
Linux versions are available.
This document was created with Scientific WorkPlace.