4.2 Environment

See the Kpathsearch library documentation (the `Path specifications' node) for the details of how the environment variables are use when searching. The kpsewhich utility can be used to query the values of the variables.

If the environment variable TEXMFOUTPUT is set, MetaPost attempts to put its output files in it, if they cannot be put in the current directory.

Here is a list of the environment variables which affect the behavior of MetaPost:


Search path for input files.


Auxiliary search path for input files with .mf extensions.


Directory for various tables for handling included TeX and troff.


The name of a shell script that converts embedded typesetting commands to a form that MetaPost understands. Defaults: makempx for TeX and troffmpx for troff.


The version of TeX - or LaTeX - to use when processing btex and verbatimtex commands. Default TeX. This version of MetaPost allows you to use a `%&format' line instead.


The troff pipeline for btex and verbatimtex commands. Default eqn -d\$\$ | troff


A command template for invoking an editor.

A .mem file is a binary file that permits fast loading of macro packages. MetaPost reads the default plain.mem unless another .mem file is specified at the start of the first line with an & just before it. There is also an mfplain.mem that simulates plain Metafont so that MetaPost can read .mf fonts. (Plain Metafont is described in The Metafontbook).

Experts can create .mem files by invoking inimpost and giving macro definitions followed by a dump 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.