Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize table of contents hyperref #163

Open
thomas-de-jager opened this issue Dec 15, 2020 · 0 comments
Open

Customize table of contents hyperref #163

thomas-de-jager opened this issue Dec 15, 2020 · 0 comments

Comments

@thomas-de-jager
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant