Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing a presentation in Beamer using the Dresden theme. From a theme preview I saw that white circles are supposed to appear on the top bar below the section titles of my presentation (to indicate the number of slides in each frame, I guess). The problem is that they do not appear when I compile my script. Do I have to specify a particular command in order to obtain that?

Moreover, how do I add numbering of the slide progression (with respect to the total amount of slides in the presentation)? For instance, say that I want them to appear in the lower right corner of each slide.

share|improve this question
2  
That works only if you have some frames inside some subsections inside some sections. –  Claudio Fiandrino Mar 4 '13 at 12:48
    
I see, so is there some way to visualize the number of the slide (maybe with respect to the total number of slides in the presentation) with this theme? –  Francesco Mar 4 '13 at 15:46
    
Yes of course.. if you edit your question specifying this part as well as the position in which the frame number should appear, I will be happy to post an answer. –  Claudio Fiandrino Mar 4 '13 at 15:49

1 Answer 1

up vote 5 down vote accepted

The Dreden theme uses as outer theme miniframes specifying that the footline is of type authorinstitutetitle

\useoutertheme[footline=authorinstitutetitle]{miniframes}

Thus, to insert the frame number (command \insertframenumber) with respect to the total frame number (command \inserttotalframenumber) we should take into account how the authorinstitutetitle is defined:

\def\beamer@theme@footline@authorinstitutetitle{
  \defbeamertemplate*{footline}{miniframes theme}
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
      \hfill%
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
}

Now, in the lower right corner there's nothing thus it is possible to exploit the space in:

\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
   leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
   {\usebeamerfont{title in head/foot}\insertshorttitle}%
 \end{beamercolorbox}%

by adding:

\begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle}%
      \hfill%
      {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}

Notice that as separator between the frame numbers there's a command: \frameofframes. It is defined as:

\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}}

This allows you to modify the standard representation (1/5 for example), with something else; for instance:

\setframeofframes{of}

will provide 1 of 5.

The code:

\documentclass{beamer}
\usepackage{lmodern}
\usetheme{Dresden}

\author{My name}
\title{My presentation}
\institute{My institute}

\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}}

\setframeofframes{of}
\makeatletter
\setbeamertemplate{footline}
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
      \hfill%
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle}%
      \hfill%
      {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\makeatother

\begin{document}

\section{One}
\subsection{One-one}

\frame{\frametitle{X-one} bla bla bla}
\frame{\frametitle{X-one-a} bla bla bla}
\frame{\frametitle{X-one-b} bla bla bla}

\subsection{One-two}

\frame{\frametitle{X-one} bla bla bla}
\frame{\frametitle{X-one-a} bla bla bla}
\frame{\frametitle{X-one-b} bla bla bla}


\section{Two}
\subsection{Two-one}

\frame{\frametitle{X-one} bla bla bla}
\frame{\frametitle{X-one-a} bla bla bla}
\frame{\frametitle{X-one-b} bla bla bla}

\subsection{Two-two}

\frame{\frametitle{X-one} bla bla bla}
\frame{\frametitle{X-one-a} bla bla bla}
\frame{\frametitle{X-one-b} bla bla bla}

\section{Three}
\subsection{Three-one}

\frame{\frametitle{X-one} bla bla bla}
\frame{\frametitle{X-one-a} bla bla bla}
\frame{\frametitle{X-one-b} bla bla bla}

\subsection{Three-two}

\frame{\frametitle{X-one} bla bla bla}
\frame{\frametitle{X-one-a} bla bla bla}
\frame{\frametitle{X-one-b} bla bla bla}

\end{document}

One frame as result:

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.