josephwright / beamer

A LaTeX class for producing presentations and slides
Other
1.35k stars 139 forks source link

support `\@currentHpage` #903

Open u-fischer opened 1 week ago

u-fischer commented 1 week ago

A current hyperref normally sets pageanchors on every page with destination names like page.i or page.1 depending on the page numbering. After setting such an anchor it updates (globally) the command \@currentHpage to contain this name. This makes it possible to retrieve the names through the new label system and use them e.g. for links:

\documentclass{book}
\usepackage{hyperref}
\pagenumbering{roman}
\begin{document}
\hyperlink{\RefProperty{A}{pagetarget}}{to \RefProperty{A}{pagetarget}}
\hyperlink{\RefProperty{B}{pagetarget}}{to \RefProperty{B}{pagetarget}}

\newpage
a page \RecordProperties{A}{pagetarget}
\newpage 

\pagenumbering{arabic}
a page \RecordProperties{B}{pagetarget}

\end{document}

gives

image

With beamer this doesn't work as beamer doesn't load all of hyperref and so the property and the links are empty. This is for example a problem for lastpage which relies on \@currentHref to be available, to setup links to the last page. See https://tex.stackexchange.com/q/721538/2388. (lastpage should be more careful here, but that is a different problem)

Could beamer please update (globally) \@currentHpage when it sets frame/page/slides anchors?