Math mode¶
Wrap mathematical content with math{}.
The font defined by math_name and math_path in automath.yaml
is used to render the characters listed in math_chars. All other characters
are rendered with the text font (defined in text_name and text_path).
In math mode:
- Hyphens and en-dashes are automatically converted to the minus sign (−),
and
*is converted to ×. - Isolated numbers will be rendered according to locale.
- The
/operator creates a fraction. - The
^operator creates a superscript. - A
(…)group is a sub-expression, like a{…}one, except that its parentheses are drawn: what stands between them is read exactly as it would be outside them — a keyword, a fraction, a power, a number to write in the locale's own way.
The contents of frac{}, angle{} and table{} values will be processed by default in math mode.
Examples with default settings follow.
Numbers with English locale:
| Expression | Renders as |
|---|---|
math{2450} |
|
math{80000} |
|
math{3.141592653589793} |
Numbers with French locale:
| Expression | Renders as |
|---|---|
math{2450} |
|
math{80000} |
|
math{3.141592653589793} |
Locale-independent examples:
| Expression | Renders as |
|---|---|
math{(4x - 6)^2 = 16x^2 - 48x + 36} |
|
math{1/2 + 1/6 = 2/3} |
|
math{a/{b+c}} |
|
math{text{a}/text{b + c}} |
|
math{1/4x} |
|
math{{1/4}x} |
|
math{1/4 x} |
|
math{1/4+x} |
|
math{1/{4+x} | color=#3771c8} |
|
math{x^{1/2}} |