Skip to content

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} 2,450
math{80000} 80,000
math{3.141592653589793} 3.141592653589793

Numbers with French locale:

Expression Renders as
math{2450} 2450
math{80000} 80000
math{3.141592653589793} 3,141592653589793

Locale-independent examples:

Expression Renders as
math{(4x - 6)^2 = 16x^2 - 48x + 36} (4x − 6)2 = 16x2 − 48x + 36
math{1/2 + 1/6 = 2/3} 12 + 16 = 23
math{a/{b+c}} ab + c
math{text{a}/text{b + c}} ab + c
math{1/4x} 14x
math{{1/4}x} 14 x
math{1/4 x} 14 x
math{1/4+x} 14 + x
math{1/{4+x} | color=#3771c8} 14 + x
math{x^{1/2}} x12