6

In my example

\documentclass{beamer}
\usepackage{pgfpages}

%\setbeameroption{show notes on second screen}
\setbeameroption{show notes}
\setbeamertemplate{note page}{\insertnote}

\begin{document}
\frame{\href{http://www.google.com}{test frame}\note{\href{http://www.google.com}{test note}}}
\end{document}

the link behind "test note" only works if I use "show notes", if I switch to "show notes on second screen" then the link is not clickable at all. Any ideas or help?

6
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. In your post, there is a reference to a file test.R which is not available to users here in order to help you.
    – user31729
    Commented Mar 8, 2014 at 16:40
  • Maybe the use of pgfpages is what stops this working. Not sure and can't test, as @ChristianH. noted. I know that pages included using pdfpages lose hyperlinks etc. and I'm wondering if beamer's use of pgfpages has the same effect in this case. But I have no idea whether this is so or not.
    – cfr
    Commented Mar 9, 2014 at 0:50
  • @cfr: without pgfpages I get the erorrmessage "l.4 \setbeameroption{show notes on second screen} The control sequence at the end of the top line of your error message was never \def'ed..." when \setbeameroption{show notes on second screen} is used
    – user47574
    Commented Mar 9, 2014 at 13:38
  • Yes. beamer requires pgfpages to support the notes-on-second-screen option. I was just suggesting a possible avenue of investigation to help you diagnose the cause - not a solution.
    – cfr
    Commented Mar 9, 2014 at 15:52
  • I think in your original code, you were trying to run an external something. If this is something like a movie, you might try using the multimedia package with the label option to \movie and then use \hypelinkmovie for the second reference as explained on page 134 of beamer's manual. If this is an option, I think it might work around the complaint that the destination of the second \href is already defined and is therefore being ignored (which is what the output says when I run your MWE). However, I don't know if this is an option and don't have a movie to hand to test anyway.
    – cfr
    Commented Mar 9, 2014 at 16:22

2 Answers 2

6

I think the problem is that show notes on second screen requires pgfpages but pgfpages breaks hyperlinks when it rearranges pages. I was looking for something else and I just found this in the manual (and then had to try to find this question):

A word of warning: using pgfpages will destroy hyperlinks. Actually, the hyperlinks are not destroyed, only they will appear at totally wrong positions on the final output. This is due to a fundamental flaw in the pdf specification: In pdf the bounding rectangle of a hyperlink is given in “absolute page coordinates” and translations or rotations do not affect them. Thus, the transformations applied by pgfpages to put the pages where you want them are (cannot, even) be applied to the coordinates of hyperlinks. It is unlikely that this will change in the foreseeable future.

The reference is page 920 of the tikz/pgf manual.

Since I think the entire notes page is probably placed via a transformation using pgfpages when you ask for notes on the second screen, I am afraid that it looks as if the answer to your question might be that it cannot be done (at the present time and in 'the foreseeable future'). If this is a limitation of the PDF specification itself, as this documentation suggests, you are probably out of luck.

This isn't exactly an answer except in the technical sense that 'Any ideas or help?' might be answered 'No. None.' but I thought that this information might at least save you from pursuing dead ends and allow you to focus on developing an alternative strategy.

2

@cfr's answer is right to the point. Let me describe a hacky workaround. It works for links which don't contain a line break.

\newcommand{\fixedhref}[2]{\makebox[0pt][l]{\hspace*{\paperwidth}\href{#1}{#2}}\href{#1}{#2}}

Use it as a drop-in replacement to \href. The idea is quite simple: In addition to drawing the link as usual (whose clickable area is in the left pane, \paperwidth to the left of where the label is actually drawn), the link is drawn a second time much farther to the right. Thanks to the bug in the PDF specification, the clickable area of this second like will be at exactly the place the label of the first link is drawn.

An improved solution would remove the spurious clickable areas in the left pane while still applying the \href styling to the label text.

1
  • 1
    I know this is an old post, but could you just change the second \href{#1}{#2} to just #2? Seems to remove the spurious clickable area on the left pane.
    – luthien
    Commented Jun 15, 2023 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .