3

I'm preparing a beamer presentation and there are certain links I do not want getting highlighted.

I've tried setting

colorlinks = false

inside the hypersetup, but naturally that disables coloring completely, while I actually want only internal links (linkcolor) to be disabled, while mantaining URL and cite colors, for instance.

I've also tried the following

linkcolor = myColor

before the parts I don't want highlighted, the problem is that since it is a beamer presentation, there is a sidebar showing the internal links in each frame, and so changing the link color continually changes the color of the titles in the sidebar.

Is there a way to just disable internal links coloring in the entire document, just as if colorlinks was set to false, but only affecting internal links and not the rest? (or possibly any other workaround).

EDIT: The problem was solved, turns out this can be explicitly stated just by configuring hyperref like so

\hypersetup{
   colorlinks,
   linkcolor=.
}

And so internal links will mantain its original color while the rest will keep highlighted. Here's a small working example showing this

\documentclass{beamer}
\usetheme{PaloAlto}
\hypersetup{
    colorlinks,
    linkcolor=.
}

\title{Title name}
\author{Author name}

\begin{document}

\section{Section 1}
\frame{ Test URL: \url{http://tex.stackexchange.com/} }
\section{Section 2}
\frame{ This is another frame \url{http://tex.stackexchange.com/} }

\end{document} 

You can see on the sidebar the sections, which are internal hyperlinks, do not get highlighted, but the URL's do.

  • 1
    Does this answer solve your problem: tex.stackexchange.com/a/214090/18228 – Herr K. May 2 '16 at 19:17
  • @HerrK. Absolutely, I'll edit my original post to explain the answer and post a MWE. Thanks for your help. – F.Webber May 2 '16 at 20:03
  • Actually, Beamer automatically loads the hyperrefpackage. So you don't need to load it again with \usepackage{hyperref}. – Herr K. May 2 '16 at 22:13
  • Oh, well that's good to know, I'll get rid of it then. – F.Webber May 3 '16 at 19:35
2

Until a proper answer comes along, you might consider using this quick and dirty trick:

\hyperlink{some label}{\textcolor{normal text.fg}{link text}}

If you use it very often, then create a command for it:

\newcommand\myhlink[2]{\hyperlink{#1}{\textcolor{normal text.fg}{#2}}

MWE

\documentclass{beamer}
\hypersetup{colorlinks=true}
\newcommand\myhlink[2]{\hyperlink{#1}{\textcolor{normal text.fg}{#2}}}

\begin{document}
\begin{frame}{title}
  \hyperlink{some label}{colored link text}

  \myhlink{some label}{uncolored link text}
\end{frame}
\begin{frame}[label=some label]{Target Frame}
  text
\end{frame}
\end{document}
  • Thanks, that'll do it for now. I'll wait some more just in case some answer manages to solve the general problem before accepting. – F.Webber May 2 '16 at 19:05
  • @F.Webber: It'll also help if you can post a minimal working example so that people know e.g. what theme/color theme you're using. – Herr K. May 2 '16 at 19:07

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.