File: feynmf.dtx

package info (click to toggle)
feynmf 1.08-8
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 948 kB
  • sloc: perl: 511; makefile: 253
file content (7801 lines) | stat: -rw-r--r-- 259,956 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
% \iffalse % feynmf.dtx - Feynman diagrams with METAFONT for LaTeX(2e)
% Copyright (C) 1989, 1990, 1992-1996 by Thorsten.Ohl@Physik.TH-Darmstadt.de
% $Id: feynmf.dtx,v 1.30 1996/12/02 09:20:36 ohl Exp $
%
% Feynmf is free software; you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by 
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% Feynmf is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%
% \fi
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% \CheckSum{924}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \MakeShortVerb{\|}
%
% \title{%
%   \FMF: \\
%   Drawing Feynman Diagrams \\
%   with \LaTeX{} and \MF\thanks{%
%      This is \texttt{\filename}, version \fileversion,
%      revision \filerevision, date \filedate.}}
%
% \author{%
%   Thorsten Ohl\thanks{e-mail:
%     {\tt Thorsten.Ohl@Physik.TH-Darmstadt.de}}\\
%   \hfil \\
%   Technische Hochschule Darmstadt \\
%   Schlo\ss gartenstr. 9 \\
%   D-64289 Darmstadt \\
%   Germany}
%
% \maketitle
% \begin{abstract}
%   \FMF{} is a \LaTeX{} package for easy drawing of professional
%   quality Feynman diagrams with \MF{} (or \MP).  \FMF{} lays out most
%   diagrams satisfactorily from the structure of the graph without
%   any need for manual intervention.  Nevertheless all the power of
%   \MF{} (or \MP) is available for obscure cases.
% \end{abstract}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section*{Copying}
%
% \FMF{} is free software; you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by 
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% \FMF{} is distributed in the hope that it will be useful, but
% \emph{without any warranty}; without even the implied warranty of
% \emph{merchantability} or \emph{fitness for a particular purpose}.
% See the GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \newpage
% \tableofcontents
% \newpage
% \unitlength=1mm
% \def\topfraction{0.9}
% \def\bottomfraction{0.9}
% \def\textfraction{0.1}
% \begin{fmffile}{fmfsamp1}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{Introduction}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Purpose and scope}
%
% In recent years, \TeX\footnote{\TeX{} is a trademark of the American
%   Mathematical Society.}~\cite{TeX}
% and \LaTeX\footnote{\LaTeX{} might be a trademark of Addison Wesley
%   Publishing Company.}~\cite{LaTeX}
% have revolutionized the way
% we share information in theoretical physics (and other areas).  Not
% only does \TeX{} provide typographical capabilities, which transcend
% those of commercial ``wordprocessors'' substantially, \TeX{} documents
% are also completely portable.  Since implementations are available
% on essentially all computers in use in the community, documents can
% be shared without the usual restrictions of proprietary data
% formats.  This has enabled us to collaborate on papers with
% colleagues on the other side of the globe, to replace the mailing of
% hard copy preprints by electronic transmission and to submit these
% papers electronically to the publisher.
%
% This portability comes with a price, though.  \TeX{} (and \LaTeX)
% do not address the issue of graphical information, apart from the
% rudimentary (but very useful) capabilities of the \LaTeX{} |picture|
% environment and similar
% packages~\cite{LaTeX-Companion}.  As an de facto standard for the
% inclusion of more complex graphics has emerged the inclusion of
% PostScript\footnote{PostScript is a trademark of Adobe Systems
%   Inc.} 
% files.  The complete document can then
% be printed on any PostScript device.
%
% Still there are areas, where complementary approaches seem worth
% pursuing.  In particular this is the case, if the graphical
% information is highly formalized, like the case at hand.  Feynman
% diagrams are specified by their topology and the type of particles
% connecting the vertices.  Thus a given diagram can be reproduced
% from a very concise specification, if the software is able to choose
% a reasonable layout (semi-)automatically.
%
% \MF\footnote{\MF{} is a trademark of Addison Wesley Publishing
%   Company.}~\cite{MF}
% and \MP\footnote{John Hobby's \MP{} is a modified version of \MF{}
%   which generates (encapsulated) PostScript output.  \MP{} can be
%   build trivially on top of the \texttt{web2c} version of \TeX{} and
%   \MF{} for UNIX.  Ports to other systems should be
%   simple.}~\cite{MetaPost}
% appear to be the perfect tool for such a purpose, since
% \begin{enumerate}
%   \item{} \MF{} is part of any (reasonable) \TeX{} installation, thus
%     available to all potential users,
%   \item{} both have very powerful graphics primitivs, which allow high
%     quality output, and
%   \item{} both have builtin linear algebra, which allows us to choose a
%     layout automatically.
% \end{enumerate}
% Still, providing at least the basic interface in \LaTeX{} macros
% seems appropriate for boosting the acceptance among the less
% technically oriented parts of the audience. Thus
% \FMF\footnote{\FMF{} is not anybody's trademark.}~\cite{CPC,CNL}
% was conceived.
%
% \FMF{} is unique among packages for drawing Feynman diagrams in
% \emph{combining} the following features:
% \begin{itemize}
%   \item Simplicity and conciseness for common diagrams.  E.g.~the
%     scattering diagram in figure~\ref{fig:simple} can be specified
%     \emph{completely} in five lines of \LaTeX:
%     \begin{verbatim}
%       \begin{fmfgraph*}(40,30) \fmfpen{thick}
%         \fmfleft{i1,i2} \fmfright{o1,o2}
%         \fmf{fermion}{i1,v1,o1} \fmf{fermion}{i2,v2,o2}
%         \fmf{photon,label=$q$}{v1,v2} \fmfdot{v1,v2}
%       \end{fmfgraph*}
%     \end{verbatim}
%     \begin{figure}[t]
%       \begin{center}
%       \begin{fmfgraph*}(40,30) \fmfpen{thick}
%         \fmfleft{i1,i2} \fmfright{o1,o2}      
%         \fmf{fermion}{i1,v1,o1} \fmf{fermion}{i2,v2,o2}
%         \fmf{photon,label=$q$}{v1,v2} \fmfdot{v1,v2}
%       \end{fmfgraph*}
%       \end{center}
%       \caption{\label{fig:simple}Simple scattering diagram.}
%     \end{figure}
%   \item Expressiveness for complicated diagrams (see the examples
%     below).
%   \item Extensibility (e.g.~see section~\ref{sec:extensions}).
%   \item Arbitrary \TeX-labels.  This point is more important than it
%     may seem at first glance because most graphical layout systems
%     lack the power to produce complicated mathematical expressions.
%     Having matching fonts in text, equations and diagrams is also an
%     important esthetical feature.   
% \end{itemize}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Relation to similar packages}
%
% Before we start, a couple of words about some complementary packages
% on the market are in order:
% \begin{itemize}
%   \item Michael Levine's |feynman| package~\cite{levine} is
%     implemented on top of the standard \LaTeX{} |picture|
%     environment~\cite{LaTeX}.  This makes it completely portable (no
%     need for a correct \MF{} installation), but it requires manual
%     layout and the graphics output is (though very useful) less than
%     perfect.
%   \item Jos Vermaseren's |axodraw| package~\cite{axodraw} uses
%     |\special|s to access PostScript primitives for drawing
%     diagrams.  This approach is inherently not portable (the
%     ubiquity of PostScript printers makes this a minor point,
%     though) but as flexible as the present one.  Nevertheless,
%     it still requires manual layout for all diagrams.
%   \item Last, but not least, I have to mention  Thomas Leathrum's
%     |mfpic|~\cite{mfpic}, which provided the inspiration for moving
%     \FMF's user interface from \MF{} to \TeX.  It might not have
%     been unreasonable to design and implement \FMF{} as a package on
%     top of |mfpic|, but closer inspection shows that \FMF{} and
%     |mfpic| are fairly orthogonal.  |mfpic| is most useful for
%     handling simple graphical building blocks in formally
%     unconstrained contexts. \FMF{} on the other hand excels in the
%     formal context of Feynman diagrams (or any other labeled graphs
%     for that matter), which can be drawn automatically from a
%     \emph{specification}.
% \end{itemize}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Historical note}
%
% Parts of this code have a rather long history\footnote{%
%   Which is a partial explanation, if not excuse, for its slightly
%   incoherent structure.}.
% Some of the drawing primitives started in 1989 as
% |feynman.mf|, a library of \MF{} macros for drawing Feynman
% diagrams in my thesis.  The layout had to be specified completely
% by hand, which required a long edit-process-preview cycle and made
% |feynman.mf| awkward to use.
% Nevertheless, it suited my and other's neeeds and survived for five
% years without major modifications.  Early in
% 1994, I became aware of Thomas Leathrum's |mfpic|~\cite{mfpic}.
% This inspired me to shift the user interface from \MF{} to
% \LaTeX, because this allows a smoother blending of the \LaTeX{}
% |picture| environment with \FMF{} for the purpose of labeling the
% graphs.  While doing this and after
% having been taught by Tim Stelzer's and Bill Long's
% \texttt{MADGRAPH}~\cite{madgraph} that simply minimizing the length
% of the graph gives much better results than I had anticipated, I
% added the graph manipulation and layout code.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Architecture}
%
% Even though there has never been a proper design phase in the
% development of \FMF, a certain structure has emerged, which is
% depicted in figure~\ref{fig:arch}. A user who is aware of this
% architecture should be able to use \FMF{} more effectively.
%
% \begin{figure}[t]
%   \hfuzz=3cm
%   \begin{center}
%     \leavevmode
%     \includegraphics{manpics.3}
%   \end{center}
%   \caption{\label{fig:arch}%
%     Architecture of \FMF{}: the two modes of \FMF{} (immediate mode
%     and vertex mode) both interact with \LaTeX{} and \MF{} (or \MP,
%     respectively), but operate on different data types.}
% \end{figure}
%
% The most crucial aspect of the architecture is the existence of two
% distinct modes with different fundamental datatypes:
% \begin{itemize}
%   \item \emph{vertex mode,} which deals with graphs as structures
%     consisting of vertices and arcs and (almost) never deals with
%     their physical locations.
%   \item \emph{immediate mode,} which deals with \MF{} |path|s and
%     |pair|s (i.e.~coordinates) and 
%     allows complete control over the physical locations.
% \end{itemize}
% It is of course possible to mix these modes in advanced
% applications.  Commands are provided to translate vertices and arcs
% to |pair|s and |path|s and vice versa.
%
% Novice users with little experience in \MF{} programming should
% start with vertex mode to get their job done.  Later, immediate mode
% can be used to create more and more complex diagrams.  It is
% possible to create most diagrams that can actually be calculated in
% vertex mode.  Immediate mode is most useful for extending line
% \FMF{} and for drawing diagrams with fancy decorations.
%
% A word on portability: \FMF{} is implemented as a \LaTeX{} package.
% But it should be straightforward to adapt it to other \TeX{} macro
% packages because \LaTeX{} macros have been used for convenience only
% and can easily be replaced or provided in a compatibility package.
% The \LaTeX{} specific \emph{environment} construct can also easily
% be replaced by the equivalent construct in another macro package.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Conclusion}
%
% It goes without saying that \FMF{} is not perfect.  There might be
% cases where using a graphical drawing tool with a mouse can give
% more pleasing results in less time.  But in most cases, \FMF{}
% will give satisfactory results without any fine tuning.  These will
% be reproducible and independent from the computer it is running on.
%
% Early user reponses have been very encouraging.  There seems to be a
% relatively steep
% learning curve for those \LaTeX{} users that have to find out how to
% run \MF{} on their systems.  But once this purely technical obstacle
% has been
% surmounted, users have been enthusiatic as well about the quality of
% the generated graphs as about the ease of use of \FMF.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \newpage
% \section{Usage}
%
% In addition to this manual, there exists also a concise description
% of \FMF{} in a journal article~\cite{CPC}, as well as a three part
% tutorial~\cite{CNL}. 
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{\LaTeX{} package and environments}
% \label{sec:environments}
%
% Instructing \LaTeX{} to use \FMF{} is as simple as\footnote{As
%   given, this applies to \LaTeX.  But the installation file
%   \texttt{feynmf209.ins} allows to generate special versions 
%   \texttt{feynmf209.sty} and \texttt{feynmp209.sty} which are
%   compatible with the obsolete \LaTeX{} version 2.09.  These files
%   are to be used as documentstyle options
%   \begin{quote}
%     \texttt{\bslash documentstyle[...,feynmf209,...]\{...\}}
%   \end{quote}
%   or
%   \begin{quote}
%     \texttt{\bslash documentstyle[...,feynmp209,...]\{...\}}
%   \end{quote}
%   If you cannot use |epsf.sty| for including PostScript files, you
%   can either hack |feynmp209.sty| or upgrade to \LaTeX2e.
%   Please keep in mind that \FMF{} has been developed for \LaTeXe{}
%   and the \LaTeX~2.09 compatibility version will always be a
%   retrofitted hack.  I will accept bug reports for the 2.09 version,
%   but I urge everybody to move to \LaTeX2e, which is the one and
%   only supported \LaTeX{} right now.}
% \begin{quote}
%   |\usepackage{feynmf}|
% \end{quote}
% If you have \MP, then you can use it alternatively by placing
% \begin{quote}
%   |\usepackage{feynmp}|
% \end{quote}
% in your \LaTeX{} source.\footnote{%
%   \FMF{} understands an option \texttt{pre-1.03}, that is
%   of interest for veteran users:
%   \begin{quote}
%     \texttt{\bslash usepackage[pre-1.03]\{feynmf\}}
%   \end{quote}
%   or
%   \begin{quote}
%     \texttt{\bslash usepackage[pre-1.03]\{feynmp\}}
%   \end{quote}
%   The purpose of this option is to enable processing of old input
%   files (pre v1.02) that use \texttt{\bslash noexpand} in labels.
%   Since the method for processing these files can clash (in rare
%   cases) with \LaTeXe's font loading procedure, it has been disabled
%   by default.}
%
% \FMF{} has to switch interactions mode and switches to
% |\errorstopmode|, because it is impossible in \TeX{} to switch
% back. If a different default is required (for automated preprint
% processing, in particular), it can be specified as a package option:
% \begin{quote}
%   |\usepackage[errorstop]{feynmf}|\\
%   |\usepackage[scroll]{feynmf}|\\
%   |\usepackage[batch]{feynmf}|\\
%   |\usepackage[nonstop]{feynmf}|
% \end{quote}
%
% \DescribeEnv{fmffile}
% All descriptions that should go into one \MF{} file are placed
% inside a |fmffile| environment which takes the name of the \MF{}
% file as an argument:
% \begin{quote}
% \begin{flushleft}
%   |\begin{fmffile}{|\meta{\MF-file}|}|\\
%   \qquad\ldots\\
%   |\end{fmffile}|
% \end{flushleft}
% \end{quote}
% Upto 255 graphs can be placed into one \MF{} file.  Currently
% \FMF{} does \emph{not} check that the 255 graph limit per file
% is not overrun.\footnote{%
%   There is also a very primitive, but (unfortunately) popular
%   operating system, which restricts filenames to eight characters
%   with a three character extension.  On this system, only 99
%   graphs can be placed into one \MF{} file because auxiliary
%   files will not be unambiguous, if more than two digits are used.}
% Note that the filename for the \MF{} file given in the argument of
% the |fmffile| environment \emph{must not} be identical to the
% \LaTeX{} source file name, because the \MF{} |.log| would be
% overwritten and \LaTeX{} can no longer access the information in
% this |.log| file.  It should be obvious that any umber of diagrams
% can be generated by using more than one |fmffile| environment with
% different filenames.
%
% \DescribeEnv{fmfgraph}
% The |fmfgraph| environment contains the description of a single
% Feynman diagram
% which will be placed a the location of the environment.
% Arguments are the width and the height of the diagram, in units of
% |\unitlength|:
% \begin{quote}
% \begin{flushleft}
%   |\begin{fmfgraph}(|\meta{width}|,|\meta{height}|)|\\
%   \qquad\ldots\\
%   |\end{fmfgraph}|
% \end{flushleft}
% \end{quote}
% This environment does \emph{not} support labels, use |fmfgraph*| if
% your diagrams contains labels.
%
% \DescribeEnv{fmfgraph*}
% Same as |fmfgraph|, but enclosed in a |picture| environment of the
% same size and supporting \LaTeX{} labels.
% \begin{quote}
% \begin{flushleft}
%   |\begin{fmfgraph*}(|\meta{width}|,|\meta{height}|)|\\
%   \qquad\ldots\\
%   |\end{fmfgraph*}|
% \end{flushleft}
% \end{quote}
%
% \DescribeMacro{\fmfframe}
% Allows to allocate additional space around a |fmfgraph*|, since
% the labels (or the diagram itself) might overshoot:
% \begin{quote}
%   |\fmfframe(|\meta{left}|,|\meta{top}|)(|\meta{right}|,|\meta{bottom}^^A
%     |){|\meta{box}|}|
% \end{quote}
%  puts an invisible frame of the given dimensions (measured in
%  |\unitlength|) around \meta{box}.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Auxiliary files}
% \label{sec:aux-files}
%
% \FMF{} needs to share information between \MF{} and \LaTeX{}.  For
% this task several auxiliary files are needed.
% The flow of information depicted in figures~\ref{fig:flow}
% and~\ref{fig:flowp} looks much
% more complicated than it is.  The important feature is that there a
% two sets of files which can be used to distribute a document:
% \begin{enumerate}
%   \item{} Iff the recipient has a working \MF{} installation
%     (which shouldn't be a problem, except for some impoverished
%     commercial implementations), the document can be typset from the
%     \LaTeX{} source \emph{alone}, by running \LaTeX{}, \MF{}
%     and \LaTeX{} again (the latter step might have to be repeated to
%     get cross references right).
%   \item{} Another possibility (which doesn't require \MF{} on
%     the recipient's side), is to distribute the \LaTeX{} source, the
%     |tfm| and |gf| files (or |pk| files respectively) along with the
%     label files with extension |t|$n$ (where $n$ as an integer).
%     Distributing the \MF{} |log| files is a possible alternative
%     for the latter, but discouraged, because these are prone to be
%     erased accidentally.
% \end{enumerate}
%
% \begin{figure}[t]
%   \hfuzz=3cm
%   \begin{center}
%     \leavevmode
%     \includegraphics{manpics.1}
%   \end{center}
%   \caption{Interdependency of files in a \FMF{} application.
%      The arrows show which files are updated in the two \LaTeX{}
%      passes, the \MF{} pass and the final dvi translation step.}
%   \label{fig:flow}
% \end{figure}
%
% \begin{figure}[t]
%   \hfuzz=3cm
%   \begin{center}
%     \leavevmode
%     \includegraphics{manpics.2}
%   \end{center}
%   \caption{Interdependency of files in a \FMF{} application using
%      \MP: The arrows show which files are updated in the two \LaTeX{}
%      passes, the \MP{} pass and the final dvi translation step.}
%   \label{fig:flowp}
% \end{figure}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Running \MF}
% \label{sec:run-mf}
%
% Processing your document with \LaTeX{} will generate one or more
% \MF{} files, which you will have to process with \MF.  On
% UNIX\footnote{%
%   UNIX was a trademark of UNIX Systems Laboratory, but is rumored to
%   have been donored to X/Open.}
% systems, \MF{} is invoked as
% \manindex{running \MF}
% \begin{quote}
%   |mf '\mode:=|\meta{\MF-mode}|; input |\meta{\MF-file}|'|
% \end{quote}
% from the shell.  Here \meta{\MF-file} is to be replaced by the name
% of the input file (which is determined by the argument to the
% |fmffile| environment, see section~\ref{sec:environments}) and
% \meta{\MF-mode} is the proper \MF-mode for your particular printer.
% Please consult your local guide or local wizards about how to run
% \MF{} on other systems.
%
% Note that \meta{\MF-mode} \emph{must} be specified, otherwise \MF{}
% will fail or the resulting font will not be usable.\footnote{%
%   See section~\ref{sec:value-to-large} for the typical error message
%   and for additional information on printer modes.}
% You can look up the correct \MF{} mode in the file |modes.mf| that
% comes with the \MF{} distribution.  Among the more common laser
% printers are |laserjet| for HP Laserjets at 300dpi, |ljfour| for HP
% Laserjets at 600dpi, |nexthi| for NeXT laser printers at 400dpi,
% etc.
%
% A non-trivial part can be instructing \TeX{} and your favorite
% |dvi|-driver how to find the generated |tfm| and |gf| (resp.~|pk|)
% files.  This is highly system dependent and can be trivial (as in
% the standard UNIX \TeX{} installations, where no further action is
% required) or almost impossible without system priviledges (as under
% MVS).  Please consult your local guide or wizards on this point. 
% See also section~\ref{sec:out-of-date} for common problems with
% |dvi| drivers.
%
% Some recent \TeX{} implementations (e.g.~|web2c| with |kpathsea|
% version 2.6 or later) are able to generate |tfm| files on the fly.
% Using such implementations, running \LaTeX{} twice should suffice
% and \MF{} will be invoked automagically in the background.  Note
% however, that the automagically invoked tools might also install the
% ``fonts'' corresponding to the Feynman diagrams in a system
% directory, where they don't belong.  Adding the following lines to
% the |maketex.site| script will prevent this mishap in the
% te\TeX{} distribution for UNIX (which is derived from |web2c|):
% \begin{verbatim}
%   if [ -r $KPSE_DOT/$NAME.mf ]; then
%     MT_PKDESTDIR=$KPSE_DOT
%     MT_TFMDESTDIR=$KPSE_DOT
%     MT_NAMEPART=
%   fi
% \end{verbatim}
% The automagic tools will also \emph{not} notice when a diagram has
% changed.  These problems suggest that it is a generally a good idea
% to invoke \MF{} explicitely, instead of relying on the automagic
% tools.
%
% Running \MP{} is usually trivial, because not printer specific mode
% is needed:
% \manindex{running \MP}
% \begin{quote}
%   |mp |\meta{\MP-file}||
% \end{quote}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{The \texttt{feynmf} perl script}
% UNIX users will be able to take advantage of the \texttt{feynmf}
% perl script, that automates the invocation of \LaTeX{} and \MP.
% In particular it tries to guess the correct \MF-mode and
% magnification.  The latter is often different from 1 in slide
% classes.  Here is the man page of \texttt{feynmf}:
%
% ^^A LaTeX document produced by pod2latex from "feynmf.pl.pod".
% \subsubsection*{NAME}
% {\bf feynmf} --- Process {\bf LaTeX} files using {\bf FeynMF}
% 
% \subsubsection*{SYNOPSIS}
% {\bf feynmf} {\tt [}{\bf -hvqncfT}{\tt ]}
%   {\tt [}{\bf -t} {\em tfm\/} {\tt [}{\bf -t} {\em tfm\/} ...{\tt ]}{\tt ]}
%   {\tt [}{\bf -m} {\em mode\/}{\tt ]}
%   {\em file\/} {\tt [}{\em file\/} ...{\tt ]}
% 
% {\bf feynmf} {\tt [}{\bf {\tt --}help}{\tt ]}
%   {\tt [}{\bf {\tt --}version}{\tt ]} {\tt [}{\bf {\tt --}quiet}{\tt ]}
%   {\tt [}{\bf {\tt --}noexec}{\tt ]} {\tt [}{\bf {\tt --}clean}{\tt ]}
%   {\tt [}{\bf {\tt --}force}{\tt ]} {\tt [}{\bf {\tt --}notfm}{\tt ]}
%   {\tt [}{\bf {\tt --}tfm} {\em tfm\/} {\tt [}{\bf {\tt --}tfm}
%   {\em tfm\/} ...{\tt ]}{\tt ]} {\tt [}{\bf {\tt --}mode}
%   {\em mode\/}{\tt ]} {\em file\/} {\tt [}{\em file\/} ...{\tt ]}
% 
% \subsubsection*{DESCRIPTION}
% The most complicated part of using the {\bf FeynMF} style appears to be the
% proper invocation of {\bf Metafont}.  The {\bf feynmf} script provides a
% convenient front end and will automagically invoke {\bf Metafont} with the
% proper mode and magnification.  It will also avoid cluttering system font
% directories and offers an option to clean them.
% 
% \subsubsection*{OPTIONS}%
% \index{OPTIONS}
% 
% \begin{description}
% 
% \item[{\bf -h}, {\bf {\tt --}help}]%
% \index{-h, --help@{\bf -h}, {\bf {\tt --}help}}%
% \hfil\\
% Print a short help text.
% 
% \item[{\bf -v}, {\bf {\tt --}version}]%
% \index{-v, --version@{\bf -v}, {\bf {\tt --}version}}%
% \hfil\\
% Print the version of {\bf feynmf}.
% 
% \item[{\bf -q}, {\bf {\tt --}quiet}]%
% \index{-q, --quiet@{\bf -q}, {\bf {\tt --}quiet}}%
% \hfil\\
% Don't echo the commands being executed.
% 
% \item[{\bf -n}, {\bf {\tt --}noexec}]%
% \index{-n, --noexec@{\bf -n}, {\bf {\tt --}noexec}}%
% \hfil\\
% Don't execute {\bf LaTeX} or {\bf Metafont}.
% 
% \item[{\bf -c}, {\bf {\tt --}clean}]%
% \index{-c, --clean@{\bf -c}, {\bf {\tt --}clean}}%
% \hfil\\
% Offer to delete font files that have accidentally been placed in a
% system directory by the {\bf MakeTeXTFM} and {\bf MakeTeXPK} scripts (these
% scripts are run by {\bf tex} (and {\bf latex}) in the background).  This
% option has only been tested with recent versions of UNIX TeX.
% 
% \item[{\bf -f}, {\bf {\tt --}force}]%
% \index{-f, --force@{\bf -f}, {\bf {\tt --}force}}%
% \hfil\\
% Don't ask any questions.
% 
% \item[{\bf -T}, {\bf {\tt --}notfm}]%
% \index{-T, --notfm@{\bf -T}, {\bf {\tt --}notfm}}%
% \hfil\\
% Don't try to prepare fake {\tt .tfm} files for the first run.
% 
% \item[{\bf -t}, {\bf {\tt --}tfm} {\em tfm\/}]%
% \index{-t, --tfm tfm@{\bf -t}, {\bf {\tt --}tfm} {\em tfm\/}}%
% \hfil\\
% Don't try guess the names of the {\tt .tfm} files to fake for
% the first run and use the given {\em name\/}(s) instead.  This option
% can be useful if our incomplete parsing of the LaTeX input
% files fails.
% 
% \item[-{\bf m} {\em mode\/}, {\bf {\tt --}mode} {\em mode\/}]%
% \index{-m mode, --mode mode@-{\bf m} {\em mode\/}, {\bf {\tt --}mode} {\em mode\/}}%
% \hfil\\
% Select the METAFONT mode {\em mode\/}.  The default is guessed or
% {\tt localfont} if the guess fails.
% 
% \item[{\em file\/}]%
% \index{file@{\em file\/}}%
% \hfil\\
% Main {\bf LaTeX} input files.
% 
% \item[{\em file\/} ...]%
% \index{file ...@{\em file\/} ...}%
% \hfil\\
% Other LaTeX input files that are included by the main file.
% 
% \end{description}
% 
% \subsubsection*{AUTHOR}
% Thorsten Ohl $<$Thorsten.Ohl@Physik.TH-Darmstadt.de$>$
% 
% \subsubsection*{BUGS}
% The preparation of {\tt .tfm} files is not foolproof yet, because we can
% parse {\bf TeX} files only superficially.
% 
% This script has only been tested for recent {\bf teTeX} distributions
% of UNIX {\bf TeX}, though it will probably work with other versions of
% UNIX {\bf TeX}.  The author will be grateful for portability suggestions,
% even concerning {\bf Borg} operating systems, for the benefit of those users
% that are forced to live with DOS or Windows.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Vertex mode}
%
% These basic features of \FMF{} are (or rather ``should be'')
% available through the \LaTeX{} interface.  No knowledge of
% \MF{} is necessary.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{External vertices}
%
% \DescribeMacro{\fmfleft}
% \DescribeMacro{\fmfright}
% \DescribeMacro{\fmfbottom}
% \DescribeMacro{\fmftop}
% \DescribeMacro{\fmfsurround}
% \manindex{external vertices}
% \manindex{vertices, external}
% Positioning of
% external vertices has to done explicitely.  The technical reason is
% that they would otherwise collapse with their neighbors, but
% practical reasons also suggest to give the user full control here.
% |\fmfleft{|\meta{v1}$[$|,|\ldots$]$|}| places the
% vertices in the comma separated list \meta{v1},\ldots\ 
% equidistantly on a smooth path on the left side of the diagram.
% |\fmfright{|\meta{v1}$[$|,|\ldots$]$|}| does the same
% thing on the right.  Similarly |\fmfbottom| and |\fmftop|, while
% |\fmfsurround{|\meta{v1}$[$|,|\ldots$]$|}|
% places its arguments on smooth path
% surrounding the diagram.
%
% \def\gallerylabels{%
%   \fmfdotn{v}{4}%
%   \fmflabel{$v_1$}{v1}%
%   \fmflabel{$v_2$}{v2}%
%   \fmflabel{$v_3$}{v3}%
%   \fmflabel{$v_4$}{v4}}
% \def\gallerydemo{%
%   \fbox{\begin{fmfgraph*}(15,12)
%     \fmfpen{thick}%
%     \fmfbottomn{v}{4}\gallerylabels
%     \fmfcmd{draw (bottom_gallery);}
%   \end{fmfgraph*}}\qquad
%   \fbox{\begin{fmfgraph*}(15,12)
%     \fmfpen{thick}%
%     \fmfleftn{v}{4}\gallerylabels
%     \fmfcmd{draw (left_gallery);}
%   \end{fmfgraph*}}\qquad
%   \fbox{\begin{fmfgraph*}(15,12)
%     \fmfpen{thick}%
%     \fmfsurroundn{v}{7}\fmfdotn{v}{7}%
%     \fmflabel{$v_1$}{v1}\fmflabel{$v_2$}{v2}%
%     \fmflabel{$v_3$}{v3}\fmflabel{$v_4$}{v4}%
%     \fmflabel{$v_5$}{v5}\fmflabel{$v_6$}{v6}%
%     \fmflabel{$v_7$}{v7}%
%     \fmfcmd{draw (surround_gallery);}
%   \end{fmfgraph*}}\qquad
%   \fbox{\begin{fmfgraph*}(15,12)
%     \fmfpen{thick}%
%     \fmftopn{v}{4}\gallerylabels
%     \fmfcmd{draw (top_gallery);}
%   \end{fmfgraph*}}\qquad
%   \fbox{\begin{fmfgraph*}(15,12)
%     \fmfpen{thick}%
%     \fmfrightn{v}{4}\gallerylabels
%     \fmfcmd{draw (right_gallery);}
%   \end{fmfgraph*}}}
%
% \DescribeMacro{\fmfcurved}
% \DescribeMacro{\fmfstraight}
% \manindex{galleries}
% Per default, the \emph{galleries} on which we place the external
% vertices are curved as in figure~\ref{fig:curvedgalleries}, but
% straight galleries are also available.  The macros
% |\fmfcurved| and |\fmfstraight| switch between
% these alternatives.
%
% \begin{figure}[t]
%   \begin{center}
%     \gallerydemo
%   \end{center}
%   \caption{\label{fig:curvedgalleries}%
%     Curved galleries.}
% \end{figure}
%
% \begin{figure}[t]
%   \begin{center}
%     \fmfstraight
%     \gallerydemo
%     \fmfcurved
%   \end{center}
%   \caption{\label{fig:straightgalleries}%
%     Straight galleries.}
% \end{figure}
%
% \DescribeMacro{\fmfleftn}
% \DescribeMacro{\fmfrightn}
% \DescribeMacro{\fmfbottomn}
% \DescribeMacro{\fmftopn}
% \DescribeMacro{\fmfsurroundn}
% \manindex{external vertices}
% \manindex{vertices, external}
% The macro |\fmfleftn| is similar to |\fmfleft|, but
% |\fmfleftn{|\meta{v}\allowbreak|}{|\meta{n}|}| places the
% vertices
% \meta{v$[$1$]$}\ldots\meta{v$[$n$]$}.  Analogously for
% the macros |\fmfrightn|, |\fmfbottomn|, |\fmftopn| and
% |\fmfsurroundn|.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Arcs and internal vertices}
%
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \def\linesample#1{%
%   \begin{fmfgraph}(30,6)
%     \fmfleft{i}
%     \fmfright{o}
%     \fmf{#1}{i,o}
%   \end{fmfgraph}}
% \begin{table}[t]
%   \hfuzz=3cm
%   \begin{center}
%   \begin{tabular}{|l|c|l|l|}\hline
%     Name               & Example                       & Parameters  & Aliases  \\\hline\hline
%     "curly"            & \linesample{curly}            & "curly_len" & "gluon"  \\\hline
%     "dbl_curly"        & \linesample{dbl_curly}        & "curly_len" & \\\hline
%     "dashes"           & \linesample{dashes}           & "dash_len"  & \\\hline
%     "dashes_arrow"     & \linesample{dashes_arrow}     & "dash_len"  & "scalar" \\\hline
%     "dbl_dashes"       & \linesample{dbl_dashes}       & "dash_len"  & \\\hline
%     "dbl_dashes_arrow" & \linesample{dbl_dashes_arrow} & "dash_len"  & \\\hline
%     "dots"             & \linesample{dots}             & "dot_len"   & \\\hline
%     "dots_arrow"       & \linesample{dots_arrow}       & "dot_len"   & "ghost"  \\\hline
%     "dbl_dots"         & \linesample{dbl_dots}         & "dot_len"   & \\\hline
%     "dbl_dots_arrow"   & \linesample{dbl_dots_arrow}   & "dot_len"   & \\\hline
%     "phantom"          & \linesample{phantom}          &             & \\\hline
%     "phantom_arrow"    & \linesample{phantom_arrow}    &             & \\\hline
%     "plain"            & \linesample{plain}            &             & "vanilla"\\\hline
%     "plain_arrow"      & \linesample{plain_arrow}      &             & "fermion",
%                                                                        "electron",
%                                                                        "quark"  \\\hline
%     "dbl_plain"        & \linesample{dbl_plain}        &             & "double" \\\hline
%     "dbl_plain_arrow"  & \linesample{dbl_plain_arrow}  &             & "double_arrow",
%                                                                        "heavy"  \\\hline
%     "wiggly"           & \linesample{wiggly}           & "wiggly_len"& "boson",
%                                                                        "photon" \\\hline
%     "dbl_wiggly"       & \linesample{dbl_wiggly}       & "wiggly_len"& \\\hline
%     "zigzag"           & \linesample{zigzag}           & "zigzag_width"& \\\hline
%     "dbl_zigzag"       & \linesample{dbl_zigzag}       & "zigzag_len"& \\\hline
%   \end{tabular}
%   \end{center}
%   \caption{Available line styles}
%   \label{tab:line-styles}
% \end{table}
%
% \begin{table}[t]
%   \begin{center}
%   \begin{tabular}{|l|p{60mm}|}\hline
%     Name         & Explanation \\\hline\hline
%     "tension"    & draw a tighter ($>1$) or more loose ($<1$) arc \\\hline
%     "left"       & draw on a halfcircle on the left \\\hline
%     "right"      & draw on a halfcircle on the right \\\hline
%     "straight"   & draw on a straight line (default) \\\hline
%     "label"      & \TeX{} text for labeling the arc \\\hline
%     "label.side" & force placement of the label on the "left" or
%                   "right" \\\hline
%     "label.dist" & place label at a distance "dist" \\\hline
%     "label.pos"  & relative position of the label
%                    (not implemented yet!) \\\hline
%     "tag"        & optional tag for disambiguating arcs\\\hline
%     "width"      & width of the line\\\hline
%     "rubout"     & scale factor for crossing out lines
%                    (doesn't work properly for doubled lines yet)\\\hline
%     "foreground" & foreground color (\MP{} only!)\\\hline
%     "background" & background color for doubled lines (\MP{} only!)\\\hline
%   \end{tabular}
%   \end{center}
%   \caption{Available line options}
%   \label{tab:line-options}
% \end{table}
%
% \DeleteShortVerb{\"}
% \MakeShortVerb{\|}
%
% \DescribeMacro{\fmf}
% \manindex{labels}
% \manindex{arcs}
% This is the the most frequently used macro in \FMF{} applications.
% \begin{quote}
%   |\fmf{|\meta{style}$[$|,|\meta{opt}$[$|=|\meta{val}$]$|,|\ldots$]$^^A
%     |}{|\meta{v1}|,|\meta{v2}$[$|,|\ldots$]$|}|
% \end{quote}
% connects the vertices \textit{v1,v2,\ldots} with a line of style
% \meta{style}, using a set of options \meta{opt} with (optional)
% value \meta{val}.  If a vertex is not
% known yet, it is added to the diagram.  Note that the actual drawing
% is not done immediately, because the positions can only be
% calculated when \emph{all} vertices are known. The currently
% available styles are collected in table~\ref{tab:line-styles}.  Most
% names should be self explanatory
% and are not discussed further.
% The |dashes|, |dots|, |phantom| and |plain| styles can optionally be
% decorated with an arrow as shown above.  All styles, including
% |curly|, |wiggly| and |zigzag|, can be doubled.  But arrows are not
% available
% for the latter three, because esthetically pleasing results can not be
% expected.  The |phantom|
% style is special, because it
% only enters the vertices and does \emph{not} cause a line to be
% drawn.  This is extremely useful for advanced layout features, as
% explained below.
% If you need a line styles that is not listed in
% table~\ref{tab:line-styles}, see section~\ref{sec:extensions} for
% how to define your own line styles.
% 
% The supported options are collected in
% table~\ref{tab:line-options}\footnote{%
%     One particulary useful further option would be \texttt{smooth},
%     allowing for several lines joined smoothly.  Early
%     experimentation has shown however, that the results are not
%     always what one expects and that there is a lot of room for
%     abuse.}
% Note that each of the dot separated components of the options can be
% abbreviated.  For example, |l.d| is equivalent to |label.dist|.  The
% result of ambiguous matches is however undefined.
%
% Note that because the options are separated by single commata,
% commata inside arguments to options (|label| comes to mind) have to
% be doubled (similar to quotes in Fortran).\footnote{%
%   Note that, as of version 1.03, it is no longer necessary to
%   escape \TeX{} control sequences in arguments.  Old files will
%   continue to work, because \texttt{noexpand} is temporarily
%   disabled.}
%
% Arcs that return to their origin are allowed (I will refer to them
% as \emph{tadpoles}), but some options have slightly different
% semantics.  |tension| is here a inverse scale factor for the
% tadpole, whose
% default size is 2/3 of the average distance the neighboring
% vertices.  If |left| or |right| are specified, they give the direction
% (in degrees) of the preferred gap into which the tadpole is placed.
% By default, the largest gap is chosen for \emph{all} tapoles at a
% given vertex, which will therefore overlap.  This is neither a bug
% nor a feature, but a limitation.
%
% \DescribeMacro{\fmfn}
% \manindex{arcs}
% The macro |\fmfn| is similar to |\fmf|, but
% \begin{quote}
%   |\fmfn{|\meta{style}$[$|,|\meta{opt}$[$|=|\meta{val}$]$|,|\ldots$]$^^A
%     |}{|\meta{v}|}{|\meta{n}|}|
% \end{quote}
% connects the vertices \meta{v$[$1$]$}\ldots\meta{v$[$n$]$}.
%
% \DescribeMacro{\fmfcyclen}
% \DescribeMacro{\fmfrcyclen}
% \manindex{arcs}
% The macro |\fmfcyclen{|\meta{style}|}{|\meta{v}|}{|\meta{n}|}|
% cyclically connects the vertices
% \meta{v$[$1$]$}\ldots\meta{v$[$n$]$}. |\fmfrcyclen| operates in
% reverse order.
%
% \DescribeMacro{\fmfpen}
% Pick up a pen of the specified size.  |\fmfpen{|\meta{weight}|}|
% is used for changing the weight (i.e.~thickness) of the lines.
% Predefined sizes are |thin| and |thick|.
%
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \begin{table}[t]
%   \begin{center}
%   \begin{tabular}{|l|p{60mm}|}\hline
%     Name                 & Explanation \\\hline\hline
%     "label"              & \TeX{} text for labeling the vertex \\\hline
%     "label.angle"        & force placement of the label at the given
%                            angle from the vertex \\\hline
%     "label.dist"         & place label at a distance "dist" \\\hline
%     "decoration.shape"   & shape of decoration \\\hline
%     "decoration.size"    & size of decoration \\\hline
%     "decoration.filled"  & fill, shade or hatch decoration \\\hline
%     "decoration.angle"   & rotate decoration \\\hline
%     "foreground"         & foreground color (\MP{} only!)\\\hline
%     "background"         & background color (\MP{} only!)\\\hline
%   \end{tabular}
%   \end{center}
%   \caption{Available vertex options}
%   \label{tab:vertex-options}
% \end{table}
%
% \DeleteShortVerb{\"}
% \MakeShortVerb{\|}
%
% \DescribeMacro{\fmfv}
% \manindex{internal vertices}
% \manindex{vertices, internal}
% \manindex{labels}
% Declare vertices with options:
% \begin{quote}
%   |\fmfv{|\meta{opt}$[$|=|\meta{val}$][$|,|\meta{opt}$[$|=|\meta{val}$]$^^A
%     |,|\ldots$]$|}{|\meta{v1}$[$|,|\ldots$]$|}|
% \end{quote}
% This is used for adding labels to a vertex and for specifying other
% decoration.  Supported options are collected in
% table~\ref{tab:vertex-options}.  Here the same abbreviation
% mechanism as above is in effect.  The available |shape|s are listed
% in various filling styles in table~\ref{tab:vertex-shapes}\footnote{%
%   If the variable \texttt{feymfwizard} is \texttt{true} (e.g.~after
%   calling the \texttt{\bslash fmfwizard} macro),
%   it is also possible to specify any \MF{} expression that evaluates
%   to a \texttt{path}.  Naturally, this has to used with great care,
%   because strange errors can be triggered by typos!}.
% The tilings |gray10|, |gray25|, |gray75| and |gray90| are available
% in addition to |gray50|.  Customized tilings can be created with
% the \MF{} function |tile_from_string|.  It should be noted however,
% that tilings are gobbling up memory at high speed and should be used
% with discretion.  The halftones\footnote{%
%   \MP{} will give true halftones (if your printer supports them),
%   while \MF{} tries to mimic them.  The dithering algorithm of the
%   latter will be improved in the future.}
% can be accessed by giving any number from 2 to 99, which will denote
% the percentage of saturation ($30\%$ and $70\%$ here)\footnote{%
%   The old numeric arguments in the range $-1\ldots1$ continue to
%   work, but are considered obsolete.}.
% Again, commata inside arguments to options have to be doubled.
%
% \end{fmffile}
% \begin{fmffile}{fmfsamp2}
%
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \def\VertexSample#1#2{%
%   \begin{fmfgraph}(8,8)
%     \fmfforce{(.5w,.4h)}{c}
%     \fmfv{d.shape=#1,d.filled=#2}{c}
%   \end{fmfgraph}}
% \def\VertexSamples#1{%
%   \VertexSample{#1}{full} & \VertexSample{#1}{empty}
%   & \VertexSample{#1}{shaded} & \VertexSample{#1}{hatched}
%   & \VertexSample{#1}{gray50} & \VertexSample{#1}{30}
%   & \VertexSample{#1}{70}}
% \begin{table}[t]
%   \begin{center}
%     \begin{tabular}{|l|c|c|c|c|c|c|c|}\hline
%       "filled="  & "full" & "empty" & "shaded" & "hatched"
%                           & "gray50" & "30" & "70" \\\hline\hline
%       "circle"   & \VertexSamples{circle} \\\hline
%       "square"   & \VertexSamples{square} \\\hline
%       "triangle" & \VertexSamples{triangle} \\\hline
%       "diamond"  & \VertexSamples{diamond} \\\hline
%       "pentagon" & \VertexSamples{pentagon} \\\hline
%       "hexagon"  & \VertexSamples{hexagon} \\\hline
%       "triagram" & \VertexSamples{triagram} \\\hline
%       "tetragram"& \VertexSamples{tetragram} \\\hline
%       "pentagram"& \VertexSamples{pentagram} \\\hline
%       "hexagram" & \VertexSamples{hexagram} \\\hline
%     \end{tabular}
%     \vspace*{\baselineskip}\\
%     \begin{tabular}{|c|c|c|c|}\hline
%        "triacross" & "cross" & "pentacross" & "hexacross" \\\hline\hline
%        \VertexSample{triacross}{1} & \VertexSample{cross}{1}
%        & \VertexSample{pentacross}{1} & \VertexSample{hexacross}{1} \\\hline
%     \end{tabular}
%   \end{center}
%   \caption{Available vertex shapes and fill styles.}
%   \label{tab:vertex-shapes}
% \end{table}
%
% \DeleteShortVerb{\"}
% \MakeShortVerb{\|}
%
% \DescribeMacro{\fmfblob}
% \manindex{blobs}
% Draw a blob of the specified diameter at the vertices. Incidentally,
% \begin{quote}
%   |\fmfblob{|\meta{diameter}|}{|\meta{v1}$[$|,|\ldots$]$|}|
% \end{quote}
% is equivalent to
% \begin{quote}
% \begin{flushleft}
%   |\fmfv{decor.shape=circle,decor.filled=shaded,|\\
%   \qquad |decor.size=|\meta{diameter}|}{|\meta{v1}$[$|,|\ldots$]$|}|
% \end{flushleft}
% \end{quote}
%
% \DescribeMacro{\fmfdot}
% \manindex{dots}
% Draw a dot at the vertices given as arguments.
% \begin{quote}
%   |\fmfdot{|\meta{v1}$[$|,|\ldots$]$|}|
% \end{quote}
% is equivalent to
% \begin{quote}
% \begin{flushleft}
%   |\fmfv{decor.shape=circle,decor.filled=full,|\\
%   \qquad |decor.size=2thick}{|\meta{v1}$[$|,|\ldots$]$|}|
% \end{flushleft}
% \end{quote}
% \DescribeMacro{\fmfvn}
% \manindex{internal vertices}
% \manindex{vertices, internal}
% The macro |\fmfvn| is similar to |\fmfv|, but
% \begin{quote}
%   |\fmfvn{|\meta{opt}$[$|=|\meta{val}$][$|,|^^A
%     \meta{opt}$[$|=|\meta{val}$]$|,|\ldots$]$|}{|\meta{v}|}{|\meta{n}|}|
% \end{quote}
% places the vertices \meta{v$[$1$]$}\ldots\meta{v$[$n$]$}.
%
% \DescribeMacro{\fmfdotn}
% \DescribeMacro{\fmfblobn}
% \manindex{blobs}
% \manindex{dots}
% The macros |\fmfdotn| and |\fmfblobn| are similar to the |\fmfdot|
% and |\fmfblob|, but |\fmfdotn{|\meta{v}|}{|\meta{n}|}| places the
% vertices \meta{v$[$1$]$}\ldots\meta{v$[$n$]$}.  Analogously for
% |\fmfblobn|.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Polygons}
%
% Complex vertices with arcs attached at the corners can be
% contructed with polygons, which share some characteristics with arcs
% and vertices.
%
% \DescribeMacro{\fmfpoly}
% \manindex{polygons}
% The macro
% \begin{quote}
%   |\fmfpoly{|\meta{style}$[$|,|\meta{opt}$[$|=|\meta{val}$]$^^A
%     |,|\ldots$]$|}{|\meta{v1}|,|\meta{v2}$[$|,|\ldots$]$|}|
% \end{quote}
% places the vertices \meta{v1}, \meta{v2}, \ldots{} on the corners of
% a regular polygon.  The orientation of the polygon is fixed to be
% mathematically positive (i.e.~counter clockwise).  Note that this
% can have strange results if the orientation is opposite to the
% orientation of the vertices the corners are connected to.
% The available options are collected in
% table~\ref{tab:polygon-options}. The effects of some options are
% depicted in table~\ref{tab:polygon-shapes}.
%
% Note that is is technically \emph{impossible} to fix the size of a
% polygon.  The size can be controlled by specifying a |tension| for
% the edges, which acts like the |tension| of normal arcs.
%
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \begin{table}[t]
%   \begin{center}
%   \begin{tabular}{|l|p{60mm}|}\hline
%     Name                 & Explanation \\\hline\hline
%     "filled"             & fill, shade or hatch interior \\\hline
%     "phantom"            & don't draw anything \\\hline
%     "empty"              & draw outline \\\hline
%     "shade"              & shade interior \\\hline
%     "hatched"            & hatch interior \\\hline
%     "full"               & fill interior \\\hline
%     "pull"               & pull edges in ($<0$) or out ($>0$) \\\hline
%     "tension"            & tension of the edges \\\hline
%     "smooth"             & draw smoth corners \\\hline
%     "label"              & \TeX{} text for labeling the polygon \\\hline
%     "label.angle"        & force placement of the label at the given
%                            angle from the vertex \\\hline
%     "label.dist"         & place label at a distance "dist" \\\hline
%     "foreground"         & foreground color (\MP{} only!)\\\hline
%     "background"         & background color (\MP{} only!)\\\hline
%   \end{tabular}
%   \end{center}
%   \caption{Available polygon options}
%   \label{tab:polygon-options}
% \end{table}
%
% \def\PolygonSample#1#2{%
%   \begin{fmfgraph}(15,15)
%     \fmfsurroundn{e}{#1}
%     \fmfpolyn{shaded,tension=#2}{z}{#1}
%     \begin{fmffor}{i}{1}{1}{#1}
%       \fmf{plain}{z[i],e[i]}
%     \end{fmffor}
%   \end{fmfgraph}}
% \def\PolygonSamples#1#2#3{%
%   \PolygonSample{#1}{#2,pull=0.75#3}
%     & \PolygonSample{#1}{#2,pull=1.0#3}
%     & \PolygonSample{#1}{#2#3}
%     & \PolygonSample{#1}{#2,pull=1.5#3}}
% \begin{table}[t]
%   \begin{center}
%     \begin{tabular}{|l|c|c|c|c|}\hline
%       "pull="    & 0.75 & 1.0 & "?" & 1.5 \\\hline\hline
%       default    & \PolygonSamples{3}{.1}{}        \\\hline
%       "smooth"   & \PolygonSamples{3}{.1}{,smooth} \\\hline
%       default    & \PolygonSamples{5}{.6}{}        \\\hline
%       "smooth"   & \PolygonSamples{5}{.6}{,smooth} \\\hline
%       default    & \PolygonSamples{7}{1.}{}        \\\hline
%       "smooth"   & \PolygonSamples{7}{1.}{,smooth} \\\hline
%     \end{tabular}
%   \end{center}
%   \caption{Some of the available polygon shapes. Note that
%     \texttt{pull=1.0} is identical to \texttt{pull=?} for straight
%     lines, but very different for \texttt{smooth} lines.}
%   \label{tab:polygon-shapes}
% \end{table}
%
% \DeleteShortVerb{\"}
% \MakeShortVerb{\|}
%
% \DescribeMacro{\fmfpolyn}
% \DescribeMacro{\fmfrpolyn}
% \manindex{polygons}
% The macro |\fmfpolyn{|\meta{style}|}{|\meta{v}|}{|\meta{n}|}|
% is similar to |\fmfpoly| but connects the vertices
% \meta{v$[$1$]$}\ldots\meta{v$[$n$]$}. |\fmfrpolyn| operates in
% reverse order.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Color}
%
% If \MP{} is used for rendering the diagrams, vertices and arcs can
% be colored.  The corresponding options give a warning message under
% \MF{} and are otherwise ignored.
%
% \manindex{color}
% Two colors are available for vertices and arcs: |foreground| and
% |background|.  Both can either be specified as a linear combination
% of the predefined colors |white|, |black|, |red|, |green| and |blue|
% or as RBG triples
% |(|\meta{red}|,|\allowbreak\meta{green}|,|\allowbreak\meta{blue}|)|.
% Note that as always commata have to be doubled in option arguments.
% Therefore both |foreground=|\allowbreak|(1,,0,,1)| and
% |foreground=|\allowbreak|red+|\allowbreak|blue| are 
% valid options setting the foreground color to magenta.
% For arcs, the background color is used only for the interior of
% doubled lines.
%
% While the color feature is rarely used in papers or books, it can
% be very useful for jazzing up your transparencies.  See
% page~\pageref{rainbow} for a not very serious example.
%
% \end{fmffile}
% \begin{fmffile}{fmfsamp3}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Examples}
%
% After the main features of the vertex mode have been introduced, it
% is time for a couple of illustrative examples that are taken from
% \emph{The Real World}.
%
% \begin{examples}{40mm}
%
% As a first example, consider drawing a straightforward box diagram,
% familiar from $K$-$\bar K$, $D$-$\bar D$, and  $B$-$\bar B$ mixing.
% The commands for the labels are not shown here, they are discussed
% in section~\ref{sec:labels}
%
% Let us start the diagram and pick up a thick pen:
% \begin{verbatim}
% \begin{fmfgraph}(40,25)
%   \fmfpen{thick}
% \end{verbatim}
% The incoming and outcoming vertices are placed on the left and
% right hand side, respectively:
% \begin{verbatim}
%   \fmfleft{i1,i2}
%   \fmfright{o1,o2}
% \end{verbatim}
% Now we tell \FMF{} how the arcs are connected.
% \begin{verbatim}
%   \fmf{fermion}{i1,v1,v3,o1}
%   \fmf{fermion}{o2,v4,v2,i2}
%   \fmf{photon}{v1,v2}
%   \fmf{photon}{v3,v4}
% \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph*}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i1,i2}
%       \fmflabel{$\bar{b}$}{i1}
%       \fmflabel{$d$}{i2}
%       \fmfright{o1,o2}
%       \fmflabel{$\bar{d}$}{o1}
%       \fmflabel{$b$}{o2}
%       \fmf{fermion}{i1,v1}
%       \fmf{fermion,label=$\bar{t},,\bar{c},,\bar{u}$,
%                    l.side=right}{v1,v3}
%       \fmf{fermion}{v3,o1}
%       \fmf{fermion}{o2,v4}
%       \fmf{fermion,label=$t,,c,,u$,l.side=right}{v4,v2}
%       \fmf{fermion}{v2,i2}
%       \fmf{photon,label=$W^+$,l.side=left}{v1,v2}
%       \fmf{photon,label=$W^-$,l.side=right}{v3,v4}
%       \fmfdotn{v}{4}
%     \end{fmfgraph*}}
% \label{pg:box}
% Finally we tell \FMF{} to draw dots at the vertices and we're done.
% \begin{verbatim}
%   \fmfdotn{v}{4}
% \end{fmfgraph}
% \end{verbatim}
% \label{page:simple-examples}
% With a little effort the layout of this diagram can actually be
% improved by enlarging the inner box, see page~\pageref{pg:newbox}
% below.
%
% Here is the resonant $s$-channel contribution to $e^+e^-\to 4f$.
% (From now on, we do no longer display the
% \begin{verbatim}
%   \begin{fmfgraph}(40,25)
%     \fmfpen{thick}
%       ...
%   \end{fmfgraph}
% \end{verbatim}
% environment surrounding all pictures.)
% \begin{verbatim}
%   \fmfleftn{i}{2}
%   \fmfrightn{o}{4}
%     \fmf{fermion}{i1,v1,i2}
%   \fmf{photon}{v1,v2}
%   \fmfblob{.15w}{v2}
%     \fmf{photon}{v2,v3}
%       \fmf{fermion}{o1,v3,o2}
%     \fmf{photon}{v2,v4}
%       \fmf{fermion}{o4,v4,o3}
% \end{verbatim}
%   \marginexample{%
%       \begin{fmfgraph*}(40,25)
%         \fmfpen{thick}
%         \fmfleftn{i}{2}
%         \fmfrightn{o}{4}
%           \fmflabel{$e_-$}{i1}
%           \fmflabel{$e_+$}{i2}
%           \fmf{fermion}{i1,v1,i2}
%         \fmf{photon}{v1,v2}
%         \fmfblob{.15w}{v2}
%           \fmf{photon}{v2,v3}
%             \fmflabel{$\mu_+$}{o1}
%             \fmflabel{$\nu_\mu$}{o2}
%             \fmf{fermion}{o1,v3,o2}
%           \fmf{photon}{v2,v4}
%             \fmflabel{$\bar{c}$}{o4}
%             \fmflabel{$s$}{o3}
%             \fmf{fermion}{o4,v4,o3}
%       \end{fmfgraph*}}
%
% And the resonant $t$-channel contribution:
% \begin{verbatim}
%   \fmfleftn{i}{2}
%   \fmfrightn{o}{4}
%   \fmf{fermion}{i1,v1,v2,i2}
%     \fmf{photon}{v1,v3}
%       \fmf{fermion}{o1,v3,o2}
%     \fmf{photon}{v2,v4}
%       \fmf{fermion}{o4,v4,o3}
% \end{verbatim}
%   \marginexample{%
%       \begin{fmfgraph*}(40,25)
%         \fmfpen{thick}
%         \fmfleftn{i}{2}
%         \fmfrightn{o}{4}
%         \fmflabel{$e_-$}{i1}
%         \fmflabel{$e_+$}{i2}
%         \fmf{fermion}{i1,v1,v2,i2}
%           \fmf{photon}{v1,v3}
%             \fmflabel{$\mu_+$}{o1}
%             \fmflabel{$\nu_\mu$}{o2}
%             \fmf{fermion}{o1,v3,o2}
%           \fmf{photon}{v2,v4}
%             \fmflabel{$\bar{c}$}{o4}
%             \fmflabel{$s$}{o3}
%             \fmf{fermion}{o4,v4,o3}
%       \end{fmfgraph*}}
%
% Two point loop diagrams pose another set of problems.  We
% must have a way of specifying that one or more of the lines
% connecting the two vertices are \emph{not} connected by a straight
% line.  The options |left|, |right| and |straight| offer the
% possibility to connect two vertices by a semicircle detour, either
% on the left or on the right.  Since by default all lines contribute
% to the tension between two vertices, the |tension| option allows us
% to reduce this tension.  The next examples shows both options in
% action.  The lower fermion line is given an tension of~$1/3$ to
% make is symmetrical with the upper line with consists of three parts.
% The loop photon is using a detour on the right and does not
% contribute any tension.
% \begin{verbatim}
%   \fmfleft{i1,i2}
%   \fmfright{o1}
%   \fmf{fermion,tension=1/3}{i1,v1}
%   \fmf{plain}{v1,v2}
%   \fmf{fermion}{v2,v3}
%   \fmf{photon,right,tension=0}{v2,v3}
%   \fmf{plain}{v3,i2}
%   \fmf{photon}{v1,o1}
% \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph*}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i1,i2}
%       \fmflabel{$p^{\prime}$}{i1}
%       \fmflabel{$p$}{i2}
%       \fmfright{o1}
%       \fmf{fermion,tension=1/3}{i1,v1}
%       \fmf{plain}{v1,v2}
%       \fmf{fermion,label=$p-k$,l.side=left}{v2,v3}
%       \fmf{photon,right,tension=0,label=$k$}{v2,v3}
%       \fmf{plain}{v3,i2}
%       \fmf{photon}{v1,o1}
%     \end{fmfgraph*}}
% The optional argument to |left| and |right| can be used to deform the
% corresponding contour as in the following example.
% The default value of |left| and |right| is 1.
% \begin{verbatim}
%   \fmfleft{i} \fmfright{o}
%   \fmf{plain}{i,v1} \fmf{plain}{v2,o}
%   \fmf{dots,left=.5,tension=0.3}{v1,v2,v1}\fmffreeze
%   \fmf{plain,left}{v1,v2,v1}
%   \fmf{dashes,left=1.5}{v1,v2,v1}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,30)
%     \fmfpen{thick}
%     \fmfleft{i} \fmfright{o}
%     \fmf{plain}{i,v1} \fmf{plain}{v2,o}
%     \fmf{dots,left=.5,tension=0.3}{v1,v2,v1}\fmffreeze
%     \fmf{plain,left}{v1,v2,v1}
%     \fmf{dashes,left=1.5}{v1,v2,v1}
%   \end{fmfgraph}}
%
% Polygons are particulary useful for depicting non-perturbative
% contributions: 
% \begin{verbatim}
%     \fmfpen{thick}
%     \fmfleftn{l}{2}\fmfrightn{r}{2}
%     \fmfrpolyn{shaded,label=$\Gamma$}{G}{4}
%     \fmfpolyn{empty,label=$K$}{K}{4}
%     \fmf{fermion}{l1,G1}\fmf{fermion}{l2,G2}
%     \fmf{fermion}{K1,r1}\fmf{fermion}{K2,r2}
%     \fmf{fermion,left=.5,tension=.5}{G3,K3}
%     \fmf{fermion,right=.5,tension=.5}{G4,K4}
% \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph*}(40,25)
%       \fmfpen{thick}
%       \fmfleftn{l}{2}\fmfrightn{r}{2}
%       \fmfrpolyn{shaded,label=$\Gamma$}{G}{4}
%       \fmfpolyn{empty,label=$K$}{K}{4}
%       \fmf{fermion}{l1,G1}\fmf{fermion}{l2,G2}
%       \fmf{fermion}{K1,r1}\fmf{fermion}{K2,r2}
%       \fmf{fermion,left=.5,tension=.5}{G3,K3}
%       \fmf{fermion,right=.5,tension=.5}{G4,K4}
%     \end{fmfgraph*}}
%
% To conclude this first picture show, here's a self energy in
% scalar $\phi^4$-theory showing the simplicity of the tadpole
% feature:
% \begin{verbatim}
%   \fmfpen{thick}
%   \fmfleft{i}
%   \fmfright{o}
%   \fmf{plain}{i,v,v,o}
%   \fmfdot{v}
% \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i}
%       \fmfright{o}
%       \fmf{plain}{i,v,v,o}
%       \fmfdot{v}
%     \end{fmfgraph}}
% \manindex{tadpoles}
% Scalar $\phi^6$-theory needs a little manual intervention to force
% the second on the opposite side:
% \begin{verbatim}
%   \fmfpen{thick}
%   \fmfleft{i}
%   \fmfright{o}
%   \fmf{plain}{i,v,v,o}
%   \fmf{plain,left=90}{v,v}
%   \fmfdot{v}
% \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i}
%       \fmfright{o}
%       \fmf{plain}{i,v,v,o}
%       \fmf{plain,left=90}{v,v}
%       \fmfdot{v}
%     \end{fmfgraph}}
%
% \end{examples}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Labels}
% \label{sec:labels}
%
% Let us now come back to the examples on
% page~\pageref{page:simple-examples} and discuss how to add the
% labels.
%
% \DescribeMacro{\fmflabel}
% \manindex{labels}
% The macro 
% \begin{quote}
%   |\fmflabel{|\meta{label}|}{|\meta{v}|}|  
% \end{quote}
% is equivalent to
% \begin{quote}
%   |\fmfv{label=|\meta{label}|}{|\meta{v}|}|
% \end{quote}
% and adds the label
% \meta{label} to the vertex \meta{v}.  In the current implementation,
% there can be only a single label for each vertex.  Thus earlier
% calls to |\fmflabel| for the same vertex will be overwritten.
% \meta{label} will be placed with the |\put| command of the \LaTeX{}
% |picture| environment.\footnote{%
%   Note again that, as of version 1.03, it is no longer necessary to
%   escape \TeX{} control sequences in arguments.  Old files will
%   continue to work, because \texttt{noexpand} is temporarily
%   disabled.}
% Note that the |fmfgraph*| environment must be used to use labels,
% they will silently disappear in |fmfgraph|.
%
% |\fmflabel| gives the user \emph{no} control on the placement of
% the the label (use the |\fmfv| macro for a more fine-grained
% control).  The label is placed using the
% following algorithm:
% \begin{enumerate}
%   \item{} The reference point of the box containing \meta{label} is
%     placed at the distance |3thick| on the continuation of the
%     straight line connecting the center of the picture with the
%     vertex \meta{v}.
%   \item{} The reference point of the box is chosen such that the
%     contents of the box is on the outside of the vertex (with
%     respect to the center of the diagram).  It is chosen from the
%     four corners and the four midpoints of the sides.
% \end{enumerate}
%
% Therefore the four external particles in the~$B$-$\bar B$ mixing
% diagram on page~\pageref{page:simple-examples} are labelled simply
% by:
% \begin{verbatim}
%   \fmflabel{$\bar{b}$}{i1}
%   \fmflabel{$d$}{i2}
%   \fmflabel{$\bar{d}$}{o1}
%   \fmflabel{$b$}{o2}
% \end{verbatim}
%
% \begin{examples}{40mm}
% \manindex{labels}
% Here is a more systematical demonstration of the default placement
% of labels:
% \begin{verbatim}
%   \fmfsurroundn{v}{8}\fmfdotn{v}{8}
%   \fmflabel{$v_1$}{v1}
%   \fmflabel{$v_2$}{v2}
%   \fmflabel{$v_3$}{v3}
%   \fmflabel{$v_4$}{v4}
%   \fmflabel{$v_5$}{v5}
%   \fmflabel{$v_6$}{v6}
%   \fmflabel{$v_7$}{v7}
%   \fmflabel{$v_8$}{v8}
% \end{verbatim}
%   \marginexample{%
%   \begin{fmfgraph*}(40,30)
%     \fmfsurroundn{v}{8}\fmfdotn{v}{8}
%     \fmflabel{$v_1$}{v1}
%     \fmflabel{$v_2$}{v2}
%     \fmflabel{$v_3$}{v3}
%     \fmflabel{$v_4$}{v4}
%     \fmflabel{$v_5$}{v5}
%     \fmflabel{$v_6$}{v6}
%     \fmflabel{$v_7$}{v7}
%     \fmflabel{$v_8$}{v8}
%   \end{fmfgraph*}}
% And here is a demonstration of the explicit placement of
% labels\footnote{%
%   Don't be confused by the \texttt{\bslash fmfiv} command.  It is
%   described below (see section~\ref{sec:fmfiv}) and takes the same
%   arguments as the  \texttt{\bslash fmfv} command.  We use it here
%   for convenience to place multiple vertices at the same point,
%   i.e.~the center.}:
% \begin{verbatim}
%   \fmfiv{d.sh=circle,d.f=1,d.si=2thin}{c}
%   \fmfiv{l=-120,l.a=-120,l.d=.2w}{c}
%   \fmfiv{l=-60,l.a=-60,l.d=.2w}{c}
%   \fmfiv{l=0,l.a=0,l.d=.2w}{c}
%   \fmfiv{l=60,l.a=60,l.d=.2w}{c}
%   \fmfiv{l=120,l.a=120,l.d=.2w}{c}
%   \fmfiv{l=180,l.a=180,l.d=.2w}{c}
% \end{verbatim}
%   \marginexample{%
%   \begin{fmfgraph*}(40,30)
%     \fmfiv{d.sh=circle,d.f=1,d.si=2thin}{c}
%     \fmfiv{l=-120,l.a=-120,l.d=.2w}{c}
%     \fmfiv{l=-60,l.a=-60,l.d=.2w}{c}
%     \fmfiv{l=0,l.a=0,l.d=.2w}{c}
%     \fmfiv{l=60,lab.ang=60,l.d=.2w}{c}
%     \fmfiv{l=120,l.a=120,l.d=.2w}{c}
%     \fmfiv{l=180,l.a=180,l.d=.2w}{c}
%   \end{fmfgraph*}}
%
% \end{examples}
%
% There is no equivalent to |\fmflabel| for arcs.  Here options to the
% |\fmf| command have to be used.  The default placement rules put the
% label on the outside at the midpoint of a curved arc.  If the arc is
% straight, one should use the |label.side| option to push the label
% either to the |left| or to the |right|.  This |label.dist| option is
% treated analogously to same option for vertices.
%
% Therefore the four internal particles in the~$B$-$\bar B$ mixing
% diagram on page~\pageref{page:simple-examples} are labelled simply
% by adding options to the |\fmf| commands:
% \manindex{labels}
% \begin{verbatim}
%   \fmf{fermion,label=$\bar{t},,\bar{c},,\bar{u}$,
%                label.side=right}{v1,v3}
%   \fmf{fermion,label=$t,,c,,u$,label.side=right}{v4,v2}
%   \fmf{photon,label=$W^+$,label.side=left}{v1,v2}
%   \fmf{photon,label=$W^-$,label.side=right}{v3,v4}
% \end{verbatim}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Manipulating the layout}
%
% The automatic layout algorithms of \FMF{} are rather simple,
% therefore it is sometimes necessary to allow for manual intervention
% from time to time.
%
% \DescribeMacro{\fmffreeze}
% Calculate the positions of the vertices based on the arcs which are
% defined up to this point.  Usually this calculation is performed
% automatically at the end of the |fmfgraph| environment. Calling it
% explicitely is useful for later adding arcs that should not enter
% the calculation .  The layout is chosen to minimize the overall
% length of all arcs.  The length of each arc is weighted with the
% |tension| option, whose default value is 1.
% See section~\ref{sec:skeletons} for more information on
% |\fmffreeze|. 
%
% \DescribeMacro{\fmfforce}
% |\fmfforce{|\meta{pos}|}{|\meta{v1}\allowbreak$[$|,|\ldots$]$|}|
% forces the position \meta{pos} of the vertices \meta{v1}\ldots,
% bypassing and overwriting the automatic layout.  In all arguments
% that are \MF{} |pair|s (i.e.~points), you can use the variable |w|
% and |h|, which are predefined to the width and the height of the
% whole
% diagram respectively.  E.g.~the center is specified as |(.5w,.5h)|
% and the lower right corner as |(w,0)|.
% The center and the four corners of the current subgraph (see the
% \texttt{fmfsubgraph} environment on page~\pageref{fmfsubgraph}) are
% available as |c|, |nw|, |ne|, |sw| and |se| (for \emph{north-west}
% etc).
%
% \DescribeMacro{\fmfshift}
% |\fmfshift{|\meta{dist}|}{|\meta{v1}\allowbreak$[$|,|\ldots$]$|}|
% shifts the position of the vertices \meta{v1}\ldots{} by \meta{dist}
% from the automatic layout.  This command is only useful \emph{after}
% a |\fmffreeze| of the corresponding vertex.
%
% \DescribeMacro{\fmffixed}
% |\fmffixed{|\meta{dist}|}{|\meta{v1}\allowbreak$[$|,|\ldots$]$|}|
% fixes the distance between subsequent vertices in the list
% \meta{v1}\ldots{} to \meta{dist}.
% This command should be used with care, because it is possible to
% overconstrain the layout of the graph and the error messages will be
% obscure for a novice user.
%
% \DescribeMacro{\fmffixedx}
% \DescribeMacro{\fmffixedy}
% |\fmffixedx{|\meta{dx}|}{|\meta{v1}\allowbreak$[$|,|\ldots$]$|}|
% is identical to
% |\fmffixed{(|\meta{dx}|,whatever)}{|\meta{v1}\allowbreak
%   $[$|,|\ldots$]$|}|
% and |\fmffixedy{|\meta{dy}|}{|\meta{v1}\allowbreak$[$|,|\ldots$]$|}|
% is identical to
% |\fmffixed{(whatever,|\meta{dy}|)}{|\meta{v1}\allowbreak
%   $[$|,|\ldots$]$|}|.  These commands can be used to fix relative
% positions in one coordinate, while allowing movement in the other
% coordinate.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Skeletons}
% \label{sec:skeletons}
%
% The single most powerful concept for adjusting \FMF's layout
% decisions is the use of \emph{skeletons}.  By issuing a
% |\fmffreeze| after specifying a subgraph (skeleton), we can fix the
% location of the skeleton \emph{as if} the other arcs were not there.
% We can then successively add more subgraphs whose layout will be
% chosen with the skeleton remaining fixed. Similar effects can be
% achieved by giving some arcs a vanishing |tension|. 
%
% \begin{examples}{40mm}
%
% Consider the following example: suppose we want to draw a ladder
% diagram contributing to the quark form factor.  Simply linking in
% the gluons does not produce a satisfactory result:
%   \begin{verbatim}
%     \fmfleft{i1} \fmfright{o1,o2}
%     \fmf{photon}{i1,v4}
%     \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%     \fmf{gluon}{v1,v7}
%     \fmf{gluon}{v2,v6}
%     \fmf{gluon}{v3,v5}
%   \end{verbatim}
%   \marginexample{%
%    \begin{fmfgraph}(40,25)
%      \fmfpen{thick}
%      \fmfleft{i1} \fmfright{o1,o2}
%      \fmf{photon}{v4,i1}
%      \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%      \fmf{gluon}{v1,v7}
%      \fmf{gluon}{v2,v6}
%      \fmf{gluon}{v3,v5}
%    \end{fmfgraph}}
% What went wrong?  Obviously the gluons are bonding the quark lines
% too strongly.  The fix is simple: just create a skeleton excluding
% the gluons
%   \begin{verbatim}
%     \fmfleft{i1} \fmfright{o1,o2}
%     \fmf{photon}{i1,v4}
%     \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%   \end{verbatim}
%   \marginexample{
%    \begin{fmfgraph}(40,25)
%      \fmfpen{thick}
%      \fmfleft{i1} \fmfright{o1,o2}
%      \fmf{photon}{v4,i1}
%      \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%    \end{fmfgraph}}
% and add the gluons later:
%   \begin{verbatim}
%     \fmfleft{i1} \fmfright{o1,o2}
%     \fmf{photon}{i1,v4}
%     \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%     \fmffreeze
%     \fmf{gluon}{v1,v7}
%     \fmf{gluon}{v2,v6}
%     \fmf{gluon}{v3,v5}
%   \end{verbatim}
%   \marginexample{
%    \begin{fmfgraph}(40,25)
%      \fmfpen{thick}
%      \fmfleft{i1} \fmfright{o1,o2}
%      \fmf{photon}{v4,i1}
%      \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%      \fmffreeze
%      \fmf{gluon}{v1,v7}
%      \fmf{gluon}{v2,v6}
%      \fmf{gluon}{v3,v5}
%    \end{fmfgraph}}
% Alternatively, we can use a vanishing |tension|, which will
% effectively exclude the gluons from the layout decisions:
%   \begin{verbatim}
%     \fmfleft{i1} \fmfright{o1,o2}
%     \fmf{photon}{i1,v4}
%     \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%     \fmf{gluon,tension=0}{v1,v7}
%     \fmf{gluon,tension=0}{v2,v6}
%     \fmf{gluon,tension=0}{v3,v5}
%   \end{verbatim}
%   \marginexample{
%    \begin{fmfgraph}(40,25)
%      \fmfpen{thick}
%      \fmfleft{i1} \fmfright{o1,o2}
%      \fmf{photon}{v4,i1}
%      \fmf{quark}{o1,v1,v2,v3,v4,v5,v6,v7,o2}
%      \fmf{gluon,tension=0}{v1,v7}
%      \fmf{gluon,tension=0}{v2,v6}
%      \fmf{gluon,tension=0}{v3,v5}
%    \end{fmfgraph}}
% Which method is more intuitve is largely a matter of taste and at
% the discretion of the user.
%
% The ``crossed'' version of this diagram is best drawn using the
% |rubout| option:
%   \begin{verbatim}
%     \fmfleft{i1} \fmfright{o1,o2}
%     \fmf{photon}{i1,v3}
%     \fmf{quark}{o1,v1,v2,v3,v4,v5,o2}
%     \fmffreeze
%     \fmf{gluon}{v1,v4}
%     \fmf{gluon,rubout}{v2,v5}
%   \end{verbatim}
%   \marginexample{
%    \begin{fmfgraph}(40,25)
%      \fmfpen{thick}
%      \fmfleft{i1} \fmfright{o1,o2}
%      \fmf{photon}{i1,v3}
%      \fmf{quark}{o1,v1,v2,v3,v4,v5,o2}
%      \fmffreeze
%      \fmf{gluon}{v1,v4}
%      \fmf{gluon,rubout}{v2,v5}
%    \end{fmfgraph}}
% If |rubout| is selected, it defaults to~2, but it can be changed to
% any (reasonable) value~$>1$.  The current implementation should work
% for almost all user-defined line styles.  However, it does not work
% correctly for the predefined |double| line styles yet.
%
% Another instructive example is the following: imagine you want to
% draw a typical non-resonant contribution to~$e^+e^-\to 4f$.  The
% obvious solution doesn't look right:
%   \begin{verbatim}
%     \fmfleft{i1,i2}
%     \fmfright{o1,o2,o3,o4}
%     \fmf{fermion}{i1,v1,i2}
%     \fmf{boson}{v1,v2}
%     \fmf{fermion}{o1,v2,v3,o4}
%     \fmf{boson}{v3,v4}
%     \fmf{fermion}{o3,v4,o2}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i1,i2}
%       \fmfright{o1,o2,o3,o4}
%       \fmf{fermion}{i1,v1,i2}
%       \fmf{boson}{v1,v2}
%       \fmf{fermion}{o1,v2,v3,o4}
%       \fmf{boson}{v3,v4}
%       \fmf{fermion}{o3,v4,o2}
%     \end{fmfgraph}}
% Again, we should start with a skeleton
%   \begin{verbatim}
%     \fmfleft{i1,i2}
%     \fmfright{o1,o2,o3,o4}
%     \fmf{fermion}{i1,v1,i2}
%     \fmf{boson}{v1,v2}
%     \fmf{fermion}{o1,v2,v3,o4}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i1,i2}
%       \fmfright{o1,o2,o3,o4}
%       \fmf{fermion}{i1,v1,i2}
%       \fmf{boson}{v1,v2}
%       \fmf{fermion}{o1,v2,v3,o4}
%     \end{fmfgraph}}
% and add the second $W$ later:
%   \begin{verbatim}
%     \fmfleft{i1,i2}
%     \fmfright{o1,o2,o3,o4}
%     \fmf{fermion}{i1,v1,i2}
%     \fmf{boson}{v1,v2}
%     \fmf{fermion}{o1,v2,v3,o4}
%     \fmffreeze
%     \fmf{boson}{v3,v4}
%     \fmf{fermion}{o3,v4,o2}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i1,i2}
%       \fmfright{o1,o2,o3,o4}
%       \fmf{fermion}{i1,v1,i2}
%       \fmf{boson}{v1,v2}
%       \fmf{fermion}{o1,v2,v3,o4}
%       \fmffreeze
%       \fmf{boson}{v3,v4}
%       \fmf{fermion}{o3,v4,o2}
%     \end{fmfgraph}}
%
% Here's another example that uses stretchable arcs.  Diagrams
% of this kind are known as \emph{rainbow} diagrams.  If you're using
% \MP{} and are watching this on a color device, you'll see why.
%   \begin{verbatim}
%     \fmfpen{thick}
%     \fmfleft{i1,d1}
%     \fmfright{o1,d2}
%     \fmfn{plain}{i}{4}
%     \fmf{plain}{i4,v,o4}
%     \fmfn{plain}{o}{4}
%     \fmffreeze
%     \fmf{gluon,left,fore=red}{i1,o1}
%     \fmf{gluon,left,fore=green}{i2,o2}
%     \fmf{gluon,left,fore=blue}{i3,o3}
%     \fmfdotn{i}{3}
%     \fmfdotn{o}{3}
%     \fmfv{d.sh=circle,d.f=empty,d.si=.2w,b=(1,,0,,1),
%           l=$\Sigma$}{v}
%   \end{verbatim}
%   \marginexample{%
%     \label{rainbow}
%     \begin{fmfgraph*}(40,25)
%       \fmfpen{thick}
%       \fmfleft{i1,d1}
%       \fmfright{o1,d2}
%       \fmfn{plain}{i}{4}
%       \fmf{plain}{i4,v,o4}
%       \fmfn{plain}{o}{4}
%       \fmffreeze
%       \fmf{gluon,left,fore=red}{i1,o1}
%       \fmf{gluon,left,fore=green}{i2,o2}
%       \fmf{gluon,left,fore=blue}{i3,o3}
%       \fmfdotn{i}{3}
%       \fmfdotn{o}{3}
%       \fmfv{d.sh=circle,d.f=empty,d.si=.2w,b=(1,,0,,1),
%             l=$\Sigma$,l.d=0}{v}
%     \end{fmfgraph*}}
%
% \end{examples}
%
% Experience has shown that the method advocated in this section is
% more effective than fuzzing around with fractional |tension|
% parameters.  Using |\fmfshift| or |\fmfforce| should be
% a last resort only.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Pulling strings}
% \label{sec:strings}
%
% If you add to any arc one or more |phantom| arcs they will cause
% a tighter bonding between the vertices involved
% \begin{verbatim}
%   \fmf{fermion}{v1,v2}
%   \fmf{phantom}{v1,v2}
% \end{verbatim}
% which is equivalent to
% \begin{verbatim}
%   \fmf{fermion,tension=2}{v1,v2}
% \end{verbatim}
% The |phantom| arc has to be added \emph{before} any |\fmffreeze|
% involving these vertices, of course.
%
% \begin{examples}{40mm}
%
% Here is an example from deep inelastic scattering\footnote{%
%   Don't be confused by the \texttt{\bslash fmfi} command.  It is
%   described below (see section~\ref{sec:fmfi}) and takes the same
%   arguments as the \texttt{\bslash fmfv} command.  We use it here
%   for adding to more lines parallel to the incoming proton line.
%   They do not enter the layout decisions.}:
%   \begin{verbatim}
%     \fmfleft{ip,il}
%     \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
%     \fmf{fermion}{ip,vp,vq,oq3}
%     \fmf{fermion}{vp,oq1}
%     \fmf{fermion}{vp,oq2}
%     \fmf{photon}{vl,vq}
%     \fmf{fermion}{il,vl,ol}
%     \fmfblob{.15w}{vp}
%     \fmfdot{vq,vl}
%     \fmffreeze
%     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
%     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{ip,il}
%       \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
%       \fmf{fermion}{ip,vp,vq,oq3}
%       \fmf{fermion}{vp,oq1}
%       \fmf{fermion}{vp,oq2}
%       \fmf{photon}{vl,vq}
%       \fmf{fermion}{il,vl,ol}
%       \fmfblob{.15w}{vp}
%       \fmfdot{vq,vl}
%       \fmffreeze
%       \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
%       \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
%     \end{fmfgraph}}
% As it stands, all vertices come out too far to the right, because
% the greater number of outgoing lines pulls them over.  Adding
% |\fmf{phantom}| makes the bond between the incoming vertices and the
% interactions tighter and produces a better balanced picture:
%   \begin{verbatim}
%     \fmfleft{ip,il}
%     \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
%     \fmf{fermion}{ip,vp,vq,oq3}
%     \fmf{phantom}{ip,vp}
%     \fmf{fermion}{vp,oq1}
%     \fmf{fermion}{vp,oq2}
%     \fmf{photon}{vl,vq}
%     \fmf{fermion}{il,vl,ol}
%     \fmf{phantom}{il,vl}
%     \fmfblob{.15w}{vp}
%     \fmfdot{vq,vl}
%     \fmffreeze
%     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
%     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{ip,il}
%       \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
%       \fmf{fermion}{ip,vp,vq,oq3}
%       \fmf{phantom}{ip,vp}
%       \fmf{fermion}{vp,oq1}
%       \fmf{fermion}{vp,oq2}
%       \fmf{photon}{vl,vq}
%       \fmf{fermion}{il,vl,ol}
%       \fmf{phantom}{il,vl}
%       \fmfblob{.15w}{vp}
%       \fmfdot{vq,vl}
%       \fmffreeze
%       \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
%       \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
%     \end{fmfgraph}}
% Equivalently, we could add |tension| to the lines in question and we
% will get the same result:
%   \begin{verbatim}
%     \fmfleft{ip,il}
%     \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
%     \fmf{fermion,tension=2}{ip,vp}
%     \fmf{fermion}{vp,vq,oq3}
%     \fmf{fermion}{vp,oq1}
%     \fmf{fermion}{vp,oq2}
%     \fmf{photon}{vl,vq}
%     \fmf{fermion,tension=2}{il,vl}
%     \fmf{fermion}{vl,ol}
%     \fmfblob{.15w}{vp}
%     \fmfdot{vq,vl}
%     \fmffreeze
%     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
%     \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph}(40,25)
%       \fmfpen{thick}
%       \fmfleft{ip,il}
%       \fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
%       \fmf{fermion,tension=2}{ip,vp}
%       \fmf{fermion}{vp,vq,oq3}
%       \fmf{fermion}{vp,oq1}
%       \fmf{fermion}{vp,oq2}
%       \fmf{photon}{vl,vq}
%       \fmf{fermion,tension=2}{il,vl}
%       \fmf{fermion}{vl,ol}
%       \fmfblob{.15w}{vp}
%       \fmfdot{vq,vl}
%       \fmffreeze
%       \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
%       \fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
%     \end{fmfgraph}}
% \end{examples}
%
% Conversely, specifing a |tension| $<1$ will make the corresponding
% arcs more loose.
%
% \begin{examples}{40mm}
%
% Reconsider the box graph on page~\pageref{pg:box} and reduce the
% tension on the inner lines\footnote{%
%   Now that you know, I have also displayed the \texttt{label}
%   options used.}
% \begin{verbatim}
%   \fmfleft{i1,i2}
%   \fmflabel{$\bar{b}$}{i1}
%   \fmflabel{$d$}{i2}
%   \fmfright{o1,o2}
%   \fmflabel{$\bar{d}$}{o1}
%   \fmflabel{$b$}{o2}
%   \fmf{fermion}{i1,v1}
%   \fmf{fermion,tension=.5,label=$\bar{t},,\bar{c},,\bar{u}$,
%                l.side=right}{v1,v3}
%   \fmf{fermion}{v3,o1}
%   \fmf{fermion}{o2,v4}
%   \fmf{fermion,tension=.5,label=$t,,c,,u$,l.side=right}{v4,v2}
%   \fmf{fermion}{v2,i2}
%   \fmf{photon,tension=.2,label=$W^+$,l.side=left}{v1,v2}
%   \fmf{photon,tension=.2,label=$W^-$,l.side=right}{v3,v4}
%   \fmfdotn{v}{4}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph*}(40,25)
%     \fmfpen{thick}
%     \fmfleft{i1,i2}
%     \fmflabel{$\bar{b}$}{i1}
%     \fmflabel{$d$}{i2}
%     \fmfright{o1,o2}
%     \fmflabel{$\bar{d}$}{o1}
%     \fmflabel{$b$}{o2}
%     \fmf{fermion}{i1,v1}
%     \fmf{fermion,tension=.5,label=$\bar{t},,\bar{c},,\bar{u}$,
%                  l.side=right}{v1,v3}
%     \fmf{fermion}{v3,o1}
%     \fmf{fermion}{o2,v4}
%     \fmf{fermion,tension=.5,label=$t,,c,,u$,l.side=right}{v4,v2}
%     \fmf{fermion}{v2,i2}
%     \fmf{photon,tension=.2,label=$W^+$,l.side=left}{v1,v2}
%     \fmf{photon,tension=.2,label=$W^-$,l.side=right}{v3,v4}
%     \fmfdotn{v}{4}
%   \end{fmfgraph*}}
% \label{pg:newbox}
% This result is much nicer than the original.
%
% \end{examples}
% \end{fmffile}
%
% \begin{fmffile}{fmfsamp4}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Miscellaneous commands}
%
% \subsubsection{Graphs in graphs}
%
% \DescribeEnv{fmfsubgraph}
% \label{fmfsubgraph}
% \manindex{subgraphs}
% The |fmfsubgraph| environment contains a subgraph, for which the
% galleries will be placed inside the rectangle of width \meta{width}
% and height \meta{height}, with lower left corner
% at~$(\meta{x},\meta{y})$:
% \begin{quote}
% \begin{flushleft}
%   |\begin{fmfsubgraph}(|\meta{x}|,|\meta{y}|)(|^^A
%     \meta{width}|,|\meta{height}|)|\\
%   \qquad \meta{body}\\
%   |\end{fmfsubgraph}|
% \end{flushleft}
% \end{quote}
% The center and four corners are available
% as |c|, |nw|, |ne|, |sw| and |se| (for \emph{north-west} etc).
% Because of the restrictions on the overall size of the diagram in
% \MF, this environment will, mainly be useful for preparing
% transparencies with \MP.
%
% \begin{examples}{40mm}
%
% Here is a not very serious application of this feature:
% \begin{verbatim}
%   \def\subgraphsample#1{%
%     \fmfleftn{#1i}{2}%
%     \fmfrightn{#1o}{2}%
%     \fmf{plain}{#1i1,#1v1}%
%     \fmf{plain}{#1o1,#1v2}%
%     \fmf{plain}{#1o2,#1v3}%
%     \fmf{plain}{#1i2,#1v4}%
%     \fmfcyclen{plain,tension=0.3}{#1v}{4}}
%   \begin{fmfgraph}(40,30)
%     \subgraphsample{a}
%     \begin{fmfsubgraph}(.3w,.3h)(.4w,.4h)
%       \subgraphsample{b}
%     \end{fmfsubgraph}
%     \begin{fmfsubgraph}(.45w,.45h)(.1w,.1h)
%       \subgraphsample{c}
%     \end{fmfsubgraph}
%   \end{fmfgraph}
% \end{verbatim}
% \marginexample{%
%   \def\subgraphsample#1{%
%     \fmfleftn{#1i}{2}%
%     \fmfrightn{#1o}{2}%
%     \fmf{plain}{#1i1,#1v1}%
%     \fmf{plain}{#1o1,#1v2}%
%     \fmf{plain}{#1o2,#1v3}%
%     \fmf{plain}{#1i2,#1v4}%
%     \fmfcyclen{plain,tension=0.3}{#1v}{4}}
%   \begin{fmfgraph}(40,30)
%     \subgraphsample{a}
%     \begin{fmfsubgraph}(.3w,.3h)(.4w,.4h)
%       \subgraphsample{b}
%     \end{fmfsubgraph}
%     \begin{fmfsubgraph}(.45w,.45h)(.1w,.1h)
%       \subgraphsample{c}
%     \end{fmfsubgraph}
%   \end{fmfgraph}}
% More serious applications will use this feature to group together
% related diagrams and use other \MF{} drawing commands for
% graphical elements that are not available in the \LaTeX{} |picture|
% environment.
%
% \end{examples}
%
% \subsubsection{Reusing diagrams}
%
% \DescribeMacro{\fmfkeep}
% \DescribeMacro{\fmfreuse}
% After saving a pointer with |\fmfkeep{|\meta{name}|}| inside a
% |fmfgraph| or |fmfgraph*| environment, the diagram can be reused later
% by |\fmfreuse{|\meta{name}|}|.  This works across |fmffile|
% environments.
%
% Here's an example that uses centered |\parbox|es to place
% diagrams into equations.  The celebrated cancelation of quadratic
% divergencies in scalar selfenergies in supersymmetric field theories
% can be written as:
% \begin{verbatim}
% \begin{eqnarray}
%   \parbox{20mm}{\begin{fmfgraph}(20,15)\fmfkeep{boson}
%     \fmfleft{i} \fmfright{o} \fmf{dashes}{i,v,v,o}
%   \end{fmfgraph}} & \propto & \Lambda^2 \\
%   \parbox{20mm}{\begin{fmfgraph}(20,15)\fmfkeep{fermion}
%     \fmfleft{i} \fmfright{o} \fmf{dashes}{i,v1} \fmf{dashes}{v2,o}
%     \fmf{fermion,left,tension=.3}{v1,v2,v1}
%   \end{fmfgraph}} & \propto & \Lambda^2 \\
%   \parbox{20mm}{\fmfreuse{boson}} \quad + \quad
%   \parbox{20mm}{\fmfreuse{fermion}} & \propto & \ln\Lambda^2
% \end{eqnarray}
% \end{verbatim}
% The result is:
% \begin{eqnarray}
%   \parbox{20mm}{\begin{fmfgraph}(20,15)\fmfkeep{boson}
%     \fmfleft{i} \fmfright{o} \fmf{dashes}{i,v,v,o}
%   \end{fmfgraph}} & \propto & \Lambda^2 \\
%   \parbox{20mm}{\begin{fmfgraph}(20,15)\fmfkeep{fermion}
%     \fmfleft{i} \fmfright{o} \fmf{dashes}{i,v1} \fmf{dashes}{v2,o}
%     \fmf{fermion,left,tension=.3}{v1,v2,v1}
%   \end{fmfgraph}} & \propto & \Lambda^2 \\
%   \parbox{20mm}{\fmfreuse{boson}} \quad + \quad
%   \parbox{20mm}{\fmfreuse{fermion}} & \propto & \ln\Lambda^2
% \end{eqnarray}
%
% \subsubsection{Grouping}
%
% \DescribeEnv{fmfgroup}
% Make the enclosed |\fmfset| assignments local to this environment.
%
% \subsubsection{Changing parameters}
%
% \DescribeMacro{\fmfset}
% \manindex{parameters}
% This command can be used to change the parameters in
% table~\ref{tab:parameters} as follows:
% \begin{quote}
%   |\fmfset{|\meta{parameter}|}{|\meta{value}|}|
% \end{quote}
% Note that these parameters are not stored in the graph data
% structure for the individual vertices and arcs.  Instead the current
% values at the time of |\fmfdraw| are used.
%
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \begin{table}[t]
%   \begin{center}
%     \begin{tabular}{|l|c|c|}\hline
%       Parameter      & Default         & Semantics                       \\\hline\hline
%       "thin"         &  1pt            & thin arcs                       \\\hline
%       "thick"        &  1.5"thin"      & thicker arcs                    \\\hline
%       "arrow_len"    &  4mm            & length of arrow head            \\\hline
%       "arrow_ang"    &  15             & opening angle of arrow head     \\\hline
%       "curly_len"    &  3mm            & length of one curl              \\\hline
%       "dash_len"     &  3mm            & length of one dash              \\\hline
%       "dot_len"      &  2mm            & distance of two dots            \\\hline
%       "wiggly_len"   &  4mm            & length of one wiggle            \\\hline
%       "wiggly_slope" &  60             & inclination of wiggles          \\\hline
%       "zigzag_len"   &  2mm            & length of a zig-zag period      \\\hline
%       "zigzag_width" &  2"thick"       & width of zig-zag lines          \\\hline
%       "decor_size"   &  5mm            & default size of vertex decors   \\\hline
%       "dot_size"     &  4"thick"       & diameter of dots                \\\hline
%     \end{tabular}
%   \end{center}
%   \caption{Available style parameters.}
%   \label{tab:parameters}
% \end{table}
%
% \DeleteShortVerb{\"}
% \MakeShortVerb{\|}
%
% \subsubsection{Shrinking}
%
% \DescribeEnv{fmfshrink}
% Shrink the linewidths and similar parameters in the enclosed section.
%
% \subsubsection{Debugging}
%
% \DescribeMacro{\fmftrace}
% \DescribeMacro{\fmfnotrace}
% \manindex{tracing}
% Enable and disable tracing of the layout decisions.  This is not
% necessarily printed in an intuitive format, but can be helpful for
% debugging.
%
% \DescribeMacro{\fmfdisplay}
% \DescribeMacro{\fmfstopdisplay}
% \manindex{displays, online}
% \manindex{online displays}
% Enable online displays.  |\fmfstopdisplay| will halt \MF{} everytime
% a graph is complete.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Multiple vertices and arcs}
%
% \DescribeEnv{fmffor}
% \manindex{looping}
% The environment
% \begin{quote}
% \begin{flushleft}
%   |\begin{fmffor}{|\meta{var}|}{|\meta{from}|}{|\meta{step}|}{|\meta{to}|}|\\
%   \qquad \meta{body}\\
%   |\end{fmffor}|
% \end{flushleft}
% \end{quote}
% executes \meta{body} multiple times, setting \meta{var} to
% $\meta{from}, \meta{from}+\meta{step}, \ldots, \meta{to}$.
% An application of this above \FMF{} feature is shown in
% figure~\ref{fig:euler-heisenberg}, which is generated by calling
% the \TeX{} macro
% \begin{verbatim}
%   \def\EulerHeisenberg#1{%
%      \begin{fmfgraph}(40,25)
%        \fmfpen{thick}
%        \fmfsurroundn{e}{#1}
%        \begin{fmffor}{n}{1}{1}{#1}
%          \fmf{photon}{e[n],i[n]}
%        \end{fmffor}
%        \fmfcyclen{fermion,tension=#1/8}{i}{#1}
%      \end{fmfgraph}}
% \end{verbatim}
% with the arguments 4, 6, 8, and 10, respectively.
% \def\EulerHeisenberg#1{%
%    \begin{fmfgraph}(40,25)
%      \fmfpen{thick}
%      \fmfsurroundn{e}{#1}
%      \begin{fmffor}{n}{1}{1}{#1}
%        \fmf{photon}{e[n],i[n]}
%      \end{fmffor}
%      \fmfcyclen{fermion,tension=#1/8}{i}{#1}
%    \end{fmfgraph}}
% \begin{figure}[t]
%   \begin{center}
%     \EulerHeisenberg{4} \qquad \EulerHeisenberg{6}
%   \end{center}
%   \begin{center}
%       \EulerHeisenberg{8} \qquad \EulerHeisenberg{10}
%   \end{center}
%   \caption{Higher order terms in the Euler-Heisenberg lagrangian.}
%   \label{fig:euler-heisenberg}
% \end{figure}
%
% Similarly, we can draw the diagrams from many particle physics in
% figures~\ref{fig:PP-rings} and~\ref{fig:PH-rings}:
% \begin{verbatim}
%   \def\PPRing#1{%
%     \begin{fmfgraph}(20,20)
%       \fmfsurroundn{v}{#1}
%       \fmfdotn{v}{#1}
%       \fmfcyclen{fermion,right=0.25}{v}{#1}
%       \fmfcyclen{fermion,left=0.25}{v}{#1}
%     \end{fmfgraph}}
%   \def\PHRing#1{%
%     \begin{fmfgraph}(20,20)
%       \fmfsurroundn{v}{#1}
%       \fmfdotn{v}{#1}
%       \fmfcyclen{fermion,right=0.25}{v}{#1}
%       \fmfrcyclen{fermion,right=0.25}{v}{#1}
%     \end{fmfgraph}}
% \end{verbatim}
% \def\PPRing#1{%
%   \begin{fmfgraph}(20,20)
%     \fmfsurroundn{v}{#1}
%     \fmfdotn{v}{#1}
%     \fmfcyclen{fermion,right=0.25}{v}{#1}
%     \fmfcyclen{fermion,left=0.25}{v}{#1}
%   \end{fmfgraph}}
% \def\PHRing#1{%
%   \begin{fmfgraph}(20,20)
%     \fmfsurroundn{v}{#1}
%     \fmfdotn{v}{#1}
%     \fmfcyclen{fermion,right=0.25}{v}{#1}
%     \fmfrcyclen{fermion,right=0.25}{v}{#1}
%   \end{fmfgraph}}
% \begin{figure}[t]
%   \begin{center}
%     \PPRing{3}\qquad\PPRing{4}\qquad\PPRing{5}\qquad\PPRing{6}
%   \end{center}
%   \caption{\label{fig:PP-rings}Particle-particle ring diagrams}
% \end{figure}
% \begin{figure}[t]
%   \begin{center}
%     \PHRing{3}\qquad\PHRing{4}\qquad\PHRing{5}\qquad\PHRing{6}
%   \end{center}
%   \caption{\label{fig:PH-rings}Particle-hole ring diagrams}
% \end{figure}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Immediate mode}
% \label{sec:immediate}
%
% In addition to the automatic layout of vertices, \FMF{} features an
% immediate mode, in which \FMF's drawing commands operate directly on
% \MF's |pair|s and |path|s.  You might want to consult The \MF{}
% Book~\cite{MF} or the \MP{} manual~\cite{MetaPost} for further
% information on the available |path| expressions.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Arcs}
% \label{sec:fmfi}
%
% \DescribeMacro{\fmfi}
% \manindex{arcs}
% Immediate mode's brother of |\fmf|.
% \begin{quote}
%   |\fmfi{|\meta{style}$[$|,|\meta{opt}$[$|=|\meta{val}$]$|,|\ldots$]$^^A
%     |}{|\meta{p}|}|
% \end{quote}
% draws a line of
% style \meta{style} on path \meta{p}.  Use the |vpath| function in
% \meta{p} (\emph{after} |\fmffreeze|!) to access the \MF{} |path|
% connecting two vertices:
% |vpath|$[$\meta{tag}$]$|(|\meta{from}|,|\meta{to}|)|.  The optional
% numeric \meta{tag} can be used together with a matching |tag| option
% to |\fmf| to disambiguate arcs that connect the same vertices. 
% You have to prepend each name of a vertex in |vpath|'s arguments
% with two underscores (e.g.~|v1| becomes |__v1|).  This is necessary
% for avoiding nameclashes with some reserved words in \MF{}
% (\textit{sparks} in DEK's terminology).
% 
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Vertices}
% \label{sec:fmfiv}
%
% \DescribeMacro{\fmfiv}
% \manindex{vertices}
% Immediate mode's brother of |\fmfv|.
% \begin{quote}
%   |\fmfiv{|\meta{shape}$[$|=|\meta{val}$][$|,|\meta{opt}^^A
%     $[$|=|\meta{val}$]$|,|\ldots$]$|}{|\meta{v}|}|
% \end{quote}
% draws a vertex at position \meta{v}.  Note that here \meta{v} is a
% \MF{} |pair| and \emph{not} a \FMF{} vertex name.  The former's
% equivalent of the latter can be accessed (\emph{after}
% |\fmffreeze|!) with the |vloc| function: |vloc(|\meta{vertex}|)|.
% Again, you have to prepend the name of the vertex in |vloc|'s
% argument with two underscores (e.g.~|v1| becomes |__v1|).
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Declarations}
% 
% \DescribeMacro{\fmfipath}
% The argument(s) are declared \MF{} |path|s.
%
% \DescribeMacro{\fmfipair}
% The argument(s) are declared \MF{} |pair|s (coordinates).
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Assignments}
% 
% \DescribeMacro{\fmfiequ}
% Establish equality for the two arguments,
% i.e.~|\fmfiequ{lval}{rval}| translates to |lval=rval|.
%
% \DescribeMacro{\fmfiset}
% Assign the second argument to the first,
% i.e.~|\fmfiset{lval}{rval}| translates to |lval:=rval|.
%
% Specifying equality of two variables is a very different operation
% from assignment in \MF{}.  See The \MF{} Book~\cite{MF} for details
% on \MF's builtin equation solver.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Examples}
% 
% Here is a non-trivial example of immediate mode, which shows some
% useful tricks.  The non-trivial aspect of the diagram in question is
% that it has lines broken in two, denoting particles coupling to a
% condensate.
%
% \begin{examples}{40mm}
%
% We start the diagram with a skeleton (the |phantom| lines are shown
% as thin lines for clarity): 
% \begin{verbatim}
% \fmfleft{i} 
% \fmfright{o}
% \fmf{dots}{i,v1}
% \fmf{dots}{v2,o}
% \fmf{phantom,left,tension=0.2,tag=1}{v1,v2}
% \fmf{phantom,left,tension=0.2,tag=2}{v2,v1}
% \fmfdot{v1,v2}
% \fmfposition
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,30)
%     \fmfpen{thick}
%     \fmfleft{i} 
%     \fmfright{o}
%     \fmf{dots}{i,v1}
%     \fmf{dots}{v2,o}
%     \fmf{phantom,left,tension=0.2,tag=1}{v1,v2}
%     \fmf{phantom,left,tension=0.2,tag=2}{v2,v1}
%     \fmfposition
%     \fmfdraw
%     \fmfpen{.5thin}
%     \fmf{plain,left}{v1,v2}
%     \fmf{plain,left}{v2,v1}
%   \end{fmfgraph}}
% Add the fermions to the skeleton
% \begin{verbatim}
% \fmfipath{p[]}
% \fmfiset{p1}{vpath1(__v1,__v2)}
% \fmfiset{p2}{vpath2(__v2,__v1)}
% \fmfi{fermion}{subpath (0,length(p1)/3) of p1}
% \fmfi{fermion}{subpath (2length(p1)/3,length(p1)) of p1}
% \fmfi{fermion}{subpath (0,length(p2)/3) of p2}
% \fmfi{fermion}{subpath (2length(p2)/3,length(p2)) of p2}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,30)
%     \fmfpen{thick}
%     \fmfleft{i} 
%     \fmfright{o}
%     \fmf{dots}{i,v1}
%     \fmf{dots}{v2,o}
%     \fmf{phantom,left,tension=0.2,tag=1}{v1,v2}
%     \fmf{phantom,left,tension=0.2,tag=2}{v2,v1}
%     \fmfdot{v1,v2}
%     \fmfposition
%     \fmfipath{p[]}
%     \fmfiset{p1}{vpath1(__v1,__v2)}
%     \fmfiset{p2}{vpath2(__v2,__v1)}
%     \fmfi{fermion}{subpath (0,length(p1)/3) of p1}
%     \fmfi{fermion}{subpath (2length(p1)/3,length(p1)) of p1}
%     \fmfi{fermion}{subpath (0,length(p2)/3) of p2}
%     \fmfi{fermion}{subpath (2length(p2)/3,length(p2)) of p2}
%   \end{fmfgraph}}
% Add condensates and a gluon
% \begin{verbatim}
% \def\cond#1#2{%
%   \fmfiv{d.sh=cross,d.ang=#1,d.siz=5thick}{#2}}
% \cond{30}{point length(p1)/3 of p1}
% \cond{-30}{point 2length(p1)/3 of p1}
% \cond{30}{point length(p2)/3 of p2}
% \cond{-30}{point 2length(p2)/3 of p2}
% \fmfi{gluon}{point length(p1)/10 of p1
%                -- point 11length(p1)/12 of p1}
% \def\vert#1{%
%   \fmfiv{d.sh=circle,d.f=1,d.siz=2thick}{#1}}
% \vert{point length(p1)/12 of p1}
% \vert{point 11length(p1)/12 of p1}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,30)
%     \fmfpen{thick}
%     \fmfleft{i} 
%     \fmfright{o}
%     \fmf{dots}{i,v1}
%     \fmf{dots}{v2,o}
%     \fmf{phantom,left,tension=0.2,tag=1}{v1,v2}
%     \fmf{phantom,left,tension=0.2,tag=2}{v2,v1}
%     \fmfdot{v1,v2}
%     \fmfposition
%     \fmfipath{p[]}
%     \fmfiset{p1}{vpath1(__v1,__v2)}
%     \fmfiset{p2}{vpath2(__v2,__v1)}
%     \fmfi{fermion}{subpath (0,length(p1)/3) of p1}
%     \fmfi{fermion}{subpath (2length(p1)/3,length(p1)) of p1}
%     \fmfi{fermion}{subpath (0,length(p2)/3) of p2}
%     \fmfi{fermion}{subpath (2length(p2)/3,length(p2)) of p2}
%   \def\cond#1#2{\fmfiv{d.sh=cross,d.ang=#1,d.siz=5thick}{#2}}
%     \cond{30}{point length(p1)/3 of p1}
%     \cond{-30}{point 2length(p1)/3 of p1}
%     \cond{30}{point length(p2)/3 of p2}
%     \cond{-30}{point 2length(p2)/3 of p2}
%     \fmfi{gluon}{point length(p1)/10 of p1 -- point 11length(p1)/12 of p1}
%   \def\vert#1{\fmfiv{d.sh=circle,d.f=1,d.siz=2thick}{#1}}
%     \vert{point length(p1)/12 of p1}
%     \vert{point 11length(p1)/12 of p1}
%   \end{fmfgraph}}
%
% Here's an interesting abuse of \FMF{} (see the next section for
% |\fmfcmd|):
%   \begin{verbatim}
%   \begin{fmfgraph*}(40,40)
%     \fmfipair{o,xm,xp,ym,yp}
%     \fmfiequ{o}{(.5w,.1h)}
%     \fmfiequ{xm}{(0,.1h)}
%     \fmfiequ{xp}{(w,.1h)}
%     \fmfiequ{ym}{(.5w,0)}
%     \fmfiequ{yp}{(.5w,h)}
%     \fmfiv{l=$x$,l.a=-135,l.d=2mm}{xp}
%     \fmfiv{l=$y=x^2$,l.a=-135,l.d=2mm}{yp}
%     \fmfpen{thin}
%     \fmfcmd{draw xm--xp; draw ym--yp;}
%     \fmfpen{thick}
%     \fmfiequ{xs}{xpart(xp-o)}
%     \fmfiequ{ys}{ypart(yp-o)}
%     \fmfcmd{draw (o + (-xs,ys)) for n = -9 upto 10:
%         --(o + (xs*(n/10),ys*((n/10)**2)))
%       endfor;}
%   \end{fmfgraph*}
%   \end{verbatim}
%   \marginexample{%
%     \begin{fmfgraph*}(40,40)
%       \fmfipair{o,xm,xp,ym,yp}
%       \fmfiequ{o}{(.5w,.1h)}
%       \fmfiequ{xm}{(0,.1h)}
%       \fmfiequ{xp}{(w,.1h)}
%       \fmfiequ{ym}{(.5w,0)}
%       \fmfiequ{yp}{(.5w,h)}
%       \fmfiv{l=$x$,l.a=-135,l.d=2mm}{xp}
%       \fmfiv{l=$y=x^2$,l.a=-135,l.d=2mm}{yp}
%       \fmfpen{thin}
%       \fmfcmd{draw xm--xp; draw ym--yp;}
%       \fmfpen{thick}
%       \fmfiequ{xs}{xpart(xp-o)}
%       \fmfiequ{ys}{ypart(yp-o)}
%       \fmfcmd{draw (o + (-xs,ys)) for n = -9 upto 10:
%           --(o + (xs*(n/10),ys*((n/10)**2)))
%         endfor;}
%     \end{fmfgraph*}}
%
% \end{examples}
%
% Finally, for the curious, here is how to draw the circular gluons in
% figure~\ref{fig:gluons}:
% \begin{verbatim}
%   \fmfi{gluon}{fullcircle scaled .5w shifted (.5w,.5h)}
%   \fmfi{gluon}{reverse fullcircle scaled .5w shifted (.5w,.5h)}
% \end{verbatim}
%
% \begin{figure}[t]
%   \begin{center}
%     \begin{fmfgraph}(40,40)
%       \fmfi{gluon}{fullcircle scaled .5w shifted (.5w,.5h)}
%     \end{fmfgraph}
%     \qquad
%     \begin{fmfgraph}(40,40)
%       \fmfi{gluon}{reverse fullcircle scaled .5w shifted (.5w,.5h)}
%     \end{fmfgraph}
%   \end{center}
%   \caption{Circular gluons.}
%   \label{fig:gluons}
% \end{figure}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Raw \MF}
%
% Some more advanced features of \FMF{} are more conveniently
% accessed through raw \MF{} commands.  This can either be
% achieved by preparing a \MF{} input file or by using |\fmfcmd|
% extensively.  The latter apprach is usally more convenient.
%
% \DescribeMacro{\fmfcmd}
% The |\fmfcmd| macro writes its argument into the \MF{} input
% file generated by \FMF.  While some experience in using
% \MF{} doesn't hurt here, this approach can simplify the
% production of complex diagrams considerably.  Note that \emph{no}
% semicolon is appended, the user has to provide it explicitely.
%
% \subsubsection{Extending \FMF}
% \label{sec:extensions}
%
% \manindex{extensions}
% \manindex{defining new styles}
% \manindex{styles, defining new}
% A prominent example for using raw \MF{} is provided by the option to
% add new styles for arcs.  There is of course always one more style
% that \emph{must} be added to the default list.  But increasing this
% list without bounds will eventually slow down \FMF{} and increase
% its memory requirements.  It is therefore better to allow users to
% define their own styles.  This is done with the \MF{} macro
% |style_def|, which defines a macro that will be called to do the
% drawing and registers this macro with \FMF{} so that it can be used
% in the first argument to |\fmf|.
%
% The macro takes one argument of type |path| and is responsible for
% drawing the arc on this path. If \MP's color functionality is to be
% used, the color aware functions |cdraw|, |cfill|, |cfilldraw|,
% |ccutdraw| and |cdrawdot| should be used instead of |draw|, etc.
%
% \begin{examples}{40mm}
%
% \manindex{crossed arcs}
% After the following |style_def|, a new style |crossed| will be
% available:
% \begin{verbatim}
%   \fmfcmd{%
%     vardef cross_bar (expr p, len, ang) =
%      ((-len/2,0)--(len/2,0))
%         rotated (ang + angle direction length(p)/2 of p)
%         shifted point length(p)/2 of p
%     enddef;
%     style_def crossed expr p =
%       cdraw p;
%       ccutdraw cross_bar (p, 5mm,  45);
%       ccutdraw cross_bar (p, 5mm, -45)
%     enddef;}
% \end{verbatim}
% \fmfcmd{%
%   vardef cross_bar (expr p, len, ang) =
%    ((-len/2,0)--(len/2,0))
%       rotated (ang + angle direction length(p)/2 of p)
%       shifted point length(p)/2 of p
%   enddef;
%   style_def crossed expr p =
%     cdraw p;
%     ccutdraw cross_bar (p, 5mm,  45);
%     ccutdraw cross_bar (p, 5mm, -45)
%   enddef;}
% it can be used just like any other style:
% \begin{verbatim}
%   \fmfleft{i} 
%   \fmfright{o}
%   \fmf{plain}{i,v,o}
%   \fmf{crossed}{v,v}
%   \fmfdot{v}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,30)
%     \fmfpen{thick}
%     \fmfleft{i} 
%     \fmfright{o}
%     \fmf{plain}{i,v,o}
%     \fmf{crossed}{v,v}
%     \fmfdot{v}
%   \end{fmfgraph}}
% And here is an (esthetically questionable!) attempt at wiggly lines
% with arrows:
% \begin{verbatim}
%   \fmfcmd{%
%      style_def wiggly_arrow expr p =
%        cdraw (wiggly p);
%        shrink (2);
%          cfill (arrow p);
%        endshrink;
%      enddef;}
% \end{verbatim}
% \fmfcmd{%
%    style_def wiggly_arrow expr p =
%      cdraw (wiggly p);
%      shrink (2);
%        cfill (arrow p);
%      endshrink;
%    enddef;}
% \marginexample{%
%   \begin{fmfgraph}(40,10)
%     \fmfpen{thick}
%     \fmfleft{i} 
%     \fmfright{o}
%     \fmf{wiggly_arrow}{i,o}
%   \end{fmfgraph}}
% Note how the |shrink| macro (which is the \MF{} equivalent of the
% |fmfshrink| environment) is used to temporarily double the
% dimensions of the arrowhead which is constructed by the |arrow|
% macro.
%
% In particular theorists beyond the standard model are likely to need
% \emph{a lot} of different line styles.  The aficionados of majorana
% neutrinos might find the following two useful:
% \begin{verbatim}
%   \fmfcmd{%
%     style_def majorana expr p =
%       cdraw p;
%       cfill (harrow (reverse p, .5));
%       cfill (harrow (p, .5))
%     enddef;
%     style_def alt_majorana expr p =
%       cdraw p;
%       cfill (tarrow (reverse p, .55));
%       cfill (tarrow (p, .55))
%     enddef;}
% \end{verbatim}
% \fmfcmd{%
%   style_def majorana expr p =
%     cdraw p;
%     cfill (harrow (reverse p, .5));
%     cfill (harrow (p, .5))
%   enddef;
%   style_def alt_majorana expr p =
%     cdraw p;
%     cfill (tarrow (reverse p, .55));
%     cfill (tarrow (p, .55))
%   enddef;}
% \marginexample{%
%   \begin{fmfgraph}(40,30)
%     \fmfpen{thick}
%     \fmfleftn{i}{2} \fmfrightn{o}{2}
%     \fmf{majorana}{i1,v1,o1}
%     \fmf{alt_majorana}{i2,v2,o2}
%     \fmfn{boson}{v}{2}
%     \fmfdotn{v}{2}
%   \end{fmfgraph}}
% Note the use of the |harrow| and |tarrow| functions which return an
% arrowhead on the given fraction of the path, with reference points
% at the head (|harrow|) or tail (|tarrow|).  The |arrow| function
% used above is equivalent to |marrow(p,.5)|, which has the reference
% point at the center of the arrowhead.  Having the three different
% reference point available is important for supporting arcs of
% substantially differing lengths.
%
% A problem of the current implementation is that the endpoints of
% double lines don't match smoothly at vertices:
% \begin{verbatim}
%   \fmfpen{thick}\fmfleftn{l}{2}\fmfrightn{r}{2}
%   \fmfpolyn{shaded}{z}{4}
%   \fmf{dbl_plain_arrow}{l2,z3}
%   \fmf{dbl_plain_arrow}{l1,z4}
%   \fmf{dbl_plain_arrow}{z1,r1}
%   \fmf{dbl_plain_arrow}{z2,r2}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,25)
%     \fmfpen{thick}\fmfleftn{l}{2}\fmfrightn{r}{2}
%     \fmfpolyn{shaded}{z}{4}
%     \fmf{dbl_plain_arrow}{l2,z3}
%     \fmf{dbl_plain_arrow}{l1,z4}
%     \fmf{dbl_plain_arrow}{z1,r1}
%     \fmf{dbl_plain_arrow}{z2,r2}
%   \end{fmfgraph}}
% One way around is to add dots of the right size at the vertices
% \emph{after} the arcs have been drawn.
% \begin{verbatim}
%   \fmfpen{thick}\fmfleftn{l}{2}\fmfrightn{r}{2}
%   \fmfpolyn{shaded}{z}{4}
%   \fmf{dbl_plain_arrow}{l2,z3}
%   \fmf{dbl_plain_arrow}{l1,z4}
%   \fmf{dbl_plain_arrow}{z1,r1}
%   \fmf{dbl_plain_arrow}{z2,r2}
%   \fmffreeze\fmfdraw
%   \fmfvn{d.siz=2thick,d.sh=circle}{z}{4}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(40,25)
%     \fmfpen{thick}\fmfleftn{l}{2}\fmfrightn{r}{2}
%     \fmfpolyn{shaded}{z}{4}
%     \fmf{dbl_plain_arrow}{l2,z3}
%     \fmf{dbl_plain_arrow}{l1,z4}
%     \fmf{dbl_plain_arrow}{z1,r1}
%     \fmf{dbl_plain_arrow}{z2,r2}
%     \fmffreeze\fmfdraw
%     \fmfvn{d.siz=2thick,d.sh=circle}{z}{4}
%   \end{fmfgraph}}
% Without the |\fmffreeze\fmfdraw|, the arcs would ``know'' about the
% dots and would be shortened.
%
% A more elegant solution is to define line styles with dots at the
% head,
% \begin{verbatim}
%   \fmfcmd{vardef endpoint_dot expr p =
%     save oldpen; pen oldpen;
%     oldpen := currentpen;
%     pickup oldpen scaled 3;
%     cdrawdot p;
%     pickup oldpen;
%   enddef;}
%   \fmfcmd{style_def hd_double expr p =
%     draw_double p;
%     endpoint_dot point infinity of p;
%   enddef;}
%   \fmfcmd{style_def hd_dbl_plain_arrow expr p =
%     draw_hd_double p;
%     shrink (1.5);
%       cfill (arrow p);
%     endshrink;
%   enddef;}
% \end{verbatim}
% \fmfcmd{%
% vardef endpoint_dot expr p =
%   save oldpen; pen oldpen;
%   oldpen := currentpen;
%   pickup oldpen scaled 3;
%   cdrawdot p;
%   pickup oldpen;
% enddef;}
% \fmfcmd{%
% style_def hd_double expr p =
%   draw_double p;
%   endpoint_dot point infinity of p;
% enddef;}
% \fmfcmd{%
% style_def hd_dbl_plain_arrow expr p =
%   draw_hd_double p;
%   shrink (1.5);
%     cfill (arrow p);
%   endshrink;
% enddef;}
% tail
% \begin{verbatim}
%   \fmfcmd{style_def td_double expr p =
%     draw_double p;
%     endpoint_dot point 0 of p;
%   enddef;}
%   \fmfcmd{style_def td_dbl_plain_arrow expr p =
%     draw_td_double p;
%     shrink (1.5);
%       cfill (arrow p);
%     endshrink;
%   enddef;}
% \end{verbatim}
% \fmfcmd{%
% style_def td_double expr p =
%   draw_double p;
%   endpoint_dot point 0 of p;
% enddef;}
% \fmfcmd{%
% style_def td_dbl_plain_arrow expr p =
%   draw_td_double p;
%   shrink (1.5);
%     cfill (arrow p);
%   endshrink;
% enddef;}
% or both
% \begin{verbatim}
%   \fmfcmd{style_def htd_double expr p =
%     draw_double p;
%     endpoint_dot point 0 of p;
%     endpoint_dot point infinity of p;
%   enddef;}
%   \fmfcmd{style_def htd_dbl_plain_arrow expr p =
%     draw_htd_double p;
%     shrink (1.5);
%       cfill (arrow p);
%     endshrink;
%   enddef;}
% \end{verbatim}
% \fmfcmd{%
% style_def htd_double expr p =
%   draw_double p;
%   endpoint_dot point 0 of p;
%   endpoint_dot point infinity of p;
% enddef;}
% \fmfcmd{%
% style_def htd_dbl_plain_arrow expr p =
%   draw_htd_double p;
%   shrink (1.5);
%     cfill (arrow p);
%   endshrink;
% enddef;}
% which can be used as follows to give an equivalent result:
% \begin{verbatim}
%   \fmfpen{thick}\fmfleftn{l}{2}\fmfrightn{r}{2}
%   \fmfpolyn{shaded}{z}{4}
%   \fmf{hd_dbl_plain_arrow}{l2,z3}
%   \fmf{hd_dbl_plain_arrow}{l1,z4}
%   \fmf{td_dbl_plain_arrow}{z1,r1}
%   \fmf{td_dbl_plain_arrow}{z2,r2}
% \end{verbatim}
% \marginexample{%
%   \begin{fmfgraph}(50,30)
%     \fmfpen{thick}\fmfleftn{l}{2}\fmfrightn{r}{2}
%     \fmfpolyn{shaded}{z}{4}
%     \fmf{hd_dbl_plain_arrow}{l2,z3}
%     \fmf{hd_dbl_plain_arrow}{l1,z4}
%     \fmf{td_dbl_plain_arrow}{z1,r1}
%     \fmf{td_dbl_plain_arrow}{z2,r2}
%   \end{fmfgraph}}
% 
% \end{examples}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Common traps, trouble shooting and frequently asked
%    questions (FAQs)} 
%
% \subsubsection{\texttt{! Value is too large}}
% \label{sec:value-to-large}
% The following will be one of the most frequent errors:
% \begin{verbatim}
%   ! Value is too large (4097).
%   <recently read> ;
%
%   beginchar->...rdp:=(EXPR3);w:=hround(charwd*hppp);
%                                                     h:=...
%   l.685 ...char(64, 40*2.84526pt#, 25*2.84526pt#, 0)
%                                                     ;
%   ?
% \end{verbatim}
% It can have one of two causes:
% \begin{itemize}
%   \item{} \MF{} was invoked without specifying the |mode|.
%     This case is easily fixed by looking up the correct \MF{} mode
%     in the file |modes.mf| that comes with the \MF{} distribution.
%     This mode \emph{must} be specified on the
%     command line as |\mode:=laserjet| for HP Laserjets at 300dpi, as
%     |\mode:=ljfour| for HP Laserjets at 600dpi, as 
%     |\mode:=nexthi| for NeXT laser printers at 400dpi, etc,
%     just to name three of the more common laser printers in the
%     physics community.
%   \item{} The diagrams are too large for the printer at hand.
%     This case is actually not very likely, because even at 1200dpi
%     the diagrams can be as large as 86mm.  For the popular
%     laserprinter resolution of 300dpi, even 346mm are possible.
%     Last time I checked, the diagrams for this manual could be
%     generated for a \textit{Linotype Linotronic 300} at 2540dpi
%     (|mode:=linosuper|), but failed in the standard |proof| mode at
%     2601.72dpi.\footnote{% 
%       It would be trivial to shrink the diagrams by 1\%\ to make
%       them work in \texttt{proof} mode (accidentally, the largest
%       diagram is 40mm wide, while 4096/2601.72dpi corresponds to
%       39.99mm). However, I prefer \MF{} to give an error message if
%       the user forgot to specify the mode.  It is much more obscure
%       when \MF{} works without errors but the \texttt{dvi} driver
%       fails to find the generated bitmap file.}
%     In fact, in the current |modes.mf| file, the
%     \textit{Chelgraph IBX} at 9600dpi and the \textit{Alphatype CRS}
%     at $5333+1/3$dpi are the only typesetters that can not be used
%     to typeset this manual.\footnote{%
%       If someone wants to use \FMF{} with one of these high end
%       typesetters, I would be glad to try to help them out with
%       kludges.}
% \end{itemize}
%
% \subsubsection{Diagrams in the document are never updated}
% \label{sec:out-of-date}
% There are two known reasons why diagrams may not be updated the
% document after the source file has been changed:
% \begin{itemize}
%   \item Some |dvi| file previewers (e.g.~|xdvi(1)| under UNIX) do
%     \emph{not} reread font information if the |tfm| or |pk| files
%     have changed, even though they reread the |dvi| file if it has
%     changed.  Therefore you have to restart such previewers if you
%     have made changes in diagrams to see these changes on the screen.
%   \item Some |dvi| drivers (e.g.~|dvips(1)| under UNIX) do not work
%     with the |gf| files directly, but convert them with an external
%     program to |pk| format first.  On later occasions, the |dvi|
%     driver will then use the |pk| file which is out of date with
%     respect to the sources and the |gf| file.  The only known fix is
%     to delete the |pk| fils before running the |dvi| driver.
% \end{itemize}
%
% \subsubsection{Disgrams show up in the wrong spot}
% If you are using \FMF{} with \LaTeX's |\includeonly| feature, you
% should watch out for the following situation:
% \begin{verbatim}
% \includeonly{bar1,bar3}
% \begin{fmffile}{foograph}
% \include{bar1}
% \include{bar2}
% \include{bar3}
% \end{fmffile}
% \end{verbatim}
% where |bar1.tex| defines graph \#1, |bar2.tex| graph \#2 and
% |bar3.tex| defines graph \#3.  If you now proceeded to add graphs to
% |bar1.tex|, you will notice that a second graph is accepted, but
% instead of the new third graph, the old graph \#3 appears.  What
% happens is that \LaTeX{} stores the value of the counter for
% |fmfgraph|s in each |.aux| file so that because |bar2.tex| is not
% processed, this counter is always reset to 3 at the beginning of
% |bar3.tex|. 
%
% Even though this situation appears to be contrived, it actually
% occured in real life applications and the resulting error is very
% confusing.
%
% The only ``fix'' for this problem would be to use a private counter
% behind \LaTeX's back.  Unfortunately, it appears that this will
% violate the \emph{principle of minimal surprise} even more.  It is
% therefore usually a good idea to reprocess the complete document
% when the number of graphs has changed in an |\include|d file.  The
% other solution is to have a separate |fmfgraph| environment for each
% |\include|d file.
%
% \subsubsection{Spurious labels show up}
% If spurious labels show up in your diagrams, this is most likely
% caused by old label files (e.g.~|foo.t|\meta{n}) still lying
% around.  Just delete these files and rerun \TeX{} and \MF{} (or
% \MP{} respectively).
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Known bugs}
%
% \subsubsection{Chaotic manual}
% This is being worked on.  It should probably be rewritten from
% scratch, but I don't have enough time at the moment (this is a spare
% time activity).
%
% \subsubsection{Delayed error messages}
% This can't be fixed.  The problem is that errors can manifest
% themselves only a long time after the corresponding source line has
% been read.  Since \TeX{} doesn't allow to access the current source
% line number, there is no way to store this information along with
% the other information on the graph.
% I can only hope to have enough sanity checks in
% place some day that error messages from \MF{} won't occur.
% 
% \subsubsection{Multiple tadpoles}
% Currently, \FMF{} will not layout multiple tadpoles at a single
% vertex automatically.  This could be fixed in principle, but these
% fixes would cause other problems which are more inconvenient than
% having to lay out tadpoles manually.
%
% \subsubsection{Hard limits}
% Currently the most severe limitation lies in the size of the
% generated pictures.  The largest number \MF{} can represent
% internally is~4095.99998 and this is also the largest value any
% coordinate measured in pixels can assume.  At the most popular
% laserprinter resolution of~300 dots per inch (dpi), this corresponds
% to a horizontal and vertical extension of about~346mm, which is
% plenty and we're more likely to hit the internal limits on the
% complexity of a picture.  However, at the proof mode resolution
% of~2601.72dpi, this is reduced to slightly less than~40mm and we're
% running the risk of arithmetic overflow in internal calculations much
% earlier.
%
% There are two potential solutions of different scope and complexity:
% \begin{itemize}
%   \item{} Since John Hobby's \MP{} is now available without a
%     non-disclosure agreement from AT\&T, one solution is to replace
%     \MF{} by \MP, which doesn't suffer from the size
%     limitations.
%     This comes with a small price paid in reduced portability of the
%     generated output, but as already stated above in the case of
%     |axodraw|, the ubiquity of PostScript printers (and the free
%     GhostScript interpreter) makes this a minor point.
%   \item{} The more ambitious solutions would be \emph{virtual graphs},
%     i.e.~graphs which are larger than the current limit enforced
%     by numeric overflow at higher resolutions.  This could be
%     implemented by calculating the layout of a miniature graph and
%     afterwards distributing the full graph among several \MF{}
%     characters. 
% \end{itemize}
%
% \end{fmffile}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section*{Acknowledgements}
%
% I am most grateful to Wolfgang Kilian, who pushed \FMF's predecessor
% |feynman.mf| to its limits~\cite{Kil94}.  Discussions with him
% triggered a lot of good ideas.  Thanks also to my students and the
% people on \emph{The Net} for suggestions, portability fixes and for
% volunteering as guinea pigs.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \begin{thebibliography}{99}
%   \bibitem{TeX} Donald E.~Knuth, \textit{The \TeX{}book},
%      Addison-Wesley, Reading MA, 1986.
%   \bibitem{LaTeX} Leslie Lamport, \textit{\LaTeX{} --- A
%     Documentation Preparation System},
%     Addison-Wesley, Reading MA, 1985.
%   \bibitem{LaTeX-Companion} Michel Goosens, Frank Mittelbach, and
%     Alexander Samarin, \textit{The \LaTeX{} Companion},
%     Addison-Wesley, Reading MA, 1994.
%   \bibitem{MF} Donald E.~Knuth, \textit{The \MF{}book},
%      Addison-Wesley, Reading MA, 1986.
%   \bibitem{MetaPost} John D.~Hobby, \textit{A User's Manual for
%     \MP}, Computer Science Report \#162, AT\&T Bell
%     Laboratories, April 1992.
%   \bibitem{CPC} Thorsten Ohl, 
%     Comp.~Phys.~Comm.~\textbf{90} (1995) 340.
%   \bibitem{CNL} Thorsten Ohl, 
%     CERN Computer Newsletter~\textbf{220} (1995) 22;
%     \textbf{221} (1995) 46; \textbf{222} (1996) 24.
%   \bibitem{levine} Micheal J.~S.~Levine,
%     Comp.~Phys.~Comm.~\textbf{58} (1990) 181.
%   \bibitem{axodraw} Jos Vermaseren,
%     Comp.~Phys.~Comm.~\textbf{83} (1994) 45.
%     \texttt{axodraw} is available from CTAN
%     (cf.~p.~\pageref{pg:CTAN}), in the  \texttt{graphics} directory.
%     ^^A Comp.~Phys.~Comm.~\textbf{??} (1995) ???.
%   \bibitem{mfpic} Thomas E.~Leathrum, \texttt{mfpic}, available from
%     CTAN (cf.~p.~\pageref{pg:CTAN}), in the \texttt{graphics}
%     directory.
%   \bibitem{madgraph} Tim Stelzer and Bill Long,
%     Comp.~Phys.~Comm.~\textbf{81} (1994) 357.
%   \bibitem{Kil94} Wolfgang Kilian, Doctoral Thesis, Technical
%     University Darmstadt, 1994.
%   \bibitem{Lambda} Alan Jeffrey, \textit{Lists in \TeX's Mouth},
%     TUGboat 199?.
% \end{thebibliography}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section*{Distribution}
% \label{sec:distribution}
%
% \FMF{} is available by anonymous internet ftp from any of the
% Comprehensive \TeX{} Archive Network (CTAN) hosts 
% \label{pg:CTAN}
% \begin{quote}
%   |ftp.shsu.edu|, |ftp.tex.ac.uk|, |ttp.dante.de|
% \end{quote}
% in the directory
% \begin{quote}
%   |macros/latex/contrib/supported/feynmf|
% \end{quote}
% It is also available from the host
% \begin{quote}
%   |crunch.ikp.physik.th-darmstadt.de|
% \end{quote}
% in the directory
% \begin{quote}
%   |pub/ohl/feynmf|
% \end{quote}
% Unsupported snapshots of my work in progress are provided as
% \begin{quote}
%   |pub/ohl/feynmf.versions/feynmf-current.tar.gz|
% \end{quote}
% There are two mailing lists
% \begin{quote}
% \begin{flushleft}
%   |feynmf-announce@crunch.ikp.physik.th-darmstadt.de|\\
%   |feynmf-bugs@crunch.ikp.physik.th-darmstadt.de|
% \end{flushleft}
% \end{quote}
% open for subscription.  The former should carry only important
% announcements, of new versions in particular.  To subscribe, send
% mail to the (electronic) mailing list manager
% \begin{quote}
%   |majordomo@crunch.ikp.physik.th-darmstadt.de|
% \end{quote}
% and \emph{not} to the lists itself.  The following commands (on a
% line in the body of the mail, not in the subject) are useful:
% \begin{quote}
% \begin{flushleft}
%   |subscribe feynmf-announce|\\
%   |unsubscribe feynmf-announce|\\
%   |help|
% \end{flushleft}
% \end{quote}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \StopEventually{\PrintIndex\PrintChanges}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \newpage
% \section{\TeX{} macros}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Startup}
%
% It's is good practice to identify this version of the document style
% option.  We do this by parsing an RCS |Id| string and storing the
% result in the conventional \TeX{} control sequences:
% \changes{v0.1}{1994/05/19}{%
%   Don't loose on {\tt RCS} strings even iff the dollar signs have
%   been removed.}
% \changes{v0.8}{1995/02/18}{\LaTeX~2.09 compatibility}
% \changes{v0.98}{1995/05/01}{%
%   Revise version control: allow for manual intervention to replace
%   the inconvenient RCS revision numbers by version numbers.}
%    \begin{macrocode}
%<*style>
\def\fileversion{v1.08}
%<!209>\NeedsTeXFormat{LaTeX2e}
{\def\RCS#1#2\endRCS{%
  \ifx$#1%
    \@RCS $#2 \endRCS
  \else
    \@RCS $*: #1#2$ \endRCS
  \fi}%
 \def\@RCS $#1: #2,v #3 #4 #5 #6 #7$ \endRCS{%
   \gdef\filename{#2}%
   \gdef\filerevision{#3}%
   \gdef\filedate{#4}%
   \gdef\filemaintainer{#6}}%
\RCS $Id: feynmf.dtx,v 1.30 1996/12/02 09:20:36 ohl Exp $ \endRCS}%
%    \end{macrocode}
%
% And now the standard procedure:
% \changes{v0.4}{1994/05/27}{%
%   \MP{} support: identification part, include
%   \texttt{graphicx} and pass options.}
%    \begin{macrocode}
%<*!209>
%<*!mp>
\ProvidesPackage{feynmf}[\filedate\space\fileversion\space
  LaTeX/Metafont Feynman Diagram Package (\filemaintainer)]
%</!mp>
%<*mp>
\ProvidesPackage{feynmp}[\filedate\space\fileversion\space
  LaTeX/MetaPost Feynman Diagram Package (\filemaintainer)]
%</mp>
%</!209>
%    \end{macrocode}
% Compatibiliy with sources written for \FMF{} \emph{before}
% version~1.03, where macros in labels had to be protected by
% |\noexpand|.  The |\fmf@noexpandoff| macro will be used of
% page~\pageref{pg:usenoexpandoff}.  The default is a no-op.
% \label{pg:defnoexpandoff}
% \changes{v1.05}{1996/05/06}{%
%   Provide option \texttt{pre-1.03} for processing old files.}
%    \begin{macrocode}
%<*!209>
\let\fmf@noexpandoff\relax
\DeclareOption{pre-1.03}{%
  \PackageWarning{feynmf}{%
    Pre v1.03 compatibility can clash with font loading}
  \def\fmf@noexpandoff{\let\noexpand\relax}}
%    \end{macrocode}
% Alow the user to override the default interaction mode
% |\errorstopmode|.  We have to change modes temorarily on
% page~\pageref{pg:useinteractionmode} below and \TeX{}
% provides no means to save the state we started in.  Therefore a
% mode differing from the default has to be requested explicitely.
% \label{pg:definteractionmode}
% \changes{v1.06}{1996/05/21}{%
%   New options \texttt{errorstop}, \texttt{scroll},
%   \texttt{nonstop} and \texttt{batch}.} 
%    \begin{macrocode}
\DeclareOption{errorstop}{\let\@interactionmode\errorstopmode}
\DeclareOption{scroll}{\let\@interactionmode\scrollmode}
\DeclareOption{nonstop}{\let\@interactionmode\nonstopmode}
\DeclareOption{batch}{\let\@interactionmode\batchmode}
\let\@interactionmode\errorstopmode
%    \end{macrocode}
% Every option we don't understand is sent down to |graphics|:
%    \begin{macrocode}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphics}}
\ProcessOptions
%    \end{macrocode}
% For the sake of Portabilitical Correctness, we use \LaTeX's
% |graphics| for including PostScript, instead of the simpler |epsf|
% which comes with |dvips| and would have sufficed
% \changes{v0.99}{1995/05/02}{%
%   Switch back to \texttt{graphics} from \texttt{graphicx} to fix
%   a problem with changing interfaces in the latter.  Can't remember
%   why I used \texttt{graphicx} in the first place, \texttt{graphics}
%   works fine now.}  
%    \begin{macrocode}
%<mp>\RequirePackage{graphics}[1994/12/15]
%</!209>
%<*209>
\def\fmf@noexpandoff{\let\noexpand\relax}
%<mp>\input epsf.sty
%<mp>\let\includegraphics\epsffile
%</209>
%    \end{macrocode}
% Compatibility macros for \LaTeX~2.09.  Our definition of
% |\@inputcheck| is for supporting old and broken \LaTeX~2.09 versions
% before March 18, 1992.  Unfortunately, I couldn't get |\newread| to
% work here with \LaTeX~2.09.
% \changes{v0.99}{1995/05/02}{%
%   \texttt{\protect\bslash @inputcheck}: support for \LaTeX~2.09
%   versions before 92/03/18.}
%    \begin{macrocode}
%<*209>
\@ifundefined{@inputcheck}{\def\@inputcheck{0}}{}%
\def\InputIfFileExists#1#2#3{%
  \openin\@inputcheck#1 %
  \ifeof\@inputcheck
    \closein\@inputcheck
    #3%
  \else
    \closein\@inputcheck
    #2%
    \input{#1}%
  \fi}
\def\IfFileExists#1#2#3{%
  \openin\@inputcheck#1 %
  \ifeof\@inputcheck
    \closein\@inputcheck
    #3%
  \else
    \closein\@inputcheck
    #2%
  \fi}
%</209>
%    \end{macrocode}
%
% \begin{dubious}
%   We should |\||mdqon| at the end only if the German extensions are
%   really active, not just loaded.
% \end{dubious}
%    \begin{macrocode}
\let\mdqrestore\relax
\@ifundefined{mdqoff}{}{%
  \mdqoff
  \let\mdqrestore\mdqon}
%    \end{macrocode}
%
% \begin{macro}{\fmfcmd}
% The entrance through which our commands enter the world of
% \MF.  Note the |\ignorespaces|: we need to avoid spurious
% blanks in the output list.
% \changes{v1.03}{1996/02/17}{%
%   Token register \texttt{\protect\bslash fmfbuf@} for single level
%   evaluation.} 
% Using a trick suggested in |comp.text.tex|, we use a token register
% |\fmfbuf@| to force single level evaluation of commands which are to
% be included in \MF{} strings.
% \changes{v1.07}{1996/08/19}{%
%   Only write output if \texttt{\protect\bslash if@fmfio} is true.}
%    \begin{macrocode}
\def\fmfcmd#1{%
  \if@fmfio
    \immediate\write\@outfmf{#1}%
  \fi
  \ignorespaces}
\newif\if@fmfio
\@fmfiotrue
\newwrite\@outfmf
\newtoks\fmfbuf@
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Environments}
%
% \begin{macro}{\fmffile}
% This environment encloses each \MF{} input file.  The single
% argument gives the name of the file.
% \changes{v0.1}{1994/05/16}{%
%   Stupid: \texttt{\protect\bslash fileversion} can be reset by other
%   packages, store the current value in
%   \texttt{\protect\bslash fmf@fileversion} and use this one.} 
% \changes{v0.1}{1994/05/20}{%
%   Pass RCS revision in a string.}
% \changes{v0.4}{1994/05/27}{\MP{} support: write \MP{} file.}
% \changes{v0.8}{1995/01/18}{%
%   Protect against wrong arguments to
%   \texttt{\protect\bslash fmffile}.}
%    \begin{macrocode}
{\catcode`\%=11\gdef\p@rcent{%}}
\edef\fmf@revision{\filerevision}
\def\fmffile#1{%
  \def\thefmffile{#1}%
  \equaltojobname{\thefmffile}{%
    \errhelp={The argument of \fmffile MUST NOT be identical to the^^J%
              name of your main input file!  I will use fmfdefault.mf^^J%
              this time around, but you'd better fix your code now!}%
    \errmessage{Invalid arument of \string\fmffile!}%
    \def\thefmffile{fmfdefault}}{}%
%    \end{macrocode}
% The following trick has been taken from |mfpic|~\cite{mfpic}:
% proceed even if the font is not available yet, because we have to
% write the \MF{} file first.
% \changes{v0.4}{1994/05/27}{\MP{} support: don't open \texttt{tfm} file.}
% \changes{v0.98}{1995/04/30}{%
%   Save the font for the benefit of \texttt{\protect\bslash fmfkeep} and
%   \texttt{\protect\bslash fmfreuse}.}
% \changes{v1.02}{1996/01/25}{%
%   Read the \texttt{.tfm} file \emph{before} writing the \MF{} file
%   destructively.  This should allow a transparent two pass
%   processing if \texttt{MakeTeXTFM} is enabled.  Thanks to Thomas
%   Esser for the suggestion.}
%    \begin{macrocode}
%<*!mp>
  \batchmode
    \global\expandafter\font%
      \csname f@ynmf:\thefmffile\endcsname=\thefmffile
%    \end{macrocode}
% The hardcoded return to |\errorstopmode| is bad for automated preprint
% processors, but the integrated knowledge of |comp.text.tex| knows of
% no way to implement local mode changes --- short of hacking \TeX{}
% itself \ldots\par
% Therefore we use a default interaction mode which can be specified
% by the user as an option (see page~\pageref{pg:definteractionmode}).
% \label{pg:useinteractionmode}
% \changes{v1.06}{1996/05/21}{%
%   Use \texttt{\protect\bslash @interactionmode}.}
%    \begin{macrocode}
  \@interactionmode
  \expandafter\let\expandafter\f@ynmf\csname f@ynmf:\thefmffile\endcsname
%    \end{macrocode}
% Inform the user:
%    \begin{macrocode}
  \ifx\f@ynmf\nullfont
    \def\f@ynmf{Feynman graph:}%
    \IfFileExists{\thefmffile.mf}%
      {\typeout{%
        feynmf: File \thefmffile.tfm not found:^^J%
        feynmf: Process \thefmffile.mf with METAFONT and then %
                reprocess this file.}}%
      {\typeout{%
        feynmf: Files \thefmffile.mf and \thefmffile.tfm not found:^^J%
        feynmf: This job will create \thefmffile.mf, process it %
                later with METAFONT^^J%
        feynmf: and then reprocess this file.  Don't worry about a %
                harmless premature^^J%
        feynmf: MakeTeXTFM that might have failed just a moment ago!}}%
  \else
    \typeout{%
      feynmf: File \thefmffile.tfm found.^^J%
      feynmf: Nevertheless, if the picture has changed, %
              reprocess \thefmffile.mf.^^J%
      feynmf: If dimension have changed, reprocess \thefmffile.mf %
              and \jobname.tex.}%
  \fi
%</!mp>
%    \end{macrocode}
% Open the \MF{} file.  If we're running under AMS-\LaTeX, turn off
% I/O during the first pass over equation environments.
% \changes{v1.07}{1996/08/19}{%
%   Only write output if \texttt{\protect\bslash if@fmfio} is true.}
% \changes{v1.07}{1996/08/19}{%
%   Set \texttt{\protect\bslash if@fmfio} to \texttt{\protect\bslash
%   ifmeasuring@ \protect\bslash else} if the latter is set, i.e.~if
%   AMS-\LaTeX{} is loaded.} 
%    \begin{macrocode}
  \if@fmfio
    \@ifundefined{ifmeasuring@}%
      {}%
      {\def\if@fmfio{\ifmeasuring@\else}}%
%<*!mp>
    \immediate\openout\@outfmf=\thefmffile.mf\relax
    \fmfcmd{\p@rcent\space \thefmffile.mf -- do not edit, %
            generated automatically by \jobname.tex^^J%
            input feynmf^^J%
            require_RCS_revision "\fmf@revision";}%
%</!mp>
%<*mp>
    \immediate\openout\@outfmf=\thefmffile.mp\relax
    \fmfcmd{\p@rcent\space \thefmffile.mp -- do not edit, %
            generated automatically by \jobname.tex^^J%
            input feynmp^^J%
            require_RCS_revision "\fmf@revision";}%
%</mp>
  \fi
%    \end{macrocode}
% Count the graphs
%    \begin{macrocode}
  \setcounter{fmfgraph}{0}}
\let\thefmffile\relax
\newcounter{fmfgraph}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\equaltojobname}
% Here's a kludge for comparing strings to |\jobname|.  The |\meaning|
% hack is necessary, because |\jobname|'s expansion has different
% |\catcode|s
%    \begin{macrocode}
\def\equaltojobname#1#2#3{%
  \edef\@tempa{#1}%
  \edef\@tempa{\meaning\@tempa}%
  \edef\@tempb{\jobname}%
  \edef\@tempb{\meaning\@tempb}%
  \ifx\@tempa\@tempb
    #2
  \else
    #3
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endfmffile}
% And here is how we close the |fmffile| environment:
%    \begin{macrocode}
\def\endfmffile{%
  \fmfcmd{\p@rcent\space the end.^^J%
          end.^^J%
          endinput;}%
  \let\thefmffile\relax
  \if@fmfio
    \immediate\closeout\@outfmf
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmf@graph}
% This is the bulk of the environment used for each graph
% drawn by \MF.
% \changes{v0.5}{1994/08/17}{%
%   Removed definiton of \texttt{\protect\bslash sharp}.  It's never
%   used and conflicts with the $\sharp$ symbol.}
% \changes{v1.06}{1996/05/21}{%
%   New macro \texttt{\protect\bslash dqu@te}.}
%    \begin{macrocode}
{\catcode`\#=11\gdef\sh@rp{#}%
 \catcode`\"=11\gdef\dqu@te{"}}
\def\fmf@graph#1#2{%
%    \end{macrocode}
% Make sure that a \MF{} file is open, otherwise \emph{really}
% obscure error messages are possible:
% \changes{v0.3}{1994/05/23}{%
%   Make sure that a \MF{} file is open, otherwise \emph{really}
%   obscure error messages are possible.}
%    \begin{macrocode}
  \ifx\thefmffile\relax
    \errhelp={Outside a fmffile environment, I have no clue as to where^^J%
              the METAFONT commands should go.   I will use fmfdefault.mf^^J%
              for this graph, but you'd better fix your code!}%      
    \errmessage{I detected a fmfgraph environment outside of fmffile}%
    \fmffile{fmfdefault}
  \fi
%    \end{macrocode}
% We can't use |\stepcounter| because of the |amstext| option of
% AMS-\LaTeX{} disables it sometimes.
% \changes{v0.8}{1995/01/07}{Don't use \texttt{\protect\bslash stepcounter}.}
% \changes{v0.99}{1995/05/04}{Use \texttt{\protect\bslash fmfsubgraph}.}
%    \begin{macrocode}
  \global\expandafter\advance\csname c@fmfgraph\endcsname \@ne
%    \end{macrocode}
% Start \MF{} character:\footnote{%
%   I'm flying a bit blind here, because I can't figure out why Babel
%   (unlike stand-alone \texttt{german.sty} breaks with an unprotected
%   quote here.  On all other occasions, \texttt{\protect\bslash
%   mdqoff} suffices.} 
% \changes{v1.06}{1996/05/21}{Babel compatibility.}
%    \begin{macrocode}
  \fmfcmd{beginchar(\thefmfgraph, #1*\the\unitlength\sh@rp, %
                                 #2*\the\unitlength\sh@rp, 0);^^J%
            \dqu@te feynmf: \thefmfgraph\dqu@te;}%
  \fmfcmd{LaTeX_unitlength:=\the\unitlength;}%
  \begin{fmfsubgraph}(0,0)(w,h)
    \fmfinit
    \fmfpen{thin}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmfgraph}
% The plain version, no labels, no enclosing |picture| environment
% \changes{v0.99}{1995/05/04}{%
%   Change the name of \texttt{\protect\bslash fmfchar} and friends to
%   \texttt{\protect\bslash fmfgraph}, which should be more intuitive
%   to people with less of a \MF{} background.  Keep the old names as
%   aliases for a while.}
%    \begin{macrocode}
\def\fmfgraph(#1,#2){%
  \fmf@graph{#1}{#2}%
  \def\fmfkeep##1{\fmf@keep{#1}{#2}{##1}}%
%    \end{macrocode}
% Place the character:
% \changes{v0.4}{1994/05/27}{\MP{} support: include PostScript file.}
% \changes{v0.8}{1995/02/18}{\LaTeX~2.09 compatibility}
%    \begin{macrocode}
%<!mp>{\f@ynmf \char\value{fmfgraph}}%
%<*mp>
  \leavevmode
  \IfFileExists{\thefmffile.\thefmfgraph}%
    {\includegraphics{\thefmffile.\thefmfgraph}}%
    {\typeout{%
      feynmp: File \thefmffile.\thefmfgraph\space not found:^^J%
      feynmp: Process \thefmffile.mp with MetaPost and then %
              reprocess this file.}}%
%</mp>
  \ignorespaces}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endfmfgraph}
%    \begin{macrocode}
\def\endfmfgraph{%
    \fmffreeze
    \fmfdraw
  \end{fmfsubgraph}
  \fmfcmd{endchar;}%
  \def\fmfkeep##1{\fmf@nokeep}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmfchar}
%   \begin{macro}{\endfmfchar}
%    \begin{macrocode}
\def\fmfchar{\@nameuse{fmfgraph}}
\def\endfmfchar{\@nameuse{endfmfgraph}}
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% \begin{macro}{\fmfgraph*}
% The extended version, with labels and |picture| environment.
%    \begin{macrocode}
\@namedef{fmfgraph*}(#1,#2){%
  \begin{picture}(#1,#2)
    \fmf@graph{#1}{#2}%
    \def\fmfkeep##1{\fmf@keepstar{#1}{#2}{##1}}%
%    \end{macrocode}
% Process the \MF{} output for labels (if any), enforcing |%| as
% comment character.
% \changes{v0.99}{1995/05/07}{%
%   Don't include the filename in the tag for
%   \texttt{\protect\bslash grepfile}: it's a waste.}
% Not all systems use |.log| as extension of the |log|-file.  If there
% is no |.log|, but a |.lis|: use the latter.
% \changes{v0.99}{1995/05/07}{%
%   From Scott Snyder (Fermilab): allow \texttt{.lis}
%   as alternative \texttt{log}-file extension for VMS.}
% \changes{v1.07}{1996/08/19}{%
%   Call \texttt{\protect\bslash grepfile} only if
%   \texttt{\protect\bslash if@fmfio} is true.}
%    \begin{macrocode}
%<*!mp>
    \if@fmfio
      \def\thefmfext{.log}%
      \IfFileExists{\thefmffile.log}%
       {}%
       {\IfFileExists{\thefmffile.lis}%
         {\def\thefmfext{.lis}}%
         {}}%
      {\catcode`\%=14\relax
       \grepfile%
         {\thefmfgraph}%
         {\thefmffile\thefmfext}%
         {\thefmffile.t\thefmfgraph}}%
    \fi
%</!mp>
%    \end{macrocode}
% Place the character:
% \changes{v0.4}{1994/05/27}{\MP{} support: include PostScript file.}
%    \begin{macrocode}
%<!mp>\put(0,0){{\f@ynmf \char\value{fmfgraph}}}%
%<*mp>
  \IfFileExists{\thefmffile.\thefmfgraph}%
    {\put(0,0){\includegraphics{\thefmffile.\thefmfgraph}}}%
    {\typeout{%
      feynmp: File \thefmffile.\thefmfgraph\space not found:^^J%
      feynmp: Process \thefmffile.mp with MetaPost and then %
              reprocess this file.}}%
%</mp>
      \ignorespaces}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\endfmfgraph*}
%    \begin{macrocode}
\@namedef{endfmfgraph*}{%
    \endfmfgraph
%    \end{macrocode}
% Enforce |%| as comment character.   Disable |\noexpand| if the
% option |pre-1.03| is in effect to allow processing of old files
% prepared before the new single level expansion had been
% implemented.  |\fmf@noexpandoff| is defined on
% page~\ref{pg:defnoexpandoff}.
% \label{pg:usenoexpandoff}
% \changes{v1.03}{1996/02/17}{%
%   Disable \texttt{\protect\bslash noexpand} to allow
%   processing of old files.}
% \changes{v1.05}{1996/05/06}{%
%   Reenable \texttt{\protect\bslash noexpand} for compatibility with
%   font loading on demand.}
% \changes{v1.07}{1996/08/19}{%
%   Include the labels file only if \texttt{\protect\bslash if@fmfio}
%   is true.} 
%    \begin{macrocode}
    \if@fmfio
      {\catcode`\%=14\relax
       \fmf@noexpandoff
        \InputIfFileExists{\thefmffile.t\thefmfgraph}{}{%
          \typeout{%
            feynmf: Label file \thefmffile.t\thefmfgraph\space not found:^^J%
%<!mp>      feynmf: Process \thefmffile.mf with METAFONT and then %
%<mp>       feynmf: Process \thefmffile.mp with MetaPost and then %
                    reprocess this file.}}}%
    \fi
  \end{picture}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmfchar*}
%   \begin{macro}{\endfmfchar*}
%    \begin{macrocode}
\@namedef{fmfchar*}{\@nameuse{fmfgraph*}}
\@namedef{endfmfchar*}{\@nameuse{endfmfgraph*}}
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% \begin{macro}{\fmfkeep}
% \changes{v0.98}{1995/04/30}{Implemented.}
%    \begin{macrocode}
\def\fmfkeep#1{\fmf@nokeep}
\def\fmf@nokeep{%
  \errhelp={There's nothing to \string\fmfkeep!}%
  \errmessage{feynmf: \string\fmfkeep\space outside of `fmfgraph'!}}
%    \end{macrocode}
% Here are the real implementations:
%    \begin{macrocode}
\def\fmf@keep#1#2#3{%
  \global\@namedef{fmf@k:e:#3}{\begin{fmfgraph}(#1,#2)\end{fmfgraph}}%
  \global\e@namedef{fmf@k:f:#3}{\thefmffile}%
  \global\e@namedef{fmf@k:c:#3}{\thefmfgraph}}
\def\fmf@keepstar#1#2#3{%
  \global\@namedef{fmf@k:e:#3}{\begin{fmfgraph*}(#1,#2)\end{fmfgraph*}}%
  \global\e@namedef{fmf@k:f:#3}{\thefmffile}%
  \global\e@namedef{fmf@k:c:#3}{\thefmfgraph}}
\def\e@namedef#1{\expandafter\edef\csname #1\endcsname}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmfreuse}
% \changes{v0.98}{1995/04/30}{Implemented.}
%    \begin{macrocode}
\def\fmfreuse#1{%
  \@ifundefined{fmf@k:e:#1}%
   {\typeout{%
      feynmf: \string\fmfreuse: %
      missing \string\fmfkeep\space for `#1'!}}%
   {\edef\thefmffile{\@nameuse{fmf@k:f:#1}}%
%<*!mp>
    \expandafter\let\expandafter\f@ynmf%
      \csname f@ynmf:\thefmffile\endcsname
%</!mp>
    \@nameuse{c@fmfgraph}\@nameuse{fmf@k:c:#1}%
    \advance\@nameuse{c@fmfgraph}-1%
    \def\fmfcmd##1{}%
    \@nameuse{fmf@k:e:#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmfframe}
% This is used to allocate additional space around a |fmfgraph*|, since
% the labels (or the diagram itself) might overshoot.
% |\fmfgraph(|\meta{left}|,|\meta{top}|)(|\meta{right}|,|\meta{bottom}|){|^^A
% \meta{box}|}| puts an invisible frame of the given dimensions
% (measured in |\unitlength|) around \meta{box}.
%    \begin{macrocode}
\def\fmfframe(#1,#2)(#3,#4)#5{%
  \leavevmode
  \hbox{\vbox{\vskip#2\unitlength\par
              \hbox{\hskip#1\unitlength#5\hskip#3\unitlength}\par
              \vskip#4\unitlength}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\fmfpen}
% Picup a |pencircle| scaled by the argument.
%    \begin{macrocode}
\def\fmfpen#1{\fmfcmd{pickup pencircle scaled #1;}}
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Subgraphs}
%
% \begin{macro}{\fmfsubgraph}
%   \begin{macro}{\endfmfsubgraph}
% An environment for graphs in graphs:
% \changes{v0.99}{1995/05/04}{%
%   Implement \texttt{\protect\bslash fmfsubgraph}, as suggested by
%   Wolfgang Kilian (DESY).}
%    \begin{macrocode}
\def\fmfsubgraph(#1,#2)(#3,#4){\fmfcmd{subgraph (#1, #2, #3, #4);}}
\def\endfmfsubgraph{\fmfcmd{endsubgraph;}}
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% Set up a subgraph:
%    \begin{macrocode}
%<*base>
def subgraph (expr x, y, wd, ht) =
  begingroup
    save c, ne, nw, sw, se;
    pair c, ne, nw, sw, se;
    sw = (x,y);
    se = sw + (wd,0);
    nw = sw + (0,ht);
    ne = sw + (wd,ht);
    c = .5[sw,ne];
enddef;
def endsubgraph =
  endgroup
enddef;
%</base>
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Grep}
% \label{sec:grep}
%
% \begin{macro}{\grepfile}
% The macro |\grepfile{|\meta{pattern}|}{|\meta{in}|}{|\meta{out}|}|
% writes all lines matching |:|\meta{pattern}|:| from file \meta{in}
% to file \meta{out} after stripping off the pattern.
% \begin{dubious}
%   Pattern matching on lines with a single leading colon fails.
% \end{dubious}
% \changes{v0.4}{1994/05/28}{%
%   Don't include the \texttt{\protect\bslash grep} macros in the
%   \MP{} version.  \texttt{\protect\bslash write} makes them
%   obsolete.} 
%    \begin{macrocode}
%<*style>
%<*!mp>
\def\grepfile#1#2#3{%
  \begingroup
%    \end{macrocode}
% Hash the pattern and open the input and output streams:
%    \begin{macrocode}
    \edef\pattern{\csname*grep*#1*\endcsname}%
    \immediate\openin\grep@infile #2\relax
    \ifeof\grep@infile
    \else
      \grep@outopenfalse
%    \end{macrocode}
% Don't add anything at the end of input lines and don't expand
% anything we've read from the file:
% \changes{v1.05}{1996/05/06}{%
%    Use \texttt{\protect\bslash @sanitize} instead of just changing
%    the \texttt{\protect\bslash catcode} of
%    ``\texttt{\protect\bslash}''.  Some styles (in particular
%    \texttt{french.sty}) play dirty tricks with ``\texttt{:}''.}
%    \begin{macrocode}
      \endlinechar=-1
      \@sanitize
%    \end{macrocode}
% But make sure that |{|, |}| and |%| continue to act as delimiters
% and comment character, respectively.  |\@sanitize| will usually have
% changed at least the |\catcode| of the latter.  We need the
% delimiters for multi-line reading and |%| for commenting out \MF's
% pregress reports.
%    \begin{macrocode}
      \catcode`\{=1 \catcode`\}=2 \catcode`\%=14 \relax
%    \end{macrocode}
% Loop over the input lines until end of file occurs.  Note that
% \TeX's |\read| will automagically continue reading until braces are
% balanced.
%    \begin{macrocode}
      \loop
        \read\grep@infile to \grep@lbuf
        \ifeof\grep@infile
          \grep@contfalse
        \else
          \grep@conttrue
%    \end{macrocode}
% Iff the input line is not empty, use |\grep@aline| to examine its
% contents and, iff the pattern matched, write a line to the output file.
%    \begin{macrocode}
          \ifx\grep@lbuf\empty
          \else
            \expandafter\grep@aline\grep@lbuf\sentinel
            \ifx\pattern\grep@tag
%    \end{macrocode}
% Delayed open (this avoids empty files):
%    \begin{macrocode}
              \ifgrep@outopen
              \else
                 \immediate\openout\grep@outfile #3\relax
                 \immediate\write\grep@outfile{\p@rcent\space #3 %
                    -- generated automatically from #2}%
                 \immediate\write\grep@outfile{\p@rcent\space
                    Think twice before editing THIS file!}%
                 \grep@outopentrue
              \fi
              \immediate\write\grep@outfile{\grep@val}%
            \fi
          \fi
        \fi
      \ifgrep@cont
      \repeat
%    \end{macrocode}
% Close the files after we're done.
% \changes{v0.1}{1994/05/16}{%
%   Stupid: \texttt{\protect\bslash closein} the input stream,
%   don't use \texttt{\protect\bslash closeout} on it.}
%    \begin{macrocode}
      \ifgrep@outopen
        \immediate\closeout\grep@outfile
      \fi
    \fi
    \immediate\closein\grep@infile
  \endgroup}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\grep@infile}
%  \begin{macro}{\grep@outfile}
% The I/O streams for the grep facility
%    \begin{macrocode}
\newread\grep@infile
\newwrite\grep@outfile
%    \end{macrocode}
%  \end{macro}
% \end{macro}
% \begin{macro}{\ifgrep@cont}
%   \begin{macro}{\ifgrep@outopen}
% and flags for the same 
%    \begin{macrocode}
\newif\ifgrep@cont
\newif\ifgrep@outopen
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% \begin{macro}{\grep@aline}
% Examine one line and set the variables |\grep@tag| and |\grep@val|
% iff the line starts with a colon.  Subtle point here: |\ifx#1:| will
% \emph{not} work if |#1| starts with a |{| followed by two identical
% characters.
%    \begin{macrocode}
\def\grep@aline#1#2\sentinel{%
  \ifx:#1%
    \grep@splitlbuf#2\sentinel
  \else
    \edef\grep@tag{\csname*grep*\endcsname}%
    \def\grep@val{}%
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\grep@splitlbuf}
% Split the line buffer at the remaining colon, hashing the first part.
%    \begin{macrocode}
\def\grep@splitlbuf#1:#2\sentinel{%
  \edef\grep@tag{\csname*grep*#1*\endcsname}%
  \def\grep@val{#2}}
%</!mp>
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Lists}
%
% The following macros are stolen from Alan Jeffrey's
% |lambda.sty|~\cite{Lambda}.  Alan's implementation is more complete,
% this is just the subset we need to do some listprocessing in \TeX's
% mouth, e.g.~in the body of a |\write|.  Actually, you're not
% supposed to understand these macros from first reading.  It's better
% to read Alan's paper (it is available from CTAN as |lambda.tex|),
% where they are described.  From a programming point of view, Alan's
% macros are probably my favorites.  You will find a whole new
% perspective on \TeX{} there.
% \changes{v0.98}{1995/04/26}{List processing macros.}
%    \begin{macrocode}
\def\Compose#1#2#3{#1{#2{#3}}}
\def\gobblefalse\else\gobbletrue\fi#1#2{\fi#1}
\def\gobbletrue\fi#1#2{\fi#2}
\def\TeXif#1{#1\gobblefalse\else\gobbletrue\fi}
\def\Nil#1#2{#2}
\def\Cons#1#2#3#4{#3{#1}{#2}}
\def\Singleton#1{\Cons{#1}\Nil}
\def\Foldr#1#2#3{#3{\Foldr@{#1}{#2}}{#2}}
\def\Foldr@#1#2#3#4{#1{#3}{\Foldr{#1}{#2}{#4}}}
\def\Map#1{\Foldr{\Compose\Cons{#1}}\Nil}
\def\Unlistize#1{#1\Unlistize@{}}
\def\Unlistize@#1{#1\Foldr\Commaize{}}
\def\Commaize#1#2{, #1#2}
\def\Listize#1{\Listize@#1,\relax @@@}
\def\Listize@#1,#2@@@{%
   \TeXif{\ifx\relax#2}%
     {\Singleton{#1}}%
     {\Cons{#1}{\Listize@#2@@@}}}
%    \end{macrocode}
%
% Protect \MF's namespace:
% \changes{v1.03}{1996/02/17}{%
%   Replace \texttt{\protect\bslash pfx} by
%   \texttt{\protect\bslash fmfpfx} for namespace sanity.}
%    \begin{macrocode}
\def\fmfpfx@#1{__#1}
\def\fmfpfx#1{\Unlistize{\Map\fmfpfx@{\Listize{#1}}}}
%    \end{macrocode}
%
% The other \TeX{} command sequences are defined below, along with the
% \MF{} macros they are in one-to-one correspondence to.
%    \begin{macrocode}
%</style>
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{\MF{} macros}
% \label{sec:mf-code}
%
% Now we turn our attention to the \MF{}
% macros.
% \begin{dubious}
%   We should find a way (a hack) to index the
%   \MF{} macros with the |doc| option.
% \end{dubious}
% Because of name clashes, \FMF{} will not work if the |cmbase| is
% loaded.  Die with an useful error message:
% \changes{v0.5}{1994/06/13}{Don't accept the Computer Modern Base.}
%    \begin{macrocode}
%<*base>
if known cmbase:
  errhelp
    "feynmf will only work with plain Metafont, as described in the book.";
  errmessage "feynmf: CMBASE detected.  Please use the PLAIN base.";
  forever:
    errmessage "No use in trying!  You'd better eXit now ...";
    errorstopmode;
  endfor
fi
%    \end{macrocode}
%
% Make the RCS revision number available for feature testing:
% \changes{v0.1}{1994/05/20}{%
%   Handle arbitrary RCS revision strings.}
%    \begin{macrocode}
vardef parse_RCS (suffix RCS) (expr s) =
  save n, c;
  numeric n, RCS[];
  string c;
  RCS[0] := 0;
  for n = 1 upto length (s):
    c := substring (n-1,n) of s;
    exitif ((RCS[0] > 0) and (c = " "));
    if ((c = "0") or (c = "1") or (c = "2")
        or (c = "3") or (c = "4") or (c = "5")
        or (c = "6") or (c = "7") or (c = "8")
        or (c = "9")):
      if RCS[0] = 0:
        RCS[0] := 1;
        RCS[RCS[0]] := 0;
      fi
      RCS[RCS[0]] := 10 * RCS[RCS[0]] + scantokens (c);
    elseif c = ".":
      RCS[0] := RCS[0] + 1;
      RCS[RCS[0]] := 0;
    else:
    fi
  endfor
enddef;
%    \end{macrocode}
% Check that \LaTeX{} style and \MF{} macros are in sync:
%    \begin{macrocode}
vardef require_RCS_revision expr s =
  save n, TeX_rev, mf_rev;
  numeric n;
  parse_RCS (TeX_rev, s);
  parse_RCS (mf_rev, "$Revision: 1.30 $");
  for n = 1 upto min (2, TeX_rev[0], mf_rev[0]):
    if TeX_rev[n] > mf_rev[n]:
      errhelp
        "Your version of `feynmf.sty' is higher that of your `feynmf.mf'.";
      errmessage "feynmf: Metafont macros out of date";
    elseif TeX_rev[n] < mf_rev[n]:
      errhelp
        "Your version of `feynmf.mf' is higher that of your `feynmf.sty'.";
      errmessage "feynmf: LaTeX style out of date";
    fi
    exitif (TeX_rev[n] <> mf_rev[n]);
  endfor
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{\MP{} support}
%
% This \MP{} support just mimics \MF{}, but it works.
% \changes{v0.4}{1994/05/27}{Preliminary \MP{} support: mimic \MF.}
%    \begin{macrocode}
%<*mp>
vardef cullit = \ enddef;
color foreground;
foreground = black;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef beginchar (expr c, wd, ht, dp) =
  LaTeX_file := "";
  beginfig(c);
    w:=wd;
    h:=ht;
enddef;
string LaTeX_file;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef endchar =
  setbounds currentpicture to (0,0)--(w,0)--(w,h)--(0,h)--cycle;
  if LaTeX_file <> "":
    write EOF to LaTeX_file;
    LaTeX_file := "";
  fi
  endfig
enddef;
%    \end{macrocode}
%
% Sharped dimensions are useless with \MP.  We define them anyway
% with trivial translation, so that the \MF{} code can be used
% unchanged.
%    \begin{macrocode}
bp# := bp;
cc# := cc;
cm# := cm;
dd# := dd;
in# := in;
mm# := mm;
pc# := pc;
pt# := pt;
%    \end{macrocode}
% As I said: trivial translation.
%    \begin{macrocode}
vardef define_blacker_pixels(text t) =
  forsuffixes $=t:
    $:=$.#;
  endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
picture unitpixel;
unitpixel = nullpicture;
addto unitpixel contour unitsquare;
def t_ = \ enddef;
%</mp>
%    \end{macrocode}
%
%    \begin{macrocode}
%<!mp>mode_setup;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Basics}
% \label{sec:mf-basics}
%
% Allow the user to life dangerously or not, depending on his
% preferences.
% \changes{v0.7}{1994/10/23}{\texttt{fmfwizard}: to live dangerously or not.}
%    \begin{macrocode}
boolean feynmfwizard;
feynmfwizard := false;
%</base>
%    \end{macrocode}
% \begin{macro}{\fmfwizard}
%   \begin{macro}{\fmfnowizard}
%    \begin{macrocode}
%<*style>
\def\fmfwizard{\fmfcmd{feynmfwizard := true;}}
\def\fmfnowizard{\fmfcmd{feynmfwizard := false;}}
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% Default values of style parameters:
%    \begin{macrocode}
%<*base>
thin# := 1pt#; % dimension of the lines
thick# := 2thin#;
arrow_len# := 4mm#;
arrow_ang := 15;
curly_len# := 3mm#;
dash_len# := 3mm#; % 'photon' lines
dot_len# := 2mm#; % 'photon' lines
wiggly_len# := 4mm#; % 'photon' lines
wiggly_slope := 60;
zigzag_len# := 2mm#;
zigzag_width# := 2thick#;
decor_size# := 5mm#;
dot_size# := 2thick#;
%    \end{macrocode}
% Convert ``sharp'' units:
%    \begin{macrocode}
define_blacker_pixels (thick, thin,
  dash_len, dot_len, wiggly_len, curly_len,
  zigzag_len, zigzag_width, arrow_len, decor_size, dot_size);
%    \end{macrocode}
%
% Back by popular demand: shrinking dimensions.
% \changes{v0.5}{1994/06/13}{%
%   Back by popular demand: shrinking dimensions.}
%    \begin{macrocode}
def shrink expr s =
  begingroup
  if shrinkables <> "":
    save tmp_;
    forsuffixes $ = scantokens shrinkables:
%    \end{macrocode}
% The sharp dimension might not be known, e.g.~after
% |\fmfset{arrow_len}{6mm}|, protect against that:
% \changes{v1.06}{1995/05/29}{%
%   Make \texttt{shrink} work, even if the sharp dimension is not
%   known.}
%    \begin{macrocode}
      if known $.#:
        tmp_ := $.#;
        save $;
        $.# := s * tmp_;
        define_blacker_pixels ($);
      else:
        tmp_ := $;
        save $;
        $ := s * tmp_;
      fi
    endfor
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
def endshrink =
  endgroup
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfshrink}
%   \begin{macro}{\endfmfshrink}
% Exporting the whole enchilada to \LaTeX:
%    \begin{macrocode}
%<*style>
\def\fmfshrink#1{\fmfcmd{shrink (#1);}}
\def\endfmfshrink{\fmfcmd{endshrink;}}
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
%    \begin {macrocode}
%<*base>
string shrinkables;
shrinkables := "";
%    \end{macrocode}
%
% This macro is used to register shrinkable dimensions.  It is not
% really robust, we have add the first enty by hand:
%    \begin {macrocode}
vardef addto_shrinkables (text l) =
  forsuffixes $ = l:
    shrinkables := shrinkables & "," & str $;
  endfor
enddef;
shrinkables := "thick,thin";
%    \end{macrocode}
%
%    \begin {macrocode}
addto_shrinkables (dash_len, dot_len);
addto_shrinkables (wiggly_len, curly_len);
addto_shrinkables (zigzag_len, zigzag_width);
addto_shrinkables (arrow_len);
addto_shrinkables (decor_size, dot_size);
%    \end{macrocode}
%
% Default to metric units, but this will be reset by |\begin{fmfgraph}|
% anyway.
%    \begin {macrocode}
LaTeX_unitlength := mm;
%    \end{macrocode}
%
% Count the number of tokens in the argument:
%    \begin {macrocode}
vardef count (text list) =
  forsuffixes $ = list: + 1 endfor
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Parsing options}
% \label{sec:getopt}
%
% Parse the string |s| into comma separated tokens |opt[]|, ignoring
% blanks before |=|'s. Double commas are passed as a single comma.
% \changes{v0.8}{1994/10/25}{%
%   Plugged the string memory leak in \texttt{getopt}: don't create
%   intermediate one character strings, \MF{} never claims them back.}
%    \begin {macrocode}
vardef getopt (suffix opt) (expr s) =
  save n, argp, escape, anchor, skip;
  numeric opt.first, opt.last, n, anchor;
  string opt[], opt[]arg;
  boolean opt[]tainted, argp, escape, skip;
  opt.first := 0;
  opt.last := 0;
  opt[opt.last] := "";
  argp := false;
  escape := false;
  anchor := 0;
  skip := true;
  for n = 1 upto length (s):
%    \end{macrocode}
% Skip blanks at the beginning of each option or argument:
%    \begin {macrocode}
    if skip and (substring (n-1, n) of s = " "):
      anchor := anchor + 1;
    else:
      skip := false;
%    \end{macrocode}
% If we see a comma which has not been escaped, check for a second
% comma and set the |escape| flags and remember to remove the second
% comma later or reset the |argp| flag, as appropriate:
%    \begin {macrocode}
      if not escape and (substring (n-1, n) of s = ","):
        if substring (n, n+1) of s = ",":
          escape := true;
          opt[opt.last]tainted := true;
%    \end{macrocode}
% Else accept the option or argument:
%    \begin {macrocode}
        else:
          if argp:
            opt[opt.last]arg := substring (anchor, n-1) of s;
          else:
            opt[opt.last] := substring (anchor, n-1) of s;
          fi
          anchor := n;
          argp := false;
          skip := true;
          opt.last := opt.last + 1;
        fi
%    \end{macrocode}
% Start as argument and ignore |=|'s until the next option:
%    \begin {macrocode}
      elseif not argp and (substring (n-1, n) of s = "="):
        opt[opt.last] := substring (anchor, n-1) of s;
        anchor := n;
        argp := true;
        skip := true;
%    \end{macrocode}
% Accept the next character (either option or argument) and reset the
% |escape| flag:
%    \begin {macrocode}
      elseif argp or (substring (n-1, n) of s <> " "):
        escape := false;
      fi
    fi
  endfor
%    \end{macrocode}
% Accept the final option or argument:
%    \begin {macrocode}
  if argp:
    opt[opt.last]arg := substring (anchor, length s) of s;
  else:
    opt[opt.last] := substring (anchor, length s) of s;
  fi
%    \end{macrocode}
% We still have to remove possible doubled commata from the arguments.
% Theoretically, we could already have done it above (that's the way
% earlier versions of \FMF{} did it), but only at the expense of
% excessive copying of strings (like |opt[n]arg:=opt[n]arg&c|).  Given
% \MF's string handling, we should avoid these \emph{at any cost},
% because the wasted string memory will \emph{never} be
% reclaimed!\footnote{Actually, \MP{} has code to compact the string
%   pool, which  makes \emph{a lot} of difference in the present case.
%   But this doesn't help us with \MF.}
% Since the more elegant former version had a serious string memory
% leak, we'd better stick to the current ugly but space efficient
% implementation.
%    \begin {macrocode}
  for n = opt.first upto opt.last:
    if known opt[n]tainted:
      if opt[n]tainted:
        opt[n]arg := untaint_string opt[n]arg;
      fi
    fi
  endfor
enddef;
%    \end{macrocode}
% Turn double commata into single commata, using as little string
% copies as possible:
%    \begin {macrocode}
vardef untaint_string suffix s =
  save n, anchor;
  numeric n, anchor;
  anchor := 0;
  for n = 1 upto length (s) - 1:
    if substring (n-1,n+1) of s = ",,":
      substring (anchor, n-1) of s &
      hide (anchor := n)
    fi
  endfor
  substring (anchor, length s) of s
enddef;
%    \end{macrocode}
%
% Split a string into |.|-separated components for matching options.
%    \begin {macrocode}
vardef split_string (suffix comp) (expr s) =
  save n, anchor;
  numeric comp.first, comp.last, n, anchor;
  string comp[];
  comp.first := 0;
  comp.last := 0;
  comp[comp.last] := "";
  anchor := 0;
  for n = 1 upto length (s):
    if substring (n-1,n) of s = ".":
      comp[comp.last] := substring (anchor, n-1) of s;
      comp.last := comp.last + 1;
      anchor := n;
    fi
  endfor
  comp[comp.last] := substring (anchor, length s) of s;
enddef;
%    \end{macrocode}
% Return |true| iff |prefix| is a prefix of |s|:
%    \begin {macrocode}
vardef match_prefix (expr prefix, s) =
  (prefix = substring (0, length prefix) of s)
enddef;
%    \end{macrocode}
% Match options similarly to |Xt| resource strings, but allowing for
% abbreviations:
% \changes{v0.7}{1994/10/23}{More general option parsing.}
%    \begin {macrocode}
vardef match_option (expr s, option) =
  save sc, optionc, n, i;
  numeric sc.first, sc.last, optionc.first, optionc.last;
  string sc[], optionc[];
  numeric n, i;
  split_string (sc, s);
  split_string (optionc, option);
  n := sc.last - sc.first;
  if n <> (optionc.last - optionc.first):
    false
  else:
    true
    for i = 0 upto n:
      and match_prefix (sc[sc.first+i],
                        optionc[optionc.first+i])
    endfor
  fi
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Manipulating \texttt{picture}s}
% \label{sec:pictures}
%
% This section is leftover from the five year old |feynman.mf| package
% and is now obsolete for \MF.  Ironically, we still need it to mimic
% our \MF{} clipping code in \MP.
%
% |save_picture (list_of_pictures)| |save|'s each member of
% |list_of_pictures| inside a group and reinitializes them as nullpictures.
%    \begin{macrocode}
def save_picture text t =
 save t; picture t; forsuffixes p=t: p:=nullpicture; endfor
enddef;
%    \end{macrocode}
%
% |begin_sketch| pushes the sketchpad stack and perform the following
% drawing commands (upto the next |end_sketch|) on the new sketchpad.
%    \begin{macrocode}
def begin_sketch =
 begingroup save_picture currentpicture;
 sketchlevel := sketchlevel+1;
enddef;
%    \end{macrocode}
%
% |end_sketch| pops the sketchpad stack.
%    \begin{macrocode}
def end_sketch =
 sketchlevel := sketchlevel-1;
 sketchpad[sketchlevel] := currentpicture;
 endgroup
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
picture sketchpad[];
sketchlevel := 1;
%    \end{macrocode}
%
% |use_sketch (transformation)| copies the transformed sketchpad into
% the current picture.
%    \begin{macrocode}
vardef use_sketch text t =
 addto currentpicture also (sketchpad[sketchlevel] t)
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Tilings}
% \label{sec:tilings}
%
% Colored drawing is available with \MP{} only:
% \changes{v0.98}{1995/04/29}{Color support.}
%    \begin{macrocode}
vardef cdraw expr p =
%<mp>  draw p withcolor foreground
%<!mp> draw p
enddef;
vardef cfill expr p =
%<mp>  fill p withcolor foreground
%<!mp> fill p
enddef;
vardef cfilldraw expr p =
%<mp>  filldraw p withcolor foreground
%<!mp> filldraw p
enddef;
%    \end{macrocode}
% |autorounding| would disturb |cutdraw|.
% \changes{v1.01}{1995/06/04}{%
%   No \texttt{autorounding} for \texttt{cutdraw}.}
%    \begin{macrocode}
vardef ccutdraw expr p =
%<mp>  cutdraw p withcolor foreground
%<!mp> interim autorounding := 0;
%<!mp> cutdraw p
enddef;
vardef cdrawdot expr p =
%<mp>  drawdot p withcolor foreground
%<!mp> drawdot p
enddef;
%    \end{macrocode}
%
% \changes{v1.01}{1995/06/11}{Implement tilings.}
% We also need some textprocessing tools.  Here's a slow and portable
% incarnation of |isdigit|:
%    \begin{macrocode}
vardef isdigit expr s =
  save n;
  (s = "0")
  for n = 1 upto 9:
    or (s = decimal n)
  endfor
enddef;
%    \end{macrocode}
% it is used in the next function, which return the interval of the
% first digits after |start| in the string |s|:
%    \begin{macrocode}
vardef digits_index (expr s, start) =
  save n, m, from, to;
  for n = start upto (length s)-1:
    if isdigit (substring (n,n+1) of s):
      from := n;
      for m = n upto length s:
        if not isdigit (substring (m,m+1) of s):
          to := m;
        fi
        exitif known to;
      endfor
    fi
    exitif known from;
  endfor
  (from, if known to: to else: infinity fi)
enddef;
%    \end{macrocode}
% The application is in this function, which takes a |suffix| and
% returns it textual representation, with all sequences of digits
% replaced by |[]|.  We need it later, because declarations like
% |picture foo1bar2;| are \emph{verboten} in \MF, they have to be
% replaced by |picture foo[]bar[];|.
%    \begin{macrocode}
vardef digits_to_brackets suffix suf =
  save s, idx;
  string s;
  pair idx;
  s = str suf;
  idx = (0,0);
  forever:
    idx := digits_index (s, xpart idx);
    exitif unknown xpart idx;
    s := substring (0,xpart idx) of s
      & "[]" & substring (ypart idx,infinity) of s;
  endfor
  s
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
tile_grain := 1in/300;
%    \end{macrocode}
%
% Declare a tile.
%    \begin{macrocode}
vardef def_tile (suffix t) (expr wd, ht) =
  if not picture tlist.t:
    picture tlist.scantokens (digits_to_brackets t);
  fi
  tlist.t := nullpicture;
  tlist.t.dx := max (floor wd, 1);
  tlist.t.dy := max (floor ht, 1);
enddef;
%    \end{macrocode}
%
% Use the tile |t| to tile a rectangle of width |wd| and height |ht|
% with lower left corner at |(x,y)|.  The upper and right boundaries
% will be rounded to multiples of the tile size.  Note that it is
% vital for our clipping tricks that \emph{no} pixel gets a weight of
% two or more!
%    \begin{macrocode}
vardef use_tile (suffix t) (expr x, y, wd, ht) =
%<*mp>
  fill unitsquare xscaled wd yscaled ht shifted (x,y)
    withcolor background;
  if str t = "shaded":
    shade_rectangle (4thin, x, y, wd, ht);
  elseif str t = "hatched":
    shade_rectangle (5thin, x, y, wd, ht);
    shade_rectangle (-5thin, x, y, wd, ht);
  else:
%</mp>
    if (picture tlist.t):
      for nx = 0 upto wd/tlist.t.dx:
        for ny = 0 upto ht/tlist.t.dy:
          addto currentpicture
            also (tlist.t shifted
                  ((x,y) + (nx*tlist.t.dx, ny*tlist.t.dy)) t_);
        endfor
      endfor
    else:
      errhelp "feynmf: your tiling has not been defined, "
            & "check spelling and reprocess!";
      errmessage "feynmf: tiling `" & str t & "' not known, "
               & "replaced by `shaded'"; 
      use_tile (shaded, x, y, wd, ht);
    fi
%<*mp>
  fi
%</mp>
enddef;
%    \end{macrocode}
% Shade a square enclosing the rectangle:
%    \begin{macrocode}
vardef shade_rectangle (expr dd, x, y, wd, ht) =
  save d, u, dx, dy, currentpen;
  pen currentpen;
  pickup pencircle scaled thin;
  d := max (floor (abs dd), 1);
  dx := max (wd, ht);
  dy := max (wd, ht);
  for u = 0 step d/dx until 1:
    if dd > 0:
      cdraw (x-d,y+u*dy-d)--(x+(1-u)*dx+d,y+dy+d);
      cdraw (x+u*dx-d,y-d)--(x+dx+d,y+(1-u)*dy+d);
    else:
      cdraw (x-d,y+u*dy+d)--(x+u*dx+d,y-d);
      cdraw (x+(1-u)*dx-d,y+dy+d)--(x+dx+d,y+(1-u)*dy-d);
    fi
  endfor
enddef;
%    \end{macrocode}
% Syntatic sugar:
%    \begin{macrocode}
def addto_tile (suffix t) =
  addto tlist.t
enddef;
%    \end{macrocode}
%
% Construct a tile from a ASCII picture:
%    \begin{macrocode}
vardef tile_from_string (suffix t) (expr str) =
  tile_grain := max (floor tile_grain, 1);
  save grain, mx, x, y, n, c, pic;
  string c;
  picture pic;
  pic := nullpicture;
  grain := tile_grain;
  mx := 0;
  x := 0;
  y := 0;
  for n := 1 upto length str:
    c := substring (n-1,n) of str;
    if c = "/":
      mx := max (mx, x);
      y := y+1;
      x := 0;
    elseif c = "*":
      addto pic also (unitpixel shifted (x,-y) t_);
      x := x+1;
    elseif c = ".":
      x := x+1;
    fi
  endfor
  def_tile (t, grain*mx, grain*(y+1));
  addto_tile (t) also (pic shifted (0,y) scaled grain t_);
  pic := nullpicture;
enddef;
%    \end{macrocode}
%
% Some standard tiles:
%    \begin{macrocode}
tile_from_string (gray10,
  "  ...  /"&
  "  .*.  /"&
  "  ...  ");
%    \end{macrocode}
%    \begin{macrocode}
tile_from_string (gray25,
  "  ..  /"&
  "  *.  ");
%    \end{macrocode}
%    \begin{macrocode}
tile_from_string (gray50,
  "  .*  /"&
  "  *.  ");
%    \end{macrocode}
%    \begin{macrocode}
tile_from_string (gray75,
  "  **  /"&
  "  .*  ");
%    \end{macrocode}
%    \begin{macrocode}
tile_from_string (gray90,
  "  ***  /"&
  "  *.*  /"&
  "  ***  ");
%    \end{macrocode}
%
% The |shaded| and |hatched| tiles are handled specially:
% \begin{itemize}
%   \item{} the tiling approach is device dependent and diagonal lines
%     will not look nice if drawn to coarsely.
%   \item{} in \MP, we need to conserve memory, because the tiling
%     approach will quickly exceed \MP's main memory.  The solution is
%     to intercept |use_tile|, as done above.
% \end{itemize}
%    \begin{macrocode}
%<*!mp>
def_tile (shaded, 4thin, 4thin);
pickup pencircle scaled thin;
begin_sketch
  save dx, dy;
  (dx,dy) = (tlist.shaded.dx,tlist.shaded.dy);
  shade_rectangle (dx, 0, 0, dx, dy);
  cullit;
  fill unitsquare xscaled dx yscaled dy;
  cull currentpicture keeping (2,infinity);
  tlist.shaded := currentpicture;
end_sketch;
%    \end{macrocode}
%
%    \begin{macrocode}
def_tile (hatched, 5thin, 5thin);
begin_sketch
  save dx, dy;
  (dx,dy) = (tlist.hatched.dx,tlist.hatched.dy);
  shade_rectangle (dx, 0, 0, dx, dy);
  shade_rectangle (-dx, 0, 0, dx, dy);
  cullit;
  fill unitsquare xscaled dx yscaled dy;
  cull currentpicture keeping (2,infinity);
  tlist.hatched := currentpicture;
end_sketch;
%</!mp>
%    \end{macrocode}
%
% Halftoning is tricky, this solution is not perfect yet.  The idea is
% to use highly nonlinear function for displacing adjacent, in order
% to avoid regular patterns in thinly populated tiles.  The random
% number solution works somehow, but hand crafted regular patterns are
% still superior.
%    \begin{macrocode}
%<*!mp>
vardef make_halftone (suffix t) (expr g, wd, ht) =
  tile_grain := max (floor tile_grain, 1);
  if (halftone_cache_g <> g)
     or (halftone_cache_grain <> tile_grain)
     or (halftone_cache_wd <> wd)
     or (halftone_cache_ht <> ht):
    halftone_cache_g := g;
    halftone_cache_grain := tile_grain;
    halftone_cache_wd := wd;
    halftone_cache_ht := ht;
    grain := tile_grain;
    def_tile (t, grain*wd, grain*ht);
    if g <= 0:
      addto_tile (t) contour unitsquare xscaled wd yscaled ht scaled grain t_;
    elseif g < 1:
      save period, offset, b, w;
      period := max (1/g, 1/(1-g));
      offset := wd - (period * ceiling (wd/period)) mod wd;
      b := 0;
      w := 0;
      randomseed := halftone_randomseed;
      for y = 0 upto ht-1:
        for x = 0 upto wd-1:
          if w > g*(b+w):
            addto_tile (t) also (unitpixel
              shifted (floor (x + y*offset + 2*uniformdeviate period)
                       mod wd, y)
              scaled grain t_);
            b := b+1;
          else:
            w := w+1;
          fi;
        endfor
      endfor
      cull tlist.t keeping (1,infinity);
    fi
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
halftone_cache_g := -1;
halftone_cache_grain := -1;
halftone_cache_wd := -1;
halftone_cache_ht := -1;
halftone_randomseed := 137;
%</!mp>
%    \end{macrocode}
% Halftoning is trivial in \MP:
%    \begin{macrocode}
%<*mp>
vardef make_halftone (suffix t) (expr g, wd, ht) =
  def_tile (t, wd, ht);
  addto tlist.t contour unitsquare
    xscaled wd yscaled ht withcolor ((1-g)*foreground + g*background)
enddef;
%</mp>
%    \end{macrocode}
%
%    \begin{macrocode}
vardef tile (suffix t) (expr p) =
  save u, x, y, max_x, min_x, max_y, min_y, xx, yy;
  -max_x = -max_y = min_x = min_y = infinity;
  for u = 0 step 0.1 until length p:
    x := xpart (point u of p);
    y := ypart (point u of p);
    max_x := max(max_x, x);   
    max_y := max(max_y, y);
    min_x := min(min_x, x);   
    min_y := min(min_y, y);   
  endfor
%<*!mp>
%    \end{macrocode}
% Give the already drawn parts a weight of 2.  Then they will survive
% along with the intersection of the tiling and the interior of the
% path |p|:
%    \begin{macrocode}
  cullit withweight 2;
  use_tile (t, min_x, min_y, max_x-min_x, max_y-min_y);
  fill p;
  cull currentpicture keeping (2,infinity)
%</!mp>
%<*mp>
  begin_sketch
    use_tile (t, min_x, min_y, max_x-min_x, max_y-min_y);
    clip currentpicture to p;
  end_sketch;
  use_sketch;
%</mp>
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef drawtile (suffix t) (expr p) =
  tile (t, p);
  cdraw p
enddef;
%    \end{macrocode}
%
% Use \MP's haltoning features (if available), because they are much
% more efficient: 
%    \begin{macrocode}
%<*!mp>
vardef use_halftone (expr g, x, y, wd, ht) =
  make_halftone (__tmp_tile__, g, 50, 50);
  use_tile (__tmp_tile__, x, y, wd, ht)
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef halftone (expr g, p) =
  make_halftone (__tmp_tile__, g, 50, 50);
  tile (__tmp_tile__, p)
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef drawhalftone (expr g, p) =
  halftone (g, p);
  cdraw p
enddef;
%</!mp>
%    \end{macrocode}
%
%    \begin{macrocode}
%<*mp>
vardef use_halftone (expr g, x, y, wd, ht) =
  fill unitsquare xscaled wd yscaled ht
    shifted (x,y) withcolor ((1-g)*foreground + g*background)
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef halftone (expr g, p) =
  fill p withcolor ((1-g)*foreground + g*background)
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef drawhalftone (expr g, p) =
  fill p withcolor ((1-g)*foreground + g*background);
  cdraw p
enddef;
%</mp>
%    \end{macrocode}
%
%    \begin{macrocode}
vardef shade expr p =
  tile (shaded, p)
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef hatch expr p =
  tile (hatched, p)
enddef;
%    \end{macrocode}
%
% Here come |filldraw|'s sisters:
%    \begin{macrocode}
vardef emptydraw expr p =
  cullit;
  unfill p;
  cullit;
  cdraw p;
enddef;
vardef shadedraw expr p =
  cullit;
  unfill p;
  cullit;
  shade p;
  cdraw p;
enddef;
vardef hatchdraw expr p =
  cullit;
  unfill p;
  cullit;
  hatch p;
  cdraw p;
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Arrows}
% \label{sec:arrows}
%
% John Hobby has a particulary nice |arrowhead| macro in plain \MP.
% Some variations on that theme adapted to our needs are here.
% \changes{v0.5}{1994/10/20}{New arrows, which look better on curved arcs.}
% Firstly centered on fraction |frac| of |p|:
% \changes{v0.99}{1995/05/04}{%
%   More general arrows \texttt{marrow}, \texttt{harrow} and
%   \texttt{tarrow} with reference
%   points in middle, at the head and at the tail, respectively.}
%    \begin{macrocode}
vardef marrow (expr p, frac) =
  save a, t, z;
  pair z;
  a = angle direction frac*length(p) of p;
  z = point frac*length(p) of p;
  (t1,whatever) = p intersectiontimes
    (halfcircle scaled 2/3arrow_len rotated (a+90) shifted z);
  (t2,whatever) = p intersectiontimes
    (halfcircle scaled 4/3arrow_len rotated (a-90) shifted z);
  arrow_head (p, t1, t2, arrow_ang)
enddef;
%    \end{macrocode}
% secondly with reference point at the tail:
%    \begin{macrocode}
vardef tarrow (expr p, frac) =
  save a, t, z;
  pair z;
  t1 = frac*length p;
  a = angle direction t1 of p;
  z = point t1 of p;
  (t2,whatever) = p intersectiontimes
    (halfcircle scaled 2arrow_len rotated (a-90) shifted z);
  arrow_head (p, t1, t2, arrow_ang)
enddef;
%    \end{macrocode}
% and finally with reference point at the head:
%    \begin{macrocode}
vardef harrow (expr p, frac) =
  save a, t, z;
  pair z;
  t2 = frac*length p;
  a = angle direction t2 of p;
  z = point t2 of p;
  (t1,whatever) = p intersectiontimes
     (halfcircle scaled 2arrow_len rotated (a+90) shifted z);
  arrow_head (p, t1, t2, arrow_ang)
enddef;
%    \end{macrocode}
% Construct an arrowhead on path |p|, ranging from |from| to |to| with
% opening angle |ang|:
% compatibility:
%    \begin{macrocode}
vardef arrow_head (expr p, from, to, ang) =
  save tip, ap, t;
  pair tip;
  path ap;
  t1 := from;
  t2 := to;
%    \end{macrocode}
% |from| and |to| may come from an |intersectiontimes|.  This
% could have failed, typically if the path is too short: protect
% against it.
% \changes{v0.6}{1994/10/21}{Fix arrows on too short arcs.}
%    \begin{macrocode}
  if t1 = -1: t1 := 0; fi
  if t2 = -1: t2 := infinity; fi
  tip = point t2 of p;
  ap = subpath (t1,t2) of p shifted -tip;
  (ap rotated ang
    forced_join reverse ap rotated -ang
    -- cycle) shifted tip
enddef;
%    \end{macrocode}
% The old, plainly centered |arrow|.  Retain it for convenience and
% compatibility:
%    \begin{macrocode}
vardef arrow expr p =
  marrow (p, .5)
enddef;
%    \end{macrocode}
% Join two paths |p| and |q| even if they don't fit exactly by
% adjusting their common point.  This is necessary in |arrow| because
% rounding errors might induce a small mismatch even if we \emph{know}
% that they should match theoretically.  This is certainly a kludge
% and should be used with care, but it works.
%    \begin{macrocode}
tertiarydef p forced_join q =
  subpath (0, length p - 1) of p
  & point (length p - 1) of p
    .. controls postcontrol (length p - 1) of p
                and precontrol infinity of p
  .. .5[point infinity of p, point 0 of q]
    .. controls postcontrol 0 of q and precontrol 1 of q
    .. point 1 of q
  & subpath (1, infinity) of q
enddef;
%    \end{macrocode}
%
% |cut_decors| expands to a subpath of |path_arg|, excluding the
% decoration at the vertices.
% \changes{v0.7}{1994/10/22}{Cut general vertex decorations.}
% \changes{v0.9}{1995/04/25}{%
%   Fix \texttt{cut\_decors} to work with tadpoles.}
%    \begin{macrocode}
vardef cut_decors (suffix from) (expr p) (suffix to) =
 subpath (if known from.decor.shape:
            xpart (p intersectiontimes
                     (from.decor.shape scaled from.decor.size
                                       shifted from.loc))
          else:
            0
          fi,
          if known to.decor.shape:
            length p 
              - xpart (reverse p intersectiontimes
                        (to.decor.shape scaled to.decor.size
                                        shifted to.loc))
          else:
             infinity
          fi) of p
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Blobs}
% \label{sec:blobs}
%
% The following functions are obsolete.  We keep them for a couple of
% releases but users should be aware that they can go away without any
% warning!
%
% The function |make_blob| is the working horse of |draw_blob|.
%    \begin{macrocode}
vardef make_blob (expr z_arg, diameter) =
 save p,currentpen; path p; pen currentpen;
 pickup pencircle scaled thick;
 p = fullcircle scaled diameter shifted z_arg;
 shadedraw p;
enddef;
%    \end{macrocode}
%
% |draw_blob (pair_arg, diameter)| draws a shaded blob of diameter
% |diameter| centered at |pair_arg|. The thickness of the border is
% controlled by the global variable |thick|.
%
% Hint: It saves time to draw blobs of the same size in sequence.
%    \begin{macrocode}
vardef draw_blob (expr z_arg, diameter) =
 if sketched_blob_diameter <> diameter: % drawn lately?
  begin_sketch make_blob (origin, diameter); end_sketch; % redo hard work!
  sketched_blob_diameter:= diameter;  % record it
 fi
 use_sketch shifted z_arg; % the easy way ...
enddef;
%    \end{macrocode}
%
% |force_new_blob| forces the redrawing of a blob of the same diameter
% (in case you only changed the shading parameters).
%    \begin{macrocode}
def force_new_blob = sketched_blob_diameter := -1; enddef;
force_new_blob;                                 % initialize it.
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Drawing}
% \label{sec:drawing}
%
% Easier than
% \begin{equation}
%   \int_0^1 dt \left\vert\frac{dx(t)}{dt}\right\vert
% \end{equation}
% with the integrand the square root of a fourth order polynomial, but
% sufficient for all practical purposes is
%    \begin{macrocode}
vardef pixlen (expr p, n) =
  for k=1 upto length(p): + segment_pixlen (subpath (k-1,k) of p, n) endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef segment_pixlen (expr p, n) =
  for k=1 upto n: + abs (point k/n of p - point (k-1)/n of p) endfor
enddef;
%    \end{macrocode}
%
% |wiggly p| expands to a ``wiggled'' version of |p|. The
% slope of the wiggles is controlled by the global variable |wiggle_slope|,
% the length of the wiggles by the global variable |wiggly_len|.
% \changes{v1.08}{1996/09/01}{%
%   \texttt{wiggly}: integer number of wiggles for full path instead of
%   each segment.}
%    \begin{macrocode}
vardef wiggly expr p_arg =
 save wpp;
 numeric wpp;
 wpp = ceiling (pixlen (p_arg, 10) / wiggly_len) / length p_arg;
 for k=0 upto wpp*length(p_arg) - 1:
  point k/wpp of p_arg
       {direction k/wpp of p_arg rotated wiggly_slope} ..
  point (k+.5)/wpp of p_arg
       {direction (k+.5)/wpp of p_arg rotated - wiggly_slope} ..
 endfor
 if cycle p_arg: cycle else: point infinity of p_arg fi
enddef;
%    \end{macrocode}
%
% |curly p| expands to a ``curly'' version of |p|. The
% the length of the curls is controlled  by the global variable
% |curly_len|.
% \changes{v1.08}{1996/09/01}{%
%   \texttt{curly}: integer number of curls for full path instead of
%   each segment.}
%    \begin{macrocode}
vardef curly expr p =
 save cpp;
 numeric cpp;
 cpp := ceiling (pixlen (p, 10) / curly_len) / length p;
 if cycle p:
   for k=0 upto cpp*length(p) - 1:
     point (k+.33)/cpp of p
           {direction (k+.33)/cpp of p rotated 90} ..
     point (k-.33)/cpp of p
           {direction (k-.33)/cpp of p rotated -90} ..
   endfor
   cycle
 else:
   point 0 of p
         {direction 0 of p rotated -90} ..
   for k=1 upto cpp*length(p) - 1:
     point (k+.33)/cpp of p
           {direction (k+.33)/cpp of p rotated 90} ..
     point (k-.33)/cpp of p
           {direction (k-.33)/cpp of p rotated -90} ..
   endfor
   point infinity of p
         {direction infinity of p rotated 90}
 fi
enddef;
%    \end{macrocode}
%
% |zigzag p| expands to a ``zig-zag'' version of |p|. The
% the length of the zags is controlled  by the global variable
% |zigzag_len|.
% \changes{v0.9}{1995/04/26}{\texttt{zigzag}: new line style.}
% \changes{v1.08}{1996/09/01}{%
%   \texttt{zigzag}: integer number of zigzacs for full path instead of
%   each segment.}
%    \begin{macrocode}
vardef zigzag expr p =
 save zpp;
 numeric zpp;
 zpp = ceiling (pixlen (p, 10) / zigzag_len) / length p;
 if not cycle p:
   point 0 of p --
 fi
 for k = 0 upto zpp*length(p) - 1:
   point (k+1/3)/zpp of p shifted
     (zigzag_width
      * dir angle (direction (k+1/3)/zpp of p rotated 90)) --
   point (k+2/3)/zpp of p shifted
     (zigzag_width
      * dir angle (direction (k+2/3)/zpp of p rotated -90)) --
 endfor
 if cycle p:
   cycle
 else:
   point infinity of p
 fi
enddef;
%    \end{macrocode}
%
% An inventory of valid line styles is implemented as a hash table:
%    \begin{macrocode}
save vsty_hash;
%    \end{macrocode}
% This is a bit like |mode_def| in plain \MF{} but doesn't use an
% array of available modes: |style_def "foo"| will define a macro
% |draw_foo| drawing a line of a certain style along any given path:
%    \begin{macrocode}
def style_def suffix s =
  vsty_hash.s := 1;
  expandafter quote vardef scantokens ("draw_" & str s)
enddef;
%    \end{macrocode}
%
% Let \MF{} do the lookup: suffices
%    \begin{macrocode}
vardef vsty_exists suffix s =
  known vsty_hash.s
enddef;
%    \end{macrocode}
% an strings
%    \begin{macrocode}
vardef valid_style expr s =
  expandafter vsty_exists scantokens (s)
enddef;
%    \end{macrocode}
%
% \changes{v0.8}{1994/11/21}{Enhance and streamline the line styles.}
% |phantom| lines are simple, even with arrows.
%    \begin{macrocode}
style_def phantom expr p =
  \
enddef;
style_def phantom_arrow expr p =
  cfill (arrow p);
enddef;
%    \end{macrocode}
% |plain| lines aren't harder.
%    \begin{macrocode}
style_def plain expr p =
  cdraw p;
enddef;
style_def plain_arrow expr p =
  cdraw p;
  cfill (arrow p);
enddef;
style_def dbl_plain expr p =
  draw_double p;
enddef;
style_def dbl_plain_arrow expr p =
  draw_double_arrow p;
enddef;
%    \end{macrocode}
% Wiggly lines use |wiggly| from above
%    \begin{macrocode}
style_def wiggly expr p =
  cdraw (wiggly p);
enddef;
style_def dbl_wiggly expr p =
  draw_double (wiggly p);
enddef;
%    \end{macrocode}
% and curly lines use |curly| from above
%    \begin{macrocode}
style_def curly expr p =
  cdraw (curly p);
enddef;
style_def dbl_curly expr p =
  draw_double (curly p);
enddef;
%    \end{macrocode}
% zig-zag ditto:
%    \begin{macrocode}
style_def zigzag expr p =
  cdraw (zigzag p);
enddef;
style_def dbl_zigzag expr p =
  draw_double (zigzag p);
enddef;
%    \end{macrocode}
% |draw_dashes p| draws a dashed line on |p|
% \changes{v0.4}{1994/05/27}{%
%   Rename the line style \texttt{dashed} to \texttt{dashes}, to avoid
%   a name clash with \MP.}
% \changes{v1.08}{1996/09/01}{%
%   \texttt{dashes}, \texttt{dbl\_dashes}:
%   integer number of dashes for full path instead of each segment.}
%    \begin{macrocode}
style_def dashes expr p =
 save dpp;
 numeric dpp;
 dpp = ceiling (pixlen (p, 10) / dash_len) / length p;
 for k=0 upto dpp*length(p) - 1:
  cdraw point k/dpp of p ..
   point (k+.5)/dpp of p;
 endfor
enddef;
style_def dbl_dashes expr p =
 save dpp;
 numeric dpp;
 dpp = ceiling (pixlen (p, 10) / dash_len) / length p;
 for k=0 upto dpp*length(p) - 1:
  draw_double point k/dpp of p ..
   point (k+.5)/dpp of p;
 endfor
enddef;
%    \end{macrocode}
%  Draw arrows for doubled lines larger:
% \changes{v1.06}{1995/05/29}{%
%   Draw larger arrows for doubled lines (scale factor 1.5).}
%    \begin{macrocode}
style_def dbl_dashes_arrow expr p =
  draw_dbl_dashes p;
  shrink (1.5);
    cfill (arrow p);
  endshrink;
enddef;
style_def dashes_arrow expr p =
  draw_dashes p;
  cfill (arrow p);
enddef;
%    \end{macrocode}
%
% |draw_dots p| draws a dotted line on |path_arg|
% \changes{v0.4}{1994/05/27}{%
%   Rename the line style \texttt{dotted} to \texttt{dots}, to be
%   consistent with \texttt{dashes}.}
% \changes{v1.08}{1996/09/01}{%
%   \texttt{dots}, \texttt{dbl\_dots}:
%   integer number of dots for full path instead of each segment.}
%    \begin{macrocode}
style_def dots expr p =
 save dpp;
 numeric dpp;
 dpp = ceiling (pixlen (p, 10) / dot_len) / length p;
 for k=0 upto dpp*length(p):
   cdrawdot point k/dpp of p;
 endfor
enddef;
style_def dbl_dots expr p =
  save dpp;
  numeric dpp;
  dpp = ceiling (pixlen (p, 10) / dot_len) / length p;
  begingroup
    save oldpen;
    pen oldpen;
    oldpen := currentpen;
    pickup oldpen scaled 3; % draw a thick linn
    for k=0 upto dpp*length(p):
      cdrawdot point k/dpp of p;
    endfor
    pickup oldpen;
    cullit;
    for k=0 upto dpp*length(p):
      undrawdot point k/dpp of p;
    endfor
    cullit; % and remove the stuffing
  endgroup;
enddef;
style_def dbl_dots_arrow expr p =
  draw_dbl_dots p;
  shrink (1.5);
    cfill (arrow p);
  endshrink;
enddef;
style_def dots_arrow expr p =
  draw_dots p;
  cfill (arrow p);
enddef;
%    \end{macrocode}
%
% |draw_double p| draws a double line.
%    \begin{macrocode}
style_def double expr p =
  save oldpen;
  pen oldpen;
  oldpen := currentpen;
%    \end{macrocode}
% draw a thick linn
%    \begin{macrocode}
  pickup oldpen scaled 3;
  ccutdraw p;
%    \end{macrocode}
% and remove the stuffing
%    \begin{macrocode}
  pickup oldpen;
  cullit; undraw p; cullit;
enddef;
style_def double_arrow expr p =
  draw_double p;
  shrink (1.5);
    cfill (arrow p);
  endshrink;
enddef;
%    \end{macrocode}
%
% Old aliases:
%    \begin{macrocode}
style_def vanilla expr p = draw_plain p enddef;
style_def fermion expr p = draw_plain_arrow p enddef;
style_def quark expr p = draw_plain_arrow p enddef;
style_def electron expr p = draw_plain_arrow p enddef;
style_def photon expr p = draw_wiggly p enddef;
style_def boson expr p = draw_wiggly p enddef;
style_def gluon expr p = draw_curly p enddef;
style_def heavy expr p = draw_dbl_plain_arrow p enddef;
style_def ghost expr p = draw_dots_arrow p enddef;
style_def scalar expr p = draw_dashes_arrow p enddef;
%    \end{macrocode}
% More old aliases:
%    \begin{macrocode}
vardef fermion expr path_arg =
  cfill (arrow (path_arg));
  path_arg
enddef;
vardef photon expr path_arg =
  wiggly path_arg
enddef;
vardef gluon expr path_arg =
  curly path_arg
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Graphs of vertices}
% \label{sec:graphs}
%
% Here is the fun part of \FMF: \emph{automagic} placement of
% vertices.
%    \begin{macrocode}
%tracingmacros:=1;
%tracingonline:=1;
tracingstats:=1;
%    \end{macrocode}
%
% You can say |vtracing:=true| to see what's going on.
%    \begin{macrocode}
boolean vtracing;
vtracing := false; % true
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Data structures}
%
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \begin{table}[t]
%   \begin{center}
%   \begin{tabular}{|l|l|l|}\hline
%     Type      & Name          & Purpose \\\hline\hline
%     "numeric" & "vlist.first" & pointer to first vertex (usually 1) \\\hline
%     "numeric" & "vlist.last"  & pointer to last vertex (starts with 0) \\\hline
%     "string"  & "vlist["$i$"]name"          & symbolic name of the vertex\\\hline
%     "pair"    & "vlist["$i$"]loc"           & position of the vertex \\\hline
%     "string"  & "vlist["$i$"]lbl"           & label \\\hline
%     "numeric" & "vlist["$i$"]lbl.ang"       & angle \\\hline
%     "numeric" & "vlist["$i$"]lbl.dist"      & distance \\\hline
%     "path"    & "vlist["$i$"]decor.shape"   & shape of decoration\\\hline
%     "numeric" & "vlist["$i$"]decor.size"    & size of decoration\\\hline
%     "numeric" & "vlist["$i$"]decor.sty"     & filling style of decoration\\\hline
%     "numeric" & "vlist["$i$"]decor.ang"     & rotation angle\\\hline
%     "numeric" & "vlist["$i$"]fore"          & foreground color\\\hline
%     "numeric" & "vlist["$i$"]back"          & background color\\\hline
%     "numeric" & "vlist["$i$"]arc.first"     & pointer to first arc \\\hline
%     "numeric" & "vlist["$i$"]arc.last"      & pointer to last arc \\\hline
%     "numeric" & "vlist["$i$"]arc["$j$"]"    & $j$th arc of the $i$th vertex \\\hline
%     "string"  & "vlist["$i$"]arc["$j$"]sty" & style of the arc\\\hline
%     "numeric" & "vlist["$i$"]arc["$j$"]tns" & tension of the arc\\\hline
%     "string"  & "vlist["$i$"]arc["$j$"]lsr" & left, straight, right\\\hline
%     "string"  & "vlist["$i$"]arc["$j$"]lbl" & label\\\hline
%     "string"  & "vlist["$i$"]arc["$j$"]lbl.side"& side of the label\\\hline
%     "numeric" & "vlist["$i$"]arc["$j$"]lbl.dist"& distance of the label\\\hline
%     "numeric" & "vlist["$i$"]arc["$j$"]tag" & tag \\\hline
%     "numeric" & "vlist["$i$"]arc["$j$"]wd"  & width of the arc\\\hline
%     "color"   & "vlist["$i$"]arc["$j$"]fore"& foreground color\\\hline
%     "color"   & "vlist["$i$"]arc["$j$"]back"& background color\\\hline
%     "numeric" & "vlist["$i$"]constr.first"  & first constraint \\\hline
%     "numeric" & "vlist["$i$"]constr.last"   & last constraint \\\hline
%     "numeric" & "vlist["$i$"]constr["$j$"]" & constraint on $j$th arc \\\hline
%     "numeric" & "vlist["$i$"]poly.first"    & \\\hline
%     "numeric" & "vlist["$i$"]poly.last"     & \\\hline
%     "numeric" & "vlist["$i$"]poly["$j$"]"   & \\\hline
%     "numeric" & "vlist["$i$"]poly["$j$"]idx"& \\\hline
%   \end{tabular}
%   \end{center}
%   \caption{Vertex data structure}
%   \label{tab:VDS}
% \end{table}
%
% \begin{table}[t]
%   \begin{center}
%   \begin{tabular}{|l|l|l|}\hline
%     Type      & Name          & Purpose \\\hline\hline
%     "numeric" & "plist.first" & pointer to first polygon (usually 1) \\\hline
%     "numeric" & "plist.last"  & pointer to last polygon (starts with 0) \\\hline
%     "numeric" & "plist["$i$"]cnt"           & number of edges\\\hline
%     "numeric" & "plist["$i$"]vtx["$j$"]"    & pointer to the $j$th vertex\\\hline
%     "numeric" & "plist["$i$"]pull"          & distortion\\\hline
%     "string"  & "plist["$i$"]cona"          & connector after\\\hline
%     "string"  & "plist["$i$"]conb"          & connector before\\\hline
%     "string"  & "plist["$i$"]sty"           & filling\\\hline
%     "string"  & "plist["$i$"]lbl"           & label\\\hline
%     "numeric" & "plist["$i$"]lbl.ang"       & direction of the label\\\hline
%     "numeric" & "plist["$i$"]lbl.dist"      & distance of the label\\\hline
%     "color"   & "plist["$i$"]fore"          & foreground color\\\hline
%     "color"   & "plist["$i$"]back"          & background color\\\hline
%   \end{tabular}
%   \end{center}
%   \caption{Polygon data structure}
%   \label{tab:PDS}
% \end{table}
%
% \DeleteShortVerb{\"}
% \MakeShortVerb{\|}
%
% The data structure for our graph is shown in
% table~\ref{tab:VDS}\footnote{%
%   \begin{dubious}
%     \texttt{boolean vlist[i]arc[j]smooth} will indicate that this
%     arc belongs to a set of arcs which are to be smoothly connected.
%     The implementation will start by going to the strt of this set,
%     define a long smooth path and finally do the drawing on the
%     various subpaths.
%   \end{dubious}}.
% \MF{} turns out to be quite powerful, providing such constructs
% in an unconventional, but flexible and concise way.  While we use
% |save vhash| to forget all previously defined vertices, we leave
% |vlist| alone, because we will know from $|vlist.last| <
% |vlist.first|$ that it's empty.  Note that we can't |vardef| this
% because then the |save| would go inside a group.
%    \begin{macrocode}
def vinit =
  save vhash;
  numeric vlist.first, vlist.last;
  vlist.first := 1;
  vlist.last := 0;
  pair vlist[]loc;
  numeric vlist[]decor.size, vlist[]decor.ang,
    vlist[]arc.first, vlist[]arc.last,
    vlist[]arc[], vlist[]arc[]lsr,
    vlist[]arc[]tns, vlist[]arc[]lbl.dist,
    vlist[]arc[]tag, vlist[]arc[]wd, vlist[]arc[]rub,
    vlist[]constr.first, vlist[]constr.last,
    vlist[]constr[], lambdax[][], lambday[][];
  string vlist[]name, vlist[]lbl, vlist[]decor.sty,
    vlist[]arc[]sty, vlist[]arc[]lbl, vlist[]arc[]lbl.side;
  numeric vlist[]lbl.ang;
  path vlist[]decor.shape;
%<*mp>
  color vlist[]fore, vlist[]back,
    vlist[]arc[]fore, vlist[]arc[]back; 
%</mp>
%    \end{macrocode}
% Data structures for polygons (cf.~table~\ref{tab:PDS}):
% \changes{v1.06}{1996/05/24}{
%   New data structure \texttt{plist} and new entries
%   \texttt{vlist[]poly}.}
%    \begin{macrocode}
  numeric plist.first, plist.last, plist[]cnt, plist[]vtx[],
   plist[]pull, plist[]lbl.ang, plist[]lbl.dist;
  string plist[]lbl, plist[]sty, plist[]cona, plist[]conb;
  plist.first := 1;
  plist.last := 0;
  numeric vlist[]poly.first, vlist[]poly.last,
    vlist[]poly[], vlist[]poly[]idx;
  pair lambdap[][];
%<mp> color plist[]fore, plist[]back;
enddef;
%</base>
%    \end{macrocode}
% \begin{macro}{\fmfinit}
% We can also ask for initialization explicitely from \TeX{} (usually
% it is called implicitely by |\begin{fmfgraph}|).  This flushes the
% vertex table. 
%    \begin{macrocode}
%<style>\def\fmfinit{\fmfcmd{vinit;}}
%    \end{macrocode}
% \end{macro}
% Useful abstractions are: first for looping over all vertices
%    \begin{macrocode}
%<*base>
def vertices =
  vlist.first upto vlist.last
enddef;
%    \end{macrocode}
% second for looping over all arcs of vertex |i|
%    \begin{macrocode}
def varcs (text i) =
  vlist[i]arc.first upto vlist[i]arc.last
enddef;
%    \end{macrocode}
% and finally for looping over all constraints of vertex |i|
%    \begin{macrocode}
def vconstr (text i) =
  vlist[i]constr.first upto vlist[i]constr.last
enddef;
%    \end{macrocode}
%    \begin{macrocode}
def polygons =
  plist.first upto plist.last
enddef;
%    \end{macrocode}
%    \begin{macrocode}
def vpoly (text i) =
  vlist[i]poly.first upto vlist[i]poly.last
enddef;
%    \end{macrocode}
% Entering vertices is simple, but note that we have to make
% |vlist[|$i$|]loc| undefined, because it might be around from an
% earlier character still.
%    \begin{macrocode}
vardef venter suffix v =
  if not vexists v:
    vlist.last := vlist.last + 1;
    vhash.v := vlist.last;
    vlist[vhash.v]name := str v;
    vlist[vhash.v]loc := (whatever,whatever);
    vlist[vhash.v]arc.first := 1;
    vlist[vhash.v]arc.last := 0;
    vlist[vhash.v]constr.first := 1;
    vlist[vhash.v]constr.last := 0;
    vlist[vhash.v]lbl := "";
    vlist[vhash.v]lbl.ang := whatever;
    vlist[vhash.v]lbl.dist := 3thick;
%<*mp>
    vlist[vhash.v]fore := (whatever, whatever, whatever);
    vlist[vhash.v]back := (whatever, whatever, whatever);
%</mp>
    vlist[vhash.v]poly.first := 1;
    vlist[vhash.v]poly.last := 0;
  fi
enddef;
%    \end{macrocode}
%
% The next three \emph{are} trivial. Existence
%    \begin{macrocode}
vardef vexists suffix v =
  if known vhash.v: true else: false fi
enddef;
%    \end{macrocode}
% index
%    \begin{macrocode}
vardef vlookup suffix v =
  if vexists v: vhash.v else: 0 fi
enddef;
%    \end{macrocode}
% and location
%    \begin{macrocode}
vardef vloc suffix v =
  vlist[vlookup v]loc
enddef;
%    \end{macrocode}
% of vertices.  We use |vhash.v| instead of |v| so that we can clear
% the whole hash table with |save vhash|.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Constructing the graph}
%
% Connect the vertices in the list |vl| with lines of style |style|,
% allocating them if necessary.
%    \begin{macrocode}
vardef vconnect (expr linesty) (text vl) =
  save from, nfrom, nto, nopt, sty;
  numeric from, nfrom, nto, nopt;
  string sty;
  getopt (opt, linesty);
  sty := opt[opt.first];
  if known opt[opt.first]arg:
    message "feynmf: line styles don't take arguments.  "
             & "Argument `" & opt[opt.first]arg & "' ignored.";
  fi
  opt.first := opt.first + 1;
  forsuffixes to = vl:
    venter to;
    nto := vlookup to;
    if known nfrom:
%    \end{macrocode}
% Later, on page~\pageref{pg:vfreeze}, it will pay back to enter the
% arc \emph{both} ways: incoming \emph{and}
% outgoing:\label{pg:vconnect}
%    \begin{macrocode}
      vlist[nfrom]arc.last := vlist[nfrom]arc.last + 1;
      vlist[nfrom]arc[vlist[nfrom]arc.last] := nto;
      vlist[nfrom]arc[vlist[nfrom]arc.last]tns := 1;
%    \end{macrocode}
% But do not enter tadpoles twice.
% \changes{v0.9}{1995/04/25}{Do not enter tadpoles twice.}
%    \begin{macrocode}
      if nfrom <> nto:
        vlist[nto]arc.last := vlist[nto]arc.last + 1;
        vlist[nto]arc[vlist[nto]arc.last] := nfrom;
        vlist[nto]arc[vlist[nto]arc.last]tns := 1;
      fi
      vlist[nfrom]arc[vlist[nfrom]arc.last]lbl := "";
      vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.side := "";
      vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.dist := 3thick;
%    \end{macrocode}
% Handle options, starting with an option |tension|:
%    \begin{macrocode}
      for nopt = opt.first upto opt.last:
        if match_option (opt[nopt], "tension"):
          get_argument (opt[nopt], scantokens (opt[nopt]arg),
                        vlist[nfrom]arc[vlist[nfrom]arc.last]tns);
          get_argument (opt[nopt], scantokens (opt[nopt]arg),
                        vlist[nto]arc[vlist[nto]arc.last]tns);
%    \end{macrocode}
% Handle |left|, |straight| and |right|, which ask for making a
% halfcircle detour on the specified side or going straight.  If given
% an optional argument, the halfcircle is pulled in or pushed out,
% according whether it is smaller or larger than 1.
% \changes{v0.5}{1994/10/20}{Accept optional argument for detours.}
%    \begin{macrocode}
        elseif match_option (opt[nopt], "left"):
          if known opt[nopt]arg:
            vlist[nfrom]arc[vlist[nfrom]arc.last]lsr
              := - scantokens (opt[nopt]arg);
          else:
            vlist[nfrom]arc[vlist[nfrom]arc.last]lsr := -1;
          fi
        elseif match_option (opt[nopt], "straight"):
          vlist[nfrom]arc[vlist[nfrom]arc.last]lsr := 0;
          ignore_argument (opt[nopt], opt[nopt]arg);
        elseif match_option (opt[nopt], "right"):
          if known opt[nopt]arg:
            vlist[nfrom]arc[vlist[nfrom]arc.last]lsr
              := scantokens (opt[nopt]arg);
          else:
            vlist[nfrom]arc[vlist[nfrom]arc.last]lsr := 1;
          fi
%    \end{macrocode}
% Labels and which side they're on:
%    \begin{macrocode}
        elseif match_option (opt[nopt], "label"):
          get_argument (opt[nopt], opt[nopt]arg,
                        vlist[nfrom]arc[vlist[nfrom]arc.last]lbl);
        elseif match_option (opt[nopt], "label.side"):
          get_argument (opt[nopt], opt[nopt]arg,
                        vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.side);
        elseif match_option (opt[nopt], "label.dist"):
          get_argument (opt[nopt], scantokens (opt[nopt]arg),
                        vlist[nfrom]arc[vlist[nfrom]arc.last]lbl.dist);
%    \end{macrocode}
% Numeric tags for disambiguating multiple arcs:
% \changes{v0.9}{1995/04/19}{%
%   \texttt{tag} option for \texttt{vconnect}.}
%    \begin{macrocode}
        elseif match_option (opt[nopt], "tag"):
          if known opt[nopt]arg:
            vlist[nfrom]arc[vlist[nfrom]arc.last]tag
              := scantokens (opt[nopt]arg);
          else:
            vlist[nfrom]arc[vlist[nfrom]arc.last]tag := 0;
          fi
%    \end{macrocode}
% Width and color:
% \changes{v0.98}{1995/04/29}{Width and color.}
%    \begin{macrocode}
        elseif match_option (opt[nopt], "width"):
          get_argument (opt[nopt], scantokens (opt[nopt]arg),
                        vlist[nfrom]arc[vlist[nfrom]arc.last]wd);
%<*mp>
        elseif match_option (opt[nopt], "foreground"):
          get_argument (opt[nopt], scantokens (opt[nopt]arg),
                        vlist[nfrom]arc[vlist[nfrom]arc.last]fore);
        elseif match_option (opt[nopt], "background"):
          get_argument (opt[nopt], scantokens (opt[nopt]arg),
                        vlist[nfrom]arc[vlist[nfrom]arc.last]back);
%</mp>
%<*!mp>
        elseif match_option (opt[nopt], "foreground")
           or  match_option (opt[nopt], "background"):
          message "feynmf: color available with MetaPost only!";
%</!mp>
        elseif match_option (opt[nopt], "rubout"):
          if known opt[nopt]arg:
             vlist[nfrom]arc[vlist[nfrom]arc.last]rub
               := scantokens (opt[nopt]arg);
          else:
             vlist[nfrom]arc[vlist[nfrom]arc.last]rub := 2;
          fi
%    \end{macrocode}
% Ignore bogus options:
%    \begin{macrocode}
        else:
          ignore_option (opt[nopt], opt[nopt]arg);
        fi
      endfor
      handle_line_style (vlist[nfrom]arc[vlist[nfrom]arc.last]sty, sty);
      vlist[nto]arc[vlist[nto]arc.last]lsr
        := vlist[nfrom]arc[vlist[nfrom]arc.last]lsr;
    fi
%    \end{macrocode}
% Restart the loop:
%    \begin{macrocode}
    nfrom := nto;
  endfor
enddef;
%    \end{macrocode}
% \changes{v0.9}{1995/02/20}{Started collapsing duplicate code.}
% Avoid entering invalid linestyles into the tables, because the
% delayed evaluation will make errors harder to find (line numbers
% will be wrong):
%    \begin{macrocode}
vardef handle_line_style (suffix sty) (expr name) =
  if valid_style name:
    sty := name;
  else:
    errhelp "feynmf: your linestyle is not recognizable, "
          & "check spelling and reprocess!";
    errmessage "feynmf: line style `" & name & "' not known, "
             & "replaced by `vanilla'"; 
    sty := "vanilla";
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef get_argument (expr opt, arg) (suffix variable) =
  if known arg:
    variable := arg;
  else:
    message "feynmf: option `" & opt & "' needs an argument.  Ignored.";
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef ignore_argument (expr opt, arg) =
  if known arg:
    message "feynmf: option `" & opt & "' doesn't take an argument.  "
          & "Argument `" & arg & "' ignored.";
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef ignore_option (expr opt, arg)=
  if known arg:
    message "feynmf: ignoring option " & opt & "=" & arg & ".";
  else:
    message "feynmf: ignoring option " & opt & ".";
  fi
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmf}
%   \begin{macro}{\fmfn}
% Since |vconnect| wil be the most frequent macro, we give it the
% shortest \TeX{} command sequence:
% \changes{v0.98}{1995/04/26}{%
%   Protect MF's namespace with double underscores.}
% \changes{v0.98}{1995/04/26}{\texttt{\protect\bslash fmfn}: new command.}
%    \begin{macrocode}
%<*style>
\def\fmf#1#2{%
  \fmfbuf@={#1}%
  \fmfcmd{vconnect ("\the\fmfbuf@", \fmfpfx{#2});}}
\def\fmfn#1#2#3{
  \fmfbuf@={#1}%
  \fmfcmd{vconnectn ("\the\fmfbuf@", \fmfpfx{#2}, #3);}}
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
%    \begin{macrocode}
%<*base>
vardef vconnectn (expr linesty) (suffix v) (expr n) =
  vconnect (linesty, vmklist (v, n));
enddef;
%    \end{macrocode}
%
% Here's how to deconstruct a graph: |vpath| returns an arc from
% |nfrom| to |nto|, if any.  If a suffix is given, it
% has to match the |tag| of the arc.
% \changes{v0.9}{1995/04/19}{%
%   \texttt{vpath}: new function.}
% \changes{v0.9}{1995/04/20}{%
%   \texttt{vpath}: new syntax.}
%    \begin{macrocode}
vardef vpath@# (suffix from, to) =
  save nfrom, nto, origin, index, unknown_path;
  numeric nfrom, nto, origin, index;
  path unknown_path;
  if (known vloc from) and (known vloc to):
    nfrom := vlookup from;
    nto := vlookup to;
    vmatch_path (nfrom, nto, maybe_empty@#);
    if (unknown origin) or (unknown index):
      vmatch_path (nto, nfrom, maybe_empty@#);
    fi
  fi
  if (known origin) and (known index):
    vbuild_cut_arc (origin, index)
  else:
    unknown_path
  fi
enddef;
%    \end{macrocode}
% Hack: this will expand to an |unknown| value if the suffix is empty
% and to the suffix otherwise.  We use it to implement an optional
% argument.
%    \begin{macrocode}
vardef maybe_empty@# =
  save _prefix;
  _prefix=137;
  if known _prefix@#:
    whatever
  else:
    @#
  fi
enddef;
%    \end{macrocode}
% This is not a real function but a convenience macro and has the side
% effect of setting |origin| and |index| if a match is found.
%    \begin{macrocode}
vardef vmatch_path (expr nfrom, nto, t) = 
  save i;
  for i = varcs (nfrom):
    if (vlist[nfrom]arc[i] = nto) and (known vlist[nfrom]arc[i]sty):
      if unknown t:
        origin := nfrom;
        index := i;
      else:
        if known vlist[nfrom]arc[i]tag:
          if vlist[nfrom]arc[i]tag = t:
            origin := nfrom;
            index := i;
          fi
        fi
      fi
    fi
  endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vcyclen (expr sty) (suffix v) (expr n) =
  for $ = 1 upto n - 1:
    vconnect (sty, v[$], v[$+1]);
  endfor
  vconnect (sty, v[n], v[1]);
enddef;
%    \end{macrocode}
% And the reverse:
%    \begin{macrocode}
vardef vrcyclen (expr sty) (suffix v) (expr n) =
  vconnect (sty, v[1], v[n]);
  for $ = n downto 2:
    vconnect (sty, v[$], v[$-1]);
  endfor
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfcyclen}
%    \begin{macrocode}
%<*style>
\def\fmfcyclen#1#2#3{%
  \fmfbuf@={#1}%
  \fmfcmd{vcyclen ("\the\fmfbuf@", \fmfpfx{#2}, #3);}}
\def\fmfrcyclen#1#2#3{%
  \fmfbuf@={#1}%
  \fmfcmd{vrcyclen ("\the\fmfbuf@", \fmfpfx{#2}, #3);}}
%</style>
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Constraints}
%
% \begin{macro}{\fmfforce}
%   \begin{macro}{\fmfshift}
% Explicit placement and shifting of vertices is handled in \TeX{} with
%    \begin{macrocode}
%<*style>
\def\fmfforce#1#2{\fmfcmd{vforce ((#1), \fmfpfx{#2});}}
\def\fmfshift#1#2{\fmfcmd{vshift ((#1), \fmfpfx{#2});}}
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% Force the vertex |v| to be placed at position |z|:
%    \begin{macrocode}
%<*base>
vardef vforce (expr z) (suffix v) =
  venter v;
  vlist[vlookup v]loc := z;
enddef;
%    \end{macrocode}
%
% Shift the vertex |v| by |z|:
%    \begin{macrocode}
vardef vshift (expr z) (text vl) =
  forsuffixes $=vl:
    if vexists $:
      vlist[vlookup $]loc := vlist[vlookup $]loc + z;
    fi
  endfor
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmffixed}
%   \begin{macro}{\fmffixedx}
%     \begin{macro}{\fmffixedy}
% \changes{v0.8}{1995/01/07}{New command: \texttt{\protect\bslash fmffixed}.}
% Place the first two arguments in the distance given by the third
% argument.
% \changes{v1.04}{1996/02/20}{%
%   \texttt{\protect\bslash fmffixedx},
%   \texttt{\protect\bslash fmffixedy}: new macros.}
%    \begin{macrocode}
%<*style>
\def\fmffixed#1#2{\fmfcmd{vconstraint ((#1), \fmfpfx{#2});}}
\def\fmffixedx#1#2{\fmfcmd{vconstraint (((#1),whatever), \fmfpfx{#2});}}
\def\fmffixedy#1#2{\fmfcmd{vconstraint ((whatever,(#1)), \fmfpfx{#2});}}
%</style>
%    \end{macrocode}
%     \end{macro}
%   \end{macro}
% \end{macro}
% This amounts to adding one or more constraints into the vertex data
% structure:
%    \begin{macrocode}
%<*base>
vardef vconstraint (expr z) (text vl) =
  save nfrom, nto;
  numeric nfrom, nto;
  forsuffixes to = vl:
    venter to;
    nto := vlookup to;
    if known nfrom:
      vlist[nfrom]constr.last := vlist[nfrom]constr.last + 1;
      vlist[nto]constr.last := vlist[nto]constr.last + 1;
      vlist[nfrom]constr[vlist[nfrom]constr.last] := nto;
      vlist[nto]constr[vlist[nto]constr.last] := nfrom;
      vlist[nto]loc = vlist[nfrom]loc + z;
    fi
    nfrom := nto;
  endfor
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Polygons}
%
% Define a polygon:
% \changes{v1.06}{1996/05/24}{
%   New function \texttt{vpolygon}: allocate a polygon.}
%    \begin{macrocode}
vardef vpolygon (expr psty) (suffix v) (text vl) =
  save nopt, csty, nfrom, nfrom_, nto, i, n, j;
  numeric nopt, nfrom, nfrom_, nto, i, n, j;
  string csty;
%    \end{macrocode}
% Allocate a fresh polygon:
%    \begin{macrocode}
  n := count (vl) + 1;
  plist.last := plist.last + 1;
  plist[plist.last]cnt := n;
  plist[plist.last]lbl := "";
  plist[plist.last]lbl.ang := whatever;
  plist[plist.last]lbl.dist := 0;
%    \end{macrocode}
% Parse the options:
%    \begin{macrocode}
  csty := "phantom";
  getopt (opt, psty);
  for nopt = opt.first upto opt.last:
    if match_option (opt[nopt], "filled"):
      get_argument (opt[nopt], opt[nopt]arg, plist[plist.last]sty);
    elseif match_option (opt[nopt], "tension"):
      if known opt[nopt]arg:
        csty := csty & ",tension=" & opt[nopt]arg;
      else:
        message "feynmf: option `tension' needs an argument.  Ignored.";
      fi
    elseif match_option (opt[nopt], "label"):
      get_argument (opt[nopt], opt[nopt]arg, plist[plist.last]lbl);
    elseif match_option (opt[nopt], "label.angle"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg),
                               plist[plist.last]lbl.ang);
    elseif match_option (opt[nopt], "label.dist"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg),
                               plist[plist.last]lbl.dist);
    elseif match_option (opt[nopt], "pull"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg),
                               plist[plist.last]pull);
    elseif match_option (opt[nopt], "cona"):
      get_argument (opt[nopt], opt[nopt]arg, plist[plist.last]cona);
    elseif match_option (opt[nopt], "conb"):
      get_argument (opt[nopt], opt[nopt]arg, plist[plist.last]conb);
    elseif match_option (opt[nopt], "smooth"):
      plist[plist.last]cona := "..";
      plist[plist.last]conb := "..";
      ignore_argument (opt[nopt], opt[nopt]arg);
%<*mp>
    elseif match_option (opt[nopt], "foreground"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg),
                               plist[plist.last]fore);
    elseif match_option (opt[nopt], "background"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg),
                               plist[plist.last]back);
%</mp>
%<*!mp>
    elseif match_option (opt[nopt], "foreground")
       or  match_option (opt[nopt], "background"):
      message "feynmf: color available with MetaPost only!";
%</!mp>
    elseif match_option (opt[nopt], "phantom"):
      plist[plist.last]sty := "phantom";
    elseif match_option (opt[nopt], "empty"):
      plist[plist.last]sty := "empty";
    elseif match_option (opt[nopt], "full"):
      plist[plist.last]sty := "full";
    elseif match_option (opt[nopt], "hatched"):
      plist[plist.last]sty := "hatched";
    elseif match_option (opt[nopt], "shaded"):
      plist[plist.last]sty := "shaded";
    else:
      ignore_option (opt[nopt], opt[nopt]arg);
  fi
  endfor
  canonicalize_filling plist[plist.last]sty;
%    \end{macrocode}
% Enter the vertices:
%    \begin{macrocode}
  vconnect (csty, v, vl, v);
  i := 1;
  forsuffixes to = v, vl, v:
    nto := vlookup to;
    if known nfrom:
%    \end{macrocode}
% Enter a constraint:
% \begin{equation}
%   \vec v_{i+1} = \vec v_{i}
%             + R(2\pi/n_P) \left( \vec v_{i} - \vec v_{i-1} \right)
% \end{equation}
%    \begin{macrocode}
      if known nfrom_:
        vlist[nto]loc = vlist[nfrom]loc
          + (vlist[nfrom]loc - vlist[nfrom_]loc) rotated (360/n);
      fi
      vlist[nto]poly.last := vlist[nto]poly.last + 1;
      vlist[nto]poly[vlist[nto]poly.last] := plist.last;
      vlist[nto]poly[vlist[nto]poly.last]idx := i;
      plist[plist.last]vtx[i] := nto;
      i := i + 1;
      nfrom_ := nfrom;
    fi
    nfrom := nto;
  endfor
enddef;
%    \end{macrocode}
%
% \changes{v1.06}{1996/05/24}{
%   New function \texttt{canonicalize\_filling}: abstracted from
%   \texttt{vvertex}.}
%    \begin{macrocode}
vardef canonicalize_filling suffix f =
  if known f:
    if is_a_number (f):
      if scantokens f <= 1:
        f :=
        if scantokens f = 1:
          "full"
        elseif scantokens f > 0:
          "shaded"
        elseif scantokens f = 0:
          "empty"
        else:
          "hatched"
        fi;
      fi
    fi
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vpolygonn (expr sty) (suffix v) (expr n) =
  vpolygon (sty, v[1], for $=2 upto n-1: v[$], endfor v[n]);
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vrpolygonn (expr sty) (suffix v) (expr n) =
  vpolygon (sty, v[n], for $=n-1 downto 2: v[$], endfor v[1]);
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfpoly}
%   \begin{macro}{\fmfpolyn}
%     \begin{macro}{\fmfrpolyn}
% \changes{v1.06}{1996/05/24}{%
%   New macros \texttt{\protect\bslash fmfpoly}
%   \texttt{\protect\bslash fmfpolyn},
%   \texttt{\protect\bslash fmfrpolyn}.}
%    \begin{macrocode}
%<*style>
\def\fmfpoly#1#2{%
  \fmfbuf@={#1}%
  \fmfcmd{vpolygon ("\the\fmfbuf@", \fmfpfx{#2});}}
\def\fmfpolyn#1#2#3{%
  \fmfbuf@={#1}%
  \fmfcmd{vpolygonn ("\the\fmfbuf@", \fmfpfx{#2}, #3);}}
\def\fmfrpolyn#1#2#3{%
  \fmfbuf@={#1}%
  \fmfcmd{vrpolygonn ("\the\fmfbuf@", \fmfpfx{#2}, #3);}}
%    \end{macrocode}
%     \end{macro}
%   \end{macro}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Internal vertices}
%
% \begin{macro}{\fmflabel}
%    \begin{macrocode}
\def\fmflabel#1#2{%
  \fmfbuf@={#1}%
  \fmfcmd{vlabel ("\the\fmfbuf@", \fmfpfx{#2});}}
%</style>
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
%<*base>
vardef vlabel (expr s) (suffix v) =
  venter v;
  vlist[vlookup v]lbl := s;
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfv}
%    \begin{macrocode}
%<*style>
\def\fmfv#1#2{%
  \fmfbuf@={#1}%
  \fmfcmd{vvertex ("\the\fmfbuf@", \fmfpfx{#2});}}
\def\fmfvn#1#2#3{%
  \fmfbuf@={#1}%
  \fmfcmd{vvertexn ("\the\fmfbuf@", \fmfpfx{#2}, #3);}}
%</style>
%    \end{macrocode}
% \end{macro}
%
% \changes{v0.7}{1994/10/22}{%
%  \texttt{blob} and \texttt{dot} options obsolete, handle generalized
%  decorations (polygons).}
%    \begin{macrocode}
%<*base>
vardef vvertex (expr vtxsty) (text vl) =
  save nopt, sty, arg;
  numeric nopt, arg;
  string sty;
  getopt (opt, vtxsty);
  forsuffixes v = vl:
    venter v;
    n := vlookup v;
    for nopt = opt.first upto opt.last:
      handle_vertex_option (vlist[n], opt[nopt], opt[nopt]arg);
    endfor
  endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef handle_vertex_option (suffix v) (expr opt, arg) =
  if match_option (opt, "label"):
    get_argument (opt, arg, v.lbl);
  elseif match_option (opt, "label.angle"):
    get_argument (opt, scantokens (arg), v.lbl.ang);
  elseif match_option (opt, "label.dist"):
    get_argument (opt, scantokens (arg), v.lbl.dist);
  elseif match_option (opt, "decoration.shape"):
    if known arg:
      make_decor_shape (v.decor.shape, arg);
    else:
      message "feynmf: option `decor.shape' needs an argument.  Ignored.";
    fi
%    \end{macrocode}
% \MP{} has |filled| reserved, use |sty| instead.
%    \begin{macrocode}
  elseif match_option (opt, "decoration.filled"):
    get_argument (opt, arg, v.decor.sty);
%    \end{macrocode}
% Continue to support the old numeric argument:
%    \begin{macrocode}
    canonicalize_filling v.decor.sty;
  elseif match_option (opt, "decoration.size"):
    get_argument (opt, scantokens (arg), v.decor.size);
  elseif match_option (opt, "decoration.angle"):
    get_argument (opt, scantokens (arg), v.decor.ang);
%<*mp>
  elseif match_option (opt, "foreground"):
    get_argument (opt, scantokens (arg), v.fore);
  elseif match_option (opt, "background"):
    get_argument (opt, scantokens (arg), v.back);
%</mp>
%<*!mp>
  elseif match_option (opt, "foreground")
     or  match_option (opt, "background"):
    message "feynmf: color available with MetaPost only!";
%</!mp>
%    \end{macrocode}
% Ignore bogus options:
%    \begin{macrocode}
  else:
    ignore_option (opt, arg);
  fi
enddef;
%    \end{macrocode}
% Maybe we should replace this long switch by a hashing scheme:
%    \begin{macrocode}
vardef make_decor_shape (suffix p) (expr n) =
  if match_prefix (n, "circle"): p := fullcircle;
  elseif match_prefix (n, "square"):
    p := unitsquare shifted -(.5,.5);
  elseif match_prefix (n, "cross"): p := polycross 4;
  elseif match_prefix (n, "triangle"): p := polygon 3;
  elseif match_prefix (n, "triagon"): p := polygon 3;
  elseif match_prefix (n, "diamond"): p := polygon 4;
  elseif match_prefix (n, "tetragon"): p := polygon 4;
  elseif match_prefix (n, "pentagon"): p := polygon 5;
  elseif match_prefix (n, "hexagon"): p := polygon 6;
  elseif match_prefix (n, "triagram"): p := polygram 3;
  elseif match_prefix (n, "tetragram"): p := polygram 4;
  elseif match_prefix (n, "pentagram"): p := polygram 5;
  elseif match_prefix (n, "hexagram"): p := polygram 6;
  elseif match_prefix (n, "triacross"): p := polycross 3;
  elseif match_prefix (n, "tetracross"): p := polycross 4;
  elseif match_prefix (n, "pentacross"): p := polycross 5;
  elseif match_prefix (n, "hexacross"): p := polycross 6;
  else:
    if feynmfwizard:
      p := scantokens(n);
    else:
      message "feynmf: invalid argument `" & n
            & "' to option `decor.shape'.  Ignored.";
    fi
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef is_a_number expr s =
  save n;
  if known s:
    (true
     for n = 1 upto length s:
       and ((substring (n-1,n) of s = ".")
            or (substring (n-1,n) of s = "-")
            or isdigit substring (n-1,n) of s)
      endfor)
  else:
    false
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vvertexn (expr vtxsty) (suffix v) (expr n) =
  vvertex (vtxsty, vmklist (v, n));
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfblob}
%   \begin{macro}{\fmfdot}
% We can decorate vertices with ``blobs'' and dots from \TeX{} with
% the command sequences:
%    \begin{macrocode}
%<style>\def\fmfblob#1#2{\fmfcmd{vblob ((#1), \fmfpfx{#2});}}
%<style>\def\fmfdot#1{\fmfcmd{vdot (\fmfpfx{#1});}}
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% The vertices in the list |vl| will be drawn with a blob of diameter
% |bd|:
%    \begin{macrocode}
%<*base>
vardef vblob (expr bd) (text vl)=
  forsuffixes $=vl:
    if not vexists $: venter $; fi
    vlist[vlookup $]decor.shape := fullcircle;
    vlist[vlookup $]decor.size := bd;
    vlist[vlookup $]decor.sty := "shaded";
 endfor
enddef;
%    \end{macrocode}
%
% The vertices in the list |vl| will be drawn with a dot.
%    \begin{macrocode}
vardef vdot (text vl)=
  forsuffixes $=vl:
    if not vexists $: venter $; fi
    vlist[vlookup $]decor.shape := fullcircle;
    vlist[vlookup $]decor.size := dot_size;
    vlist[vlookup $]decor.sty := "full";
 endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vdotn (suffix v) (expr n) =
  vdot (vmklist (v, n));
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vblobn (suffix v) (expr n) =
  vblob (vmklist (v, n));
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfdotn}
% Place |#2| blobs or dots at $|v|_1,\ldots,|v|_{|#1|}$.
%    \begin{macrocode}
%<style>\def\fmfblobn#1#2{\fmfcmd{vblobn (\fmfpfx{#1}, #2);}}
%<style>\def\fmfdotn#1#2{\fmfcmd{vdotn (\fmfpfx{#1}, #2);}}
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{External vertices}
%
% \begin{macro}{\fmfleft}
%   \begin{macro}{\fmfright}
%     \begin{macro}{\fmfbottom}
%       \begin{macro}{\fmftop}
%         \begin{macro}{\fmfsurround}
% External vertices are positioned thusly in \TeX{}:
% \changes{v0.8}{1994/10/27}{%
%   Make \texttt{\protect\bslash fmfincoming} and
%   \texttt{\protect\bslash fmfoutgoing} obsolescent.
%   Provide \texttt{\protect\bslash fmfleft},
%   \texttt{\protect\bslash fmfright},
%   \texttt{\protect\bslash fmfbottom}
%   and \texttt{\protect\bslash fmftop} instead.}
% \changes{v0.8}{1994/12/29}{Fix typos in
%   \texttt{\protect\bslash fmfbottom}
%   and \texttt{\protect\bslash fmftop}.}
%    \begin{macrocode}
%<*style>
\def\fmfleft#1{\fmfcmd{vleft (\fmfpfx{#1});}}
\def\fmfright#1{\fmfcmd{vright (\fmfpfx{#1});}}
\def\fmfbottom#1{\fmfcmd{vbottom (\fmfpfx{#1});}}
\def\fmftop#1{\fmfcmd{vtop (\fmfpfx{#1});}}
\let\fmfincoming\fmfleft
\let\fmfoutgoing\fmfright
\def\fmfsurround#1{\fmfcmd{vsurround (\fmfpfx{#1});}}
%</style>
%    \end{macrocode}
%         \end{macro}
%       \end{macro}
%     \end{macro}
%   \end{macro}
% \end{macro}
% Here are the ``galleries'' we're hooking our external vertices on
% (see figure~\ref{fig:curvedgalleries}):
% \changes{v0.99}{1995/05/04}{%
%   Adjust galleries to subgraphs.}
%    \begin{macrocode}
%<*base>
vardef curved_left_gallery = .9[se,sw] .. .5[sw,nw] .. .1[nw,ne] enddef;
vardef curved_right_gallery = .9[sw,se] .. .5[se,ne] .. .1[ne,nw] enddef;
vardef curved_bottom_gallery = .9[nw,sw] .. .5[sw,se] .. .1[se,ne] enddef;
vardef curved_top_gallery = .9[sw,nw] .. .5[nw,ne] .. .1[ne,se] enddef;
vardef curved_surround_gallery =
  superellipse (.5[se,ne], .5[ne,nw], .5[nw,sw], .5[sw,se], .75)
enddef;
%    \end{macrocode}
% Here are their straight brothers (see
% figure~\ref{fig:straightgalleries}): 
%    \begin{macrocode}
vardef straight_left_gallery = sw -- nw enddef;
vardef straight_right_gallery = se -- ne enddef;
vardef straight_bottom_gallery = sw -- se enddef;
vardef straight_top_gallery = nw -- ne enddef;
vardef straight_surround_gallery =
   .5[se,ne] -- ne -- .5[ne,nw] -- nw
     -- .5[nw,sw] -- sw -- .5[sw,se] -- se -- cycle
enddef;
%    \end{macrocode}
% And here's how to switch:
%    \begin{macrocode}
vardef curved_galleries =
  vardef left_gallery = curved_left_gallery enddef;
  vardef right_gallery = curved_right_gallery enddef;
  vardef bottom_gallery = curved_bottom_gallery enddef;
  vardef top_gallery = curved_top_gallery enddef;
  vardef surround_gallery = curved_surround_gallery enddef;
enddef;
vardef straight_galleries =
  vardef left_gallery = straight_left_gallery enddef;
  vardef right_gallery = straight_right_gallery enddef;
  vardef bottom_gallery = straight_bottom_gallery enddef;
  vardef top_gallery = straight_top_gallery enddef;
  vardef surround_gallery = straight_surround_gallery enddef;
enddef;
%    \end{macrocode}
% The \MF{} code which does the hard work for the above
% \TeX{} macros
%    \begin{macrocode}
vardef vleft (text vl) = vdistribute (left_gallery, vl) enddef;
vardef vright (text vl) = vdistribute (right_gallery, vl) enddef;
vardef vbottom (text vl) = vdistribute (bottom_gallery, vl) enddef;
vardef vtop (text vl) = vdistribute (top_gallery, vl) enddef;
vardef vsurround (text vl) = vdistribute (surround_gallery, vl) enddef;
%    \end{macrocode}
%
% Curved galleries are the default
%    \begin{macrocode}
curved_galleries;
%</base>
%    \end{macrocode}
% \begin{macro}{\fmfcurved}
%   \begin{macro}{\fmfstraight}
% but here's how to switch:
% \changes{v0.98}{1995/04/29}{shortened galleries switch.}
%    \begin{macrocode}
%<*style>
\def\fmfcurved{\fmfcmd{curved_galleries;}}
\def\fmfstraight{\fmfcmd{straight_galleries;}}
\let\fmfcurvedgalleries\fmfcurved
\let\fmfstraightgalleries\fmfstraight
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% Distribute the vertices in the list |vl| evenly along the path |p|:
%    \begin{macrocode}
%<*base>
vardef vdistribute (expr p) (text vl) =
  save numv, len, off;
  numeric numv, len, off;
  numv = count (vl);
%    \end{macrocode}
% If the path is cyclic, place the first vertex twice:
%    \begin{macrocode}
  if cycle p: numv := numv + 1; fi
  len := length (p);
  if numv = 1:
    vforce (point len/2 of p, vl);
  else:
    off := 0;
    forsuffixes $ = vl:
      vforce (point off of p, $);
      off := off + len/(numv-1);
    endfor
  fi
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfleftn}
%   \begin{macro}{\fmfrightn}
%     \begin{macro}{\fmfbottomn}
%       \begin{macro}{\fmftopn}
%         \begin{macro}{\fmfsurroundn}
% A short cut:
%    \begin{macrocode}
%<*style>
\def\fmfleftn#1#2{\fmfcmd{vleftn (\fmfpfx{#1}, #2);}}
\def\fmfrightn#1#2{\fmfcmd{vrightn (\fmfpfx{#1}, #2);}}
\def\fmfbottomn#1#2{\fmfcmd{vbottomn (\fmfpfx{#1}, #2);}}
\def\fmftopn#1#2{\fmfcmd{vtopn (\fmfpfx{#1}, #2);}}
\let\fmfincomingn\fmfleftn
\let\fmfoutgoingn\fmfrightn
\def\fmfsurroundn#1#2{\fmfcmd{vsurroundn (\fmfpfx{#1}, #2);}}
%</style>
%    \end{macrocode}
%         \end{macro}
%       \end{macro}
%     \end{macro}
%   \end{macro}
% \end{macro}
%
%    \begin{macrocode}
%<*base>
def vmklist (suffix v) (expr n) =
  for $ = 1 upto n-1: v[$], endfor v[n]
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vleftn (suffix v) (expr n) =
  vleft (vmklist (v, n));
enddef;
vardef vrightn (suffix v) (expr n) =
  vright (vmklist (v, n));
enddef;
vardef vbottomn (suffix v) (expr n) =
  vbottom (vmklist (v, n));
enddef;
vardef vtopn (suffix v) (expr n) =
  vtop (vmklist (v, n));
enddef;
vardef vsurroundn (suffix v) (expr n) =
  vsurround (vmklist (v, n));
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmffor}
%   \begin{macro}{\endfmffor}
%    \begin{macrocode}
%<*style>
\def\fmffor#1#2#3#4{\fmfcmd{for #1 = #2 step #3 until #4:}}
\def\endfmffor{\fmfcmd{endfor}}
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% \begin{macro}{\fmfgroup}
%   \begin{macro}{\endfmfgroup}
% Syntactic sugar:
% \changes{v0.98}{1995/04/29}{\texttt{fmfgroup}: new environment.}
%    \begin{macrocode}
\def\fmfgroup{\fmfcmd{begingroup}}
\def\endfmfgroup{\fmfcmd{endgroup;}}
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% \begin{macro}{\fmfset}
% \changes{v0.98}{1995/04/29}{%
%   \texttt{\protect\bslash fmfset}: new command.}
%    \begin{macrocode}
\def\fmfset#1#2{\fmfcmd{save #1; #1:=#2;}}
%</style>
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Choosing a layout for the graph}
%
% The procedure |vfreeze| is called near the end and
% chooses ``optimal'' vertex positions by minimizing the sum of the
% weighted lengths of the arcs.  Since the quantity to be optimized is
% quadratic in the vertices
% \begin{equation}
%   L = \frac{1}{2} \sum_i \sum_{j\in\alpha(i)}
%         t_{ij} (\vec v_i - \vec v_j)^2\,,
% \end{equation}
% where~$\alpha(i)$ denotes the set of vertices connectes with the
% vertex~$i$, we just have to solve a system of linear equations.
% Adding Lagrange multipliers~$\lambda_{ij}$ for the constraints that
% have been specified
% \begin{equation}
%   \Lambda = \sum_i \sum_{j\in\gamma(i) \atop j>i}
%         \vec\lambda_{ij}\cdot(\vec v_i - \vec v_j - \vec d_{ij})\,,
% \end{equation}
% where~$\gamma(i)$ denotes the set of vertices which have a fixed
% distance to the vertex~$i$, the set of linear equations is given by
% \begin{eqnarray}
%   0 & = & \frac{\partial}{\partial \vec v_i} (L+\Lambda)
%            = \sum_{j\in\alpha(i)} t_{ij} (\vec v_i - \vec v_j)
%              + \sum_{j\in\gamma(i) \atop j>i} \vec\lambda_{ij}
%              - \sum_{j\in\gamma(i) \atop j<i} \vec\lambda_{ji} \\
%   0 & = & \vec v_i - \vec v_j - \vec d_{ij}\;\; \mid  j \in \gamma(i)\,.
% \end{eqnarray}
% The implementation is simple: loop over all vertices in |vlist[]|
%    \begin{macrocode}
%<*base>
vardef vfreeze =
  for i = vertices:
%    \end{macrocode}
% and iff the position of the vertex has not been fixed yet, add
% another equation.  Note that each arc enters twice (incoming
% \emph{and} outgoing) in this procedure.  Thus it is easiest to store
% them \emph{both} ways in the |vlist| structure
% (cf.~page~\pageref{pg:vconnect})\label{pg:vfreeze}.
%    \begin{macrocode}
    if unknown vlist[i]loc:
      origin = origin
      for j = varcs (i):
        + vlist[i]arc[j]tns * (vlist[i]loc - vlist[vlist[i]arc[j]]loc)
      endfor
      for j = vconstr (i):
        if i < vlist[i]constr[j]:
          + lambda (i, vlist[i]constr[j])
        elseif i > vlist[i]constr[j]:
          - lambda (vlist[i]constr[j], i)
        fi
      endfor
      for j = vpoly (i):
        + lambdapoly (vlist[i]poly[j], plist[vlist[i]poly[j]]cnt,
                      vlist[i]poly[j]idx)
      endfor;
    fi
  endfor
%    \end{macrocode}
% Inquiring minds might want to see the result in numbers:
%    \begin{macrocode}
  if vtracing: vdump; fi
enddef;
%    \end{macrocode}
% Separate Langrange multipliers for~$x$ and~$y$:
% \changes{v1.04}{1996/02/20}{%
%   Have separate Langrange multipliers for~$x$ and~$y$.}
%    \begin{macrocode}
vardef lambda (expr i, j) =
  (if known (xpart(vlist[i]loc - vlist[j]loc)):
     lambdax[i][j]
   else:
     0
   fi,
   if known (ypart(vlist[i]loc - vlist[j]loc)):
     lambday[i][j]
   else:
     0
   fi)
enddef;
%    \end{macrocode}
%
% The Lagrange multiplier for a polynomial~$P$
% \begin{equation}
%   \Lambda_P = \sum_{i=2}^{n_P} \vec\lambda_{P,i}
%     \left( \vec v_{i+1} - \vec v_i
%             + R(2\pi/n_P) \left( \vec v_{i-1} - \vec v_i \right)
%     \right)
% \end{equation}
% can be reshuffled trivially
% \begin{eqnarray}
%   \Lambda_P & = &
%     \vec\lambda_{n-1} \vec v_{n}
%     - \vec\lambda_1 \vec v_2
%     + \vec\lambda_2 R(2\pi/n_P) \vec v_1
%     - \vec\lambda_n R(2\pi/n_P) \vec v_{n-1} \\
%     & & \mbox{} + \sum_{i=2}^{n_P}
%         \left( \vec\lambda_{i-1} + \vec\lambda_{i+1} R(2\pi/n_P)
%                - \vec\lambda_i (1 + R(2\pi/n_P)) \right) \vec v_i
%         \nonumber
% \end{eqnarray}
% \changes{v1.06}{1996/05/24}{
%   New function \texttt{lambdapoly}: Lagrange multipliers for
%   polygons.}
%    \begin{macrocode}
vardef lambdapoly (expr p, n, i) =
  origin
  if i = 1:
    + lambdap[p][2] rotated (-360/n)
  elseif i = 2:
    - lambdap[p][1]
  fi
  if i = n - 1:
    - lambdap[p][n] rotated (-360/n)
  elseif i = n:
    + lambdap[p][n-1]
  fi
  if (i > 1) and (i < n):
    + lambdap[p][i-1] + lambdap[p][i+1] rotated (-360/n)
    - lambdap[p][i] - lambdap[p][i] rotated (-360/n)
  fi
enddef;
%</base>
%    \end{macrocode}
% \begin{macro}{\fmffreeze}
% Again, we can ask for positioning and drawing explicitely from \TeX{}
% (usually called implicitely by |\end{fmfgraph}|).  This is useful for
% subsequent fine tuning.
% \changes{v0.9}{1995/04/27}{%
%   \texttt{\protect\bslash fmffreeze}
%    is new name of \texttt{\protect\bslash fmfposition}.}
%    \begin{macrocode}
%<style>\def\fmffreeze{\fmfcmd{vfreeze;}}
%<style>\let\fmfposition\fmffreeze
%    \end{macrocode}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Immediate mode commands}
%
% This could share some code with |vconnect|, but it doesn't seem
% worth the extra effort just now.
% \changes{v0.9}{1995/02/19}{%
%   Started implementing immediate mode commands.} 
%    \begin{macrocode}
%<*base>
vardef idraw (expr linesty, p) =
  save nopt, sty, lbl, wd, rub;
  numeric nopt, lbl.dist, wd, rub;
%<*mp>
  save  fore, back;
  color fore, back;
%</mp>
  string sty, lbl, lbl.side;
  getopt (opt, linesty);
  sty := opt[opt.first];
  if known opt[opt.first]arg:
    message "feynmf: line styles don't take arguments.  "
             & "Argument `" & opt[opt.first]arg & "' ignored.";
  fi
  opt.first := opt.first + 1;
  lbl := "";
  lbl.side := "";
  lbl.dist := 3thick;
  for nopt = opt.first upto opt.last:
    if match_option (opt[nopt], "label"):
      get_argument (opt[nopt], opt[nopt]arg, lbl);
    elseif match_option (opt[nopt], "label.side"):
      get_argument (opt[nopt], opt[nopt]arg, lbl.side);
    elseif match_option (opt[nopt], "label.dist"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg), lbl.dist);
    elseif match_option (opt[nopt], "width"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg), wd);
%<*mp>
    elseif match_option (opt[nopt], "foreground"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg), fore);
    elseif match_option (opt[nopt], "background"):
      get_argument (opt[nopt], scantokens (opt[nopt]arg), back);
%</mp>
%<*!mp>
    elseif match_option (opt[nopt], "foreground")
       or  match_option (opt[nopt], "background"):
      message "feynmf: color available with MetaPost only!";
%</!mp>
    elseif match_option (opt[nopt], "rubout"):
      if known opt[nopt]arg:
         rub := scantokens (opt[nopt]arg);
      else:
         rub := 2;
      fi
    else:
      ignore_option (opt[nopt], opt[nopt]arg);
    fi
  endfor
  handle_line_style (sty, sty);
  begingroup
%<*mp>
    if known fore:
      save foreground;
      color foreground;
      foreground = fore;
    fi
    if known back:
      save background;
      color background;
      foreground = back;
    fi
%</mp>
    vdraw_arc_rubout (rub, sty, wd, p, lbl);
  endgroup;
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef ivertex (expr vtxsty, pos) =
  save nopt, v;
  numeric nopt, v.lbl.ang, v.lbl.dist,
    v.decor.size, v.decor.ang;
  pair v.loc;
  string v.lbl, v.decor.sty;
  path v.decor.shape;
  v.loc := pos;
  v.lbl := "";
  v.lbl.ang := whatever;
  v.lbl.dist := 3thick;
  v.decor.size := decor_size;
  getopt (opt, vtxsty);
  for nopt = opt.first upto opt.last:
    handle_vertex_option (v, opt[nopt], opt[nopt]arg);
  endfor
  vdraw_label (v.loc, v.lbl);
  vdraw_vertex v;
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfi}
%   \begin{macro}{\fmfiv}
%     \begin{macro}{\fmfipath}
%       \begin{macro}{\fmfipair}
%         \begin{macro}{\fmfiset}
%           \begin{macro}{\fmfiequ}
%    \begin{macrocode}
%<*style>
\def\fmfi#1#2{%
  \fmfbuf@={#1}%
  \fmfcmd{idraw ("\the\fmfbuf@", #2);}}
\def\fmfiv#1#2{%
  \fmfbuf@={#1}%
  \fmfcmd{ivertex ("\the\fmfbuf@", #2);}}
\def\fmfipath#1{\fmfcmd{path #1;}}
\def\fmfipair#1{\fmfcmd{pair #1;}}
\def\fmfiset#1#2{\fmfcmd{#1:=#2;}}
\def\fmfiequ#1#2{\fmfcmd{#1=#2;}}
%</style>
%    \end{macrocode}
%           \end{macro}
%         \end{macro}
%       \end{macro}
%     \end{macro}
%   \end{macro}
% \end{macro}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Drawing the graph}
%
% \begin{macro}{\fmfdraw}
%    \begin{macrocode}
%<style>\def\fmfdraw{\fmfcmd{vdraw;}}
%    \end{macrocode}
% \end{macro}
%
% And here's the actual \MF{} implementation of |vdraw|:
%    \begin{macrocode}
%<*base>
vardef vdraw =
%    \end{macrocode}
% Check for typos:
%    \begin{macrocode}
  if not feynmfwizard:
    vcheck_typos;
  fi
%    \end{macrocode}
% Check that all vertices are known before attempting to draw the
% diagram.
%    \begin{macrocode}
  for i = vertices:
    if not known vlist[i]loc:
      errhelp "Your graph specification was not complete (probably a "
            & "lone vertex).            Check logic and reprocess!";
      errmessage "feynmf: vertex `" & vlist[i]name & "' not determined, "
               & "replaced by `(0,0)'."; 
      vlist[i]loc := origin;
    fi
    if unknown vlist[i]decor.size:
      vlist[i]decor.size = decor_size;
    fi
  endfor
%    \end{macrocode}
% Now do the actual drawing, looping over vertices and arcs.  Draw all
% arcs without the |rubout| option
% before any vertex so we can be a bit more sloppy with drawing
% the endpoints of arcs at decorated vertices.
%    \begin{macrocode}
  for i = vertices:
    for j = varcs (i):
      if known vlist[i]arc[j]sty:
        if vlist[i]arc[j]sty <> "":
          if unknown vlist[i]arc[j]rub:
%    \end{macrocode}
% \changes{v0.5}{1994/10/20}{Implement optional argument for detours.}
%    \begin{macrocode}
            begingroup
%<*mp>
              if known vlist[i]arc[j]fore:
                save foreground; color foreground;
                foreground = vlist[i]arc[j]fore;
              fi
              if known vlist[i]arc[j]back:
                save background; color background;
                background = vlist[i]arc[j]back;
              fi
%</mp>
              vdraw_arc (vlist[i]arc[j]sty, vlist[i]arc[j]wd,
                         vbuild_cut_arc (i, j), vlist[i]arc[j]lbl);
%    \end{macrocode}
% \changes{v0.6}{1995/05/29}{Draw each vertex only once.}
%    \begin{macrocode}
              vlist[i]arc[j]sty := "";
            endgroup;
          fi
        fi
      fi
    endfor;
  endfor
  for i = polygons:
    vdraw_label (pcenter plist[i], plist[i]lbl);
    vdraw_polygon plist[i];
  endfor
  for i = vertices:
    vdraw_label (vlist[i]loc, vlist[i]lbl);
    vdraw_vertex vlist[i];
  endfor
%    \end{macrocode}
% Make a second pass over the arcs, now drawing those with a |rubout|
% option.
%    \begin{macrocode}
  for i = vertices:
    for j = varcs (i):
      if known vlist[i]arc[j]sty:
        if vlist[i]arc[j]sty <> "":
          if known vlist[i]arc[j]rub:
            begingroup
%<*mp>
              if known vlist[i]arc[j]fore:
                save foreground; color foreground;
                foreground = vlist[i]arc[j]fore;
              fi
              if known vlist[i]arc[j]back:
                save background; color background;
                background = vlist[i]arc[j]back;
              fi
%</mp>
              vdraw_arc_rubout (vlist[i]arc[j]rub,
                                vlist[i]arc[j]sty,
                                vlist[i]arc[j]wd,
                                vbuild_cut_arc (i, j),
                                vlist[i]arc[j]lbl);
              vlist[i]arc[j]sty := "";
            endgroup;
          fi
        fi
      fi
    endfor;
  endfor
enddef;
%    \end{macrocode}
%
% Check for the most common typos in vertex names:
% \changes{v1.06}{1996/05/08}{%
%   New macro \texttt{vcheck\_typo}, checking for common errors.}
%    \begin{macrocode}
vardef vcheck_typos =
  save j, err;
  boolean wrn;
  wrn := false;
  for i = vertices:
    save connections;
    connections = vlist[i]arc.last - vlist[i]arc.first + 1;
%    \end{macrocode}
% This vertex has neither been connected nor fixed at a particular
% position.  Issue a warning message.
%    \begin{macrocode}
    if connections < 1:
      if unknown vlist[i]loc:
        message "feynmf: warning: disconnected and unspecified vertex `"
              & substring (2,infinity) of vlist[i]name
              & "'.";
        wrn := true;
      fi
    elseif connections = 1:
      j := vlist[i]arc[vlist[i]arc.last];
%    \end{macrocode}
% A vertex has only been connected with one other vertex and has not
% been fixed as an external vertex. Issue a warning message, but only
% once per connection.
%    \begin{macrocode}
      if j < i:
        if vlist[i]loc = vlist[j]loc:
          message "feynmf: warning: dangling vertex `"
                & substring (2,infinity) of vlist[i]name
                & "' colliding with `"
                & substring (2,infinity) of vlist[j]name
                & "'.";
        wrn := true;
        fi
      fi
    fi
  endfor
  if wrn:
    message "feynmf: Have you seen the warning messages above?";
    message "        They are usually caused by misspelling a vertex'";
    message "        name and can trigger errors further below!";
    message "        Fix the typos and run LaTeX and Metafont again.";
  fi
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Drawing arcs}
%
% Construct an arc from |from| to |to|.  The arc will be straight if
% $|lsr| = 0$, a left (approximate) halfcircle if $|lsr| = -1$ and a
% right halfcircle if $|lsr| = 1$.  Othe values of |lsr| will give
% obvious interpolations.  We optimize the most frequent straight
% line case. 
% \changes{v0.6}{1994/10/22}{%
%   Don't use \texttt{interpath} and halfcircles for detours anymore.
%   Simple paths constructed from three points are better (and
%   simpler).}
%    \begin{macrocode}
vardef vbuild_arc (expr lsr, from, to) =
  if unknown lsr:
    from -- to
  else:
    if lsr = 0:
      from -- to
    else:
      from
        .. (1-lsr)/2 *(to rotatedabout (.5[from,to], 90))
           + (1+lsr)/2 * (to rotatedabout (.5[from,to], -90))
        .. to
    fi
  fi
enddef;
%    \end{macrocode}
% \changes{v0.9}{1995/04/19}{%
%   \texttt{vbuild\_cut\_arc}: new function.}
%    \begin{macrocode}
vardef vbuild_cut_arc (expr origin, index) =
  cut_decors (vlist[origin],
              if vlist[origin]arc[index] <> origin:
                vbuild_arc (vlist[origin]arc[index]lsr,
                            vlist[origin]loc,
                            vlist[vlist[origin]arc[index]]loc)
              else:
                vbuild_tadpole (origin, index)
              fi,
              vlist[vlist[origin]arc[index]])
enddef;
%    \end{macrocode}
%
% \changes{v0.9}{1995/04/25}{%
%   \texttt{vbuild\_tadpole}: new function.}
%    \begin{macrocode}
vardef vbuild_tadpole (expr origin, index) =
  save j, n, nn, nnn, aidx, aang, agap, bgap, ngap, distsum;
  n := 0;
  distsum := 0;
  for j = varcs (origin):
    if vlist[origin]arc[j] <> origin:
%    \end{macrocode}
% This uses the fact that |lsr| has been defined both ways:
%    \begin{macrocode}
      ang := angle direction 0 of
        vbuild_arc (vlist[origin]arc[j]lsr,
                    vlist[origin]loc,
                    vlist[vlist[origin]arc[j]]loc);
      n := n + 1;
      distsum := distsum
        + abs (vlist[vlist[origin]arc[j]]loc - vlist[origin]loc);
%    \end{macrocode}
% A sentinel:
%    \begin{macrocode}
      aang[n] := 360;
      for nn = 1 upto n:
        if ang < aang[nn]:
          for nnn = n - 1 downto nn:
            aang[nnn+1] := aang[nnn];
            aidx[nnn+1] := aidx[nnn];
          endfor
          aang[nn] := ang;
          aidx[nn] := n;
        fi
        exitif known aidx[n];
      endfor
    fi
  endfor
  aidx[n+1] := aidx[1];
  aang[n+1] := aang[1] + 360;
  for nn = 1 upto n:
    agap[nn] = aang[nn+1] - aang[nn];
  endfor
  if known vlist[origin]arc[index]lsr:
%    \end{macrocode}
% Select specified gap:
%    \begin{macrocode}
    ngap := n;
    for nn = 1 upto n:
      if (aang[nn] < vlist[origin]arc[index]lsr)
         and (vlist[origin]arc[index]lsr < aang[nn+1]):
        ngap := nn;
      fi
    endfor
  else:
%    \end{macrocode}
% Select the largest gap:
%    \begin{macrocode}
    bgap := 0;
    for nn = 1 upto n:
      if agap[nn] > bgap:
        bgap :=  agap[nn];
        ngap := nn;
      fi
    endfor
  fi
  if vtracing: adump (n + 1); fi
  vlist[origin]loc{dir(aang[ngap]+agap[ngap]/4)}
    ... vlist[origin]loc + 2/3 * distsum/n
                            / vlist[origin]arc[index]tns
                            * dir(aang[ngap]+agap[ngap]/2)
    ... {-dir(aang[ngap+1]-agap[ngap]/4)}vlist[origin]loc
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef adump expr n =
  save i;
  for i = 1 upto n:
    message "aidx[" & decimal_ (i) & "]=" & decimal_ (aidx[i])
            & ", aang[" & decimal_ (i) & "]=" & decimal_ (aang[i])
            & ", agap[" & decimal_ (i) & "]=" & decimal_ (agap[i]);
  endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vdraw_arc (expr sty, wd, arc) (suffix lbl) =
  if known wd:
    save currentpen;
    pen currentpen;
    pickup pencircle scaled wd;
  fi
  scantokens ("draw_" & sty) (arc);
  vdraw_arc_label (arc, lbl);
enddef;
%    \end{macrocode}
% Dirty trick: temporarily redefine the |draw| macro.
% \changes{v1.06}{1996/05/25}{Handle the \texttt{rubout} option.}
%    \begin{macrocode}
let plain_draw = draw;
vardef vdraw_arc_rubout (expr rub, sty, wd, arc) (suffix lbl) =
  if known rub:
    begingroup
      def draw expr p =
        save oldpen; pen oldpen;
        oldpen := currentpen;
        save currentpen; pen currentpen;
        pickup oldpen scaled rub;
        erase plain_draw (subpath (.1,.9)*length(p) of p)
      enddef;
      vdraw_arc (sty, wd, arc, lbl);
      let draw = plain_draw;
    endgroup;
  fi
  vdraw_arc (sty, wd, arc, lbl);
enddef;
%    \end{macrocode}
%
% Construct the path of a polygon according to |p.cona|, |p.conb| and
% |p.pull|.
% \changes{v1.06}{1996/05/24}{
%   New function \texttt{vbuild\_polygon}: construct polygon path.}
%    \begin{macrocode}
vardef vbuild_polygon suffix p =
  if known p.pull:
%    \end{macrocode}
% Connect the vertices with intermediate points:
%    \begin{macrocode}
    save c; pair c;
    c := pcenter p;
    for i = 1 upto (p.cnt - 1):
      vbuild_polygon_section (p, i, i+1)
    endfor
    vbuild_polygon_section (p, p.cnt, 1)
  else:
%    \end{macrocode}
% Just connect the vertices:
%    \begin{macrocode}
    for i = 1 upto p.cnt:
      vlist[p.vtx[i]]loc
        if known p.cona: scantokens (p.cona) else: -- fi
    endfor
  fi
  cycle
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
def vbuild_polygon_section (suffix p) (expr from, to) =
  vlist[p.vtx[from]]loc
    if known p.cona: scantokens (p.cona) else: -- fi
  p.pull[c,.5[vlist[p.vtx[from]]loc,vlist[p.vtx[to]]loc]]
    if known p.conb: scantokens (p.conb) else: -- fi
enddef;
%    \end{macrocode}
% Calculate the center of gravity of a polygon:
%    \begin{macrocode}
vardef pcenter suffix p =
 (origin for i = 1 upto p.cnt:
           + vlist[p.vtx[i]]loc
         endfor) / p.cnt
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Drawing labels}
%
%    \begin{macrocode}
vardef vdraw_arc_label (expr arc) (suffix lbl) =
  if lbl <> "":
    save _a, _z, _zz, _r;
    numeric _a;
    pair _z, _zz, _r;
    _z := point .5 length (arc) of arc;
    if lbl.dist = 0:
      LaTeX_text (_z, whatever, lbl);
    else:
      _r := direction .5 length (arc) of arc rotated - 90;
      if lbl.side = "left":
        _a := angle (-_r);
      elseif lbl.side = "right":
        _a := angle (_r);
      else:
%    \end{macrocode}
% Normalize to avoid overflow in |dotprod|:
% \changes{v0.8}{1995/02/18}{%
%   \texttt{vdraw\_arc\_label}: Protect against divide by zero.}
%    \begin{macrocode}
        _zz = _z - .5[point 0 of arc, point infinity of arc];
        if ((_zz if length (_zz) >  0: / length (_zz) fi)
            dotprod _r) >= 0:
          _a := angle (_r);
        else:
          _a := angle (-_r);
        fi
      fi
      LaTeX_text (_z + lbl.dist * dir _a, _a, lbl);
    fi
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef vdraw_label (expr loc) (suffix lbl) =
  if lbl <> "":
    save a;
    numeric a;
    if lbl.dist = 0:
      LaTeX_text (loc, whatever, lbl);
    else:
      if unknown lbl.ang:
        if loc = (.5w,.5h):
          a := 0;
        else:
          a := angle (loc - (.5w,.5h));
        fi
      else:
        a := lbl.ang;
      fi
      LaTeX_text (loc + lbl.dist * dir a, a, lbl);
    fi
  fi
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Drawing vertices}
%
%    \begin{macrocode}
vardef vdraw_vertex suffix v =
  if known v.decor.shape:
%<*mp>
    if known v.fore:
      save foreground;
      color foreground;
      foreground = v.fore;
    fi
    if known v.back:
      save background;
      color background;
      background = v.back;
    fi
%</mp>
    if known v.decor.sty:
      if v.decor.sty = "empty":
        emptydraw (
      elseif v.decor.sty = "full":
        cfilldraw (
      elseif is_a_number v.decor.sty:
        drawhalftone (1 - scantokens v.decor.sty / 100,
      else:
        drawtile (scantokens v.decor.sty,
      fi
    else:
      cfilldraw (
    fi
        v.decor.shape
          if known v.decor.ang: rotated v.decor.ang fi
          scaled v.decor.size shifted v.loc);
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef polygon expr n =
  if n > 2:
    for i = 1 upto n:
      (.5up rotated (360i/n)) --
    endfor
    cycle
  else:
    fullcircle
  fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef polygram expr n =
  if n > 2:
    for i = 1 upto n:
      (.5up rotated (360i/n)) --
      (.2up rotated (360(i+.5)/n)) --
    endfor
    cycle
  else:
    fullcircle
  fi
enddef;
%    \end{macrocode}
%
% \changes{v1.01}{1995/06/04}{%
%   \texttt{polycross} for vertices with crosses.}
%    \begin{macrocode}
vardef polycross expr n =
  save i;
  for i = 1 upto n:
    origin -- .5 dir (360(i-.5)/n) --
  endfor
  cycle
enddef;
%    \end{macrocode}
%
% Draw the path of a polygon and fill it according to |p.sty|.
% \changes{v1.06}{1996/05/24}{
%   New function \texttt{vdraw\_polygon}: draw and fill polygon.}
%    \begin{macrocode}
vardef vdraw_polygon suffix p =
%<*mp>
  if known p.fore:
    save foreground;
    color foreground;
    foreground = p.fore;
  fi
  if known p.back:
    save background;
    color background;
    background = p.back;
  fi
%</mp>
  if known p.sty:
    if p.sty = "phantom":
    elseif p.sty = "empty":
      emptydraw (vbuild_polygon p);
    elseif p.sty = "full":
      cfilldraw (vbuild_polygon p);
    elseif is_a_number p.sty:
      drawhalftone (1 - scantokens p.sty / 100, vbuild_polygon p);
    else:
      drawtile (scantokens p.sty, vbuild_polygon p);
    fi
  else:
    cdraw (vbuild_polygon p);
  fi
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Talking to \LaTeX}
%
% Unfortunately, enclosing the |message| in a |batchmode|
% |errorstopmode| pair doesn't work.  The label information isn't
% written to the terminal, but an empty line is anyway.
% \changes{v0.4}{1994/05/28}{%
%   \MP: \texttt{write} the label files directly.}
% \changes{v0.99}{1995/05/07}{%
%   Don't include the filename in the tag for
%   \texttt{\protect\bslash grepfile}: it's a waste.}
% The good news is that we don't have to worry about too long lines,
% because |message| will break them automagically and |\read| will
% splice them together again until braces are balanced.
%    \begin{macrocode}
vardef LaTeX expr text =
%<*!mp>
  message (":" & decimal charcode & ":" & text & "%")
%</!mp>
%<*mp>
  if LaTeX_file = "":
    LaTeX_file := jobname & ".t" & decimal charcode;
    write ("% " & LaTeX_file & " -- generated from " & jobname & ".mp")
      to LaTeX_file;
  fi
  write (text & "%") to LaTeX_file
%</mp>
enddef;
vardef LaTeX_text (expr z, a, txt) =
  LaTeX "\fmfL(" & (decimal (xpart z/LaTeX_unitlength)) & ","
      & (decimal (ypart z/LaTeX_unitlength)) & ","
      & (voctant a) & "){" & txt & "}";
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfL}
% This is an internal macro for squeezing more text into \MF's
% 80 character wide output.
%    \begin{macrocode}
%<style>\def\fmfL(#1,#2,#3)#4{\put(#1,#2){\makebox(0,0)[#3]{#4}}}
%    \end{macrocode}
% \end{macro}
%
% This will only be used with $\vert|a|\vert\le180$:
%    \begin{macrocode}
%<*base>
vardef voctant expr a =
  if known a:
    voctant_list[floor (a/45 + .5)]
  else:
    "c"
  fi
enddef;
string voctant_list[];
voctant_list[-4] := "r";
voctant_list[-3] := "rt";
voctant_list[-2] := "t";
voctant_list[-1] := "lt";
voctant_list[0] := "l";
voctant_list[1] := "lb";
voctant_list[2] := "b";
voctant_list[3] := "rb";
voctant_list[4] := "r";
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsubsection{Tracing}
%
%    \begin{macrocode}
vardef vdump =
  message ">>>>> Vertices and arcs for diagram #" & decimal charcode
        & " of " & jobname & ".mf:";
  for i = vertices:
    message "> " & vlist[i]name & "=" & decimal_pair (vlist[i]loc)
          & ": #lines="
          & decimal (vlist[i]arc.last - vlist[i]arc.first + 1)
          if vlist[i]lbl <> "":
            & ", lbl=" & vlist[i]lbl
            & ", l.angle=" & decimal_ (vlist[i]lbl.ang)
            & ", l.dist=" & decimal_ (vlist[i]lbl.dist)
          fi
          & ".";
  endfor
  for i = vertices:
    for j = varcs (i):
      if known vlist[i]arc[j]sty:
        message "> " & vlist[i]name & "*" & vlist[vlist[i]arc[j]]name
                & ": " & vlist[i]arc[j]sty
                & ", tns=" & decimal_ (vlist[i]arc[j]tns)
                & ", lsr=" & decimal_ (vlist[i]arc[j]lsr)
                & ", wd=" & decimal_ (vlist[i]arc[j]wd)
                & ", rub=" & decimal_ (vlist[i]arc[j]rub)
                if vlist[i]arc[j]lbl <> "":
                  & ", lbl=" & vlist[i]arc[j]lbl
                  & ", l.side=" & vlist[i]arc[j]lbl.side
                  & ", l.dist=" & decimal_ (vlist[i]arc[j]lbl.dist)
                fi
                & ".";
      fi
    endfor
    for j = vconstr (i):
      if i < vlist[i]constr[j]:
%    \end{macrocode}
% We don't keep an explicit record of the fixed distances, but they're
% easy to recover:
%    \begin{macrocode}
        save z;
        pair z;
        z = vlist[vlist[i]constr[j]]loc - vlist[i]loc;
        message "> " & vlist[i]name & "&"
                & vlist[vlist[i]constr[j]]name
                & ": " & decimal_pair (z);
      fi
    endfor;
  endfor
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef decimal_ (text n) =
  if known n: decimal n else: "?" fi
enddef;
%    \end{macrocode}
%
%    \begin{macrocode}
vardef decimal_pair (text z) =
  "(" & decimal_ (xpart z) & "," & decimal_ (ypart z) & ")"
enddef;
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \subsection{Online displays}
%
% This is a bit smarter about pictures of varying sizes and some
% overshooting than |showit|.  You can still get burned, though,
% because \MF{} might not be able to enlarge the screen sufficiently.
% \changes{v0.8}{1994/10/25}{Online display support.}
%    \begin{macrocode}
def show_diagram_ expr frame =
  if (screen_cols < w + 2 xpart frame) or (screen_rows < h + 2 ypart frame):
    screen_cols := w + 2 xpart frame;
    screen_rows := h + 2 ypart frame;
    openwindow currentwindow
      from origin to (screen_rows, screen_cols)
      at (- xpart frame, h + ypart frame);
  fi
  showit_;
  if showstopping > 0:
    stop "This is diagram #" & decimal charcode
       & ".  Hit return to continue...";
  fi
enddef;
%    \end{macrocode}
% Self-modifying code is \emph{fun}: make sure to clear the window the
% second time around.
%    \begin{macrocode}
def show_diagram =
  def show_diagram =
    display blankpicture inwindow currentwindow;
    show_diagram_
  enddef;
  show_diagram_
enddef;
%    \end{macrocode}
% |show_all_diagrams| turns on the above online display mechanism.
% Creative use of |extra_endchar| allows us to do this from the
% command line (|showstopping| is used here to slow down the slide
% show).
% \begin{verbatim}
% mf '\mode:=localmode;
%     showstopping:=1;
%     extra_endchar:="show_all_diagrams(100,100);";
%     input foo.mf'
% \end{verbatim}
%    \begin{macrocode}
def show_all_diagrams expr frame =
  def showit = show_diagram frame enddef;
  displaying:=1;
enddef;
%</base>
%    \end{macrocode}
%
% \begin{macro}{\fmfdisplay}
%   \begin{macro}{\fmfstopdisplay}
% Make the display accessible from \TeX{} too.
%    \begin{macrocode}
%<*style>
\def\fmfdisplay{\fmfcmd{show_all_diagrams (100,100);}}
\def\fmfstopdisplay{\fmfcmd{showstopping:=1;}\fmfdisplay}
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% \begin{macro}{\fmftrace}
%   \begin{macro}{\fmfnotrace}
% Make the display accessible from \TeX{} too.
%    \begin{macrocode}
\def\fmftrace{\fmfcmd{vtracing:=true;}}
\def\fmfnotrace{\fmfcmd{vtracing:=false;}}
%</style>
%    \end{macrocode}
%   \end{macro}
% \end{macro}
%
% Now we're done with the \MF{} macros
%    \begin{macrocode}
%<*base>
endinput;
%</base>
%    \end{macrocode}
% and the \TeX{} macros too:
%    \begin{macrocode}
%<*style>
\mdqrestore
%</style>
%    \end{macrocode}
%
% \Finale
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \appendix
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{Driver file}
%
%    \begin{macrocode}
%<*driver>
%<*!209>
\documentclass[a4paper]{article}
\usepackage{doc}
\usepackage[T1]{fontenc}
%    \end{macrocode}
% The \MF{} and \MP{} logos come out much nicer if you have |mflogo|
% installed:
%    \begin{macrocode}
\IfFileExists{mflogo.sty}%
  {\usepackage{mflogo}%
   \def\FMF{\texttt{feyn}\textlogo{MF}}}%
  {\def\MF{\textsf{META}\-\textsf{FONT}}%
   \def\MP{\textsf{META}\-\textsf{POST}}%
   \def\FMF{\texttt{feyn}\textsf{MF}}}
%    \end{macrocode}
% Here is the place to declare your own PostScript aware |dvi| driver
% option:
% \changes{v1.01}{1995/07/05}{%
%    Don't force \texttt{dvips} as \texttt{dvi} driver.}
%    \begin{macrocode}
\usepackage{graphics}[1994/12/15]
%<mp>\usepackage{feynmp}
%<!mp>\usepackage{feynmf}
%</!209>
%    \end{macrocode}
% Here's the \LaTeX~2.09 compatibility stuff:
%    \begin{macrocode}
%<*209>
%<mp>\documentstyle[doc,feynmp209]{article}
%<!mp>\documentstyle[doc,feynmf209,epsf]{article}
%<!mp>\let\includegraphics\epsffile
\def\textit#1{{\it#1\/}}
\def\textbf#1{{\bf#1}}
\def\textsf#1{{\sf#1}}
\def\texttt#1{{\tt#1}}
\def\emph#1{{\em#1\/}}
\let\bfseries\bf
\def\LaTeXe{\LaTeX$2_\epsilon$}
\def\MF{\textsf{META}\-\textsf{FONT}}
\def\MP{\textsf{META}\-\textsf{POST}}
\def\FMF{\texttt{feyn}\textsf{MF}}
%</209>
%    \end{macrocode}
% The rest is common:
%    \begin{macrocode}
\font\manfnt=manfnt
\def\dangerousbend/{{\manfnt\char"7F}}
\def\dubious{\begin{itemize}\item[\dangerousbend/]}
\def\enddubious{\end{itemize}}
\def\examples#1{%
  \begin{list}{}%
   {\setlength{\leftmargin}{#1}%
    \addtolength{\leftmargin}{\marginparsep}%
    \addtolength{\leftmargin}{-\marginparwidth}%
    \setlength{\rightmargin}{0mm}%
    \setlength{\itemindent}{\parindent}%
    \setlength{\listparindent}{\parindent}}%
    \item}
\def\endexamples{\end{list}}
\def\marginexample#1{\marginpar{\hbox to\marginparwidth{#1\hss}}}
\parindent0pt
\def\manindex#1{\SortIndex{#1}{#1}}
%<manual>\OnlyDescription
\EnableCrossrefs
\RecordChanges
\CodelineIndex
\DoNotIndex{\def,\gdef,\long,\let,\begin,\end,\if,\ifx,\else,\fi}
\DoNotIndex{\immediate,\write,\newwrite,\openout,\closeout,\typeout}
\DoNotIndex{\font,\nullfont,\jobname,\documentclass}
\DoNotIndex{\batchmode,\errorstopmode,\char,\catcode,\ }
\DoNotIndex{\CodelineIndex,\DocInput,\DoNotIndex,\EnableCrossrefs}
\DoNotIndex{\filedate,\filename,\fileversion,\logo,\manfnt}
\DoNotIndex{\NeedsTeXFormat,\ProvidesPackage,\RecordChanges,\space}
\DoNotIndex{\usepackage,\wlog,\@gobble,\@ifundefined,\@namedef,\@spaces}
\DoNotIndex{\begingroup,\csname,\edef,\endcsname,\expandafter,\hbox}
\DoNotIndex{\hskip,\ifeof,\ignorespaces,\item,\leavevmode,\loop,\makebox}
\DoNotIndex{\newcounter,\newif,\newread,\openin,\par,\parindent,\put}
\DoNotIndex{\read,\relax,\repeat,\setcounter,\stepcounter,\the}
\DoNotIndex{\value,\vbox,\vskip}
\DoNotIndex{\@tempa,\@tempb,\advance,\bf,\bfseries,\closein}
\DoNotIndex{\CurrentOption,\DeclareOption,\documentstyle,\em,\emph}
\DoNotIndex{\endgroup,\epsilon,\global,\hfuzz,\input,\it,\LaTeX,\LaTeXe}
\DoNotIndex{\macrocode,\meaning,\OnlyDescription,\PassOptionsToPackage}
\DoNotIndex{\ProcessOptions,\RequirePackage,\sf,\string,\textbf,\textit}
\DoNotIndex{\textsf,\texttt,\tt,\unitlength}
%    \end{macrocode}
% Cut the linebreaking some slack for macrocode which might conatin
% long lines (it doesn't really hurt if they stick out a bit).
%    \begin{macrocode}
\let\origmacrocode\macrocode
\def\macrocode{\hfuzz 5em\origmacrocode}
\begin{document}
  \DocInput{feynmf.dtx}
\end{document}
%</driver>
%    \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
Local Variables:
mode:LaTeX
fill-prefix:"% "
indent-tabs-mode:nil
change-log-default-name:"TODO"
page-delimiter:"^% %%%%%%%%%*\n"
End: