# Issues

Issue #118 resolved

# sub/section number in references is wrong, when using AtBegin

A Mennucci created an issue

hi

in the attached example, the references to labels of sections and subsections are wrong.

The problem is that the LaTeX \section{sec3}\label{sec3} works by writing the content of \@currentlabel into the test.aux file. But if

\AtBeginSection[]{
\begin{frame}<presentation>[plain]
\frametitle{Outline of section}
\tableofcontents[currentsection]
\end{frame}}


is used, the 'frame' environment damages the value of \@currentlabel

The 'frame' environment should store the value of \@currentlabel somewhere and put it back when it ends. (Thats what all other LaTeX environment such as theorems and equations do).

I attach a test case, and a a patch.

a.

ps: this was posted as bug 2089481 in sourceforge, together with a patch, but the patch was never applied; I hope this time it is.