WebTeX is a reasonably rich language, and by using a small number of macros, careful authors can write LaTeX documents using only WebTeX math commands. By the same token, it is trivial to convert an HTML/WebTeX document to a LaTeX document.
Authors should not expect to easily convert existing TeX documents to WebTeX.
\mathrm{} Roman \mathit{} italic \mathbf{} bold \mathbb{} black board bold \mathfr{} fraktur \mathcal{} caligraphic \mathsf{} sans serif \mathtt{} typewriter
One may also change the font color:
\fontcolor{#rrggbb}{}The following commands change font size:
\textsize \scriptsize \scriptscriptsizeThe following commands determine the rendering mode. The mode determines where the limits are positioned for large operators like the summation sign, and how vertically compacted fractions are.
\displaystyle \textstyle
Caution: This is a significant difference between WebTeX and TeX. In TeX the mode and size are combined into single commands.
\thinsp or \, \medsp \thicksp \negsp or \! \quad
In addition, the following commands generate a box which for centering purposes has a 0 width or 0 height. The enclosed expression is rendered in the indicated direction from the one-dimensional reference point. A typical use is over set arrows in commutative diagrams.
\llap{} \rlap{} \ulap{} \dlap{}
Finally, there are general space entity, and a general space entity:
\rule{ht}{dp}{wd} \space{ht}{dp}{wd}
\hat{} \widehat{} \check{} \widecheck{} \bar{} \widebar{} \vec{} \widevec{} \tilde{} \widetilde{} \dot{} \ddot{}
\sum \coprod \prod \oint \int \otimes \oplus \cup \cap \wedge
\operatorname{}
command.
Caution: This is a significant difference between WebTeX and TeX. In TeX, some delimiter is required after the \right or \left command
By default, delimiters grows symmetrically around the axis of the equation. When enclosing a matrix that is aligned top or bottom, for example, one needs the delimiters to "float" to match the alignment of the enclosed expression. To accomplish this, use the \floatleft and \floatright commands instead. For matching purposes, a \floatleft will match a plain \right and vice versa.
\{ \} \lfloor \rfloor \lceil \rceil [ ] ( ) \langle \rangle | | (absolute value bars) \| \| (norm bars)
\text{}
^, _ subscripts and superscripts \^{presup}{base} preceding subscripts and superscripts \_{presub}{base} (braces are not optional even for single character scripts)
Scripting operators work much the same as they do in LaTeX. With ordinary subscripts and superscripts, the script need not be enclosed in braces, if it is a single token. In general, WebTex and LaTeX tokens are the same -- any single character or symbol.
Another difference is the way in which one does tensor indices in WebTex. Additional scripts attached to a base are raised or lowered by the same amount as the first set, and aligned in vertical columns. Thus, R^i_j^k_l has more or less the same effect as R^{ik}_{jl} in LaTeX. However R^{x^2}_i^{y^2}_j turns out more like R^{x^2}_i {}^{y^2}_j in LaTeX. Of course, one can "turn off" the tensor indicies in WebTeX by inserting extra braces: {R^i_j}^k_l
Prescripts function just like ordinary scripts with the exception that braces around the scripts are not optional. In particular, multiple prescripts also act like tensor indicies by default.
f' (equivalent to f^\prime) \sqrt{} \root{n}{expr} \frac{}{} \binom{}{} \overbrace{} \underbrace{} \overset{}{} \underset{}{}
\array{} \\ separates rows, & separates cells
The first entry in an array, row or cell may optionally be the appropriate options block:
\arrayopts{} \rowopts{} \cellopts{}
Each of these option blocks can contain any collection of option settings:
Array options: \collayout{[left|center|right|solid|dashed]*} \align{top|bottom|center|r#n} \padding{number} \equalrows{true|false} \equalcols{true|false} Row options: \align{top|center|base|bottom} \underline{none|solid|dashed} Cell options: \rowspan{number} \colspan{number} \rowalign{top|center|base|bottom} \colalign{left|center|right}
Cells that span overwrite adjacent cells. The author is responsible for insuring that the masked cells are empty. A spanning cell is anchored at its upper left corner.
Caution: This is a significant difference between WebTeX and TeX. Arrays and alignment are done totally differently in Tex.
\define{macro}[n]{expansion using #1, ...#n to represent arguments}
\href{URL}{expr} \statusline{message}{expr} status message on mouse over \fghilight{color}{expr} foreground hilight on mouse over \bghilight{color}{expr} background hilight on mouse over \toggle{expr1}{expr2}{prompt1}{prompt1} toggle expressions on click