% BRETT PRESNELL (presnell@stat.ufl.edu).
%
% 27/6/94 ------------------------------------------------------------
% This new version requires LaTeX2e and the PSNFSS package.
% Documentation needs to be changed to reflect new realities.
% --------------------------------------------------------------------
%
% This is the main driver file for the uf-letter styles with wordmark.
% The individual department or personal styles should set leftaddress
% and rightaddress appropriately and then input this file.  See the file
% statltr.sty for an example departmental style file.
%
% This style assumes that you are using Rokicki's dvips to print dvi
% files on a PostScript printer, which is the way almost everyone on
% the planet does it.  It also assumes that you have the new font
% selection scheme for LaTeX installed.  This is probably a more
% restrictive assumption until LaTeX 3 is released, at which time the NFSS
% will be built in to everyone's LaTeX.  It's already built into
% AMS-LaTeX.  You should be using it now.
% PUT A COMMENT HERE ABOUT HOW TO OBTAIN THE NFSS.
%
% This is surely not the best TeX hacking ever, so you're welcome to
% address suggestions, comments, or proposed changes to me. This was done
% in the early months of 1993 between lots of other work.
% 
% Change the default margins
%
\oddsidemargin   0truein
\evensidemargin  0truein
\textwidth 6.5truein
\topmargin 0truein
\headheight 0pt
\headsep 0pt
%\topskip 10pt     %Do I need to fool with this?
\textheight 9.0truein
%\advance\textheight by -\headheight   %To fix up textheight in case
%\advance\textheight by -\headsep      %I change head height and sep

\def\phone#1{\def\ph@ne{#1}}
\phone{(352) 644-3218}
\def\emailaddress{}
\def\email#1{\def\emailaddress{{\tensl\ email: \tentt #1}}}

\def\ps@firstpage{\def\@oddhead{}\def\@oddfoot{}%
\def\evenhead{}\def\evenfoot{}}

% Taken from letter.sty and modified.  Lots of add-ons.
%
\longindentation=.5\textwidth
\indentedwidth=\textwidth
\advance\indentedwidth -\longindentation
%
%    ****************************************
%    *            PAGE STYLES               *
%    ****************************************
%
% The letter style sets \@texttop to \vskip 0pt plus .00006fil on
% the first page of a letter, which centers a short letter on the page.
% This fil value may have to be changed for other letterheads.
%
%\def\@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
\def\@texttop{}

\def\ps@firstpage{\def\@oddhead{}\def\@oddfoot{%
    \fontsize{7}{9pt}\usefont{OT1}{ppl}{m}{n}%
    \raisebox{-27\p@}[\z@]{\hbox to \textwidth{%
    \hfill An Equal Opportunity/Affirmative Action Institution \hfill}}\hss}%
\def\@evenhead{}\def\@evenfoot{}}

% Fix up the definition of opening to accomodate the letterhead.
% There must be a better way to do all of this.
%
% First define a function to save the headaddr box and it's dimensions,
% and calculate the amount of space needed to accomodate the letterhead.
% This will be called from within \opening.
%
\def\mkltrhdbox{%
  {%Head matter in palatino, 10 pt with 12pt leading
    \fontsize{10}{12pt}\usefont{OT1}{ppl}{m}{n}%
    \global\newbox\headaddr            %Need to save ht and dp of box
    \global\setbox\headaddr\hbox to 43.5truepc{%
      \begin{tabular}[t]{@{}l@{}}\ignorespaces
        \fromleftaddress
      \end{tabular}
      \hfill
      \begin{tabular}[t]{@{}r@{}}\ignorespaces
        \fromrightaddress
      \end{tabular}%
      }
    }
  \global\newdimen\ltrhdskip        %to hold total space to skip (anal)
  \global\ltrhdskip=-1truein        %back up to top of page
  \global\advance\ltrhdskip by 7truepc     %skip to bottom of wordmark
  \global\advance\ltrhdskip by 1truepc     %then to
  \global\advance\ltrhdskip by 0.5truept   %bottom of rule
  \global\advance\ltrhdskip by 1truepc     %then to top of headaddr
  \global\advance\ltrhdskip by -2.0truept  %correct for leading
  \global\advance\ltrhdskip by\ht\headaddr  %then to bottom
  \global\advance\ltrhdskip by\dp\headaddr  %of return address material
  }
