%%% style options for generating course notes, etc.
%%%
%%% For use with the article document style. 
%%%

%%% Uses the following declarations: 
%%% 
%%% \course{...}
%%% \instructor{...}
%%% \date{...}
%%% \lecture{number} (for lectures)
%%% \readings{.....}
%%% \problemset{number} (for machine problems)
%%% \due{....}  (for machine problems)

%%% It also provides a \problem command for generating numbered problems.

%%% Created by Mitchell Wand, Mon May 18 10:10:23 1992
%%% Last modified Thu Oct  1 10:58:29 1992

%%% Sample use:

% \documentstyle [11pt,mysecs,course]{article}
% \title{Problem Set \#4\\Extending {\tt {sem1.s}}}
% \course{COM 3357}
% \instructor{Dr.~Wand}
% \date{May 18, 1992}
% \due{June 1, 1992}
% \pagestyle{plain}
% 
% \begin{document}
% 
% \maketitle
% 
% \problem
% Here is a sample problem.  It will be #1
% 
% \problem
% This will be problem #2
% 
% \end{document}
% 

%%% Note: since mysecs.sty and problemset.sty both redefines \maketitle,
%%% problemset.sty should be loaded AFTER mysecs.sty.  It is not necessary to
%%% use mysecs.sty.

\def\titlefont{\Large}

\def\@maketitle{\newpage
 \null
 \noindent\makebox[\textwidth]{\thecourse \hfill 
                               \ifduedate Out: \else\relax\fi
                               \@date}
 \makebox[\textwidth]{\theinstructor      
                      \hfill 
                      \ifreadings Readings: \@readings \else\relax\fi
                      \ifduedate  Due: \theduedate\else\relax\fi}
 \begin{center}
    {\titlefont\bf \iflecture Lecture \thelecture: \else\relax\fi 
               \ifproblemset Problem Set \themp: \else\relax\fi
               \@title}
 \end{center}
}

\newif\ifreadings \readingsfalse

\def\@readings{}
\def\readings#1{\def\@readings{#1}\readingstrue}

\def\thecourse{}
\def\course#1{\def\thecourse{#1}}

\def\theinstructor{}
\def\instructor#1{\def\theinstructor{#1}}

\newif\ifproblemset \problemsetfalse
\def\themp{}
\def\problemset#1{\def\themp{#1}\problemsettrue}

\newif\ifduedate \duedatefalse
\def\theduedate{}
\def\due#1{\def\theduedate{#1}\duedatetrue}

\newif\iflecture \lecturefalse
\def\thelecture{}
\def\lecture#1{\def\thelecture{#1}\lecturetrue}

\newcounter{problem}
\def\problem{\medskip\stepcounter{problem} {\bf \theproblem.}\ \ }

% add a little blank space between paras.  This makes the header look nicer,
% also 
\parskip = 0.75ex plus 0.25ex

%% compatibility
\def\sectionbegin#1\par{\section{#1}}


