COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### \if else function to switch between Beamer and [handout]Beamer

• Email
• Follow

Hello,

Is it possible to construct an \if so I can produce a pdf slide show
or handouts with Beamer?

I have a Beamer presentation made up and would like to produce
handouts for the students. I do not want to print out the entire
presentation for them, only the relevant content. For instance, I have
a sequence of slides which sequentially build up to something, for
explanatory purposes, but would be better printed as the completed
product. Can I, using an \if argument, have LaTeX choose between
including a frame or not including a frame depending on the output
form?

Any other solutions to my problem? Suggestions?

Thanks

Tyrone

 0

See related articles to this posting

Hi Tyrone,

> I have a Beamer presentation made up and would like to produce
> handouts for the students. I do not want to print out the entire
> presentation for them, only the relevant content. For instance, I have
> a sequence of slides which sequentially build up to something, for
> explanatory purposes, but would be better printed as the completed
> product. Can I, using an \if argument, have LaTeX choose between
> including a frame or not including a frame depending on the output
> form?

use the \mode-command:

%\documentclass[handout]{beamer}
\documentclass{beamer}
\begin{document}
\mode<presentation>{
\begin{frame}
P1
\end{frame}
}
\mode<handout>{
\begin{frame}
H1
\end{frame}
}
\mode<presentation>{
\begin{frame}
P2
\end{frame}
}
\mode<handout>{
\begin{frame}
H2
\end{frame}
}
\end{document}

If you want a slide only to occur in the presentation and _not_ in the
handout, use \mode<beamer> instead of \mode<presentation>.

HTH, Claas

 0

Thanks, Claas,

Can I select a slide to occur in both the handouts and the
presentation?

Thanks

 0

Hello Claas,

I just tried it and it doesn't work. The <presentation> slides are not
excluded from the hand out. Here is a minimal example of my code:

\documentclass[handout]{beamer}
%\documentclass{beamer}
\def\pdfborderattrs{/border [0 0 0]}
\pdfcompresslevel=9

\usepackage{tikz}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{enumerate}
\usepackage{hyperref}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{textcomp}
\usepackage{mflogo}
\renewcommand*\sfdefault{lcmss}
\renewcommand*\familydefault{\sfdefault}

\usecolortheme{wolverine}
\usefonttheme{professionalfonts}
\setbeamercolor{normal text}{fg=blue}

\beamertemplatetransparentcovereddynamic

\setbeamertemplate{itemize}[itemsep=0pt,parsep=0pt]

\newcommand{\vtiny}{\fontsize{1}{1}\selectfont}
\newcommand{\nvtiny}{\fontsize{6}{10}\selectfont}

\begin{document}

\mode<handout>{
\begin{frame}[plain]\frametitle{Fame X}

This the handout

\end{frame}}

\mode<presentation>{
\begin{frame}[plain]\frametitle{Frame Y}

This is the presentation

\end{frame}}

\end{document}

Thanks


 0

Hi,

> Thanks, Claas,
>
> Can I select a slide to occur in both the handouts and the
> presentation?

Yes. Use \mode<presentation>.

 0

Hi,

> I just tried it and it doesn't work. The<presentation>  slides are not
> excluded from the hand out.

yeah, that's the documented behavior of beamer. Read my last posting:

If you want a slide only to occur in the presentation and _not_ in the
handout, use \mode<beamer> instead of \mode<presentation>.

Kind regards

PS: RTFM! (Section 21)

 0

On Sep 7, 2:53=A0pm, Claas Hemig <claas.he...@tu-clausthal.de> wrote:

> If you want a slide only to occur in the presentation and _not_ in the
> handout, use \mode<beamer> instead of \mode<presentation>.

Thanks! Its working now. I ended up using <handout:0> vs <beamer:0>
with \documentclass[handout, t]{beamer}

I couldn't have found this solution without your help.

Kind regards

 0