[Tex/LaTex] Short and long presentations in one beamer document

beamer

I look for a sensible way to keep different versions of the same talk in one beamer file: e.g., 15 min and 1 hour versions, where some content is common, but some is not. Is there a nice way to toggle between versions?

\documentclass{beamer}
\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{frame}{Issue 2 - the detailed version } % only long
%\end{frame}

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

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

% etc.

\end{document}

Best Answer

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}