GNU Info

Info Node: (web2c.info)dmp invocation

(web2c.info)dmp invocation


Next: mpto invocation Prev: dvitomp invocation Up: MetaPost
Enter node , (file) or (file)node

DMP: Ditroff to MPX conversion
==============================

  DMP converts device-independent Troff (ditroff) output files into
low-level MetaPost commands in a so-called MPX file.  This program is
generally invoked by MakeMPX (Note: makempx invocation).  Synopsis:

     dmp [DITROFF-FILE [MPXFILE]]

If DITROFF-FILE is not specified, input comes from standard input; and
if MPXFILE is not specified, output goes to standard output.

  DMP was written to process the output of a Troff pipeline fed the
output of `mpto -troff' (Note: mpto invocation).  DMP understands all
the `DC' graphics functions that `dpost' does, but it ignores `x X'
device control functions such as `x X SetColor:...', `x X BeginPath:',
and `x X DrawPath:...'.

  The available font names are defined in the support file
`trfonts.map', which DMP looks for along the `MPSUPPORT' path.

  Another support file `trchars.adj', also looked for along the
`MPSUPPORT' path, contains a character adjustment table which should
reflect the shift amounts found in the standard PostScript prologue for
Troff and dpost found in the `TRFONTS' directory.  Such an adjustment
table is unnecessary for some Troff implementations, in which case
`trchars.adj' should be replaced by an empty file--but it must still
exist.

  DMP was written for one particular Troff implementation, and it
unfortunately has many built-in assumptions about the output and fonts
file formats used by Troff, which may not be satisfied in other
environments.  In particular, GNU groff uses some extensions in its file
formats described in groff_font(5) and groff_out(5) which make its
output completely unusable for DMP.  On the other hand, the Troff
version found in Sun Solaris 2.x, and perhaps other systems derived from
System V R4, works fine with the default settings.

  If you run into trouble and want to adapt DMP to other systems, you
might have to try the following (this is primarily for hackers):

   * If DMP complains about a missing font table (e.g., `Cannot find
     TR'), your Troff may not support the device `post'.

     Check troff(1) for the devices supported by your Troff and set the
     `TROFF' environment variable appropriately (see above).  Also,
     locate the appropriate font directory and set the `TRFONTS'
     variable as needed.

   * If DMP complains about a missing font description file (e.g., `Font
     TR was not in map file'), your version of Troff may be using
     internal font names different from those in the distributed
     `trfonts.map'; e.g., TR and TI instead of R and I for Times-Roman
     and Times-Italic.

     In this case, you may have to adapt `trfonts.map' and perhaps also
     `trchars.adj' in the MetaPost support directory
     (`texmf/metapost/support' by default).

   * If DMP still complains that it cannot parse the font description
     files or the Troff output (e.g., `TR has a bad line in its
     description file', you are probably out of luck and have to hack
     the DMP program (in `web2c/mpware/dmp.c').

     Such problems may be caused by subtle differences in the file
     formats, such as use of tabs vs. spaces as field separators or
     decimal vs. octal vs. hex format for font metric data.

     A reasonably good description of the expected Troff file formats
     can be found in AT&T technical report CSTR-54 (`Troff User's
     Manual', Revised 1992).  Documentation on the subtle differences
     in other Troff implementation is harder to find except for GNU
     groff, where it's all documented in the above-mentioned
     groff_font(5) and groff_out(5).

     Any contributions to improve the portability of DMP or to make it
     work with GNU groff are welcome, of course.


  (Some of the above description was edited from the `dmp.c' source
file, written by John Hobby.)

  The only options are `--help' and `--version' (Note: Common
options).


automatically generated by info2www version 1.2.2.9