examples of beamer class

Beamer class example 1, beamer class example 2, beamer class example 3, beamer class example 4, beamer class example 5, beamer class example 6, beamer class example 7, beamer class example 8, beamer class example 9, further examples.

Beamer Presentation

This presentation template uses the well-known beamer class and shows how effortless making presentations using LaTeX can be. The template contains extensive commenting which lets you customize your presentation easily, be it to change the layout theme, colors, fonts, font size, text alignment or more. It also features many example slides for virtually any presentation element you may need.

Description

The beamer class is a well-known framework class that enables using LaTeX to create presentations that are highly customizable and easy to write. This template aims to be the definitive beamer template and it does this by containing examples of the most important beamer features as well as by providing examples of virtually every slide element you may need to add to your presentation.

Beamer features a large number of layout themes, primarily named after cities, which act to change the broad layout of the slides. Some are more simple, while others make use of top or side bars to display sections within the presentation and highlight the current slide within them. Beamer also has color themes, which modify the layout themes to change their color in a particular style. For example, the spruce color theme is a light to dark forest green theme reminiscent of a spruce tree. Font themes are mainly used to modify the font styling of structural elements of slides, that is, important thing such as titles, headlines, footlines, sidebars, etc. Finally, inner and outer themes are used to change the styling of elements inside (inner) or outside (outer) the slides. As beamer defines a number of each of the themes described, the template neatly breaks each theme type into blocks and contains all possible options that you can uncomment in turn to see how it changes your presentation.

The template body contains many slides which show examples of common elements used in presentations and how to create them using beamer. This includes things like a presentation table of contents (overview), highlighting text, quotes, lists, colored blocks, multi-column layouts, tables, figures, mathematical theorems/definitions/corollaries/proofs, equations, code and referencing. The template also has examples of creating plain slides with no head and foot lines.

This template was created by Vel .

Current Version

v2.0 (March 8, 2022)

This template is licensed under a CC BY-NC-SA 4.0 license. Click here to see what this license means for your use of the template.

Usage Guide

Compilation.

This template compiles with standard pdflatex. There are no special requirements outside of packages that are supplied with a full distribution of TeX.

Main Presentation Settings

The beamer class implements several class options that make it easy to change major things in your presentation and this section describes the ones that are exposed in this template.

Font Size The first beamer class option you will see at the top of the template is the font size specification. This is set to a default 11pt but you can change this to 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt or 20pt. It is recommended not to use the smallest or largest values unless you have a specific need for them, but otherwise you can adjust the default font size to suit your content. If you have few words in your presentation, increase the value, if you have many, decrease it.

Vertical Alignment The second beamer class option is a simple t that is commented by default. Uncommenting this option will align content within your slides to the top of the slide, rather than vertically centering it as is the default.

Aspect Ratio The third beamer class option is the ability to change the aspect ratio of the slides, i.e. their dimensions or paper size. If you uncomment this option, you can specify a 2, 3 or 4-digit number corresponding to an aspect ratio. The most common one you might want to use is 169 , which corresponds to an aspect ratio of 16:9, the same as in 1080p and 4K screens and projectors. A value of 42 corresponds to 4:2 and 2013 corresponds to 20:13.

Beamer is highly customizable using multiple types of themes, and this template provides examples of every option for every theme type available to make it easy for you to create a presentation that appeals to you. However, for the sake of brevity, many additional options for themes or detailed explanations of everything each theme does are left out of the template. For this information, it is recommended that you consult the beamer documentation .

Layout Themes Beamer layout themes are specified with the \usetheme command and are usually named after cities. All currently implemented themes are present in the template in the SELECT LAYOUT THEME block, so simply uncomment each line in turn to see how they change your presentation.

Color Themes Beamer color themes are specified with the \usecolortheme command and are usually named after animals. All currently implemented themes are present in the template in the SELECT COLOR THEME block, so simply uncomment each line in turn to see how they change your presentation.

Font Themes Beamer font themes are specified with the \usefonttheme command. All currently implemented themes are present in the template in the SELECT FONT THEME & FONTS block, and comments broadly explain what each theme does. This block also specifies the fonts to use for the presentation and provides several additional options in case you would like to modify the main fonts.

Inner Themes Beamer inner themes are specified with the \useinnertheme command and are named after what they do. All currently implemented themes are present in the template in the SELECT INNER THEME block, so simply uncomment each line in turn to see how they change your presentation.

Outer Themes Beamer outer themes are specified with the \useoutertheme command and are named after what they do. All currently implemented themes are present in the template in the SELECT OUTER THEME block, so simply uncomment each line in turn to see how they change your presentation.

Presentation Information

The PRESENTATION INFORMATION block contains a number of commands that let you specify the main information about your current presentation. This includes the title, subtitle, author(s), institute and date. Each of these further allows you to specify a shortened version in the optional parameter, which appears in the slide footers where there is less space. It is recommended that you carefully read the comments next to each command in this block so you understand how to specify your presentation details. You may use several of the commands, particularly \author , \institute and \date to add additional lines to the presentation, such as to include your email address or the conference/meeting name.

Sectioning in beamer is done using standard \section and \subsection commands. Simply add these throughout your presentation to separate it into major sections and subsections. The table of contents or overview slide simply uses the \tableofcontents command to output the sections and subsections at the beginning of your presentation in a nicely formatted list. Several layout themes also show the sectioning information on all slides.

Creating Slides

Broadly, each slide in a beamer presentation is created using a frame environment. Within this environment, the \frametitle and \framesubtitle commands can be used to add a title and subtitle to the slide. Apart from this, slide content is simply written inside the frame environment using standard text and LaTeX commands. Several custom beamer ways of doing things are present, such as specifying multi-column layouts, and you should refer to the relevant example slide in the template to see how to implement these.

Open Template for Free Editing Online

Download template, click here to download or preview a previous version, have a question.

  • Ask a Question at LaTeX.org
  • Report via Email

This page last updated on: March 8, 2022

LaTeX Templates Information

General enquiries [email protected]

Most templates licensed under CC BY-NC-SA 4.0

LaTeX Templates is developed in New Zealand

© Creodocs Limited. All Rights Reserved.

How to create presentations with Beamer

Business presentation

Vector Open Stock. CC BY-SA 3.0.

Beamer is a LaTeX package for generating presentation slide decks. One of its nicest features is that it can take advantage of LaTeX's powerful typesetting system and all the other packages in its ecosystem. For example, I often use LaTeX's listings package in Beamer presentations that include code.

Starting a presentation

To begin a Beamer document, enter:

As you would with any other LaTeX document, add any packages you want to use. For example, to use the listings package, enter:

Place all content inside the document environment:

Beamer documents are usually a sequence of frame environments. Frames that contain code should be marked fragile :

Begin your frames with a title:

Testing your code before you present it

One of the worst feelings in the world is giving a talk and realizing, as you walk through the code, that there is a glaring bug in it—maybe a misspelled keyword or an unclosed brace.

The solution is to test code that is presented. In most presentation environments, this means creating a separate file, writing tests, then copying and pasting.

However, with Beamer, there is a better way. Imagine you have a file named do_stuff.py that contains code. You can write tests for the do_stuff.py code in a second file, which you call test_do_stuff.py , and can exercise it with, say, pytest . However, most of the lines in do_stuff.py lack pedagogic value, like defining helper functions.

To simplify things for your audience, you can import just the lines you want to talk about into the frame in your presentation :

Since you will be talking through those lines (from 8 to 15), you don't need any other content on the slide. Close the frame:

On the next slide, you want to show a usage example for the do_stuff() function you just presented:

You use the same file, but this time you show the lines that call the function. Finally, close the document:

Assuming you have an appropriate Python file in do_stuff.py , this will produce a short two-slide presentation.

Beamer also supports necessary features such as progressive revelation, showing only one bullet at a time to prevent the audience from being distracted by reading ahead.": \pause inside a list will divide bullets into pages:

Creating handouts

My favorite feature in Beamer is that you can set it to ignore everything outside a frame with \documentclass[ignorenonframetext]{beamer} . When I prepare a presentation, I leave off the top (where the document class is declared) and auto-generate two versions of it: one with Beamer that ignores all text outside any frame, which I use for my presentation, and one with a header like:

which generates a handout—a PDF that has all the frames and all the text between them.

When a conference organizer asks me to publish my slides, I include the original slide deck as a reference, but the main thing I like people to have is the handout, which has all the explanatory text that I don't want to include on the slide deck itself.

When creating presentation slides, people often wonder whether it's better to optimize their materials for the presentation or for people who want to read them afterward. Fortunately, Beamer provides the best of both worlds.

Moshe sitting down, head slightly to the side. His t-shirt has Guardians of the Galaxy silhoutes against a background of sound visualization bars.

Related Content

Two people chatting via a video conference app

LyX wiki

Search:   Help

Changing the Way Things Look

16 inner themes, outer themes, and templates.

This section discusses the inner and outer themes that are available in beamer . These themes install certain templates for the different elements of a presentation. The template mechanism is explained at the end of the section.

Before we plunge into the details, let us agree on some terminology for this section. In beamer , an element is part of a presentation that is potentially typeset in some special way. Examples of elements are frame titles, the author’s name, or the footnote sign. The appearance of every element is governed by a template for this element. Appropriate templates are installed by inner and outer themes, where the inner themes only install templates for elements that are typically “inside the main text,” while outer themes install templates for elements “around the main text.” Thus, from the templates’ point of view, there is no real difference between inner and outer themes.

16.1 Inner Themes ¶

An inner theme installs templates that dictate how the following elements are typeset:

• Title and part pages.

• Itemize environments.

• Enumerate environments.

• Description environments.

• Block environments.

• Theorem and proof environments.

• Figures and tables.

• Footnotes.

• Bibliography entries.

In the following examples, the color themes seahorse and rose are used to show where and how background colors are honored. Furthermore, background colors have been specified for all elements that honor them in the default theme. In the default color theme, all of the large rectangular areas are transparent.

\useinnertheme{ default }

  

The default element theme is quite sober. The only extravagance is the fact that a little triangle is used in itemize environments instead of the usual dot.

In some cases the theme will honor background color specifications for elements. For example, if you set the background color for block titles to green, block titles will have a green background. The background specifications are currently honored for the following elements:

• Title, author, institute, and date fields in the title page.

• Block environments, both for the title and for the body.

This list may increase in the future.

\useinnertheme{ circles }

In this theme, itemize and enumerate items start with a small circle. Likewise, entries in the table of contents start with circles.

\useinnertheme{ rectangles }

In this theme, itemize and enumerate items and table of contents entries start with small rectangles.

\useinnertheme [ ⟨ options ⟩ ] { rounded }

In this theme, itemize and enumerate items and table of contents entries start with small balls. If a background is specified for blocks, then the corners of the background rectangles will be rounded off. The following ⟨ options ⟩ may be given:

• shadow adds a shadow to all blocks.

\useinnertheme{ inmargin }

The idea behind this theme is to have “structuring” information on the left and “normal” information on the right. To this end, blocks are redefined such that the block title is shown on the left and the block body is shown on the right.

The code used to place text in the margin is a bit fragile. You may often need to adjust the spacing “by hand,” so use at your own risk.

Itemize items are redefined such that they appear on the left. However, only the position is changed by changing some spacing parameters; the code used to draw the items is not changed otherwise. Because of this, you can load another inner theme first and then load this theme afterwards.

This theme is a “dirty” inner theme since it messes with things that an inner theme should not mess with. In particular, it changes the width of the left sidebar to a large value. However, you can still use it together with most outer themes.

Using columns inside this theme is problematic. Most of the time, the result will not be what you expect.

The indicators for the title page can be adjusted by redefining \inserttitleindicator , \insertauthorindicator , \insertinstituteindicator and \insertdateindicator .

16.2 Outer Themes ¶

An outer theme dictates (roughly) the overall layout of frames. It specifies where any navigational elements should go (like a mini table of contents or navigational mini frames) and what they should look like. Typically, an outer theme specifies how the following elements are rendered:

• The head- and footline.

• The sidebars.

• The logo.

• The frame title.

An outer theme will not specify how things like itemize environments should be rendered—that is the job of an inner theme.

In the following examples the color theme seahorse is used. Since the default color theme leaves most backgrounds empty, most of the outer themes look too unstructured with the default color theme.

\useoutertheme{ default }

The default layout theme is the most sober and minimalistic theme around. It will flush left the frame title and it will not install any head- or footlines. However, even this theme honors the background color specified for the frame title. If a color is specified, a bar occupying the whole page width is put behind the frame title. A background color of the frame subtitle is ignored.

\useoutertheme{ infolines }

This theme installs a headline showing the current section and the current subsection. It installs a footline showing the author’s name, the institution, the presentation’s title, the current date, and a frame count. This theme uses only little space.

The colors used in the headline and footline are drawn from palette primary , palette secondary , and palette tertiary (see Section  17 for details on how to change these).

\useoutertheme [ ⟨ options ⟩ ] { miniframes }

This theme installs a headline in which a horizontal navigational bar is shown. This bar contains one entry for each section of the presentation. Below each section entry, small circles are shown that represent the different frames in the section. The frames are arranged subsection-wise, that is, there is a line of frames for each subsection. If the class option compress is given, the frames will instead be arranged in a single row for each section. The navigation bars draws its color from section in head/foot .

Below the navigation bar, a line is put showing the title of the current subsection. The color is drawn from subsection in head/foot .

At the bottom, two lines are put that contain information such as the author’s name, the institution, or the paper’s title. What is shown exactly is influenced by the ⟨ options ⟩ given. The colors are drawn from the appropriate beamer -colors like author in head/foot .

At the top and bottom of both the head- and footline and between the navigation bar and the subsection name, separation lines are drawn if the background color of separation line is set. This separation line will have a height of 3pt. You can get even more fine-grained control over the colors of the separation lines by setting appropriate colors like lower separation line head .

Note: Make sure the document is organized in the section-subsection-frame structure when using miniframes and smoothbars theme. Any frame without a \section or \subsection will bring unpredictable effects in the navigation bar.

The following ⟨ options ⟩ can be given:

• footline=empty suppresses the footline (default).

• footline=authorinstitute shows the author’s name and the institute in the footline.

• footline=authortitle shows the author’s name and the title in the footline.

• footline=institutetitle shows the institute and the title in the footline.

• footline=authorinstitutetitle shows the author’s name, the institute, and the title in the footline.

• subsection= ⟨ true or false ⟩ shows or suppresses line showing the subsection in the headline. It is shown by default. If the document does not use subsections, this option should be set false .

\useoutertheme [ ⟨ options ⟩ ] { smoothbars }

This theme behaves very much like the miniframes theme, at least with respect to the headline. The only differences are that smooth transitions are installed between the background colors of the navigation bar, the (optional) bar for the subsection name, and the background of the frame title. No footline is created. You can get the footlines of the miniframes theme by first loading that theme and then loading the smoothbars theme.

