Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How to make clickable links and cross-references in pdfs produced by LaTeX?

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.

share|improve this question

migrated from stackoverflow.com Sep 24 '12 at 11:04

marked as duplicate by lockstep, percusse, diabonas, Werner, Paul Gaborit Sep 24 '12 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4 Answers

up vote 23 down vote accepted

The way to go is the hyperref package.

share|improve this answer
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}

You can change the color of the links as above.

share|improve this answer
3  
+1 Since this works great :) – Johan Aug 22 '09 at 15:01

Don't miss out on the

\hypersetup{linktocpage}

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.

share|improve this answer
1  
Not true. It's better when the entire line links. – alamodey Feb 18 '09 at 1:13
10  
As clickable links, it's better to have the entire line. But if you've got links printed in hot pink, then it looks mighty ugly to have an entire page coloured like that. – Will Robertson Feb 23 '09 at 23:08

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

\usepackage{color}   %May be necessary if you want to color links
\usepackage{hyperref}
\hypersetup{
    colorlinks=true, %set true if you want colored links
    linktoc=all,     %set to all if you want both sections and subsections linked
    linkcolor=blue,  %choose some color if you want links to stand out
}

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

\tableofcontents

sometime after

\begin{document}

and be all set

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.