-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.tex
110 lines (85 loc) · 2.74 KB
/
template.tex
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
\documentclass[a4paper,12pt]{article}
\usepackage[
top=1.8cm,
bottom=1.5cm,
left=1.8cm,
right=1.8cm,
includefoot,
includehead]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{changepage}
\usepackage{multicol}
\usepackage{nccmath}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{enumitem}
\usepackage[linewidth=1.2pt,linecolor=red]{mdframed}
% For fancy math
\RequirePackage{amsmath,amsthm,amssymb}
\newtheorem{theorem}{Theorem}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{claim}[theorem]{Claim}
\newcommand{\ord}[2][th]{\ensuremath{{#2}^{\mathrm{#1}}}}
% shorthand for \mathcal{O}
\newcommand{\Ocal}{\ensuremath{\mathcal{O}}}
\newcommand{\aug}{\fboxsep=-\fboxrule\!\!\!\fbox{\strut}\!\!\!}
\newcommand{\contradiction}{%
\ensuremath{{\Rightarrow\mspace{-2mu}\Leftarrow}}%
}
% Counters for HW number, author, and collaborators
\newcommand{\hwnumber}[1]{\def\hwnumberdata{#1}}
\def\hwnumberdata{\relax}
\renewcommand{\author}[1]{\def\authordata{#1}}
\def\authordata{\relax}
\newcommand{\collaborators}[1]{\def\collaboratorsdata{#1}}
\def\collaboratorsdata{\relax}
% Fancy headings
\RequirePackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead[L]{\small \authordata \\
\small CS 630 Homework \#\hwnumberdata \\
\textsl{Collaborators}: \collaboratorsdata}
\RequirePackage{titlesec}
\titleformat{\subsection}{\normalsize\bfseries}{\thesubsection}{.5em}{}
\renewcommand{\thesubsection}{\alph{subsection})}
% Making the problem and ppart environments
\newcommand{\addmedskip}{\addvspace{2\medskipamount}}
\newcommand{\addbigskip}{\addvspace{2\bigskipamount}}
\newcommand{\nline}{\bigskip}
\newcounter{problemnum}
\setcounter{problemnum}{0}
\newenvironment{problem}
{\addbigskip \setcounter{partnum}{0}
\noindent\stepcounter{problemnum}\textbf{Problem \arabic{problemnum}.\ }}
{\par\addbigskip}
\newcounter{partnum}
\setcounter{partnum}{0}
\newenvironment{ppart}[1][]{%
\addmedskip
\refstepcounter{partnum}%\par\medskip%
\enumerate[labelsep=*]\item[\textbf{\roman{partnum})}]}
{\endenumerate}
\newsavebox{\mybox}
\newenvironment{answer}
{\begin{lrbox}{\mybox}\begin{minipage}{0.95\textwidth}\vspace{0.2cm}}
{\vspace{0.1cm}\end{minipage}\end{lrbox}\fbox{\usebox{\mybox}}}
\newenvironment{customProof}{\begin{proof}\noindent}{\end{proof}}
% Put your name and the homework number here.
\author{Jiun-Yan (Eric) Chen}
\hwnumber{1}
\begin{document}
\vspace*{0.5\baselineskip}
\textbf{Please limit your answer to the following problems to at most 1/2 a page each.}
\collaborators{None} % Put your collaborators the problem here
\begin{problem}
\begin{ppart}
\end{ppart}
\end{problem}
\newpage
\collaborators{None} % Put your collaborators the problem here
\begin{problem}
\begin{ppart}
\end{ppart}
\end{problem}
\end{document}