2

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}
\usetheme{Madrid}

\setbeamertemplate{footline}
{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
{author in head/foot}%
            %\usebeamerfont{author in head/foot}\insertshortauthor
            Institution
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
{date in head/foot}%
            \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
            \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
    \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}
\hyperlink{appendix}{\beamergotobutton{Appendix}}
 \end{frame}


\begin{frame}{Appendix slide} %Slide10
\label{appendix}
   Appendix slide
    \hyperlink{main}{\beamerreturnbutton{Main slide}}
    \end{frame}

    \end{document}

Thanks!

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

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}
\usetheme{Madrid}

\setbeamertemplate{footline}
{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
    {author in head/foot}%
            %\usebeamerfont{author in head/foot}\insertshortauthor
            Institution
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]
    {date in head/foot}%
            \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
            \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
    \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}

\hyperlink{appendix}{\beamergotobutton{Appendix}}
\end{frame}


\begin{frame}[label=appendix]{Appendix slide} %Slide10
    Appendix slide
  \hyperlink{main}{\beamerreturnbutton{Main slide}}
\end{frame}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.