Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onslide on a frame with itemize in notes produces too many slides #776

Open
Delzye opened this issue Jun 11, 2022 · 7 comments
Open

Onslide on a frame with itemize in notes produces too many slides #776

Delzye opened this issue Jun 11, 2022 · 7 comments

Comments

@Delzye
Copy link

Delzye commented Jun 11, 2022

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:
image

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?

@samcarter
Copy link
Collaborator

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}

@samcarter
Copy link
Collaborator

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}

@samcarter
Copy link
Collaborator

This problem started somewhere between TL17 and TL18

@samcarter
Copy link
Collaborator

The problem seems to have started in a5b6014

@samcarter
Copy link
Collaborator

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}

@josephwright
Copy link
Owner

@samcarter It was to fix #324, which I vaguely remember and I am reasonably sure was an issue at the time

@samcarter
Copy link
Collaborator

@josephwright so we probably have to distinguish between the cases where only notes are shown and where notes are shown together with the slides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants