Theses, Books, Title pagesHow do I use hyperref with this template?

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

How do I use hyperref with this template?

Post by templateuser »

Hi,

first of all: thank's for that great template.

Is there any possibility to additionally use the hyperref package? When I try, weird things are produced in the small table of contents. (showing all chapters and sections)

Cheers
Christoph

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

How do I use hyperref with this template?

Post by templateuser »

add the following commands just before \begin{document} (ie, after \input{structure}) in main.tex:

Code: Select all

\usepackage{hyperref}
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= blue,bookmarks=true,bookmarksopen=false,pdftitle={book title},pdfauthor={book author}}
% compression pdf
\pdfminorversion=5
\pdfobjcompresslevel=6 
\pdfcompresslevel=9
This should nicely work with proper hyperlinks in the small TOCs.

Mathias
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

How do I use hyperref with this template?

Post by templateuser »

I just tried the solution above and it works but only after you skip a whole bunch of errors like this on the first compilation:

Code: Select all

l.13 \defcounter
                 {refsection}{0}\relax
? 
Once you skip them and see all the "weird things are produced in the small table of contents", recompile again and this time it will work without errors and the sections in the small box will be correctly linked.
Post Reply