# IBM techexplorer: introduction and hands-on practical session

## 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.

# Introduction

## 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!

# Background and context

## 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?
• (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.

### MIME types

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 V Release 5.1

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

• 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

• 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.

# Using techexplorer

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

# 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.