99 lines
2.5 KiB
TeX
99 lines
2.5 KiB
TeX
% snhu.sty - Custom style file for all of snhu
|
|
|
|
% Version variable
|
|
\def\snhuversion{v8.2}
|
|
|
|
% Color for answers
|
|
\usepackage{xcolor}
|
|
\RequirePackage{fancyhdr}
|
|
\RequirePackage{hyperref}
|
|
|
|
\ProvidesPackage{snhu}[\snhuversion Custom package for all of snhu]
|
|
|
|
% Custom answer highlighting
|
|
\newcommand{\ans}[1]{\colorbox{yellow}{#1}}
|
|
\newcommand{\mans}[1]{\colorbox{yellow}{$#1$}}
|
|
|
|
|
|
% ========================
|
|
% SNHU homework title page
|
|
% ========================
|
|
\newcommand{\reporttitle}[1]{\def\@reporttitle{#1}}
|
|
\newcommand{\class}[1]{\def\@class{#1}}
|
|
\newcommand{\studentname}[1]{\def\@studentname{#1}}
|
|
\newcommand{\submissiondate}[1]{\def\@submissiondate{#1}}
|
|
\newcommand{\universityname}[1]{\def\@universityname{#1}}
|
|
|
|
\renewcommand{\maketitle}{%
|
|
\begin{titlepage}
|
|
\centering
|
|
\vspace*{1in}
|
|
{\Huge \textbf{\@reporttitle}} \\[2cm]
|
|
{\Large \textbf{Name:}} \@studentname \\[0.5cm]
|
|
{\Large \textbf{Class:}} \@class \\[0.5cm]
|
|
{\Large \textbf{Date of Submission:}} \@submissiondate \\[0.5cm]
|
|
{\Large \textbf{University:}} \@universityname \\
|
|
\vfill
|
|
\end{titlepage}
|
|
}
|
|
|
|
% Custom header/footer
|
|
\fancypagestyle{snhudefault}{
|
|
\fancyhf{}
|
|
\fancyhead[L]{\@reporttitle}
|
|
\fancyhead[R]{\@studentname}
|
|
\fancyfoot[C]{Page \thepage}
|
|
\renewcommand{\headrulewidth}{0.4pt}
|
|
\renewcommand{\footrulewidth}{0.4pt}
|
|
}
|
|
|
|
% Package options to load fancy headers by default
|
|
\AtBeginDocument{
|
|
\pagestyle{snhudefault}
|
|
}
|
|
|
|
% =====================================
|
|
% Formatting for problems and exercises
|
|
% =====================================
|
|
\newcommand{\exer}[2][]{%
|
|
\subsection*{\textbf{#1 #2}}%
|
|
\addcontentsline{toc}{subsection}{#1 #2} % Optional: Add to TOC
|
|
\setlength{\parindent}{0pt}%
|
|
\setlength{\parskip}{1em}%
|
|
}
|
|
|
|
% Environment for exercises
|
|
\newenvironment{exercise}[1][]{
|
|
\noindent
|
|
\textbf{\LARGE #1}\\[1em]
|
|
\noindent
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{1em}
|
|
}{
|
|
\vspace{2em}
|
|
}
|
|
|
|
% Formatting for parts within exercises
|
|
\newcommand{\mpart}[1]{%
|
|
\vspace{1em}
|
|
\noindent\textbf{Part (#1)}%
|
|
}
|
|
|
|
|
|
% Default revision command
|
|
\providecommand{\revision}[1]{
|
|
\clearpage
|
|
\null
|
|
\vfill
|
|
\begin{center}
|
|
\texttt{Revision: #1} \\
|
|
\texttt{Compiled on \today}
|
|
|
|
\texttt{If this document contains any listings, images or other embedded media, you should have received a copy of the source.zip}
|
|
|
|
\bigskip
|
|
|
|
\texttt{Libs:} \\
|
|
- \texttt{\href{https://git.kitsunehosting.net/Kenwood/SNHU-LaTeX/src/branch/main/SNHU.sty}{SNHU\_Sty} \snhuversion}
|
|
\end{center}
|
|
} |