The same formulas written both ways. Left column is AsciiMath (backticks, rendered to MathML on the server); right column is LaTeX (dollar signs, rendered by KaTeX in the browser). They should look near-identical.
| AsciiMath | KaTeX | |||
|---|---|---|---|---|
| `x | 2+y | 2=r | 2` | $x^2+y^2=r^2$ |
| `a/b` | $\frac{a}{b}$ | |||
| `sqrt(x+1)` | $\sqrt{x+1}$ | |||
| `alpha+beta=gamma` | $\alpha+\beta=\gamma$ | |||
| `x in RR` | $x \in \mathbb{R}$ | |||
| `f(x)=sin(x)/x` | $f(x)=\frac{\sin(x)}{x}$ |
AsciiMath: ` x=(-b+-sqrt(b^2-4a c))/(2a)`
KaTeX: $$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$
AsciiMath: ` sum_(i=1)^n i^3=1)/2)^2`
KaTeX: $$\sum_{i=1}^{n} i^3=\left(\frac{n(n+1)}{2}\right)^2$$
AsciiMath: ` int_0^1 x^2 dx = 1/3`
KaTeX: $$\int_0^1 x^2\,dx = \frac{1}{3}$$
AsciiMath: ` lim_(x→0) {:sin(x)/x:} = 1`
(The {: … :} invisible brackets matter: without them this parser reads lim sin(x) as the numerator.)
KaTeX: $$\lim_{x\to 0}\frac{\sin(x)}{x} = 1$$
AsciiMath: ` 2)`
KaTeX: $$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$