4

Here is a MWE for my Beamer slides:

\documentclass[compress]{beamer}

\usetheme{Madrid}
\usecolortheme{seagull}

\setbeamertemplate{navigation symbols}{}

\title[Name of Presentation Slides]{Name}
\author[Author A and Author B]{Author A and Author B}
\date[September 20, 2017]{September 20, 2017}

\begin{document}

\begin{frame}
\frametitle{First Slide}
\textbf{Letters}
\begin{itemize}
    \item A
    \item B
    \item C
\end{itemize}

\end{frame}

\end{document}

I would like to keep the same format in the bottom bar, but simply exclude the slide total, so that only the current slide is displayed.

I tried the following solutions from these questions (Beamer : Page number without total number of pages and Beamer frame number without total, but they never quite worked right, always modifying the other parts of the bottom bar in some way.

1.

\setbeamertemplate{footline}
    {\begin{beamercolorbox}[sep=1ex]{author in head/foot}
      \rlap{\textit{\insertshorttitle}}\hfill\insertauthor\hfill\llap{\insertframenumber}%
      \end{beamercolorbox}%
}

2.

\setbeamertemplate {footline}{\quad\hfill\insertframenumber\strut\quad}

3.

\setbeamertemplate{footline}{% 
  \hfill% 
  \usebeamercolor[fg]{page number in head/foot}% 
  \usebeamerfont{page number in head/foot}% 
  \insertframenumber%
  %\,/\,\inserttotalframenumber
  \kern1em\vskip2pt% 
}

What is to be done in my instance?

4

The Madrid theme uses the footline from the infolines outer theme, you can redefine it like this:

\documentclass[compress]{beamer}

\usetheme{Madrid}
\usecolortheme{seagull}

\setbeamertemplate{navigation symbols}{}

\title[Name of Presentation Slides]{Name}
\author[Author A and Author B]{Author A and Author B}
\date[September 20, 2017]{September 20, 2017}

\makeatletter
\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\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
  \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%
}
\makeatother

\begin{document}

\begin{frame}
\frametitle{First Slide}
\textbf{Letters}
\begin{itemize}
    \item A
    \item B
    \item C
\end{itemize}

\end{frame}

\end{document}

enter image description here


Starting with beamer v. 3.49 the new beamer template page number in head/foot simplifies this to:

\documentclass[compress]{beamer}

\usetheme{Madrid}
\setbeamertemplate{page number in head/foot}[framenumber]

\begin{document}

\begin{frame}
\end{frame}

\end{document}
  • It almost works. I get this error: Undefined control sequence. <recently read> \ifblank. If I delete \ifblank from the code, it works, but places ( ) after the author name(s). – bill999 Sep 20 '17 at 20:13
  • @bill999 Do you get this error with exactly the code from my answer? How do you compile? pdflatex or something else? Which tex distribution do you have? I tried with pdflatex from texlive2017 and it works without any errors. – user36296 Sep 20 '17 at 21:08
  • Yes, exactly the code from the answer. I have a Mac and am using TeXShop version 3.87. – bill999 Sep 21 '17 at 0:01
  • @bill999 Can you share the .log file? – user36296 Sep 21 '17 at 7:50
  • I tried to copy and paste the output of the log file, but the character limit was exceeded. Is there a way to attach the file? Or is one part of the log file more relevant than another? – bill999 Sep 21 '17 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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