You are on page 1of 2

A quick guide to LATEX

What is LATEX? Text decorations Lists


LATEX(usually pronounced “LAY teck,” sometimes “LAH Your text can be italics (\textit{italics}), boldface You can produce ordered and unordered lists.
teck,” and never “LAY tex”) is a mathematics typesetting (\textbf{boldface}), or underlined description command output
program that is the standard for most professional (\underline{underlined}). \begin{itemize}
mathematics writing. It is based on the typesetting program Your math can contain boldface, R (\mathbf{R}), or \item
TEX created by Donald Knuth of Stanford University (his first blackboard bold, R (\Bbb{R}). You may want to used these to Thing 1 • Thing 1
unordered list
version appeared in 1978). Leslie Lamport was responsible for express the sets of real numbers (R or R), integers (Z or Z), \item • Thing 2
creating LATEX a more user friendly version of TEX. A team of rational numbers (Q or Q), and natural numbers (N or N). Thing 2
LATEX programmers created the current version, LATEX 2ε. \end{itemize}
To have text appear in a math expression use \text.
Math vs. text vs. functions (0,1]=\{x\in\mathbb{R}:x>0\text{ and }x\le 1\} yields
\begin{enumerate}
(0, 1] = {x ∈ R : x > 0 and x ≤ 1}. (Without the \text
In properly typeset mathematics variables appear in italics \item
command it treats “and” as three variables:
(e.g., f (x) = x2 + 2x − 3). The exception to this rule is Thing 1 1. Thing 1
(0, 1] = {x ∈ R : x > 0andx ≤ 1}.) ordered list
predefined functions (e.g., sin(x)). Thus it is important to \item 2. Thing 2
always treat text, variables, and functions correctly. See the Thing 2
difference between x and x, -1 and −1, and sin(x) and sin(x).
Spaces and new lines \end{enumerate}
There are two ways to present a mathematical expression— LATEX ignores extra spaces and new lines. For example,
inline or as an equation. This sentence will look Symbols (in math mode)
Inline mathematical expressions fine after it is compiled. The basics
This sentence will look fine after it is compiled. description command output
Inline expressions occur in the middle of a sentence. To addition + +
produce an inline expression, place the math expression Leave one full empty line between two paragraphs. Place \\ at
the end of a line to create a new line (but not create a new subtraction - −
between dollar signs ($). For example, typing plus or minus \pm ±
$90^{\circ}$ is the same as $\frac{\pi}{2}$ radians paragraph).
multiplication (times) \times ×
yields 90◦ is the same as π2 radians. This
multiplication (dot) \cdot ·
compiles division symbol \div ÷
Equations
division (slash) / /
Equations are mathematical expressions that are given their like\\ circle plus \oplus ⊕
own line and are centered on the page. These are usually used
this. circle times \otimes ⊗
for important equations that deserve to be showcased on their
This compiles equal = =
own line or for large equations that cannot fit inline. To
like not equal \ne 6 =
produce an inline expression, place the mathematical
this. less than < <
expression between the symbols \[ and \]. Typing
Use \noindent to prevent a paragraph from indenting. greater than > >
\[x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\] yields
less than or equal to \le ≤

−b ± b2 − 4ac greater than or equal to \ge ≥
x= . Comments approximately equal to \approx ≈
2a
Use % to create a comment. Nothing on the line after the % will infinity \infty ∞
Displaystyle be typeset. $f(x)=\sin(x)$ %this is the sine function dots 1,2,3,\ldots 1, 2, 3, . . .
To get full-sized inline mathematical expressions use yields f (x) = sin(x) dots 1+2+3+\cdots 1 + 2 + 3 + ···
a
\displaystyle. Use this sparingly. Typing fraction \frac{a}{b}
√b
I want this $\displaystyle \sum_{n=1}^{\infty} Delimiters square root \sqrt{x} √ x
n
\frac{1}{n}$, not this $\sum_{n=1}^{\infty}\frac{1}{n}$. description command output nth root \sqrt[n]{x} x
∞ exponentiation ab
1 parentheses (x) (x) a^b
, not this ∞
X P 1
yields I want this n=1 n . brackets [x] [x] subscript a_b ab
n=1
n
curly braces \{x\} {x} absolute value |x| |x|
Images To make your delimiters large enough to fit the content, use natural log \ln(x) ln(x)
You can put images (pdf, png, jpg, or gif) in your document. them together with \right and \left. For example, logarithms \log_{a}b loga b
They need to be in the same location as your .tex file when \left\{\sin\left(\frac{1}{n}\right)\right\}_{n}^{\infty} exponential function e^x=\exp(x) ex = exp(x)
  ∞
