这是我正在使用的代码。
\documentclass[xcolor=svgnames, aspectratio=169]{beamer}
\usepackage[breakwords]{truncate}
\usepackage{ragged2e}
\usepackage{xcolor,colortbl}
\hypersetup{
pdfstartview={Fit},
pdfpagemode=FullScreen,
pdffitwindow=true,
breaklinks=true,
pdftitle={title},
pdfauthor={author},
pdfsubject={subject},
}
% \usetheme[dark]{tpu}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{wallpaper}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage[style=iso]{datetime2}
\hypersetup{bookmarksopen=true,bookmarksopenlevel=4}
\setcounter{tocdepth}{4}
\hyphenpenalty=10000
\usepackage{hyperref}
\title{bla bla bla}
\subtitle{othe bla}
\normalsize
\author{blaname blasurname}
\date{\today}
\begin{document}
\section{bla section 0}
\begin{frame}[fragile]
\frametitle{bla bla frame title 0}
bla text 0
\end{frame}
\section{bla section 1}
\subsection{bla subsection} \label{blalabel1}
\begin{frame}[fragile]
\frametitle{bla bla frame title}
bla bla text
Go to slide \hyperref[blalabel2]{\pageref{blalabel2}: \nameref{blalabel2}} % <-------- This link
Other way - Go to slide \hyperref[blalabel2]{\autoref{blalabel2}: \nameref{blalabel2}} % <-------- This link
\end{frame}
\begin{frame}[fragile]
\frametitle{bla bla frame title 2}
bla text 2
\end{frame}
\subsection{bla subsection 2} \label{blalabel2} % <------- This destination frame/section/label
\begin{frame}[fragile]
\frametitle{bla bla frame title 3}
bla text 3
\end{frame}
\end{document}
链接已创建,但单击后会将我发送到文档的第一页,而不是所需的页面。目录中的链接工作正常,单击后会将我发送到正确的框架/页面/幻灯片/标签位置。“问题”仅出现在正常(目录外)链接中。我如何正确链接(或标记)以实现所需的功能?
答案1
您可以将标签放入框架的可选参数中,然后使用 \hyperlink。请参阅 beamer 的文档,11.1 添加超链接和按钮。它还描述了如何定位特定幻灯片。
\documentclass[xcolor={svgnames,table}, aspectratio=169]{beamer}
\usepackage[breakwords]{truncate}
\usepackage{ragged2e}
\hypersetup{
pdfstartview={Fit},
pdfpagemode=FullScreen,
pdffitwindow=true,
pdftitle={title},
pdfauthor={author},
pdfsubject={subject},
bookmarksopen=true,bookmarksopenlevel=4
}
\usepackage[T2A]{fontenc}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{wallpaper}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage[style=iso]{datetime2}
\setcounter{tocdepth}{4}
\hyphenpenalty=10000
\title{bla bla bla}
\subtitle{othe bla}
\normalsize
\author{blaname blasurname}
\date{\today}
\begin{document}
\section{bla section 0}
\begin{frame}[fragile]
\frametitle{bla bla frame title 0}
bla text 0
\end{frame}
\section{bla section 1}
\subsection{bla subsection}
\begin{frame}[fragile,]
\frametitle{bla bla frame title}
bla bla text
Go to slide \hyperlink{blalabel2}{\pageref*{blalabel2}: \nameref*{blalabel2}} % <-------- This link
Other way - Go to slide \hyperlink{blalabel2}{\autoref*{blalabel2}: \nameref*{blalabel2}} % <-------- This link
\end{frame}
\begin{frame}[fragile]
\frametitle{bla bla frame title 2}
bla text 2
\end{frame}
\subsection{bla subsection 2}
\begin{frame}[fragile,label=blalabel2]
\frametitle{bla bla frame title 3}
bla text 3
\end{frame}