Vous êtes sur la page 1sur 4

LaTeX Math Mode (I)

LaTeX Math Mode (II)

AMS: American Mathematical Society

Math Mode Display Styles:

AMS-LaTeX is part of all recent LaTeX distributions

Text Style: Inline (within a paragraph)

AMS-LaTeX is divided into two parts:


amscls: AMS "document class" files give a LaTeX
document the general structure and appearance of an AMS
article or book.
amsmath: extension package for LaTeX provides various
features to facilitate writing math formulas and to improve
the typographical quality of their output.

Enhancements for the LaTeX Math Mode

Display Style: Typeset separately (in its own line)

Inline: Enter and Leave Math Mode with '$':


text mode $ math mode $ text mode

Display Style: equation environment:


text mode
\begin{equation}
math mode
\end{equation}
text mode

\usepackage{amsmath}

ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf
Publishing / LaTeX Math Mode

Font size is adapted to the height of the current line and the
height of the current line is adapted to the size of the
mathematical expression! Use only for small expressions.

Slide 1

Publishing / LaTeX Math Mode

LaTeX Math Mode (III)

LaTeX Math Mode (IV)

Subscripts and Superscripts are set with '_' and '^' :


x_i
x^k
x_i^k
x^k_i

xi
xk
x ki
x ki

x_{i^j}

xi
i
x
xi

x^{i^j}

x_{i_j}
x^{i_j}

Pre-Defined Function Names:


\arccos
\arcsin
\cot
\arg
\sinh
\sec

j
j

ij

Order is important, group objects with curly brackets.

\cos
\cosh
\det
\coth
\sup
\sin

\csc
\deg
\hom
\dim
\tan
\max

\exp
\ln
\lim
\inf
\tanh
...

\limsup
\arctan
\log
\liminf
\min

The names of these functions are typeset upright (not


italics)

Common Mistakes:

Subscripts are placed directly under the name instead of


right of its base point:

x_i_i
x^j^j

Error Message: Double subscript $x_i_


Publishing / LaTeX Math Mode

Slide 3

LaTeX Math Mode (V)

\max_i

max

max_i

maxi

Publishing / LaTeX Math Mode

Slide 4

LaTeX Math Mode Equations (I)

Text in Math Mode: \text{}

Equation Environment:

$\forall for all \text{for all}$

Typeset a separated equation

for all for all

Math Mode is activated automatically

Greek Letters:

Equation can be numbered and labeled

$\alpha, \beta, \ldots$

, ,

$\ldots, \Psi, \Omega$

, ,

Formulas are typeset in 'DisplayStyle'


Text
\begin{equation}
v = \frac{v_0}{\sqrt{ 1 - \gamma^2 }}
\end{equation}
Text

Fractions: size depends on context


$\frac{z}{n} \dfrac{z}{n}$

Text

\begin{equation}
\frac{z}{n} \tfrac{z}{n}
\end{equation}

Text

Publishing / LaTeX Math Mode

Slide 2

1
2

1
2

1
2

1
2

Slide 5

Publishing / LaTeX Math Mode

Slide 6

LaTeX Math Mode Equations (II)

LaTeX Math Mode Equations (III)

Equation over multiple lines: 'eqnarray'

AMS Multiple Equations:


There are several environments for equations defined in
AMSMath: align, flalign, split, multiple, ...

Two alignment points, set with '&'


Terms are aligned right in the first part, centered in the
middle, and aligned to the left on the last part
Newline command: '\\'

\begin{align}
x_{k+1} & = x_k + \Phi(t_k, x_k) \nonumber \\
& = x_k + h \cdot f(t_k, x_k) \\
& = x_k + h \cdot \lambda \cdot e^{x_k}
\end{align}

\begin{eqnarray}
x_{k+1} & = & x_k + \Phi(t_k, x_k) \nonumber \\
~ & = & x_k + h \cdot f(t_k, x_k) \\
~ & = & x_k + h \cdot \lambda \cdot e^{x_k}
\end{eqnarray}

