%sw20imem {Memo: TCI special for inventions}{12pt}{tcimemo}
%Copyright (C) 1994-95 TCI Software Research
\typeout{TCI Document Style `sw20imem' <1 July 1994>.}
\typeout{NOTICE:  This macro file is NOT proprietary and may be 
freely copied and distributed.}
%
% User wanted a memo style option to set a footer on every page
% and a header on all but the first page. Here's how.
% Look carefully at the definitions of \ps@memo, \ps@memofirst, and
% \@do@memosubj
%
\def\ccname{cc: }%
\def\enclname{encl: }%
\def\pagename{Page: }%
%\def\headtoname{To:}%
%\def\headfromname{From:}%
\def\headdatename{Date:}%
%\def\headsubjname{Subject:}%
\def\PSname{P.S. }%
\def\headtoname{Inventor:}%
\def\headfromname{Assignee:}%
\def\headsubjname{Title:}%
%
\def\@memoalign{%
 \setbox\z@\vbox{%
  \halign{##\quad\hfil\cr
   \headtoname\cr\headfromname\cr%
   %\headdatename\cr%
   \headsubjname\cr
   }%
  }%
 \advance\hsize-\wd\z@\relax{\def\\{\cr&}\letparBL
  \def\crjot{\cr\ifdim\jot>\z@\noalign{\vskip\jot}\fi}%
  \halign{##\quad\hfil&\vtop{\parindent\z@##}\cr
   \ifx\@empty\the@memoto\else\headtoname&\the@memoto\crjot\fi
   \ifx\@empty\the@memofrom\else\headfromname&\the@memofrom\crjot\fi
%   \headdatename&\ifx\@empty\the@memodate\@date
%                 \else{\letparSP\the@memodate}\fi\crjot
   \ifx\@empty\the@memosubj\else
     \headsubjname&\the@memosubj\crjot Background:&\cr\fi
%   \ifdim\jot>\z@\noalign{\vskip-\jot}\fi
   }%
  }%
 }%
%
\def\ps@memo{%
 \def\@oddhead{\hfil\the@memosubj\hfil}%
 \def\@oddfoot{%\hfil Page Number \thepage\hfil
%%%%%%%%%%%
   \vtop{\hsize\textwidth\advance\hsize\marginpartotal\parfillskip
         \z@\parindent\z@\small
   \leavevmode
Witnessed and understood by: \hrulefill Date: \rule{1in}{.01in}\\
            \rule{0pt}{.33in}Inventor: \hrulefill Date: \rule{1in}{.4pt}\\
            \rule{0pt}{.167in}\hbox to \textwidth{\hfil\thepage\hfil}}%   
\par
%%%%%%%%%%
% \rulefoot{\rm Witnessed and understood by:\hrulefill Date:\rule{1in}{.01in}\\
%               \vskip .1in
%               Inventor:\hrulefill Date:\rule{1in}{.01in}\\
%               \thepage\hfil\ \\}%
%<your code here: like \rulefoot in tcibook.sty>
              }%
 \def\@evenhead{}%
 \def\@evenfoot{}%
 \@twosidefalse
 }%
\def\ps@memofirst{%
  \def\@oddhead{%
    \hbox to\hsize{\hfil\bf \uppercase{Invention Description}\hfil}%\vskip18pt
  }%
}%
%
\def\@do@memosubj{%
 \ifletteropen\else\letteropentrue
  \parindent\z@
  \parskip.5\normalbaselineskip
  \clearpage\thispagestyle{memofirst}%
  \@memohead
  \fi
 }%
%
\ps@memo
\def\@memohead{%
 \vbox{\@tempswafalse
  \ifx\@empty\the@memocompany\else\@tempswatrue\fi
  \ifx\@empty\the@memoname\else\@tempswatrue\fi
  \ifx\@empty\the@memodept\else\@tempswatrue\fi
  \if@tempswa
   \begin{center}\@tempswafalse

\ifx\@empty\the@memocompany
\else\if@tempswa\\\fi\@tempswatrue{\bf\letparBL\the@memocompany}\fi

\ifx\@empty\the@memoname
\else\if@tempswa\\\fi\@tempswatrue{\letparBL\the@memoname}\fi

\ifx\@empty\the@memodept
\else\if@tempswa\\\fi\@tempswatrue{\letparBL\the@memodept}\fi
    \end{center}%
   \fi
  \jot\p@
  \@memoalign
  }\nobreak\vskip24pt\raggedright
 }%

\trimwidth 8.5in  \trimheight 11in

%\topmargin  52pt 
\addtolength{\topmargin}{35pt}
\headheight 12pt  
\headsep    24pt
\footskip   .5in
\botmargin   1in

%\footheight 1in   
%\textwidth 468pt
\addtolength{\textwidth}{78pt}
%\settextheight    \centerpagemargin
\addtolength{\textheight}{50pt}
\addtolength{\oddsidemargin}{33pt}
\marginparwidth=.675\oddsidemargin
\marginparsep=.1\oddsidemargin

