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

  1.         Psroff 3.0 Trouble Shooting.... 2.11 91/04/02
  2.  
  3. (psroff 1.0 users can use this to a certain extent.  This is relatively
  4. unchanged from Psroff 2.0 except for the ditroff input capability)
  5.  
  6. These are some pointers to possible solutions to problems with psroff.
  7. After correcting a problem, you usually need to do:
  8.  
  9.     make all
  10.     su root
  11.     make install
  12.     make installwidths
  13.  
  14. This is assuming that you got clean compiles (you should be able
  15. to fix your own compile problems).
  16.  
  17. Unless specified, the remarks in this file pertain to CAT troff input,
  18. not ditroff input.
  19.  
  20. IMPORTANT NOTE: MANY configuration difficulties can be detected
  21. by "make check".  If you do encounter a problem, I suggest that
  22. you run "make check" first and correct any "ERROR"'s it reports
  23. that apply to the configuration (driver/printer) you wish to use.
  24. If you encounter problems you cannot solve and wish to ask me for
  25. help, I will want you to send me a copy of "make check"'s output....
  26.  
  27. Definitions:
  28.     - LIBDIR - default /usr/lib/troff2 (config option in Makefile)
  29.       LJ drivers pick up font files from LIBDIR/lib/lj.
  30.     - FONTDIR - by default "/usr/lib/font" (config option in Makefile).
  31.       Must be /usr/lib/font unless you have a '-F' troff, see
  32.       "width option" below.
  33.     - "width tables".  psroff's install generates CAT compatible width
  34.       tables and installs them into $FONTDIR/<widthname>/ft*, where
  35.       "widthname" is a token denoting the "set" of widths.  Postscript
  36.       printers (or ditroff driving postscript) use ps.  These are
  37.       the only widths I distribute directly.  The Makefile will
  38.       install widths into widthname "lj" if you have laserjet fonts
  39.       installed in the right place.
  40.  
  41.       With ditroff input, these width tables are only useful for
  42.       the optimizer.
  43.  
  44.     - "width option", most troff's support a way of telling it where
  45.       to look for the width tables.  Some support -T<widthname> (Xenix
  46.       f'r instance).  Others (Sun, Ultrix, most BSD's) specifically,
  47.       need "-F<directory>/<widthname>/ftXX".  Check your
  48.       man pages for troff.  This is should be specified by "trofftype"
  49.       in lib/psroff.lib.S.  If you have a "-T" version of troff,
  50.       FONTDIR *must* be /usr/lib/font.  If your troff supports neither
  51.       -T or -F (some real old versions of Xenix, V7 perchance), you
  52.       will have to install the width tables in FONTDIR directly and
  53.       specify trofftype as "".  Which will also mean that you can
  54.       only support one set of width tables.  (Unless you make binary
  55.       patches to your troff)
  56.  
  57.       In ditroff input, the trofftype is forced to be -T$width.
  58.  
  59.     - "psroff debug" - rerun the psroff command, additionally specifying
  60.       "-F" in the command line.  This permit's troff's stderr to be
  61.       seen.  Correct any problems that it tells you about.  (eg:
  62.       "width option").  If you see lines of the form:
  63.         M<string>
  64.       These are back-end directives and they're supposed to be
  65.       there during psroff debug - ignore them.
  66.     - HEADERSIZE: most troff's need an a.out.h header on the front
  67.       of the width table files.  HEADERSIZE (defs.h) allows you to
  68.       specify an arbitrary number of bytes on the front of the table
  69.       in the width file.  Check /usr/lib/font/ftR (should be part
  70.       of your original troff installation.  Is ftR 224 bytes long?
  71.       If so, HEADERSIZE should be zero.  If not (eg: Ultrix,
  72.       BSD's, some older Xenix, V7), you will have to specify
  73.       HEADERSIZE.  SunOS, VAX/Ultrix wants 32.  (should be the size
  74.       of an a.out header structure - od -c may give you some hints).
  75.       Another way to tell is to run "file" on /usr/lib/font/ftR.
  76.       Does it say "data"?  Then it probably needs HEADERSIZE 0.
  77.       If it says "ascii" something, you're probably RISC/Ultrix, and you
  78.       need ASCIIWIDTHS set.  If it says "executable" or "object" of some
  79.       kind, you will have to set HEADERSIZE.
  80.  
  81.       RISC/Ultrix uses an ASCII format width table.  You can
  82.       tell this if the following command:
  83.         echo ".fp 1 R" | troff -t > /dev/null
  84.       says something about non-ascii /usr/lib/font/ftR.  If
  85.       it does, define ASCIIWIDTHS.
  86.  
  87.       If you're still having problems, use the "dumpft" trick
  88.       shown below for Apollos.
  89.  
  90.       HEADERSIZE can be left as 0 for use with ditroff input.
  91.       (Eg: it only matters for CAT troff)
  92.  
  93. NOTE for PSROFF 1.0 users:
  94.  
  95.     psroff 1.0 does not have a psroff.lib file, so changes (eg:
  96.     width option specifications) have to be made directly to
  97.     the psroff.sh shell script.  Further, in the library, many of
  98.     the files names are reversed - eg: lj.lib in release 2.0 is lib.lj
  99.     in 1.0.
  100.  
  101. Most initial problems are due to width table installation/specification -
  102. this varies from system to system and is *very* confusing.  I'm sorry about
  103. that, but there's no other way.  As a simple guide: if the /usr/lib/font/ftR
  104. file in your original troff installation is not 224 bytes long, you *will*
  105. have to set HEADERSIZE to something other than 0.
  106.  
  107. After successful installation/testing, most problems are due to troff
  108. errors that you don't get to see.
  109.  
  110. Two notes on HEADERSIZE/ASCIIWID/etc.:
  111.     1) Some versions of troff will accept the -T option, but ignore
  112.        it.  Eg: Apollo and SunOS.  If the widths don't seem right, try the -F
  113.        option.  make check will usually tell you -F in this case.
  114.     2) If /usr/lib/font/ftR is substantially larger than 224 bytes,
  115.        ie, over 500 or 600, you probably have special headers.
  116.        Eg: Apollos.  What you should do is type the following:
  117.         cd utils
  118.         ./dumpft -gv < /usr/lib/font/ftR | grep Guess
  119.        Which will output a series of lines which contains both
  120.        a HEADERSIZE guess, plus an error count.  The errorcount
  121.        will have a minimum value, ideally zero.  Set
  122.        the HEADERSIZE to the guess with the minimum error
  123.        count and rebuild retry everything.  I won't attempt
  124.        to supply these numbers for each of these systems because
  125.        the number changes from release to release in some systems.
  126.  
  127. Build/Execute gross failures:
  128.  
  129. Shell scripts die horrible deaths:
  130.  
  131.     Particularly with error messages from "test".  Does your "test"
  132.     support -x?  If not, make sure that you've got SHELL and STARTSHELL
  133.     set properly in the Makefile (The shell scripts assume V7 and/or USG
  134.     versions of the Bourne Shell.  Older BSD and some BSD derivitives
  135.     (aka Ultrix) need a USG compatible shell - look for "sh5" somewhere
  136.     on your system).  ksh, bash and ash *should* work (untested).
  137.     Theoretically, all of the shell scripts should work even without -x,
  138.     but I've not really been able to test everything.
  139.  
  140. The makefile doesn't work:
  141.  
  142.     This *assumes* System V compatible MAKE.  If the makefile blows
  143.     (syntax errors in particular), search your system for a System V
  144.     compatible version of make.  Ultrix: /usr/bin/s5make.  Gnumake should
  145.     work fine.  Most Suns need a change here too.  You will probably
  146.     have to:
  147.     MAKE=<system 5 make> export MAKE
  148.     <system 5 make>
  149.     to build everything.
  150.  
  151. Psroff seems to work, but nothing prints:
  152.  
  153.     "Seems to work" meaning that the output file is > 15K or so
  154.     in Postscript, or >1K with HP Laserjets when printing the test
  155.     (make test).  A lot of these problems can be traced down to
  156.     print spooler definition problems.  Some things to examine in
  157.     your spooler filters (/etc/printcap in Suns, Ultrix, other BSD
  158.     derivitives, or the /usr/spool/lp/interface files in System V lp
  159.     spoolers):
  160.     - If running Laserjet, make sure that 8-bit is set (stty cs8
  161.       in System V).  *Some* extremely old systems (some V7's,
  162.       some very old BSD's) aren't capable of supporting serial 8-bit.
  163.       You might want to consider asking on comp.unix.questions or
  164.       comp.unix.wizards about how to turn this on on non-System V's
  165.       if you continue to have problems.  (I believe Chris Torek has
  166.       a workaround for setting 8 bit on old BSDs)
  167.     - If running laserjets, make sure that opost (SV) is off - you
  168.       do *not* want the tty driver expanding tabs, cr's etc.
  169.       Similar things apply with BSD derivitives.
  170.     - Make sure that echo is *off*.  If it's on, postscript
  171.       printing will die and say something about <something> (often
  172.       "user@site") is an undefined command if you're looking at the
  173.       diagnostics coming back up the serial line from the printer.
  174.       Make sure that there isn't an "echo" in the stty of lp
  175.       filters, or /etc/printcap.  It's probably safer to make
  176.       it explicit by adding "-echo" in the appropriate place.
  177.       This, for example, is a fragment of an /etc/printcap:
  178.  
  179.         ps|HP LaserJet III with PostScript cartridge:\
  180.         lp=/dev/ttyb:br#9600:\
  181.         ms=clocal,-parity,cs8,-cstopb,-echo:\
  182.         sh:sf:sd=/usr/spool/ps:tr=\f:lf=/usr/adm/lpd-errs:
  183.  
  184. Operational problems:
  185.  
  186. NEW INSTALL: No output, or output truncated (possibly after some really
  187. wild garble in the output):
  188.  
  189.     Troff is probably exploding.  Run psroff debug - check in particular:
  190.     for troff error messages about bad -T or -F options ("trofftype" see
  191.     width tables and width option above) or not being able to find the
  192.     width tables (did they really install?).  If troff is core-dumping,
  193.     it's probably a HEADERSIZE (above) problem, but it's possibly a
  194.     problem with the width of a specific character (Xenix doesn't
  195.     like zero (or sometimes really narrow) characters - try
  196.     tests/dumpft < <width table file> > /tmp/FOO and look for errors
  197.     and really narrow (0 or 1 unit) characters.  Particularly \(ul/_/\(ru).
  198.  
  199.     Other possibilities: bad output settings (ptr and lparg), bad
  200.     troff input.
  201.  
  202. NEW INSTALL: make test generates several blank pages plus bits of
  203. text on Laserjets:
  204.  
  205.     Chances are your HP Laserjet clone doesn't support incremental
  206.     downloading.  Try undefining INCR and rebuilding.
  207.  
  208. NEW INSTALL: the "6" is missing in the test page on the "16 point italic"
  209. and "16 point bold":
  210.  
  211.     This is because you've not installed or properly configured more fonts
  212.     than came with psroff, and psroff can't find a font close enough
  213.     in size, and is letting the printer guess - and has selected a font
  214.     that it had previously incrementally downloaded.
  215.  
  216.     Get more fonts and make sure that lj.fonts is up-to-date with
  217.     the font set you have.
  218.  
  219. Both NEW and OLD INSTALLS: truncated or possibly completely missing
  220.     printjobs in Postscript.  Probably the printer has seen a syntax
  221.     error or some such.  If you start up a "cat" from the device
  222.     the printer is connected to, you can see the printer's error
  223.     messages.
  224.  
  225. WORKING INSTALL (eg: it's worked fine before): same symptoms as previous.
  226.  
  227.     Troff is probably exploding, but probably not due to width tables.
  228.     Run psroff debug.  Check for and correct troff error messages (eg:
  229.     line too long) in your document.  This could even be troff not being
  230.     able to find a file you specified to psroff.
  231.  
  232. Character widths wildly and inconsistently off:
  233.  
  234.     Probably HEADERSIZE.
  235.  
  236. Character widths annoyingly, inconsistently, but not wildly off:
  237.  
  238.     Remotely HEADERSIZE, more probably -T/-F trofftype omitted/wrong,
  239.     or the width tables are simply wrong for the specific font or printer
  240.     (you may want to experiment with the "width" option in lib/psroff.lib.S).
  241.     Use "ps" for postscript printers and some others.
  242.  
  243. Character widths uniformly off with ditroff:
  244.  
  245.     - "-R" wrong or omitted in psroff.lib.S t2arg.  Check DESC file
  246.       for proper value (default 300) and that the gfnttab log doesn't
  247.       complain about a missing resolution during width table build.
  248.     - DESC file has wrong resolution (default is 300).  Try adjusting.
  249.       The ps widths use 720 (in DESC file)
  250.     - width option.
  251.  
  252. Character widths uniformly off with non-ditroff:
  253.  
  254.     - wrong width tables - try using the right ones: check width option.
  255.     - scaling bug in pk2ditwid/dit2catwid/gfnttab: contact me.
  256.  
  257. A very few characters have bad widths:
  258.  
  259.     - manually adjust the widths/width<widthname>/* files and
  260.       cd utils; make widths; su root; make installwidths.
  261.  
  262. output wacko during a table (output possibly truncated):
  263.  
  264.     run psroff debug - probably line too long (table too wide).
  265.  
  266. output looks pretty good, but wierd things happen in spots:
  267.  
  268.     are you using ditroff features that CAT troff doesn't support?
  269.     Eg: \S, \H, some "odd" permutations of \f, .ft, .fp?   Font
  270.     numbers > 4 (in CAT troff)?  CAT Troff (and hence psroff) doesn't
  271.     support them.  In ditroff-input mode, however, this can't happen.
  272.  
  273. Looks good, but every second line has overstrikes at the end, the alternate
  274. lines are indented:
  275.  
  276.     ".po" + ".ll" setting too high (CAT troff imposes 7.54" limit on total).
  277.     Reduce ".po" and compensate with "-O" option to psroff.  I've had
  278.     some rumors of *some* kinds of Xenix troff having a shorter maximum
  279.     width.
  280.  
  281. Right shifted when compared to ditroff/nroff/cat troff with packages
  282. other than psroff:
  283.  
  284.     See -O option and macro adapter description for psroff.
  285.  
  286. Utter garbage output:
  287.  
  288.     Are you specifying the right driver?
  289.  
  290. MM ".MT" macro doesn't appear to work properly:
  291.  
  292.     If you use a special directive (".sR" or ".fp" as modified by
  293.     the adapter macros) before ".MT", .MT will get buggered up.
  294.     Sorry, no workaround (though most requests other than ".fp"
  295.     can be issued by psroff -P options).  This isn't really a bug -
  296.     a limitation of CAT troff's ability to pass additional directives
  297.     to the backend without interfering with the typesetter state.
  298.     Maybe one of these days I'll get around to figuring out a better
  299.     mechanism.
  300.  
  301. Page headers wrong or present on the first page when they shouldn't be:
  302.  
  303.     See previous (replace ".MT" with page header macros in discussion).
  304.  
  305. line lengths a bit different from nroff/ditroff/other non-psroff CAT troff:
  306.  
  307.     See macro adapter discussion in psroff/troff2ps man pages.
  308.  
  309. ".sR" doesn't appear to work at all:
  310.  
  311.     Run psroff debug - do you see lines of the form "M<sR macro argument>"?
  312.     If not, you probably didn't get the macro adapters properly initialized.
  313.     psroff as distributed has adapters for MS, MM and MAN.  If you're
  314.     using different ones, or invoking the macros by /usr/lib/tmac paths,
  315.     or using no macros at all, the adapters and .sR definition won't be
  316.     picked up.  You will have to hand-craft your own macro adapter using
  317.     common.pre and common.post, using one of the example tmac's.
  318.     (all in adapters/* in distribution or LIBDIR/adapters after install)
  319.  
  320.     The .sR kludge isn't necessary for ditroff.
  321.  
  322. ".sR" causes breaks/font loads don't happen at the right time:
  323.  
  324.     It has to unfortunately.  If you want to load fonts (.fp) during a line,
  325.     *don't*.  Issue the ".fp"'s where it's safe to have a break.  Ditto
  326.     other ".sR" directives.  There's no restrictions on changing to
  327.     an *already loaded* font (eg: .ft directives).  The psroff -P option
  328.     may help (not .fp's, sorry...).  Applies only to CAT troff input.
  329.  
  330. Some things appear really wierd (eg: strings of character repeats
  331. in page number on MM headers):
  332.  
  333.     Your CAT troff may not support \g (pure V7 troffs f'r instance).
  334.     Experiment.  You may have to bugger around with the macros to
  335.     remove dependence on \g.  (which is supposed to return a code
  336.     denoting the output format of a number register, and is usually
  337.     used to determine whether a number register has ever been set)
  338.  
  339. ME macros don't seem to work:
  340.  
  341.     A friend noted:
  342.  
  343.     In order to make them useable, I had to modify them somewhat.  The
  344.     problem was with the following syntax:
  345.  
  346.     .if t \
  347.     \{
  348.     .    zz
  349.     .\}
  350.  
  351.     Our (Xenix) troff required the following instead:
  352.  
  353.     .if t \{\
  354.     .    zz
  355.     .\}
  356.  
  357.     This was required for all occurances of "\{".  It seems "\{" MUST
  358.     terminate a line, and MUST be followed by a "\<NEWLINE>".  Even a ".\{"
  359.     didn't help any.
  360.  
  361. Everything okay, but some characters missing (or wrong) on output:
  362. (ditroff drivers may complain about characters not found)
  363.  
  364.     Chances are that your printer or set of fonts doesn't support
  365.     that character.  Postscript driving should be perfect.  Some
  366.     ditroff drivers don't have character sets that are a superset
  367.     of CAT troff.  There are a few minor problems with LJ character
  368.     sets.  psdit, xproof, xtroff are missing a few CAT characters.
  369.     You may be able to resolve these by adding translation overrides
  370.     to the appropriate *.fonts file (see jt.fonts for examples).
  371.     Some ditroff's have different meanings for the same character
  372.     spec.  ("@" in some ditroff drivers is a different character)
  373.  
  374. My ditroff driver dies with errors about lines starting with "#":
  375.  
  376.     define NOCHATTER.
  377.  
  378. My postscript printer server gets upset:
  379.  
  380.     define NOCHATTER
  381.  
  382. I get postscript printer errors on last page, or last page missing:
  383.  
  384.     Have you got a DEC LN03 or some other printer that doesn't
  385.     like trailing control-D's?  Define "NOCONTROLD" in defs.h
  386.  
  387. Ditroff driver doesn't work/gives errors:
  388.  
  389.     check, recheck, and check again for ditroff backend config
  390.     (lparg/ptr in psroff.lib.S).  Try "psroff -t" and then
  391.     hand feeding the stdout to your backend manually.  Experiment
  392.     with "-d" setting in t2arg in psroff.lib.S.  If related
  393.     to specific characters, maybe adding translation overrides
  394.     in the appropriate *.fonts file will help
  395.  
  396. Ditroff input (-N) doesn't work/gives errors:
  397.  
  398.     Particularly remarks about not knowing about specific characters.
  399.     That's because the psroff tables don't match ditroff's.
  400.     Make sure that the extension section of the appropriate
  401.     *.fonts file is in agreement with your ditroff width tables.
  402.     cd widths; make extensions to rebuild these tables to tack
  403.     onto the end of the appropriate *.fonts file.
  404.  
  405. Laserjet printers get confused and loses settings (eg: copy count etc)
  406.  
  407.     Be aware of the fact that lj.lib has a RESET command.  If you
  408.     have some sort of spooler that's emitting commands to the printer
  409.     outside of the control of psroff (eg: copy count set before
  410.     psroff output), you may have to change it.
  411.  
  412. Laserjet: wrong font selection (particularly when the result is
  413. 10 point Courier), troff2ps compaining that it can't find a font
  414. file:
  415.  
  416.     - lj.fonts incorrect.
  417.     - Don't have any good font files - buy some good ROMAN8's for
  418.       Roman, Italic and Bold, or use TeX fonts and "make buildljfonts".
  419.  
  420. Laserjet: sizes of characters are wrong, some characters missing, wrong
  421.     font selected.
  422.  
  423.     - Get some decent fonts.  If you don't have the right size (within
  424.       a few points) or font available, psroff will get the printer
  425.       to select a font.  Which will usually look wrong.  Further, if
  426.       the printer selects a font that has been incrementally downloaded,
  427.       some characters may be missing on the output.  If you've not
  428.       gotten any additional fonts, "make test" will show an example
  429.       of this problem, in that the line supposedly 16 point will
  430.       be the wrong size and some characters will be missing (italic
  431.       and bold "6")
  432.  
  433. Laserjet: lousey/wrong/missing characters (non-S font):
  434.  
  435.     - You got crummy fonts.  Go buy or steal some good ROMAN8's in Roman,
  436.       Italic and Bold at CAT troff's supported point sizes.
  437.       TeX's PK fonts will work, but non-alphanumeric characters will
  438.       often be wrong (particularly box drawing and backslash).
  439.     - Get a HP or Adobe Postscript cartridge.  (The Pacific Page does work
  440.       fine, except for reports that at least some of them use slightly
  441.       different fonts, and the widths will be off).
  442.  
  443. My laserjet stalls, gives "too complex" messages, doesn't switch fonts
  444. sometimes:
  445.  
  446.     - Some HPLJ clones don't support incremental downloading.  undefine
  447.       INCR and try again.  Plain laserjets (the old ones) don't support
  448.       font downloading at all.  Sigh...
  449.     - Ran out of memory - (INCR on): simplify document to use less fonts
  450.       or reduce MDLF.
  451.     - Ran out of memory - (INCR and PARTIAL off): turn on PARTIAL
  452.     - Too many fonts previously loaded - adjust PRELOAD.
  453.     - double check MDLF.
  454.  
  455. Manual pages look great except the page footers are at the top of the
  456. next page.  MM and MS work fine.
  457.  
  458.     - You're IBM AIX right?  Sigh....  The man macros in AIX explicitly
  459.       set page length to something other than 11 inches.  Supply
  460.       "-rM1" to psroff, and the macros will select 11 inches.  Or,
  461.       you could insert a ".nr M 1" the beginning of adapters/tmac.an.
  462.  
  463. SQTroff ditroff backend sometimes barfs on psroff ditroff output:
  464.  
  465.     It do do that don't it?  SQTroff ditroff format is apparently
  466.     slightly different.  Then again, if you got SQTroff, why you have
  467.     psroff?
  468.  
  469. xproof sometimes dies with "too many font" messages:
  470.  
  471.     - AT&T's fault.  (Each symbol character is a separate font, xproof
  472.       is configured for a maximum of 50 or so fonts... duh...)
  473.  
  474. The Bell Symbol (\(bs) isn't:
  475.  
  476.     It ain't supposed to be.
  477.  
  478. Psroff is wonderful:
  479.  
  480.     Of course.  Didn't I say it would be? ;-)
  481.  
  482. TEST SHEET INTERPRETATION:
  483.  
  484.     If you see problems after running the test sheet, here are a few
  485.     suggestions:
  486.  
  487.     - Laserjet output: *badly* splattered, most characters unrecognizeable
  488.       and probably more than one or two pages: If you're not using a Hewlett
  489.       Packard Laserjet, try undefining INCR and rebuilding.  Some clones won't
  490.       handle incremental downloading.  Other possibilities: if you are
  491.       printing via serial line, make sure that the serial line is 8 bit raw
  492.       (eg: cs8 and -opost on System V, or CBREAK mode in BSD)
  493.       Check /etc/printcap or /usr/spool/lp/interface/*.
  494.     - Character spacing objectionably off in the text portions - some
  495.       versions of troff, such as SunOS, do not support trofftype "-T$width",
  496.       but they don't complain about it.  Try the -F variant.
  497.       If you're manually invoking troff (ala "troff.... | troff2ps"),
  498.       you probably aren't picking up the common.pre macro adapter that
  499.       tells troff to reload its fonts from psroff's versions rather than
  500.       their own built-ins.  Another symptom I've seen is floating point
  501.       exceptions or the long horizontal lines in the table consisting
  502.       of one _ character around the middle of the line.
  503.     - Postscript doesn't print - probably you have echo set on your
  504.       serial line.  Turn it *off*.  Alternately, maybe your printer
  505.       doesn't want to see control-D's - see the discussion in
  506.       troff2ps(n)
  507.     - Laserjet: the "6" is missing in the test page on the "16 point italic"
  508.       and "16 point bold".  You don't have enough fonts, or they're not
  509.       configured properly.
  510.