Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises UCLA Department of Statistics Statistical Consulting Center Presentations with L A T E X Colin Rundel [email protected]May 12, 2009 Colin Rundel [email protected]Presentations with L A T E X 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 L A T E X UCLA SCC Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises 1 Getting started Software installation Beamer package Example template Compiling Slideshow Console 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 L A T E X UCLA SCC Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises Software installation Installing L A T E X Mac Installation: Download MacTeX, which can be found on http:// www.tug.org/ mactex/ .L A T E Xcan then be accessed via the program TeXShop, which is included in this installation. Windows Installation: Download proTeXt, which can be found on http:// www.tug.org/ protext 1 .L A T E Xcan be accessed via 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, the L A T E X“code” works for both. 1 Another option http:// www.winshell.de . (Winshell and MikTeX) Colin Rundel [email protected]Presentations with L A T E X UCLA SCC
18
Embed
Presentations with LaTeX - UCLA Statistical Consultingscc.stat.ucla.edu/page_attachments/0000/0089/present-latex-1-09S.pdf · Slideshow Console and errors 2 Basic Structure 3 Fonts
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Getting started Basic Structure Fonts Colors Overlays Local Structures Figures Buttons More Exercises
UCLA Department of StatisticsStatistical Consulting Center
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]
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.
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.
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.
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.
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
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})
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.
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
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)
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.
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.
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
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
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 .
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).