beamer
beamer copied to clipboard
Onslide on a frame with itemize in notes produces too many slides
Minimal Example:
\begin{frame}
\onslide*<1>{1}
\onslide*<2>{2}
\note{
\begin{itemize}
\item<1> 1
\item<2> 2
\end{itemize}
}
\end{frame}
Problem: I would expect this code to produce two slides, the first has a "1" on the slide and an item in the notes with a "1" and the same with a "2" for the second slide. But it produces three slides where the third has no content, but the note has an item with a "2" on it.
My result:

The workaround is quite easy with a <1-2> after \begin{frame}, but it still should not be happening.
Or am I missing something/doing something wrong?
As a workaround, you could use
\documentclass{beamer}
\setbeameroption{show notes on second screen}
\makeatletter
\patchcmd{\beamer@setupnote}{\begin{enumerate}}{\begin{itemize}}{}{}
\patchcmd{\beamer@setupnote}{\end{enumerate}}{\end{itemize}}{}{}
\makeatother
\begin{document}
\begin{frame}
\only<1>{1}
\only<2>{2}
\note[item]<1>{1}
\note[item]<2>{2}
\end{frame}
\end{document}
Note to self:
Minimal reproducible example
\documentclass{beamer}
\setbeameroption{show notes on second screen}
\begin{document}
\begin{frame}
\only<2>{2}
\note{
\only<2>{2}
}
\end{frame}
\end{document}
This problem started somewhere between TL17 and TL18
The problem seems to have started in a5b601498b51f2a17b327e230e928293349ebf7d
This seems to work, but I don't know why this decreasing/increasing of the counter was added in the first place
\documentclass{beamer}
%\setbeameroption{show notes}
\setbeameroption{show notes on second screen=right}
%\setbeameroption{show only notes}
\makeatletter
\def\beamer@setupnote{%
\gdef\beamer@notesactions{%
\beamer@outsideframenote{%
% Notice that the note page is typeset at the beginning of the next slide
% \advance\beamer@slideinframe by-1\relax
\beamer@atbeginnote%
\beamer@notes%
\ifx\beamer@noteitems\@empty\else
\begin{enumerate}\itemsep=0pt\parskip=0pt%
\beamer@noteitems%
\end{enumerate}%
\fi%
\beamer@atendnote%
% \advance\beamer@slideinframe by 1\relax%
}%
\gdef\beamer@notesactions{}%
}
}
\makeatother
\begin{document}
\begin{frame}
\only<2>{2}
\note{
\only<2>{2}
}
\end{frame}
\end{document}
@samcarter It was to fix https://github.com/josephwright/beamer/issues/324, which I vaguely remember and I am reasonably sure was an issue at the time
@josephwright so we probably have to distinguish between the cases where only notes are shown and where notes are shown together with the slides