| 1 |
% mathematical symbols by Anthony Phan. |
| 2 |
% file: mathbigs.mf (large symbols) |
| 3 |
% last modification: May 16, 2005. |
| 4 |
% Only known charcodes will be generated. |
| 5 |
|
| 6 |
def horizontal_rules_list = |
| 7 |
0.5[-d, h]-math_axis, 0.5[-d, h]-math_axis+x_height, |
| 8 |
0.25[-d, h], 0.5[-d, h], 0.75[-d, h] enddef; |
| 9 |
|
| 10 |
% PARAMETERS |
| 11 |
|
| 12 |
text_rth# := 0[0.95stem#, 0.95cap_stem#]; |
| 13 |
disp_rth# := 0.75[0.95stem#, 0.95cap_stem#]; |
| 14 |
disp_stem# := 1.25cap_stem#; |
| 15 |
disp_hair# := max(rth1#, cap_hair#*(cap_curve#/cap_stem#)); |
| 16 |
define_whole_blacker_pixels(text_rth, disp_rth, disp_stem, disp_hair); |
| 17 |
|
| 18 |
% SUMMATIONS |
| 19 |
|
| 20 |
def tmp_program(expr lowerstem, sidestem, upperstem, beak, hair, beakjut, lo) = |
| 21 |
pickup crisp.nib; |
| 22 |
top y1 = top y2 = h; bot y5 = bot y6 = -d; |
| 23 |
bot y12 = h-vround upperstem; y12 = y13 = y13'; |
| 24 |
bot y14 = bot y15 = h-vround(upperstem+beak); |
| 25 |
top y9 = -d+vround lowerstem; y9 = y9' = y10; |
| 26 |
top y7 = top y8 = -d+vround(lowerstem+beak); |
| 27 |
y3 = y12; y0 = 0.5[y12, y9]; |
| 28 |
rt x6 = w-appr; x6 = x7 = x15 = x1+hround beakjut; |
| 29 |
lft x2 = appr; x2 = x3; rt x5 = appr-hround lo; |
| 30 |
rt x7-lft x8 = rt x15- lft x14 = hround hair; |
| 31 |
x0 = floor(0.5[x2, x7])+0.5; |
| 32 |
x9 = x13 = 0.5[x0, x14]; x9' = x8; z13'-z14 = whatever*(z1-z15); |
| 33 |
adjust_slanted_bar(3, 0, 3', 0', max(.5(sidestem-crisp), 1), 1); |
| 34 |
z11-z0 = z0-z0'; z12 = whatever[z3+2(z3'-z3), z11]; |
| 35 |
adjust_slanted_bar(5, 11, 5', 11', max(hair-crisp, 1), -1); |
| 36 |
z10 = whatever[z11, z5']; |
| 37 |
z4 = whatever[z5', z11']; z4 = whatever[z3, z0']; |
| 38 |
filldraw z1--z2--z3--z4--z5--z6--z7--z8{down} |
| 39 |
...beak_darkness[z9', 0.5[z8, z9]]...z9{left} |
| 40 |
--z10--z11--z12--z13{right} |
| 41 |
...beak_darkness[z13', 0.5[z13, z14]]...z14{z15-z1} |
| 42 |
--z15--cycle; |
| 43 |
labels(0, 0', 1, 2, 3, 3', 4, 5, 5', 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); |
| 44 |
enddef; |
| 45 |
|
| 46 |
beginchar(small_summation_sign, 8u#+2appr#, 0.8asc_height#, 0); |
| 47 |
"Small summation sign"; |
| 48 |
tmp_program(stem, stem, hair, 0.36h-stem, hair, 0.2u, 0.5u); |
| 49 |
endchar; |
| 50 |
|
| 51 |
beginchar(summation_sign, 14u#+2appr#, 0, 10/6dh#); |
| 52 |
"Textstyle summation sign"; |
| 53 |
tmp_program(cap_stem, cap_stem, cap_hair, 0.333d-d/9, |
| 54 |
cap_hair, 0.4u, 5/7u); |
| 55 |
endchar; |
| 56 |
|
| 57 |
beginchar(Summation_sign, 18u#+2appr#, 0, 14/6dh#); |
| 58 |
padded bigop_padding#; |
| 59 |
"Displaystyle summation sign"; |
| 60 |
tmp_program(disp_stem, disp_stem, disp_hair, 0.333d-d/9, |
| 61 |
disp_hair, 0.75u, u); |
| 62 |
|
| 63 |
endchar; |
| 64 |
|
| 65 |
% PRODUCTS AND COPRODUCTS |
| 66 |
|
| 67 |
def tmp_program(expr orientation, appr_corr, |
| 68 |
stem, hair, jut, inner_jut, bracket, dish) = |
| 69 |
if orientation = up: top y1 = top y3 = h; bot y2 = bot y4 = -d; |
| 70 |
else: top y2 = top y4 = h; bot y1 = bot y3 = -d; fi |
| 71 |
pos1(hround stem, 0); pos2(hround stem, 0); |
| 72 |
pos3(hround stem, 0); pos4(hround stem, 0); |
| 73 |
lft x1l = lft x2l = appr+hround(appr_corr+jut); |
| 74 |
rt x3r = rt x4r = w-appr-hround(appr_corr+jut); |
| 75 |
serif(1, 2, bracket, jut, hair, false, dish, 0, hair, true, 0); |
| 76 |
serif(2, 1, bracket, jut, hair, true, dish, inner_jut, hair, true, dish); |
| 77 |
serif(3, 4, bracket, 0, hair, false, 0, jut, hair, true, dish); |
| 78 |
serif(4, 3, bracket, inner_jut, hair, true, dish, jut, hair, true, dish); |
| 79 |
filldraw stroke z1e..z2e; filldraw stroke z3e..z4e; |
| 80 |
filldraw z1f--z3c--z3d--z1e--cycle; |
| 81 |
penlabels(1, 2, 3, 4); |
| 82 |
enddef; |
| 83 |
|
| 84 |
beginchar(small_product_sign, 8u#+2appr#, 0.8asc_height#, 0); |
| 85 |
"Small product sign"; |
| 86 |
pickup crisp.nib; |
| 87 |
tmp_program(up, -0.875u, stem, hair, u, u, 0.5u, dish); |
| 88 |
endchar; |
| 89 |
|
| 90 |
beginchar(product_sign, 16u#+2appr#, 0, 10/6dh#); |
| 91 |
"Textstyle product sign"; |
| 92 |
pickup crisp.nib; |
| 93 |
tmp_program(up, 0, cap_stem, cap_hair, 1.8u, 1.8u, 0.9u, dish); |
| 94 |
endchar; |
| 95 |
|
| 96 |
beginchar(Product_sign, 21u#+2appr#, 0, 14/6dh#); |
| 97 |
padded bigop_padding#; |
| 98 |
"Displaystyle product sign"; |
| 99 |
pickup crisp.nib; |
| 100 |
tmp_program(up, 0, disp_stem, disp_hair, 2.4u, 2.4u, 1.2u, dish); |
| 101 |
endchar; |
| 102 |
|
| 103 |
beginchar(small_coproduct_sign, 8u#+2appr#, 0.8asc_height#, 0); |
| 104 |
"Small coproduct sign"; |
| 105 |
pickup crisp.nib; |
| 106 |
tmp_program(down, -0.875u, stem, hair, u, u, 0.5u, dish); |
| 107 |
endchar; |
| 108 |
|
| 109 |
beginchar(coproduct_sign, 16u#+2appr#, 0, 10/6dh#); |
| 110 |
"Textstyle coproduct sign"; |
| 111 |
pickup crisp.nib; |
| 112 |
tmp_program(down, 0, cap_stem, cap_hair, 1.8u, 1.8u, 0.9u, dish); |
| 113 |
endchar; |
| 114 |
|
| 115 |
beginchar(Coproduct_sign, 21u#+2appr#, 0, 14/6dh#); |
| 116 |
padded bigop_padding#; |
| 117 |
"Displaystyle coproduct sign"; |
| 118 |
pickup crisp.nib; |
| 119 |
tmp_program(down, 0, disp_stem, disp_hair, 2.4u, 2.4u, 1.2u, dish); |
| 120 |
endchar; |
| 121 |
|
| 122 |
% BIG PLUS, BIG TIMES |
| 123 |
|
| 124 |
beginchar(bplus_sign, 10/6dh#+2appr#, 0, 10/6dh#); |
| 125 |
"Textstyle big plus sign"; |
| 126 |
use_rule2; |
| 127 |
pickup rule.nib; y3 = y4 = good.y 0.5[-d, h]; |
| 128 |
pickup tiny.nib; |
| 129 |
pos1(rth, 0); pos2(rth, 0); pos3(rth, 90); pos4(rth, 90); |
| 130 |
lft x1l = hround 0.5(w-rth); x2 = x1; |
| 131 |
lft x3 = Appr; x1-x3 = x4-x1 = y1-y3 = y3-y2; |
| 132 |
filldraw stroke z1e..z2e; filldraw stroke z3e..z4e; |
| 133 |
penlabels(1, 2, 3, 4); |
| 134 |
endchar; |
| 135 |
|
| 136 |
beginchar(Bplus_sign, 14/6dh#+2appr#, 0, 14/6dh#); |
| 137 |
padded bigop_padding#; |
| 138 |
"Displaystyle big plus sign"; |
| 139 |
use_rule3; |
| 140 |
pickup rule.nib; y3 = y4 = good.y 0.5[-d, h]; |
| 141 |
pickup tiny.nib; |
| 142 |
pos1(rth, 0); pos2(rth, 0); pos3(rth, 90); pos4(rth, 90); |
| 143 |
lft x1l = hround 0.5(w-rth); x2 = x1; |
| 144 |
lft x3 = Appr; x1-x3 = x4-x1 = y1-y3 = y3-y2; |
| 145 |
filldraw stroke z1e..z2e; filldraw stroke z3e..z4e; |
| 146 |
penlabels(1, 2, 3, 4); |
| 147 |
endchar; |
| 148 |
|
| 149 |
beginchar(btimes_sign, 10/6dh#+2appr#, 0, 10/6dh#); |
| 150 |
"Textstyle big times sign"; |
| 151 |
use_rule2; |
| 152 |
pickup rule.nib; x0 = good.x 0.5w; |
| 153 |
y0 = y0' = good.y 0.5[-d, h]; |
| 154 |
pickup tiny.nib; rt x0' = w-Appr; |
| 155 |
z1-z0 = z0-z2 = (z0'-z0) rotated 45; z3-z0 = z0-z4 = (z0'-z0) rotated -45; |
| 156 |
pos1(rth+2eps, -45); pos2(rth+2eps, -45); |
| 157 |
pos3(rth+2eps, 45); pos4(rth+2eps, 45); |
| 158 |
filldraw stroke z1e..z2e; filldraw stroke z4e..z3e; |
| 159 |
penlabels(1, 2, 3, 4); |
| 160 |
endchar; |
| 161 |
|
| 162 |
beginchar(Btimes_sign, 14/6dh#+2appr#, 0, 14/6dh#); |
| 163 |
padded bigop_padding#; |
| 164 |
"Displaystyle big times sign"; |
| 165 |
use_rule3; |
| 166 |
pickup rule.nib; x0 = good.x 0.5w; |
| 167 |
y0 = y0' = good.y 0.5[-d, h]; |
| 168 |
pickup tiny.nib; rt x0' = w-Appr; |
| 169 |
z1-z0 = z0-z2 = (z0'-z0) rotated 45; z3-z0 = z0-z4 = (z0'-z0) rotated -45; |
| 170 |
pos1(rth+2eps, -45); pos2(rth+2eps, -45); |
| 171 |
pos3(rth+2eps, 45); pos4(rth+2eps, 45); |
| 172 |
filldraw stroke z1e..z2e; filldraw stroke z4e..z3e; |
| 173 |
penlabels(1, 2, 3, 4); |
| 174 |
endchar; |
| 175 |
|
| 176 |
% COMPLEMENTS |
| 177 |
|
| 178 |
beginchar(bcomplement, 7.5u#+2appr#, 0, 10/6dh#); |
| 179 |
"Textstyle complement"; |
| 180 |
autorounded; pickup tiny.nib; |
| 181 |
pos1(text_rth, 0); pos2(text_rth, 0); |
| 182 |
pos7(text_rth, 0); pos8(text_rth, 0); |
| 183 |
h-bot y1 = top y8+d = vround 0.25(h+d); |
| 184 |
y3+0.5text_rth = h+vround(o*((h+d)/cap_height))+eps; |
| 185 |
y6-0.5text_rth = -d-vround(o*((h+d)/cap_height))-eps; |
| 186 |
rt x1r = w-appr; x1 = x2 = x7 = x8; |
| 187 |
x4 = x5 = appr+0.5text_rth; x3 = x6 = 0.5[x1, x4]; |
| 188 |
y2 = y4 = max(y3-x1+x3, 1/6[y1, y3]); |
| 189 |
y5 = y7 = min(y6+x1-x3, 1/6[y8, y6]); |
| 190 |
filldraw stroke z1e..z2e; filldraw stroke z7e..z8e; |
| 191 |
pickup pencircle scaled text_rth; |
| 192 |
draw flatcup(z2, z3, z4)..flatcup(z5, z6, z7); |
| 193 |
% z4..z5 down_to_right z6 right_to_up z7; |
| 194 |
penlabels(1, 2, 7, 8); labels(3, 4, 5, 6); |
| 195 |
endchar; |
| 196 |
|
| 197 |
beginchar(Bcomplement, 10u#+2appr#, 0, 14/6dh#); |
| 198 |
padded bigop_padding#; |
| 199 |
"displaystyle complement"; |
| 200 |
autorounded; pickup tiny.nib; |
| 201 |
pos1(disp_rth, 0); pos2(disp_rth, 0); |
| 202 |
pos7(disp_rth, 0); pos8(disp_rth, 0); |
| 203 |
h-bot y1 = top y8+d = vround 0.25(h+d); |
| 204 |
y3+0.5disp_rth = h+vround(o*((h+d)/cap_height))+eps; |
| 205 |
y6-0.5disp_rth = -d-vround(o*((h+d)/cap_height))-eps; |
| 206 |
rt x1r = w-appr; x1 = x2 = x7 = x8; |
| 207 |
x4 = x5 = appr+0.5disp_rth; x3 = x6 = 0.5[x1, x4]; |
| 208 |
y2 = y4 = max(y3-x1+x3, 1/6[y1, y3]); |
| 209 |
y5 = y7 = min(y6+x1-x3, 1/6[y8, y6]); |
| 210 |
filldraw stroke z1e..z2e; filldraw stroke z7e..z8e; |
| 211 |
pickup pencircle scaled disp_rth; |
| 212 |
draw flatcup(z2, z3, z4)..flatcup(z5, z6, z7); |
| 213 |
% z2 up_to_left z3 left_to_down |
| 214 |
% z4..z5 down_to_right z6 right_to_up z7; |
| 215 |
penlabels(1, 2, 7, 8); labels(3, 4, 5, 6); |
| 216 |
endchar; |
| 217 |
|
| 218 |
% |
| 219 |
% TRUCS |
| 220 |
% |
| 221 |
|
| 222 |
beginchar(btruc_sign, 10/6dh#+2appr#, 0, 10/6dh#); |
| 223 |
"Textstyle truc sign"; |
| 224 |
pickup tiny.nib; |
| 225 |
pos1(rth2, 0); pos2(rth2, 0); pos3(rth2, 90); pos4(rth2, 90); |
| 226 |
top y1 = top y3r = top y4r = h; bot y2 = -d; |
| 227 |
lft x1l = hround 0.5(w-rth2); x2 = x1; |
| 228 |
lft x3 = Appr; x1-x3 = x4-x1; filldraw stroke z1e..z2e; |
| 229 |
filldraw stroke z3e..z4e; penlabels(1, 2, 3, 4); |
| 230 |
endchar; |
| 231 |
|
| 232 |
beginchar(Btruc_sign, 14/6dh#+2appr#, 0, 14/6dh#); |
| 233 |
padded bigop_padding#; |
| 234 |
"Displaystyle truc sign"; |
| 235 |
pickup tiny.nib; |
| 236 |
pos1(rth3, 0); pos2(rth3, 0); pos3(rth3, 90); pos4(rth3, 90); |
| 237 |
top y1 = top y3r = top y4r = h; bot y2 = -d; |
| 238 |
lft x1l = hround 0.5(w-rth2); x2 = x1; |
| 239 |
lft x3 = Appr; x1-x3 = x4-x1; filldraw stroke z1e..z2e; |
| 240 |
filldraw stroke z3e..z4e; penlabels(1, 2, 3, 4); |
| 241 |
endchar; |
| 242 |
|
| 243 |
beginchar(bcurt_sign, 10/6dh#+2appr#, 0, 10/6dh#); |
| 244 |
"Textstyle curT sign"; |
| 245 |
pickup tiny.nib; |
| 246 |
pos1(rth2, 0); pos2(rth2, 0); pos3(rth2, 90); pos4(rth2, 90); |
| 247 |
bot y1 = bot y3l = bot y4l = -d; top y2 = h; |
| 248 |
lft x1l = hround 0.5(w-rth); x2 = x1; |
| 249 |
lft x3 = appr; x1-x3 = x4-x1; filldraw stroke z2e..z1e; |
| 250 |
filldraw stroke z3e..z4e; penlabels(1, 2, 3, 4); |
| 251 |
endchar; |
| 252 |
|
| 253 |
beginchar(Bcurt_sign, 14/6dh#+2appr#, 0, 14/6dh#); |
| 254 |
padded bigop_padding#; |
| 255 |
"Displaystyle curT sign"; |
| 256 |
pickup tiny.nib; |
| 257 |
pos1(rth3, 0); pos2(rth3, 0); pos3(rth3, 90); pos4(rth3, 90); |
| 258 |
bot y1 = bot y3l = bot y4l = -d; top y2 = h; |
| 259 |
lft x1l = hround 0.5(w-rth); x2 = x1; |
| 260 |
lft x3 = appr; x1-x3 = x4-x1; filldraw stroke z2e..z1e; |
| 261 |
filldraw stroke z3e..z4e; penlabels(1, 2, 3, 4); |
| 262 |
endchar; |
| 263 |
|
| 264 |
% |
| 265 |
% CUPS AND CAPS : STEMS MATCH BRACKETS ONES |
| 266 |
% |
| 267 |
|
| 268 |
beginchar(bcap_sign, 14u#+2appr#, 0, 10/6dh#); |
| 269 |
"Textstyle cap sign"; |
| 270 |
pickup tiny.nib; |
| 271 |
pos1(text_rth, 0); pos2(text_rth, 0); pos4(text_rth, 0); pos5(text_rth, 0); |
| 272 |
lft x1l = lft x2l = appr; rt x4r = rt x5r = w-appr; x3 = 0.5[x2, x4]; |
| 273 |
bot y1 = bot y5 = -d; y3+0.5text_rth = h+vround(o*((h+d)/cap_height))+eps; |
| 274 |
y2 = y4 = max(y3-0.5(x4-x2), 0.5[y3, y1]); |
| 275 |
filldraw stroke z2e..z1e; filldraw stroke z4e..z5e; |
| 276 |
pickup pencircle scaled text_rth; autorounded; draw flatcup(z2, z3, z4); |
| 277 |
penlabels(1, 2, 3, 4, 5); |
| 278 |
endchar; |
| 279 |
|
| 280 |
beginchar(Bcap_sign, 18u#+2appr#, 0, 14/6dh#); |
| 281 |
padded bigop_padding#; |
| 282 |
"Displaystyle cap sign"; |
| 283 |
pickup tiny.nib; |
| 284 |
pos1(disp_rth, 0); pos2(disp_rth, 0); pos4(disp_rth, 0); pos5(disp_rth, 0); |
| 285 |
lft x1l = lft x2l = appr; rt x4r = rt x5r = w-appr; x3 = 0.5[x2, x4]; |
| 286 |
bot y1 = bot y5 = -d; y3+0.5disp_rth = h+vround(o*((h+d)/cap_height))+eps; |
| 287 |
y2 = y4 = max(y3-0.5(x4-x2), 0.5[y3, y1]); |
| 288 |
filldraw stroke z2e..z1e; filldraw stroke z4e..z5e; |
| 289 |
pickup pencircle scaled disp_rth; autorounded; draw flatcup(z2, z3, z4); |
| 290 |
penlabels(1, 2, 3, 4, 5); |
| 291 |
endchar; |
| 292 |
|
| 293 |
beginchar(bcup_sign, 14u#+2appr#, 0, 10/6dh#); |
| 294 |
"Textstyle cup sign"; |
| 295 |
pickup tiny.nib; |
| 296 |
pos1(text_rth, 0); pos2(text_rth, 0); pos4(text_rth, 0); pos5(text_rth, 0); |
| 297 |
lft x1l = lft x2l = appr; rt x4r = rt x5r = w-appr; x3 = 0.5[x2, x4]; |
| 298 |
top y1 = top y5 = h; y3-0.5text_rth = -d-vround(o*((h+d)/cap_height))-eps; |
| 299 |
y2 = y4 = min(y3+0.5(x4-x2), 0.5[y3, y1]); |
| 300 |
filldraw stroke z2e..z1e; filldraw stroke z4e..z5e; |
| 301 |
pickup pencircle scaled text_rth; autorounded; draw flatcup(z2, z3, z4); |
| 302 |
penlabels(1, 2, 3, 4, 5); |
| 303 |
endchar; |
| 304 |
|
| 305 |
beginchar(Bcup_sign, 18u#+2appr#, 0, 14/6dh#); |
| 306 |
padded bigop_padding#; |
| 307 |
"Displaystyle cup sign"; |
| 308 |
pickup tiny.nib; |
| 309 |
pos1(disp_rth, 0); pos2(disp_rth, 0); pos4(disp_rth, 0); pos5(disp_rth, 0); |
| 310 |
lft x1l = lft x2l = appr; rt x4r = rt x5r = w-appr; x3 = 0.5[x2, x4]; |
| 311 |
top y1 = top y5 = h; y3-0.5disp_rth = -d-vround(o*((h+d)/cap_height))-eps; |
| 312 |
y2 = y4 = min(y3+0.5(x4-x2), 0.5[y3, y1]); |
| 313 |
filldraw stroke z2e..z1e; filldraw stroke z4e..z5e; |
| 314 |
pickup pencircle scaled disp_rth; autorounded; draw flatcup(z2, z3, z4); |
| 315 |
penlabels(1, 2, 3, 4, 5); |
| 316 |
endchar; |
| 317 |
|
| 318 |
beginchar(bcup_plus, 14u#+2appr#, 0, 10/6dh#); |
| 319 |
"Textstyle cup-plus sign"; |
| 320 |
ensure_centering_of(rth2); |
| 321 |
% |
| 322 |
pickup tiny.nib; |
| 323 |
pos1(text_rth, 0); pos2(text_rth, 0); pos4(text_rth, 0); pos5(text_rth, 0); |
| 324 |
lft x1l = lft x2l = appr; rt x4r = rt x5r = w-appr; x3 = 0.5[x2, x4]; |
| 325 |
top y1 = top y5 = h; y3-0.5text_rth = -d-vround(o*((h+d)/cap_height))-eps; |
| 326 |
y2 = y4 = min(y3+0.5(x4-x2), 0.5[y3, y1]); |
| 327 |
filldraw stroke z2e..z1e; filldraw stroke z4e..z5e; |
| 328 |
% |
| 329 |
pos6(rth2, 0); pos7(rth2, 0); pos8(rth2, 90); pos9(rth2, 90); |
| 330 |
y8 = y9 = vround(0.5[-d, h]-0.5rth2)+0.5rth2; |
| 331 |
x6 = x7 = 0.5w; |
| 332 |
numeric a; |
| 333 |
a = 0.5(min(lft x5l-rt x1r-2.6u, h+d-text_rth-1.3u)-text_rth); |
| 334 |
y6-y8r = y8l-y7 = vround a; x6l-x8 = x9-x6r = hround a; |
| 335 |
filldraw stroke z6e..z7e; filldraw stroke z8e..z9e; |
| 336 |
% |
| 337 |
pickup pencircle scaled text_rth; autorounded; draw flatcup(z2, z3, z4); |
| 338 |
penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); |
| 339 |
endchar; |
| 340 |
|
| 341 |
beginchar(Bcup_plus, 18u#+2appr#, 0, 14/6dh#); |
| 342 |
padded bigop_padding#; |
| 343 |
"Displaystyle cup-plus sign"; |
| 344 |
ensure_centering_of(rth3); |
| 345 |
% |
| 346 |
pickup tiny.nib; |
| 347 |
pos1(disp_rth, 0); pos2(disp_rth, 0); pos4(disp_rth, 0); pos5(disp_rth, 0); |
| 348 |
lft x1l = lft x2l = appr; rt x4r = rt x5r = w-appr; x3 = 0.5[x2, x4]; |
| 349 |
top y1 = top y5 = h; y3-0.5disp_rth = -d-vround(o*((h+d)/cap_height))-eps; |
| 350 |
y2 = y4 = min(y3+0.5(x4-x2), 0.5[y3, y1]); |
| 351 |
filldraw stroke z2e..z1e; filldraw stroke z4e..z5e; |
| 352 |
% |
| 353 |
pos6(rth3, 0); pos7(rth3, 0); pos8(rth3, 90); pos9(rth3, 90); |
| 354 |
y8 = y9 = vround(0.5[-d, h]-0.5rth3)+0.5rth3; |
| 355 |
x6 = x7 = 0.5w; |
| 356 |
numeric a; |
| 357 |
a = 0.5(min(lft x5l-rt x1r-2.9u, h+d-disp_rth-1.45u)-disp_rth); |
| 358 |
y6-y8r = y8l-y7 = vround a; x6l-x8 = x9-x6r = hround a; |
| 359 |
filldraw stroke z6e..z7e; filldraw stroke z8e..z9e; |
| 360 |
% |
| 361 |
pickup pencircle scaled disp_rth; autorounded; draw flatcup(z2, z3, z4); |
| 362 |
penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); |
| 363 |
endchar; |
| 364 |
|
| 365 |
beginchar(bsqcap_sign, 14u#+2appr#, 0, 10/6dh#); |
| 366 |
"Textstyle square cap sign"; |
| 367 |
pickup tiny.nib; |
| 368 |
pos1(text_rth, 180); pos4(text_rth, 0); |
| 369 |
top y2r = top y3r = h; bot y1 = bot y4 = -d; |
| 370 |
top y2r-bot y2l = top y3r-bot y3l = text_rth; |
| 371 |
lft x1r = appr; rt x4r = w-appr; |
| 372 |
x2r = x1r; x3r = x4r; x2l = x1l; x3l = x4l; |
| 373 |
filldraw stroke z1e--z2e--z3e--z4e; |
| 374 |
penlabels(1, 2, 3, 4); |
| 375 |
endchar; |
| 376 |
|
| 377 |
beginchar(Bsqcap_sign, 18u#+2appr#, 0, 14/6dh#); |
| 378 |
padded bigop_padding#; |
| 379 |
"Displaystyle square cap sign"; |
| 380 |
pickup tiny.nib; |
| 381 |
pos1(disp_rth, 180); pos4(disp_rth, 0); |
| 382 |
top y2r = top y3r = h; bot y1 = bot y4 = -d; |
| 383 |
top y2r-bot y2l = top y3r-bot y3l = disp_rth; |
| 384 |
lft x1r = appr; rt x4r = w-appr; |
| 385 |
x2r = x1r; x3r = x4r; x2l = x1l; x3l = x4l; |
| 386 |
filldraw stroke z1e--z2e--z3e--z4e; |
| 387 |
penlabels(1, 2, 3, 4); |
| 388 |
endchar; |
| 389 |
|
| 390 |
beginchar(bsqcup_sign, 14u#+2appr#, 0, 10/6dh#); |
| 391 |
"Textstyle square cup sign"; |
| 392 |
pickup tiny.nib; |
| 393 |
pos1(text_rth, 180); pos4(text_rth, 0); |
| 394 |
bot y2r = bot y3r = -d; top y1 = top y4 = h; |
| 395 |
top y2l-bot y2r = top y3l-bot y3r = text_rth; |
| 396 |
lft x1r = appr; rt x4r = w-appr; |
| 397 |
x2r = x1r; x3r = x4r; x2l = x1l; x3l = x4l; |
| 398 |
filldraw stroke z1e--z2e--z3e--z4e; |
| 399 |
penlabels(1, 2, 3, 4); |
| 400 |
endchar; |
| 401 |
|
| 402 |
beginchar(Bsqcup_sign, 18u#+2appr#, 0, 14/6dh#); |
| 403 |
padded bigop_padding#; |
| 404 |
"Displaystyle square cup sign"; |
| 405 |
pickup tiny.nib; |
| 406 |
pos1(disp_rth, 180); pos4(disp_rth, 0); |
| 407 |
bot y2r = bot y3r = -d; top y1 = top y4 = h; |
| 408 |
top y2l-bot y2r = top y3l-bot y3r = disp_rth; |
| 409 |
lft x1r = appr; rt x4r = w-appr; |
| 410 |
x2r = x1r; x3r = x4r; x2l = x1l; x3l = x4l; |
| 411 |
filldraw stroke z1e--z2e--z3e--z4e; |
| 412 |
penlabels(1, 2, 3, 4); |
| 413 |
endchar; |
| 414 |
|
| 415 |
beginchar(bsqcup_plus, 14u#+2appr#, 0, 10/6dh#); |
| 416 |
"Textstyle square cup-plus sign"; |
| 417 |
ensure_centering_of(rth2); |
| 418 |
% |
| 419 |
pickup tiny.nib; |
| 420 |
pos1(text_rth, 180); pos4(text_rth, 0); |
| 421 |
bot y2r = bot y3r = -d; top y1 = top y4 = h; |
| 422 |
top y2l-bot y2r = top y3l-bot y3r = text_rth; |
| 423 |
lft x1r = appr; rt x4r = w-appr; |
| 424 |
x2r = x1r; x3r = x4r; x2l = x1l; x3l = x4l; |
| 425 |
filldraw stroke z1e--z2e--z3e--z4e; |
| 426 |
% |
| 427 |
pos6(rth2, 0); pos7(rth2, 0); pos8(rth2, 90); pos9(rth2, 90); |
| 428 |
y8 = y9 = vround(0.5[-d, h]-0.5rth2)+0.5rth2; |
| 429 |
x6 = x7 = 0.5w; |
| 430 |
numeric a; |
| 431 |
a = 0.5(min(lft x4l-rt x1l-2.6u, h+d-text_rth-1.3u)-text_rth); |
| 432 |
y6-y8r = y8l-y7 = vround a; x6l-x8 = x9-x6r = hround a; |
| 433 |
filldraw stroke z6e..z7e; filldraw stroke z8e..z9e; |
| 434 |
penlabels(1, 2, 3, 4, 6, 7, 8, 9); |
| 435 |
endchar; |
| 436 |
|
| 437 |
beginchar(Bsqcup_plus, 18u#+2appr#, 0, 14/6dh#); |
| 438 |
padded bigop_padding#; |
| 439 |
"Displaystyle square cup-plus sign"; |
| 440 |
ensure_centering_of(rth3); |
| 441 |
% |
| 442 |
pickup tiny.nib; |
| 443 |
pos1(disp_rth, 180); pos4(disp_rth, 0); |
| 444 |
bot y2r = bot y3r = -d; top y1 = top y4 = h; |
| 445 |
top y2l-bot y2r = top y3l-bot y3r = disp_rth; |
| 446 |
lft x1r = appr; rt x4r = w-appr; |
| 447 |
x2r = x1r; x3r = x4r; x2l = x1l; x3l = x4l; |
| 448 |
filldraw stroke z1e--z2e--z3e--z4e; |
| 449 |
% |
| 450 |
pos6(rth3, 0); pos7(rth3, 0); pos8(rth3, 90); pos9(rth3, 90); |
| 451 |
y8 = y9 = vround(0.5[-d, h]-0.5rth3)+0.5rth3; |
| 452 |
x6 = x7 = 0.5w; |
| 453 |
numeric a; |
| 454 |
a = 0.5(min(lft x4l-rt x1l-2.9u, h+d-disp_rth-1.45u)-disp_rth); |
| 455 |
y6-y8r = y8l-y7 = vround a; x6l-x8 = x9-x6r = hround a; |
| 456 |
filldraw stroke z6e..z7e; filldraw stroke z8e..z9e; |
| 457 |
penlabels(1, 2, 3, 4, 6, 7, 8, 9); |
| 458 |
endchar; |
| 459 |
|
| 460 |
% |
| 461 |
% WEDGES AND VEES |
| 462 |
% |
| 463 |
|
| 464 |
beginchar(bwedge_sign, 16u#+2appr#, 0, 10/6dh#); |
| 465 |
"Textstyle wedge sign"; |
| 466 |
pickup tiny.nib; |
| 467 |
lft x1 = appr; x2 = good.x 0.5w; |
| 468 |
x3-x2 = x2-x1; bot y1 = -d; y1 = y3 = y4 = y6; |
| 469 |
top y2 = h+vround(o*((h+d)/cap_height))+eps; |
| 470 |
x6-x1 = diag_width(text_rth-tiny, z2-z1); |
| 471 |
x3-x4 = diag_width(text_rth-tiny, z2-z3); |
| 472 |
z5-z4 = whatever*(z2-z3); z5-z6 = whatever*(z2-z1); |
| 473 |
filldraw z1--z2--z3--z4--z5--z6--cycle; |
| 474 |
labels(1, 2, 3, 4, 5, 6); |
| 475 |
endchar; |
| 476 |
|
| 477 |
beginchar(Bwedge_sign, 22.4u#+2appr#, 0, 14/6dh#); |
| 478 |
padded bigop_padding#; |
| 479 |
"Displaystyle wedge sign"; |
| 480 |
pickup tiny.nib; |
| 481 |
lft x1 = appr; x2 = good.x 0.5w; |
| 482 |
x3-x2 = x2-x1; bot y1 = -d; y1 = y3 = y4 = y6; |
| 483 |
top y2 = h+vround(o*((h+d)/cap_height))+eps; |
| 484 |
x6-x1 = diag_width(disp_rth-tiny, z2-z1); |
| 485 |
x3-x4 = diag_width(disp_rth-tiny, z2-z3); |
| 486 |
z5-z4 = whatever*(z2-z3); z5-z6 = whatever*(z2-z1); |
| 487 |
filldraw z1--z2--z3--z4--z5--z6--cycle; |
| 488 |
labels(1, 2, 3, 4, 5, 6); |
| 489 |
endchar; |
| 490 |
|
| 491 |
beginchar(bvee_sign, 16u#+2appr#, 0, 10/6dh#); |
| 492 |
"Textstyle vee sign"; |
| 493 |
pickup tiny.nib; |
| 494 |
lft x1 = appr; x2 = good.x 0.5w; |
| 495 |
x3-x2 = x2-x1; top y1 = h; y1 = y3 = y4 = y6; |
| 496 |
bot y2 = -d-vround(o*((h+d)/cap_height))-eps; |
| 497 |
x6-x1 = diag_width(text_rth-tiny, z2-z1); |
| 498 |
x3-x4 = diag_width(text_rth-tiny, z2-z3); |
| 499 |
z5-z4 = whatever*(z2-z3); z5-z6 = whatever*(z2-z1); |
| 500 |
filldraw z1--z2--z3--z4--z5--z6--cycle; |
| 501 |
labels(1, 2, 3, 4, 5, 6); |
| 502 |
endchar; |
| 503 |
|
| 504 |
beginchar(Bvee_sign, 22.4u#+2appr#, 0, 14/6dh#); |
| 505 |
padded bigop_padding#; |
| 506 |
"Displaystyle vee sign"; |
| 507 |
pickup tiny.nib; |
| 508 |
lft x1 = appr; x2 = good.x 0.5w; |
| 509 |
x3-x2 = x2-x1; top y1 = h; y1 = y3 = y4 = y6; |
| 510 |
bot y2 = -d-vround(o*((h+d)/cap_height))-eps; |
| 511 |
x6-x1 = diag_width(disp_rth-tiny, z2-z1); |
| 512 |
x3-x4 = diag_width(disp_rth-tiny, z2-z3); |
| 513 |
z5-z4 = whatever*(z2-z3); z5-z6 = whatever*(z2-z1); |
| 514 |
filldraw z1--z2--z3--z4--z5--z6--cycle; |
| 515 |
labels(1, 2, 3, 4, 5, 6); |
| 516 |
endchar; |
| 517 |
|
| 518 |
beginchar(bwedge_curly, 16u#+2appr#, 0, 10/6dh#); |
| 519 |
"Textstyle curly wedge sign"; |
| 520 |
pickup tiny.nib; |
| 521 |
x2 = hround 0.5(w-text_rth)+0.5text_rth; |
| 522 |
top y2 = h+vround(o*((h+d)/cap_height))+eps; |
| 523 |
pos2(text_rth, 0); bot y1r = bot y3l = -d; |
| 524 |
lft x1r = appr; |
| 525 |
x3l-x2r = x2l-x1r; x1l = x1r; x3l = x3r; |
| 526 |
x4 = x2; pos4(text_rth, 0); y4 = 0.625[y2, y1r]; |
| 527 |
y1l-y1r = y3r-y3l = (text_rth-tiny)/cosd angle(z4r-z1r); |
| 528 |
filldraw stroke z2e{down}...z1e{z1r-z4r}; |
| 529 |
filldraw stroke z2e{down}...z3e{z3l-z4l}; |
| 530 |
penlabels(1, 2, 3, 4); |
| 531 |
endchar; |
| 532 |
|
| 533 |
beginchar(Bwedge_curly, 22.4u#+2appr#, 0, 14/6dh#); |
| 534 |
padded bigop_padding#; |
| 535 |
"Displaystyle curly wedge sign"; |
| 536 |
pickup tiny.nib; |
| 537 |
x2 = hround 0.5(w-disp_rth)+0.5disp_rth; |
| 538 |
top y2 = h+vround(o*((h+d)/cap_height))+eps; |
| 539 |
pos2(disp_rth, 0); bot y1r = bot y3l = -d; |
| 540 |
lft x1r = appr; |
| 541 |
x3l-x2r = x2l-x1r; x1l = x1r; x3l = x3r; |
| 542 |
x4 = x2; pos4(disp_rth, 0); y4 = 0.625[y2, y1r]; |
| 543 |
y1l-y1r = y3r-y3l = (disp_rth-tiny)/cosd angle(z4r-z1r); |
| 544 |
filldraw stroke z2e{down}...z1e{z1r-z4r}; |
| 545 |
filldraw stroke z2e{down}...z3e{z3l-z4l}; |
| 546 |
penlabels(1, 2, 3, 4); |
| 547 |
endchar; |
| 548 |
|
| 549 |
beginchar(bvee_curly, 16u#+2appr#, 0, 10/6dh#); |
| 550 |
"Textstyle curly vee sign"; |
| 551 |
pickup tiny.nib; |
| 552 |
x2 = hround 0.5(w-text_rth)+0.5text_rth; |
| 553 |
bot y2 = -d-vround(o*((h+d)/cap_height))-eps; |
| 554 |
pos2(text_rth, 0); top y1r = top y3l = h; |
| 555 |
lft x1r = appr; |
| 556 |
x1l = x1r; x3l = x3r; x3l-x2r = x2l-x1r; |
| 557 |
x4 = x2; pos4(text_rth, 0); y4 = 0.625[y2, y1r]; |
| 558 |
y1r-y1l = y3l-y3r = (text_rth-tiny)/cosd angle(z4r-z1r); |
| 559 |
filldraw stroke z2e{up}...z1e{z1r-z4r}; |
| 560 |
filldraw stroke z2e{up}...z3e{z3l-z4l}; |
| 561 |
penlabels(1, 2, 3, 4); |
| 562 |
endchar; |
| 563 |
|
| 564 |
beginchar(Bvee_curly, 22.4u#+2appr#, 0, 14/6dh#); |
| 565 |
padded bigop_padding#; |
| 566 |
"Displaystyle curly vee sign"; |
| 567 |
pickup tiny.nib; |
| 568 |
x2 = hround 0.5(w-disp_rth)+0.5disp_rth; |
| 569 |
bot y2 = -d-vround(o*((h+d)/cap_height))-eps; |
| 570 |
pos2(disp_rth, 0); top y1r = top y3l = h; |
| 571 |
lft x1r = appr; |
| 572 |
x1l = x1r; x3l = x3r; x3l-x2r = x2l-x1r; |
| 573 |
x4 = x2; pos4(disp_rth, 0); y4 = 0.625[y2, y1r]; |
| 574 |
y1r-y1l = y3l-y3r = (disp_rth-tiny)/cosd angle(z4r-z1r); |
| 575 |
filldraw stroke z2e{up}...z1e{z1r-z4r}; |
| 576 |
filldraw stroke z2e{up}...z3e{z3l-z4l}; |
| 577 |
penlabels(1, 2, 3, 4); |
| 578 |
endchar; |
| 579 |
|
| 580 |
% UGLY |
| 581 |
|
| 582 |
beginchar(btriangle_up, 16u#+2appr#, 0, 10/6dh#); |
| 583 |
"Big triangle up"; |
| 584 |
pickup tiny.nib; lft x1r = appr; |
| 585 |
x2r = good.x 0.5w; x3r-x2r = x2r-x1r; |
| 586 |
bot y1r = -d; y1r = y3r = y1 = y3; top y2r = h+o; |
| 587 |
top y1l-bot y1r = top y3l-bot y3r = rth; |
| 588 |
x1-x1r = diag_width(rth-tiny, z2r-z1r); |
| 589 |
x3r-x3 = diag_width(rth-tiny, z2r-z3r); |
| 590 |
z2l-z1 = whatever*(z2r-z1r); z2l-z3 = whatever*(z2r-z3r); |
| 591 |
z1l = whatever[z1, z2l]; z3l = whatever[z3, z2l]; |
| 592 |
filldraw stroke z1e--z2e--z3e--z1e; penlabels(1, 2, 3); |
| 593 |
endchar; |
| 594 |
|
| 595 |
beginchar(btriangle_down, 16u#+2appr#, 0, 10/6dh#); |
| 596 |
"Big triangle down"; |
| 597 |
pickup tiny.nib; lft x1r = appr; |
| 598 |
x2r = good.x 0.5w; x3r-x2r = x2r-x1r; |
| 599 |
top y1r = h; y1r = y3r = y1 = y3; bot y2r = -d-o; |
| 600 |
top y1r-bot y1l = top y3r-bot y3l = rth; |
| 601 |
x1-x1r = diag_width(rth-tiny, z2r-z1r); |
| 602 |
x3r-x3 = diag_width(rth-tiny, z2r-z3r); |
| 603 |
z2l-z1 = whatever*(z2r-z1r); z2l-z3 = whatever*(z2r-z3r); |
| 604 |
z1l = whatever[z1, z2l]; z3l = whatever[z3, z2l]; |
| 605 |
filldraw stroke z1e--z2e--z3e--z1e; penlabels(1, 2, 3); |
| 606 |
endchar; |
| 607 |
|
| 608 |
% INTEGRALS |
| 609 |
|
| 610 |
beginchar(bintegral_sign,6u#+2appr#,0,100/54dh#); |
| 611 |
"Textstyle integral sign"; |
| 612 |
z.c=(0.5w,0.5[-d,h]); |
| 613 |
y.t=y.tl=y.tr=h; y.b=y.bl=y.br=-d; |
| 614 |
x.c-x.t=x.b-x.c=2.3u;% slope |
| 615 |
x.tr-x.t=x.t-x.tl=x.br-x.b=x.b-x.bl=.5cap_stem/sind(angle(z.t-z.c)); |
| 616 |
z1 = 0.52[z.bl,z.tl]; |
| 617 |
z2 = (hround(appr+u), 0.82[-d, h]); |
| 618 |
z3 = (w-appr-2.3u, 1[-d, h]); |
| 619 |
z4 = (w-appr, 0.63[y3, y5]); |
| 620 |
z5 = (w-appr-0.7u, vround(h-0.2dh)); |
| 621 |
z6 = (w-appr-2.5u, 1[-d, h]-cap_hair); |
| 622 |
z7 = 0.75[z.br,z.tr]; |
| 623 |
x1.2=x2; z1.2-z1=whatever*(z.t-z.c); |
| 624 |
y6.7=y6; z6.7-z7=whatever*(z.t-z.c); |
| 625 |
path lastpath; |
| 626 |
lastpath := |
| 627 |
z1..controls 0.6[z1,z1.2] and 0.5[z2,z1.2].. |
| 628 |
z2..controls(x2, 0.55[y2, y3]) and (0.65[x3, x2], y3).. |
| 629 |
z3..controls(0.79[x3, x4], y3) and (x4, 0.44[y4, y3]).. |
| 630 |
z4..controls(x4, 0.6[y4, y5]) and (0.6[x5, x4], y5).. |
| 631 |
z5..controls(0.65[x5, x6], y5) and (0.6[x6, x5], y6).. |
| 632 |
z6..controls 0.6[z6, z6.7] and 0.65[z7, z6.7].. |
| 633 |
z7; |
| 634 |
lastpath := lastpath--lastpath rotated 180 shifted (w, -d)--cycle; |
| 635 |
fill lastpath; |
| 636 |
labels(1,2,3,4,5,6,7,1.2,6.7); |
| 637 |
charwd:=charwd-u#; italcorr 0.5u#; w:= round(charwd*hppp); |
| 638 |
tmp_picture := currentpicture; |
| 639 |
endchar; |
| 640 |
|
| 641 |
beginchar(bintegral_double, 11.5u#+2appr#, 0, 100/54dh#); |
| 642 |
"Textstyle double integral sign"; |
| 643 |
italcorr 0.5u#; |
| 644 |
currentpicture := tmp_picture+(tmp_picture shifted (hround 6.5u, 0)); |
| 645 |
endchar; |
| 646 |
|
| 647 |
beginchar(bintegral_triple, |
| 648 |
18u#+2appr#, 0, 100/54dh#); |
| 649 |
"Textstyle triple integral sign"; |
| 650 |
italcorr 0.5u#; |
| 651 |
currentpicture := tmp_picture+(tmp_picture shifted (hround 6.5u, 0)) |
| 652 |
+(tmp_picture shifted (2hround 6.5u, 0)); |
| 653 |
endchar; |
| 654 |
|
| 655 |
beginchar(bintegral_contour, 5u#+2appr#, 0, 100/54dh#); |
| 656 |
"Textstyle contour integral sign"; |
| 657 |
italcorr 0.5u#; |
| 658 |
currentpicture := tmp_picture; |
| 659 |
pickup rule.nib0; |
| 660 |
rt x1 = w-appr+hround 1.5u+eps; |
| 661 |
lft x3 = appr-hround 0.5u-eps; x2=x4=0.5[x1,x3]; |
| 662 |
top y2 = vround(0.5[-d, h]+3.5u)+eps; |
| 663 |
0.5[y2, y4] = 0.5[-d, h] = y1 = y3; |
| 664 |
draw z1 up_to_left z2 left_to_down z3 |
| 665 |
down_to_right z4 right_to_up z1; |
| 666 |
labels(1,2,3,4); |
| 667 |
endchar; |
| 668 |
|
| 669 |
arrow_head_fitting:= true; |
| 670 |
arrow_width := 2ceiling 0.70spread1+rth; |
| 671 |
arrow_height# := 4u#; |
| 672 |
arrow_height := round 4u; |
| 673 |
arrow_breadth := rth; |
| 674 |
arrow_stress := 0.65; |
| 675 |
arrow_tense1 := 0.75; |
| 676 |
arrow_tense2 := 0.875; |
| 677 |
|
| 678 |
beginchar(bintegral_contour_pos, 5u#+2appr#, 0, 100/54dh#); |
| 679 |
"Textstyle positive contour integral sign"; |
| 680 |
italcorr 0.5u#; |
| 681 |
currentpicture := tmp_picture; |
| 682 |
pickup rule.nib0; |
| 683 |
rt x1 = w-appr+hround 1.5u+eps; |
| 684 |
lft x3 = appr-hround 0.5u-eps; x2=x4=0.5[x1,x3]; |
| 685 |
top y2 = vround(0.5[-d, h]+3.5u)+eps; |
| 686 |
0.5[y2, y4] = 0.5[-d, h] = y1 = y3; |
| 687 |
draw z1 up_to_left z2 left_to_down z3 |
| 688 |
down_to_right z4 right_to_up z1; |
| 689 |
pickup tiny.nib; |
| 690 |
arrow_head5(subpath (0,3) of (z4 right_to_up z1 up_to_left z2), both); |
| 691 |
labels(1, 2, 3, 4, 5, 5l, 5r); |
| 692 |
endchar; |
| 693 |
|
| 694 |
beginchar(bintegral_contour_neg, 5u#+2appr#, 0, 100/54dh#); |
| 695 |
"Textstyle negative contour integral sign"; |
| 696 |
italcorr 0.5u#; |
| 697 |
currentpicture := tmp_picture; |
| 698 |
pickup rule.nib0; |
| 699 |
rt x1 = w-appr+hround 1.5u+eps; |
| 700 |
lft x3 = appr-hround 0.5u-eps; x2=x4=0.5[x1,x3]; |
| 701 |
top y2 = vround(0.5[-d, h]+3.5u)+eps; |
| 702 |
0.5[y2, y4] = 0.5[-d, h] = y1 = y3; |
| 703 |
draw z1 up_to_left z2 left_to_down z3 |
| 704 |
down_to_right z4 right_to_up z1; |
| 705 |
pickup tiny.nib; |
| 706 |
arrow_head5(subpath (0,3) of (z2 right_to_down z1 down_to_left z4), both); |
| 707 |
labels(1, 2, 3, 4, 5, 5l, 5r); |
| 708 |
endchar; |
| 709 |
|
| 710 |
beginchar(bintegral_square, 5u#+2appr#, 0, 100/54dh#); |
| 711 |
"Textstyle square integral sign"; |
| 712 |
italcorr 0.5u#; |
| 713 |
currentpicture := tmp_picture; |
| 714 |
pickup tiny.nib; |
| 715 |
top y1r = top y2r = vround(0.5[-d, h]+3.5u); |
| 716 |
rt x2r = rt x3r = w-appr+hround 1.5u; |
| 717 |
0.5[y1r, y3r] = 0.5[y2r, y4r] = 0.5[-d, h]; |
| 718 |
lft x1r=lft x4r=appr-hround 0.5u; |
| 719 |
rt x1l-lft x1r = rt x2r-lft x2l |
| 720 |
= rt x3r-lft x3l = rt x4l-lft x4r = rth0; |
| 721 |
top y1r-bot y1l = top y2r-bot y2l |
| 722 |
= top y3l-bot y3r = top y4l-bot y4r = rth0; |
| 723 |
filldraw stroke z1e--z2e--z3e--z4e--z1e; |
| 724 |
penlabels(1, 2, 3, 4); |
| 725 |
endchar; |
| 726 |
|
| 727 |
beginchar(bintegral_square_pos, 5u#+2appr#, 0, 100/54dh#); |
| 728 |
"Textstyle positive square integral sign"; |
| 729 |
italcorr 0.5u#; |
| 730 |
currentpicture := tmp_picture; |
| 731 |
pickup tiny.nib; |
| 732 |
top y1r = top y2r = vround(0.5[-d, h]+3.5u); |
| 733 |
rt x2r = rt x3r = w-appr+hround 1.5u; |
| 734 |
0.5[y1r, y3r] = 0.5[y2r, y4r] = 0.5[-d, h]; |
| 735 |
lft x1r=lft x4r=appr-hround 0.5u; |
| 736 |
rt x1l-lft x1r = rt x2r-lft x2l |
| 737 |
= rt x3r-lft x3l = rt x4l-lft x4r = rth0; |
| 738 |
top y1r-bot y1l = top y2r-bot y2l |
| 739 |
= top y3l-bot y3r = top y4l-bot y4r = rth0; |
| 740 |
filldraw stroke z1e--z2e--z3e--z4e--z1e; |
| 741 |
pickup tiny.nib; z2=0.5[z2l,z2r]; z3=0.5[z3l,z3r]; |
| 742 |
arrow_head5(z3..0.75[z3,z2], both); |
| 743 |
penlabels(1, 2, 3, 4, 5); |
| 744 |
endchar; |
| 745 |
|
| 746 |
beginchar(bintegral_square_neg, 5u#+2appr#, 0, 100/54dh#); |
| 747 |
"Textstyle negative square integral sign"; |
| 748 |
italcorr 0.5u#; |
| 749 |
currentpicture := tmp_picture; |
| 750 |
pickup tiny.nib; |
| 751 |
top y1r = top y2r = vround(0.5[-d, h]+3.5u); |
| 752 |
rt x2r = rt x3r = w-appr+hround 1.5u; |
| 753 |
0.5[y1r, y3r] = 0.5[y2r, y4r] = 0.5[-d, h]; |
| 754 |
lft x1r=lft x4r=appr-hround 0.5u; |
| 755 |
rt x1l-lft x1r = rt x2r-lft x2l |
| 756 |
= rt x3r-lft x3l = rt x4l-lft x4r = rth0; |
| 757 |
top y1r-bot y1l = top y2r-bot y2l |
| 758 |
= top y3l-bot y3r = top y4l-bot y4r = rth0; |
| 759 |
filldraw stroke z1e--z2e--z3e--z4e--z1e; |
| 760 |
pickup tiny.nib; z2=0.5[z2l,z2r]; z3=0.5[z3l,z3r]; |
| 761 |
arrow_head5(z2..0.75[z2,z3], both); |
| 762 |
penlabels(1, 2, 3, 4, 5); |
| 763 |
endchar; |
| 764 |
|
| 765 |
beginchar(bintegral_dblcont, 11u#+2appr#, 0, 100/54dh#); |
| 766 |
"Textstyle double contour integral sign"; |
| 767 |
italcorr 0.5u#; |
| 768 |
currentpicture := tmp_picture+(tmp_picture shifted (hround 6u, 0)); |
| 769 |
pickup rule.nib0; |
| 770 |
rt x1 = w-appr+hround 1.5u+eps; lft x3 = appr-hround 0.5u-eps; |
| 771 |
x2 = x4 = 0.5[x1,x3]; |
| 772 |
top y2 = vround(0.5[-d, h]+3.5u)+eps; |
| 773 |
0.5[y2, y4] = 0.5[-d, h] = y1 = y3; |
| 774 |
draw z1 up_to_left z2 left_to_down z3 |
| 775 |
down_to_right z4 right_to_up z1; |
| 776 |
labels(1, 2, 3, 4); |
| 777 |
endchar; |
| 778 |
|
| 779 |
beginchar(Bintegral_sign, 12u#+2appr#,0,200/54dh#); |
| 780 |
% save disp_stem; disp_stem=hround 2.2u;%46/36pt; |
| 781 |
z1 = (hround(0.5w-0.5disp_stem), 0.52[-d, h]); |
| 782 |
z2 = (w-appr-2.6u, 1[-d, h]); |
| 783 |
z3 = (w-appr, 0.63[y2, y4]); |
| 784 |
z4 = (w-appr-0.9u, vround(h-0.24dh)); |
| 785 |
z5 = (w-appr-2.8u, 1[-d, h]-disp_hair); |
| 786 |
z6 = (x1+disp_stem, 0.75[-d, h]); |
| 787 |
path lastpath; |
| 788 |
lastpath := |
| 789 |
z1..controls(x1, 0.6[y1, y2]) and (0.85[x2, x1], y2).. |
| 790 |
z2..controls(0.79[x2, x3], y2) and (x3, 0.44[y3, y2]).. |
| 791 |
z3..controls(x3, 0.6[y3, y4]) and (0.6[x4, x3], y4).. |
| 792 |
z4..controls(0.65[x4, x5], y4) and (0.6[x5, x4], y5).. |
| 793 |
z5..controls(0.55[x5, x6], y5) and (x6, 0.8[y6, y5]).. |
| 794 |
z6; |
| 795 |
lastpath := lastpath--lastpath shifted (-x1,0) |
| 796 |
rotated 180 shifted (x6, -d)--cycle; |
| 797 |
fill lastpath; |
| 798 |
labels(1,2,3,4,5,6); |
| 799 |
charwd:=charwd-5u#; italcorr 4.5u#; w:= round(charwd*hppp); |
| 800 |
tmp_picture := currentpicture; |
| 801 |
integral_x:=x1; |
| 802 |
endchar; |
| 803 |
|
| 804 |
beginchar(Bintegral_double, 16.5u#+2appr#, 0,200/54dh#); |
| 805 |
"Displaystyle double integral sign"; |
| 806 |
italcorr 4.5u#; |
| 807 |
currentpicture := tmp_picture+(tmp_picture shifted (hround 9.5u, 0)); |
| 808 |
endchar; |
| 809 |
|
| 810 |
beginchar(Bintegral_triple, 26u#+2appr#, 0,200/54dh#); |
| 811 |
"Displaystyle triple integral sign"; |
| 812 |
italcorr 4.5u#; |
| 813 |
currentpicture := tmp_picture+(tmp_picture shifted (hround 9.5u, 0)) |
| 814 |
+(tmp_picture shifted (2hround 9.5u, 0)); |
| 815 |
endchar; |
| 816 |
|
| 817 |
beginchar(Bintegral_contour, 7u#+2appr#, 0,200/54dh#); |
| 818 |
"Displaystyle contour integral sign"; |
| 819 |
italcorr 4.5u#; |
| 820 |
currentpicture := tmp_picture; |
| 821 |
pickup rule.nib0; |
| 822 |
lft x3 = appr+hround 0.75u-eps; |
| 823 |
x1 = 2integral_x-x3+disp_stem; |
| 824 |
x2=x4=0.5[x1,x3]; |
| 825 |
top y2 = vround(0.5[-d, h]+5.25u)+eps; |
| 826 |
0.5[y2, y4] = 0.5[-d, h] = y1 = y3; |
| 827 |
draw z1 up_to_left z2 left_to_down z3 |
| 828 |
down_to_right z4 right_to_up z1; |
| 829 |
labels(1,2,3,4); |
| 830 |
endchar; |
| 831 |
|
| 832 |
beginchar(Bintegral_dblcont, 16u#+2appr#, 0,200/54dh#); |
| 833 |
"Displaystyle double contour integral sign"; |
| 834 |
italcorr 4.5u#; |
| 835 |
currentpicture := tmp_picture+(tmp_picture shifted (hround 9u, 0)); |
| 836 |
pickup rule.nib0; |
| 837 |
lft x3 = appr-eps; |
| 838 |
x1 = 2integral_x-x3+disp_stem+hround 9u; |
| 839 |
x2=x4=0.5[x1,x3]; |
| 840 |
top y2 = vround(0.5[-d, h]+6u)+eps; |
| 841 |
0.5[y2, y4] = 0.5[-d, h] = y1 = y3; |
| 842 |
draw z1 up_to_left z2 left_to_down z3 |
| 843 |
down_to_right z4 right_to_up z1; |
| 844 |
labels(1,2,3,4); |
| 845 |
endchar; |
| 846 |
|