Beruflich Dokumente
Kultur Dokumente
Why LATEX?
Especially mathematics
A large and active community
Tea
Milk
Biscuits
\begin{figure}
\includegraphics{chick}
\end{figure}
\begin{equation}
\alpha + \beta + 1
\end{equation}
Image from http://www.andy-roberts.net/writing/latex/importing_images
++1
(1)
Attitude adjustment
Getting started
I
I
Typesetting Text
For the most part, you can just type your text normally.
If you just type these, youll get an error. If you want one to appear
in the output, you have to escape it by preceding it with a backslash.
\$\%\&\#!
$%&#!
Handling Errors
I LATEX
Advice on Errors
1. Dont panic! Errors happen.
2. Fix them as soon as they arise if what you just typed
caused an error, you can start your debugging there.
3. If there are multiple errors, start with the first one the
cause may even be above it.
Typesetting Exercise 1
http://en.wikipedia.org/wiki/Economy_of_the_United_States
% much better:
Let $a$ and $b$ be distinct positive
integers, and let $c = a - b + 1$.
I LATEX
Let y = mx + b be . . .
Let $y = m x + b$ be \ldots
Let y = mx + b be . . .
Use caret
+ c1 x + c0
y = c2
for subscripts.
x2
Fn = Fn 1 + Fn 2
Fn = Fn1 + Fn2
= Ae Q/RT
P
= nk=1 k
b 2 4ac
(2)
2a
Caution: LATEX mostly ignores your spaces in mathematics, but it cant handle
blank lines in equations dont put blank lines in your mathematics.
Interlude: Environments
I
P
We can write = nk=1 k
in text, or we can write
=
n
X
(3)
k=1
to display it.
Interlude: Environments
Biscuits
Tea
1. Biscuits
2. Tea
Interlude: Packages
I
n
X
k=1
I LATEX
i =
Cov(Ri , Rm )
Var(Rm )
An ampersand & separates the left column (before the =) from the
right column (after the =).
Typesetting Exercise 2
Typeset this in LATEX:
Let X1 , X2 , . . . , Xn be a sequence of independent and identically
distributed random variables with E[Xi ] = and
Var[Xi ] = 2 < , and let
n
Sn =
1X
Xi
n
i
End of Part 1
Thats amazing!