% Plymouth Polytechnic Computing Service - HANDOUT Document style
% Jon Warbrick January 1988

% Copyright (C) Jon Warbrick and Plymouth Polytechnic 1989
% Permission is granted to reproduce the document in any way providing
% that it is distributed for free, except for any reasonable charges for
% printing, distribution, staff time, etc.  Direct commercial
% exploitation is not permitted.  Extracts may be made from this
% document providing an acknolwledgment of the original source is
% maintained.

% This option re-defines the \maketitle command to generate a standard
% Computing Service handout banner.  It currently only works for an
% 11pt article (though I may fix it oneday)

% Just modify the textwidth a bit to center the text on the page

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}

% The title is made up of information supplied by the \title, \author
% and \date commands, along with an extra command \docnumber. The
% date defaults to the current month and year.

\def\docnumber#1{\gdef\@docnumber{#1}}
\gdef\@docnumber{X99.99--999}
\gdef\@title{There and Back Again}
\gdef\@author{Bilbo Baggins}
\def\@date{\ifcase\month\or January\or February\or March\or April\or
           May\or June\or July\or August\or September\or October\or
           November\or December\fi\space\number\year}

\def\maketitle{
  \begin{picture}(0,100)(55,-8)
  \put(0,36){\framebox(214,84){Computing Service Logo}} % dummy logo
% \put(0,120){\special{include TeX>inputs>hologo.ps}}
  \put(234,112){\parbox[t]{234pt}{\centering\Large\bf\@title}}
  \put(234,60){\parbox[t]{234pt}{\centering
    \@docnumber \\\relax \@date \\[1em] \@author}}
  \put(0,0){\line(1,0){468}}
  \end{picture}
  \let\maketitle\relax
  \gdef\@author{}\gdef\@title{}\gdef\@docnumber{}\gdef\@date{}
}

% Technical documents don't look very good with indented paragraphs,
% so set parindent to zero, and increse parskip.  To do this job properly,
% the space above and below all of the list making enviroments should be
% reduced by this ammount as well - again I may do this someday.

\setlength{\parindent}{0pt}
\setlength{\parskip}{7pt plus 2pt minus 1pt}

% Some extra help with including examples of computer input/output is rather
% handy.  Here is a definition of the alltt enviroment (like verbatim, but
% still recognises \, { and }) and example (like alltt, but indented)

\def\docspecials{\do\ \do\$\do\&%
  \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}

\def\alltt{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
\leftskip\@totalleftmargin\rightskip\z@
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
\obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \docspecials
 \frenchspacing\@vobeyspaces}

\let\endalltt=\endtrivlist

\newenvironment{example}%
  {\nopagebreak[3]\begin{quote}\begin{alltt}}%
  {\end{alltt}\end{quote}}

\endinput
