Equations are written in LaTeX and displayed with KaTeX. You do not need to know LaTeX well: the mathematics editor has buttons for the most common symbols and shows a live preview.
Inserting an equation
- Place the cursor where the equation should go.
- Click Insert Equation in the toolbar.
- Choose Inline (inside a sentence) or Block (centred on its own line, numbered as an equation).
- Write the formula. Use the palette tabs Algebra & Calculus, Greek & Symbols and Matrices & Sets for symbols you do not know by heart.
- Check the preview and click Insert.
To change an equation later, double-click it in the editor.
Inline or block?
LaTeX in five minutes
| You type | You get |
|---|---|
\sigma = \frac{F}{A} | \(\sigma = \frac{F}{A}\) |
\varepsilon_x, x^2 | \(\varepsilon_x\), \(x^2\) |
\sqrt{\sigma_x^2 + 3\tau^2} | \(\sqrt{\sigma_x^2 + 3\tau^2}\) |
\int_0^L M(x)\,dx | \(\int_0^L M(x)\,dx\) |
\sum_{i=1}^n F_i = 0 | \(\sum_{i=1}^n F_i = 0\) |
\vec{F}, \mathbf{r} | \(\vec{F}\), \(\mathbf{r}\) |
\Delta L, \theta, \omega | \(\Delta L\), \(\theta\), \(\omega\) |
Curly braces group things: x^{10} raises x to the power 10, while x^10 raises only the 1.
Spacing and units
LaTeX ignores ordinary spaces in formulas. Use the spacing buttons or \, (thin), \; (medium) and \quad (wide). Write units upright with \text{}:
$$\sigma = 250\,\text{MPa}, \qquad E = 200\,\text{GPa}$$
Examples from mechanics
Stress transformation:
$$\sigma_{x'} = \frac{\sigma_x + \sigma_y}{2} + \frac{\sigma_x - \sigma_y}{2}\cos 2\theta + \tau_{xy}\sin 2\theta$$
Elongation of a bar:
$$\delta = \int_0^L \frac{N(x)}{E\,A(x)}\,dx$$
A stiffness matrix:
$$\mathbf{K} = \frac{EA}{L}\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}$$
A formula that shows red text has a LaTeX error - usually a missing closing brace } or a misspelt command.
The full list of symbols and environments is in the LaTeX reference.
