home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2086 / README < prev   
Encoding:
Text File  |  1990-12-28  |  28.3 KB  |  665 lines

  1.         PSROFF RELEASE 2.0 PL5 README 2.3 90/11/16
  2.  
  3.             May 14, 1990
  4.             Chris Lewis
  5.  
  6.     This alt.sources release is based at patch level 5 of psroff 2.0.
  7.  
  8.     defs.h contains the level at which the sources have been patched.
  9.     Previously, psroff 2.0 was only available via ftp.  If you had the
  10.     ftp version, I suggest you completely replace it with this one,
  11.     or, you can simply patch yours to this level - contact me for
  12.     patch 5.
  13.  
  14.     Please see the end of this file for my contact information
  15.     and for enrollment in the psroff mailing list.
  16.  
  17. Please read this document, especially any new patches (if any) near
  18. the end before reconfiguring.  If you have difficulties, read the
  19. TROUBLE file.  See STEP-BY-STEP INSTRUCTIONS near the end for precise
  20. installation details.
  21.  
  22. Normal UNIX troff only prints its output on WANG C/A/T Phototypesetters.
  23. This package contains a generic interface between standard troff and
  24. other types of printers.  The package has a driver for PostScript printers
  25. (Eg: Apple Laserwriters), a driver for HP LaserJet and DeskJet family
  26. printers (including incremental downloading of PK or SFP format fonts),
  27. and Ditroff output options (tpscript driving Postscript printers,
  28. jetroff driving HP Laserjets, xtroff driving X.11, xproof driving DMD
  29. terminals, psdit etc. and more to come...)
  30.  
  31. In fact, this package can be used to, in effect, upgrade CAT troff
  32. to be ditroff.  There are limitations, but you get what you pay for.
  33.  
  34. Applicability:
  35.     - You must have CAT troff, *not* ditroff (eg: *not* DWB 1.? or 2.?).
  36.     - Printers:
  37.     - If you have a laserjet, you should be able to use this
  38.       package directly.  Alternately, you can cause psroff
  39.       to generate ditroff and drive jetroff with it.
  40.     - I believe the above comments also hold true for DeskJet
  41.       printers.
  42.     - If you have a postscript printer use postscript output.
  43.       Or, generate ditroff and use tpscript.  Mine's better,
  44.       so there! ;-)
  45.     - If you have ditroff drivers (eg: dit2dvi etc.) you can
  46.       configure psroff to drive them.
  47.     - If you have real ditroff, then use ditroff and throw psroff
  48.       in the trash bucket.
  49.  
  50. Beware of the use of any ditroff-only-isms.  Psroff doesn't support
  51. features in ditroff but not CAT troff (yet...).
  52.  
  53. This is a formal release.  There are probably rough edges however,
  54. particularly with fine-tuning width tables for specific printers and
  55. some of the more esoteric ditroff configurations.  Further, there
  56. is some testing code for emulating ditroff drawing commands (see
  57. catconv).
  58.  
  59. I encourage people to experiment with psroff (particularly the configuration
  60. files) and PLEASE PLEASE PLEASE send me your changes so that I can
  61. encorporate them into new releases and updates.
  62.  
  63. This package is currently in production at our site and has been so for
  64. nearly two years (in various incarnations).  The previous version of
  65. psroff (version 1.0) was posted in comp.sources.unix in October 1989.
  66. This version is a lot better.
  67.  
  68. If you send me your name and e-mail address, I'll put you on the psroff
  69. mailing list, and you'll get express delivery of any small patches (see
  70. CONTACT INFO at end of this README).  Patches are also shipped out through
  71. comp.sources.unix and/or comp.sources.bugs, but the latency can be rather
  72. high at times.  A current list of FTP-access sites can be obtained by
  73. sending me mail.
  74.  
  75. Credit/copyright where credit's due:
  76.  
  77.  1) All code, except where noted below, is Copyright 1985, 1986, 1987,
  78.     1988, 1989, 1990 Chris Lewis, All Rights Reserved.
  79.  
  80.     Permission to copy and further distribute is freely given provided
  81.     this copyright notice remains intact and that this software is not
  82.     sold for profit.
  83.  
  84.  2) psdtwid and some of the character drawing and spacing
  85.     stuff (bracket font in ps.lib) is from ditroff2ps/tpscript:
  86.  
  87.     Copyright:    1985, Stephen Frede, UNSW Australia
  88.         Use it and copy it as much as you want, but don't pretend you
  89.         wrote it, or sell it for profit.
  90.  
  91.     Michael Rourke wrote some of the code that I borrowed.
  92.  
  93.     Excellent stuff.
  94.  
  95.  4) There are a few minor tweaks (specifically: headers on font width
  96.     tables, and BSDHACK) influenced by David MacKenzie's (djm@wam.umd.edu or
  97.     edf@rocky2.rockefeller.edu) and Sverre Froyen's (boulder!fesk!sverre,
  98.     sunpeaks!seri!fesk!sverre) troff2lj package.  No code was directly
  99.     borrowed, and no copyright appears on the sources consulted.
  100.     (troff2lj downloads SFP's, not incrementally, and doesn't support
  101.     PK files)
  102.  
  103.  5) The S.*.pk font files that I've distributed with this release are
  104.     MATH8 encoded PK fonts, which are combination of several things:
  105.  
  106.     - characters from Donald Knuth's cmr, cmsy, cmmi TeX fonts.
  107.       These are public domain.
  108.  
  109.     - Rick Richardson's cmtrf font (bracket building characters)
  110.       from jetroff which Rick has graciously permitted me to
  111.       distribute provided that they are only used with psroff.
  112.  
  113.     - Each S.*.pk file was created by converting them to SFP's,
  114.       merging them into another SFP (using Ronald Florence's makeS
  115.       program), and converting them back to PK's using Rick
  116.       Richardson's sfp2pk program (included in jetroff), and
  117.       also available from the mims-iris font archives at waterloo.
  118.  
  119.       Sorry, I cannot distribute either program, but pk2sfp can
  120.       be used to merge font files more generally than makeS.
  121.  
  122.       See LASERFONTS on how to build psroff fonts from TeX PK's.
  123.  
  124.  6) The manual page for CAT troff format was written by Henry Spencer
  125.     at the University of Toronto.  Without which this stuff would
  126.     never have been written.
  127.  
  128. Remarks:
  129.  
  130.     - This was developed with a relatively old (eg: Lisa Xenix) troff, and
  131.       may be slightly incompatible with the latest versions of CAT troff.
  132.       See BSDHACK and FONT8/FONT4 in defs.h
  133.  
  134.     - The PostScript driver is fully complete.  It uses the
  135.       built-in fonts on the AppleLaser.  A few characters not in
  136.       these fonts are faked by the invocation of drawing routines
  137.       defined in the file "ps.lib" (which is the definitions of things
  138.       needed by the driver).  Or the bracket font (also in ps.lib).
  139.       Eg: 1/2, 1/4, 3/4, circle, bell system logo and box are
  140.       constructed by PostScript subroutines and/or the bracket font.
  141.       The Bell System logo isn't really - try this:
  142.  
  143.         \s36\(bs\s0
  144.  
  145.       The first person to correctly identify what it is (without reading
  146.       ps.lib) gets a pat on the back ;-)
  147.  
  148.       The only two characters that don't exactly map properly are
  149.       left and right hand.  I use double arrows instead.  This seems
  150.       to be a relatively common convention.
  151.  
  152.     - The ditroff driver is fully complete and should work flawlessly
  153.       provided that you use the proper width tables and you get the
  154.       troff font:character -> ditroff font:character translations
  155.       right.  You will probably want to take the ditroff width tables
  156.       that come with your ditroff backend and run them through
  157.       gfnttab (discussed later).
  158.  
  159.     - Fonts:
  160.     - postscript driving - psroff uses what's on the printer - the
  161.       configuration (ps.fonts) supplied corresponds to a subset
  162.       of the AppleLaserwriter PLUS.  This should be satisfactory
  163.       with all modern postscript printers (the original Laserwriter
  164.       apparently is missing some of the fonts).  You may have
  165.       problems with Helvetica Narrow fonts on printers like LN03's.
  166.  
  167.     - ditroff driving - psroff uses whatever comes with the ditroff->
  168.       printer converter.  Eg: with xtroff, psroff would use the
  169.       font files that come with X windows.  With jetroff, psroff
  170.       would use the font files that come with jetroff, etc.
  171.       If you're driving a postscript printer via a ditroff backend,
  172.       chances are that you're using fonts on the printer (eg: tpscript)
  173.       and the "ps" widths will be satisfactory or can be manually
  174.       tweaked slightly.
  175.  
  176.     - HPLJ: to support downloading, you must obtain a set of font
  177.       files that are sufficient for the sort of stuff you are doing.
  178.       psroff has been designed to work with MATH8 encoded fonts
  179.       (for the CAT S font), and ROMAN8 encoded fonts for all others
  180.       (eg: R, I, B etc.).  Minimally, you should obtain from Hewlett
  181.       Packard (or other sources) Roman, RomanItalic, and RomanBold
  182.       all in ROMAN8 encodings, in the following point sizes:
  183.  
  184.          6 7 8 9 10 11 12 14 16 18 20 22 24 28 36
  185.  
  186.       From most sources these will be in HP "SFP" format.  I've
  187.       included with psroff a set of PK (TeX) format font files
  188.       for the S font in all of the sizes listed above.  These
  189.       "S" fonts are designed to be as close to HP MATH8 as possible.
  190.  
  191.       Psroff supports both PK and SFP format font files.
  192.       Normal PK font files (eg: that come with TeX) do not have
  193.       anything close to the same encoding as HP.  The S PKs I supply
  194.       are specially reordered (actually a merge of four PKs) to
  195.       reflect MATH8 encoding.  You can also use TeX PK fonts
  196.       directly (after a name change to reflect psroff's file
  197.       naming conventions) for the non-S fonts.  cmr, cmit, and
  198.       cmb can be used for Roman, Italic and Bold respectively.
  199.       *BEWARE*, there are a *lot* of characters missing or
  200.       out-and-out wrong in Knuth's standard PK files (relative
  201.       to ROMAN8 ordering).  Particularly box-drawing characters.
  202.       I've included a couple R, I and B PK files that can be used
  203.       to have a bit of fun until you have better font files.
  204.       pk2sfp gives a method of merging PK files - see testmerge
  205.       entry in utils/Makefile.  R.10.pk, I.10.pk and B.10.pk
  206.       in the lj.fonts directory were created this way.
  207.  
  208.       From Hewlett Packard, SFP's usually come on DOS diskettes
  209.       that can be "cat"'ed to the printer.  These are what you want.
  210.       Just remember to do BINARY copies from the floppies...
  211.  
  212.       I got this mail message from Ronald Florence about HPLJ fonts:
  213.  
  214.         > May 14, 1990 (or thereabouts)
  215.  
  216.         > I just received a notice in the mail from HP, announcing
  217.         > that they are about to discontinue the following soft
  218.         > fonts:
  219.  
  220.         >     TmsRmn/Helv    Roman 8        (33412AD)
  221.         >     TmsRmn/Helv    Roman 8        (33412AF)
  222.         >     TmsRmn/Helv    Ascii        (33412AE)
  223.  
  224.         > Together, the first two sets provide Times Roman and
  225.         > Helvetica SFP fonts, including bold and italics, from
  226.         > 6 to 30 points.  They can be ordered from HP Direct
  227.         > (800/538-8787).
  228.  
  229.       These are the fonts that Ronald has been using and they work
  230.       quite well.  Other soft fonts will probably work, but you
  231.       may have to tweak the translation tables.
  232.  
  233.       So, order yours today...  (No, neither of us are in the
  234.       employ of HP).  You may also be able to get good SFP's
  235.       from the font archive at Waterloo.
  236.  
  237.       Alternately, if you have TeX fonts, the file LASERFONTS
  238.       describes how to make fonts compatible with psroff.
  239.  
  240.       Software is supplied (utils and widths directories) to
  241.       extract width information from PK and SFP font files and
  242.       is built into the makefiles.
  243.  
  244.     - The width tables supplied (widths/widthps) are in ditroff
  245.       makedev-input-format (ASCII ditroff width tables).  I've
  246.       specified them in ditroff format because it's easier to manipulate
  247.       than CAT troff ft?? or ft??.c files.  dit2catwid/gfnttab convert
  248.       these width files into ft?? files.  Further, if you're going to
  249.       use a ditroff backend (tpscript, xtroff etc.) you'll probably
  250.       need to feed them through the "makedev" utility so that the backend
  251.       can understand the width tables.  I do not supply a makedev, but
  252.       one has been posted, and one (written by Duane Hesser, dhh@teltone.com)
  253.       is included with jetroff.  pk2ditwid takes PK and SFP files and
  254.       produces widthtables compatible with gfnttab (but not necessarily
  255.       with makedev).
  256.  
  257.     - Width tables: Postscript:
  258.       (<printercommand> is how you sent output to your
  259.       postscript printer.  You might use "lp -dlaserwriter".)
  260.       These are in the utils subdirectory:
  261.  
  262.     showfont: If you type:
  263.                 showfont <fontname> | <printercommand>
  264.           (eg: showfont Times-Roman) this will dump the entire
  265.           Postscript Times-Roman font (plus some constructions
  266.           that troff2ps uses) in a table.  Each character is
  267.           in a box, along with several numbers.  The number
  268.           in the center at the bottom of the box is the width
  269.           in CAT scaling (size of 6 point character in 1/432's).
  270.           The ditroff width tables are the size of a 10 point
  271.           character, by default in 1/300's, but can be changed
  272.           by a resolution directive in a DESC file (eg: widthps
  273.           is in 1/720's).
  274.  
  275.     dit2catwid.c: takes ditroff like font tables and converts them
  276.           to CAT codes suitable for (at least) Xenix troff.
  277.           (some attempt has been made to make it work for
  278.           systems that need a.out.h headers on their width
  279.           tables).  See the gfnttab script to see how it's
  280.           used.
  281.  
  282.     gfnttab:  Used to run dit2catwid to compile the width tables
  283.           and place them in /usr/lib/font/<printer>/ft??.
  284.           see lib/psrofflib.S
  285.  
  286.     psdtwid:  fire it off to your Postscript printer, and it
  287.           will send back a shar file containing ditroff
  288.           style char tables.  (Neat - thanks Michael!)
  289.  
  290.           usage:
  291.             psdtwid | <printercommand>
  292.  
  293.     widths/widthps/*:   width tables for postscript and ditroff driving
  294.           postscript.  (Most from tpscript (thanks Michael), but
  295.           some generated here with psdtwid)
  296.     widths/width*/*:   other width tables.
  297.  
  298.     - Width tables: ditroff backends: (eg: jetroff, xtroff, psdit etc.)
  299.     - install the backends *first*.
  300.     - Find the DESC/R/S/I etc. files that come with the backend, or
  301.       are generated by installing the backend (eg: jetroff's makefont
  302.       stuff).
  303.     - Copy these files to the appropriate widths/width<xx> subdirectory.
  304.       Notes:
  305.         - I've used "jt" for jetroff, the jt.fonts file is already
  306.           at least partially set up.
  307.         - "ps" is for ditroff->postscript (tpscript) and direct
  308.           postscript driving and these width files are supplied.
  309.           And would probably work with other ditroff->postscript
  310.           converters except for possible character mapping changes
  311.           (see jt.fonts).
  312.     - Make in the widths directory will build the ft* files that you
  313.       need, and make install will install them in the proper places.
  314.       (normally /usr/lib/font/<xx>/ft*).  These are also done by
  315.       top level make invocations.
  316.     - Some ditroff backends (jetroff f'r instance) need to be able
  317.       to read the "makedev compiled" font files.  For which you need
  318.       makedev (makedev is part of ditroff, but a PD version was
  319.       posted to the net sometime ago and a copy is included in the
  320.       jetroff release).
  321.  
  322.     - Width tables: HPLJ.  See the installation instructions below.
  323.  
  324.     - There is some code to allow the sending of arbitrary commands to
  325.       the driver - the ".sR" macro.  This works well unless you're using
  326.       the ".MT" macro in MM.  sR directives before the ".MT" will
  327.       confuse MM.  See the manual page for psroff.1 for details on
  328.       .sR.  Further, ".tm" has been redefined to make use of the
  329.       .sR facility.
  330.  
  331.     - psroff has 8-font troff support, but:
  332.  
  333.         a) it's never been tested.
  334.         b) I'm no longer convinced that the cat.5 man page is
  335.            correct on how the decoding works.
  336.  
  337.     - psroff has BSDHACK support (one of the tilt opcodes being
  338.       replaced by an opcode to multiply the next vertical motion
  339.       by 64), but this has not been tested.  I never heard of it
  340.       before til I saw it in Froyen's troff2lj source.  This cannot
  341.       be defined at the same time as 8-font support.  Frankly, I
  342.       can't understand why they bothered - so you save a few opcodes
  343.       here and there - vcat output is enormous!
  344.  
  345.     - ".S" files are the source files and are converted to a filename
  346.       without the suffix by a sedscript that contains the configuration.
  347.       Whenever you touch the top-level makefile, the sedscript is changed
  348.       and all of the ".S" files are rebuilt.  If you make a makefile change
  349.       (eg: configuration), do a "make makefiles" before using submakes.
  350.       (though, if you simply say make, this will be done for you).  Only
  351.       change .S files...
  352.  
  353. See the MANIFEST for a file-by-file description of the files.
  354.  
  355. STEP-BY-STEP INSTRUCTIONS (after unpacking the release):
  356.  
  357.     - Use /usr/bin/s5make on Ultrix.
  358.  
  359.     - NOTE: You may wish to try running "make check" at this
  360.       point, it should be able to find out the correct "HEADERSIZE"
  361.       and "trofftype" setting so you don't have to guess later on.
  362.       In any event, if you have problems and wish to ask me for help,
  363.       I will be requiring that you mail me a copy of the output
  364.       of "make check".
  365.  
  366.     - type "make unpackljfonts"  This will uudecode the font
  367.       files I've supplied and remove the .UU files.  This
  368.       step is unneccessary if you're not using Laserjets,
  369.       but it will regain you some space.
  370.  
  371.     - take a copy of the Makefile, defs.h and lib/psrofflib.S and
  372.       squirrel them away somewhere.  I'm not going to produce
  373.       patch-independent configurators, so if a patch has to come
  374.       out, they may well zap these three files.  If so, you'll
  375.       have to fix them manually.  Other files (lib/*.fonts and
  376.       lib/*.lib) are field-configurable, and it is possible I
  377.       will patch a few of them later (particularly lj.fonts).
  378.  
  379.     - If you are using the supplied width tables (widths/widthps),
  380.       all is fine.  But, if you're going to be driving another
  381.       package (eg: jetroff, tpscript, psdit, xtroff etc.) I suggest
  382.       you find the ditroff-format ASCII width tables (DESC, R, I,
  383.       S etc.), copy them to the appropriate widths/width<xx> area,
  384.       modify psrofflib.S to know how to use these width tables,
  385.       and possibly create *.fonts and *.lib files.  psrofflib.S
  386.       has copious comments on how to configure psroff.
  387.  
  388.       psdit, tpscript, xtroff, and xproof work reasonably well using
  389.       the Postscript widths in widthps.
  390.  
  391.     - edit Makefile and change whatever you need to.
  392.  
  393.     - edit defs.h and define either BSD or ATT.  A few other options will
  394.       pertain to you.  Take special note of HEADERSIZE.  Take a look
  395.       at /usr/lib/font/ftR.  Is it 224 bytes long?  If so, HEADERSIZE
  396.       should be 0.  Otherwise you will probably have to set it to the
  397.       size of your a.out.h structure.  Ultrix and Sun appear to always
  398.       be HEADERSIZE = 32.
  399.  
  400.       With Laserjet driving:
  401.  
  402.         MDLF    max # downloaded fonts supported per page.
  403.             LJ+ have this as 16.  Later models support more.
  404.         PRELOAD    # fonts statically downloaded.
  405.         SFP        enables SFP's with incremental font downloading.
  406.             Needs INCR.
  407.         INCR    enable incremental font downloading.  Needs PARTIAL.
  408.         PARTIAL    enable partial font downloading (only those characters
  409.             troff could possibly use are downloaded).  Needs PK.
  410.         PK        enables PK font handling.  If PK is off, the only
  411.             downloading supported is "cat <sfpfile>".
  412.         COMPRESS    permits you to compress SFP files.
  413.  
  414.         Why all this config?  Well, when INCR is defined up to 16 fonts
  415.         could be incore at any given moment, which can chew up a lot
  416.         of space (especially with large pointsize SFP's).  I very
  417.         much doubt that you can use INCR on a 64K address space machine.
  418.         (or even split I&D!)  But you really *do* want to use INCR,
  419.         otherwise you might blow the Laserjet's memory, and use of INCR
  420.         *dramatically* decreases the transmission time to the printer.
  421.  
  422.         If INCR not defined, at most only one font will be in core.
  423.  
  424.         If PARTIAL is defined, only those characters that troff *could*
  425.         use (remember ROMAN8 and MATH8 fonts have 192 characters each,
  426.         but R and S have less than 108 each) are loaded into memory,
  427.         and only they are downloaded to the Laserjet.  This cuts down
  428.         the amount of laserjet memory used for fonts by about half,
  429.         and also cuts down transmission time.
  430.  
  431.         If PARTIAL is undefined, whole PK or SFPs are downloaded.
  432.         if PK is undefined, only whole SFP's are downloaded.
  433.  
  434.         Certain HPLJ clones will apparently not work with incremental
  435.         downloading.  If your printer screws up, undef INCR, but
  436.         make sure you have PARTIAL turned on and try again.
  437.  
  438.     - edit lib/psrofflib.S according to the instructions you find.
  439.       Take special note of -T/-F handling for troff (trofftype) -
  440.       check out your troff manual page!  Suns and Ultrix want
  441.       trofftype='-F/usr/lib/font/$width/ftXX'.
  442.  
  443.     - If you're going to be driving HP Laserjets:
  444.  
  445.       If you have PK fonts from TeX, ensure that PKFONTS is set
  446.       reasonably in the Makefile.  type:
  447.  
  448.         make buildljfonts
  449.  
  450.       This will generate under $NEWFONTS a whole pile of
  451.       SFP's (PK's if SFP2PK is set to a good sfp2pk program,
  452.       such as Rick Richardson's jetroff utility).  It will
  453.       also generate a $NEWFONTS/lj.fonts.new whose entries
  454.       should be *merged* (not copied) with lib/lj.fonts.
  455.       buildljfonts will generate a fair number of things,
  456.       so you may have to fix your Makefile/defs.h configuration.
  457.       Caution: if you have a lot of PK's, this will use up a LOT
  458.       of space - 5000 blocks or more!
  459.  
  460.     - if you're going to be driving HP Laserjets, type:
  461.  
  462.         su root
  463.         make installljfonts
  464.  
  465.       This will attempt to copy the fonts I've supplied plus
  466.       any created in the previous step to the $LJF directory.
  467.  
  468.     - Type
  469.         make check
  470.  
  471.       This will attempt to figure out whether you got some of the
  472.       more important options correct (trofftype & HEADERSIZE).
  473.  
  474.     - Type
  475.  
  476.         make
  477.  
  478.       This will build everything (including width tables for any
  479.       HPLJ fonts you have supplied).
  480.  
  481.     - If you want to test psroff without actually installing it,
  482.       you will have to install the width tables (because troff's
  483.       limited as to where it will look for the width tables).
  484.       As root,
  485.         make installwidths
  486.       Will install the widths as FONTDIR/ps/ftXX (which shouldn't
  487.       conflict with anything you already have, and you'll be
  488.       able to run "make test" without doing the "make install" first.
  489.       Actually, psroff will work without this being done, but it
  490.       will use the width tables that came with your troff, so the
  491.       output will look a little odd (along with giving you a warning
  492.       to that effect)
  493.  
  494.     - Final installation:
  495.       As root,
  496.         make install
  497.         make installwidths
  498.       Will install everything.
  499.  
  500.     - "make test" will print a test page.  If you have problems,
  501.       please run "make test", fill in the blanks, and FAX me the
  502.       result.  (the test page has the fax number).  The test page
  503.       exercises all R & S troff characters at 10 point, and displays
  504.       a few other characters at different point sizes.  If you don't
  505.       want to run psroff itself (eg: you've got troff2ps in a printer
  506.       daemon), type:
  507.  
  508.         make TEST
  509.         tbl TEST | troff -t -T<whatever> | <troff2ps server>
  510.  
  511.       "<troff2ps server>" may be "troff2ps -T<whatever> | your printer".
  512.  
  513.       "TEST" is generated via make to include some information about
  514.       your configuration to help me diagnose your problems.
  515.  
  516.     - If you have problems, read the TROUBLE file which describes
  517.       some trouble-shooting.
  518.  
  519.     - HPLJ tuning:
  520.         bestmatch: in lj.c's bestmatch function there is are arrays
  521.         "bigtry" and "smalltry".  These arrays provide a scan
  522.         sequence finding a font size "close" to a requested font
  523.         size that lj.fonts indicates isn't present.  If there
  524.         are holes in your fonts, you may want to experiment with
  525.         these arrays.
  526.         tbl box corners: depending on where you got your fonts from,
  527.         you may have to slightly adjust the box drawing characters
  528.         to match up at the corners of tbl boxes.  To do this,
  529.         append to lj.fonts:
  530.  
  531.             normal
  532.             ru N _ 0 -200
  533.             symbol
  534.             br N | -220 0
  535.  
  536.         The two numbers are the X and Y shifts of the corresponding
  537.         characters, where the numbers are scaled by (.01 * pointsize)
  538.         to get a shift in 1/720'ds.  Adjust these (carefully examine
  539.         tbl output to decide whether you want to move ru or br).
  540.  
  541.         The distributed defaults (which are shown here) are suitable
  542.         for HP Times-Roman font floppies.
  543.  
  544.         - performance: you can preload commonly used fonts into your
  545.           laserjet and thereby greatly reduce transmission time.
  546.           Consult the manual page for pk2sfp about the -P, -i, -S and -p
  547.           options (don't forget to mark the pointsizes you've downloaded
  548.           as "b" in the lj.fonts file).
  549.  
  550.     - ditroff tuning: Many of the ditroff converters have slightly
  551.       different correspondences between what character is in what
  552.       font.  You may want to modify the *.fonts file that you're
  553.       using to make sure that every character you want is being
  554.       printed correctly.  As an example, with tpscript "@" and
  555.       "^" aren't S font characters - they're in the normal fonts,
  556.       but the dt.c table says they're "symbol".  To tune for
  557.       tpscript:
  558.  
  559.         - modify psrofflib to have "-ptp" option to troff2ps (t2arg).
  560.         - copy dt.fonts to tp.fonts (in LIBDIR/lib).
  561.         - append to tp.fonts the following font override sequence:
  562.  
  563.         symbol
  564.         ^    N
  565.         @    N
  566.  
  567.       psdit and xtroff appear to require the same things to be done
  568.       for "^" and "@" (psdit prints nothing without these, and xtroff
  569.       prints some other characters instead).
  570.  
  571.       Jetroff requires similar things, and jt.fonts has a more
  572.       extensive example of this.  Font overrides are documented
  573.       more completely next:
  574.  
  575.     - If you want to play around with character mappings.....
  576.       Eg: adding accents for your own language (ie: German)
  577.       The most important thing to remember is that you cannot extend
  578.       the CAT's character sets without modifying troff - unlike ditroff
  579.       where you can add them by changing the makedev files.  This
  580.       is how you do overrides:
  581.  
  582.         - Put in a map override in the appropriate *.fonts file that
  583.           emits the character you want in place of a character you
  584.           don't need in the appropriate *.fonts file.  Eg: for
  585.           "germandbls" in ditroff, emit "ss" instead of "ct" for
  586.           the cent character.  Your override (in dt.fonts) would
  587.           look like:
  588.  
  589.         ct N ss
  590.  
  591.           The complete override format is:
  592.  
  593.         <troffchar> N|S|n <sequence> <x adjust> <y adjust> <scale>
  594.  
  595.           x adjust, y adjust, scale default to 0, 0 and 100 respectively.
  596.           x and y adjust are multiplied by .01, then the pointsize
  597.           and of the output driver to give the shift factor in
  598.           1/resolution units.  Scale allows you to change the size
  599.           of that one character (eg: you think bullet is too small), but
  600.           it isn't recommended too much (it may not work reasonably
  601.           on non-postscript drivers).  Again, scale is prescaled by
  602.           .01 first, so 100 is 1-1.
  603.  
  604.           <sequence> defaults to <troffchar>.  N means normal mapping
  605.           (eg: for fonts other than S with no cross font jumping),
  606.           S means symbol font, and "n" means specific font (usually >3 -
  607.           eg: special bracket fonts).
  608.  
  609.         - Modify the width table for the character you're replacing
  610.           to have the width for the character you're emitting.
  611.           Eg: for germandbls in ditroff, replace the "ct" entry's
  612.           width in widths/widthps/R with the width for "ss".  This
  613.           latter step is not necessary with laserjets because the
  614.           build procedure builds a new width table using the
  615.           remapping.
  616.  
  617.     - Adding fonts after installation:
  618.     - New Laserjet fonts should be installed in the $LJF directory.
  619.     - Non-laserjet fonts should have their ditroff width table placed
  620.       in the proper widths/width?? directory.
  621.     - Ensure that the appropriate lib/*.fonts file contains the fonts
  622.       you're adding.
  623.     - at the top level, type:
  624.         make register
  625.     - then
  626.         su root
  627.         make installwidths
  628.  
  629. Future directions:
  630.  
  631. You may have noticed a compile flag called "OPT" which is defined in
  632. the distributed version of defs.h.  If enabled (via -Z/W), this enables the
  633. experimental optimizer that I'm working on.  It works well with Postscript
  634. output, but not with laserjet unless the fonts you use are VERY good.
  635. It's disabled by default.  The optimizer does two things: it emits as many
  636. characters as it can as one print directive, rather than one CAT code
  637. per print.  On postscript and HPLJ's this is a BIG win (printer execution
  638. speeds 3 or more times faster), but it won't work with ditroff.  The
  639. optimizer requires access to the CAT troff width tables, and if troff2ps
  640. can't find them, it simply doesn't optimize.  The other thing the optimizer
  641. does is enable a new backend transmission feature (\(bs\(bs<directive>\(bs)
  642. which will ultimately *replace* the ".tm M<directive>" feature.  Once
  643. this occurs, troff stderr can unmerged with stdout, psfig will work better,
  644. and special directives will no longer require breaks.  And, I might
  645. be able to emulate \X better, and maybe even (gasp) \D and friends.
  646.  
  647. The intent is, that when I'm satisfied with the optimizer, possibly after
  648. some patching), I can either ship a patch that explicitly makes it default,
  649. or tell you to do it manually in the patch preamble.  Stay tuned.
  650.  
  651. CONTACT INFO:
  652.  
  653.     Chris Lewis
  654.     Elegant Communications Inc.
  655.     481 University Avenue, Suite 602
  656.     Toronto, Ontario, Canada
  657.     Voice Phone: Canada (416)-595-5425
  658.     FAX: Canada (416)-595-5439
  659.     Userid's for e-mail contact:
  660.     Psroff enquiries/help/mailing list enrollment: psroff-request
  661.     Non-psroff mail only: clewis
  662.     UUCP routing: {uunet!attcan,utzoo}!lsuc!eci386!<userid>
  663.     Possible internet routing: lsuc!eci386!<userid>@uunet.uu.net
  664.     Alternates: <user>@eci386.uucp
  665.