Added hyperref

This commit is contained in:
mark 2023-10-17 18:29:52 -07:00
parent e59572a04f
commit 104c41347f

View File

@ -320,6 +320,7 @@
\RequirePackage{tikz} % Used by \boxlinehack
\RequirePackage{comment} % Used to hide solutions
\RequirePackage{tcolorbox} % For solution boxes
\RequirePackage{hyperref} % For custom references & clickable links
\tcbuselibrary{breakable} % Allows tcolorboxes to break across pages
\RequirePackage[ % Provides \say{} for quoted text.
@ -408,7 +409,8 @@
\end{tcolorbox}
}
\newcommand{\maketitle}{
% hyperref already defines maketitle.
\renewcommand{\maketitle}{
\begingroup
\centering
\begin{minipage}{0.7\textwidth}
@ -458,6 +460,7 @@
% and its second arg takes two parts without hyperref and four with it.
\newcommand{\@customlabel}[2]{%
\@ifpackageloaded{hyperref}{%
\@bsphack
\begingroup
\def\label@name{#1}%
\def\@currentlabel{#2}%
@ -472,6 +475,7 @@
}%
}%
\endgroup
\@esphack
}{
\protected@write\@auxout{}{\string\newlabel{#1}{{#2}{\thepage}}}%
}
@ -488,7 +492,7 @@
{\bf\Large \hfill \IfNoValueTF{#2}{Unnamed Section}{#2} \hfill\null}%
}{%
{\bf\Large \hfill Part \arabic{section_counter}\IfNoValueF{#2}{: #2} \hfill\null}%
\IfNoValueF{#3}{\@customlabel{#3}Part \arabic{section_counter}}%
\IfNoValueF{#3}{\@customlabel{#3}{Part \arabic{section_counter}}}%
} \\*
\vspace{2mm}
}