home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume24 / psroff3.0 / part15 / DITROFF next >
Encoding:
Text File  |  1991-10-09  |  3.2 KB  |  88 lines

  1.         Ditroff input configuration notes
  2.             2.3 91/02/20
  3.  
  4. This document attempts to describe some of the issues of using
  5. psroff with ditroff instead of CAT troff.
  6.  
  7. The heart of the whole issue is the use of the -N option
  8. to troff2ps (see lib/psrofflib.S).  Which permits the translation
  9. of ditroff codes into the desired output format.  This translation
  10. is fully supported in this release.
  11.  
  12. There are some other ancilliary issues in ditroff which you
  13. should be aware of:
  14.  
  15.     - trofftype
  16.     - width tables
  17.     - macro adapters
  18.     - page offsets
  19.  
  20. Trofftype:
  21. ---------
  22.  
  23. Is forced to be '-T$width' if the -N option is in t2arg in
  24. lib/psrofflib.S by psroff.S
  25.  
  26. Width tables:
  27. ------------
  28.  
  29. Psroff installation does not install ditroff width tables
  30. into a place for ditroff to find them.  The "make installwidths"
  31. only installs CAT-compatible width tables in FONTDIR/<widthname>/ft*,
  32. yet, ditroff will insist upon a FONTDIR/dev<widthname>/*.out format.
  33.  
  34. The supplied lj3 and ps widths (widths/width???) files are designed to
  35. operate with full ditroff.  To use them, copy widths/widthlj3/[A-Z]* to
  36. FONTDIR/devlj3 or widths/widthps/[A-Z]* to FONTDIR/devpsc.  Then,
  37. chdir to that directory and run "makedev".  Some ditroff releases
  38. came without a "makedev" program.  A reimplementation
  39. of makedev was published in comp.sources.misc in 1988:
  40.  
  41.     v02i084   mkfont  mkfont/rdfont--compile and uncompile ditroff fonts
  42.  
  43. Other width tables that are built on the fly (lj & jt) need some
  44. hand fiddling before being slammed into makedev (headers on the files,
  45. and more complete DESC files).
  46.  
  47. In the lib/psrofflib.S file you should specify the "width=" parameter
  48. to be the suffix of the ditroff directory.  Eg: FONTDIR/devpsc should
  49. be "width=psc".
  50.  
  51. If you wish to use the optimizer, you will need to perform a
  52. "make installwidths", and then supply "-Z" and "-W/usr/lib/font/<x>",
  53. where <x> is "ps" or "lj3".  Eg: the optimizer must read CAT format
  54. width tables, and the name may not necessarily be the same as the
  55. "$width" parameter.
  56.  
  57. If you alter width tables, you will have to repeat this process
  58. (rerunning makedev with new width tables in dev$width, and
  59. reinstalling the CAT width tables by using "make installwidths").
  60.  
  61. Macro Adapters & Page offsets:
  62. -----------------------------
  63.  
  64. When you specify "-mm", tsroff goes and looks for a file called
  65. "tmac.m" in the macro library area, namely, /usr/lib/tmac.
  66. In order to support CAT troff, psroff looks in LIBDIR/adapters
  67. for a file called tmac.m, which includes LIBDIR/adapters/cmn.pre
  68. to predefine some CAT-specific things, then includes
  69. /usr/lib/tmac/tmac.m to customize the real tmac.m macros for
  70. CAT limitations, then includes LIBDIR/adapters/cmn.post.
  71.  
  72. You'll probably want to simply replace adapters/tmac.*.S with
  73. a ".so" of the real macros.  Eg, for -mm, replace tmac.m.S
  74. with:
  75.     .so /usr/lib/tmac/tmac.m
  76.     .de sR
  77.     \X'\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9'
  78.     ..
  79. (Note, since I don't really know the ditroff convention for
  80. the contents of \X, other code that relies on particular
  81. behaviour for \X may not work.  Though, if you use the .sR
  82. mechanism as described in the psroff/troff2ps manual pages,
  83. that will work just as it does with CAT troff.
  84.  
  85. Also, you'll probably want to override the default 1/2 inch offset
  86. that troff2ps implements by specifying -O0 in the t2arg entry of
  87. lib/psrofflib.S.
  88.