dotfiles/tex/homework.cls

182 lines
4.7 KiB
OpenEdge ABL
Raw Normal View History

2022-11-21 00:05:55 -05:00
\ProvidesClass{homework}
2022-12-08 18:05:40 -05:00
\LoadClass[fontsize=10pt]{scrartcl}
2022-11-08 21:41:28 -05:00
2023-02-12 17:51:21 -05:00
\RequirePackage{tex-macros}
2022-11-21 00:05:55 -05:00
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
2022-12-08 18:05:40 -05:00
\RequirePackage{stmaryrd}
\SetSymbolFont{stmry}{bold}{U}{stmry}{m}{n}
2022-11-21 00:05:55 -05:00
\RequirePackage{url}
\RequirePackage{float}
\RequirePackage{booktabs}
\RequirePackage{emptypage}
\RequirePackage{subcaption}
\RequirePackage{multicol}
\RequirePackage{cancel}
\RequirePackage{mathrsfs}
\RequirePackage{minted}
2023-05-23 23:39:53 -04:00
\RequirePackage{listings}
2022-11-21 00:05:55 -05:00
\RequirePackage{systeme}
2023-05-23 23:39:53 -04:00
\RequirePackage{amsfonts, amsmath, mathtools, amssymb, amsthm}
2022-11-08 21:41:28 -05:00
\RequirePackage{enumitem}
2022-11-21 00:05:55 -05:00
\RequirePackage{bm}
\RequirePackage{listings}
2022-11-08 21:41:28 -05:00
\RequirePackage{geometry}
\RequirePackage{graphicx}
2024-01-18 16:58:49 -05:00
\RequirePackage[dvipsnames]{xcolor}
2023-05-23 23:39:53 -04:00
\RequirePackage{bm}
2022-12-12 12:30:43 -05:00
\RequirePackage{siunitx}[=v2]
2022-11-08 21:41:28 -05:00
\RequirePackage{physics}
2022-12-12 12:30:43 -05:00
\RenewCommandCopy\qty\SI%
2023-05-23 23:39:53 -04:00
\RequirePackage{etoolbox}
\RequirePackage{xifthen}
\RequirePackage{import}
\RequirePackage{pdfpages}
\RequirePackage{fancyhdr}
\RequirePackage{tikz}
\RequirePackage{tikz-cd}
2022-11-08 21:41:28 -05:00
\RequirePackage{pgfplots}
2023-09-25 14:10:12 -04:00
\RequirePackage{algpseudocode}
\RequirePackage{algorithm}
2023-05-23 23:39:53 -04:00
2022-11-08 21:41:28 -05:00
\pgfplotsset{
compat=newest,
}
\usepgfplotslibrary{fillbetween}
2023-05-23 23:39:53 -04:00
\usetikzlibrary{patterns, intersections, angles, quotes, calc, positioning}
\usetikzlibrary{arrows.meta}
\RequirePackage{thmtools}
2022-12-12 00:13:40 -05:00
\RequirePackage[framemethod=TikZ]{mdframed}
\mdfsetup{skipabove=1em, skipbelow=0em, innertopmargin=5pt, innerbottommargin=6pt}
2022-11-08 21:41:28 -05:00
\geometry{top=20mm,bottom=20mm}
2022-12-12 00:13:40 -05:00
2023-05-23 23:39:53 -04:00
\theoremstyle{definition}
\makeatletter
2023-02-08 03:04:29 -05:00
\usemintedstyle{bw}
2023-05-23 23:39:53 -04:00
\declaretheoremstyle[
headfont=\bfseries\sffamily, bodyfont=\normalfont,
mdframed={nobreak}
]{thmboxed}
\declaretheoremstyle[
headfont=\bfseries\sffamily, bodyfont=\normalfont,
]{thmsimple}
\declaretheoremstyle[
headfont=\bfseries\sffamily, bodyfont=\normalfont,
numbered=no,
mdframed={
rightline=false, topline=false, bottomline=false,
},
qed=\qedsymbol,
]{thmproof}
\declaretheoremstyle[
headfont=\bfseries\sffamily, bodyfont=\normalfont,
numbered=no,
mdframed={
rightline=false, topline=false, bottomline=false,
}
]{thmline}
\declaretheorem[style=thmboxed, name=Definition]{definition}
\declaretheorem[style=thmboxed, name=Lemma]{lemma}
\declaretheorem[style=thmboxed, name=Theorem]{theorem}
\declaretheorem[style=thmboxed, name=Proposition]{proposition}
\declaretheorem[style=thmboxed, numbered=no, name=Corollary]{corollary}
\declaretheorem[style=thmsimple, numbered=no, name=Example]{eg}
\AtEndEnvironment{eg}{\null\hfill$\diamond$}
\declaretheorem[style=thmproof, name=Proof]{thmproof}
\renewenvironment{proof}[1][\proofname]{\begin{thmproof}}{\end{thmproof}}
\declaretheorem[style=thmline, numbered=no, name=Proof]{expl}
2023-09-25 14:10:12 -04:00
\declaretheorem[style=thmline, numbered=no, name=Solution]{answ}
2023-05-23 23:39:53 -04:00
\declaretheorem[style=thmsimple, numbered=no, name=Remark]{remark}
\declaretheorem[style=thmsimple, numbered=no, name=Note]{note}
2023-02-08 03:04:29 -05:00
2023-09-25 14:10:12 -04:00
\newenvironment{code}[1]{\VerbatimEnvironment\begin{minted}[fontfamily=courier, frame=lines,framesep=7pt, linenos, breaklines]{#1}}{\end{minted}}
2023-02-08 03:04:29 -05:00
\newcommand{\inlinecode}[2]{\mintinline{#1}|#2|}
2023-09-25 14:10:12 -04:00
\newcommand{\importcode}[2]{\inputminted[fontfamily=courier, frame=lines, framesep=7pt, linenos, breaklines]{#1}{#2}}
2023-02-08 03:04:29 -05:00
2022-12-12 00:13:40 -05:00
\newcommand{\specialquote}[2]
{
\begin{flushright}
\begin{tikzpicture}
\draw (0,0) node [right,text width=8.75cm] {
\begin{mdframed}[
linecolor=black,
rightline=false,
topline=false,
bottomline=false,
backgroundcolor=black!5,
linewidth=2pt
]
{``#1''}
\vspace{1mm}
\hfill-- \small{#2}
\end{mdframed}
};
\end{tikzpicture}
\end{flushright}
}
\newcommand{\specialnoquote}[2]
{
\begin{flushright}
\begin{tikzpicture}
\draw (0,0) node [right,text width=8.75cm] {
\begin{mdframed}[
linecolor=black,
rightline=false,
topline=false,
bottomline=false,
backgroundcolor=black!5,
linewidth=2pt
]
{#1}
\vspace{1mm}
\hfill-- \small{#2}
\end{mdframed}
};
\end{tikzpicture}
\end{flushright}
}
2023-02-10 02:06:21 -05:00
\newcommand{\exercise}[2][]{%
\def\@exercise{#2}%
\subsection*{Exercise #2. #1}
}
\newcommand{\subexercise}[2][]{%
\subsubsection*{Exercise \@exercise.#2. #1}
}
\newcommand{\sect}[1]{
\def\@section{#1}
\section*{#1}
}
2023-05-23 23:39:53 -04:00
2023-09-25 14:10:12 -04:00
\newcommand{\subsect}[1]{
\def\@subsection{#1}
\subsection*{#1}
}
2023-05-23 23:39:53 -04:00
\makeatother