Introduction

WebTeX is an equation markup language for WebEQ. Its syntax and commands are similar to the math mode part of LaTeX. However, WebTeX is designed to be compatible with MathML. The benefit of that is that WebTeX always translates unambiguously into MathML, while LaTeX does not. Unfortunately, the cost is that existing LaTeX equations frequently require some changes to be compatible with WebTeX. For this reason, it is probably most accurate to think of WebTeX as a shorthand input syntax for MathML with familiar commands, rather than as a kind of TeX. Nonetheless, WebTeX has enough similarity to LaTeX so that authors already familiar with LaTeX will have little difficulty using WebTeX.

To author an equation using WebTeX, you use special commands (mostly starting with the backslash character '\') to indicate the math layout and symbols. A few common commands will give the idea:

Notation WebTeX Markup Result
fraction \frac{2}{3+y} wtd1.gif
exponents e^{-i\pi} wtd2.gif
font changes x \in \mathbb{C} wtd3.gif

WebTeX is a rich markup language, with expressive power comparable to LaTeX math and MathML presentation markup. WebTeX supports macros, which MathML lacks, though not as extensively as in LaTeX. WebTeX also has interactivity commands which correspond to the MathML <maction> element, but which have no counterpart in LaTeX. In general, WebTeX syntax is more rigid than LaTeX, though it is substantially friendly than raw MathML.

In most cases, experienced LaTeX authors will find that WebTeX constructs are identical to their LaTeX counterparts. However, there are two areas where this is not true. The first is tables. WebTeX introduces new commands which are essentially in one to one correspondence with the MathML table constructs. The MathML table model is quite different from the LaTeX table model, and consequently this is a source of conversion trouble.

The second area concerns how strings of characters in the input markup are broken up into tokens. Since tokenization is important in MathML, WebTeX attempts to group characters into tokens as appropriate. For example, WebTeX treats the four characters '2.19' as a single number token. By contrast, LaTeX tends to require authors to explicitly group together characters that should be treated as a multi-character token. This difference is most noticeable in expressions such as x^2.19. WebEQ will treat this as 'x to the 2.19 power' while LaTeX regards this as 'x squared followed by .19'.


[WebEQ Developers Suite]

Created: Nov 05 1997 --- Last modified: Tue Mar 26 17:13:37 2002
Copyright © 1997-2002 Design Science, Inc. All rights reserved.