introduction to beamer - wfuusers.wfu.edu/wickersg/latex/beamer/beamer.2009.pdfbeamer 101...
TRANSCRIPT
Beamer 101
Introduction to BeamerBeamer is a LaTeX class for creating slides for presentations
Steven Wicker
Winston Salem, NC
June 16, 2009
Beamer 101
Beamer 101
How to Get Beamer
Go to http://latex-beamer.sourceforge.net/
Just Google ”Beamer” – Should be the 1st link.
Copy the all the code between and including the begin andend document commands and paste it into a new documentin WinEdt.
PDF/LaTeX the document
You will have to install FOUR packages as the documentprocesses. This will take some time.
Beamer 101
Beamer 101
Commands for Header and the Title Page
\documentclass[xcolor=dvipsnames]beamer\usecolortheme[named=BurntOrange]\usethemePaloAlto\title[]\subtitle[]\author[]\institute[]\date\begindocument\beginframe\titlepage
\ \endframe
Beamer 101
Beamer 101
General Set-up for a Slide
\beginframe[fragile]\frametitleTitle of slidecontent of slidedefinitionsequationspictures
\ \endframe
Beamer 101
Beamer 101
Itemize vs. Enumerate
An itemized/bulleted list:
itemized item 1
itemized item 2
itemized item 3
Same structure for ”enumerate” to produce a numbered list.
\beginitemize\pause
\item itemized item 1\pause
\item itemized item 2\pause
\item itemized item 3\enditemize
Beamer 101
Beamer 101
Itemize vs. Enumerate
An itemized/bulleted list:
itemized item 1
itemized item 2
itemized item 3
Same structure for ”enumerate” to produce a numbered list.
\beginitemize\pause
\item itemized item 1\pause
\item itemized item 2\pause
\item itemized item 3\enditemize
Beamer 101
Beamer 101
Itemize vs. Enumerate
An itemized/bulleted list:
itemized item 1
itemized item 2
itemized item 3
Same structure for ”enumerate” to produce a numbered list.
\beginitemize\pause
\item itemized item 1\pause
\item itemized item 2\pause
\item itemized item 3\enditemize
Beamer 101
Beamer 101
Itemize vs. Enumerate
An itemized/bulleted list:
itemized item 1
itemized item 2
itemized item 3
Same structure for ”enumerate” to produce a numbered list.
\beginitemize\pause
\item itemized item 1\pause
\item itemized item 2\pause
\item itemized item 3\enditemize
Beamer 101
Beamer 101
Itemize vs. Enumerate
An itemized/bulleted list:
itemized item 1
itemized item 2
itemized item 3
Same structure for ”enumerate” to produce a numbered list.
\beginitemize\pause
\item itemized item 1\pause
\item itemized item 2\pause
\item itemized item 3\enditemize
Beamer 101
Beamer 101
Itemize vs. Enumerate
An itemized/bulleted list:
itemized item 1
itemized item 2
itemized item 3
Same structure for ”enumerate” to produce a numbered list.
\beginitemize\pause
\item itemized item 1\pause\item itemized item 2
\pause\item itemized item 3
\enditemize
Beamer 101
Beamer 101
Another Way to Create Pauses
Normal LaTeX class.
Easy overlays.
No external programs needed.
\beginitemize\item<3-> Normal LaTeX class.\item<2-> Easy overlays.\item<1-> No external programs needed.\enditemize
Beamer 101
Beamer 101
Another Way to Create Pauses
Normal LaTeX class.
Easy overlays.
No external programs needed.
\beginitemize\item<3-> Normal LaTeX class.\item<2-> Easy overlays.\item<1-> No external programs needed.\enditemize
Beamer 101
Beamer 101
Another Way to Create Pauses
Normal LaTeX class.
Easy overlays.
No external programs needed.
\beginitemize\item<3-> Normal LaTeX class.\item<2-> Easy overlays.\item<1-> No external programs needed.\enditemize
Beamer 101
Beamer 101
Another Way to Create Pauses
Normal LaTeX class.
Easy overlays.
No external programs needed.
\beginitemize\item<3-> Normal LaTeX class.\item<2-> Easy overlays.\item<1-> No external programs needed.\enditemize
Beamer 101
Beamer 101
Theorems and Such
Definition
A triangle that has a right angle is called a right triangle.
Theorem
In a right triangle, the square of hypotenuse equals the sum ofsquares of two other sides.
Proof.
We leave the proof as an exercise to our astute reader. We alsosuggest that the reader generalize the proof to non-Euclideangeometries.
\begindefinition or theorem or proof
Beamer 101
Beamer 101
Theorems and Such
Definition
A triangle that has a right angle is called a right triangle.
Theorem
In a right triangle, the square of hypotenuse equals the sum ofsquares of two other sides.
Proof.
We leave the proof as an exercise to our astute reader. We alsosuggest that the reader generalize the proof to non-Euclideangeometries.
\begindefinition or theorem or proof
Beamer 101
Beamer 101
Theorems and Such
Definition
A triangle that has a right angle is called a right triangle.
Theorem
In a right triangle, the square of hypotenuse equals the sum ofsquares of two other sides.
Proof.
We leave the proof as an exercise to our astute reader. We alsosuggest that the reader generalize the proof to non-Euclideangeometries.
\begindefinition or theorem or proof
Beamer 101
Beamer 101
Theorems and Such
Definition
A triangle that has a right angle is called a right triangle.
Theorem
In a right triangle, the square of hypotenuse equals the sum ofsquares of two other sides.
Proof.
We leave the proof as an exercise to our astute reader. We alsosuggest that the reader generalize the proof to non-Euclideangeometries.
\begindefinition or theorem or proof
Beamer 101
Beamer 101
Graphics
Here we include three images, one each of PDF, PNG, and JPGtypes.
Sample code:\includegraphics[width=0.1\textwidth]picture.jpg
Beamer 101
Beamer 101
Graphics
Here we include three images, one each of PDF, PNG, and JPGtypes.
Sample code:\includegraphics[width=0.1\textwidth]picture.jpg
Beamer 101
Beamer 101
Dividing a Slide into Columns
Good for displaying equations on one side and a picture on theother.
Here is the first column.
f (x) = 2x3 − 7x + 3
Second column withpicture.
Use \begincolumns with corresponding end for the columnsenvironment.Use \begincolumn with corresponding end to make theindividual columns.
Beamer 101
Beamer 101
Dividing a Slide into Columns
Good for displaying equations on one side and a picture on theother.
Here is the first column.
f (x) = 2x3 − 7x + 3
Second column withpicture.
Use \begincolumns with corresponding end for the columnsenvironment.Use \begincolumn with corresponding end to make theindividual columns.
Beamer 101
Beamer 101
Dividing a Slide into Columns
Good for displaying equations on one side and a picture on theother.
Here is the first column.
f (x) = 2x3 − 7x + 3
Second column withpicture.
Use \begincolumns with corresponding end for the columnsenvironment.Use \begincolumn with corresponding end to make theindividual columns.
Beamer 101
Beamer 101
Dividing a Slide into Columns–Code
\begincolumns\begincolumn0.5\textwidthHere is the first column.$$ f(x) = 2x^3 -7x +3 $$
\endcolumn\pause\begincolumn0.3\textwidthSecond column with picture.\centerline\includegraphics[width=0.7\textwidth]picture.png
\endcolumn\endcolumns\bigskip
Beamer 101
Beamer 101
A Simple Displayed Equation
A displayed formula: ∫ ∞−∞
e−x2dx =
√π
Code:$$ \int_-\infty^\inftye^-x^2 \, dx = \sqrt\pi$$
Beamer 101
Beamer 101
A Simple Displayed Equation
A displayed formula: ∫ ∞−∞
e−x2dx =
√π
Code:$$ \int_-\infty^\inftye^-x^2 \, dx = \sqrt\pi$$
Beamer 101
Beamer 101
Array Environment-More Complex Displayed Equation
This sample uses the array environment, with $$ to create thedisplay. Not labeled/numbered (Raynor):
−∆v = χB ∀x ∈ Ωv = 0 ∀x ∈ ∂Ω.
Code:
$$\left\\beginarrayrlll-\Delta v & = \chi_\overline B & & \forallx \in \Omega\\v & =0& & \forall x \in \partial\Omega.\endarray\right.$$
Beamer 101
Beamer 101
Array Environment-More Complex Displayed Equation
This sample uses the array environment, with $$ to create thedisplay. Not labeled/numbered (Raynor):
−∆v = χB ∀x ∈ Ωv = 0 ∀x ∈ ∂Ω.
Code:
$$\left\\beginarrayrlll-\Delta v & = \chi_\overline B & & \forallx \in \Omega\\v & =0& & \forall x \in \partial\Omega.\endarray\right.$$
Beamer 101
Beamer 101
Equation Environment with a Label
Here is the previous example using the equation environment toget a label. It produces one label for both equations, which isconvenient much of the time (Raynor):
−∆v = χB ∀x ∈ Ωv = 0 ∀x ∈ ∂Ω.
(1)
Code:
\beginequation\left\\beginarrayrlll-\Delta v & = \chi_\overline B & & \forall x \in \Omega\\v & =0& & \forall x \in \partial\Omega.
\endarray\right.\endequation
Beamer 101
Beamer 101
Equation Environment with a Label
Here is the previous example using the equation environment toget a label. It produces one label for both equations, which isconvenient much of the time (Raynor):
−∆v = χB ∀x ∈ Ωv = 0 ∀x ∈ ∂Ω.
(1)
Code:
\beginequation\left\\beginarrayrlll-\Delta v & = \chi_\overline B & & \forall x \in \Omega\\v & =0& & \forall x \in \partial\Omega.
\endarray\right.\endequation Beamer 101
Beamer 101
Equation Array - Labeled
The eqnarray environment environment, like many equation displayenvironments, has two versions. ”eqnarray” creates a multilinedisplayed equation with labels (Raynor).
~e4 = ~e4 −〈~e1,~e3〉‖~e1‖2
~e2 (2)
=
[β0
], (3)
\begineqnarray % note use of vectors\vec\tildee_4 & = & \vece_4-\frac\langle \vece_1, \vece_3 \rangle\|\vece_1\|^2 \vece_2 \\& = & \beginbmatrix\tilde\beta \\0\endbmatrix,\endeqnarray
Beamer 101
Beamer 101
Equation Array - Labeled
The eqnarray environment environment, like many equation displayenvironments, has two versions. ”eqnarray” creates a multilinedisplayed equation with labels (Raynor).
~e4 = ~e4 −〈~e1,~e3〉‖~e1‖2
~e2 (2)
=
[β0
], (3)
\begineqnarray % note use of vectors\vec\tildee_4 & = & \vece_4-\frac\langle \vece_1, \vece_3 \rangle\|\vece_1\|^2 \vece_2 \\& = & \beginbmatrix\tilde\beta \\0\endbmatrix,\endeqnarray Beamer 101
Beamer 101
eqnarray* - No Labels
”eqnarray*” creates a multiline displayed equation with no labels(Raynor):
~e4 = ~e4 −〈~e1,~e3〉‖~e1‖2
~e2
=
[β0
].
\begineqnarray*\vec\tildee_4 & = & \vece_4- \frac\langle \vece_1, \vece_3 \rangle\|\vece_1\|^2 \vece_2 \\& = & \beginbmatrix\tilde\beta \\0\endbmatrix.\endeqnarray*
Beamer 101
Beamer 101
eqnarray* - No Labels
”eqnarray*” creates a multiline displayed equation with no labels(Raynor):
~e4 = ~e4 −〈~e1,~e3〉‖~e1‖2
~e2
=
[β0
].
\begineqnarray*\vec\tildee_4 & = & \vece_4- \frac\langle \vece_1, \vece_3 \rangle\|\vece_1\|^2 \vece_2 \\& = & \beginbmatrix\tilde\beta \\0\endbmatrix.\endeqnarray*
Beamer 101
Beamer 101
Equation Array with Pauses
2x2 + 3(x − 1)(x − 2) = 2x2 + 3(x2 − 3x + 2)
= 2x2 + 3x2 − 9x + 6
= 5x2 − 9x + 6
\begineqnarray*2x^2 + 3(x-1)(x-2)&=&2x^2 + 3(x^2-3x+2)\\\pause &=& 2x^2 + 3x^2 - 9x + 6\\\pause &=& 5x^2 - 9x + 6\endeqnarray*
Beamer 101
Beamer 101
Equation Array with Pauses
2x2 + 3(x − 1)(x − 2) = 2x2 + 3(x2 − 3x + 2)
= 2x2 + 3x2 − 9x + 6
= 5x2 − 9x + 6
\begineqnarray*2x^2 + 3(x-1)(x-2)&=&2x^2 + 3(x^2-3x+2)\\\pause &=& 2x^2 + 3x^2 - 9x + 6\\\pause &=& 5x^2 - 9x + 6\endeqnarray*
Beamer 101
Beamer 101
Equation Array with Pauses
2x2 + 3(x − 1)(x − 2) = 2x2 + 3(x2 − 3x + 2)
= 2x2 + 3x2 − 9x + 6
= 5x2 − 9x + 6
\begineqnarray*2x^2 + 3(x-1)(x-2)&=&2x^2 + 3(x^2-3x+2)\\\pause &=& 2x^2 + 3x^2 - 9x + 6\\\pause &=& 5x^2 - 9x + 6\endeqnarray*
Beamer 101
Beamer 101
Equation Array with Pauses
2x2 + 3(x − 1)(x − 2) = 2x2 + 3(x2 − 3x + 2)
= 2x2 + 3x2 − 9x + 6
= 5x2 − 9x + 6
\begineqnarray*2x^2 + 3(x-1)(x-2)&=&2x^2 + 3(x^2-3x+2)\\\pause &=& 2x^2 + 3x^2 - 9x + 6\\\pause &=& 5x^2 - 9x + 6\endeqnarray*
Beamer 101
Beamer 101
Case Definitions
Used when a definition have two or more cases. Use the casestatement.
f (x) =
1 −1 ≤ x < 012 x = 0
1− x2 otherwise
The code for the above example:
f(x) =\begincases1 & -1 \le x < 0 \\\frac12 & x = 0 \\1 - x^2 & \mboxotherwise\endcases
Beamer 101
Beamer 101
Case Definitions
Used when a definition have two or more cases. Use the casestatement.
f (x) =
1 −1 ≤ x < 012 x = 0
1− x2 otherwise
The code for the above example:
f(x) =\begincases1 & -1 \le x < 0 \\\frac12 & x = 0 \\1 - x^2 & \mboxotherwise\endcases
Beamer 101
Beamer 101
Align Environment - Unstarred and Starred
The advantage of the align environment is that you can forcemultiple parts of each line to align correctly vertically, makingpretty multipart sets of equations (Raynor):
∂ui
∂t+
n∑j=1
uj∂u1
∂xj= ν∆ui −
∂p
∂xi+ fi (x , t) x ∈ Rn, t ≥ 0 (4)
∇ · ~u = 0 x ∈ Rn, t ≥ 0 (5)
~u(x , 0) = ~u0(x) x ∈ Rn, (6)
\beginalign % or align* for the unlabeled version\frac\partial u_i\partial t + \sum_j=1^n u_j \frac\partial u_1\partial x_j& = \nu \Delta u_i - \frac\partial p\partial x_i + f_i(x,t) & & x \in \mathbbR^n, t \geq 0 \\\nabla \cdot \vecu & = 0 & & x \in \mathbbR^n, t \geq 0 \\\vecu(x,0) & = \vecu_0 (x) & & x \in \mathbbR^n,\endalign
Beamer 101
Beamer 101
Align Environment - Unstarred and Starred
The advantage of the align environment is that you can forcemultiple parts of each line to align correctly vertically, makingpretty multipart sets of equations (Raynor):
∂ui
∂t+
n∑j=1
uj∂u1
∂xj= ν∆ui −
∂p
∂xi+ fi (x , t) x ∈ Rn, t ≥ 0 (4)
∇ · ~u = 0 x ∈ Rn, t ≥ 0 (5)
~u(x , 0) = ~u0(x) x ∈ Rn, (6)
\beginalign % or align* for the unlabeled version\frac\partial u_i\partial t + \sum_j=1^n u_j \frac\partial u_1\partial x_j& = \nu \Delta u_i - \frac\partial p\partial x_i + f_i(x,t) & & x \in \mathbbR^n, t \geq 0 \\\nabla \cdot \vecu & = 0 & & x \in \mathbbR^n, t \geq 0 \\\vecu(x,0) & = \vecu_0 (x) & & x \in \mathbbR^n,\endalign
Beamer 101
Beamer 101
A Matrix Using the Array Environment
The equation environment is used to display a single equation witha tag (Raynor):
JH(ω)|Dω =
0 1 0 00 0 1 00 0 0 10 0 a(ω) 0
, (7)
\beginequation% equation* for no labelJ\mathcalH(\omega)|_D_\omega= \left(\beginarraycccc0 & 1 & 0 & 0\\0 & 0 & 1 & 0 \\0 & 0 & 0 & 1 \\0 & 0 & a(\omega)& 0\endarray \right)\labeljhomega,\endequation
Beamer 101
Beamer 101
A Matrix Using the Array Environment
The equation environment is used to display a single equation witha tag (Raynor):
JH(ω)|Dω =
0 1 0 00 0 1 00 0 0 10 0 a(ω) 0
, (7)
\beginequation% equation* for no labelJ\mathcalH(\omega)|_D_\omega= \left(\beginarraycccc0 & 1 & 0 & 0\\0 & 0 & 1 & 0 \\0 & 0 & 0 & 1 \\0 & 0 & a(\omega)& 0\endarray \right)\labeljhomega,\endequation Beamer 101
Beamer 101
Inline Matrix
And matrices can also be created inline with text, as such:
(uv
).
(This sample uses the pmatrix environment.) (Raynor)
Beamer 101
Beamer 101
Matrix Types
\beginmatrix x & y \\ z & v \endmatrix
x yz v
\beginvmatrix x & y \\ z & v \endvmatrix
∣∣∣∣x yz v
∣∣∣∣\beginVmatrix x & y \\ z & v \endVmatrix∥∥∥∥x y
z v
∥∥∥∥
Beamer 101
Beamer 101
Matrix Types
\beginmatrix x & y \\ z & v \endmatrix
x yz v
\beginvmatrix x & y \\ z & v \endvmatrix
∣∣∣∣x yz v
∣∣∣∣\beginVmatrix x & y \\ z & v \endVmatrix∥∥∥∥x y
z v
∥∥∥∥
Beamer 101
Beamer 101
Matrix Types
\beginmatrix x & y \\ z & v \endmatrix
x yz v
\beginvmatrix x & y \\ z & v \endvmatrix
∣∣∣∣x yz v
∣∣∣∣
\beginVmatrix x & y \\ z & v \endVmatrix∥∥∥∥x yz v
∥∥∥∥
Beamer 101
Beamer 101
Matrix Types
\beginmatrix x & y \\ z & v \endmatrix
x yz v
\beginvmatrix x & y \\ z & v \endvmatrix
∣∣∣∣x yz v
∣∣∣∣\beginVmatrix x & y \\ z & v \endVmatrix∥∥∥∥x y
z v
∥∥∥∥Beamer 101
Beamer 101
More Matrix Types
\beginbmatrix x & y \\ z & v \endbmatrix[x yz v
]\beginBmatrix x & y \\ z & v \endBmatrix
x yz v
\beginpmatrix x & y \\ z & v \endpmatrix(
x yz v
)
Beamer 101
Beamer 101
More Matrix Types
\beginbmatrix x & y \\ z & v \endbmatrix[x yz v
]
\beginBmatrix x & y \\ z & v \endBmatrixx yz v
\beginpmatrix x & y \\ z & v \endpmatrix(
x yz v
)
Beamer 101
Beamer 101
More Matrix Types
\beginbmatrix x & y \\ z & v \endbmatrix[x yz v
]\beginBmatrix x & y \\ z & v \endBmatrix
x yz v
\beginpmatrix x & y \\ z & v \endpmatrix(x yz v
)
Beamer 101
Beamer 101
More Matrix Types
\beginbmatrix x & y \\ z & v \endbmatrix[x yz v
]\beginBmatrix x & y \\ z & v \endBmatrix
x yz v
\beginpmatrix x & y \\ z & v \endpmatrix(
x yz v
)
Beamer 101
Beamer 101
A matrix expression
[x1
x2
]=
[A BC D
]×[y1
y2
]
Code:
$$\beginbmatrix x_1 \\ x_2 \endbmatrix =\beginbmatrix A & B \\ C & D \endbmatrix \times\beginbmatrix y_1 \\ y_2 \endbmatrix$$
Beamer 101
Beamer 101
A matrix expression
[x1
x2
]=
[A BC D
]×[y1
y2
]Code:
$$\beginbmatrix x_1 \\ x_2 \endbmatrix =\beginbmatrix A & B \\ C & D \endbmatrix \times\beginbmatrix y_1 \\ y_2 \endbmatrix$$
Beamer 101
Beamer 101
Another matrix example
0 · · · 0...
. . ....
0 · · · 0
Code:
$$ \beginbmatrix 0 & \cdots & 0 \\\vdots & \ddots & \vdots \\0 & \cdots & 0 \endbmatrix $$
Beamer 101
Beamer 101
Another matrix example
0 · · · 0...
. . ....
0 · · · 0
Code:
$$ \beginbmatrix 0 & \cdots & 0 \\\vdots & \ddots & \vdots \\0 & \cdots & 0 \endbmatrix $$
Beamer 101
Beamer 101
Handouts
\documentclass[xcolor=dvipsnames,handout]beamer\usepackagepgfpages\pgfpagesuselayout4 on 1[border shrink=5mm]
Beamer 101
Beamer 101
URL’s
http://www.math.wfu.edu/
\usepackagehyperref\textcolorDarkOrchid\urlhttp://www.math.wfu.edu/
Beamer 101
Beamer 101
URL’s
http://www.math.wfu.edu/
\usepackagehyperref\textcolorDarkOrchid\urlhttp://www.math.wfu.edu/
Beamer 101
Beamer 101
For Later Reference
http://www.wfu.edu/~wickersg/latex/index.html
Color palate that can be used in Beamer
Beamer Themes
Another reference for Beamer Themes
Beamer Quick Start
Beamer 101
Beamer 101
Beamer 101