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

mark frame as last frame of presentation (enduserslide, but inline) #1

Open
muelli opened this issue May 17, 2022 · 8 comments
Open
Labels
enhancement New feature or request

Comments

@muelli
Copy link

muelli commented May 17, 2022

I am aware of enduserslide but it takes a number that I don't necessarily know upfront.
I would like to leave a marker in the codes for my slides and have LaTeX figure out the slide number on its own. There may be other mechanisms that I am unaware of that could be used to achieve the goal.

So I think I would prefer having something like

\begin{frame}
\pdfpclastframe
My last frame
\end{frame}

rather than having to know the number of the slide upfront.

Better yet if \appendix would be recognised and the last content slide be marked as enduserslide automatically.

I've toyed around with a few approaches and most notably, using the framenumber is not a solution, because you can have skipped frames with the <0> overlay specification.

@fnevgeny fnevgeny added the enhancement New feature or request label May 17, 2022
@fnevgeny
Copy link
Member

Please check #2. With it, you can do something like

\usepackage{refcount}
\pdfpcsetup{enduserslide=\getrefnumber{lastslide}}

...

\begin{frame}[label=lastslide]
...
\end{frame}

@muelli
Copy link
Author

muelli commented May 20, 2022

that suffers from excluded frames with <0>, e.g.

\begin{frame}<0>{foo}
\end{frame}

interestingly, the framecounter is bumped on not-rendered frames which trips up to the logic to detect the pdf page the slide is on.

@fnevgeny
Copy link
Member

fnevgeny commented May 22, 2022

I think I understand the problem. The reference is actually to the PDF page label, not the frame number. In case of <0>, beamer just skips the frame in the output but leaves the original labels of the following slides.

So pdfpc needs to be told to interpret the enduserslide parameter as a page label. I don't think it's right to change the behavior unconditionally - first, there is backward compatibility, but also there are legitimate cases to use it in the present way. So either we add, e.g., enduserslidelabel or alter enduserslide to somehow distinguish by the parameter format, say, enduserslide=label:<whatever>. @AndreasBilke, what do you think?

@AndreasBilke
Copy link
Member

I must admit that I don't understand the technical problem which occurs here.

@muelli
Copy link
Author

muelli commented May 25, 2022

I would probably go for a new parameter, e.g. enduserslideslabel or so, and prevent both of the parameters to be used at the same time.
But I consider the exact ergonomics of the interface to be in the bike-shedding territory.

@fnevgeny
Copy link
Member

When bike sheds start occupying a significant part of the campus area, the problem changes its quality :). Which is the case with the complexities of interacting/working around all beamer issues.

@muelli
Copy link
Author

muelli commented May 25, 2022

I wonder whether josephwright/beamer@24207e0 changes the behaviour sufficiently much to have an impact on the solution required here.
Could asking beamer people help to find out how to get hold of the relevant value?

@fnevgeny
Copy link
Member

fnevgeny commented Jun 4, 2022

Probably that change will suffice, indeed. But in general, it isn't guaranteed that PDF page label = page number (or even that the labels are numeric), so enduserslidelabel seems the right way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants