# Beamer: Onslide with hyperlink to end of slide drops bottom colorbox

I defined a beamer template that puts a color box as the bottom of each slide. In a main slide, I make phrases gradually appear using \onslide. On the same slide, I put a hyperlink at the end of the slide to go to a slide in the appendix. From the appendix, I use a hyperlink to go back to the main slide. To make sure that I go back to the end of the slide, not the beginning, I use \hypertarget in the main slide.

The problem: With this setup, the colorbox on the bottom is not visible until the item with the hypertarget is displayed. But I want the bottom line to be visible all the time.

Using \itemize[<+->] is not an option since I sometimes want to pair several points to appear at once. I experimented with other hyperlinks, but they did not get me back to the end of the main slide from the appendix. I tried to use \pause, but that didn't work either.

How can I do a gradual overlay, use a hyperlink that gets me back to the end of the slide and keep my colorbox visible all the time?

Here's a MSW:

\documentclass{beamer}

\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
Institution
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
\end{beamercolorbox}}%
\vskip0pt%
}

\begin{document}

\begin{frame}{Main slide}
\begin{itemize}
\item Item 1
\onslide<2->{
\item Item 2}
\onslide<3->{
\item Item 3 \hypertarget<3>{main}}
\end{itemize}
\vspace{1cm}
\end{frame}

\begin{frame}{Appendix slide} %Slide10
\label{appendix}
Appendix slide
\end{frame}

\end{document}


Thanks!

• Welcome to TeX.Stackexchange! – user36296 Sep 26 '17 at 17:08

The main problem: \hypertarget takes two arguments, one for the name and one for text. You can leave the text empty, but you cannot not give it.

The construct with wrapping the items in \onslide<2->{...} seems very complicate, I suggest to either let beamer do the uncovering for you (\begin{itemize}[<+->]) or if you need more fine control use overlay argument of the items (\item<3-> text).

\documentclass{beamer}

\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
Institution
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
\end{beamercolorbox}}%
\vskip0pt%
}

\begin{document}

\begin{frame}{Main slide}
\begin{itemize}[<+->]
\item Item 1
\item Item 2
\item Item 3\hypertarget<3>{main}{}
\end{itemize}