*
* dvips v5.58
*
* Amiga port by Giuseppe Ghibò <ghibo@galileo.polito.it>, based on
* the official Unix v5.58 distribution released on 13rd Sep 1994.
*
* Last revised 29th Sep 1994.

---------------
About this port
---------------

This is the Amiga port of dvips v5.58.

All original directories are left unchanged from the official Unix
distribution, except for dvips/contrib/psfig which has been substituted
with the latest version (1.10) of Trevor Darrel's 'psfig.sty' (look at
dvips/contrib/psfig-tex).

All Amiga changes are enclosed in #ifdef AMIGA ... #endif pairs.


----------
Path rules
----------

Amiga paths (in environment variables and config files) follow this
rules yet used on others PD version of TeX, and different from the ones
described in dvips.tex):

 - a period "." indicates the current directory.
 - a comma "," is the paths separator (instead of Unix ":").
 - two adjacent commas ",," includes the default pathname into
   that path.


----------------
Backtick support
----------------

The backtick special "`" (see §4.7 of dvips manual) is also supported,
either through the Bojsen's APipe-Handler (you can find it on AmiNet in
util/shell/APipe-37.5.lzh) or through a very rough version of a read only
pipe (the latter will be used in the case you haven't installed the
APipe-Handler).

This version supports pipes to printers (e.g., dvips -o!lpr ...) only through
the APipe-Handler. If you want, instead, to send the output directly to a
PostScript printer connected, for instance, to the parallel port, you may use
"dvips -opar: dvifile". Note that `dvips -o!lpr' is just an example, the
Amiga doesn't have really the 'lpr' program (as far as I know...).

The backtick special "`" is supported also by the 'psfig' package (provided).
Using this feature you may keep your Encapsulated PostScript files in a
crunched form. To use this feature you must have the 'GZip' program (look in
Aminet) renamed to 'ZCat'.


-----------
Amiga files
-----------

This distribuition of dvips contains the following Amiga files:

