KaTeX Support in OneCompiler
OneCompiler supports KaTeX format for Math.
Refer https://katex.org/ for syntax help. Following are some quick examples for reference.
| Syntax | Result |
|---|---|
$a + b$ | |
$\frac{1}{2}$ | |
$\sqrt{x}$ | |
$\sum_{i=1}^n i$ | |
$\int_{0}^{\infty} e^{-x} dx$ | |
$\binom{n}{k}$ | |
$\lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x$ | |
$\vec{F} = m \vec{a}$ | |
$\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$ | |
$\displaystyle\int \frac{1}{1 + x^2} dx$ | |
$\log_{10} 100$ | |
$a \equiv b \pmod{m}$ | |
$\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$ | |
$\sqrt[3]{8}$ | |
$\vec{v} \cdot \vec{u}$ | |
$\frac{dy}{dx}$ | |
$\sqrt{x^2 + y^2}$ | |
$\underset{n \to \infty}{\lim} \frac{1}{n}$ | |
$\begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$ | |
$\sum_{i=1}^{\infty} \frac{1}{2^i}$ |