%Latex file manual.tex 17/1/95.
%Latest version for V2.4, 22/12/98.
%The style and layout was copied from the GAP manual.
\documentstyle{report}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  The following commands intructs {\LaTeX} to stuff more on each  page  and
%%  to move each page towards to outer border.
%%
\topmargin -20mm
\textheight 24cm
\oddsidemargin  0cm
\evensidemargin  0cm
\textwidth 14cm


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  The following commands instruct  {\LaTeX}  to  separate the paragraphs in
%%  this manual with a small space
%%
\parskip 1.0ex plus 0.5ex minus 0.5ex
\parindent 0pt


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  'text'
%%
%%  'text' prints the text in  monospaced  typewriter  font.
%%  The text may contain all the usual characters  and |<name>| placeholders.
%%  |\'| can be used to enter a single  quote  character  into  the  text.
%%
\catcode`\'=13 \gdef'#1'{{\tt #1}}
\gdef\'{\char`'}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  <text>
%%
%%  <text> prints  the text in  an italics font.
%%  The  text should not contain any special characters.  |\<| can be used to
%%  enter a less than character into the text.
%%
\catcode`\<=13 \gdef<#1>{{\it #1\/}}
\gdef\<{\char`<}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  *text*
%%
%%  *text*  prints the text  in boldface font.
%%  The text may contain all  the usual characters.
%%  |\*| can be used to enter a star into the text.
%%
\catcode`\*=13 \gdef*#1*{{\bf #1}}
\gdef\*{\char`*}
\gdef\^{\char`^}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  |text|
%%
%%  |text| prints the text between the two  pipe  symbols in typewriter style
%%  obeying the   linebreaks and spaces  in  the   manual.
%%  It should be used to  enter lengthy examples  into the text.
%%  If the hash character '\#' appears in the example the text between it
%%  and  the end of the line  is set in  ordinary mode,
%%  i.e., in  roman   font with  all the  possibilities ordinary available.
%%  |\|'\|' can be used to  enter  a  pipe symbol into the text.
%%
\catcode`\@=11

{\catcode`\ =\active\gdef\xvobeyspaces{\catcode`\ \active\let \xobeysp}}
\def\xobeysp{\leavevmode{} }

\catcode`\|=13
\gdef|{\leavevmode{}\hbox{}\begingroup
\def|{\endgroup}%
\catcode`\\=12\catcode`\{=12\catcode`\}=12\catcode`\$=12\catcode`\&=13
\catcode`\#=13\catcode`\^=12\catcode`\_=12\catcode`\ =12\catcode`\%=12
\catcode`\~=12\catcode`\'=12\catcode`\<=12\catcode`\"=12\catcode`\|=13
\catcode`\*=12\catcode`\:=12
\leftskip\@totalleftmargin\rightskip\z@
\parindent\z@\parfillskip\@flushglue\parskip\z@
\@tempswafalse\def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}%
\tt\obeylines\frenchspacing\xvobeyspaces\samepage}

\catcode`\@=12

{\catcode`\#=13
\gdef#{\begingroup
\catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\$=3 \catcode`\&=4
\catcode`\#=6 \catcode`\^=7 \catcode`\_=8 \catcode`\ =10\catcode`\%=14
\catcode`\~=13\catcode`\'=13\catcode`\<=13\catcode`\"=13\catcode`\|=13
\catcode`\*=13\catcode`\:=13
\catcode`\^^M=12 \Comment}}
{\catcode`\^^M=12
\gdef\Comment#1^^M{\rm \# #1 \endgroup \Newline}}
{\obeylines
\gdef\Newline{
}}

{\catcode`\&=13
\gdef&{\#}}

\gdef\|{\char`|}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  <item>: <text>
%%
%%  This formats the  paragraph  <text>, i.e.,  everything between  the colon
%%  '\:' and the next  empty  line, indented 1 cm to the right in the manual.
%%  This
%%  convention should be  used to format  a list or an enumeration.    <item>
%%  should be  a single  word  or a short phrase.  It  may contain  all usual
%%  characters and the usual formatting stuff.  <text> is a  normal paragraph
%%  and may contain everything.   \:  can be used  to enter a colon character
%%  into the text.  As  an example consider the  following description.  This
%%  will print quite similar in the printed manual.
%%
%%      A group is represented by a record that must have the components
%%
%%      'generators': \\
%%              a list of group elements that  generate  the  group  that  is
%%              given by the group record.
%%
%%      'identity': \\
%%              the identity element of the group that is given by the  group
%%              record.
%%
\catcode`\:=13
\gdef:{\hangafter=1\hangindent=1cm\hspace{1cm}{}}
\gdef\:{\char`:}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  "reference"
%%
%%  "reference" prints the  number of the  chapter or section  in the printed
%%  manual and is  displayed unchanged  in the  on-screen  documentation.  It
%%  should be used when referring to other  chapters or  sections.   The text
%%  should  not contain any special characters.  \"  can be  used  to enter a
%%  double quote into the text.
%%
\catcode`\"=13 \gdef"#1"{\ref{#1}}

\gdef\"{\char`"}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  \GAP
%%
%%  \GAP can be used to enter the *sans serif* GAP logo  into  the  text.  If
%%  this is followed by spaces it should be enclosed in curly  braces  as  in
%%  |{\GAP}| is wonderfull.
%%
\newcommand{\GAP}{{\sf GAP}}
\newcommand{\KBMAG}{{\sf KBMAG}}
\newcommand{\rkbp}{{\sf rkbp}}
\newcommand{\Automata}{{\sf Automata}}
\newcommand{\Automate}{{\sf Automate}}
\newcommand{\Grail}{{\sf Grail}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  \Chapter{<name>}
%%  \Section{<name>}
%%
%%  |\Chapter| and |\Section| begin a  new  chapter  or  section.  They  work
%%  basically like the ordinary |\chapter| and |\section| macros except  that
%%  they also create a label for <name>
%%
\catcode`\@=11 \catcode`\%=12 \catcode`\~=14

\newcommand{\Chapter}[1]{{\chapter{#1}~
\label{#1}}}

\newcommand{\Section}[1]{{\pagebreak[3]\section{#1}~
\label{#1}}}

\catcode`\@=12 \catcode`\%=14 \catcode`\~=13

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  make the title page
%%
\begin{document}

\title{KBMAG \\
Knuth--Bendix in Monoids, and Automatic Groups \\
Version 2.4}
\author{
Derek Holt \\
Mathematics Institute, University of Warwick, Coventry CV4 7AL, UK }
\date{22 December 1998}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  include the preface
%%
%\include{preface}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  make the table of contents
%%
\tableofcontents


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  and now the chapters
%%

\include{intro}
\include{kbm}
\include{autgp}
\include{subcos}
\include{kbcos}
\include{autcos}
\include{subwa}
\include{fsa}
\include{gap}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  and the bibliography
%%
\begin{sloppypar}
\bibliographystyle{alpha}
\newcommand{\ignore}[1]{}
\catcode`\'=12 \catcode`\<=12 \catcode`\*=12
\catcode`\|=12 \catcode`\:=12 \catcode`\"=12
\bibliography{manual}
\end{sloppypar}

\end{document}