%
% Now let opening make the box and skip the appropriate amount of space
% on the first page.  The box is actually output in the output routine
% material contained in the mods below to latex.tex.
%
\def\opening#1{\mkltrhdbox%
  \ifx\@empty\fromaddress
  \thispagestyle{firstpage}%
  \leavevmode                    %need this so the skips aren't absorbed
  \vskip1\ltrhdskip%             %these skips are the only change
  {\raggedleft\@date\par}%
  \else
  \thispagestyle{empty}%
  \leavevmode                    %need this so the skips aren't absorbed
  \vskip1\ltrhdskip%             %these skips are the only change
  {\raggedleft\begin{tabular}{l}\ignorespaces
    \fromaddress \\*[2\parskip]%
    \@date \end{tabular}\par}%
  \fi
  \vspace{2\parskip}%
  {\raggedright \toname \\ \toaddress \par}%
  \vspace{2\parskip}%
  \noindent#1\par\nobreak
  }

\long\def\closing#1{\par\nobreak\vspace{\parskip}%
  \stopbreaks%
  \noindent%
  \hspace*{\longindentation}%
  \parbox{\indentedwidth}{\raggedright%
       \ignorespaces #1\\[6\medskipamount]%% changed 20 Jan 88
       \ifx\@empty\fromsig%
           \fromname%
       \else \fromsig \fi\strut}%
   \par}

\def\ps{\par\noindent\startbreaks}  %prevent indentation of P.S.

%
% end of change in letter.sty


%
% Mods to stuff from latex.tex.
%
\def\@outputpage{\begingroup\catcode`\ =10 \let\-\@dischyph \let\'\@acci
  \let\`\@accii \let\=\@acciii \if@specialpage
  \global\@specialpagefalse\@nameuse{ps@\@specialstyle}\fi \if@twoside
  \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
  \let\@themargin\oddsidemargin \else \let\@thehead\@evenhead
  \let\@thefoot\@evenfoot \let\@themargin\evensidemargin \fi\fi \shipout
     \vbox{\reset@font %% RmS 91/08/15
       \normalsize \baselineskip\z@ \lineskip\z@
       \let\par\@@par %% 15 Sep 87
       % This portion is inserted 93/2/11
       {\ifnum\c@page=1
         \moveleft2.25truepc\vbox to 0pt{%
           \vskip-1truein%
           \vskip 44 truept
%           \epsfxsize=14truepc
%           \epsfysize=3.4167truepc   %scale y same as x
           \epsffile{letterhdwm.eps}
%\vskip3.4548803truepc
           \vskip -4.0truept   % correct for extension of seal below
           \vskip 1.0truepc    % wordmark before skipping 1 pica
           \hrule width43.5truepc height0.0truept depth0.5truept
           \vskip 1.0truepc
           \vskip -2.0truept   % correct for leading
           \box\headaddr                       %Then print the addr box
           \vss
           }
         \fi}
       % End of insertion
       \vskip \topmargin \moveright\@themargin \vbox{\setbox\@tempboxa
         \vbox to\headheight{\vfil \hbox to\textwidth
           {\let\label\@gobble \let\index\@gobble
             \let\glossary\@gobble %% 21 Jun 91
             \@thehead}}% %% 22 Feb 87
         \dp\@tempboxa\z@ \box\@tempboxa \vskip \headsep \box\@outputbox
         \baselineskip\footskip \hbox to\textwidth{\let\label\@gobble
           \let\index\@gobble  %% 22 Feb 87
           \let\glossary\@gobble %% 21 Jun 91
           \@thefoot}}}\global\@colht\textheight
     \endgroup\stepcounter{page}\let\firstmark\botmark} %

% End of stuff from latex.tex

\endinput
