23 lines
686 B
Text
23 lines
686 B
Text
|
__HEADER__(Package for setting up hyperref, cleveref and some default hyperref colors)
|
||
|
|
||
|
__NEW_IF__(cleveref,false)
|
||
|
\DeclareOption{cleveref}{__SET_IF__(cleveref,true)}
|
||
|
|
||
|
__END_OPTIONS___
|
||
|
|
||
|
%%%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)
|
||
|
}
|