Import inital starting point

This commit is contained in:
Kenwood 2025-02-08 13:45:02 -05:00
commit 29cba1e10f
3 changed files with 273 additions and 0 deletions

80
SNHU.sty Normal file
View File

@ -0,0 +1,80 @@
% snhu.sty - Custom style file for all of snhu
% Version variable
\def\snhuversion{v8.1}
% Color for answers
\usepackage{xcolor}
\RequirePackage{fancyhdr}
\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{moghimi}{
\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{moghimi}
}
% =====================================
% 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)}%
}

77
moghimi.sty Normal file
View File

@ -0,0 +1,77 @@
% Version variable
\def\moghimiversion{v1.3}
% Package requirements
\RequirePackage{graphicx}
\RequirePackage{titlesec}
\RequirePackage{siunitx}
\RequirePackage{amsmath}
% Provides
\usepackage {snhu}
\ProvidesPackage{moghimi}[\moghimiversion Custom package for Professor Moghimi]
% For title formatting
\usepackage{titlesec}
% Circuits
\usepackage[american]{circuitikz}
% Title formatting for sections
\titleformat{\section}
{\normalfont\normalsize\bfseries}{}{1em}{}
\titleformat{\subsection}
{\normalfont\normalsize\bfseries}{}{1em}{}
% This is for listings and such, he's had me use matlab/octave before so this is a custom define.
\usepackage{listings}
\lstset{
language=Matlab, % Matlab/Octave syntax highlighting
basicstyle=\ttfamily,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{green},
numbers=left,
numberstyle=\tiny,
stepnumber=1,
breaklines=true,
frame=single,
captionpos=b
}
% Custom version command to print revision and compile date in footer
\newcommand{\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{SNHU\_Sty \snhuversion}\\
- \texttt{Moghimi \moghimiversion}
\end{center}
}
\lstset{
language=VHDL,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue}\bfseries,
commentstyle=\color{gray},
stringstyle=\color{red},
numberstyle=\tiny\color{gray},
numbers=left,
stepnumber=1,
numbersep=10pt,
backgroundcolor=\color{white},
frame=single,
breaklines=true,
captionpos=b,
tabsize=2,
}

116
monk.sty Normal file
View File

@ -0,0 +1,116 @@
% monk.sty - Custom style file for Professor Monk's coursework
% Version variable
\def\monkversion{v1.6}
\usepackage {snhu}
\ProvidesPackage{monk}[\monkversion Custom package for Professor Monk]
% Encoding
\usepackage[utf8]{inputenc}
% Math and titles
\usepackage{amsmath}
\usepackage{titlesec}
\usepackage{siunitx}
% Circuits and Electronics
\usepackage[american]{circuitikz}
% LaTeX
\usepackage{ifthen}
% This is for listings and such, he's had me use matlab/octave before so this is a custom define.
\usepackage{listings}
\lstset{
language=Matlab, % Matlab/Octave syntax highlighting
basicstyle=\ttfamily,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{green},
numbers=left,
numberstyle=\tiny,
stepnumber=1,
breaklines=true,
frame=single,
captionpos=b
}
% This formatting is for spice netlists, its not critical but, its nice to have.
\lstdefinelanguage{Netlist}{
morekeywords={V, I, R, C, L, .end, .control, .op, .dc, .ac, .print, print, .plot}, % Add more as needed
keywordstyle=\color{orange}\bfseries,
morecomment=[l]{*}, % Netlist comments start with * or ;
morecomment=[l]{;},
commentstyle=\color{red},
morestring=[b]",
stringstyle=\color{brown},
numbers=left, % Line numbers on the left
numberstyle=\tiny\color{black}, % Todo, make this the pagecolor inverse
stepnumber=1, % Show line numbers for every line
breaklines=true,
showstringspaces=false,
tabsize=2,
basicstyle=\ttfamily\footnotesize, % Basic style for netlists
}
% To use, do this
% \lstinputlisting[language=Netlist]{spice/circuit_a.net}
% Title formatting for sections
\titleformat{\section}
{\normalfont\normalsize\bfseries}{}{1em}{}
\titleformat{\subsection}
{\normalfont\normalsize\bfseries}{}{1em}{}
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries}{}{1em}{}
% This is neat, its a custom \req command for keeping track of monk's project requirement sheets
% Define a toggle for showing requirements
\newif\ifshowreqs
\showreqstrue % Default to true
% Command to toggle visibility
\newcommand{\showreqs}[1]{%
\ifthenelse{\equal{#1}{true}}{\showreqstrue}{\showreqsfalse}%
}
% Define the \req command
\newcommand{\req}[1]{%
\ifshowreqs%
\textsuperscript{\textit{\textcolor{red}{#1}}}% Show requirement flag (styled)
\fi%
}
% This is just to make it easier to configure/disable the draft mode with a toggle
\newcommand{\showdraft}{%
\usepackage{draftwatermark}
\SetWatermarkText{DRAFT}
\SetWatermarkScale{5}
\SetWatermarkColor[gray]{0.8}
}
% Custom version command to print revision and compile date in footer
\newcommand{\revision}[2][false]{
\clearpage
\null
\vfill
\begin{center}
\texttt{Revision: #2} \\
\texttt{Compiled on \today}
% Conditionally include Source.zip text if #1 is set to true
\ifthenelse{\equal{#1}{true}}{
\bigskip
\texttt{You should have received a copy of the Source.zip along with this document.}
}{}
\bigskip
\texttt{Libs:} \\
- \texttt{SNHU\_Sty \snhuversion}\\
- \texttt{Monk \monkversion}
\end{center}
}