[Tex/LaTex] Creating a handout with the notes on a second screen

beamernotespgfpages

How can I print slides and their accompanying note pages from a second screen as a handout? I try to accomplish this look:

enter image description here

(preferably 3 slides and their 3 note pages per page, the spaces between the slides are not important).


Now when using \pgfpagesuselayout{8 on 1} some slides are missing and the positioning is completely wrong:

\documentclass{beamer}
\usepackage{pgfpages}

\setbeameroption{show notes on second screen} 

\pgfpagesuselayout{8 on 1}

\setbeamercolor{background canvas}{bg=gray}

\begin{document}

    \fontsize{60}{64}\selectfont

    \begin{frame}
         Slide 1
        \note{\fontsize{60}{64}\selectfont Note 1}
    \end{frame}

    \begin{frame}
        Slide 2
        \note{\fontsize{60}{64}\selectfont Note 2}
    \end{frame}

    \begin{frame}
        Slide 3
        \note{\fontsize{60}{64}\selectfont Note 3}
    \end{frame}

\end{document}

enter image description here

If possible I would like to keep \setbeameroption{show notes on second screen}, because of this Beamer section page and show notes for every page question

Best Answer

I would just use pdfnup for the task:

pdfnup --nup 1x3 --no-landscape --scale 0.9 --delta "0 1cm" --no-tidy slides.pdf

yields a file slides-nup.pdf that with the intended layout:

enter image description here

The pdfnup shell script is part of the pdfjam collection, which is included in most Linux distros. For MacOS it is available via MacPorts, fink, or brew. On Windows, it should work together with cygwin or mingw, but I haven't tested that.

However, as pdfjam is just a wrapper around pdflatex and the pdfpages LaTeX package, you could as well employ pdflatex for the task directly (using an extra LaTeX document):

\batchmode
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}

\begin{document}
  \includepdfmerge[nup=1x3,scale=0.9,delta=0 1cm]{slides.pdf,-}
\end{document}

A solution for a reusable template:

For a reusable, platform-independent template using only pdflatex and no external tools, we could improve the above to a generic handout-from-slides generator.

The following assumes that your presentation template is named with a -slides suffix, that is, <presentation>-slides.tex, which will then compile to a file <presentation>-slides.pdf. The following code should be provided as <presentation>-handout.tex.

If one compiles <presentation>-handout.tex, it does the follwing:

  • Checks if <presentation>-slides.pdf does exists and prints an error if not
  • Generates <presentation>-handout.pdf with the respective nup setting.
  • Checks if <presentation>-slides.pdf was recent, that is, not older than <presentation>-slides.tex. Otherwise, it prints a warning.

Users just need to rename <presentation>-slides.tex and <presentation>-handout.tex accordingly and compile them in the "right" order (which is anyway the "natural" oder, as handout production usually comes last...)

% http://tex.stackexchange.com/questions/141194/creating-a-handout-with-the-notes-of-a-second-screen/141294
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}

% We assume that this file is named
%
%    <presentation>-handout.tex
%
% and that the actual material stems from a file
%
%    <presentation>-slides.pdf
%
% which itself is compiled out of the source file
% 
%    <presentation>-slides.tex
%

\newcommand{\jobbasename}{}
\newcommand{\setjobbasename}{%
  \def\split##1-##2!!!{\def\jobbasename{##1}}%
  \expandafter\split\jobname!!!%
}

% after: \jobbasename is <presentation>
\setjobbasename 

\begin{document}
  % Check if <presentation>.pdf does exist, otherwise typeout an error message
  \IfFileExists{\jobbasename-slides.pdf}{%
    % Include the material
    \includepdf[nup=1x3,scale=0.9,delta=0 1cm,pages=-]{\jobbasename-slides.pdf}
    % Check if <presentation.pdf> is older than <presentation.tex> and typeout a warning
    \ifnum\pdfstrcmp{\pdffilemoddate{\jobbasename-slides.pdf}}{\pdffilemoddate{\jobbasename-slides.tex}}<0%
      \typeout{}
      \typeout{WARNING: \jobbasename-slides.pdf seems to be out of date!}
      \typeout{\space\space\space\space\space\space\space\space\space Consider recompiling \jobbasename-slides.tex.}
      \typeout{}
    \fi
  }{%
    \typeout{}
    \typeout{ERROR: \jobbasename-slides.pdf not found!}
    \typeout{\space\space\space\space\space\space\space You need to compile \jobbasename-slides.tex first.}
    \typeout{}
  }
\end{document}