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

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