24 lines
714 B
Text
24 lines
714 B
Text
__HEADER__(Package for setting up hyperref, cleveref and some default hyperref colors)
|
|
|
|
\RequirePackage{xkeyval}
|
|
|
|
__NEW_IF__(cleveref,false)
|
|
\DeclareOptionX{cleveref}{__SET_IF__(cleveref,true)}
|
|
|
|
__END_OPTIONS_X__
|
|
|
|
%%%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)
|
|
}
|