我正在使用该hyperref
包,这是我的代码:
\documentclass[12pt]{beamer}
\usetheme{Boadilla}
\usepackage{float}
\usepackage{amsmath}
\usepackage{pgfpages}
\pgfpagesuselayout{resize to}[a4paper,landscape]
\usefonttheme{professionalfonts} %To get the accents aligned correctly, albeit in Computer Modern Roman
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
%linkcolor=blue,
%filecolor=magenta,
%urlcolor=cyan,
urlcolor=blue,
}
\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{author in head/foot}\insertdate
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\title{Test} % used by \maketitle
\author{John Doe }
\date{Spring 2020} % used by \maketitle
\institute{John Doe University}
\begin{document}
\setcounter{section}{5}
\maketitle % automatic title!
\begin{frame}
Click on this link: \href{https://ocw.mit.edu/courses/aeronautics-and-astronautics/16-323-principles-of-optimal-control-spring-2008/lecture-notes/lec5.pdf}{MIT OpenCourseWare, Page 5-18}
\end{frame}
\end{document}
输出:
可以看到,页脚中的标题由于命令而以红色突出显示hypersetup
,并且 URL 描述也按预期突出显示,但单击描述没有任何反应。我有两个问题:
- 如何仅启用 URL 描述的着色并禁用页脚中的标题着色?
- 如何启用 URL 描述,以便用户在点击时直接跳转到相应链接?