Remove boxes from hyperlinked ToC in LaTeX

36,241

Solution 1

To remove the borders:

\hypersetup{%
    pdfborder = {0 0 0}
}

The colorlinks option will turn on the link colors and also remove the borders. (This is why alamodey set all the link colors to black.)

Solution 2

\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}

Solution 3

Version 6.82a of hyperref, released in February 2011, introduced a new hidelinks option that accomplishes this more easily. All you need now is:

\usepackage[hidelinks]{hyperref}

Solution 4

I realize it's a bit late to answer but there's a simpler way, in my experience

\usepackage[colorlinks=true]{hyperref}

This will shift hyperref from ugly borders to link coloring, which is what you usually want. See here for more options:

http://en.wikibooks.org/wiki/LaTeX/Hyperlinks

Share:
36,241
Pontus Ivarsson
Author by

Pontus Ivarsson

Read The F-cking Manual.

Updated on March 13, 2020

Comments

  • Pontus Ivarsson
    Pontus Ivarsson over 4 years

    How do I remove the red boxes from my hyperlinked table of contents created by using the hyperref package in LaTeX.

  • Kelvin Hu
    Kelvin Hu over 11 years
    Thanks for this answer, now I can not only remove the border, but also define the colors of the links.
  • cboettig
    cboettig about 10 years
    Is there a way to set urlcolor to the color of the body text in which the link appears, rather than insisting that color is "black"?
  • hl037_
    hl037_ over 2 years
    Is there a way to do it only for the toc ?
  • hl037_
    hl037_ over 2 years
    Is there a way to do it only for the toc ?