Introduction to LaTeX - Vassar...

30
Introduction to L A T E X John McCleary Vassar College 17 September 2013

Transcript of Introduction to LaTeX - Vassar...

Page 1: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Introduction to LATEX

John McCleary

Vassar College

17 September 2013

Page 2: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

When the first volume of Donald Knuth’s The Art of ComputerProgramming was published in 1969, it was typeset using hot metaltype set by a Monotype Corporation typecaster with a hot metaltypesetting machine from the 19th century which produced a “goodclassic style” appreciated by Knuth. When the second edition of thesecond volume was published, in 1976, the whole book had to betypeset again because the Monotype technology had been largelyreplaced by photographic techniques, and the original fonts were nolonger available. When Knuth received the galley proofs of the newbook on 30 March 1977, he found them awful. Around that time,Knuth saw for the first time the output of a high-quality digitaltypesetting system, and became interested in digital typography. Thedisappointing galley proofs gave him the final motivation to solve theproblem at hand once and for all by designing his own typesettingsystem. On 13 May 1977, he wrote a memo to himself describing thebasic features of TeX.

from Wikipedia, 17.IX.2013

Page 3: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

30 1 Vectors and Functions

the value of f at any point on the 2-interval I(0,0),(1, 12 ) = [0, 1]! [0, 12 ]. Indeed,

the image of this 2-interval is [0, 12 ] " [1, 3

2 ], which is not an interval in R. !

As indicated by the example in Remark 1.24, a simple modification of theresult in Proposition 1.23 yields a characterization of the IVP.

Proposition 1.25. Let D # R2 and let f : D $ R be a function. Then forany 2-interval I ! J # D,

f has the IVP on I ! J %& f(E) is an interval in Rfor every 2-interval E # I ! J .

Proof. The implication “=&” follows from Proposition 1.23. To prove theconverse, let (x1, y1), (x2, y2) ' I ! J and let r be a real number that liesbetween f(x1, y1) and f(x2, y2). Let E denote the 2-interval I(x1,y1),(x2,y2).Since f(E) is an interval in R, it follows that r = f(x0, y0) for some (x0, y0) 'E. Since E # I ! J , it follows that f has the IVP on I ! J . ()

1.3 Cylindrical and Spherical Coordinates

For points in R2, one has the familiar notion of polar coordinates. Theseprovide an alternative and useful way to represent points in the plane otherthan the origin. Recall that the polar coordinates of (x, y) ' R2 \ (0, 0) aregiven by (r, !), where r and ! are real numbers determined by the equationsx = r cos ! and y = r sin ! and the conditions r > 0 and ! ' (*", "]. Theprecise relationship is stated below. For a proof of this, one may refer toProposition 7.20 of ACICARA.

Fact 1.26. If x, y ' R are such that (x, y) += (0, 0), then r and ! defined by

r :=!

x2 + y2 and ! :=

"##$##%

cos!1&x

r

'if y , 0,

* cos!1&x

r

'if y < 0,

satisfy the following properties:

r, ! ' R, r > 0, ! ' (*", "], x = r cos !, and y = r sin !.

Conversely, if r, ! ' R are such that r > 0 and ! ' (*", "], then x := r cos !

and y := r sin ! are real numbers such that (x, y) += (0, 0), r =!

x2 + y2, and! equals cos!1(x/r) or * cos!1(x/r) according as y , 0 or y < 0.

In the 3-space R3, there are at least two important and useful representa-tions of points, and these are known as cylindrical coordinates and sphericalcoordinates. Of these, the former is a straightforward extension of the notionof polar coordinates, and we describe it first.

Page 4: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

TEX is a programming language.

A TEXfile is a program, that is, it is a series of commands that iscompiled by the TEX engine which delivers output.

LATEX requires a preface declaring certain styles and initiatingpackages of commands that have been designed by others.

Page 5: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

TEX is a programming language.

A TEXfile is a program, that is, it is a series of commands that iscompiled by the TEX engine which delivers output.

LATEX requires a preface declaring certain styles and initiatingpackages of commands that have been designed by others.

Page 6: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

TEX is a programming language.

A TEXfile is a program, that is, it is a series of commands that iscompiled by the TEX engine which delivers output.

LATEX requires a preface declaring certain styles and initiatingpackages of commands that have been designed by others.

Page 7: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

A typical setup

\documentclassarticle\usepackageamsmath\usepackageamssym\usepackageamsfontsYou can put many useful things here.

\begindocumentYour text here.

