home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume24 / psroff3.0 / part01 / README < prev   
Encoding:
Text File  |  1991-10-09  |  20.4 KB  |  444 lines

  1.         PSROFF RELEASE 3.0 README 2.17 91/04/02
  2.  
  3.             Feb 19, 1991
  4.             Chris Lewis
  5.  
  6. Please see the end of this file for my contact information.  If you have
  7. problems installing/using this software, please contact me - I REALLY MEAN
  8. it - that's why I include my phone number.
  9.  
  10. Please read this document before configuring.  If you have difficulties,
  11. read the TROUBLE file.  See the INSTALL file for explicit installation
  12. instructions.  See the LICENSE file for the copyright restrictions on
  13. this software.
  14.  
  15. Note that the name "psroff" clashes with a program contained in Adobe
  16. Transcript and has caused endless confusion on the net.  To prevent
  17. confusion, please refer to this package on the net as "Chris's psroff",
  18. or "non-Adobe psroff", or "psroff (not Transcript)" so that people will
  19. know what you're talking about.  This software was unfortunately named
  20. psroff accidentally, long before I knew that there was a thing called
  21. psroff in Transcript.  Adobe is aware of the situation, but provided that
  22. everybody is clear about which one they mean, there won't be a problem.
  23.  
  24. Normal UNIX troff only prints its output on WANG C/A/T Phototypesetters.
  25. This package contains a generic interface between standard troff and
  26. other types of printers.  The package has a driver for PostScript printers
  27. (Eg: Apple Laserwriters), a driver for HP LaserJet and DeskJet family
  28. printers (including incremental downloading of PK or SFP format fonts),
  29. and Ditroff output options (tpscript driving Postscript printers,
  30. jetroff driving HP Laserjets, xtroff driving X.11, xproof driving DMD
  31. terminals, psdit), Sun PageView driving X windows, Display Postscript on
  32. NeXT, DEC Windows and IBM RS/6000.
  33.  
  34. In fact, this package can be used to, in effect, upgrade CAT troff
  35. to be ditroff.  There are limitations (listed near the end), but you get
  36. what you pay for.
  37.  
  38. Not only that, but this release supports ditroff *input*
  39. too.  Therefore, if you have any kind of troff, this will work for
  40. you.
  41.  
  42. Applicability/additional requirements:
  43.     - You must have a troff - ALL versions of troff work with this
  44.       software (CAT troff, ditroff, and groff).
  45.     - Printers:
  46.     - If you have a laserjet, you should be able to use this
  47.       package directly.  Alternately, you can cause psroff
  48.       to generate ditroff and drive jetroff with it.
  49.       If you're going to drive the printer directly, you'll
  50.       need additional fonts.
  51.     - I believe the above comments also hold true for DeskJet
  52.       printers.
  53.     - If you have a postscript printer use postscript output.
  54.       Or, generate ditroff and use tpscript.  Mine's better,
  55.       so there! ;-)
  56.     - If you have ditroff drivers (eg: dit2dvi etc.) you can
  57.       configure psroff to drive them.
  58.     - If you have a HPLJ III, this release comes with width
  59.       tables for the built-in fonts.
  60.     - If you're intending to use ditroff *input*, you should ensure
  61.       that you have makedev, or the PD makedev clone "mkfont" from
  62.       comp.sources.unix in 1988.  There was a bug in mkfont which
  63.       bites on some machines, if your ditroff doesn't like the
  64.       width tables mkfont generates, contact me, I have a teensy patch
  65.       for it.
  66.     - psxlate has support for n-up printing in Postscript.  For this
  67.       you will also need the psnup distribution from comp.sources.misc
  68.       (volume 16).
  69.  
  70. Beware of the use of any ditroff-only-isms when you're using
  71. CAT troff with psroff.  However, when used with ditroff, psroff
  72. should be fully functional.
  73.  
  74. This is a formal release.  There are probably rough edges however,
  75. particularly with fine-tuning width tables for specific printers and
  76. some of the more esoteric ditroff configurations.  Further, there
  77. is some testing code for emulating ditroff drawing commands when
  78. used with CAT troff (see catconv).
  79.  
  80. I encourage people to experiment with psroff (particularly the configuration
  81. files) and PLEASE PLEASE PLEASE send me your changes so that I can
  82. encorporate them into new releases and updates.
  83.  
  84. This package is currently in production at our site and has been so for
  85. over three years (in various stages of development).  By all
  86. appearances, this software is also in serious production in 100's
  87. of sites throughout the world.  The first version of psroff
  88. (version 1.0) was posted in comp.sources.unix in October 1989.
  89. Psroff release 2.0 was posted to alt.sources in November 1990.
  90. An extremely primitive program called "lcat" was the original precursor,
  91. it was posted to mod.sources in 1984 (which is why the copyrights go
  92. so far back).
  93.  
  94. Please note: I have discontinued the mailing list, because nothing
  95. ever went out on it.
  96.  
  97. Patches are shipped out through comp.sources.bugs and alt.sources.
  98. A current list of FTP and UUCP access sites can be obtained by
  99. sending me mail.
  100.  
  101. Credits:
  102.  
  103. The MANY people who've helped me get psroff working on a wider range
  104. of platforms and printers than I would have thought possible.  Elegant
  105. Communications for letting me do this, Ron Florence for assistance far
  106. beyond the call of duty in getting Laserjet driving to work,
  107. Rick Richardson of PC Research, Liam Quin of SoftQuad, Mark Moraes at
  108. U of Toronto, Dave Cahlander at Amdahl, Henry McGilton (and Pageview
  109. support) at Sun, Ronald Khoo at ibmpcug.uk, N K Krishnan for supplying
  110. the HP LJIII widths in TFM format, and Adobe for not getting too upset
  111. about the (accidental) name clash.
  112.  
  113. Remarks:
  114.  
  115.     - This was originally developed with a relatively old (eg: Lisa Xenix)
  116.       CAT troff, and may be slightly incompatible with the latest versions of
  117.       CAT troff.  See BSDHACK and FONT8/FONT4 in defs.h, however, I've yet
  118.       to see a version of troff that needs either BSDHACK or FONT8.
  119.  
  120.     - This supports some of the newer drawing commands available in
  121.       groff and later versions of ditroff (eg: RS/6000)
  122.  
  123.     - The PostScript driver is fully complete.  It uses the
  124.       built-in fonts on the AppleLaser.  A few characters not in
  125.       these fonts are faked by the invocation of drawing routines
  126.       defined in the file "ps.lib" (which is the definitions of things
  127.       needed by the driver).  Or the bracket font (also in ps.lib).
  128.       Eg: 1/2, 1/4, 3/4, circle, bell system logo and box are
  129.       constructed by PostScript subroutines and/or the bracket font.
  130.       The Bell System logo isn't really - try this:
  131.  
  132.         \s36\(bs\s0
  133.  
  134.       The first person to correctly identify what it is (without reading
  135.       ps.lib) gets a pat on the back ;-)
  136.  
  137.       Two characters that don't exactly map properly are left and right
  138.       hand.  I use double arrows instead.  This seems to be a relatively
  139.       common convention.
  140.  
  141.       There are some facilities for downloading postscript fonts (see
  142.       HW in ps.fonts)
  143.  
  144.     - The ditroff driver is fully complete and should work flawlessly
  145.       provided that you use the proper width tables and you get the
  146.       troff font:character -> ditroff font:character translations
  147.       right.  You will probably want to take the ditroff width tables
  148.       that come with your ditroff backend and run them through
  149.       gfnttab (discussed later).
  150.  
  151.     - The ditroff *input* handler is quite new, and hasn't been
  152.       tested all that extensively.  Preliminary results seem to
  153.       suggest that it does work, but documentation is scanty,
  154.       and there's not much in the way of automated install or
  155.       configuration checking for real ditroff.  See the DITROFF
  156.       file for additional information.
  157.  
  158.     - Fonts:
  159.     - postscript driving - psroff uses what's on the printer - the
  160.       configuration (ps.fonts) supplied corresponds to a subset
  161.       of the AppleLaserwriter PLUS.  This should be satisfactory
  162.       with all modern postscript printers (the original Laserwriter
  163.       apparently is missing some of the fonts).  You may have
  164.       problems with Helvetica Narrow fonts on printers like LN03's.
  165.  
  166.       There are ways of building new fonts and downloading them.
  167.       See pk2ps and the HW definitions in ps.fonts.
  168.  
  169.     - ditroff driving - psroff uses whatever comes with the ditroff->
  170.       printer converter.  Eg: with xtroff, psroff would use the
  171.       font files that come with X windows.  With jetroff, psroff
  172.       would use the font files that come with jetroff, etc.
  173.       If you're driving a postscript printer via a ditroff backend,
  174.       chances are that you're using fonts on the printer (eg: tpscript)
  175.       and the "ps" widths will be satisfactory or can be manually
  176.       tweaked slightly.
  177.  
  178.     - HPLJ: to support downloading, you must obtain a set of font
  179.       files that are sufficient for the sort of stuff you are doing.
  180.       psroff has been designed to work with MATH8 encoded fonts
  181.       (for the CAT S font), and ROMAN8 encoded fonts for all others
  182.       (eg: R, I, B etc.).  Minimally, you should obtain from Hewlett
  183.       Packard (or other sources) Roman, RomanItalic, and RomanBold
  184.       all in ROMAN8 encodings, in the following point sizes:
  185.  
  186.          6 7 8 9 10 11 12 14 16 18 20 22 24 28 36
  187.  
  188.       From most sources these will be in HP "SFP" format.  I've
  189.       included with psroff a set of PK (TeX) format font files
  190.       for the S font in all of the sizes listed above.  These
  191.       "S" fonts are designed to be as close to HP MATH8 as possible.
  192.  
  193.       Font sources:
  194.         - PC Research's Jetroff font distribution (comp.sources.unix &
  195.           uunet).  Free (actually shareware).  Will give you 4 or 5 complete
  196.           sets of fonts at all useful sizes.  See INSTALL and LASERFONTS.
  197.           Probably good enough to use with the optimizer.
  198.         - TeX PK fonts: will generate 6 or more complete sets of fonts,
  199.           at all useful sizes, but some of the fonts will be slightly
  200.           off in size.  Not good with the optimizer unless you can fire
  201.           up metafont.
  202.         - HP Soft fonts: HP font floppies are a good source of very
  203.           nice looking fonts.
  204.         - New HP product: there is a new package from HP which has a "street
  205.           cost" of about $40 which includes several scalable typefaces and
  206.           a PC program to generate them as SFP's at any size you want.
  207.           THIS is the way to go.  Note that the Laserjet III personality
  208.           for psroff uses Latin-1 and Math-8 and several other fonts to
  209.           get a complete troff set, as opposed to Roman-8 and a fake
  210.           Math-8 for laserjet + and laserjet II.  If you get the scalable
  211.           typefaces from HP to use on your pre LJIII's, start with the
  212.           lj3.fonts file (has the encodings and font selections)
  213.  
  214.           See the LJIII file for more information on how the LJIII
  215.           variant works, and some pointers on how to upgrade your pre-LJIII
  216.           printers to work as well.
  217.  
  218.       Psroff supports both PK and SFP format font files.
  219.       Normal PK font files (eg: that come with TeX) do not have
  220.       anything close to the same encoding as HP.  The S PKs I supply
  221.       are specially reordered (actually a merge of four PKs) to
  222.       reflect MATH8 encoding.  You can also use TeX PK fonts
  223.       directly (after a name change to reflect psroff's file
  224.       naming conventions) for the non-S fonts.  cmr, cmit, and
  225.       cmb can be used for Roman, Italic and Bold respectively.
  226.       *BEWARE*, there are a *lot* of characters missing or
  227.       out-and-out wrong in Knuth's standard PK files (relative
  228.       to ROMAN8 ordering).  Particularly box-drawing characters.
  229.       I've included a couple R, I and B PK files that can be used
  230.       to have a bit of fun until you have better font files.
  231.       pk2sfp gives a method of merging PK files - see testmerge
  232.       entry in utils/Makefile.  R.10.pk, I.10.pk and B.10.pk
  233.       in the lj.fonts directory were created this way.
  234.  
  235.       From Hewlett Packard, SFP's usually come on DOS diskettes
  236.       that can be "cat"'ed to the printer.  These are what you want.
  237.       Just remember to do BINARY copies from the floppies...
  238.  
  239.       I got this mail message from Ronald Florence about HPLJ fonts:
  240.  
  241.         > May 14, 1990 (or thereabouts)
  242.  
  243.         > I just received a notice in the mail from HP, announcing
  244.         > that they are about to discontinue the following soft
  245.         > fonts:
  246.  
  247.         >     TmsRmn/Helv    Roman 8        (33412AD)
  248.         >     TmsRmn/Helv    Roman 8        (33412AF)
  249.         >     TmsRmn/Helv    Ascii        (33412AE)
  250.  
  251.         > Together, the first two sets provide Times Roman and
  252.         > Helvetica SFP fonts, including bold and italics, from
  253.         > 6 to 30 points.  They can be ordered from HP Direct
  254.         > (800/538-8787).
  255.  
  256.       These are the fonts that Ronald has been using and they work
  257.       quite well.  Other soft fonts will probably work, but you
  258.       may have to tweak the translation tables.
  259.  
  260.       So, order yours today...  (No, neither of us are in the
  261.       employ of HP).  You may also be able to get good SFP's
  262.       from the font archive at Waterloo.
  263.  
  264.       Alternately, if you have TeX fonts, the file LASERFONTS
  265.       describes how to make fonts compatible with psroff.
  266.  
  267.       Software is supplied (utils and widths directories) to
  268.       extract width information from PK and SFP font files and
  269.       is built into the makefiles.
  270.  
  271.     - The width tables supplied (widths/widthps) are in ditroff
  272.       makedev-input-format (ASCII ditroff width tables).  I've
  273.       specified them in ditroff format because it's easier to manipulate
  274.       than CAT troff ft?? or ft??.c files.  dit2catwid/gfnttab convert
  275.       these width files into ft?? files.  Further, if you're going to
  276.       use a ditroff backend (tpscript, xtroff etc.) you'll probably
  277.       need to feed them through the "makedev" utility so that the backend
  278.       can understand the width tables.  I do not supply a makedev, but
  279.       one has been posted in comp.sources.unix in 1988, and is available
  280.       from archive sites such as uunet, it was written by Duane Hesser,
  281.       dhh@teltone.com) is included with jetroff.  pk2ditwid takes PK and
  282.       SFP files and produces widthtables compatible with gfnttab (but not
  283.       necessarily with makedev).
  284.  
  285.       If you have ditroff, you will HAVE to run the widths through
  286.       makedev/mkfont.
  287.  
  288.     - Width tables: Postscript:
  289.       (<printercommand> is how you sent output to your
  290.       postscript printer.  You might use "lp -dlaserwriter".)
  291.       These are in the utils subdirectory:
  292.  
  293.     showfont: If you type:
  294.                 showfont <fontname> | <printercommand>
  295.           (eg: showfont Times-Roman) this will dump the entire
  296.           Postscript Times-Roman font (plus some constructions
  297.           that troff2ps uses) in a table.  Each character is
  298.           in a box, along with several numbers.  The number
  299.           in the center at the bottom of the box is the width
  300.           in CAT scaling (size of 6 point character in 1/432's).
  301.           The ditroff width tables are the size of a 10 point
  302.           character, by default in 1/300's, but can be changed
  303.           by a resolution directive in a DESC file (eg: widthps
  304.           is in 1/720's).
  305.  
  306.     dit2catwid.c: takes ditroff like font tables and converts them
  307.           to CAT codes suitable for (at least) Xenix troff.
  308.           (some attempt has been made to make it work for
  309.           systems that need a.out.h headers on their width
  310.           tables).  See the gfnttab script to see how it's
  311.           used.
  312.  
  313.     gfnttab:  Used to run dit2catwid to compile the width tables
  314.           and place them in /usr/lib/font/<printer>/ft??.
  315.           see lib/psrofflib.S
  316.  
  317.     psdtwid:  fire it off to your Postscript printer, and it
  318.           will send back a shar file containing ditroff
  319.           style char tables.  (Neat - thanks Michael!)
  320.  
  321.           usage:
  322.             psdtwid | <printercommand>
  323.  
  324.     widths/widthps/*:   width tables for postscript and ditroff driving
  325.           postscript.  (Most from tpscript (thanks Michael), but
  326.           some generated here with psdtwid)
  327.     widths/width*/*:   other width tables.
  328.  
  329.     - Width tables: ditroff backends: (eg: jetroff, xtroff, psdit etc.)
  330.       [It is suggested that you specify the "ps" widths first for testing,
  331.       and then use the following instructions when fine tuning the widths to
  332.       get them precisely right]
  333.     - install the backends *first*.
  334.     - Find the DESC/R/S/I etc. files that come with the backend, or
  335.       are generated by installing the backend (eg: jetroff's makefont
  336.       stuff).
  337.     - Copy these files to the appropriate widths/width<xx> subdirectory.
  338.       Notes:
  339.         - I've used "jt" for jetroff, the jt.fonts file is already
  340.           at least partially set up.
  341.         - "ps" is for ditroff->postscript (tpscript) and direct
  342.           postscript driving and these width files are supplied.
  343.           And would probably work with other ditroff->postscript
  344.           converters except for possible character mapping changes
  345.           (see jt.fonts).
  346.     - Make in the widths directory will build the ft* files that you
  347.       need, and make install will install them in the proper places.
  348.       (normally /usr/lib/font/<xx>/ft*).  These are also done by
  349.       top level make invocations.
  350.     - Some ditroff backends (jetroff f'r instance) need to be able
  351.       to read the "makedev compiled" font files.  For which you need
  352.       makedev or mkfont (see above).
  353.  
  354.     - Width tables: HPLJ.  See the installation instructions.
  355.  
  356.     - There is some code to allow the sending of arbitrary commands to
  357.       the driver - the ".sR" macro.  This works well unless you're using
  358.       the ".MT" macro in MM.  sR directives before the ".MT" will
  359.       confuse MM.  See the manual page for psroff.1 for details on
  360.       .sR.  Further, ".tm" has been redefined to make use of the
  361.       .sR facility.
  362.  
  363.     - psroff has 8-font troff support, but:
  364.  
  365.         a) it's never been tested.
  366.         b) I'm no longer convinced that the cat.5 man page is
  367.            correct on how the decoding works.
  368.  
  369.     - psroff has BSDHACK support (one of the tilt opcodes being
  370.       replaced by an opcode to multiply the next vertical motion
  371.       by 64), but this has not been tested.  I never heard of it
  372.       before til I saw it in Froyen's troff2lj source.  This cannot
  373.       be defined at the same time as 8-font support.  Frankly, I
  374.       can't understand why they bothered - so you save a few opcodes
  375.       here and there - vcat output is enormous!
  376.  
  377.     - ".S" files are the source files and are converted to a filename
  378.       without the suffix by a sedscript that contains the configuration.
  379.       Whenever you touch the top-level makefile, the sedscript is changed
  380.       and all of the ".S" files are rebuilt.  If you make a makefile change
  381.       (eg: configuration), do a "make makefiles" before using submakes.
  382.       (though, if you simply say make, this will be done for you).  Only
  383.       change .S files...
  384.  
  385. See the MANIFEST for a file-by-file description of the files.
  386.  
  387. See the INSTALL file for detailed installation instructions.
  388.  
  389. Future directions:
  390.  
  391. They are two-fold: replacing the ".tm/.sR" mechanism for communication
  392. with the backend.  There is a new method, using a FSA to recognize
  393. a special sequence of bell symbols (see catconv).  I haven't converted
  394. over to it, because under some not-yet-understood situations, it
  395. doesn't work.  Hence, psfig and drawing commands occasionally misbehave.
  396. Once this is reliable, all special commands (eg: the .fp fakeouts) will
  397. be converted over to the FSA mechanism.
  398.  
  399. You may have noticed a compile flag called "OPT" which is defined in
  400. the distributed version of defs.h.  If enabled (via -Z/W), this enables the
  401. optimizer.  It works well with Postscript output, but not with laserjet
  402. unless the fonts you use are VERY good.  It's disabled by default.  The
  403. optimizer does two things: it emits as many characters as it can as one
  404. print directive, rather than one CAT code per print.  On postscript and
  405. HPLJ's this is a BIG win (printer execution speeds 3 or more times faster),
  406. but it won't work with ditroff.  The optimizer requires access to the CAT
  407. troff width tables (even when used with ditroff), and if troff2ps can't find
  408. them, it simply doesn't optimize.
  409.  
  410. Psroff limitations:
  411.     - With the use of catconv and CAT troff, psroff supports:
  412.     - all drawing commands (including the newer \D'fn' (set fill),
  413.       \D'tn' (line thickness), \D'p x y x y x y ...' (draw polygon),
  414.       and filled versions of \D'c...', \D'e...', \D'p...' (by capitalizing
  415.       the letter)).  Drawing commands are NOT supported in HPPCL.
  416.       (I think I have polygons right, but I don't know whether I got fill
  417.       parameters correct - "n" is 0...1000, where 0 is all black, and 1000
  418.       is all white).
  419.     - psfig.
  420.     - catconv/CAT Troff and psroff do not support:
  421.     - \s(nn, \S, \H, \f(xx
  422.     - Ditroff:
  423.     - psroff doesn't support character slant (\S) or height (\H).
  424.     - Psroff only supports CAT troff sizes in HPPCL (some mechanism to relax
  425.       this for HPLJIII's is easy to implement).  All sizes are available in
  426.       Postscript and ditroff.
  427.     - psroff doesn't implement "w" (word breaks in ditroff output).
  428.     - psroff doesn't support "stipple" (I have NO idea what this is -
  429.       apparently a Berkeleyism.)
  430.  
  431. CONTACT INFO (note that I've moved):
  432.  
  433.     Chris Lewis
  434.     Elegant Communications Inc.
  435.     Box 13215, Kanata PO
  436.     Kanata, Ontario, K2K 1X4
  437.     Voice Phone: Canada (613) 832-0541
  438.     Userid's for e-mail contact:
  439.     Psroff enquiries/help: psroff-request
  440.     Non-psroff mail only: clewis
  441.     UUCP routing: uunet!mitel!cunews!latour!ecicrl!<userid>
  442.     Possible internet routing: <userid>@ferret.ocunix.on.ca
  443.     Alternate: <user>@eci386.uucp
  444.