Short and long presentations in one beamer document

You can label each frame \begin{frame}[label=both] and then use

\includeonlyframes{<frame label list>}

A sample:

\documentclass{beamer}
%\includeonlyframes{title,both,short1,both1}      %% for short
\includeonlyframes{title,both,long1,long2,both1}  %% for long
\begin{document}

\title{Presentation}
\begin{frame}[label=title]
\titlepage
\end{frame}

\begin{frame}[label=both]{Issue 1} % both
both
\end{frame}

\begin{frame}[label=short1]{Issue 2 - the gist of it} % only short
short 1
\end{frame}

\begin{frame}[label=long1]{Issue 2 - the detailed version } % only long
long 1
\end{frame}

\begin{frame}[label=long2]{Issue 2 - the detailed version, contd.} % only long
long 2
\end{frame}

\begin{frame}[label=both1]{Issue 3} % both
both 1
\end{frame}

% etc.

\end{document}

You could use the environ package to create a new lvframe environment for frames that will appear in the "long version" of the presentation. The frame environment would be used for those in both. A boolean could then be used to switch between the two:

\documentclass{beamer}
\usepackage{environ}

\newif\iflongversion \longversiontrue%change to \longversiontrue to include the frames in the long version
\NewEnviron{lvframe}[3][]{%
    \iflongversion\begin{frame}[environment=lvframe,#1]{#2}{#3}
    \BODY
    \end{frame}\fi}

\begin{document}

\title{Presentation} 
\begin{frame}
\titlepage
\end{frame}

\begin{frame}{Issue 1} % both 
\end{frame}

\begin{frame}{Issue 2 - the gist of it} % only short 
\end{frame}

\begin{lvframe}{Issue 2 - the detailed version }{} % only long
\end{lvframe}

\begin{lvframe}{Issue 2 - the detailed version, contd.}{} % only long
\end{lvframe}

\begin{frame}{Issue 3} % both
\end{frame}

% etc.

\end{document}

Change \longversionfalse to \longversiontrue to get the "long version".

Edit:

The above is the corrected answer based on the comments from the OP and @MickG below. This definition should handle the most common implementations of \begin{frame}, specifically those of the form \begin{frame}[options]{title}{subtitle}. Note that {} is required if the subtitle argument is not wanted (lvframe does not have the same complex optional argument parsing of frame). Also, this will not work if <overlay> is needed.


I manage it with versions package that lets me easily include/exclude possibly many contiguous frames:

\documentclass{beamer}
\usepackage{xifthen}
\usepackage{versions}
%
\newboolean{longversion}
%
% Uncomment the following line to get the long version
% \setboolean{longversion}{true}
%
\ifthenelse{\boolean{longversion}}{%
  \includeversion{longversion}
  \excludeversion{shortversion}
}{%
  \excludeversion{longversion}
  \includeversion{shortversion}
}
\begin{document}

\title{Presentation}
\begin{frame}
\titlepage
\end{frame}

\begin{frame}{Issue 1} % both
\end{frame}

\begin{shortversion}
  \begin{frame}{Issue 2 - the gist of it} % only short
  \end{frame}
\end{shortversion}

\begin{longversion}
  \begin{frame}{Issue 2 - the detailed version } % only long
  \end{frame}

  \begin{frame}{Issue 2 - the detailed version, contd.} % only long
  \end{frame}
\end{longversion}

\begin{frame}{Issue 3} % both
\end{frame}

% etc.

\end{document}

Tags:

Beamer