How can I make a clickable Table of Contents? [duplicate]

I need links for the Table of Contents, so that I can navigate fast to different sections. I apparently need some package. I tried the package url unsuccessfully.

asked Feb 15, 2009 at 15:40 Léo Léopold Hertz 준영 Léo Léopold Hertz 준영 8,048 14 14 gold badges 65 65 silver badges 143 143 bronze badges

It is hilarious that this question was given a duplicate badge when it was asked one year before than the other one. This question was also searchable in Google during the time when the other question was asked. There is also more thorough solution in this question than the other one.

Commented Aug 31, 2013 at 8:32 Very ironic to tag it as hyperref ;-) Commented Sep 5, 2014 at 17:34

4 Answers 4

\usepackage \hypersetup

You can change the color of the links as above.

answered Feb 18, 2009 at 1:14 alamodey alamodey

A few tips: to simply avoid any visual indication of links, use option hidelinks . This can also be done like this: \usepackage[hidelinks] . To set all colors at once, use allcolors=black . colorlinks seems to work the same as colorlinks=true .

Commented Mar 7, 2014 at 17:28

The option hidelinks seems to be unnecessary in my XeLaTeX file. Not sure if this is because of XeLaTeX or that the lack of visual indication of links has been made default in hyperref. Somebody might want to investigate.

Commented May 22, 2014 at 12:22 This is so awesome! I feel that my work now feels 100 times more professional :D Commented Sep 27, 2015 at 5:18

Make sure you do not have the “draft” option in the document class. With “draft”, links are not created!

Commented Jul 20, 2017 at 13:23

To use the hyperref package with the cleveref package, you need to place hyperref before cleveref in the preamble.

Commented Apr 14, 2020 at 19:58

The package listed is correct. This is a more detailed account of setup though:

\usepackage %May be necessary if you want to color links \usepackage \hypersetup

Once this is all setup, you should just be able to include the

\tableofcontents 
\begin
answered Sep 6, 2012 at 0:33 Adam Hammouda Adam Hammouda very clear answer Commented Dec 16, 2014 at 12:02

Don't miss out on the

\hypersetup

option to only link the page numbers and not the entire table of contents; when links are being coloured the default behaviour can be a bit overwhelming.

Moreover, if you need to use dviaps+ps2pdf driver then in the default setting, the hyperlinks of long headers (that occupy more than one line) are scrambled due to a known incompatibility (README for hyperref, Section 7) and linking the page numbers resolves this issue.