\enddocument

Page 8: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

A scrap of TEX code

A \it binomial is an algebraic expression of the form $a + b$,on which we can carry out some operation. Most often the expressionsare monomials and a binomial is a kind of polynomial.

If we raise the monomial $a + b$ to a power, we obtain new terms:Of course, $(a + b)ˆ1 = a + b$, and most of us know that$$(a+b)ˆ2 = aˆ2 + 2ab + bˆ2.$$If one is willing, we can extend this further:\beginalign* (a+b)ˆ3 &= aˆ3 + 3aˆ2 b + 3a bˆ2 + bˆ3 \\(a+b)ˆ4 &= aˆ4 + 4aˆ3 b + 6 aˆ2 bˆ2 + 4 a bˆ3 + bˆ4,\endalign*and so on. The coefficients appearing in these expressionsare called \it binomial coefficientsand they are defined in general by the notation:$$(a + b)ˆn = aˆn + \binomn1 aˆn-1 b+ \binomn2 aˆn-2 bˆ2+ \cdots + \binomnk aˆn-k bˆk+ \cdots + \binomnn-1 a bˆn-1 + bˆn.$$Thus, $\displaystyle\binom42 = 6$.

Page 9: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Output from that codeA binomial is an algebraic expression of the form a + b, on which we can carry out someoperation. Most often the expressions are monomials and a binomial is a kind of polynomial.If we raise the monomial a + b to a power, we obtain new terms: Of course, (a + b)1 = a + b,and most of us know that

(a + b)2 = a2 + 2ab + b2.

If one is willing, we can extend this further:

(a + b)3 = a3 + 3a2b + 3ab2 + b3

(a + b)4 = a4 + 4a3b + 6a2b2 + 4ab3 + b4,

and so on. The coefficients appearing in these expressions are called binomial coefficients andthey are defined in general by the notation:

(a + b)n = an +(n

1

)an−1b +

(n2

)an−2b2 + · · ·+

(nk

)an−kbk + · · ·+

( nn− 1

)abn−1 + bn.

Thus,(4

2

)= 6.

Page 10: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Fonts

\textititalic gives italic.

\textbfbold gives bold.

\textslslanted gives slanted.

\textscsmall caps gives SMALL CAPS.

\texttttypewriter gives typewriter.

Page 11: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Choices

align versus align*

(a + b)3 = a3 + 3a2b + 3ab2 + b3 (1)

(a + b)4 = a4 + 4a3b + 6a2b2 + 4ab3 + b4, (2)

text style versus \displaystyle

(n5

)versus

(n5

)

Page 12: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

A matrix

$$\beginpmatrix 7 & 8 & -1 & 0\\4 & -2 & 0 & 9 \\-1 & 0 & 6 & 12 \\0 & 3 & -7 & 1 \endpmatrix$$

7 8 −1 04 −2 0 9−1 0 6 120 3 −7 1

Page 13: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Cases

$$\int 1ˆx tˆp\,dt =\begincases\displaystyle \fracxˆp+1p+1- \frac1p+1 &\mboxif p\neq -1,\\\ln (x) &\mboxif p = -1.\endcases$$

∫ x

1tp dt =

xp+1

p + 1− 1

p + 1if p 6= −1,

ln(x) if p = −1.

Page 14: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

A commutative diagram

↓ ↓ ↓

0 - C′n+1α- Cn+1

β- C′′n+1- 0

0 - C′n

∂′

?α- Cn

?β- C′′n

∂′′

?- 0

0 - C′n−1

∂′

?α- Cn−1

?β- C′′n−1

∂′′

?- 0

↓ ↓ ↓

Page 15: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

α \alpha θ \theta o o τ \tauβ \beta ϑ \vartheta π \pi υ \upsilonγ \gamma γ \gamma $ \varpi φ \phiδ \delta κ \kappa ρ \rho ϕ \varphiε \epsilon λ \lambda % \varrho χ \chiε \varepsilon µ \mu σ \sigma ψ \psiζ \zeta ν \nu ς \varsigma ω \omegaη \eta ξ \xi

Γ \Gamma Λ \Lambda Σ \Sigma Ψ \Psi∆ \Delta Ξ \Xi Υ \Upsilon Ω \OmegaΘ \Theta Π \Pi Φ \Phi

Greek Letters

Page 16: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

