# How to show only current section/subsection in beamer ?

I was wondering, if it is possible to show only the current section and subsection in the navigation bar ? In the default configuration, the navigationbar uses too much space of the slide. With

\documentclass[compress]{beamer}


the items are squashed together.

Here is a minimal example:

% packages
\documentclass[serif,mathserif]{beamer}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath, amsfonts, epsfig, xspace}
\usepackage{beamerthemesplit}

% template
\usetheme{default}
\useoutertheme{default}

\begin{document}

\section{section a}
\begin{frame} \frametitle{frame 1} \end{frame}
\section{section b}
\begin{frame} \frametitle{frame 2} \end{frame}
\section{section c}
\begin{frame} \frametitle{frame 3} \end{frame}
\section{section d}
\begin{frame} \frametitle{frame 4} \end{frame}

\end{document}

-
What do you mean by default configuration? The default theme has no navigation bar at all. – fudo Jun 20 '11 at 10:54
Nope. Still no navigation bar for me, even with those commands; the problem must be somewhere else. Could you write a MWE? – fudo Jun 20 '11 at 16:46
Added a MWE in the description. – Patrick Gretzki Jun 20 '11 at 17:35

The solution is using a different outer-theme

\useoutertheme{infolines}

-
I see. The non- default package causing all this was beamerthemesplit, a legacy theme; \usetheme{Malmoe} is now the recommended equivalent. By default, Malmoe's navigation bar shows all sections and subsections. You can change this behavior by selecting the infolines outer theme, as you and Gonzalo pointed out, or by selecting a different theme, like CambridgeUS. – fudo Jun 20 '11 at 21:44

You can either use the infolines outer theme, or set the headline beamer template using \insertsectionhead and \insertsubsectionhead; a little example:

\documentclass{beamer}

\usecolortheme{whale}
\useoutertheme{split}
\usefonttheme[onlysmall]{structurebold}

{%
\leavevmode%
\end{beamercolorbox}%
\end{beamercolorbox}%
}

\begin{document}

\section{Test section a}
\begin{frame} \frametitle{frame 1} \end{frame}
\subsection{Test subsection a1}
\begin{frame} \frametitle{frame 2} \end{frame}
\subsection{Test subsection a2}
\begin{frame} \frametitle{frame 3} \end{frame}
\section{Test section b}
\begin{frame} \frametitle{frame 4} \end{frame}
\subsection{Test subsection b1}
\begin{frame} \frametitle{frame 5} \end{frame}
\subsection{Test subsection b2}
\begin{frame} \frametitle{frame 6} \end{frame}

\end{document}

-