Issue #12 resolved

Wrong section numbering qith \section in groups.

Manuel Pégourié-Gonnard
created an issue

Hi,

When a \section command appears inside an group (e.g. inside an environment), the section numbers in the table of contents are wrong. The reason is, \beamer@section increments \beamer@tocsectionnumber using \advance without a \global prefix.

Using \section inside a group may sound weird, but is quite natural when preparing alternative version using the comment package. Here is a reproducer, tested with beamer 3.07:

{{{ \documentclass{beamer} \usepackage[ascii]{inputenc} \usepackage[T1]{fontenc} \usepackage{verbatim} \newenvironment{fr}{\comment}{\endcomment} \newenvironment{en}{}{}

\useinnertheme{rounded}

\begin{document}

\frame{\tableofcontents}

\begin{en} \section{Beamer is cool} \end{en} \begin{fr} \section{Beamer, c'est bien} \end{fr} \frame{blabla}

\begin{en} \section{Beamer is really cool} \end{en} \begin{fr} \section{Beamer, c'est vraiment bien} \end{fr} \frame{blabla}

\end{document} }}}

Thanks, Manuel.