• subsection= ⟨ true or false ⟩ shows or suppresses line showing the subsection in the headline. It is shown by default.

\useoutertheme [ ⟨ options ⟩ ] { sidebar }

In this layout, a sidebar is shown that contains a small table of contents with the current section, subsection, or subsubsection highlighted. The frame title is vertically centered in a rectangular area at the top that always occupies the same amount of space in all frames. Finally, the logo is shown in the “corner” resulting from the sidebar and the frame title rectangle.

There are several ways of modifying the layout using the ⟨ options ⟩ . If you set the width of the sidebar to 0pt, it is not shown, giving you a layout in which the frame title does not “wobble” since it always occupies the same amount of space on all slides. Conversely, if you set the height of the frame title rectangle to 0pt, the rectangular area is not used and the frame title is inserted normally (occupying as much space as needed on each slide).

The background color of the sidebar is taken from sidebar , the background color of the frame title from frametitle , and the background color of the logo corner from logo .

The colors of the entries in the table of contents are drawn from the beamer -color section in sidebar and section in sidebar current as well as the corresponding beamer -colors for subsections. If an entry does not fit on a single line it is automatically “linebroken.”

The following ⟨ options ⟩ may be given:

• height= ⟨ dimension ⟩ specifies the height of the frame title rectangle. If it is set to 0pt, no frame title rectangle is created. Instead, the frame title is inserted normally into the frame. The default is 2.5 base line heights of the frame title font. Thus, there is about enough space for a two-line frame title plus a one-line subtitle.

• hideothersubsections causes all subsections except those of the current section to be suppressed in the table of contents. This is useful if you have lots of subsections.

• hideallsubsections causes all subsections to be suppressed in the table of contents.

• left puts the sidebar on the left side. Note that in a left-to-right reading culture this is the side people look first. Note also that this table of contents is usually not the most important part of the frame, so you do not necessarily want people to look at it first. Nevertheless, it is the default.

• right puts the sidebar of the right side.

• width= ⟨ dimension ⟩ specifies the width of the sidebar. If it is set to 0pt, it is completely suppressed. The default is 2.5 base line heights of the frame title font.

\useoutertheme{ split }

This theme installs a headline in which, on the left, the sections of the talk are shown and, on the right, the subsections of the current section. If the class option compress has been given, the sections and subsections will be put in one line; normally there is one line per section or subsection.

The footline shows the author on the left and the talk’s title on the right.

The colors are taken from palette primary and palette quaternary .

\useoutertheme{ shadow }

This layout theme extends the split theme by putting a horizontal shading behind the frame title and adding a little “shadow” at the bottom of the headline.

\useoutertheme [ ⟨ options ⟩ ] { tree }

In this layout, the headline contains three lines that show the title of the current talk, the current section in this talk, and the current subsection in the section. The colors are drawn from title in head/foot , section in head/foot , and subsection in head/foot .

In addition, separation lines of height 3pt are shown above and below the three lines if the background of separation line is set. More fine-grained control of the colors of these lines can be gained by setting upper separation line head and lower separation line head .

• hooks causes little “hooks” to be drawn in front of the section and subsection entries. These are supposed to increase the tree-like appearance.

\useoutertheme{ smoothtree }

This layout is similar to the tree layout. The main difference is that the background colors change smoothly.

16.3 Changing the Templates Used for Different Elements of a Presentation ¶

This section explains how beamer ’s template management works.

16.3.1 Overview of Beamer’s Template Management ¶

If you only wish to modify the appearance of a single or few elements, you do not need to create a whole new inner or outer theme. Instead, you can modify the appropriate template.

A template specifies how an element of a presentation is typeset. For example, the frametitle template dictates where the frame title is put, which font is used, and so on.

As the name suggests, you specify a template by writing the exact L a T e X code you would also use when typesetting a single frame title by hand. Only, instead of the actual title, you use the command \insertframetitle .

Example: Suppose we would like to have the frame title typeset in red, centered, and boldface. If we were to typeset a single frame title by hand, it might be done like this:

In order to typeset the frame title in this way on all slides, in the simplest case we can change the frame title template as follows:

We can then use the following code to get the desired effect:

When rendering the frame, beamer will use the code of the frame title template to typeset the frame title and it will replace every occurrence of \insertframetitle by the current frame title.

We can take this example a step further. It would be nicer if we did not have to “hardwire” the color of the frametitle, but if this color could be specified independently of the code for the template. This way, a color theme could change this color. Since this is a problem that is common to most templates, beamer will automatically setup the beamer -color frametitle when the template frametitle is used. Thus, we can remove the \color{red} command if we set the beamer -color frametitle to red at some point.

Next, we can also make the font “themable.” Just like the color, the beamer -font frametitle is installed before the frametitle template is typeset. Thus, we should rewrite the code as follows:

Users, themes, or whoever can now easily change the color or font of the frametitle without having to mess with the code used to typeset it.

In article mode, most of the template mechanism is switched off and has no effect. However, a few templates are also available. If this is the case, it is specially indicated.

Here are a few hints that might be helpful when you wish to set a template:

• Usually, you might wish to copy code from an existing template. The code often takes care of some things that you may not yet have thought about. The default inner and outer themes might be useful starting points. Also, the file beamerbaseauxtemplates.sty contains interesting “auxiliary” templates.

• When copying code from another template and when inserting this code in the preamble of your document (not in another style file), you may have to “switch on” the at-character ( @ ). To do so, add the command \makeatletter before the \setbeamertemplate command and the command \makeatother afterward.

• Most templates having to do with the frame components (headlines, sidebars, etc.) can only be changed in the preamble. Other templates can be changed during the document.

• The height of the headline and footline templates is calculated automatically. This is done by typesetting the templates and then “having a look” at their heights. This recalculation is done right at the beginning of the document, after all packages have been loaded and even after these have executed their \AtBeginDocument initialization.

• Getting the boxes right inside any template is often a bit of a hassle. You may wish to consult the T e X book for the glorious details on “Making Boxes.” If your headline is simple, you might also try putting everything into a pgfpicture environment, which makes the placement easier.

16.3.2 Using Beamer’s Templates ¶

As a user of the beamer class you typically do not “use” or “invoke” templates yourself, directly. For example, the frame title template is automatically invoked by beamer somewhere deep inside the frame typesetting process. The same is true of most other templates. However, if, for whatever reason, you wish to invoke a template yourself, you can use the following command.

\usebeamertemplate *** { ⟨ element name ⟩ }

If none of the stars is given, the text of the ⟨ element name ⟩ is directly inserted at the current position. This text should previously have been specified using the \setbeamertemplate command. No text is inserted if this command has not been called before.

If you add one star, three things happen. First, the template is put inside a T e X -group, thereby limiting most side effects of commands used inside the template. Second, inside this group the beamer -color named ⟨ element name ⟩ is used and the foreground color is selected. Third, the beamer -font ⟨ element name ⟩ is also used. This one-starred version is usually the best version to use.

If you add a second star, nearly the same happens as with only one star. However, in addition, the color is used with the command \setbeamercolor* . This causes the colors to be reset to the normal text color if no special foreground or background is specified by the beamer -color ⟨ element name ⟩ . Thus, in this twice-starred version, the color used for the template is guaranteed to be independent of the color that was currently in use when the template is used.

Finally, adding a third star will also cause a star to be added to the \setbeamerfont* command. This causes the font used for the template also to be reset to normal text, unless the beamer -font ⟨ element name ⟩ specifies things differently. This three-star version is the “most protected” version available.

\ifbeamertemplateempty { ⟨ beamer template name ⟩ }{ ⟨ executed if empty ⟩ }{ ⟨ executed otherwise ⟩ }

This command checks whether a template is defined and set to a non-empty text. If the text is empty or the template is not defined at all, ⟨ executed if empty ⟩ is executed. Otherwise, ⟨ executed otherwise ⟩ is executed.

\expandbeamertemplate { ⟨ beamer template name ⟩ }

This command does the same as \usebeamertemplate { ⟨ beamer template name ⟩ }. The difference is that this command performs a direct expansion and does not scan for a star. This is important inside, for example, an \edef . If you don’t know the difference between \def and \edef , you won’t need this command.

16.3.3 Setting Beamer’s Templates ¶

To set a beamer -template, you can use the following command:

\setbeamertemplate { ⟨ element name ⟩ } [ ⟨ predefined option ⟩ ] ⟨ args ⟩

In the simplest case, if no ⟨ predefined option ⟩ is given, the ⟨ args ⟩ must be a single argument and the text of the template ⟨ element name ⟩ is setup to be this text. Upon later invocation of the template by the command \usebeamertemplate this text is used.

If you specify a ⟨ predefined option ⟩ , this command behaves slightly differently. In this case, someone has used the command \defbeamertemplate to predefine a template for you. By giving the name of this predefined template as the optional parameter ⟨ predefined option ⟩ , you cause the template ⟨ element name ⟩ to be set to this template.

Example: \setbeamertemplate{bibliography item}[book] causes the bibliography items to become little book icons. This command causes a subsequent call of \usebeamertemplate{bibliography item} to insert the predefined code for inserting a book.

Some predefined template options take parameters themselves. In such a case, the parameters are given as ⟨ args ⟩ .

Example: The ⟨ predefined option ⟩ grid for the template background takes an optional argument:

In the example, the second argument in square brackets is the optional argument.

In the descriptions of elements, if there are possible ⟨ predefined option ⟩ , the description shows how the ⟨ predefined option ⟩ can be used together with its arguments, but the \setbeamertemplate{xxxx} is omitted. Thus, the above example would be documented in the description of the background element like this:

• [ grid ] [ ⟨ step options ⟩ ] causes a light grid to be …

\addtobeamertemplate { ⟨ element name ⟩ }{ ⟨ pre-text ⟩ }{ ⟨ post-text ⟩ }

