**************************************************************************
**************************************************************************
**									**
**									**
**                      TeX V3.1 and MF V2.7                            **
**                      --------------------                            **
**									**
**									**
**                 Amiga version by Edmund Mergl                        **
**									**
**									**
**		 !!!!!!!!! AMIGA 3000 only !!!!!!!!!!			**
**									**
**									**
**************************************************************************
**************************************************************************


Contents:	1. Introduction
		2. Installation
		3. Changes
		4. Problems



/********************************************************************************/



1. Introduction

This is one more Amiga implementation of the famous TeX program written by
Donald Knuth. This version is a copy of the Unix-tape which has been modified
to run under Amiga-DOS 2.0. The main reason to start from the Web sources was
the lack of a 'big version' of TeX (mem_top > 64kB), which is neccessary for
instance if one is working with PicTeX.
This implementation of TeX provides everything you need to run TeX, Metafont
and BibTeX, but you dont get any device driver (previewer or printer driver)
nor any pk-fonts !
In the following it's assumed that you are familliar with using and installing
TeX. If not, contact yout local TeX Guru otherwise you most probably will meet
the Amiga Guru !



/********************************************************************************/



2. Installation

The final installation has been tested with an Amiga 3000 25MHz,
    Kickstart version 37.175 and Workbench version 37.59
    SAS/Lattice Compiler V5.1 updated with the includes 
    and FD-libs of the above version.

                    ----- Requirements -----
 
Hardware:  68020 or 68030 processor and about 30 MB of disk space. 
           For running the big versions of initex and virtex, which you get
           by default, you need 4 MB FastRam. For BibTeX you need 6 MB FastRam.
Software:  OS2.0
           SAS/Lattice C-Compiler V5.1
           diff utility
           edit from WB1.3 named 'edit_1.3'

                    ------------------------
   
First you need to have an assignment for 'TEX:' to your current TeX directory.
Then CD into the directory in which this file is in (TeX/src) and say install.
After 3 hours the installation should have been finished leaving you with the
following files:

  TeX/bin:     tangle, weave, initex, virtex, inimf, virmf, bibtex, dvitype,
               pltotf, tftopl, gftodvi, gftopk, gftype, mft, pktogf, pktype,
               vftovp, vptovf, dvicopy.
  TeX/docs:    for every executable in TeX/bin there is a dvi file in TeX/docs.
  TeX/pool:    tex.pool, mf.pool.
  TeX/formats: plain.fmt, lplain.fmt. 
  TeX/bases:   plain.base,cm.base.

Finally check the diff.#? files in TeX/src/tex and TeX/src/mf according
to TeX/src/tex/textrip/tripman.tex and TeX/src/mf/mftrap/trapman.tex !

Look at TeX/src/set_tex and decide what you want to include in your TeX-startup.



/********************************************************************************/



3. Changes

Small versions: if you don't want the big versions you need to do only some
                minor changes: edit the installation script and replace the 3
                edit commands at the very top with copy commands to work with
                the original change files: copy ctex16.ch to ctex.ch ....
		Then edit site.h and change the typedef for glueratio from double
                to float. Finally edit TeX/texinputs/ini/hyphen.tex and choose
                only one language.
                Note that in the script TeX/src/tex/ctex_to_big also the trie_size,
                the trie_op_size and the neg_trie_op_size will be changed according 
                to trie.diff. This has been done for the german hyphenation.

docs:           if you don't want the dvi files delete in the install script
                the lines after 'docs:' and after 'install docs:'.
                You save about 40 minutes during installation.

dir names:      if you don't like the directory names you should change the following
                files: TeX/src/site.h
                       TeX/src/install
                       TeX/src/set_tex

language:       By default initex loads the usenglish and the german hyphenation.
                If you like to change this, edit TeX/texinputs/ini/hyphen.tex.

68000:          I don't think that it's advisable to run the installation script
		without having any accelerator board or an Amiga 3000, but if you
                definitly want to do it, delete in every lmkfile the option '-m2' !

WB1.3:          It should be possible to run the installation with WB1.3, but
                then you have to rewrite TeX/src/mf/MFwindow/amiga.c which con-
                tains the online display for Metafont.



/********************************************************************************/



4. Problems

Every file from the original Unix tape which has been changed for this imple-
mentation either has been preserved with an extension '-dist' or the changes
are marked with '#ifdef AMIGA'. There is one exception: in the hand coded files
in TeX/src/common the function headers have been changed to ANSI style and some
returns have been casted explicitly.


TeX/src: you might wonder why there is a main install script and no makefile.
         The reason is that the SAS/Lattice make utility can't CD into another
         directory. Allthough this is described in the manual together with some
         examples, it just doesn't make it !

common:  most of the time I spent in changing extra.c which handles all the paths
         and file names. In Unix this is more easy because of only one delimiter
         whereas in AmigaDos - using devices - there are two delimiters: ':' and '/'.
         Allthough I think I did everything right, there is still one minor bug:
         if you want to specify the format file on the command line usually you say
         something like 'virtex &plain foo.tex' where 'plain' specifies the format
         file plain.tex. Here you must say: 'virtex &plain. foo.tex' (note the period !)
         Same thing holds for Metafont.

web:     tangle defines two arrays: bytemem[3][maxbytes] and tokmem[4][maxbytes].
         Allthough the SAS/Lattice manual states that 'the maximum value of the
         constant expression defining the size of a single subscript of an array
         is two less than the largest unsigned target machine int', it seems to me
         as if the compiler considers the offset from the base address of the array
         to be a signed 16-bit int. Whenever the second array index is larger than
         2^16 the compiler jumps backwards in memory and the source level debugger
         tells you something about a negative array index. Therefore the change script
         interchanges the two indeces. Same thing holds for weave.
         Do not use the option -m2 or -m3 when compiling tangle or weave !!!!!
         The only things which had to be changed for Amiga DOS were to add a second
         path delimiter ':' and to change the name of the null device.

web2c:   Because the Amiga has no lexx and yacc (PD yacc didn't work) I provided the
         outputs from lexx and yacc and changed the make file not to delete those
         files when making veryclean. There is still a minor problem: in Unix you link
         with a lexx library which doesn't exist for the Amiga. The only function
         which blink couldn't find was yywrap() for which I put a stub function at the
         end of lex.yy.c.

tex:     Note the comment about the command line in 'common:' above !
         The only changes which had to be made were to expand two macros in
         itex.c and to insert a fcloseall() in tex8.c.

mf:      Note the comment about the command line in 'common:' above !
         Do not compile mf2.c and mf4.c with optimization !!!!!
         Only in mf9.c an fcloseall() and a close_all() for the Metafont online
         display had to be inserted.

To make all the changes in all those files I make excessive use of edit.
Starting with OS2.0 it seems to me, that edit lost some of the documented
features. In allmost all cases I found a work around except in the case where
in mf.p every period at the end of a line has to be deleted and at the beginning
of the next line a period has to be inserted. Because edit doesn't undestand
qualified strings anymore (except in the find command), I had to use the WB1.3
edit. Note that the old WB1.3 edit dosn't know about 't:' and puts his intermediate
files in ':t'. If you have a Worbench version 36.xxx everything works fine except
that it might be neccessary at some other places to replace the edit command with an
edit_1.3 command because the first new versions of edit didn't understand:
'0(....)' that means to repeat a command sequence until there is no further input.


A final remark to the Aztec compiler V5.0: seems to have some problems with register
variables. If you compile without register variables virtex runs five times slower !!



Please send any bug reports to: Edmund Mergl
                                Schnellweg 6
                                7000 Stuttgart 1
                                Germany


/*******************************************************************************/
