Você está na página 1de 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 6 = 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 , not this X P 1 I want this n=1 n . curly braces \{x\} {x} subscript a_b ab n n=1 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)    degree \deg(f) deg(f ) you compile the document. Omit [width=.5in] if you want 1 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| piecewise |x|= derivative \f f0 div \operatorname{div} div function \begin{cases} ( \frac{\partial f} f mod \mod mod x x0 partial derivative x & x\ge 0\\ |x| = {\partial x} Zx 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 \land inverse cosine \arccos arccos \nu \Sigma or \lor 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. 515
contains \supseteq 1 & 2 & 3 \\

1 2 3
em-dash Yes---or no? Yesor no?
union \cup
intersection \cap
matrix 4 & 5 & 6\\ 4 5 6 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
\left|
\
big intersection \bigcap_{n=1}^{10}A_n An The Not So Short Introduction to LATEX 2
n=1
\begin{array}{ccc} Software that generates LATEX code: Mathematica, Maple,
empty set \emptyset 1 & 2 & 3 \\ 1 2 3

4
GeoGebra
power set \mathcal{P} P determinant 4 & 5 & 6 \\ 5 6
LATEX for the Mac: MacTEX
minimum \min min 7 & 8 & 0 7 8 0
LATEX for the PC: TEXnicCenter and MiKTEX
maximum \max max \end{array} LATEX online: ShareLaTeX, WriteLaTeX
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