Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I reduce the spacing between the items of my table of contents in my beamer presentation?

Here is my currient LaTeX code:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}der pdf
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\title[Short title]{My very long title that doesn't fit into the footer}
\author{Me}
\date{\today}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{footline}[frame number]
\usetheme{CambridgeUS}

\AtBeginSection[]
{
\begin{frame}
\frametitle{Outline}
\tableofcontents[currentsection, hideothersubsections]
\end{frame}
}

\begin{document}

\maketitle
\clearpage

\begin{frame}
\frametitle{Outline}
\tableofcontents[hideothersubsections]
\end{frame}


\section{Intro}
\begin{frame}
\frametitle{Welcome}
...
\end{frame}

\section{Topic 1}
\begin{frame}
\frametitle{Topic 1}
...
\end{frame}

\section{Topic 2}
\begin{frame}
\frametitle{Topic 2}
...
\end{frame}

\subsection{Red}
\begin{frame}
\frametitle{Red}
...
\end{frame}

\subsection{Green}
\begin{frame}
\frametitle{Green}
...
\end{frame}

\subsection{Blue}
\begin{frame}
\frametitle{Blue}
...
\end{frame}

\section{Topic 3}
\begin{frame}
\frametitle{Topic 3}
...
\end{frame}

\section{Topic 4}
\begin{frame}
\frametitle{Topic 4}
...
\end{frame}

\section{Topic 5}
\begin{frame}
\frametitle{Topic 5}
...
\end{frame}

\section{The end}
\begin{frame}
\frametitle{The end}
End of file :-)
\end{frame}

\end{document}

See page 7 the point "The end" is missing. I need that one.

share|improve this question
add comment

1 Answer 1

up vote 9 down vote accepted

The internal command \beamer@sectionintoc (defined in the file beamerbasetoc.sty) controls how the section entries will be typeset in the ToC; it issues a \vskip1.5em that adds vertical spacing between section entries. With the help of the etoolbox package you can easily patch the command to add less vertical spacing. A little example:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\beamer@sectionintoc}{\vskip1.5em}{\vskip0.5em}{}{}
\makeatother

\title[Short Title]{My very long title that doesn't fix into the footer}
\author{Me}
\date{\today}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{footline}[frame number]
\usetheme{CambridgeUS}

\AtBeginSection[]
{
\begin{frame}
\frametitle{Outline}
\tableofcontents[currentsection, hideothersubsections]
\end{frame}
}

\begin{document}

\maketitle
\clearpage

\begin{frame}
\frametitle{Outline}
\tableofcontents[hideothersubsections]
\end{frame}


\section{Intro}
\begin{frame}
\frametitle{Welcome}
...
\end{frame}

\section{Topic 1}
\begin{frame}
\frametitle{Topic 1}
...
\end{frame}

\section{Topic 2}
\begin{frame}
\frametitle{Topic 2}
...
\end{frame}

\subsection{Red}
\begin{frame}
\frametitle{Red}
...
\end{frame}

\subsection{Green}
\begin{frame}
\frametitle{Green}
...
\end{frame}

\subsection{Blue}
\begin{frame}
\frametitle{Blue}
...
\end{frame}

\section{Topic 3}
\begin{frame}
\frametitle{Topic 3}
...
\end{frame}

\section{Topic 4}
\begin{frame}
\frametitle{Topic 4}
...
\end{frame}

\section{Topic 5}
\begin{frame}
\frametitle{Topic 5}
...
\end{frame}

\section{The end}
\begin{frame}
\frametitle{The end}
End of file :-)
\end{frame}

\end{document}
share|improve this answer
    
This workes perfect. Thanks! –  rekire Apr 10 '12 at 19:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.