I wrote a custom beamer style. The frame titles height is larger than the standard one. Due to this the frame moves downward over the foot-line and the lower border.
How can I correct the frame height to stay between frame-title and foot-line using \defbeamertemplate or similar?
An example presentation
\documentclass[10pt,aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usetheme{mwe}
\author{an Author}
\title{a Title}
\subtitle{a subtitle}
\date{\today}
%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{frame}{title}
\begin{tikzpicture}
\draw [very thick] (0,0)rectangle(\textwidth,\textheight);
\end{tikzpicture}
\end{frame}
\end{document}
beamerthememwe.sty
\mode<presentation>
\RequirePackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{positioning}
% Settings
\useoutertheme{mwe}
\mode<all>
beamerouterthememwe.sty
\mode<presentation>
% Frame title
\defbeamertemplate*{frametitle}{mwe}[1][]
{
\begin{tikzpicture}
\useasboundingbox[]
(0,0)rectangle(\textwidth+0.5\paperwidth-0.5\textwidth,.135\paperheight);
\node [ anchor=east,
font=\LARGE,
black,
minimum height=10pt,
align=center]
at (current bounding box.east)
{\textbf{\insertframetitle}};
\end{tikzpicture}
\vspace*{5pt}
}
\defbeamertemplate*{footline}{mwe}[1][]
{
\begin{tikzpicture}
\useasboundingbox [draw] (0,\the\textheight) -- (\the\paperwidth,\the\textheight);
\node [anchor=south west, font=\tiny, black]
at ($(current bounding box.west)+(5pt,0)$)
{\insertauthor};
\node [anchor=south, font=\tiny, black]
at (current bounding box)
{\insertdate};
\node [anchor=south east, font=\tiny, black]
at ($(current bounding box.east)+(-5pt,0)$)
{\insertframenumber/\inserttotalframenumber};
\draw [double distance = 0.6pt, line cap=round,color=black]
($(current bounding box.west)+(5pt,11pt)$) --
($(current bounding box.east)+(-5pt,11pt)$);
\end{tikzpicture}
}
\mode<all>
This is the output: The big frame shows the dimension of the frame-area.
\newcommand*{\BlockImage}[3]
{
\begin{column}{#1\textwidth}
\begin{block}{\footnotesize #2}
\centering
\includegraphics[width=\textwidth,
height=.75\beamer@frametextheight,
keepaspectratio]{#3}
\end{block}
\end{column}
}
final workaround
\makeatletter
\newlength{\frameheadheight}
\setlength{\frameheadheight}{2cm}
\newlength{\frametextheight}
\setlength{\frametextheight}{\paperheight}
\addtolength{\frametextheight}{-\footheight}
\addtolength{\frametextheight}{-\headheight}
\addtolength{\frametextheight}{-\frameheadheight}
\makeatother
\newcommand*{\BlockImg}[3]
{
\begin{column}{#1\textwidth}
\vskip-.5\frameheadheight
\begin{block}{\footnotesize #2}
\centering
\includegraphics[%width=\textwidth,
height=.75\frametextheight,
keepaspectratio]{#3}
\end{block}
\end{column}
}

\textheightonly factors in the footline and the headline, not the frametitle. What do you need the textheight for? – samcarter_is_at_topanswers.xyz Mar 05 '18 at 15:12\includegraphics[width=\textwidth,height=.75\textheight]{img.png}`. What shal I use instead? – Alex44 Mar 05 '18 at 15:45keepaspectratio]. If you really must define your image with two lengths use one of these: https://tex.stackexchange.com/questions/278429/is-there-a-simple-command-for-the-available-height-in-a-beamer-slide https://tex.stackexchange.com/questions/262815/automatically-fit-the-graphics-in-the-remaining-space-of-a-beamer-slidehttps://tex.stackexchange.com/questions/44218/set-image-to-full-all-available-space-in-beamer-without-overlapping-other-eleme – samcarter_is_at_topanswers.xyz Mar 05 '18 at 15:51\textheightis defined as "The height of text on the page" and it is not really this way here on beamer... (https://en.wikibooks.org/wiki/LaTeX/Lengths) And it would be the best to shrink the size of the frame globally so that this value is correct for all possible usages. The other stuff looks like workarounds and makes it difficult to handle. Which value defines the height of the frame? – Alex44 Mar 05 '18 at 16:09\headheightis zero. This makes the calculation wrong! – Alex44 Mar 05 '18 at 16:59