1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{assignment}[2023/08/21 v1.0 Assignment class]
\LoadClass{article}
\RequirePackage[utf8]{inputenc}
\RequirePackage{graphicx}
\RequirePackage{float}
\RequirePackage{cancel}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{mathtools}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{bm}
\RequirePackage{thmtools}
\RequirePackage{enumitem}
\RequirePackage{fancyhdr}
\RequirePackage[usenames,dvipsnames]{xcolor}
\RequirePackage[framemethod=TikZ]{mdframed}
\newcommand\N{\ensuremath{\mathbb{N}}}
\newcommand\R{\ensuremath{\mathbb{R}}}
\newcommand\Z{\ensuremath{\mathbb{Z}}}
\renewcommand\O{\ensuremath{\emptyset}}
\newcommand\Q{\ensuremath{\mathbb{Q}}}
\newcommand\C{\ensuremath{\mathbb{C}}}
\let\implies\Rightarrow
\let\impliedby\Leftarrow
\let\iff\Leftrightarrow
\definecolor{catblue}{RGB}{30, 102, 245}
\definecolor{catlav}{RGB}{114, 135, 253}
\definecolor{catmauve}{RGB}{136, 57, 239}
\definecolor{catsapp}{RGB}{32, 159, 181}
\definecolor{catpeach}{RGB}{254, 100, 11}
\definecolor{catmaroon}{RGB}{230, 69, 83}
\mdfsetup{skipabove=1em,skipbelow=0em}
\colorlet{thmcolor}{catmauve}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{thmcolor!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=thmcolor, backgroundcolor=thmcolor!10,
}
]{thmsty}
\colorlet{excolor}{catlav}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{excolor!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=excolor, backgroundcolor=excolor!10,
}
]{exsty}
\colorlet{lemcolor}{catsapp}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{lemcolor!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=lemcolor, backgroundcolor=lemcolor!10,
}
]{lemsty}
\colorlet{defcolor}{catpeach}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{defcolor!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=defcolor, backgroundcolor=defcolor!10,
}
]{defsty}
\colorlet{propcolor}{catmaroon}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{propcolor!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=propcolor, backgroundcolor=propcolor!10,
}
]{propsty}
\colorlet{remcolor}{catblue}
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{remcolor!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=remcolor,
}
]{remsty}
\newcommand\defprf[1]{
\declaretheoremstyle[
headfont=\sffamily\bfseries\color{#1color!80!black},
mdframed={
linewidth=2pt,
rightline=false, topline=false, bottomline=false,
linecolor=#1color, backgroundcolor=#1color!3,
}, qed=\qedsymbol
]{prf#1}
\declaretheorem[style=prf#1,title=Proof,numbered=no]{proof#1}
}
\declaretheorem[style=remark]{case}
\declaretheorem[style=remsty,numbered=no]{remark}
\declaretheorem[style=thmsty,title=Theorem]{theoremenv}
\declaretheorem[style=exsty,title=Example]{exampleenv}
\declaretheorem[style=lemsty,title=Lemma]{lemmaenv}
\declaretheorem[style=defsty,title=Defintion]{definitionenv}
\declaretheorem[style=propsty,title=Proposition]{propositionenv}
\newcommand\defblock[2]{
\newenvironment{#1}{\gdef\lastenv{#2}\begin{#1env}}{\end{#1env}}
\defprf{#2}
}
\defblock{theorem}{thm}
\defblock{lemma}{lem}
\defblock{example}{ex}
\defblock{definition}{def}
\defblock{proposition}{prop}
\renewenvironment{proof}[1][\proofname]{\vspace{-10pt}\begin{proof\lastenv}}{\end{proof\lastenv}}
\pagestyle{fancy}
\makeatletter
\newcommand*{\student}[1]{\gdef\@student{#1}%
}
\newcommand*{\@student}{(STUDENT)}
\newcommand*{\teacher}[1]{\gdef\@teacher{#1}%
}
\newcommand*{\@teacher}{(TEACHER)}
\newcommand*{\course}[1]{\gdef\@course{#1}%
}
\newcommand*{\@course}{(COURSE)}
\newcommand*{\homeworkcount}[1]{\gdef\@homeworkcount{#1}%
}
\newcommand*{\@homeworkcount}{(N)}
\newcommand*{\duedate}[1]{\gdef\@duedate{#1}%
}
\newcommand*{\@duedate}{(DUE DATE)}
\newcommand*{\homeworktype}[1]{\gdef\@homeworktype{#1}%
}
\newcommand*{\@homeworktype}{(HOMEWORK TYPE)}
\rhead{ {\@course\unskip\strut}\ {\@homeworktype\unskip\strut}\ {\@homeworkcount\unskip\strut}\ --- {\@duedate\unskip\strut} }
\lhead{\thepage\ {\@student\unskip\strut} }
\title{ {E\&M\unskip\strut}\ {Problem Set\unskip\strut}\ {2\unskip\strut} }
\title{ {\@course\unskip\strut}\ {\@homeworktype\unskip\strut}\ {\@homeworkcount\unskip\strut} }
\author{ {\@teacher\unskip\strut}\\ {\@student\unskip\strut} }
% \date{ {\@duedate\unskip\strut} }
\makeatother
|