% BIIHEAD.STY  If this is included after \documentstyle{report}, it adds
% an underlined heading style to the LaTeX report style.
% \pagestyle{biiheadings} will put underlined headings at the top
% of each page. The right page headings are the Chapter titles and
% the left page titles are supplied by \def\lefthead{text}.

% Ted Shapin, Dec. 17, 1986

\makeatletter
\def\ps@biiheadings{\let\@mkboth\markboth
\def\@oddhead{\protect\makebox[0pt][l]{\protect\underline
            {\protect\makebox[\textwidth][l]{\small\sf\rightmark}}}}
\def\@oddfoot{\protect\makebox[\textwidth]{\hrulefill\ {\sf\bottomark}}}
\def\@evenhead{\protect\makebox[0pt][l]{\protect\underline
             {\protect\makebox[\textwidth][l]
             {\small\sf\lefthead}}}}
\def\lefthead{}
\def\chaptermark##1{\markright {\uppercase{%
\@chapapp\ \thechapter.\ ##1}}}
\def\@evenfoot{\@oddhead}\def\sectionmark##1{}\def\subsectionmark##1{}}
\def\@maketitle{\vbox to 2.5in{\hsize\textwidth
                       \linewidth\hsize \vfil \centering
                       {\LARGE \@title \par}
               \vfil}}

\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Draw a box around text %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\boxitout#1{\vbox{\hrule height1.5pt\hbox{\vrule width1.5pt\kern6pt
      \vbox{\kern6pt#1\kern6pt}\kern6pt\vrule width1.5pt}\hrule height1.5pt}}
\def\boxit#1{\vbox{\hrule height.5pt\hbox{\vrule width.5pt
      \vbox{#1}\kern-.1cm\vrule width.5pt}\hrule height.5pt}}

\newcommand{\widen}[1]{%
\newlength{\widening}\setlength{\widening}{#1}
\addtolength{\oddsidemargin}{-.5\widening}
\addtolength{\evensidemargin}{-.5\widening}
\addtolength{\textwidth}{\widening}
}

\newcommand{\lengthen}[1]{%
\newlength{\lengthening}\setlength{\lengthening}{#1}
\addtolength{\topmargin}{-.4\lengthening}
\addtolength{\textheight}{\lengthening}
}