


MPOST(1)                                                 MPOST(1)


NNAAMMEE
       mpost, inimpost, virmpost - MetaPost, a system for drawing
       pictures

SSYYNNOOPPSSIISS
       mmppoosstt [_o_p_t_i_o_n_s] [_c_o_m_m_a_n_d_s]

DDEESSCCRRIIPPTTIIOONN
       This manual page is not meant to be exhaustive.  The  com-
       plete  documentation  for this version of TeX can be found
       in the info file or manual _W_e_b_2_C_: _A _T_e_X _i_m_p_l_e_m_e_n_t_a_t_i_o_n.

       MetaPost interprets the  MetaPost  language  and  produces
       PostScript  pictures.  The MetaPost language is similar to
       Knuth's Metafont with additional  features  for  including
       tteexx(1)  or  ttrrooffff(1)  commands  and  accessing features of
       PostScript not found in Metafont.

       Like TeX and Metafont, MetaPost is normally  used  with  a
       large  body  of precompiled macros.  This version of Meta-
       Post looks at its command line to see  what  name  it  was
       called  under.  Both iinniimmppoosstt and vviirrmmppoosstt are symlinks to
       the mmppoosstt executable.  When called as  iinniimmppoosstt  (or  when
       the  ----iinnii  option  is given) it can be used to precompile
       macros into a _._m_e_m file.  When called as vviirrmmppoosstt it  will
       use  the  _p_l_a_i_n  mem.   When  called under any other name,
       MetaPost will use that name as the name of the mem to use.
       For  example,  when called as mmppoosstt the _m_p_o_s_t mem is used,
       which is identical to the  _p_l_a_i_n  mem.   Other  mems  than
       _p_l_a_i_n are rarely used.

       The _c_o_m_m_a_n_d_s given on the command line to the  program are
       passed to it as the first input line.  (But  it  is  often
       easier to type extended arguments as the first input line,
       since UNIX shells tend to gobble up or misinterpret  Meta-
       Post's favorite symbols, like semicolons, unless you quote
       them.)  The first line should begin  with  a  filename,  a
       \_c_o_n_t_r_o_l_s_e_q_u_e_n_c_e, or a _&_m_e_m_n_a_m_e.

       The  normal  usage  is  to say _m_p _f_i_g_s to process the file
       _f_i_g_s_._m_p.  The basename of _f_i_g_s  becomes  the  ``jobname'',
       and  is  used in forming output file names.  If no file is
       named, the jobname becomes _m_p_o_u_t.  The default  extension,
       _._m_p,  can be overridden by specifying an extension explic-
       itly.

       There is normally one output file for each picture  gener-
       ated,  and  the  output files are named _j_o_b_n_a_m_e.._n_n_n, where
       _n_n_n is a number passed to the _b_e_g_i_n_f_i_g macro.  The  output
       file  name  can also be _j_o_b_n_a_m_e.._p_s if this number is nega-
       tive.

       The output files can be used as figures in a TeX  document
       by including



Web2C 7.2                 28 April 1995                         1





