Penguin
Annotated edit history of mpost(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 MPOST
2 !!!MPOST
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 ENVIRONMENT
8 FILES
9 SUGGESTED READING
10 SEE ALSO
11 AUTHORS
12 TRIVIA
13 ----
14 !!NAME
15
16
2 perry 17 mpost, inimpost, virmpost - !MetaPost, a system for drawing pictures
1 perry 18 !!SYNOPSIS
19
20
21 __mpost__ [[''options''] [[''commands'']
22 !!DESCRIPTION
23
24
25 This manual page is not meant to be exhaustive. The complete
26 documentation for this version of TEX can be found in the
27 info file or manual ''Web2C: A TeX
28 implementation''.
29
30
2 perry 31 !MetaPost interprets the !MetaPost language and produces
32 !PostScript pictures. The !MetaPost language is similar to
1 perry 33 Knuth's M ETAFONT with additional features
34 for including tex(1) or troff(1) commands and
2 perry 35 accessing features of !PostScript not found in M
1 perry 36 ETAFONT .
37
38
2 perry 39 Like TEX and M ETAFONT , !MetaPost is normally
1 perry 40 used with a large body of precompiled macros. This version
2 perry 41 of !MetaPost looks at its command line to see what name it
1 perry 42 was called under. Both __inimpost__ and __virmpost__
43 are symlinks to the __mpost__ executable. When called as
44 __inimpost__ (or when the __--ini__ option is given)
45 it can be used to precompile macros into a ''.mem'' file.
46 When called as __virmpost__ it will use the ''plain''
2 perry 47 mem. When called under any other name, !MetaPost will use
1 perry 48 that name as the name of the mem to use. For example, when
49 called as __mpost__ the ''mpost'' mem is used, which
50 is identical to the ''plain'' mem. Other mems than
51 ''plain'' are rarely used.
52
53
54 The ''commands'' given on the command line to the program
55 are passed to it as the first input line. (But it is often
56 easier to type extended arguments as the first input line,
57 since UNIX shells tend to gobble up or misinterpret
2 perry 58 !MetaPost's favorite symbols, like semicolons, unless you
1 perry 59 quote them.) The first line should begin with a filename, a
60 \''controlsequence'', or a
61 ''''.
62
63
64 The normal usage is to say ''mp figs'' to process the
65 file ''figs.mp''. The basename of ''figs'' becomes the
66 ``jobname'', and is used in forming output file names. If no
67 file is named, the jobname becomes ''mpout''. The default
68 extension, ''.mp'', can be overridden by specifying an
69 extension explicitly.
70
71
72 There is normally one output file for each picture
73 generated, and the output files are named
74 ''jobname''__.__''nnn'', where ''nnn'' is a
75 number passed to the ''beginfig'' macro. The output file
76 name can also be ''jobname''__.__''ps'' if this
77 number is negative.
78
79
80 The output files can be used as figures in a TEX document by
81 including
82 __special{psfile=__''jobname.nnn''__}__
83 in the TEX document. Alternatively, one can __input
84 epsf.tex__ and then use the macro
85 __epsfbox{__''jobname.nnn''__}__
86 to produce a box of the appropriate size containing the
87 figure.
88 __btex__ ''TeX commands''
89 __etex__
90
91
2 perry 92 This causes ''mp'' to generate a !MetaPost picture
1 perry 93 expression that corresponds to the TEX commands. If the TEX
94 commands generate more than one line of text, it must be in
95 a ''vbox'' or a minipage environment.
96
97
98 __verbatimtex__ ''TeX commands'' __etex__
99
100
101 This is ignored by ''mp'' except that the TEX commands
102 are passed on to TEX. When using L A TEX
103 instead of TEX the input file must start with a
104 ''verbatimtex'' block that gives the ''documentstyle''
105 and ''begin{document}'' commands. You can use the
106 `%
107 ''
108
109
110 Since most TEX fonts have to be downloaded as bitmaps, the
111 ''btex'' feature works best when the output of ''mp''
112 is to be included in a TEX document so that dvips(1)
2 perry 113 can download the fonts. For self-contained !PostScript output
1 perry 114 that can be used directly or included in a ''troff''
2 perry 115 document, start your !MetaPost input file with the command
116 ''prologues:=1'' and stick to standard !PostScript fonts.
117 TEX and !MetaPost use the names in the third column of the
1 perry 118 file ''trfonts.map'', which can be found in the
2 perry 119 directories with support files for !MetaPost.
1 perry 120
121
2 perry 122 !MetaPost output can be included in a ''troff'' document
1 perry 123 via the ''-m pictures'' macro package. In this case
124 ''mp'' should be invoked with the __-T__ flag so that
125 the commands between ''btex'' and ''etex'' or between
126 ''verbatimtex'' and ''etex'' are interpreted as
127 ''troff'' instead of TEX. (This automatically sets
128 ''prologues:=1'' ).
129 !!OPTIONS
130
131
2 perry 132 This version of !MetaPost understands the following command
1 perry 133 line options.
134
135
136 __--file-line-error-style__
137
138
139 Print error messages in the form ''file:line:error''
140 which is similar to the way many compilers format
141 them.
142
143
144 __--help__
145
146
147 Print help message and exit.
148
149
150 __--ini__
151
152
153 Be __inimpost__, for dumping bases; this is implicitly
154 true if the program is called as
155 __inimpost__.
156
157
158 __--interaction__ ''mode''
159
160
161 Sets the interaction mode. The mode can be one of
162 ''batchmode'', ''nonstopmode'', ''scrollmode'', and
163 ''errorstopmode''. The meaning of these modes is the same
164 as that of the corresponding commands.
165
166
167 __--kpathsea-debug__ ''bitmask''
168
169
170 Sets path searching debugging flags according to the
171 bitmask. See the ''Kpathsea'' manual for
172 details.
173
174
175 __--mem__ ''mem''
176
177
178 Use ''mem'' as the name of the mem to be used, instead of
2 perry 179 the name by which !MetaPost was called or a ''%''
1 perry 180 line.
181
182
183 __--progname__ ''name''
184
185
186 Pretend to be program ''name''. This affects both the
187 format used and the search paths.
188
189
190 __--recorder__
191
192
193 Enable the filename recorder. This leaves a trace of the
194 files opened for input and output in a file with extension
195 ''.fls''.
196
197
198 __-T__
199
200
201 Produce TROFF output.
202
203
204 __--translate-file__ ''tcxname''
205
206
207 Use the ''tcxname'' translation table.
208
209
210 __--troff__
211
212
213 As __-T__.
214
215
216 __--version__
217
218
219 Print version information and exit.
220 !!ENVIRONMENT
221
222
223 See the Kpathsearch library documentation (the `Path
224 specifications' node) for the details of how the environment
225 variables are use when searching. The __kpsewhich__
226 utility can be used to query the values of the
227 variables.
228
229
2 perry 230 If the environment variable TEXMFOUTPUT is set, !MetaPost
1 perry 231 attempts to put its output files in it, if they cannot be
232 put in the current directory.
233
234
235 Here is a list of the environment variables affect the
236 behavior of ''mp'':
237
238
239 MPINPUTS
240
241
242 Search path for ''input'' files.
243
244
245 MFINPUTS
246
247
248 Auxiliary search path for ''input'' files with ''.mf''
249 extensions.
250
251
252 MPSUPPORT
253
254
255 Directory for various tables for handling included
256 ''tex'' and ''troff''.
257
258
259 MPXCOMMAND
260
261
262 The name of a shell script that converts embedded
2 perry 263 typesetting commands to a form that !MetaPost understands.
1 perry 264 Defaults: ''makempx'' for ''tex'' and ''troffmpx''
265 for ''troff''.
266
267
268 TEX
269
270
271 The version of TEX - or L A TEX - to use when
272 processing ''btex'' and ''verbatimtex'' commands.
2 perry 273 Default ''tex''. This version of !MetaPost allows you to
1 perry 274 use a `%''
275
276
277 TROFF
278
279
280 The ''troff'' pipeline for ''btex'' and
281 ''verbatimtex'' commands. Default ''eqn -d$$ |
282 troff''
283
284
285 MPEDIT
286
287
288 A command template for invoking an editor.
289
290
291 A ''.mem'' file is a binary file that permits fast
292 loading of macro packages. ''mpost'' reads the default
293 ''plain.mem'' unless another ''.mem'' file is
294 specified at the start of the first line with an
295 '''' just before it. There is also an that simulates
296 plain M ETAFONT so that ''mpost'' can read
297 ''.mf'' fonts. (Plain M ETAFONT is
298 described in ''The M ETAFONT
299 book'').
300
301
302 Experts can create ''.mem'' files be invoking
303 ''inimpost'' and giving macro definitions followed by a
304 ''dump'' command.
305
306
2 perry 307 The !MetaPost language is similar to M ETAFONT
308 , but the manual ''A User's Manual for !MetaPost'' assumes
309 no knowledge of M ETAFONT . !MetaPost does not
1 perry 310 have bitmap output commands or M ETAFONT 's
311 online display mechanism.
312 !!FILES
313
314
315 ''mpost.pool''
316
317
2 perry 318 Encoded text of !MetaPost's messages.
1 perry 319
320
321 ''*.mem''
322
323
2 perry 324 Predigested !MetaPost mem files.
1 perry 325
326
327 ''plain.mp''
328
329
330 The standard mem file.
331
332
333 ''mfplain.mp''
334
335
336 The M ETAFONT -compatible mem file. This is
337 loaded when ''virmp'' is invoked via a symbolic link as
338 ''mfmp''.
339
340
341 ''$TEXMFMAIN/metapost/base/*.mp''
342
343
2 perry 344 The standard !MetaPost macros included in the original
1 perry 345 distribution.
346
347
348 ''$TEXMFMAIN/metapost/support/*''
349
350
351 Various tables for handling included ''tex'' and
352 ''troff''.
353
354
355 ''$TEXMFMAIN/metapost/support/trfonts.map''
356
357
358 Table of corresponding font names for ''troff'' and
2 perry 359 !PostScript.
1 perry 360
361
362 ''psfonts.map''
363
364
365 Table of corresponding font names for ''tex'' and
2 perry 366 !PostScript.
1 perry 367
368
369 ''$TEXMFMAIN/doc/metapost/examples.mp''
370
371
372 The source file for a few sample figures that are part of a
373 L A TEX document
374 ''$TEXMFMAIN/doc/metapost/mpintro.tex'' that describes
2 perry 375 the !MetaPost system in a little more detail.
1 perry 376 !!SUGGESTED READING
377
378
379 Donald E. Knuth, ''The M ETAFONT book''
380 (Volume C of ''Computers and Typesetting''),
381 Addison-Wesley, 1986, ISBN 0-201-13445-4.
2 perry 382 John D. Hobby, ''A User's Manual for !MetaPost'', CSTR
1 perry 383 162, AT''
2 perry 384 John D. Hobby, ''Drawing Graphs with !MetaPost'', CSTR
1 perry 385 164, AT''
386 TUGboat'' (the journal of the TEX Users
387 Group).
388 !!SEE ALSO
389
390
391 tex(1), mf(1), dvips(1).
392 !!AUTHORS
393
394
2 perry 395 !MetaPost was designed by John D. Hobby, incorporating
1 perry 396 algorithms from M ETAFONT by Donald E. Knuth.
397 It was originally implemented on Unix, incorporating
398 system-dependent routines from __web2c__, while not
399 relying on it except for the actual W EB
400 -to-C translator.
401
402
2 perry 403 Ulrik Vieth adapted !MetaPost to take advantage of the
1 perry 404 advanced path searching features in more recent versions of
2 perry 405 __web2c__ and worked towards fully integrating !MetaPost
1 perry 406 into the canonical Unix TEX distribution. He also updated
407 and extended this manual page.
408 !!TRIVIA
409
410
2 perry 411 Unlike TEX and M ETAFONT , !MetaPost
1 perry 412 originally didn't use any fancy logo. John Hobby says he
2 perry 413 prefers the spelling ``!MetaPost'', yet Don Knuth has updated
1 perry 414 the M ETAFONT ''logo.mf'' font to be able
2 perry 415 to typeset a proper !MetaPost logo similar to the M
1 perry 416 ETAFONT logo. Feel free to use whatever you
417 think is more appropriate!
418 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.