
Я объявил ряд \hyperlinksection
:
\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}
Гиперссылки «Вернуться к началу», «Вернуться к началу раздела», «Подробный анализ», «Следующий раздел» работают, но гиперссылка «Предыдущий раздел» переходит не к предыдущему разделу, а к разделу «Подробный анализ», т.е.:
Во 2-м разделе:
Если я нажму «Предыдущий раздел», то вместо «1-го раздела» будет открыт раздел «Подробный анализ»:
Есть ли способ заставить Previous section
гиперссылку работать?
Обновлять:Используя ответ @samcarter, возникает следующая проблема: Когда в последнем разделе:
Если вы нажмете на «Следующий раздел», желаемым результатом будет остановка здесь, поскольку это последний раздел. Однако, если вы нажмете на «Следующий раздел», вы перейдете к последнему кадру внутри этого последнего раздела:
Есть ли способ достичь желаемого результата (т.е. когда мы находимся в последнем разделе, если мы нажимаем «Следующий раздел», не переходить).
Код:
\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}
решение1
Полагаю, проблема в том, что \hyperlinksectionendprev
происходит переход к последнему кадру предыдущего раздела, хотя вы, похоже, хотите перейти к первому кадру предыдущего раздела.
\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}