pdfpc/latex-pdfpc

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

muelli opened this issue · 8 comments

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.

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

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

...

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

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.

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?

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

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.

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.

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?

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.