README.Amiga      this file.
afm2tfm           binary version of afm2tfm.
dvips             binary version of dvips for any users.
dvips040          binary version of dvips for 68040 users.
smakefile         Makefile for SAS/C v6.x.
ps/config.ps      config.ps for 300 dpi laser printer (Canon engine).
ps/config.ljfour  a config file for HP LaseJet IV (600×600 dpi²).
ps/config.nechi   a config file for Nec 24pin (360×360 dpi²).
ps/config.nec     a config file for Nec 24pin (180×180 dpi²).
ps/config.generic a config file for generic PostScript printer.
ps/*.map          extra maps file to use Paradissa fonts collection.
ps/*.pro          PostScript prologue files.
MakeTeXPK         a shell script file for automatic pk fonts creation.
texc.rexx         ARexx script to convert tex.lpro to texc.lpro.
pipe.c            code to implement 'popen' and 'pclose' functions.
rexx.c            ARexx interface to make dvips compatible with PasTeX.
include/          directory with prototypical headers.
env-vars          a shell script to set some environment variable.
dvips.dvi         DVI documentation of dvips.


---------
Compiling
---------

To compile source files on your Amiga, CD on dvips directory then type from
your current shell `smake -f amiga/smakefile all'.

To compile sources on CPUs different from 68000, you can use instead
`smake -f amiga/smakefile CPU=68040 MATH=8'.

To compile sources with the optimization disabled you can use for instance
`smake -f amiga/smakefile dvips OPTMZ='

To install the compiled sources and PostScript prologue files into TeX
directories type `smake -f amiga/smakefile install'.


------------
Installation
------------

If you don't intend to recreate all binaries and prologue files using
the smakefile, copy the following files:

    dvips/amiga/ps/#?
    dvips/psfonts.map
    dvips/psdraft.ps

to your TeX-PostScript directory (e.g., TeX:ps/) and then edit the file
config.ps according to your paths (pk, tfm, vf, ...). An alternative to change
the config file(s) is to set the environment variables. In fact some
environment variables override paths and options specified in the config
file(s). To do this you can modify the file `dvips/amiga/env-var' to match
your own paths.
Note that directory `dvips/amiga/ps/' contains the latest version of the
PostScript prologue files (*.pro) used by dvips. *BE SURE* you have installed
these files on your TeX PostScript directory, otherwise dvips will produce
fault PostScript files.

Then copy the binary version of 'dvips' (according to your CPU) and 'afm2tfm'
and 'squeeze' into your TeX-binary directory (e.g., TeX:bin/).

Finally copy the file 'MakeTeXPK' into your TeX-scripts directory
(e.g., TeX:s).

For further information process the dvips manual `dvips.tex' (using
plain TeX) or see the dvi file `amiga/dvips.dvi'.


-------------------------
Automatic font generation 
-------------------------

For automatic font generation (see §10 on page 35 of dvips manual), it is
provided a shell script file named 'MakeTeXPK'.

Note that this port of dvips has new features (not available in the
Rokicki's Unix version) for the MakeTeXPK env var.

On page 37 of the dvips manual are explained the standard arguments
supported by MakeTeXPK env var. This port now supports also four new
arguments:

  %x = horizontal base resolution (dpi), i.e. the one specified after the
       `X' in the config file.

  %y = vertical base resolution (dpi), i.e. the one specified after the
       `Y' in the config file.

  %p = a %p will be replaced by the first expansion of the pk path. For
       instance, if you have these lines in your config file:

           D 600
           M ljfour
           P TeX:texfonts/pk/%m/%d/%f.%dpk,TeX:pk/%d/%f.%dpk,%f.%dpk

       and, for instance, the font cmssbx10 at magstep(0.9) isn't found,
       then %p will be replaced by the following string:

           TeX:texfonts/pk/ljfour/540

  %P = a %P is like %p except the path has truncated also the directory
       before the font name. If we consider the example above, a %P will
       be replaced by:

           TeX:texfonts/pk/ljfour

Note that the %w (available in the port of version 5.55) used to
substitute the MF mode is no longer supported. In fact, now, the the official
dvips has the %o argument, which performs the same things of the old %w.

Note, if dvips doesn't found more than one pk font, then the file
'missfont.log' will be created/appended. In this case just execute that
file by typing from your shell 'execute missfont.log'.

If you have the ARexx script 'MakeBatch.rexx' and 'MakeTeXFont.rexx'
provided with PasTeX you can set the environment variable MAKETEXPK to

	rx MF:rexx/MakeBatch %n %d %x %y PS %d/%n.%dpk %P/
or
	rx MF:rexx/MakeTexFont %n %d %x %y PS %d/%n.%dpk %P/

to do the automatic font creation.

Starting from v5.55 rev 2, it is supported the CALLMF env var. If the
environment MAKETEXPK is setted to the value "CALLMF" (without quotes) or
it is not at all setted, then will be called the ARexx script specified
by the environment variable CALLMF itself. For instance let's consider:

	setenv MAKETEXPK CALLMF
	setenv CALLMF MF:rexx/MakeBatch.rexx

then the ARexx script `MF:rexx/MakeBatch.rexx' will be called if
a fonts isn't found. The arguments passed to the ARexx script
are the ones needed by the PasTeX's ARexx scripts `MakeBatch.rexx'
or `MakeTeXFont.rexx'. The advantage to use of CALLMF with respect to
set the enviroment variable MAKETEXPK to `rx MF:rexx/MakeBatch ...',
is that if the ARexx server isn't active then the ARexx script
isn't executed, while `rx' command starts anyway the ARexx server.


----------
Some notes
----------

If you are using dvips with a PostScript interpreter like Post, keep in
mind that the PostScript file produced by dvips using pk fonts isn't
'device indipendent'. For instance, if you want to print on a 180dpi dot
matrix printer you must have the correct pk size fonts. An alternative is to
use Type 1 PostScript fonts. For this purpose you may retrieve all the
CM and AMS fonts in Type 1 format (Paradissa Font Collection) from
any CTAN archive. To use such fonts, there is the config file
'config.generic'. You may use it typing 'dvips -Pgeneric myfile'.
The PostScript file produced in this way is bigger than the one created
using the pk fonts only, but is 'device indipendent'.

-----------------
Changes (summary)
-----------------

- v5.58 (29 Sep 1994)

	- Changes according to the original 5.58 version.


- v5.55 rev 2 (19 Sep 1994) - internal

	- Support for CALLMF rexx script (compatibility with PasTeX).


- v5.55 rev 1 (12 Sep 1994) - internal

	- Support for %x and %y argument in the MAKETEXPK env var.
	- Now current directory isn't changed if a user break is hitted
          during dirs scan.
	- changed config files to support K. Berry's `modes.mf' v2.0.


- v5.528 (12-Feb-94)

	- Added full support of pipes.


- v5.526 (21-Jan-94)


- v5.525 (17-Jan-94)

	- Fixed a bug dued to conversion of all float to double.
	- Added a rough read only pipe (allows backtick "`" in specials).


- v5.523 (11-Jan-94)

	- Fixed units conversion in "emspecial.c": now units cc and dd
	  work right.

	- Added support for EM font libraries.

- v5.521 (17-Dec-93)

	- Enhanced paths: now volume name (like TeX:) and directories
          ending in '/' (like 'TeX:texfonts/') can also be used in enviroment
          variables for paths.


- v5.518 (22-Sep-93)

	- First public release of the Amiga port of dvips.


=========
ChangeLog 
=========

----------------------------------------
29 Sep 1994 -- changes since v5.55 rev 2
----------------------------------------

	makefont.c:	removed %w for mfmode in MAKETEXPK. Now there is
			the %o (with the same behaviour of the old %w) also
			in the original dvips.

	afm2tfm.c:	- changed afm2tfm_protos.h
			- changes some scanf("...%f...") to scanf("...%lf..."),
			  according to FLTTODBL.

	squeeze.c:	- changed squeeze_protos.h

The following files are instead changed according to the changes introduced
in the original 5.58 version.

	bbox.c
	dvips.h
	dvips.c
	dopage.c
	dospecial.c
	emspecial.c
	loadfont.c
	makefont.c
	output.c
	paths.h
	resident.c
	scalewidth.c
	search.c
	virtualfonts.c

-----------------------------------------
19 Sep 1994 -- changes since v5.55 rev 1.
-----------------------------------------

(sch) denotes changes done by Andreas Scherer <scherer@genesis.informatik.rwth-aachen.de>
none or (ghi) denotes changes done by Giuseppe Ghibò <ghibo@galileo.polito.it>

	makefont.c:	- (sch) added CallMF support according to the PasTeX behaviour.
			- (ghi) changed MF modes according to K. Berry's modes.mf 2.0.
			- (ghi) made CALLMF a modal option.

	afm2tfm.c:	(sch) made ANSI compliant.

	squeeze.c:	(sch) made ANSI compliant.

	rexx.c:		(ghi), (sch) added to call the ARexx script specified by CALLMF env var.

	search.c:	changed MF modes according to K. Berry's modes.mf v2.0.


-------
Credits
-------

The author of this port wishes to thanks:

- Andreas Scherer for the ARexx (rexx.c) interface and for the others
  improvements and suggestions.

- Georg Heßmann for the original 'rexx.c'.


----
TODO
----

 o Improve path scheme.

 o A GUI/MUI version of dvips.


-------------------------
QUESTIONS ABOUT THIS PORT
-------------------------

If you have any question, suggestion, enhancement requests, bug report,
about this port, please feel free to contact me via e-mail
at <ghibo@galileo.polito.it>.
