Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
1  
I found out that I can use \title[]{Some title} and \author[]{author} into tricking LaTex to think that the short title/author is the empty string as represented by []. Now what about the numbered sidebar items? –  david sedai Mar 6 '12 at 1:03

2 Answers 2

up vote 10 down vote accepted

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

share|improve this answer
    
Works like a charm. Thanks very much! –  david sedai Mar 6 '12 at 1:09
    
By the way, the code \usetheme[hideothersubsections]{Marburg} can also be used so that the sidebar shows subsections only for the section the slide is currently in. –  david sedai Mar 6 '12 at 2:40

To summarize:

(i) use \title[]{Some title} and \author[]{author} into tricking LaTeX to think that the short title/author is the empty string as represented by [].

(ii) use Gonzalo Medina's excellent solution to print out the numbered items.

share|improve this answer
2  
My solution also takes care of the author/title issue: you can still use a non-empty optional argument and no information will be added to the sidebar. –  Gonzalo Medina Mar 6 '12 at 2:21
    
@Gonzalo Medina Absolutely. It's really a neat, all-in-one-place solution. I just want to point out that if someone else needs only to omit the author/title in the sidebar, there is a simple way using the blank brackets []. Thank you. –  david sedai Mar 6 '12 at 3:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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