4

I am using beamer with XeLaTeX. With every new section I add a dedicated section page to my presentation. Now I started to add notes to my presentation and want to use the show notes on second screen option, because the software I use for presentation works very well with this format. Unfortunately the result is that the content of the frames following a section slide is not shown.

It does work properly with LuaTeX and pdfTeX.

MWE:

\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen}

\AtBeginSection{
    \frame{\insertsectionhead}
}

\begin{document}
\section{My Section}
\begin{frame}{My Frametitle}
    My Content
\end{frame}
\note{
    My Notes
}
\end{document}

Output:

No content shown

Seems like a bug. Any ideas for a fix/workaround?

6
  • Fascinating! In the little preview window on the note slide the content is rendered as it should. Commented Jan 19, 2016 at 18:30
  • Right. I also noticed something else. If you replace My Content with \textcolor{normal text.fg}{My Content} the text also appears on the "main slide".
    – Benjamin
    Commented Jan 19, 2016 at 18:43
  • I just had a closer look at the pdf. "My Content" is actually there, but the font colour is white. Commented Jan 19, 2016 at 20:27
  • Ok, interesting. So here is another thing I noticed: The items of an itemize or enumerate environment are typeset properly. But the items in a description are also white. The same applies to formulas – they are also white.
    – Benjamin
    Commented Jan 19, 2016 at 20:44
  • I think the section-stuff is not relevant to this problem, it also shows in \documentclass{beamer} \usepackage{pgfpages} \setbeameroption{show notes on second screen} \begin{document} \frame{test} \frame{test} \end{document} Commented Jan 19, 2016 at 21:05

1 Answer 1

6

Its seems something with the font colour is broken, so that the text is displayed in white.

Workaround

Reset the font colour in every frame. The following code adds \usebeamercolor[fg]{normal text} to the definition of a slide (taken from beamerbaseframe.sty).

\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen}

\AtBeginSection{
    \frame{\insertsectionhead}
}

\makeatletter

\renewenvironment{beamer@frameslide}{%
    \ifbeamer@autobreak\else%
    \ifx\beamer@againname\@empty%
    {\let\@elt\beamer@restorecounter\beamer@overlaycounterresets}%
    \else%
    {\let\@elt\beamer@labelrestorecounter\beamer@overlaycounterresets}%
    \fi%
    \fi%
    \global\c@beamerpauses=1\relax%
    \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{%
        \stepcounter{subsectionslide}%
        \xdef\beamer@framestartpage{\the\c@page}% only first time
    }{\clearpage\beamer@notesactions}% cleanup from previous slide
    \hypersetup{pdfpagetransition=R}%
    \hypersetup{pdfpageduration=}%
    \@ifundefined{thispdfpagelabel}{}{%
        \thispdfpagelabel{\insertframenumber}}%
    \xdef\beamer@frameendpage{\the\c@page}% every time
    \beamer@setuplinks%
    \beamer@displaybreak%
    \global\setbox\beamer@zoombox=\box\voidb@x%
    \def\beamer@zoomer{}%
    \beamer@slidehaszoomfalse%
    \gdef\insertframetitle{}%
    \gdef\insertframesubtitle{}%
    \gdef\beamer@frametitle{}%
    \gdef\beamer@shortframetitle{}%
    \gdef\beamer@framesubtitle{}%
    \let\beamer@startcomment=\beamer@startcommentinframe%
    % Start slide:
    \usebeamercolor[fg]{normal text}% NEW
    \beamer@framenotesbegin%
    \global\setbox\beamer@framebox=\vbox\bgroup%
    \beamer@inframetrue%
    \let\frame=\framelatex% inside frames, use LaTeX's \frame command
    \begin{beamer@framepauses}%
        \refcounter{framenumber}%use frame number for  \label
        \ifbeamer@shrink%
        \hsize=\beamer@shrinkfactorinv\hsize%
        \textwidth=\beamer@shrinkfactorinv\textwidth%
        \linewidth=\beamer@shrinkfactorinv\linewidth%
        \fi%
        % Insert labels if necessary:
        \ifx\beamer@againname\@empty\else%
        \nointerlineskip\vbox to0pt{\vss%
            \label<\the\beamer@slideinframe>{\beamer@againname<\the\beamer@slideinframe>}%
            \ifnum\beamer@slideinframe=1\relax%
            \label<1>{\beamer@againname}%
            \fi%
        }\nointerlineskip%
        \fi%
        \ifx\beamer@framehypertargets\@empty\else%
        \nointerlineskip\vbox to0pt{\vss%
            \beamer@framehypertargets%
            \global\let\beamer@framehypertargets\@empty%
        }\nointerlineskip%
        \fi%
        \vskip-\parskip\vbox{}%
        \beamer@initfirstlineunskip%
        \ifbeamer@plainframe\nointerlineskip\fi%
        \beamer@checkframetitle}%
    {\par
    \end{beamer@framepauses}%
    \egroup%
    \ifx\beamer@frametitle\@empty%
    \setbox\beamer@frametitlebox=\box\voidb@x%
    \else%
    \setbox\beamer@frametitlebox=\vbox{%
        \vbox{}%
        {\parskip0pt\usebeamertemplate***{frametitle}\vskip0.25em}%
    }%
    \fi%
    \ifbeamer@plainframe%
    \beamer@frametextheight=\paperheight%
    \else%
    \beamer@frametextheight=\textheight%
    \fi%
    \advance\beamer@frametextheight by-\ht\beamer@frametitlebox%
    \advance\beamer@frametextheight by-\dp\beamer@frametitlebox%
    \advance\beamer@frametextheight by-\beamer@frametopskip%
    \ifbeamer@shrink%
    \beamer@shrinkframebox%
    \fi%
    \ifx\beamer@zoomer\@empty
    \setbox\beamer@framebox=\vbox{%
        \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%
        \nointerlineskip\unvbox\beamer@frametitlebox%
        \nobreak%
        \ifbeamer@autobreak%
        \vskip\beamer@frametopskipautobreak%
        \else%
        \vskip\beamer@frametopskip%
        \fi%
        \nobreak%
        \nointerlineskip\box\beamer@zoombox\nointerlineskip%
        \nobreak%
        \ifbeamer@slidehaszoom\box\beamer@framebox\else\unvbox\beamer@framebox\fi%
        % bottom skip is added in autobreakframebox
    }%
    \beamer@autobreakframebox%
    \else%
    \beamer@zoomer%
    \fi%
    \beamer@undolabels%
    \beamer@framenotesend%
    \box\beamer@framebox}

\makeatother

\begin{document}
\section{My Section}
\begin{frame}{My Frametitle}
    My Content
    \note{hgv}
\end{frame}

\end{document}

EDIT

In comments @Benjamin suggested this much simpler solution:

\documentclass{beamer}
\usepackage{pgfpages}
\setbeameroption{show notes on second screen}

\AtBeginSection{
    \frame{\insertsectionhead}
}

\makeatletter 
\def\beamer@framenotesbegin{% at beginning of slide
     \usebeamercolor[fg]{normal text}
      \gdef\beamer@noteitems{}% 
      \gdef\beamer@notes{}% 
}
\makeatother

\begin{document}
    \section{My Section}
    \begin{frame}{My Frametitle}
        My Content
        \note{hgv}
    \end{frame}

\end{document}

enter image description here

9
  • Thank you. That seems to work. But why not redefine \def\beamer@framenotesbegin? \makeatletter \def\beamer@framenotesbegin{% at beginning of slide \usebeamercolor[fg]{normal text} \gdef\beamer@noteitems{}% \gdef\beamer@notes{}% } \makeatother This would make the workaround so much shorter. Or do you see any downside of this?
    – Benjamin
    Commented Jan 19, 2016 at 21:08
  • @Benjamin That's probably easier. I just tried out a few locations to change the colour until it worked Commented Jan 19, 2016 at 21:10
  • Just stubled over the same problem -- many thanks for the work around! Did you report the bug to the maintainers at bitbucket.org/rivanvx/beamer/issues ?
    – Florian
    Commented Apr 13, 2016 at 19:03
  • @Florian I don't know if there is a buck report about this, you should ask the OP Benjamin if he filled one. Commented Apr 13, 2016 at 20:02
  • 1
    @Skyork If you need something to look forward: the bug will still be there in TL2020 :) github.com/josephwright/beamer/issues/337 Commented May 19, 2020 at 7:28

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