summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/axodraw2/axodraw2.sty
blob: dc676008c80506820fa3a56c6b89c224cc1bdaf5 (plain)
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
%  This is axodraw2.sty
%
% (C) 1994-2018 by authors:
%         John Collins (jcc8 at psu dot edu)
%         Jos Vermaseren (t68 at nikhef dot nl) 
%
%
%  Conditions of use:
%
%    axodraw 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 3 of the License, or (at your option) 
%    any later version.
%
%    axodraw 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.
%
%    For the GNU General Public License see <http://www.gnu.org/licenses/>.
%
%  Code necessities:
%
%  1.  \ignorespaces at end of commands that draw things.  Often it won't
%      matter, but occasionally a command in a picture environment
%      will set material and a following uncommented end-of-line in
%      the user's code will shift the insertion point.
%  2.  Use end-of-line comments whereever TeX might use the end-of-line as
%      a space to be typeset.
%
%  Conventions
%
%  1.  Any font and color changes that are supposed to be local should
%      be made local, either by explicit TeX grouping or by being
%      inside commands (e.g., box-making commands) that enforce groups.
%      Braces work, but \begingroup and \endgroup are easier to see in
%      multiline groups. 
%  2.  Scaling:
%           \unitlength is the unit for the canvas (as in picture environment).
%           \axoscale is for the unit for coordinates, widths, etc
%           \axotextscale is for all text objects, BUT only when
%                PSText is NOT set to scale as graphics objects
%           When PSText is set to scale as graphics objects, PSText
%                scales by \axoscale, but TeX-text has unit scaling.
%      Given a specification of a position (x,y) as in a call to \Line,
%      the position of the point relative to the origin is
%           x_act = (x + \axoxo ) \axoscale pt + \axoxoffset \unitlength
%           y_act = (y + \axoyo ) \axoscale pt + \axoyoffset \unitlength
%      Widths and the like for lines are in units of \axoscale pt
%
%		#[ About folds : (this line starts with one % and two tabs)
%
%   The internals of the file have been organized in folds.
%   These are defined as a range of lines if which the first and last
%   lines have a special format. Each starts with any three characters
%   (may include tabs), then #[ for the start line and #] for the closing
%   line, then both lines need identical name fields, closed by a colon.
%   After the colon can be anything. When a fold is closed one should see
%   only the first line but with the #[ replaced by ## as in
%		## About folds : (this line starts with one % and two tabs)
%   Folds can be nested.
%   This fold concept comes originally from the occam compiler for the
%   transputer in the second half of the 1980's although there it was
%   implemented differently. It was taken over by the STedi editor in its
%   current form. The sources of this editor are available from the form
%   home site: http://www.nikhef.nl/~form
%   Some people have managed to emulate these folds in editors like emacs
%   and vim.
%
%		#] About folds : 
%
\ProvidesPackage{axodraw2}[2018/10/10 v2.1.2]
%
%   axodraw.sty file, both for .tex -> .dvi -> .ps and for .tex -> .pdf
%
% 	#[ Common LaTeX code :
%		#[ Variables :
%
%
\RequirePackage{keyval}
\RequirePackage{ifthen}
\RequirePackage{graphicx}
\RequirePackage{color}
\RequirePackage{ifxetex}
%
%
\DeclareOption{v1compatible}{
    \def\B2Text{\BTwoText}
    \def\G2Text{\GTwoText}
    \def\C2Text{\CTwoText}
}
\DeclareOption{canvasScaleIs1pt}{\canvasScaleOnept}
\DeclareOption{canvasScaleIsObjectScale}{\canvasScaleObjectScale}
\DeclareOption{canvasScaleIsUnitLength}{\canvasScaleUnitLength}
\DeclareOption{PSTextScalesIndependently}{\PSTextScalesLikeGraphicsfalse}
\DeclareOption{PSTextScalesLikeGraphics}{\PSTextScalesLikeGraphicstrue}

% N.B. Option processing is deferred to end of this file, so that all
% definitions and initializations have been done first.

% Settings for pdf v. dvi/ps output:
% We need to be able to run under latex, pdflatex, lualatex, and
% xelatex, and use (if possible) \pdfoutput and \pdfliteral
%
% latex:    Initially \pdfoutput is 0, and \pdfliteral is defined but
%           not usable. 
% pdflatex: Initially \pdfoutput is 1, and \pdfliteral is defined and
%           usable. 
% lualatex: same as pdflatex in versions up to 0.80
%           But in versions from 0.85, pdfouput and pdfliteral aren't
%           defined; instead \outputmode, \pdfextension literal{...}
%           are available instead.
% xelatex:  Both \pdfoutput and \pdfliteral are undefined
%           but special{pdf:literal ...} gives same effect as
%           \pdfliteral would, and we can assume pdf mode always.
% When \pdfoutput is defined, the user can change its value to change
% the type of output.  This must be done before the first page is
% created.  But various packages (including graphics and ifpdf, as
% well as axodraw) take actions when the package is loaded that depend
% on current state of \pdfoutput (or its equivalent).  So it is
% reasonable to require that \pdfoutput be set only before packages
% are loaded and not set later.
%
% We define \axo@pdfoutput and \axo@pdfliteral for our uses to have
% function of \pdfoutput and \pdfliteral, but to be defined always.
% We initialize them to a default suitable for dvi mode, and override
% these definitions to cover the situations listed above.  This needs
% tests for whether \pdfoutput, \outputmode, etc are undefined of
% defined.  We put these inside a group, to evade the side effect that 
% \@ifundefined defines the object being tested.
%
% Default values:
\newcount\axo@pdfoutput
\axo@pdfoutput=0
\def\axo@pdfliteral#1%
     {\PackageWarning{axo}{Bug: pdfliteral accessed but not available}}
