I am still in the development of a theme for beamer and I found something that I can't understand. Usually in beamer there is a template and sometimes there is a parent template, from which you can set multiple templates to the same style at once.
Now let's have a look on the blocks, that come in three flavors:
- Regular blocks
- Alert blocks
- Example blocks
But as far as I see in the manual and in the code, these only share the Parent Beamer-Template blocks
which is defined as:
\defbeamertemplateparent{blocks}{block begin,block end,%
block alerted begin,block alerted end,%
block example begin,block example end}
{}
All other templates, especially title and body are not linked, as far as I can see.
But given this MWE
\documentclass{beamer}
\setbeamerfont{block title}{size=\scriptsize}
\setbeamerfont{block body}{size=\scriptsize}
\begin{document}
\begin{frame}
\begin{alertblock}{An alert block}
Shall alert people
\end{alertblock}
\begin{exampleblock}{An example block}
Shall explain something to people
\end{exampleblock}
\begin{block}{A general block}
For everything else
\end{block}
\end{frame}
\end{document}
results in:
As you can see in this image, all titles are set to \scriptsize
, but only the body of the regular block
changes to \scriptsize
, the others stay at their natural size.
Why is this? I am asking because I don't see any link here. E.g. the block alerted begin
is defined as:
\defbeamertemplate*{block alerted begin}{default}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[colsep*=.75ex]{block title alerted}
\usebeamerfont*{block title alerted}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title alerted}
{}
{\ifbeamercolorempty[bg]{block body alerted}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body alerted}%
\begin{beamercolorbox}[colsep*=.75ex,vmode]{block body alerted}%
\ifbeamercolorempty[bg]{block body alerted}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
So how can it be that the font sizes for alerted and example block titles are changing? What am I overlooking?