4

When using \insertshorttitle in the footline (or elsewhere) it is automatically inserted as a click-able link.

Therefore it is for example typesetted in a different colour. (marked with a red circle in the image, where the title appears black instead of blue)

How can this behaviour be disabled?

enter image description here

\documentclass{beamer}

\setbeamertemplate{footline}{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
            \usebeamerfont{author in head/foot}\insertshortauthor
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
            \usebeamerfont{title in head/foot}\insertshorttitle
        \end{beamercolorbox}%
    }%
    \vskip0pt%
}

\title{test}
\author{Einstein}

\begin{document}

    \begin{frame}
        test
    \end{frame}


\end{document}
1

The link is not the culprit that the color for the title is different than the color for the author in the footer.

themes/outer/beamerouterthememiniframes.sty defines:

\setbeamercolor{section in head/foot}{parent=palette tertiary}
\setbeamercolor{subsection in head/foot}{parent=palette secondary}
\setbeamercolor{author in head/foot}{parent=subsection in head/foot}
\setbeamercolor{title in head/foot}{parent=section in head/foot}

The different color is a property of title in head/foot and can be changed, e.g.:

\setbeamercolor{title in head/foot}{parent=subsection in head/foot}

Color of links can be disabled by

\hypersetup{allcolors={}}

or more complete:

\hypersetup{hidelinks}

This also removes link borders.

Full example:

\documentclass{beamer}

\hypersetup{
  colorlinks,
  linkcolor=red,
}

\setbeamercolor{title in head/foot}{parent=subsection in head/foot}
\setbeamertemplate{footline}{%
  \leavevmode
  \hbox{%
    \begin{beamercolorbox}[
      wd=.333333\paperwidth,
      ht=2.25ex,
      dp=1ex,
      center
    ]{author in head/foot}%
      \usebeamerfont{author in head/foot}%
      \insertshortauthor
    \end{beamercolorbox}%
    \begin{beamercolorbox}[
      wd=.333333\paperwidth,
      ht=2.25ex,
      dp=1ex,
      center
    ]{title in head/foot}%
      \usebeamerfont{title in head/foot}%
      % disable color in links
      % \hypersetup{allcolors={}}%
      \hypersetup{hidelinks}%
      \insertshorttitle
    \end{beamercolorbox}%
  }%
  \par
  \vspace{0pt}%
}

\title{test}
\author{Einstein}

\begin{document}

  \begin{frame}
    test
    \begin{equation}
      \label{eq:einstein}  
      E=mc^2
    \end{equation}

    \vspace{0pt plus 5fill}
    A reference to an \hyperref[eq:einstein]{equation}
    to show the link color.
  \end{frame}

\end{document}

Result

2
  • 1
    Thanks for having a look into it! Unfortunatly this seems not to work, if I mess around with the link color, e.g. \hypersetup{colorlinks=true, linkcolor=red}. But in combination with @Werners anwser it gives the desired result. A shame one could not accept multiple answers!! Jun 5 '14 at 18:06
  • @samcarter: The link decorations can be easily removed: \hypersetup{hidelinks}, see updated answer. Jun 5 '14 at 18:27
8

You can turn off the hyperref functionality momentarily in the footer:

\documentclass{beamer}
\let\Tiny=\tiny% https://tex.stackexchange.com/q/58087/5764

\makeatletter
\setbeamertemplate{footline}{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
      \usebeamerfont{author in head/foot}\insertshortauthor
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
      \usebeamerfont{title in head/foot}\let\hyperlink\@secondoftwo\insertshorttitle
    \end{beamercolorbox}%
  }%
  \vskip0pt%
}
\makeatother
\title{test}
\author{Einstein}

\begin{document}

\begin{frame}
  test
\end{frame}

\end{document}

\insertshorttitle inserts a \hyperlink{<target>}{<title>}, where <title> is the formatted title as it appears in the presentation. I've inserted \let\hyperlink\@secondoftwo just before \insertshorttitle which makes \hyperlink just return the second argument - skipping the entire hyperlinking. Since this is performed inside a group (offered by the \begin...\end of beamercolorbox), the redefinition or \lettting is temporary/limited in scope.

The additional \makeatletter...\makeatother pair is required since \@secondoftwo uses @ in the macro definition.

0
0

In themes with footers split in three parts, like Boadilla, you can use the following, instead of the other answers:

\makeatletter
\setbeamertemplate{footline}{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
      \usebeamerfont{author in head/foot}\insertshortauthor
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
      \usebeamerfont{title in head/foot}\let\hyperlink\@secondoftwo\insertshorttitle
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{date in head/foot}%
      \usebeamerfont{date in head/foot}\let\hyperlink\@secondoftwo\insertshortdate
    \end{beamercolorbox}%
  }%
  \vskip0pt%
}
\makeatother
\expandafter\def\expandafter\insertshortdate\expandafter{%
  \insertshortdate\hfill%
  \insertframenumber\,/\,\inserttotalframenumber}

This will keep the section title and the counter of slides.

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.