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 (\mathbb{R}). You may want to used these Thing 1 • Thing 1
unordered list
version appeared in 1978). Leslie Lamport was responsible for to 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ε. To have text appear in a math expression use \text. \end{itemize}
(0,1]=\{x\in\mathbb{R}:x>0\text{ and }x\le 1\} yields
Math vs. text vs. functions (0, 1] = {x ∈ R : x > 0 and x ≤ 1}. (Without the \text \begin{enumerate}
In properly typeset mathematics variables appear in italics command it treats “and” as three variables: \item
(e.g., f (x) = x2 + 2x − 3). The exception to this rule is (0, 1] = {x ∈ R : x > 0andx ≤ 1}.) Thing 1 1. Thing 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 Spaces and new lines Thing 2
difference between x and x, -1 and −1, and sin(x) and sin(x). \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)
fine after it is compiled. The basics
Inline mathematical expressions This sentence will look fine after it is compiled. description command output
Inline expressions occur in the middle of a sentence. To Leave one full empty line between two paragraphs. Place \\ at addition + +
produce an inline expression, place the math expression the end of a line to create a new line (but not create a new subtraction - −
between dollar signs ($). For example, typing paragraph). plus or minus \pm ±
$90^{\circ}$ is the same as $\frac{\pi}{2}$ radians multiplication (times) \times ×
This
yields 90◦ is the same as π2 radians. multiplication (dot) \cdot ·
compiles
Equations division symbol \div ÷
Equations are mathematical expressions that are given their like\\ division (slash) / /
own line and are centered on the page. These are usually used circle plus \oplus ⊕
this.
for important equations that deserve to be showcased on their circle times \otimes ⊗
This compiles
own line or for large equations that cannot fit inline. To equal = =
like not equal \ne ∕ =
produce an inline expression, place the mathematical this.
expression between the symbols \[ and \]. Typing less than < <
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 ≤
x=
−b ± b2 − 4ac
.
Comments greater than or equal to \ge ≥
2a Use % to create a comment. Nothing on the line after the % will approximately equal to \approx ≈
Displaystyle be typeset. $f(x)=\sin(x)$ %this is the sine function infinity \infty ∞
To get full-sized inline mathematical expressions use yields f (x) = sin(x) dots 1,2,3,\ldots 1, 2, 3, . . .
\displaystyle. Use this sparingly. Typing dots 1+2+3+\cdots 1 + 2 + 3 + ···
I want this $\displaystyle \sum_{n=1}^{\infty} Delimiters fraction \frac{a}{b} a
√b
\frac{1}{n}$, not this $\sum_{n=1}^{\infty} description command output square root \sqrt{x} √ x
n
\frac{1}{n}$. yields parentheses (x) (x) nth root \sqrt[n]{x} x
!∞
1 " brackets [x] [x] exponentiation a^b ab
I want this , not this ∞ 1
n=1 n . curly braces \{x\} {x} subscript a_b ab
n=1
n
To make your delimiters large enough to fit the content, use absolute value |x| |x|
Images them together with \right and \left. For example, natural log \ln(x) ln(x)
You can put images (pdf, png, jpg, or gif) in your document. \left\{\sin\left(\frac{1}{n}\right)\right\}_{n}^ logarithms \log_{a}b loga b
They need to be in the same location as your .tex file when {\infty} produces 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 )
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} does not divide \ndv ∕|
piecewise |x|= dx
' derivative \f’ f′ div \dv div
function \begin{cases} \frac{\partial f} ∂f mod \mod mod
x x≥0 partial derivative
x & x\ge 0\\ |x| = {\partial x} greatest common divisor \gcd gcd
-x & x<0 −x x<0 *∂x
ceiling \lceil x \rceil ⌈x⌉
\end{cases} integral \int
** floor \lfloor x \rfloor ⌊x⌋
Greek and Hebrew letters double integral \iint Geometry and trigonometry
command output command output ***
description command output
\alpha α \tau τ triple integral \iiint angle \angle ABC ∠ABC
\beta β \theta θ
limits \lim_{x\to \infty} lim degree 90^{\circ} 90◦
\chi χ \upsilon υ x→∞
!∞ triangle \triangle ABC △ABC
\delta δ \xi ξ
summation \sum_{n=1}^{\infty}a_n an segment \overline{AB} AB
\epsilon * \zeta ζ
n=1 sine \sin sin
\varepsilon ε \Delta ∆ +∞
cosine \cos cos
\eta η \Gamma Γ product \prod_{n=1}^{\infty}a_n an tangent \tan tan
\gamma γ \Lambda Λ n=1
cotangent \cot cot
\iota ι \Omega Ω
secant \sec sec
\kappa κ \Phi Φ Logic cosecant \csc csc
\lambda λ \Pi Π
description command output inverse sine \arcsin arcsin
\mu µ \Psi Ψ
not \neg ∼ inverse cosine \arccos arccos
\nu ν \Sigma Σ
and \land ∧ inverse tangent \arctan arctan
\omega ω \Theta Θ
\phi φ \Upsilon Υ or \lor ∨ Symbols (in text mode)
\varphi ϕ \Xi Ξ if...then \implies →
The followign symbols do not have to be surrounded by dollar
\pi π \aleph ℵ if and only if \iff ↔
signs.
\psi ψ \beth ℶ logical equivalence \equiv ≡
description command output
\rho ρ \daleth ℸ therefore \therefore ∴
dollar sign \$ $
\sigma σ \gimel ‫ג‬ there exists \exists ∃
percent \% %
for all \forall ∀
Set theory 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 ∕ ∈ 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 ∕ ⊂ \left[ hyphen X-ray X-ray
contains \supset ⊃ \begin{array}{ccc} en-dash pp. 5--15 pp. 5–15
, . em-dash Yes---or no? Yes—or no?
contains \supseteq ⊇ 1 & 2 & 3 \\ 1 2 3
union \cup ∪ - 4 6 /
intersection \cap ∩
matrix 4 & 5 & 6\\ 5 Resources
7 & 8 & 0 7 8 0 TUG: The TEX Users Group
(10
\end{array} CTAN: The Comprehensive TEX Archive Network
big union \bigcup_{n=1}^{10}A_n An \right]
n=1 Handwriting-to-LATEX sites: Detexify, WebEquation
)10 The Comprehensive LATEX Symbol List
big intersection \bigcap_{n=1}^{10}A_n An \left| The Not So Short Introduction to LATEX 2ε
n=1
\begin{array}{ccc} 0 0 Software that generates LATEX code: Mathematica, Maple,
empty set \emptyset ∅ 1 & 2 & 3 \\ 0 1 2 3 0
0 0 GeoGebra
power set \mathcal{P} P determinant 4 & 5 & 6 \\ 0 4 5 6 0
0 0 LATEX for the Mac: MacTEX
minimum \min min 7 & 8 & 0 0 7 8 0 0
LATEX for the PC: TEXnicCenter and MiKTEX
maximum \max max \end{array} LATEX online: Overleaf, Sage
supremum \sup sup \right| LATEX integration with Microsoft Office, Apple iWork, etc:
infimum \inf inf determinant \det(A) det(A) MathType, LATEXiT
limit superior \limsup lim sup trace \operatorname{tr}(A) tr(A)
limit inferior \liminf lim inf dimension \dim(V) dim(V ) Dave Richeson, Dickinson College, http://divisbyzero.com/
closure \overline{A} A

You might also like