# Section title doesn't fit in TOC in beamer

So I have a section in my presentation with a longer name. And on the slides I just used \small, and it fit onto the slide, but on the toc it doesn't 'break', it just continues on cutting off the title of the section :\

Is there a way to make it fit, or to continue underneath the section?

MWE:

\documentclass[xcolor=dvipsnames,mathserif,professionalfont,12pt]{beamer}
\usecolortheme[named=RoyalBlue]{structure}
\useoutertheme{infolines}
\usetheme[height=7mm]{Rochester}
\setbeamertemplate{items}[ball]
%\usefonttheme{serif}
\usefonttheme{professionalfonts}

\usepackage{amsmath,amssymb,amsthm,amssymb}
\usepackage{mathtools}
\usepackage{bbm}
\usepackage{graphicx}
\usepackage{float}
\usepackage[croatian]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{txfonts}
\usepackage{subfigure}
\usepackage{color}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{time}
\usepackage{extarrows}

\title{Title}
\subtitle{Subtitle}
\author{Me}
\institute[Random institute]{Random institue}
\date{\today}

\begin{document}
\maketitle

\begin{frame}
\frametitle{ToC}
\tableofcontents
\end{frame}

\section{Section 1}
\begin{frame}
\frametitle{Section 1}
bla
\end{frame}

\section{Section 2}

\begin{frame}
\frametitle{Section 2}
bla
\end{frame}

\subsection{A very long subsection that doesn't want to collapse into two row, but rather goes on and on and on}

\begin{frame}
\frametitle{\small{A very long subsection that doesn't want to collapse into two row, but rather goes on and on and on}}
bla
\end{frame}

\end{document}


EDIT: This is the output:

-
Can you please add a minimal working example illustrating your problem? The titles in the ToC are normally split into the necessary lines. –  Gonzalo Medina Jun 9 '11 at 17:48
Added MWE... This is basically what my presentation looks like (ofc it has more contents but you get the point)... Here it does the same thing in TOC... –  dingo_d Jun 9 '11 at 17:58
But your example code doesn't reproduce the effect you mentioned. After compiling it, the long title splits into two lines in the ToC. Do you get a different result with this very same code? –  Gonzalo Medina Jun 9 '11 at 18:01
Ok, I've added the screenshot... It doesn't want to split :I'm compiling it from dvi to ps, because that's the only way I can get pictures to show, can that be the problem? –  dingo_d Jun 9 '11 at 18:08
Yes, that's the problem. If you compile your example code using pdflatex, the problem disappears. Can't you convert your image files to a format supported by pdflatex? This will allow you to compile to pdf directly. –  Gonzalo Medina Jun 9 '11 at 18:19

Compiling with latex-ps-pdf hyperref isn't able to break links directly. You can use the following snippet:

\makeatletter
\providecommand{\H@@footnotetext}{}
\makeatother
\usepackage{hypdvips}


Or you can load the package hyperref with the option breaklinks=true

\documentclass[hyperref={breaklinks=true}]{beamer}

-
This worked ^^ Thank you –  dingo_d Jun 10 '11 at 6:38

Use the optional argument to \subsection to give an alias for the subsection. Example:

\subsection[Short but descriptive name]{A very long subsection that doesn't want to collapse into two row, but rather goes on and on and on}

-
I tried this but it didn't want to show ToC at all... –  dingo_d Jun 9 '11 at 18:43
This won't solve the problem. The optional argument for the sectional units won't go to the ToC in beamer. –  Gonzalo Medina Jun 9 '11 at 18:46