%%%
%%% AmigaFax Documentation
%%%
%%% DAV 26 April    1991
%%%     07 November 1992
%%%

%%% MACROS
\def\bitem#1{\item{\bf #1}\\}
\font\bigbold=cmbx12 scaled \magstep5
%%%

\documentstyle[]{book}

\voffset=-0.25in	%move up so page numbers fit at bottom

\pagenumbering{roman}	%For preface area

%%%%%%%% OUTPUT DEVICE OPTIONS %%%%%%
%%
%% For normal TeX useage this line should be uncommented
\pagestyle{headings}                                             
%%
%% For use with dvi2tty comment the above line out,
%% and uncomment the one below (looks prettier)
%%
%\pagestyle{plain}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

%%
%%%%%%%%%%%%%%% Put appropriate title info here %%%%%%%%%%%
%%

\title{{\bigbold AmigaFax}\\
The Amiga Fax System} 
\author{
C-Born Software Systems
}

\maketitle

\setcounter{page}{2}	%Line us up for two-side

%%
%%%%%%%%%% Blurb about copyright, etc %%%%%%%%%%
%%

\begin{quotation}
\vspace*{2in}
\noindent
{\bf Copyright \copyright 1992 by C-Born Software Systems}

\vspace{2ex}

\small \noindent
All right reserved. No part of this document may be reproduced, stored
in a retrieval system, or transmitted, in any form or by any means,
electronic, mechanical, photocopying, recording, or otherwise, without
the prior written permission of the publisher. \\
Printed in Australia.

\vspace{1cm}

\noindent
{\bf PRODUCTION NOTE}
\vspace{2ex}

\small 
\noindent
This document was produced using the {\normalsize
\LaTeX\ } document preparation system macro package for Amiga\TeX\ ,
Tomas Rokicki's implementation of Donald Knuth's \TeX\ typesetting
system, running entirely on Commodore Amiga computers. It was printed
on a Hewlett Packard LaserJet III printer, using an Adobe PostScript
cartridge. 

\vspace{1cm}

\noindent
{\bf About...}

\vspace{2ex}

\small
\noindent
All the software described herein was developed in Australia by C-Born
Software Systems, on Commodore Amiga computers.

\vspace{1cm}
\noindent
{\bf PRINTED IN AUSTRALIA}

\end{quotation}
\clearpage

%%
%%%%%%%%%%%%%%%%%%%% CONTENTS PAGES %%%%%%%%%%%%%%
%%

\tableofcontents                                                 
%\listoftables
%\listoffigures


%%%%%%%%%%%%%%% AND ON WITH THE DOCUMENT PROPER %%%%%%%%%%%%%

\chapter{Introduction}
\pagenumbering{arabic}			%Normal page numbering

\section{What is AmigaFax?}

AmigaFax is a software package that, in combination with a FaxModem,
allows you to send and receive facsimile information from your Amiga
computer.  Received faxes can be viewed, printed, forwarded to other
fax machines, and saved as ILBM files which can then be accessed using
many standard Amiga programs.  You can transmit text, ILBM graphics,
and combinations of these as faxes. Using the AmigaFax command
language you can add text from any Amiga font, along with logos and
ILBM graphics, to create high quality multi-page fax documents. 

AmigaFax can be set up to automatically send documents to multiple
recipients, to send faxes at or after set times, and to answer
incoming fax calls automatically. 

Faxes can be printed on plain paper, using your normal Amiga printer. 

AmigaFax is highly configurable, allowing you to set up a custom
environment that best suits your hardware and way of working. 

\section{Summary of Features}

\begin{itemize}
\bitem{Automatic Reception}
AmigaFax may be configured to receive faxes in the background, or to
answer an already ringing line in Fax mode. Autoanswer may also be
integrated with a UUCP or BBS environment, where incoming calls may be
Fax or data, by using a specially modified version of the getty
program that recognises Fax calls.

\bitem{Automatic Transmission}
Faxes may be queued for transmission after a particular time, to take
advantage of lower off-peak telecom rates, for example. You may specify
the number of times to try before giving up on transmission, and the
period at which retry attempts should be made. All call progress is
logged, and progress may be monitored from the main program. Call
logging displays when attempts were made, the success or failure of
the call, and the Called Number ID of the remote Fax machine reached.

\bitem{Multiple Recipients}
Fax numbers may be entered either directly, or using defineable
aliases. Therefore instead of sending to `99123456', you could send it
to `Fred'. In the same way, an alias can refer to a list of other
aliases, or numbers, so that one fax could be sent to `Customers',
representing a list of customers.

\bitem{Flexible Fax Viewer}
The Fax viewer allows you to view a fax document at scales of from 1:1
to 1:8. A 1:3 scale igenerally gives a quite readable image while
still fitting the entire Fax width across a standard Amiga screen. You
can easily zoom in on areas of particular interest if required. 

\bitem{Powerful Document Builder}
This allows you to mix any Amiga font or ILBM graphic on a page,
include text, ILBM, Fax, or AmigaFax command files anywhere on a page or in
a document, perform alignment at character or pixel level, justify
text regardless of font size, automatically add standard information
such as address, signature, logo, and current time/date.

\bitem{Highly User Configurable}
The configuration file allows you to set the system up to suit your
requirements. You can define your prefered editor for text and for
graphics, set a standard file to use as a template when creating new
Fax documents, customize your dial type (pulse/tone, special prefix to
get outside line, etc), set the Caller ID string to identify yourself
to remote Fax machines, define the modem type you are using, and set
many system default values.

\bitem{Multiple Serial Port Support}
Using the A2232 multi-serial port card, AmigaFax can support multiple
FaxModems simultaneously, each modem being able to transmit and
receive facimiles and data.

\bitem{Uses Preferences Printer}
Because the Amiga Preferences printer is used to print out the
documents, you can tradeoff speed for resolution as you require. 

\bitem{Workbench or CLI interface}
AmigaFax can be run either from the workbench, or from a shell or CLI
interface. In either case, an easy to use graphical presentation makes
operation straightforward.
\end{itemize}

\section{System Requirements}

AmigaFax requires AmigaDOS version 1.3 or greater. It operates with
AmigaDOS 2.0, and will run on Amigas from the original A1000
through to the A3000. It is possible to run on an unexpanded A1000
with 512K RAM and 1 disk drive, but in this case memory and disk
restraints will limit the number and size of faxes that may be
generated or received. In general the more memory and disk available
the better. For unattended Auto-receive operation a hard disk system
is highly desirable.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Installation}

{\bf Warning:} Be sure to back up your original disks, and use working
copies of the disks for normal operation.


\section{Installing the Software}

Information on installing the AmigaFax software on your system is
given in the {\tt ReadMe} file on the distribution disk. Insert
the distribution disk, and from the WorkBench double-click on the
ReadMe icon for instructions.

The installation script should automatically handle most
installations. To use it, from the WorkBench double-click the
Install\_Now icon, or from a Shell window type {\tt amigafax:install}.
The script will prompt you for information required to complete the
installation.

If you are updating to a later revision, the installation procedure
will not overwrite your configuration or alias files, so you will not
lose information. However in this case you may want to examine the
files in the directories {\tt lib.user} and {\tt s.user} on the
distribution disk for examples of more recent configuration options.

The AmigaFaX software requires certain logical assignments to be made.
The installation procedure will create a file {\tt
afax:s/User-Startup}.  You must edit your {\tt S:User-Startup (2.0) or
S:Startup-Sequence (1.3)} to include the contents of that file, which
will be typically something like:

\begin{verbatim}
assign afax: Work:AmigaFax
mount null:                        
run >nil: <nil: l:fifo-handler     
if exists afax:s/AFAX-Startup      
        execute afax:s/AFAX-Startup
endif
\end{verbatim}

If your {\tt devs:MountList} doesn't  contain an entry for the NULL: device,
append the MountList file from the devs directory on the AmigaFax to it.


\section{Basic Configuration}

There are many possible ways to operate the AmigaFax software. You may
wish to operate it as the only software using your FaxModem, or have
it share the modem with other software such as AmigaUUCP. The AmigaFax
spooler may be started when you boot up your computer, or only when
you want to send a fax. Fax Auto-Answer may be left on all the time,
started only when you are expecting a fax, or not used at all.

If you want the fax-spooler to start when you boot up your system, you
must add the line
\begin{verbatim}
run >nil: <nil: AFAX:C/afaxspl
\end{verbatim}

to your startup sequence. This can be done in the {\tt
AFAX:s/AFaxAssign} file, for example. Normally this would only be
necessary if you send a lot of faxes with delayed spooling, and your
computer may be rebooted often, as the spooler is automatically
started when sending a fax.

If you want auto-answer with Fax detection running constantly in
background, you may either use the modified Getty command, or use {\tt faa}
directly, by adding the line
\begin{verbatim}
run >nil: <nil: faa
\end{verbatim}
somewhere in your startup sequence.

Note that the modified getty will allow you to receive data and fax
calls effectively, and is the recommended approach. However if you
only wish to receive faxes, {\tt faa} is effective and may be started
by double-clicking on the {\bf FaxAutoAnswer} icon.

\section{Hardware}

The cable between your Amiga and Modem {\bf MUST} connect CTS,RTS,
DTR, DCD, TXD, RXD and GND conductors. CTS and RTS are used for flow
control handshaking. DTR is used to keep the modem on line - hangup
occurs if it is dropped. DCD is used for carrier detection. 

\begin{tabbing}
12345678\=678901\=\kill
TXD  \> 2 \> Transmit Data \\
RXD  \> 3 \> Receive Data \\
RTS  \> 4 \> Request to Send \\
CTS  \> 5 \> Clear to Send \\
GND  \> 7 \> Signal Ground \\
DCD  \> 8 \> Data Carrier Detect \\
DTR \> 20 \> Data Terminal Ready \\
\end{tabbing}

\section{ARP}

If you have the ARP library installed (Libs:arp.library) the system will
make use of it for file requesters.

Support for the ASL library under AmigaDOS2.0 has now been added to
AmigaFax.  It is used in preference to ARP.

\section{Extra FONTS}

Some extra fonts have been included in the FaxFonts directory. You may
let the installation script copy them into your FONTS: directory, or
under AmigaDOS2.0 you may copy them into another directory, and modify
your startup to extend the FONT: assign to that directory. The extra
fonts are from the {\tt Computer Modern} series, as used with \TeX. 

\section{Printer Setup}

AmigaFax currently uses the standard printer driver, as configured in
Preferences. A future update may allow you to override the default
settings via the configuration file.
Using a dot-matrix printer, Halftone Dithering, Integer Scaling,
Black and White, Density 7 appears to work reasonably well.

\section{Configuring for Hardware and User Preferences}

You will need to modify the file {\tt FAXLIB:Config} to suit your
specific hardware and preferences. See Chapter~\ref{chap:config} for
details on how to do this.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Configuring the System}
\label{chap:config}

The file {\tt FAXLIB:Config} is used to configure the basic operation
of AmigaFax to suit your particular hardware and preferences. You must
edit this file carefully, using a text editor. You should always keep
a backup copy of this file. The configuration options are continually
being added to as AmigaFax grows, so if you are upgrading you should
look at the latest copy. This will {\bf NOT} overwrite your existing
configuration as part of the installation process.

From version 1.30, AmigaFax configuration can be done using local or
global environmental variables. This will override the values read in
from the {\tt FAXLIB:Config} file. For example typing from the CLI/Shell
\begin{verbatim}
SetEnv LocalID +61-52-786355
\end{verbatim}
will override the LocalID string with the new number.

\section{General Configuration}
\begin{itemize}
\bitem{Debug} Debug level, 0-9. Takes one numeric argument. Useful for
fault-finding, observing handshake between the Amiga and your FaxModem.
\bitem{LogFile} Specifies the file for logging debug and error
information. If not given, information will not be logged.
\bitem{LocalID} The rest of the line is used as the local identifier
string, which is passed to the remote fax machine. This is usually
your fax number, and is limited to 20 characters.
\bitem{Device} The device to use for connecting to the modem, usually
{\tt serial.device} (default). This should only be changed if using a
different serial device, as with a third-party serial hardware.
\bitem{Unit} Takes one numeric parameter as the unit number to use on
the given device. Default is 0. For example when using the first port
on the A2232 multi-serial, set this to 2.
\end{itemize}

\section{AmigaFax User Interface}
These items are used by the {\tt afax} program.
\begin{itemize}
\bitem{Editor} The name of the your prefered text editor, for example
TxEd, ced, memacs, dme, mg, or Ed (default). I use mg (MicroGnuEmacs).
\bitem{ILBMEditor} The editor you prefer for editing IFF ILBM graphics,
for example dpaint.
\bitem{Template} The name of a file to use as a template for building
fax documents, If given, the editor will be given a copy of this file
to work on when you ask for a new fax file. This may include
references to your address, your signature, etc.
\end{itemize}

\section{Fax Page Layout Options}
These items are used by the {\tt mkafax} program.
\begin{itemize}
\bitem{DefaultFont} This is the default font, used for normal text
unless otherwise specified. It takes two parameters, the font name,
and size. The font {\tt cmtt10 41} looks quite good for standard text.
\bitem{HeaderFont} This is the font used for page headers.
\bitem{PHeader} If given, a header will be printed on each fax page,
and the rest of the line used as the main text, along with the date,
local ID string, and page number. If not given, no header will be
printed. 
\bitem{LeftIndent} The left indentation (border) to be used, in pixels.
Many fax machines will not print to the full fax width, and typically
an indentation of at least 50 pixels (approx 1/4 inch) on each size
is required to avoid losing characters.
\bitem{RightIndent} The right indentation (border) to be used, in pixels.
\end{itemize}

\section{Fax Viewer Configuration}
These items are used by the {\tt viewafax} program.
\begin{itemize}
\bitem{ViewScale} Takes one numeric argument, 1-8. This is the default
scale used by the fax viewer when it starts up. A value of three
allows a standard fax to fit across the screen. A scale of 1 shows
maximum detail.
\end{itemize}

\section{Fax Printer Configuration}
These items are used by the {\tt afaxprt} program.
\begin{itemize}
\bitem{MinLines} Takes one numeric argument. This is the minimum
number of lines that must be on a fax page before we print it. The
default value is 0 (zero), meaning print all pages. This is for
cut-sheet feeders (Laser Printers), where the fax may be just a little
longer than one page. Use a value of around 100  here to stop getting
`blank pages' printed out.\\
{\bf 1.32 and later}
MinLines is now used to scale a fax page to fit on a printer page. If
the fax page is longer then the printer page by less than MinLines, it
will be scaled to fit. A value of around 500 works for most faxes.
\end{itemize}

