I need to refer in \frametitle to a section that I have labelled with a new command \mylabel. Here is the code
\documentclass{beamer}
\makeatletter
\newcommand*{\mylabel}[2]{%
\@bsphack
\begingroup
\def\@currentlabel{#2}%
\label{#1}%
\endgroup
\@esphack
}
\makeatother
\begin{document}
\section[Title 1]{This is a long title that gos on very long long long long long
long long title more long long }{\mylabel{LabelTopic1}{This is a long title that
gos on very long long long long long long long title more long long }}
\frame<presentation>{\frametitle{\ref{LabelTopic1}}}
\end{document}
This is what I have got

The problem is that the name is too long and does not fit in one line of frametitle and the line does not break. I think that something is missing in the command \mylabel. But I don't know what.
Thank you for any help

long long title more long long }{\mylabel{LabelTopic1}{This is a long title that
gos on very long long long long long long long title more long long }} – michele Mar 14 '14 at 22:22