\bgroup
    \@ifundefined{pdfoutput}%
        {}%
        {\global\axo@pdfoutput=\pdfoutput}%
    %
    \@ifundefined{pdfliteral}%
        {}%
        {% Define \axo@pdfliteral to call \pdfliteral, so that if the
         % definition of \pdfliteral were to be overridden, we get to
         % use the changed definition
         \gdef\axo@pdfliteral#1{\pdfliteral{#1}}}%
    \@ifundefined{outputmode}%
                 {}%
                 {\global\axo@pdfoutput=\outputmode}
    \@ifundefined{pdfextension}%
                 {}%
                 {\gdef\axo@pdfliteral#1{\pdfextension literal{#1}}}
\egroup
\ifxetex
    \axo@pdfoutput=1
    \def\axo@pdfliteral#1{\special{pdf:literal #1}}
\fi

%
%  For communicating with axohelp with global file
%
\newif\ifaxo@axohelpRerun
\axo@axohelpRerunfalse
%
\newcounter{axo@objectIndex}
\setcounter{axo@objectIndex}{0}
\newwrite\axo@spec
\newread\axo@axohelpFile
%
\newcommand\axo@setObject[3]{
    \expandafter\gdef\csname axo@input@#1\endcsname{#2}
    \expandafter\gdef\csname axo@output@#1\endcsname{#3}
}
%
\ifcase\axo@pdfoutput
\else
    \IfFileExists{\jobname.ax2}%
        {{% For comparisons between current definition of object
        % and previously processed definition, spaces must be preserved.
            \obeyspaces
            \openin\axo@axohelpFile=\jobname.ax2
        }}%
        {%
            \PackageWarning{axo}{File `\jobname.ax2' not found.}
        \axo@axohelpReruntrue
        }
    \AtBeginDocument{\immediate\openout\axo@spec\jobname.ax1}
    \AtEndDocument{\immediate\closeout\axo@spec
                  \ifaxo@axohelpRerun
                    \PackageWarning{axodraw2}{Run `axohelp \jobname'
                      and then rerun pdflatex.}
                  \fi
                 }
\fi

%  Commands to set parameters
%
%  Arrow scale:
\newcommand{\AXO@DefaultArrowScale}{1}
\newcommand\SetArrowScale[1]{%
    \renewcommand\AXO@DefaultArrowScale{#1}%
}
% Alternative name
\newcommand\DefaultArrowScale[1]{\SetArrowScale{#1}}
\SetArrowScale{1}

% Arrow inset:
\newcommand\AXO@ArrowInset{0.2}
%\renewcommand\AXO@ArrowInset{-1 }
\newcommand\SetArrowInset[1]{%
    \renewcommand\AXO@ArrowInset{#1}%
}

% Arrow aspect:
\newcommand\AXO@DefaultArrowAspect{1.25}
\newcommand\SetArrowAspect[1]{%
    \renewcommand\AXO@DefaultArrowAspect{#1}%
}

% Arrow position (fractional position along line):
\newcommand\AXO@ArrowPos{0.5}
\newcommand\SetArrowPosition[1]{%
    \renewcommand\AXO@ArrowPos{#1}%
}

% Arrow stroke width
\newcommand{\AXO@DefaultArrowStroke}{0 }
\newcommand\SetArrowStroke[1]{%
    \renewcommand\AXO@DefaultArrowStroke{#1}%
}

\newlength{\axounitlength}
% The next two are scratch registers
\newlength\axo@x
\newlength\axo@y
% Initializations
\axounitlength=\unitlength
\def\axocanvas{1}     % How unitlength is set in axopicture environment
                      % 0 => 1 pt
                      % 1 => \axoscale pt
                      % 2 => Don't set it
\def\axominusone{-1}
\def\axoone{1}
\def\axozero{0}
\def\axowidth{0.5}
\def\axoscale{1.0}
\def\axotextscale{1.0}
\newif\ifPSTextScalesLikeGraphics
\PSTextScalesLikeGraphicstrue
\def\axoxoff{0}
\def\axoyoff{0}
\def\axoxo{0}
\def\axoyo{0}
\def\axoarrowsize{2}
%
%
%       Now the user callable routines, and their immediate helpers
%
% Commands for setting parameters applicable to subsequent graphical objects:
%
\def\SetLineSep#1{\def\AXO@Sep{#1}\ignorespaces}\relax
\let\SetSep=\SetLineSep\relax
\def\SetDashSize#1{\def\AXO@DashSize{#1}\ignorespaces}\relax
\def\SetWidth#1{\def\axowidth{#1}\ignorespaces}
\def\SetArrowSize#1{\def\axoarrowsize{#1}}

\def\SetObjectScale#1{\def\axoscale{#1}\ignorespaces}
\def\SetCanvasScale#1{\unitlength = #1 pt\ignorespaces}
\def\SetTextScale#1{\def\axotextscale{#1}\ignorespaces}
\let\SetScale = \SetObjectScale

\def\SetOffset(#1,#2){\def\axoxoff{#1}\def\axoyoff{#2}\ignorespaces}
\def\SetScaledOffset(#1,#2){\def\axoxo{#1}\def\axoyo{#2}\ignorespaces}

\def\canvasScaleOnept{\def\axocanvas{0}}
\def\canvasScaleObjectScale{\def\axocanvas{1}}
\def\canvasScaleUnitLength{\def\axocanvas{2}}

%
%
%		#] Variables : 
%		#[ Defining commands with optional arguments : 
%
\def\defWithOption#1#2#3{%
    \@namedef{#1}%
        {%
            \@ifnextchar[%]
                {\@nameuse{#1@A}}%
                {\@nameuse{#1@A}[]}%
        }%
    \@namedef{#1@A}[##1]#2%
         {#3}%
}
%
%		#] Defining commands with optional arguments : 
%		#[ axopicture :
%
%   Version of picture environment with unitlength set to 1pt
%   as assumed by axodraw. We also store some variables and reset them
%   afterwards. This makes the picture environment also local from the
%   axodraw viewpoint. To change the global settings one should issue
%   the corresponding command from outside the axopicture environment.
%   Use: \begin{axopicture}(width,height)(xshift,yshift)
%        \end{axopicture}
%   The old use with the regular picture environment will still work,
%   but it will have the old shortcomings connected to it.
%   
\let\OLDpicture=\picture
\let\endOLDpicture=\endpicture
\newenvironment{axopicture}
{%
    \ifcase \axocanvas  
        \setlength{\unitlength}{1 pt}%
    \or
        \setlength{\unitlength}{\axoscale\space pt}%
    \else
        % Leave \unitlength as whatever the user set
    \fi
    \begin{OLDpicture}%
}
{%
    \end{OLDpicture}%
    \ignorespacesafterend
}
%
%		#] axopicture : 
%		#[ AXO@keys :
%

% Diagnostics for unimplemented features:
\newif\ifAXONotImplemented
\AXONotImplementedfalse
\def\AXO@NOTIMPLEMENTED#1{%
    \global\AXONotImplementedtrue
    \PackageWarning{axodraw2}{#1}%
}
\AtEndDocument{%
    \ifAXONotImplemented
        \PackageWarningNoLine{axodraw2}{unimplemented features used
          somewhere in document}%
    \fi
}

% The next is used temporarily, it gives the result of parsing an
% arrow-using command to give the Postscript code for setting the
% arrow.
%
%  Keys for optional arguments:
%  First the variables used, with some defaults.
\newif\ifAXO@arrow
\AXO@arrowfalse
\newif\ifAXO@clock
\AXO@clockfalse
\newif\ifAXO@dash
\AXO@dashfalse
\newif\ifAXO@double
\AXO@doublefalse
\newif\ifAXO@flip       % Flip arrow orientation, as in JaxoDraw
\AXO@flipfalse
\newif\ifAXO@linecolor  % Option sets color for current line
\AXO@linecolorfalse

\def\AXO@Sep{2}        % Double line separation
\def\AXO@DashSize{3}

%  Then the definitions of the keys
\define@key{axo}{arrowscale}{%
    \def\AXO@CurrentArrowScale{#1}%
}
\define@key{axo}{arrowwidth}{%
    \def\AXO@CurrentArrowWidth{#1}%
}
\define@key{axo}{arrowlength}{%
    \def\AXO@CurrentArrowLength{#1}%
}
% Make arrowheight a synonym for arrowlength
\let\KV@axo@arrowheight=\KV@axo@arrowlength
%
\define@key{axo}{arrowpos}{%
    \def\AXO@CurrentArrowPos{#1 }
}
%
\define@key{axo}{arrowaspect}{%
    \def\AXO@CurrentArrowAspect{#1 }
}
%
\define@key{axo}{arrowinset}{%
    \def\AXO@CurrentArrowInset{#1 }
}
% Make inset a synonym for arrowinset
\let\KV@axo@inset=\KV@axo@arrowinset
%
\define@key{axo}{arrowstroke}{%
    \def\AXO@CurrentArrowStroke{#1 }
}
%
\define@key{axo}{arrow}[true]{%
    \AXO@boolkey{#1}{arrow}%
}
\define@key{axo}{clock}[true]{%
    \AXO@boolkey{#1}{clock}%
}
\define@key{axo}{clockwise}[true]{%
    \AXO@boolkey{#1}{clock}%
}
\define@key{axo}{color}{%
    \def\AXO@CurrentColor{#1}%
        \AXO@linecolortrue
}
% Make colour a synonym for color
\let\KV@axo@colour=\KV@axo@color
%
\define@key{axo}{dash}[true]{%
    \AXO@boolkey{#1}{dash}%
}
\define@key{axo}{dashsize}{%
    \def\AXO@CurrentDashSize{#1 }
}
\define@key{axo}{dsize}{%
    \def\AXO@CurrentDashSize{#1 }
}
\define@key{axo}{double}[true]{%
    \AXO@boolkey{#1}{double}%
}
\define@key{axo}{flip}[true]{%
    \AXO@boolkey{#1}{flip}%
}
\define@key{axo}{linesep}{%
    \def\AXO@CurrentSep{#1}
}
\define@key{axo}{sep}{%
    \def\AXO@CurrentSep{#1}
}
\define@key{axo}{width}{%
    \def\AXO@CurrentWidth{#1}%
}
%
%		#] AXO@keys : 
%		#[ AXO@Parse :
%
%  Parsing of optional arguments, etc
%
\def\AXO@Parse#1#2{%
    % Usage: \AXO@Parse#1#2 or \AXO@Parse#1#2[#3]
    % #1 is a command for setting an object, that takes no optional argument
    % #2 and the optional #3 are keyword settings.
    % There then follow the compulsory arguments for the command in #1.
    %
    % E.g., \AXO@Parse{\AXO@Line}{double}(x1,y1)(x2,y2)
    %      \AXO@Parse{\AXO@Line}{double}[arrow](x1,y1)(x2,y2)
    %
    % I will 
    %   (a) Set standard initial settings (arrows, etc)
    %   (b) Parse the keyword settings in #2 and #3, e.g., scale = 3,
    %   (c) Call #1 to make the object
    \AXO@arrowfalse
    \AXO@clockfalse
    \AXO@dashfalse
    \AXO@doublefalse
    \AXO@flipfalse
    \AXO@linecolorfalse
    \let\AXO@CurrentWidth\axowidth
    \let\AXO@CurrentArrowPos\AXO@ArrowPos
    \let\AXO@CurrentArrowWidth\relax
    \let\AXO@CurrentArrowLength\relax
    \let\AXO@CurrentArrowInset\AXO@ArrowInset
    \let\AXO@CurrentArrowScale\AXO@DefaultArrowScale
    \let\AXO@CurrentArrowStroke\AXO@DefaultArrowStroke
    \let\AXO@CurrentArrowAspect\AXO@DefaultArrowAspect
    \let\AXO@CurrentDashSize\AXO@DashSize
    \let\AXO@CurrentSep=\AXO@Sep
    \@ifnextchar[{\AXO@Options{#1}{#2}}%
                 {\AXO@Options{#1}{#2}[]}%
}
%
%		#] AXO@Parse : 
%		#[ AXO@Options :
%  
\def\AXO@Options#1#2[#3]{%
    % #1 is command to execute, #2 and #3 are options.
    \setkeys{axo}{#2}%
    \setkeys{axo}{#3}%
    \ifx\AXO@CurrentArrowLength\relax
        \def\AXO@CurrentArrowLength{0 }%
    \fi
    \ifx\AXO@CurrentArrowWidth\relax
        \def\AXO@CurrentArrowWidth{0 }%
    \fi
    \ifAXO@arrow
        \def\AXO@ArrowArg{
            \AXO@CurrentArrowStroke \space %
            \AXO@CurrentArrowWidth \space %
            \AXO@CurrentArrowLength \space %
            \AXO@CurrentArrowInset \space %
            \AXO@CurrentArrowScale \space %
            \AXO@CurrentArrowAspect \space %
            \AXO@CurrentArrowPos \space %
            \ifcase\axo@pdfoutput
             true \space % Indicates that an arrow should be drawn.
            \else
             1 \space % Indicates that an arrow should be drawn.
            \fi
        }%
    \else
        \ifcase\axo@pdfoutput
            \def\AXO@ArrowArg{ 0 0 0 0 0 0 0 false }%
        \else
            \def\AXO@ArrowArg{ 0 0 0 0 0 0 0 0 }%
        \fi
    \fi
    #1%
}
%
\def\AXO@useopts{%
  % Override global settings by those from options
  % HACK: The \@killglue solves problem that setting color
  % causes a shift in horizontal position.
  % Motivation: From definition of \put.
  \@killglue
  \ifAXO@linecolor \SetColor{\AXO@CurrentColor}\fi
}
%
% Now ensure there is a setting for the current arrow
\AXO@Parse{}{}
%
%		#] AXO@Options : 
%		#[ AXO@varia :
%
% Now ensure there is a setting for the current arrow
\AXO@Parse{}{}

\def\AXO@PrependOption#1#2{%
    % Run command #1, which has an optional argument, with #2 prepended
    % to the command's optional arguments.  If there are no optional
    % arguments, just run the command with #2 as the optional arguments
    \@ifnextchar[{\AXO@TwoOption{#1}{#2}}%
                 {#1[#2]}%
}
\def\AXO@TwoOption#1#2[#3]{%
    #1[#2,#3]%
}
%
% Copied from graphicx.sty, for use with boolean keys
% Modified to do lower casing here
\def\AXO@boolkey#1#2{%
    \lowercase{\AXO@boolkeyA{#1}}{#2}%
}
\def\AXO@boolkeyA#1#2{%
    \csname AXO@#2\ifx\relax#1\relax true\else#1\fi\endcsname
}
%
%		#] AXO@varia : 
%		#[ Colors :
%
%       Here we make an interface, compatible with both: color.sty,
%       with the commands of axodraw v. 1, and with the commands of
%       colordvi.sty (used by axodraw v. 1).
%
%       1. We make a set of named colors suitable for use with both
%          axodraw's commands that take color arguments and with
%          color.sty's \color command.
%       2. We define a command \SetColor to set a named color as the
%          current color.  It is now identical to \color.
%       3. For each of the colors that we define here, we make 
%          named color setting commands, e.g., \Red
%          \textRed.  \Red sets its (one) argument in Red, \textRed
%          is a "declaration" that changes the current color.
%       All the commands for setting color apply to both regular LaTeX
%       material and to axodraw objects. Their setting of color
%       respects LaTeX environments and TeX groups. 
%
%       We also define
%          a. Named-color commands like \textRed and \Red for named
%             colors to give the same interface as the colordvi
%             package (and hence axodraw v. 1).
%          b. \SetColor command to set a named color. 


\let\SetColor=\color

% For v. 1 compatibility:
\def\IfColor#1#2{#1}

\newcommand\newcolor[2]{%
    % Define a named color both in the color.sty style
    % and in the colordvi.sty, with also a command giving the CMYK value.
    % #1 is the color's name, #2 is its CMYK definition, space
    % separated. 
    % 
    % Invoke color.sty's \definecolor after change of argument format:
    \axo@new@color #1 #2\@%
    % Define commands to use this color,
    % E.g., if #1 is Red, then define \Red and \textRed:
    \expandafter\def\csname #1\endcsname##1{{\SetColor{#1}##1}\ignorespaces}
    \expandafter\def\csname text#1\endcsname{\SetColor{#1}\ignorespaces}
    % The following to give the cmyk value of a color, e.g., \cmykRed,
    % is no longer needed, since we no longer do color setting in
    % postscript and pdf code:
%%   \expandafter\def\csname cmyk#1\endcsname{#2}
}

% Command to invoke color.sty's \definecolor, which needs a translation
% of our space-separated CMYK vector to a comma-separated vector:
\def\axo@new@color #1 #2 #3 #4 #5\@{\definecolor{#1}{cmyk}{#2,#3,#4,#5}}


%   For consistency we define our named colors here, rather than
%   using color.sty's mechanisms.  The
%   first 68 are standard colors, as defined by dvips, and
%   implemented in both colordvi.ps, and in color.sty with its
%   usenames and dvipsnames options (in the file dvipsnam.def
%   provided by the LaTeX graphics package). 
%
%       We define an extra 5 colors at the end
%
% The 68 dvips-defined colors are:
%
\newcolor{GreenYellow}{0.15 0 0.69 0}
\newcolor{Yellow}{0 0 1 0}
\newcolor{Goldenrod}{0 0.10 0.84 0}
\newcolor{Dandelion}{0 0.29 0.84 0}
\newcolor{Apricot}{0 0.32 0.52 0}
\newcolor{Peach}{0 0.50 0.70 0}
\newcolor{Melon}{0 0.46 0.50 0}
\newcolor{YellowOrange}{0 0.42 1 0}
\newcolor{Orange}{0 0.61 0.87 0}
\newcolor{BurntOrange}{0 0.51 1 0}
\newcolor{Bittersweet}{0 0.75 1 0.24}
\newcolor{RedOrange}{0 0.77 0.87 0}
\newcolor{Mahogany}{0 0.85 0.87 0.35}
\newcolor{Maroon}{0 0.87 0.68 0.32}
\newcolor{BrickRed}{0 0.89 0.94 0.28}
\newcolor{Red}{0 1 1 0}
\newcolor{OrangeRed}{0 1 0.50 0}
\newcolor{RubineRed}{0 1 0.13 0}
\newcolor{WildStrawberry}{0 0.96 0.39 0}
\newcolor{Salmon}{0 0.53 0.38 0}
\newcolor{CarnationPink}{0 0.63 0 0}
\newcolor{Magenta}{0 1 0 0}
\newcolor{VioletRed}{0 0.81 0 0}
\newcolor{Rhodamine}{0 0.82 0 0}
\newcolor{Mulberry}{0.34 0.90 0 0.02}
\newcolor{RedViolet}{0.07 0.90 0 0.34}
\newcolor{Fuchsia}{0.47 0.91 0 0.08}
\newcolor{Lavender}{0 0.48 0 0}
\newcolor{Thistle}{0.12 0.59 0 0}
\newcolor{Orchid}{0.32 0.64 0 0}
\newcolor{DarkOrchid}{0.40 0.80 0.20 0}
\newcolor{Purple}{0.45 0.86 0 0}
\newcolor{Plum}{0.50 1 0 0}
\newcolor{Violet}{0.79 0.88 0 0}
\newcolor{RoyalPurple}{0.75 0.90 0 0}
\newcolor{BlueViolet}{0.86 0.91 0 0.04}
\newcolor{Periwinkle}{0.57 0.55 0 0}
\newcolor{CadetBlue}{0.62 0.57 0.23 0}
\newcolor{CornflowerBlue}{0.65 0.13 0 0}
\newcolor{MidnightBlue}{0.98 0.13 0 0.43}
\newcolor{NavyBlue}{0.94 0.54 0 0}
\newcolor{RoyalBlue}{1 0.50 0 0}
\newcolor{Blue}{1 1 0 0}
\newcolor{Cerulean}{0.94 0.11 0 0}
\newcolor{Cyan}{1 0 0 0}
\newcolor{ProcessBlue}{0.96 0 0 0}
\newcolor{SkyBlue}{0.62 0 0.12 0}
\newcolor{Turquoise}{0.85 0 0.20 0}
\newcolor{TealBlue}{0.86 0 0.34 0.02}
\newcolor{Aquamarine}{0.82 0 0.30 0}
\newcolor{BlueGreen}{0.85 0 0.33 0}
\newcolor{Emerald}{1 0 0.50 0}
\newcolor{JungleGreen}{0.99 0 0.52 0}
\newcolor{SeaGreen}{0.69 0 0.50 0}
\newcolor{Green}{1 0 1 0}
\newcolor{ForestGreen}{0.91 0 0.88 0.12}
\newcolor{PineGreen}{0.92 0 0.59 0.25}
\newcolor{LimeGreen}{0.50 0 1 0}
\newcolor{YellowGreen}{0.44 0 0.74 0}
\newcolor{SpringGreen}{0.26 0 0.76 0}
\newcolor{OliveGreen}{0.64 0 0.95 0.40}
\newcolor{RawSienna}{0 0.72 1 0.45}
\newcolor{Sepia}{0 0.83 1 0.70}
\newcolor{Brown}{0 0.81 1 0.60}
\newcolor{Tan}{0.14 0.42 0.56 0}
\newcolor{Gray}{0 0 0 0.50}
\newcolor{Black}{0 0 0 1}
\newcolor{White}{0 0 0 0}
%
%   Our extra colors
%
\newcolor{LightYellow}{0 0 0.7 0}
\newcolor{LightRed}{0 0.75 0.7 0}
\newcolor{LightBlue}{0.7 0.5 0 0}
\newcolor{LightGray}{0 0 0 0.1}
\newcolor{VeryLightBlue}{0.15 0.07 0 0}
%
\SetColor{Black}
%
%		#] Colors : 
% 	#] Common LaTeX code : 
% 	#[ LaTeX primitives :
%
%    #[ Putting material
%

% Some utilities that remove extra space that creeps in, particularly
% when extra groups are inserted before the use of \put.
% Use the definition of \@killglue used in latex.ltx for \put,
% but copy it here, since \@killglue is internal and not documented.
\gdef\AXO@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}

% Special purpose versions of \put and \special
\long\gdef\putLen(#1,#2)#3{%
  % Like LaTeX's \put, except that #1 and #2 are lengths instead of numbers
  % giving lengths in units of \unitlength.
  \AXO@killglue\raise#2\relax
  \hbox to 0pt{\kern#1\relax #3\hss}%
  \ignorespaces
}
%
\def\AxoPut(#1,#2)#3{%
  % Like \put, but shifted by axodraw's offsets.
  % This provides a way of coding the offsets in one place.
  % But we are only using it in a limited set of cases so far.
  \AXO@killglue
  \bgroup
    \axounitlength = \axoscale pt
    \axo@x = \axoxoff \unitlength
    \advance\axo@x by \axoxo \axounitlength
    \advance\axo@x by #1 \axounitlength
    \axo@y = \axoyoff \unitlength
    \advance\axo@y by \axoyo \axounitlength
    \advance\axo@y by #2 \axounitlength
    \putLen(\axo@x,\axo@y){%
                           % If there are axodraw objects in #3, they should not also
                           % apply shifts, that would be double
                           % counting! Hence:
                           \SetOffset(0,0)%
                           \SetScaledOffset(0,0)%
                           #3%
                          }%
  \egroup
\ignorespaces
}

\def\AXOspecial#1{%
  % Insertion of postscript code:
  % Replacement for \special{" ...}, with the color initialized
  % to the color befor the \special.  (Ordinary \special{"...}
  % initializes color to black.)
  % Definitions made by \special{!...} are in dictionary SDict
  % (as stated in dvips documentation), and we save color there.
  \special{ps:: SDict begin savecolor end }%
  \special{" restorecolor #1 }%
}

\def\AXOputPS#1{%
    % Insert postscript code after allowing for offsets.
    \AxoPut(0,0){\AXOspecial{#1}}%
}

\def\AXOputPDF#1{
    % Insert pdf code after allowing for offsets.
    \AxoPut(0,0){\axo@pdfliteral{#1}}%
}

%
%  Now variables and routines for setting material in boxes (used by
%  the BText etc commands.
%
\newdimen\tmpX
\newdimen\tmpY
\newsavebox{\tmpBox}
\newsavebox{\tmpBoxA}
%
\newcount\axo@tmp
\newcount\axo@tmpA
\newcount\axo@tmpB

\newcount\bpinsp
\bpinsp = 65782
\newcount\ptinsp
\ptinsp = 65536

\def\AssignDecDiv#1#2#3{%
    % Assign the variable of name #1 to the result of dividing integer
    % #2 by integer #3, with result as a textual decimal.  Absolute
    % accuracy: 0.001. 
    % Typical use: conversion of lengths to points and big points.
    %      \AssignDecDiv{cachedscale}{\unitlength}{65536}
    %      \AssignDecDiv{cachedscale}{\unitlength}{\ptinsp}
    % to get length in points.
    % Notes on conversion
    % 1 sp = 2^{-16} pt = (1/65536) pt
    % 1 pt = (1/72.27) in
    % 1 bp = (1/72) in
    % 1 sp = (1/65781.76) bp
    % Use \relax at end of lines setting count registers.
    % This ensures that the code works both when the arguments are
    % given as numbers, e.g., \AxoDecDiv{100}{3}, as well as when they are
    % given as lengths, etc, e.g., \AxoDecDiv{\unitlength}{256}
    % 
    \axo@tmp = #2\relax
    \axo@tmpA = \axo@tmp
    \divide \axo@tmpA by #3\relax
    \axo@tmpB=\axo@tmpA
    \multiply \axo@tmpA by #3\relax
    \advance \axo@tmp by -\axo@tmpA
    \multiply \axo@tmp by 1000
    \divide \axo@tmp by #3\relax
    \expandafter\edef\csname #1\endcsname{\the\axo@tmpB.\the\axo@tmp}%
}

\def\SetTmpBox#1{%
    % Sets the box \tmpBox to the contents of #1 set with current PS
    % font and size. Sets \tmpX and \tmpY to the dimensions of the box
    % plus some space around it, suitable for drawing an enclosing box.
    %
    % The vertical box setting numbers agree with those in axodraw's
    % postscript code, but not (28 July 2014) with the axohelp pdf code.
    % The reverse is true for the horizontal box settings.
    % We can tweak them further.
    % This is a standardized routine for use in all versions of postscript
    % textbox routines.
    % N.B. Use LaTeX's \sbox at first step, not TeX primitives to set
    % box contents; it works properly with color.
    \sbox{\tmpBox}{\UseCurrentPSFont #1}%
    \tmpX = \axofontsize pt
    \advance \tmpX by \wd\tmpBox
    \tmpY = \axofontsize pt
    \tmpY = 0.33333 \tmpY
    \advance \tmpY by \ht\tmpBox
    \advance \tmpY by \dp\tmpBox
    \AssignDecDiv{tmpXT}{\tmpX}{\ptinsp}%
    \AssignDecDiv{tmpYT}{\tmpY}{\ptinsp}%
}

\def\SetTmpBoxTwo#1#2{%
    % Equivalent of \SetTmpBox for two line commands.
    %
    % N.B. Use LaTeX's \sbox at first step, not TeX primitives to set
    % box contents; it works properly with color.
    \sbox{\tmpBox}{\UseCurrentPSFont  #1}%
    \sbox{\tmpBoxA}{\UseCurrentPSFont #2}%
    \ifdim \wd\tmpBox > \wd\tmpBoxA 
        \tmpX = \wd\tmpBox
    \else
        \tmpX = \wd\tmpBoxA
    \fi 
    \advance \tmpX by \axofontsize pt
    \tmpY = \axofontsize pt
    \setbox\tmpBox=%
        \vbox{% 
           \lineskip = 0.1 \tmpY
           \baselineskip = 1.1 \tmpY
           \vskip 0.3 \tmpY
           \hbox{\makebox[0pt]{\box\tmpBox}}%
           \hbox{\makebox[0pt]{\box\tmpBoxA}}%
           \vskip 0.3 \tmpY
        }%
    \tmpY = \ht\tmpBox
    \advance \tmpY by \dp\tmpBox
    \AssignDecDiv{tmpXT}{\tmpX}{\ptinsp}%
    \AssignDecDiv{tmpYT}{\tmpY}{\ptinsp}%
}
%
%    #] Putting
%	 #[ Point setting and using :
%
\def\SetPoint#1(#2,#3){%
    % Define a named point in 2D
    \@namedef{AXO@p.X@#1}{#2}%
    \@namedef{AXO@p.Y@#1}{#3}%
}
\def\useX#1{%
    % Use a named point
    \@nameuse{AXO@p.X@#1}%
}
\def\useY#1{%
    % Use a named point
    \@nameuse{AXO@p.Y@#1}%
}
%
%	 #] Point setting and using : 
%	 #[ Particle routines :
%		#[ Gluon :
%
\def\Gluon{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \AXO@Parse{\AXO@Gluon}{}%
}
%
%		#] Gluon : 
%		#[ DoubleGluon :
%
\defWithOption{DoubleGluon}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \Gluon[double,sep=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DoubleGluon : 
%		#[ DashGluon :
%
\defWithOption{DashGluon}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \Gluon[dash,dashsize=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashGluon : 
%		#[ DashDoubleGluon :
%
\defWithOption{DashDoubleGluon}{(#2,#3)(#4,#5)#6#7#8#9}{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \Gluon[double,sep=#8,dash,dashsize=#9,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashDoubleGluon : 
%		#[ GluonCirc :
%
%   Draws a gluon on a circle. The center of the circle is at (#1,#2)
%   The radius and the phase angle are (#3,#4), #5 is the
%   amplitude of the gluon, and #6 is the number of windings.
%
\def\GluonCirc{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \AXO@Parse{\AXO@GluonCirc}{}%
}
%
%		#] GluonCirc : 
%		#[ DoubleGluonCirc :
%
\defWithOption{DoubleGluonCirc}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \GluonCirc[double,sep=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DoubleGluonCirc : 
%		#[ DashGluonCirc :
%
\defWithOption{DashGluonCirc}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \GluonCirc[dash,dashsize=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashGluonCirc : 
%		#[ DashDoubleGluonCirc :
%
\defWithOption{DashDoubleGluonCirc}{(#2,#3)(#4,#5)#6#7#8#9}{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \GluonCirc[double,sep=#8,dash,dashsize=#9,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashDoubleGluonCirc : 
%		#[ GluonArc :
%
\def\GluonArc{%
%   \GluonArc(x,y)(r,theta1,theta2){amplitude}{numwind}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \AXO@Parse{\AXO@GluonArc}{}%
}
%
\let\GlueArc=\GluonArc  % For backward compatibility
%
%		#] GluonArc : 
%		#[ DoubleGluonArc :
%
\defWithOption{DoubleGluonArc}{(#2)(#3)#4#5#6}{%
%
%   \DoubleGluonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{sep}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \GluonArc[double,sep=#6,#1](#2)(#3){#4}{#5}%
}
%
\let\DoubleGlueArc=\DoubleGluonArc  % For backward compatibility
%
%		#] DoubleGluonArc : 
%		#[ DashGluonArc :
%
\defWithOption{DashGluonArc}{(#2)(#3)#4#5#6}{%
%
%   \DashGluonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \GluonArc[dash,dashsize=#6,#1](#2)(#3){#4}{#5}%
}
%
\let\DashGlueArc=\DashGluonArc  % For backward compatibility
%
%		#] DashGluonArc : 
%		#[ DashDoubleGluonArc :
%
\defWithOption{DashDoubleGluonArc}{(#2)(#3)#4#5#6#7}{%
%
%   \DashGluonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \GluonArc[double,sep=#6,dash,dashsize=#7,#1](#2)(#3){#4}{#5}%
}
%
\let\DashDoubleGlueArc=\DashDoubleGluonArc  % For backward compatibility
%
%		#] DashDoubleGluonArc : 
%		#[ GluonArcn :
%
\defWithOption{GluonArcn}{(#2)(#3)#4#5}{%
%   \GluonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings. The n stands for clockwise
%
    \GluonArc[clockwise,#1](#2)(#3){#4}{#5}%
}
%
\let\GlueArcn=\GluonArcn  % For backward compatibility
%
%		#] GluonArcn : 
%		#[ DoubleGluonArcn :
%
\defWithOption{DoubleGluonArcn}{(#2)(#3)#4#5#6}{%
%
%   \DoubleGluonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{sep}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings. Clockwise.
%
    \GluonArc[clockwise,double,sep=#6,#1](#2)(#3){#4}{#5}%
}
%
\let\DoubleGlueArcn=\DoubleGluonArcn  % For backward compatibility
%
%		#] DoubleGluonArcn : 
%		#[ DashGluonArcn :
%
\defWithOption{DashGluonArcn}{(#2)(#3)#4#5#6}{%
%
%   \DashGluonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings. Clockwise.
%
    \GluonArc[clockwise,dash,dashsize=#6,#1](#2)(#3){#4}{#5}%
}
%
\let\DashGlueArcn=\DashGluonArcn  % For backward compatibility
%
%		#] DashGluonArcn : 
%		#[ DashDoubleGluonArcn :
%
\defWithOption{DashDoubleGluonArcn}{(#2)(#3)#4#5#6#7}{%
%
%   \DashGluonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a gluon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings. Clockwise.
%
    \GluonArc[clockwise,double,sep=#6,dash,dashsize=#7,#1](#2)(#3){#4}{#5}%
}
%
\let\DashDoubleGlueArcn=\DashDoubleGluonArcn  % For backward compatibility
%
%		#] DashDoubleGluonArcn : 
%		#[ Photon :
%
\def\Photon{%
%   \Photon[opt](x1,y1)(x2,y2){amplitude}{numwind}
%   Draws a photon from (x1,y1) to (x2,y2) with given amplitude and
%   number of windings 
%   Supported options: double, sep, linesep
%
    \AXO@Parse{\AXO@Photon}{}%
}
%
%		#] Photon : 
%		#[ DoublePhoton :
%
\defWithOption{DoublePhoton}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a photon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \Photon[double,sep=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DoublePhoton : 
%		#[ DashPhoton :
%
\defWithOption{DashPhoton}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a photon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \Photon[dash,dashsize=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashPhoton : 
%		#[ DashDoublePhoton :
%
\defWithOption{DashDoublePhoton}{(#2,#3)(#4,#5)#6#7#8#9}{%
%
%   Draws a photon from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \Photon[double,sep=#8,dash,dashsize=#9,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashDoublePhoton : 
%		#[ PhotonArc :
%
\def\PhotonArc{%
%   \PhotonArc(x,y)(r,theta1,theta2){amplitude}{numwind}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \AXO@Parse{\AXO@PhotonArc}{}%
}
%
%		#] PhotonArc : 
%		#[ DoublePhotonArc :
%
\defWithOption{DoublePhotonArc}{(#2,#3)(#4,#5,#6)#7#8#9}{%
%
%   \PhotonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{sep}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \PhotonArc[double,sep=#9,#1](#2,#3)(#4,#5,#6){#7}{#8}%
}
%
%		#] DoublePhotonArc : 
%		#[ DashPhotonArc :
%
\defWithOption{DashPhotonArc}{(#2,#3)(#4,#5,#6)#7#8#9}{%
%
%   \DashPhotonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \PhotonArc[dash,dashsize=#9,#1](#2,#3)(#4,#5,#6){#7}{#8}%
}
%
%
%		#] DashPhotonArc : 
%		#[ DashDoublePhotonArc :
%
\defWithOption{DashDoublePhotonArc}{(#2)(#3)#4#5#6#7}{%
% Note that there are actually ten arguments with the optional #1,
% which LaTeX/TeX can't handle.  I consolidate the comma separated
% arguments into one, and then pass them to \PhotonArc
%
%   \DashPhotonArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \PhotonArc[double,sep=#6,dash,dashsize=#7,#1](#2)(#3){#4}{#5}%
}
%
%
%		#] DashDoublePhotonArc : 
%		#[ PhotonArcn :
%
\defWithOption{PhotonArcn}{(#2,#3)(#4,#5,#6)#7#8}{%
%   \PhotonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \PhotonArc[clockwise,#1](#2,#3)(#4,#5,#6){#7}{#8}%
}
%
%		#] PhotonArcn : 
%		#[ DoublePhotonArcn :
%
\defWithOption{DoublePhotonArcn}{(#2)(#3)#4#5#6}{%
% I consolidate the comma separated arguments into one, and then pass
% them to \PhotonArc 
%
%   \PhotonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{sep}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \PhotonArc[clockwise,double,sep=#6,#1](#2)(#3){#4}{#5}%
}
%
%		#] DoublePhotonArcn : 
%		#[ DashPhotonArcn :
%
\defWithOption{DashPhotonArcn}{(#2)(#3)#4#5#6}{%
% I consolidate the comma separated arguments into one, and then pass
% them to \PhotonArc 
%
%   \DashPhotonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings.Clockwise.
%
    \PhotonArc[clockwise,dash,dashsize=#6,#1](#2)(#3){#4}{#5}%
}
%
%
%		#] DashPhotonArcn : 
%		#[ DashDoublePhotonArcn :
%
\defWithOption{DashDoublePhotonArcn}{(#2)(#3)#4#5#6#7}{%
% I consolidate the comma separated arguments into one, and then pass
% them to \PhotonArc 
%
%   \DashPhotonArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a photon on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings. Clockwise.
%
    \PhotonArc[clockwise,double,sep=#6,dash,dashsize=#7,#1](#2)(#3){#4}{#5}%
}
%
%
%		#] DashDoublePhotonArcn : 
%		#[ ZigZag :
%
\def\ZigZag{%
%   \ZigZag[opt](x1,y1)(x2,y2){amplitude}{numwind}
%   Draws a zigzag from (x1,y1) to (x2,y2) with given amplitude and
%   number of windings 
%   Supported options: double, sep, linesep
%
    \AXO@Parse{\AXO@ZigZag}{}%
}
%
%		#] ZigZag : 
%		#[ DoubleZigZag :
%
\defWithOption{DoubleZigZag}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a zigzag from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \ZigZag[double,sep=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DoubleZigZag : 
%		#[ DashZigZag :
%
\defWithOption{DashZigZag}{(#2,#3)(#4,#5)#6#7#8}{%
%
%   Draws a zigzag from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \ZigZag[dash,dashsize=#8,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashZigZag : 
%		#[ DashDoubleZigZag :
%
\defWithOption{DashDoubleZigZag}{(#2,#3)(#4,#5)#6#7#8#9}{%
%
%   Draws a zigzag from (x1,y1) to (x2,y2) with amplitude and number of windings
%
    \ZigZag[double,sep=#8,dash,dashsize=#9,#1](#2,#3)(#4,#5){#6}{#7}%
}
%
%		#] DashDoubleZigZag : 
%		#[ ZigZagArc :
%
\def\ZigZagArc{%
%   \ZigZagArc(x,y)(r,theta1,theta2){amplitude}{numwind}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \AXO@Parse{\AXO@ZigZagArc}{}%
}
%
%		#] ZigZagArc : 
%		#[ DoubleZigZagArc :
%
\defWithOption{DoubleZigZagArc}{(#2,#3)(#4,#5,#6)#7#8#9}{%
%
%   \ZigZagArc(x,y)(r,theta1,theta2){amplitude}{numwind}{sep}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \ZigZagArc[double,sep=#9,#1](#2,#3)(#4,#5,#6){#7}{#8}%
}
%
%		#] DoubleZigZagArc : 
%		#[ DashZigZagArc :
%
\defWithOption{DashZigZagArc}{(#2)(#3)#4#5#6}{%
%
%   \DashZigZagArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \ZigZagArc[dash,dashsize=#6,#1](#2)(#3){#4}{#5}%
}
%
%
%		#] DashZigZagArc : 
%		#[ DashDoubleZigZagArc :
%
\defWithOption{DashDoubleZigZagArc}{(#2)(#3)#4#5#6#7}{%
%
%   \DashZigZagArc(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \ZigZagArc[double,sep=#6,dash,dashsize=#7,#1](#2)(#3){#4}{#5}%
}
%
%
%		#] DashDoubleZigZagArc : 
%		#[ ZigZagArcn :
%
\defWithOption{ZigZagArcn}{(#2)(#3)#4#5}{%
%   \ZigZagArcn(x,y)(r,theta1,theta2){amplitude}{numwind}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \ZigZagArc[clockwise,#1](#2)(#3){#4}{#5}%
}
%
%		#] ZigZagArcn : 
%		#[ DoubleZigZagArcn :
%
\defWithOption{DoubleZigZagArcn}{(#2)(#3)#4#5#6}{%
%
%   \ZigZagArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{sep}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings 
%
    \ZigZagArc[clockwise,double,sep=#6,#1](#2)(#3){#4}{#5}%
}
%
%		#] DoubleZigZagArcn : 
%		#[ DashZigZagArcn :
%
\defWithOption{DashZigZagArcn}{(#2)(#3)#4#5#6}{%
%
%   \DashZigZagArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings.Clockwise.
%
    \ZigZagArc[clockwise,dash,dashsize=#6,#1](#2)(#3){#4}{#5}%
}
%
%
%		#] DashZigZagArcn : 
%		#[ DashDoubleZigZagArcn :
%
\defWithOption{DashDoubleZigZagArcn}{(#2)(#3)#4#5#6#7}{%
%
%   \DashZigZagArcn(x,y)(r,theta1,theta2){amplitude}{numwind}{dashsize}
%   draws a zigzag on an arc centered at (x,y) of radius r, starting
%   at theta1, and ending at theta2, with given amplitude and
%   number of windings. Clockwise.
%
    \ZigZagArc[clockwise,double,sep=#6,dash,dashsize=#7,#1](#2)(#3){#4}{#5}%
}
%
%		#] DashDoubleZigZagArcn : 
%	 #] Particle routines : 
%	 #[ Line routines :
%		#[ Line :
%
\def\Line{%
% \Line[opt](x1,y1)(x2,y2)
% draws a line from (x1,y1) to (x2,y2).  NO arrow by default.
% Supported options: all arrow settings, all double line settings,
% all dash line settings.
%
    \AXO@Parse{\AXO@Line}{}%
}
%
%		#] Line : 
%		#[ DoubleLine :
%
\defWithOption{DoubleLine}{(#2,#3)(#4,#5)#6}{%
%
%   \DoubleLine[opt](x1,y1)(x2,y2){sep}
%   Draws a double line, with NO arrow by default, from (x1,y1) to (x2,y2),
%      with separation sep
%
    \Line[arrow=false,double,sep=#6,#1](#2,#3)(#4,#5)%
}
%
%		#] DoubleLine : 
%		#[ DashLine :
%
\defWithOption{DashLine}{(#2,#3)(#4,#5)#6}{%
%   \DashLine[opt](x1,y1)(x2,y2){sep}
%   Draws a line from (x1,y1) to (x2,y2) with a dash pattern of which the
%   alternating black and white pieces are approximately sep points long
%
    \Line[dash,dashsize=#6,#1](#2,#3)(#4,#5)%
}
%
%		#] DashLine : 
%		#[ DashDoubleLine :
%
\defWithOption{DashDoubleLine}{(#2,#3)(#4,#5)#6#7}{%
%   \DashDoubleLine[opt](x1,y1)(x2,y2){sep}{dashsize}
%   Draws a double line from (x1,y1) to (x2,y2) with separation sep,
%   and with a dash pattern of which the
%   alternating black and white pieces are approximately sep points long
%   Arrow off.
    \Line[arrow=off,dash,dashsize=#7,double,sep=#6,#1](#2,#3)(#4,#5)%
}
%
%		#] DashDoubleLine : 
%		#[ ArrowLine :
%
\defWithOption{ArrowLine}{(#2,#3)(#4,#5)}{%
% \ArrowLine[opt](x1,y1)(x2,y2)
% draws a line from (x1,y1) to (x2,y2).  Arrow by default.
%
    \Line[arrow,#1](#2,#3)(#4,#5)%
}
%
%		#] ArrowLine : 
%		#[ ArrowDoubleLine :
%
\defWithOption{ArrowDoubleLine}{(#2,#3)(#4,#5)#6}{%
%
%   \ArrowDoubleLine[opt](x1,y1)(x2,y2){sep}
%   Draws a double line, with arrow by default, from (x1,y1) to (x2,y2),
%      with separation sep
%
    \Line[arrow,double,sep=#6,#1](#2,#3)(#4,#5)%
}
%
%		#] ArrowDoubleLine : 
%		#[ DashArrowLine :
%
\defWithOption{DashArrowLine}{(#2,#3)(#4,#5)#6}{%
%   \DashArrowLine[opt](x1,y1)(x2,y2){sep}
%   Draws a line from (x1,y1) to (x2,y2) with a dash pattern of which the
%   alternating black and white pieces are approximately sep points
%   long.   Arrow by default.
%
    \Line[arrow,dash,dashsize=#6,#1](#2,#3)(#4,#5)%
}
%
\let\ArrowDashLine=\DashArrowLine%
%
%		#] DashArrowLine : 
%		#[ DashArrowDoubleLine :
%
\defWithOption{DashArrowDoubleLine}{(#2,#3)(#4,#5)#6#7}{%
%   \DashArrowDoubleLine[opt](x1,y1)(x2,y2){sep}{dashsize}
%   Draws a double line from (x1,y1) to (x2,y2) with separation sep,
%   and with a dash pattern of which the
%   alternating black and white pieces are approximately sep points long
%   Arrow on.
%
    \Line[arrow,dash,dashsize=#7,double,sep=#6,#1](#2,#3)(#4,#5)%
}
%
\let\ArrowDashDoubleLine=\DashArrowDoubleLine%
%
%		#] DashArrowDoubleLine : 
%		#[ LongArrow :
%
\defWithOption{LongArrow}{(#2,#3)(#4,#5)}{%
    \Line[arrow,arrowpos=1,#1](#2,#3)(#4,#5)%
}
%
%		#] LongArrow : 
%		#[ DashLongArrowLine :
%
\defWithOption{DashLongArrowLine}{(#2,#3)(#4,#5)#6}{%
%   \DashLongArrowLine[opt](x1,y1)(x2,y2){sep}
%   Draws a line from (x1,y1) to (x2,y2) with a dash pattern of which the
%   alternating black and white pieces are approximately sep points
%   long.   Arrow by default.
%
%
    \Line[arrow,arrowpos=1,dash,dashsize=#6,#1](#2,#3)(#4,#5)%
}
\let\DashLongArrow=\DashLongArrowLine
\let\LongArrowDash=\DashLongArrowLine
\let\LongArrowDashLine=\DashLongArrowLine
%
%		#] DashLongArrowLine : 
%	 #] Line routines : 
%	 #[ Arc routines :
%		#[ Arc :
%
\def\Arc{%
% \Arc[opt](x,y)(r,theta1,theta2)
% draws an arc centered at (x,y) of radius r, starting at theta1,
% and ending at theta2.  By default: no arrow, undashed, single,
% anticlockwise. 
% Supported options: all arrow settings, all double line settings,
% all dash line settings, clock
%
    \AXO@Parse{\AXO@Arc}{}%
}
%
%		#] Arc : 
%		#[ CArc :
%
\let\CArc=\Arc
%
%		#] CArc : 
%		#[ DoubleArc :
%
\defWithOption{DoubleArc}{(#2,#3)(#4,#5,#6)#7}{%
%
%   Draws a double lined arc segment. The center of the curve
%   is at (1,2).
%   The radius, start angle and target angle are (#3,#4,#5).
%   The arc segment runs anticlockwise
%   #6 is the separation of the lines.
%
    \Arc[double,sep=#7,#1](#2,#3)(#4,#5,#6)%
}
\let\DoubleCArc=\DoubleArc
%
%		#] DoubleArc : 
%		#[ DashArc :
%
\defWithOption{DashArc}{(#2,#3)(#4,#5,#6)#7}{%
%
%   Draws a dashed arc segment. The center of the curve
%   is at (1,2).
%   The radius, start angle and target angle are (#3,#4,#5).
%   The arc segment runs anticlockwise
%   #6 is the dashsize. this is rounded to make things come
%   out right.
%
    \Arc[dash,dsize=#7,#1](#2,#3)(#4,#5,#6)%
}
\let\DashCArc=\DashArc
%
%		#] DashArc : 
%		#[ DashDoubleArc :
%
\defWithOption{DashDoubleArc}{(#2,#3)(#4,#5,#6)#7#8}{
%
%   Draws a dashed arc segment. The center of the curve
%   is at (1,2).
%   The radius, start angle and target angle are (#3,#4,#5).
%   The arc segment runs anticlockwise
%   #6 is the line separation.
%   #7 is the dashsize. this is rounded to make things come
%   out right.
%
    \Arc[double,sep=#7,dash,dsize=#8,#1](#2,#3)(#4,#5,#6)%
}
\let\DashDoubleCArc=\DashDoubleArc
%
%		#] DashDoubleArc : 
%		#[ ArrowArc :
%
\def\ArrowArc{%
    \AXO@PrependOption{\Arc}{arrow}%
}
\let\ArrowCArc=\ArrowArc
%
%		#] ArrowArc : 
%		#[ ArrowDoubleArc :
%
\defWithOption{ArrowDoubleArc}{(#2,#3)(#4,#5,#6)#7}{%
    \Arc[arrow,double,sep=#7,#1](#2,#3)(#4,#5,#6)%
}
\let\ArrowDoubleCArc=\ArrowDoubleArc
%
%		#] ArrowDoubleArc : 
%		#[ ArrowDashArc :
%
\defWithOption{ArrowDashArc}{(#2,#3)(#4,#5,#6)#7}{%
    \Arc[arrow,dash,dsize=#7,#1](#2,#3)(#4,#5,#6)%
}
\let\ArrowDashCArc=\ArrowDashArc
\let\DashArrowCArc=\ArrowDashArc
\let\DashArrowArc=\ArrowDashArc
%
%		#] ArrowDashArc : 
%		#[ ArrowDashDoubleArc :
%
\defWithOption{ArrowDashDoubleArc}{(#2,#3)(#4,#5,#6)#7#8}{%
    \Arc[arrow,double,sep=#7,dash,dsize=#8,#1](#2,#3)(#4,#5,#6)%
}
\let\ArrowDashDoubleCArc=\ArrowDashDoubleArc
\let\DashArrowDoubleCArc=\ArrowDashDoubleArc
\let\DashArrowDoubleArc=\ArrowDashDoubleArc
%
%
%		#] ArrowDashDoubleArc : 
%		#[ LongArrowArc :
%
\def\LongArrowArc{%
    \AXO@PrependOption{\Arc}{arrow,arrowpos=1}%
}
%
%		#] LongArrowArc : 
%		#[ LongDashArrowArc :
%
\defWithOption{LongArrowDashArc}{(#2,#3)(#4,#5,#6)#7}{%
    \Arc[arrow,arrowpos=1,dash,dsize=#7,#1](#2,#3)(#4,#5,#6)%
}
\let\LongArrowDashCArc=\LongArrowDashArc
\let\LongDashArrowCArc=\LongArrowDashArc
\let\LongDashArrowArc=\LongArrowDashArc
%
%
%		#] LongDashArrowArc : 
%		#[ ArrowArcn :
%
\def\ArrowArcn{%
    \AXO@PrependOption{\Arc}{arrow,clock}%
}
%
%		#] ArrowArcn : 
%		#[ LongArrowArcn :
%
\def\LongArrowArcn{%
    % \ArrowArcn, but with arrow at end by default
    \AXO@PrependOption{\Arc}{arrow, clock, arrowpos=1}%
}
%
%		#] LongArrowArcn : 
%		#[ DashArrowArcn :
%
\defWithOption{DashArrowArcn}{(#2,#3)(#4,#5,#6)#7}{%
%   (x,y)(radius,start,end){dashsize}
%   Draws a dashed arc segment with an arrow in it. The center of the curve
%   is at (x,y), with given radius, start angle, and end angle
%   The arc segment runs anticlockwise
    \Arc[clock,arrow,dash,dashsize=#7,#1](#2,#3)(#4,#5,#6)%
}
%
\let\ArrowDashArcn=\DashArrowArcn%
%
%
%		#] DashArrowArcn : 
%	 #] Arc routines : 
%	 #[ Bezier :
%
\def\Bezier{%
%   \Bezier[opt](x1,y1)(x2,y2)(x3,y3)(x4,y4)
%   Draws a Bezier cubic with the control points (x1,y1), (x2,y2), (x3,y3), (x4,y4)
%   Supported options: dash, dashsize and dashsize
    \AXO@Parse{\AXO@Bezier}{}%
}
%
\defWithOption{DoubleBezier}{(#2,#3)(#4,#5)(#6,#7)(#8)#9}{%
%
%   Draws a Bezier cubic with control points (x1,y1), (x2,y2),
%   (x3,y3), (x4,y4) in a double line
%
    \Bezier[double,sep=#9,#1](#2,#3)(#4,#5)(#6,#7)(#8)%
}
%
\defWithOption{DashBezier}{(#2,#3)(#4,#5)(#6,#7)(#8)#9}{%
%
%   Draws a Bezier cubic with control points (x1,y1), (x2,y2),
%   (x3,y3), (x4,y4) with a dash pattern of which the 
%   alternating black and white pieces are approximately #9 points long
%
    \Bezier[dash,dashsize=#9,#1](#2,#3)(#4,#5)(#6,#7)(#8)%
}
%
\defWithOption{DashDoubleBezier}{(#2,#3)(#4,#5)(#6)(#7)#8#9}{%
%
%   Draws a Bezier cubic with control points (x1,y1), (x2,y2),
%   (x3,y3), (x4,y4) with a dash pattern of which the 
%   alternating black and white pieces are approximately #9 points long
%   The line is a double line
%
    \Bezier[double,sep=#8,dash,dashsize=#9,#1](#2,#3)(#4,#5)(#6)(#7)%
}
%
%	 #] Bezier : 
% 	#] LaTeX primitives : 
% 	#[ Mixed routines :
%
%   Here we have routines that make different calls depending on the value
%   of the variable \axo@pdfoutput
%
%	 #[ EBox :
%
\def\EBox(#1,#2)(#3,#4){%
%
%   Draws a transparent box with the left bottom at (x1,y1) andthe
%   right top at (x2,y2).
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add \axowidth\space \axoscale\space ebox }}
\else
    \getaxohelp{EBox}{#1 #2 #3 #4 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] EBox : 
%	 #[ FBox :
%
\def\FBox(#1,#2)(#3,#4){%
%
%   Draws a filled box with the left bottom at (x1,y1) and the right top
%   at (x2,y2).
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add \axowidth\space \axoscale\space fbox }}
\else
    \getaxohelp{FBox}{#1 #2 #3 #4 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] FBox : 
%	 #[ BBox : 
%
\def\BBox(#1,#2)(#3,#4){%
%
%   Draws a box with the left bottom at (x1,y1) and the right top
%   at (x2,y2). The contents are blanked out.
%
    {%
      \SetColor{White}%
      \FBox(#1,#2)(#3,#4)%
    }%
    \EBox(#1,#2)(#3,#4)%
}
%
%	 #] BBox : 
%	 #[ GBox :
%
\def\GBox(#1,#2)(#3,#4)#5{%
%
%   Draws a box with the left bottom at (x1,y1) and the right top
%   at (x2,y2). The contents are in Grayscale#5 (0=black,1=white).
%
    {%
      \color[gray]{#5}%
      \FBox(#1,#2)(#3,#4)%
      \color[gray]{0}%
      \EBox(#1,#2)(#3,#4)%
    }%
\ignorespaces
}
%
%	 #] GBox : 
%	 #[ CBox :
%
\def\CBox(#1,#2)(#3,#4)#5#6{%
%
%   Draws a box with the left bottom at (x1,y1) and the right top
%   at (x2,y2). The outside is color#5 and the inside color #6.
%
    {%
      \SetColor{#6}%
      \FBox(#1,#2)(#3,#4)%
      \SetColor{#5}%
      \EBox(#1,#2)(#3,#4)%
    }%
\ignorespaces
}
%
%	 #] CBox : 
%	 #[ EBoxc :
%
\def\EBoxc(#1,#2)(#3,#4){%
%
%   Draws a centered box with the center at (x1,y1).
%   The other parameters are the width and the height.
%   Uses current color  
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #3 2 div sub #2 \axoyo\space add
    #4 2 div sub #1 \axoxo\space add #3 2 div add #2
    \axoyo\space add #4 2 div add \axowidth\space \axoscale\space ebox }}
\else
    \getaxohelp{Boxc}{#1 #2 #3 #4 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
\let\Boxc=\EBoxc
%
%	 #] EBoxc : 
%	 #[ FBoxc :
%
\def\FBoxc(#1,#2)(#3,#4){%
%
%   Draws a filled centered box with the center at (x1,y1).
%   The other parameters are the width and the height.
%   Current color  
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #3 2 div sub #2 \axoyo\space add
    #4 2 div sub #1 \axoxo\space add #3 2 div add #2 \axoyo\space add #4 2 div add
    \axowidth\space \axoscale\space fbox }}
\else
    \getaxohelp{FBoxc}{#1 #2 #3 #4 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] FBoxc : 
%	 #[ BBoxc :
%
\def\BBoxc(#1,#2)(#3,#4){%
%
%   Draws a centered box with the center at (x1,y1).
%   The other parameters are the width and the height.
%   The contents are blanked out.
%
\bgroup
    \SetColor{White}%
    \FBoxc(#1,#2)(#3,#4)%
\egroup
\EBoxc(#1,#2)(#3,#4)%
}
%
%	 #] BBoxc : 
%	 #[ GBoxc :
%
\def\GBoxc(#1,#2)(#3,#4)#5{%
%
%   Draws a centered box with the center at (x1,y1).
%   The other parameters are the width and the height.
%   The contents are in Grayscale#5 (0=black,1=white).
%
  {%
    \color[gray]{#5}%
    \FBoxc(#1,#2)(#3,#4)%
    \color[gray]{0}%
    \EBoxc(#1,#2)(#3,#4)%
  }%
\ignorespaces
}
%
%	 #] GBoxc : 
%	 #[ CBoxc :
%
\def\CBoxc(#1,#2)(#3,#4)#5#6{%
%
%   Draws a centered box with the center at (x1,y1).
%   The other parameters are the width and the height.
%   The outside is color#5 and the inside color #6.
%
  {%
    \SetColor{#6}%
    \FBoxc(#1,#2)(#3,#4)%
    \SetColor{#5}%
    \EBoxc(#1,#2)(#3,#4)%
  }%
\ignorespaces
}
%
%	 #] CBoxc : 
%	 #[ RotatedBox :
%
\def\RotatedBox(#1,#2)(#3,#4)#5#6{%
%
%   Draws a centered box with the center at (#1,#2)
%   with width #3, height #4, anticlockwise rotated by #5, and in
%   color #6.
%
    \AxoPut(#1,#2){%
        {\SetColor{#6}%
         \rotatebox{#5}{\EBoxc(0,0)(#3,#4)}%
    }}%
}
%
%	 #] RotatedBox : 
%	 #[ FilledRotatedBox :
%
\def\FilledRotatedBox(#1,#2)(#3,#4)#5#6{%
%
%   Draws a filled centered box with the center at (#1,#2)
%   with width #3, height #4, anticlockwise rotated by #5, and in
%   color #6.
%
    \AxoPut(#1,#2){%
        {\SetColor{#6}%
         \rotatebox{#5}{\FBoxc(0,0)(#3,#4)}%
    }}%
}
%
%	 #] FilledRotatedBox : 
%	 #[ ETri :
%
%   Draws a triangle. No filling.
%   The corners are (x1,y1), (x2,y2), (x3,y3)
%
\def\ETri(#1,#2)(#3,#4)(#5,#6){%
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add
    #5 \axoxo\space add #6 \axoyo\space add
    \axowidth\space \axoscale\space triangle }}
\else
    \getaxohelp{ETri}{#1 #2 #3 #4 #5 #6 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] ETri : 
%	 #[ FTri :
%
%   Draws a filled triangle.
%   The corners are (x1,y1), (x2,y2), (x3,y3)
%
\def\FTri(#1,#2)(#3,#4)(#5,#6){%
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add
    #5 \axoxo\space add #6 \axoyo\space add
    \axowidth\space \axoscale\space ftriangle }}
\else
    \getaxohelp{FTri}{#1 #2 #3 #4 #5 #6 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] FTri : 
%	 #[ BTri :
%
%   Draws a triangle. The contents are blanked out.
%   The corners are (x1,y1), (x2,y2), (x3,y3)
%
\def\BTri(#1,#2)(#3,#4)(#5,#6){%
    {%
        \SetColor{White}%
        \FTri(#1,#2)(#3,#4)(#5,#6)%
    }%
    \ETri(#1,#2)(#3,#4)(#5,#6)%
}
%
%	 #] BTri : 
%	 #[ GTri :
%
%   Draws a triangle. The contents are given in Grayscale #7 (0=black,1=white)
%   The corners are (x1,y1), (x2,y2), (x3,y3)
%
\def\GTri(#1,#2)(#3,#4)(#5,#6)#7{%
%
    {%
        \color[gray]{#7}%
        \FTri(#1,#2)(#3,#4)(#5,#6)%
        \color[gray]{0}%
        \ETri(#1,#2)(#3,#4)(#5,#6)%
    }%
\ignorespaces
}
%
%	 #] GTri : 
%	 #[ CTri :
%
%   Draws a colored(#7) triangle. The contents are blanked out in color #8
%   The corners are (x1,y1), (x2,y2), (x3,y3)
%
\def\CTri(#1,#2)(#3,#4)(#5,#6)#7#8{%
    {%
        \SetColor{#7}%
        \FTri(#1,#2)(#3,#4)(#5,#6)%
        \SetColor{#8}%
        \ETri(#1,#2)(#3,#4)(#5,#6)%
    }%
\ignorespaces
}
%
%	 #] CTri : 
%	 #[ Vertex :
%
\def\Vertex(#1,#2)#3{%
%
%   Draws a fat dot at (1,2). The radius of the dot is given by 3.
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add #3
    \axoscale\space vertex }}
\else
    \getaxohelp{Vertex}{#1 #2 #3 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] Vertex : 
%	 #[ ECirc :
%
\def\ECirc(#1,#2)#3{%
%
%   Draws a circle at (1,2) and radius 3, with current color.
%   Nothing is written inside.
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add #3
    \axowidth\space \axoscale\space ecirc }}%
\else
    \getaxohelp{ECirc}{#1 #2 #3 \axowidth}%
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
\fi
}
%
%	 #] ECirc : 
%	 #[ FCirc :
%
\let\FCirc=\Vertex
%
%	 #] FCirc : 
%	 #[ BCirc :
%
\def\BCirc(#1,#2)#3{%
%
%   Draws a circle at (1,2) and radius 3 that is blanked out.
    {%
        \SetColor{White}%
        \FCirc(#1,#2){#3}
    }%
    \ECirc(#1,#2){#3}%
}
%
%	 #] BCirc : 
%	 #[ GCirc :
%
\def\GCirc(#1,#2)#3#4{%
%
%   Draws a circle at (1,2) and radius 3 that is blanked out.
%   Then it fills the circle with a gray scale 4 (0 = black, 1 is white)
%
    {%
        \color[gray]{#4}%
        \FCirc(#1,#2){#3}%
        \color[gray]{0}%
        \ECirc(#1,#2){#3}%
    }%
\ignorespaces
}
%
%	 #] GCirc : 
%	 #[ CCirc :
%
%   Draws a circle at (1,2) and radius 3 that is blanked out.
%   #4 is the color of the circle, #5 the color of the contents
%
\def\CCirc(#1,#2)#3#4#5{%
%
%   Draws a circle at (1,2) and radius 3 that is blanked out.
%   #4 is the color of the circle, #5 the color of the contents
%
{%
    \SetColor{#5}%
    \FCirc(#1,#2){#3}%
    \SetColor{#4}%
    \ECirc(#1,#2){#3}%
}%
\ignorespaces
}
%
%	 #] CCirc : 
%	 #[ GOval :
%
\def\GOval(#1,#2)(#3,#4)(#5)#6{%
%
%   Draws a gray oval that overwrites whatever was there.
%   \GOval(x_center,y_center)(height,width)(rotation)(grayscale)
%   The grayscale: (0 = black, 1 is white)
%
    {%
        \color[gray]{#6}%
        \FOval(#1,#2)(#3,#4)(#5)%
        \color[gray]{0}%
        \Oval(#1,#2)(#3,#4)(#5)%
    }%
    \ignorespaces
}
%
%	 #] GOval : 
%	 #[ COval :
%
\def\COval(#1,#2)(#3,#4)(#5)#6#7{%
%
%   Draws a colored oval that overwrites whatever was there.
%   \COval(x_center,y_center)(height,width)(rotation){color1}{color2}
%
    {%
        \SetColor{#7}%
        \FOval(#1,#2)(#3,#4)(#5)%
        \SetColor{#6}%
        \Oval(#1,#2)(#3,#4)(#5)%
    }%
    \ignorespaces
}
%
%	 #] COval : 
%	 #[ FOval :
%
\def\FOval(#1,#2)(#3,#4)(#5){%
%
%   Draws a colored oval that overwrites whatever was there.
%   \FOval(x_center,y_center)(height,width)(rotation)
%   Uses current color  
%
    \ifcase\axo@pdfoutput
        \put(\axoxoff,\axoyoff)%
            {\AXOspecial{#1 \axoxo\space add #2 \axoyo\space add #3 #4 #5
            \axowidth\space \axoscale\space foval 
            }}%
    \else
        \getaxohelp{FOval}{#1 #2 #3 #4 #5 \axowidth}%
        \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
    \fi
}
%
%	 #] FOval : 
%	 #[ Oval :
%
\def\Oval(#1,#2)(#3,#4)(#5){%
%
%   Draws an oval that does not overwrite whatever was there.
%   \Oval(x_center,y_center)(height,width)(rotation)
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff)%
    {\AXOspecial{#1 \axoxo\space add #2 \axoyo\space add #3 #4 #5
     \axowidth\space \axoscale\space oval 
    }}%
\else
    \getaxohelp{Oval}{#1 #2 #3 #4 #5 \axowidth}%
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
\fi
}
%
%	 #] Oval : 
%	 #[ Polygon :
%
%       Draws a curve through the points in argument 1.
%       The points are given as coordinates (x1,y1)(x2,y2)(x3,y3).....
%       The curve is continous and continuous in its first and second
%       derivatives. The method is linear interpolation of
%               quadratic curves.
%               Color name is argument 2.
%
\def\Polygon#1#2{%
    {%
        \SetColor{#2}%
        \ifcase\axo@pdfoutput
            \put(\axoxoff,\axoyoff){\AXOspecial{%
               [ \axoparray#1] \axowidth\space \axoscale\space polygon }}%
        \else
            \getaxohelp{Polygon}{"#1" \axowidth}%
            \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
        \fi
    }%
    \ignorespaces
}
%
%	 #] Polygon : 
%	 #[ FilledPolygon :
%
%       Draws a curve through the points in argument 1.
%       The points are given as coordinates (x1,y1)(x2,y2)(x3,y3).....
%       The curve is continous and continuous in its first and second
%       derivatives. The method is linear interpolation of
%               quadratic curves. 
%               Color name is argument 2.
%
\def\FilledPolygon#1#2{%
    {%
        \SetColor{#2}%
        \ifcase\axo@pdfoutput
            \put(\axoxoff,\axoyoff){\AXOspecial{%
              [ \axoparray#1] \axowidth\space \axoscale\space filledpolygon }}
        \else
            \getaxohelp{FilledPolygon}{"#1" \axowidth}%
            \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
        \fi
    }%
    \ignorespaces
}
%
%	 #] FilledPolygon : 
%	 #[ Curve :
%
%       Draws a curve through the points in argument 1.
%       The points are given as coordinates (x1,y1)(x2,y2)(x3,y3).....
%       The curve is continous and continuous in its first and second
%       derivatives. The method is linear interpolation of quadratic curves.
%
\def\Curve#1{%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{[ \axoparray#1]
    \axowidth\space \axoscale\space makecurve }}
\else
    \getaxohelp{Curve}{"#1" \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] Curve : 
%	 #[ DashCurve :
%
%       Draws a curve through the points in argument 1.
%       The points are given as coordinates (x1,y1)(x2,y2)(x3,y3).....
%       The curve is continous and continuous in its first and second
%       derivatives. The method is linear interpolation of quadratic curves.
%       Argument 2 gives a dash size.
%
\def\DashCurve#1#2{%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{[ \axoparray#1] #2
    \axowidth\space \axoscale\space makedashcurve }}
\else
    \getaxohelp{DashCurve}{"#1" #2 \axowidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] DashCurve : 
%	 #[ LinAxis :
%
\def\LinAxis(#1,#2)(#3,#4)(#5,#6,#7,#8,#9){%
%
%   Draws a line with linear hash marks along it.
%   LinAxis(x1,y1)(x2,y2)(num_decs,per_dec,hashsize,offset,width)
%   The line is from (x1,y1) to (x2,y2) and the marks are on the left side
%   when hashsize is positive, and right when it is negative.
%   num_decs is the number of accented marks, per_dec the number of
%   divisions between them and offset is the number
%   at which one starts at (x1,y1) (like if offset=2 we start at the second
%   small mark) Width is the linewidth.
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
      #1 \axoxo\space add #2 \axoyo\space add
      #3 \axoxo\space add #4 \axoyo\space add
      #5 #6 #7 #8 #9 \axoscale\space linaxis }}
\else
    \getaxohelp{LinAxis}{#1 #2 #3 #4 #5 #6 #7 #8 #9}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] LinAxis : 
%	 #[ LogAxis :
%
\def\LogAxis(#1,#2)(#3,#4)(#5,#6,#7,#8){%
%
%   Draws a line with logarithmic hash marks along it.
%   LogAxis(x1,y1)(x2,y2)(num_logs,hashsize,offset,width)
%   The line is from (x1,y1) to (x2,y2) and the marks are on the left side
%   when hashsize is positive, and right when it is negative.
%   num_logs is the number of orders of magnitude and offset is the number
%   at which one starts at (x1,y1) (like if offset=2 we start at 2)
%   When offset is 0 we start at 1. Width is the linewidth.
%
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add
    #5 #6 #7 #8 \axoscale\space logaxis }}
\else
    \getaxohelp{LogAxis}{#1 #2 #3 #4 #5 #6 #7 #8}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
%	 #] LogAxis : 
%	 #[ AxoGrid :
%
\def\AxoGrid(#1,#2)(#3,#4)(#5,#6)#7#8{%
%
%   Makes a grid with the left bottom at #1,#2
%   The increments in x and y are #3,#4
%   The number of steps in each direction are #5,#6 (there are n+1 lines)
%   #7 is the color and #8 the linewidth
%
{\SetColor{#7}%
    \ifcase\axo@pdfoutput
        \put(\axoxoff,\axoyoff){%
            \AXOspecial{%
               #3 #4 #5 #6
               #1 \axoxo\space add #2 \axoyo\space add 
               #8 \axoscale\space axogrid
        }}%
    \else
        \getaxohelp{Grid}{#1 #2 #3 #4 #5 #6 #8}%
        \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
    \fi   
}%
\ignorespaces
}
%
%	 #] AxoGrid : 
%	 #[ AXO@Arc :
%
%       Generic Arc segment with many options.
%
%
\def\AXO@Arc(#1,#2)(#3,#4,#5){%
%
%   Draws arc centered at (#1,#2), radius #3, starting and ending
%   angles #4, #5.
%   Double, dashing, arrow, clockwise according to current settings
%
{\AXO@useopts
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){%
        \AXOspecial{%
        \AXO@ArrowArg \space
        \ifAXO@flip true \else false \fi
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock true \else false \fi
        #3 #4 #5
        #1 \axoxo\space add #2 \axoyo\space add 
        \AXO@CurrentWidth\space \axoscale\space arc2
    }}%
\else
    \getaxohelp{AxoArc}{#1 #2 #3 #4 #5
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \AXO@ArrowArg \space
        \ifAXO@flip 1 \else 0 \fi
        \ifAXO@clock 1 \else 0 \fi
        \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}\ignorespaces
}
%
%	 #] AXO@Arc : 
%	 #[ AXO@Bezier :
%
\def\AXO@Bezier(#1,#2)(#3,#4)(#5,#6)(#7,#8){%
%
%   Draws a Bezier cubic with the control points (x1,y1), (x2,y2),
%   (x3,y3), (x4,y4)
%   Assumes options have been set
%
{\AXO@useopts
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
        #1 \axoxo\space add #2 \axoyo\space add
        #3 \axoxo\space add #4 \axoyo\space add
        #5 \axoxo\space add #6 \axoyo\space add
        #7 \axoxo\space add #8 \axoyo\space add
           \AXO@ArrowArg \space 
           \ifAXO@flip true \else false \fi
    \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
    \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
    \AXO@CurrentWidth\space \axoscale\space dashdoublebezier 
    }}%
\else
    \getaxohelp{AxoBezier}{#1 #2 #3 #4 #5 #6 #7 #8
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \AXO@ArrowArg \space
        \ifAXO@flip 1 \else 0 \fi
        \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}\ignorespaces
}
%
%	 #] AXO@Bezier : 
%	 #[ AXO@GluonHelper :
%
\def\AXO@GluonHelper(#1,#2)(#3,#4)#5#6#7#8{%
%
%   Draws a single gluon from (x1,y1) to (x2,y2) with amplitude #5 and number
%   of windings #6. Width #7 + #8
%   Assumes options have been set.
%   Used as helper from \AXO@Gluon
  %
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){%
        \AXOspecial{%
                  #1 \axoxo\space add #2 \axoyo\space add
                  #3 \axoxo\space add #4 \axoyo\space add 
                  #5 #6
                  \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
                  #7 #8 add \axoscale \space dashgluon
        }%
    }%
\else
    \getaxohelp{AxoGluon}{#1 #2 #3 #4 #5 #6 
             #7
             \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
            #8}%
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%
\def\AXO@GluonHelperNEW(#1,#2)(#3,#4)#5#6#7#8{%
% IDEA: Showing cleaner code
%
%   Draws a single gluon from (x1,y1) to (x2,y2) with amplitude #5 and number
%   of windings #6. Width #7 + #8
%   Assumes options have been set.
%   Used as helper from \AXO@Gluon
%
    \ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon}\fi
    \ifcase\axo@pdfoutput
        \AXOputPS{%
                  #1 #2 #3 #4 #5 #6
                  \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
                  #7 #8 add \axoscale \space dashgluon
        }%
    \else
        \getaxohelp{AxoGluon}{#1 #2 #3 #4 #5 #6 
             #7
             \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
            #8}%
        \AXOputPDF{\contentspdfNoOffset}%
    \fi
}
%
%	 #] AXO@GluonHelper : 
%	 #[ AXO@Gluon :
%
\def\AXO@Gluon(#1,#2)(#3,#4)#5#6{%
%
%   Draws a gluon from (x1,y1) to (x2,y2) with amplitude #5 and number
%   of windings #6.
%   Assumes options have been set
%
{\AXO@useopts
    \ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon}\fi
    \AXO@arrowfalse  % To avoid repeated errors
    \ifAXO@double
        \AXO@GluonHelper(#1,#2)(#3,#4){#5}{#6}{\AXO@CurrentWidth}{\AXO@CurrentSep}%
        \SetColor{White}%
        \AXO@dashfalse
        \AXO@GluonHelper(#1,#2)(#3,#4){#5}{#6}{-\AXO@CurrentWidth}{\AXO@CurrentSep}%
    \else
        \AXO@GluonHelper(#1,#2)(#3,#4){#5}{#6}{0}{\AXO@CurrentWidth}%
    \fi
  }%
\ignorespaces
}
%	 #] AXO@Gluon : 
%	 #[ AXO@GluonArcHelper :
%
\def\AXO@GluonArcHelper(#1,#2)(#3,#4,#5)#6#7#8#9{%
%
%   Draws a gluon on an arc segment. The center of the curve is at (1,2)
%   The radius, start angle and target angle are (#3,#4,#5), #6 is the
%   amplitude of the gluon, and #7 is the number of windings.
%   Assumes options have been set
%   Width #8 + #9
%   Assumes options have been set.
%   Used as helper from \AXO@GluonArc
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon arc}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{#6 #7 
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock true \else false \fi
        #3 #4 #5
        #1 \axoxo\space add #2 \axoyo\space add 
        #8 #9 add \axoscale\space dashgluearc
    }}%
\else
    \getaxohelp{AxoGluonArc}{#1 #2 #3 #4 #5 #6 #7 
        #8
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock 1 \else 0 \fi
        #9}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%	 #] AXO@GluonArcHelper : 
%	 #[ AXO@GluonArc :
%
\def\AXO@GluonArc(#1,#2)(#3,#4,#5)#6#7{%
%
%   Draws a gluon on an arc segment. The center of the curve is at (1,2)
%   The radius, start angle and target angle are (#3,#4,#5), #6 is the
%   amplitude of the gluon, and #7 is the number of windings.
%   Assumes options have been set
%
    {\AXO@useopts
        \ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon}\fi
        \AXO@arrowfalse  % To avoid repeated errors
        \ifAXO@double
            \AXO@GluonArcHelper(#1,#2)(#3,#4,#5){#6}{#7}{\AXO@CurrentWidth}{\AXO@CurrentSep}%
            \SetColor{White}%
            \AXO@dashfalse
            \AXO@GluonArcHelper(#1,#2)(#3,#4,#5){#6}{#7}{-\AXO@CurrentWidth}{\AXO@CurrentSep}%
        \else
            \AXO@GluonArcHelper(#1,#2)(#3,#4,#5){#6}{#7}{0}{\AXO@CurrentWidth}%
        \fi
    }%
\ignorespaces
}
%	 #] AXO@GluonArc : 
%	 #[ AXO@GluonCircHelper :
%
\def\AXO@GluonCircHelper(#1,#2)(#3,#4)#5#6#7#8{%
%
%   Draws a gluon on a circle. The center of the circle is at (1,2)
%   The radius and the phase angle are (#3,#4), 5 is the
%   amplitude of the gluon, and 6 is the number of windings.
%   Width #7 + #8
%   Assumes options have been set.
%   Used as helper from \AXO@GluonCirc
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon arc}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
       #5 #6
       \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
       #3 #4
       #1 \axoxo\space add #2 \axoyo\space add 
       #7 #8 add \axoscale\space dashgluoncirc
    }}%
\else
    \getaxohelp{AxoGluonCirc}{#1 #2 #3 #4 #5 #6
       #7
       \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
       #8}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}
%	 #] AXO@GluonCicHelper : 
%	 #[ AXO@GluonCirc :
%
\def\AXO@GluonCirc(#1,#2)(#3,#4)#5#6{%
%
%   Draws a gluon on a circle. The center of the circle is at (1,2)
%   The radius and the phase angle are (#3,#4), 5 is the
%   amplitude of the gluon, and 6 is the number of windings.
%
    {\AXO@useopts
        \ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for gluon}\fi
        \AXO@arrowfalse  % To avoid repeated errors
        \ifAXO@double
            \AXO@GluonCircHelper(#1,#2)(#3,#4){#5}{#6}{\AXO@CurrentWidth}{\AXO@CurrentSep}%
            \SetColor{White}%
            \AXO@dashfalse
            \AXO@GluonCircHelper(#1,#2)(#3,#4){#5}{#6}{-\AXO@CurrentWidth}{\AXO@CurrentSep}%
        \else
            \AXO@GluonCircHelper(#1,#2)(#3,#4){#5}{#6}{0}{\AXO@CurrentWidth}%
        \fi
    }%
\ignorespaces
}
%
% 	#] AXO@GluonCirc : 
%	 #[ AXO@Line :
%
\def\AXO@Line(#1,#2)(#3,#4){%
%
%   Draws a line from (x1,y1) to (x2,y2)
%   Double, dashing, arrow according to current settings
%
{\AXO@useopts
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){%
        \AXOspecial{%
            \AXO@ArrowArg \space
            \ifAXO@flip true \else false \fi
            \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
            \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
            #1 \axoxo\space add #2 \axoyo\space add
            #3 \axoxo\space add #4 \axoyo\space add 
            \AXO@CurrentWidth \space \axoscale \space
            dasharrowdoubleline
    }}%
\else
    \getaxohelp{AxoLine}{#1 #2 #3 #4 
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \AXO@ArrowArg \space
        \ifAXO@flip 1 \else 0 \fi
        \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
\fi
}\ignorespaces
}
%
%	 #] AXO@Line : 
%	 #[ AXO@Photon :
%
\def\AXO@Photon(#1,#2)(#3,#4)#5#6{%
%
%   Draws a photon from (x1,y1) to (x2,y2) with amplitude #5 and number
%   of windings #6.
%   Assumes options have been set
%
{\AXO@useopts
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for photon}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add #5 #6 
    \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
    \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
    \AXO@CurrentWidth\space \axoscale\space dashdoublephoton }}%
\else
    \getaxohelp{AxoPhoton}{#1 #2 #3 #4 #5 #6 
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}\ignorespaces
}
%	 #] AXO@Photon : 
%	 #[ AXO@PhotonArc :
%
\def\AXO@PhotonArc(#1,#2)(#3,#4,#5)#6#7{%
%
%   Draws a photon on an arc segment. The center of the curve is at (1,2)
%   The radius, start angle and target angle are (#3,#4,#5), #6 is the
%   amplitude of the gluon, and #7 is the number of wiggles.
%   Assumes options have been set
%
{\AXO@useopts
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for photon arc}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
        #6 #7 
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock true \else false \fi
        #3 #4 #5
        #1 \axoxo\space add #2 \axoyo\space add 
        \AXO@CurrentWidth\space \axoscale\space dashdoublephotonarc
    }}%
\else
    \getaxohelp{AxoPhotonArc}{#1 #2 #3 #4 #5 #6 #7 
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock 1 \else 0 \fi
        \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}\ignorespaces
}
%
%	 #] AXO@PhotonArc : 
%	 #[ AXO@ZigZag :
%
\def\AXO@ZigZag(#1,#2)(#3,#4)#5#6{%
%
%   Draws a zigzag from (x1,y1) to (x2,y2) with amplitude #5 and number
%   of windings #6.
%   Assumes options have been set
%
{\AXO@useopts
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for zigzag}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
    #1 \axoxo\space add #2 \axoyo\space add
    #3 \axoxo\space add #4 \axoyo\space add #5 #6 
    \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
    \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
    \AXO@CurrentWidth\space \axoscale\space dashdoublezigzag }}%
\else
    \getaxohelp{AxoZigZag}{#1 #2 #3 #4 #5 #6 
         \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
         \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
         \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}%
\fi
}\ignorespaces
}
%	 #] AXO@ZigZag : 
%	 #[ AXO@ZigZagArc :
%
\def\AXO@ZigZagArc(#1,#2)(#3,#4,#5)#6#7{%
%
%   Draws a zigzag on an arc segment. The center of the curve is at (1,2)
%   The radius, start angle and target angle are (#3,#4,#5), #6 is the
%   amplitude of the gluon, and #7 is the number of wiggles.
%   Assumes options have been set
%
{\AXO@useopts
\ifAXO@arrow\AXO@NOTIMPLEMENTED{arrow not implemented for zigzag arc}\fi
\ifcase\axo@pdfoutput
    \put(\axoxoff,\axoyoff){\AXOspecial{%
        #6 #7 
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock true \else false \fi
        #3 #4 #5
        #1 \axoxo\space add #2 \axoyo\space add 
        \AXO@CurrentWidth\space \axoscale\space dashdoublezigzagarc
    }}%
\else
    \getaxohelp{AxoZigZagArc}{#1 #2 #3 #4 #5 #6 #7 
        \ifAXO@double \AXO@CurrentSep \space \else 0 \fi
        \ifAXO@dash \AXO@CurrentDashSize \space \else 0 \fi
        \ifAXO@clock 1 \else 0 \fi
        \AXO@CurrentWidth}
    \put(\axoxoff,\axoyoff){\axo@pdfliteral{\contentspdf}}
\fi
}\ignorespaces
}
%
%	 #] AXO@ZigZagArc : 
%	 #[ Text and boxes :
%		#[ SetPFont :
%
%               To access fonts, from both latex and pdflatex, we need
%               to define a mapping from the human-readable name to
%               the name known to (pdf)latex.  Then we can define a
%               user command for setting the font.  The human-readable
%               name is the one used by postscript.
%            Variables used:
%           \pfontN = human name of current PS font (e.g., Helvetica).
%           \pfontC = TeX code for the font (e.g., phvr).
%           Both are \relax to use regular document font
%           \axofontsize = size of font (text command with unit)


\def\defineaxofont#1#2{%
    % #1 is user visible name of font, #2 is LaTex name.
    % Define a command of name #1 to return #2
    \expandafter\def\csname #1\endcsname{#2}
}

\def\SetPFont#1#2{%
    \ifthenelse{ \equal{#1}{} }%
        {\let\pfontN=\relax  \let\pfontC=\relax}%
        {\@ifundefined{#1}%
            {\PackageWarning{axodraw2}{trying to set undefined font `#1'}}%
            {\def\pfontN{#1}%             Human name (postscript)
             \def\pfontC{\@nameuse{#1}}%  Code name
            }%
        }%
    \ifthenelse{ \equal{#2}{} }%
        {%   Use the value of LaTeX's fontsize when the font is used:
            \def\axofontsize{\f@size}%
        }%
        {\def\axofontsize{#2}}%
\ignorespaces
}

\def\UseCurrentPSFont{%
    % Set regular size of regular font, so math has rational size
    \fontsize{\axofontsize}{\axofontsize}%
    \selectfont
    \ifx\pfontC\relax
    \else
        \font\axofont = \pfontC \space at \axofontsize pt
        \axofont
    \fi
}

\defineaxofont{AvantGarde-Book}{pagk}
\defineaxofont{AvantGarde-BookOblique}{pagko}
\defineaxofont{AvantGarde-Demi}{pagd}
\defineaxofont{AvantGarde-DemiOblique}{pagdo}
\defineaxofont{Bookman-Demi}{pbkd}
\defineaxofont{Bookman-DemiItalic}{pbkdi}
\defineaxofont{Bookman-Light}{pbkl}
\defineaxofont{Bookman-LightItalic}{pbkli}
\defineaxofont{Courier-Bold}{pcrb}
\defineaxofont{Courier-BoldOblique}{pcrbo}
\defineaxofont{Courier}{pcrr}
\defineaxofont{Courier-Oblique}{pcrro}
\defineaxofont{Helvetica-Bold}{phvb}
\defineaxofont{Helvetica-BoldOblique}{phvbo}
\defineaxofont{Helvetica-NarrowBold}{phvbrn}
\defineaxofont{Helvetica-NarrowBoldOblique}{phvbon}
\defineaxofont{Helvetica}{phvr}
\defineaxofont{Helvetica-Oblique}{phvro}
\defineaxofont{Helvetica-Narrow}{phvrrn}
\defineaxofont{Helvetica-NarrowOblique}{phvron}
\defineaxofont{NewCenturySchlbk-Bold}{pncb}
\defineaxofont{NewCenturySchlbk-BoldItalic}{pncbi}
\defineaxofont{NewCenturySchlbk-Italic}{pncri}
\defineaxofont{NewCenturySchlbk-Roman}{pncr}
\defineaxofont{Palatino-Bold}{pplb}
\defineaxofont{Palatino-BoldItalic}{pplbi}
\defineaxofont{Palatino-Italic}{pplri}
\defineaxofont{Palatino-Roman}{pplr}
\defineaxofont{Symbol}{psyr}
\defineaxofont{Times-Bold}{ptmb}
\defineaxofont{Times-BoldItalic}{ptmbi}
\defineaxofont{Times-Italic}{ptmri}
\defineaxofont{Times-Roman}{ptmr}
\defineaxofont{ZapfChancery-MediumItalic}{pzcmi}
\defineaxofont{ZapfDingbats}{pzdr}

% Now we can set the default:

\SetPFont{Times-Roman}{10}

%
%		#] SetPFont : 
%	 #[ Text :
%
% Aim:  \Text(#1,#2)(#3)[#4]#5, to set text #5 at position (#1,#2)
%       with angle #3 and positioning #4.  
%       But the presence of (#3) and [#3] is to be optional (with
%       defaults being equivalent to (0) and []
%
\def\Text(#1,#2){%
    \@ifnextchar(%  )
        {\Text@A(#1,#2)}%
        {\Text@A(#1,#2)(0)}%
}
%
\def\Text@A(#1,#2)(#3){%
    \@ifnextchar[%  ]
        {\Text@Z(#1,#2)(#3)}%
        {\Text@Z(#1,#2)(#3)[]}%
}
%
\def\axoscaleTT{\ifPSTextScalesLikeGraphics 1\else \axotextscale \fi}
\def\axoscalePT{\ifPSTextScalesLikeGraphics \axoscale\else \axotextscale \fi}
%
\def\Text@Z(#1,#2)(#3)[#4]#5{%
    %
    %   Draws text at (#1,#2). Argument #3 is combination of l, r, t, b to
    %   indicate positioning instead of default (which is horizontally and
    %   vertically centered --- these are same as \makebox 
    %   the text is left adjusted, right adjusted or centered. Or b or t.
    %   4 is of course the text.
    %
    \AxoPut(#1,#2){%
        \scalebox{\axoscaleTT}%
                 {\rotatebox{#3}{\makebox(0,0)[#4]{#5}}}%
    }%
    \ignorespaces
}
%
%	 #] Text : 
%		#[ PText : *+
%
\def\PText(#1,#2)(#3)[#4]#5{%
%
%   Draws a postscript text in a postscript font.
%   Focal point is (1,2), rotation angle is 3, 4 is the mode (as in text)
%   and 5 is the text.
%
    \begingroup
        \UseCurrentPSFont
        \AxoPut(#1,#2){%
              \scalebox{\axoscalePT}%
                       {\rotatebox{#3}{\makebox(0,0)[#4]{#5}}}%
            }%
    \endgroup
    \ignorespaces
}
%
%		#] PText : 
%		#[ RText :
%
\def\RText(#1,#2)[#3](#4)#5{%
%
%   Draws rotated text at (1,2). Argument 3 is l,r or c indicating whether
%   the text is left adjusted, right adjusted or centered.
%   4 is the rotation angle and 5 is of course the text.
%
    \Text(#1,#2)(#4)[#3]{#5}%
    \ignorespaces
}
%
%		#] RText : 
%		#[ rText : *
%
\def\rText(#1,#2)[#3][#4]#5{%
%
%   Draws rotated text at (1,2). Argument 3 is l,r or c indicating whether
%   the text is left adjusted, right adjusted or centered.
%   4 is the rotation angle (specified as l, r, u, or blank,
%    and 5 is of course the text.
%
    \begingroup
    \def\this@angle{0}%
    \ifx#4l%
        \def\this@angle{90}%
    \else 
        \ifx#4r%
            \def\this@angle{-90}%
        \else
            \ifx#4u%
                \def\this@angle{180}%
            \fi
        \fi
    \fi
    \Text(#1,#2)(\this@angle)[#3]{#5}%
    \endgroup
    \ignorespaces
}
%
%		#] rText : 
%		#[ BText :
%
\def\BText(#1,#2)#3{%
%
%   Draws a box with the center at (x1,y1) and postscript text #3 in it.
%
    \AxoPut(#1,#2){%
        \edef\axoscale{\axoscalePT}%
        \SetTmpBox{#3}%
        \BBoxc(0,0)(\tmpXT,\tmpYT)%
        \PText(0,0)(0)[]{\usebox{\tmpBox}}%
    }%
    \ignorespaces
}
%
%		#] BText : 
%		#[ GText :
%
\def\GText(#1,#2)#3#4{%
%
%   Draws a box with the center at (x1,y1) and postscript(#4) text in it.
%   The grayness of the box is given by #3
%
    \AxoPut(#1,#2){%
        \edef\axoscale{\axoscalePT}%
        \SetTmpBox{#4}%
        \GBoxc(0,0)(\tmpXT,\tmpYT){#3}%
        \PText(0,0)(0)[]{\usebox{\tmpBox}}%
    }%
    \ignorespaces
}
%
%		#] GText : 
%		#[ CText :
%
\def\CText(#1,#2)#3#4#5{%
%
%   Draws a box with the center at (x1,y1) and postscript(#5) text in it.
%   The color of box and text is in #3
%   The color of the background is in #4
%
    \AxoPut(#1,#2){%
        \edef\axoscale{\axoscalePT}%
        \SetTmpBox{\SetColor{#3}{#5}}%
        \CBoxc(0,0)(\tmpXT,\tmpYT){#3}{#4}%
        \PText(0,0)(0)[]{\usebox{\tmpBox}}%
    }%
}
%
%		#] CText : 
%		#[ BTwoText :
%
\def\BTwoText(#1,#2)#3#4{%
%
%   Draws a box with the center at (x1,y1) and two lines of postscript
%   text in it.
%
    \AxoPut(#1,#2){%
        \edef\axoscale{\axoscalePT}%
        \SetTmpBoxTwo{#3}{#4}%
        \BBoxc(0,0)(\tmpXT,\tmpYT)%
        \PText(0,0)(0)[]{\usebox{\tmpBox}}%
    }%
    \ignorespaces
}
%
%		#] BTwoText : 
%		#[ GTwoText :
%
\def\GTwoText(#1,#2)#3#4#5{%
%
%   Draws a box with the center at (x1,y1) and two lines of postscript
%   text (#4 and #5) in it.
%   The grayness of the box is given by #3
%
    \AxoPut(#1,#2){%
        \edef\axoscale{\axoscalePT}%
        \SetTmpBoxTwo{#4}{#5}%
        \GBoxc(0,0)(\tmpXT,\tmpYT){#3}%
        \PText(0,0)(0)[]{\usebox{\tmpBox}}%
    }%
    \ignorespaces
}
%
%		#] GTwoText : 
%		#[ CTwoText :
%
\def\CTwoText(#1,#2)#3#4#5#6{%
%
%   Draws a box with the center at (x1,y1) and two lines of postscript
%   text (#5 and #6) in it.
%   The color of the box and the text is given by #3
%   The background color is given by #4
%
    \AxoPut(#1,#2){%
        \edef\axoscale{\axoscalePT}%
        \SetTmpBoxTwo{\SetColor{#3}#5}{\SetColor{#3}#6}%
        \CBoxc(0,0)(\tmpXT,\tmpYT){#3}{#4}%
        \PText(0,0)(0)[]{\usebox{\tmpBox}}%
    }%
    \ignorespaces
}
%
%		#] CTwoText : 
%	 #] Text and boxes : 
% 	#] Mixed routines : 
% 	#[ Postscript specific :
%
%   The code here is used only when we need Postscript output. This concerns
%   mainly the Postscript library.
%
\ifcase\axo@pdfoutput
%
%		#[ PostScript preamble :
%
\AtBeginDvi{
%
%    This forces the PostScript preamble commands to be put into the
%       dvi file.  Without this, revtex4 can remove them by funny
%       stuff with manipulating the first page.
%
%		#[ inventory :
%
%   The variables in here are:
%   num,num1,ampi,ampi1,x1,y1,x2,y2,x3,y3,x4,y4,dx,dy,dr
%   width, arrowpos, arrowspec, arrowwidth, arrowlength, arrowinset
%   arcend, arcmid, arcstart, radius, linesep, angdsize, dsize,
%   clockwise, dotsize, inc, pi, sign
%   darc,const,amp1, amp2, amp3, amp4, amp5, amp6, amp7, amp8, amp1i
%   gcolor,xx2
%
%   NOTE: blank lines are not allowed inside the postscript code!!!!!
%   (LaTeX sneaks \par commands in and the postscript goes boink)
%
\special{color}  % Provoke dvips into including color.pro
                 % Revtex4 in 2-column mode fails to force that
%
\special{!
  /savecolor { %/cmyk [ currentcmykcolor ]  def 
               /oldcolor [ [ currentcolor ] currentcolorspace ] def
             } def
  /restorecolor { oldcolor aload pop setcolorspace aload pop setcolor } def
%  /savecolor { [ currentcmykcolor ] /cmyk ed } def
%  /restorecolor { cmyk aload pop setcmykcolor } def
%  % Do a save color now, to ensure default variables are defined:
  savecolor
}
%
\special{! 
    /pi 3.141592 def
    /ed{exch def}def 
% Implement conversion of length unit from pt to bp by scaling
    /gs{gsave 1.00375 div dup scale}def
    /gsw{ gs
          /width ed
          width setlinewidth
    }def
    /p1{/y1 ed /x1 ed}def
    /p2{/y2 ed /x2 ed}def
    /p3{/y3 ed /x3 ed}def
    /p4{/y4 ed /x4 ed}def
    /pp1{/yy1 ed /xx1 ed}def
    /pp2{/yy2 ed /xx2 ed}def
    /pp3{/yy3 ed /xx3 ed}def
    /setabs{
        % Usage /var setabs
        % Sets variable to its absolute value
        dup load abs def
    }def
    %
    /normalizearc {
        % Usage: clockwise r angle1 angle2 x y normalizearc
        % Adjusts coordinate system for anticlockwize arc from angle
        % zero, centered at origin.
        % Left on stack: r d_angle, with 0<d_angle <=360.
        % Zero angle arc converted to loop
        translate
        exch dup rotate  % Origin of arc now at angle 0
        sub              % Change angle2 to dangle
        3 2 roll
        { % Clockwise arc: obtain from anticlockwise arc
          neg
          1 -1 scale
        } if
        dup abs 360 ge 
        {  %Outside 360 degrees, make exactly a loop
           pop 360 
        }
        { % Convert to positive angle mod 360.  
           dup
           dup 0 lt { 360 sub } if
           360 div truncate 360 mul sub
           dup 0.1 lt { pop 360 } if
        }ifelse
    } def
    %
    /normalizeline {
        % Usage: x1 y1 x2 y2 normalizeline
        % Adjusts coordinate system for line from origin in x direction
        % Left on stack: dr = length of line
        3 index 3 index translate
        2 index sub exch 3 index sub
%        2 copy atan rotate
        2 copy
        2 copy 0 ne exch 0 ne or
        {atan rotate}
        {pop pop}
        ifelse
        dup mul exch dup mul add sqrt
        3 1 roll pop pop
    } def
    %
    /abox{
        newpath 
            x1 y1 moveto
            x1 y2 lineto
            x2 y2 lineto
            x2 y1 lineto
         closepath
    }def
    /atriangle{
        newpath
            x1 y1 moveto
            x2 y2 lineto
            x3 y3 lineto
        closepath
   }def
   /abezier{
       newpath
           x1 y1 moveto
           x2 y2 x3 y3 x4 y4 curveto
   }def
   /distance{
      %   Usage: x1 y1 x2 y2 distance -> x1 y1 x2 y2 r
      %   Pure stack based: computes distance between points.  Keeps points
     dup
     3 index sub dup mul 
     2 index 5 index sub dup mul add sqrt
   } def
   /setbackgroundcolor{
     0 0 0 0 setcmykcolor
   } def
}
%
%		#] inventory : 
%		#[ Arrows :
%
% Define better arrows
%
\special{!
% Arrow making routines
%
    /getarrow {
        /witharrow ed
        /arrowpos ed
        /arrowaspect ed
        /arrowscale ed
        /arrowinset ed
        /arrowlength ed
        /arrowwidth ed
        /arrowstroke ed
    } def
    /drawarrow {
        gsave
            [] 0 setdash
            rotate
            arrowwidth 0 eq {
                arrowlength 0 eq {
                    linewidth linesep 0.7 mul add 1 add 1.2 mul dup
                    2.5 lt {
                        pop
                        2.5
                    } if
                    arrowscale mul
                    /arrowwidth ed
                    /arrowlength arrowwidth 2 mul arrowaspect mul def
                } {
                    /arrowlength arrowlength arrowscale mul def
                    /arrowwidth arrowlength 2 div arrowaspect div def
                } ifelse
            } {
                arrowlength 0 eq {
                    /arrowwidth arrowwidth arrowscale mul def
                    /arrowlength arrowwidth 2 mul arrowaspect mul def
                } {
                    /arrowwidth arrowwidth arrowscale mul def
                    /arrowlength arrowlength arrowscale mul def
                } ifelse
            } ifelse
            arrowstroke 0 ne {
              arrowstroke setlinewidth
              gsave
              setbackgroundcolor
              newpath
                0           arrowlength -0.5 mul moveto         
                arrowwidth  arrowlength          rlineto
                arrowwidth -1  mul  arrowlength arrowinset mul -1 mul rlineto
                arrowwidth -1  mul  arrowlength arrowinset mul rlineto
              closepath fill
              grestore
              newpath
                0           arrowlength -0.5 mul moveto         
                arrowwidth  arrowlength          rlineto
                arrowwidth -1  mul  arrowlength arrowinset mul -1 mul rlineto
                arrowwidth -1  mul  arrowlength arrowinset mul rlineto
              closepath stroke
            } {
              newpath
                0           arrowlength -0.5 mul moveto         
                arrowwidth  arrowlength          rlineto
                arrowwidth -1  mul  arrowlength arrowinset mul -1 mul rlineto
                arrowwidth -1  mul  arrowlength arrowinset mul rlineto
              closepath fill
            } ifelse
        grestore
    } def
%
}
%
%		#] Arrows : 
%
% Basic line drawing
%		#[ fixdash :
%
\special{! /fixdash{
%   Usage: r dashsize fixdash
%   Sets renormalized dashsize, doing
%      [rdsize rdsize] 0 setdash
%   so that n+1/2 patterns fit in length r
%   If dsize is too big or if dsize is zero, use continuous line
%   Uses stack, no named variables.
    2 copy gt 
    1 index 0 ne 
    and 
    {
       2 copy 
       2 mul div 0.5 sub round 
       dup 0 le { pop 0 } if
       2 mul 1 add exch pop div
       dup 2 array astore 0 setdash
    } 
    { pop pop [] 0 setdash }
    ifelse
} def }
%
%		#] fixdash : 
%		#[ dashline :
%
\special{! /dashline{
%   Draws a straight dashed line: x1,y1,x2,y2
%   Assumes dsize already set
%   The pattern is ideally [dsize dsize] 0 setdash
%   but we want to have (2*n+1)/2 patterns, so dsize must be rounded
%   If dsize is too large or zero, use a continuous line
%   Pure stack operation. 
    gsave
    distance dsize fixdash   % Function distance leaves points on stack
    newpath
      moveto
      lineto
    stroke
    grestore
} def }
%		#] dashline : 
%		#[ dasharc :
%
\special{! /dasharc{
%   Draws an arc segment anticlockwise:
%   x_center, y_center, radius, start_angle, end_angle
%   Assumes angdsize (radians) set elsewhere
    gsave
    3 copy sub abs
    % Top of stack is copy of radius, start_angle, end_angle
    pi mul 180 div mul 
    % Top of stack is arc length
    3 index angdsize mul fixdash
    newpath  arc stroke
    grestore
} def }
%
%		#] dasharc : 
%		#[ dashgluon :
%
\special{! /dashgluon{
%
%   Draw gluon, possibly dashed
%   We have a 'head' and a 'tail' and in between the 'body'
%   The head + tail is 2 windings. The body is num-1 windings.
%
    gsw
    /dsize ed
    /num ed /ampi ed 
    normalizeline /dr ed
    /num num 0.5 sub round def
%
    dsize 0 eq {
    [] 0 setdash
    } {
        /amp8 ampi abs 0.9 mul def
    /size amp8 neg 0 amp8 neg ampi 2 mul dup dr num 2 mul 2 add div exch
    1 lengthofbezier def
%
    /ndash size dsize 2 mul div truncate def
    ndash 0 eq { /ndash 1 def } if
    size 2 dsize ndash mul mul sub abs
    size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
    /dsize size 2 ndash mul div def
    [ dsize dsize ] dsize 2 div setdash
    } ifelse
%
    /inc dr num 2 mul 2 add div def         % increment per half winding
    /amp8 ampi 0.9 mul def
    amp8 0 lt {/amp8 amp8 neg def} if
%
    /x1 inc 2 mul def
%
    newpath
    x1 ampi neg moveto
        x1 amp8 add dup ampi neg exch ampi inc 1.4 mul ampi curveto
        inc 0.5 mul ampi inc 0.1 mul ampi 0.5 mul 0 0 curveto
    stroke
    newpath
    x1 ampi neg moveto
        2 1 num {
            pop
            x1 amp8 sub dup ampi neg exch ampi dup x1 inc add exch curveto
            /x1 x1 inc dup add add def
            x1 amp8 add dup ampi exch ampi neg dup x1 exch curveto
        } for
%
        x1 amp8 sub dup ampi neg exch ampi dup x1 inc 0.6 mul add exch curveto
        x1 inc 1.5 mul add ampi dr inc 0.1 mul sub ampi 0.5 mul dr 0 curveto
    stroke
%
    grestore
} def }
%
%		#] dashgluon : 
%		#[ dashdoublephoton :
%
\special{! /dashdoublephoton{
%
%   Draws a photon from x1,y1 to x2,y2 with amplitude A and n wiggles
%   Possibly double
%
    gsw 
    /dsize ed
    /linesep ed
    /num ed /ampi ed 
    normalizeline /dr ed
    /num num 2 mul 0.5 sub round def
%
    dsize 0 eq {
        [] 0 setdash
    } {
%       Compute the dash size
       /xdd dr num div def
       /size 4 3 div xdd mul pi div dup neg xdd add
             4 3 div ampi mul dup 3 1 roll xdd 0 1 lengthofbezier 2 div def
       /ndash size dsize 2 mul div truncate def
       ndash 0 eq { /ndash 1 def } if
       size 2 dsize ndash mul mul sub abs
       size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
       /dsize size 2 ndash mul div def
       [ dsize dsize ] dsize 2 div setdash
    } ifelse
%
    linesep 0 eq 
       { 0 0 dr 0 ampi num photon1 }
       {
%         0 linesep 2 div  dup dr exch  ampi num photon1 
%         0 linesep -2 div dup dr exch  ampi num photon1 
%
          linesep width add setlinewidth 0 0 dr 0 ampi num photon1
          [] 0 setdash
          0 0 0 0 setcmykcolor
          linesep width sub setlinewidth 0 0 dr 0 ampi num photon1
%
       }
    ifelse
    grestore
} def }
%
%		#] dashdoublephoton : 
%		#[ photon1 :
%
\special{! /photon1{
%
%   Draws a single photon from x1,y1 to x2,y2 with amplitude A and n wiggles
%
    gsave
    /num1 ed /ampi1 ed 
    normalizeline /dr ed
%
    /x2 dr num1 div def
    /sign 1 def
    1 1 num1 {
        pop
        newpath
        0 0 moveto
        4 3 div x2 mul pi div dup neg x2 add
        4 3 div ampi1 sign mul mul dup 3 1 roll
        x2 0 curveto
        stroke
        /sign sign neg def
        x2 0 translate
    } for
%
    grestore
} def }
%
%		#] photon1 : 
%		#[ dashdoublezigzag :
%
\special{! /dashdoublezigzag{
%
%   Draws a zigzag from x1,y1 to x2,y2 with amplitude A and n wiggles
%   Possibly double
%
    gsw 
    /dsize ed
    /linesep ed
    /num ed /ampi ed 
    normalizeline /dr ed
    /num num 2 mul 0.5 sub round def
%
    dsize 0 eq {
        [] 0 setdash
    } {
%       Compute the dash size
       /size dr num 2 mul div dup mul ampi dup mul add sqrt def
       /ndash size dsize 2 mul div truncate def
       ndash 0 eq { /ndash 1 def } if
       size 2 dsize ndash mul mul sub abs
       size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
       /dsize size 2 ndash mul div def
       [ dsize dsize ] dsize 2 div setdash
    } ifelse
%
    linesep 0 eq 
       { 0 0 dr 0 ampi num zigzag1 }
       {
%         0 linesep 2 div  dup dr exch  ampi num zigzag1 
%         0 linesep -2 div dup dr exch  ampi num zigzag1 
%
          linesep width add setlinewidth 0 0 dr 0 ampi num zigzag1
          [] 0 setdash
          0 0 0 0 setcmykcolor
          linesep width sub setlinewidth 0 0 dr 0 ampi num zigzag1
%
       }
    ifelse
    grestore
} def }
%
%		#] dashdoublezigzag : 
%		#[ zigzag1 :
%
\special{! /zigzag1{
%
%   Draws a single zigzag from x1,y1 to x2,y2 with amplitude A and n wiggles
%
    gsave
    /num1 ed /ampi1 ed 
    normalizeline /dr ed
%
    /x2 dr num1 div def
    /sign 1 def
    1 1 num1 {
        pop
        newpath
        0 0 moveto
        x2 2 div ampi1 sign mul lineto
        x2 0 lineto
        stroke
        /sign sign neg def
        x2 0 translate
    } for
%
    grestore
} def }
%
%		#] zigzag1 : 
%		#[ dashgluearc :
%
\special{! /dashgluearc{
%
%   Draws a gluon on an arcsegment
%   gluon_radius, num, linesep (0 for no-double), dsize (0 for no dashes)
%   clock, radius, start_angle, end_angle, x_center, y_center
%   in which num is the number of windings of the gluon.
%
%   Method for the gluon arc itself:
%   1:  compute length of arc.
%   2:  generate gluon in x and y as if the arc is a straight line
%   3:  x' = (radius+y)*cos(x*const)
%       y' = (radius+y)*sin(x*const)
%
    gsw 
    normalizearc
    /darc ed  /radius ed /dsize ed /num ed /ampi ed
    /num num 0.5 sub round def
%
    dsize 0 eq {
    [] 0 setdash
    } {
    /dr radius darc mul pi mul 180 div def  % length of segment.
        /const darc dr div def                  % conversion constant
        /inc dr num 2 mul 2 add div def    % increment per half winding
        /amp8 ampi 0.9 mul def
        /amp1 radius ampi add def
    /amp2 radius ampi sub def
    /amp4 amp1 inc amp8 add const mul cos div def
    /amp5 amp2 amp8 const mul cos div def
    amp8 0 lt {/amp8 amp8 neg def} if
    /x1 inc 2 mul def
    /x0 x1 const mul cos amp2 mul def
    /y0 x1 const mul sin amp2 mul def
    x1 amp8 sub const mul dup cos amp5 mul x0 sub exch sin amp5 mul y0 sub
    x1 amp8 sub const mul dup cos amp4 mul x0 sub exch sin amp4 mul y0 sub
    x1 inc add const mul dup cos amp1 mul x0 sub exch sin amp1 mul y0 sub
    1 lengthofbezier
    /size ed
%
    /ndash size dsize 2 mul div truncate def
    ndash 0 eq { /ndash 1 def } if
    size 2 dsize ndash mul mul sub abs
    size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
    /dsize size 2 ndash mul div def
    [ dsize dsize ] dsize 2 div setdash
    } ifelse
%
    /dr radius darc mul pi mul 180 div def  % length of segment.
    /const darc dr div def                  % conversion constant
    /inc dr num 2 mul 2 add div def    % increment per half winding
    /amp8 ampi 0.9 mul def
    /amp1 radius ampi add def
    /amp2 radius ampi sub def
    /amp3 radius ampi 2 div add def
    /amp4 amp1 inc amp8 add const mul cos div def
    /amp5 amp2 amp8 const mul cos div def
    /amp6 amp1 inc 0.6 mul amp8 add const mul cos div def
    /amp7 amp1 inc 0.9 mul const mul cos div def
    amp8 0 lt {/amp8 amp8 neg def} if
%
    newpath
        /x1 inc 2 mul def
        x1 const mul dup cos amp2 mul exch sin amp2 mul
    moveto
        x1 amp8 add const mul dup cos amp5 mul exch sin amp5 mul
        x1 amp8 add const mul dup cos amp6 mul exch sin amp6 mul
        inc 1.4 mul const mul dup cos amp1 mul exch sin amp1 mul
    curveto
        inc 0.5 mul const mul dup cos amp7 mul exch sin amp7 mul
        inc 0.1 mul const mul dup cos amp3 mul exch sin amp3 mul
        radius 0
    curveto
    stroke
    newpath
        x1 const mul dup cos amp2 mul exch sin amp2 mul moveto
        2 1 num { pop
            x1 amp8 sub const mul dup cos amp5 mul exch sin amp5 mul
            x1 amp8 sub const mul dup cos amp4 mul exch sin amp4 mul
            x1 inc add const mul dup cos amp1 mul exch sin amp1 mul
                curveto
            /x1 x1 inc dup add add def
            x1 amp8 add const mul dup cos amp4 mul exch sin amp4 mul
            x1 amp8 add const mul dup cos amp5 mul exch sin amp5 mul
            x1 const mul dup cos amp2 mul exch sin amp2 mul
                curveto
        } for
        x1 amp8 sub const mul dup cos amp5 mul exch sin amp5 mul
        x1 amp8 sub const mul dup cos amp6 mul exch sin amp6 mul
        x1 inc 0.6 mul add const mul dup cos amp1 mul exch sin amp1 mul
        curveto
        x1 inc 1.5 mul add const mul dup cos amp7 mul exch sin amp7 mul
        dr inc 0.1 mul sub const mul dup cos amp3 mul exch sin amp3 mul
        dr const mul dup cos radius mul exch sin radius mul
        curveto
    stroke
%
    grestore
} def
}
%
%		#] dashgluearc : 
%		#[ dashdoublephotonarc :
%
\special{! /dashdoublephotonarc{
%
%   Draws a photon on an arcsegment
%   photon_radius, num, linesep (0 for no-double), dsize (0 for no dashes),
%   clock, radius, start_angle, end_angle, x_center, y_center
%   in which num is the number of wiggles of the photon.
%
    gsw 
    normalizearc
    /darc ed  /radius ed /dsize ed /linesep ed /num ed /ampli ed
%
    /num num 2 mul round def    % number of half wiggles
    /darc1 darc num div def
    /cp darc1 cos def
    /sp darc1 sin def
    darc1 2 div dup
    /cp2 exch cos def
    /sp2 exch sin def
%
    dsize 0 eq {
        [] 0 setdash
    } {
%
%       Compute the length of the outer curve and the inner curve.
%       There must be an integer number of patterns in half the sum.
%       The we use half of the first to determine where in the pattern
%       we should start.
%
        /ampli1 ampli def
        /beta radius darc1 mul 180 ampli1 mul div def
        /tt sp cp beta mul sub cp sp beta mul add div def
        /amp1 radius ampli1 add 8 mul beta cp2 mul sp2 sub mul beta 4 cp add mul
            tt cp mul 3 mul sp 4 mul sub add radius mul sub
            beta tt sub 3 mul div def           % this is x2
        radius ampli1 add 8 mul cp2 mul 1 cp add radius mul sub 3 div amp1 sub
            dup radius sub exch radius sub beta mul             % x1,y1
        amp1 radius sub amp1 radius cp mul sub tt mul radius sp mul add     % x2,y2
        radius cp mul radius sub radius sp mul             % x3 y3
                1 lengthofbezier
        /len1 ed
        /ampli1 ampli1 neg def
        /beta radius darc1 mul 180 ampli1 mul div def
        /tt sp cp beta mul sub cp sp beta mul add div def
        /amp1 radius ampli1 add 8 mul beta cp2 mul sp2 sub mul beta 4 cp add mul
            tt cp mul 3 mul sp 4 mul sub add radius mul sub
            beta tt sub 3 mul div def           % this is x2
        radius ampli1 add 8 mul cp2 mul 1 cp add radius mul sub 3 div amp1 sub
            dup radius sub exch radius sub beta mul             % x1,y1
        amp1 radius sub amp1 radius cp mul sub tt mul radius sp mul add     % x2,y2
        radius cp mul radius sub radius sp mul             % x3 y3
                1 lengthofbezier
        /len2 ed
        /size len1 len2 add 2 div def
        /size2 len1 2 div def
%
        /ndash size dsize 2 mul div truncate def
        ndash 0 eq { /ndash 1 def } if
        size 2 dsize ndash mul mul sub abs
        size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
        /dsize size 2 ndash mul div def
        /numd size2 dsize 2 mul div truncate def
        /dstart dsize 2 div size2 sub 2 numd dsize mul mul add def
        dstart 0 lt { /dstart dstart dsize 2 mul add def } if
        [ dsize dsize ] dstart setdash
    } ifelse
%
    linesep 0 eq { 
        radius photonarc1 
    } {
        linesep width add setlinewidth radius photonarc1
        [] 0 setdash
        0 0 0 0 setcmykcolor
        linesep width sub setlinewidth radius photonarc1
    } ifelse
%
    grestore
} def }
%
%		#] dashdoublephotonarc : 
%		#[ photonarc1 :
%
\special{! /photonarc1{
%   Usage: radius photonarc1
%   Draws a single photon on an arcsegment.
%   Called from dashdoublephotonarc with coordinates centered on center,
%   start on x-axis.  
%   Assume the following are set: num, ampli, arcend phi, arcstart phi/2, cp,
%      cp2, sp, sp2.
%   Draws a photonarc center at x1,y1, radius arcstart,arcend, amplitude
%       number of wiggles,  width, scale
%
    gsave
    /radius1 ed
    % Local copy of amplitude, since I change it
    /ampli1 ampli def
%
    newpath
    radius1 0 moveto
    1 1 num { 1 sub /ii ed
        /cpi darc1 ii mul cos def
        /spi darc1 ii mul sin def
        /beta radius1 darc1 mul 180 ampli1 mul div def
        /tt sp cp beta mul sub cp sp beta mul add div def
        /x2 radius1 ampli1 add 8 mul beta cp2 mul sp2 sub mul beta 4 cp add mul
            tt cp mul 3 mul sp 4 mul sub add radius1 mul sub
            beta tt sub 3 mul div def
        /x1 radius1 ampli1 add 8 mul cp2 mul 1 cp add radius1 mul sub 3 div x2 sub def
        /y1 x1 radius1 sub beta mul def
        /y2 x2 radius1 cp mul sub tt mul radius1 sp mul add def
        /x3 radius1 cp mul def
        /y3 radius1 sp mul def
        x1 cpi mul y1 spi mul sub y1 cpi mul x1 spi mul add
        x2 cpi mul y2 spi mul sub y2 cpi mul x2 spi mul add
        x3 cpi mul y3 spi mul sub y3 cpi mul x3 spi mul add
                curveto
        /ampli1 ampli1 neg def
    } for
    stroke
%
    grestore
} def }
%
%		#] photonarc1 : 
%		#[ dashdoublezigzagarc :
%
\special{! /dashdoublezigzagarc{
%
%   Draws a zigzag on an arcsegment
%   zigzag_radius, num, linesep (0 for no-double), dsize (0 for no dashes),
%   clock, radius, start_angle, end_angle, x_center, y_center
%   in which num is the number of wiggles of the zigzag.
%
    gsw 
    normalizearc
    /darc ed  /radius ed /dsize ed /linesep ed /num ed /ampli ed
%
    /num num 2 mul round def    % number of half wiggles
    /darc1 darc num div def
    /cp darc1 cos def
    /sp darc1 sin def
    darc1 2 div dup
    /cp2 exch cos def
    /sp2 exch sin def
%
    dsize 0 eq {
        [] 0 setdash
    } {
        /size ampli dup mul radius dup mul add radius dup mul ampli dup mul sub
            cp mul sub 2 div sqrt def
        /size2 ampli dup mul ampli radius add radius mul 2 mul 1 cp2 sub mul
            add sqrt def
%
        /ndash size dsize 2 mul div truncate def
        ndash 0 eq { /ndash 1 def } if
        size 2 dsize ndash mul mul sub abs
        size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
        /dsize size 2 ndash mul div def
        /numd size2 dsize 2 mul div truncate def
        /dstart dsize 2 div size2 sub 2 numd dsize mul mul add def
        dstart 0 lt { /dstart dstart dsize 2 mul add def } if
        [ dsize dsize ] dstart setdash
    } ifelse
%
    linesep 0 eq { 
          radius zigzagarc1 
    } {
        linesep width add setlinewidth radius zigzagarc1
        [] 0 setdash
        0 0 0 0 setcmykcolor
        linesep width sub setlinewidth radius zigzagarc1
    } ifelse
%
    grestore
} def }
%
%		#] dashdoublezigzagarc : 
%		#[ zigzagarc1 :
%
\special{! /zigzagarc1{
%   Usage: radius zigzagarc1
%   Draws a single zigzag on an arcsegment.
%   Called from dashdoublezigzagarc with coordinates centered on center,
%   start on x-axis.  
%   Assume the following are set: num, ampli, arcend phi, arcstart phi/2, cp,
%      cp2, sp, sp2.
%   Draws a zigzagarc center at x1,y1, radius arcstart,arcend, amplitude
%       number of wiggles,  width, scale
%
    gsave
    /radius1 ed
%   Local copy of amplitude, since I change it
    /ampli1 ampli def
%
%   Num is the number of half wiggles. We like to start and end with
%   quarter wiggles though.
%
    /darc2 darc1 2 div def
    newpath
    radius1 0 moveto
    darc2 dup sin exch cos
    radius1 ampli1 add mul exch radius1 ampli1 add mul lineto
    /ampli1 ampli1 neg def
    /num1 num 1 sub def
    1 1 num1 {
        darc1 mul darc2 add dup sin exch cos
        radius1 ampli1 add mul exch radius1 ampli1 add mul lineto
        /ampli1 ampli1 neg def
    } for
    num darc1 mul dup sin exch cos
    radius1 mul exch radius1 mul lineto
    stroke
%
    grestore
} def }
%
%		#] zigzagarc1 : 
%		#[ dashgluoncirc :
%
\special{! /dashgluoncirc{
%
%   Draws a gluon on a complete circle
%   cmyk color setting
%   gluon_ampl, num, linesep (0 for no-double), dsize (0 for no dashes)
%   radius, phase_angle, x_center, y_center
%   in which num is the number of windings of the gluon.
%
    gsw 
    translate
    /phase ed /radius ed /dsize ed /num ed /ampi ed
    /num num 0.5 sub round def
    /darc 180 num div def
%
%   We rotate in such a way that 0 angle becomes more accessible.
%
    darc phase add rotate
%
    dsize 0 eq {
        [] 0 setdash
    } {
        /dr radius 2 mul pi mul def  % 2*pi*r
        /inc dr 2 num mul div def    % 2*pi*r/(2*num)
        /const 360 dr div def        % 360/(2*pi*r)
        /amp8 ampi 0.9 mul def
        /amp1 radius ampi add def
        /amp2 radius ampi sub def
        /amp4 amp1 inc amp8 add const mul cos div def
        /amp5 amp2 amp8 const mul cos div def
        amp8 0 lt {/amp8 amp8 neg def} if
        /xx inc 2 mul def
        /x0 amp1 inc const mul cos mul def
        /y0 amp1 inc const mul sin mul def
        amp4 xx amp8 add const mul cos mul x0 sub
        amp4 xx amp8 add const mul sin mul y0 sub
        amp5 xx amp8 add const mul cos mul x0 sub
        amp5 xx amp8 add const mul sin mul y0 sub
        amp2 xx const mul cos mul x0 sub
        amp2 xx const mul sin mul y0 sub
        1 lengthofbezier
        /size ed
%
        /ndash size dsize 2 mul div truncate def
        ndash 0 eq { /ndash 1 def } if
        size 2 dsize ndash mul mul sub abs
        size 2 dsize ndash 1 add mul mul sub abs gt { /ndash ndash 1 add def } if
        /dsize size 2 ndash mul div def
        [ dsize dsize ] dsize 2 div setdash
    } ifelse
%
    /dr radius 2 mul pi mul def  % 2*pi*r
    /inc dr 2 num mul div def    % 2*pi*r/(2*num)
    /const 360 dr div def        % 360/(2*pi*r)
    /amp8 ampi 0.9 mul def
    /amp1 radius ampi add def
    /amp2 radius ampi sub def
    /amp4 amp1 inc amp8 add const mul cos div def
    /amp5 amp2 amp8 const mul cos div def
    amp8 0 lt {/amp8 amp8 neg def} if
%
    newpath
%
    /xx inc 2 mul def
    amp1 inc const mul cos mul amp1 inc const mul sin mul moveto
%
    1 1 num { pop
        amp4 xx amp8 add const mul cos mul
        amp4 xx amp8 add const mul sin mul
        amp5 xx amp8 add const mul cos mul
        amp5 xx amp8 add const mul sin mul
        amp2 xx const mul cos mul
        amp2 xx const mul sin mul
            curveto
        amp5 xx amp8 sub const mul cos mul
        amp5 xx amp8 sub const mul sin mul
        amp4 xx amp8 sub const mul cos mul
        amp4 xx amp8 sub const mul sin mul
        amp1 xx inc add const mul cos mul
        amp1 xx inc add const mul sin mul
            curveto
        /xx xx inc 2 mul add def
    } for
%
    stroke
%
    grestore
} def }
%
%		#] dashgluoncirc : 
%		#[ arc2 :
%
\special{! /arc2{
%   Draws an arc segment:
%   arrowspec, arrowpos, flip, linesep, dsize,
%       clock, radius, start_angle, end_angle, x_center, y_center, width, scale
%   If linesep == 0, then single line, else double with separation linesep. 
%
    gsw
    normalizearc
    /darc ed /radius ed
    /dsize ed /linesep ed 
    /angdsize dsize radius div def
    /flip ed
    getarrow
    /arcmid darc arrowpos mul def
    /linewidth width def
    dsize 0 eq 
    { linesep 0 eq 
         { 0 0 radius 0 darc dasharc }
         {  gsave
                linesep linewidth add setlinewidth
                0 0 radius 0 darc dasharc
                setbackgroundcolor
                [] 0 setdash
                linesep linewidth sub setlinewidth
                0 0 radius 0 darc dasharc
            grestore
         } ifelse
    }
    { linesep 0 eq 
         { 0 0 radius 0 arcmid dasharc 
           0 0 radius arcmid darc dasharc
         } {
            gsave
                linesep linewidth add setlinewidth
                0 0 radius 0 arcmid dasharc
                0 0 radius arcmid darc dasharc
                setbackgroundcolor
                [] 0 setdash
                linesep linewidth sub setlinewidth
                0 0 radius 0 darc dasharc
            grestore
         } ifelse
    } ifelse
    arcmid rotate 
    radius 0 translate 
    flip { 0 } { 180 } ifelse
    witharrow { drawarrow } if
    grestore
} def }
%
%		#] arc2 : 
%		#[ dasharrowdoubleline :
%
\special{! /dasharrowdoubleline{
%
%   arrowspec, arrowpos, flip, linesep, dsize,
%       x1, y1, x2, y2, width, scale
%   If linesep == 0, then single line, else double with separation linesep. 
%   Draws a dashed double straight line with arrow. 
%   If dsize==0, then continuous line.
%   If linesep==0, then single line.
    gsw 
    normalizeline
    /dr ed
    /dsize ed 
    /linesep ed
    /flip ed
    getarrow
%
    % If linesep is negative, that means the arrow is flipped.
    % But the lineend coordinates are already flipped, so there is
    % no need to make any adjustment; i.e., replace linesep by
    % absolute value.
    /linesep setabs
    /linewidth width def
    linesep 0 eq {
        0 0 dr 0 dashline
    } {
        gsave
            linesep linewidth add setlinewidth 0 0 dr 0 dashline
            setbackgroundcolor
            [] 0 setdash
            linesep linewidth sub setlinewidth 0 0 dr 0 newpath moveto lineto stroke
        grestore
    } ifelse
    dr arrowpos mul 0 translate
    flip { -90 }{ 90 } ifelse
    witharrow { drawarrow } if
    grestore
} def }
%
%		#] dasharrowdoubleline : 
%		#[ vertex :
%
\special{! /vertex{
%
%   Puts a fat dot at x,y  size is the radius of the dot
%
    gs
    /dotsize ed
    translate
    newpath
        0 0 dotsize 0 360 arc
    fill stroke
    grestore
} def }
%
%		#] vertex : 
%		#[ ecirc :
%
\special{! /ecirc{
%
%   Draws an anti-clockwise circle :
%   x_center, y_center, radius
%   Transparent interior
%
    gsw /radius ed
    translate                               % x and y are still on stack
    newpath 0 0 radius 0 360 arc stroke
    grestore
} def }
%
%		#] ecirc : 
%		#[ ebox :
%
\special{! /ebox{
%
%   Draws a transparent box x1,y1,x2,y2
%
    gsw p2 p1
    abox stroke
    grestore
} def }
%
%		#] ebox : 
%		#[ fbox :
%
\special{! /fbox{
%
%   Draws a filled box x1,y1,x2,y2
%
    gsw p2 p1
    abox fill
    grestore
} def }
%
%		#] fbox : 
%		#[ triangle :
%
\special{! /triangle{
%
%   Draws a triangle x1,y1,x2,y2,x3,y3
%
    gsw p3 p2 p1
    atriangle stroke
    grestore
} def }
%
%		#] triangle : 
%		#[ ftriangle :
%
\special{! /ftriangle{
%
%   Draws a triangle x1,y1,x2,y2,x3,y3
%
    gsw p3 p2 p1
    atriangle fill
    grestore
} def }
%
%		#] ftriangle : 
%		#[ ellipse:
%
\special{! /ellipse {
    % Draw an ellipse
    % RedGrittyBrick 20/10/2003
    % From http://www.redgrittybrick.org/postscript/ellipse.html. 2011/03/22
    % draw an ellipse using four bezier curves
    %
    /r2 exch def % 2nd parameter
    /r1 exch def % 1st parameter
    /kappa 0.5522847498 def
    %
    newpath
    0 r2 moveto % start point of curve
    %
    % top clockwise
    kappa r1 mul r2 % 1st Bezier control point
    r1 kappa r2 mul % 2nd Bezier control point
    r1 0 curveto % end point of curve
    %
    % right clockwise
    r1 kappa r2 mul neg
    kappa r1 mul r2 neg
    0 r2 neg curveto
    %
    % bottom clockwise
    kappa r1 mul neg r2 neg
    r1 neg kappa r2 mul neg
    r1 neg 0 curveto
    %
    % left clockwise
    r1 neg kappa r2 mul
    kappa r1 mul neg r2
    0 r2 curveto
    %
    } def % ellipse
}
%
%		#] ellipse: 
%		#[ goval :
%
\special{! /goval{
%
%   Draws a gray oval that overwrites whatever was there.
%   x_center y_center height width rotation color linewidth scale
%
    gsw /gcolor ed /angle ed /width ed /height ed
%
    translate                            % x and y are still on stack
    angle rotate
    1 setgray      width height ellipse fill
    gcolor setgray width height ellipse fill
    0 setgray      width height ellipse stroke
    grestore
} def }
%
%		#] goval : 
%		#[ fcoval :
%
\special{! /foval{
%
%   Draws an oval that overwrites whatever was there.
%   x_center y_center height width rotation linewidth scale
%
    gsw /angle ed /width ed /height ed
%
    translate                            % x and y are still on stack
    angle rotate
    width height ellipse fill
    grestore
} def }
%
%		#] foval :
%		#[ oval :
%
\special{! /oval{
%
%   Draws an oval that does not overwrite whatever was there.
%   x_center y_center height width rotation linewidth scale
%
    gsw /angle ed /width ed /height ed
%
    translate                         % x and y are still on stack
    angle rotate
    width height ellipse stroke
    grestore
} def }
%
%		#] oval : 
%		#[ polygon :
%
%   Incoming stack:
%   [array of x,y pairs] width scale
%
\special{! /polygon{
    gsw /points ed
    /ss points length 2 idiv 2 mul def
    ss 4 gt {
        newpath
        points 0 get points 1 get moveto
        0 2 ss 4 sub { /ii ed
            /x1 points ii 2 add get def
            /y1 points ii 3 add get def
            x1 y1 lineto
        } for
        closepath
        stroke
    } if
    grestore
} def }
%
%		#] polygon : 
%		#[ filledpolygon :
%
%   Incoming stack:
%   [array of x,y pairs] width scale
%
\special{! /filledpolygon{
    gsw /points ed
    /ss points length 2 idiv 2 mul def
    ss 4 gt {
        newpath
        points 0 get points 1 get moveto
        0 2 ss 4 sub { /ii ed
            /x1 points ii 2 add get def
            /y1 points ii 3 add get def
            x1 y1 lineto
        } for
        closepath
        fill
    } if
    grestore
} def }
%
%		#] filledpolygon : 
%		#[ makecurve :
%
\special{! /docurve{
    x1 2 mul x2 add 3 div
        y1 y0 sub x1 x0 sub div x2 x0 sub mul
        y2 y0 sub x2 x0 sub div x1 x0 sub mul add
        y1 add y0 2 mul add 3 div
    x1 x2 2 mul add 3 div
        y2 y3 sub x2 x3 sub div x1 x3 sub mul
        y1 y3 sub x1 x3 sub div x2 x3 sub mul add
        y2 add y3 2 mul add 3 div
    x2 y2 curveto
} def }
%
\special{! /makecurve{
%
%   Incoming stack:
%   [array of x,y pairs] width scale
%
    gsw /points ed
    /ss points length 2 idiv 2 mul def
    newpath
    ss 4 gt {
        /x1 points 0 get def
        /y1 points 1 get def
        /x2 points 2 get def
        /y2 points 3 get def
        /x3 points 4 get def
        /y3 points 5 get def
        /x0 x1 2 mul x2 sub def
        /y0 y3 y2 sub x3 x2 sub div y2 y1 sub x2 x1 sub div sub 2 mul
            x2 x1 sub dup mul x3 x1 sub div mul
            y1 2 mul add y2 sub def
        x1 y1 moveto
        docurve
        0 2 ss 8 sub { /ii ed
            /x0 points ii       get def
            /y0 points ii 1 add get def
            /x1 points ii 2 add get def
            /y1 points ii 3 add get def
            /x2 points ii 4 add get def
            /y2 points ii 5 add get def
            /x3 points ii 6 add get def
            /y3 points ii 7 add get def
            docurve
        } for
        /x0 points ss 6 sub get def
        /y0 points ss 5 sub get def
        /x1 points ss 4 sub get def
        /y1 points ss 3 sub get def
        /x2 points ss 2 sub get def
        /y2 points ss 1 sub get def
        /x3 x2 2 mul x1 sub def
        /y3 y2 y1 sub x2 x1 sub div y1 y0 sub x1 x0 sub div sub 2 mul
            x2 x1 sub dup mul x2 x0 sub div mul
            y2 2 mul add y1 sub def
        docurve
    } {
        ss 4 eq {
            points 0 get points 1 get moveto
            points 2 get points 3 get lineto
        } if
    } ifelse
    stroke
    grestore
} def }
%
%		#] makecurve : 
%		#[ makedashcurve :
%
\special{! /makedashcurve{
%
%   Incoming stack:
%   [array of x,y pairs] dashsize width scale
%
    gsw /dsize ed /points ed
    /ss points length 2 idiv 2 mul def
    newpath
    ss 4 gt {
        /x1 points 0 get def
        /y1 points 1 get def
        /x2 points 2 get def
        /y2 points 3 get def
        /x3 points 4 get def
        /y3 points 5 get def
        /x0 x1 2 mul x2 sub def
        /y0 y3 y2 sub x3 x2 sub div y2 y1 sub x2 x1 sub div sub 2 mul
            x2 x1 sub dup mul x3 x1 sub div mul
            y1 2 mul add y2 sub def
        x1 y1 moveto
        docurve
        0 2 ss 8 sub { /ii ed
            /x0 points ii       get def
            /y0 points ii 1 add get def
            /x1 points ii 2 add get def
            /y1 points ii 3 add get def
            /x2 points ii 4 add get def
            /y2 points ii 5 add get def
            /x3 points ii 6 add get def
            /y3 points ii 7 add get def
            docurve
        } for
        /x0 points ss 6 sub get def
        /y0 points ss 5 sub get def
        /x1 points ss 4 sub get def
        /y1 points ss 3 sub get def
        /x2 points ss 2 sub get def
        /y2 points ss 1 sub get def
        /x3 x2 2 mul x1 sub def
        /y3 y2 y1 sub x2 x1 sub div y1 y0 sub x1 x0 sub div sub 2 mul
            x2 x1 sub dup mul x2 x0 sub div mul
            y2 2 mul add y1 sub def
        docurve
    } {
        ss 4 eq {
            points 0 get points 1 get moveto
            points 2 get points 3 get lineto
        } if
    } ifelse
    centerdash
    stroke
    grestore
} def }
%
\special{! /pathlength{
    flattenpath
    /dist 0 def
    { /yfirst ed /xfirst ed /ymoveto yfirst def /xmoveto xfirst def }
    { /ynext ed /xnext ed /dist dist ynext yfirst sub dup mul
        xnext xfirst sub dup mul add sqrt add def
        /yfirst ynext def /xfirst xnext def }
    {}
    {/ynext ymoveto def /xnext xmoveto def
        /dist ynext yfirst sub dup mul
              xnext xfirst sub dup mul add sqrt add def
        /yfirst ynext def /xfirst xnext def }
    pathforall
    dist
} def }
%
\special{! /centerdash{
    /pathlen pathlength def
    /jj pathlen dsize div 2.0 div cvi def
    /ddsize pathlen jj 2.0 mul div def
    [ddsize] ddsize 2 div setdash
} def }
%
%		#] makedashcurve : 
%		#[ logaxis :
%
\special{! /logaxis{
%
%   Draws an axis from x1,y1 to x2,y2 with nl log divisions
%   size of the hashes hs, offset F
%   and width W. The stack looks like
%   x1,y1,x2,y2,nl,hs,F,W,scale
%   After the rotation the hash marks are on top if nl is positive and
%   on the bottom if nl is negative
%
%   Offset 0 or negative: replace by 1.
%   Adjust by factors of 10 to be in range 1 to 10.    
%
    gsw /offset ed /hashsize ed /nlogs ed
    normalizeline /rr ed
    offset 0 le { /offset 1 def } if
    /offset
      offset ln 10 ln div
      dup cvi sub
      dup 0 lt { 1 add } if
    def
    /lsize rr nlogs div def
    newpath
    0 0 moveto
    rr 0 lineto
    0 1 nlogs 1 add {
      offset sub lsize mul
      dup -0.001 gt {
        dup rr 0.001 add le {
          dup 0 moveto
          hashsize 1.2 mul lineto
        } if
      } if
    } for
    stroke
    width 0.6 mul setlinewidth
    newpath
    0 1 nlogs { /x2 ed
        2 1 9 {
          ln 10 ln div x2 add
          offset sub lsize mul
          dup -0.001 gt {
            dup rr 0.001 add le {
              dup 0 moveto
              hashsize 0.8 mul lineto
            } if
          } if
        } for
    } for
    stroke
    grestore
} def }
%
%		#] logaxis : 
%		#[ linaxis :
%
\special{! /linaxis{
%
%   x1,y1,x2,y2,num_decs,per_dec,hashsize,offset,width,scale
%   Bad offset <= 0: change to 1.     
%
    gsw /offset ed /hashsize ed /perdec ed /numdec ed 
    normalizeline
    /rr ed
    /perdec
      perdec round
      dup 0 le { pop 1 } if
    def
    /offset offset
    % Do real equivalent of offset perdec mod
       dup cvi perdec idiv perdec mul
       sub
       dup 0 lt {perdec add} if
       dup perdec ge {perdec sub} if
    def
    newpath
       0 0 moveto
       rr 0 lineto
    /x1 rr numdec perdec mul div def
    /y1 rr numdec div def
    0 1 numdec 1 add
       { y1 mul offset x1 mul sub
         dup -0.001 gt {
            dup rr 0.001 add lt {
               dup 0 moveto
               hashsize 1.2 mul lineto
            } if
         } if
    } for
    stroke
    width 0.6 mul setlinewidth
    newpath
    /offset offset dup cvi sub def
    0 1 numdec perdec mul  {
        offset sub x1 mul 
        dup -0.001 ge {
            dup rr 0.001 add le {
                dup 0 moveto
                hashsize 0.8 mul lineto
            } if
        } if 
    } for
    stroke
    grestore
} def }
%
%		#] linaxis : 
%		#[ dashbezier :
%
\special{! /dashbezier{
%
%   Draws a dashed Bezier with control points x1,y1,x2,y2,x3,y3,x4,y4
%
    gsw /dsize ed p4 p3 p2 p1
    dsize 0 ne {
        /size x2 x1 sub y2 y1 sub x3 x1 sub y3 y1 sub x4 x1 sub y4 y1 sub
            1 lengthofbezier def
        /numdashes size dsize 2 mul div def
        numdashes 0 eq { /numdashes 1 def } if
        size dsize 2 mul numdashes mul sub abs
        size dsize 2 mul numdashes 1 add mul sub abs
            gt { /numdashes 1 add def } if
        /dsize size numdashes 2 mul div def
        [dsize dsize] dsize 2 div setdash
    } if
    abezier stroke
    grestore
} def }
%
%		#] dashbezier : 
%		#[ dashdoublebezier :
%
\special{! /dashdoublebezier{
%
%   Draws a dashed Bezier with control points x1,y1,x2,y2,x3,y3,x4,y4
%
    gsw /dsize ed /linesep ed
    /flip ed
    getarrow
    p4 p3 p2 p1
    /linewidth width def
    /bsize x2 x1 sub y2 y1 sub x3 x1 sub y3 y1 sub x4 x1 sub y4 y1 sub
        1 lengthofbezier def
    dsize 0 ne {
        /numdashes bsize dsize 2 mul div def
        numdashes 0 eq { /numdashes 1 def } if
        bsize dsize 2 mul numdashes mul sub abs
        bsize dsize 2 mul numdashes 1 add mul sub abs
            gt { /numdashes 1 add def } if
        /dsize bsize numdashes 2 mul div def
        [dsize dsize] dsize 2 div setdash
    } if
    linesep 0 ne {
        linesep linewidth add setlinewidth abezier stroke
        gsave
            0 0 0 0 setcmykcolor
            linesep linewidth sub setlinewidth abezier stroke
        grestore
    } {
        abezier stroke
    } ifelse
%
    witharrow {
        /tb arrowpos def
        /tbmax 1 def /tbmin 0 def
        {
            /sizeb x2 x1 sub y2 y1 sub x3 x1 sub y3 y1 sub x4 x1 sub y4 y1 sub
                tb lengthofbezier def
            sizeb bsize div arrowpos sub abs 0.0001 le { exit } if
            sizeb bsize div arrowpos gt
                { /tbmax tb def /tb tb tbmin add 2 div def }
                { /tbmin tb def /tb tb tbmax add 2 div def } ifelse
        } loop
        /ub 1 tb sub def
        x1 ub ub ub mul mul mul tb x2 3 mul ub mul ub mul tb x3 3 mul ub mul
            x4 tb mul add mul add mul add
        y1 ub ub ub mul mul mul tb y2 3 mul ub mul ub mul tb y3 3 mul ub mul
            y4 tb mul add mul add mul add translate
        y4 tb dup mul mul y3 tb mul 2 3 tb mul sub mul add y2 ub mul 1 3 tb mul
            sub mul add y1 ub dup mul mul sub 3 mul
        x4 tb dup mul mul x3 tb mul 2 3 tb mul sub mul add x2 ub mul 1 3 tb mul
            sub mul add x1 ub dup mul mul sub 3 mul
        atan rotate
        flip { -90 }{ 90 } ifelse
        drawarrow
    } if
%
    grestore
} def }
%
%		#] dashdoublebezier : 
%		#[ lengthofbezier :
%
%       Calculates the length of a Bezier curve assuming that we start
%       in the point 0,0. We use a Gaussian quadrature with 16 points.
%       If, at any time, more precision is needed we have the 32 points
%       numbers in axohelp.c. (and there is more commentary in that file)
%
\special{!
    /g16x1 { 0.095012509837637440185 } def
    /g16x2 { 0.281603550779258913230 } def
    /g16x3 { 0.458016777657227386342 } def
    /g16x4 { 0.617876244402643748447 } def
    /g16x5 { 0.755404408355003033895 } def
    /g16x6 { 0.865631202387831743880 } def
    /g16x7 { 0.944575023073232576078 } def
    /g16x8 { 0.989400934991649932596 } def
    /g16w1 { 0.189450610455068496285 } def
    /g16w2 { 0.182603415044923588867 } def
    /g16w3 { 0.169156519395002538189 } def
    /g16w4 { 0.149595988816576732081 } def
    /g16w5 { 0.124628971255533872052 } def
    /g16w6 { 0.095158511682492784810 } def
    /g16w7 { 0.062253523938647892863 } def
    /g16w8 { 0.027152459411754094852 } def
    /onepoint {
         /gpt ed
         /tpt 1 gpt add 2 div tmax mul def
         xc tpt mul xb add tpt mul xa add dup mul
         yc tpt mul yb add tpt mul ya add dup mul
         add sqrt
         /tpt 1 gpt sub 2 div tmax mul def
         xc tpt mul xb add tpt mul xa add dup mul
         yc tpt mul yb add tpt mul ya add dup mul
         add sqrt add 2 div
    } def
    /lengthofbezier {
         /tmax ed
         pp3 pp2 pp1
         /xa xx1 3 mul def /xb xx2 xx1 2 mul sub 6 mul def
         /xc xx3 xx2 xx1 sub 3 mul sub 3 mul def
         /ya yy1 3 mul def /yb yy2 yy1 2 mul sub 6 mul def
         /yc yy3 yy2 yy1 sub 3 mul sub 3 mul def
%
         g16x1 onepoint g16w1 mul
         g16x2 onepoint g16w2 mul add
         g16x3 onepoint g16w3 mul add
         g16x4 onepoint g16w4 mul add
         g16x5 onepoint g16w5 mul add
         g16x6 onepoint g16w6 mul add
         g16x7 onepoint g16w7 mul add
         g16x8 onepoint g16w8 mul add
         tmax mul
    } def
}
%		#] lengthofbezier : 
%		#[ axogrid :
%
\special{! /axogrid{
    gsw translate
    /ny ed /nx ed /dy ed /dx ed
    /maxx nx dx mul def
    /maxy ny dy mul def
    0 1 nx {
        newpath dx mul dup 0 moveto maxy lineto stroke
    } for
    0 1 ny {
        newpath maxx exch dy mul dup 0 exch moveto lineto stroke
    } for
} def }
%
%		#] axogrid : 
} 
%		#] PostScript preamble : 
%		#[ axoparray : Puts an array of 2-dim points
%
%       Puts a sequence of points in the notation (x1,y1)(x2,y2)....
%       on the Postscript stack. This is for Curve and DashCurve.
%
\let\eind=]
%
\def\axoparray(#1,#2)#3{#1 \axoxo\space add #2 \axoyo\space add \ifx #3\eind\else
\expandafter\axoparray\fi#3}
%
%		#] axoparray : 
%
\fi
% 	#] Postscript specific : 
% 	#[ PDF specific :
%
%   Here are the routines that are used purely for the PDF output.
%   The main concern here is the communication with the axohelp program.
%
\ifcase\axo@pdfoutput\else
%
%		#[ getaxohelp :
%
%       This is the command that makes the PDF work. Use as in
%           getaxohelp{NameOfFunction}{parameters to be passed}
%       The format is very precise. If axohelp is not happy there will
%       be no output. The most common error is that the parameters are
%       not separated by black spaces. Some \space might have to be inserted.
%       The reason we do not separate the parameters by comma's is that
%       both Postscript and PDF want their objects separated by blanks.
%       Also a separation by blanks makes the parameters into separate
%       arguments in the call to axohelp. Our colors need blanks....
%
%
\def\getoneline#1#2{%
    % Set the command of name #1 to the next line of the file
    % for which the input stream number is #2.
    \def\tmpfh{#2}%
    \ifeof\tmpfh
    \else
       \read\tmpfh to \tmpline
    \fi
    \ifeof\tmpfh
       \@namedef{#1}{}%
    \else
       \expandafter \let \csname #1\endcsname = \tmpline
    \fi
}
%
\def\getaxohelp#1#2{%
    \def\axohelp{}%
    \stepcounter{axo@objectIndex}%
    \def\axo@currentInput{#1 #2;}%
    \immediate\write\axo@spec{[\arabic{axo@objectIndex}]\space \axo@currentInput}%
    \ifaxo@axohelpRerun%
    \else%
        \def\axo@currentInput{{#1 #2;}}%
        \getoneline{axo@partOne}\axo@axohelpFile%
        \catcode`\ =13%
        \getoneline{axo@partTwo}\axo@axohelpFile%
        \catcode`\ =10%
        \getoneline{axo@partThree}\axo@axohelpFile%
        \ifeof\axo@axohelpFile
            \rlap{New object; rerun axohelp}%
            \global\axo@axohelpReruntrue
        \else
            \ifthenelse{\equal{\axo@partTwo}{\axo@currentInput}}%
             {%  Current definition is same as the one processed
              %  by axohelp, so it is safe to use
                 \expandafter\def\expandafter\axohelp\axo@partThree%
             }%
             {%
                 \rlap{Changed object; rerun axohelp}%
                 \global\axo@axohelpReruntrue
             }%
        \fi
    \fi%
}
%
%		#] getaxohelp : 
%		#[ Use the axohelp output :
%
% Implement conversion of length unit from pt to bp by scaling
\def\contentspdf{q \axoscale\space 0 0 \axoscale\space 0 0 cm 
                   0.99626401 0 0 0.99626401 0 0 cm
                   1 0 0 1 \axoxo\space \axoyo\space cm
                   \axohelp\space
                 Q}
\def\contentspdfNoOffset{q \axoscale\space 0 0 \axoscale\space 0 0 cm
                           0.99626401 0 0 0.99626401 0 0 cm
                           \axohelp\space
                         Q}
%
%		#] Use the axohelp output : 
%
\fi
% 	#] PDF specific : 

% Process options now, after all potentially necessary commands have
% been defined.  Use starred form, so that the options are processed
% in the order the user writes them.  Also set defaults here.
\PSTextScalesLikeGraphicstrue
\canvasScaleObjectScale
\ProcessOptions*