Guide to TeX

Page 1

Basic LaTeX Julie Mitchell

1 1.1

Basic Formatting Beginning a document

\documentstyle{article} \usepackage{graphicx, amssymb} \begin{document} \textwidth 6.5 truein \oddsidemargin 0 truein \evensidemargin -0.50 truein \topmargin -.5 truein \textheight 8.5in

template for changing margin sizes insert after document opener

\title{...} \author{...} \thanks{...} \date{...} \maketitle

template for title and author

\begin{abstract} \end{abstract}

template for abstract

1


1.2

Format

\section{ \section*{ \subsection{ \subsection*{ \begin{center} \end{center} \centerline{ \hfill \begin{flushleft} \end{flushleft} \begin{flushright} \end{flushright} \begin{quotation} \end{quotation} \noindent \\ \newpage %

1.3 { } \/} ( ) [ ] \{ \} “ � h i

numbered section unnumbered section numbered subsection unnumbered subsection centers intermediate text centers a line fills line with horizontal space places text flush with left margin places text flush with right margin offsets intermediate text by wider margins new paragraph starts without indent newline starts new page following text on same line is invisible

Basic Braces and Parentheses open brace closing (end) brace end brace for italics open parenthesis end parenthesis open bracket end bracket left literal braces right literal braces begin quotation mark end quotation mark \langle \rangle

2


1.4

Lists and Tables

\begin{enumerate} \end{enumerate} \begin{itemize} \end{itemize} \begin{description} \end{description} \item \item[ \setcounter{enumi}{ \setcounter{. . . }{. . . } \begin{tabbing} \end{tabbing} \> \begin{tabular}{|c|c|} \end{tabular} \hline &

1.5

makes a numbered list; makes list with bullets; makes an unnumbered list; produces items for above lists for customized items, in enumerate lists sets counter for enumerate list fill in braces (don’t leave spaces) starts tabbing environment next tab stop tabular with vertical lines horizontal line separates columns in tabular environment

Labels, References and Bibliography

\footnote{ \index{ \label{ \ref{ (\ref{ }) \cite{ }

footnote use for index entries to label an equation, theorem, etc. to cross reference an equation, theorem, etc. put cursor between { } by hand reference a bibitem entry

The following are designed for the author-year style of bibliography that is used after \begin{thebibliography} and before \end{thebibliography}

\bibitem[artref] Author [year] Title. {\it Journal\/} {\bf 11}, 123–223.

for articles

\bibitem[bookref] Author [year] {\it Title.\/} Publisher.

for books

3


1.6 ´e `e ¨a ¨o u ¨

Foreign Accents

´ E ` E ¨ A ¨ O ¨ U

1.7

\’{e} \‘{e} \”{a} \”{o} \”{u}

Miscellaneous

@ c ¶ § ß

1.8

\’{E} \‘{E} \”{A} \”{O} \”{U}

@ \copyright \P \S \ss

at symbol copyright paragraph section german ss

Spaces

\vspace{0.2in} \hspace{0.2in} \quad \qquad \,

vertical space 0.2in horizontal space 0.2in single character space double space small space

\: \; \! \! \!

medium space; only in math mode thick space; only in math mode negative space; only in math mode negative double space; only in math mode

4


2

Basic Mathematical Formatting

2.1

Equation Commands

$

starts and terminates in-text formulas

\[ \]

displayed one line formula, not numbered

\begin{equation} \begin{equation}\label{ \end{equation}

displayed one line formula, numbered add label

\begin{eqnarray} \begin{eqnarray}\label{ \end{eqnarray}

displayed multiline formula, numbered; add label

\begin{eqnarray*} \end{eqnarray*}

displayed multiline formula, not numbered

\begin {array}{ccc} \end{array}

produces matrices (see also §5.3)

& &=& \nonumber \mbox{ } \quad \mbox{. . . }\quad \quad \mbox{and}\quad

use between columns for aligning equals in equation arrays suppresses numbering use before − and + signs in split equations for text within a formula makes box “and” within a formula

\begin{eqnarray} \lefteqn{ } \nonumber \\ && \end\{eqnarray}

numbered equation split over two lines, for equations with long lefthand sides use “lequs” for the unnumbered version

2.2

Basic Displayed Equations – Examples

\[

Z F (b) − F (a) =

f (x)dx a

beqex

\begin{equation}

5

b


Z

b

F (b) − F (a) =

f (x)dx

(1)

a

\[ containing text

n X

x2i + yi2 ≥ 0

for all real numbers xi and yi

i=1

\begin{eqnarray*}

2

= y+1 z +1 = u+v 2

\begin{eqnarray}

2 2

z +1

= y+1 = u+v

(2) (3)

\begin{eqnarray} \begin{array}{c} numbered as a group

a=b+c d=e+f +g

(4)

\begin{eqnarray*} split (with leading minus sign on second line)

a = b + c + (c + d) −e+f

2.3

Specialized Displayed Equations – Examples

\begin{equation} \begin{array}{l}

x=y a = b2 + b + 1

6

) (5)


\begin{equation} \begin{array}{c}

x=y a = b2 + b + 1

) (6)

\begin{equation} \fbox{

x2 + 1 =y 5

(7)

evaluation of expression

f

t

2 t=0

\begin{eqnarray}\lefteqn{ }

ax2 + 2bxy + cy 2 + dx + ey + f = ιu + βv + γw + δ

equation array with big brackets on different lines

ˆ c (âˆ†Ď‰) : = H

Z D

1 âˆ†Ď‰(−∇2 )−1 âˆ†Ď‰ + ÎŚ(ωe + âˆ†Ď‰) − ÎŚ(ωe ) 2 0 − ÎŚ (ωe )âˆ†Ď‰ dx dy

equation array with big braces on different lines

H0s (T M )

=

∈ H (T M )

there exists an H s -extension s ˜ ˜ ˜ X ∈ H (T M ) with X zero on M \M . s

7

(8)


2.4

Theorem Like Environments

\newtheorem{cor}{Corollary} \newtheorem{dfn}{Definition} \newtheorem{lem}{Lemma} \newtheorem{prop}{Proposition} \newtheorem{thm}{Theorem}

to to to to to

\begin{cor} \end{cor} \begin{dfn} \end{dfn} \begin{lem} \end{lem} \begin{prop} \end{prop} \begin{thm} \begin{thm}[Gauss’ Theorem] \end{thm}

to begin a Corollary to end a Corollary

Example Remarks

5 5 H H

new new new new new

series series series series series

of of of of of

Corollaries Definitions Lemmas Propositions Theorems

to begin a Theorem with title

\noindent{\large \bf Example\,} \noindent{\large \bf Remarks\,} \noindent{\bf Proof\,} \noindent{\bf Solution\,}

Proof Solution

2.5

make make make make make

End of Proofs, etc. \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad

\blacklozenge $\blacklozenge$ \blacksquare $\blacksquare$ \square $\square$ \bigtriangledown $\bigtriangledown$ \blacktriangledown $\blacktriangledown$

end proof dollar end proof empty square dollar empty square empty triangle down dollar empty triangle down black triangle down dollar black triangle down

8


3 3.1

Alphabets and Fonts Greek Letters

All greek letters are available as sub- and superscripts by preceding the codes below with “l� or “h�. For example, “lxa� is “ \alpha� and “hxa� is “ˆ\alpha�. They are also available enclosed by $, for example “dxa� produces “$\alpha $�.

\alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \vartheta \iota \kappa \lambda \mu \nu \pi \varpi \rho \varrho \sigma \varsigma \tau \upsilon \phi \varphi \chi \psi \omega

Îą β Îł δ Îľ Îś Ρ θ Ď‘ Κ Îş Îť Âľ ν Ď€ $ Ď % Ďƒ Ď‚ Ď„ Ď… φ Ď• χ Ďˆ ω

3.2

xcg xcd

Γ ∆

\Gamma \Delta

xcth

Θ

\Theta

xcl

Λ

\Lambda

xcp

Î

\Pi

xcs

ÎŁ

\Sigma

xcu xcph

ÎĽ ÎŚ

\Upsilon \Phi

xcps xco

Ψ â„Ś

\Psi \Omega

Italics, Bold, etc.

For the universal blank bricks, use “. . . u� (universal). To complete it, after typing the entry, use “eb� and “eit�. [Note about “bi�: If you do your papers in 12pt, modify the definition of \tenbi at the beginning.]

example example example example example

{\it {\rm {\bf {\sc {\sf

italic type, “eit� to finish roman type boldface type small caps type sans serif type 9


example example example ξ A g R

3.3

0 – 10 a–d e f g–x y z A–Z e1

3.4

ω ξ

3.5

A–Z

3.6

b g h k p t

{\sl {\tt {\em \mbox{\boldmath$. . . $} {\cal \mathfrac {\mathbb

slanted type typewriter type emphasized type only in math mode, only cap.letters only in math mode only in math mode

Boldface Letters {\bf {\bf {\bf {\bf {\bf {\bf {\bf {\bf {\bf {\bf

0} – {\bf 10} a} – {\bf d} e} f} g} – {\bf x} y} z} A} – {\bf Z} e} 1

(because of the word “be”) (because of the command “bf”) (because of the word “by”)

Boldmath Symbols \mbox{\boldmath$. . . $} \mbox{\boldmath$\omega$} \mbox{\boldmath$\xi$}

Calligraphic Letters {\cal {\cal A} –{\cal Z}

only in math mode, cap. letters

German (Fraktur) Letters \mathfrak. . . \mathfrak b \mathfrak g \mathfrak h \mathfrak k \mathfrak p \mathfrak t

only in math mode german b, german g, german h, german k, german p, german t, 10


A G H K T X

3.7

C I R R1 R2 R3 Rm Rn T Z

\mathfrak \mathfrak \mathfrak \mathfrak \mathfrak \mathfrak

A G H K T X

german german german german german german

A, G, H, K, T, X,

Open Letters {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb {\mathbb

C} I} R} R}ˆ1 R}ˆ2 R}ˆ3 R}ˆm R}ˆn T} Z}

only in math mode $

11


4

Basic Mathematical Operations and Symbols

4.1

lim ~a a a ¯ a ˇ a˙ a ¨ a ˆ a ˜ {|} {|}

4.2 a–z A–Z 1 – 10 a–z A–Z 0 – 10

4.3 √ √2 π √ 3 2 √ n 2

Universal Operations \frac{ }{} \sqrt{ {ˆ

for general fractions universal square root superscript universal subscript universal limit universal

{ \lim { \vec{ \overline{ \bar{ \check{ \dot{ \ddot{ \hat{ \tilde{ {\mid} in-line set \left\{ \left. \! \right| \right\} sized set for large displays {\displaystyle for larger math mode formulas

Single Symbols included in $ Signs $a$ – $z$ $A$ – $Z$ $1$ – $10$ ${\bf a}$ – ${\bf z}$ ${\bf A}$ – ${\bf Z}$ ${\bf 0}$ – ${\bf 10}$

(except: “doo” for $o$)

Roots \sqrt{2} \sqrt{\pi} \sqrt[3]{2} \sqrt[n]{2}

cube root over 2 n-root over 2

12


4.4

Specific Fractions

1 2

\frac{1}{2}

1 3

\frac{1}{3}

1 4

\frac{1}{4}

d dt

\frac{d}{dt}

du dt

\frac{du}{dt}

dx dt

\frac{dx}{dt}

dy dt

\frac{dy}{dt}

dz dt

\frac{dz}{dt}

∂ ∂x

\frac{\partial}{\partial x}

∂ ∂y

\frac{\partial}{\partial y}

∂z ∂x

\frac{\partial z}{\partial x}

∂2 ∂x∂y

\frac{\partialˆ2}{\partial x \partial y}

∂3 ∂x∂y∂z

\frac{\partialˆ3}{\partial x \partial y \partial z}

4.5

Superscripts

All letters, capital letters and numbers from 0 to 10 are available as superscripts, by preceding the desired letter or number with “h”. E.g. “ha” gives ˆa, “hca” gives “ˆA”, “h1” gives “ˆ1”. Exceptions, to avoid conflict with words and the universal macro, are “hee” for superscript e, “huu” for superscript u. ˆ{ a –z A –Z 0 – 10 2 3

x2 , y 2 , z 2

ˆa – ˆz ˆA – ˆZ ˆ0 – ˆ{10} ˆ2 ˆ3 xˆ2, yˆ2, zˆ2

high universal (except: “hee” for e , “huu” for u )

to avoid typing the number to avoid typing the number

13


−1 ij ijk jk † ⊥ 0 ∗ ?

4.6

ˆ{-1} ˆ {ij} ˆ {ijk} ˆ {jk} ˆ\dagger ˆ\perp ˆ\prime ˆ\ast ˆ\star

Subscripts

All letters, capital letters and numbers from 0 to 10 are available as subscripts, preceding with “l”. E.g. “la” gives “ a”, “lca” gives “ A”, “l1” gives “ 1”.

{ –z A – Z 0 – 10 a

ij ijk jk

yn zn ∗ ?

a– z A– Z 0 – {10} {ij} {ijk} {jk} yn zn \ast \star

low universal (except: “luu” for u )

14


4.7 p¯ α ¯ p˙ p¨ p pˆ ~a −→ PP −→ PQ

4.8 + − ± ∓ ÷ ◦ • ⊕ × ⊗ s ∧ = =0 ≥ ≤ 6 = ∼ = ≡ ≈

Overcharacters \bar{p} \bar{\alpha} \dot{p} \ddot{p} \overline{p} \hat{p} \vec{a} \stackrel{\textstyle\longrightarrow}{\rm PP} \stackrel{\textstyle\longrightarrow}{\rm PQ};

Binary Operations and Relations + − \pm \mp \div \circ \bullet \oplus \ominus \times \otimes \,\circledS\, \wedge

plus minus plus-minus minus-plus divide composite bullet direct sum direct difference times tensor product semi direct product wedge product

\geq \leq \neq \cong \equiv \ll \gg \approx

equals equals zero greater than or equal less than equal not equal isomorphic equivalent much less than much greater than approximately

15


4.9 ( ) [ ] { } h hh i ii

4.10 ℵ ~ 0 [ ] ♥ ∝ k £ t ` k ∇ ∂ ∞ ℘ < = ∠

Sized Parentheses \left( The “left” and “right” commands \right) effect the size of the braces. \left[ They always have to appear in pairs! \right] Invisible braces are made with \left. and \right. \left\{ \right\} \left\langle \left\langle \! \left\langle \right\rangle \right\rangle \! \right\rangle \left. \right.

Single Mathematical Symbols \aleph \hbar \prime \flat \sharp \heartsuit \propto \| \pounds \pitchfork \ell \| \nabla \partial \infty \wp \Re \Im \angle

aleph Planck’s constant prime, use “hpr” for superscript flat sign, “hfl” for superscript sharp sign, “hsh” for superscript sweetheart proportional to Lie derivative transversal script l norm nabla partial derivative infinity Weierstrass p-function real part alternate imaginary part alternate angle

16


4.11 ⇒ ⇐ ⇔ ∅ ∅ ∈ 6∈ \ ⊂ ⊆ ⊃ ⊇ ∩ T ∪ S | ∃ ∀

4.12 7→ → −→ ↔ ← ↑ % & · ··· .. . ... .. .

Set Theoretic Symbols \Rightarrow \Leftarrow \Leftrightarrow \varnothing \emptyset \in \not\in \setminus \subset \subseteq \supset \supseteq \cap \bigcap \cup \bigcup \mid \exists \forall

implies implied by equivalent to empty set empty set alternate element of not an element of set difference subset subset or equals superset superset or equals intersection big intersection union big union vertical bar, with spacing there exists for all

Arrows and Dots \mapsto \rightarrow \longrightarrow \leftrightarrow \leftarrow \uparrow \upharpoonright \nearrow \searrow \cdot \cdots

arrow with tail rightarrow longrightarrow leftrightarrow leftarrow uparrow upharpoonright slanted up right slanted down right centered dot centered dots

\ddots \ldots

diagonal dots lower dots

\vdots

vertical dots

17


4.13

Trig Functions

cos cosh cos2 cos θ cos φ sin sinh sin2 sin θ sin φ sech tan tanh

\cos \cosh \cosˆ2 \cos \theta \cos \phi \sin \sinh \sinˆ2 \sin \theta \sin \phi {\rm sech}\, \tan \tanh

4.14

Log-like Symbols

exp log ln sup inf max min lim lim inf lim sup det ker dim arg gcd

\exp \log \ln \sup \inf \max \min \lim \liminf \limsup \det \ker \dim \arg \gcd

hyperbolic cosine cosine squared cosine of theta cosine of phi hyperbolic sine sine squared sine of theta sine of phi hyperbolic sech hyperbolic tangent

exponential logarithm natural logarithm supremum infimum maximum minimum limit universal limit inferior limit superior determinant kernel dimension argument greatest common divisor

18


4.15

Combinations of Mathematical Symbols

−1 kuk |a| Aia LA µ vA ν g∗ g∗ so(3) so(3) SO(3) T ∗Q Tq∗ Q div Aut( Diff( Im( Im(z) Re( Re(z) (0) (0, 0) (0, 0, 0) (a1 , a2 , a3 ) (x, y) (x, y, z) x2 + y 2 dx dy dx dy dz dy/dt dx/dt dz/dt ∂z/∂y a+b a×b (a × b)

-1 \ | {\bf u} \ | |a| Aˆi {\;a} L A{}ˆ\mu vˆA{} \nu \mathfrak g ˆ{\ast} $\mathfrak g ˆ{\ast}$ \mathfrak{so}(3) so(3) SO(3) Tˆ\ast Q Tˆ{\ast} {q} Q {\rm div}\, {\rm Aut}( {\rm Diff}( {\rm Im}( {\rm Im}(z) {\rm Re}( {\rm Re}(z)

minus one absolute value; staggered, high and low staggered, variation 1 staggered, variation 2 german g star;

divergence automorphism universal diffeomorphism universal real part universal real part of z real part universal real part of z

dy/dt dx/dt dz/dt \partial z/\partial y {\bf a} + {\bf b} {\bf a} \times {\bf b} ({\bf a} \times {\bf b})

19


5

Integrals, Sums, Products and Matrices

5.1

Integrals

Z \int

integral universal; add limits with “hu” and “lu”

\int \!\!\! \int

double integral

ZZ

ZZZ \int \!\!\!\int \!\!\!\int triple integral I \oint Z

contour integral

1

\intˆ1 0 0

Z

b

\intˆb a a

Z \int D D

Z \int {{\mathbb R}ˆ3} R3

Z

\intˆ\infty {−\infty} −∞

Z

\intˆ{2 \pi} 0 0

20


5.2

Sums, Limits, etc.

X

\sum

P

(in-text)

(displayed)

Pn

(in-text)

(displayed)

Qn

(in-text)

(displayed)

Sn

(in-text)

(displayed)

Tn

(in-text)

(displayed)

lim(x,y)→(0,0)

(in-text)

lim

(displayed)

lima→∞

(in-text)

lim

(displayed)

limx→x0

(in-text)

n X

i=1

i=1 n Y

i=1

i=1 n [

i=1

i=1 n \

i=1

i=1

lim (x,y)→(0,0)

a→∞

x→x0

21


5.3

Sample Matrices

 x1  x2  x3

x y

\left( \begin{array}{c} x1 \\ x2 \\ x3 \end{array} \right)

\left[ \begin{array}{c} x \\ y \end{array} \right]

a b c d

a b c d

1 0

1  0 0

\left[ \begin{array}{cc} a & b \\ c & d \end{array} \right]

0 1

0 −1

\left( \begin{array}{cc} a & b \\ c & d \end{array} \right)

\left[ \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right] 1 0

0 1 0

a b

d e

g h 

a b  d e g h

\left[ \begin{array}{cc} 0 & 1 \\ - 1 & 0 \end{array} \right]  0 0  1

\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right)

\left| \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right|

 c f  i

\left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right)

c f i

a

b

c

  d

e

 f 

g

h

i

 \left[ \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right]

22


6 6.1

Boxes, Tabbing and Tabular Environment Samples Boxes

Note:

framed box, edit its size

text

type header

framed box, edit its size

text

type header

double framed box, edit its size

text

6.2

Tabbing tabbing example 1

items items

for for

row row

one two

23


6.3

Tabular tabular example 1 (5 columns)

Partials exist and are continuous

=⇒

Definition of derivative ↓ Differentiable =⇒ Partials exist

tabular example 2 (2 columns within a fbox-parbox)

Summary of Important Formulas for §2.1

Box 2.1.1 Velocity V =

∂φ ∂t

Va =

vt = Vt ◦ φ−1 t

∂φa ∂t

vta = Vta ◦ φ−1 t

Covariant Derivative Dv · w = ∇w v

(∇w v)a =

∂v a b a b c w + γbc w v ∂xb

tabular example 3 (3 columns without a frame)

Classical Tensor Analysis {xa } ea =

∂z i ˙ ii ∂xa

∂xb e¯a = eb ∂x ¯a a

    

 ∂x ¯ b   e¯a = e  b ∂x ¯

Tensor Analysis on Manifolds Coordinates

{xa }

coordinate basis vectors

∂ = ea ∂xa  ∂xb ∂ ∂   =   ∂x ¯a ∂x ¯a ∂xb   ∂x ¯a b   d¯ xa = dx ∂xb

change of coordinates

24


tabular example 4 (2 columns with lines)

Classical Mechanics immersed Lagrangian manifold Λ → (T ∗ Q, Ω) Λ = graph of dS T ∗Q Lagrangian manifold Ω ⊂ (T ∗ Q, ΩQ ) × (T ∗ R, −ΩR ) composition of canonical relations

Quantum Mechanics element of L2 (Q) or D0 (Q) ψ = exp(iS/~) Hilbertspace (possibly unbounded) L2 (R) to L2 (Q) composition of operators

tabular example 5 (same as tabex4, but within a framed box)

Classical Mechanics immersed Lagrangian manifold Λ → (T ∗ Q, Ω) Λ = graph of dS T ∗Q Lagrangian manifold Ω ⊂ (T ∗ Q, ΩQ ) × (T ∗ R, −ΩR ) composition of canonical relations

Quantum Mechanics element of L2 (Q) or D0 (Q) ψ = exp(iS/~) Hilbertspace (possibly unbounded) L2 (R) to L2 (Q) composition of operators

tabular example 6 (3 columns with lines)

Case Unconstrained Purely Kinematic Horizontal symmetries General principal bundle case

Conditions D q = Tq Q

Connection Asym (q) ˙ = I−1 J(q) ˙

Dq ∩ Tq (Orb(q)) = {0}

Akin (q) ˙ =0

Dq ∩ Tq (Orb(q))G = Tq (Orb(q))H

Asym (q) ˙ + Akin (q) ˙ = I−1 JH (q) ˙

Dq + Tq (Orb(q)) = Tq Q

Asym (q) ˙ + Akin (q) ˙ = I−1 J nhc (q) ˙

25


7

Pictures

You must include the line

\usepackage{graphicx}

at the beginning of your document in order to use these commands.

\begin{figure} \vspace{2in} \hspace∗{.4in} \includegraphics{myfigure.eps} \caption{} \end{figure}

26


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.