josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.35k stars 139 forks source link

Adjusting text height in own beamer template #890

Closed wollmich closed 4 months ago

wollmich commented 4 months ago

With an older version of the beamer package (from 2022) I was able to adjust the text height in my own beamer template (sty file) using the following code:

% workaround for adjusting the text height
\BeforeBeginEnvironment{frame}{%
  \ifnum\thepage<2 \addtolength{\textheight}{-10pt} \fi%
}

This does not work with the newest version of beamer 3.71 2024-01-06.

Is there another way to change the text height in a beamer template?

samcarter commented 4 months ago

You could add some vertical space to the head- or footline on the first frame. Beamer now automatically recalculates the frame geometry at the start of every frame, so the textheight will be adjusted to take the additional space into account.

samcarter commented 4 months ago

Is the first page meant to be some kind of title page? If yes, you could also use the title page template to shift the content.

wollmich commented 4 months ago

In the older version I just had to adjust the text height on the first page and it was used for all pages.

samcarter commented 4 months ago

Beamer now recalculates the frame geometry at the start of every frame to allow for head- and footlines of different heights

samcarter commented 4 months ago
\documentclass{beamer}

\usepackage{lipsum}
\addtobeamertemplate{footline}{\vskip10pt}{}

\begin{document}

\begin{frame}{Frame Title}
    \lipsum[2]
\end{frame}

\begin{frame}{Frame Title}
    \lipsum[2]
\end{frame}

\end{document}
wollmich commented 4 months ago

Adding some space to to the foot line, solves the problem.