\section{Fax Spooler Configuration}
These items are used by the {\tt afaxspl} program.
\begin{itemize}
\bitem{SpoolInterval} This is the time interval, in minutes, at which
the outbound fax queue is scanned for untransmitted files.
\end{itemize}

\section{Fax Receiver Configuration}
These items are used by the {\tt faa} program.
\begin{itemize}
\bitem{RSetup} The receive setup string. This optional string is sent
to the modem. Unlike versions before 1.23, the string is NOT preceded
by {\bf AT}. Instead, the line is sent as it appears. This allows
multiple commands to be sent when initializing the modem. This
allows you to add commands to set such things as speaker use and
volume.
\bitem{RStatus} Receive Status. If present, a status window will pop
up when a fax is being received, showing various details such as name,
connect speed, transmitter ID, amount of data received. It takes two
optional numeric parameters, which are used for the top and left edge
pixel positions to place the window.
\bitem{DLEmode} There are many incompatible modems and modem ROM
revisions about. This allows you to specify certain things about how
your FaxModem sends your data. It currently takes one numeric argument,
(0, 1 or 3).
	\begin{itemize}
	\bitem{0} (default) treat DLE in received data as escape
		  (Maestro 3.1, ZyXEL~3.99+)
	\bitem{1} Received DLE is g3 data  (ZyXEL Vn3.90, Supra?)
	\bitem{3} RAW input mode. Data is saved raw. For debug only.
	\end{itemize}

\end{itemize}

\section{Fax Transmitter Configuration}

These items are used by the {\tt afaxsend} program.

\begin{itemize}
\bitem{WSetup} The transmit setup string. This optional string is sent
to the modem. As in the RSetup line, the line is sent to the modem as
it appears (since 1.23). This
allows you to add commands to set such things as speaker use and
volume.

\bitem{DialType} Takes the parameters Pulse (default) or Tone.

\bitem{DialPrefix} Prefix to add before number when dialling. I use it
to get an outside line (dials 0 first), by setting it to ATDP0,DT,
which will pulse-dial 0, then tone-dial the rest of the number.

