Constructions
Constructions
It is assumed you are using amsmath and amssymb packages, which you likely are already if you are trying
to type math. See also https://web.evanchen.cc/latex-style-guide.html.
Notes
1. This also applies to cos, tan, gcd, min, max, deg, log, ln, exp, inf, sup, . . . . (For
custom operators, say lcm(a, b), write $\operatorname{lcm}(a,b)$. Or put
\DeclareMathOperator{\lcm}{lcm} in the preamble to define \lcm.)
2. Generally, you should almost always use \dots, even outside math mode. The
two dots commands, \ldots (. . .) and \cdots (· · · ) put the dots in different
places. Generally, you want the former for lists and text, the latter between
operators. The smarter \dots will auto-detect which case you are in.
3. The spacing right before the variable b is affected.
4. Also in set notation, e.g. {x | f (x) > 0} is $\left\{ x \mid f(x) > 0 \right\}$.
5. $a \mod n$ gives “a mod n”, $a \bmod n$ gives “a mod n”.
6. \left and \right are also used for resizing (), [], \{\} to match heights of tall
inputs. Compare \[ f\left( \frac12 \right) \] and \[ f( \frac12 ) \]:
1 1
f vs. f ( ).
2 2
7. $$...$$ is a TEX primitive, not officially supported by LATEX. It “usually” works,
but there are occasional mysterious breakages (whereas \[ ... \] always works).
For example, the \qedhere command will break:
Example proof with double dollar signs. Follows by
1 + 1 = 2.
Example proof with correct syntax. Follows by
1 + 1 = 2.