Generating MathML markup
using LATEX2HTML, WebEQ and WebTEX
Ross Moore
Macquarie University, Sydney
This page describes the results of work performed by Ross Moore
while visiting the Geometry Center, Univ of Minnesota, during July of 1998.
The ultimate goal is to use LATEX2HTML to generate MathML
markup for mathematics, starting from LATEX source documents.
This is a very large task,
too large to be completed in just a few weeks.
As a significant step towards this goal we have combined
the use of existing tools:
the Java-based WebEQ, WebTEX and LATEX2HTML.
The results can be viewed most effectively using the TechExplorer
plug-in to interpret the resulting MathML source.
The strategy adopted is as follows.
- 1.
- LATEX2HTML processes a document written using LATEX markup,
in which some of the mathematics uses the simplified WebTEX markup macros,
within some inline and displayed math-environments.
- 2.
- With the webtex.sty package loaded,
the content of these math-environments are processed by the
WebEQ Wizard authoring software to produce either Java applets,
or MathML markup or both.
- 3.
- Using Perl subroutines from webtex.perl,
LATEX2HTML processes the output from WebEQ, wrapping it inside
<EMBED>, <APPLET> or <OBJECT> tags,
as appropriate for the level of HTML requested.
The <NOEMBED> tag is used in conjunction with <EMBED>
to provide a fall-back which is the usual LATEX2HTML translation;
i.e. either a single <IMG> or parsed text with images.
(Although <EMBED> and <NOEMBED> are not part
of any W3C recommendation for HTML, they are recognised by
both Netscape's Navigator and Microsoft's Internet Explorer browsers
as a method for including data for plug-in modules, with a fall-back.)
- 4.
- Since different versions of browsers support different levels
of HTML and may not be equipped with the plug-in modules
required to view the markup, the generated information
is presented using a hierarchy of fall-back mechanisms.
Either the WebEQ Java applets, or the MathML plug-in can be
the primary source, with the other as an optional fall-back.
Normally an <IMG> is included as a last-ditch fall-back,
but this can be omitted if desired.
Browse the following pages for examples of some of these combinations:
HTML3
- The following pages use tags recognised by version 3
of the Navigator and Internet Explorer browsers;
that is, they use the <APPLET>, <EMBED>
and <NOEMBED> tags.
MML/webeq/IMG
webeq/MML/IMG
MML/IMG
Mathematics occurring inline is often badly placed by Internet Explorer.
It's notion of ALIGN=MIDDLE seems to be to
align the middle of an image with the middle of the largest object
occurring on the same line.
This means that text in bold-face or a larger size will affect the placement
of all images.
On the other hand Navigator aligns the middle of the image
with the baseline of the text.
Images created by LATEX2HTML assume this behaviour from the browser.
HTML4
- The following pages use tags recognised by version 4
of the Navigator and Internet Explorer browsers;
i.e they use the <OBJECT> tag wherever possible.
Earlier versions of these browsers should show a fall-back
even if capable of supporting the primary method.
MML/webeq/IMG
-
The fall-back mechanism for <OBJECT> tags fails with Internet Explorer 4
-- it shows the <APPLET> as well.
webeq/MML/IMG
MML/IMG
The latest version of the Navigator browser handles these pages best,
provided the TechExplorer plug-in is installed.
If not, such as on a Macintosh where TechExplorer is not yet available,
then a ``missing plug-in'' image is shown instead of using a fall-back.
Earlier versions fail to recognise the <OBJECT> tag,
so politely choose the provided fall-back.
With Internet Explorer 4, apart from the problem mentioned already,
a blank image is shown when applets are the first choice,
but Java has been disabled; a fall-back is not used.
When TechExplorer is missing as the first choice,
it does use a fall-back.
- WebEQ and the WebTEX language are being updated to
- 1.
- recognise more mathematical symbols, for rendering in applets
and translation into MathML entities;
- 2.
- replace macros with alternate names, where the current ones conflict
with usage established already in LATEX and AMS-TEX;
- 3.
- provide a table contruction analogous to TEX's
\halign,
which will facilitate translation of the aligned math environments
in TEX, LATEX, and the AMS packages.
- the webtex.sty package for LATEX will be extended to cover
all the macros used in WebTEX, so that the same source can be used
for both a good-quality printed version and a Web version.
(Currently there is no support for \array, which clashes with
existing LATEX usage. This will be renamed to \marray.)
- the webtex.perl implementation for LATEX2HTML will be
extended to allow more math environments to be translated into MathML.
- Some compatibility-checking can be incorporated into webtex.perl,
to provide feed-back on what cannot currently be translated by WebEQ.
For suc mathematics the current translation mechanisms of LATEX2HTML
will be used perforce.
Generating MathML markup
using LATEX2HTML, WebEQ and WebTEX
This document was generated using the
LaTeX2HTML translator Version 98.2 beta4 (July 21st, 1998)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 3 webtex.doc
The translation was initiated by Ross Moore on 1998-07-22
Ross Moore
1998-07-22