MPOST(1)                                                 MPOST(1)


                      \\ssppeecciiaall{{ppssffiillee==_j_o_b_n_a_m_e_._n_n_n}}
       in  the  TeX  document.   Alternatively,  one  can  \\iinnppuutt
       eeppssff..tteexx and then use the macro
                         \\eeppssffbbooxx{{_j_o_b_n_a_m_e_._n_n_n}}
       to produce a box of the appropriate  size  containing  the
       figure.

       bbtteexx _T_e_X _c_o_m_m_a_n_d_s eetteexx
              This  causes  _m_p  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 _\_v_b_o_x or a minipage  environ-
              ment.

       vveerrbbaattiimmtteexx _T_e_X _c_o_m_m_a_n_d_s eetteexx
              This  is ignored by _m_p except that the TeX commands
              are passed on to TeX.  When using LaTeX instead  of
              TeX  the  input  file must start with a _v_e_r_b_a_t_i_m_t_e_x
              block that gives the _\_d_o_c_u_m_e_n_t_s_t_y_l_e and _\_b_e_g_i_n_{_d_o_c_-
              _u_m_e_n_t_} commands.  You can use the `%&' construct in
              the first verbatimtex block to ensure that the cor-
              rect TeX format is used to process the commands.

       Since most TeX fonts have to be downloaded as bitmaps, the
       _b_t_e_x feature works best when the output of  _m_p  is  to  be
       included  in  a TeX document so that ddvviippss(1) can download
       the fonts.  For self-contained PostScript output that  can
       be  used  directly  or included in a _t_r_o_f_f document, start
       your MetaPost input file with the command _p_r_o_l_o_g_u_e_s_:_=_1 and
       stick  to standard PostScript fonts.  TeX and MetaPost use
       the names in the third column  of  the  file  _t_r_f_o_n_t_s_._m_a_p,
       which  can  be found in the directories with support files
       for MetaPost.

       MetaPost output can be included in a  _t_r_o_f_f  document  via
       the  _-_m _p_i_c_t_u_r_e_s macro package.  In this case _m_p should be
       invoked with the --TT flag so that the commands between _b_t_e_x
       and  _e_t_e_x  or between _v_e_r_b_a_t_i_m_t_e_x and _e_t_e_x are interpreted
       as _t_r_o_f_f instead of TeX.  (This  automatically  sets  _p_r_o_-
       _l_o_g_u_e_s_:_=_1 ).

OOPPTTIIOONNSS
       This version of MetaPost understands the following command
       line options.

       ----mmeemm _m_e_m
              Use _m_e_m as the name of the mem to be used,  instead
              of  the  name  by which MetaPost was called or a _%_&
              line.

       ----hheellpp Print help message and exit.

       ----iinnii  Be iinniimmppoosstt, for dumping bases; this is  implicitly
              true if the program is called as iinniimmppoosstt.



Web2C 7.2                 28 April 1995                         2





MPOST(1)                                                 MPOST(1)


       ----iinntteerraaccttiioonn _m_o_d_e
              Sets  the interaction mode.  The mode can be one of
              _b_a_t_c_h_m_o_d_e, _n_o_n_s_t_o_p_m_o_d_e, _s_c_r_o_l_l_m_o_d_e, and  _e_r_r_o_r_s_t_o_p_-
              _m_o_d_e.   The  meaning  of these modes is the same as
              that of the corresponding commands.

       ----kkppaatthhsseeaa--ddeebbuugg _b_i_t_m_a_s_k
              Sets path searching debugging  flags  according  to
              the  bitmask.  See the _K_p_a_t_h_s_e_a manual for details.

       ----pprrooggnnaammee _n_a_m_e
              Pretend to be program _n_a_m_e.  This affects both  the
              format used and the search paths.

       --TT     Produce TROFF output.

       ----ttrrooffff
              As --TT.

       ----vveerrssiioonn
              Print version information and exit.

EENNVVIIRROONNMMEENNTT
       See the Kpathsearch library documentation (the `Path spec-
       ifications' node) for the details of how  the  environment
       variables  are  use when searching.  The kkppsseewwhhiicchh 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  affect  the
       behavior of _m_p:


       MPINPUTS
              Search path for _i_n_p_u_t files.

       MFINPUTS
              Auxiliary  search  path  for  _i_n_p_u_t  files with _._m_f
              extensions.

       MPSUPPORT
              Directory for various tables for handling  included
              _t_e_x and _t_r_o_f_f.

       MPXCOMMAND
              The  name  of a shell script that converts embedded
              typesetting commands to a form that MetaPost under-
              stands.  Defaults: _m_a_k_e_m_p_x for _t_e_x and _t_r_o_f_f_m_p_x for
              _t_r_o_f_f.

       TEX    The version of  TeX  -  or  LaTeX  -  to  use  when



Web2C 7.2                 28 April 1995                         3





MPOST(1)                                                 MPOST(1)


              processing  _b_t_e_x and _v_e_r_b_a_t_i_m_t_e_x commands.  Default
              _t_e_x.  This version of MetaPost allows you to use  a
              `%&format' line instead.

       TROFF  The  _t_r_o_f_f  pipeline  for _b_t_e_x and _v_e_r_b_a_t_i_m_t_e_x com-
              mands.  Default _e_q_n _-_d_\_$_\_$ _| _t_r_o_f_f

       MPEDIT A command template for invoking an editor.

       A _._m_e_m file is a binary file that permits fast loading  of
       macro  packages.  _m_p_o_s_t reads the default _p_l_a_i_n_._m_e_m unless
       another _._m_e_m file is specified at the start of  the  first
       line with an _& just before it.  There is also an that sim-
       ulates plain Metafont so that _m_p_o_s_t can  read  _._m_f  fonts.
       (Plain Metafont is described in _T_h_e _M_e_t_a_f_o_n_t_b_o_o_k).

       Experts  can  create  _._m_e_m  files be invoking _i_n_i_m_p_o_s_t and
       giving macro definitions followed by a _d_u_m_p command.

       The MetaPost language is similar to Metafont, but the man-
       ual  _A  _U_s_e_r_'_s _M_a_n_u_a_l _f_o_r _M_e_t_a_P_o_s_t assumes no knowledge of
       Metafont.  MetaPost does not have bitmap  output  commands
       or Metafont's online display mechanism.

FFIILLEESS
       _m_p_o_s_t_._p_o_o_l
              Encoded text of MetaPost's messages.

       _*_._m_e_m  Predigested MetaPost mem files.

       _p_l_a_i_n_._m_p
              The standard mem file.

       _m_f_p_l_a_i_n_._m_p
              The  Metafont-compatible  mem file.  This is loaded
              when _v_i_r_m_p is invoked via a symbolic link as  _m_f_m_p.

       _$_T_E_X_M_F_M_A_I_N_/_m_e_t_a_p_o_s_t_/_b_a_s_e_/_*_._m_p
              The standard MetaPost macros included in the origi-
              nal distribution.

       _$_T_E_X_M_F_M_A_I_N_/_m_e_t_a_p_o_s_t_/_s_u_p_p_o_r_t_/_*
              Various tables for handling included _t_e_x and _t_r_o_f_f.

       _$_T_E_X_M_F_M_A_I_N_/_m_e_t_a_p_o_s_t_/_s_u_p_p_o_r_t_/_t_r_f_o_n_t_s_._m_a_p
              Table  of  corresponding  font  names for _t_r_o_f_f and
              PostScript.

       _p_s_f_o_n_t_s_._m_a_p
              Table of  corresponding  font  names  for  _t_e_x  and
              PostScript.

       _$_T_E_X_M_F_M_A_I_N_/_d_o_c_/_m_e_t_a_p_o_s_t_/_e_x_a_m_p_l_e_s_._m_p
              The  source  file for a few sample figures that are



Web2C 7.2                 28 April 1995                         4





MPOST(1)                                                 MPOST(1)


              part  of  a  LaTeX  document   _$_T_E_X_M_F_M_A_I_N_/_d_o_c_/_m_e_t_a_-
              _p_o_s_t_/_m_p_i_n_t_r_o_._t_e_x that describes the MetaPost system
              in a little more detail.

SSUUGGGGEESSTTEEDD RREEAADDIINNGG
       Donald E. Knuth, _T_h_e _M_e_t_a_f_o_n_t_b_o_o_k (Volume C  of  _C_o_m_p_u_t_e_r_s
       _a_n_d     _T_y_p_e_s_e_t_t_i_n_g),     Addison-Wesley,    1986,    ISBN
       0-201-13445-4.
       John D. Hobby, _A _U_s_e_r_'_s _M_a_n_u_a_l  _f_o_r  _M_e_t_a_P_o_s_t,  CSTR  162,
       AT&T Bell Labs,
       John  D.  Hobby,  _D_r_a_w_i_n_g  _G_r_a_p_h_s _w_i_t_h _M_e_t_a_P_o_s_t, CSTR 164,
       AT&T Bell Labs,
       _T_U_G_b_o_a_t (the journal of the TeX Users Group).

SSEEEE AALLSSOO
       tteexx(1), mmff(1), ddvviippss(1).

AAUUTTHHOORRSS
       MetaPost was designed  by  John  D.  Hobby,  incorporating
       algorithms from Metafont by Donald E. Knuth.  It was orig-
       inally implemented on Unix, incorporating system-dependent
       routines  from  wweebb22cc, while not relying on it exccept for
       the actual Web-to-C translator.

       Ulrik Vieth adapted MetaPost  to  take  advantage  of  the
       advanced  path  searching features in more recent versions
       of wweebb22cc and worked  towards  fully  integrating  MetaPost
       into the canonical Unix TeX distribution.  He also updated
       and extended this manual page.

TTRRIIVVIIAA
       Unlike TeX and Metafont, MetaPost  originally  didn't  use
       any  fancy  logo.  John Hobby says he prefers the spelling
       ``MetaPost'', yet  Don  Knuth  has  updated  the  Metafont
       _l_o_g_o_._m_f  font to be able to typeset a proper MetaPost logo
       similar to the Metafont logo.  Feel free to  use  whatever
       you think is more approporiate!




















Web2C 7.2                 28 April 1995                         5