\bitem{DoPadding} This should not be necessary. However, some
FaxModems to not observe the minimum scan-time restrictions set by the
standard. When connecting to slower fax machines, this may result in
missed scan-lines. Note that if you set this parameter, it will
usually result in fax transmissions taking longer, as worst-case
padding must be added.

\bitem{WStatus} Write Status. If present, a status window will pop
up when a fax is being transmitted, showing various details such as name,
connect speed, receiver ID, percent of file sent. It takes two
optional numeric parameters, which are used for the top and left edge
pixel positions to place the window.
\end{itemize}

\section{Modem Command and Status Strings}

Certain  modem commands and status codes have now been made variable.
The variables default to their own value, and may be set in the Config
file, or as environment variables.
\begin{verbatim}
eg	setenv +FLID +FLI
\end{verbatim}
will result in the string +FLI rather than +FLID being used for
setting the local ID code.

Variables are:

\begin{itemize}

\item Status
	\begin{itemize}
	\bitem{+FCON} 	Fax connect established
	\bitem{+FCSI}	Called station identifier follows
	\bitem{+FTSI}	Transmitting station identifier follows
	\bitem{+FDCS}	Current session parameters follow
	\bitem{+FK}
	\bitem{+FPTS}
	\bitem{+FHNG}	Fax hangup (terminal)
	\end{itemize}
\item Command
	\begin{itemize}
	\bitem{+FDT}	Fax Data Transmit (I am about to transmit)
	\bitem{+FDR}	Fax Data Receive
	\bitem{+FLID}	Local ID string follows
	\end{itemize}
\item Dual Use
	\begin{itemize}
	\bitem{+FET}	Fax End of Transmission (Followed by status code)
	\bitem{+FDIS}	Constrain session parameters
	\end{itemize}
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{The Workbench Interface}

Once configured, AmigaFax may be operated either from a Shell or CLI
(Command Line Interface), or from the Workbench. If you choose to
operate from the Workbench, you will find three main icons, `AmigaFax',
`FaxAutoAnswer' and `FaxSpool'.

\section{AmigaFax}

