Skip to content

Instantly share code, notes, and snippets.

@alxmjo
Forked from dcernst/HWTemplate.tex
Created January 12, 2019 15:20
Show Gist options
  • Save alxmjo/e4375120a160c0ece9290b4ce4db5af1 to your computer and use it in GitHub Desktop.
Save alxmjo/e4375120a160c0ece9290b4ce4db5af1 to your computer and use it in GitHub Desktop.
LaTeX homework template for Weekly Homework assignments for Dana Ernst's courses.
% --------------------------------------------------------------
% This is all preamble stuff that you don't have to worry about.
% Head down to where it says "Start here"
% --------------------------------------------------------------
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amsthm,amssymb}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newenvironment{theorem}[2][Theorem]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\newenvironment{lemma}[2][Lemma]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\newenvironment{exercise}[2][Exercise]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\newenvironment{problem}[2][Problem]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\newenvironment{question}[2][Question]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\newenvironment{corollary}[2][Corollary]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\begin{document}
% --------------------------------------------------------------
% Start here
% --------------------------------------------------------------
\title{Weekly Homework X}%replace X with the appropriate number
\author{Tony Stark\\ %replace with your name
Foundations of Mathematics} %if necessary, replace with your course title
\maketitle
\begin{theorem}{x.yz} %You can use theorem, exercise, problem, or question here. Modify x.yz to be whatever number you are proving
Delete this text and write theorem statement here.
\end{theorem}
\begin{proof}
Blah, blah, blah. Here is an example of the \texttt{align} environment:
%Note 1: The * tells LaTeX not to number the lines. If you remove the *, be sure to remove it below, too.
%Note 2: Inside the align environment, you do not want to use $-signs. The reason for this is that this is already a math environment. This is why we have to include \text{} around any text inside the align environment.
\begin{align*}
\sum_{i=1}^{k+1}i & = \left(\sum_{i=1}^{k}i\right) +(k+1)\\
& = \frac{k(k+1)}{2}+k+1 & (\text{by inductive hypothesis})\\
& = \frac{k(k+1)+2(k+1)}{2}\\
& = \frac{(k+1)(k+2)}{2}\\
& = \frac{(k+1)((k+1)+1)}{2}.
\end{align*}
\end{proof}
\begin{theorem}{x.yz}
Let $n\in \Z$. Then yada yada.
\end{theorem}
\begin{proof}
Blah, blah, blah. I'm so smart.
\end{proof}
% --------------------------------------------------------------
% You don't have to mess with anything below this line.
% --------------------------------------------------------------
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment