2021-10-06 23:10:06 +02:00
|
|
|
__HEADER__(Package for setting up hyperref, cleveref and some default hyperref colors)
|
|
|
|
|
2021-10-07 10:06:23 +02:00
|
|
|
\RequirePackage{xkeyval}
|
|
|
|
|
2021-10-06 23:10:06 +02:00
|
|
|
__NEW_IF__(cleveref,false)
|
2021-10-07 10:06:23 +02:00
|
|
|
\DeclareOptionX{cleveref}{__SET_IF__(cleveref,true)}
|
2021-10-06 23:10:06 +02:00
|
|
|
|
2021-10-07 10:06:23 +02:00
|
|
|
__END_OPTIONS_X__
|
2021-10-06 23:10:06 +02:00
|
|
|
|
|
|
|
%%%Hyperref and setup
|
|
|
|
\RequirePackage{xcolor} % To compute the colors below
|
|
|
|
\RequirePackage{etoolbox} % Checking for defined commands
|
|
|
|
|
|
|
|
\def__PACKAGE_MACRO__(exec){
|
|
|
|
\RequirePackage{hyperref} % Hyperlinks
|
|
|
|
__IF__(cleveref)
|
|
|
|
\RequirePackage{cleveref} % Better referencing
|
|
|
|
\fi
|
|
|
|
\hypersetup{colorlinks, citecolor=violet, urlcolor=blue!80!black, linkcolor=red!50!black, pdfauthor=\@author, pdftitle=\ifdef{\@course}{\@course}{\@title}}
|
|
|
|
}
|
|
|
|
|
|
|
|
\AtEndPreamble{
|
|
|
|
__PACKAGE_MACRO__(exec)
|
|
|
|
}
|