1

I'd like to have an hyperlink non clickable when invisible but whith the taking his space like with onslide instead of only :

In this example :

  • the item-2 is correct (invisible, non clickable when invisible)
  • the item-3 is incorrect (invisible, but clickable when invisible)
  • the item-4 is incorrect (invisible, non clickable when invisible) but doen't take his room.

How to fix this ?

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764
\begin{document}
\begin{frame}[label=bob]

bla

\begin{enumerate}[<+->]

\item 1
\item 3 \hyperlink<2>{bob<1>}{Back}
\item 3 \hyperlink{bob<1>}{Back}
\item 2 \hyperlink<4>{bob<1>}{Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla}
\end{enumerate}

bla
\end{frame}
\end{document}
Andrew Swann
  • 95,762
Tarass
  • 16,912
  • I'd try \only<4>{\hyperlink{bob<1>}{Bla Bla Bla ... Bla}} – AlexG Jul 09 '15 at 08:55
  • Doesn't take room on other slides than 4 ? I begin to understand that what I'm asking is not possible, I'll try to put the hyperlink on the itmize sign. – Tarass Jul 09 '15 at 09:13
  • 1
    I think so. Quote from beameruserguide.pdf, p. 24: "On non-specified slides the \only command simply “throws its argument away” and the argument does not occupy any space." – AlexG Jul 09 '15 at 09:16
  • You also need to \usepackge{hyperref} to use \hyperlink and \hypertarget. It's in the manual. – John Kormylo Jul 09 '15 at 16:47
  • In beamer class manual 3.33 on page 17 it written that the hyperref package is automatically laoded by beamer.cls. – Tarass Jul 09 '15 at 17:30

1 Answers1

1

You can define your own macro to achieve the intended output:

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764

\newcommand<>{\althyperlink}[2]{%
    \alt#3{\hyperlink{#1}{#2}}{#2}
}

\begin{document}
\begin{frame}[label=bob]

bla

\begin{enumerate}[<+->]
\item 1
\item 3 \althyperlink<2>{bob}{Back}
\item 3 \althyperlink{bob}{Back}
\item 2 \althyperlink<4>{bob}{Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla}
\end{enumerate}


bla
\end{frame}
\end{document}