How can I change the font size of the footer in Beamer without modifying the font of the title (on the title page)? Also, when I try to change the title's font with \title{\fontsize{20}{25} My Title}
it doesn't seem to work. Thank you.
2 Answers
You need the command \selectfont
after fontsize
\documentclass{beamer}
\usetheme{AnnArbor}
\title[My Title]{ \fontsize{20}{25}\selectfont My Title}
\begin{document}
\frame{\titlepage}
\frame{a frame}
\end{document}
Detailed information are documented in the Docmentation of LaTeX font commands
EDIT: Use the theme AnnArbor
and the optional argument of \title
.
-
Thanks, Marco. It makes sense. But I still have no idea if it's possible to change separately the footer's font size. I use AnnArbor theme, and when I modify the size of the font, the footer is altered too and I get several Warnings and an Overfull
\hbox
.– chimilCommented Aug 29, 2011 at 11:05 -
You can change the font for all the elements in the footline simply by setting the footline font using
\setbeamerfont{footline}{size=<size>}
A little example:
\documentclass{beamer}
\usetheme{AnnArbor}
\title[Short title]{Long}
\author[Short author]{Long}
\institute[Short inst.]{Long}
\setbeamerfont{footline}{size=\fontsize{9}{11}\selectfont}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\end{document}
Of course, if the chosen font is too big, the results obtained won't be very pleasing (try using \fontsize{10}{12}\selectfont
in my example code above). In this case, you will have to change the footline
template. In the following example I made some changes in the spacing between the date and the page number and after the page number, to have a footline with a font size of 10pt
:
\documentclass{beamer}
\usetheme{AnnArbor}
\title[Short title]{Long title}
\author[Short author]{Long author}
\institute[Short inst.]{Long institute}
\makeatletter
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{\fontsize{11}{13}\selectfont%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{1em}% original: 2ex
\insertframenumber{} / \inserttotalframenumber\hspace*{1ex}% original: 2ex
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
\setbeamerfont{footline}{size=\fontsize{10}{11}\selectfont}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\end{document}
-
-
3Regarding
\setbeamerfont{footline}{size=\fontsize{9}{11}\selectfont}
, the first number (i.e.9
) changes the font size; what does the second number (11
) make?– MarcoCommented Feb 6, 2016 at 20:59 -
1You can also use
\setbeamerfont{footline}{size = \footnotesize}
.– zyyCommented Jul 18, 2021 at 21:07 -
Is there a way to change the font size of the progression bar too? I mean those circles and text above them on the header of the slide which show the progression of the presentation. Commented Nov 12, 2023 at 15:02
\title[\fontsize{10}{15}\fontselect My Title]{etc}
, which changes the font size for the title.\title
\author
with the same type of argument.