IBM techexplorer:
introduction and hands-on practical session
Francis Wright
School of Mathematical Sciences
QMW, London
Abstract
IBM techexplorer displays documents containing scientific
and mathematical expressions that are coded with a subset of the popular TEX, LATEX
and MathML markup languages.
Contents
This document is available on the web at http://centaur.maths.qmw.ac.uk/CTI_MathML_Workshop/, which contains many links to further information. Please
use the online version for the hands-on practical session.
What is techexplorer?
The IBM techexplorer Hypermedia Browser is
a plug-in for Netscape Navigator and Microsoft Internet Explorer,
enabling the display of TEX, LATEX and MathML
documents and the publishing of interactive mathematical and scientific material
on the Web. It dynamically formats and displays large subsets of TEX
and LATEX, including AMS-LATEX. Version 2.5 supports the complete MathML Content
Tag Set and a substantial subset of the MathML Presentation Tag Set.
Full information and downloading is available from http://www.software.ibm.com/network/techexplorer/.
techexplorer runs on Microsoft Windows 95/98/NT and some
versions of UNIX (AIX, Linux, SGI IRIX, Sun Solaris).
I will describe only Version 2.5 of the no-charge (but licensed) Introductory
Edition. There is also a commercially available Professional Edition.
Much of this document is based on the online documentation included with techexplorer.
techexplorer's heritage
techexplorer is being developed by the Interactive
Scientific Publishing Group at IBM Research. The manager, Robert Sutor, was a
key member of the IBM Research Group who developed the Scratchpad computer
algebra system, which has been marketed by NAG as Axiom since about 1990.
What is a plug-in?
There are currently three ways to extend the capabilities of a web browser:
plug-ins, applets and scripts, and helper applications.
Plug-ins are software programs that extend the capabilities of a web browser
to handle one or more data (MIME, see below) types.
They are separate code modules written in C/C++ and distributed as compiled
machine code, which is therefore platform specific. They were
introduced by Netscape in Navigator 2.0 in the first quarter of 1996.
A plug-in must be explicitly installed on a computer. It is then
automatically started by the web browser when it encounters a document with the
MIME type registered for that plug-in, and run within the browser almost as if
it were a core part of the browser. Not all browsers support plug-ins, and they
tend to work best in Netscape Navigator. (See the Netscape Communicator web-based
documentation for details.)
Plug-ins versus Java applets and JavaScript etc.
Java applets, JavaScript
(being standardized by the European Computer Manufacturers Association as the ECMAScript Language Specification)
and other scripting languages provide other ways of extending browser
capabilities. (Despite their names, Java and JavaScript are not closely
related.) The code is supposed to be platform independent and does not need to
be explicitly installed, so is a little more transparent than a plug-in. Java is
normally downloaded automatically from a server as necessary and JavaScript is
normally embedded in an HTML source document. Java is normally compiled to an
intermediate language (but not machine code) before being interpreted by the
Java Virtual Machine built into the browser and JavaScript is interpreted
directly, so a machine-code plug-in should execute faster. Java is mainly used
for applications such as animated graphics, but can also be used to render
mathematics (e.g. WebEQ, IDVI). JavaScript is mainly used
for additional browser control, e.g. to improve the user interface and handle
some aspects of forms, and could not be used to render mathematics.
Plug-ins versus Helper Applications
A helper application is a separate, free-standing application that can be
started from the browser. A document is passed to a helper application via a
temporary file or pipe.
Like a plug-in, the browser starts a helper application when the browser
encounters a MIME type that is mapped to it. Unlike a plug-in, a helper
application runs separately from the browser in its own application space and
does not interact with the browser or the web.
When Navigator encounters a MIME type, it always searches for a registered
plug-in first. If there are no matches for the MIME type, it looks for a helper
application.
Plug-ins and helper applications fill different application needs. Under
Windows, helper applications should be installed automatically, but the
mechanism seems to be a little unstable and depends critically on somewhat
inscrutable registry entries!
Maple Explorer
Maple Explorer is
a version of techexplorer tailored for use with Maple V Release 5.1. However, Adept Scientific tell me that this has
been withdrawn, due to some disagreement between IBM and Waterloo Maple. It is
still possible to use the standard techexplorer with Maple (see below), but only in a much more limited way.
I thank Adept Scientific for providing me with
information about Maple Explorer and an evaluation copy of Maple V Release 5.1.
Amaya
Amaya is W3C's own reference
browser/authoring tool and is used to demonstrate and test many of the new
developments in Web protocols and data formats. It is freely available as source
or (for some platforms) binary code. It supports many features not supported by
other free browsers or editors, but beware that it feels a little rough to use!
Displaying Maths
Non-proprietary formats that support complete documents, including maths
- ASCII text with "prettyprinted" maths. A useful lowest common
denominator and the only option between about 1965 and 1985!
- (LA)TEX, DVI, PostScript, PDF
- HTML with embedded GIF, PNG
or MathML
Proprietary formats that support complete documents, including maths
- Wordprocessor documents (e.g. Microsoft Word), easily converted to ASCII,
PostScript, or HTML/GIF.
- Mathematical computation worksheets (e.g. Waterloo Maple), easily
converted to ASCII, LATEX,
PostScript, or HTML/GIF.
Display processors for the above formats
- ASCII, HTML/GIF -- directly by any browser
- HTML/PNG, HTML/MathML -- directly by the Amaya browser, other browsers
later?
- PDF -- via the Adobe Acrobat Reader plug-in
- (LA)TEX, MathML -- via the techexplorer
plug-in
- PostScript -- via Ghostview, GSView etc. as a helper application
- DVI -- via IDVI: a Java
applet; nDVI: a Unix
plug-in; XDVI, Yap etc. as helper applications
- Proprietary formats -- via the appropriate proprietary program as a helper
application.
The MIME
(Multipurpose Internet Mail Extensions) type specifies the format of a document.
(It was originally designed to extend the format of Internet mail to allow
non-US-ASCII textual messages, non-textual messages, multipart message bodies,
and non-US-ASCII information in message headers.)
The MIME type is either determined and sent by the web server for a remote
document, or determined by the web browser for a local document, based on the
filename extension. This information is configurable. Browser plug-ins, such as techexplorer,
normally register a set of MIME types and corresponding filename extensions to
which they will respond. A dynamically generated document (e.g. a response to a
form) can specify any MIME type desired by the programmer. For example, this
might allow the user to select either ASCII or TEX
output from a remote computer-algebra computation (as for my CATHODE demos).
Generating Maths for the Web
Static documents
- Use a text editor to type (LA)TEX
-- the only language designed to be written directly by humans!
- Use an HTML editor with maths support, e.g. Amaya. (Not so easy!)
- Convert from proprietary formats of wordprocessors or mathematical
computation systems (e.g. Maple, REDUCE).
- Print PostScript to a file; convert PostScript to PDF (using Adobe
Distiller or Ghostscript).
My current recommended format for static documents is PDF to be
viewed using Adobe Acrobat Reader.
Dynamic documents
These can be generated using any convenient program(s). A standard and
portable technology is CGI (Common Gateway
Interface), which allows information to be passed from an HTML form on a web
browser via a server to any program, and the output from the program to be
passed back to the browser, to either a new page or an existing frame (in
principle).
A perl script is commonly used as the
principle CGI processor. It might generate mathematical output directly or, more
likely, indirectly by calling a computer algebra system. (For further details
see the WebDemo talk I gave at the last CATHODE Workshop; both the presentation
and extended
abstract are available. Incidentally, these are respectively Microsoft Word
and LATEX documents converted to PDF.)
My current recommended formats for dynamic documents are (LA)TEX or HTML with
embedded MathML to be viewed using IBM techexplorer.
REDUCE 3.7
REDUCE is probably the oldest computer algebra system still in wide use. It
predates MACSYMA by a couple of years and Maple by a decade! REDUCE 3.7 was formally released
on April 30th, 1999. One of the new facilities is an interface between
REDUCE and MathML. There are currently distributed implementations of REDUCE
based on two different Lisp systems: ZIB
(Konrad-Zuse-Zentrum für Informationstechnik Berlin) offers a version based on PSL and Codemist (Cambridge/Bath, UK) offers a
version based on CSL. CSL
(Codemist Standard Lisp) is written in C.
The Windows and X graphical user interfaces offered by PSL-REDUCE use TEX as an intermediate language for typeset
mathematical display, and any implementation can generate output in TEX format by using the standard alternative print
module fmprint. The result requires trivial
post-processing to be acceptable to techexplorer or another TEX processor. This technique is used in my CATHODE REDUCE demos.
I plan to add an option to generate MathML instead of TEX
using a similar technique. REDUCE provides two other packages (RLFI and TRI) for
generating TEX output with more user control.
Maple dates back to about 1980, and Maple V Release 5.1 is the
current version. One of the new facilities is that Maple worksheets on the
Internet may be accessed directly via a URL, as an alternative to using
Maple as a helper application. This makes them a viable (but proprietary) format
for mathematics on the web. (Demonstration: copy this link and paste it into the Maple URL
box).
The "Export As HTML" or "Export As LaTeX" options provide
portable alternatives. Release 5.1 also provides an option to "Export As
Maple Explorer", but the result appears to be the same as "Export As
LaTeX". The result requires a special LATEX
style file called "maple2e", which cannot be processed by techexplorer.
Hence, techexplorer displays a lot of uninterpreted commands
that would need to be removed by postprocessing. Maple also provides a
"latex" command for outputting specific results in LATEX, but currently there appears to be no
support for MathML.
(LA)TEX versus HTML/MathML
Advantages of (LA)TEX documents
- easy to write by hand
- excellent print quality
- many special symbols, blackboard bold, etc.
- well established
- intrinsic mathematics support
- some native support for pictures
- easy to re-use and convert
Advantages of HTML/MathML documents
- native browser support. (This link to some mathematical examples
will show you whether your current browser supports HTML/MathML!)
- can convey mathematical content (as opposed to presentation). But
OpenMath may be a more appropriate vehicle for
communicating machine-readable mathematical data.
These notes are based on the chapter entitled "Creating techexplorer
Documents" in the online documentation, which is accessible (using
Windows) via the Start menu option "Programs/IBM techexplorer HyperMedia
Browser/Documentation".
Style and class files
It is very important to note that techexplorer is not
"real TEX" and in particular does not
read LATEX style (or class) files.
Invoking techexplorer
For a complete document to be rendered using techexplorer it
must have one of the following MIME types (if remote) or filename extensions (if
local):
| MIME type |
Corresponding File Extensions |
application/x-tex |
*.tex, *.bbl |
application/x-latex |
*.latex, *.ltx |
application/x-techexplorer |
*.tcx |
text/mathml |
*.mml |
For part of a document to be rendered using techexplorer it
must be specified using the HTML <embed> tag. (This is the current de
facto standard tag for including executable document content whose
MIME type references the plug-in needed to process it. However, the official
HTML 4.0 standard tag for this purpose is <object> -- see [HTML: The
Definitive Guide by Chuck Musciano & Bill Kennedy, O'Reilly, 3rd Edition,
1998].) The tag attributes include either a file of one of the above types or
the actual markup. The more elegant MathML <math> tag works only if it is
supported by the native browser, in which case it would be expected to render
the mathematics directly anyway.
In practice, this means that at present non-trivial mathematical content is
best handled by techexplorer as a single (LA)TEX file rather than by trying to embed TEX or MathML markup in some other document type.
techexplorer extensions and restrictions
This section summarizes some of the extensions to (LA)TEX that techexplorer provides to
support interactive document browsing. Other extensions and restrictions are
described in the techexplorer online documentation.
Hypertext Links
These are provided by techexplorer extensions to (LA)TEX. Use \docLink to jump to another network document
and \labelLink to jump to another location within the same document. The
standard \label and \index commands have the non-standard side-effect of
defining targets for hypertext links. The \aboveTopic, \nextTopic and \previousTopic
commands can be used to define a document hierarchy, as used for example in
Windows help documents and GNU TeXinfo documents. techexplorer
does not currently handle automatic numbering.
Graphics
The \includegraphics command can be used to display an image file.
Other link types
- \altLink is used to show one of two possible displays. When you click the
link, the display alternates between the two possibilities.
- \appLink allows an external application to be run.
- \inputboxLink creates an input dialog box.
- \popupLink creates a popup window.
- \yesNoLink creates a query dialog box.
Including MathML within a LATEX
file
This is currently possible only in Windows, using either \includeMathML{mmlFileName}
or \begin{MathML} ... \end{MathML}.
Pop-up menus
Nested pop-up (context) menus can be constructed using \newmenu and \usemenu.
Here are some suggestions. Follow any of the links above that may be of
interest to you for further background information. Note that all the
software provided to support this session is freely available except for Maple,
so if you do not normally have access to Maple you may prefer to focus on trying
it now!
Look at the techexplorer introductory edition examples
These should be accessible (using Windows) via the Start menu option
"Programs/IBM techexplorer HyperMedia Browser/Examples". Temporarily,
you can also access them locally via this link: Examples.
(The online documentation is also temporarily available via this link: Documentation.)
A few points are worth noting. The extension of each file browsed indicates
its type, which in this case will be either .html or .tex. In the former case
(.html), techexplorer is rendering only specific regions of the
document, whereas in the latter (.tex) it is rendering all of it. One way to see
the difference is to right-click the mouse. The context menu that appears is
different depending on whether the browser or techexplorer is
rendering the document at the point where the mouse was clicked. The source code
of a page being browsed should be accessible via a menu even if the page is
being rendered by a plug-in, and shows exactly how the page has been
constructed.
The MathML Content markup examples are a slight cheat, because they are .tex
files that are neither strict TEX nor strict
HTML/MathML, but are instead MathML embedded in a LATEX
document using commands specific to techexplorer.
The MathML Presentation markup examples are .html files that embed .mml
source files. While browsing one of these files, it is an interesting experiment
to change the .html to .mml in the browser's URL (Address or Location) field
(and press Return), which will cause the browser to load the MathML (.mml) file
directly. At present a plug-in can access MathML only as a separate file either
directly or embedded in an HTML document: the more elegant <math> tag to
incorporate MathML requires native browser support that is provided by Amaya but
not by most other browsers.
The CATHODE demonstrations
CATHODE is an ESPRIT Working
Group concerned with the development of computer algebra tools for handling
differential equations. For purposes of software demonstration
required by the project, I have developed web-based form interfaces to four
packages written by UK CATHODE
members. The demonstrations all provide prettyprinted ASCII output by default
with an option to generate TEX output for use
with techexplorer as an alternative. Hence, you can compare
these two alternatives in the context of dynamically generated solutions of
differential equations. Three of the demonstrations use REDUCE and run on two
servers: the advertised server "cathode.maths.qmw.ac.uk" and my
development server "centaur.maths.qmw.ac.uk". One of the
demonstrations uses Maple and runs only on centaur. The demonstrations all
include some "canned examples", which can be used to generate some
mathematical output regardless of whether you completely understand the problem
being solved! They also all provide the facility to enter your own problems. Please
do not try to solve difficult problems that will use excessive resources on the
servers and prevent other users from accessing them! Beware that
the demonstrations are still under development, and in particular the options to
use frames do not yet work reliably. I suggest you take a quick look through any
of the demonstrations that appeal to you and then try a few of the simpler
canned examples, first without and then with the TEX
output selected.
I recommend starting with the ODESolve
demonstration, which is a simple REDUCE solver for single ODEs. (For further
details see the ODESolve talk I gave at the last CATHODE
Workshop; both the presentation
and extended
abstract are available. Incidentally, these are respectively Microsoft Word
and LATEX documents converted to PDF,
which contain a small amount of mathematics. If you have techexplorer
installed then you can also browse a longer paper
describing the development of an earlier version of ODESolve.)
The diffgrob2
demonstration provides an example of the use of Maple. The canned examples
in the table of diffgrob2 facilities all run quickly, although
other examples can be very slow. However, note that this particular
demonstration cheats slightly, because the standard diffgrob2
output format uses TEX syntax so it is not
generated by Maple. (In fact, in order to offer prettyprinted ASCII output in
this demonstration I had to modify the diffgrob2 source code
very slightly.) However, for a demonstration of different Maple-based software,
I could have generated TEX output using
standard Maple facilities as I have with REDUCE.
You are welcome also to try the CRACK
and ConLaw
demos. These package are very powerful but consequently harder to understand. (I
only claim to understand ODESolve!)
If you are interested in the detailed operation of the demos then the package
source code is all freely available via the demo pages, and my perl CGI scripts
(which provide the glue between the web server and the CAS) are (temporarily)
available in the directory http://centaur.maths.qmw.ac.uk/CATHODE/CGI/.
Case study: a computational mathematics examination paper
The QMW courses Computational Mathematics I and II are intended to teach our
first-year undergraduate mathematics students how to perform computational
mathematics using Maple. I teach CMII, and I use Maple to prepare the
examination paper (and most of the other course documentation). The process of
producing this exam paper provides a natural source for comparing various
formats for putting mathematics on the web.You can look at many of the files
directly, and/or download a file and explore some of the same steps yourself.
The files described below are all available in the directory Exam;
it is interesting to clink on this link to display a directory listing and
compare the file sizes. The steps I take and the formats involved are as
follows:
- Prepare a Maple worksheet Exam99.mws
containing both questions and solutions. (This uses Maple document styles
that I designed to mimic my LATEX
exam styles -- see step 3.)
- Delete the solutions to give a smaller worksheet Exam99_Q.mws and then export it as LATEX. (The exported LATEX
uses the standard Maple style file package maple2e.sty, which can be
found together with its sub-package files in the directory ETC under the
Maple root directory.)
- Edit this file to produce the final source file Exam99.tex
for the examination paper. This is a LATEX2e
source file that requires a document class file exam.cls
that I have developed.
- Process the source file with LATEX
to produce a device independent (DVI) file Exam99.dvi.
- Convert the DVI file to the PostScript file Exam99.ps
for printing. (This file is normally transient.)
- Convert the DVI file to the PDF file Exam99.pdf
for students to access later as a past exam paper. (This is done by QMW
Library for many past
examination papers, by scanning printed papers if necessary! But note
that this URL can be accessed only from within QMW.)
- Maple V Release 5 can also save worksheets as HTML, which is how I
produced the file Exam991.html. (Actually,
this is generated automatically as a sub-document of Exam99.html, which includes a navigation frame
containing a table of contents Exam99TOC.html,
but for this particular worksheet it is not very useful.) The result is
quite impressive, but it relies on a subdirectory images
containing a large number of GIF files, one for each piece of
mathematical notation, i.e. it is what I referred to above as HTML/GIF
format. If MathML were used instead of GIF then the result could be a single
file that should look equally good and load faster.
You can (in principle) access these files directly via the web, or first
download them to local filestore.
If Maple V Release 5.1 is available then you can open the .mws files directly
by copying the URLs from this document into the "Open URL" dialogue
available via a toolbar button or the File menu. If only an earlier release of
Maple is available then you will need to use a web browser to download the files
before you can open them. They are Release 5 worksheets; Release 4 may complain
but will probably open them, although they may need re-executing to reconstruct
all the output; earlier releases will not work. Try exporting the worksheet as
various formats.
If techexplorer is installed (which it is for the workshop)
then you can open the LATEX file
directly. However, it will not read the document class file and so will not
understand some of the macros used. (Exactly the same effect would occur with
the LATEX file exported directly
from Maple, except that it is the Maple style file that would not be read.)
Uninterpreted TEX commands are shown by techexplorer
in red (by default). To see exactly what the LATEX source code looks like, clink on this link Exam99.txt (which is just a copy of Exam99.tex with a different filename extension) or
select the browser option to view the source (which may not be useful in all
broswers).
You may like to try downloading Exam99.tex and
then editing it to remove some or all of the commands that techexplorer
does not understand, perhaps replacing them with standard commands.
Alternatively, you may like to just browse the file Exam99.latex
in which I have already done precisely this, so that it renders well in techexplorer
(but does not have quite the right format). To see how the exam paper should
appear look at one of the files Exam99.pdf, Exam99.dvi or Exam99.ps.
(Given the incentive, it should not be hard to incorporate the exam class file
into the document in such a way that techexplorer would render
it more accurately and without needing any editing.)
If LATEX2e is available then you
can try formatting the source file. To do this, download both Exam99.tex and exam.cls
to the same directory on your local machine, open a command window in that
directory and execute the command "latex exam99". (Windows programs
are not normally case sensitive.) You can view the DVI file via the web by using
a previewer (such as Yap, which is part of MiKTeX, the TEX
distribution that I recommended for Windows) as a web browser helper
application, or by downloading it.
You can view the PostScript file either via the web by using a PostScript
viewer, such as GSView for Windows,
as a helper application, or by downloading it. You can view the PDF file either
via the web by installing the Adobe Acrobat Viewer plug-in, or by downloading
it.
Finally, you can view the HTML file via the web just by clicking on the link
above; there is little advantage in downloading this and the big disadvantage
that it requires the support of a large number of small GIF files.
Write and view some of your own (LA)TEX
code
In Windows, Notepad is a rudimentary editor that should be available under
Programs/Accessories in the Start menu and will suffice for writing small code
fragments. Some online LATEX help
may be available, e.g. under Programs/MiKTeX/Help. To view the TEX
file using techexplorer, it is not necessary to use a web
server; just open the TEX file using a web
browser. One simple way to do this is to drag the file from Windows Explorer
onto a browser icon, either on the desktop or on the Quick Launch toolbar on the
taskbar (depending on how Windows is set up). Note that techexplorer
does not require a complete LATEX
document structure; provided the mathematical input is enclosed in a suitable (LA)TEX environment then techexplorer
will render it. For example, if you copy this single line of LATEX into a file with a suitable extension (such as .tex)
and then drag it onto a browser, techexplorer should render it
as displayed mathematics
\[ \int \!x\sin(x){dx}=\sin(x)-x\cos(x) \]
(To check this assertion, I did precisely this to produce the file test.tex. I actually generated this example using Maple, as
described in the next section!)
Use Maple to generate (LA)TEX
code
I have created a very simple Maple worksheet called Example_1.mws
to illustrate various ways of using Maple to generate (LA)TEX that is suitable for displaying using techexplorer.
Obvious advantages of this approach are that it is not necessary to be familiar
with (LA)TEX, and any mathematical
computation required can be done by Maple before the (LA)TEX is generated.
Convert TEX to MathML
TtHMML is Ian
Hutchinson's powerful (LA)TEX to
HTML/MathML translator (and the comments on the TtHMML page are interesting).
TtHMML is still in development, but a web-based
demonstration is available. It is therefore possible to take a short segment
of (LA)TEX and render it using techexplorer,
and also to convert it to HTML/MathML and render that, and compare the results.
However, currently the only browser that will render the MathML is Amaya, but
Amaya does not appear to support techexplorer. (In fact, it is
not clear that Amaya supports plug-ins at all.) So you probably need to use two
different browsers for this experiment!
Try Amaya
If the Amaya browser/editor is available then you might like to try using it
to view some existing MathML files, such as those provided as techexplorer
examples, and comparing the result with those of techexplorer.
You might also like to try using it to create some MathML yourself. The
documentation claims that this is easy. But beware: my experience is that this
is not true unless you are already very familiar with both Amaya and MathML!
Beware also that it seems that Amaya currently hangs when it
tries to open a file of any type other than HTML, which unfortunately
includes both .tex and .mml files! To browse .mml files using Amaya, try
wrapping the MathML in <math> </math> tags and changing the file
extension to .html. The file mml002.html is a
minimally edited techexplorer example file that I used to
ensure that this advice works!
Bibliography
Concordia University MathML
page
WebEQ from Geometry Technologies
A Gentle Introduction to MathML (HTML
version), (PostScript
version) - By Robert Miner and Jeff Schaeffer.
(The PostScript version is also temporarily available locally.)
Last revised on Friday, 13 August 2004.
|