- Download
- Register URL
- How to Produce a Book
- Tip of the Week
- User Guide
- Issues
- Examples
- Sandbox
- Install the Server

**What support is there for including equations in Web pages?**

Mediæval writing desk

The Wikipublisher library includes a recipe based on the LatexRender php class library, which allows authors to display equations on the Web and in print. Equation (1) illustrates the capabilities and shows the equation is numbered automatically.

The recipe uses L^{A}T_{E}X and ImageMagick to generate a gif image of the equation for Web display. This approach guarantees that the Web and print versions are the same. To insert an equation, wrap T_{E}X equation markup in the {$ ... $} tags.

By default, equations are unnumbered. The above example uses the {$uniqueID, ... $} markup variant, which assigns a label and number. Authors can refer to a labelled equation using the EQ(uniqueID) cross-reference markup (like the FIG, TAB and DIV cross-reference markup). The Eq(uniqueID) variant capitalises the first letter. The following equation is unnumbered with colour:

Authors can also write multi-line equations, e.g. equation (2):

The above markup techniques are suitable for inline equations or ones that “stand alone”. However, we often want to put several equations together, aligned on the = sign or other relational symbol. If 2 or more consecutive lines start and end with {$ ... $} markup, this is interpreted as a set of aligned equations. In the following example, the *first* equation line starts with {$*; the * suppresses the numbering that L^{A}T_{E}X will otherwise generate for this environment.

Discussion of T_{E}X equation markup is beyond the scope of this tip. There are more examples at L^{A}T_{E}X Equations and Aligned Equations.

Interested readers may wish to view the source of the current page.

Category: markup