Created
March 13, 2017 21:19
-
-
Save Plastix/81ae88f134418686e1873fbc31ea4a64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[11pt]{article} | |
\usepackage{fancyhdr} | |
\usepackage{extramarks} | |
\usepackage{amsmath} | |
\usepackage{amsthm} | |
\usepackage{amsfonts} | |
\usepackage[utf8]{inputenc} | |
\usepackage{listings} | |
\usepackage{courier} | |
% | |
% Basic Document Settings | |
% | |
\topmargin=-0.45in | |
\evensidemargin=0in | |
\oddsidemargin=0in | |
\textwidth=6.5in | |
\textheight=9.0in | |
\headsep=0.25in | |
\linespread{1.1} | |
\pagestyle{fancy} | |
\lhead{\hmwkAuthorName} | |
\chead{\hmwkClass\ : \hmwkTitle} | |
\rhead{\firstxmark} | |
\lfoot{\lastxmark} | |
\cfoot{\thepage} | |
\renewcommand\headrulewidth{0.4pt} | |
\renewcommand\footrulewidth{0.4pt} | |
\setlength\parindent{0pt} | |
% | |
% Create Problem Sections | |
% | |
\newcommand{\tab}[1]{\hspace{.2\textwidth}\rlap{#1}} | |
\newcommand{\enterProblemHeader}[1]{ | |
\nobreak\extramarks{}{Problem \arabic{#1} continued on next page\ldots}\nobreak{} | |
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{} | |
} | |
\newcommand{\exitProblemHeader}[1]{ | |
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{} | |
\stepcounter{#1} | |
\nobreak\extramarks{Problem \arabic{#1}}{}\nobreak{} | |
} | |
\setcounter{secnumdepth}{0} | |
\newcounter{partCounter} | |
\newcounter{homeworkProblemCounter} | |
\setcounter{homeworkProblemCounter}{1} | |
\nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{} | |
% | |
% Homework Problem Environment | |
% | |
% This environment takes an optional argument. When given, it will adjust the | |
% problem counter. This is useful for when the problems given for your | |
% assignment aren't sequential. | |
% | |
\newenvironment{homeworkProblem}[1][-1]{ | |
\ifnum#1>0 | |
\setcounter{homeworkProblemCounter}{#1} | |
\fi | |
\section{Problem \arabic{homeworkProblemCounter}} | |
\setcounter{partCounter}{1} | |
\enterProblemHeader{homeworkProblemCounter} | |
}{ | |
\exitProblemHeader{homeworkProblemCounter} | |
} | |
\newcommand\showsum[1]{% | |
\let\@stack\xlop@stack% | |
\convertchar[q]{#1}{ }{+}% | |
\setcounter{mysum}{\numexpr\thestring\relax}% | |
\def\stackalignment{r}% | |
\edef\tmp{\themysum}% | |
{\stackunder{\underline{+\ \Longstack{#1}}}{% | |
\spaceout{\tmp}}}% | |
\let\@stack\sv@stack% | |
} | |
% | |
% Homework Details | |
% - Title | |
% - Due date | |
% - Class | |
% - Section/Time | |
% - Instructor | |
% - Author | |
% | |
\newcommand{\hmwkTitle}{Homework Title} | |
\newcommand{\hmwkDueDate}{Due Date} | |
\newcommand{\hmwkClass}{Class} | |
\newcommand{\hmwkClassTime}{Due Time} | |
\newcommand{\hmwkClassInstructor}{Instructor Name} | |
\newcommand{\hmwkAuthorName}{YOUR NAME} | |
% | |
% Honor Code Affirmation | |
% | |
\newcommand{\honorCode}{ | |
\begin{center} | |
\section*{Honor Code Affirmation} | |
I affirm that I have carried out my academic endeavors with full academic honesty.\vspace{1cm}\hspace{0.5cm}\makebox[2in]{\hrulefill} | |
\end{center} | |
} | |
% | |
% Title Page | |
% | |
\title{ | |
\vspace{2in} | |
\textmd{\textbf{\hmwkClass:\ \hmwkTitle}}\\ | |
\normalsize\vspace{0.1in}\large{Due\ on\ \hmwkDueDate\ at \hmwkClassTime}\\ | |
\vspace{0.1in}\large{\textit{\hmwkClassInstructor}} | |
\vspace{3in} | |
} | |
\author{\textsc{\hmwkAuthorName}} | |
% Uncomment to use a custom date | |
%\date{} | |
% | |
% Helper Commands | |
% | |
\newcommand{\inst}[2]{ | |
\textbf{(#1)} #2 \\ | |
\solution\\ | |
} | |
\renewcommand{\part}[1]{\textbf{\large Part \Alph{partCounter}}\stepcounter{partCounter}\\} | |
% | |
% Main Document Begin | |
% | |
\begin{document} | |
\maketitle | |
\honorCode | |
\pagebreak | |
\begin{homeworkProblem} | |
\end{homeworkProblem} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment