12

I am trying to transition from powerpoint to beamer for the slides for my class. Powerpoint puts a thumbnail of the slide on the left and any notes associated with the slide on the right of the page. It puts up to 3 slides on the page, stacked. I would like to duplicate this format using beamer.

(the original question had example code, images, etc)

With the help of the comments below, I've been able to achieve what I wanted so I thought I would delete the old/busted version and post the new version that I am happy with. (note that if you are just interested in the note pages, you should focus on the "extractnotes.tex" and "notes.tex". The other files are used to make slides and handouts for my students. I've included them for completeness)

File structure:

  • lesson.tex (the slides that I will use in my presentation).
  • slides.tex (a wrapper around lesson.tex to generate slides).
  • slides.inc (common code that I use in multiple lesson plans).
  • handouts.tex (a wrapper around lesson.tex to make handouts).
  • extractnotes.tex (a wrapper around lesson.tex to write notes to a file).
  • notes.tex (takes the slides.pdf and the information from extractnotes to make my notes pages).

My note pages contain lesson plan information along with the slide notes. I print it on letter paper and use it during the lesson. Shown below are three examples from my notes pages (as this was the issue for this question).

First: A page where the notes are so extensive that only 1 slide fits on the page (note that my code does not deal gracefully when the notes for a slide are longer than a page). ExampleA

Second: A page where the notes for two slides were enough to take up a page. ExampleB

Third: A page where the notes are short enough for 3 slides to fit on a page. enter image description here

Here is (most of) the source code that was used to generate this.

lesson.tex: I'm not including this as it is just a long file of beamer code. This file has just the stuff that goes from \begin{frame} .. to .. \end{frame}

slides.tex:

\documentclass{beamer}
\input{../slides.inc}
\input{lesson.tex}

handouts.tex:

\documentclass[11pt, handout]{beamer}

\input{../slides.inc}

\usepackage{../handoutWithNotes}
\pgfpagesuselayout{3 on 1 with notes}[letterpaper, border shrink=5mm]
\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}

\input{lesson.tex}

extractnotes.tex:

% The purpose of this file is to extract the notes associated with the
% slides into a separate file.  The pdf file made by this tex file is unused.

\documentclass[11pt, notes=only]{beamer}

\input{../slides.inc}

\setbeameroption{show notes}
\setbeamertemplate{note page}[plain] % Beamer manual, section 19.1

% Taken from extract-all-note-tags-from-beamer-as-a-simple-text-file
\newwrite\pdfpcnotesfile

\AtBeginDocument{%
    \immediate\openout\pdfpcnotesfile=beamer.notes
}

