summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/base/source/mp.1
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/base/source/mp.1')
-rw-r--r--Master/texmf-dist/doc/metapost/base/source/mp.1289
1 files changed, 289 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/base/source/mp.1 b/Master/texmf-dist/doc/metapost/base/source/mp.1
new file mode 100644
index 00000000000..76df137ca79
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/base/source/mp.1
@@ -0,0 +1,289 @@
+.\" MetaPost man page, by John Hobby. Public domain.
+.TH MP 1
+.CT 1 writing_other
+.SH NAME
+mp, MetaPost \- system for drawing pictures
+.SH SYNOPSIS
+.B mp
+[
+.B -I
+]
+[
+.B -T
+]
+[
+.I first-line
+]
+.SH DESCRIPTION
+.I Mp
+interprets the MetaPost language and produces
+.I PostScript
+pictures. The MetaPost language is similar to Knuth's
+.I METAFONT
+with additional features for including
+.IR tex (1)
+or
+.IR troff (1)
+commands and accessing features of PostScript not found in METAFONT.
+The
+.B -T
+flag selects
+.I troff
+instead of
+.IR tex .
+.PP
+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
+.L \e
+and including an
+.L input
+command. Thus
+.L mp figs
+processes the file
+.LR figs.mp .
+The basename of
+.L figs
+becomes the
+.IR jobname ,
+and is used in forming output file names. If no file is named, the
+jobname becomes
+.LR mpout .
+The default
+.L .mp
+extension can be overridden by specifying an extension explicitly.
+.PP
+There is normally one output file for each picture generated,
+and the output files are named
+.IR jobname.nnn ,
+where
+.I nnn
+is a number passed to the
+.L beginfig
+macro. The output file name
+can also be
+.IB jobname .ps
+if this number is negative.
+.PP
+The output files can be used as figures in a TeX document by including
+.ce
+.BI "\especial{psfile=" jobname.nnn }
+in the TeX document. Alternatively, one can
+.L \einput epsf.tex
+and then use the macro
+.BI "\eepsfbox{" jobname.nnn }
+to produce a box of the appropriate size containing the figure.
+.TP
+.BI btex " TeX commands " etex
+This causes
+.I 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
+.L \evbox
+or a minipage environment.
+.TP
+.BI verbatimtex " TeX commands " etex
+This is ignored by
+.I mp
+except that the TeX commands are passed on to TeX. When using LaTeX
+instead of TeX the input file must start with a
+.L verbatimtex
+block that gives the
+.L \edocumentstyle
+and
+.L "\ebegin{document}"
+commands.
+.PP
+Since most TeX fonts have to be downloaded as bitmaps, the
+.L btex
+feature works best when the output of
+.L mp
+is to be included in a TeX document so that
+.IR dvips (1)
+can download the fonts. For self-contained PostScript output that can be
+used directly or included in a
+.I troff
+document, start your MetaPost input file with the command
+.L "prologues:=1"
+and stick to standard PostScript fonts. TeX and MetaPost use the names in the
+third column of the file
+.LR /usr/lib/mp/trfonts.map .
+.PP
+MetaPost output can be included in a
+.I troff
+document via the
+.L "-mpictures"
+macro package. In this case
+.I mp
+should be invoked with the
+.B -T
+flag so that the commands between
+.L btex
+and
+.L etex
+or between
+.L verbatimtex
+and
+.L etex
+are interpreted as
+.I troff
+instead of TeX. (This automatically sets
+.L prologues:=1
+).
+.PP
+Here is a list of the environment variables affect the behavior of
+.IR mp :
+.TF MPXCOMMAND
+.TP
+.B MPINPUTS
+Search path for
+.L \einput
+files.
+It should be colon-separated,
+and start with dot.
+Default:
+.L .:/usr/lib/mp
+.TP
+.B MFINPUTS
+Auxiliary search path for
+.L \einput
+files with
+.L .mf
+extensions.
+.TP
+.B TEXFONTS
+Search path for font metric files.
+.TP
+.B MPXCOMMAND
+The name of a shell script that converts embedded typesetting commands
+to a form that
+.I mp
+understands.
+Defaults:
+.L /usr/lib/mp/bin/makempx
+for
+.I tex
+and
+.L /usr/lib/mp/bin/troffmpx
+for
+.I troff
+.TP
+.B TEX
+The version of TeX to use when processing
+.L btex
+and
+.L verbatimtex
+commands. Default:
+.L tex
+.TP
+.B TROFF
+The
+.I troff
+pipeline for
+.L btex
+and
+.L verbatimtex
+commands. Default:
+.L eqn -d\e$\e$ | troff
+.TP
+.B MPMEMS
+Search path for
+.L .mem
+files. Default:
+.L .:/usr/lib/mp
+.TP
+.B MPPOOL
+Search path for strings.
+Default:
+.L .:/usr/lib/mp
+.TP
+.B MPEDITOR
+A command for invoking an editor with
+.L %s
+in place of the file name and
+.L %d
+in place of the line number.
+.TP
+.B TEXVFONTS
+Search path for virtual fonts.
+.TP
+.B MPTEXPRE
+Name of a file that is prepended before running tex.
+If this file exists,
+.I mp
+behaves as if the file were inside of a
+.L verbatimtex
+block at the beginning of each input file. Default:
+.L mptexpre.tex
+.PD
+.PP
+A
+.L .mem
+file is a binary file that permits fast loading of fonts and macro packages.
+.I Mp
+reads the default
+.F plain.mem
+unless another
+.L .mem
+file is specified at the start of the first line with an
+.L &
+just before it. There is also an
+.F mfplain.mem
+that simulates plain METAFONT so that
+.I mp
+can read
+.L .mf
+fonts. (Plain METAFONT is described in
+.I The
+.IR METAFONTbook ).
+.PP
+Experts can create
+.L .mem
+files be invoking
+.I mp
+with the
+.B -I
+switch and giving macro definitions followed by a
+.L dump
+command.
+.PP
+The MetaPost language is similar to METAFONT, but the manual
+.I A User's Manual for MetaPost
+assumes no knowledge of METAFONT. MetaPost does not have bitmap
+output commands or METAFONT's online display mechanism.
+.SH FILES
+.TF /usr/lib/mp/trfonts.map
+.TP
+.F /usr/lib/mp/*
+macros,
+.L .mem
+files, and tables for handling included
+.I tex
+and
+.I troff
+.TP
+.F /usr/lib/mp/bin
+Directory for programs that handle included
+.I tex
+and
+.IR troff .
+.F /usr/lib/mp/trfonts.map
+table of corresponding font names for
+.IR troff ,
+PostScript, and TeX
+.TP
+.F /usr/lib/mp/examples.mp
+The source file for a few sample figures.
+.IR troff .
+.SH "SEE ALSO"
+.IR tex (1),
+.br
+Donald E. Knuth,
+.I The METAFONTbook,
+Addison Wesley, 1986,
+.br
+John D. Hobby,
+.I A User's Manual for MetaPost
+CSTR 162.