4

When a footnote is created in beamer that contains a box whose depth is too great, beamer inserts a blank slide before the slide with the footnote.

MWE

\documentclass{beamer}
\setbox0=\hbox{}
\dp0=1.131ex
\begin{document}
\begin{frame}
\footnote{\box0 }
\end{frame}
\end{document}

If I change the 1.131ex to 1.130ex, there is only one slide.

My actual problem doesn't involve an empty box with an artificial depth (of course). I can work around this issue by putting the material with the too-great depth into a box and set its \dp to 0pt, but this seems like the wrong solution in general.

What is the correct method to prevent an extra slide from being inserted in this case?

TH.
  • 62,639

1 Answers1

4

This briefly worked in beamer v3.55, which can be checked out from https://github.com/josephwright/beamer/releases/tag/v3.55

Workaround for beamer v3.54 or older:

\documentclass{beamer}
\setbox0=\hbox{}
\dp0=1.131ex

\makeatletter \long\def\beamer@doseveralframes#1{% \ifx\beamer@againname@empty\else% % Again stuff \expandafter \gdef\csname beamer@again@\beamer@againname\endcsname{{#1}}% \fi% \beamer@slideinframe=1\relax% \loop% \beamer@anotherslidefalse% \gdef\beamer@doifnotinframe{}% \def\beamer@doifinframe{\begin{beamer@frameslide}% #1% \end{beamer@frameslide}}% \beamer@masterdecode{\beamer@whichframes}% \beamer@donow% \ifbeamer@twoscreenstext% \beamer@dosecondscreennow{#1}% two screen stuff \fi% \ifbeamer@anotherslide \advance\beamer@slideinframe by 1\relax \repeat% \beamer@writeslidentry% \beamer@reseteecodes} \makeatother

\begin{document} \begin{frame} \footnote{\box0 } \end{frame} \end{document}

Workaround for beamer v3.56 or newer:

\documentclass{beamer}
\setbox0=\hbox{}
\dp0=1.131ex

\makeatletter % The main decoding macro tolerates a range of active characters, which % require a little set up. In particular, as an active space is allowed % all of the lines here have to be terminated with "%". The two-step % setup for \beamer@@@temp makes sure everything is expanded and removes % all of the spaces at this stage. \newbox\beamer@decode@box \begingroup \catcode\|=\active \catcode:=\active \catcode\,=\active \catcode.=\active \catcode\+=\active \catcode-=\active \catcode\(=\active \catcode)=\active \catcode\ =\active \xdef\beamer@masterdecode#1{% \noexpand\beamer@localanotherslidefalse% \setbox0=\hbox{% \unexpanded{% \ifnum\catcode|=\active\edef|{\string|}\fi% \ifnum\catcode\:=\active\edef:{\string:}\fi% \ifnum\catcode,=\active\edef,{\string,}\fi% \ifnum\catcode\.=\active\edef.{\string.}\fi% \ifnum\catcode+=\active\edef+{\string+}\fi% \ifnum\catcode\-=\active\edef-{\string-}\fi% \ifnum\catcode(=\active\edef({\string(}\fi% \ifnum\catcode\)=\active\edef){\string)}\fi% \ifnum\catcode\ =\active\edef {\string }\fi}% \edef\noexpand\beamer@@@temp{#1\string|stop\string:0\string|}% \edef\noexpand\beamer@@@temp{\unexpanded{\expandafter\zap@space\beamer@@@temp}% \space\noexpand@empty}% \unexpanded{\expandafter\beamer@decode\beamer@@@temp% \ifbeamer@localanotherslide\aftergroup\beamer@localanotherslidetrue\fi}% }% }% \endgroup \makeatother

\begin{document} \begin{frame} \footnote{\box0 } \end{frame} \end{document}