home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1284 / TROUBLE
Encoding:
Text File  |  1990-12-28  |  13.5 KB  |  315 lines

  1.         Psroff 2.0 Trouble Shooting.... %I% %E%
  2.  
  3.         (psroff 1.0 users can use this to a certain extent)
  4.  
  5. These are some pointers to possible solutions to problems with psroff.
  6. After correcting a problem, you usually need to do a "make all install".
  7. This is assuming that you got clean compiles (you should be able
  8. to fix your own compile problems).
  9.  
  10. Definitions:
  11.     - LIBDIR - default /usr/lib/troff2 (config option in Makefile)
  12.       LJ drivers pick up font files from LIBDIR/lib/lj.
  13.     - FONTDIR - by default "/usr/lib/font" (config option in Makefile).
  14.       Must be /usr/lib/font unless you have a '-F' troff, see
  15.       "width option" below.
  16.     - "width tables".  psroff's install generates CAT compatible width
  17.       tables and installs them into $FONTDIR/<widthname>/ft*, where
  18.       "widthname" is a token denoting the "set" of widths.  Postscript
  19.       printers (or ditroff driving postscript) use ps.  These are
  20.       the only widths I distribute directly.  The Makefile will
  21.       install widths into widthname "lj" if you have laserjet fonts
  22.       installed in the right place.
  23.     - "width option", most troff's support a way of telling it where
  24.       to look for the width tables.  Some support -T<widthname> (Xenix
  25.       f'r instance).  Others (Sun specifically, probably other BSD
  26.       derivitives) need "-F<directory>/<widthname>/ftXX".  Check your
  27.       man pages for troff.  This is should be specified by "trofftype"
  28.       in lib/psroff.lib.S.  If you have a "-T" version of troff,
  29.       FONTDIR *must* be /usr/lib/font.  If your troff supports neither
  30.       -T or -F (some real old versions of Xenix, V7 perchance), you
  31.       will have to install the width tables in FONTDIR directly and
  32.       specify trofftype as "".  Which will also mean that you can
  33.       only support one set of width tables.  (Unless you make binary
  34.       patches to your troff)
  35.     - "psroff debug" - rerun the psroff command, additionally specifying
  36.       "-F" in the command line.  This permit's troff's stderr to be
  37.       seen.  Correct any problems that it tells you about.  (eg:
  38.       "width option").  If you see lines of the form:
  39.         M<string>
  40.       These are back-end directives and they're supposed to be
  41.       there during psroff debug - ignore them.
  42.     - HEADERSIZE: some troff's need an a.out.h header on the front
  43.       of the width table files.  HEADERSIZE (defs.h) allows you to
  44.       specify an arbitrary number of bytes on the front of the table
  45.       in the width file.  Check /usr/lib/font/ftR (should be part
  46.       of your original troff installation.  Is ftR 224 bytes long?
  47.       If so, HEADERSIZE should be zero.  If not (eg: Ultrix, possibly
  48.       older BSD's, some older Xenix, V7), you will have to specify
  49.       HEADERSIZE.  Ultrix wants 32.  (should be the size of an
  50.       a.out header structure - od -c may give you some hints).
  51.       Another way to tell is to run "file" on /usr/lib/font/ftR.
  52.       Does it say "data"?  Then it probably needs HEADERSIZE 0.
  53.       If it says "executable" or "object" of some kind, you will
  54.       have to set HEADERSIZE.  If you get it right, but troff
  55.       is still going wierd, set HEADERSIZE 0, and set COMPILE on
  56.       in the Makefile (for some reason your troff is expecting
  57.       a *real* a.out.h header, but I've never seen a troff that
  58.       really needs this, but this is a way of getting the size
  59.       right without having to guess/write a program to find the
  60.       a.out.h size.
  61.  
  62. NOTE for PSROFF 1.0 users:
  63.  
  64.     psroff 1.0 does not have a psroff.lib file, so changes (eg:
  65.     width option specifications) have to be made directly to
  66.     the psroff.sh shell script.
  67.  
  68. Most initial problems are due to width table installation/specification -
  69. this varies from system to system and is *very* confusing.  I'm sorry about
  70. that, but there's no other way.  As a simple guide: if the /usr/lib/font/ftR
  71. file in your original troff installation is not 224 bytes long, you *will*
  72. have to set HEADERSIZE or COMPILE.
  73.  
  74. After successful installation/testing, most problems are due to troff
  75. errors that you don't get to see.
  76.  
  77. Build/Execute gross failures:
  78.  
  79. Shell scripts die horrible deaths:
  80.  
  81.     Particularly with error messages from "test".  Does your "test"
  82.     support -x?  If not, make sure that you've got SHELL and STARTSHELL
  83.     set properly in the Makefile (The shell scripts assume V7 and/or USG
  84.     versions of the Bourne Shell.  Older BSD and some BSD derivitives
  85.     (aka Ultrix) need a USG compatible shell - look for "sh5" somewhere
  86.     on your system).  ksh, bash and ash *should* work (untested).
  87.     Maybe one of these days I'll make the shell scripts work with
  88.     older shells/versions of test.
  89.  
  90. The makefile doesn't work:
  91.  
  92.     This *assumes* System V compatible MAKE.  If the makefile blows
  93.     (syntax errors in particular), search your system for a System V
  94.     compatible version of make.  Ultrix: /usr/bin/s5make.  Gnumake should
  95.     work fine.  Most Suns need a change here too.
  96.  
  97. Operational problems:
  98.  
  99. NEW INSTALL: No output, or output truncated (possibly after some really
  100. wild garble in the output):
  101.  
  102.     Troff is probably exploding.  Run psroff debug - check in particular:
  103.     for troff error messages about bad -T or -F options ("trofftype" see
  104.     width tables and width option above) or not being able to find the
  105.     width tables (did they really install?).  If troff is core-dumping,
  106.     it's probably a HEADERSIZE (above) problem, but it's possibly a
  107.     problem with the width of a specific character (Xenix doesn't
  108.     like zero (or sometimes really narrow) characters - try
  109.     tests/dumpft < <width table file> > /tmp/FOO and look for errors
  110.     and really narrow (0 or 1 unit) characters.  Particularly \(br).
  111.  
  112.     Other possibilities: bad output settings (ptr and lparg), bad
  113.     troff input.
  114.  
  115. WORKING INSTALL (eg: it's worked fine before): same symptoms as previous.
  116.  
  117.     Troff is probably exploding, but probably not due to width tables.
  118.     Run psroff debug.  Check for and correct troff error messages (eg:
  119.     line too long) in your document.  This could even be troff not being
  120.     able to find a file you specified to psroff.
  121.  
  122. Character widths wildly and inconsistently off:
  123.  
  124.     Probably HEADERSIZE.
  125.  
  126. Character widths annoyingly, inconsistently, but not wildly off:
  127.  
  128.     Remotely HEADERSIZE, more probably -T/-F trofftype omitted/wrong, 
  129.     or the width tables are simply wrong for the specific font or printer
  130.     (you may want to experiment with the "width" option in lib/psroff.lib.S).
  131.     Use "ps" for postscript printers and some others.
  132.  
  133. Character widths uniformly off with ditroff:
  134.  
  135.     - "-R" wrong or omitted in psroff.lib.S t2arg.  Check DESC file
  136.       for proper value (default 300) and that the gfnttab log doesn't
  137.       complain about a missing resolution during width table build.
  138.     - DESC file has wrong resolution (default is 300).  Try adjusting.
  139.       The ps widths use 720 (in DESC file)
  140.     - width option.
  141.  
  142. Character widths uniformly off with non-ditroff:
  143.  
  144.     - wrong width tables - try using the right ones: check width option.
  145.     - scaling bug in pk2ditwid/dit2catwid/gfnttab: contact me.
  146.  
  147. A very few characters have bad widths:
  148.  
  149.     - manually adjust the widths/width<widthname>/* files and reinstall.
  150.  
  151. output wacko with psfig, pic or grap (eg: overstrikes etc.):
  152.  
  153.     psroff doesn't work with pic, grap or psfig.  Buy ditroff and throw
  154.     psroff in the garbage.  (There may eventually be support for pic,
  155.     grap and psfig, but don't rely on it).  I have some stuff to allow
  156.     limited psfig functionality with psroff, but I decided not to release
  157.     it at this point.  Ask me if you *really* need it - '.sR "I..."'
  158.     and '.sR "P...."' can more than replace psfig with the addition
  159.     of some difficulty of use.
  160.  
  161. output wacko during a table (output possibly truncated):
  162.  
  163.     run psroff debug - probably line too long (table too wide).
  164.  
  165. output looks pretty good, but wierd things happen in spots:
  166.  
  167.     are you using ditroff features that CAT troff doesn't support?
  168.     Eg: \X, \D, .sy, some "odd" permutations of \f, .ft, .fp?   Font
  169.     numbers > 4?  CAT Troff (and hence psroff) doesn't support them.
  170.  
  171. Looks good, but every second line has overstrikes at the end, the alternate
  172. lines are indented:
  173.  
  174.     ".po" + ".ll" setting too high (CAT troff imposes 7.54" limit on total).
  175.     Reduce ".po" and compensate with "-O" option to psroff.  I've had
  176.     some rumors of *some* kinds of Xenix troff having a shorter maximum
  177.     width.
  178.  
  179. Right shifted when compared to ditroff/nroff/cat troff with packages
  180. other than psroff:
  181.  
  182.     See -O option and macro adapter description for psroff.
  183.  
  184. Utter garbage output:
  185.  
  186.     Are you specifying the right driver?
  187.  
  188. MM ".MT" macro doesn't appear to work properly:
  189.  
  190.     If you use a special directive (".sR" or ".fp" as modified by
  191.     the adapter macros) before ".MT", .MT will get buggered up.
  192.     Sorry, no workaround (though most requests other than ".fp"
  193.     can be issued by psroff -P options).  This isn't really a bug -
  194.     a limitation of CAT troff's ability to pass additional directives
  195.     to the backend without interfering with the typesetter state.
  196.     Maybe one of these days I'll get around to figuring out a better
  197.     mechanism.
  198.  
  199. Page headers wrong or present on the first page when they shouldn't be:
  200.  
  201.     See previous (replace ".MT" with page header macros in discussion).
  202.  
  203. line lengths a bit different from nroff/ditroff/other non-psroff CAT troff:
  204.  
  205.     See macro adapter discussion in psroff/troff2ps man pages.
  206.  
  207. ".sR" doesn't appear to work at all:
  208.  
  209.     Run psroff debug - do you see lines of the form "M<sR macro argument>"?
  210.     If not, you probably didn't get the macro adapters properly initialized.
  211.     psroff as distributed has adapters for MS, MM and MAN.  If you're
  212.     using different ones, or invoking the macros by /usr/lib/tmac paths,
  213.     or using no macros at all, the adapters and .sR definition won't be
  214.     picked up.  You will have to hand-craft your own macro adapter using
  215.     common.pre and common.post, using one of the example tmac's.
  216.     (all in adapters/* in distribution or LIBDIR/adapters after install)
  217.  
  218. ".sR" causes breaks/font loads don't happen at the right time:
  219.  
  220.     It has to unfortunately.  If you want to load fonts (.fp) during a line,
  221.     *don't*.  Issue the ".fp"'s where it's safe to have a break.  Ditto
  222.     other ".sR" directives.  There's no restrictions on changing to
  223.     an *already loaded* font (eg: .ft directives).  The psroff -P option
  224.     may help (not .fp's, sorry...)
  225.  
  226. Some things appear really wierd (eg: strings of character repeats
  227. in page number on MM headers):
  228.  
  229.     Your CAT troff may not support \g (pure V7 troffs f'r instance).
  230.     Experiment.  You may have to bugger around with the macros to
  231.     remove dependence on \g.  (which is supposed to return a code
  232.     denoting the output format of a number register)
  233.  
  234. Everything okay, but some characters missing (or wrong) on output:
  235. (ditroff drivers may complain about characters not found)
  236.  
  237.     Chances are that your printer or set of fonts doesn't support
  238.     that character.  Postscript driving should be perfect.  Some
  239.     ditroff drivers don't have character sets that are a superset
  240.     of CAT troff.  There are a few minor problems with LJ character
  241.     sets.  psdit, xproof, xtroff are missing a few CAT characters.
  242.     You may be able to resolve these by adding translation overrides
  243.     to the appropriate *.fonts file (see jt.fonts for examples).
  244.     Some ditroff's have different meanings for the same character
  245.     spec.  ("@" in some ditroff drivers is a different character)
  246.  
  247. My ditroff driver dies with errors about lines starting with "#":
  248.  
  249.     define NOCHATTER.
  250.  
  251. My postscript printer server gets upset:
  252.  
  253.     define NOCHATTER
  254.  
  255. I get postscript printer errors on last page, or last page missing:
  256.  
  257.     Have you got a DEC LN03 or some other printer that doesn't
  258.     like trailing control-D's?  Define "NOCONTROLD" in defs.h
  259.  
  260. Ditroff driver doesn't work/gives errors:
  261.  
  262.     check, recheck, and check again for ditroff backend config
  263.     (lparg/ptr in psroff.lib.S).  Try "psroff -t" and then
  264.     hand feeding the stdout to your backend manually.  Experiment
  265.     with "-d" setting in t2arg in psroff.lib.S.  If related
  266.     to specific characters, maybe adding translation overrides
  267.     in the appropriate *.fonts file will help
  268.  
  269. Laserjet: wrong font selection (particularly when the result is
  270. 10 point Courier), troff2ps compaining that it can't find a font
  271. file:
  272.  
  273.     - lj.fonts incorrect.
  274.     - Don't have any good font files - buy some good ROMAN8's for
  275.       Roman, Italic and Bold.
  276.  
  277. Laserjet: lousey/wrong/missing characters (non-S font):
  278.  
  279.     - You got crummy fonts.  Go buy or steal some good ROMAN8's in Roman,
  280.       Italic and Bold at CAT troff's supported point sizes.
  281.       TeX's PK fonts will work, but non-alphanumeric characters will
  282.       often be wrong (particularly box drawing and backslash)
  283.     - Get a Pacific Page or HP Postscript cartridge.
  284.  
  285. My laserjet stalls, gives "too complex" messages, doesn't switch fonts
  286. sometimes:
  287.  
  288.     - Some HPLJ clones don't support incremental downloading.  undefine
  289.       INCR and try again.  Plain laserjets (the old ones) don't support
  290.       font downloading at all.  Sigh...
  291.     - Ran out of memory - (INCR on): simplify document to use less fonts
  292.       or reduce MDLF.
  293.     - Ran out of memory - (INCR and PARTIAL off): turn on PARTIAL
  294.     - Too many fonts previously loaded - adjust PRELOAD.
  295.     - double check MDLF.
  296.  
  297. SQTroff ditroff backend sometimes barfs on psroff ditroff output:
  298.  
  299.     It do do that don't it?  SQTroff ditroff format is apparently
  300.     slightly different.  Then again, if you got SQTroff, why you have
  301.     psroff?
  302.  
  303. xproof sometimes dies with "too many font" messages:
  304.  
  305.     - AT&T's fault.  (Each symbol character is a separate font, xproof
  306.       is configured for a maximum of 50 or so fonts... duh...)
  307.  
  308. The Bell Symbol (\(bs) isn't:
  309.  
  310.     It ain't supposed to be.
  311.  
  312. Psroff is wonderful:
  313.  
  314.     Thank you!
  315.