1

I sometimes run into a strange problem when compiling my beamer slides for handouts. I can't figure out what causes some slides to have a white font on a white background. I observe this randomly, but it can't be.

I have 3 files, one containing the slides, one to compile my version of the slides and one for the handouts to students.

Main file

%!TEX TS-program = xelatex
\usetheme{metropolis}
%usepackage[francais]{babel}
\usepackage[utf8]{inputenc}

\title[The title]{The title}
\author{Me}
\institute[UoSomewhere]{\inst{}Uiversity of somewhere}

\date[\today]{Hello}

\begin{document}
% ---------------------------------------------
\begin{frame}
\frametitle{First slide} 
Test 1
\end{frame}

% -------------------------------------------
\begin{frame}
\frametitle{Second slide} 
Test 2
\end{frame}

% -------------------------------------------
\begin{frame}
\frametitle{Third slide} 
Test 3
\end{frame}

\end{document} 

My file

%!TEX TS-program = xelatex

\documentclass[compress,noflama,10pt]{beamer}
\input{Main.tex}

The student's file

%!TEX TS-program = xelatex

\documentclass[compress, noflama, 10pt, handout]{beamer}
\usepackage{pgfpages}


\mode<handout>{
    \pgfpagesuselayout{4 on 1}[border shrink=5mm]
    \setbeamertemplate{note page}{%
        \fontsize{12pt}{32pt}\selectfont
        Notes
        
        \rule{\textwidth}{1pt} \rule{\textwidth}{1pt} \rule{\textwidth}{1pt} \rule{\textwidth}{1pt} \rule{\textwidth}{1pt} \rule{\textwidth}{1pt} \rule{\textwidth}{1pt} \rule{\textwidth}{1pt}\par
    }
    
    \setbeameroption{show notes}
}
\makeatletter 
\def\beamer@framenotesbegin{%   at beginning of slide   
    \gdef\beamer@noteitems{}%   
    \gdef\beamer@notes{{}}% used to be totally  empty. 
}
\makeatother

\setbeameroption{show notes}
\input{Main.tex}

Output for the students enter image description here

The slides are not blank, the text is just not showing. This sometimes happen in the middle of bunch of slides with just one of them being blank. Any idea what could cause this?

3
  • Welcome to TeX.SE. The issue is reproducible running \pgfpagesuselayout{N on 1}, where N>1, under Xelatex. It works OK with Lualatex. I suspect low-level pdfspecials are in play as they get inserted into the PDF (e.g., not switching in and out of modes and states in a balanced manner). Lualatex handles specials in a different way (and with a different syntax).
    – Cicada
    Commented Dec 1, 2021 at 13:12
  • Putting \normalcolor before the second and subsequent slides makes the text non-background colour again (i.e., visible). Hardly a practicable solution, but indicating yet more that the foreground/background colour switching is unbalanced (when compiled with xelatex). Idea: perhaps it is balanced, but the switch-back command (=restore) is orphaned on some other page with N-up printing.
    – Cicada
    Commented Dec 1, 2021 at 13:42
  • That fixed it for now. I guess I will have to move my code to something else than xelatex in the near future if I don't want to patch things. Thanks!
    – PatrickD
    Commented Dec 2, 2021 at 13:30

0

Browse other questions tagged .