5

I would like to get for my beamer presentation, using smoothbars, the overview of all the subsections of my current section. I would like to see the subsections as how the sections look.

\usetheme{Madrid}
\useoutertheme{smoothbars}
\setbeamertemplate{mini frames}{}

I've used the following code but I don't obtain the result :

\makeatletter
\setbeamertemplate{subsection in smoothbars}
       {\vspace*{-\baselineskip}}
\makeatother

Can somebody help ?

7

You can redefine the headline beamer template as defined in beamerouterthemesmoothbars.sty to use \insertsubsectionnavigationhorizontal instead of the default \insertsubsectionhead; something along these lines:

\documentclass{beamer}
\usetheme{Madrid}
\useoutertheme{smoothbars}
\setbeamertemplate{mini frames}{}

\makeatletter
\setbeamertemplate{headline}
{%
  \pgfuseshading{beamer@barshade}%
  \ifbeamer@sb@subsection%
    \vskip-9.75ex%
  \else%
    \vskip-7ex%
  \fi%
  \begin{beamercolorbox}[ignorebg,ht=2.25ex,dp=3.75ex]{section in head/foot}
    \insertnavigation{\paperwidth}
  \end{beamercolorbox}%
  \ifbeamer@sb@subsection%
    \begin{beamercolorbox}[ignorebg,ht=2.125ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
      \usebeamerfont{subsection in head/foot}\insertsubsectionnavigationhorizontal{\dimexpr\paperwidth-0.6cm\relax}{}{}
    \end{beamercolorbox}%
  \fi%
}
\makeatother
\begin{document}

\section{Test Section One}
\begin{frame}test\end{frame}
\subsection{Test Subsection One One}
\begin{frame}test\end{frame}
\subsection{Test Subsection One Two}
\begin{frame}test\end{frame}
\subsection{Test Subsection One Three}
\begin{frame}test\end{frame}
\section{Test Section Two}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two One}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two Two}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two Three}
\begin{frame}test\end{frame}
\subsection{Test Subsection Two Four}
\begin{frame}test\end{frame}

\end{document}

Some zoomed images showing the headline for some frames in the first and second sections:

enter image description here

enter image description here

  • @sk001 You're welcome! If you consider the answer solved your problem, don't forget to mark it as accepted (accepting and up-voting are two different actions). In case of doubt, please see How do you accept an answer?. – Gonzalo Medina Dec 15 '12 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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