Skip to content

Mathematical notation

Use formula text inside an element with display: math. This is a small math language with TeX-like syntax.

<math>\frac{a}{b}</math>
math { display: math; text-combine-horizontal: all; }

Every result below is cropped from Monokakido 1.4.6.

Formatting

Feature Formula text Native result
Fraction \frac{a}{b} a over b
Subscript and superscript x_{i}^{2} x with subscript i and superscript 2
Square and indexed roots \sqrt{x}+\sqrt[3]{y} Square root of x plus cube root of y
Large operators \prod_{i=1}^{n}x_i+\sum_{i=1}^{n}i Product and sum with limits
Integrals \int_{0}^{1}x^2 Integral of x squared from zero to one
Accents \hat{x}+\bar{x}+\dot{x} Hat, bar and dot accents
Vector arrows \vec{a}+\overleftarrow{AB} Arrow above a and left arrow above AB
Font faces \mathrm{ABC}+\boldsymbol{ABC}+\text{birb} Roman, bold and text faces
Formula style \displaystyle\frac{a}{b}+{\scriptstyle\frac{a}{b}} Larger and smaller fractions
Symbols and relations \alpha+\beta\leq\infty alpha plus beta less than or equal to infinity
Spacing a\!b+a\,b+a\;b Negative, thin and thick spacing
Aligned lines \begin{split}a&=b+c\\d&=e\end{split} Two equations aligned at their equals signs
Local macro \newcommand{\birb}[1]{\frac{#1}{2}}\birb{x} Macro expands to x over two

Braces group an argument. _ and ^ attach to the preceding expression. Inside split, & marks alignment and \\ or \cr starts another line. Escape & as &amp; in article XML.

The renderer also recognises \textstyle and \scriptscriptstyle, additional integrals such as \iint, and accents such as \acute, \grave, \breve, \check, \tilde, \ddot, \dddot, \ddddot, \widehat and \widetilde. Vector forms include \overrightarrow and \overleftrightarrow.

Symbol command list lists the named symbols with glyph definitions in the registered native command families. It is a lookup aid, not a list of TeX packages or environments.

Limits

Unknown commands can disappear silently while their arguments remain visible. For example, \binom{n}{k}+\frac{n}{k} renders as:

nk plus n over k, with binom silently missing

Keep text-combine-horizontal: allon the formula when it should remain upright in vertical articles.