# Making hyperlinks appear in blue

How can I make the hyperlinks appear in blue? I am forced to use some preamble and this is what I found there:

\usepackage[driverfallback=dvipdfm,hyperfootnotes=false]{hyperref}

Hyperlinks are supposed to appear in blue by default but it does not for my document.

• \hypersetup{colorlinks=true,linkcolor=blue}?
– user31729
Apr 10, 2017 at 19:26
• Package hyperref has options for this, \usepackage[colorlinks=true,linkcolor=somecolor,citecolor=somecolor]{hyperref} Apr 10, 2017 at 20:33

Either use options when calling \usepackage{hyperref} or \hypersetup later on (Please note, that not all options of hyperref can be given multiple times in \hypersetup again, but the color options are repeatable!)

\documentclass{book}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\clearpage

\chapter{Foo} \label{foo}

\chapter{Foobar} \label{foobar}
\end{document}


The screen shows the ToC with blue hyperlinks to the chapters.

If the linktocpage option is given as suggested by AlexG, the page numbers in ToC are made hyperlinks to the relevant chapter etc, as can be seen in the following screen shot:

• Not directly related to the question, but I would always use colorlinks in combination with linktocpage. Apr 11, 2017 at 12:25
• @AlexG: Yes, thanks, I would not use the ToC entry names as links as well. I've added your suggestion to the post.
– user31729
Apr 11, 2017 at 17:40