1

I am using the hyperref package, and here is my code:

\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}

Output:

enter image description here

As one can see, the title in the footer gets highlighted red due the the hypersetup command, and the URL description gets highlighted as expected, but clicking on the description doesn't do anything. I have two questions:

  1. How to enable only the URL description to be colored and disable the title coloring in the footer?
  2. How to enable the URL description so that when clicked on, the person gets directed to the link?
2

Don't use \pgfpagesuselayout{resize to}[a4paper,landscape] to resize the page. This moves the text but not the links. I enabled link borders and now you can see that the clickable area is not where you expect it to be:

enter image description here

Side remark: beamer already loads hyperref so there is no need to do it again.

| improve this answer | |
  • Is there a way to do the resize to the size that I want while moving the link along with the text? – Superman Jun 3 at 21:47
  • Why do you want to resize? On the screen it is quite useless, you can zoom to any size anyway. – Ulrike Fischer Jun 3 at 21:59
  • My friend wants me to use that size. – Superman Jun 3 at 22:00
  • Then tell your friend that links won't work. You would have to redefine all the beamer length to get a native a4 page. – Ulrike Fischer Jun 3 at 22:11
  • Ok, is the redefinition process quite complicated? – Superman Jun 3 at 22:12

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.