Publishing / LaTeX Math Mode

Slide 7

Publishing / LaTeX Math Mode

LaTeX Math Mode Arrays (I)

Slide 8

LaTeX Math Mode Arrays (II)

Arrays

Matrices

Rectangular environments with individual cells, like tables

Matrices can be built from Arrays by adding parentheses

Cell-divisor: '&'

Parentheses on the left side are introduced with '\left', on the


right side with '\right':

Row/Line-divisor: '\\'
Horizontal alignment in each column: r(ight), c(enter), l(eft)
Alignment specifier determines number of columns!
The number must not be exceeded!
\begin{equation}
\begin{array}{lcr}
a
& = & 1 \\
b+c & = & 2 \\
d
& = & a + b
\end{array}
\end{equation}

Publishing / LaTeX Math Mode

\left)
\right[
Slide 9

LaTeX Math Mode Arrays (III)

Publishing / LaTeX Math Mode

Slide 10

LaTeX Math Mode Arrays (IV)


AMS Matrices:

\begin{equation}
\left(
\begin{array}{ccc}
a_{1,1} & a_{1,2} & \ldots \\
a_{2,1} & a_{2,2} & \ldots \\
\vdots & \vdots & \ddots
\end{array}
\right)
\end{equation}

The AMSMath Package defines several matrix types, e.g.:


matrix no delimiters
pmatrix round parentheses
bmatrix brackets
Vmatrix double vertical lines

\begin{equation}
|x| :=
\left\{
\begin{array}{rl}
-x & \text{if } x < 0 \\
x & \text{if } x \geq 0
\end{array}
\right.
\end{equation}

Publishing / LaTeX Math Mode

Normal parentheses: \left( \right)


Curly parentheses (must be escaped!): \left\{ \right\}
Brackets (must not be escaped!): \left[ \right]
Invisible: \left. \right.
Of course, closing parentheses can be used an the left and
opening parentheses on the right side:

Columns Alignments can be omitted.


\begin{equation}
\begin{pmatrix}
4 & -1 & 0 \\
-1 & 4 & -1 \\
0 & -1 & 4
\end{pmatrix}
\end{equation}

Slide 11

Publishing / LaTeX Math Mode

Slide 12

German Umlaute

Example: dinbrief (I)

\usepackage[german]{babel}

\documentclass[a4paper,11pt]{dinbrief}
\usepackage{ngerman}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

deutsche Anfhrungszeichen

\begin{document}

Umlaute: \a , \A , \o , \O , \u , \U

%%%
\subject{Betreff-Vermerk des Briefes}
\backaddress{Die Rcksendeadresse oben im Anschriftfenster}
\signature{die gedruckte Unterschrift,
ber der man i.d.R. per Hand unterzeichnet}
\Datum{ \today }
\address{Name des Absenders \\ Strae \\ Postleitzahl und Ort des Absenders}
%%%

Scharfes-S: \ss
\usepackage{german}
\usepackage{ngerman}

%%% Dies ist brigens ein Befehl: \begin{letter}{Adresse}


\begin{letter}
{Anschriftfeld: Name \\ Strae \par PLZ-Ort}
\opening{Anrede: Sehr geehrte Damen und Herren,}
hier kommt der Text!
\closing{Gruformel: Mit freundlichen Gren}
\encl{Die Anlage}
\end{letter}
%%%

Umlaute: a , A , o , O , u , U
Scharfes-S: s
\usepackage[latin1]{inputenc}
,,,,,,

\end{document}

Publishing / LaTeX

Slide 13

Publishing / LaTeX

LaTeX Beamer Class (I)

Slide 14

LaTeX Beamer Class (II)

LaTeX Beamer Class https://bitbucket.org/rivanvx/beamer


Package to create presentations to be held using a
projector.
Was developed for a PhD presentation (2003).

Document:
Sections and sub-sections (of pages)
Frames ( ~ Slides )

Aspect ratio 4:3

Components of a frame:

Is now the dominant latex package for presentations.


http://www.tug.org/teTeX/tetex-texmfdist/doc/latex/beamer/beameruserguide.pdf

Advantages:

Headline and Footline


Left and right sidebar
Navigation bar/symbols

Themes: change the whole appearance of your


presentation with a single parameter.

Logo

Characteristics
determined
by theme

Frame title

Easily usable overlays and dynamic effects.

Background

Highly configurable.

Content

Usually included in the LaTeX distribution.


LaTeX / Beamer

Slide 15

LaTeX / Beamer

LaTeX Beamer Class (III)

Slide 16

LaTeX Beamer Class (IV)

Themes:

Our own style (corporate identity):

Most are named after cities, usually because a


conference was held there.

\usetheme[footline=infoline,headline=secheader]{UPB}

Colors (color theme) can be changed independently.


Some examples:

Madrid
Copenhagen
AnnArbor

LaTeX / Beamer

http://www.hartwork.org/beamer-theme-matrix
Slide 17

LaTeX / Beamer

Slide 18

LaTeX Beamer Class (V)

LaTeX Beamer Class (VI)

Useful global setting

Mathematical environments:

Disable navigational symbols:


\beamertemplatenavigationsymbolsempty

definition, lemma, theorem, proof


\begin{theorem}[Pythagoras]
$a^2 + b^2 = c^2$
\end{theorem}
\begin{proof}
Trivial.
\end{proof}

Sectioning:
\section[short]{long}
\subsection[short]{long}

Multiple columns: (vertical subdividing)


\begin{columns}
\column{.55\textwidth}
\pgfimage[width=\textwidth]{image}
\column{.45\textwidth}
\begin{enumerate}
\item First item
\item Last item
\end{enumerate}
\end{columns}

LaTeX / Beamer

Slide 19

LaTeX / Beamer

LaTeX Beamer Class (VII)

Slide 20

LaTeX Beamer Class (VIII)

Blocks

Meta-Information
A block of text with a heading.

\title[short title]{long title}


\subtitle[short subtitle]{long subtitle}

\begin{block}{title}
text
\end{block}

\author[J. Smith]{James Smith}


\institute[short]{Institute\\ University}

\begin{exampleblock}{title}
text
\end{exampleblock}

\date[26.05.06]{26. Mai 2006}


\titlegraphic{\includegraphics[width=2cm,height=2cm]
{logo}}
Needs file logo.eps/ps/pdf or have to
\DeclareGraphicsExtension{...}

\begin{alertblock}{title}
text
\end{alertblock}

\begin{document}
\begin{frame}[t]
\maketitle
\end{frame}

LaTeX / Beamer

Slide 21

LaTeX / Beamer

LaTeX Beamer Class (IX)


Frames

Slide 22

LaTeX Beamer Class (X)


Guidelines for designing frames:

optional

\begin{frame}[Overlay-Actions][Options]{Title}{Subtitle}
Content
\end{frame}

Start with a subtitle for your slide.


Topics on frames should be self-consistent.
Avoid long sentences

Overlay-Actions
Successively build up a frame on several slides: <+->

Options

Use bullet points and numbered lists!


Choose large text sizes.
Guideline: ~ 10 lines per frame.
Audience in the last row must read it, too.
Avoid too many colors and different fonts and sizes.

Frame alignment: b(ottom), c(enter), t(op)


plain: Don't show headline, footer, sidebar
squeeze: Shrink left and right borders

To support, not to distract.


Don't use italics, use bold face or color to highlight.

label=name: Set a name for later reference

Use pictures to express complex concepts.


LaTeX / Beamer

Slide 23

LaTeX / Beamer

Slide 24

Vous aimerez peut-être aussi