Debian Codegraph @

texmf-dist/fonts/source/public/lxfonts/lmathex.mf

raw
1
2 % The Computer Modern Math-Extension family (by D. E. Knuth, 1979--1985)
3 % Modification of original mathex.mf
4 % by Claudio Beccari (1999)
5
6 font_coding_scheme:="TeX math extension";
7 mode_setup; font_setup;
8
9 %correction to heavy_rule_thickness, otherwise the curly braces turn out too thick
10 %heavy_rule_thickness:=ceiling(3rule_thickness#*hppp); %cmbase definition
11 heavy_rule_thickness:=rule_thickness+dw;
12 heavy_rule_thickness#:=heavy_rule_thickness/hppp;
13
14
15 % Input modified files for large delimiters, operators and accents
16
17 input lbigdel; % large delimiters
18 input lbigop; % large operators
19 input lbigacc; % large accents
20
21
22 % Corrections for characters 74 to 79 that otherwise would turn out oval
23
24 cmchar "\textstyle circle-dot operator";
25 beginchar(oct"112",20u#,0,18u#);
26 adjust_fit(0,0); pickup pencircle scaled stem;
27 lft x6=hround u; x2=w-x6; top y8=0; bot y4=-d;
28 circle_points; draw_circle; % circle
29 %fill fullcircle scaled(bold+4dw+eps) shifted(.5[z4,z8]); % dot
30 fill fullcircle scaled(2stem) shifted(.5[z4,z8]); % dot
31 labels(1,2,3,4,5,6,7,8); endchar;
32
33 cmchar "\displaystyle circle-dot operator";
34 beginchar(oct"113",27.2u#,0,25.2u#); padded 1/6dh#;
35 adjust_fit(0,0); pickup pencircle scaled curve;
36 lft x6=hround u; x2=w-x6; top y8=0; bot y4=-d;
37 circle_points; draw_circle; % circle
38 %fill fullcircle scaled(bold+6dw+eps) shifted(.5[z4,z8]); % dot
39 fill fullcircle scaled(2curve) shifted(.5[z4,z8]); % dot
40 labels(1,2,3,4,5,6,7,8); endchar;
41
42 cmchar "\textstyle circle-plus operator";
43 beginchar(oct"114",20u#,0,18u#);
44 adjust_fit(0,0); pickup pencircle scaled stem;
45 lft x6=hround u; x2=w-x6; top y8=0; bot y4=-d;
46 circle_points; draw_circle; % circle
47 draw z2--z6; draw z4--z8; % plus
48 labels(1,2,3,4,5,6,7,8); endchar;
49
50 cmchar "\displaystyle circle-plus operator";
51 beginchar(oct"115",27.2u#,0,25.2u#); padded 1/6dh#;
52 adjust_fit(0,0); pickup pencircle scaled curve;
53 lft x6=hround u; x2=w-x6; top y8=0; bot y4=-d;
54 circle_points; draw_circle; % circle
55 draw z2--z6; draw z4--z8; % plus
56 labels(1,2,3,4,5,6,7,8); endchar;
57
58 cmchar "\textstyle circle-times operator";
59 beginchar(oct"116",20u#,0,18u#);
60 adjust_fit(0,0); pickup pencircle scaled stem;
61 lft x6=hround u; x2=w-x6; top y8=0; bot y4=-d;
62 circle_points; draw_circle; % circle
63 draw z1--z5; draw z3--z7; % times
64 labels(1,2,3,4,5,6,7,8); endchar;
65
66 cmchar "\displaystyle circle-times operator";
67 beginchar(oct"117",27.2u#,0,25.2u#); padded 1/6dh#;
68 adjust_fit(0,0); pickup pencircle scaled curve;
69 lft x6=hround u; x2=w-x6; top y8=0; bot y4=-d;
70 circle_points; draw_circle; % circle
71 draw z1--z5; draw z3--z7; % times
72 labels(1,2,3,4,5,6,7,8); endchar;
73
74 % Corrections for \prod sign that without serifs turned out
75 % as an inverted open box
76
77 cmchar "\textstyle product sign";
78 beginchar(oct"121",17u#,0,10/6dh#);
79 adjust_fit(0,0); pickup crisp.nib;
80 numeric heavy_stem,light_stem;
81 heavy_stem=hround(bold+dw); light_stem=rule_thickness;
82 pos1(heavy_stem,0);pos2(heavy_stem,0); pos1'(heavy_stem,0);pos2'(heavy_stem,0);
83 pos11(light_stem,90); pos12(light_stem,90); pos22(light_stem,90);
84 lft x11=hround u; x1l-x11=x2l-x12=x22-x2r=hround 2u;
85 x1=x1'=x2=x2';
86 top y1=0; bot y2=-d; y11r=y1; y12l=y22l=y2;
87 y11l-y1'=y2'-y12r=1.2bracket;
88 filldraw z1r--z11r--serif_arc(11l,1'l)--reverse serif_arc(12r,2'l)
89 --z12l--z22l--serif_arc(22r,2'r)--cycle; % left stem and serifs
90 pos3(heavy_stem,0);pos4(heavy_stem,0); pos3'(heavy_stem,0);pos4'(heavy_stem,0);
91 pos13(light_stem,90); pos14(light_stem,90); pos24(light_stem,90);
92 x3=x3'=x4=x4'=w-x1; x13=x14=w-x11; x24=w-x22;
93 y3=y13r=y1; y3'=y1'; y4'=y2'; y4=y14l=y24l=y2;
94 filldraw z3l--z13r--serif_arc(13l,3'r)--reverse serif_arc(14r,4'r)
95 --z14l--z24l--serif_arc(24r,4'l)--cycle; % right stem and serifs
96 filldraw stroke z11e--z13e; % bar
97 penlabels(1,1',2,2',3,3',4,4',11,12,13,14,22,24); endchar;
98
99 cmchar "\displaystyle product sign";
100 beginchar(oct"131",23u#,0,16/6dh#); padded 1/6dh#;
101 adjust_fit(0,0); pickup crisp.nib;
102 numeric heavy_stem,light_stem;
103 heavy_stem=hround(bold+5dw); light_stem=Vround(rule_thickness+dw);
104 pos1(heavy_stem,0);pos2(heavy_stem,0); pos1'(heavy_stem,0);pos2'(heavy_stem,0);
105 pos11(light_stem,90); pos12(light_stem,90); pos22(light_stem,90);
106 lft x11=hround u; x1l-x11=x2l-x12=x22-x2r=hround 2.5u;
107 x1=x1'=x2=x2';
108 top y1=0; bot y2=-d; y11r=y1; y12l=y22l=y2;
109 y11l-y1'=y2'-y12r=1.8bracket;
110 filldraw z1r--z11r--serif_arc(11l,1'l)--reverse serif_arc(12r,2'l)
111 --z12l--z22l--serif_arc(22r,2'r)--cycle; % left stem and serifs
112 pos3(heavy_stem,0);pos4(heavy_stem,0); pos3'(heavy_stem,0);pos4'(heavy_stem,0);
113 pos13(light_stem,90); pos14(light_stem,90); pos24(light_stem,90);
114 x3=x3'=x4=x4'=w-x1; x13=x14=w-x11; x24=w-x22;
115 y3=y13r=y1; y3'=y1'; y4'=y2'; y4=y14l=y24l=y2;
116 filldraw z3l--z13r--serif_arc(13l,3'r)--reverse serif_arc(14r,4'r)
117 --z14l--z24l--serif_arc(24r,4'l)--cycle; % right stem and serifs
118 filldraw stroke z11e--z13e; % bar
119 penlabels(1,1',2,2',3,3',4,4',11,12,13,14,22,24); endchar;
120
121 % About the same correction for the summation signs
122
123 cmchar "\textstyle summation sign";
124 beginchar(oct"120",17u#,0,10/6dh#);
125 adjust_fit(0,0); pickup tiny.nib;
126 numeric top_arm_thickness, bot_arm_thickness;
127 top_arm_thickness=Vround rule_thickness;
128 bot_arm_thickness=Vround .9(.5[rule_thickness,curve]);
129 lft x1l=hround u; x1l=x2l=x4l; x3l-x1l=4/11(w-2u);
130 top y1=0; bot y2=-top_arm_thickness-eps; bot y4=-d; y3=-.5d;
131 numeric alpha[]; alpha1=((x3l-x1l)++(y2-y3))/(y2-y3);
132 penpos1(alpha1*(curve-tiny),0); penpos2(alpha1*(curve-tiny),0);
133 penpos3(alpha1*(curve-tiny),0);
134 alpha2=diag_ratio(1,rule_thickness-tiny,y3-y4,x3r-x4l);
135 penpos4(alpha2*(rule_thickness-tiny),0);
136 z0=whatever[z2l,z3l]=z4l+whatever*(z3r-z4r);
137 filldraw z1l--z2l--z0--z4l--z4r--z3r--z2r--z1r--cycle; % diagonals
138 pickup crisp.nib; pos5(top_arm_thickness,90); pos6(hair,0);
139 top y5r=0; x5=x1; rt x6r=hround(w-u); y6=good.y(y5l-2.5u)-eps;
140 arm(5,6,a,.45,17/11u); % upper arm and beak
141 pos7(bot_arm_thickness,-90); pos8(hair,0);
142 bot y7r=-d; z7l=whatever[z4,z3]; x7r:=x4; x8=x6; y8=good.y(y7l+2.5u)+eps;
143 arm(7,8,b,.45,17/11u); % lower arm and beak
144 penlabels(0,1,2,3,4,5,6,7,8); endchar;
145
146 cmchar "\displaystyle summation sign";
147 beginchar(oct"130",21u#,0,18/6dh#); padded 1/6dh#;
148 adjust_fit(0,0); pickup tiny.nib;
149 numeric top_arm_thickness, bot_arm_thickness, thick_stem, thin_stem;
150 thick_stem=bold+4dw; thin_stem=rule_thickness+dw;
151 top_arm_thickness=Vround .9thin_stem;
152 bot_arm_thickness=Vround .9(.5[thin_stem,thick_stem]);
153 lft x1l=hround u; x1l=x2l=x4l; x3l-x1l=4/11(w-2u);
154 top y1=0; bot y2=-top_arm_thickness-eps; bot y4=-d; y3=-.5d;
155 numeric alpha[]; alpha1=((x3l-x1l)++(y2-y3))/(y2-y3);
156 penpos1(alpha1*(thick_stem-tiny),0); penpos2(alpha1*(thick_stem-tiny),0);
157 penpos3(alpha1*(thick_stem-tiny),0);
158 alpha2=diag_ratio(1,thin_stem-tiny,y3-y4,x3r-x4l);
159 penpos4(alpha2*(thin_stem-tiny),0);
160 z0=whatever[z2l,z3l]=z4l+whatever*(z3r-z4r);
161 filldraw z1l--z2l--z0--z4l--z4r--z3r--z2r--z1r--cycle; % diagonals
162 pickup crisp.nib; pos5(top_arm_thickness,90); pos6(hair,0);
163 top y5r=0; x5=x1; rt x6r=hround(w-u); y6=good.y(y5l-3u)-eps;
164 arm(5,6,a,.45,24/11u); % upper arm and beak
165 pos7(bot_arm_thickness,-90); pos8(hair,0);
166 bot y7r=-d; z7l=whatever[z4,z3]; x7r:=x4; x8=x6; y8=good.y(y7l+3u)+eps;
167 arm(7,8,b,.45,24/11u); % lower arm and beak
168 penlabels(0,1,2,3,4,5,6,7,8); endchar;
169
170
171 cmchar "\textstyle integral sign";
172 beginchar(oct"122",12u#,0,100/52dh#);
173 italcorr 3.5u#; % \TeX\ kerning between upper limit and lower limit
174 adjust_fit(0,-ic#); pickup fine.nib;
175 pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(stem,180);
176 pos5(curve,180); pos5'(curve,0); z5'=z5; pos6(stem,0);
177 pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
178 rt x1r=hround(w-u); x9=w-x1; x7=w-x3=3u;
179 x5=.5[x4,x6]; x4-x6=1.2u; lft x5r=hround(.5w-.5curve);
180 top y3r=0; bot y7r=-d; y9-.5curve=vround(top y7l+.25curve);
181 y3-y1=y9-y7; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=.6(y3-y7);
182 bulb(3,2,1); bulb(7,8,9); % bulbs
183 filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
184 ..tension atleast 1 and atleast .8..{z5-z4}z5e; % upper stem
185 filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
186 ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e; % lower stem
187 penlabels(1,2,3,4,5,6,7,8,9); endchar;
188
189 cmchar "\displaystyle integral sign";
190 beginchar(oct"132",18u#,0,220/48dh#);
191 italcorr 8u#; % \TeX\ kerning between upper limit and lower limit
192 adjust_fit(0,-ic#); pickup fine.nib;
193 numeric bulb_size, max_size;
194 bulb_size=hround(bold+dw); max_size=hround(bold+2dw);
195 pos1(bulb_size,0); pos2(hair,0); pos3(vair,90); pos4(bold,180);
196 pos5(max_size,180); pos5'(max_size,0); z5'=z5; pos6(bold,0);
197 pos7(vair,-90); pos8(hair,-180); pos9(bulb_size,-180);
198 rt x1r=hround(w-u); x9=w-x1; x7=w-x3=3u;
199 x5=.5[x4,x6]; x4-x6=4.8u; lft x5r=hround(.5w-.5max_size);
200 top y3r=0; bot y7r=-d;
201 y9-.5bulb_size=vround(top y7l+.25bulb_size); y3-y1=y9-y7;
202 y5=.5[y3,y7]=.5[y4,y6]; y4-y6=.6(y3-y7);
203 bulb(3,2,1); bulb(7,8,9); % bulbs
204 filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
205 ..tension atleast 1 and atleast .8..{z5-z4}z5e; % upper stem
206 filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
207 ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e; % lower stem
208 penlabels(1,2,3,4,5,6,7,8,9); endchar;
209
210 cmchar "\textstyle contour integral sign";
211 beginchar(oct"110",12u#,0,100/52dh#);
212 italcorr 3.5u#; % \TeX\ kerning between upper limit and lower limit
213 adjust_fit(0,-ic#); pickup fine.nib;
214 pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(stem,180);
215 pos5(curve,180); pos5'(curve,0); z5'=z5; pos6(stem,0);
216 pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
217 rt x1r=hround(w-u); x9=w-x1; x7=w-x3=3u;
218 x5=.5[x4,x6]; x4-x6=1.2u; lft x5r=hround(.5w-.5curve);
219 top y3r=0; bot y7r=-d; y9-.5curve=vround(top y7l+.25curve);
220 y3-y1=y9-y7; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=.6(y3-y7);
221 bulb(3,2,1); bulb(7,8,9); % bulbs
222 filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
223 ..tension atleast 1 and atleast .8..{z5-z4}z5e; % upper stem
224 filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
225 ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e; % lower stem
226 pickup rule.nib; autorounded;
227 draw fullcircle scaled .5w shifted z5; % contour
228 penlabels(1,2,3,4,5,6,7,8,9); endchar;
229
230 cmchar "\displaystyle contour integral sign";
231 beginchar(oct"111",18u#,0,220/48dh#);
232 italcorr 8u#; % \TeX\ kerning between upper limit and lower limit
233 adjust_fit(0,-ic#); pickup fine.nib;
234 numeric bulb_size, max_size;
235 bulb_size=hround(bold+dw); max_size=hround(bold+2dw);
236 pos1(bulb_size,0); pos2(hair,0); pos3(vair,90); pos4(bold,180);
237 pos5(max_size,180); pos5'(max_size,0); z5'=z5; pos6(bold,0);
238 pos7(vair,-90); pos8(hair,-180); pos9(bulb_size,-180);
239 rt x1r=hround(w-u); x9=w-x1; x7=w-x3=3u;
240 x5=.5[x4,x6]; x4-x6=4.8u; lft x5r=hround(.5w-.5max_size);
241 top y3r=0; bot y7r=-d;
242 y9-.5bulb_size=vround(top y7l+.25bulb_size); y3-y1=y9-y7;
243 y5=.5[y3,y7]=.5[y4,y6]; y4-y6=.6(y3-y7);
244 bulb(3,2,1); bulb(7,8,9); % bulbs
245 filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
246 ..tension atleast 1 and atleast .8..{z5-z4}z5e; % upper stem
247 filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
248 ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e; % lower stem
249 pickup rule.nib; autorounded;
250 draw fullcircle scaled .5w shifted z5; % contour
251 penlabels(1,2,3,4,5,6,7,8,9); endchar;
252
253
254
255
256
257
258 % Changed height of folllowing chars so as to be coherent with the rest
259
260
261
262 cmchar "Horizontal curly brace tip---down and left";
263 beginchar(oct"172",.75dh#,heavy_rule_thickness#,0);
264 adjust_fit(0,0); pickup fine.nib;
265 numeric min_breadth; min_breadth=vround(rule_thickness+.6dw);
266 pos1(min_breadth,90); pos1'(min_breadth,90);
267 pos2(1.2h,90);
268 bot y2l=0; bot y1l=bot y1'l=vround(y2-4.5u-.5min_breadth);
269 .5[x1,x1']=-eps; x2=w+shrink_fit+eps; x1'-x1=min_breadth-fine;
270 filldraw z1r{x2-x1,3(y2r-y1r)}...{right}z2r
271 --z2l{left}...{x1'-x2,3(y1-y2)}z1'l--z1l--cycle; % stroke
272 penlabels(1,2); endchar;
273
274 cmchar "Horizontal curly brace tip---down and right";
275 beginchar(oct"173",.75dh#,heavy_rule_thickness#,0);
276 adjust_fit(0,0); pickup fine.nib;
277 numeric min_breadth; min_breadth=vround(rule_thickness+.6dw);
278 pos1(min_breadth,90); pos1'(min_breadth,90);
279 pos2(1.2h,90);
280 bot y2l=0; bot y1l=bot y1'l=vround(y2-4.5u-.5min_breadth);
281 .5[x1,x1']=w+shrink_fit+eps; x2=-eps; x1-x1'=min_breadth-fine;
282 filldraw z1r{x2-x1,3(y2r-y1r)}...{left}z2r
283 --z2l{right}...{x1'-x2,3(y1-y2)}z1'l--z1l--cycle; % stroke
284 penlabels(1,2); endchar;
285
286 cmchar "Horizontal curly brace tip---up and left";
287 beginchar(oct"174",.75dh#,heavy_rule_thickness#,0);
288 adjust_fit(0,0); pickup fine.nib;
289 numeric min_breadth; min_breadth=vround(rule_thickness+.6dw);
290 pos1(min_breadth,90); pos1'(min_breadth,90);
291 pos2(1.2h,90);
292 bot y2l=0; top y1r=top y1'r=vround(y2+4.5u+.5min_breadth);
293 .5[x1,x1']=-eps; x2=w+shrink_fit+eps; x1'-x1=min_breadth-fine;
294 filldraw z1l{x2-x1,3(y2l-y1l)}...{right}z2l
295 --z2r{left}...{x1'-x2,3(y1-y2)}z1'r--z1r--cycle; % stroke
296 penlabels(1,2); endchar;
297
298 cmchar "Horizontal curly brace tip---up and right";
299 beginchar(oct"175",.75dh#,heavy_rule_thickness#,0);
300 adjust_fit(0,0); pickup fine.nib;
301 numeric min_breadth; min_breadth=vround(rule_thickness+.6dw);
302 pos1(min_breadth,90); pos1'(min_breadth,90);
303 pos2(1.2h,90);
304 bot y2l=0; top y1r=top y1'r=vround(y2+4.5u+.5min_breadth);
305 .5[x1,x1']=w+shrink_fit+eps; x2=-eps; x1-x1'=min_breadth-fine;
306 filldraw z1l{x2-x1,3(y2l-y1l)}...{left}z2l
307 --z2r{right}...{x1'-x2,3(y1-y2)}z1'r--z1r--cycle; % stroke
308 penlabels(1,2); endchar;
309
310
311
312 font_x_height x_height#;
313 font_quad 18u#+4letter_fit#;
314 % (The calling file should give the other math extension font parameters.)
315 bye.