LaTeX guide
How to write the most common parts of formulas and lab reports. Every page has copy-ready code, a preview and a list of common mistakes. Ready formulas from physics and math are in the formula library.
Fraction in LaTeX
How to write a fraction in LaTeX: \frac in text and equations, \dfrac for full height, nested and slashed fractions. Copy-ready code.Square root in LaTeX
Square root: \sqrt{x}. Cube root: \sqrt[3]{x}. Root of degree n: \sqrt[n]{x}. Long expressions, fractions under the root, root as a power. Copy-ready.Superscript and subscript in LaTeX
Subscript x_i and superscript x^2 in LaTeX: braces for x^{10} and x_{max}, powers of 10, word subscripts, and superscripts in normal text. Copy-ready.Integral in LaTeX
Definite integral: \int_a^b f(x)\,dx. Indefinite with + C, double \iint, triple \iiint, contour \oint, limits above and below with \limits. Copy-ready.Sum and product in LaTeX
Sum and product symbols in LaTeX. \sum with an index and limits, \prod, inline versus display style.Limit in LaTeX
Limit: \lim_{x \to a} f(x). At infinity: \lim_{n \to \infty}. One-sided: x \to 0^{+}. Condition under lim, inline limits, \limsup and \liminf.Derivative in LaTeX
Writing derivatives in LaTeX: f'(x), d/dx, the partial derivative \partial, second-order derivatives. Code and preview.Matrix in LaTeX
How to write a matrix in LaTeX: the pmatrix, bmatrix and vmatrix environments, matrices with dots and determinants. Copy-ready code.System of equations in LaTeX
System with a brace: \begin{cases} ... \end{cases} from amsmath. Equals signs lined up with aligned, matrix form, piecewise functions and a numbered system.Aligned equations in LaTeX
Align equations at the equals sign with & and \\: align (numbered), align* (no numbers), aligned inside $$. Multi-line derivations, long equations, references.Equation numbering in LaTeX
A numbered equation in LaTeX with the equation environment, your own \label and \eqref references in the text of a report.Vector in LaTeX
How to write a vector in LaTeX: the \vec arrow, bold \mathbf, unit vectors, dot and cross products.Greek letters in LaTeX
Lowercase: \alpha, \beta, \gamma ... \omega. Uppercase: \Gamma, \Delta, \Omega. Variants \varepsilon, \varphi, bold \boldsymbol{\sigma}. Full list to copy.Math symbols in LaTeX
The most common LaTeX symbols: \le, \ge, \neq, \approx, \pm, \infty, arrows and number sets. A list with preview.Arrows in LaTeX
Arrows in LaTeX: \to, \rightarrow, \Rightarrow, \mapsto, \leftrightarrow and arrows with a label above. Copy-ready code.Brackets in LaTeX
Brackets that grow: \left( ... \right). Curly braces \{ \}, a big curly brace for cases, \underbrace, angle brackets, |x| and sizes \big, \Big. Copy-ready.Text in equations in LaTeX
When to use \text and when \mathrm in a LaTeX equation: words, descriptive subscripts, upright constants, your own function names, spacing. Copy-ready.SI units in LaTeX
SI units with siunitx: \SI{9.81}{\metre} for a number with a unit, \num for numbers, uncertainties, percent and \sisetup for a decimal comma. Copy-ready.Mean and standard deviation in LaTeX
Mean: \bar{x} = \frac{1}{n}\sum x_i. Sample standard deviation with n - 1, uncertainty of the mean s/\sqrt{n}, a result with ± and units. Lab-report ready.Trigonometric functions in LaTeX
Write \sin x, \cos x, \tan x, not sin x. Powers: \sin^2 x. Inverse: \arcsin x. Degrees: 30^\circ. Hyperbolic: \sinh x. Copy-ready LaTeX.Logarithms and exponentials in LaTeX
Natural log: \ln x. Base 10: \log x or \log_{10} x. Any base: \log_b x. Exponential: e^{x} or \exp(x). Copy-ready LaTeX with a live preview.Chemical formulas in LaTeX
Chemical formulas and reaction equations in LaTeX with the mhchem package: \ce, subscripts, ion charges and reaction arrows.Table in LaTeX
How to make a table in LaTeX: the tabular environment, column alignment, captions and clean rules with booktabs. Ready code for a measurement table.Figure in LaTeX
How to add an image or a chart to a LaTeX document: the graphicx package, the figure environment, width, caption and label.Cross-references in LaTeX
Referencing figures, tables, equations and sections in LaTeX: \label, \ref, \eqref, \pageref and how to avoid "??" in the PDF.Bibliography in LaTeX
How to add a bibliography to a report in LaTeX: the thebibliography environment, \cite, the order of entries and BibTeX as an alternative.Accented characters in LaTeX
How to type accented letters (é, ü, ñ, ø) in LaTeX: inputenc, fontenc, babel, language-specific dates and hyphenation.Title page in LaTeX
A lab report title page in LaTeX: the titlepage environment, university, course, author and date. A ready template to copy.