summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/fonts/source/public/feyn/feyn.mf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/fonts/source/public/feyn/feyn.mf')
-rw-r--r--Master/texmf-dist/fonts/source/public/feyn/feyn.mf291
1 files changed, 236 insertions, 55 deletions
diff --git a/Master/texmf-dist/fonts/source/public/feyn/feyn.mf b/Master/texmf-dist/fonts/source/public/feyn/feyn.mf
index deb0b6fb302..60a64f4d012 100644
--- a/Master/texmf-dist/fonts/source/public/feyn/feyn.mf
+++ b/Master/texmf-dist/fonts/source/public/feyn/feyn.mf
@@ -1,9 +1,9 @@
-% This is the metafont for the feynfont font, release 0.3.3, 2009 October 8
+% This is the metafont for the feynfont font, release 0.4.1, 2017 November 03
%
-% Copyright 1991, 1994, 2001, 2002, 2005, 2008, Norman Gray.
+% Copyright 1991, 1994, 2001, 2002, 2005, 2008-10, Norman Gray.
% See the file LICENCE for licence details.
%
-% Mercurial revision 204fc9a2e560, 2009-10-08 12:56 +0100
+% Mercurial revision 558acb5f2e14, 2017-11-03 14:43 +0000, tag 0.4.1 + 0
%
%
%
@@ -28,7 +28,15 @@ pickup pencircle scaled linewidth;
diagram_pen := savepen;
% general definitions
-phangle := 75;
+phangle := 75; % photon angle
+
+squash := 0.75; % the amount by which some loops are squashed
+
+% The caller must set the following parameters to values such as these
+%boson_wiggles := 4; %this must be an even number
+%boson_wiggles_loop_small := 4;
+%boson_wiggles_loop_normal := 6;
+%boson_wiggles_loop_large := 8;
% All the character positions between 0 and hex"7F"
@@ -52,7 +60,7 @@ string donecharerror;
donecharerror := "Duplicate character";
extra_beginchar := extra_beginchar & "if known donechar[charcode]: errmessage donecharerror; fi donechar[charcode] := 1;";
-path charpath;
+path charpath, charpathb;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -77,9 +85,25 @@ enddef;
threechars ("f", "fermion",
path_fermion(2module#, 0), 0.5, 2module#, 0, 0,
- (0,0.1module), "top");
+ (0,0.1module), "top");
-beginchar ("k", module#, 0, 0);
+begingroup % make closed fermion loop, for phi^4 theory
+ clearxy;
+ save height;
+ height# := 2module#;
+ define_pixels(height);
+ z2 = (0, height); %top of loop
+ y1 = y3 = 2y2/3;
+ x1+x3 = 0;
+ x1-x3 = 2height/3;
+ charpath := origin .. z1 .. z2 .. z3 .. origin;
+ threechars ("k", "fermion loop",
+ charpath shifted (0,a), 2,
+ 0, 2module#, 0,
+ 0, "top");
+endgroup;
+
+beginchar (hex"21", module#, 0, 0);
"short fermion";
pen;
draw path_fermion(module#, 0);
@@ -102,7 +126,7 @@ threechars ("d", "downward fermion",
path_fermion(2module#, -45), 0.5,
2module#*(cosd -45), 2module#*(abs sind -45), 0,
0, "urt");
-
+
threechars ("b", "vertically upward fermion",
path_fermion(2module#, 90), 0.5,
2module#*(cosd 90), 2module#*(abs sind 90), 0,
@@ -133,7 +157,7 @@ beginchar(byte"m"-hex"60", 2module#, 0, 0); "l-arrowed massive fermion";
endchar;
charpath := path_fermion(module#, 0);
-beginchar(hex"0B", module#, 0, 0); "short massive fermion";
+beginchar(hex"23", module#, 0, 0); "short massive fermion";
pen;
draw charpath shifted (0,linewidth);
draw charpath shifted (0,-linewidth);
@@ -149,17 +173,16 @@ begingroup
x2-x0 = 2(x1-x0) = width;
x1 = 0;
y0 = y2 = 0;
- y1 = 1.6module;
- %charpath := z0{dir 60} .. {dir -60}z2;
+ y1 = 2squash*module;
charpath := z0 .. z1 .. z2;
threechars("l", "fermion loop",
charpath shifted (0,a), 1,
- 0, module#+a#, 0,
+ 0, 2squash*module#+a#, 0,
0, "top");
threechars("n", "fermion loop, inverted",
charpath yscaled -1 shifted (0,a), 1,
- 0, module#+a#, 0,
+ 0, a#, 0,
0, "bot");
threechars("o", "fermion loop, small",
charpath scaled 0.66667 shifted (0,0.66667a), 1,
@@ -182,6 +205,41 @@ def path_boson (expr scale_sharp, ang, taper) =
save scale;
clearxy;
scale := hround(scale_sharp*hppp);
+ x1 = 0;
+ x99 = scale*(cosd ang);
+ if ang > 0 : % slopes upward
+ y1 = a;
+ y99 = scale*(abs sind ang) + a;
+ else :
+ y1 = scale*(abs sind ang) + a;
+ y99 = a;
+ fi
+ for i = 3 upto boson_wiggles:
+ z[i] - z[i-1] = z2-z1;
+ endfor
+ z99 - z[boson_wiggles] = z2-z1;
+ def ::(expr b) = {dir (ang+b)} looselink {dir (ang-b)} enddef;
+
+ z1 ::(phangle)z2
+ for i = 3 step 2 until boson_wiggles:
+ ::(-phangle) z[i] ::(phangle)z[i+1]
+ endfor
+ if taper <> 0 :
+ {dir (ang-phangle)} .. tension 1 and 0.8 .. {dir (ang+phangle/2)}
+ else :
+ ::(-phangle)
+ fi
+ z99
+ endgroup
+enddef;
+
+% the following is a simpler version of the above, without the
+% boson_wiggles, to document what it's supposed to be doing
+def path_boson_orig (expr scale_sharp, ang, taper) =
+ begingroup
+ save scale;
+ clearxy;
+ scale := hround(scale_sharp*hppp);
x1 = 0; x5 = scale*(cosd ang);
if ang > 0 : % slopes upward
y1 = a;
@@ -204,37 +262,40 @@ def path_boson (expr scale_sharp, ang, taper) =
enddef;
threechars ("g", "gluon",
- path_boson(2module#, 0, 0), 2,
+ path_boson(2module#, 0, 0), boson_wiggles/2,
2module#, 0, 0,
(0, 0.2module), "top");
threechars ("u", "upward gluon",
- path_boson(2module#, 45, 0), 2,
+ path_boson(2module#, 45, 0), boson_wiggles/2,
2module#*(cosd 45), 2module#*(abs sind 45), 0,
0, "ulft");
threechars ("v", "downward gluon",
- path_boson(2module#, -45, 0), 2,
+ path_boson(2module#, -45, 0), boson_wiggles/2,
2module#*(cosd -45), 2module#*(abs sind -45), 0,
0, "urt");
-threechars (oct"175",
+threechars (hex"7D",
"vertical gluon",
- path_boson(2module#, 90, 1), 2,
+ path_boson(2module#, 90, 1), boson_wiggles/2,
0, 2module#, 0,
0, "urt");
-
% plus or minus phangle, depending on whether n is odd or even
def pm_angle(expr n) =
if odd n: -1 else: 1 fi*phangle
enddef;
-% a gluon quarter loop:
+% a gluon quarter loop, in the upper-right quadrant:
% wid: radius of loop in modules
% nopts: number of points
% inv: if 1, the loop goes from the axis to the top;
% if 0, from the top down to the axis
% negang: if 1, negate the photon angle (so it wiggles oppositely);
% if 0, don't
-% taper: if 1, the line tapers as it approaches the axis
+% taper: if 1 or 3, the line tapers as it approaches the axis
+% if 2 or 3, the line tapers as it approaches the top
+% if 0, the line does not taper
+% (I can't help feeling this macro has become more complicated than it
+% really need be...)
def path_quadloop (expr wid, nopts, inv, negang, taper) =
begingroup
save halfwidth, myangle;
@@ -242,16 +303,21 @@ def path_quadloop (expr wid, nopts, inv, negang, taper) =
halfwidth# := wid*module#;
define_pixels(halfwidth);
myangle = if negang <> 0: -phangle else: phangle fi;
- z0 = (halfwidth, 0);
+ z0 = (halfwidth, 0); % z0 is on the axis
for x = 1 upto nopts:
z[x] = z0 rotated (x*90/nopts);
endfor
if inv = 0:
def ::(expr p,ang) = p{p rotated(-90-ang)} looselink enddef;
- for x=nopts downto 2:
+ if (taper = 2) or (taper = 3):
+ z[nopts]{dir(0-myangle/2)} .. tension 0.8 and 1 ..
+ else:
+ ::(z[nopts], pm_angle(nopts+negang))
+ fi
+ for x=nopts-1 downto 2:
::(z[x], pm_angle(x+negang))
endfor
- if taper <> 0:
+ if (taper = 1) or (taper = 3):
z[1]{z[1] rotated(-90+myangle)} .. tension 1 and 0.8 .. {dir -(90+myangle/2)}
else:
::(z[1], pm_angle(1+negang))
@@ -259,47 +325,67 @@ def path_quadloop (expr wid, nopts, inv, negang, taper) =
z0
else:
def ::(expr p,ang) = looselink {p rotated (90+ang)}p enddef;
- if taper <> 0:
+ if (taper = 1) or (taper = 3):
z0 {dir (90+myangle/2)} .. tension 0.8 and 1 .. z[1]{z[1] rotated(90-myangle)}
else:
z0{dir (90+myangle)}
::(z[1], pm_angle(1+negang))
fi
- for x=1 upto nopts:
+ for x=1 upto nopts-1:
::(z[x], pm_angle(x+negang))
endfor
+ if (taper = 2) or (taper = 3):
+ .. tension 0.8 and 1 .. {z[nopts] rotated (90+myangle/2)}z[nopts]
+ else:
+ ::(z[nopts], pm_angle(nopts+negang))
+ fi
fi
endgroup
enddef;
+% next_odd: evaluate to the next odd number greater than or equal to n
+def next_odd(expr n) =
+ (2*floor(n/2)+1)
+enddef;
threechars ("q", "gluon, quadrant 1",
- path_quadloop(2, 6, 1, 0, 1) xscaled -1 shifted (0,a), 4,
- 0, 2module#+a#, 0,
+ path_quadloop(2, boson_wiggles_loop_normal, 1, 0, 3) xscaled -1 shifted (0,a),
+ next_odd(2boson_wiggles_loop_normal/3),
+ 0, 2module#, 0, % height is 2module#, not 2module#+a#, so that
+ % they line up OK in \Diagram
0, "ulft");
threechars ("r", "gluon, quadrant 2",
- path_quadloop(2, 6, 0, 0, 1) shifted (0,a), 3,
- 0, 2module#+a#, 0,
+ path_quadloop(2, boson_wiggles_loop_normal, 0, 0, 3) shifted (0,a),
+ next_odd(boson_wiggles_loop_normal/2),
+ 0, 2module#, 0,
0, "urt");
threechars ("s", "gluon, quadrant 3",
- path_quadloop(2, 6, 0, 1, 1) yscaled -1 shifted (0,a), 3,
+ path_quadloop(2, boson_wiggles_loop_normal, 0, 1, 3) yscaled -1 shifted (0,a),
+ next_odd(boson_wiggles_loop_normal/2),
0, a#, a#-2module#,
0, "lrt");
threechars ("t", "gluon, quadrant 4",
- path_quadloop(2, 6, 1, 1, 1) scaled -1 shifted (0,a), 4,
+ path_quadloop(2, boson_wiggles_loop_normal, 1, 1, 3) scaled -1 shifted (0,a),
+ next_odd(2boson_wiggles_loop_normal/3),
0, a#, a#-2module#,
0, "llft");
+
% The two loops following have the annotation off-centre, to keep
% it clear of the wiggles. Would it look better being "top" and "bot"
% again, but with a non-zero offset in the second-last argument?
+% These two are vertically squashed so that they take up less than 2
+% modules vertically, which means in turn that {gl glu} can sit in a
+% two-loop diagram without crashing into the baseline.
threechars ("y", "gluon half loop",
- ((path_quadloop(2, 6, 1, 0, 0) xscaled -1)
- .. path_quadloop(2, 6, 0, 0, 0)) shifted (0,a), 7,
- 0, 2module#+a#, 0,
+ ((path_quadloop(2, boson_wiggles_loop_normal, 1, 0, 1) xscaled -1)
+ .. path_quadloop(2, boson_wiggles_loop_normal, 0, 0, 1)) yscaled squash shifted (0,a),
+ boson_wiggles_loop_normal+1,
+ 0, 2squash*module#+a#, 0,
0, "urt");
threechars ("z", "gluon half loop, inverted",
- ((path_quadloop(2, 6, 1, 1, 0) scaled -1)
- .. (path_quadloop(2, 6, 0, 1, 0) yscaled -1)) shifted (0,a), 7,
+ ((path_quadloop(2, boson_wiggles_loop_normal, 1, 1, 1) scaled -1)
+ .. (path_quadloop(2, boson_wiggles_loop_normal, 0, 1, 1) yscaled -1)) yscaled squash shifted (0,a),
+ boson_wiggles_loop_normal+1,
0, a#, a#-2module#,
0, "llft");
@@ -307,22 +393,49 @@ threechars ("z", "gluon half loop, inverted",
% That's OK -- they can still be accessed by ligatures.
% 7b='{', 7c='|'
threechars (hex"7B", "large gluon half loop",
- ((path_quadloop(2.66667, 8, 1, 0, 0) xscaled -1)
- .. path_quadloop(2.66667, 8, 0, 0, 0)) shifted (0,a), 9,
+ ((path_quadloop(2.66667, boson_wiggles_loop_large, 1, 0, 1) xscaled -1)
+ .. path_quadloop(2.66667, boson_wiggles_loop_large, 0, 0, 1)) shifted (0,a),
+ 1.5boson_wiggles_loop_large,
0, 2.66667module#+a#, 0,
0, "urt");
threechars (hex"7C", "small gluon half loop",
- ((path_quadloop(1.3333, 4, 1, 0, 0) xscaled -1)
- .. path_quadloop(1.3333, 4, 0, 0, 0)) shifted (0,a), 6,
+ ((path_quadloop(1.3333, boson_wiggles_loop_small, 1, 0, 1) xscaled -1)
+ .. path_quadloop(1.3333, boson_wiggles_loop_small, 0, 0, 1)) shifted (0,a),
+ 1.5boson_wiggles_loop_small,
0, 1.3333module#+a#, 0,
0, "llft");
-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Ghosts
+ghost_points = 2(boson_wiggles + 1); % should be at least 8?
def draw_ghost(expr a, b, apos) =
begingroup
+ % pattern for ghost_points=10: "-_--_--_--_-"
+ clearxy;
+ z1 = a; z[ghost_points] = b;
+ z2-z1 = z[ghost_points]-z[ghost_points-1];
+ for i = 2 step 2 until (ghost_points-1):
+ z2-z1 = z[i+1]-z[i];
+ endfor
+ z4-z3 = 2(z2-z1);
+ for i = 5 step 2 until (ghost_points-2):
+ z4-z3 = z[i+1]-z[i];
+ endfor
+ pen;
+ draw z1--z2; draw z[ghost_points-1]--z[ghost_points];
+ for i = 3 step 2 until (ghost_points-2):
+ draw z[i]--z[i+1];
+ endfor
+ annotate_at(0.5[z1,z[ghost_points]], apos);
+ endgroup
+enddef;
+% the following is a simpler version of the above, without the
+% ghost_points parameter, to document what it's supposed to be doing
+def draw_ghost_orig(expr a, b, apos) =
+ begingroup
clearxy;
- %z1 = (0,a); z10 = (2module,a);
z1 = a; z10 = b;
z4-z3 = 2(z2-z1);
z4-z3 = z6-z5 = z8-z7;
@@ -381,7 +494,54 @@ beginchar (byte"j"-hex"60", 2module#*(cosd 45), 2module#*(sind 45), 0);
drawarrow (littlearrow, .5[(0,a), (w,h+a)], -45+180);
endchar;
-beginchar ("K", module#, 0, 0); "short ghost";
+% ghost loops
+begingroup
+ clearxy; clearit; % clear current picture
+ picture ghostloop;
+ pair refpt, arrowpoint;
+ refpt := (-2module, 0);
+ for i=0 upto 23:
+ z[i] = refpt rotated -(i/24*180) yscaled squash shifted (0,a);
+ endfor
+ arrowpoint := z[12];
+ transform below;
+ below := identity rotatedaround ((0,a), 180);
+ pen;
+ for i=0 step 2 until 22:
+ draw z[i]--z[i+1];
+ endfor
+ ghostloop := currentpicture; clearit;
+ beginchar (hex"7E", 0, 2squash*module#+a#, 0); "ghost loop";
+ addto currentpicture also ghostloop;
+ annotate_at(arrowpoint, "top");
+ endchar;
+ beginchar (hex"7E"-hex"20", 0, 2squash*module#+a#, 0); "r-arrowed ghost loop";
+ addto currentpicture also ghostloop;
+ drawarrow(littlearrow, arrowpoint, 0);
+ annotate_at(arrowpoint, "top");
+ endchar;
+ beginchar (hex"7E"-hex"60", 0, 2squash*module#+a#, 0); "l-arrowed ghost loop";
+ addto currentpicture also ghostloop;
+ drawarrow(littlearrow, arrowpoint, 180);
+ annotate_at(arrowpoint, "top");
+ endchar;
+ beginchar (hex"7F", 0, a#, 0); "ghost loop, inverted";
+ addto currentpicture also ghostloop transformed below;
+ annotate_at(arrowpoint transformed below, "top");
+ endchar;
+ beginchar (hex"7F"-hex"20", 0, a#, 0); "r-arrowed ghost loop, inverted";
+ addto currentpicture also ghostloop transformed below;
+ drawarrow(littlearrow, arrowpoint transformed below, 0);
+ annotate_at(arrowpoint transformed below, "top");
+ endchar;
+ beginchar (hex"7F"-hex"60", 0, a#, 0); "l-arrowed ghost loop, inverted";
+ addto currentpicture also ghostloop transformed below;
+ drawarrow(littlearrow, arrowpoint transformed below, 180);
+ annotate_at(arrowpoint transformed below, "top");
+ endchar;
+endgroup;
+
+beginchar (hex"22", module#, 0, 0); "short ghost";
pen;
z1 = (0,a); z6 = (w,a);
z4-z3 = 2(z2-z1);
@@ -390,6 +550,9 @@ beginchar ("K", module#, 0, 0); "short ghost";
annotate_at(0.5[z3,z4], "top")
endchar;
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Odds and sods
beginchar (hex"60", 2module#, 0, 0);
"spacer";
@@ -441,6 +604,7 @@ endchar;
% Other symbols
garrow("a", 0, 1);
+garrow(hex"03", 180, 1);
beginchar ("p", 2blobr#, blobr# + a#, blobr# - a#);
pen; "proper vertex";
@@ -487,11 +651,11 @@ beginchar ("x", 0, a#, -a#); "counterterm";
annotate_at(0.5[z1,z3] shifted (0,a), "top");
endchar;
-beginchar (hex"7F", module#, a#, 0); "space block";
+beginchar (hex"20", module#, a#, 0); "space block";
pen;
+ message "spacer: width=" & decimal w & ", height=" & decimal h;
draw origin--(w,h);
draw (0,h)--(w,0);
- % nothing
endchar;
@@ -504,21 +668,25 @@ endfor
% Construct the ligature tables.
+ligtable "a" : % arrow
+ "A" =: "a", % right-arrow, for symmetry
+ "V" =: hex"03"; % left-arrow
+
ligtable "f" : % fermion
"A" =: "F", % right-arrowed
"V" =: hex"06", % left-arrowed
"u" =: "e", % upward
"d" =: "d", % downward
"v" =: "b", % vertical
-"s" =: "k", % short
+"s" =: hex"21", % short
"l" =: "l", % loop
"0" =: hex"60"; % spacer
-
-ligtable "e" : % downward fermion, fd
+
+ligtable "e" : % upward fermion, fe
"A" =: "E", % arrowed
"V" =: hex"05";
-ligtable "d" : % upward fermion, fu
+ligtable "d" : % downward fermion, fd
"A" =: "D",
"V" =: hex"04";
@@ -526,11 +694,16 @@ ligtable "b" : % vertical fermion, fv
"A" =: "B",
"V" =: hex"02";
-ligtable "k" : % short fermion
+ligtable hex"21" : % short fermion
"0" =: hex"40"; % short spacer
+ligtable "k" : % fermion closed loop
+"A" =: "K", % arrowed
+"V" =: hex"0b";
+
ligtable "l" : % fermion loop
"u" =: "n", % upside down
+"o" =: "k", % closed loop (for scalar theory)
"S" =: "o", % small
"A" =: "L",
"V" =: hex"0C";
@@ -550,7 +723,7 @@ ligtable "g" : % gluon
ligtable "m" : % massive fermion
"A" =: "M",
"V" =: hex"0D",
-"s" =: hex"0B";
+"s" =: hex"23";
ligtable "n" : % inverted fermion
"A" =: "N",
@@ -617,7 +790,17 @@ ligtable "h" : % ghost
"V" =: hex"08",
"u" =: "i", % upward
"d" =: "j", % downward
-"s" =: "K"; % short
+"s" =: hex"22", % short
+"l" =: hex"7E"; % ghost loop
+
+ligtable hex"7E" : % ghost loop
+"A" =: hex"5E", % r-arrowed
+"V" =: hex"1E", % l-arrowed
+"u" =: hex"7F"; % upside down
+
+ligtable hex"7F" : % ghost loop inverted
+"A" =: hex"5F", % r-arrowed
+"V" =: hex"1F"; % l-arrowed
ligtable "i" : % upward ghost
"A" =: "I",
@@ -626,5 +809,3 @@ ligtable "i" : % upward ghost
ligtable "j" : % downward ghost
"A" =: "J",
"V" =: hex"0A";
-
-