nextuppreviouscontents
Next:Multi-line formulas Up:Generation of LaTeX documents. Previous:LaTeX comments.   Contents

Producing formulas

To output a formula (which fits on one line), you use \[ ... \] or \{ ... \}. The first form will print the formula in a mathematical version (like $\forall X (X \to X)$). The second will produce a verbatim version, using the syntax (like /\X (X -> X)). The second form is useful when producing a documentation for a library, when you have to teach your reader the syntax you use.

Formulas produced by \[ ... \] may be broken by TeX using its usual breaking scheme. Formula produced by \{ ... \} will never be broken (because LaTeX do not insert break inside a box produced by \verb). We will see later how to produce larger formulas.

LaTeX formulas can use extra goodies:

A \[ ... \] or \{ ... \} can be used both in text mode and in math mode. If you are in text mode, \[ ... \] is equivalent to $\[ ... \]$ (idem with curly braces).

WARNING: the closing of a formula: \], \} should not be immediately followed by a character such that this closing plus this character is a valid identifier for . Good practice is always to follow it by a white space. This is a very common error!


nextuppreviouscontents
Next:Multi-line formulas Up:Generation of LaTeX documents. Previous:LaTeX comments.   Contents
Christophe Raffalli 2005-03-02