hyperref
hyperref copied to clipboard
Customize table of contents hyperref
Right now the section numbers and section names are used as link when using hyperref in the table of contents. However, I find the amount of color on the table of contents too overwhelming, but I want to be consistent with coloring all links. I considered changing the links of the table of contents to page only, by using the linktocpage as stated on p.10 of https://mirror.lyrahosting.com/CTAN/macros/latex/contrib/hyperref/doc/manual.pdf
Now only the page numbers are blue, which is to be expected. However, I would like the section numbers to also be links. That would be a nice feature to have. E.g. set linktoc = numpage.
MWE
\documentclass{article}
\usepackage[hidelinks, colorlinks=true, allcolors=blue]{hyperref}
\usepackage{lipsum}
\begin{document}
\tableofcontents
\section{First}
\lipsum[66]
\subsection{First first}
\lipsum[66]
\section{Second}
\lipsum[66]
\subsection{Second second}
\lipsum[66]
\end{document}
https://tex.stackexchange.com/questions/574842/change-hyperlinks-in-table-of-contents-to-section-number-and-page-number-only