GNU Info

Info Node: (web2c.info)makempx invocation

(web2c.info)makempx invocation


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

MakeMPX: Support MetaPost labels
================================

  In MetaPost, labels can be typeset using any document processor; the
Web2c implementation supports TeX and Troff.  MakeMPX translates the
labels from the typesetting language back into low-level MetaPost
commands in a so-called "mpx file", so text can be manipulated like
other graphic objects.  It is invoked automatically by MetaPost.
Synopsis:

     makempx [-troff] MPFILE MPXFILE

The input comes from MPFILE (no path searching is done), and the output
goes to MPXFILE.  However, if the file MPXFILE already exists, and is
newer than MPFILE, then nothing is done (presumably the file is
up-to-date).

  Otherwise:
  1. MPto is run to extract the label text from the MetaPost source
     file MPFILE (Note: mpto invocation).

  2. The typesetting program itself is run, either TeX or Troff (see
     below).  If TeX, and the file named by the `MPTEXPRE' environment
     variable exists (`mptexpre.tex' by default), that file is
     prepended to the input from the MetaPost file.

  3. The typesetter output (a DVI file in the case of TeX, Ditroff
     output for Troff) is translated back to MetaPost, by DVItoMP
     (Note: dvitomp invocation) or DMP (Note: dmp invocation)
     respectively.

  If any of the above steps fail, for example if there was a typesetting
mistake in the original MPFILE, output may be left in files named
`mpxerr.{log,tex,dvi}' (TeX) or `mpxerr{,.t}' (Troff), so you can
diagnose the problem.

  The `-troff' option to MPto selects the Troff commands, rather than
TeX.  MetaPost supplies this automatically if the `-T' or `-troff'
option was specified to MetaPost.

  The MPX file created by MakeMPX is a sequence of MetaPost picture
expressions, one for every label in the original MetaPost input file.

  The names of the commands run by MakeMPX, and the directory added to
the shell search `PATH' for the commands' location, are overridden by
environment variables.  Here is a list:

`MAKEMPX_BINDIR'
     The directory added to the `PATH'.  Default is the `$(bindir)'
     Make directory, which in turn is set from the configure-time
     `--bindir', `--exec-prefix' and `--prefix' options; if nothing
     else is specified, the default is file `/usr/local'.

`NEWER'
     The command run to determine if MPXFILE is out of date with respect
     to MPFILE; default is `newer'.

`MPTOTEX'
     The command run to extract MetaPost labels in TeX format; default
     is `mpto -tex'.

`MPTOTR'
     Likewise, for Troff; default is `mpto -troff'.

`DVITOMP'
     The command run to convert TeX output back to MetaPost; default is
     `dvitomp'.

`DMP'
     Likewise, for Troff; default is `dmp'.

`TEX'
     The command run to typeset the labels in TeX; default is `tex'.
     If you use LaTeX, set this to `latex', and supply an appropriate
     `verbatimtex' header in the MP source (Note: mpost invocation).

`TROFF'
     Likewise, for Troff; default is `'eqn -d\$\$ | troff -Tpost''.  You
     may need to replace `-Tpost' by `-TTERM', where TERM is the
     PostScript device name for your Troff implementation, e.g., `ps'
     or `psc'; see troff(1).

     If you change this, you will also need to set the `TRFONTS'
     environment variable or configuration value to point to the
     appropriate font directory, traditionally `/usr/lib/font/devTERM'.


automatically generated by info2www version 1.2.2.9