%%      D.P. Huenemoerder, 12 Jan 94
%%   based on:
%%	M.R. Garcia, 30-July-91 for ASC memos
%%       (from CfA)
%%   but rapidly diverging...
%% 
%% dph 12jan93
%%   included asc_memo_in.tex
%%   included spacing adjustments (was cfa's memo_in.tex)
%%   added wrapper macro for head, To:, From:, Subject: fields.
%%   include commentary documentation on usage
%% to-do:  
%%         possibly include macro for cfa vs mit.

\typeout{mit-memo-logo.sty MEMO Style-option Version 0.9 12 Jan 94}

%% USAGE:  
%%  \documentstyle[mit-memo-logo]{article}
%%  \begin{document}
%%
%%  \memobasic{toname, toname\\ morenames}{fromname, etc}{subject}
%%
%%  \mcc{ccnames}       % if desired
%%  \mre{regarding}     % if desired
%%
%%  Memo body goes here.
%%
%%  These next items may go wherever you want them (above body, end of memo)
%%  \vfill
%%  \mcclist{cc1\\cc2\\etc}     % for distribution list, if needed
%%
%%  \vfil
%%  \mfile{filename}   % if desired
%%
%% \end{document}
%%

\input epsf

\newlength{\memomargin}
\newcounter{marginpt}
\newcounter{xpos1}
\newcounter{xpos2}
\newcounter{xpos3}

\setcounter{xpos1}{-36}
\setcounter{xpos2}{289}
\setcounter{xpos3}{159}
\addtocounter{xpos1}{-\value{marginpt}}
\addtocounter{xpos2}{-\value{marginpt}}
\addtocounter{xpos3}{-\value{marginpt}}
\setlength{\memomargin}{\value{marginpt}pt}
\setlength{\oddsidemargin}{\memomargin}
\setlength{\evensidemargin}{\memomargin}
\textwidth 6.5in
\addtolength{\textwidth}{-2.0\memomargin}
\addtolength{\topmargin}{-72pt}
\addtolength{\textheight}{72pt}


\font\ninept=cmr9 scaled 1200
\font\tenpt=cmr10 scaled 1200
\font\fourteenptbold=cmbx10 scaled 1728
\font\twelveptbold=cmbx10 scaled 1200

\newcommand{\csrlogo}[2]
  {\put (#1,#2) {\epsfxsize=1in\epsfbox{CSR.eps}}}


\newcommand{\mfile}[1]{     %% would be nice if treated as a footer on
			    %% 1st page.  Can get effect w/ \vfill,
			    %% but then need to put at right place in
			    %% text. 
\bigskip
\noindent\parbox[t]{72pt}{\footnotesize File:}
\begin{minipage}[t]{288pt}{\footnotesize\raggedright #1}\end{minipage}\par
}

\newcommand{\mto}[1]{
\smallskip
\noindent\parbox[t]{72pt}{\bf To:}
\begin{minipage}[t]{288pt}{\raggedright #1}\end{minipage}\par
}

\newcommand{\mfrom}[1]{
\smallskip
\noindent\parbox[t]{72pt}{\bf From:}
\begin{minipage}[t]{288pt}{\raggedright #1}\end{minipage}\par
}

\newcommand{\msubject}[1]{
\smallskip
\noindent\parbox[t]{72pt}{\bf Subject:}
\begin{minipage}[t]{288pt}{\raggedright #1}\end{minipage}\par
}

\newcommand{\mre}[1]{
\smallskip
\noindent\parbox[t]{72pt}{\bf Re:}
\begin{minipage}[t]{288pt}{\raggedright #1}\end{minipage}\par
}

\newcommand{\mcc}[1]{
\smallskip
\noindent\parbox[t]{72pt}{\bf Cc:}
\begin{minipage}[t]{288pt}{\raggedright #1}\end{minipage}\par
}
\newcommand{\mcclist}[1]{
\bigskip\bigskip
\noindent\parbox[t]{72pt}{\bf Cc:}
\begin{minipage}[t]{288pt}{\raggedright #1}\end{minipage}\par
}

\newcommand{\makememohead}[1]{
%%%%%%%%%% MIT Memorandum.
{\ninept
\begin{picture}(450,7)		% width and height of picture
\put (\value{xpos1},0) {\fourteenptbold }  

%%%%%%%%%%%%%%%%% make macros for next two lines: \cfa or \mit.
\put (\value{xpos2},-31) {\twelveptbold MIT}
\put (\value{xpos2},-43) {\twelveptbold Center for Space Research}       
\csrlogo{\value{xpos1}}{-43}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\put (\value{xpos2},0) {\twelveptbold MEMORANDUM}
\put (\value{xpos2},-72) {#1}
\end{picture}
\vspace{72 pt}\par
}

% and this suppresses the page number on the first page only
\thispagestyle{empty}
}
%%%%%


%%% put it all together:

\newcommand{\memobasic}[3]{    % \memobasic{to}{from}{subject}
  \makememohead{\today}
  \mto{#1}
  \mfrom{#2}
  \msubject{#3}
}


