%From: wenlin@eesun1.tamu.edu (Wenlin Hsieh )
%Date: 15 Dec 1994 15:19:53 GMT
%The following is a macro to be used to produce a frame at every pages.
%It works perfectly with LaTeX 2.09, but it won't work as I attach it
%to a class file of LaTeX2e. Can some wizards out there tell me why?
%How to modify it to fit into LaTeX2e environment? If possible, please 
%email your reply. Thanks in advance!!
%Wen-Lin Hsieh
%wenlin@eesun1.tamu.edu%
%
%%%   macro starts
\newdimen\topdist \topdist 4pt
\newdimen\rightdist \rightdist .23in
\newdimen\marsepsize \marsepsize 8pt
\newdimen\theight \theight 8.5in
\newdimen\twidth \twidth 6.0in
\newdimen\botdist \botdist 6pt
\newdimen\extraspace \extraspace 0pt
\newdimen\extradim \extradim 0pt

\def\@outputpage{\begingroup\catcode`\ =10 
    \extradim \extraspace
     \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{\normalsize \baselineskip\z@ \lineskip\z@ 
           \let\par\@@par %% 15 Sep 87
           \vskip \topdist \moveright \rightdist 
           \vbox{\hrule\hbox{\vrule\kern 1.03\marsepsize\vbox{\vskip\topmargin
		\setbox\@tempboxa
                   \vbox to\headheight{\vfil \hbox to\twidth
                                       {\let\label\@gobble \let\index\@gobble
                                         \@thehead}} %% 22 Feb 87
                 \dp\@tempboxa\z@
                 \box\@tempboxa
                 \vskip 0.84\headsep
                 \box\@outputbox
                 \baselineskip \footskip
                 \hbox to\textwidth{\let\label\@gobble 
                           \let\index\@gobble  %% 22 Feb 87
                           \@thefoot}\kern -\botdist \kern-\extradim}
                \kern 1.1\marsepsize\vrule} 
                \hrule}}\global\@colht\theight
           \endgroup\stepcounter{page}\let\firstmark\botmark}
%%%   macro ends


