%%% assignment.hcls \newif\iflatex\latexfalse \newif\ifhtml\htmltrue % should be built in \newenvironment{center} {\raw{
}} {\raw{
}} \def\copyrightnotice{\ifauthor\par\raw{
}\copyright~\year~\theauthor\par\fi} \let\trueenddocument=\enddocument \def\enddocument{ \theselfstudy \begin{divertoutput}[toc] \ifsubsubsec\raw{}\fi \ifsubsec\raw{}\fi \end{divertoutput} \copyrightnotice\trueenddocument} \newif\iftitle\titlefalse \newif\ifdate\datefalse \newif\ifauthor\authorfalse \def\title#1{\def\thetitle{#1}\titletrue} \def\date#1{\def\thedate{#1}\datetrue} \def\author#1{\def\theauthor{#1}\authortrue} \def\maketitle{% \iftitle\raw{

}\thetitle\raw{

}\fi \ifauthor \ifdate \raw{

}\theauthor\\\thedate\raw{

}% \else \raw{

}\theauthor\raw{

}% \fi \else \ifdate\raw{

}\thedate\raw{

}\fi \fi} %%% table of contents \newif\ifsubsec\subsecfalse \newif\ifsubsubsec\subsubsecfalse \newcommand{\tableofcontents}{ \raw{} \rawinput{\jobname.htoc} \raw{
} \openrawfile{toc}{\jobname.htoc}} % we \let\label=\nolabel within toc entries to avoid inserting % labels that belong with the labeled entity, not the toc \def\nolabel#1{} %%% \section \newcounter{section} \renewcommand{\thesection}{\arabic{section}} \newcommand{\section}[1]{ \refstepcounter{section} \edef\templabel{\genlab} \raw{


}\label{\templabel}\thesection. #1\raw{

} \begin{divertoutput}[toc] \ifsubsubsec\raw{}\fi \subsubsecfalse \ifsubsec\raw{}\fi \subsecfalse \raw{}\textbf{\thesection.~}\raw{}\textbf{\href[plain]{\templabel}{{\let\label=\nolabel #1}}}\raw{} \end{divertoutput} } %%% \subsection \newcounter{subsection}[section] \renewcommand{\thesubsection}{\thesection.\arabic{subsection}} \newcommand{\subsection}[1]{ \refstepcounter{subsection} \edef\templabel{\genlab} \raw{


}\label{\templabel}\thesubsection. #1\raw{

} \begin{divertoutput}[toc] \ifsubsubsec\raw{}\fi \subsubsecfalse \ifsubsec\else\raw{}\fi \subsectrue \raw{} \end{divertoutput} } %%% \subsubsection \newcounter{subsubsection}[subsection] \renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}} \newcommand{\subsubsection}[1]{ \refstepcounter{subsubsection} \edef\templabel{\genlab} \raw{


}\label{\templabel}\thesubsubsection. #1\raw{

} \begin{divertoutput}[toc] \ifsubsubsec\else\raw{
}\textbf{\thesubsection.~}\raw{}\textbf{\href[plain]{\templabel}{{\let\label=\nolabel #1}}}\raw{
}\fi \subsubsectrue \raw{} \end{divertoutput} } %%% figure \newcounter{figure} \renewcommand{\thefigure}{\arabic{figure}} \newcommand{\caption}[1]{\\ Figure \thefigure.~#1} \newenvironment{figure} {\begingroup\refstepcounter{figure}} {\endgroup} %%% exercise \newcounter{exercise} \renewcommand{\theexercise}{\arabic{exercise}} \def\@startexercise{\refstepcounter{exercise} \raw{
} \textbf{Exercise \theexercise. }} \newenvironment{exercise} {\begingroup\def\newexercise{\@startexercise}\newexercise} {\raw{
}} \newcounter{subexercise}[exercise] \renewcommand{\thesubexercise}{\theexercise\alph{subexercise}} \newcommand{\subexercise}{\par\refstepcounter{subexercise}\textbf{\thesubexercise. }} %%% self-study \newif\ifselfstudy\selfstudyfalse \def\selfstudy#1#2{\selfstudytrue} \def\theselfstudy{\ifselfstudy\realselfstudy\fi} \def\realselfstudy{\begingroup \def\sstudyentry##1##2##3{\raw{

}\textbf{##3.} ##1 [see \hyperlink{######2}{here}]\raw{

}} \section{Questions for self study}\label{section:selfstudy} \input{\jobname.sst} \endgroup} %%% alphalist \newcounter{alphalist} \def\alphalist{\begingroup\setcounter{alphalist}{0} \def\endalphalistitem{}% \renewcommand{\item}{\endalphalistitem \def\endalphalistiem{\raw{}}% \stepcounter{alphalist}% \raw{
}\textbf{\thesubsubsection.~}\raw{}\textbf{\href[plain]{\templabel}{{\let\label=\nolabel #1}}}\raw{
}\alph{alphalist}.\raw{}} \raw{}} \def\endalphalist{\endalphalistitem\raw{
}\endgroup} %%% define our own (compact) description environment \def\description{\begingroup \renewcommand{\item}[1][]{\raw{
}##1\raw{
}}\raw{
}} \def\enddescription{\raw{
}\endgroup} %%% index \newcommand{\see}[2]{\emph{see} #1} \newenvironment{theindex} {\begingroup\newcommand{\itemindent}{\raw{   }} \renewcommand{\item}{\raw{
}} \newcommand{\subitem}{\raw{
}\itemindent} \newcommand{\subsubitem}{\raw{
}\itemindent\itemindent}} {\par\endgroup} \def\parheader#1 {\medskip\noindent{\bf #1.}~~} %%% grammar support \newenvironment{grammar} {\begingroup \def\orbar{&\bar&} \def\nobar{&&} \def\longis{&$\longrightarrow$&} \begin{tabular}{lcl}} {\end{tabular}\endgroup} \def\bar{\raw{|}} \def\kplus{\raw{+}} \def\kstar{\raw{*}} \def\ang#1{\raw{<}#1\raw{>}} \def\mbox#1{#1} %%% hyperlink support \newcommand{\hyperlink}[3][]{\raw{}#3\raw{}}