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:
Just redefine \AtBeginSection
before the final slide:
\documentclass{beamer}
\usetheme[hideothersubsections]{Hannover}
\begin{document}
%=======BEGIN OUTLINE COMMANDS============
\AtBeginSubsection
{
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}
\AtBeginSection
{
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}
%=======END OUTLINE COMMANDS============
\section{First Section}
\begin{frame}
\begin{itemize}
\item Blah
\item Blah
\item Blah
\end{itemize}
\end{frame}
\section{Second Section}
\begin{frame}
\begin{itemize}
\item Blah
\item Blah
\item Blah
\end{itemize}
\end{frame}
\section{Third Section}
\begin{frame}
\begin{itemize}
\item Blah
\item Blah
\item Blah
\end{itemize}
\end{frame}
\AtBeginSection{}
\section*{}
\begin{frame}
Thank you for your attention!
\end{frame}
\end{document}
Best Answer
To effectively get a no section section, use:
\section*{}
or\section{}
as in the following variant of your code:
This produces the following:
As far as I can tell by experimenting, the section command is a bit strange in what it can and cannot accept. The most general form is
\section<*>[Optional]{Mandatory}
. However, it appears that the*
and theOptional
are incompatible (even if the Optional is empty). So you can have a star or an optional argument, but not both. With that proviso, the possible combinations are:\section{Text}
:Text
is in the TOC and the navigation.\section{}
: omitted completely from TOC and navigation (not even allocated space)\section[Text]{Long Text}
:Long Text
is used in TOC,Text
in navigation.\section[]{Text}
:Text
is in the TOC, nothing in navigation.\section[]{}
: Nothing in either place.\section*{}
: omitted completely from TOC and navigation\section*{Text}
: Nothing in TOC,Text
used in navigationHere's some test code:
That seems to allow for every possibility except that you want to have a section with a proper title which appears neither in the TOC nor in the navigation. Fortunately, that isn't the case here. The best I can come up with in that situation is to temporarily disable
\addtocontents
as this inhibits writing to thetoc
file (for the ... wait for it ... table of contents) and thenav
file (for the navigation bar) but allows everything else to go through. Looking at the code, at least one of these files is written to if the\section
command is given any argument whatsoever so this seems to be the only way. It could be wrapped up a bit more fancily, but in essence it boils down to: