%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% CS667.sty adapted from 611.sty
%%% by Adam Arbree, January 26, 2004
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{amsfonts}
\usepackage{amsmath}

\newcommand\deriv[2]{\ensuremath{\frac{d #1}{d #2}}}

\newenvironment{code}{
\medskip
\begingroup
\leftskip\@totalleftmargin\rightskip\z@%
\parindent\z@\parfillskip\@flushglue\parskip\z@%
\sf%
\@tempswafalse \def\par{\@@par\if@tempswa~\!\!\fi\@tempswatrue}%
\obeylines\obeyspaces%
}{\endgroup\medskip}


% Make < and > produce angle brackets in both normal and math mode.
% The original definitions of < and > are captured in \angle@lt and
% angle@gt. 
%
% The macros \lt and \gt may be used to obtain the original less-than
% and greater-than symbols in both math mode and normal mode.
%
% -- Andrew Myers (andru@lcs.mit.edu)
%
%\let\angle@lt=<%
%\let\angle@gt=>%
%\catcode`\<\active%
%\catcode`\>\active%
%\gdef<{\ensuremath\langle}
%\gdef>{\ensuremath\rangle}
%\gdef\lt{\ensuremath\angle@lt}
%\gdef\gt{\ensuremath\angle@gt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Section, subsections, and page size

\newcommand{\textxx}{\textbf} % font for title and sections
\newcommand{\textyy}{\textrm} % font for header text

\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\flushleft\large\textxx}}

\renewcommand\subsection{\@startsection {subsection}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\flushleft\normalsize\textxx}}

\renewcommand\subsubsection{\@startsection {subsubsection}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\flushleft\normalsize\textxx}}

\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{(\alph{enumii})}
%%% Set up for fullpage 8.5x11 paper
\topmargin 0pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
     
\textheight 8.9in
     
\oddsidemargin 0pt
\evensidemargin \oddsidemargin
\marginparwidth 0.5in
     
\textwidth 6.5in

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Header for lectures and homeworks

\newcommand\lecture[1]{\def\@lecture{Lecture #1}}
\newcommand\lectures[2]{\def\@lecture{Lectures #1--#2}}
\newcommand\lecturer[1]{\def\@lecturer{#1}}

\lecturer{Steve Marschner}

% header for lectures
\renewcommand\maketitle{
\begin{flushleft}
{\large
\textyy{CS667}  \hfill \textxx{\@title} \hfill \textyy{\@date}}\\
\vspace{.2cm}
\textyy{\@author} \hfill \textyy{Lecturer: \@lecturer}\\
\hrulefill
\end{flushleft}}

\def\ttquot@ttfont{\sf}
\def\ttquot@verbatimfont{\tt}
