So You Want To Write HTML and Include Math Typesetting?

Suppose you are interested in doing the following:

You are writing math content for the web. You want to write primarily in HTML, so that you may use all of the HTML features. AND, you want to include Math Typesetting.

This was our primary interest in the beginning. And still is.

We wanted to create a web-based authoring system so that we could write HTML and "escape" to math mode in markup fashion.

The HTML 3.2/?.? had promised to offer such things like:


Hi.  This is some HTML.  Nice bold words.  
Maybe some javascript.  Now for some MATH:
<math>
<int><sub>0</sub><sup>1</sup> <frac><num>x-2</num><denom>5-x</denom> </int>
</math>

Or something like that (this isn't correct HTML 3.2/Math code.) AND, HTML 3.2/?.? Math has been promised for years, and only the optimists in the crowd even slightly believe that it will ever get implemented.

You may at first say (like us): Oh boy, yet another math typesetting language to learn.


We wanted to be able to do the following:


Hi.  This is some HTML.  Nice bold words.  
Maybe some javascript.  Now for some MATH:
<tex>
\int_0^1 \frac{x-2}{5-x}
</tex>

We did not want a new typesetting language, but rather our old friend TeX.

Our Goals

We wanted a solution that expanded with the times. And we wanted to primarily write in TeX (for the math). And we didn't want GIFs (obviously).

When (and if) HTML 3.2/?.? Math ever got implemented, we didn't want to have to go back to ALL of our math content and redo it. Yuk. We wanted a solution that allowed us to simply change a single prefs file, and then the TeX calls inside of our HTML documents would be converted to HTML 3.2/?.? math instead of our 8bit-fancy TeX2HTML converter.

Our Solution

Our solution was to use a server-side filtering system that interfaced with a unix binary executable to convert TeX into 8bit-fancy HTML math.

Our authoring environment works like the following:


Hi.  This is some HTML.  Nice bold words.  
Maybe some javascript.  Now for some MATH:
<? ctex("\int_0^1 \frac{x-2}{5-x}")>

The <? and closing > are PERL escape tags in the PHP (.phtml) html-scripting system. These escapes interface with a special PERL-type engine (as part of PHP).

The function ctex (equivalent to $$ $$ in TeX) then sends the TeX to TeX2HTML for conversion and return to the page -- all on the fly!

Here is the output (since this is a PHP (.phtml) page):


Hi. This is some HTML. Nice bold words. Maybe some javascript. Now for some MATH:
With the purchase of our Web Authoring System we give you the code library and routines to allow you to author HTML with Math using TeX code right now.

When HTML 3.2/?.? Math is (ever) implemented, then you may, by changing one file slightly, have this engine convert TeX into HTML 3.2/?.? Math markup code. Thus, when (and if) this change ever occurs, you can automatically change all of your content pages.

The Web Authoring System works only on Unix webservers with PHP (.phtml) installed on the server (a very common shareware program available on most systems).

Our Web Authoring System can be modified very easily to work with HTML-script and Netscape's LiveWire - although we haven't done this ourselves, minor modifications in our code will produce the desired output.

The Web Authoring System comes with the TeX2HTML binary unix executable and the necessary PHP files. Cost: $550.



R O A D M A P

MAIN PAGE Examples
Subscription Information How To
Macintosh Problems and Corrections Competing Products to TeX2HTML
Unsupported TeX Commands Email Interface for Converting Documents
Recommendation for Presenting Math on the Web Help
Contact Information Technical Support
Web Authoring System Unix SYMBOL Font Installation

 
PURCHASE TeX2HTML



This page accessed times since November 22, 1997


TeX2HTML is managed by Robert Curtis and Diane Housken of WebPrimitives, Cambridge, Massachusetts, USA

Artwork by Jim Infantino

TeX2HTML webcasts from a series of Pentium II 266 MHz servers running FreeBSD Unix via a two fast T-3/DS-3 lines from Pittsburgh, Pennsylvania, USA


WebPrimitives
Making Your Mark
On The World-Wide-Web