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