A LATEX crash-course.
Special characters. The following symbols have special meaning in LATEX: # $ % _ { } ~ ^ \
You can print the first seven of these by using \# \$ \% \_ \{ \} .
Paragraphs, Lines and Text. A blank line starts a new paragraph, \\ starts a new line, \ includes a
space, \mbox{...} includes text.
Mathematics You start (and end) ’math mode’ by a $ sign.
For
√
instance the example $\frac{\sqrt{2}}{3}$ is finished. produces the output: the example
2
3 is finished.
Alternatively you can enclose a displayed mathematics expression by \[....\].
the example \[\frac{\sqrt{2}}{3}\] is finished. produces the output: the example
√
2
3
is finished. Replacing \[....\] by \begin{equation}....\end{equation} produces a numbered
equation.
Sub- and Superscripts. x^2 produces x2 , x_{2n} produces x2n . Here is another example: \log_{5} 25=2
gives log5 25 = 2.
2
Fractions. Use \frac to display fractions. Example: \frac{\pi^2}{6} gives π6 .
√
Roots. Use \sqrt. For instance,
√ \sqrt{a^2+b^2} produces a2 + b2 . You can also get “other” roots:
\sqrt[3]{2} yields 3 2.
Delimiters. The inputs ( ) [ ] \{ \} yield the outputs ( ) [ ] { } .
Greek letters.
α \alpha β \beta γ \gamma δ \delta
\epsilon ζ \zeta η \eta θ \theta
ι \iota κ \kappa λ \lambda µ \mu
ν \nu ξ \xi π \pi ρ \rho
σ \sigma τ \tau υ \upsilon φ \phi
χ \chi ψ \psi ω \omega ε \varepsilon
ϑ \vartheta $ \varpi % \varrho ς \varsigma
ϕ \varphi Γ \Gamma ∆ \Delta Θ \Theta
Λ \Lambda Ξ \Xi Π \Pi Σ \Sigma
Υ \Upsilon Φ \Phi Ψ \Psi Ω \Omega
Functions.
log \log lg \lg ln \ln exp \exp
sin \sin cos \cos tan \tan cot \cot
sec \sec csc \csc arcsin \arcsin arccos \arccos
arctan \arctan deg \deg arg \arg inf \inf
sup \sup min \min max \max lim \lim
lim inf \liminf lim sup \limsup det \det dim \dim
ker \ker gcd \gcd mod \bmod
Miscellaneous Symbols.
ℵ \aleph 0 \prime ∀ \forall
h̄ \hbar ∅ \emptyset ∃ \exists
ı \imath ∇
√ \nabla ¬ \neg
\jmath \surd [ \flat
` \ell > \top \ \natural
℘ \wp ⊥ \bot ] \sharp
< \Re k \| ♣ \clubsuit
= \Im 6 \angle ♦ \diamondsuit
∂ \partial 4 \triangle ♥ \heartsuit
∞ \infty \ \backslash ♠ \spadesuit
“Large” Operators.
X \ K
\sum \bigcap \bigodot
Y [ O
\prod \bigcup \bigotimes
a G M
\coprod \bigsqcup \bigoplus
Z _ ]
\int \bigvee \biguplus
I ^
\oint \bigwedge
Binary Operations.
± \pm ∩ \cap ∨ \vee
∓ \mp ∪ \cup ∧ \wedge
\ \setminus ] \uplus ⊕ \oplus
· \cdot u \sqcap \ominus
× \times t \sqcup ⊗ \otimes
∗ \ast / \triangleleft \oslash
? \star . \triangleright \odot
\diamond o \wr † \dagger
◦ \circ \bigcirc ‡ \ddagger
• \bullet 4 \bigtriangleup q \amalg
÷ \div 5 \bigtriangledown
2
Relations.
≤ \leq ≥ \geq ≡ \equiv
≺ \prec \succ ∼ \sim
\preceq \succeq ' \simeq
\ll \gg \asymp
⊂ \subset ⊃ \supset ≈ \approx
⊆ \subseteq ⊇ \supseteq ∼
= \cong
v \sqsubseteq w \sqsupseteq ./ \bowtie
∈ \in 3 \ni ∝ \propto
` \vdash a \dashv |= \models
.
^ \smile | \mid = \doteq
_ \frown k \parallel ⊥ \perp
Arrows.
← \leftarrow → \rightarrow
←− \longleftarrow −→ \longrightarrow
⇐ \Leftarrow ⇒ \Rightarrow
⇐= \Longleftarrow =⇒ \Longrightarrow
↔ \leftrightarrow ⇔ \Leftrightarrow
←→ \longleftrightarrow ⇐⇒ \Longleftrightarrow
←- \hookleftarrow ,→ \hookrightarrow
( \leftharpoonup * \rightharpoonup
) \leftharpoondown + \rightharpoondown
↑ \uparrow ↓ \downarrow
⇑ \Uparrow ⇓ \Downarrow
l \updownarrow m \Updownarrow
% \nearrow - \nwarrow
& \searrow . \swarrow
7→ \mapsto 7−→ \longmapsto
*
) \rightleftharpoons
Lists, etc. Lists are easy. A numbered list starts with \begin{enumerate} and ends with \end{enumerate}.
Items start with \item. There are also bullet item lists—use ”itemize” instead of ”enumerate”. Ex-
ample: \begin{enumerate}\item one \item zwei \item $\sqrt{9}$\end{enumerate} produces
1. one
2. zwei
√
3. 9
Lists can be nested.
1 0
Matrices, arrays, etc. \begin{array}{cc}1&0\\0&1\end{array} produces . You can produce
0 1
big delimiters by prefacing with \left and closing with \right. Example:
1 0
\left(\begin{array}{cc}1&0\\0&1\end{array}\right) produces .
0 1
3
\right. matches a \left... and is necessary to “close” the \left tag, but does not produce any
output. Example:
f(x)=\left\{\begin{array}{cc}0,&\mbox{ if }
x\leq 0\\1, & \mbox{ if } x>0\end{array}\right.
0, if x ≤ 0
produces f (x) =
1, if x > 0
{cc} after the \begin{array} command means that the array has two centered columns. Other
alignment options are r and l. Use | to insert a vertical line. \hline inserts a horizontal line.
Example:
\begin{array}{l|cr|}4&1&2\\-4&-1&-2\\\hline\end{array}
4 1 2
yields
−4 −1 −2
Aligned Equations. In a similar vein, you can produce aligned equations. Here is an example:
\begin{eqnarray}y&=&(x-2)^2\\&=&x^2-4x+4\end{eqnarray}
yields
y = (x − 2)2 (1)
= x2 − 4x + 4 (2)
There must be exactly two alignment characters & in each line. Note that the equations are automat-
ically numbered. Using \begin{eqnarray*}....\end{eqnarray*} produces unnumbered equations
instead.
Over- and underlining. \underline{\overline{x^2}+1} yields x2 + 1,
z}|{
\underbrace{\overbrace{x^2}+1} produces x2 +1. There are also \hat, \tilde and \widehat
| {z }
√d
and \widetilde. Example: x̃, x2 − 1. Other accents: \check, \bar, \vec, \dot, \ddot: ǎ, ā, ~a, ẋ, ẍ.
Font size. Use \displaystyle to make formulas bigger;
1 1
compare \frac{1}{2} to \displaystyle{\frac{1}{2}}: 2 versus .
2
Standard Template. \documentclass[12pt]{article}\begin{document}....Text goes here....\end{document}
c October 13, 2003. Helmut Knaust