
                    THE IDIOTS GUIDE TO SETTING UP TEX
                    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 This file describes how to setup the Debian installation of TeX, if you are 
using some other distribution of TeX, then this will be of little use to you.
Please read through each step first before attempting it.

NOTICE: This is the first release of Debian TeX and as such I am labeling this
        as ALPHA software, if there is a bug please mail me (Jonathan Buzzard)
        at phyjab1@caledonia.hw.ac.uk.

1:
 The first step is to work out a Metafont mode for your printer, the first place
to look is in the file PRINTERS this contains a list of a large number of
printers along with there appropriate settings. The forth field (delimited by
the commas) specifies a mode for each printer, note this down (in fact it would
be a good idea to write the the whole line down or keep a copy of it somewhere
on line to read). If there is no mode for your printer, then you will have to
work one out for yourself, take a look at the file
/usr/lib/texmf/fonts/metafont/src/modes.mf for some ideas as possible modes
(and mail me a copy of the replacement line for the file PRINTERS).

2:
 Now you have got your mode, if it CanonCX you are lucky as this is the 
compiled in default and you can skip to 3. Otherwise you need to edit the file

    /usr/lib/texmf/fonts/metafont/src/modes.mf

 at the end of the file there is a line which reads

   localfont := CanonCX

 change the CanonCX to whatever your mode is.

3:
 If you have installed dvips for printing your .dvi files (I recommend that you
install this even if you do not have a PostScript printer as it is the easiest
way to include graphs and figures and you use Ghostscript to do the actual
printing), you will need to edit the file 

   /usr/lib/texmf/dvips/config.ps

 and change the lines 

  % Metafont mode.
  M CanonCX

 so that CanonCX is whatever mode your printer is. You will also need to change
the line

  % The amount of free VM in your printer, modify to suit
  m 1000000 

so that the number 1000000 represnts the number of free bytes of VM memory in
your printer, the last number of your printer line if was a PostScript printer
gives this amount in Kb, so multiplying this by 1000 will give you the correct
amount. If you are using Ghostscript to do your printing, then leave this
does not need modifying.

 If your printer has a resolution greater than 400dpi, it is better to send the
fonts to the printer as compressed bitmaps, if this applies to you remove the
% from the second line in

 % If you printer is greater than 400 dpi ...
 %Z

Phew, that's it for dvips configuration.

4:
 This will describe how to configure eps for printing onto plain dot matrix
printers, but it is not ready yet!!

5:
 This will describe how to configure dvi2xx for a variety of PCL printers,
however this is not yet ready either!!

6:
 Now create the directory that is going to hold your generated font files, this
should be

    /usr/local/lib/texmf/fonts/pk/<MODE>

where <MODE> is the Metafont mode of your printer.

7:
 Where nearly there now. You need to make the format and base files and there
symbolic links to virtex and virmf, and select the hyphenation patterns that
you are going to use. If you wish to typeset text in a language other than
English, then go to the directory

   /usr/lib/texmf/tex/babel

and edit the file language.dat setting the languages you want to use, and the
corresponding hyphenation patterns. Now go to the directory 

   /usr/lib/texmf/ini

and edit the file Makefile. At the top of the file there are a list of possible
files that can be made, edit this to suit you requirements, you also need to
select the hyphenation patterns to use. If you only want US English hyphenation
patterns you need do nothing, if (like me) you only plan to use English but
prefer to have British English hyphenation patterns, change the line

 language = hyphen.english     to       language = hyphen.british

everyone else change the line to

 language = hyphen.babel

Now just type make. This will generate all the appropriate format and base files,
with your local hyphenation patterns.

8:
 If the Metafont mode for your printer is not CanonCX then you will have to 
set the environment variable TEXFONTS apporpriatly. The best way to do this is
to edit the file /etc/profile file and insert the line

   TEXFONTS "/usr/local/lib/texmf/fonts/pk/<MODE>" ; export TEXFONTS

and the file /etc/csh.login and insert the line

   setenv TEXFONTS "/usr/local/lib/texmf/fonts/pk/<MODE>"

where <MODE> is the Metafont mode for your printer. If you printer has a 
resolution other than 300x300 dpi, then you need to insert the line

   TEXSIZES "a:b:c:d:e:f:g" ; export TEXSIZES

into /etc/profile and

   setenv TEXSIZES "a:b:c:d:e:f:g"

into /etc/csh.login this way each user will automatically have them set
correctly when they login.
 Where a is the base resolution of your printer, and b,c,d,e,f,g are the
resolutions obtained under the magsteps 0.5,1,2,3,4,5 for those who don't
now how to produce this then the two examples below are for 240 and 360 dpi
devices.

  240:262.9:288:345.6:414.7:497.6:597.1 
  360:394.3:432:518.4:622:746.4:895.7    

 If you device has a different resolution then the way to generate it is to use
the formula

  <base resolution>*(1.2^<magstep>)

for each of the magsteps in the list above.

 That's it you are ready to run TeX, but read the next step before proceeding.

9:
 Because there are so many Metafont modes, and the fonts for each mode are
different there are no distributed font files,
they are made automatically as required, however this can slow things down a
lot in the begining, so we have provided a method for you to generate some fonts for your
printer easily. To do this go to the directory /usr/lib/texmf/fontgen. This
directory contains a Makefile and some dvi files, you have three options:-

  'make few'            The ones that are preloaded by plain TeX

  'make some'           All the preloaded LaTeX fonts in addition.

  'make lots'           All the preloaded SliTeX fonts in addition.

As you move down the list each option takes progressively longer, and for
speed they are best run from the console (ie. without X running).


                            Happy TeXing!

