Presentations with LaTeX - UCLA Statistical...
-
Upload
dinhnguyet -
Category
Documents
-
view
216 -
download
1
Transcript of Presentations with LaTeX - UCLA Statistical...
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
UCLA Department of StatisticsStatistical Consulting Center
Presentations with LATEX
Colin [email protected]
May 12, 2009
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Outline
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting startedSoftware installationBeamer packageExample templateCompilingSlideshowConsole and errors
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Software installation
Installing LATEX
Mac Installation: Download MacTeX, which can be found onhttp://www.tug.org/mactex/ . LATEXcan then be accessed via
the program TeXShop, which is included in this installation.
Windows Installation: Download proTeXt, which can befound on http://www.tug.org/protext 1. LATEXcan be accessedvia TeXnicCenter, which is included in this installation.
Both the MacTeX and proTeXt downloads are very large:1.2GB and 540MB, respectively.
The interfaces for Macs and PCs are different, however, theLATEX“code” works for both.
1Another option http://www.winshell.de . (Winshell and MikTeX)Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Software installation
Opening TeXShopFinder → Applications → TeX → TeXShop
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Beamer package
Beamer
The package that we will be using to create a slidepresentation in LATEXis called Beamer.
Beamer is very straight forward if you are already familiar withLATEX. If not, it may be a little difficult at first. We are goingto start with the basics of Beamer and build up to moreadvanced topics.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Beamer package
Beamer (cont.)
Pros:
LATEXand Beamer are open source.LATEXand Beamer offer you full control over the design andlayout of your presentation.Elegant math typesetting just like in other LATEXdocuments.Has plenty of built in templates to choose from.Once you are familiar with Beamer you can design your owntemplate.
Cons:
If you’re note familiar with LATEXmay take a while to get usedto the functions.There are no drag and drop options.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Example template
Example template
Download the following zipped folder to your desktop
http://www.stat.ucla.edu/∼crundel/SCC/beamerTemp.zip
Unzip the file (on a Mac, double-click). beamerTemp’s contents:
beamerTemp.tex
three image files:
latex.jpgpowerpoint.jpgwishiwerethere.jpg.
beamerTemp.tex follows the rest of this presentation and is filledwith examples and extra comments. Open this file now.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Example template
Commenting
Return to the basic file you just created. Whats with all the red(or gray in Windows)? These are comments, which is writing thatwill be ignored by LATEX. Comments are made by using the percentsymbol: %.
Any text following a % on that line only will be ignored by LaTeX.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Compiling
CompilingHit command-T or go to Typeset.The first time you compile a document you will be asked tosave your document.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Compiling
Files from the compile
LATEXtakes the .tex document and it produces a bunch of otherfiles.
While each of these files has a purpose, only one file - in additionto the original LATEXfile - is of interest: the PDF. As more methodsof LATEXare used, this list of LATEXoutput files might grow... butmost can be ignored for most of the time.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Slideshow
Slideshow
To view your slides as a slide show, open the PDF documentproduced by LATEXthrough Finder and go to View → Slideshow.
Click on the Fit to Screen button for full screen slides.
→
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Console and errors
ConsoleWhen the code was compiled, two windows popped up. Theconsole tells you what LATEXis doing when it reads (compiles) thedocument. If you have made an error (or just did something thatLATEXdoesnt like), the console will tell you. If the error is critical,LATEXwill stop compiling:
While it is always good to fix the problem immediately (hit), in some cases you can continue compiling by hitting return
on the keyboard.Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Console and errors
Errors are inevitable
Errors are both inevitable and common withLATEX. To help identifyerrors, it is recommended that you compile frequently to verifyyour output matches what you anticipated. (You can continueworking while a document compiles.)Common errors that will make more sense as we go along...
Misspelling a command
Not escaping special characters
Not balancing {braces}Not balancing $’s
Not balancing out beginning/ending environments (e.g.\begin{document} and \end{document})
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic StructureThemesLayout optionsOutput optionsFrame optionsPresentation structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Themes
Themes
There are five theme categories in beamer:
1 Presentation Themes - Slide template2 Color Themes - Color scheme for slide template3 Font Themes4 Inner Themes5 Outer Themes
We will mostly focus on the first two in this presentation.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Themes
Choosing a theme\usetheme[option]{name}The main difference between v3.0 and v2.2 is Beamer themesOld themes: bars, boxes, classic, default, lined, plain, shadow,sidebar, sidebardark, sidebardarktab, sidebartab, split, tree,treebarsNew themes:
Without navigation bar: default, boxes, Bergen, Madrid,Pittsburgh, RochesterWith a tree-like navigation bar: Antibes, JuanLesPins,MontpellierWith a TOC sidebar: Berkeley, PaloAlto, Goettingen,Marburg, HannoverWith a mini frame navigation: Berlin, Ilmenau, Dresden,Darmstadt, Frankfurt, Singapore, SzegedWith section and subsection titles: Copenhagen, Luebeck,Malmoe, Warsaw
The best way to decide which theme to use is to try them alland choose the one you think serves your presentation thebest. In this presentation we are using the Frankfurt theme.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Themes
Frankfurt theme
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Themes
Antibes theme
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Layout options
Layout options
[slidestop]: puts frame titles on the top left corner(default=[slidescentered])
[compress]: makes all navigation bars as small as possible(default=[uncompressed])
Changing the color of navigation bars and titles:
[blue]: default color scheme[red]: changes navigation bars and titles to a reddish color[brown]: changes navigation bars and titles to a brownishcolor[blackandwhite]: good for transparencies
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Output options
Output options
Default: PDF screen (size 128mm × 96 mm)
[handout]: for PDF handouts.
[trans]: for PDF transparency.
[notes=hide/show/only]: for notes. Hide notes (default),add notes to the PDF screen, or notes only PDF.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Frame options
Frame options
[plain]: for plane frame style (no navigation bars)
[fragile]: for using verbatim environment andverb command (useful for presenting R output)
[allowframebreaks]: for automatic split of frames if thecontents do not fit in a single slide
[shrink]: for shrinking the contents to fit in a single slide(be careful when using this, it is important to not put toomuch information in each slide, it may make it difficult for theaudience to follow your presentation)
[squeeze]: for squeezing vertical space.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Presentation structure
Sections
\section[short section name]{long section name}Short section name is an optional parameter and shows up inthe navigation bar, it is useful if your section names are longand don’t fit in the navigation bar.
Long section name shows up in the table of contents.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Presentation structure
Subsections
\subsection[short subsection name]{longsubsection name}Short subsection name is an optional parameter and shows upin the navigation bar, it is usually not necessary as thenavigation bar shows only the current subsection name.
Long subsection name shows up in the table of contents.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Presentation structure
Parts
\part[short part name]{long part name}Parts may be useful for very long presentations. Within eachpart you can have sections and subsections.
When using parts, only the current part (and the sections andsubsections within it) will show up in the navigation bar.
At the beginning of each part you can include a cover slideusing \partpage, this will print out the part number andname.
Parts do not automatically show up in the table of contents,therefore require that you manually create the table ofcontents.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 FontsText & Math FontsFont Size
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Text & Math Fonts
Text Fonts
Beamer option [sans] for text font (default)
Equivalent to \usefonttheme{default}Beamer option [serif] for text font
Equivalent to \usefonttheme[options]{serif}Additional font theme macros
\usefonttheme{structurebold} for bold faced structures(titles, headlines, footlines, sidebars, ...)\usefonttheme{structureitalicserif}\usefonttheme{structuresmallcapsserif}
You can also change text font locally with commands like\textbf, \underline, etc. or by going to Macros → TextStyles.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Text & Math Fonts
Math Fonts
When using \usefonttheme{default}, mathsans is default
When using \usefonttheme[options]{serif}, mathserif isdefault
Beamer option [mathsans/mathserif] for math font
You can also change math font locally with commands like\mathbf, \underline, etc. or by going to Macros → TextStyles → typeface.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Font Size
Font Size
Default font size: 11pt (At the full screen mode this font sizecorresponds to 22 pt.)
Available font size options: 8pt, 9pt, 10pt, 11pt, 12pt, 14pt,17pt, 20pt
You can change the font size locally with commands like\small, \tiny, etc. or by going to Macros → Text Styles →size
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 ColorsText colorsBackground colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Text colors
Colors
Beamer uses the xcolor package which also supports colorand pstcol
Predefined colors: red, green, blue, cyan, magenta, yellow,black, darkgray, gray, lightgray, orange, violet, purple, andbrown
To get text in color:
\textcolor{orange}{Text in orange} → Text in orange
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Text colors
Defining colors
You can define your own color and give it a name in thepreamble:
\xdefinecolor{lavendar}{rgb}{0.8, 0.6, 1}This is lavendar\xdefinecolor{olive}{cmyk}{0.64,0, 0.95,0.4}This is olive
You can also create a color mix in textcolor:
\textcolor{green!80!blue}{This is 80% green, 20%blue} → This is 80% green, 20% blue\textcolor{green!50!blue}{This is 50% green, 50%blue} → This is 50% green, 50% blue\textcolor{green!20!blue}{This is 20% green, 80%blue} → This is 20% green, 80% blue
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Background colors
Background colors - solid
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Background colors
Background colors - gradient
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 OverlaysStepwise viewingHighlighting
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Stepwise viewing
Stepwise viewing
\pause command can be used for overlays in itemized orenumerated lists.
\begin{itemize}
\pause \item This item appears first
\pause \item then this item appears
\pause \item lastly this item appears
\end{itemize}
This item appears first
then this item appears
lastly this item appears
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Stepwise viewing
Stepwise viewing
<+-> command can be used for overlays in itemized or enumeratedlists.
\begin{itemize}[<+->]
\item This item appears first
\item then this item appears
\item lastly this item appears
\end{itemize}
This item appears first
then this item appears
lastly this item appears
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Stepwise viewing
Stepwise viewing (cont.)
\item<n-> command can also be used for overlays in itemized orenumerated lists so that items appear in any order you like.
\begin{itemize}
\item<2-> This item appears first
\item<4-> lastly this item appears
\item<3-> then this item appears
\end{itemize}
This item appears first
lastly this item appears
then this item appears
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Stepwise viewing
Stepwise viewing (cont.)
\item<n1-n2> command can also be used for finer control inoverlays.
\begin{enumerate}
\item<2-> This item appears first
\item<3-> then this item appears
\item<4-> lastly this item appears
\end{enumerate}
1 This item appears first
2 then this item appears
3 lastly this item appears
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Highlighting
Highlighting
\item<+-| alert@+> command can also be used for finer controlin overlays. You can also use structure instead of alert.
\begin{enumerate}
\item <+-| alert@+> This item is highlighted first
\item <+-| alert@+> then this item is highlighted
\item <+-| alert@+> lastly this item is highlighted
\end{enumerate}
1 This item is highlighted first
2 then this item is highlighted
3 lastly this item is highlighted
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Highlighting
Highlighting (cont.)
Highlighting can also be done with any color of your choice.
\begin{enumerate}
\item<2-> \alt<2>{\color{magenta} First this is magenta}{\color{gray} This is gray}
\item<2-> \alt<3>{\color{magenta} then this is magenta}{\color{gray} this is gray}
\item<2-> \alt<4>{\color{magenta} lastly this is magenta}{\color{gray} this is gray}
\end{enumerate}
1 First this is magenta
2 then this is magenta
3 lastly this is magenta
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Highlighting
Highlighting (cont.)
... and in any order of you define
\begin{itemize}
\item<2-> \alt<4>{\color{magenta} lastly this is magenta}{\color{gray} This is gray}
\item<2-> \alt<2>{\color{magenta} First this is magenta}{\color{gray} this is gray}
\item<2-> \alt<3>{\color{magenta} then this is magenta}{\color{gray} this is gray}
\end{itemize}
lastly this is magenta
First this is magenta
then this is magenta
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Highlighting
Highlighting (cont.)
\temporal<n>{before}{on}{after} command can also be usedfor incremental highlighting.
\begin{enumerate}
\temporal<2>{\color{gray}} {\color{blue}} {\color{blue!25}}
\item First this is gray, then blue, then light blue.
\temporal<3>{\color{gray}} {\color{blue}} {\color{blue!25}}
\item First this is gray, then blue, then light blue.
\temporal<4>{\color{gray}} {\color{blue}} {\color{blue!25}}
\item First this is gray, then blue, then light blue.
\end{enumerate}
1 First this is gray, then blue, then light blue.
2 First this is gray, then blue, then light blue.
3 First this is gray, then blue, then light blue.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local StructuresColumnsFramed TextTablesMath
7 Figures
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Columns
Two columns
It is possible to divide the frame into two columns.
\begin{columns}
\column{0.50\textwidth}
\textcolor{red}{This is column 1 and spans the right 50% of the slide.}
\column{0.50\textwidth}
\textcolor{green}{This is column 2 and spans the left 50% of the slide.}
\end{columns}
This is column 1 and spans theright 50% of the slide.
This is column 2 and spans theleft 50% of the slide.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Columns
Multiple columns
It is possible to divide the frame into multiple columns, just makesure the percentages add up to 100.
This iscolumn 1 andspans theright 20% ofthe slide.
This is column 2 and spans themiddle 50% of the slide.
This is column 3and spans themiddle 30% of theslide.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Framed Text
Framed Text - Predefined
Beamer supports predefined framed texts:
theorem, corollary, definition in structure color frameexamples in green color frameblock in structure color frame with your own titlealertblock in alert color frame with your own title
Color schemes of these framed texts are theme dependent
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Framed Text
Framed Text - Predefined (Examples)
Theorem
a = b
Corollary
a = b
Definition
a = b
Example
a = b
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Framed Text
Framed Text - Predefined (Examples cont.)
Block title
Text in block.
Alert block title
Text in alert block.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Framed Text
Framed Text - User defined
For user defined framed text use \beamerboxesrounded
Rounded beamer box title
Text in rounded beamer box.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Tables
Tables
You can use the standard LATEXtable environment inpresentations.
Col 1 Col 2 Col 3
Row 1 a b cRow 2 d e fRow 3 g h i
You can place the table in a rounded box as well.
Title of table
Col 1 Col 2 Col 3
Row 1 a b cRow 2 d e fRow 3 g h i
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Tables
Tables with overlays
Row increment in a table:
Col 1 Col 2 Col 3
Row 1 a b cRow 2 d e fRow 3 g h i
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Math
MathYou can use the standard LATEXmath environment in presentations.
\[ mathtext \] environment:\[ W_i | \mathbf{W}_{-i} \sim N(\mu_i + \sum_{j=1}^n \gamma h_{ij}(W_j-m)j), \tau^2 \phi_i) \]
Wi |W−i ∼ N(µi +n∑
j=1
γhij(Wj −m)j), τ2φi )
Aligned math environment (& is used for defining alignmentposition):\begin{align*}
y_{ij} | \beta, u_i, \sigma_e^2 &\sim N(\beta x_{ij} + u_i, \sigma_e^2) \\
u_i | \sigma_u^2 &\sim N(0, \sigma_u^2)
\end{align*}
yij |β, ui , σ2e ∼ N(βxij + ui , σ
2e )
ui |σ2u ∼ N(0, σ2
u)
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Math
Math (cont.)
Equation environment (used for numbered equations):\begin{equation}
\mathbf{y}|\beta, \sigma_e^2, \sigma_u^2 \sim N(\beta \mathbf{x},
\sigma_e^2 I_N + \sigma_u^2 I_m)
\end{equation}
y|β, σ2e , σ
2u ∼ N(βx, σ2
e IN + σ2uIm) (1)
$ environment (useful for math within text):Spatial non-hierarchical model: $\omega^2 = 0$, predictive distribution is
degenerate at $\mathbf{Y}$
Spatial non-hierarchical model: ω2 = 0, predictive distributionis degenerate at Y
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 FiguresFiguresFigures with overlays
8 Go to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Figures
FiguresYou can use the standard LATEXfigure environment in presentations.
\begin{center}
\includegraphics[width=60mm]{wishiwerethere.jpg}
\end{center}
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Figures with overlays
Figures (cont.)
It is also possible to use overlays with figures.
\begin{columns}
\pause \column{0.5\textwidth}
\begin{center}
Instead of using this, \\
\includegraphics[width=20mm]{powerpoint.png}
\end{center}
\pause \column{0.5\textwidth}
\begin{center}
now you can use this \\
\includegraphics[width=20mm]{latex.png}
\end{center}
\end{columns}
Instead of using this, now you can use this
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttonsGo to buttons
9 More
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Go to buttons
Go to buttons
You can insert buttons to jump between slides. In order to dothis your slides should be labeled using
\begin{frame}[label=label ]This is the first slide in the “Go to buttons” section. Byclicking on the below button you can jump to the last slide inthe presentation.
Jump to last slide
You can obtain the button by using the following command:\hyperlink{goto2}{\beamergotobutton{Jump to last slide}}
Note that the slide where the button is pointing to is labeledgoto2 .
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 MoreDiverse possibilitiesResourcesSurveyUpcoming Mini-Courses
10 Exercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Diverse possibilities
Diverse possibilitiesLATEXhas a lot of power to do diverse tasks:
Chemistry figuresCircuitsFeynman diagramsMusical scoresCrossword puzzlesSudoku puzzles
These different applications require packages that are generally notincluded in a basic download of LATEXbut that can typically bedownloaded at no cost.The ability to make elegant documents and figures is one ofLATEX’s major draws. It offers users nearly unlimited control of theirdocuments (even though it might feel a bit out of control at first).
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Resources
Resources
Online help:
http:// info.stat.ucla.edu/grad/ - links to many useful sites
http:// forums.stat.ucla.edu/?5 - online forum help
http:// faq.ktug.or.kr/wiki/uploads/beamer guide.pdf - acomprehensive Beamer guide
A good resource in book format:
Guide to LaTeX, by Helmut Kopka and Patrick W. Daly
A document that can be used to find LOTS of symbols (4MB):
www.ctan.org/ tex-archive/ info/ symbols/comprehensive/
symbols-a4.pdf
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Survey
Survey
Please take the time to complete a survey about this mini-course:
http:// scc.stat.ucla.edu/survey
Your feedback is greatly appreciated.
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Upcoming Mini-Courses
Upcoming Mini-Courses
This week:
Thursday, May 14 - Regression in R
Next week:
Tuesday, May 19 - Survival Analysis in RThursday, May 21 - Construction of Questionnaires andPsychometric Issues
For complete schedule of mini-courses offered visithttp:// scc.stat.ucla.edu/mini-courses/
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Upcoming Mini-Courses
Thank youAny questions?
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
1 Getting started
2 Basic Structure
3 Fonts
4 Colors
5 Overlays
6 Local Structures
7 Figures
8 Go to buttons
9 More
10 ExercisesExercises
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Exercises
Exercise #1Create a slide where the background is gradient 50% blue and 50% light gray and
three bulleted items are first gray, then get highlighted red then become a grayish blue
color (70% gray, 30% blue).
(1)
(3)
(2)
(4)
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Exercises
Exercise #2Recreate the below slide. Hints:
Warsaw themeOrchid color themeReplace the name and e-mail address with your ownDon’t forget about the title, section and subsection names
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
Exercises
Last slide
This is the last slide in the presentation, by clicking on thebelow button you can go back to the “Go to buttons” section.
Go back
You can obtain the button by using the following command:\hyperlink{goto1}{\beamergotobutton{Go back}}
Note that the slide where the button is pointing to is labeledgoto1 .
Colin Rundel [email protected]
Presentations with LATEX UCLA SCC