Issue #224 resolved

Messed up item labels

Gábor Braun
created an issue

Minimal example

Beamer version used:

beamer 2010/06/21 development version 3.10 A class for typesetting presentations (rcs-revision a6b1a8434d30)

Example document:

\documentclass{beamer}

\begin{document}

\begin{frame}[<+->]{List test}
\begin{description}
\item[I]
  \begin{description}
  \item[B] foo
  \item[O] bar
  \end{description}
\item[J]
\item[F] empty
\item[+]
\end{description}
\end{frame}

\end{document}

Proposed solution

The problem stems from wrapping \item inside an environment (actionenv) erroneously cancelling all local changes made by \item:

  • setting @paritem to false
  • setting up \everypar to handle item content (\item and \end{list} relies on it to handle a previous empty item)

The proposed change is to handle empty items by beamer just before \end{actionenv} (by the same code as LaTeX would do) and set @paritem to false after it:

--- /usr/share/texmf/tex/latex/beamer/base/beamerbaseoverlay.sty    2012-06-28 11:19:42.000000000 +0200
+++ beamerbaseoverlay.sty   2012-11-11 19:20:49.554030002 +0100
@@ -488,7 +488,13 @@
 \long\def\beamer@itemreverse[#1]<#2>{\beamer@parseitem<#2>[{#1}]}

 \def\beamer@parseitem<#1>{%
-  \gdef\beamer@closeitem{\end{actionenv}}%
+  \gdef\beamer@closeitem{%
+    %% Handle empty item as LaTeX would do
+    \if@inlabel\indent\par\fi
+    \end{actionenv}%
+    %% Local change inside actionenv should survive, and should be
+    %% always false
+    \@noparitemfalse}%
 \begin{actionenv}<#1>\beamer@callorigitem}

Comments (1)

  1. Log in to comment