% bra.sty --- style file for BRA workshop proceedings May 1991
% a4.sty
% Easily Modifiable a4 page layout. Use this instead of a4 document substyle.
% Provides the macros:
%
%   \setleftmargin{left margin}{rightward shift on odd pages}
%   \setrightmargin{right margin}{leftward shift on even pages}
%   \setheadmargin{top margin}{header height}{header separation}
%   \setfootmargin{bottom margin}{footer height}{footer separation}
%   \setmarginnote{margin note width}{margin note separation}
% 
% Defaults to same size as old a4.sty
%
% AJCD, 5/12/89
% AJCD  2/2/90  Changed default size to [a4,fullpage] (1" margins all round)
% AJCD  22/2/91  Changed default size original a4.sty
%
% ccmj 28/5/91 Changed for use in producing BRA workshop proceedings

\typeout{bra.sty 28/5/91}

\newlength{\p@perwidth}
\setlength{\p@perwidth}{21 true cm}     % a4 paper width
\newlength{\p@perlength}
\setlength{\p@perlength}{29.7 true cm}  % a4 paper height

\setlength{\voffset}{0 true in}        % shift origin to paper corner
\setlength{\hoffset}{0 true in}

% pick up point size of current font
% these parameters are not changed by the macros below
\newlength{\mainsize}
\setlength{\mainsize}{1\@ptsize pt}
\setlength{\topskip}{\mainsize}	% plain has 10pt
\setlength{\maxdepth}{.4\mainsize}	% plain has 4pt
\setlength{\@maxdepth}{\maxdepth}	% this has to be set as well

\newlength{\leftsidemargin}
\newlength{\leftsideshift}
\newlength{\rightsidemargin}
\newlength{\rightsideshift}
\newlength{\headsidemargin}
\newlength{\footsidemargin}

\let\resetmargins\relax

\def\setleftmargin#1#2{% set left printer margin and odd page shift
  \setlength{\leftsidemargin}{#1}%
  \setlength{\leftsideshift}{#2}%
  \resetmargins
}
\setleftmargin{1 true in}{0 true in}

\def\setrightmargin#1#2{% set right printer margin and even page shift
  \setlength{\rightsidemargin}{#1}%
  \setlength{\rightsideshift}{#2}%
  \resetmargins
}
\setrightmargin{1 true in}{0 in}

\def\setheadmargin#1#2#3{% set head printer margin, size, and separation
  \setlength{\headsidemargin}{#1}%
  \setlength{\headheight}{#2}%
  \setlength{\headsep}{#3}%
  \resetmargins
}
\setheadmargin{1 true in}{\mainsize}{2\mainsize}

\def\setfootmargin#1#2#3{% set foot printer margin, size, and separation
  \setlength{\footsidemargin}{#1}%
  \setlength{\footheight}{#2}%
  \setlength{\footskip}{#3}%
  \addtolength{\footskip}{\footheight}%
  \resetmargins
}
\setfootmargin{1 true in}{\mainsize}{1.5\mainsize}

\def\setmarginnote#1#2{% set marginal note width and separation
  \setlength{\marginparwidth}{#1}%
  \setlength{\marginparsep}{#2}%
  \resetmargins
}
%\setmarginnote{62 pt}{10pt}
\setmarginnote{0 true pt}{0 true pt}

\def\resetmargins{% reset textheight and length from parameters
  \setlength{\oddsidemargin}{\leftsidemargin}%
  \addtolength{\oddsidemargin}{-1 true in}%
  \addtolength{\oddsidemargin}{\leftsideshift}%
  \setlength{\evensidemargin}{\oddsidemargin}%
  \addtolength{\evensidemargin}{-\rightsideshift}%
  \setlength{\textwidth}{\p@perwidth}% start at full width
  \addtolength{\textwidth}{-\leftsidemargin}%
  \addtolength{\textwidth}{-\leftsideshift}%
  \addtolength{\textwidth}{-\marginparwidth}%
  \addtolength{\textwidth}{-\marginparsep}%
  \addtolength{\textwidth}{-\rightsidemargin}%
  \setlength{\topmargin}{\headsidemargin}%
  \addtolength{\topmargin}{-1 true in}%
  \setlength{\textheight}{\p@perlength}% start at full height
  \addtolength{\textheight}{-\headsidemargin}%
  \addtolength{\textheight}{-\headheight}%
  \addtolength{\textheight}{-\headsep}%
  \addtolength{\textheight}{-\footskip}%
  \addtolength{\textheight}{-\footsidemargin}%
}
\resetmargins

% Definition of \placetitle
% Want to do an alternative which takes arguments
% for the names, authors etc. 

\makeatletter
\def\placetitle#1#2#3{\par
 \begingroup
 \def\thefootnote{\fnsymbol{footnote}}
 \def\@makefnmark{\hbox 
 to 0pt{$^{\@thefnmark}$\hss}} 
 \newpage
 \global\@topnum\z@ \@maketitle{#1}{#2}{#3} \thispagestyle{plain}\@thanks
 \endgroup
 \setcounter{footnote}{0}
 \let\maketitle\relax
 \let\@maketitle\relax
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
\def\@maketitle#1#2#3{\newpage
 \null
 \vskip 2em \begin{center}
 {\LARGE #1 \par} \vskip 1.5em {\large \lineskip .5em
\begin{tabular}[t]{c}#2
 \end{tabular}\par} 
 \vskip 1em {\large #3} \end{center}
 \par
 \vskip 1.5em} 
\makeatother


%  Example of use of \placetitle
%  \placetitle{Constructing Completions in Lego (title of paper)}
%       {Claire Jones\thanks{ccmj@lfcs.ed.ac.uk}\\
%   University of Edinburgh \and
%   A. N. Other\thanks{ano@somewhere}\\ Nonesuch University}
%  {June 1991}
% Notes: You can put a line break in a long title with \\
%   also use \\ to indicate new lines in the address.
%   If you have two authors at the same address, just put
%  e.g. Claire Jones \hspace{0.3in} Ann Other \\ Nonesuch University
%  You must give a date, please don't use \today
%
%  In brief, syntax is \placetitle{TITLE}{AUTHOR1[\thanks{FOOTNOTE}] \\
%  ADDRESS1 [\and AUTHOR2\\ ADDRESS2 ... ]}{DATE}
%
