% draftnote.sty:  taken from lcustom.tex, and modified
% for use as its own style option input file instead of as
% a \ds@draftnote.
%
% To do own headings, add before begin document
%
%\def\draftstring{Reprint}
%\def\draftext{\hfil 1991 International Conference on Parallel Processing\hfil}
%\pagestyle{plain}
%

\xdef\today{%
    \ifcase\month
	\number\month\or
	January\or February\or March\or April\or May\or June\or
	July\or August\or September\or October\or November\or December\else
	\number\month\fi
    \space\number\day, {\noexpand\mit\number\year}%
}

%%I added this stuff so that we could have timed drafts. -rpg
\newcount\@hour \newcount\@min
\@hour=\time
\global\divide\@hour 60
{\let\zzzz=\@hour \multiply\zzzz 60
 \@min=\time
 \global\advance\@min -\zzzz}
\gdef\now{~\number\@hour:\ifnum\@min=0 \mbox{00}%
		        \else\ifnum\@min<10\mbox{0\number\@min}%
			\else\mbox{\number\@min}\fi\fi}

\newif\ifdraft	\draftfalse

\def\draftstring{{\ifdraft \tt Draft\fi}}
\def\versiontag{}
\def\draftext{%
    \ifdraft
	\begingroup
	    \tt
%	    \ifodd\c@page
%		\LaTeX\ set \today\ with \fmtname\ v\fmtversion
%	    \else
%		Draft \versiontag\ of \versiondate
%	    \fi
		Draft \versiontag : \today \now
	\endgroup
    \fi
}

%\def\ds@draftnote{%
    \drafttrue
    \@ifundefined{ds@draft}{}{\ds@draft}%
    \def\ps@plain{%
	\let\@mkboth=\@gobbletwo
	\def\@oddhead{\draftext\hfil}%
	\def\@oddfoot{\draftstring\hfil\rm\thepage\hfil\draftstring}%
	\def\@evenhead{\hfil\draftext}%
	\let\@evenfoot=\@oddfoot
    }%
    \let\ps@@headings=\ps@headings
    \def\ps@headings{%
	\ps@@headings
	\def\@oddfoot{\draftext\hfil}%
	\def\@evenfoot{\hfil\draftext}%
     }%
%}
% pagestyle plain to start with.
\pagestyle{plain}

% \pagestyle{reprint} similar to plain page style in draft mode

\let\reprintext=\draftext
\let\reprintstring=\draftstring

\def\ps@reprint{%
    \def\draftext{%
	\ifdraft
	    \begingroup
		\tt
		\ifodd\c@page
		    \LaTeX set \today
		\else
		    Draft \versiontag/
		\fi
	    \endgroup
	\fi
    }%
    \def\@oddhead{\reprintext\hfil\draftext}%
    \def\@oddfoot{\reprintstring\hfil\rm\thepage}%
    \def\@evenhead{\draftext\hfil\reprintext}%
    \def\@evenfoot{\rm\thepage\hfil\reprintstring}%
}


\def\note#1{\ifdraft\marginpar{\tolerance 100000\small\it#1}\fi}
