%%% lfcs-rep.sty
%%% Style for LFCS technotes [a4,12pt,twoside]{report}
%%% AJCD 21/1/91
%%% Designed to be printed 2up,duplex (a5 paper, mag=700)
\typeout{lfcs-rep.sty 21/1/91 -- for printing 2up;
         use `dvibook' to arrange pages}

\def\ds@titlepage{\global\let\ds@titlepage\relax}

%%% select 12pt,twoside regardless (by tacking onto parameter list)
\expandafter\ifx\csname z@\@optionlist\endcsname\z@
  \gdef\@optionlist{12pt,twoside}
\else
  \xdef\@optionlist{\@optionlist,12pt,twoside}
\fi

%%% input original report style
\input report.sty

%\ifx\ds@titlepage\relax % always
 % make a titlepage: adapted from titlepage.sty
 \def\maketitle{\begin{titlepage}
  \let\footnotesize\small \let\footnoterule\relax \c@page\m@ne
  \null\vfil
  \vskip 60pt \begin{center}\leavevmode
   {\LARGE\@title\par}\vskip 3em
   {\large \lineskip.75em
   \begin{tabular}[t]{c}\@author
   \end{tabular}\par}\vskip 1.5em
   {\large\@date\par}%
  \end{center}\par
  \@thanks
  \vfil\null
  \end{titlepage}% end of actual title page
  \c@footnote\z@ \let\thanks\relax
  \begin{titlepage}\null\end{titlepage}% blank title page for book format
  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\maketitle\relax}
 \def\abstractname{Abstract}
 \def\abstract{\titlepage \c@page\m@ne
  \null\vfil
  \begin{center}\leavevmode\bf\abstractname\end{center}}
 \def\endabstract{\par\vfil\null\endtitlepage
  \begin{titlepage}\null\end{titlepage}} % extra blank page
 \toks0=\expandafter{\enddocument}
 \edef\enddocument{% insert two blank pages at end
  \noexpand\begin{titlepage}\null\noexpand\end{titlepage}% blank pages
  \noexpand\begin{titlepage}\null\noexpand\end{titlepage}% blank pages
  \the\toks0}
% \fi % always

% reset magnification factor
%\mag=700

% copied and modified from a4.sty
% set up LaTeX parameters for A4 paper (21 x 29.7 cm).
\setlength{\voffset}{-1 true in}        % shift origin to paper corner
\setlength{\hoffset}{-1 true in}

% pick up point size of current font
\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

% A5 paper width = 21
\setlength{\textwidth}{21 true cm}		% A4 paper width
\addtolength{\textwidth}{-2.14 true in}		% allow for margins
\setlength{\marginparsep}{0pt}			% 10pt from text
\setlength{\marginparwidth}{0pt}                % margin width
%\addtolength{\marginparwidth}{0pt}		% not too close to edge
%\addtolength{\marginparwidth}{-\marginparsep}	% or to text
\setlength{\oddsidemargin}{.81 true in}
\setlength{\evensidemargin}{1.33 true in}

% set headers and footers proportional to font size
\setlength{\headheight}{\mainsize}	% height of heading
\setlength{\headsep}{2\mainsize}	% space between heading and text
\setlength{\topmargin}{1.07 true in}	% space at top
\addtolength{\topmargin}{-3\mainsize}	% space at top
\setlength{\footheight}{\mainsize}	% height of footing
\setlength{\footskip}{2.5\mainsize}	% space between footing and text

% compute space left for text
\setlength{\textheight}{29.7 true cm}		% A5 paper length
\addtolength{\textheight}{-2.14 true in}	% margins at top and bottom
%\addtolength{\textheight}{-6.5\mainsize}	% margins include head and foot
