[Tex/LaTex] Making hyperlinks appear in blue

hyperreflinks

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.

Best Answer

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}

% Load with some options, i.e. \usepackage[colorlinks=true,linkcolor=blue]{hyperref} or blank
\usepackage{hyperref}


% Change the setup later on, after loading hyperref

\hypersetup{colorlinks=true,linkcolor=blue, linktocpage}

\begin{document}

\tableofcontents


\clearpage

See \ref{foo} or \ref{foobar} for more information!

\chapter{Foo} \label{foo}

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

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

enter image description here

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:

enter image description here