beamer
beamer copied to clipboard
Overfull \vbox errors with beamer, newcent and split outer theme
The following ECM produces Overfull \vbox errors.
\documentclass{beamer}
\usepackage{newcent}
\useoutertheme{split}
\begin{document}
\section{s1}
\section{s2}
\section{s3}
\section{s4}
\begin{frame}
\end{frame}
\end{document}
Errors from .log:
Overfull \vbox (0.70264pt too high) detected at line 5
Overfull \vbox (0.70264pt too high) has occurred while \output
Here is a workaround:
\newlength\myfontsize
\setlength\myfontsize{5.96pt}
\setbeamerfont*{section in head/foot}{size*={\myfontsize}{\myfontsize}}
\setbeamerfont*{subsection in head/foot}{size*={\myfontsize}{\myfontsize}}
There is no longer an error message but the value of \myfontsize is found by trial and error. In addition, it changes if we change the size of the default font (o use another font).
I tried to modify the header template defined by split theme (in beamerouterthemesplit.sty) but without success.
PS: from https://tex.stackexchange.com/q/586622/14500
These are all warnings and not errors.
I think the problem is that AvantGarde Book has a much, much bigger spacing between lines than normal fonts, so the 2.4375ex beamer estimates per line are not enough
You can avoid the warning if you give more room for the navigation, but personally I would rather use another font than cluttering half the page with navigation...
\documentclass{beamer}
\usepackage{newcent}
\useoutertheme{split}
\makeatletter
\setbeamertemplate{headline}{%
\leavevmode%
\@tempdimb=2.453ex% <- adjust here
\ifnum\beamer@subsectionmax<\beamer@sectionmax%
\multiply\@tempdimb by\beamer@sectionmax%
\else%
\multiply\@tempdimb by\beamer@subsectionmax%
\fi%
\ifdim\@tempdimb>0pt%
\advance\@tempdimb by 1.825ex%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{section in head/foot}%
\vbox to\@tempdimb{\vfil\insertsectionnavigation{.5\paperwidth}\vfil}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\@tempdimb]{subsection in head/foot}%
\vbox to\@tempdimb{\vfil\insertsubsectionnavigation{.5\paperwidth}\vfil}%
\end{beamercolorbox}%
\fi%
}
\makeatother
\begin{document}
\section{s1}
\section{s2}
\section{s3}
\section{s4}
\begin{frame}
f
\end{frame}
\end{document}
Could the correct value of \@tempdimb be automatically deduced from dimensions of the chosen font?
This issue is related to this other issue: https://github.com/josephwright/beamer/issues/595
I think not in beamer: perhaps a 'new beamer' might do that.