0

I have read the documentation and there are several other similar questions, e.g. Beamer: handout/article mode - produce multiple copies of a frame with distinct overlay numbers

But I am just not able to figure it out. Please help me. In the handout mode, I expect to have only the slides 3 of frame 1, slide 1 of frame 2, and slide 4 of frame 1. However, it selects slide 4 of frame 1 also for the first page. I also managed to get this result but then I always broke the result for the beamer mode.

% for handout without notes
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,landscape,border shrink=5mm]
% NOT OK: frame1.4, expected frame1.3
% OK: frame2.1
% OK: frame1.4

% for handout with notes
% \documentclass[]{beamer}
% \usepackage{pgfpages}
% \setbeameroption{show notes on second screen=bottom}
% OK: frame1.1
% OK: frame1.2
% OK: frame1.3
% OK: frame2.1
% OK: frame1.4

% for presentation without notes
% \documentclass[]{beamer}
% OK: frame1.1
% OK: frame1.2
% OK: frame1.3
% OK: frame2.1
% OK: frame1.4

\usepackage{fontspec}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}

\usepackage{hyperref}

\author{todo author}
\institute{todo institute}
\date{todo date}
\title{todo title}


\begin{document}
\NoHyper

\begin{frame}<all:0>[label=frameFIRST]
\frametitle{FRAME 1}
\uncover<2>{slide2}\\
\uncover<3>{slide3}\\
\uncover<4>{slide4}
\end{frame}

\mode<beamer>{
    \againframe<beamer:1-3>{frameFIRST}%
}
\mode<handout>{
    \againframe<handout:3>{frameFIRST}%
}

\begin{frame}[label=frameSECOND]
\frametitle{FRAME 2}
foo
\end{frame}

\mode<beamer>{
    \againframe<beamer:4>{frameFIRST}%
}
\mode<handout>{
    \againframe<handout:4>{frameFIRST}%
}

\end{document}
3
  • Your \begin{frame}<all:0>[label=frameFIRST] occurs in the general mode (IIRC, pesentation) and the fore produces thee four slides.According to the manual, you would have to hide them at this step and later load them with the appopriate againframe.
    – Jhor
    Feb 5, 2019 at 15:06
  • If I understand the documentation and other examples properly, all:0 should result in the omission since all is stronger than presentation. What exactly is your suggestion? Replacing all:0 by presentation:0 does not help. Feb 5, 2019 at 16:27
  • I agree, my comment was to early, i did'nt fully understand the question. I seems that the problems comes from the construction of the frame itself.
    – Jhor
    Feb 5, 2019 at 18:24

1 Answer 1

3

Here is an answer, somehow relying on the answer of this question. The key idea is to force beamer to create individual slides even in handout mode. For this purpose your frame 1 must be created as:

\begin{frame}<all:0>[label=frameFIRST]{FRAME 1}
\uncover<all:1>{slide1}\\
\uncover<all:2>{slide2}\\
\uncover<all:3>{slide3}\\
\uncover<all:4>{slide4}
\end{frame}

with the added <all:n> (n \in {1,...,4}, that could also be written <all:+->. Hence the pdflatex-MWE for your problem would be:

\documentclass[handout]{beamer}
%\documentclass{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,landscape,border shrink=5mm]

\begin{document}
\begin{frame}<all:0>[label=frameFIRST]{FRAME 1}
\uncover<all:+->{slide1}\\
\uncover<all:+->{slide2}\\
\uncover<all:+->{slide3}\\
\uncover<all:+->{slide4}
\end{frame}

\mode<beamer>{\againframe<beamer:1-3>{frameFIRST}}
\mode<handout>{\againframe<handout:3>{frameFIRST}}

\begin{frame}[label=frameSECOND]{FRAME 2}
foo
\end{frame}

\mode<beamer>{\againframe<beamer:4>{frameFIRST}}
\mode<handout>{\againframe<handout:4>{frameFIRST}}
\end{document}

In addition we could add tools for the tracking of slides and modes with the definitions:

\makeatletter
\newcommand*{\overlaynumber}{slide \number\beamer@slideinframe}
\makeatother
\mode<handout>{\newcommand\mymode{mode handout}}
\mode<beamer>{\newcommand\mymode{mode beamer}}

and adding in each frame the subtitle:

{\Large \mymode, \overlaynumber}

and adding also the following code to put a frame around the slides

%\usepackage{tikz}
\setbeamertemplate{background canvas}{%
    \tikz\draw(current page.north west) rectangle (current age.south east);%
    }

I get the whole code:

%\documentclass[handout]{beamer}
\documentclass{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,landscape,border shrink=5mm]
%
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}

\usepackage{tikz}%\mode<handout>{%
\setbeamertemplate{background canvas}{%
    \tikz\draw(current page.north west) rectangle (current page.south east);%
    }

\makeatletter
\newcommand*{\overlaynumber}{slide \number\beamer@slideinframe}
\makeatother
\mode<handout>{\newcommand\mymode{mode handout}}
\mode<beamer>{\newcommand\mymode{mode beamer}}

\begin{document}
\NoHyper

\begin{frame}<all:0>[label=frameFIRST]{FRAME 1}{\Large \mymode,  \overlaynumber)}
\uncover<all:+->{slide1}\\
\uncover<all:+->{slide2}\\
\uncover<all:+->{slide3}\\
\uncover<all:+->{slide4}
\end{frame}

\mode<beamer>{\againframe<beamer:1-2>{frameFIRST}}
\mode<handout>{\againframe<handout:3>{frameFIRST}}

\begin{frame}[label=frameSECOND]{FRAME 2}{\Large\mymode, \overlaynumber}
foo
\end{frame}
\mode<beamer>{\againframe<beamer:4>{frameFIRST}}
\mode<handout>{\againframe<handout:4>{frameFIRST}}
\end{document}

yealding in handout mode: enter image description here and in beamer mode (with a slightly modified page range to fit on a single page):enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .