1

How to create a numbering of the sections and subsections in beamer 1. 1a 1b etc. in the frame and in table of contents?

I want change numbering to something like that:

  1. First
    1a
    1b

  2. Second
    2a
    2b

I use theme called Antibes.

4
  • 1
    Welcome to TeX.SX! I am not completely sure what format you would like to achieve: Should e.g. the words "First" and "Second" be included or not? In addition, could you please add a minimal working example (MWE).
    – crixstox
    Mar 18, 2016 at 12:59
  • The numbering style of section and subsection headers depends on the beamer theme you've chosen. Please tell us which theme you're working with.
    – Mico
    Mar 18, 2016 at 13:01
  • Don't close, the other one is already closed as a duplicate of this one. Mar 21, 2016 at 7:36
  • It looks like you've got two separate accounts. The Stack Exchange staff can merge them together for you. Mar 22, 2016 at 0:16

1 Answer 1

1

Partial Solution

The following example shows how to achieve the desired toc:

\documentclass{beamer}
\usetheme{Antibes}

\makeatletter
\defbeamertemplate{subsection in toc}{subsections numbered roman}{%
    \leavevmode\leftskip=1.5em\inserttocsectionnumber\@alph\inserttocsubsectionnumber\ %
    \inserttocsubsection\par}
\makeatother

\setbeamertemplate{subsection in toc}[subsections numbered roman]

\begin{document}

    \frame{\tableofcontents}

\section{Test Section One}
\subsection{blub}
\begin{frame}
test
\end{frame}
\subsection{blubblub}
\begin{frame}
    test
\end{frame}
\section{Test Section Two}
\begin{frame}
test
\end{frame}
\section{Test Section Three}
\begin{frame}
test
\end{frame}

\end{document}

enter image description here


Problem

But trying to modify the navigation bar, I am stuck at inserting the section numbers. I tried \insertsectionheadnumber but this unfortunatly does only work for other themes and not for \useoutertheme{tree}.

\documentclass{beamer}
\usetheme{Antibes}

\makeatletter
\defbeamertemplate{subsection in toc}{subsections numbered roman}{%
    \leavevmode\leftskip=1.5em\inserttocsectionnumber\@alph\inserttocsubsectionnumber\ %
    \inserttocsubsection\par}
\makeatother

\setbeamertemplate{subsection in toc}[subsections numbered roman]

\makeatletter
\setbeamertemplate{headline}{%
    \begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{upper separation line head}
    \end{beamercolorbox}
    \begin{beamercolorbox}[wd=\paperwidth,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}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
        leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}
        \usebeamerfont{section in head/foot}%
        \ifbeamer@tree@showhooks
        \setbox\beamer@tempbox=\hbox{\insertsectionhead}%
        \ifdim\wd\beamer@tempbox>1pt%
        \hskip2pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}%
        \hskip1pt%
        \fi%
        \else%  
        \hskip6pt%
        \fi%
%       \insertsectionheadnumber % NOT WORKING
        \insertsectionhead
    \end{beamercolorbox}
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
        leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
        \usebeamerfont{subsection in head/foot}%
        \ifbeamer@tree@showhooks
        \setbox\beamer@tempbox=\hbox{\insertsubsectionhead}%
        \ifdim\wd\beamer@tempbox>1pt%
        \hskip9.4pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}%
        \hskip1pt%
        \fi%
        \else%  
        \hskip12pt%
        \fi%
        \insertsubsectionhead
    \end{beamercolorbox}
    \begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{lower separation line head}
    \end{beamercolorbox}
}
\makeatother


\begin{document}

    \frame{\tableofcontents}

\section{Test Section One}
\subsection{blub}
\begin{frame}
test
\end{frame}
\subsection{blubblub}
\begin{frame}
    test
\end{frame}
\section{Test Section Two}
\begin{frame}
test
\end{frame}
\section{Test Section Three}
\begin{frame}
test
\end{frame}

\end{document}

You must log in to answer this question.

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