beamer
beamer copied to clipboard
Font inheritance in blocks
The inheritance of fonts in blocks seems a bit inconsistent, maybe this can be unified...
\documentclass{beamer}
\setbeamerfont{block body}{series=\itshape}
\begin{document}
\begin{frame}
\begin{block}{title}
content...
\end{block}
\begin{exampleblock}{title}
content...
\end{exampleblock}
\begin{alertblock}{title}
content...
\end{alertblock}
\end{frame}
\end{document}
In beamerfontthemedefault.sty
, in the vicinity of Line 80:
\setbeamerfont{block body}{}
# These two font template don't have a parent
\setbeamerfont{block body alerted}{}
\setbeamerfont{block body example}{}
# but this one does
\setbeamerfont{block title}{size=\large,parent={structure,block body}}
\setbeamerfont{block title alerted}{parent={block title,alerted text}}
\setbeamerfont{block title example}{parent={block title,example text}}
Therefore, two possible solutions:
- Let these two font templates,
block body altered
andblock body example
, inheritblock body
; - Remove the inheritance relation between
block title
andblock body
.