|
|
1.1 root 1: .TH MP 1
2: .CT 1 writing_other
3: .SH NAME
4: mp, MetaPost \- system for drawing pictures
5: .SH SYNOPSIS
6: .B mp
7: [
8: .B -I
9: ]
10: [
11: .B -T
12: ]
13: [
14: .I first-line
15: ]
16: .SH DESCRIPTION
17: .I Mp
18: interprets the MetaPost language and produces
19: .I PostScript
20: pictures. The MetaPost language is similar to Knuth's Metafont
21: with additional features for including
22: .IR tex (1)
23: or
24: .IR troff (1)
25: commands and accessing features of PostScript not found in Metafont.
26: The
27: .B -T
28: flag selects
29: .I troff
30: instead of
31: .IR tex .
32: .PP
33: An argument given on the command line
34: behaves as the first input line.
35: That can be either a (possibly truncated) file name
36: or a sequence MetaPost commands starting with
37: .L \e
38: and including an
39: .L input
40: command. Thus
41: .L mp figs
42: processes the file
43: .LR figs.mp .
44: The basename of
45: .L figs
46: becomes the
47: .IR jobname ,
48: and is used in forming output file names. If no file is named, the
49: jobname becomes
50: .LR mpout .
51: The default
52: .L .mp
53: extension can be overridden by specifying an extension explicitly.
54: .PP
55: There is normally one output file for each picture generated,
56: and the output files are named
57: .IR jobname.nnn ,
58: where
59: .I nnn
60: is a number passed to the
61: .L beginfig
62: macro. The output file name is
63: .IB jobname .ps
64: if this number is negative.
65: .PP
66: The output files can be used as figures in a TeX document by including
67: .IP
68: .BI "\especial{psfile=" jobname.nnn }
69: .LP
70: in the TeX document. Alternatively, one can
71: .L \einput epsf.tex
72: and then use the macro
73: .BI "\eepsfbox{" jobname.nnn }
74: to produce a box of the appropriate size containing the figure.
75: .TP
76: .BI btex " TeX commands " etex
77: This causes
78: .I mp
79: to generate a MetaPost picture expression that corresponds to the
80: TeX commands. If the TeX commands generate
81: more than one line of text, it must be in a
82: .L \evbox
83: or a minipage environment.
84: .TP
85: .BI verbatimtex " TeX commands " etex
86: This is ignored by
87: .I mp
88: except that the TeX commands are passed on to TeX. When using LaTeX
89: instead of TeX the input file must start with a
90: .L verbatimtex
91: block that gives the
92: .L \edocumentstyle
93: and
94: .L "\ebegin{document}"
95: commands.
96: .PP
97: Since most TeX fonts have to be downloaded as bitmaps, the
98: .L btex
99: feature works best when the output of
100: .L mp
101: is to be included in a TeX document so that
102: .IR dvips (1)
103: can download the fonts. For self-contained PostScript output that can be
104: used directly or included in a
105: .I troff
106: document, start your MetaPost input file with the command
107: .L "prologues:=1"
108: and stick to standard PostScript fonts. TeX and MetaPost use the names in the
109: third column of the file
110: .LR /usr/lib/mp/trfonts.map .
111: .PP
112: MetaPost output can be included in a
113: .I troff
114: document via the
115: .IR mpictures (6)
116: macro package. In this case
117: .I mp
118: should be invoked with the
119: .B -T
120: flag so that the commands between
121: .L btex
122: and
123: .L etex
124: or between
125: .L verbatimtex
126: and
127: .L etex
128: are interpreted as
129: .I troff
130: instead of TeX. (This automatically sets
131: .L prologues:=1
132: ).
133: .PP
134: Here is a list of the environment variables affect the behavior of
135: .IR mp :
136: .TF MPXCOMMAND
137: .TP
138: .B MPINPUTS
139: Search path for
140: .L \einput
141: files.
142: It should be colon-separated,
143: and start with dot.
144: Default:
145: .L .:/usr/lib/mp
146: .TP
147: .B MFINPUTS
148: Auxiliary search path for
149: .L \einput
150: files with
151: .L .mf
152: extensions.
153: Default:
154: .L .:/usr/lib/mf
155: .TP
156: .B TEXFONTS
157: Search path for font metric files.
158: Default:
159: .L .:/usr/lib/tex/fonts/tfm
160: .TP
161: .B MPXCOMMAND
162: The name of a shell script that converts embedded typesetting commands
163: to a form that
164: .I mp
165: understands.
166: Defaults:
167: .L /usr/lib/mp/bin/makempx
168: for
169: .I tex
170: and
171: .L /usr/lib/mp/bin/troffmpx
172: for
173: .I troff
174: .TP
175: .B TEX
176: The version of TeX to use when processing
177: .L btex
178: and
179: .L verbatimtex
180: commands. Default:
181: .L tex
182: .TP
183: .B TROFF
184: The
185: .I troff
186: pipeline for
187: .L btex
188: and
189: .L verbatimtex
190: commands. Default:
191: .B eqn -d\e$\e$ | troff -Tpost
192: .TP
193: .B MPMEMS
194: Search path for
195: .L .mem
196: files. Default:
197: .L .:/usr/lib/mp
198: .TP
199: .B MPPOOL
200: Search path for strings.
201: Default:
202: .L .:/usr/lib/mp
203: .TP
204: .B MPEDITOR
205: A command for invoking an editor with
206: .L %s
207: in place of the file name and
208: .L %d
209: in place of the line number.
210: Default:
211: .L /bin/ed %s
212: .TP
213: .B TEXVFONTS
214: Search path for virtual fonts.
215: Default:
216: .L /usr/lib/tex/fonts/psvf
217: .PD
218: .PP
219: A
220: .L .mem
221: file is a binary file that permits fast loading of fonts and macro packages.
222: .I Mp
223: reads the default
224: .F plain.mem
225: unless another
226: .L .mem
227: file is specified at the start of the first line with an
228: .L &
229: just before it. There is also an
230: .F mfplain.mem
231: that simulates plain Metafont so that
232: .I mp
233: can read
234: .L .mf
235: fonts. (Plain Metafont is described in
236: .I The
237: .IR METAFONTbook ).
238: .PP
239: Experts can create
240: .L .mem
241: files be invoking
242: .I mp
243: with the
244: .B -I
245: switch and giving macro definitions followed by a
246: .L dump
247: command.
248: .PP
249: The MetaPost language is similar to Metafont, but the manual
250: .I A User's Manual for MetaPost
251: assumes no knowledge of Metafont. MetaPost does not have bitmap
252: output commands or Metafont's online display mechanism. Use
253: .IR dvips (1)
254: and
255: .IR psi (9.1)
256: to see the results before printing.
257: .SH FILES
258: .TF /usr/lib/tex/macros/doc/mpintro.tex
259: .TP
260: .F /usr/lib/mp/*
261: macros,
262: .L .mem
263: files, and tables for handling included
264: .I tex
265: and
266: .I troff
267: .TP
268: .F /usr/lib/mp/bin
269: Directory for programs that handle included
270: .I tex
271: and
272: .IR troff .
273: .F /usr/lib/mp/trfonts.map
274: table of corresponding font names for
275: .IR troff ,
276: PostScript, and TeX
277: .TP
278: .F /usr/lib/tex/macros/epsf.tex
279: The TeX input file where the
280: .L \eepsfbox
281: macro is defined
282: .TP
283: .F /usr/lib/tex/macros/doc/mpintro.tex
284: TeX input for a document that describes the MetaPost language
285: .TP
286: .F /usr/lib/mp/examples.mp
287: The source file for the figures used in
288: .F mpintro.tex
289: .TP
290: .F /n/bowell/usr/src/cmd/tex/mp/doc/*
291: More information on using MetaPost with
292: .IR troff .
293: .SH "SEE ALSO"
294: .IR tex (1),
295: .IR lp (1),
296: .IR psi (9.1),
297: .br
298: Donald E. Knuth,
299: .I The METAFONTbook,
300: Addison Wesley, 1986,
301: .br
302: John D. Hobby,
303: .I A User's Manual for MetaPost
304: AT&T Bell Labs Computing Science Technical Report 162, 1991.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.