move hypersetup in script class to own package

This commit is contained in:
Maximilian Keßler 2021-09-07 11:19:44 +02:00
parent a6a45e111e
commit dd0d14d7bb
2 changed files with 16 additions and 7 deletions

16
mkessler-hypersetup.sty Normal file
View File

@ -0,0 +1,16 @@
\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
\RequirePackage{hyperref} % Hyperlinks
\RequirePackage{amsmath} % Cleveref needs this
\RequirePackage{cleveref} % Better referencing
\hypersetup{colorlinks, citecolor=violet, urlcolor=blue!80!black, linkcolor=red!50!black, pdfauthor=\@author, pdftitle=\@course}

View File

@ -83,13 +83,6 @@
} }
%%%Document-specific features that are provided
%%%Hyperref and setup
\RequirePackage{hyperref} % Hyperlinks
\RequirePackage{amsmath} % Cleveref needs this
\RequirePackage{cleveref} % Better referencing
\hypersetup{colorlinks, citecolor=violet, urlcolor=blue!80!black, linkcolor=red!50!black, pdfauthor=\@author, pdftitle=\@course}
%%%The following is based on the repository %%%The following is based on the repository
% https://github.com/gillescastel/university-setup % https://github.com/gillescastel/university-setup
% but has been modified for own purposes. The original content is distributed under the following license: % but has been modified for own purposes. The original content is distributed under the following license: