1

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}
3
  • Please clarify what you want to do. If I get it right, you can \usepackage{relsize} and replace the \small by \relsize{<factor>}, and in <factor> you put a negative integer at your taste. Commented Dec 15, 2017 at 17:29
  • and what is the problem?
    – Zarko
    Commented Dec 15, 2017 at 17:29
  • @PhelypeOleinik i tried your way but it doesn't work the problem that even i add \small or \relsize{} still the same size for the whole title
    – Educ
    Commented Dec 15, 2017 at 17:39

1 Answer 1

3

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.

2
  • op code works as is, so i do not understand what is the problem. for example \begin{exampleblock}{here default size of text but \footnotesize here is small text} Test \end{exampleblock}, gives the same result as your solution.
    – Zarko
    Commented Dec 15, 2017 at 18:16
  • @Zarko I really don't know why. Maybe I messed something up with my TeX distribution, because in another computer it worked fine. Even though, that's just an observation for the change I made. The font size change works all the same. Commented Dec 15, 2017 at 18:25

You must log in to answer this question.

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