Template:Math/doc

The Math template formats HTML- or wikimarkup generated mathematical formulas in the same manner as HTML based TeX formulas, which uses a serif-based font. The generated formula is displayed using the same-size font as the adjoining text. The template will prevent line-wrapping.

Use this template for non-complex formulas as an alternative to using the "math" tag format "&lt;math>...&lt;/math> (see: HELP:Math).

Usage
Use this template to wrap an inline formula in wikitext. Examples: $x^{2} + y^{2} = r^{2}$
 * produces: $x^{2} + y^{2} = r^{2}$

$= 0$
 * produces: $= 0$. The coding "&lt;i>" puts italic font, same as "&lt;var>".

$= 1$
 * produces: $= 1$

$1/2 − 1/3 = 1/6$
 * produces: $1/2 − 1/3 = 1/6$. Note the triple-apostrophes have set the whole formula as bold.

$^{2} = 2$
 * produces: $^{2} = 2$.

$x^{2} + y^{2} = r^{2}$
 * produces: $x^{2} + y^{2} = r^{2}$, same as first example, but using double-apostrophes to get italic font.

Use of equals-sign
If a single equals-sign ("=") is used, it will fail to render, instead showing " ". For example, the following template-coding would be invalid:

$1 + 2 = 3$
 * produces: $1 + 2 = 3$, which is invalid code

To resolve this, either: (a) Start the formula with " " as in: $1 + 2 = 3$
 * produces: $1 + 2 = 3$, or else, (b) include the equals-sign in double-braces "=" as in:

$1 + 2 = 3$
 * produces: $1 + 2 = 3$.