Joseph Wright avatar Joseph Wright committed 974005d

Move page (navigation) links to shipout box (fixes #238)

The code here is now modelled on `hyperref`, which is loaded by `beamer`
but not including the page links part. The links are now correctly
positioned for selection by (hopefully) all viewers.

Comments (0)

Files changed (2)


-  \def\@oddfoot{\vbox{\offinterlineskip\hbox{\beamer@typesetheadorfoot{footline}%
-        \hypertarget{Navigation\the\c@page}{}%
-        \hypertarget{page.\the\c@page}{}\hfil}\hbox{}}\hfil}
+  \def\@oddfoot{}
-  \def\@oddfoot{\normalcolor{\hypertarget{Navigation\the\c@page}{}\hfil%
+  \def\@oddfoot{\normalcolor{%
     \setbox\beamer@tempbox=\hbox{\usebeamertemplate***{navigation symbols}\hskip-\Gm@rmargin\hskip2pt}%


+% Page anchors
+% This code is copied from hyperref, which doesn't activate this part with
+% option "implicit = false" set. Things are much simplified as we already
+% know that anchors are required and what to use for them.
+  \Hy@DistillerDestFix
+  \vbox to 0pt{%
+    \kern\voffset
+    \kern\topmargin
+    \kern-1bp\relax
+    \hbox to 0pt{%
+      \kern\hoffset
+      \kern\ifodd\value{page}%
+        \oddsidemargin
+      \else
+        \evensidemargin
+      \fi
+      \kern-1bp\relax
+      \hyper@@anchor{Navigation\the\c@page}%
+      \hyper@@anchor{page.\the\c@page}%
+      \hss
+      }%
+    \vss
+  }%
+  \setbox\AtBeginShipoutBox=\vbox{%
+    \offinterlineskip
+    \Hy@EveryPageAnchor
+    \box\AtBeginShipoutBox
+  }%
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.