11

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}
\setbeamertemplate{navigation symbols}{} 


\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}
3
  • 1
    What do you mean by default configuration? The default theme has no navigation bar at all.
    – fudo
    Jun 20, 2011 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, 2011 at 16:46
  • Added a MWE in the description. Jun 20, 2011 at 17:35

2 Answers 2

11

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}

\setbeamertemplate{headline}
{%
  \leavevmode%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
    \hbox to .5\paperwidth{\hfil\insertsectionhead\hfil}
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
    \hbox to .5\paperwidth{\hfil\insertsubsectionhead\hfil}
  \end{beamercolorbox}%
}

\setbeamertemplate{navigation symbols}{} 

\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}
0
8

The solution is using a different outer-theme

\useoutertheme{infolines}
2
  • 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, 2011 at 21:44
  • 1
    When I use this command, frametitle (when exists) overlaps the headine. How can we fix it?
    – bkarpuz
    Jun 22, 2017 at 7:09

You must log in to answer this question.

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