%==============================================================================%
%                             FUNNELWEB USER'S MANUAL                          %
%==============================================================================%
%
% Summary
% -------
% This is the main .tex file of the FunnelWeb Hacker's Manual.
%
% For a list of the other files that contribute to this document,
% see the list of files given in \input lines at the end of this file.
%
% See the TeX comments below to find out how to typeset this document.
%
%
% Copyright
% ---------
% Copyright (C) 1992 Ross N. Williams.
%
% Permission is granted to make and distribute verbatim copies of this manual
% provided that the copyright notice and this permission notice are preserved
% on all copies.
%
%
% Version
% -------
% Date    : May 1992.
% Version : 1.0.
%
%
% Author
% ------
% Name  : Ross Williams.
% Email : ross@spam.adelaide.edu.au
% Snail : 16 Lerwick Avenue, Hazelwood Park 5066, Australia.
%
%
% How to Typeset This Document
% ----------------------------
% This document is written in a format suitable for processing by the LaTeX
% typesetting system which can be found on many machines around the world.
% The document is an entirely self contained LaTeX document. To assist in
% the electronic distribution of this document, all diagrams have been
% constructing using ASCII text from within LaTeX. This means that all you
% need to print this document is a LaTeX typesetting system.
%
% To print this document using LaTeX, give a command sequence that looks
% something like this:
%
%    latex manual
%    latex manual
%    sort  -f <manual.idx >manual.sin
%    % Start here if manual.aux, manual.toc, and manual.sin already exist.
%    latex manual
%    print manual
%
% The commands must be given three times so as to allow the cross
% referencing information to be correctly assembled.
% The "sort" command should perform a case insensitive sort of the lines of
% its input, but should not alter the lines it is sorting. In the example
% about, the "-f" option specifies that the sort should be case insensitive.
% The "print" command should print the .dvi file generated by LaTeX.
% The details of the typesetting sequence above may vary on your computer
% system.
%
%=============================================================================%


% Basic Document Style
% --------------------
%    The default font size is 10pt which is what I want.
%    titlepage - Instructs LaTeX to produce a title page at the front.
%    book      - Use the "book" built in format.
\documentstyle[titlepage]{book}

% The following pagestyle command instructs LaTeX to set each page with just
% a page number at the middle of the bottom of each page.
\pagestyle{plain}

% By default, the "book" style sets even and odd pages differently on the
% assumption that the result is to be used in a two-sided printing process.
% However, most people printing this will print it single sided.
% To suppress double sided mode, we need to give the \onecolumn command.
\onecolumn


% Page Size and Position
% ----------------------
% The following sets the size of the text box and its position on the page.
% It works OK on A4 paper. I suppose I should test it on American paper too.
\textwidth     15cm
\textheight    24cm
\topmargin      0cm
\oddsidemargin  1.5cm
\evensidemargin 1.5cm
\headheight     0cm
\headsep        0cm


% Table of Contents
% -----------------
% Specify that all headings be numbered and appear in the Table of Contents.
\setcounter{secnumdepth}{100}
\setcounter{tocdepth}{100}

% LaTeX lets you create an unnumbered chapter, but it doesn't put it in
% the table of contents. So we have to do it manually.
\def\pseudochapter#1{%
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}
}

% Paragraph Separation and Indentation
% ------------------------------------
% The default LaTeX format is to have paragraphs jammed up against each other
% with indentation of text on the first line of each paragraph used to
% highlight the start of each paragraph. I prefer to identify paragraphs
% by separating them with space and eliminating the indentation.
\parskip   \medskipamount
\parindent 0pt


