# How to make chapter numbers in TOC as non-link (hyperref package)

I'm using the hyperref package to enable PDF links & bookmarks in the output file. I would like to achieve the following behavior ([] denotes clickable area}

1 [The first chapter] .............. 3
2 [The second chapter] ............. 8


When using the linktoc=section option in hyperref, I can achieve this:

[1 The first chapter] .............. 3
[2 The second chapter] ............. 8


Which is not really what I wanted.

Anyone aware of a solution?

The following patch should work:

\usepackage{etoolbox}
\makeatletter

Insert this code after having loaded the hyperref package. It patches hyperref's version of the contentsline macro (two times, as the part to be replaced occurs twice):
Instead of calling the \hyper@linkstart command which creates the clickable link directly, the newly created \process@contentsline macro is called. It outputs its two arguments directly, without a link - these create the section number. Afterwards, it starts the link which will contain the rest of the text of the contents line.