1

When I set \hypersetup{linkcolor=blue} to make the references of figures/tables blue, the TOC was also changed to blue. How can I change the link color to blue except change the default color (black) of the TOC?

  • 1
    Have you tried placing the hypersetup statement after the table of contents? – Johannes_B Jul 21 '16 at 12:22
  • @ Johannes_B: Great! Very simple way to do that, now it works well, thank you! – Trung Jul 21 '16 at 12:54
  • alternatively: { \hypersetup{hidelinks} \tableofcontents } – user36296 Jul 21 '16 at 13:24
  • It's not necessarily better, just different :) – user36296 Jul 21 '16 at 14:01
  • See tex.stackexchange.com/a/306617/43317 – esdd Jul 22 '16 at 7:14
4

There are many ways to achieve this, one way which

  • preserves the capability to click the links
  • allows coloured links before the table of contents

is to use { \hypersetup{hidelinks} \tableofcontents }. Pay attention to the curly brackets around the code, this puts the \hypersetup together with the table of contents inside a group, so it will not effect the remaining document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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