21

I'm using the beamer class and Warsaw theme. Is there any way to have slide numbering at the bottom of the page and on the left (as 2/10) in this theme?
Here is my code:

\documentclass{beamer}‎
‎‎‎‎‎\usetheme{Warsaw‎}‎‎
‎\begin{document}‎
‎‎\title{How to number the ...?‎} 
‎‎\author{My name‎} 
‎‎\date{06‎.06.2005} 
‎\begin{frame}‎
‎\titlepage‎
‎‎‎\end{frame}‎‎‎
‎‎\section{Intro‎}‎
‎\begin{frame}‎
‎‎\frametitle{There are many ...‎}‎ 
‎‎\end{frame}‎‎
‎\end{document}‎
Hendrik Vogt
  • 37,935

3 Answers3

20

You need to select an outer theme. \useoutertheme{infolines} should give you the desired format.

If you just want to include the numbers, you have to adopt the original code for the footline from the outer theme shadow which in turn uses the the format from the split theme.

\documentclass{beamer}
\usetheme{Warsaw}
\title{How to number the ...?}
\author{My name}
\date{06‎.06.2005}
\defbeamertemplate*{footline}{shadow theme}
{%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fil,rightskip=.3cm]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertframenumber\,/\,\inserttotalframenumber\hfill\insertshortauthor
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle%
  \end{beamercolorbox}}%
  \vskip0pt%
}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
\section{Intro‎}
\begin{frame}
\frametitle{There are many ...}
\end{frame}
\end{document}

Note that by moving the \title etc into the preamble, this will also be used for the PDF metadata.

11

If placing the frame numbers on the right hand site is sufficient, this can now easily be done with by using \setbeamertemplate{page number in head/foot}[totalframenumber] after the theme.

MWE:

\documentclass{beamer}
\usetheme{Warsaw}
\setbeamertemplate{page number in head/foot}[totalframenumber]

\title{How to number the ...?‎}
\author{My name}
\date{06‎.06.2005}

\begin{document}

\begin{frame}
\titlepage
\end{frame}
\section{Intro}
\begin{frame}
\frametitle{There are many ...‎}
\end{frame}
\end{document}

enter image description here

(this requires beamer version >= 3.50)

  • Neat. And if you don't want to display the total number of slides, use \setbeamertemplate{page number in head/foot}[framenumber] instead. – anderstood Aug 27 '20 at 19:08
10

Just stumpled upon this while googling.

A slightly more forward approach to simply add page numbers to the old macro would be

\newcommand*\oldmacro{}%
\let\oldmacro\insertshorttitle%
\renewcommand*\insertshorttitle{%
   \oldmacro\hfill%
   \insertframenumber\,/\,\inserttotalframenumber}

as seen on the texblog ( http://texblog.net/latex-archive/uncategorized/beamer-footline-frame-number/ ).

Just add it to the preamble. Works with "Warsaw", "Copenhagen", "Malmoe" and "Luebeck.

Klaster
  • 343