Skip to content

Commit 13da86f

Browse files
committed
feat(hyperref): color default hyperref links
Signed-off-by: Jonas Dujava <[email protected]>
1 parent 6cd740d commit 13da86f

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

preamble/general/colors.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
\definecolor{ChapterNumberColor}{gray}{0.88}
66
\definecolor{HeaderColor}{gray}{0.35}
77
\definecolor{HeaderRuleColor}{gray}{0.75}
8+
\definecolor{UrlColor}{RGB}{255,127,100}
89
\definecolor{CiteColor}{RGB}{127,230,252}
9-
\definecolor{LinkColor}{RGB}{255,127,100}
10-
\definecolor{UrlColor}{RGB}{100,127,255}
1110

1211
\definecolor{Gray10}{gray}{0.1}
1312
\definecolor{Gray20}{gray}{0.2}

preamble/general/hyperref.tex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
\ProvideExpandableDocumentCommand{\KeywordsPlaintext}{}{\Keywords}
1111

1212
\hypersetup{
13-
linktoc=all, % whole entry in TOC is clickable link
14-
pdfborder={0 0 0}, % to disable borders/frames around links
15-
pdflinkmargin=1.0pt, % extra link area around the text box (default 1pt)
16-
citebordercolor=CiteColor,
17-
linkbordercolor=LinkColor,
18-
urlbordercolor=UrlColor,
19-
% PDF metadata
20-
pdfauthor=\ThesisAuthorPlaintext,
21-
pdftitle=\ThesisTitlePlaintext,
22-
pdfsubject=\Subject,
23-
pdfkeywords=\KeywordsPlaintext,
24-
pdfcreator={LaTeX with hyperref, and biblatex/biber},
25-
pdfdisplaydoctitle, % https://tex.stackexchange.com/a/435434/120853
13+
linktoc = all, % whole entry in TOC is clickable link
14+
colorlinks = true, % color links/references (if not using boxed variants provided by \Cref{...})
15+
urlcolor = [rgb]{0.82,0.25,0.08}, % tweak the default URL color
16+
pdfborder = {0 0 0}, % to disable borders/frames around links (even when colorlinks=false)
17+
pdflinkmargin = 1.0pt, % extra link area around the text box (default 1pt)
18+
pdfdisplaydoctitle, % https://tex.stackexchange.com/a/435434/120853
19+
}
20+
\hypersetup{ % PDF metadata
21+
pdfauthor = {\ThesisAuthorPlaintext},
22+
pdftitle = {\ThesisTitlePlaintext},
23+
pdfsubject = {\Subject},
24+
pdfkeywords = {\KeywordsPlaintext},
25+
pdfcreator = {LaTeX with hyperref, and biblatex/biber},
2626
}
2727
\bookmarksetup{
2828
numbered, % include chapter/section numbers in PDF outline

preamble/hacks/custom-reference-boxes.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
refbox/.style ={colframe=black!30, colback=black!3},
1717
% refbox/.style ={colframe=black!30, colback=black!3, fontupper=\sffamily},
1818
pagebox/.style={refbox, boxsep=0.1ex, bottom=0.25ex, fontupper=\ttfamily},
19-
hrefbox/.style={colframe=black!10!LinkColor!70, colback=LinkColor!15},
19+
hrefbox/.style={colframe=black!10!UrlColor!70, colback=UrlColor!15},
2020
citebox/.style={left=0em, right=0em, bottom=0.25ex, colframe=black!10!CiteColor!80, colback=CiteColor!20, fontupper=\ttfamily},
2121
}
2222
%% Definition of the link boxes (loading corresponding styles)

0 commit comments

Comments
 (0)