Time for action – customizing the hyperlink appearance
We shall pass options to hyperref
affecting the way hyperlinks are emphasized:
Open the file
preamble.tex
again. This time, specify the options forhyperref
:\usepackage[colorlinks=true,linkcolor=red]{hyperref}
Save this document, go to the main document
equations.tex
, and compile it twice. The table of contents is changed:
What just happened?
Instead of frames, we now got a red color for emphasized links. The color can be seen in a printed document.
hyperref
offers ways to set up the options. The first one we used is:
\usepackage[key=value list]{hyperref}
Alternatively, we could just write \usepackage{hyperref}
and set the options afterwards:
\hypersetup{key=value list}
Our example would do the same with:
\hypersetup{colorlinks=true,linkcolor=red}
These methods may be combined. Here's a selection of especially useful options:
Option |
Type |
Default |
Effect |
---|---|---|---|
|
boolean |
false |
Turns off all hypertext options |
|
boolean |
true |
Turns all... |