This command adds the ⟨ pre-text ⟩ before the text that is currently installed as the template ⟨ element name ⟩ and the ⟨ post-text ⟩ after it. This allows you a limited form of modification of existing templates.

Example: The following commands have the same effect:

If a new template is installed, any additions will be deleted. On the other hand, you can repeatedly use this command to add multiple things.

\defbeamertemplate < ⟨ mode specification ⟩ > * { ⟨ element name ⟩ }{ ⟨ predefined option ⟩ } [ ⟨ argument number ⟩ ] [ ⟨ default optional argument ⟩ ] { ⟨ predefined text ⟩ } [action] { ⟨ action command ⟩ }

This command installs a predefined option for the template ⟨ element name ⟩ . Once this command has been used, users can access the predefined template using the \setbeamertemplate command.

Example: \defbeamertemplate{itemize item}{double arrow}{$\Rightarrow$}

After the above command has been invoked, the following two commands will have the same effect:

Sometimes, a predefined template needs to get an argument when it is installed. Suppose, for example, we want to define a predefined template that draws a square as the itemize item and we want to make this size of this square configurable. In this case, we can specify the ⟨ argument number ⟩ of the predefined option the same way one does for the \newcommand command:

As for the \newcommand command, you can also specify a ⟨ default optional argument ⟩ :

The starred version of the command installs the predefined template option, but then immediately calls \setbeamertemplate for this option. This is useful for the default templates. If there are any arguments necessary, these are set to \relax .

In certain cases, if a predefined template option is chosen, you do not only wish the template text to be installed, but certain extra “actions” must also be taken once. For example, a shading must be defined that should not be redefined every time the shading is used later on. To implement such “actions,” you can use the optional argument ⟨ action ⟩ following the keyword [action] . Thus, after the normal use of the \defbeamertemplate you add the text [action] and then any commands that should be executed once when the ⟨ predefined option ⟩ is selected by the \setbeamertemplate command.

Normally, this command has no effect in article mode. However, if a ⟨ mode specification ⟩ is given, this command is applied for the specified modes. Thus, this command behaves like the \\ command, which also gets the implicit mode specification <presentation> if no other specification is given.

Example: \defbeamertemplate{my template}{default}{something} has no effect in article mode.

Example: \defbeamertemplate<article>{my template}{default}{something} has no effect in presentation modes, but has an effect in article mode.

Example: \defbeamertemplate<all>{my template}{default}{something} applies to all modes.

It is often useful to have access to the same template option via different names. For this, you can use the following command to create aliases:

\defbeamertemplatealias { ⟨ element name ⟩ }{ ⟨ new predefined option name ⟩ }{ ⟨ existing predefined option name ⟩ }

Causes the two predefined options to have the same effect.

There is no inheritance relation among templates as there is for colors and fonts. This is due to the fact the templates for one element seldom make sense for another. However, sometimes certain elements “behave similarly” and one would like a \setbeamertemplate to apply to a whole set of templates via inheritance. For example, one might want that \setbeamertemplate{items}[circle] causes all items to use the circle option, though the effects for the itemize item as opposed to the itemize subsubitem as opposed to enumerate item must be slightly different.

The beamer -template mechanism implements a simple form of inheritance via parent templates . In element descriptions, parent templates are indicated via a check mark in parentheses.

\defbeamertemplateparent { ⟨ parent template name ⟩ } [ ⟨ predefined option name ⟩ ] { ⟨ child template list ⟩ } [ ⟨ argument number ⟩ ] [ ⟨ default optional argument ⟩ ] { ⟨ arguments for children ⟩ }

The effect of this command is that whenever someone calls \setbeamertemplate{ ⟨ parent template name ⟩ }{ ⟨ args ⟩ } , the command \setbeamertemplate{ ⟨ child template name ⟩ }{ ⟨ args ⟩ } is called for each ⟨ child template name ⟩ in the ⟨ child template list ⟩ .

The ⟨ arguments for children ⟩ come into play if the \setbeamertemplate command is called with a predefined option name (not necessarily the same as the ⟨ predefined option name ⟩ , we’ll come to that). If \setbeamertemplate is called with some predefined option name, the children are called with the ⟨ arguments for children ⟩ instead. Let’s look at two examples:

Example: The following is the typical, simple usage:

Example: In the following case, an argument is passed to the children:

In detail, the following happens: When \setbeamertemplate is encountered for a parent template, beamer first checks whether a predefined option follows. If not, a single argument is read and \setbeamertemplate is called for all children for this template. If there is a predefined template option set, beamer evaluates the ⟨ argument for children ⟩ . It may contain parameters like #1 or #2 . These parameters are filled with the arguments that follow the call of \setbeamertemplate for the parent template. The number of arguments must be the number given as ⟨ argument number ⟩ . An optional argument can also be specified in the usual way. Once the ⟨ arguments for the children ⟩ have been computed, \setbeamertemplate is called for all children for the predefined template and with the computed arguments.

