aboutsummaryrefslogtreecommitdiff
path: root/man/man1/pic.html
blob: acba241b4d61da93344266d7e518c48d5dc491be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<head>
<title>pic(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>PIC(1)</b><td align=right><b>PIC(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    pic, tpic &ndash; troff and tex preprocessors for drawing pictures<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>pic</font></tt> [ <i>files</i> ] 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <tt><font size=+1>tpic</font></tt> [ <i>files</i> ]<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Pic</i> is a <a href="../man1/troff.html"><i>troff</i>(1)</a> preprocessor for drawing figures on a typesetter.
    <i>Pic</i> code is contained between <tt><font size=+1>.PS</font></tt> and <tt><font size=+1>.PE</font></tt> lines:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>.PS</font></tt> <i>optional-width optional-height<br>
        element-list<br>
        </i><tt><font size=+1>.PE<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </font></tt>
        
    </table>
    or in a file mentioned in a <tt><font size=+1>.PS</font></tt> line:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>.PS &lt;</font></tt><i>file 
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </i>
        
    </table>
    If <i>optional-width</i> is present, the picture is made that many inches
    wide, regardless of any dimensions used internally. The height
    is scaled in the same proportion unless <i>optional-height</i> is present.
    If <tt><font size=+1>.PF</font></tt> is used instead of <tt><font size=+1>.PE</font></tt>, the typesetting position after
    printing is restored to what it was upon entry. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    An <i>element-list</i> is a list of elements:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <i>primitive attribute-list<br>
        placename</i> <tt><font size=+1>:</font></tt> <i>element<br>
        placename</i> <tt><font size=+1>:</font></tt> <i>position<br>
        var</i> <tt><font size=+1>=</font></tt> <i>expr<br>
        direction<br>
        </i><tt><font size=+1>{</font></tt> <i>element-list</i> <tt><font size=+1>}<br>
        [</font></tt> <i>element-list</i> <tt><font size=+1>]<br>
        for</font></tt> <i>var</i> <tt><font size=+1>=</font></tt> <i>expr</i> <tt><font size=+1>to</font></tt> <i>expr</i> <tt><font size=+1>by</font></tt> <i>expr</i> <tt><font size=+1>do {</font></tt> <i>anything</i> <tt><font size=+1>}<br>
        if</font></tt> <i>expr</i> <tt><font size=+1>then {</font></tt> <i>anything</i> <tt><font size=+1>} else {</font></tt> <i>anything</i> <tt><font size=+1>}<br>
        copy</font></tt> <i>file, </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;copy thru</font></tt> <i>macro, </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;copy</font></tt> <i>file</i> <tt><font size=+1>thru</font></tt> <i>macro<br>
        </i><tt><font size=+1>sh {</font></tt> <i>commandline</i> <tt><font size=+1>}<br>
        print</font></tt> <i>expr<br>
        </i><tt><font size=+1>reset</font></tt> <i>optional var-list<br>
        troff-command<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        </i>
        
    </table>
    Elements are separated by newlines or semicolons; a long element
    may be continued by ending the line with a backslash. Comments
    are introduced by a <tt><font size=+1>#</font></tt> and terminated by a newline. Variable names
    begin with a lower case letter; place names begin with upper case.
    Place and variable names retain their values from
    one picture to the next. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    After each primitive the current position moves in the current
    direction (<tt><font size=+1>up</font></tt>,<tt><font size=+1>down</font></tt>, <tt><font size=+1>left</font></tt>,<tt><font size=+1>right</font></tt> (default)) by the size of the primitive.
    The current position and direction are saved upon entry to a <tt><font size=+1>{</font></tt>...<tt><font size=+1>}</font></tt>
    block and restored upon exit. Elements within a block enclosed
    in <tt><font size=+1>[</font></tt>...<tt><font size=+1>]</font></tt> are treated as a unit; the dimensions are
    determined by the extreme points of the contained objects. Names,
    variables, and direction of motion within a block are local to
    that block. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Troff-command</i> is any line that begins with a period. Such a line
    is assumed to make sense in the context where it appears; generally,
    this means only size and font changes. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The <i>primitive</i> objects are:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>box &nbsp;&nbsp;&nbsp;circle &nbsp;&nbsp;&nbsp;ellipse &nbsp;&nbsp;&nbsp;arc &nbsp;&nbsp;&nbsp;line &nbsp;&nbsp;&nbsp;arrow &nbsp;&nbsp;&nbsp;spline &nbsp;&nbsp;&nbsp;move </font></tt><i>&nbsp;&nbsp;&nbsp;text-list<br>
        </i>
    </table>
    <tt><font size=+1>arrow</font></tt> is a synonym for <tt><font size=+1>line &#8722;&gt;</font></tt>. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    An <i>attribute-list</i> is a sequence of zero or more attributes; each
    attribute consists of a keyword, perhaps followed by a value.<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <tt><font size=+1>h(eigh)t</font></tt> <i>expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wid(th)</font></tt> <i>expr<br>
            </i><tt><font size=+1>rad(ius)</font></tt> <i>expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diam(eter)</font></tt> <i>expr<br>
            </i><tt><font size=+1>up</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;down</font></tt> <i>opt-expr<br>
            </i><tt><font size=+1>right</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left</font></tt> <i>opt-expr<br>
            </i><tt><font size=+1>from</font></tt> <i>position </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</font></tt> <i>position<br>
            </i><tt><font size=+1>at</font></tt> <i>position </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with</font></tt> <i>corner<br>
            </i><tt><font size=+1>by</font></tt> <i>expr, expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br>
            dotted</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dashed</font></tt> <i>opt-expr<br>
            </i><tt><font size=+1>chop</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8722;&gt; &nbsp;&nbsp;&nbsp;&lt;&#8722; &nbsp;&nbsp;&nbsp;&lt;&#8722;&gt;<br>
            invis &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;same<br>
            fill</font></tt> <i>opt-expr<br>
            text-list &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expr<br>
            </i>
        </table>
        
    </table>
    Missing attributes and values are filled in from defaults. Not
    all attributes make sense for all primitives; irrelevant ones
    are silently ignored. The attribute <tt><font size=+1>at</font></tt> causes the geometrical
    center to be put at the specified place; <tt><font size=+1>with</font></tt> causes the position
    on the object to be put at the specified place. For lines, splines
    and
    arcs, <tt><font size=+1>height</font></tt> and <tt><font size=+1>width</font></tt> refer to arrowhead size. A bare <i>expr</i> implies
    motion in the current direction. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Text is normally an attribute of some primitive; by default it
    is placed at the geometrical center of the object. Stand-alone
    text is also permitted. A text list is a list of text items:<br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <i>text-item</i><tt><font size=+1>:<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            &quot;...&quot;
        </table>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

             <i>positioning ...<br>
            </i><tt><font size=+1>sprintf(&quot;</font></tt><i>format</i><tt><font size=+1>&quot;,</font></tt> <i>expr</i><tt><font size=+1>,</font></tt> <i>...</i><tt><font size=+1>)</font></tt> <i>positioning ...<br>
            </i>
        </table>
        <i> positioning</i><tt><font size=+1>:<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            center &nbsp;&nbsp;&nbsp;ljust &nbsp;&nbsp;&nbsp;rjust &nbsp;&nbsp;&nbsp;above &nbsp;&nbsp;&nbsp;below<br>
            
        </table>
        </font></tt>
    </table>
    If there are multiple text items for some primitive, they are
    arranged vertically and centered except as qualified. Positioning
    requests apply to each item independently. Text items may contain
    <i>troff</i> commands for size and font changes, local motions, etc.,
    but make sure that these are balanced so that the entering state
    is restored before exiting. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    A position is ultimately an <i>x,y</i> coordinate pair, but it may be
    specified in other ways.<br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <i>position</i><tt><font size=+1>:<br>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <i>expr, expr<br>
            place </i><tt><font size=+1>&plusmn;</font></tt> <i>expr, expr<br>
            place </i><tt><font size=+1>&plusmn; (</font></tt> <i>expr, expr</i> <tt><font size=+1>)<br>
            (</font></tt> <i>position</i><tt><font size=+1>,</font></tt> <i>position</i> <tt><font size=+1>) </font></tt><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x</i> from one, <i>y</i> the other<br>
            <i>expr</i> [<tt><font size=+1>of the way</font></tt>] between <i>position</i> and <i>position<br>
            expr </i>&lt; <i>position</i> , <i>position </i>&gt;<br>
            ( <i>position</i> )<br>
            
            <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
            
            
        </table>
         <i>place</i><tt><font size=+1>:<br>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <i>placename optional-corner<br>
            corner</i> <tt><font size=+1>of</font></tt> <i>placename<br>
            nth primitive optional-corner<br>
            corner</i> <tt><font size=+1>of</font></tt> <i>nth primitive<br>
            </i><tt><font size=+1>Here<br>
            </font></tt>
        </table>
        
    </table>
    An <i>optional-corner</i> is one of the eight compass points or the center
    or the start or end of a primitive.<br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <i>optional-corner</i><tt><font size=+1>:<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            .n &nbsp;&nbsp;&nbsp;.e &nbsp;&nbsp;&nbsp;.w &nbsp;&nbsp;&nbsp;.s &nbsp;&nbsp;&nbsp;.ne &nbsp;&nbsp;&nbsp;.se &nbsp;&nbsp;&nbsp;.nw &nbsp;&nbsp;&nbsp;.sw &nbsp;&nbsp;&nbsp;.c &nbsp;&nbsp;&nbsp;.start &nbsp;&nbsp;&nbsp;.end<br>
            
        </table>
        </font></tt> <i>corner</i><tt><font size=+1>:<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            top &nbsp;&nbsp;&nbsp;bot &nbsp;&nbsp;&nbsp;left &nbsp;&nbsp;&nbsp;right &nbsp;&nbsp;&nbsp;start &nbsp;&nbsp;&nbsp;end<br>
            
        </table>
        </font></tt>
    </table>
    Each object in a picture has an ordinal number; <i>nth</i> refers to
    this.<br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <i>nth</i><tt><font size=+1>:<br>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <i>n</i><tt><font size=+1>th</font></tt><i>, &nbsp;&nbsp;&nbsp;n</i><tt><font size=+1>th last<br>
            
            <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
            </font></tt>
            
        </table>
        
    </table>
    The built-in variables and their default values are:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <tt><font size=+1>boxwid 0.75 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boxht 0.5<br>
            circlerad 0.25 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arcrad 0.25<br>
            ellipsewid 0.75 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ellipseht 0.5<br>
            linewid 0.5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineht 0.5<br>
            movewid 0.5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveht 0.5<br>
            textwid 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textht 0<br>
            arrowwid 0.05 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrowht 0.1<br>
            dashwid 0.1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrowhead 2<br>
            scale 1<br>
            </font></tt>
        </table>
        
    </table>
    These may be changed at any time, and the new values remain in
    force from picture to picture until changed again or reset by
    a <tt><font size=+1>reset</font></tt> statement. Variables changed within <tt><font size=+1>[</font></tt> and <tt><font size=+1>]</font></tt> revert to
    their previous value upon exit from the block. Dimensions are
    divided by <tt><font size=+1>scale</font></tt> during output. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Expressions in <i>pic</i> are evaluated in floating point. All numbers
    representing dimensions are taken to be in inches.<br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <i>expr</i><tt><font size=+1>:<br>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <i>expr op expr<br>
            </i><tt><font size=+1>&#8722;</font></tt> <i>expr<br>
            </i><tt><font size=+1>!</font></tt> <i>expr<br>
            </i><tt><font size=+1>(</font></tt> <i>expr</i> <tt><font size=+1>)<br>
            variable<br>
            number<br>
            </font></tt><i>place</i> <tt><font size=+1>.x </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.y </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.ht </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.wid </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.rad<br>
            sin(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;cos(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;atan2(</font></tt><i>expr,expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;log(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;exp(</font></tt><i>expr</i><tt><font size=+1>)<br>
            sqrt(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;max(</font></tt><i>expr,expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;min(</font></tt><i>expr,expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;int(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;rand()<br>
            </font></tt>
        </table>
         <i>op</i><tt><font size=+1>:<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            + &nbsp;&nbsp;&nbsp;&#8722; &nbsp;&nbsp;&nbsp;* &nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;% &nbsp;&nbsp;&nbsp;&lt; &nbsp;&nbsp;&nbsp;&lt;= &nbsp;&nbsp;&nbsp;&gt; &nbsp;&nbsp;&nbsp;&gt;= &nbsp;&nbsp;&nbsp;== &nbsp;&nbsp;&nbsp;!= &nbsp;&nbsp;&nbsp;&amp;&amp; &nbsp;&nbsp;&nbsp;||<br>
            
            <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
            
        </table>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            
            
        </table>
        
    </table>
    The <tt><font size=+1>define</font></tt> and <tt><font size=+1>undef</font></tt> statements are not part of the grammar.<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <tt><font size=+1>define</font></tt> <i>name</i> <tt><font size=+1>{</font></tt> <i>replacement text</i> <tt><font size=+1>}<br>
            undef</font></tt> <i>name<br>
            </i>
        </table>
        
    </table>
    Occurrences of <tt><font size=+1>$1</font></tt>, <tt><font size=+1>$2</font></tt>, etc., in the replacement text will be replaced
    by the corresponding arguments if <i>name</i> is invoked as<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            <i>name</i><tt><font size=+1>(</font></tt><i>arg1</i><tt><font size=+1>,</font></tt> <i>arg2</i><tt><font size=+1>, ...)<br>
            </font></tt>
        </table>
        
    </table>
    Non-existent arguments are replaced by null strings. Replacement
    text may contain newlines. The <tt><font size=+1>undef</font></tt> statement removes the definition
    of a macro. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <i>Tpic</i> is a <a href="../man1/tex.html"><i>tex</i>(1)</a> preprocessor that accepts <i>pic</i> language. It produces
    Tex commands that define a box called <tt><font size=+1>\graph</font></tt>, which contains the
    picture. The box may be output this way:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>\centerline{\box\graph}<br>
        </font></tt>
    </table>
    
</table>
<p><font size=+1><b>EXAMPLES     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>arrow &quot;input&quot; above; box &quot;process&quot;; arrow &quot;output&quot; above<br>
    move<br>
    A: ellipse <br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        circle rad .1 with .w at A.e<br>
         circle rad .05 at 0.5 &lt;A.c, A.ne&gt;<br>
         circle rad .065 at 0.5 &lt;A.c, A.ne&gt;<br>
         spline from last circle.nw left .25 then left .05 down .05<br>
         arc from A.c to A.se rad 0.5<br>
         for i = 1 to 10 do { line from A.s+.025*i,.01*i down i/50 } <br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
    </table>
    </font></tt>
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        
        
    </table>
    arrow &quot;input&quot; above; box &quot;process&quot;; arrow &quot;output&quot; above move A: ellipse<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        circle rad .1 with .w at A.e<br>
        circle rad .05 at 0.5 &lt;A.c, A.ne&gt;<br>
        circle rad .065 at 0.5 &lt;A.c, A.ne&gt;<br>
        spline from last circle.nw left .25 then left .05 down .05<br>
        arc from A.c to A.se rad 0.5<br>
        for i = 1 to 10 do { line from A.s+.025*i,.01*i down i/50 }<br>
        
    </table>
    
</table>
<p><font size=+1><b>SOURCE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/src/cmd/pic<br>
    </font></tt>
</table>
<p><font size=+1><b>SEE ALSO     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <a href="../man1/grap.html"><i>grap</i>(1)</a>, <a href="../man1/doctype.html"><i>doctype</i>(1)</a>, <a href="../man1/troff.html"><i>troff</i>(1)</a><br>
    B. W. Kernighan, &#8220;PIC--a Graphics Language for Typesetting&#8221;, <i>Unix
    Research System Programmer&#8217;s Manual,</i> Tenth Edition, Volume 2<br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>