⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manfnt.mf

📁 Concrete_Mathematics_2nd_Ed_TeX_Source_Code
💻 MF
📖 第 1 页 / 共 2 页
字号:
thin#:=9/36pt#;thick#:=25/36pt#;fixwidth:=0;slant:=0;rulethickness#:=.4pt#;baselinedistance#:=11pt#;heavyline#:=50/36pt#;font_setup;define_whole_pixels(baselinedistance);define_blacker_pixels(heavyline);beginchar(127,25u#,hheight#+border#,0); "Dangerous bend sign";pickup pencircle scaled rulethickness;top y1=25/27h; lft x4=0;x1+x1=x1a+x1b=x4b+x2a=x4+x2=x4a+x2b=x3b+x3a=x3+x3=w;x4a=x4b=x4+u; x3b=x1a=x1-2u;y4+y4=y4a+y4b=y3b+y1a=y3+y1=y3a+y1b=y2b+y2a=y2+y2=0;y1a=y1b=y1-2/27h; y4b=y2a=y4+4/27h;draw z1a..z1..z1b---z2a..z2..z2b---  z3a..z3..z3b---z4a..z4..z4b---cycle;  % signboardx10=x11=x12=x13=good.x(.5w-u); x14=x15=x16=x17=w-x10;y10=y14=28/27h+epsilon; bot y13=-baselinedistance;z11=(z10..z13) intersectionpoint (z1a{z1a-z4b}..z1{right});y15=y11; y16=y12=-y11; y17=y20=y21=y13;draw z11--z10--z14--z15; draw z12--z13; draw z16--z17;  % signpostx20=w-x21; x21-x20=16u; draw z20--z21;  % ground levelx38=w-x31; x38-x31=8u; x32=x34=x38; x31=x35=x37;y31=-y38=12/27h; y32=-y37=9/27h; y34=-y35=3/27h;pickup pencircle scaled heavyline;draw z32{z32-z31}..z34---z35..z37{z38-z37};  % the dangerous bendpickup penrazor xscaled heavyline rotated (angle(z32-z31)+90);draw z31--z32; draw z37--z38;    % upper and lower barslabels(1,1a,1b,2,2a,2b,3,3a,3b,4,4a,4b,10,11,12,13,14,15,16,17,20,21,  31,32,33,34,35,36,37,38);picture dbend; dbend=currentpicture;endchar;beginchar(126,25u#,hheight#+border#,0); "Lefthanded ditto";currentpicture:=dbend reflectedabout((.5w,0),(.5w,h));endchar;beginchar(0,25u#,hheight#+border#,0); "Reverse video ditto";fill (0,-11pt)--(w,-11pt)--(w,h)--(0,h)--cycle;addto currentpicture also -dbend;endchar;beginchar(oct"140",3.75pt#,7pt#,4/3pt#); "special 1/7 for a quotation";currenttransform:=currenttransform slanted(2/7/aspect_ratio);y3=y4=.5[h,-d]=.5[y2,y5]; y5=y6;x1=x2=x7=.5w; x5+x6=x3+x4=w; x5=x3+1/6pt;pickup pencircle xscaled .5pt yscaled .35pt;bot y2=top y3+pt; top y1=h; bot y7=-d; lft x3=0; % y2 moved up 1/3pt (Feb 5)draw z1..z2; draw z3..z4;draw z5--z6..{down}z7;labels(1,2,3,4,5,6,7);endchar;currenttransform:=currenttransform slanted(-2/7/aspect_ratio);% Circumscribed circlespickup pencircle scaled(.4pt+blacker); rpen:=savepen;def begincircle(expr code,units,depth,asp,superness)=beginchar(code,units*20/36pt#,0,0); pickup rpen;aa:=.5(w++depth*pt/asp);x2=x4=.5[x1,x3]=.5w; y1=y3=.5[y2,y4]=-.5round(depth*pt);x1=good.x(x2+aa); y2=good.y(y1+asp*aa);draw superellipse(z1,z2,z3,z4,superness); labels(1,2,3,4) enddef;"Ellipse for floating-point mod operator"; % also for pseudo coin topbegincircle(oct"130",29,5,.5,.75786); endchar;"Edge and bottom of pseudo coin";begincircle(oct"133",29,5,.5,.75786); charht:=2pt#;erase fill rt z1--(rt x1,top y2)--(lft x3,top y2)--lft z3--cycle;x0=x1; x5=x3; y0=y5=y1+2pt; draw z0--z1; draw z3--z5; labels(0,5); endchar;"Circle to enclose two digits";begincircle(oct"131",19,7.5,1,.75786); endchar;"Circle to enclose an exponent of 2";begincircle(oct"132",9,6,1,1/sqrt2); endchar;% Now we do the \qc font from TeXbook Appendix Dpickup pencircle scaled ceiling pt; ptpen:=savepen;beginchar("a",10pt#,5.5pt#,4.5pt#); pickup ptpen; % W to Sbot y1=lft x2=0; x2=.5[x1,x1+w]; y1=.5[y2,y2+h+d];draw z1{right}..{down}z2; labels(1,2); endchar;beginchar("b",10pt#,5.5pt#,4.5pt#); pickup ptpen; % W to Nbot y1=lft x2=0; x2=.5[x1,x1+w]; y1=.5[y2,y2-h-d];draw z1{right}..{up}z2; labels(1,2); endchar;beginchar("c",10pt#,5.5pt#,4.5pt#); pickup ptpen; % E to Nbot y1=lft x2=0; x2=.5[x1,x1-w]; y1=.5[y2,y2-h-d];draw z1{left}..{up}z2; labels(1,2); endchar;beginchar("d",10pt#,5.5pt#,4.5pt#); pickup ptpen; % E to Sbot y1=lft x2=0; x2=.5[x1,x1-w]; y1=.5[y2,y2+h+d];draw z1{left}..{down}z2; labels(1,2); endchar;fontdimen 8: pt#; % rule thickness in \qcmessage "METAFONT logo";def arc(suffix i,j) =       (z.i{0,y.j-y.i}..  (beta[x.i,x.j],beta[y.j,y.i]){z.j-z.i}..  z.j{x.j-x.i,0}) enddef;def double_arc(suffix i,j,k) =  arc(i,j) & reverse arc(k,j) enddef;alpha:=.45;  % controls bar location and similar thingsbeta:=.2;  % controls squareness of bowlsdef setparameters(text parameter_equations) =  string code.M,code.E,code.T,code.A,code.F,code.O,code.N;  numeric h#, xx#, yy#, o#, s#, u#, px#, py#;  numeric leftstemloc, barheight;  parameter_equations;  yy#=(h#/13.5u#)*xx#; define_whole_pixels(xx,yy);  define_pixels(s,u);  define_corrected_pixels(o);  py#=.9px#; define_blacker_pixels(px,py);  pickup pencircle xscaled px yscaled py;  logo_pen:=savepen;  leftstemloc:=good.x((2.5u#+s#)*pt);  barheight:=good.y(alpha*h#*pt);  ligtable code.T: code.A kern -.5u#;  ligtable code.F: code.O kern -u#;enddef;def beginlogochar(suffix c)(expr n) = % code c; width is n units plus sidebars  beginchar(code.c,n*u#+2s#,h#,0); pickup logo_pen enddef;def do_it =beginlogochar(M,18);x1=x2=leftstemloc; x4=x5=w-x1; x3=w-x3;y1=y5; y2=y4; bot.y1=-o; top y2=h+o; y3=y1+yy;draw z1--z2--z3--z4--z5;labels(1,2,3,4,5);endchar;beginlogochar(E,14);x1=x2=x3=leftstemloc; x4=x6=w-x1+o; x5=x4-xx;y1=y6; y2=y5; y3=y4; bot.y1=0; top.y3=h; y2=barheight;draw z6--z1--z3--z4; draw z2..z5;labels(1,2,3,4,5,6);endchar;beginlogochar(T,13);italcorr h#*slant+.5u#;if odd(w-px): w:=w+1; fi  % allows a symmetric stemlft x1=-epsilon; x2=w-x1; x3=x4=.5w; % I tried lft x1=s-o; not as goody1=y2=y3; top.y1=h; bot.y4=-o;draw z1..z2; draw z3..z4;labels(1,2,3,4);endchar;beginlogochar(A,15);  % changed from 16 on Oct 16!x1+x4=x2+x3=2x5=w; x1=x2=leftstemloc;y1=y4; y2=y3; bot.y1=-o; top.y5=h+o; y2=barheight;draw double_arc(2,5,3); draw z1--z2--z3--z4;labels(1,2,3,4,5);endchar;beginlogochar(F,14);x1=x2=x3=leftstemloc; x4=w-x1+o; x5=x4-xx;y2=y5; y3=y4; bot.y1=-o; top.y3=h; y2=barheight;draw z1--z3--z4; draw z2..z5;labels(1,2,3,4,5);endchar;beginlogochar(O,15);x1+x2=x3+x4=w; x1=good.x(1.5u+s); x3=x4;bot.y3=-o; top.y4=h+o; y1=y2=barheight;draw double_arc(1,4,2); draw double_arc(2,3,1);labels(1,2,3,4);endchar;beginlogochar(N,15);x1+x4=x1+x3=x2+x5=w; x1=x2=leftstemloc;y1=y4=y3-yy; bot.y1=-o; y2=y5; top.y5=h+o;draw z1--z2--z3; draw z4..z5;labels(1,2,3,4,5);endchar;enddef;  % the end of "do_it"% ten-point sizemessage "  ten point";setparameters(h#=6;  % height of characters, in ptslant:=0;  xx#=0.6;  % extra length of certain features, in pt  u#=4/9;  % unit width, in pt  s#=0;  % extra sidebar, in pt  o#=1/9;  % overshoot of curves, in pt  px#=2/3;  % horizontal thickness of pen, in pt  code.M="M"; code.E="E"; code.T="T"; code.A="A";  code.F="F"; code.O="O"; code.N="N")do_it;currenttransform:=currenttransform slanted(.25/aspect_ratio);% ten-point size, slanted: 89:;<=>: = METAFONT!message "  slanted ten point";setparameters(h#=6;  % height of characters, in ptslant:=.25;  xx#=0.6;  % extra length of certain features, in pt  u#=4/9;  % unit width, in pt  s#=0;  % extra sidebar, in pt  o#=1/9;  % overshoot of curves, in pt  px#=2/3;  % horizontal thickness of pen, in pt  code.M="8"; code.E="9"; code.T=":"; code.A=";";  code.F="<"; code.O="="; code.N=">")do_it;currenttransform:=currenttransform slanted(-.25/aspect_ratio);% nine-point size: hijklmnj = METAFONT!message "  nine point";setparameters(h#=.9*6;  % height of characters, in ptslant:=0;  xx#=.9*0.6;  % extra length of certain features, in pt  u#=.91*4/9;  % unit width, in pt  s#=.08;  % extra sidebar, in pt  o#=1/10;  % overshoot of curves, in pt  px#=.9*2/3;  % horizontal thickness of pen, in pt  code.M="h"; code.E="i"; code.T="j"; code.A="k";  code.F="l"; code.O="m"; code.N="n")do_it;font_quad  18u#+2s#;  % we take spacing from the 9-point logo fontfont_normal_space  6u#+2s#;font_normal_stretch  3u#;font_normal_shrink  2u#;% eight-point size: opqrstuq = METAFONT!message "  eight point";setparameters(h#=.8*6;  % height of characters, in ptslant:=0;  xx#=.8*0.6;  % extra length of certain features, in pt  u#=.82*4/9;  % unit width, in pt  s#=.2;  % extra sidebar, in pt  o#=1/12;  % overshoot of curves, in pt  px#=.8*2/3;  % horizontal thickness of pen, in pt  code.M="o"; code.E="p"; code.T="q"; code.A="r";  code.F="s"; code.O="t"; code.N="u")do_it;% eight-point size, magnified 10/8: /0123451 = METAFONT!message "  magnified eight point";setparameters(h#=.8*6*10/8;  % height of characters, in ptslant:=0;  xx#=.8*0.6*10/8;  % extra length of certain features, in pt  u#=.82*4/9*10/8;  % unit width, in pt  s#=.2*10/8;  % extra sidebar, in pt  o#=1/12*10/8;  % overshoot of curves, in pt  px#=.8*2/3*10/8;  % horizontal thickness of pen, in pt  code.M="/"; code.E="0"; code.T="1"; code.A="2";  code.F="3"; code.O="4"; code.N="5")do_it;currenttransform:=currenttransform slanted(2/7/aspect_ratio);% eight-point size, slanted: \]^_efg^ = METAFONT!message "  slanted eight point";slant:=2/7;setparameters(h#=.8*6;  % height of characters, in pt  xx#=.8*0.6;  % extra length of certain features, in pt  u#=.82*4/9;  % unit width, in pt  s#=.2;  % extra sidebar, in pt  o#=1/12;  % overshoot of curves, in pt  px#=.8*2/3;  % horizontal thickness of pen, in pt  code.M="\"; code.E="]"; code.T="^"; code.A="_";  code.F="e"; code.O="f"; code.N="g")do_it;currenttransform:=currenttransform slanted(-2/7/aspect_ratio);% special size for the title page: ()*+,-.* = METAFONT!message "  title page size";setparameters(h#=250/9;  % height of characters, in pt (same as cmssc40)slant:=0;  xx#=2.9;  % extra length of certain features, in pt  u#=(1+sqrt5)/2;  % unit width, in pt  s#=.2;  % extra sidebar, in pt  o#=4/9;  % overshoot of curves, in pt  px#=4;  % horizontal thickness of pen, in pt  code.M="("; code.E=")"; code.T="*"; code.A="+";  code.F=","; code.O="-"; code.N=".")do_it;currenttransform:=currenttransform slanted(-1/9/aspect_ratio);% backslanted skinny bold: BCDGHIJD = METAFONT!message "  weird skinny bold condensed";setparameters(h#=25;  % height of characters, in ptslant:=-1/9;  % leftward bias  xx#=1.5;  % extra length of certain features, in pt  u#=3/9;  % unit width, in pt  s#=1/3;  % extra sidebar, in pt  o#=2/9;  % overshoot of curves, in pt  px#=1;  % horizontal thickness of pen, in pt  code.M="B"; code.E="C"; code.T="D"; code.A="G";  code.F="H"; code.O="I"; code.N="J")do_it;currenttransform:=currenttransform slanted(+1/9/aspect_ratio);% ultrawide light: KLUVWvwU = METAFONT!message "  weird light extended";setparameters(h#=6;  % height of characters, in ptslant:=0;  xx#=2;  % extra length of certain features, in pt  u#=4/3;  % unit width, in pt  s#=-2/3;  % extra sidebar, in pt  o#=1/9;  % overshoot of curves, in pt  px#=1/3;  % horizontal thickness of pen, in pt  code.M="K"; code.E="L"; code.T="U"; code.A="V";  code.F="W"; code.O="v"; code.N="w")do_it;message "Pixel symbols";beginchar("P",722.7/722.909pt#,722.7/722.909pt#,0); % 1pt pixelpickup pencircle scaled .2pt;top lft z1=(0,.8h); top rt z2=(.8w,.8h);bot lft z3=(0,0); bot rt z4=(.8w,0);draw z1--z4; draw z2--z3; endchar;beginchar("Q",722.7/722.909pt#,722.7/722.909pt#,0); % 1pt nonpixelpickup pencircle scaled .2pt;drawdot(.4w,.4h); endchar;beginchar("R",3*722.7/722.909pt#,3*722.7/722.909pt#,0); % 3pt pixelpickup pencircle scaled .3pt;interim autorounding:=0;top lft z1=(0,.9h); top z2=(.45w,.9h); top rt z3=(.9w,.9h);lft z4=(0,.45h); rt z5=(.9w,.45h);bot lft z6=(0,0); bot z7=(.45w,0); bot rt z8=(.9w,0);draw z1+(-50epsilon,50epsilon)--z8+(50epsilon,-50epsilon);draw z2+(0,50epsilon)--z7-(0,50epsilon);draw z3+(50epsilon,50epsilon)--z6-(50epsilon,50epsilon);draw z4-(50epsilon,0)--z5+(50epsilon,0); endchar;beginchar("S",3*722.7/722.909pt#,3*722.7/722.909pt#,0); % 3pt nonpixelpickup pencircle scaled .3pt;drawdot(.45w,.45h); endchar;message "Gothic d";beginchar("?",4pt#,8pt#,0); % taken from NB, but my changes may have spoiled itstem_length#:=10/6.7pt#; define_blacker_pixels(stem_length);xheight:=6pt;penpos1  (2*stem_length,30);     % normal pointspenpos2  (2*stem_length,30);   % normal pointspenpos3  (2*stem_length,30);  % normal pointspenpos4  (2*stem_length,30);  % normal pointsx1l=x2=0;  y1r=xheight; y2l=0;  penpos40(stem_length,30); z40r=round z1;  penpos41(stem_length,40); x40r=x41r=x42r; y41=.5[y40,y42];  penpos42(stem_length,30); y42l=y2;fill z40r--(x40r,y42l)--z42l...z41l{up}...z40l--cycle; % left stemx3=x4r=w; y3=y1; y4=y2;  penpos50(stem_length,30); z50l=round z3l;  penpos51(stem_length,40); x50l=x51l=x52l; y51=.5[y50,y52];  penpos52(stem_length,30); y52l=y4;fill z52l--(x52l,y50r)--z50r...z51r{down}...z52r--cycle; % right stem  penpos10(stem_length,30); z10=z42;  penpos11(stem_length,25); x11=.5[x10,x12]; y10l=y11=y12r;  penpos12(stem_length,30); x12r=x4; % redundant: y12l=0;  penpos14(stem_length*(1+cosd30),30); z14l=z12l;  penpos15(.07stem_length,120); z15l=z14r;fill z10l...z11l{z12-z10}...z12l--z14r --z15r{z14l-z14r}...z11r{z10-z12}...z10r--cycle;  % lower joinnumeric ch; ch=10; % Neenie's version was more like ch=7.5 (steeper)numeric s_length[]; s_length0*cosd(30-ch)=stem_length*cosd 30; s_length1*cosd(40-ch)=stem_length*cosd 40;pair corner; corner=z50r;vardef f(expr theta)= save x,y; penpos60(s_length0,theta); y60r=h; x60l=0; angle(z60r-corner)<theta+60+ch enddef;numeric theta; theta=solve f(90,0);  penpos60(s_length0,theta); y60r=h; x60l=0;  penpos61(s_length1,theta+10); z61l=.5[z60l,z62l];  penpos62(s_length0,theta); z62r=corner;fill z60l--((z60l--z62l)intersectionpoint((x4,0)--(x4,h))) --z62r...z61r{z60-z62}...z60r--cycle;      % diagonalcharwd:=charwd+1.03277pt#; w:= w + round(1.03277pt);penlabels(1,2,3,4,10,11,12,13,14,15,40,41,42,50,51,52,60,61,62);interim xoffset:=.46687pt; interim yoffset:=-.3pt;endchar;bye

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -