6

What is the correct way to set subtitle size? I have this:

\documentclass{beamer}
\setbeamertemplate{frametitle}{\insertframetitle\\\insertframesubtitle}
\setbeamerfont{frametitle}{size=\scriptsize}
\setbeamerfont{framesubtitle}{size=\Large}

\begin{document}
\begin{frame}{title}{subtitle}
\end{frame}
\end{document}

but the subtitle appears in scriptsize, not Large. I can put the \Large command inside the \setbeamertemplate argument, before \insertframesubtitle, and it works; but why it does not work in this way? What's wrong in my code?

2
  • It would seem like insertframesubtitle does not actually inherit the font definition from framesubtitle but rather just typesets the text.
    – ach
    Commented Jun 22, 2013 at 11:08
  • @ach but it does inherit the the size from \setbeamerfont{frametitle} so if in my example you set \setbeamerfont{frametitle}{size=\Large} the subtitle changes to Large. Is this a bug or is the intended behavior?
    – murena
    Commented Jun 22, 2013 at 12:30

1 Answer 1

10

This is the intended behaviour; \insertframesubtitle just inserts the subtitle; if you want the effect of \setbeamerfont{framesubtitle}{size=<font switch>} to be taken into account in your redefinition of the frametitle template, you need to use the font with \usebeamerfont:

\documentclass{beamer}
\setbeamertemplate{frametitle}{\insertframetitle\\\usebeamerfont{framesubtitle}\insertframesubtitle}
\setbeamerfont{frametitle}{size=\scriptsize}
\setbeamerfont{framesubtitle}{size=\Large}

\begin{document}
\begin{frame}{title}{subtitle}
\end{frame}
\end{document}
2
  • you mean my redefinition of the "frametitle" template? Or is there also a "framesubtitle" template?
    – murena
    Commented Jun 22, 2013 at 13:00
  • @murena In your redefinition; there's no framesubtitle template; I made a little mistake that I've fixed in my updated answer. Commented Jun 22, 2013 at 13:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .