MP(1)

NAME
mp, MetaPost - system for drawing pictures

SYNOPSIS
mp [ -I ] [ -T ] [ first-line ]

DESCRIPTION
Mp interprets the MetaPost language and produces PostScript pictures. The MetaPost language is similar to Knuth's METAFONT with additional features for including tex(1) or troff(1) commands and accessing features of PostScript not found in METAFONT. The -T flag selects troff instead of tex.

An argument given on the command line behaves as the first input line. That can be either a (possibly truncated) file name or a sequence MetaPost commands starting with and including an command. Thus processes the file The basename of becomes the jobname, and is used in forming output file names. If no file is named, the jobname becomes The default extension can be overridden by specifying an extension explicitly.

There is normally one output file for each picture generated, and the output files are named jobname.nnn, where nnn is a number passed to the macro. The output file name can also be jobname.ps if this number is negative.

The output files can be used as figures in a TeX document by including
\special{psfile=jobname.nnn} in the TeX document. Alternatively, one can and then use the macro \epsfbox{jobname.nnn} to produce a box of the appropriate size containing the figure.

btex TeX commands etex
    This causes mp to generate a MetaPost picture expression that corresponds to the TeX commands. If the TeX commands generate more than one line of text, it must be in a or a minipage environment.

verbatimtex TeX commands etex
    This is ignored by mp except that the TeX commands are passed on to TeX. When using LaTeX instead of TeX the input file must start with a block that gives the and commands.

Since most TeX fonts have to be downloaded as bitmaps, the feature works best when the output of is to be included in a TeX document so that dvips(1) can download the fonts. For self-contained PostScript output that can be used directly or included in a troff document, start your MetaPost input file with the command and stick to standard PostScript fonts. TeX and MetaPost use the names in the third column of the file

MetaPost output can be included in a troff document via the macro package. In this case mp should be invoked with the -T flag so that the commands between and or between and are interpreted as troff instead of TeX. (This automatically sets ).

Here is a list of the environment variables affect the behavior of mp:

MPINPUTS
    Search path for files. It should be colon-separated, and start with dot. Default:

MFINPUTS
    Auxiliary search path for files with extensions.

TEXFONTS
    Search path for font metric files.

MPXCOMMAND
    The name of a shell script that converts embedded typesetting commands to a form that mp understands. Defaults: for tex and for troff

TEX The version of TeX to use when processing and commands. Default:

TROFF
    The troff pipeline for and commands. Default:

MPMEMS
    Search path for files. Default:

MPPOOL
    Search path for strings. Default:

MPEDITOR
    A command for invoking an editor with in place of the file name and in place of the line number.

TEXVFONTS
    Search path for virtual fonts.

MPTEXPRE
    Name of a file that is prepended before running tex. If this file exists, mp behaves as if the file were inside of a block at the beginning of each input file. Default:

A file is a binary file that permits fast loading of fonts and macro packages. Mp reads the default unless another file is specified at the start of the first line with an just before it. There is also an that simulates plain METAFONT so that mp can read fonts. (Plain METAFONT is described in The METAFONTbook).

Experts can create files be invoking mp with the -I switch and giving macro definitions followed by a command.

The MetaPost language is similar to METAFONT, but the manual A User's Manual for MetaPost assumes no knowledge of METAFONT. MetaPost does not have bitmap output commands or METAFONT's online display mechanism.

FILES

macros,
    files, and tables for handling included tex and troff

Directory for programs that handle included
    tex and troff. table of corresponding font names for troff, PostScript, and TeX

The source file for a few sample figures.
    troff.

SEE ALSO
tex(1),
Donald E. Knuth, The METAFONTbook, Addison Wesley, 1986,
John D. Hobby, A User's Manual for MetaPost CSTR 162.