For inline formulas, enclose the formula in
$
…$
. For displayed formulas, use$$
…$$
.- These render differently. For example, type the following to show inline mode:
$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$ - or type the following for display mode:
$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
- These render differently. For example, type the following to show inline mode:
For Greek letters, use
\alpha
,\beta
, …,\omega
: $\alpha$, $\beta$, …, $\omega$.- For uppercase letters, use
\Gamma
,\Delta
, …,\Omega
: $\Gamma$, $\Delta$, …, $\Omega$. - For otherOther Greek capital letters, use are the same as the Latin ones:
$AA,
,B
,E$,E,Z
and so on: $A, B, E$$A, B, E, Z$…. - Some Greek letters have variant forms:
\epsilon \varepsilon
$\epsilon$, $\varepsilon$,\phi \varphi
$\phi$, $\varphi$, and others.
- For uppercase letters, use
For superscripts and subscripts, use
^
and_
. For example,x_i^2
: $x_i^2$,\log_2 x
: $\log_2 x$. For the prime symbol, use an apostrophex' x'' x'''
: $x'\ x''\ x'''$.Groups. Superscripts, subscripts, and other operations apply only to the next “group”. A “group” is either a single symbol, or any formula surrounded by curly braces
{
…}
.- If you do
10^10
, you will get a surprise: $10^10$. But10^{10}
gives what you probably wanted: $10^{10}$. - Use curly braces to delimit a formula to which a superscript or subscript applies:
x^y^z
is an error;{x^y}^z
is ${x^y}^z$, andx^{y^z}
is $x^{y^z}$. Observe the differences betweenx_i^2
$x_i^2$,x_{i^2}
$x_{i^2}$ and{x_i}^2
${x_i}^2$.
- If you do
Parentheses Ordinary symbols
()[]
make parentheses and brackets $(2+3)[4+4]$. Use\{
and\}
for curly braces $\{\}$.These do not scale with the formula in between, so if you write
(\frac{\sqrt x}{y^3})
the parentheses will be too small: $(\frac{\sqrt x}{y^3})$. Using\left(
…\right)
will make the sizes adjust automatically to the formula they enclose:\left(\frac{\sqrt x}{y^3}\right)
is $\left(\frac{\sqrt x}{y^3}\right)$.\left
and\right
apply to all the following sorts of parentheses:(
and)
$(x)$,[
and]
$[x]$,\{
and\}
$\{ x \}$,|
$|x|$,\vert
$\vert x \vert$,\Vert
$\Vert x \Vert$,\langle
and\rangle
$\langle x \rangle$,\lceil
and\rceil
$\lceil x \rceil$, and\lfloor
and\rfloor
$\lfloor x \rfloor$.\middle
can be used to add additional dividers. There are also invisible parentheses, denoted by.
: use\left.x^2\right\rvert_3^5 = 5^2-3^2
to get $$\left.x^2\right\rvert_3^5 = 5^2-3^2$$
Sums and integrals
\sum
and\int
; the subscript is the lower limit and the superscript is the upper limit, so for example\sum_1^n
$\sum_1^n$. Don't forget{
…}
if the limits are more than a single symbol. For example,\sum_{i=0}^\infty i^2
is $\sum_{i=0}^\infty i^2$.- Similarly,
\prod
$\prod$,\int
$\int$,\bigcup
$\bigcup$,\bigcap
$\bigcap$,\iint
$\iint$,\iiint
$\iiint$,\idotsint
$\idotsint$.
- Similarly,
Fractions There are three ways to make fractions.
\frac ab
applies to the next two groups, and produces $\frac ab$; for more complicated numerators and denominators use{
…}
:\frac{a+1}{b+1}
is $\frac{a+1}{b+1}$.- If the numerator and denominator are complicated, you may prefer
\over
, which splits up the group that it is in:{a+1\over b+1}
is ${a+1\over b+1}$. - For continued fractions, use
\cfrac
instead of\frac
.
- If the numerator and denominator are complicated, you may prefer
Fonts
Gabriel Staples
- 125
- 1
- 5
completed list of escapable characters; fixed instruction on how to escape dollar sign (see bug: https://math.meta.stackexchange.com/q/32856/)
Calvin Khor
- 35.7k
- 1
- 25
- 46