home *** CD-ROM | disk | FTP | other *** search
- Psroff 3.0 Trouble Shooting.... 2.11 91/04/02
-
- (psroff 1.0 users can use this to a certain extent. This is relatively
- unchanged from Psroff 2.0 except for the ditroff input capability)
-
- These are some pointers to possible solutions to problems with psroff.
- After correcting a problem, you usually need to do:
-
- make all
- su root
- make install
- make installwidths
-
- This is assuming that you got clean compiles (you should be able
- to fix your own compile problems).
-
- Unless specified, the remarks in this file pertain to CAT troff input,
- not ditroff input.
-
- IMPORTANT NOTE: MANY configuration difficulties can be detected
- by "make check". If you do encounter a problem, I suggest that
- you run "make check" first and correct any "ERROR"'s it reports
- that apply to the configuration (driver/printer) you wish to use.
- If you encounter problems you cannot solve and wish to ask me for
- help, I will want you to send me a copy of "make check"'s output....
-
- Definitions:
- - LIBDIR - default /usr/lib/troff2 (config option in Makefile)
- LJ drivers pick up font files from LIBDIR/lib/lj.
- - FONTDIR - by default "/usr/lib/font" (config option in Makefile).
- Must be /usr/lib/font unless you have a '-F' troff, see
- "width option" below.
- - "width tables". psroff's install generates CAT compatible width
- tables and installs them into $FONTDIR/<widthname>/ft*, where
- "widthname" is a token denoting the "set" of widths. Postscript
- printers (or ditroff driving postscript) use ps. These are
- the only widths I distribute directly. The Makefile will
- install widths into widthname "lj" if you have laserjet fonts
- installed in the right place.
-
- With ditroff input, these width tables are only useful for
- the optimizer.
-
- - "width option", most troff's support a way of telling it where
- to look for the width tables. Some support -T<widthname> (Xenix
- f'r instance). Others (Sun, Ultrix, most BSD's) specifically,
- need "-F<directory>/<widthname>/ftXX". Check your
- man pages for troff. This is should be specified by "trofftype"
- in lib/psroff.lib.S. If you have a "-T" version of troff,
- FONTDIR *must* be /usr/lib/font. If your troff supports neither
- -T or -F (some real old versions of Xenix, V7 perchance), you
- will have to install the width tables in FONTDIR directly and
- specify trofftype as "". Which will also mean that you can
- only support one set of width tables. (Unless you make binary
- patches to your troff)
-
- In ditroff input, the trofftype is forced to be -T$width.
-
- - "psroff debug" - rerun the psroff command, additionally specifying
- "-F" in the command line. This permit's troff's stderr to be
- seen. Correct any problems that it tells you about. (eg:
- "width option"). If you see lines of the form:
- M<string>
- These are back-end directives and they're supposed to be
- there during psroff debug - ignore them.
- - HEADERSIZE: most troff's need an a.out.h header on the front
- of the width table files. HEADERSIZE (defs.h) allows you to
- specify an arbitrary number of bytes on the front of the table
- in the width file. Check /usr/lib/font/ftR (should be part
- of your original troff installation. Is ftR 224 bytes long?
- If so, HEADERSIZE should be zero. If not (eg: Ultrix,
- BSD's, some older Xenix, V7), you will have to specify
- HEADERSIZE. SunOS, VAX/Ultrix wants 32. (should be the size
- of an a.out header structure - od -c may give you some hints).
- Another way to tell is to run "file" on /usr/lib/font/ftR.
- Does it say "data"? Then it probably needs HEADERSIZE 0.
- If it says "ascii" something, you're probably RISC/Ultrix, and you
- need ASCIIWIDTHS set. If it says "executable" or "object" of some
- kind, you will have to set HEADERSIZE.
-
- RISC/Ultrix uses an ASCII format width table. You can
- tell this if the following command:
- echo ".fp 1 R" | troff -t > /dev/null
- says something about non-ascii /usr/lib/font/ftR. If
- it does, define ASCIIWIDTHS.
-
- If you're still having problems, use the "dumpft" trick
- shown below for Apollos.
-
- HEADERSIZE can be left as 0 for use with ditroff input.
- (Eg: it only matters for CAT troff)
-
- NOTE for PSROFF 1.0 users:
-
- psroff 1.0 does not have a psroff.lib file, so changes (eg:
- width option specifications) have to be made directly to
- the psroff.sh shell script. Further, in the library, many of
- the files names are reversed - eg: lj.lib in release 2.0 is lib.lj
- in 1.0.
-
- Most initial problems are due to width table installation/specification -
- this varies from system to system and is *very* confusing. I'm sorry about
- that, but there's no other way. As a simple guide: if the /usr/lib/font/ftR
- file in your original troff installation is not 224 bytes long, you *will*
- have to set HEADERSIZE to something other than 0.
-
- After successful installation/testing, most problems are due to troff
- errors that you don't get to see.
-
- Two notes on HEADERSIZE/ASCIIWID/etc.:
- 1) Some versions of troff will accept the -T option, but ignore
- it. Eg: Apollo and SunOS. If the widths don't seem right, try the -F
- option. make check will usually tell you -F in this case.
- 2) If /usr/lib/font/ftR is substantially larger than 224 bytes,
- ie, over 500 or 600, you probably have special headers.
- Eg: Apollos. What you should do is type the following:
- cd utils
- ./dumpft -gv < /usr/lib/font/ftR | grep Guess
- Which will output a series of lines which contains both
- a HEADERSIZE guess, plus an error count. The errorcount
- will have a minimum value, ideally zero. Set
- the HEADERSIZE to the guess with the minimum error
- count and rebuild retry everything. I won't attempt
- to supply these numbers for each of these systems because
- the number changes from release to release in some systems.
-
- Build/Execute gross failures:
-
- Shell scripts die horrible deaths:
-
- Particularly with error messages from "test". Does your "test"
- support -x? If not, make sure that you've got SHELL and STARTSHELL
- set properly in the Makefile (The shell scripts assume V7 and/or USG
- versions of the Bourne Shell. Older BSD and some BSD derivitives
- (aka Ultrix) need a USG compatible shell - look for "sh5" somewhere
- on your system). ksh, bash and ash *should* work (untested).
- Theoretically, all of the shell scripts should work even without -x,
- but I've not really been able to test everything.
-
- The makefile doesn't work:
-
- This *assumes* System V compatible MAKE. If the makefile blows
- (syntax errors in particular), search your system for a System V
- compatible version of make. Ultrix: /usr/bin/s5make. Gnumake should
- work fine. Most Suns need a change here too. You will probably
- have to:
- MAKE=<system 5 make> export MAKE
- <system 5 make>
- to build everything.
-
- Psroff seems to work, but nothing prints:
-
- "Seems to work" meaning that the output file is > 15K or so
- in Postscript, or >1K with HP Laserjets when printing the test
- (make test). A lot of these problems can be traced down to
- print spooler definition problems. Some things to examine in
- your spooler filters (/etc/printcap in Suns, Ultrix, other BSD
- derivitives, or the /usr/spool/lp/interface files in System V lp
- spoolers):
- - If running Laserjet, make sure that 8-bit is set (stty cs8
- in System V). *Some* extremely old systems (some V7's,
- some very old BSD's) aren't capable of supporting serial 8-bit.
- You might want to consider asking on comp.unix.questions or
- comp.unix.wizards about how to turn this on on non-System V's
- if you continue to have problems. (I believe Chris Torek has
- a workaround for setting 8 bit on old BSDs)
- - If running laserjets, make sure that opost (SV) is off - you
- do *not* want the tty driver expanding tabs, cr's etc.
- Similar things apply with BSD derivitives.
- - Make sure that echo is *off*. If it's on, postscript
- printing will die and say something about <something> (often
- "user@site") is an undefined command if you're looking at the
- diagnostics coming back up the serial line from the printer.
- Make sure that there isn't an "echo" in the stty of lp
- filters, or /etc/printcap. It's probably safer to make
- it explicit by adding "-echo" in the appropriate place.
- This, for example, is a fragment of an /etc/printcap:
-
- ps|HP LaserJet III with PostScript cartridge:\
- lp=/dev/ttyb:br#9600:\
- ms=clocal,-parity,cs8,-cstopb,-echo:\
- sh:sf:sd=/usr/spool/ps:tr=\f:lf=/usr/adm/lpd-errs:
-
- Operational problems:
-
- NEW INSTALL: No output, or output truncated (possibly after some really
- wild garble in the output):
-
- Troff is probably exploding. Run psroff debug - check in particular:
- for troff error messages about bad -T or -F options ("trofftype" see
- width tables and width option above) or not being able to find the
- width tables (did they really install?). If troff is core-dumping,
- it's probably a HEADERSIZE (above) problem, but it's possibly a
- problem with the width of a specific character (Xenix doesn't
- like zero (or sometimes really narrow) characters - try
- tests/dumpft < <width table file> > /tmp/FOO and look for errors
- and really narrow (0 or 1 unit) characters. Particularly \(ul/_/\(ru).
-
- Other possibilities: bad output settings (ptr and lparg), bad
- troff input.
-
- NEW INSTALL: make test generates several blank pages plus bits of
- text on Laserjets:
-
- Chances are your HP Laserjet clone doesn't support incremental
- downloading. Try undefining INCR and rebuilding.
-
- NEW INSTALL: the "6" is missing in the test page on the "16 point italic"
- and "16 point bold":
-
- This is because you've not installed or properly configured more fonts
- than came with psroff, and psroff can't find a font close enough
- in size, and is letting the printer guess - and has selected a font
- that it had previously incrementally downloaded.
-
- Get more fonts and make sure that lj.fonts is up-to-date with
- the font set you have.
-
- Both NEW and OLD INSTALLS: truncated or possibly completely missing
- printjobs in Postscript. Probably the printer has seen a syntax
- error or some such. If you start up a "cat" from the device
- the printer is connected to, you can see the printer's error
- messages.
-
- WORKING INSTALL (eg: it's worked fine before): same symptoms as previous.
-
- Troff is probably exploding, but probably not due to width tables.
- Run psroff debug. Check for and correct troff error messages (eg:
- line too long) in your document. This could even be troff not being
- able to find a file you specified to psroff.
-
- Character widths wildly and inconsistently off:
-
- Probably HEADERSIZE.
-
- Character widths annoyingly, inconsistently, but not wildly off:
-
- Remotely HEADERSIZE, more probably -T/-F trofftype omitted/wrong,
- or the width tables are simply wrong for the specific font or printer
- (you may want to experiment with the "width" option in lib/psroff.lib.S).
- Use "ps" for postscript printers and some others.
-
- Character widths uniformly off with ditroff:
-
- - "-R" wrong or omitted in psroff.lib.S t2arg. Check DESC file
- for proper value (default 300) and that the gfnttab log doesn't
- complain about a missing resolution during width table build.
- - DESC file has wrong resolution (default is 300). Try adjusting.
- The ps widths use 720 (in DESC file)
- - width option.
-
- Character widths uniformly off with non-ditroff:
-
- - wrong width tables - try using the right ones: check width option.
- - scaling bug in pk2ditwid/dit2catwid/gfnttab: contact me.
-
- A very few characters have bad widths:
-
- - manually adjust the widths/width<widthname>/* files and
- cd utils; make widths; su root; make installwidths.
-
- output wacko during a table (output possibly truncated):
-
- run psroff debug - probably line too long (table too wide).
-
- output looks pretty good, but wierd things happen in spots:
-
- are you using ditroff features that CAT troff doesn't support?
- Eg: \S, \H, some "odd" permutations of \f, .ft, .fp? Font
- numbers > 4 (in CAT troff)? CAT Troff (and hence psroff) doesn't
- support them. In ditroff-input mode, however, this can't happen.
-
- Looks good, but every second line has overstrikes at the end, the alternate
- lines are indented:
-
- ".po" + ".ll" setting too high (CAT troff imposes 7.54" limit on total).
- Reduce ".po" and compensate with "-O" option to psroff. I've had
- some rumors of *some* kinds of Xenix troff having a shorter maximum
- width.
-
- Right shifted when compared to ditroff/nroff/cat troff with packages
- other than psroff:
-
- See -O option and macro adapter description for psroff.
-
- Utter garbage output:
-
- Are you specifying the right driver?
-
- MM ".MT" macro doesn't appear to work properly:
-
- If you use a special directive (".sR" or ".fp" as modified by
- the adapter macros) before ".MT", .MT will get buggered up.
- Sorry, no workaround (though most requests other than ".fp"
- can be issued by psroff -P options). This isn't really a bug -
- a limitation of CAT troff's ability to pass additional directives
- to the backend without interfering with the typesetter state.
- Maybe one of these days I'll get around to figuring out a better
- mechanism.
-
- Page headers wrong or present on the first page when they shouldn't be:
-
- See previous (replace ".MT" with page header macros in discussion).
-
- line lengths a bit different from nroff/ditroff/other non-psroff CAT troff:
-
- See macro adapter discussion in psroff/troff2ps man pages.
-
- ".sR" doesn't appear to work at all:
-
- Run psroff debug - do you see lines of the form "M<sR macro argument>"?
- If not, you probably didn't get the macro adapters properly initialized.
- psroff as distributed has adapters for MS, MM and MAN. If you're
- using different ones, or invoking the macros by /usr/lib/tmac paths,
- or using no macros at all, the adapters and .sR definition won't be
- picked up. You will have to hand-craft your own macro adapter using
- common.pre and common.post, using one of the example tmac's.
- (all in adapters/* in distribution or LIBDIR/adapters after install)
-
- The .sR kludge isn't necessary for ditroff.
-
- ".sR" causes breaks/font loads don't happen at the right time:
-
- It has to unfortunately. If you want to load fonts (.fp) during a line,
- *don't*. Issue the ".fp"'s where it's safe to have a break. Ditto
- other ".sR" directives. There's no restrictions on changing to
- an *already loaded* font (eg: .ft directives). The psroff -P option
- may help (not .fp's, sorry...). Applies only to CAT troff input.
-
- Some things appear really wierd (eg: strings of character repeats
- in page number on MM headers):
-
- Your CAT troff may not support \g (pure V7 troffs f'r instance).
- Experiment. You may have to bugger around with the macros to
- remove dependence on \g. (which is supposed to return a code
- denoting the output format of a number register, and is usually
- used to determine whether a number register has ever been set)
-
- ME macros don't seem to work:
-
- A friend noted:
-
- In order to make them useable, I had to modify them somewhat. The
- problem was with the following syntax:
-
- .if t \
- \{
- . zz
- .\}
-
- Our (Xenix) troff required the following instead:
-
- .if t \{\
- . zz
- .\}
-
- This was required for all occurances of "\{". It seems "\{" MUST
- terminate a line, and MUST be followed by a "\<NEWLINE>". Even a ".\{"
- didn't help any.
-
- Everything okay, but some characters missing (or wrong) on output:
- (ditroff drivers may complain about characters not found)
-
- Chances are that your printer or set of fonts doesn't support
- that character. Postscript driving should be perfect. Some
- ditroff drivers don't have character sets that are a superset
- of CAT troff. There are a few minor problems with LJ character
- sets. psdit, xproof, xtroff are missing a few CAT characters.
- You may be able to resolve these by adding translation overrides
- to the appropriate *.fonts file (see jt.fonts for examples).
- Some ditroff's have different meanings for the same character
- spec. ("@" in some ditroff drivers is a different character)
-
- My ditroff driver dies with errors about lines starting with "#":
-
- define NOCHATTER.
-
- My postscript printer server gets upset:
-
- define NOCHATTER
-
- I get postscript printer errors on last page, or last page missing:
-
- Have you got a DEC LN03 or some other printer that doesn't
- like trailing control-D's? Define "NOCONTROLD" in defs.h
-
- Ditroff driver doesn't work/gives errors:
-
- check, recheck, and check again for ditroff backend config
- (lparg/ptr in psroff.lib.S). Try "psroff -t" and then
- hand feeding the stdout to your backend manually. Experiment
- with "-d" setting in t2arg in psroff.lib.S. If related
- to specific characters, maybe adding translation overrides
- in the appropriate *.fonts file will help
-
- Ditroff input (-N) doesn't work/gives errors:
-
- Particularly remarks about not knowing about specific characters.
- That's because the psroff tables don't match ditroff's.
- Make sure that the extension section of the appropriate
- *.fonts file is in agreement with your ditroff width tables.
- cd widths; make extensions to rebuild these tables to tack
- onto the end of the appropriate *.fonts file.
-
- Laserjet printers get confused and loses settings (eg: copy count etc)
-
- Be aware of the fact that lj.lib has a RESET command. If you
- have some sort of spooler that's emitting commands to the printer
- outside of the control of psroff (eg: copy count set before
- psroff output), you may have to change it.
-
- Laserjet: wrong font selection (particularly when the result is
- 10 point Courier), troff2ps compaining that it can't find a font
- file:
-
- - lj.fonts incorrect.
- - Don't have any good font files - buy some good ROMAN8's for
- Roman, Italic and Bold, or use TeX fonts and "make buildljfonts".
-
- Laserjet: sizes of characters are wrong, some characters missing, wrong
- font selected.
-
- - Get some decent fonts. If you don't have the right size (within
- a few points) or font available, psroff will get the printer
- to select a font. Which will usually look wrong. Further, if
- the printer selects a font that has been incrementally downloaded,
- some characters may be missing on the output. If you've not
- gotten any additional fonts, "make test" will show an example
- of this problem, in that the line supposedly 16 point will
- be the wrong size and some characters will be missing (italic
- and bold "6")
-
- Laserjet: lousey/wrong/missing characters (non-S font):
-
- - You got crummy fonts. Go buy or steal some good ROMAN8's in Roman,
- Italic and Bold at CAT troff's supported point sizes.
- TeX's PK fonts will work, but non-alphanumeric characters will
- often be wrong (particularly box drawing and backslash).
- - Get a HP or Adobe Postscript cartridge. (The Pacific Page does work
- fine, except for reports that at least some of them use slightly
- different fonts, and the widths will be off).
-
- My laserjet stalls, gives "too complex" messages, doesn't switch fonts
- sometimes:
-
- - Some HPLJ clones don't support incremental downloading. undefine
- INCR and try again. Plain laserjets (the old ones) don't support
- font downloading at all. Sigh...
- - Ran out of memory - (INCR on): simplify document to use less fonts
- or reduce MDLF.
- - Ran out of memory - (INCR and PARTIAL off): turn on PARTIAL
- - Too many fonts previously loaded - adjust PRELOAD.
- - double check MDLF.
-
- Manual pages look great except the page footers are at the top of the
- next page. MM and MS work fine.
-
- - You're IBM AIX right? Sigh.... The man macros in AIX explicitly
- set page length to something other than 11 inches. Supply
- "-rM1" to psroff, and the macros will select 11 inches. Or,
- you could insert a ".nr M 1" the beginning of adapters/tmac.an.
-
- SQTroff ditroff backend sometimes barfs on psroff ditroff output:
-
- It do do that don't it? SQTroff ditroff format is apparently
- slightly different. Then again, if you got SQTroff, why you have
- psroff?
-
- xproof sometimes dies with "too many font" messages:
-
- - AT&T's fault. (Each symbol character is a separate font, xproof
- is configured for a maximum of 50 or so fonts... duh...)
-
- The Bell Symbol (\(bs) isn't:
-
- It ain't supposed to be.
-
- Psroff is wonderful:
-
- Of course. Didn't I say it would be? ;-)
-
- TEST SHEET INTERPRETATION:
-
- If you see problems after running the test sheet, here are a few
- suggestions:
-
- - Laserjet output: *badly* splattered, most characters unrecognizeable
- and probably more than one or two pages: If you're not using a Hewlett
- Packard Laserjet, try undefining INCR and rebuilding. Some clones won't
- handle incremental downloading. Other possibilities: if you are
- printing via serial line, make sure that the serial line is 8 bit raw
- (eg: cs8 and -opost on System V, or CBREAK mode in BSD)
- Check /etc/printcap or /usr/spool/lp/interface/*.
- - Character spacing objectionably off in the text portions - some
- versions of troff, such as SunOS, do not support trofftype "-T$width",
- but they don't complain about it. Try the -F variant.
- If you're manually invoking troff (ala "troff.... | troff2ps"),
- you probably aren't picking up the common.pre macro adapter that
- tells troff to reload its fonts from psroff's versions rather than
- their own built-ins. Another symptom I've seen is floating point
- exceptions or the long horizontal lines in the table consisting
- of one _ character around the middle of the line.
- - Postscript doesn't print - probably you have echo set on your
- serial line. Turn it *off*. Alternately, maybe your printer
- doesn't want to see control-D's - see the discussion in
- troff2ps(n)
- - Laserjet: the "6" is missing in the test page on the "16 point italic"
- and "16 point bold". You don't have enough fonts, or they're not
- configured properly.
-