Math Equations

Write beautiful mathematical equations with LaTeX syntax

AnySlate supports mathematical typesetting using LaTeX syntax, rendered by the KaTeX library. Write complex equations, formulas, and mathematical notation directly in your documents with instant preview. Whether you're writing academic papers, technical documentation, or study notes, math support makes it easy to express mathematical concepts beautifully.

Overview

Inline Math

Embed equations within text using single dollar signs.

Block Math

Display equations on their own line with double dollar signs.

KaTeX Rendering

Fast, high-quality rendering using the KaTeX library.

LaTeX Syntax

Full support for standard LaTeX mathematical notation.

Inline Math

Equations Within Text

Use single dollar signs to embed math within your text. Inline math flows naturally with the surrounding content.

Syntax:

The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$

More examples:

  • Einstein's famous equation $E = mc^2$ shows...
  • The area of a circle is $A = \pi r^2$
  • For any angle $\theta$, we have $\sin^2\theta + \cos^2\theta = 1$

Block Math

Display Equations

Use double dollar signs for equations that should appear on their own line, centered and larger. Great for important formulas and complex expressions.

Syntax:

$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$

Multi-line equations:

$$
\begin{aligned}
(a + b)^2 &= a^2 + 2ab + b^2 \\
(a - b)^2 &= a^2 - 2ab + b^2
\end{aligned}
$$

Common Symbols

Greek Letters

\alpha\beta\gamma\delta\epsilon\theta\lambda\pi\sigma\omega

Operators

\times\div\pm\mp\cdot\leq\geq\neq\approx\equiv

Arrows

\rightarrow\leftarrow\Rightarrow\Leftarrow\leftrightarrow\mapsto

Sets

\in\notin\subset\supset\cup\cap\emptyset\forall\exists

KaTeX Rendering

Fast & Beautiful

AnySlate uses KaTeX for math rendering, which offers several advantages over other rendering libraries:

  • Extremely fast rendering (no server roundtrip)
  • High-quality typesetting matching LaTeX output
  • Works offline once the page loads
  • Supports a wide range of LaTeX commands
  • Consistent rendering across all browsers

LaTeX Compatibility

KaTeX supports most LaTeX math commands. For a full list of supported functions, visit the KaTeX documentation.

Examples

1

Fractions

Create fractions with numerator and denominator

Basic syntax:

\frac{a}{b}

Block example:

$$\frac{a + b}{c - d} = \frac{x}{y}$$
2

Integrals

Definite and indefinite integrals

Basic syntax:

\int_{a}^{b} f(x) dx

Block example:

$$\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$$
3

Summations

Sum notation with limits

Basic syntax:

\sum_{i=1}^{n} x_i

Block example:

$$\sum_{n=0}^{\infty} \frac{x^n}{n!} = e^x$$
4

Matrices

Create matrices and arrays

Basic syntax:

\begin{pmatrix} ... \end{pmatrix}

Block example:

$$\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}$$
5

Square Roots

Square roots and nth roots

Basic syntax:

\sqrt{x} or \sqrt[n]{x}

Block example:

$$\sqrt[3]{x^3 + y^3 + z^3}$$
6

Limits

Limit notation

Basic syntax:

\lim_{x \to a}

Block example:

$$\lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^n = e$$

Tips

Use block math for complex equations

Long or multi-line equations are easier to read when displayed as blocks.

Preview as you type

Use split view to see your equations render in real-time.

Escape special characters

Use backslash to escape special characters like \$ when needed.

Use aligned environments

For step-by-step derivations, use \begin{aligned} for proper alignment.

Add syntax highlighting?

Learn how to add beautiful syntax highlighting for code blocks in 190+ programming languages.

Syntax Highlighting