# Possibility to exclude coloring certain links using hyperref

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


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

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

• 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

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}

\begin{document}
\begin{frame}{title}