± \pm ∩ \cap \diamond ⊕ \oplus∓ \mp ∪ \cup 4 \bigtriangleup \ominus× \times ] \uplus 5 \bigtriangledown ⊗ \otimes÷ \div u \sqcap / \triangleleft \oslash∗ \ast t \sqcup . \triangleright \odot? \star ∨ \vee C \lhdb © \bigcirc \circ ∧ \wedge B \rhdb † \dagger• \bullet \ \setminus E \unlhdb ‡ \ddagger· \cdot o \wr D \unrhdb q \amalg+ + − -

b Not predefined in a format based on basefont.tex. Use one of the style optionsoldlfont, newlfont, amsfonts or amssymb.

Binary Operation Symbols

Page 17: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

≤ \leq ≥ \geq ≡ \equiv |= \models≺ \prec \succ ∼ \sim ⊥ \perp \preceq \succeq ' \simeq | \mid \ll \gg \asymp ‖ \parallel⊂ \subset ⊃ \supset ≈ \approx ./ \bowtie⊆ \subseteq ⊇ \supseteq ∼= \cong on \Joinb

@ \sqsubsetb A \sqsupsetb 6= \neq ^ \smilev \sqsubseteq w \sqsupseteq

.= \doteq _ \frown

∈ \in 3 \ni ∝ \propto = =` \vdash a \dashv < < > >

b Not predefined in a format based on basefont.tex. Use one of the style optionsoldlfont, newlfont, amsfonts or amssymb.

Relation Symbols

Page 18: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

← \leftarrow ←− \longleftarrow ↑ \uparrow⇐ \Leftarrow ⇐= \Longleftarrow ⇑ \Uparrow→ \rightarrow −→ \longrightarrow ↓ \downarrow⇒ \Rightarrow =⇒ \Longrightarrow ⇓ \Downarrow↔ \leftrightarrow ←→ \longleftrightarrow l \updownarrow⇔ \Leftrightarrow ⇐⇒ \Longleftrightarrow m \Updownarrow7→ \mapsto 7−→ \longmapsto \nearrow← \hookleftarrow → \hookrightarrow \searrow \leftharpoonup \rightharpoonup \swarrow \leftharpoondown \rightharpoondown \nwarrow

\rightleftharpoons \leadstob

b Not predefined in a format based on basefont.tex. Use one of the style optionsoldlfont, newlfont, amsfonts or amssymb.

Arrow Symbols

Page 19: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

. . . \ldots · · · \cdots... \vdots

. . . \ddotsℵ \aleph ′ \prime ∀ \forall ∞ \infty~ \hbar ∅ \emptyset ∃ \exists \Boxb

ı \imath ∇ \nabla ¬ \neg ♦ \Diamondb

\jmath√

\surd [ \flat 4 \triangle` \ell > \top \ \natural ♣ \clubsuit℘ \wp ⊥ \bot ] \sharp ♦ \diamondsuit< \Re ‖ \| \ \backslash ♥ \heartsuit= \Im ∠ \angle ∂ \partial ♠ \spadesuitf \mhob | |

b Not predefined in a format based on basefont.tex. Use one of the style optionsoldlfont, newlfont, amsfonts or amssymb.

Miscellaneous Symbols

Page 20: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

∑\sum

⋂\bigcap

⊙\bigodot∏

\prod⋃

\bigcup⊗

\bigotimes∐\coprod

⊔\bigsqcup

⊕\bigoplus∫

\int∨

\bigvee⊎

\biguplus∮\oint

∧\bigwedge

Variable-sized Symbols

\arccos \cos \csc \exp \ker \limsup \min \sinh\arcsin \cosh \deg \gcd \lg \ln \Pr \sup\arctan \cot \det \hom \lim \log \sec \tan\arg \coth \dim \inf \liminf \max \sin \tanh

Log-like Symbols

Page 21: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.

2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 22: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.

3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 23: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.

4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 24: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.

5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 25: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.

6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 26: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)

7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 27: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.

8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.

Page 28: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.

9. TEX runs anywhere.10. TEX is the standard.

Page 29: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.

10. TEX is the standard.

Page 30: Introduction to LaTeX - Vassar Collegepages.vassar.edu/mian/files/2013/09/IntroToLaTeX.beamer.pdf · A binomial is an algebraic expression of the form a + b, on which we can carry

Top ten reasons to learn TEX

1. TEX has the best output.2. TEX knows typsetting.3. TEX is fast.4. TEX is stable.5. TEX is stable, but not rigid.6. TEX input is plain text. (Therefore, small!)7. TEX output can be anything.8. TEX is free.9. TEX runs anywhere.10. TEX is the standard.