7  Customizing themes

There are a great number of ways in which you can fine-tune the general appearance of a Beamer theme. Here I will describe a few ideas which you may find useful.

Throughout this section, I use the Beamer theme Rochester. You may apply these ideas to any other Beamer theme.

I will start with the plain Rochester theme, and gradually add various options to show their cumulative effect. You don’t have to use all the options at once. Pick the ones that suit your needs.

Remark: The option [height=7mm] (see samples below) specifies the thickness of the horizontal stripe that runs along a Rochester slide’s top edge. Please note that this option is specific to Rochester. It does not apply to other themes.

7.1  The structure color

Most colored parts of a Beamer slide are drawn in an abstract color named the structure. You can change the overall color of a Beamer presentation by changing the structure.

The default structure in the Rochester theme corresponds to a certain shade of blue as you can see here:

\documentclass{beamer} 
\usetheme[height=7mm]{Rochester} 

[image]

Let’s change Rochester’s structure to Brown:

\documentclass[xcolor=dvipsnames]{beamer} 
\usecolortheme[named=Brown]{structure} 
\usetheme[height=7mm]{Rochester} 

The slide changes to:

[image]

Remark: Note how the structure affects many items, including bullets and navigation icons.

Remark: The color “Brown” is one of a large number of color names defined in the file dvipsnam.def which is a part of your LaTeX distribution. Adding the xcolor=dvipsnames option to \documentclass makes those color names available to Beamer. See All about colors for details.

Experiment with various colors to find one that fits best with your style.

7.2  Specifying RGB colors

Should you find the set of colors defined in dvipsnam.def too limited, you may define your own colors by specifying their RGB components. Each RGB component should be in the 0–255 range.

For instance, with RGB={205,173,0} we get a dark shade of gold:

\documentclass{beamer} 
\usecolortheme[RGB={205,173,0}]{structure} 
\usetheme[height=7mm]{Rochester} 

[image]

Remark: On the Department of Mathematics and Statistics machines, the command xcolorsel brings up a very nice tool that shows you a large number of color patches and their RGB components.

Remark: RGB components may be given either as integers in the 0–255 range or as fractional numbers in the 0.00–1.00 range. To specify the latter, use the lowercase version of the rgb option, as in: rgb={0.2264,0.1561,0.0000}.

7.3  Direct use of the structure color

The command \textcolor{red}{a colored text} produces a colored text. Here, the text’s color, red, is hard-coded into our LaTeX source therefore the color is always red—it’s static.

A more interesting dynamic effect is achieved by using the command \structure{a colored text}. The given text will be colored according to the structure color. When you change the structure color, say from blue to gold, the text’s color will change accordingly.

See the section A complete presentation for a sample presentation in which I use the \structure{...} command to produce colored text in several places.

7.4  Changing the itemization markers

The Rochester theme uses square markers for itemized and enumerated lists. The command \setbeamertemplate{items}[ball] changes the markers to simulated 3-dimensional balls, as shown the the following code and the corresponding output:

\documentclass[xcolor=dvipsnames]{beamer} 
\usecolortheme[named=Plum]{structure} 
\usetheme[height=7mm]{Rochester} 
\setbeamertemplate{items}[ball] 

[image]

Possible options to \setbeamertemplate{items} are:

ball:
3-dimensional balls
circle:
2-dimensional (flat) circles
rectangle:
rectangles
default:
triangles

7.5  Rounded boxes and shadows

To add rounded corners and a shadow to the box that surrounds the theorem in the sample slides shown above, do:

\documentclass[xcolor=dvipsnames]{beamer} 
\usecolortheme[named=OliveGreen]{structure} 
\usetheme[height=7mm]{Rochester} 
\setbeamertemplate{items}[ball] 
\setbeamertemplate{blocks}[rounded][shadow=true] 

[image]

To get rounded corners but no shadows, set [shadow=false].

7.6  Getting rid of the navigation icons

Most Beamer themes put a row of navigation icons on slides. (See the little marks along the bottom edge of the slide shown above.) I consider these pretty useless and distracting. To disable the drawing of navigation icons, add the command: \setbeamertemplate{navigation symbols}{} to your document, as in:

\documentclass[xcolor=dvipsnames]{beamer} 
\usecolortheme[named=Apricot]{structure} 
\usetheme[height=7mm]{Rochester} 
\setbeamertemplate{items}[ball] 
\setbeamertemplate{blocks}[rounded][shadow=true] 
\setbeamertemplate{navigation symbols}{} 

[image]

OK, good, they are gone!

7.7  Adding an informative footline

A footline is a narrow strip along the bottom edge of a slide that shows the name of the author, the title of the presentation, slide number, and other useful information.

Beamer themes Boadilla and Madrid provide such a footline by default. Other themes don’t. However it is possible to add a footline to any theme by using the \useoutertheme{infolines} command, as in:

\documentclass[xcolor=dvipsnames]{beamer} 
\usecolortheme[named=Apricot]{structure} 
\useoutertheme{infolines} 
\usetheme[height=7mm]{Rochester} 
\setbeamertemplate{items}[ball] 
\setbeamertemplate{blocks}[rounded][shadow=true] 
\setbeamertemplate{navigation symbols}{} 
\author{Rouben Rostamian} 
\title{Beamer tutorial} 
\institute{UMBC} 

[image]

Remark: It is a Beamer idiosyncrasy (a polite way of saying a bug) that \useoutertheme{infolines} must come before \usetheme[height=7mm]{Rochester}. If you reverse the order, the slide’s title will be cut off.

Remark: Most of the footline information is culled from the data provided in the preamble, such as \author, \title, etc.


I have written an alternative footline theme called umbcfootline. You will find the details of umbcfootline in The UMBC footline. Here is what it looks like:

\documentclass[xcolor=dvipsnames]{beamer} 
\usecolortheme[named=Apricot]{structure} 
\usetheme[height=7mm]{Rochester} 
\setbeamertemplate{items}[ball] 
\setbeamertemplate{blocks}[rounded][shadow=true] 
%\setbeamertemplate{navigation symbols}{}  % see Remark below 
\useoutertheme{umbcfootline} 
\author{Rouben Rostamian} 
\title{Beamer tutorial} 
\institute{UMBC} 

[image]

Remark: The umbcfootline theme disables the navigation symbols, therefore the \setbeamertemplate{navigation symbols}{} is no longer needed. That’s why I have commented it out in the shown code fragment.