Usually, all pages in beamer documents are generated by frames, but beamer also works with 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.