latex-packages/mkessler-hypersetup.sty

24 lines
851 B
Text
Raw Normal View History

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-hypersetup}[2021-09-06 - Package for setting up hyperref, cleveref and some default hyperref colors]
%%%%%%%%%%%%%%%%%%
\newif\ifenglish\englishtrue
\DeclareOption{german}{\englishfalse}
\DeclareOption{english}{\englishtrue}
\DeclareOption*{\PackageWarning{mkessler-hypersetup}{Unknown '\CurrentOption'}}
\ProcessOptions\relax
%%%Hyperref and setup
2021-09-08 16:21:49 +02:00
\RequirePackage{xcolor} % To compute the colors below
\RequirePackage{etoolbox} % Checking for defined commands
\def\mkessler@hypersetup@exec{
\RequirePackage{hyperref} % Hyperlinks
\RequirePackage{cleveref} % Better referencing
\hypersetup{colorlinks, citecolor=violet, urlcolor=blue!80!black, linkcolor=red!50!black, pdfauthor=\@author, pdftitle=\ifdef{\@course}{\@course}{\@title}}
}
\AtEndPreamble{
\mkessler@hypersetup@exec
}