Equations¶
Opus provides full LaTeX math support for mathematical and scientific notation.
Basic Syntax¶
Inline Equations¶
Wrap math in single dollar signs for inline equations:
Renders as: The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
Display Equations¶
Use double dollar signs for centered, display-style equations:
Numbered Equations¶
Add a label to reference equations:
Common Notation¶
Greek Letters¶
| Lowercase | Code | Uppercase | Code |
|---|---|---|---|
| α | \alpha |
Α | A |
| β | \beta |
Β | B |
| γ | \gamma |
Γ | \Gamma |
| δ | \delta |
Δ | \Delta |
| ε | \epsilon |
Ε | E |
| θ | \theta |
Θ | \Theta |
| λ | \lambda |
Λ | \Lambda |
| μ | \mu |
Μ | M |
| π | \pi |
Π | \Pi |
| σ | \sigma |
Σ | \Sigma |
| φ | \phi |
Φ | \Phi |
| ω | \omega |
Ω | \Omega |
Operators¶
\sum_{i=1}^{n} x_i % Summation
\prod_{i=1}^{n} x_i % Product
\int_{a}^{b} f(x) dx % Integral
\lim_{x \to \infty} f(x) % Limit
\frac{a}{b} % Fraction
\sqrt{x} % Square root
\sqrt[n]{x} % nth root
Subscripts and Superscripts¶
Brackets¶
(x) % Parentheses
[x] % Square brackets
\{x\} % Curly braces
|x| % Absolute value
\|x\| % Norm
\langle x \rangle % Angle brackets
For auto-sizing brackets:
Advanced Features¶
Matrices¶
Matrix types:
- pmatrix - parentheses
- bmatrix - square brackets
- Bmatrix - curly braces
- vmatrix - vertical bars (determinant)
Aligned Equations¶
Cases¶
Arrays¶
Common Examples¶
Statistics¶
$$
\bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i
$$
$$
\sigma^2 = \frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n-1}
$$
Calculus¶
$$
\frac{d}{dx} \left[ f(g(x)) \right] = f'(g(x)) \cdot g'(x)
$$
$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$
Linear Algebra¶
$$
\mathbf{A}\mathbf{x} = \mathbf{b}
$$
$$
\det(\mathbf{A}) = \sum_{\sigma \in S_n} \text{sgn}(\sigma) \prod_{i=1}^{n} a_{i,\sigma(i)}
$$
Physics¶
$$
i\hbar \frac{\partial}{\partial t} \Psi = \hat{H} \Psi
$$
$$
\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}
$$
Formatting Tips¶
Text in Equations¶
Use \text{} for words within equations:
$$
P(\text{rain} | \text{clouds}) = \frac{P(\text{clouds} | \text{rain}) P(\text{rain})}{P(\text{clouds})}
$$
Spacing¶
LaTeX handles spacing automatically, but you can adjust:
\,- thin space\:- medium space\;- thick space\quad- em space\qquad- 2em space
Bold and Italic¶
\mathbf{x} % Bold (for vectors)
\mathit{x} % Italic
\mathrm{x} % Roman (upright)
\mathcal{X} % Calligraphic
\mathbb{R} % Blackboard bold (for sets)
Inserting Equations¶
Three ways to insert equations:
- Type directly - Just type
$...$or$$...$$ - Slash command - Type
/equationfor a display equation - Keyboard shortcut -
Cmd/Ctrl + Shift + E