kks32 / phd-thesis-template

A LaTeX / XeLaTeX / LuaLaTeX PhD thesis template for Cambridge University Engineering Department (CUED)
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/
MIT License
820 stars 392 forks source link

[Help] Change Hyperlinks in Table of Contents #245

Closed sarkrui closed 1 year ago

sarkrui commented 1 year ago

Hey all,

I wonder if anyone manages to change the hyperlinks from page numbers to the titles? 20221121-125722

Thanks.

GR8DAN commented 1 year ago

The hyperref package will do it.

Add the following to a sensible place in preamble.tex in the Preamble folder, e.g., at line 145:

\usepackage{hyperref}
\hypersetup{linktoc=all}

Coloured links can be used:

\usepackage{hyperref}
\hypersetup{
    linktoc=all,     %set  all for both section and subsection links
    linkcolor=blue,  %add colour if you want links to stand out
}
sarkrui commented 1 year ago

@GR8DAN Thank you so much! It worked like a charm now.

With your suggestions, I found it could be easily activated by inserting linktoc=all, at the (\hypersetup) section of PhDThesisPSnPDF.cls