Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

LaTeX-Beamer and frame numbers

I just took some time to add a footline and correct frame numbers to my LaTeX-Beamer slides.

I use the Singapore theme for nearly all my presentations which does not include page/frame nubers by default. The first step is to add the footline:

\useoutertheme{infolines}
\usetheme{Singapore}

This will include a footline with author, institute, title, date, and frame number on the slides. Now I do not want to include an institute, but it is not possible to leave it completely empty (there remains an empty pair of parentheses). So I redefine the fotline template with \setbeamertemplate:

\setbeamertemplate{footline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\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*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}

Of course the definition is copied from ${texmf}/tex/latex/beamer/beamerouterthemeinfolines.sty and only the text with/arround the variable fields (\insert...) has to be changed.

Then I noticed that slide numbers were incorrect for fragile frames. I have not looked at this problem in detail because changing fragile into fragile=singleslide solved it for now.

Comments are closed.