You may wonder what happens when certain predefined options take a certain number of arguments, but another predefined option takes a different number of arguments. In this case, the above-described mechanism cannot differentiate between the predefined options and it is unclear which or even how many arguments should be contained in ⟨ arguments for children ⟩ . For this reason, you can give the optional argument ⟨ predefined option name ⟩ when calling \defbeamertemplateparent . If this optional argument is specified, the parenthood of the template applies only to this particular ⟨ predefined option name ⟩ . Thus, if someone calls \setbeamertemplate for this ⟨ predefined option name ⟩ , the given ⟨ argument for children ⟩ is used. For other predefined option names a possibly different definition is used. You can imaging that leaving out the optional ⟨ predefined option name ⟩ means “this ⟨ argument for children ⟩ applies to all predefined option names that have not been specially defined differently.”

LaTeX Beamer

Your Guide to Beamer Blocks

' src=

1. Create a Simple block in Beamer

2. main styles of blocks in beamer, 3. german block environment, 4. customization and basic blocks, 5. change colors of blocks.

It can be useful to treat some content differently by putting it into a block. In Beamer, we can separate a specific section of text or graphics from the rest of the frame using “ block ” environment:

We used Madrid theme for our presentation and inside a frame we added a block environment with title “ Block title “. Here is the obtained result:

Simple block beamer Madrid theme

It should be noted that the block style depends on the used theme and theme color. Let us consider the same code as above and we change only the them to Bergen . The obtained result is shown below:

Simple block beamer Bergen theme

There are three basic types of blocks : Standard/Generic block , Alert block , and Example block . There are also special blocks for math environments like Theorem , Definition , Proof , Corollary , Example , etc.

The following table illustrates different blocks with sample code syntax in beamer:

Here is an example code using different types of blocks in a Beamer presentation:

Compiling this code yields the following:

Basic Blocks in Beamer

Using Boadilla theme instead of Copenhagen , we get the following style for different beamer blocks:

Basic Blocks in Beamer Boadilla

Here is an illustrative example:

This code yields the following:

Basic german Blocks in Beamer AnnArbor

In this example, we used AnnArbor theme and you may remarked the frame option [fragile] which allows us to use verbatim style inside a frame.

We can modify blocks’ shapes by playing with the command: \setbeamertemplate{blocks}[Options] . Here are available pre-defined options for this command:

  • [default] : This default value typesets the block title on its line.
  • [rounded] : makes the blocks’ corners rounded.
  • [shadow=true] : If the shadow is set as true, a shadow is portrayed behind the block.

Here is the output:

Default style for blocks in Beamer

From above , we know that blocks’ style depends on the used theme and In this part, we will learn how to change the blocks colors without changing the theme.

In the next example, we changed colors of standard block, alert block and example block. Check the obtained result:

Change color of blocks in Beamer

And here is piece of codes of each block customization:

-1- Customize standard block colors

-2- customize alert block colors, -3- customize example block colors.

The fill code of the above image is:

  • Beamer provides different blocks to highlight ideas and present results. This includes standard blocks, alert blocks and example blocks.
  • For mathematicians, we have blocks for: theorems , corollaries , proofs , lemmas and much more!
  • We can change the color of each block which consists of a title and body parts using the command \setbeamercolor .
  • We can also change the block style: rounded corners and add shading which is achieved by the command \setbeamertemplate .

Next Lesson:  08 Beamer Themes — Full List

IMAGES

  1. Getting Started with Beamer: Tips and Tricks for LaTeX Presentations

    beamer presentation examples

  2. Beamer Presentation Template

    beamer presentation examples

  3. How to Create Beautiful Beamer Slides with Emacs

    beamer presentation examples

  4. Beamer Presentations: A Tutorial for Beginners (Part 5)—Themes and

    beamer presentation examples

  5. Writing Beamer presentations in org-mode

    beamer presentation examples

  6. Beamer Presentation Template

    beamer presentation examples

VIDEO

  1. Steel beam design for bending Example 7 Part 1

  2. ISE 2017: Crowd Beamer Exhibits BYOD Presentation Solution

  3. Beamer went Krazy full vid out now #foryou #automobile #subscribe #racing #roadto1k #bmw

  4. Optoma HD600X

  5. Beamer rev battle

  6. Predefined Boxes in Beamer Presentation

