Hartwork site:
www.hartwork.org/beamer-theme- matrixYou can wrap text areas in blocks. The background colours can be defined using colour themes
You can add title graphics to your title slide. You can set the width and height based on the percentage of the text blocks Author information, like name and institution, gets formatted based on the selected theme. Colours are based on the selected colour theme
Customise LaTeX’s beamer class to get
the professional look you need for your
next presentation
Create professional
01
Getting beamerThe fi rst step is to get beamer installed on your system. Most distributions will have it included in the package management system. For example, in Ubuntu, you would install it with ‘sudo apt-get install latex-beamer’. Your other option is to download the source code from the Bitbucket site and build it yourself.
02
Setting the classIn order to use beamer, you need to defi ne your document class in the preamble. You can set the font size for the text in the presentation. If you want handouts, you can set this option for the document class. While you are writing, you can use the ‘draft’ option to speed up compiling the slides.
03
Opening a documentYour presentation slides are considered a document by LaTeX. All of the slides will be contained within a section called ‘document’. This means that you will need a ‘\begin{document}’ statement and an ‘\end{document}’. All of your actual slide contents will be between these two statements.
04
Creating a title slideTo generate your title slide, you will need to set the values of various parameters. You can set the ‘\title{}’, the ‘\author{}’ and ‘\date{}’, among other options. Once all of these options are set, you can create a title slide with the command ‘\titlepage’.
07
Adding imagesThere are several image-handling packages that you can use with beamer. The simplest way to add an image to a slide is with the ‘\includegraphics’ command. You will need to give the path to the image fi le that you are inserting in this slide.
06
Itemised listsYou can add bullet points to your slide by creating an itemised list. This is a section called ‘itemize’. Individual bullet points are started with an ‘\item’ command, where the text of the bullet point follows. Beamer handles the proper formatting of text on your slide.
09
Pausing outputWhen doing a presentation, it is often useful to only present one bullet point at a time. This forces the audience to focus on only the point being discussed. This can be accomplished with the command ‘\pause’. This causes output display to be paused until a key is hit, usually the space bar.
05
Creating your fi rst slideSlides are defi ned as sections named frames. They are bracketed by ‘\begin{frame}’ and ‘\end{frame}’ statements. You can set a title for individual slides with ‘\frametitle{}’. Any options to the frame are added at the end of the ‘\begin{frame}’ line.
10
Text animationsEven more control can be had by adding ‘<a-b>’ as an option to the ‘\item’ command. This will tell LaTeX to only display the item in question from slide a until slide b. For example, if you wanted a particular item to be displayed from slide 2 and onwards, you would use ‘\item<2->’.
08
Setting image sizeBy default, LaTeX simply displays the image full-sized. In most cases, this means
that the image displayed will be larger than the area of the slide. You can add an option to ‘includegraphics’ to either set the width and height, or scale the image by some factor.
16
Adding a logoIn order to add a logo, you can override the defi nition of a frame title with ‘\addtobeamertemplate’. This command needs to go in the preamble and can include text labels, as well as an image fi le for a logo.
11
Adding tablesTables are a bit messier to include in a slide. You need to open with ‘\begin{table}’ and ‘\begin{tabular}…’. On the ‘tabular’ line you need to include cell justifi cation options. You also need to defi ne horizontal lines with ‘\hline’, and column breaks with ‘&’.
14
Picking a themeThe default format for a beamer presentation is rather bland. You can add some pizzazz simply by using a canned theme, a canned colour scheme, or both. This can be done by using ‘\usetheme{}’ and ‘\usecolortheme{}’. Check the beamer theme matrix in the link to see how they interact.
15
Making a PDFIn order to use all of this work, you will need to compile your LaTeX source fi le into some other fi le format. If you use the latex command,
13
Fragile framesIf you try to compile the above example, you will get failures. Whenever you use any verbatim-like section, you need to fl ag that slide as being fragile by adding ‘[fragile]’ to the ‘\begin{frame}’ line.
you will end up with a DVI fi le. You will then need to convert this fi le to some other format, such as PostScript or PDF. However, there is a command that can go straight from the LaTeX source fi le to a PDF fi le. This command is pdfl atex. It also takes care of including the graphics package used by ‘includegraphics’ commands.
12
Code samplesWhen doing presentations about programming, you will need to be able to show code snippets on some of your slides. This can be done by using a ‘lstlisting’ section. This section behaves much like a ‘verbatim’ section, in that what you type is what gets displayed, including whitespace. You will also need to add ‘\usepackage{listings}’ to the preamble of your document.
17
Adding a backgroundYou may want to include an image as a background to your slides. This can be done with the command ‘\setbeamertemplate{background canvas}’, where you can set the background with commands like ‘\includegraphics’. You can also set other template options, like various colours.
20
Adding rounded cornersWhen you include blocks on your slides, you can tell beamer whether or not to use rounded corners. Again, you need to use the ‘\setbeamertemplate’ command with the ‘blocks’ option. You can hand in the sub-option ‘rounded’ in square brackets. This will then apply to all block structures in the fi le.
21
Drop shadowsDrop shadows are a common graphical technique to add more interest to a display. This is an extra option to the ‘\setbeamertemplate’ command, applied to the ‘blocks’ sections. This option can be combined with the rounded corners option from above. Or, it can be used instead of the rounded corners option.
23
Adding a custom footerSome themes provide a footer line that contains information like the slide number, the name of the author, the title of the presentation and other details. However, not all themes do. You can add it to themes that don’t normally have it by using the command ‘\useoutertheme{infolines}’.
24
Where to now?As you can see, almost all options in beamer are customisable. We’ve only had time to look at a few of the most common options that most people will be interested in. But looking at the documentation, you will be able to make beamer do exactly what’s needed to make the presentation look and feel the way you want.
18
Changing the default colourInstead of using one of the preset