beamer / doc / beamerug-workflow.tex

% Copyright 2003, 2004 by Till Tantau <>.
% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 2.

\section{Workflow For Creating a Beamer Presentation}


This section presents a possible workflow for creating a \beamer\ 
presentation and possibly a handout to go along with it. Technical
questions are addressed, like which programs to call with 
which parameters.

\subsection{Step One: Setup the Files}

It is advisable that you create a folder for each
presentation. Even though your presentation will usually reside in a
single file, \TeX\ produces so many extra files that things can easily
get very confusing otherwise. The folder's name should ideally start
with the date of your talk in ISO format (like 2003-12-25 for a
Christmas talk), followed by some reminder text of what the talk is
all about. Putting the date at the front in this format causes your
presentation folders to be listed nicely when you have several of them
residing in one directory. If you use an extra directory for each
presentation, you can call your main file |main.tex|. 

To create an initial |main.tex| file for your talk, copy an
existing file from the |beamer/solutions| directory and adapt it to
your needs. A list of possible \beamer\ solutions that contain
templates for presentation \TeX-files can be found below.

If you wish your talk to reside in the same file as some different,
non-presentation article version of your text, it is advisable to
setup a more elaborate file scheme. See
Section~\ref{section-article-version-workflow} for details.

You can either open a new file and then select |beamer| as the
document class or you say ``New from template'' and then use a
template from the directory |beamer/solutions|.

\subsection{Step Two: Structure Your Presentation}

The next step is to fill the presentation file with |\section| and
|\subsection| to create a prelimenary outline. You'll find some hints
on how to create a good outline in

Put |\section| and |\subsection| commands into
the (more or less empty) main file. Do not create any frames until you
have a first working version of a possible table of contents.
The file might look like this:

%% This is the file main.tex


\title{Example Presentation Created with the Beamer Package}
\author{Till Tantau}




\subsection{Overview of the Beamer Class}
\subsection{Overview of Similar Classes}



\end{frame} % to enforce entries in the table of contents


The empty frame at the end (which should be deleted later) ensures
that the sections and subsections are actually part of the table of
contents. This frame is necessary since a |\section| or |\subsection|
command following the last page of a document has no effect.

\subsection{Step Three: Creating a PDF or PostScript File}

Once a first version of the structure is finished, you should try to
create a first PDF or PostScript file of your (still empty) talk to
ensure that everything is working properly. This file
will only contain the title page and the table of contents.
Use ``View'' to check whether the presentation compiles fine. Note
that you must put the table of contents inside a frame, but that the
title page is created automatically.

\subsubsection{Creating PDF}

To create a |PDF| version of this file, run the program
|pdflatex| on |main.tex| at least twice. Your need to run it twice, so
that \TeX\ can create the table of contents. (It may even be necessary
to run it more often since all sorts of auxiliary files are
created.) In the following example, the greater-than-sign is the prompt. 

> pdflatex main.tex
    ... lots of output ...
> pdflatex main.tex
    ... lots of output ...

You can next use a program like the Acrobat Reader or |xpdf|
to view the resulting presentation.

> acroread main.pdf

When printing a presentation using Acrobat, make sure that the option
``expand small pages to paper size'' in the printer dialog is
enabled. This is necessary, because slides are only 128mm times 96mm.

To put several slides onto one page (useful for the handout version)
or to enlarge the slides, you can use the program |pdfnup|. Also, many
commercial programs can perform this task. If you put several slides
on one page and if these slides normally have a white background, it
may be useful to write the following in your preamble:


This will cause the slides of the handout version to have a very
light gray background. This makes it easy to discern the slides'
border if several slides are put on one page.

Choose ``View pdf'' to view your presentation.

\subsubsection{Creating PostScript}

To create a PostScript version, you should first ascertain that the
\textsc{hyperref} package (which is automatically loaded by the
\beamer\ class) uses the option |dvips| or some compatible
option, see the documentation of the \textsc{hyperref} package for
details. Whether this is the case depends on the contents of your
local |hyperref.cfg| file. You can enforce the usage of this
option by passing |dvips| or a compatible option to the
\beamer\ class (write |\documentclass[dvips]{beamer}|), which
will pass this option on to the \textsc{hyperref} package.

You can then run |latex| twice, followed by |dvips|.

