Text#
Plain text#
{x∈s∣x is extra large} \{x\in s\mid x\text{ is extra large}\}
Greek letters#
α,β,…ω \alpha, \beta, …, \omega
Γ,Δ,…,Ω \Gamma, \Delta, …, \Omega
Fonts#
Use \mathbb
or \Bbb
for "blackboard bold"
CHNQRZ \mathbb{CHNQRZ}
Escape characters#
\ \backslash
_ \_
Group#
Groups#
A “group” is either a single symbol, or any formula surrounded by curly braces {
…}
.
1010 10^10
1010 10^{10}
xi2 x_i^2
xi2 x_{i^2}
Parentheses#
Ordinary symbols ()[]
make parentheses and brackets (2+3)[4+4]. Use \{
and \}
for curly braces{}.
⟨⟩ \langle\rangle
(y3x) (\frac{\sqrt x}{y^3})
(y3x) \left(\frac{\sqrt x}{y^3}\right)
(((((x))))) \Biggl(\biggl(\Bigl(\bigl((x)\bigr)\Bigr)\biggr)\Biggr)
Braces#
(n−2)+(n−1)+n+(n+1)+(n+2) \overbrace{(n - 2) + \overbrace{(n - 1) + n + (n + 1)} + (n + 2)}
(n−2)+(n−1)+n+(n+1)+(n+2) (n \underbrace{- 2) + (n \underbrace{- 1) + n + (n +} 1) + (n +} 2)
b timesa⋅a⋯a \underbrace{a\cdot a\cdots a}_{b\text{ times}}
Special symbols#
<>≤≤≦⩽≥≥≧⩾= \lt \gt \le \leq \leqq \leqslant \ge \geq \geqq \geqslant \neq
x⋅y×÷±∓ x\cdot y \times \div \pm \mp
∪∩∖⊂⊆⊊⊃∈∈/∅∅ \cup \cap \setminus \subset \subseteq \subsetneq \supset \in \notin \emptyset \varnothing
(2kn+1)(2kn+1) {n+1 \choose 2k} \binom{n+1}{2k}
→→←⇒⇐↦ \to \rightarrow \leftarrow \Rightarrow \Leftarrow \mapsto
∧∨¬∀∃⊤⊥⊢⊨ \land \lor \lnot \forall \exists \top \bot \vdash \vDash
abcabc \xleftarrow{abc} \xrightarrow{abc}
⋆∗⊕∘∙ \star \ast \oplus \circ \bullet
≈∼≃≅≡≺⊲∴ \approx \sim \simeq \cong \equiv \prec \lhd \therefore
a≡b(modn) a\equiv b\pmod n
a1,a2,…,an a_1, a_2, \ldots ,a_n
a1+a2+⋯+an a_1+a_2+\cdots+a_n
⌈x⌉ \lceil{x}\rceil
⌊x⌋ \lfloor{x}\rfloor
x \underline{x}
⟹ \implies
⟺ \iff
⟸ \impliedby
→ \to
← \gets
Superscripts and Subscripts#
xi2 x_i^2
log2x \log_2 x
Sums and integrals#
∑1n \sum_1^n
∑i=0∞i2 \sum_{i=0}^\infty i^2
∏ \prod
∫ \int
⋃ \bigcup
⋂ \bigcap
∬ \iint
Fractions#
ba \frac ab
b+1a+1 \frac{a+1}{b+1}
b+1a+1 {a+1\over b+1}
ba \cfrac{a}{b}
Radical signs#
x3 \sqrt{x^3}
3yx \sqrt[3]{\frac xy}
Accents and diacritical marks#
x^ \hat x
xy \widehat{xy}
xˉ \bar x
xyz \overline{xyz}
x \vec x
xy \overrightarrow{xy}
dxdxx˙=x˙2+xx¨ \frac d{dx}x\dot x = \dot x^2 + x\ddot x
ABC@ ⟼x2 T∙∘∘∙ \overset{@}{ABC}\ \overset{x^2}{\longmapsto}\ \overset{\bullet\circ\circ\bullet}{T}
Matrix#
111xyzx2y2z2 \begin{matrix}
1 & x & x^2 \\
1 & y & y^2 \\
1 & z & z^2 \\
\end{matrix}
(1324) \begin{pmatrix}
1 & 2 \\
3 & 4 \\
\end{pmatrix}
[1324] \begin{bmatrix}
1 & 2 \\
3 & 4 \\
\end{bmatrix}
{1324} \begin{Bmatrix}
1 & 2 \\
3 & 4 \\
\end{Bmatrix}
∣∣∣∣∣1324∣∣∣∣∣ \begin{vmatrix}
1 & 2 \\
3 & 4 \\
\end{vmatrix}
∥∥∥∥∥1324∥∥∥∥∥ \begin{Vmatrix}
1 & 2 \\
3 & 4 \\
\end{Vmatrix}
⎝⎜⎜⎜⎜⎛11⋮1a1a2⋮ama12a22⋮am2⋯⋯⋱⋯a1na2n⋮amn⎠⎟⎟⎟⎟⎞ \begin{pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \\
1 & a_2 & a_2^2 & \cdots & a_2^n \\
\vdots & \vdots& \vdots & \ddots & \vdots \\
1 & a_m & a_m^2 & \cdots & a_m^n
\end{pmatrix}
[142536] \left[
\begin{array}{cc|c}
1&2&3\\
4&5&6
\end{array}
\right]
Array#
n123Left0.24−1−20Center11892000Right125−81+10i \begin{array}{c|lcr}
n & \text{Left} & \text{Center} & \text{Right} \\
\hline
1 & 0.24 & 1 & 125 \\
2 & -1 & 189 & -8 \\
3 & -20 & 2000 & 1+10i
\end{array}
% outer vertical array of arrays
\begin{array}{c}
% inner horizontal array of arrays
\begin{array}{cc}
% inner array of minimum values
\begin{array}{c|cccc}
\text{min} & 0 & 1 & 2 & 3\\
\hline
0 & 0 & 0 & 0 & 0\\
1 & 0 & 1 & 1 & 1\\
2 & 0 & 1 & 2 & 2\\
3 & 0 & 1 & 2 & 3
\end{array}
&
% inner array of maximum values
\begin{array}{c|cccc}
\text{max}&0&1&2&3\\
\hline
0 & 0 & 1 & 2 & 3\\
1 & 1 & 1 & 2 & 3\\
2 & 2 & 2 & 2 & 3\\
3 & 3 & 3 & 3 & 3
\end{array}
\end{array}
\\
% inner array of delta values
\begin{array}{c|cccc}
\Delta&0&1&2&3\\
\hline
0 & 0 & 1 & 2 & 3\\
1 & 1 & 0 & 1 & 2\\
2 & 2 & 1 & 0 & 1\\
3 & 3 & 2 & 1 & 0
\end{array}
\end{array}
Equation#
Aligned equations#
align
is not supported in 'KaTeX`.
37=122732−1=122732⋅732732−1=122732732732−1=12731−7321≈1273(1−2⋅7321) \begin{aligned}
\sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
& = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\
& = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
& = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\
& \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
\end{aligned}
Piecewise functions#
f(n)={n/2,3n+1,if n is evenif n is odd f(n) =
\begin{cases}
n/2, & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}
if n is even:if n is odd:n/23n+1}=f(n) \left.
\begin{array}{l}
\text{if $n$ is even:}&n/2\\
\text{if $n$ is odd:}&3n+1
\end{array}
\right\}
=f(n)
System of equations#
⎩⎪⎪⎨⎪⎪⎧a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3 \begin{cases}
a_1x+b_1y+c_1z=d_1 \\
a_2x+b_2y+c_2z=d_2 \\
a_3x+b_3y+c_3z=d_3
\end{cases}
⎩⎪⎨⎪⎧a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3 \left\{
\begin{array}{c}
a_1x+b_1y+c_1z=d_1 \\
a_2x+b_2y+c_2z=d_2 \\
a_3x+b_3y+c_3z=d_3
\end{array}
\right.
⎩⎪⎪⎨⎪⎪⎧a1x+b1y+c1za2x+b2ya3x+b3y+c3z=d1+e1=d2=d3 \left\{
\begin{aligned}
a_1x+b_1y+c_1z &=d_1+e_1 \\
a_2x+b_2y&=d_2 \\
a_3x+b_3y+c_3z &=d_3
\end{aligned}
\right.
⎩⎪⎨⎪⎧a1x+b1y+c1za2x+b2ya3x+b3y+c3z=d1+e1=d2=d3 \left\{
\begin{array}{ll}
a_1x+b_1y+c_1z &=d_1+e_1 \\
a_2x+b_2y &=d_2 \\
a_3x+b_3y+c_3z &=d_3
\end{array}
\right.
⎩⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎧a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3 \begin{cases}
a_1x+b_1y+c_1z=d_1 \\[2ex]
a_2x+b_2y+c_2z=d_2 \\[2ex]
a_3x+b_3y+c_3z=d_3
\end{cases}
⎩⎪⎪⎨⎪⎪⎧a1x+b1y+c1z=q1p1a2x+b2y+c2z=q2p2a3x+b3y+c3z=q3p3 \begin{cases}
a_1x+b_1y+c_1z=\frac{p_1}{q_1} \\
a_2x+b_2y+c_2z=\frac{p_2}{q_2} \\
a_3x+b_3y+c_3z=\frac{p_3}{q_3}
\end{cases}
Continued fractions#
x=a0+a1+a2+a3+a4+⋯44322212 x = a_0 + \cfrac{1^2}{a_1
+ \cfrac{2^2}{a_2
+ \cfrac{3^2}{a_3 + \cfrac{4^4}{a_4 + \cdots}}}}
Highlighting equation#
bbox
is not supported in KaTex
\bbox[yellow]ex=n→∞lim(1+nx)n(1) \bbox[yellow]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (1)
}
\bbox[yellow,5px]ex=n→∞lim(1+nx)n(1) \bbox[yellow,5px]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (1)
}
\bbox[5px,border:2pxsolidred]ex=n→∞lim(1+nx)n(2) \bbox[5px,border:2px solid red]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (2)
}
\bbox[yellow,5px,border:2pxsolidred]ex=n→∞lim(1+nx)n(1) \bbox[yellow,5px,border:2px solid red]
{
e^x=\lim_{n\to\infty} \left( 1+\frac{x}{n} \right)^n
\qquad (1)
}
Fussy spacing issues#
Badei2πe2iπ∫−2π2πsinxdxBettereiπ/2∫−π/2π/2sinxdx \begin{array}{cc}
\mathrm{Bad} & \mathrm{Better} \\
\hline \\
e^{i\frac{\pi}2} \quad e^{\frac{i\pi}2}& e^{i\pi/2} \\
\int_{-\frac\pi2}^\frac\pi2 \sin x\,dx & \int_{-\pi/2}^{\pi/2}\sin x\,dx \\
\end{array}
Bad{x∣x2∈Z}Better{x∣x2∈Z} \begin{array}{cc}
\mathrm{Bad} & \mathrm{Better} \\
\hline \\
\{x|x^2\in\Bbb Z\} & \{x\mid x^2\in\Bbb Z\} \\
\end{array}
Bad∫∫Sf(x)dydx∫∫∫Vf(x)dzdydxBetter∬Sf(x)dydx∭Vf(x)dzdydx \begin{array}{cc}
\mathrm{Bad} & \mathrm{Better} \\
\hline \\
\int\int_S f(x)\,dy\,dx & \iint_S f(x)\,dy\,dx \\
\int\int\int_V f(x)\,dz\,dy\,dx & \iiint_V f(x)\,dz\,dy\,dx
\end{array}
Colors#
\color{black}{text}\color{gray}{text}\color{silver}{text}\color{white}{text}\color{maroon}{text}\color{red}{text}\color{yellow}{text}\color{lime}{text}\color{olive}{text}\color{green}{text}\color{teal}{text}\color{aqua}{text}\color{blue}{text}\color{navy}{text}\color{purple}{text}\color{fuchsia}{text}texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext \begin{array}{|rc|}
\hline
\verb+\color{black}{text}+ & \color{black}{text} \\
\verb+\color{gray}{text}+ & \color{gray}{text} \\
\verb+\color{silver}{text}+ & \color{silver}{text} \\
\verb+\color{white}{text}+ & \color{white}{text} \\
\hline
\verb+\color{maroon}{text}+ & \color{maroon}{text} \\
\verb+\color{red}{text}+ & \color{red}{text} \\
\verb+\color{yellow}{text}+ & \color{yellow}{text} \\
\verb+\color{lime}{text}+ & \color{lime}{text} \\
\verb+\color{olive}{text}+ & \color{olive}{text} \\
\verb+\color{green}{text}+ & \color{green}{text} \\
\verb+\color{teal}{text}+ & \color{teal}{text} \\
\verb+\color{aqua}{text}+ & \color{aqua}{text} \\
\verb+\color{blue}{text}+ & \color{blue}{text} \\
\verb+\color{navy}{text}+ & \color{navy}{text} \\
\verb+\color{purple}{text}+ & \color{purple}{text} \\
\verb+\color{fuchsia}{text}+ & \color{magenta}{text} \\
\hline
\end{array}
Commutative diagrams#
CD
is not supported in KaTex
\require{AMScd} \begin{CD} A @>a>> B\\ @V b V V= @VV c V\\ C @>>d> D \end{CD}
\require{AMScd}
\begin{CD}
A @>a>> B\\
@V b V V= @VV c V\\
C @>>d> D
\end{CD}
\begin{CD} A @>>> B @>{\text{very long label}}>> C \\ @. @AAA @| \\ D @= E @<<< F \end{CD}
\begin{CD}
A @>>> B @>{\text{very long label}}>> C \\
@. @AAA @| \\
D @= E @<<< F
\end{CD}
Pack of cards#
♠♡♢♣ \spadesuit\quad\heartsuit\quad\diamondsuit\quad\clubsuit
♡♢ \color{red}{\heartsuit}\quad\color{red}{\diamondsuit}