
Homework Template
作者:
Caleb McWhorter
最近上传:
6 年前
许可:
Creative Commons CC BY 4.0
摘要:
A template for creating course homeworks.

\begin
Discover why over 20 million people worldwide trust Overleaf with their work.
\begin
Discover why over 20 million people worldwide trust Overleaf with their work.
\documentclass[11pt,letterpaper]{article}
\usepackage[lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in]{geometry}
% -------------------
% Packages
% -------------------
\usepackage{
amsmath, % Math Environments
amssymb, % Extended Symbols
enumerate, % Enumerate Environments
graphicx, % Include Images
lastpage, % Reference Lastpage
multicol, % Use Multi-columns
multirow % Use Multi-rows
}
\usepackage[framemethod=TikZ]{mdframed}
% -------------------
% Font
% -------------------
\usepackage[T1]{fontenc}
\usepackage{charter}
% -------------------
% Commands
% -------------------
\newcommand{\homework}[2]{\noindent\textbf{Name: }\makebox[3in]{\hrulefill} \hfill \textbf{MAT 999} \\ \textbf{Due: #2} \hfill \textbf{HW #1}\\}
\newcommand{\prob}{\noindent\textbf{Problem. }}
\newcounter{problem}
\newcommand{\problem}{
\stepcounter{problem}%
\noindent \textbf{Problem \theproblem. }%
}
\newcommand{\pointproblem}[1]{
\stepcounter{problem}%
\noindent \textbf{Problem \theproblem.} (#1 points)\,%
}
\newcommand{\pspace}{\par\vspace{\baselineskip}}
\newcommand{\ds}{\displaystyle}
% -------------------
% Theorem Environment
% -------------------
\mdfdefinestyle{theoremstyle}{%
frametitlerule=true,
roundcorner=5pt,
linecolor=black,
outerlinewidth=0.5pt,
middlelinewidth=0.5pt
}
\mdtheorem[style=theoremstyle]{exercise}{\textbf{Problem}}
% -------------------
% Header & Footer
% -------------------
\usepackage{fancyhdr}
\fancypagestyle{pages}{
%Headers
\fancyhead[L]{}
\fancyhead[C]{}
\fancyhead[R]{}
\renewcommand{\headrulewidth}{0pt}
%Footers
\fancyfoot[L]{}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage \,of \pageref{LastPage}}
\renewcommand{\footrulewidth}{0.0pt}
}
\headheight=0pt
\footskip=14pt
\pagestyle{pages}
% -------------------
% Content
% -------------------
\begin{document}
\homework{\#}{MM/DD}
% Question 1
\begin{exercise}
This problem has several parts:
\begin{enumerate}[(a)]
\item The first part.
\item The second part.
\item The third part.
\end{enumerate}
\end{exercise}
% Question 2
\begin{exercise}
For each of the following below, determine which option is correct.
\begin{enumerate}[(i)]
\item
\begin{tabular}{p{3cm}p{3cm}p{3cm}p{3cm}}
a) $2 \cdot 2= 4$ & b) $x^3= x \cdot x$ & c) $\sin x = \cos x$ & d) $\sin x^2= \sin^2 x$
\end{tabular}
\item
\begin{tabular}{p{3cm}p{3cm}p{3cm}p{3cm}}
a) $2 \cdot 2= 4$ & b) $x^3= x \cdot x$ & c) $\sin x = \cos x$ & d) $\sin x^2= \sin^2 x$
\end{tabular}
\end{enumerate}
\end{exercise}
% Question 3
\begin{exercise}
Compute the following integral:
\[
\int e^{-x^2} \;dx
\] \vspace{6cm}
\end{exercise}
\end{document}