1

I have a problem with Beamer: I would like the overall frame count to take into account only the frames with actual content.

Here there is an MWE:

\documentclass[envcountsect]{beamer}
\usetheme[secheader]{Madrid}    
\usecolortheme{seahorse}
\useoutertheme{infolines}



\usepackage[T1]{fontenc}
\usepackage[english]{babel}



\title[Title]{Title}

\subtitle{\small Title}

\author[Author]{Author}

\institute{University of Disneyworld}

\date{02/07/2022}



\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
  \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,center]{date in head/foot}% %''right'' as option
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
   % Making the next line a comment, erases the number of slides
   \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection]
  \end{frame}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}
\titlepage
\end{frame}



\begin{frame}
\frametitle{Frametitle}
Frame
\end{frame}


\begin{frame}
\frametitle{Outline}
\tableofcontents[hideallsubsections]
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section}


\begin{frame}
\frametitle{Frame}
Frame
\end{frame}



\subsection{Subsection}

\begin{frame}
\frametitle{Frame}
Frame
\end{frame}




\subsection{Subsection}

\begin{frame}
\frametitle{Frame}
Frame
\end{frame}



\subsection{Subsection}

\begin{frame}
\frametitle{Frame}
Frame
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section}


\begin{frame}
\frametitle{Frame}
Frame
\end{frame}


\end{document}

Right now the 'section' frames, along with the frames with the 'section-with-subsection' frame, enter in the overall count, which is something I would like to get rid of, along with the first page. Also, there is no bibliography in this MWE, but a solution should take into account the possibility of having slides devoted to the bibliography.

Thanks a lot in advance for your help!

PS: Is there a way in which we can get rid of the frame number on the very first frame?

1 Answer 1

1

You can exclude certain frames from increasing the framenumber with the noframenumbering frame option (I would only use this option with the plain option or remove the footline on these frames -- otherwise it looks strange if these frames have the same number as the frames after them)

\documentclass[envcountsect]{beamer}
\usetheme[secheader]{Madrid}    
\usecolortheme{seahorse}
\useoutertheme{infolines}



\usepackage[T1]{fontenc}
\usepackage[english]{babel}



\title[Title]{Title}

\subtitle{\small Title}

\author[Author]{Author}

\institute{University of Disneyworld}

\date{02/07/2022}



\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
  \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,center]{date in head/foot}% %''right'' as option
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
   % Making the next line a comment, erases the number of slides
   \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

\AtBeginSection[]
{
  \begin{frame}<beamer>[noframenumbering,plain]
    \frametitle{Outline}
    \tableofcontents[currentsection]
  \end{frame}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}[noframenumbering,plain]
\titlepage
\end{frame}



\begin{frame}
\frametitle{Frametitle}
Frame
\end{frame}


\begin{frame}[noframenumbering,plain]
\frametitle{Outline}
\tableofcontents[hideallsubsections]
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section}


\begin{frame}
\frametitle{Frame}
Frame
\end{frame}



\subsection{Subsection}

\begin{frame}
\frametitle{Frame}
Frame
\end{frame}




\subsection{Subsection}

\begin{frame}
\frametitle{Frame}
Frame
\end{frame}



\subsection{Subsection}

\begin{frame}
\frametitle{Frame}
Frame
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Section}


\begin{frame}
\frametitle{Frame}
Frame
\end{frame}


\end{document}

enter image description here

You must log in to answer this question.

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