3

I am creating a presentation using the beamer class and the Singapore theme, however I have so many sections that the slide ticker bar at the top runs off the edge of the page.

Is there a way to make a second row of section names in the header, or alternatively insert a line break into the section names? I have tried following the advice here: using \textit in \section{} with beamer class to try and get formatting in the section to no avail, and here How to put a line-break in section heading? but it doesn't seem to work with beamer.

Minimum working example:

\documentclass[compres]{beamer}
\documentclass[compres]{beamer}
\usetheme{Singapore}

\begin{document}

\section{Bijection to nondeterministic metric space}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Introduction to Langevin diffusion}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Twice differentiable complexity classes}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Applications in 4D}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Conclusions}
\subsection{}
\begin{frame}{}
\end{frame}

\end{document}

In this example, line breaking the section headings would allow the problem to be fixed.

1 Answer 1

2

Here's one possible solution: now each title is typeset inside a \parbox; the width of the \parboxes is internally calculated as the available width divided by the total number os sections.

\documentclass[compress]{beamer}
\usetheme{Singapore}
\usepackage{ragged2e}

\makeatletter
\setbeamertemplate{section in head/foot}{%
  \parbox[c][0.33cm][t]{\dimexpr(\textwidth-1.3cm)/\beamer@sectionmax\relax}{%
    \RaggedRight\fontsize{4}{4}\selectfont\insertsectionhead}}
\makeatother

\begin{document}

\section{Bijection to nondeterministic metric space}
\subsection{}
\begin{frame}{Test Frame One}
test
\end{frame}
\begin{frame}{}
\end{frame}
\begin{frame}{}
\end{frame}

\section{Introduction to Langevin diffusion}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Twice differentiable complexity classes}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Applications in 4D}
\subsection{}
\begin{frame}{}
\end{frame}

\section{Conclusions}
\subsection{}
\begin{frame}{}
\end{frame}

\end{document}

An image of the new headline:

enter image description here

If your titles are too long, you could consider using the optional argument of \section instead:

\section[Title in Nav and Toc]{Title in Document}
0

You must log in to answer this question.

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