3

I have a long title, therefore I've chosen Amsterdam theme for the beamer package. However, I need to also show the frame number "frame/fromTotalFrames" style.

How can I add the frame-no. on the left hand side of the footer, while centering the title?

The theme code:

\useoutertheme[footline=authortitle]{miniframes}
\useinnertheme{circles}
\usecolortheme{whale}
\usecolortheme{orchid}

\definecolor{beamer@blendedblue}{rgb}{0.137,0.466,0.741}

\setbeamercolor{structure}{fg=beamer@blendedblue}
\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{frametitle}{fg=black}
\setbeamercolor{title}{fg=black}
\setbeamercolor{item}{fg=black}

\setbeamertemplate{headline}
{%
  \begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
  \end{beamercolorbox}
  \begin{beamercolorbox}{section in head/foot}
    \vskip2pt\insertsectionnavigationhorizontal{\paperwidth}{}{}\vskip2pt
  \end{beamercolorbox}%
  \ifbeamer@theme@subsection%
    \begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
      \usebeamerfont{subsection in head/foot}\insertsubsectionhead
    \end{beamercolorbox}%
  \fi%
  \begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
  \end{beamercolorbox}
}
\mode
<all>

Some example frames:

\documentclass{beamer}

\usepackage{beamerthemesplit}
\usetheme{Amsterdam} 
\usepackage[utf8]{inputenc}

\title{General Theory of Relativity is a long Title\\
for normal Footers}
\author{Albert Einstein}
\date{April 2, 1922}

\begin{document}

\frame{\titlepage}

%%%
\section[Overview]{}
%\subsection{Layout}
\begin{frame}
\begin{itemize}
\item Here comes the Figure
\end{itemize}
\end{frame}

%\subsection{Agenda}
\frame{\tableofcontents}
%%%


%%%
\section{Motivation}
\begin{frame}{Theory is practical}
\begin{itemize}
\item Here come the reasons
\end{itemize}
\end{frame}
%%%


%%%
\section[Review]{Review of casual theory}
\subsection{classic Theories}
\begin{frame}{Which is Eligible?}
Newton, Lagrange, etc.
\end{frame}

\section[Review]{Review of casual theory}
\subsection{classic Theories}
\begin{frame}{Which is Eligible?}
Goethe, Dasgupta etc.
\end{frame}

\end{document}
5
  • And suppressing the author? Apr 14, 2014 at 4:48
  • @GonzaloMedina Thank you! Ideally without suppressing the Author.
    – alex
    Apr 14, 2014 at 4:51
  • And then, where the author should go? You say the title should be centered and the frame numbers to the left. Where do you want the author to appear? Apr 14, 2014 at 4:53
  • @GonzaloMedina For me the code sets the Author on the RIGHT hand side. The Title could be in the middle, while the frames ideally on the LEFT hand side.
    – alex
    Apr 14, 2014 at 4:55
  • 1
    Please see my answer below. Apr 14, 2014 at 5:04

1 Answer 1

4

Redefine the footline template appropriately; in the following code I used three beamercolorboxes; one for the author, another one for the title, and the third one for the frame numbers; feel free to adjust the widths according to your needs:

\documentclass{beamer}

\usepackage{beamerthemesplit}
\usetheme{Amsterdam} 
\usepackage[utf8]{inputenc}

\title{General Theory of Relativity is a long Title\\
for normal Footers}
\author{Albert Einstein}
\date{April 2, 1922}

\makeatletter
  \defbeamertemplate*{footline}{myminiframes theme}
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \hbox{%
    \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm,center]{title in head/foot}%
      {\usebeamerfont{author in head/foot}\usebeamercolor[fg]{author in head/foot}\insertframenumber/\inserttotalframenumber}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.75\paperwidth,ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil,center]{title in head/foot}%
      \leavevmode{\usebeamerfont{title in head/foot}\insertshorttitle}%
    \end{beamercolorbox}%
       \begin{beamercolorbox}[wd=.15\paperwidth,ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm]{title in head/foot}%
      {\usebeamerfont{author in head/foot}\usebeamercolor[fg]{author in head/foot}\insertshortauthor}
    \end{beamercolorbox}%
  }%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\makeatother

\begin{document}

\frame{\titlepage}

%%%
\section[Overview]{}
%\subsection{Layout}
\begin{frame}
\begin{itemize}
\item Here comes the Figure
\end{itemize}
\end{frame}

%\subsection{Agenda}
\frame{\tableofcontents}
%%%


%%%
\section{Motivation}
\begin{frame}{Theory is practical}
\begin{itemize}
\item Here come the reasons
\end{itemize}
\end{frame}
%%%


%%%
\section[Review]{Review of casual theory}
\subsection{classic Theories}
\begin{frame}{Which is Eligible?}
Newton, Lagrange, etc.
\end{frame}

\section[Review]{Review of casual theory}
\subsection{classic Theories}
\begin{frame}{Which is Eligible?}
Goethe, Dasgupta etc.
\end{frame}

\end{document}

An image of the footline:

enter image description here

Of course, you can place the relevant code:

  \defbeamertemplate*{footline}{myminiframes theme}
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \hbox{%
    \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm,center]{title in head/foot}%
      {\usebeamerfont{author in head/foot}\usebeamercolor[fg]{author in head/foot}\insertframenumber/\inserttotalframenumber}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.75\paperwidth,ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil,center]{title in head/foot}%
      \leavevmode{\usebeamerfont{title in head/foot}\insertshorttitle}%
    \end{beamercolorbox}%
       \begin{beamercolorbox}[wd=.15\paperwidth,ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm]{title in head/foot}%
      {\usebeamerfont{author in head/foot}\usebeamercolor[fg]{author in head/foot}\insertshortauthor}
    \end{beamercolorbox}%
  }%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }

in the file beamerthemeAmsterdam.sty instead of in your .tex file (in the .sty file you don't use \makeatletter, \makeatother).

2
  • Thank you very much. However, the Author is now on the wrong (left), instead of right. Similarly the frame-no. Can you please comment the code where the change is required. I've tried for 1h and did not accomplished to get a result without an error. Maybe also others could profit from it. Thank you much for your help. :)
    – alex
    Apr 14, 2014 at 5:10
  • @alex my bad. I swapped the positions. I've edited my answer with the desired order. All you need to do is to change the order of the beamercolorboxes. I can add some comments to the code, but tomorrow (I'm tired and it's bed time here). Apr 14, 2014 at 5:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .