[Tex/LaTex] LaTeX Beamer Warsaw Theme Custom Headline Horizontal ToC

beamerheader-footerthemes

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!

Best Answer

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