2

I have declared a series of \hyperlinksections:

\documentclass{beamer}
\usepackage[]{hyperref}

\setbeamertemplate{navigation symbols}{}

\setbeamertemplate{footline}{%
    \quad\hyperlinkpresentationstart{\beamerreturnbutton{Back to start}}%
    \quad\hyperlinksectionstart{\beamerreturnbutton{Back to section start}}%
    \quad\hyperlink{Detailed_Analysis}{\beamergotobutton{Detailed Analysis}}%
    \quad\hyperlinksectionstartnext{\beamerskipbutton{Next section}}%
    \quad\hyperlinksectionendprev{\beamerskipbutton{previous section}}%
    \vspace*{0.2cm}%
}

\begin{document}

    \section{sec1}
    \begin{frame}%{ss}
    1st section/ page 1 out of 1
    \end{frame}

    \begin{frame}
    1st section/ page 2 out of 2
    \end{frame}

    \begin{frame}[label=Detailed_Analysis]
        Detailed Analysis
    \end{frame}

    \section{sec2}
    \begin{frame}
    2nd section
    \end{frame}

    \section{sec3}
    \begin{frame}
    3rd section
    \end{frame}



\end{document}

The hyperlinks "Back to start", "Back to section start", "Detailed Analysis", "Next section" work, but the "Previous section" hyperlink does not jump to the previous section, but to the "Detailed Analysis" section, i.e:

When in the 2nd Section:

enter image description here

if I click on "Previous Section", it goes to the "Detailed Analysis" section instead of the "1st Section":

enter image description here

Is there a way to make the Previous section hyperlink to work ?

Update: Using @samcarter answer, there is this issue: When in the last section:

enter image description here

If you click on "Next Section", the desirable result would be to stop here, since this is the last section. However, if you click on "Next Section", you will go to the last frame inside this last section:

enter image description here

Is there a way to achieve the desirable result (i.e. When we are in the last section, if we click on "Next Section", don't jump).

Code:

\documentclass{beamer}

\AtBeginSection[]{\label{sec:\thesection}}
\newcounter{prevsec}

\title{Some Title}

\setbeamertemplate{navigation symbols}{}

\setbeamertemplate{footline}{%
        \setcounter{prevsec}{\thesection}
        \ifnum\theprevsec>1
            \addtocounter{prevsec}{-1}
        \fi
    \quad\hyperlinkpresentationstart{\beamerreturnbutton{Back to start}}%
    \quad\hyperlinksectionstart{\beamerreturnbutton{Back to section start}}%
    \quad\hyperlink{Detailed_Analysis}{\beamergotobutton{Detailed Analysis}}%
    \quad\hyperlinksectionstartnext{\beamerskipbutton{Next section}}%
    \quad\hyperlink{sec:\theprevsec}{\beamerskipbutton{previous section}}%
    \vspace*{0.2cm}%
}


\begin{document}

   \section{sec1}
    \begin{frame}%{ss}
    1st section/ page 1 out of 1
    \end{frame}

    \begin{frame}
    1st section/ page 2 out of 2
    \end{frame}

    \begin{frame}[label=Detailed_Analysis]
        Detailed Analysis
    \end{frame}

    \section{sec2}
    \begin{frame}
    2nd section
    \end{frame}

    \section{sec3}
    \begin{frame}
    3rd section
    \end{frame}

    \begin{frame}
    More content on the 3rd section
    \end{frame}

    \begin{frame}
    Even More content on the 3rd section
    \end{frame}


\end{document}
4

I guess the problem is that \hyperlinksectionendprev jumps to the last frame of the previous section whereas you seem to want to go to the first frame of the previous section.

\documentclass{beamer}

\AtBeginSection[]{\label{sec:\thesection}}
\newcounter{prevsec}

\title{Some Title}


\setbeamertemplate{footline}{%
    \setcounter{prevsec}{\value{section}}
    \ifnum\value{prevsec}>1
        \addtocounter{prevsec}{-1}
    \fi
    \quad\hyperlinkpresentationstart{\beamerreturnbutton{Back to start}}%
    \quad\hyperlinksectionstart{\beamerreturnbutton{Back to section start}}%
    \quad\hyperlink{Detailed_Analysis}{\beamergotobutton{Detailed Analysis}}%
    \quad\hyperlinksectionstartnext{\beamerskipbutton{Next section}}%
    \quad\hyperlink{sec:\theprevsec}{\beamerskipbutton{previous section}}%
    \vspace*{0.2cm}%
}


\begin{document}

   \section{sec1}
    \begin{frame}%{ss}
    1st section/ page 1 out of 1
    \end{frame}

    \begin{frame}
    1st section/ page 2 out of 2
    \end{frame}

    \begin{frame}[label=Detailed_Analysis]
        Detailed Analysis
    \end{frame}

    \section{sec2}
    \begin{frame}
    2nd section
    \end{frame}

    \section{sec3}
    \begin{frame}
    3rd section
    \end{frame}
\end{document}
  • Thanks a lot for your answer. However, I have noticed some issue with the "Next section" link - please see updated question. Thanks again – DavidC. Feb 10 '18 at 15:09
  • @DavidC. Your new problem is unrelated to your previous question. Please ask a new question. – user36296 Feb 10 '18 at 15:12
  • @ samcarter Ok. Please see: tex.stackexchange.com/questions/414661/… – DavidC. Feb 10 '18 at 15:27

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.