1

Usually, all pages in beamer documents are generated by frames, but beamer also allows documents without frames or mixed documents. Any content that is not part of a frame is printed nearly as if it would be on a top-aligned frame with the allowframebreaks option. This is especially useful for documents generated from a source that was not meant to be used as presentation. Obviously these "non-frames" do not support overlays, but if one just needs overlays on certain slides, this is not a problem.

However, these "non-frames" do not behave exactly like frames, e.g., the gap between the headline (if any) and the frame content is wider for top-aligned real frames:

\documentclass{beamer}

% \makeatletter
%   \define@key{beamerframe}{t}[true]{% top
%     \beamer@frametopskip=-0.9mm\relax%
%     \beamer@framebottomskip=0pt plus 1fill\relax%
%     \beamer@frametopskipautobreak=\beamer@frametopskip\relax%
%     \beamer@framebottomskipautobreak=\beamer@framebottomskip\relax%
%   }
% \makeatother

\begin{document}
x
\begin{frame}[t]
  x
\end{frame}
\end{document}

The example above creates two pages containing just one x, but the x on the second (the real frame) one is positioned lower. Looking at the beamer internals, this can be circumvented by using a negative \beamer@frametopskip for top-aligned frames (commented out).

This has two drawbacks:

  • Internals may change and thus this code might break in the future.
  • The chosen value for \beamer@frametopskip is a rough guess and likely depends on certain lengths, skips or the theme.

Thus my question: Is there a robust method to make non-frames and top-aligned frames behave as similar as possible, especially w.r.t. the top margin (i.e., headline-content distance)?

If there is none, it would be at least helpful to get the optimal value for \beamer@frametopskip to undo every skip etc. inserted on regular frames.

PS: A solution that handles "non-frames" like regular frames is also fine, I do not need minimal margins, just consistence.

2
  • PPS: The issue does not seem to be related to questions like tex.stackexchange.com/questions/16447/… . There one has different content on the same type of frames, here we have the same content on different kind of "frames".
    – frafl
    Apr 23 '21 at 9:04
  • Possibly related to tex.stackexchange.com/questions/253185/… , but the problem exists with recent beamer (TL 2021) and both skips in the git commit are much larger the the difference here.
    – frafl
    Apr 24 '21 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.