-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.tex
125 lines (110 loc) · 2.4 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
\documentclass{article}
\usepackage{amsmath, amssymb, mathtools, tikz, enumitem, fancyhdr, mleftright, wrapfig, scrextend}
\usetikzlibrary{calc}
\usepackage[margin = 1in]{geometry}
\def\class{CLASS}
\def\discussion{DISCUSSION}
\def\header{TITLE}
\def\first{FIRST}
\def\last{LAST}
\fancypagestyle{first}
{
\fancyhf{}
\setlength{\headsep}{\baselineskip}
\lhead{\class{} - Section \discussion}
\chead{\header}
\rhead{\last, \first}
\cfoot{\thepage}
}
\thispagestyle{first}
%%%%%%%%%%%%Commands%%%%%%%%%%%%
\newcommand{\diff}[1]{\mathrm{d}#1} % Upright differential
\newcommand{\qed}{\hfill$\blacksquare$}
\DeclarePairedDelimiter{\paren}{(}{)}
\DeclarePairedDelimiter{\brac}{[}{]}
\DeclarePairedDelimiter{\set}{\{}{\}}
\newcommand{\zerospace}
{
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%Environments%%%%%%%%%%
\newenvironment{problem}[1] % Problem environment
{
\begin{enumerate}[leftmargin = 0in]
\item[\bfseries{#1}]
}
{ \end{enumerate}
}
\newenvironment{multipart}
{
\begin{enumerate}[leftmargin = *, align = left, label = {\alph*.}, topsep = 0pt]
}
{
\end{enumerate}
}
\newenvironment{proofcase}[1]
{
\par
#1
\begin{addmargin}[1em]{0em}
}
{
\end{addmargin}
}
%%%%
\newenvironment{solution} % Solution environment
{
\begin{enumerate}[leftmargin = 0in]
\item[\bfseries{Solution}]
}
{
\end{enumerate}
}
%%%%
\newenvironment{nospaceflalign*} % No extra vertical space before flalign* environment
{
\setlength{\abovedisplayskip}{-\baselineskip}
\csname flalign*\endcsname
}
{
\csname endflalign*\endcsname
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%Homework%%%%%%%%%%%%%
\begin{document}
\begin{problem}{4.3.14}
Problem here
\end{problem}
\begin{solution}
Solution
\end{solution}
\hrule %%%%%%%%%%%%%%%%%%%%%%%%%
\begin{problem}{4.3.22}
Multiple part problem
\begin{multipart}
\item First part
\item Second part
\end{multipart}
\end{problem}
\begin{solution}
Solution
\end{solution}
\hrule %%%%%%%%%%%%%%%%%%%%%%%%%
\begin{problem}{4.6.20}
Multiple cases
\begin{proofcase}{Case 1:}
This is the first case.
\end{proofcase}
\begin{proofcase}{Case 2:}
This is the second case.
\end{proofcase}
This is the end of the proof. \qed
\end{problem}
\begin{solution}
Solution
\end{solution}
\end{document}