Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
LaTeX Homework Template
% TODO List
\usepackage{index} % use index package to create indices
\newindex{todo}{tod}{tnd}{TODO List} % start todo list
\newindex{fixme}{fix}{fnd}{FIXME List} % start fixme list
\newcommand{\todo}[1]{\textcolor{blue}{TODO: #1}\index[todo]{#1}} % macro for todo entries
\newcommand{\fixme}[1]{\textcolor{red}{FIXME: #1}\index[fixme]{#1}} % macro for fixme entries
\lhead{CS999 homework}
\rhead{Joe Smith (jsmith2)}
% Problem 1
\Large{\item \textbf{Generic Problem One}}
% (a)
\answer {
Example pseudocode w/ $for$, $while$, and $if$:
\Procedure{ExamplePseudocode}{$G, s$}
\For{\textbf{each} vertex $v \in G$}
\State $probability[v] \gets \infty$
\While{$Q$ is not empty}
\If{$probability[u] = \infty$}
\State \textbf{break}
\State remove $u$ from $Q$
\State \textbf{return} ($probability[], previous[])$
Everything is proven. We're all happy.
% (b)
\answer {
Example equation array:
1 & = & 1 \\
1 & = & 2 \\
1 & > & 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.