1

I want to split my frame title in the beamer class into two equal columns, so that in the left side the title of the section appears and in the right side the title of the subsection (if it exists) appears. Also, different colours for the sides would be nice.

I am trying to use:

\useoutertheme{split} 
\setbeamertemplate{headline}[split]

But it creates all the sections and subsections in the title, without naming them. I just want the current ones.

1

You have to redefine the headline by yourself in this case. I just copied the split theme and replaced the navigationbars with \insertsection and \insertsubsection respectively.

To set the color you have to use following the \setbeamercolor{} commands:

\setbeamercolor{section in head/foot}{fg=white, bg=red}
\setbeamercolor{subsection in head/foot}{fg=white, bg=blue}

Complete Example:

\documentclass{beamer}

\setbeamertemplate{headline}{%
  \leavevmode%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{section in head/foot}%
    \hfill\insertsection\hspace*{1em}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex]{subsection in head/foot}%
    \hspace*{1em}\insertsubsection%
  \end{beamercolorbox}%
}

\setbeamercolor{section in head/foot}{fg=white, bg=red}
\setbeamercolor{subsection in head/foot}{fg=white, bg=blue}

\begin{document}
\section{My Section 1}
\subsection{My Subsection 1}
\begin{frame}{Frametitle}
    Frame Content
\end{frame}
\subsection{My Subsection 2}
\begin{frame}{Frametitle}
    Frame Content
\end{frame}
\section{My Section 2}
\subsection{My Subsection 1}
\begin{frame}{Frametitle}
    Frame Content
\end{frame}
\subsection{My Subsection 2}
\begin{frame}{Frametitle}
    Frame Content
\end{frame}
\end{document}

Output:

beamer

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.