% Quick Style Macros
% ------------------
% Use of the following macros is much neater and safer than opening a group
% and setting a mode (e.g. {\bf sloth}) as these macros will cause TeX to
% scream if they span more than one paragraph whereas the group method
% can cause half the document to be set in a funny mode.
% Other little macros here serve the same neatening normalizing purposes.
\def\i#1{{\it #1}}                    % Italics.
\def\b#1{{\bf #1}}                    % Bold.
\def\p#1{{\tt #1}}                    % Program text.
\def\sq#1{`#1'}                       % Single quotes.
\def\dq#1{``#1''}                     % Double quotes.
\def\dqp#1{\dq{\p{#1}}}               % Double quoted program text.
\def\fix#1{\footnote{$\bullet$ #1}}   % Fix it up footnote.
\def\softfix#1{}                      % Marks opportunity for improvement.
\def\eg{e.g.~}                        % Spacing regulated "e.g.".
\def\ie{i.e.~}                        % Spacing regulated "i.e.".
\def\til{\char`\~}                    % For tilde ("~") character.
\def\circumflex{\char`\^}             % Circumflex.
\def\bs{{\tt\char`\\}}                % Backslash.

% Point Making
% ------------
% LaTeX provides some useful environment for listing points. However, it does
% not seem to provide what I want which is a paragraph of text led in by
% a label set in bold.
\def\thing#1{{\bf #1}}
\def\firstthing#1{\thing{#1}}
\def\narrowthing#1#2{{%From defintion of \narrower
\advance\leftskip1cm%
\advance\rightskip1cm%
{\bf #1} #2\vskip0pt}}
\def\narrowtext#1{{%From defintion of \narrower
\advance\leftskip1cm%
\advance\rightskip1cm%
#1\vskip0pt}}
\def\summary{\b{Summary:}\ }

% Invisible Annotations
% ---------------------
% Sometimes it is convenient to be able to annotate the LaTeX code without
% causing text to appear in the document.
% Here, the \checked{} macro can be placed next to any quotation or
% fact, or other externally dependent material that has to be checked
% before publication. The \note{} macro can be used to add a note.
% Both macros are safer than "%" in a paragraph where the text may be
% continually being rearranged across lines.
\def\checked#1{}
\def\note#1{}


% Wide Verbatim Text
% ------------------
% This document was originally set in 12pt and the result was that many of
% the verbatim examples wouldn't fit. To solve this, I created two macros
% to reduce and increase the size of the text, and wrapped the longer
% verbatim texts in calls to the macros. Later, the document was reset in
% 10pt eliminating the original problem, so I redefined the macros to empty.
%\def\beginsmall{\scriptsize}
%\def\endsmall{\normalsize}
\def\beginsmall{}
\def\endsmall{}


% The Index
% ---------
% LaTeX provides a single command (\index) for adding index entries to the
% index. We shorten it and refine it a little with a few definitions.
\def\newterm#1{{\bf #1}\x{#1}}            % Special terminology.
\def\x#1{\index{#1}}                      % Normal index entry.
\def\xx#1#2{\index{#1 #2}\index{#2 #1}}   % Symmetric index entry.
\def\xn#1#2{\xx{#1}{#2}}                  % For a person's name.
\def\xs#1#2{\index{#1, #2}}               % For an entry with a subclause.


% References
% ----------
\def\paper#1{{\bf [#1]}\x{#1}\linebreak[1]{}}


% Figures and Tables
% ------------------
% LaTeX numbers figures by chapter and doesn't position captions where I
% want them and so I have decided to do it all manually. I haven't got
% time for fancy stuff so I am using manual macros.
\def\mylabel#1#2{%
\begin{quotation}
\footnotesize\baselineskip=12pt #2
\end{quotation}
\centerline{#1}
\smallskip}

\def\figfor#1{{\bf Figure~#1}}
\def\tabfor#1{{\bf Table~#1}}

\def\figlicense{\figfor{1}}
%\def\figtwo{\figfor{2}}

%\def\tabone{\tabfor{1}}
%\def\tabtwo{\tabfor{2}}


% Glossary
% --------
\def\gloss#1{\thing{#1:}\x{#1}}


% Random Leftover Stuff
% ---------------------
\def\topicbreak{\bigskip\centerline{--- $\S$ ---}\bigskip}



%------------------------------------------------------------------------------

% Title Page
% ----------
% Although the title should really be in the ch0.tex file, LaTeX forces us to
% put it here.
\begin{titlepage}
\vspace*{3cm}
\begin{center}
\Huge
\vspace{2cm}
FunnelWeb Hacker's Manual\\
\vspace{2cm}
\LARGE
Ross~N.~Williams\\
\vspace{1cm}
\Large
V1.0 for FunnelWeb V3.0\\
\vspace{1cm}
May 1992\\
\normalsize
\end{center}
\end{titlepage}

% Note: LaTeX sometimes puts a blank page before chapters so as to
% start each chapter on an odd-numbered page. There is nothing that I
% can do about this. This is part of the cost of using LaTeX instead
% of TeX.

\makeindex

%-------------------------------------------------------------------------------

\begin{document}
\sloppy
\nonstopmode

\input h_ch0    % Table of contents etc.
\input h_ch1    % FunnelWeb Design
\input h_ch2    % FunnelWeb Implementation
\input h_ch3    % FunnelWeb Modification
\input h_ch4    % FunnelWeb Future
\input h_cha    % Appendices

\end{document}

%==============================================================================%
%             End of Main .TeX File of FunnelWeb Hacker's Manual               %
%==============================================================================%