\begingroup
    \catcode`\#=12
    \gdef\hashchar{#}%
\endgroup

% define command \pnote{} that works exactly like \note but
% additionally writes notes to file in pdfpc readable format
\newcommand{\pnote}[1]{%
    \begingroup
        \let\#\hashchar
        \immediate\write\pdfpcnotesfile{\unexpanded{\begin{mypage}} {\insertframenumber}}
        \immediate\write\pdfpcnotesfile{\unexpanded{#1}}%
        \immediate\write\pdfpcnotesfile{\unexpanded{\end{mypage}}}
    \endgroup
}

\AtEndDocument{%
    \immediate\closeout\pdfpcnotesfile
}

\renewcommand{\note}{\pnote}

\input{lesson.tex}

notes.tex:

\documentclass[12pt]{article}

\usepackage{adjustbox}
\usepackage{graphicx}

\setlength{\topmargin}{0.0in}
\setlength{\textheight}{10.0in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\headheight}{15pt}
\setlength{\parindent}{0pt}
\setlength{\parskip}{10pt}
\setlength{\headsep}{10pt}
\setlength{\marginparsep}{0.1in}
\setlength{\marginparwidth}{0.5in}

\renewcommand{\rmdefault}{phv}

\newenvironment{mypage}[2][slides.pdf]{%
\noindent Slide #2
\begin{minipage}[t]{0.2in}\rule{0pt}{0pt}\end{minipage}
\adjustbox{valign=t}{\fbox{\includegraphics[page=#2, width=0.4\textwidth]{#1}}}
\begin{minipage}[t]{0.2in}\rule{0pt}{0pt}\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
}{\end{minipage}
  \vspace*{12pt}

}

\begin{document}
\input{beamer.notes}
\end{document}
4
  • An update (I'm learning, so please feel free to correct if I'm wrong): Beamer adjusts the page size to be 4:3 for projecting. Any attempt to use \documentclass{beamer} is going to be stuck by this as it means you cannot use the full paper page unless you somehow wrap it with pgfpages. Even if you do, you going to have slide-sized chunks in your final result. May 18, 2017 at 13:47
  • Ignasi has basically a two-pronged solution: Write the notes to one file with the slides made as normal in a separate PDF file. Then, to make my notes page, merge the notes with the slide images. I can get the text of the notes to a file, and read the slides as Ignasi does below. I need perl to massage the notes to pull it back into LaTex and make a final result. I'm sure someone who knows LaTex better than I do could do something much cleaner. May 18, 2017 at 13:48
  • In the end, no perl needed. I found a stackexchange answer that showed how to extract notes cleanly to a file. See link May 18, 2017 at 16:28
  • You can stop Beamer doing that if you really must. But probably you want to load beamerarticle instead. And then pull in pages from the slides to another file. At least, that's how I'd do it, I suppose. If they don't have to look like the slides, it is a lot easier. Well, if it doesn't have to look like powerpoint, it is easier ;).
    – cfr
    Feb 13, 2018 at 3:09

2 Answers 2

5

I don't know how to extract notes from the original document, but if you accept to work with two files: presentation and notes, the one with notes could be based in sidebyside tcolorboxes where one side is a slide from a previously compiled beamer presentation while you can write notes on the other side.

Following code defines \mypage environment with one default and one mandatory parameters. The default is the name of your presentation file (change beamer with any other name). The mandatory parameter is the number of the slide that you want to comment. The environment's body will the notes corresponding to the slide. It doesn't matter if notes are long or short, they will fit inside a box and every page will contain as many boxes as possible.

\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}

\newenvironment{mypage}[2][beamer]{%
\begin{tcolorbox}[%
    fonttitle=\bfseries, 
    title={Notes to slide #2}, 
    sidebyside,
    sidebyside align=top seam,
    bicolor, 
    ]
\includegraphics[page=#2, width=\linewidth]{#1}
\tcblower}{\end{tcolorbox}}

\begin{document}

\begin{mypage}{1} 
This is a short comment
\end{mypage}

\begin{mypage}{2}
\end{mypage}

\begin{mypage}{3}
\lipsum[2]
\end{mypage}
\end{document}

enter image description here

If you don't want to "waste" paper and ink, use a blankest tcolorbox:

\newenvironment{mypage}[2][beamer]{%
\begin{tcolorbox}[%
    blankest, 
    sidebyside,
    sidebyside align=top seam,
    ]
\includegraphics[page=#2, width=\linewidth]{#1}
\tcblower}{\end{tcolorbox}}

enter image description here

3
  • I understand what you are trying to do here, but my knowledge of latex environments is not quite good enough to make it work. If I cut and paste your text into a file, and replace "beamer" with "slides.pdf" (the output of beamer with 1 slide per page), I get an error message back from LaTex: ! Extra }, or forgotten \endgroup. \endminipage ...pagefalse \color@endgroup \egroup \expandafter \@iiiparbox \... l.18 \begin{mypage}{1} May 18, 2017 at 11:08
  • @ChristopherDonham I don't know what's wrong. May be an old version of tcolorbox or any other file in your system. What TeX are you using?
    – Ignasi
    May 18, 2017 at 14:35
  • Many thanks. You put me on the path to a solution that worked. May 18, 2017 at 16:22
7

I am not sure, if this is what you are looking for, but you can tell pgfpages how many frames you'd like to have on one page.

[In case this is not what you are asking, can you please include a screenshot or similar in your question of what the output should look like?]

\documentclass[11pt]{beamer}

\usetheme{Warsaw}

\author{Christopher Donham}
\date{Fall 2017}
\institute{Community College of Baltimore County}

\setbeameroption{show notes}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{6 on 1}
{
    \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
    \edef\pgfpageoptionwidth{\the\paperheight}
    \def\pgfpageoptionborder{0pt}
}
{
    \pgfpagesphysicalpageoptions
    {%
        logical pages=6,%
        physical height=\pgfpageoptionheight,%
        physical width=\pgfpageoptionwidth%
    }
    \pgfpageslogicalpageoptions{1}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.29\pgfphysicalwidth}{.8333\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{2}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.75\pgfphysicalwidth}{.8333\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{3}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.29\pgfphysicalwidth}{.5\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{4}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{5}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.29\pgfphysicalwidth}{.1667\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{6}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.75\pgfphysicalwidth}{.1667\pgfphysicalheight}%
    }%   
}
\pgfpagesuselayout{6 on 1}[a4paper,border shrink=7mm]
\begin{document}

\title[Math 153 - Day 6]{Normal Distributions}

\begin{frame}
\note{page 1}
\titlepage
\end{frame}

\begin{frame}
\note{page 2}
\titlepage
\end{frame}

\begin{frame}
\note{page 3}
\titlepage
\end{frame}

\end{document}

enter image description here

EDIT 2019:

With pgf version 3.1 or newer (available from https://sourceforge.net/p/pgf/git/ci/master/tree/), the above code can be simplified to

\documentclass[11pt]{beamer}

\usetheme{Warsaw}

\author{Christopher Donham}
\date{Fall 2017}
\institute{Community College of Baltimore County}

\setbeameroption{show notes}
\usepackage{pgfpages}

\pgfpagesuselayout{6 on 1}[a4paper,border shrink=7mm]
\begin{document}

\title[Math 153 - Day 6]{Normal Distributions}

\begin{frame}
\note{page 1}
\titlepage
\end{frame}

\begin{frame}
\note{page 2}
\titlepage
\end{frame}

\begin{frame}
\note{page 3}
\titlepage
\end{frame}

\end{document}
1
  • Thanks for your help. My goal was something that naturally accommodated notes of varying length. I've included three example images from Powerpoint showing what it does as the length of notes gets longer. If I could get Beamer to just not put the automatic \pagebreak (or whatever it is inserting) and let LaTex decide when the page ended, I think it would do what I want. Having said that, in the event that I can't do what I want, yours is a good alternative. May 17, 2017 at 22:06

You must log in to answer this question.

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