[Tex/LaTex] Customizing the sidebar in beamer

beamertable of contents

I'm working with the Marburg theme with beamer, and I would like to customize its Sidebar so that the title & author of the presentation does not show up, and I want the sections in the Sidebar to be numbered.

Desired output:

before_and_after

Example:

\documentclass{beamer}
\usetheme{Marburg}


\title{Some title}
\author{author}
\institute{my workplace}
\date{\today}

\AtBeginSection[]
{
  \begin{frame}
    \frametitle{Table of Contents}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}


\begin{document}

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

\section[Outline]{}
\frame{\tableofcontents}

\section{Introdution}

\begin{frame}
\frametitle{Basics}
\begin{itemize}
\item A
\pause
\item B
\pause
\item C
\end{itemize}
\end{frame}

\subsection{More basics}

\begin{frame}
\frametitle{something goes here}
more stuff
\end{frame}

\section{My work}

\begin{frame}
my stuff...
\end{frame}

\end{document}

Thanks!

Best Answer

The following code contains the necessary redefinitions:

\documentclass{beamer}
\usetheme{Marburg}

\makeatletter
  \setbeamertemplate{sidebar \beamer@sidebarside}
  {
    \beamer@tempdim=\beamer@sidebarwidth%
    \advance\beamer@tempdim by -6pt%
    \vskip4em%
    \insertverticalnavigation{\beamer@sidebarwidth}%
    \vfill
    \ifx\beamer@sidebarside\beamer@lefttext%
    \else%
      \usebeamercolor{normal text}%
      \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
      \vskip2pt%
    \fi%
  }%

  \ifx\beamer@sidebarside\beamer@lefttext%
    \defbeamertemplate*{sidebar right}{sidebar theme}
    {%
      \vfill%
      \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
      \vskip2pt}
  \fi

\setbeamertemplate{section in sidebar}%{sidebar theme}
{%
  \vbox{%
    \vskip1ex%
    \beamer@sidebarformat{3pt}{section in sidebar}{\insertsectionheadnumber
~\insertsectionhead}%
  }%
}
\setbeamertemplate{section in sidebar shaded}%{sidebar theme}
{%
  \vbox{%
    \vskip1ex%
    \beamer@sidebarformat{3pt}{section in sidebar shaded}{\insertsectionheadnumber
~\insertsectionhead}%
  }%
}
\makeatother

\title{Some title}
\author{author}
\institute{my workplace}
\date{\today}

\AtBeginSection[]
{
  \begin{frame}
    \frametitle{Table of Contents}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\begin{document}

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

\section[Outline]{First Section}
\frame{\tableofcontents}

\section{Introduction}

\begin{frame}
\frametitle{Basics}
\begin{itemize}
\item A
\pause
\item B
\pause
\item C
\end{itemize}
\end{frame}

\subsection{More basics}

\begin{frame}
\frametitle{something goes here}
more stuff
\end{frame}

\section{My work}

\begin{frame}
my stuff...
\end{frame}

\end{document}

An image of the first slide:

enter image description here