Good enough templating for homework anyway

This commit is contained in:
Kenwood 2025-02-08 14:25:17 -05:00
parent 29cba1e10f
commit 041d85956c
7 changed files with 74 additions and 4 deletions

View File

@ -0,0 +1,23 @@
\documentclass[12pt]{article}
\usepackage{ {{cookiecutter.professor}} }
% Set title page details
\reporttitle{Homework {{cookiecutter.number}} }
\class{ {{cookiecutter.class}} }
\studentname{ {{cookiecutter.name}} }
\submissiondate{\today}
\universityname{Southern New Hampshire University}
\begin{document}
\maketitle
\exer[Question]{1}
\mpart{a}
Question 1, Part a
\revision{1}
\end{document}

View File

@ -0,0 +1,3 @@
# Homework {{cookiecutter.number}}
Find the source for this template [here](https://git.kitsunehosting.net/Kenwood/SNHU-LaTeX).

17
README.md Normal file
View File

@ -0,0 +1,17 @@
# Usage
Clone this repository and (for ease of use) add the directory to your `TEXINPUTS` env variable.
If this is not easy for you or you don't want to mess with your env variables, just copy your relevant `.sty`
files locally.
# Cookiecutter
For making new projects/homework assignments I've put some cookiecutter defs here.
Cookiecutter is easy to invoke even without manually cloning. In the directory you want
to create a new project, just invoke cookiecutter with the url to this repo.
```shell
cookiecutter https://git.kitsunehosting.net/Kenwood/SNHU-LaTeX
```
Follow the prompts!

View File

@ -37,7 +37,7 @@
}
% Custom header/footer
\fancypagestyle{moghimi}{
\fancypagestyle{snhudefault}{
\fancyhf{}
\fancyhead[L]{\@reporttitle}
\fancyhead[R]{\@studentname}
@ -48,7 +48,7 @@
% Package options to load fancy headers by default
\AtBeginDocument{
\pagestyle{moghimi}
\pagestyle{snhudefault}
}
% =====================================
@ -78,3 +78,21 @@
\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{SNHU\_Sty \snhuversion}
\end{center}
}

6
cookiecutter.json Normal file
View File

@ -0,0 +1,6 @@
{
"number": "1",
"name": "Your Name",
"class": "EE-101",
"professor": ["SNHU", "monk", "moghimi"]
}

View File

@ -6,6 +6,7 @@
\RequirePackage{titlesec}
\RequirePackage{siunitx}
\RequirePackage{amsmath}
\RequirePackage{tikz}
% Provides
\usepackage {snhu}
@ -16,6 +17,7 @@
% Circuits
\usepackage[american]{circuitikz}
\usetikzlibrary{circuits.logic.US}
% Title formatting for sections
\titleformat{\section}
@ -41,7 +43,7 @@
}
% Custom version command to print revision and compile date in footer
\newcommand{\revision}[1]{
\renewcommand{\revision}[1]{
\clearpage
\null
\vfill
@ -75,3 +77,4 @@
captionpos=b,
tabsize=2,
}

View File

@ -93,7 +93,7 @@
}
% Custom version command to print revision and compile date in footer
\newcommand{\revision}[2][false]{
\renewcommand{\revision}[2][false]{
\clearpage
\null
\vfill