Template:Math/doc

The math template formats HTML- or wikimarkup generated mathematical formulas in the similar fashion than MathJax, a web-based TeX formulas interpreter. The template uses the  class, which aims to match the size of the serif font with the surrounding sans-serif font in those skins that use sans-serif (see below). The template also prevents line-wrapping.

Use this template for non-complex formulas as an alternative to using the  format (see: Help:Math).

Usage
Use this template to wrap an inline formula in wikitext. Examples: $f(x) = b^{x} = y$
 * produces: $f(x) = b^{x} = y$

$sin &amp;pi; = 0$
 * produces: $sin &pi; = 0$.

$&lt;big>&amp;int;&lt;/big>+&amp;infin; 0 e^{−x} dx = 1$
 * produces: $&int; +&infin; 0 e^{−x} dx = 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} = 2$
 * produces: $(√2)^{2} = 2$.

Use of equals-sign and absolute value bars
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$.

A similar difficulty concerns the vertical bars ("|") used to indicate absolute value, which without care would get interpreted as part of the template syntax. The solution is different than for the equals sign: such bars should be entered as " | ": $|f(x) − a| < ε$
 * produces: $|f(x) − a| < ε$.

This example can also be produced by $|f(x) − a| < ε$

Parameters
The following parameters are optional: $1 + 2 = 3$
 * – This will render the formula in a bigger fontsize, increased to 165%.
 * – Use this to specify your own fontsize.
 * produces: $1 + 2 = 3$