> latex main.tex
    ... lots of output ...
> latex main.tex
    ... lots of output ...
> dvips -P pdf main.dvi

The option (|-P pdf|) tells |dvips| to use
Type~1 outline fonts instead of the usual Type~3 bitmap fonts. You may
wish to omit this option if there is a problem with it. 

If you wish each slide to completely fill a letter-sized page, use the
following commands instead:

> dvips -P pdf -tletter main.dvi -o
> psnup -1 -W128mm -H96mm -pletter

For A4-sized paper, use:

> dvips -P pdf -ta4 main.dvi -o
> psnup -1 -W128mm -H96mm -pa4

In order to create a white margin around the whole page (which is sometimes
useful for printing), add the option |-m 1cm| to the options of

To put two or four slides on one page, use |-2|, respectively
|-4| instead of |-1| as the first parameter for
|psnup|. In this case, you may wish to add the option
|-b 1cm| to add a bit of space around the individual slides. The same
trick as for the \pdf-version can be used to make the borders of
slides more pronounced in the handout version.

You can convert a PostScript file to a pdf file using

> ps2pdf main.pdf

Use ``View Postscript'' to view the PostScript version.

\subsubsection*{Ways of Improving Compilation Speed}

While working on your presentation, it may sometimes be useful to
\TeX\ your |.tex| file quickly and have the presentation contain only
the most important information. This is especially true if you have a
slow machine. In this case, you can do several things to speedup the
compilation. First, you can use the |draft| class option.

  Causes the headlines, footlines, and sidebars to be replaced by
  gray rectangles (their sizes are still computed, though). Many
  other packages, including |pgf| and |hyperref|, also ``speedup''
  when this option is given.

Second, you can use the following command:

\begin{command}{{\includeonlyframes}\marg{frame label list}}
  This command behaves a little bit like the |\includeonly| command:
  Only the frames mentioned in the list are included. All other frames
  are suppressed. Nevertheless, the section and subsection commands
  are still executed, so that you still have the correct navigation
  bars. By labeling the current frame as, say, |current| and then
  saying |\includeonlyframes{current}|, you can work on a single frame

  The \meta{frame label list} is a comma-separated list (without
  spaces) of the names of frames that have been labeled. To label a
  frame, you must pass the option |label=|\meta{name} to the |\frame|
  command or |frame| environment.


{This frame will be included. }

{This frame will not be included. }

\frame{This frame will not be included.}

\againframe{example1} % Will be included

\subsection{Step Four: Create Frames}

Once the table of contents looks satisfactory, start creating frames
for your presentation by adding |frame| environments. You'll find
guidelines on what to put on a frame in

To create a frame, use the style ``BeginFrame''. The frame title
is given on the line of this style. The frame ends automatically with
the start of the next frame, with a section or subsection command, and
with an empyt line in the sylte ``EndFrame''. Note that the last frame
of your presentation must be ended using ``EndFrame'' and that the
last frame before the appendix must be ended this way.

\subsection{Step Five: Test Your Presentation}

\emph{Always} test your presentation. For this, you should
vocalize or subvocalize your talk in a quiet environment. Typically,
this will show that your talk is too long. You should then remove
parts of the presentation, such that it fits into the allotted time
slot. Do \emph{not} attempt to talk faster in order to squeeze the
talk into the given amount of time. You are almost sure to loose your
audience this way.

Do not try to create the ``perfect'' presentation immediately. Rather,
test and retest the talk and modify it as needed. 

\subsection{Step Six: Optionally Create a Handout or an Article Version}

Once your talk is fixed, you can create a handout, if this seems
appropriate. For this, use the class option |handout| as
explained in Section~\ref{handout}. Typically, you might wish
to put several handout slides on one page. See
Section~\ref{section-postscript} on how to do this.

You may also wish to create an article version of your talk. An
``article version'' of your presentation is a normal \TeX\ text
typeset using, for example, the document class |article| or perhaps
|llncs| or a similar document class. The \beamer\ class offers
facilities to have this version coexist with your presentation version
in one file and to share code. Also, you can include slides of your
presentation as figures in your article version. Details on how to
setup the article version can be found in

Creating an article version is not really possible in \LyX. You
can \emph{try}, but I would not advise it.