[Tex/LaTex] How to change some part of example block body text size in beamer

beamerfontsfontsize

I would like to have a part of the title of a beamer block with a smaller font. Something like this:

\documentclass{beamer}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
  \begin{exampleblock}{here default size of text but  \small here is small text}
    Test
  \end{exampleblock}
  \begin{alertblock}{Game theory \small page 78 springer}
    Test
  \end{alertblock}
\end{frame}
\end{document}

Best Answer

Your code does not work properly because you don't know what is the current font size, and \small is an "absolute" font size.

Your code would work if you replaced \small by \tiny, for example. But if you don't want to bother finding out what is the current font size you are using you can \usepackage{relsize} to set a relative size to the current font, like this:

\documentclass{beamer}
\usepackage{relsize}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
  \begin{block}{here default size of text but{\relsize{-2} here is small text}}
    Test
  \end{block}
  \begin{alertblock}{Game theory{\smaller[2] page 78 springer}}
    Test
  \end{alertblock}
\end{frame}
\end{document}

This will switch to a font 2 sizes smaller (see: this page). So if your is, say, \small, with \relsize{-2} (which is the same as \smaller[2]), you get a font in \scriptsize.

The result is like this:

enter image description here

P.S.: I could not compile your exampleblock environment, so I changed to block.

Related Question