4

I'm using beamer with the Warsaw theme to create a presentation. Now I want to change the header to display the sections and subsections next to each other instead of below each other.

The usual Warsaw theme:

vertikal

What I'm looking for:

horizontal sections

The respective subsections should be displayed in the blue stripe on the right. So actually the original theme only has to be changed from vertical to horizontal display of the sections and subsections.

I found this code that partly does what I'm looking for. But then the subsections will disappear.

\setbeamertemplate{headline}{%
\leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette quaternary}%
    \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
    \end{beamercolorbox}%
  }
}

Custom headline in LaTeX Beamer?

Thanks for your help!

1

1 Answer 1

6

You can use the compress beamer option:

\documentclass[compress]{beamer}

\usetheme{Warsaw}

\begin{document}

\section{title}
\section{titlea}
\subsection{title}
\subsection{titlea}
\begin{frame}
    abc
\end{frame} 

\end{document}

enter image description here

4
  • Thank you, but it works only when I remove the custom color. How can I use both [compress] and [xcolor] at the same time? \documentclass[compress][xcolor=dvipsnames]{beamer} \usepackage{graphicx} \usepackage{fancybox} \usetheme{Warsaw} \usecolortheme[named=MidnightBlue]{structure} \setbeamertemplate{caption}[numbered] \usepackage[T1]{fontenc} \usepackage[ansinew]{inputenc} \usepackage{inputenc} \usepackage{pgfpages} \usepackage{amsmath}
    – user162888
    May 12, 2018 at 20:46
  • 1
    @Toffee \documentclass[compress,xcolor=dvipsnames]{beamer} May 12, 2018 at 20:52
  • 1
    @Toffee You don't need \usepackage{graphicx} with beamer May 12, 2018 at 20:52
  • 1
    @Toffee You should also not load the same package more than once May 12, 2018 at 20:53

Your Answer

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