3

I created a presentation with beamer, but the presentation is too long for the table of contents to fit in one frame. So I wanted to ask if it is possible to remove the line break after each subsection. Instead of

Section 1
   Subsection 1a
   Subsection 1b
   Subsection 1c
Section 2
   Subsection 2a
   Subsection 2b
   Subsection 2c

I want it to look like

Section 1
   Subsection 1a -- Subsection 1b -- Subsection 1c
Section 2
   Subsection 2a -- Subsection 2b -- Subsection 2c

Does anyone know whether this is possible?

A code might look like this:

\documentclass{beamer}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{Section 1}
\subsection{Subsection 1a}
\begin{frame}
Slide 1
\end{frame}

\subsection{Subsection 1b}
\begin{frame}
Slide 2
\end{frame}

\subsection{Subsection 1c}
\begin{frame}
Slide 3
\end{frame}

\section{Section 2}
\subsection{Subsection 2a}
\begin{frame}
Slide 4
\end{frame}

\subsection{Subsection 2b}
\begin{frame}
Slide 5
\end{frame}

\subsection{Subsection 2c}
\begin{frame}
Slide 6
\end{frame}


\end{document}
1

1 Answer 1

3

You can redefine the subsection in toc template to achieve the desired layout.

MWE

\documentclass{beamer}

\defbeamertemplate*{subsection in toc}{sub on 1 line}
{
  \ifnum\inserttocsubsectionnumber=1
    \phantom{---}\quad\inserttocsubsection 
  \else
    ---\quad\inserttocsubsection 
  \fi
}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{Section 1}
\subsection{Subsection 1a}
\begin{frame}
Slide 1
\end{frame}

\subsection{Subsection 1b}
\begin{frame}
Slide 2
\end{frame}

\subsection{Subsection 1c}
\begin{frame}
Slide 3
\end{frame}

\section{Section 2}
\subsection{Subsection 2a}
\begin{frame}
Slide 4
\end{frame}

\subsection{Subsection 2b}
\begin{frame}
Slide 5
\end{frame}

\subsection{Subsection 2c}
\begin{frame}
Slide 6
\end{frame}

\end{document}

Output

enter image description here

You must log in to answer this question.

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