Basically, I want to disable the colorlinks option (from the hyperref package) for the ToC, but keep it enabled for the rest of a (memoir) document.

This question has a workaround based on issuing \hypersetup{linkcolor=black} before \tableofcontents, but this doesn’t work for my case, since I already colour certain parts of the ToC, and hyperref’s colouring overrides this. Example:


\usepackage[colorlinks=false, hidelinks, linkcolor=cyan]{hyperref}





See \cref{chap:hello} for more information.







enter image description here

Note that the chapter 1 hyperlink is not coloured, since colorlinks=false. If I change it to true and remove hidelinks, I get:

enter image description here

I want a combination of the two, with orange chapter names and black section names in the ToC, and light blue hyperlinks in the rest of the document. Issuing \hypersetup{colorlinks=false} before \tableofcontents has no effect; it only results in the following warning:

Package hyperref Warning: Option `colorlinks' has already been used,
setting the option has no effect on input line 13

Is it possible to somehow disable colorlinks locally, or to make the ToC colouring commands (\cftchapterfont) override its effect? The solution needs to work with the memoir package (and ToC commands).

  • 2
    You could use locally \hypersetup{hidelinks} Commented May 21, 2014 at 10:27
  • 2
    @UlrikeFischer Brilliant! It never occured to me that hidelinks could be used locally when colorlinks could not. If you add it as an answer, I’ll accept it. Commented May 21, 2014 at 10:33

1 Answer 1


You could use locally \hypersetup{hidelinks}

  • I was surprised this worked because I already had \hypersetup{hidelinks, colorlinks=true, ...} in my preamble. The order matters.
    – Paul Wintz
    Commented Sep 6, 2023 at 6:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .