Package: latex-beamer Version: 3.07-1 Severity: normal Tags: patch hi
here are two bugs, and patch; I submitted those also upstream ---as posted in https://sourceforge.net/tracker/index.php?func=detail&aid=2089504&group_id=92412&atid=600660 If a presentation uses \subsection, then the labels to successive frames have wrong numbers. In the code, there is a counter called 'subsectionslide' that counts the number of slides since the last \subsection; the bug is that, when \subsection is invoked, 'subsectionslide' is incremented by \refstepcounter, so this is what is (wrongly) associated to the \label. --- https://sourceforge.net/tracker/index.php?func=detail&aid=2089481&group_id=92412&atid=600660 When using \AtBeginSection, the labels to sections and subsections are wrong. The problem is that the LaTeX \section{sec3}\label{sec3} works by writing the content of [EMAIL PROTECTED] into the .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 [EMAIL PROTECTED] before \label can write it to .aux ----- The attached patch fixes both issues. I also attach a stress LaTeX file, that shows the bug, and that testifies that my patch works. a. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core) Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages latex-beamer depends on: ii latex-xcolor 2.11-1 Easy driver-independent TeX class ii pgf 2.00-1 TeX Portable Graphic Format ii texlive-latex-base 2007.dfsg.1-3 TeX Live: Basic LaTeX packages latex-beamer recommends no packages. latex-beamer suggests no packages. -- no debconf information -- Andrea Mennucc "E' un mondo difficile. Che vita intensa!" (Tonino Carotone)
--- /usr/share/texmf/tex/latex/beamer/base/beamerbaseframe.sty.orig 2008-09-12 17:45:17.000000000 +0200
+++ /usr/share/texmf/tex/latex/beamer/base/beamerbaseframe.sty 2008-09-16 20:20:42.000000000 +0200
@@ -25,6 +25,9 @@
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]@currentlabel%
+ {\csname [EMAIL PROTECTED] the#1\endcsname}}%
+
%
% Slide Definitions
@@ -53,7 +56,7 @@
\fi%
[EMAIL PROTECTED]
[EMAIL PROTECTED]@framestartpage}{%
- \refstepcounter{subsectionslide}%
+ \stepcounter{subsectionslide}%do not alter value of \label!
[EMAIL PROTECTED]@page}% only first time
[EMAIL PROTECTED] cleanup from previous slide
\hypersetup{pdfpagetransition=R}%
@@ -76,6 +79,7 @@
[EMAIL PROTECTED]
\let\frame=\framelatex% inside frames, use LaTeX's \frame command
[EMAIL PROTECTED]
+ \refcounter{framenumber}%use frame number for \label
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
@@ -423,7 +427,7 @@
\setkeys{beamerframe}{environment=frame}%
\setkeys{beamerframe}{#2}%
[EMAIL PROTECTED]
- \refstepcounter{framenumber}%
+ \stepcounter{framenumber}%do not set \label here - it interferes with AtBegin*
[EMAIL PROTECTED]@[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
\documentclass{beamer}
%in article mode...
% \documentclass{article}
% \usepackage{beamerarticle}
%... all works fine, even the 'latesec' label!
\usetheme[secheader]{Boadilla}
%if you comment out the following AtBegin*, labeling works
\AtBeginSection[] {
\begin{frame}<presentation>[plain]
\frametitle{Outline of section}
\tableofcontents[currentsection]
\end{frame}}
\AtBeginSubsection[]{
\begin{frame}<presentation>[plain]
\frametitle{Outline of subsection}
\tableofcontents[currentsection,currentsubsection]
\end{frame}}
\begin{document}
\begin{frame}
in standard beamer 3.07
the following labels are all wrong
see section \ref{sec5} (should be section 5)
see section \ref{sec3} (should be section 3)
see subsection \ref{sec5sub2} (should be 5.2, but within standard
beamer, just 2)
frame \ref{frame} (should be 19)
frame \ref{frame15:pause} (should be 15)
and the reference after the frame as \ref{latesec} does not ever work(!)
\end{frame}
\section{sec1}
\subsection{sec1sub1}
\begin{frame}
frame \insertframenumber
\end{frame}
\section{sec2}
\begin{frame}
frame \insertframenumber
\end{frame}
\section{sec3}\label{sec3}
\begin{frame}
frame \insertframenumber
\end{frame}
\section{sec4}
\begin{frame}
frame \insertframenumber
\end{frame}
\subsection{sec4sub1}\label{sec4sub1}
\begin{frame}
frame \insertframenumber
\end{frame}
\section{sec5}\label{sec5}
\begin{frame}
frame \insertframenumber
\end{frame}
\begin{frame}[fragile]
frame \insertframenumber
\pause
bis \label{frame15:pause}
\end{frame}
\subsection{sec5sub1}\label{sec5sub1}
\begin{frame}
\gdef\mymacro{my value}
frame \insertframenumber
\end{frame}
\subsection{sec5sub2}\label{sec5sub2}
\begin{frame}
frame \insertframenumber
\label{frame}
\mymacro
\end{frame}
\label{latesec}
\end{document}
signature.asc
Description: Digital signature

