mp-symb.mpiv /size: 6532 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=mp-symb.mp,
3
%D version=very old,
4
%D title=\CONTEXT\ \METAPOST\ graphics,
5
%D subtitle=navigation symbol macros,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
%D Instead of these symbols, you can use the \type {contnav}
15
%D font by Taco Hoekwater that is derived form this file.
16 17
u
:
=
3
;
18
h
:
=
5
u
;
19
wt
:
=
5
u
;
20
wb
:
=
.25
wt
;
21
o
:
=
.1
u
;
22
pw
:
=
.5
u
;
23 24
drawoptions
(
withpen
pencircle
scaled
pw
)
;
25 26
path
lefttriangle
,
righttriangle
,
sublefttriangle
,
subrighttriangle
;
27 28
pair
s
;
s
=
(
2
wb
,
0
)
;
29 30
x
1
t
=
x
2
t
=
0
;
31
x
3
t
=
wt
;
32
y
3
t
=
.5
h
;
33
z
1
t
-
z
2
t
=
(
z
3
t
-
z
2
t
)
rotated
60
;
34 35
z
4
t
=
(
z
2
t
-
-
z
3
t
)
intersectionpoint
(
(
z
1
t
-
-
z
2
t
)
shifted
s
)
;
36
z
5
t
=
(
z
3
t
-
-
z
1
t
)
intersectionpoint
(
(
z
1
t
-
-
z
2
t
)
shifted
s
)
;
37 38
righttriangle
=
z
1
t
-
-
z
2
t
-
-
z
3
t
-
-
cycle
;
39
lefttriangle
=
righttriangle
rotatedaround
(
(
0
,
.5
h
)
,
180
)
shifted
(
wt
,
0
)
;
40 41
subrighttriangle
=
z
4
t
--
(
(
z
2
t
-
-
z
3
t
-
-
z
1
t
)
shifted
s
)
-
-
z
5
t
;
42
sublefttriangle
=
subrighttriangle
rotatedaround
(
(
0
,
.5
h
)
,
180
)
shifted
(
wt
,
0
)
;
43 44
path
sidebar
;
45 46
x
1
b
=
x
4
b
=
0
;
47
x
2
b
=
x
3
b
=
wb
;
48
y
1
b
=
y
2
b
=
y
1
t
;
49
y
3
b
=
y
4
b
=
y
2
t
;
50 51
sidebar
=
z
1
b
-
-
z
2
b
-
-
z
3
b
-
-
z
4
b
-
-
cycle
;
52 53
path
midbar
,
onebar
,
twobar
;
54 55
hh
=
abs
(
y
1
t
-
y
2
t
)
;
56 57
%midbar := unitsquare scaled 2hh/3;
58
midbar
:
=
unitsquare
scaled
hh
;
59
onebar
:
=
unitsquare
xscaled
(
hh
/
3
)
yscaled
hh
;
60
twobar
:
=
onebar
;
61 62
def
prepareglyph
=
63
drawoptions
(
withpen
pencircle
scaled
.5
u
)
;
64
enddef
;
65 66
def
finishglyph
=
67
set_outer_boundingbox
currentpicture
;
68
bboxmargin
:
=
o
;
69
setbounds
currentpicture
to
bbox
currentpicture
;
70
% draw boundingbox currentpicture withcolor red withpen pencircle scaled 1;
71
enddef
;
72 73
beginfig
(
1
)
;
74
prepareglyph
;
75
fill
lefttriangle
;
76
draw
lefttriangle
;
% draw gets the bbox right, filldraw doesn't
77
finishglyph
;
78
endfig
;
79 80
beginfig
(
2
)
;
81
prepareglyph
;
82
fill
righttriangle
;
83
draw
righttriangle
;
84
finishglyph
;
85
endfig
;
86 87
beginfig
(
3
)
;
88
prepareglyph
;
89
fill
sidebar
;
90
draw
sidebar
;
91
fill
lefttriangle
shifted
(
.5
s
)
;
92
draw
lefttriangle
shifted
(
.5
s
)
;
93
finishglyph
;
94
endfig
;
95 96
beginfig
(
4
)
;
97
prepareglyph
;
98
fill
righttriangle
;
99
draw
righttriangle
;
100
fill
sidebar
shifted
(
wt
,
0
)
;
101
draw
sidebar
shifted
(
wt
,
0
)
;
102
finishglyph
;
103
endfig
;
104 105
beginfig
(
5
)
;
106
prepareglyph
;
107
fill
lefttriangle
;
108
draw
lefttriangle
;
109
fill
lefttriangle
shifted
s
;
110
draw
lefttriangle
shifted
s
;
111
finishglyph
;
112
endfig
;
113 114
beginfig
(
6
)
;
115
prepareglyph
;
116
fill
righttriangle
;
117
draw
righttriangle
;
118
fill
righttriangle
shifted
s
;
119
draw
righttriangle
shifted
s
;
120
finishglyph
;
121
endfig
;
122 123
beginfig
(
7
)
;
124
prepareglyph
;
125
fill
midbar
;
126
draw
midbar
;
127
finishglyph
;
128
endfig
;
129 130
beginfig
(
8
)
;
131
prepareglyph
;
132
fill
onebar
;
133
draw
onebar
;
134
finishglyph
;
135
endfig
;
136 137
beginfig
(
9
)
;
138
prepareglyph
;
139
fill
twobar
;
140
draw
twobar
;
141
fill
twobar
shifted
(
pw
+
hh
/
2
,
0
)
;
142
draw
twobar
shifted
(
pw
+
hh
/
2
,
0
)
;
143
finishglyph
;
144
endfig
;
145 146
beginfig
(
101
)
;
147
prepareglyph
;
148
draw
lefttriangle
;
149
finishglyph
;
150
endfig
;
151 152
beginfig
(
102
)
;
153
prepareglyph
;
154
draw
righttriangle
;
155
finishglyph
;
156
endfig
;
157 158
beginfig
(
103
)
;
159
prepareglyph
;
160
draw
sidebar
;
161
draw
lefttriangle
shifted
(
.5
s
)
;
162
finishglyph
;
163
endfig
;
164 165
beginfig
(
104
)
;
166
prepareglyph
;
167
draw
righttriangle
;
168
draw
sidebar
shifted
(
wt
,
0
)
;
169
finishglyph
;
170
endfig
;
171 172
beginfig
(
105
)
;
173
prepareglyph
;
174
draw
lefttriangle
;
175
draw
lefttriangle
shifted
s
;
176
finishglyph
;
177
endfig
;
178 179
beginfig
(
106
)
;
180
prepareglyph
;
181
draw
righttriangle
;
182
draw
righttriangle
shifted
s
;
183
finishglyph
;
184
endfig
;
185 186
beginfig
(
107
)
;
187
prepareglyph
;
188
draw
midbar
;
189
finishglyph
;
190
endfig
;
191 192
beginfig
(
108
)
;
193
prepareglyph
;
194
draw
onebar
;
195
finishglyph
;
196
endfig
;
197 198
beginfig
(
109
)
;
199
prepareglyph
;
200
draw
twobar
;
201
draw
twobar
shifted
(
pw
+
hh
/
2
,
0
)
;
202
finishglyph
;
203
endfig
;
204 205
beginfig
(
201
)
;
206
prepareglyph
;
207
draw
lefttriangle
;
208
finishglyph
;
209
endfig
;
210 211
beginfig
(
202
)
;
212
prepareglyph
;
213
draw
righttriangle
;
214
finishglyph
;
215
endfig
;
216 217
beginfig
(
203
)
;
218
prepareglyph
;
219
draw
sidebar
;
220
draw
lefttriangle
shifted
(
.5
s
)
;
221
finishglyph
;
222
endfig
;
223 224
beginfig
(
204
)
;
225
prepareglyph
;
226
draw
righttriangle
;
227
draw
sidebar
shifted
(
wt
,
0
)
;
228
finishglyph
;
229
endfig
;
230 231
beginfig
(
205
)
;
232
prepareglyph
;
233
draw
sublefttriangle
shifted
s
;
234
draw
lefttriangle
shifted
s
;
235
finishglyph
;
236
endfig
;
237 238
beginfig
(
206
)
;
239
prepareglyph
;
240
draw
subrighttriangle
;
241
draw
righttriangle
;
242
finishglyph
;
243
endfig
;
244 245
beginfig
(
207
)
;
246
prepareglyph
;
247
draw
midbar
;
248
finishglyph
;
249
endfig
;
250 251
beginfig
(
208
)
;
252
prepareglyph
;
253
draw
onebar
;
254
finishglyph
;
255
endfig
;
256 257
beginfig
(
209
)
;
258
prepareglyph
;
259
draw
twobar
;
260
draw
twobar
shifted
(
pw
+
hh
/
2
,
0
)
;
261
finishglyph
;
262
endfig
;
263 264 265
beginfig
(
999
)
;
266 267
picture
collection
[
]
;
268 269
prepareglyph
;
270
draw
lefttriangle
;
271
finishglyph
;
272
collection
[
201
]
:
=
currentpicture
;
273
currentpicture
:
=
nullpicture
;
274 275
prepareglyph
;
276
draw
righttriangle
;
277
finishglyph
;
278
collection
[
202
]
:
=
currentpicture
;
279
currentpicture
:
=
nullpicture
;
280 281
prepareglyph
;
282
draw
sidebar
;
283
draw
lefttriangle
shifted
(
.5
s
)
;
284
finishglyph
;
285
collection
[
203
]
:
=
currentpicture
;
286
currentpicture
:
=
nullpicture
;
287 288
prepareglyph
;
289
draw
righttriangle
;
290
draw
sidebar
shifted
(
wt
,
0
)
;
291
finishglyph
;
292
collection
[
204
]
:
=
currentpicture
;
293
currentpicture
:
=
nullpicture
;
294 295
prepareglyph
;
296
draw
sublefttriangle
shifted
s
;
297
draw
lefttriangle
shifted
s
;
298
finishglyph
;
299
collection
[
205
]
:
=
currentpicture
;
300
currentpicture
:
=
nullpicture
;
301 302
prepareglyph
;
303
draw
subrighttriangle
;
304
draw
righttriangle
;
305
finishglyph
;
306
collection
[
206
]
:
=
currentpicture
;
307
currentpicture
:
=
nullpicture
;
308 309
prepareglyph
;
310
draw
midbar
;
311
finishglyph
;
312
collection
[
207
]
:
=
currentpicture
;
313
currentpicture
:
=
nullpicture
;
314 315
prepareglyph
;
316
draw
onebar
;
317
finishglyph
;
318
collection
[
208
]
:
=
currentpicture
;
319
currentpicture
:
=
nullpicture
;
320 321
prepareglyph
;
322
draw
twobar
;
323
draw
twobar
shifted
(
pw
+
hh
/
2
,
0
)
;
324
finishglyph
;
325
collection
[
209
]
:
=
currentpicture
;
326
currentpicture
:
=
nullpicture
;
327 328
for
i
=
201
upto
209
:
329
collection
[
i
]
:
=
collection
[
i
]
shifted
-
center
collection
[
i
]
;
330
endfor
;
331 332
addto
currentpicture
also
collection
[
205
]
shifted
(
0
,
0
)
333
withcolor
(
.3
,
.4
,
.5
)
;
334
addto
currentpicture
also
collection
[
202
]
shifted
(
0
,
1.5
h
)
335
withcolor
(
.5
,
.6
,
.7
)
;
336
addto
currentpicture
also
collection
[
201
]
shifted
(
1.5
h
,
0
)
337
withcolor
(
.6
,
.7
,
.8
)
;
338
addto
currentpicture
also
collection
[
206
]
shifted
(
1.5
h
,
1.5
h
)
339
withcolor
(
.4
,
.5
,
.6
)
;
340 341
collection
[
210
]
:
=
currentpicture
;
342
currentpicture
:
=
nullpicture
;
343 344
bboxmargin
:
=
.25
u
;
345 346
fill
bbox
collection
[
210
]
withcolor
.95
(
1
,
1
,
0
)
;
347
addto
currentpicture
also
collection
[
210
]
;
348 349
endfig
;
350 351
end
352