home *** CD-ROM | disk | FTP | other *** search
- Ditroff input configuration notes
- 2.3 91/02/20
-
- This document attempts to describe some of the issues of using
- psroff with ditroff instead of CAT troff.
-
- The heart of the whole issue is the use of the -N option
- to troff2ps (see lib/psrofflib.S). Which permits the translation
- of ditroff codes into the desired output format. This translation
- is fully supported in this release.
-
- There are some other ancilliary issues in ditroff which you
- should be aware of:
-
- - trofftype
- - width tables
- - macro adapters
- - page offsets
-
- Trofftype:
- ---------
-
- Is forced to be '-T$width' if the -N option is in t2arg in
- lib/psrofflib.S by psroff.S
-
- Width tables:
- ------------
-
- Psroff installation does not install ditroff width tables
- into a place for ditroff to find them. The "make installwidths"
- only installs CAT-compatible width tables in FONTDIR/<widthname>/ft*,
- yet, ditroff will insist upon a FONTDIR/dev<widthname>/*.out format.
-
- The supplied lj3 and ps widths (widths/width???) files are designed to
- operate with full ditroff. To use them, copy widths/widthlj3/[A-Z]* to
- FONTDIR/devlj3 or widths/widthps/[A-Z]* to FONTDIR/devpsc. Then,
- chdir to that directory and run "makedev". Some ditroff releases
- came without a "makedev" program. A reimplementation
- of makedev was published in comp.sources.misc in 1988:
-
- v02i084 mkfont mkfont/rdfont--compile and uncompile ditroff fonts
-
- Other width tables that are built on the fly (lj & jt) need some
- hand fiddling before being slammed into makedev (headers on the files,
- and more complete DESC files).
-
- In the lib/psrofflib.S file you should specify the "width=" parameter
- to be the suffix of the ditroff directory. Eg: FONTDIR/devpsc should
- be "width=psc".
-
- If you wish to use the optimizer, you will need to perform a
- "make installwidths", and then supply "-Z" and "-W/usr/lib/font/<x>",
- where <x> is "ps" or "lj3". Eg: the optimizer must read CAT format
- width tables, and the name may not necessarily be the same as the
- "$width" parameter.
-
- If you alter width tables, you will have to repeat this process
- (rerunning makedev with new width tables in dev$width, and
- reinstalling the CAT width tables by using "make installwidths").
-
- Macro Adapters & Page offsets:
- -----------------------------
-
- When you specify "-mm", tsroff goes and looks for a file called
- "tmac.m" in the macro library area, namely, /usr/lib/tmac.
- In order to support CAT troff, psroff looks in LIBDIR/adapters
- for a file called tmac.m, which includes LIBDIR/adapters/cmn.pre
- to predefine some CAT-specific things, then includes
- /usr/lib/tmac/tmac.m to customize the real tmac.m macros for
- CAT limitations, then includes LIBDIR/adapters/cmn.post.
-
- You'll probably want to simply replace adapters/tmac.*.S with
- a ".so" of the real macros. Eg, for -mm, replace tmac.m.S
- with:
- .so /usr/lib/tmac/tmac.m
- .de sR
- \X'\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9'
- ..
- (Note, since I don't really know the ditroff convention for
- the contents of \X, other code that relies on particular
- behaviour for \X may not work. Though, if you use the .sR
- mechanism as described in the psroff/troff2ps manual pages,
- that will work just as it does with CAT troff.
-
- Also, you'll probably want to override the default 1/2 inch offset
- that troff2ps implements by specifying -O0 in the t2arg entry of
- lib/psrofflib.S.
-