| 1 |
%%% ==================================================================== |
| 2 |
%%% @METAFONT-file{ |
| 3 |
%%% author-1 = "Jeremy Gibbons", |
| 4 |
%%% author-2 = "Alan Jeffrey", |
| 5 |
%%% version = "1.1", |
| 6 |
%%% date = "02 June 1992", |
| 7 |
%%% time = "15:06:36 BST", |
| 8 |
%%% filename = "stmaryjg.mf", |
| 9 |
%%% address-1 = "Department of Computer Science |
| 10 |
%%% University of Aukland |
| 11 |
%%% Private Bag |
| 12 |
%%% Aukland |
| 13 |
%%% New Zealand", |
| 14 |
%%% address-2 = "School of Cognitive and Computing Sciences |
| 15 |
%%% University of Sussex |
| 16 |
%%% Brighton BN1 9QH |
| 17 |
%%% UK", |
| 18 |
%%% telephone-1 = "+64 9 373 7599 x 5120", |
| 19 |
%%% telephone-2 = "+44 273 606755 x 3238", |
| 20 |
%%% FAX-1 = "+64 9 373 7453", |
| 21 |
%%% FAX-2 = "+44 273 678188", |
| 22 |
%%% checksum = "58461 600 2192 23548", |
| 23 |
%%% email-1 = "[email protected]", |
| 24 |
%%% email-2 = "[email protected]", |
| 25 |
%%% codetable = "ISO/ASCII", |
| 26 |
%%% keywords = "metafont symbols math fonts", |
| 27 |
%%% supported = "yes", |
| 28 |
%%% abstract = "This is part of the metafont program for |
| 29 |
%%% the St Mary's Road symbol font.", |
| 30 |
%%% docstring = "This is part of the metafont program for |
| 31 |
%%% the St Mary's Road symbol font. The font |
| 32 |
%%% contains a number of mathematical |
| 33 |
%%% characters which are not present in the |
| 34 |
%%% standard TeX and AMS symbol fonts. |
| 35 |
%%% |
| 36 |
%%% It is described in stmaryrd.tex. |
| 37 |
%%% |
| 38 |
%%% Copyright 1992 Jeremy Gibbons and Alan Jeffrey. |
| 39 |
%%% |
| 40 |
%%% The checksum field above contains a CRC-16 |
| 41 |
%%% checksum as the first value, followed by the |
| 42 |
%%% equivalent of the standard UNIX wc (word |
| 43 |
%%% count) utility output of lines, words, and |
| 44 |
%%% characters. This is produced by Robert |
| 45 |
%%% Solovay's checksum utility.", |
| 46 |
%%% package = "St Mary's Road", |
| 47 |
%%% dependencies = "none", |
| 48 |
%%% } |
| 49 |
%%% ==================================================================== |
| 50 |
%%% |
| 51 |
%%% 20 May 1991, v1.0: Created the file out of galileo.mf. |
| 52 |
%%% |
| 53 |
%%% 2 Jun 1992, v1.1: added the headers. |
| 54 |
|
| 55 |
% These are Jeremy's symbols for the St Mary's Road font, stmaryrd.mf. |
| 56 |
|
| 57 |
iff known short_left_arrow: cmchar "Short leftwards arrow"; |
| 58 |
compute_spread(.45x_height#,.55x_height#); |
| 59 |
beginchar(short_left_arrow,14u#,v_center(spread#+rule_thickness#)); |
| 60 |
adjust_fit(0,0); pickup crisp.nib; |
| 61 |
pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0); |
| 62 |
y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u; |
| 63 |
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps; |
| 64 |
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0; |
| 65 |
z9=.381966[.5[z3,z4],z0]; |
| 66 |
numeric t; path p; p=z4r{z9-z4}..z6r; |
| 67 |
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p; |
| 68 |
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r) |
| 69 |
--z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r) |
| 70 |
--z3l{z9-z3}..z0 & cycle; % arrowhead and stem |
| 71 |
penlabels(0,1,2,3,4,5,6,9); |
| 72 |
endchar; |
| 73 |
|
| 74 |
iff known short_right_arrow: cmchar "Short rightwards arrow"; |
| 75 |
compute_spread(.45x_height#,.55x_height#); |
| 76 |
beginchar(short_right_arrow,14u#,v_center(spread#+rule_thickness#)); |
| 77 |
adjust_fit(0,0); pickup crisp.nib; |
| 78 |
pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0); |
| 79 |
y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u); |
| 80 |
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps; |
| 81 |
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0; |
| 82 |
z9=.381966[.5[z3,z4],z0]; |
| 83 |
numeric t; path p; p=z4l{z9-z4}..z6r; |
| 84 |
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p; |
| 85 |
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r) |
| 86 |
--z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r) |
| 87 |
--z3r{z9-z3}..z0 & cycle; % arrowhead and stem |
| 88 |
penlabels(0,1,2,3,4,5,6,9); |
| 89 |
endchar; |
| 90 |
|
| 91 |
iff known short_up_arrow: cmchar "Upward arrow"; |
| 92 |
beginchar(short_up_arrow,9u#, |
| 93 |
if monospace: 27/7u#+math_axis#,27/7u#-math_axis# |
| 94 |
else: 6u#+math_axis#,6u#-math_axis# |
| 95 |
fi); |
| 96 |
italcorr .76asc_height#*slant+.5crisp#-u#; |
| 97 |
adjust_fit(0,0); pickup crisp.nib; |
| 98 |
pos1(rule_thickness,0); pos2(rule_thickness,0); |
| 99 |
pos3(bar,90); pos4(bar,90); |
| 100 |
lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d; |
| 101 |
x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps; |
| 102 |
y3=y4=y0-.24asc_height-eps; |
| 103 |
pos5(bar,angle(z4-z0)); z5l=z0; |
| 104 |
pos6(bar,angle(z3-z0)); z6l=z0; |
| 105 |
z9=.381966[.5[z3,z4],z0]; |
| 106 |
numeric t; path p; p=z4l{z9-z4}..z6r; |
| 107 |
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p; |
| 108 |
filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r) |
| 109 |
--z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r) |
| 110 |
--z3r{z9-z3}..z0 & cycle; % arrowhead and stem |
| 111 |
penlabels(0,1,2,3,4,5,6,9); endchar; |
| 112 |
|
| 113 |
iff known short_down_arrow: cmchar "Downward arrow"; |
| 114 |
beginchar(short_down_arrow,9u#, |
| 115 |
if monospace: 27/7u#+math_axis#,27/7u#-math_axis# |
| 116 |
else: 6u#+math_axis#,6u#-math_axis# |
| 117 |
fi); |
| 118 |
italcorr .76asc_height#*slant+.5crisp#-u#; |
| 119 |
adjust_fit(0,0); pickup crisp.nib; |
| 120 |
pos1(rule_thickness,0); pos2(rule_thickness,0); |
| 121 |
pos3(bar,90); pos4(bar,90); |
| 122 |
lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h; |
| 123 |
x0=x1=x2; bot y0=-d; x0-x3=x4-x0=3u+eps; |
| 124 |
y3=y4=y0+.24asc_height+eps; |
| 125 |
pos5(bar,angle(z4-z0)); z5l=z0; |
| 126 |
pos6(bar,angle(z3-z0)); z6l=z0; |
| 127 |
z9=.381966[.5[z3,z4],z0]; |
| 128 |
numeric t; path p; p=z4r{z9-z4}..z6r; |
| 129 |
t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p; |
| 130 |
filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r) |
| 131 |
--z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r) |
| 132 |
--z3l{z9-z3}..z0 & cycle; % arrowhead and stem |
| 133 |
penlabels(0,1,2,3,4,5,6,9); endchar; |
| 134 |
|
| 135 |
iff known Y_up: cmchar "Fork (upside-down Y)"; |
| 136 |
beginchar(Y_up,10u#,6u#+math_axis#,5u#-math_axis#); pickup rule.nib; |
| 137 |
adjust_fit(0,0); |
| 138 |
x1=.5w; top y1=h-u; |
| 139 |
x2=x1; y2=math_axis; |
| 140 |
lft x3=u; rt x4=w-u; bot y3 = -d+u; y4=y3; |
| 141 |
draw z1--z2; draw z3--z2--z4; |
| 142 |
labels(1,2,3,4); endchar; |
| 143 |
|
| 144 |
iff known Y_down: cmchar "Join (Y)"; |
| 145 |
beginchar(Y_down,10u#,5u#+math_axis#,6u#-math_axis#); pickup rule.nib; |
| 146 |
adjust_fit(0,0); |
| 147 |
x1=.5w; bot y1=-d+u; |
| 148 |
x2=x1; y2=math_axis; |
| 149 |
lft x3=u; rt x4=w-u; top y3 = h-u; y4=y3; |
| 150 |
draw z1--z2; draw z3--z2--z4; |
| 151 |
labels(1,2,3,4); endchar; |
| 152 |
|
| 153 |
iff known Y_left: cmchar "Leftwards pointing Y -<"; |
| 154 |
beginchar(Y_left,11u#,5u#+math_axis#,5u#-math_axis#); pickup rule.nib; |
| 155 |
adjust_fit(0,0); |
| 156 |
lft x1=hround u; x2=6u; y1=y2=vround math_axis; |
| 157 |
rt x3=rt x4=hround(w-u); top y3=vround(h-u)+eps; bot y4=vround(u-d)+eps; |
| 158 |
draw z1--z2; draw z3--z2--z4; |
| 159 |
labels(1,2,3,4); endchar; |
| 160 |
|
| 161 |
iff known Y_right: cmchar "Rightwards pointing Y >-"; |
| 162 |
beginchar(Y_right,11u#,5u#+math_axis#,5u#-math_axis#); pickup rule.nib; |
| 163 |
adjust_fit(0,0); |
| 164 |
rt x1=hround(w-u); x2=5u; y1=y2=vround math_axis; |
| 165 |
lft x3=lft x4=hround u; top y3=vround(h-u)+eps; bot y4=vround(u-d)+eps; |
| 166 |
draw z1--z2; draw z3--z2--z4; |
| 167 |
labels(1,2,3,4); endchar; |
| 168 |
|
| 169 |
iff known var_curly_vee: cmchar "Zipwith symbol"; |
| 170 |
beginchar(var_curly_vee,12u#,asc_height#,asc_depth#); |
| 171 |
adjust_fit(0,0); pickup rule.nib; |
| 172 |
x2=good.x .5w; w:=r:=2x2; |
| 173 |
lft x1=0; x3=w-x1; |
| 174 |
top y1=h; bot y2=-d-o; y3=y1; |
| 175 |
x4=x2; y4=x_height; |
| 176 |
draw z1{z4-z1}..{down}z2; % left arm |
| 177 |
draw z3{z4-z3}..{down}z2; % right arm |
| 178 |
labels(1,2,3,4); endchar; |
| 179 |
|
| 180 |
iff known var_curly_wedge: cmchar "Upside-down zipwith symbol"; |
| 181 |
beginchar(var_curly_wedge,12u#,asc_height#,asc_depth#); |
| 182 |
adjust_fit(0,0); pickup rule.nib; |
| 183 |
x2=good.x .5w; w:=r:=2x2; |
| 184 |
lft x1=0; x3=w-x1; |
| 185 |
top y2=h; bot y1=-d-o; y3=y1; |
| 186 |
x4=x2; y4=h-(x_height+d); |
| 187 |
draw z1{z4-z1}..{up}z2; % left arm |
| 188 |
draw z3{z4-z3}..{up}z2; % right arm |
| 189 |
labels(1,2,3,4); endchar; |
| 190 |
|
| 191 |
iff known minus_o: cmchar "Above sign"; % Parts nicked from "plus" |
| 192 |
beginchar(minus_o,14u#,5u#+math_axis#,5u#-math_axis#); pickup rule.nib; |
| 193 |
adjust_fit(0,0); |
| 194 |
%x11=x12=good.x .5w; top y11=h+eps; .5[y11,y12]=math_axis; |
| 195 |
lft x13=hround u-eps; x14=w-x13; y13=y14=math_axis; |
| 196 |
%draw z11--z12; % stem |
| 197 |
draw z13--z14; % crossbar |
| 198 |
top y8=vround h-u-eps; y8-math_axis = math_axis-y4; x4=.5w; .5(y8-y4) = x2-x4; |
| 199 |
circle_points; draw_circle; % circle |
| 200 |
labels(1,2,3,4,5,6,7,8,13,14); endchar; |
| 201 |
|
| 202 |
iff known bar_o: cmchar "Beside sign"; |
| 203 |
beginchar(bar_o,10u#,6u#+math_axis#,6u#-math_axis#); pickup rule.nib; |
| 204 |
adjust_fit(0,0); |
| 205 |
x11=x12=good.x .5w; top y11=h+eps; .5[y11,y12]=math_axis; |
| 206 |
%lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis; |
| 207 |
draw z11--z12; % stem |
| 208 |
%draw z3--z4; % crossbar |
| 209 |
lft x6=hround u; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6); |
| 210 |
circle_points; draw_circle; % circle |
| 211 |
penlabels(1,2,3,4,5,6,7,8,11,12); endchar; |
| 212 |
|
| 213 |
iff known sslash: cmchar "Double forwards slash"; |
| 214 |
beginchar(sslash,9u#+slash_separation#,body_height#, paren_depth#); |
| 215 |
adjust_fit(0,0); pickup rule.nib; |
| 216 |
lft x2=hround u-eps; bot y4=bot y2=-d-eps; |
| 217 |
rt x3=hround(w-u)+eps; top y3=top y1= h+eps; |
| 218 |
x1=x3-hround slash_separation; |
| 219 |
x4=x2+hround slash_separation; |
| 220 |
draw z1--z2; draw z3--z4; |
| 221 |
penlabels(1,2,3,4); |
| 222 |
endchar; |
| 223 |
|
| 224 |
iff known bbslash: cmchar "Double backwards slash"; |
| 225 |
beginchar(bbslash,9u#+slash_separation#,body_height#, paren_depth#); |
| 226 |
adjust_fit(0,0); pickup rule.nib; |
| 227 |
lft x2=hround u-eps; bot y3=bot y1=-d-eps; |
| 228 |
rt x3=hround(w-u)+eps; top y4=top y2= h+eps; |
| 229 |
x1=x3-hround slash_separation; |
| 230 |
x4=x2+hround slash_separation; |
| 231 |
draw z1--z2; draw z3--z4; |
| 232 |
penlabels(1,2,3,4); |
| 233 |
endchar; |
| 234 |
|
| 235 |
iff known moo: cmchar "Moo (Chinese for `tree')"; |
| 236 |
beginarithchar(moo); pickup rule.nib; |
| 237 |
if .5w <> good.x .5w: change_width; fi |
| 238 |
x1= .5w; y1-y3=y3-y7; |
| 239 |
lft x3=hround 2u-eps; x4=w-x3; y3=y4=math_axis; |
| 240 |
z2 = .5[z3,z4]; |
| 241 |
lft x5=hround 2u-eps; x6=w-x5; y6=y5=.3[y7,y3]; |
| 242 |
x7 = .4[x5,x1]; x8=w-x7; bot y7 = vround -o; y8=y7; |
| 243 |
draw z1--z2{down}..z7{left}..z5; % left leg |
| 244 |
draw z1--z2{down}..z8{right}..z6; % right leg |
| 245 |
draw z3--z4; % crossbar |
| 246 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 247 |
|
| 248 |
iff known var_o_times: cmchar "Circular circle-times operator"; |
| 249 |
begincircle(var_o_times); |
| 250 |
draw z1--z5; draw z3--z7; % diagonals |
| 251 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 252 |
|
| 253 |
iff known var_o_ast: cmchar "Circular circle-asterisk operator"; |
| 254 |
begincircle(var_o_ast); |
| 255 |
z0=.5[z2,z6]; % centre of circle |
| 256 |
numeric ast_flare; ast_flare=hround .7[thin_join,stem]; |
| 257 |
for d=-150 step 60 until 150: z[d]=z0+.7dir d scaled (y8-y2); % ie scaled radius |
| 258 |
numeric theta; theta=angle(z[d]-z0); |
| 259 |
fill z0+.5(0,-thin_join)rotated theta |
| 260 |
---z[d]+.5(-ast_flare,-ast_flare)rotated theta |
| 261 |
..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta |
| 262 |
---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| |
| 263 |
labels(0,[-150],[-90],[-30],30,90,150,1,2,3,4,5,6,7,8); endchar; |
| 264 |
|
| 265 |
iff known var_o_bar: cmchar "Circular circle-bar operator"; |
| 266 |
begincircle(var_o_bar); |
| 267 |
draw z4--z8; % bar |
| 268 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 269 |
|
| 270 |
iff known var_o_dot: cmchar "Circle-dot operator"; |
| 271 |
begincircle(var_o_dot); |
| 272 |
fill fullcircle scaled(1.3dot_size+eps) shifted(.5[z4,z8]); % dot |
| 273 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 274 |
|
| 275 |
iff known var_o_slash: cmchar "Circular circle-slash operator"; |
| 276 |
begincircle(var_o_slash); |
| 277 |
draw z1--z5; % diagonal |
| 278 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 279 |
|
| 280 |
iff known var_o_bslash: cmchar "Circular circle-backslash operator"; |
| 281 |
begincircle(var_o_bslash); |
| 282 |
draw z3--z7; % diagonal |
| 283 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 284 |
|
| 285 |
iff known var_o_circle: cmchar "Circular circle-circle operator"; |
| 286 |
begincircle(var_o_circle); |
| 287 |
z0=.5[z2,z6]; % centre of circle |
| 288 |
for i = 1 upto 8: |
| 289 |
z[i+8]=.5[z0,z[i]]; |
| 290 |
endfor; |
| 291 |
draw z16{right}...z9{z10-z16}...z10{down}...z11{z12-z10}...z12{left} |
| 292 |
...z13{z14-z12}...z14{up}...z15{z16-z14}...cycle; % inner circle |
| 293 |
labels(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); endchar; |
| 294 |
|
| 295 |
iff known var_o_plus: cmchar "Circular circle-plus operator"; |
| 296 |
begincircle(var_o_plus); |
| 297 |
draw z2--z6; draw z4--z8; % bar and stem |
| 298 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 299 |
|
| 300 |
iff known var_o_minus: cmchar "Circular circle-minus operator"; |
| 301 |
begincircle(var_o_minus); |
| 302 |
draw z2--z6; % bar |
| 303 |
labels(1,2,3,4,5,6,7,8); endchar; |
| 304 |
|
| 305 |
% Changed hround to floor in the following to make sure that x1<>x2, |
| 306 |
% otherwise theta ends up being angle(0,0). AJ. |
| 307 |
|
| 308 |
iff known box_ast: cmchar "Box_ast operator"; |
| 309 |
beginbox(box_ast); |
| 310 |
z0=.5[z1,z3]; |
| 311 |
numeric ast_flare; ast_flare=hround .7[thin_join,stem]; |
| 312 |
for d=-150 step 60 until 150: z[d]=z0+.7dir d scaled .5(x2-x1); % ie scaled `radius' |
| 313 |
numeric theta; theta=angle(z[d]-z0); |
| 314 |
fill z0+.5(0,-thin_join)rotated theta |
| 315 |
---z[d]+.5(-ast_flare,-ast_flare)rotated theta |
| 316 |
..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta |
| 317 |
---z0+.5(0,thin_join)rotated theta--cycle; endfor % diagonal at angle |d| |
| 318 |
labels(0,[-150],[-90],[-30],30,90,150,1,2,3,4); endchar; |
| 319 |
|
| 320 |
iff known box_bar: cmchar "Box_bar operator"; |
| 321 |
beginbox(box_bar); |
| 322 |
draw .5[z1,z2]--.5[z3,z4]; |
| 323 |
labels(1,2,3,4); endchar; |
| 324 |
|
| 325 |
iff known box_dot: cmchar "Box_dot operator"; |
| 326 |
beginbox(box_dot); |
| 327 |
fill fullcircle scaled(1.3dot_size+eps) shifted(.5[z1,z3]); % dot |
| 328 |
labels(1,2,3,4); endchar; |
| 329 |
|
| 330 |
iff known box_slash: cmchar "Box_slash operator"; |
| 331 |
beginbox(box_slash); |
| 332 |
draw z2--z4; |
| 333 |
labels(1,2,3,4); endchar; |
| 334 |
|
| 335 |
iff known box_bslash: cmchar "Box_bslash operator"; |
| 336 |
beginbox(box_bslash); |
| 337 |
draw z1--z3; |
| 338 |
labels(1,2,3,4); endchar; |
| 339 |
|
| 340 |
iff known box_circle: cmchar "Box_circle operator"; |
| 341 |
beginarithchar(box_circle); |
| 342 |
if .5w <> good.x .5w: change_width; fi |
| 343 |
pickup rule.nib; autorounded; |
| 344 |
lft x11=hround 1.5u; x12=w-x11; x13=x12; x14=x11; |
| 345 |
y11-y14 = x12-x11; .5[y11,y14]=math_axis; y11=y12; y13=y14; |
| 346 |
lft x6=hround .25[x11,x12]; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6); |
| 347 |
circle_points; draw_circle; % circle |
| 348 |
draw z11--z12--z13--z14--cycle; % box |
| 349 |
labels(11,12,13,14); endchar; |
| 350 |
|
| 351 |
iff known box_box: cmchar "Box_box operator"; |
| 352 |
beginbox(box_box); |
| 353 |
z0=.5[z1,z3]; |
| 354 |
for i = 1 upto 4: z[i+4]=.4[z0,z[i]]; endfor |
| 355 |
draw z5--z6--z7--z8--cycle; |
| 356 |
labels(1,2,3,4); endchar; |
| 357 |
|
| 358 |
iff known box_empty: cmchar "Box operator"; |
| 359 |
beginbox(box_empty); |
| 360 |
labels(1,2,3,4); endchar; % like LaTeX Box, only with less side bearing |
| 361 |
|
| 362 |
iff known lightning: cmchar "Lightning strike"; % Adapted from sswarrow |
| 363 |
beginchar(lightning,11u#,asc_height#,asc_depth#); |
| 364 |
adjust_fit(0,0); pickup crisp.nib; |
| 365 |
x1+.5rule_thickness=hround(w-u); lft x0=hround 3u; |
| 366 |
y1+.5rule_thickness=h; bot y0=-d; |
| 367 |
numeric theta,delta; theta=angle(z1-z0); delta=3u++.24asc_height; |
| 368 |
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle |
| 369 |
pos1(rule_thickness,-90+theta); pos2(rule_thickness,-90+theta); |
| 370 |
pos3(bar,-180+theta); pos4(bar,-180+theta); |
| 371 |
%y3=y0; x4=x0; x3-x0=y4-y0=delta+eps; |
| 372 |
y10=y0; x11=x0; x10-x0=y11-y0=delta+eps; % Can now do arrows of any angle |
| 373 |
z3=z10 rotatedaround(z0,theta-45); |
| 374 |
z4=z11 rotatedaround(z0,theta-45); |
| 375 |
pos5(bar,theta+45); z5l=z0; pos6(bar,theta-45); z6l=z0; |
| 376 |
z9=.381966[.5[z3,z4],z0]; |
| 377 |
numeric t; path p; p=z4l{z9-z4}..z6r; |
| 378 |
t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=point t of p; |
| 379 |
filldraw z0..{z4-z9}z4r |
| 380 |
--subpath (0,t) of\\(z4l{z9-z4}..z6r) |
| 381 |
% --z2l---z1l..z1r---z2r |
| 382 |
--subpath (t,0) of\\(z3l{z9-z3}..z5r) |
| 383 |
--z3r{z9-z3}..z0 & cycle; % arrowhead |
| 384 |
z20=.45[z1,z2]; |
| 385 |
z21=z22 + .55(z2-z1); |
| 386 |
x22=x1-3u; y22=y1; |
| 387 |
pickup rule.nib; draw z2--z20--z21--z22; % stem |
| 388 |
penlabels(0,1,2,3,4,5,6,9); endchar; |
| 389 |
|
| 390 |
iff known merge: cmchar "Merge symbol"; |
| 391 |
beginchar(merge,16u#,asc_height#,0); |
| 392 |
adjust_fit(0,0); pickup rule.nib; |
| 393 |
lft x1=hround 1.1u; x3 = .65[x1,x6]; x2 = .5[x1,x3]; |
| 394 |
y2=h+o; bot y1=0; y3 = y1; |
| 395 |
x6=w-x1; y6=y1; |
| 396 |
z4-z1 = z5-z2 = z6-z3; |
| 397 |
draw z1---z2---z3; % left-hand |
| 398 |
draw z4--z5--z6; % right-hand |
| 399 |
labels(1,2,3,4,5,6); endchar; |
| 400 |
|
| 401 |
iff known var_times: cmchar "Cartesian Product operator"; % bits of this taken |
| 402 |
beginchar(var_times,10u#,asc_height#,0); % from "exists" |
| 403 |
adjust_fit(0,0); pickup rule.nib; |
| 404 |
lft x1=hround u-eps; x2=x3=w-x1; x4=x1; |
| 405 |
top y1=h; bot y4=0; y2=y1; y3=y4; |
| 406 |
draw z1--z3; draw z2--z4; % diagonals |
| 407 |
labels(1,2,3,4); endchar; |
| 408 |
|
| 409 |
iff known fat_semi: cmchar "Fat semicolon"; |
| 410 |
beginchar(fat_semi,6u#,0.5[x_height#,asc_height#],comma_depth#); |
| 411 |
adjust_fit(0,0); pickup rule.nib; autorounded; |
| 412 |
lft x3=lft x7=hround u; rt x1=rt x5=hround(w-u); x2=x4=x6=x8=w/2; |
| 413 |
top y4=h; bot y6=0; y4-y2=y8-y6=x1-x3; y1=y3=0.5[y2,y4]; |
| 414 |
y5=y7=0.5[y6,y8]; lft x9=2u; bot y9=-d; |
| 415 |
draw z1..z2..z3..z4..cycle; |
| 416 |
draw z5{down}..z6..z7..z8..z5{down}..{curl 0}z9; |
| 417 |
labels(1,2,3,4,5,6,7,8,9); endchar; |
| 418 |
|
| 419 |
iff known ssw_arrow: cmchar "Southsouthwest arrow"; |
| 420 |
beginchar(ssw_arrow,11u#,asc_height#,asc_depth#); |
| 421 |
adjust_fit(0,0); pickup crisp.nib; |
| 422 |
x1+.5rule_thickness=hround(w-u); lft x0=hround 3u; % This 3u used to be a u in |
| 423 |
y1+.5rule_thickness=h; bot y0=-d; % the program for swarrow. |
| 424 |
% 3u (with width 11u) gives |
| 425 |
% arrow parallel to langle. |
| 426 |
numeric theta,delta; theta=angle(z1-z0); delta=3u++.24asc_height; |
| 427 |
if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle |
| 428 |
pos1(rule_thickness,-90+theta); pos2(rule_thickness,-90+theta); |
| 429 |
pos3(bar,-180+theta); pos4(bar,-180+theta); |
| 430 |
%y3=y0; x4=x0; x3-x0=y4-y0=delta+eps; |
| 431 |
y10=y0; x11=x0; x10-x0=y11-y0=delta+eps; % Can now do arrows of any angle |
| 432 |
z3=z10 rotatedaround(z0,theta-45); |
| 433 |
z4=z11 rotatedaround(z0,theta-45); |
| 434 |
pos5(bar,theta+45); z5l=z0; pos6(bar,theta-45); z6l=z0; |
| 435 |
z9=.381966[.5[z3,z4],z0]; |
| 436 |
numeric t; path p; p=z4l{z9-z4}..z6r; |
| 437 |
t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=point t of p; |
| 438 |
filldraw z0..{z4-z9}z4r |
| 439 |
--subpath (0,t) of\\(z4l{z9-z4}..z6r) |
| 440 |
--z2l---z1l..z1r---z2r |
| 441 |
--subpath (t,0) of\\(z3l{z9-z3}..z5r) |
| 442 |
--z3r{z9-z3}..z0 & cycle; % arrowhead and stem |
| 443 |
penlabels(0,1,2,3,4,5,6,9); endchar; |
| 444 |
|
| 445 |
iff known sse_arrow: cmchar "Southsoutheast arrow"; |
| 446 |
beginchar(sse_arrow,11u#,asc_height#,asc_depth#); |
| 447 |
adjust_fit(0,0); pickup crisp.nib; |
| 448 |
x1-.5rule_thickness=hround u; rt x0=hround(w-3u); |
| 449 |
y1+.5rule_thickness=h; bot y0=-d; |
| 450 |
numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height; |
| 451 |
if abs(theta+45)<2.5: theta:=-45; y1:=y0+x0-x1; fi % near-45$^\circ$ angle |
| 452 |
pos1(rule_thickness,90+theta); pos2(rule_thickness,90+theta); |
| 453 |
pos3(bar,theta); pos4(bar,theta); |
| 454 |
%x3=x0; y4=y0; y3-y0=x0-x4=delta+eps; |
| 455 |
x10=x0; y11=y0; y10-y0=x0-x11=delta+eps; |
| 456 |
z3=z10 rotatedaround(z0,theta+45); |
| 457 |
z4=z11 rotatedaround(z0,theta+45); |
| 458 |
pos5(bar,theta+225); z5l=z0; pos6(bar,theta+135); z6l=z0; |
| 459 |
z9=.381966[.5[z3,z4],z0]; |
| 460 |
numeric t; path p; p=z4l{z9-z4}..z6r; |
| 461 |
t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=point t of p; |
| 462 |
filldraw z0..{z4-z9}z4r |
| 463 |
--subpath (0,t) of\\(z4l{z9-z4}..z6r) |
| 464 |
--z2l---z1l..z1r---z2r |
| 465 |
--subpath (t,0) of\\(z3l{z9-z3}..z5r) |
| 466 |
--z3r{z9-z3}..z0 & cycle; % arrowhead and stem |
| 467 |
penlabels(0,1,2,3,4,5,6,9); endchar; |
| 468 |
|
| 469 |
iff known curly_wedge_up_arrow: |
| 470 |
cmchar "Upwards accumulate symbol"; |
| 471 |
beginchar(curly_wedge_up_arrow,12u#,asc_height#,asc_depth#); |
| 472 |
adjust_fit(0,0); pickup rule.nib; |
| 473 |
x2=good.x .5w; w:=r:=2x2; |
| 474 |
lft x1=0; x3=w-x1; |
| 475 |
bot y1=-d; top y2=h+o; y3=y1; |
| 476 |
x4=x2; y4=h-(x_height+d); |
| 477 |
pickup crisp.nib; |
| 478 |
pos11(rule_thickness,0); pos12(rule_thickness,0); % arrow head nicked from |
| 479 |
pos13(bar,90); pos14(bar,90); % up_arrow |
| 480 |
lft x11l=hround(.5w-.5rule_thickness); y11-.5rule_thickness=-d; |
| 481 |
x10=x11=x12; top y10=top y2; x10-x13=x14-x10=3u+eps; |
| 482 |
y13=y14=y10-.24asc_height-eps; |
| 483 |
pos15(bar,angle(z14-z10)); z15l=z10; |
| 484 |
pos16(bar,angle(z13-z10)); z16l=z10; |
| 485 |
z19=.381966[.5[z13,z14],z10]; |
| 486 |
numeric t; path p; p=z14l{z19-z14}..z16r; |
| 487 |
t=xpart(p intersectiontimes((x12r,-d)--(x12r,h))); y12=ypart point t of p; |
| 488 |
filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r) |
| 489 |
--z12r |
| 490 |
-- % ---z11r..z11l--- |
| 491 |
z12l--subpath (t,0) of\\(z13l{z19-z13}..z15r) |
| 492 |
--z13r{z19-z13}..z10 & cycle; % arrowhead |
| 493 |
pickup rule.nib; |
| 494 |
numeric t; path p; p=z1{z4-z1}..{up}z2; |
| 495 |
t=xpart(p intersectiontimes((0,y12)--(w,y12))); |
| 496 |
draw subpath (0,t) of\\(z1{z4-z1}..{up}z2); % left arm |
| 497 |
draw subpath (0,t) of\\(z3{z4-z3}..{up}z2); % right arm |
| 498 |
penlabels(10,11,12,13,14,15,16,19); |
| 499 |
labels(1,2,3,4); endchar; |
| 500 |
|
| 501 |
iff known curly_wedge_down_arrow: |
| 502 |
cmchar "Downwards accumulate symbol"; |
| 503 |
beginchar(curly_wedge_down_arrow,12u#,asc_height#,asc_depth#); |
| 504 |
adjust_fit(0,0); pickup rule.nib; |
| 505 |
x2=good.x .5w; w:=r:=2x2; |
| 506 |
lft x1=0; x3=w-x1; |
| 507 |
bot y1=-d; top y2=h+o; y3=y1; |
| 508 |
x4=x2; y4=h-(x_height+d); |
| 509 |
pickup crisp.nib; |
| 510 |
numeric theta,delta; theta=angle(z4-z1); delta=3u++.24asc_height; |
| 511 |
pos11(rule_thickness,-90+theta); pos12(rule_thickness,-90+theta); |
| 512 |
pos13(bar,-180+theta); pos14(bar,-180+theta); |
| 513 |
lft x10=0; bot y10=-d; |
| 514 |
x11=w; z11=z10+whatever*(dir theta); % where the arrow stem would go |
| 515 |
y13a=y10; x14a=x10; x13a-x10=y14a-y10=delta+eps; |
| 516 |
z13=z13a rotatedaround(z10,theta-45); |
| 517 |
z14=z14a rotatedaround(z10,theta-45); |
| 518 |
pos15(bar,theta+45); z15l=z10; pos16(bar,theta-45); z16l=z10; |
| 519 |
z19=.381966[.5[z13,z14],z10]; |
| 520 |
numeric t; path p; p=z14l{z19-z14}..z16r; |
| 521 |
t=xpart(p intersectiontimes (z11l--(z11l+2(z10-z11)))); z12l=point t of p; |
| 522 |
filldraw z10..{z14-z19}z14r |
| 523 |
--subpath (0,t) of\\(z14l{z19-z14}..z16r) |
| 524 |
--z12l |
| 525 |
-- % ---z11l..z11r--- |
| 526 |
z12r |
| 527 |
--subpath (t,0) of\\(z13l{z19-z13}..z15r) |
| 528 |
--z13r{z19-z13}..z10 & cycle; % left arrowhead |
| 529 |
numeric theta,delta; theta=angle(z3-z4); delta=3u++.24asc_height; |
| 530 |
pos21(rule_thickness,90+theta); pos22(rule_thickness,90+theta); |
| 531 |
pos23(bar,theta); pos24(bar,theta); |
| 532 |
rt x20=w; bot y20=-d; |
| 533 |
x21=0; z21=z20+whatever*-(dir theta); % where the arrow stem would go |
| 534 |
x23a=x20; y24a=y20; y23a-y20=x20-x24a=delta+eps; |
| 535 |
z23=z23a rotatedaround(z20,theta+45); |
| 536 |
z24=z24a rotatedaround(z20,theta+45); |
| 537 |
pos25(bar,theta+225); z25l=z20; pos26(bar,theta+135); z26l=z20; |
| 538 |
z29=.381966[.5[z23,z24],z20]; |
| 539 |
numeric t; path p; p=z24l{z29-z24}..z26r; |
| 540 |
t=xpart(p intersectiontimes (z21l--(z21l+2(z20-z21)))); z22l=point t of p; |
| 541 |
filldraw z20..{z24-z29}z24r |
| 542 |
--subpath (0,t) of\\(z24l{z29-z24}..z26r) |
| 543 |
--z22l |
| 544 |
-- % ---z21l..z21r--- |
| 545 |
z22r |
| 546 |
--subpath (t,0) of\\(z23l{z29-z23}..z25r) |
| 547 |
--z23r{z29-z23}..z20 & cycle; % right arrowhead |
| 548 |
pickup rule.nib; |
| 549 |
numeric t; path p; p=z2{down}..{z1-z4}z1; |
| 550 |
t=xpart(p intersectiontimes(z12l--z12r)); |
| 551 |
draw subpath (0,t) of\\(z2{down}..{z1-z4}z1); % left arm |
| 552 |
draw subpath (0,t) of\\(z2{down}..{z3-z4}z3); % right arm |
| 553 |
penlabels(10,11,12,13,14,15,16,19); |
| 554 |
labels(1,2,3,4); endchar; |
| 555 |
|
| 556 |
iff known fat_slash: cmchar "Fat slash"; |
| 557 |
beginchar(fat_slash,13u#,body_height#,paren_depth#); |
| 558 |
numeric fatness; fatness = w-9u; |
| 559 |
adjust_fit(0,0); pickup rule.nib; |
| 560 |
rt x1=hround(w-u)+eps; top y1=h+eps; z4 = z1+fatness*right; |
| 561 |
lft x2=hround(fatness+u)+eps; bot y2=-d-eps; z3 = z2+fatness*right; |
| 562 |
draw z1--z2--z3--z4--z1; % diagonal |
| 563 |
labels(1,2); endchar; |
| 564 |
|
| 565 |
iff known fat_bslash: cmchar "Fat reverse slash"; |
| 566 |
beginchar(fat_bslash,13u#,body_height#,paren_depth#); |
| 567 |
numeric fatness; fatness = w-9u; |
| 568 |
adjust_fit(0,0); pickup rule.nib; |
| 569 |
lft x1=hround u-eps; top y1=h+eps; z4 = z1+fatness*right; |
| 570 |
rt x2=hround(w-fatness-u)+eps; bot y2=-d-eps; z3 = z2+fatness*right; |
| 571 |
draw z1--z2--z3--z4--z1; % diagonal |
| 572 |
labels(1,2); endchar; |
| 573 |
|
| 574 |
iff known l_bag: cmchar "Left bag bracket"; |
| 575 |
beginchar(l_bag,8u#,body_height#,paren_depth#); |
| 576 |
% ht and dp from "left parenthesis" symbol |
| 577 |
adjust_fit(0,0); pickup rule.nib; |
| 578 |
lft x0=u; y0=h-2u; |
| 579 |
x1=1/2[x0,x2]; top y1=h; |
| 580 |
x2=2/3[x0,x3]; y2=y0; |
| 581 |
bot rt z3=(w-u,-d); |
| 582 |
draw z0..z1{right}..z2{down}..{right}z3; |
| 583 |
penlabels(0,1,2,3); endchar; |
| 584 |
|
| 585 |
iff known r_bag: cmchar "Right bag bracket"; |
| 586 |
beginchar(r_bag,8u#,body_height#,paren_depth#); |
| 587 |
adjust_fit(0,0); pickup rule.nib; |
| 588 |
rt x0=w-u; y0=h-2u; |
| 589 |
x1=1/2[x0,x2]; top y1=h; |
| 590 |
x2=2/3[x0,x3]; y2=y0; |
| 591 |
bot lft z3=(u,-d); |
| 592 |
draw z0..z1{left}..z2{down}..{left}z3; |
| 593 |
penlabels(0,1,2,3); endchar; |
| 594 |
|
| 595 |
iff known var_big_circ: cmchar "Circular circle for copyright, etc."; |
| 596 |
beginchar(var_big_circ,18u#,asc_height#,desc_depth#); autorounded; |
| 597 |
adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib; |
| 598 |
lft x6=hround u; x2=w-x6; y2=.5[h+o,-d-o]; y8-y2 = .5(x2-x6); |
| 599 |
circle_points; draw_circle; % circle |
| 600 |
labels(1,2,3,4,5,6,7,8); endchar; |