When you double-click on the `AmigaFax' icon, the main AmigaFax
control window will open. This allows you to edit, compile and view
faxes, queue them for transmission, review previously queued
transmissions, and so forth. There are currently six string gadgets,
six pushbutton gadgets, and one toggle gadget on the control window.

The gadget functions are:

\begin{itemize}
\bitem{FINE/STD}
This toggle gadget allows the user to toggle between Fine (200 DPI)
and Standard (100 DPI) vertical resolution, when creating AFax files.
Standard resolution takes half the space, and half the time to
transmit, of Fine mode, but Fine looks MUCH nicer !! 

\bitem{To:}
This is the intended recipient of the Fax. It may be just a phone
number, or it may be an alias. When you enter a string and press
return, if the first character is a digit it will be treated as a
number, otherwise it will be checked for aliases. If no aliases are
found, the string is removed, otherwise the number of aliases found is
shown. Refer to section~\ref{sec:alias} for more information on aliases.

\bitem{From:}
This is picked up from the LocalID field in your Config file, if
present. You may override this value. It is a 20 character string sent
to the remote Fax to identify you as the sender, usually your phone
number for return faxes.

\bitem{Source:}
This is the name of the fax source document, usually an AmigaFax
command ({\tt .FCOM}) file, although plain text or ILBM files may also
be used.  If you press return with an empty string, and ARP is
installed, a requester will prompt you for a filename. 

\bitem{AFAX:}
This is the name for the actual fax file. The system will usually pick
a name for you, but you may wish to override it.  Note that the AFAX
file name will be reserved, but not actually created, until time to
send the Fax. You may force creation with the "Make" gadget if you
wish to test that it is created correctly.  If a document is to be
faxed to multiple recipients, only one copy of the AFAX file will be
made. It is automatically deleted when all recipients have been
reached. 

\bitem{Tries:}
The maximum number of times to try to get a fax through to a specific
recipient if problems are encountered, such as remote phone being
engaged. Defaults to three. 

\bitem{Time:}
The Fax will not be sent until after this time. An empty field means
send at any time. Fill in as hh:mm, (24 hour format) then press return.
The system will interpret the time, and display the result. Time can
only be in the future, past time is rounded up by a day.

\bitem{New}
Create a new Fax document, and edit it using your configuration
editor.  The file pointed to by the configuration entry "Template"
will be used as a fax pro-forma.  The system will pick a default
document name for you, which you may keep or override.

\bitem{Edit}
Edit a Fax document, using your configuration editor. Note that you
may set both a text and a graphic editor in your {\sl config} file.

\bitem{Make}
The system will attempt to build an AFAX file from your source document.
This is not necessary when sending faxes, but does allow you to check
whether the document will appear as you wish.

\bitem{Preview}
Invokes the AFAX viewer program, so you can preview the completed document.

\bitem{Send}
Your facsimile document will be queued for sending to the appropriate
recipients.  If the fax-spooler is not running, you will be asked if
you wish to start it. 

\bitem{QCheck}
This gadget will bring up the queue check window, to monitor the
progress of outgoing Faxes. From here it is possible to requeue Faxes
that have exceeded their error allowance, and to remove the spool
files for faxes that have been successfully sent, or that are still
queued for transmission.

\end{itemize}

\section{FaxAutoAnswer}

This icon will activate the background automatic-answer facility. If
it is already operating, you will get the choice of removing the
existing application (stopping it), or replacing it with the new
version. You may wish to replace it if you have modified the
configuration file settings.

Note that you should only activate the auto-answer system in this
fashion if you are {\bf not} using the GETTY mode of operation, and
only want to receive facimile transmissions, not data.

\section{FaxSpool}

This icon will activate the background fax-spooler program. If it is
already operating, you will get the choice of removing the existing
application (stopping it), or replacing it with the new version.  Note
that in normal operation the main AmigaFax program will start the
spooler for you when you queue a fax for transmission, or you will run
it up automatically in your startup sequence.  You may wish to replace
it if you have modified the configuration file settings.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Operating from the Shell}

There are 11 separate executable modules included in the release.

\begin{itemize}
\bitem{afax}	Intuitionized interface for AFAX create/edit/send etc
\bitem{newfax}	Notifies new fax received, allows print/view/delete, etc
	  	[Intuitionized interface]
\bitem{afaxspl} Fax spooler daemon, many options/features
\bitem{mkafax}	Convert documents to AmigaFax AFAX IFF file format
\bitem{afaxprt}	Print and AmigaFax AFAX IFF file using preferences printer
\bitem{afaxsend} Send an AmigaFax AFAX IFF file to a remote Fax machine
\bitem{faa}	 Receive Fax documents in auto-answer mode
\bitem{afaxilbm} Convert pages from an AmigaFax AFAX IFF file to ILBM format
\bitem{viewafax} FAX viewer
\bitem{fxfx}	Manipulates fax files
\bitem{dvifax}	Converts \TeX .dvi file to fax format (Registered version only)
\end{itemize}

%All modules currently have level 1 debugging enabled.
%The command line debug switch is -d, ie -d9 will set level 9 debugging,
%and -d0 will set level 0 (debugging off)

\section{AFAX}

{\tt AFAX:c/afax} - no command line switches at present.
This brings up a window which you can use to create new Fax documents,
edit the documents, create the actual AFAX files, and send your faxes.

\section{NEWFAX}

{\tt AFAX:C/newfax faxname}
This program is automatically invoked by faa when a fax is received.
It puts up a window informing you of the Fax, with details about it
(name, sender ID, number of pages), and allows you to view, print or
delete the document.

\section{AFAXSPL}

\begin{verbatim}
[run >nil: <nil:] afax:c/afaxspl  [-s] [-i n]
\end{verbatim}

With the -S option, the spooler will run once only, checking for any
faxes waiting to be spooled out. In this mode, it could be launched
using cron/dcron/amicron at whatever times you wish to send faxes. 

Otherwise it will run in background and check for faxes to spool at
intervals of every n minutes, where n is the interval in minutes from
the configuration file default, optionally overridden by the -i
command-line switch. You could do this perhaps every 1/2 hour, (n =
30), or even at 1 minute intervals while testing.

The spooler checks for files of the form FAXSPOOL:*.SPL. These are
human-readable. As calls progress, results are added to the end of the
file. If successfully sent, the file is renamed FAXSPOOL:*.OK . If
unsuccessful for more than the specified number of tries, it is
renamed FAXSPOOL:*.ERR . Note that you can re-spool a .ERR file by
using an editor to increase the allowed tries, then renaming it back
to .SPL .

\section{MKAFAX}

\begin{verbatim}
mkafax <docfilename> <AFAX_filename>
\end{verbatim}

mkafax currently recognizes the IFF file types AFAX and ILBM, plain
text files, and AFAX command text files, as input.

A plain text file will be converted to an AFAX file using default settings.

An IFF ILBM will be converted to a single-page FAX document. Only the first
plane is converted, to convert multi-plane (eg DigiView Pics) use another
tool, such as PfiltView (AmigaTeX). May integrate later ?

An AFAX command file uses lines starting with a dot (.) as special
commands, similar to TROFF style text processors. The file MUST start
with .FCOM on the first line.

\section{AmigaFax Command File Format}

An AFAX command file uses lines starting with a dot (.) as special
commands, similar to TROFF style text processors. The file MUST start
with .FCOM on the first line.

%
% Fix this up ASAP
%

\begin{verbatim}
 .FCOM
	on the first line to be recognised as a command file.
	.FCOM may optionally be followed by a dialstring or target alias.
	(Currently unused, future compatability)

Other commands currently supported are :

 .PG	Clear out the old page and start a new one
 .LM n	Set the left margin to n characters, in the current font
 .LI n	Set the left  indentation to n pixels (default 50)
 .RI n	Set the right indentation to n pixels (default 50)
 .LJ	Left-justify text and Graphics from now on
 .RJ	Right Justify text and Graphics
 .CT	Center Text and Graphics
 .TS n	Set Tabs every n characters (default 8)
 .PL n	Set page length to n (pixel) rows (default 2292 == A4)
 .FILL	Turn on fill mode
 .NOFILL Turn off fill mode

 .VERBATIM
	All text read in will be printed verbatim, until .ENDVERB

 .VERBINC filename
	Include a file in verbatim mode. Still requires a .ENDVERB

 .ENDVERB
	End verbatim mode

 .FONT name size [styles]
	Set the font as specified. Typical use might be
	.FONT topaz 11
	.FONT diamond 20
	.FONT cmr10 30
	and so on. See the .STYLE command for style options.

 .ENDF	pop the current font/style, and return to the previous one.

 .STYLE styles
	Set the style according to the style string,
		N - Normal
		B - Bold
		U - Underlined
		I - Italics
		E - Extended
	eg .STYLE BU	(set to bold, underlined)

 . 	(dot followed by white-space) Rest of line is a comment

 .INC file
	Include the named file. File may be text, ILBM, or another command
	file. Type is auto-recognised. If a full path is not given to the
	include file, the current directory will be searched, then the
	FAXLIB: directory. Thus addresses, signatures, etc may be kept
	in FAXLIB:

	From version 1.34, you may also .INC an AFAX format file. At
	present only one page is included, by default the first page.
	Page number can be specified by an optional parameter, eg
	.INC FAXREC:Fax0001 2
	At present only 1 page from an AFAX file can be included for each .INC
	command, and no data after that page will appear on the page it is
	included on. Text/graphics can be included before the included fax
	page, so you could use this, for example, to automatically add some
	header text to a received fax before relaying it on. 
	Note that at present, normal page-length checking is NOT done while
	processing the included fax page, so you may get a longer than
	expected page.

 .DATE	Insert a line with the current date and time, using current font
	and line settings.

\end{verbatim}

Any line not beginning with a . will be processed as normal text,
according to the current settings.

\subsection{Fill Mode}

In this mode, lines will be filled from input to full width (inside
LR indent) in the current font. Line filling terminates on a dot
command, blank line, or end of page. Left Margin is disabled while
filling. 

See the included {\tt test.com} file for examples of useage.

\subsection{Stackable fonts and Style support}

Starting at version {\tt 1.34}, {\bf mkafax} supports stackable fonts,
and the use of styles, such as {\bf Bold}, {\it Italic} and
\underline{Underline}.

Useage of the command {\tt .FONT} has been extended, and the commands
{\tt .STYLE} and {\tt .ENDF} have been added.

The font system has been modified so that fonts are now nestable. This
means you can set a font/style, and then return to the original
font/style, without needing to know what that was. This can be very
useful for include files, which can return to the original font before
they exit, for example.

The {\tt .FONT} command now takes an optional third parameter, which defines
the requested style to use. This takes the form of a string, consisting
of the letters {\bf N, B, U, I} and {\bf E} in any order, upper or lower case.

\begin{verbatim}
N - Normal
B - Bold
U - Underlined
I - Italics
E - Extended
\end{verbatim}

Note that the letters are parsed in order, and that {\bf N} will clear the
other flags and set the font back to normal. For example,

\begin{verbatim}
.FONT topaz 30 BU
\end{verbatim}
will set the font to topaz 30, Bold and Underlined.

\begin{verbatim}
.FONT CGTimes 50 I
\end{verbatim}
set CGTimes at 50-point, Italic.

You can retain the existing font, but change its style, by using the
new .STYLE command.

\begin{verbatim}
.STYLE U

This is Underlined.

.STYLE IU

This is Underlined and Italic.
\end{verbatim}

All {\tt .FONT} and {\tt .STYLE} commands can now be nested. This means that the
font/style you set will remain in effect until the new command {\tt .ENDF}
is encountered. After this the previous font/style set will be in
force. The Default font, which can be set from your FAXLIB:Config file
or by environmental variable, is always the underlying font. No matter
how many {\tt .ENDF} commands you enter, this will not be popped from the
font stack.

Note that if you have defined a Header font, this will be automatically
pushed for headers, and popped afterwards.

\begin{verbatim}
Example .FCOM file:

.FCOM
This is in default font
.FONT CGTimes 30 U
This is in Underlined 30 point CGTimes
.FONT topaz 20 B
This is in Bold 20 point topaz
.STYLE NIU
And this is Italic Underlined 20 point topaz
.ENDF
Bold 20 point topaz
.ENDF
Underlined 30 point CGTimes
.ENDF
Default font
.ENDF
Default font
\end{verbatim}

\section{AFAXSEND}

\begin{verbatim}
afaxsend [-t -d -P] <dialstring | alias> <AFAX_filename>
\end{verbatim}

eg afaxsend Jeff MyFaxFile

\begin{verbatim}

-D name	- Use name for the device 	(default serial.device)
-U num	- Use device unit num 		(default 0)
-t 	- Use Tone Dialing
-P	- Padding on (default)
-p	- Padding off

\end{verbatim}

Attempts to dial out, connect to the remote fax machine, and tranfer the
specified document.

If the first character of dialstring is not a digit, and not a name
alias, the whole string will we be sent to the modem non-prefixed as a
dial string. If an alias is used, it may be a group alias, resulting
in the fax being sent to everyone in that group.


\section{AFAXPRT}

\begin{verbatim}
afaxprt [-pnum] [-n] [-dn]<AFAX_filename>
\end{verbatim}

eg afaxprt -p2 MyFaxFile

If the -p option is not used, all pages are printed.

The -n option does not actually send the data to the printer. Useful
with the debug option -d.

Sends the AmigaFax document to the preferences printer. It is a good
idea to set your printer for high density.
Using a dot-matrix, Halftone Dithering, Integer Scaling,
Black and White, Density 7 appears to work ok.

Note that this has not been extensively tested with printers other
than the HPLJIII and the Star NX10.


\section{FAA}

{\tt faa [BaseName]}

Fax auto-answer. Sets up the FaxModem to auto-answer and recognise Fax
or data tranmissions. Incoming Faxes will be saved in AFAX format. the
default BaseName is FAXREC:FAX, so that incoming faxes will be named
\begin{verbatim}
FAXREC:FAX0000
FAXREC:FAX0001
FAXREC:FAX0002
\end{verbatim}

etc.

Note also that although faa recognises the difference between Fax and
Data, it currently does nothing special with data. I hope to integrate
this with the UUCP system in the future. Any other suggestion ?

To terminate the faa program, send it a CTL\_C break. If you ran it
directly from your shell, just type control-C and wait.
If you used RUN or RUNBACK, send a break to its process number.
(eg break 7 all)

Command Line switches are:
\begin{verbatim}
-dn	- Set debug on, level n 	(default 1)
-D name	- Use name for the device 	(default serial.device)
-U num	- Use device unit num 		(default 0)
-a	- Immediate Answer
-G	- Run from a Getty
-z	- Diagnostic, do not detach, so debug messages can be read
\end{verbatim}

The Immediate Answer switch assumes phone is ringing, configures the
modem \& answers immediately. It probably makes sense to attach this to
an alias if you use it this way. eg.
alias fa "faa -a"

The Getty option specifies that faa was run from a Getty. It will not
modify the serial port parameters. It assumes that the Getty has
answered the phone, detected a Fax call, and set up the line
accordingly. Faa will connect, collect a Fax document, and return
control to the Getty.

\section{AFAXILBM}

\begin{verbatim}
afaxilbm [-pnum] <AFAX_filename> <ILBM_filename>

eg

afaxilbm -p2 RAM:AFAXR001 FX.ILBM
\end{verbatim}

This will extract the specified page from the AFAX file to the named
ILBM file. It may then be viewed using standard ILBM viewing programs,
such as LoadImage from Fish disks 281 and 355, of programs like
DeluxePaint. 

If no page number is given, all pages will be extracted to separate
files, and given names of the format base.1 base.2, etc

The default ILBM file base name is afax\_ilbm

\section{VIEWAFAX}
\begin{verbatim}
viewafax [opts] <FaxFile>
\end{verbatim}
The fax viewer is normally started automatically by from the NewFax
window. When invoked from the CLI, it takes the options:
\begin{verbatim}
-d debug_level
-p Page_Number
-s Scale
\end{verbatim}

The current version of the viewer keeps one entire fax page in memory.
If the page will not fit in the requested scale, it tries to reduce
the resolution until it finds one that will fit. Once a page is
displayed, you can move about the page using the arrow keys. There is
a scale gadget at the top left of the window, in the form of 1:n,
where n is the current scale (say 3). You can click on the gadget,
delete the current scale, and enter your own, in the range 1 to 8,
where 1 is 1:1 (full size), 2 is 1:2 (half size) etc.
To the right of that gadget is another of the form Page:\ n where n is
the current page displayed. Again you may enter the required page
number in this gadget.

To the top right of the window is a group of gadgets of the form
$|<<-->>|$. These are actually four gadgets, which allow moving
through the pages of the fax. From left to right they are First Page,
Previous Page, Next Page, and Last Page.

You may use the windows sizing gadget to resize the window. However
with the current viewer, sizing the window larger than the fax page
will result in the window shrinking to the page size at the next
movement.

Several keys are active in the viewer window.

\begin{itemize}
\bitem{Down Arrow (Cursor Key or Numeric Pad)}
Move window down fax page.
\bitem{Up Arrow (Cursor Key or Numeric Pad)}
Move window up fax page.
\bitem{Right Arrow (Cursor Key or Numeric Pad)}
Move window right on fax page.
\bitem{Left Arrow (Cursor Key or Numeric Pad)}
Move window left on fax page.
\bitem{Numeric pad keys 1,3,7,9}
Diagonal window movement
\bitem{i}
Flip fax page vertically. Useful when faxes are sent upside-down.
\bitem{q}
Quit from viewer
\bitem{b}
Move back on page in fax file
\bitem{n}
Move to next page in fax file
\bitem{f}
Move to first page in fax file
\bitem{e}
Move to end page in fax file
\bitem{s}
Make fax smaller - reduce scale one step
\bitem{l}
Make fax larger - increase scale one step
\end{itemize}


\section{FXFX}

This utility allows you to split and merge AFAX format fax files. A
typical use is where you have a complete fax document, perhaps
generated by TeX->dvifax, or received as an AFAX fax-file and you want
to sent it with an attached cover page, or you want to extract one or
more pages from the document.

\begin{verbatim}
The command-line format is:

fxfx infile [-range] [infile[-range]] [...] outfile

Some examples:

fxfx file1 file2

 copies fax files file1 to file2

fxfx file1 file2 file3 file4

 merges all pages from file1-3 to create file4

fxfx file1 file2 -1,3,5-7,9- file3 -4 file4

 merges all pages from file1, pages 1,3,5-7 and 9 on from file2, and
 page 4 from file3, to create file4


The range is currently sorted, so to reverse page order is currently
not simple, eg

fxfx file1 -3 file1 -2 file1 -1 file2

 to create file2 from pages 1-3 of file1 in reverse order.

\end{verbatim}

\section{DVIFAX}

This module works with the AmigaTeX package from Radical Eye Software,
to enable you to convert a \TeX {\tt .dvi} file into an AmigaFax fax file. 

The command line syntax is
\begin{verbatim}
dvifax file.dvi -o file.afx
\end{verbatim}

You will be prompted for various size and scaling numbers. You are
probably best to accept the default values (hit return) unless you have
a very good idea what you are doing.

The {\tt Squeeze Fax} option will remove all white-space from the top
and bottom of each page. This can result in significant savings in
transmission time, and in fax paper at the other end.

When creating faxes with dvifax, you may want to add a cover page. This
can be done easily with the {\tt fxfx} utility.

\appendix

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Configuration Specifics}

\section{FAXLIB:Aliases}
\label{sec:alias}

This file allows you to alias numbers to names, create fax mailing
groups, etc. Aliases may be defined in terms of other aliases.

For example we could have:

\begin{verbatim}
joe: 1234596

fred: 9876123

bill: 0981234

andy: "0,123-4567,,,"

customers: joe, fred, bill
\end{verbatim}

Lines beginning with \# are treated as comments, a comma means the
alias list continues.

If you want to include spaces or commas in an alias (commas are a way
of inserting delays into a dial-string), you should surround the
aliased number with double quotes. Adding coma-delays at the end of a
dial string can be useful when dialing numbers that take a long time
to respond, avoiding possible timeouts.

The alias system is modelled closely on the one used in Matt Dillon's
UUCP package. See UUCP documentation for more details.
Thanks, Matt.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{FONTS}

AmigaFax can use all the standard Amiga fonts. Under AmigaDOS2.0 the
ability to perform font-scaling means that you can generate quite
impressive documents very easily.

The AmigaFax distribution also includes a selection of larger sized
fonts from the Computer Modern series, which again allows very high
quality faxes to be produced. These were generated from standard \TeX
fonts using the TEXF program. Note that these fonts do not contain the
umlaut characters commonly used in Europe.

These include the fonts {\tt cmr10, cmbx10, cmssbx10 and cmtt10} in
sizes from 29 to 103. 

I would suggest that anyone using AmigaDOS 2.0 use the standard Amiga
fonts. Even Topaz scaled to 30 point size or greater comes out quite
effectively. Play around until you find a setup you like.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Integration with other software}

\section{UUCP}

AmigaFax was designed from the beginning to integrate with UUCP, in
particular with Matt Dillon's AmigaUUCP1.15D. Using the modified Getty
program provided, a Fax call will be recognised, and the Fax
auto-answer program will be called to handle it. Normal logins and
UUCP connections should function as usual.

Other facilities, such as network fax-server capability, can be
provided to enhance the basic AmigaFax system.

\section{\TeX\ }

We have written a {\tt dvifax} program, which will take a standard \TeX\ 
{\tt .dvi} file, and transform it to an AmigaFax file, with superb
quality output. This is now provided with the distribution.

\section{PostScript}

PostScript support is not yet in place, but it is on the list.
Priority given depends on demand.

\section{Printer Driver}

An {\tt AmigaFax} printer-driver is also high on the list of things to
do. This will allow any program that normally produces output using
the standard Amiga Preferences printer to produce AmigaFax files as
output.

\section{BBS Systems}


The FifoBBS BBS system for VLT is no longer distributed with AmigaFax.
There several BBS systems that should work well alongside AmigaFax,
the one we are currently using at C-Born is TransAmiga. This is a
freely distributable shareware package which also supports FidoNet. It
is available from several sources, including Amiga ftp sites. See the
file BBSREADME in the distribution disk BBS directory for more details.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{FaxModem Specifics}

\section{ZyXEL U-1496}

The ZyXEL U-1496 provides data rates to v32bis and higher, with v42bis
error correction and compression. It is capable of facsimile data
rates greater than 9600bps, currently up to 14400bps. ZeroOne makes
ROM upgrades available through their BBS, with frequent upgrades. They
are very helpful and responsive to customer requests.

The latest ROM version we have used is {\tt V5.00}.

With this ROM, it is possible to lock the DCE/DTE data rate for fax
with the sequence {\tt ATS38=8S18=n}, where {\tt n} is the DTE speed
as per the S20 register list, eg 2 for 38.4Kbps, 3 for 19.2Kbps.

There is a Voice-mode ROM for the ZyXEL currently in Beta-test. When
this is released, we will try to integrate it with AmigaFax. this will
allow you to send and receive voice messages, as well as fax and data
calls, all from your Amiga.

A few more tips on configuration, with getty. In my standard startup
line I have been setting the page-length to A4, as my printer is A4,
which is the standard here. However, it appears that my fax (and most
others) when appending their header/footer lines, force the page past
A4. This has not been a problem in the past, but now the U1496 must be
obeying the page-length setting, and forces out an extra very short
page for each A4 page. This causes handshake problems, etc.

So for now, the best solution seems to be setting up for unlimited
page-length. The AmigaFax software has no problem with this, but your
printer may, if single-sheet type.

Another option allows fax data-rates greater than 9600. Not many fax
machines support this yet, but we may as well use it, just in case.

\begin{verbatim}
The +FDCC options are as follows:

+FDCC=1,5,0,2
      ^ ^ ^ ^
      | | | +- Page Length: 0=A4(297mm) 1=B4(364mm) 2=unlimited
      | | +--- Page Width : 0=1728 Pixels in 215mm (Current AmigaFax Limit)
      | +----- Bit Rate   : 0=2400 1=4800 2=7200 3=9600 4=12000 5=14400
      +--------Vert. Res. : 0=Normal(98 lpi) 1=Fine(196 lpi)

\end{verbatim}

Other options cover compression format, error correction mode, binary
file transfer, and scan time. These are not yet supported, probably
not until the standards are finalized.

The line I use to start up Getty is:

\begin{verbatim}
RunBack Getty -Mh -B19200 -x8 -F6 AT&C1&D3+FDCC=1,5,0,2
\end{verbatim}

As I have the FaxModem running from a {\tt AS2232} multiport serial
card, with a maximum baud rate of 19200, I must limit the DCE/DTE rate
to that.

\section{Maestro 9600XR}

This is a low-cost Australian made 2400bps data, 9600bps send/receive
fax modem, based on the Exar chipset. It does not allow DCE/DTE rate
locking, and as of the latest version ROMs we have, still has
occasional problems in correctly synchronising to incoming fax data,
resulting in `garbage data' faxes, and missing lines from the top of
pages. These problems may have been fixed in later ROM versions, but
we have not been notified of any upgrades. The modem software does not
appear to observe specified line-scan delays, which may result in
missing lines when transmitting to older/slower fax machines.

A typical Getty startup-line for this modem is:
\begin{verbatim}
run >nil: <nil: Getty -Mh -B2400 -F AT&C1&D2+FDCC=1,3
\end{verbatim}


\end{document}



