COMMENTS

  1. Beamer Presentations: A Tutorial for Beginners (Part 1 ...

    This five-part series of articles uses a combination of video and textual descriptions to teach the basics of creating a presentation using the LaTeX beamer package. These tutorials were first published on the original ShareLateX blog site during August 2013; consequently, today's editor interface (Overleaf) has changed considerably due to the ...

  2. PDF Fun with Beamer

    Adding that Sparkle. Sections Themes. Beamer is a exible L ATEX class for making slides and presentations. It supports functionality for making PDF slides complete with colors, overlays, environments, themes, transitions, etc. Adds a couple new features to the commands you've been working with. Beamer is a exible L ATEX class for making slides ...

  3. A simple guide to Beamer- Step by Step

    Lesson 1 - Your First LaTeX Presentation-Title Page. Lesson 2 - Add and Position a Logo in Beamer. Lesson 3 - Create a Table of Contents in Beamer. Lesson 4 - Eight Beamer Environments you Should be Familiar With! Lesson 5 - Lists in Beamer - Complete Guide. Lesson 6 - Create and Customize Columns in Beamer. Lesson 7 - Your ...

  4. LaTeX Beamer introduction / Quick-start guide

    The minimal code of a LaTeX presentation includes: 1) loading the beamer class package, 2) choosing a default presentation theme and a frame. Here is an example: Copy to clipboard. % Quick start guide. \documentclass{beamer} \usetheme{default} \begin{document} \begin{frame} This is your first presentation!

  5. PDF A Guide to Presentations in LaTeX-beamer

    Intro to LATEX Intro to Beamer Geometric Analysis A Proof MPT - presentation A friendly introduction Theorem (Finite Dimensional MPT, Courant) Suppose that ϕ ∈ C1(Rn,R) is coercive and possesses two distinct strict relative minima x1 and x2.Then ϕ possesses a third critical

  6. Beamer

    The same as obstruct but the type contrasts the one used by the presentation. \begin{examples} \end{examples} Again, is very similar to block, the box has a different style nevertheless get contrasting than alertblock. Customizing your presentation. It are some aspects of a Beamer presentation that can be easily customized. Since instance, you ...

  7. For Beautiful Presentations

    Easy customization of Beamer Themes, which allow you to change the appearance of your presentation to accomplish your purposes. For example, users can change layouts, colors, fonts, bullet styles in any presentation globally. Beamer handles theorems, proofs, definitions, and itemization in a structured approach, along with flexible customization.

  8. beamer class examples example for presentation with latex beamer class

    beamer class example 1. Here an example of a very simple Beamer presentation. One can use it as starting point, the following examples develops on it. For the sake of completeness it is also there. example-1.pdf. example-1.tex. example-1.html.

  9. PDF Beamer by Example

    head slides" for presentations. One of these, beamer, provides flexible and powerful environments which can be used to create slides and PDF-based documents suitable for presentations. Although the class is extensively doc-umented, first-time users may prefer learning about this class using a col-lection of graduated examples.

  10. LaTeX Templates

    Description. The beamer class is a well-known framework class that enables using LaTeX to create presentations that are highly customizable and easy to write. This template aims to be the definitive beamer template and it does this by containing examples of the most important beamer features as well as by providing examples of virtually every slide element you may need to add to your presentation.

  11. How to create presentations with Beamer

    Starting a presentation. To begin a Beamer document, enter: \documentclass{beamer} As you would with any other LaTeX document, add any packages you want to use. For example, to use the listings package, enter: \usepackage{listings} Place all content inside the document environment: \begin{document} Beamer documents are usually a sequence of ...

  12. PDF Presentations Using LATEX

    Introduction Code Beamer Features More LATEX Themes Five Theme Categories 1 Presentation (the slide template) 2 Color∗ (color scheme for slide template) 3 Font∗ 4 Inner∗ (how you want bullets, boxes, etc. to look) 5 Outer∗ (how you want the top/bottom of frames to look) ∗ if you don't like the default of the Presentation Theme Example \documentclass[compress, red]{beamer}

  13. beamer

    100. I recently had to persuade a fellow student that you can create beautiful presentations with LaTeX and beamer. Luckily, I already had some examples. But I'm sure that there are better presentations, not necesarily done with beamer but with TeX and related systems. I remembered that I saw some beautiful examples in other questions.

  14. Beamer Themes

    The following code is used to generate the Beamer presentation for different themes. It includes a title page, an outline frame, lists and blocks frames. ... This block presents alert message. \end{alertblock} \begin{exampleblock}{An example of typesetting tool} Example: MS Word, \LaTeX{} \end{exampleblock} \end{frame} \end{document} 1. Default ...

  15. Including Animations Into LaTeX Beamer Presentations

    Animation is the process of creating an illusion of motion or movement and rapidly showing a sequence of static figures that are (slightly) different.Including animations in LaTeX Beamer can make our presentation more visually appealing and capture the attention of our audience. For example, to advertise a new vehicle, including animation of the product would capture the attention of our ...

  16. LyX wiki

    Example presentations using Beamer Beamer is a LaTeX class to produce presentations. It behaves similarly to other LaTeX packages like Prosper, but has the advantage that it works together directly with pdflatex and with dvips. The beamer class has several useful features: You don't need any external programs to use it other than pdflatex or dvips.

  17. Inner Themes, Outer Themes, and Templates

    In beamer, an element is part of a presentation that is potentially typeset in some special way. Examples of elements are frame titles, the author's name, or the footnote sign. Examples of elements are frame titles, the author's name, or the footnote sign.

  18. Your Guide to Beamer Blocks

    Here is an example code using different types of blocks in a Beamer presentation: % Different styles of blocks \documentclass{beamer} % Theme choice \usetheme{Copenhagen} \begin{document} % Frame 1 \begin{frame}{Basic Blocks} \begin{block}{Standard Block} This is a standard block.