you compile the document. Omit [width=.5in] if you want 1 degree \deg(f) deg(f )
produces sin .
the image to be full-sized. n n
\begin{figure}[ht] Curly braces are non-printing characters that are used to
\includegraphics[width=.5in]{imagename.jpg} gather text that has more than one character. Observe the
\caption{The (optional) caption goes here.} differences between the four expressions x^2, x^{2}, x^2t,
\end{figure} x^{2t} when typeset: x2 , x2 , x2 t, x2t .
Functions Calculus Number theory
description command output description command output description command output
maps to \to → df divides | |
composition \circ ◦ derivative \frac{df}{dx}
dx does not divide \not | 6|
|x|= derivative \f’ f0 div \operatorname{div} div
\begin{cases}
( \frac{\partial f} ∂f mod \mod mod
x x≥0 partial derivative
piecewise function x & x\ge 0\\ |x| = {\partial x} Z∂x greatest common divisor \gcd gcd
-x & x<0 −x x<0
integral \int ceiling \lceil x \rceil dxe
\end{cases} ZZ floor \lfloor x \rfloor bxc
Greek and Hebrew letters double integral \iint Geometry and trigonometry
command output command output ZZZ
triple integral \iiint description command output
\alpha α \tau τ
angle \angle ABC ∠ABC
\beta β \theta θ limits \lim_{x\to \infty} lim
x→∞ degree 90^{\circ} 90◦
\chi χ \upsilon υ ∞
X triangle \triangle ABC 4ABC
\delta δ \xi ξ summation \sum_{n=1}^{\infty}a_n an segment \overline{AB} AB
\epsilon  \zeta ζ n=1
∞ sine \sin sin
\varepsilon ε \Delta ∆ Y
product \prod_{n=1}^{\infty}a_n an cosine \cos cos
\eta η \Gamma Γ
n=1 tangent \tan tan
\gamma γ \Lambda Λ
cotangent \cot cot
\iota ι \Omega Ω Logic secant \sec sec
\kappa κ \Phi Φ
description command output cosecant \csc csc
\lambda λ \Pi Π
not \sim ∼ inverse sine \arcsin arcsin
\mu µ \Psi Ψ
and \wedge ∧ inverse cosine \arccos arccos
\nu ν \Sigma Σ
or \vee ∨ inverse tangent \arctan arctan
\omega ω \Theta Θ
if...then \to →
\phi φ \Upsilon Υ
if and only if \leftrightarrow ↔
Symbols (in text mode)
\varphi ϕ \Xi Ξ
logical equivalence \equiv ≡ The followign symbols do not have to be surrounded by dollar
\pi π \aleph ℵ
therefore \therefore ∴ signs.
\psi ψ \beth i description command output
\rho ρ \daleth k there exists \exists ∃
for all \forall ∀ dollar sign \$ $
\sigma σ \gimel ‫ג‬ percent \% %
implies \Rightarrow ⇒
Set theory equivalent \Leftrightarrow ⇔ ampersand \& &
description command output pound \# #
set brackets \{1,2,3\} {1, 2, 3} Linear algebra backslash \textbackslash \
element of \in ∈ description command output left quote marks ‘‘ “
not an element of \not\in 6∈ vector \vec{v} ~v right quote marks ’’ ”
subset of \subset ⊂ vector \mathbf{v} v single left quote ‘ ‘
subset of \subseteq ⊆ norm ||\vec{v}|| ||~v || single right quote ’ ’
not a subset of \not\subset 6⊂ \left[ hyphen X-ray X-ray
contains \supset ⊃ \begin{array}{ccc} en-dash pp. 5--15 pp. 5–15
contains \supseteq ⊇ 1 & 2 & 3 \\

1 2 3
 em-dash Yes---or no? Yes—or no?
union \cup ∪
intersection \cap ∩
matrix 4 & 5 & 6\\  4 5 6  Resources
7 & 8 & 0 7 8 0 Great symbol look-up site: Detexify
10
[ \end{array} LATEX Mathematical Symbols
big union \bigcup_{n=1}^{10}A_n An \right]
n=1 The Comprehensive LATEX Symbol List
10 The Not So Short Introduction to LATEX 2ε
\left|
\
big intersection \bigcap_{n=1}^{10}A_n An TUG: The TEX Users Group
n=1
\begin{array}{ccc} CTAN: The Comprehensive TEX Archive Network
empty set \emptyset ∅ 1 & 2 & 3 \\ 1 2 3

power set \mathcal{P} P determinant 4 & 5 & 6 \\ 4 5 6

7
LATEX for the Mac: MacTEX
minimum \min min 7 & 8 & 0 8 0
LATEX for the PC: TEXnicCenter and MiKTEX
maximum \max max \end{array}
supremum \sup sup \right|
infimum \inf inf determinant \det(A) det(A) Dave Richeson
limit superior \limsup lim sup trace \operatorname{tr}(A) tr(A) Dickinson College
limit inferior \liminf lim inf dimension \dim(V) dim(V ) http://divisbyzero.com/
closure \overline{A} A

You might also like