0

I have a simple beamer presentation, with a Title frame (that is info on author, date, etc), and several sections with associated titleframes. I would like to split this presentation into parts and number them accordingly, so the following structure results:

Title

additional frame, associated with title (unnumbered)

1 Section

1.1 first titleframe

1.2 second titleframe

2 Section

2.1 ...

2.2 ...

How can this be done? The Title should not be numbered, nor associated frames. Only sections, subsections, etc. Would also be nice if the "numbering" of a section could be toggled between on/off, but that is more optional.

Edit: The numbering does not have to be over the sections. If there is an easier way, I am open for anything.

I got the following:

\documentclass[xcolor= pdftex, dvipsnames, table, 10pt]{beamer}
\mode<presentation>
{
    \usetheme{Default}
    %\usetheme{Madrid}
    \setbeamercovered{transparent}
    \usecolortheme{whale}
}

\AtBeginSection[]{
    \begin{frame}
        \vfill
        \centering
        \begin{beamercolorbox}[sep=8pt,center,shadow=false,rounded=true]{title}
            \usebeamerfont{title}\secname\par%
        \end{beamercolorbox}
        \vfill
    \end{frame}
}

\begin{document} 

\title{Title} 
\author{Author}
\institute{Firm}
\date{Date} 

\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=false]
\setbeamertemplate{footline}[page number]
\setbeamertemplate{frametitle}[default][colsep=-4bp,rounded=false,shadow=false]
\beamertemplatenavigationsymbolsempty

\frame{\titlepage}

\section{First section}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\section{Second section}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\end{document}

Please tell me if any information is missing or if the above question is unclear in any regard.

1 Answer 1

1

As a quick and dirty solution I can suggest redefining \frametitle to put the frame number directly to the frame title. I guess that the proper solution would be to redefine the outer theme template for the frame title.

The changes include adding \thesection to your section frames and a few lines after that which do the definition of the frame counter and adding it to the titles.

\documentclass[xcolor= pdftex, dvipsnames, table, 10pt]{beamer}
\mode<presentation>
{
    %\usetheme{Default}
    %\usetheme{Madrid}
    \setbeamercovered{transparent}
    \usecolortheme{whale}
}

\AtBeginSection[]{
    \begin{frame}
        \vfill
        \centering
        \begin{beamercolorbox}[sep=8pt,center,shadow=false,rounded=true]{title}
            \usebeamerfont{title}\thesection\ \secname\par%
        \end{beamercolorbox}
        \vfill
    \end{frame}
}

\makeatletter
\newcounter{frame}[section]
\def\theframe{\thesection.\arabic{frame}}
\AtBeginEnvironment{frame}{}
\let\frametitleold\frametitle
\def\frametitle#1{%
  \refstepcounter{frame}%
  \ifnum\c@section=0
    \frametitleold{#1}%
  \else
    \frametitleold{\theframe\ #1}%
  \fi
}
\makeatother

\begin{document} 

\title{Title} 
\author{Author}
\institute{Firm}
\date{Date} 

\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=false]
\setbeamertemplate{footline}[page number]
\setbeamertemplate{frametitle}[default][colsep=-4bp,rounded=false,shadow=false]
\beamertemplatenavigationsymbolsempty

\frame{\titlepage}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\section{First section}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\section{Second section}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\begin{frame}
    \frametitle{Title}
    \framesubtitle{Subtitle}
\end{frame}

\end{document}

The result: enter image description here

8
  • Thank you that works perfectly for me.
    – EtoAls
    Commented Oct 13, 2020 at 8:00
  • Just one question remains: Is it possible that one frame within a certain level, lets say "1", does not get a new number? So for example the structure within a certain section would be: 1.1, 1.2, 1.2, 1.3, ... (1.2 two times, as the topic is the same for 2 frames)
    – EtoAls
    Commented Oct 13, 2020 at 8:40
  • You can always decrease the frame counter between two frames. Commented Oct 13, 2020 at 8:49
  • Alright, you mean by using [noframenumbering] I assume?
    – EtoAls
    Commented Oct 13, 2020 at 9:01
  • 1
    You can do just \let\frametitle\frametitleold before the bibliography. Commented Oct 13, 2020 at 9:54

You must log in to answer this question.

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