PDF: Adobe Acrobat Plugin

HTML: Symbol Fonts in Netscape and Internet Explorer

TEX: IBM techexplorer

MML: IBM techexplorer, WebEQ

Incorporating Mathematics into WebCT

Recommendations

This paper will demonstrate a number of methods by which mathematical expressions can be incorporated into the Web pages generated by WebCT. Discussion will be limited to the most recent versions of the browsers that WebCT supports, namely Netscape 4.6 and Internet Explorer 5.0. Authors have been tantalized over the last several years with promises of technology to come and the present time is no exception with MathML (MML) on the horizon; there are, however, good solutions available today and the technology should only get better. The discussion here will center around an example taken from my Advanced Engineering Mathematics course. All applications were run under under Windows 95 or Windows NT.

Netscape and Internet Explorer can display mathematical expressions directly through the use of the built-in symbol fonts or indirectly through the use of plugins. The display document formats and the corresponding display technologies are

- PDF: Adobe Acrobat plugin
- HTML: symbol fonts in Netscape and Internet Explorer
- TEX: IBM techexplorer plugin
- MML: IBM techexplorer plugin, WebEQ Math Viewer

In the next four sections, we discuss the preparation of documents in each of these formats, and we end by showing how to include these documents in WebCT path pages, bulletin board and private mail messages, and quiz questions. We do not consider methods that incorporate mathematical expressions as GIF images.

Adobe Acrobat is a widely used tool for universal document exchange. Acrobat can be used to publish virtually any document in portable document format (PDF). PDF documents can be displayed and printed using the free Acrobat Reader. Documents in PDF preserve the exact look and content of the originals, complete with fonts and graphics, and they can be distributed by e-mail , the Web, an intranet, a file system, or a CD-ROM. Word documents can be converted directly to PDF using the Acrobat PDFWriter which is accessed through an application's Print menu item. The PDFWriter can be viewed as a print-to-file utility. An alternative method is to print the Word document to a postscript (PS) file and then convert from PS to PDF format using the Acrobat Distiller. There can be small differences in the PDF documents produced. The PDF document produced by the Distiller will generally preserve the page breaks but the PDFWriter sometimes does not. Roman Type 1 and TrueType outline fonts can be embedded in the PDF document. This ensures that the original fonts are used for display and printing on computers that do not have the fonts installed.

Word to PDF

Microsoft Word 2000 comes with the Microsoft Equation Editor 3.01, a WYSIWYG equation editor. Equation Editor 3.01 can be replaced by MathType 4.0, a much more advanced version of this product. Word documents can be converted to PDF using the Acrobat PDFWriter or the Acrobat Distiller. Our example word.doc (19KB) was prepared using Word 2000 and Equation Editor 3.01. It was converted to PDF using the PDFWriter to produce wordpdfwriter.pdf (8KB), and it was again converted to PDF using the Distiller to produce worddistill.pdf (7KB). The Word document can be opened with Word 97 or Word 2000. The translation via the PDFWriter worked well, but the Distiller translation lost the summation sign and the integral sign. For authors using the Equation Editor regularly, MathType is a good investment.

If you have Office 2000 and Internet Explorer 5.0 loaded and click on word.doc, this document will open in the Internet Explorer window. With this combination, Word documents are Web publishable without further alteration.

LaTeX to PDF

TeX and its cousin LaTeX (see CTAN) have long been staples in the mathematical community. They are used to produce publication quality documents and several mathematical journals require submissions in one of these formats.

WinEdt32 is a shareware, state-of-the art text editor and shell for Windows. It is an ideal shell for your favorite implementation of TeX. I use Y&Y TeX]. WinEdt32's menus and symbol toolbar make it easy for the novice to construct equations. This completely customizable shell can run your entire TeX environment and much more. Menu items have been preset to generate many of the LaTeX environments, but because the menus are scriptable, the user can add others. I have added menu items and toolbar buttons for the following actions: LaTeX, BibTeX, Dvi Preview, Dvipsone, Acrobat Distiller, Acrobat, TtH, NC. WinEdt32 was used to write our example in the LaTeX file winedt.tex (1KB), whose content can be viewed by looking at the text file winedt.txt. The first four lines, the last line, and the eqnarray environment were created using my knowledge of LaTeX. The equations were created using the Math, Greek, Symbols, and function tool bars. The purpose of the second and third lines is to select the Y&Y MathTime fonts, which has the effect of making the resulting PDF file size small because the Times text font does not have to be embedded in the PDF document. The Acrobat Reader can generate this font automatically. Running LaTeX on winedt.tex produced winedt.dvi, running Dvipsone on winedt.dvi produced windedt.ps, and running the Acrobat Distiller on windedt.ps produced winedt.pdf (10KB). View winedt.pdf and wordpdfwriter.pdf with the Acrobat Reader. They are virtually indistinguishable.

MathType 4.0 can also be used to translate mathematical expressions into LaTeX. Once the expression has been generated in the WYSIWYG MathType 4.0 environment, it can be copied onto the clipboard and then into your favorite LaTeX editor.

Scientific Notebook to PDF

Scientific Notebook is a WYSIWYG authoring environment. Mathematics can be entered using standard notation and mathematical expressions can be evaluated using the built-in Maple engine. Scientific Notebook documents are saved in LaTeX format. Generating our example using Scientific Notebook produced scinotebk.tex (2KB), whose content can be viewed by looking at the text file scinotebk.txt. Selecting the Distiller in the Print menu of Scientific Notebook, scinotebk.tex was converted into scinotebk.pdf (12KB). The PDFWriter option did not embed the special Scientific Notebook fonts, so the Distiller choice was necessary to make the document portable. Compare this file to wordpdfwriter.pdf and winedt.pdf and note that Scientific Notebook uses the Arial font for text by default.

Also, note that below the line containing \begin{document} scinotebk.tex and winedt.tex are identical. By replacing the lines in scinotebk.tex above the line containing \begin{document}, with the lines

\documentclass[12pt]{article} \usepackage[noTS1]{mathtime} % Use MathTime fonts. \input TS1avoid.tex % Use MathTime fonts.

scinotebk.tex can be converted into winedt.tex. The two lines for the MathTime fonts can be omitted if these fonts are not being used. Consequently, Scientific Notebook can be used as a WYSIWYG LaTeX authoring environment. As we shall see below, the LaTeX so produced can be translated into HTML or viewed directly using browser plugins.

HTML: symbol fonts in NC and IE

LaTeX to HTML

TtH translates Plain TeX or LaTeX into a near equivalent in HTML. It is extremely fast and completely portable. It produces web documents that are compact and fast-viewing. TtH translates and displays mathematical expressions using the symbol fonts which are included in the 4+ versions of Netscape and Internet Explorer. TtH cannot display inline matrices and over dots. Inline fractions do not display well either. Overall, however, TtH is one of the best technologies available in the spring of 99. The example file winedt.tex was converted into winedt.html (5KB) using TtH. There are some minor problems with vertical and horizontal alignment, but the mathematics is quite readable.

Here is a second example. It is a project taken from my Advanced Engineering Mathematics course. In the past I have distributed this document in PDF format. The TtH translation to HTML and the original PDF document are provided for comparison: p2linalg1.html (29KB) and p2linalg1.pdf (44KB). Note that the figure that was included in the PDF document in EPS format had to be converted to GIF format for the HTML version.

The IBM techexplorer Hypermedia Browser is a Web browser plugin for people who read or publish scientific articles, books, journals, or even their homework on the Internet! IBM techexplorer dynamically formats and displays documents containing scientific and mathematical expressions that are coded with the popular TeX and LaTeX markup languages. The IBM techexplorer is available in a free introductory version and a commercial professional version.

Both LaTeX files winedt.tex and scinotebk.tex produced above can be viewed using the IBM techexplorer plugin. The \usepackage commands in these files will be ignored and the \input commands will generate an error message at the top of the file. By deleting these commands and the comments, we arrive at a common file winedt-scinotebk.tex which can be viewed without generating an error message. For readers who do not have either plugin loaded, we provide a GIF image of the output winedt-scinotebk.gif.

MathML (MML) is widely regarded as the future of mathematics on the Web. MathML is an XML-based language for representing mathematical notation in Web documents and is now a recommendation of the World Wide Web Consortium (see [W3]). Currently, MML inserted into an HTML document with the embed command can be displayed by the IBM techexplorer plugin. Netscape and Internet Explorer should be able to display MML without the use of plugins in about a year. The MathML Newsletter is a good place to keep abreast of developments. MathType 4.0 can also be used to translate mathematical expressions into MML. Once an expression has been generated in the WYSIWYG MathType 4.0 environment, it can be copied onto the clipboard and then into your favorite HTML editor.

TtHMML is a (La)TeX to MML translator from Ian Hutchinson, the developer of the highly acclaimed (La)TeX to HTML translator TtH. TtHMML is currently undergoing testing.

WebEQ is a collection of programs and Java programming libraries dealing with all aspects of publishing math on the Web. The flexibility of the WebEQ tools stems from the fact that WebEQ is based on MathML. There are four main WebEQ programs: the java applet Math Viewer, the Equation Editor, the Wizard, and the Wizard server. An author first creates an ordinary HTML document. Mathematical expressions can be built up graphically with the WebEQ Editor and then pasted into the HTML source, or they can be typed in by hand in WebTeX, a simplified LaTeX-like language. The second step is to process the HTML file with the Wizard which generates a new HTML file containing applet tags which will invoke the Math Viewer.

WebTeX is so close to LaTeX that it was fairly easy to convert winedt-scinotebk.tex into webeq-in.html, a special HTML file containing the WebTeX markup. Next, webeq-in.html was processed with the Wizard to produce webeq-out.html. For readers who do not have the Math Viewer loaded, we provide a GIF image of the output webeq-out.gif.

Incorporating Mathematics in WebCT

Path Pages

The PDF document winedt.pdf generated
above can be used as a WebCT path page with the help of the auxiliary file winedt-aux.html.
Note that winedt.pdf must be uploaded into the outlines subdirectory of the
*COURSE FILES* directory. Of course, you can create whatever directory
structure you want. Also, notice that the variable "_COURSEID_" has
been used in place of the courseid in case this material should be used in the
future with a different courseid.

Provided that the student has the IBM techexplorer plugin loaded, the LaTeX document winedt-scinotebk.tex can be used as a WebCT path page with the help of the auxiliary file winedt-scinotebk-aux.html.

The use of an auxiliary file is only necessary for path pages; for other types of links, the usual procedures work fine.

Bulletin Board and Private Mail and Quiz Questions

The document winedt.html generated above was used to test the addition of mathematical expressions in HTML format to bulletin board and private mail messages. The lines of this document, after the title tag and before the attribution paragraph at the end, were copied into the message textbox and the message was previewed. The messages looked fine. This process was repeated for a short answer quiz question by pasting into the quiz question textbox. The resulting display of the mathematics looked fine.

The document winedt-scinotebk.tex generated above was used to test the addition of mathematical expressions in TEX format to bulletin board and private mail messages. The following lines were copied into the message textbox

<HTML><EMBED TYPE="application/x-techexplorer" HEIGHT=100% WIDTH=100% TEXDATA=" "></HTML>

the blank second line was replaced with the contents of winedt-scinotebk.tex, and the message was previewed. This process was repeated for a short answer quiz question by pasting into the quiz question textbox. The resulting display of the mathematics again looked fine. The IBM techexplorer plugin must be loaded to view the embedded LaTeX content.

The embed tag can also be used to insert a PDF document or MathML markup in an HTML document. Using the HEIGHT=100% and WIDTH=100% attribute/value pairs makes it easy to embed an entire document. In the case of mathematical expressions in MML format, there will be an embed tag for each expression and some experimentation will have to be done with the HEIGHT and WIDTH values for each expression. The IBM techexplorer plugin must be loaded to view the embedded MML content. Also, note that the attribute TEXDATA must be changed to MMLDATA.

Because I am an old hand with LaTeX, I prefer to use a customized WinEdt32 shell to generate HTML markup to be used with WebCT. I can create a LaTeX document, use a TtH menu item to translate, and use a browser menu item to view. If I need to insert the LaTeX into an embed tag as discussed above, this step has also been set up as a menu item. From the WinEdt32 window, I can paste into various WebCT textboxes.

As discussed in the MathML Newsletter, there are several (La)TeX to MML translators under development and Netscape and Internet Explorer will reportedly support MathML in the future. At some point, I will substitute a (La)TeX to MML translator for TtH in my WinEdt32 shell.

If you don't want to learn a bit of LaTeX, the WYSIWYG Editor MathType 4.0 covers all the bases. It can replace the Word Equation Editor and it can also output MML and LaTeX.

Acknowledgments

This study was sponsored by the Southeastern University and College Coalition for Engineering Education (SUCCEED) and the Pilot Laptop Program, College of Engineering and Science, Clemson University.

1 William
F. Moss, Department of Mathematical
Sciences, College of Engineering and
Science, Clemson University.*
*