% CMU note style modification of title
% This was Juan Leon's my-design-doc.sty. I snarfed it, changed "CS Dept"
%   to "School of CS", rearranged the code, added some comments,
%   and renamed it cmu-note.sty. I also renamed the logo file from
%   cmulogo.PS to cmulogo1.ps. There is already a cmulogo.ps which
%   the official postscript CMU logo from campus printing. It has
%   a hollow square instead of a shaded square. The shaded-square logo
%   is now named cmulogo1.ps.
%
% To use this, you should have the companion postscript file cmulogo1.ps
% somewhere latex can find it. If you can't do it, then just say \nologo
% and you'll get logo-less alternative.

% This is useful for a little paper or note you're writing that isn't
% a T.R. or a conference submission, just a paper. Maybe an early draft.
% Something to hand out to your friends for comments. That kind of thing.
% An example is the three "Scheme Flow-Analysis Working Notes" I wrote
% that later got folded into my dissertation.
%	-Olin

\typeout{CMU Note style option -- 4 June 1990}

\newcount\notenumber
\newif\if@logo \@logotrue

%
% Here are the basic parameters and their defaults
% Note that \author, \title, and \date still work, too.
% To get the time in the date, try \date{\Time, \today}
%
\def\notenum#1{\notenumber=#1}
\def\project#1{\def\@project{#1}}
\def\dept#1{\def\@dept{#1}}
\def\@project{Ergo Project}
\def\@dept{School of Computer Science}
\def\@note{Note}
\def\@univ{Carnegie Mellon University} % Used for logo-less style.

%
% The following "Time" macro will return the current (24 hour) time.
%
\def\Time{{\count1=\time \count2=\count1 \divide\count1 by 60
\the\count1 :\multiply \count1 by 60 \advance\count2 by -\count1
\count1=\count2 \divide\count1 by 10 \the\count1
\multiply \count1 by 10 \advance\count2 by -\count1 \the\count2}}

\def\@logofile{/afs/cs.cmu.edu/user/shivers/lib/tex/cmulogo1.ps}
\def\nologo{\@logofalse}

\def\@maketitle{\newpage \null \vskip 4em
	\if@logo \hbox to
		\textwidth{\special{psfile=\@logofile} \hfill
			   {\Large {\bf \@dept}} \hfill\hbox to 0pt{}}
	\else \hbox to \textwidth{\hfill {\LARGE {\bf \@univ}}
				  \hfill}
	      \vskip.5em \hbox to \textwidth{\hfill {\Large {\bf \@dept}}
	      \hfill}
	\fi
	\vskip 1.5em \hbox to \textwidth{\@project\ \@note\ \the\notenumber
					 \hfill \@date}
	\vskip 1em \hrule \begin{center} {\LARGE \@title \par} \vskip
	.5em {\lineskip .5em
		\begin{tabular}[t]{c} {\em \@author} \end{tabular}\par}
	\vskip 1em \end{center} \par \vskip 1.5em}
