---
title: LaTeX
description: Support for mathematical functions
---

Octarine supports LaTeX for mathematical notation and scientific formulas, rendering them beautifully inline with your text. Perfect for academic writing, technical documentation, and mathematical notes.

> By default latex rendering is turned OFF since it's perf intensive. To turn on, head over to `Settings -> Editor` and toggle `Render Math Equations` on.

### Inline Math

To include math within a line of text, just wrap your formula in single dollar signs. For example, `$E = mc^2$` renders as Einstein's famous equation inline. More complex expressions work too—something like `$\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$` will render beautifully right alongside your writing.

### Block Math

For standalone equations that deserve their own line, use a math block. There are several ways to insert one:

- **Slash command**: Type `/` and search for "Math Block"
- **Keyboard shortcut**: `Cmd+Shift+M` (Mac) or `Ctrl+Shift+M` (Windows/Linux)
- **Paste**: Paste text wrapped in double dollar signs (`$$...$$`) and it will automatically convert to a math block

Once inserted, type your LaTeX directly into the block. The equation renders in display mode, centered on its own line—great for larger expressions like:

```
$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$
```

**Editing a math block:**
- **Double-click** the rendered equation to edit it
- Press **Enter** when the block is selected to enter edit mode
- Press **Shift+Enter** or **Escape** to finish editing
- Empty math blocks are automatically removed when you exit edit mode

### Quick Reference

Here are some of the most commonly used LaTeX symbols and how to write them:

**Basic notation:**
- Superscript: `x^2` → x²
- Subscript: `x_1` → x₁
- Fractions: `\frac{a}{b}` → a/b
- Square root: `\sqrt{x}` → √x
- Sum: `\sum_{i=1}^n` → Σ
- Integral: `\int_a^b` → ∫

**Greek letters:**
- `\alpha, \beta, \gamma` → α, β, γ
- `\Delta, \Omega` → Δ, Ω
- `\pi, \theta, \phi` → π, θ, φ

**Mathematical operations:**
- `\times` → ×
- `\div` → ÷
- `\pm` → ±
- `\leq, \geq` → ≤, ≥
- `\neq` → ≠
- `\approx` → ≈
