home *** CD-ROM | disk | FTP | other *** search
- Miscellaneous Tuning/Customization
- 2.9 91/03/26
-
- - Postscript spooling: Theoretically speaking, it is better
- to have psxlate in your Postscript printer spooler interface
- than as a pipeline in psroff. For System V, you might want
- to insert psxlate as the filter (instead of the more-usual
- cat) in the interface file when you're passing postscript through
- to the printer. On lpr-type spoolers, make psxlate the filter
- program in /etc/printcap. Then you'll be able to use psxlate's
- processing on all of your postscript output.
-
- Notes: psxlate does NOTHING to files without a "%!PS-Adobe-"
- header. In other words, psxlate doesn't do anything to files
- that don't conform to the Document Structuring Conventions.
- Eventually psxlate will probably permit you to do n-up (but
- not page flipping) on any file that has a "%!" at the front,
- and do automatic ASCII to Postscript conversions on files that
- don't have "%!", further, page flipping and n-up *will* work.
-
- - psfig: If you have psfig, copy the psfig Postscript prolog
- to LIBDIR/lib/psfig.ps, and insert the following line at
- the end of ps.lib:
- %%%include psfig
- (psfig.ps is a subset of the psdit prolog fragment given in the
- "patch" subdirectory in the psfig release - the README tells
- you which part)
-
- Psfig works perfectly with ditroff, and should work reasonably
- well with CAT troff. Note: most ditroff's have a bug where
- the horizontal position is not emitted before a \X'...'
- sequence. This is seen by diagrams that aren't quite where
- they should be horizontally - often at the left margin when
- they should really be centered. This can be rectified if
- you have source with a patch for ditroff that comes bundled with
- psfig. If you do not have ditroff source, the psfig option "-fts"
- (not mentioned in the man page for psfig) will compensate for the
- problem, at the expense of losing the ability to use the \(ts character.
- The -fts option is ALWAYS required with CAT troff. See "catconv"
- below.
-
- (Note: In the psfig document under the "doc" directory in the
- psfig release, page 10 contains a MACWrite generated figure.
- Near the end of page 10 there is a bit of postscript that
- most postscript printers don't like (a findfont) - print aborts
- at this point are NOT the fault of psroff, but a fault in the
- postscript that psfig has included).
-
- - catconv: catconv converts ditroff-only-isms into something handled
- by psroff. In order for you to use this, you have to have a copy
- of perl installed on your machine. This isn't completely
- integrated into psroff, so here are a few things to consider:
- - the catconv script's startup (the #!/usr/bin/perl stuff)
- may have to be changed to reflect your perl install configuration.
- - If you specify "v=1" in the psrofflib entry, psroff will
- arrange to invoke catconv properly, so that you don't have
- to manually invoke catconv - the "cdps" entry has an example.
- If you are using CAT troff, if you cannot use catconv, you will
- not be able to use psfig, \X'...' commands, \D'....' commands
- (PIC) or the extended character set.
-
- - HPLJ tuning:
- bestmatch: in lj.c's bestmatch function there is are arrays
- "bigtry" and "smalltry". These arrays provide a scan
- sequence finding a font size "close" to a requested font
- size that lj.fonts indicates isn't present. If there
- are holes in your fonts, you may want to experiment with
- these arrays.
- tbl box corners: depending on where you got your fonts from,
- you may have to slightly adjust the box drawing characters
- to match up at the corners of tbl boxes. To do this,
- append to lj.fonts:
-
- normal
- ru N _ 0 -200
- symbol
- br N | -220 0
-
- The two numbers are the X and Y shifts of the corresponding
- characters, where the numbers are scaled by (.01 * pointsize)
- to get a shift in 1/720'ds. Adjust these (carefully examine
- tbl output to decide whether you want to move ru or br).
-
- The distributed defaults (which are shown here) are suitable
- for HP Times-Roman font floppies.
-
- - performance: you can preload commonly used fonts into your
- laserjet and thereby greatly reduce transmission time.
- Consult the manual page for pk2sfp about the -P, -i, -S and -p
- options (don't forget to mark the pointsizes you've downloaded
- as "b" in the lj.fonts file).
-
- - ditroff tuning: Many of the ditroff converters have slightly
- different correspondences between what character is in what
- font. You may want to modify the *.fonts file that you're
- using to make sure that every character you want is being
- printed correctly. As an example, with tpscript "@" and
- "^" aren't S font characters - they're in the normal fonts,
- but the dt.c table says they're "symbol". To tune for
- tpscript:
-
- - modify psrofflib to have "-ptp" option to troff2ps (t2arg).
- - copy dt.fonts to tp.fonts (in LIBDIR/lib).
- - append to tp.fonts the following font override sequence:
-
- symbol
- ^ N
- @ N
-
- psdit and xtroff appear to require the same things to be done
- for "^" and "@" (psdit prints nothing without these, and xtroff
- prints some other characters instead).
-
- Jetroff requires similar things, and jt.fonts has a more
- extensive example of this. Font overrides are documented
- more completely next:
-
- - If you want to play around with character mappings.....
- Eg: adding accents for your own language (ie: German)
- The most important thing to remember is that you cannot extend
- the CAT's character sets without modifying troff - unlike ditroff
- where you can add them by changing the makedev files. This
- is how you do overrides (see troff2ps(1) for more details):
-
- - Put in a map override in the appropriate *.fonts file that
- emits the character you want in place of a character you
- don't need in the appropriate *.fonts file. Eg: for
- "germandbls" in ditroff, emit "ss" instead of "ct" for
- the cent character. Your override (in dt.fonts) would
- look like:
-
- ct N ss
-
- The complete override format is:
-
- <troffchar> N|S|n <sequence> <x adjust> <y adjust> <scale>
-
- x adjust, y adjust, scale default to 0, 0 and 100 respectively.
- x and y adjust are multiplied by .01, then the pointsize
- and of the output driver to give the shift factor in
- 1/resolution units. Scale allows you to change the size
- of that one character (eg: you think bullet is too small), but
- it isn't recommended too much (it may not work reasonably
- on non-postscript drivers). Again, scale is prescaled by
- .01 first, so 100 is 1-1.
-
- <sequence> defaults to <troffchar>. N means normal mapping
- (eg: for fonts other than S with no cross font jumping),
- S means symbol font, and "n" means specific font (usually >3 -
- eg: special bracket fonts).
-
- - Modify the width table for the character you're replacing
- to have the width for the character you're emitting.
- Eg: for germandbls in ditroff, replace the "ct" entry's
- width in widths/widthps/R with the width for "ss". This
- latter step is not necessary with laserjets because the
- build procedure builds a new width table using the
- remapping.
-
- With ditroff input (or the use of the "C" special directives - see
- troff2ps(1)), you can extend the character set as much as you want.
- You find the entry in the appropriate width files and add in the
- width entries for your character, and then add them to the
- "extensions" section of the ??.fonts file. See ps.fonts for
- an example. At present there's no way of getting the width
- information into CAT troff, but with ditroff everything works well.
- By adding the entry into the width file, the widths/Makefile
- will generate a complete set of extension characters in
- width??/??.ext, which can be appended onto the *.fonts file.
-
- - Adding fonts after installation:
- - New Laserjet fonts should be installed in the $LJF directory.
- - Non-laserjet fonts should have their ditroff width table placed
- in the proper widths/width?? directory.
- - Ensure that the appropriate lib/*.fonts file contains the fonts
- you're adding.
- - at the top level, type:
- make register
- - then
- su root
- make installwidths
-
- - Display Postscript: My display postscript came with the source for
- a utility called "dpsexec", which is a simple Postscript previewer
- front end. The source on a IBM RS/6000 was in:
- /usr/lpp/DPS/examples/dpsexec/dpsexec.c
- For best results, you may want to apply the following patch
- to it (it redefines the initial window to be big enough
- to contain a standard page, as well as adding a "!" escape to
- shell in the interrupt handler):
-
- =========== DPSEXEC.C PATCH START ==============
- *** dpsexec.c.orig Sat Mar 9 02:00:45 1991
- --- dpsexec.c Mon Mar 11 23:27:32 1991
- ***************
- *** 65,72 ****
- #include <DPS/XDPSlib.h>
- #include <DPS/dpsXclient.h>
-
- ! #define W_HEIGHT 512
- ! #define W_WIDTH 512
-
- static int quitFlag = 0;
- static unsigned long int enable, next, disable;
- --- 65,72 ----
- #include <DPS/XDPSlib.h>
- #include <DPS/dpsXclient.h>
-
- ! #define W_HEIGHT (11*72)
- ! #define W_WIDTH (9*72)
-
- static int quitFlag = 0;
- static unsigned long int enable, next, disable;
- ***************
- *** 195,200 ****
- --- 195,201 ----
- printf("\tq\tquit\n");
- printf("\ti\tinterrupt\n");
- printf("\tk\tkill\n");
- + printf("\t!\tshell\n");
- printf("Command: ");
- c = getchar(); getchar(); /* eat the newline */
- switch (c)
- ***************
- *** 215,220 ****
- --- 216,224 ----
- case 'k':
- command = 6;
- break;
- + case '!':
- + system("/bin/sh");
- + break;
- default:;
- }
-
- =========== DPSEXEC.C PATCH END ======================
-