The default beamer template shows only the subsection in the headline. I would like it to show the section as well as the subsection. It can be done by changing the theme to infolines etc, but I prefer to use the default theme and just add the section name in the headline.
Here is how the original frame looks:
Here is how I want it:
MWE:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
%Modify theme
\setbeamertemplate{navigation symbols}{} %get rid of navigation symbols
\setbeamertemplate{sections/subsections in toc}[ball unnumbered] %bullets in table of contents should be balls
\setbeamertemplate{itemize items}[ball] %bullets in frames should be balls
\title{My title}
\author{My name}
\institute{My institute}
\date{\today}
\begin{document}
\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{Section 1}
\begin{frame}{Section 1}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\section{Section 2}
\subsection{Subsection 2.1}
\begin{frame}{Subsection 2.1}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\subsection{Subsection 2.2}
\begin{frame}{Subsection 2.2}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\end{document}
Best Answer
One possibility is to (re)define an appropriate template (the sensible candidates are
headline
orframe title
) to use\insertsectionhead
and\insertsubsectionhead
:The code: