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
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Package `VauCanSon-G' version 0.4
%%
%% This is file `VCManual-080612.tex'.
%%
%% IMPORTANT NOTICE:
%%
%% Copyright (C) 2002-2008 Sylvain Lombardy and Jacques Sakarovitch
%%
%% This package may be distributed under the terms of the LaTeX Project
%% Public License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
%% DESCRIPTION:
%%
%% `VCManual-080612.tex' is the tex file for VauCanSon-G user's and
%% reference manual.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt,twoside]{article}
%
\textheight=220mm % mieux vaut mettre ces
\textwidth=150mm % valeurs en ``parametres''
%%%%% output control flags
\newif\ifdraft \draftfalse % \drafttrue %% visualise columns
\newif\ifital \italfalse % \italtrue %% "italian" printing
%%%%% package calls
\usepackage{latexsym,ifthen}
\usepackage{theorem}
\usepackage{xspace}
\usepackage{amsmath,amsfonts,amscd,amssymb}
\usepackage{makeidx}
\usepackage{subfigure}
\usepackage{vaucanson-g}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% layout
\topmargin=297mm
\advance \topmargin by -\textheight
\divide \topmargin by 2
\advance \topmargin by -1in
%
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
%
\leftmargin=210mm
\advance \leftmargin by -\textwidth
\divide \leftmargin by 2
\advance \leftmargin by -1in
%
\oddsidemargin=\leftmargin
\evensidemargin=\leftmargin
%
\abovedisplayskip=3mm
\belowdisplayskip=3mm
\abovedisplayshortskip=0mm
\belowdisplayshortskip=2mm
\unitlength=1mm
%%%%%
\addtolength{\parskip}{0.3\baselineskip}
\renewcommand{\baselinestretch}{1.1}
%%%%%%%%%%%%%%%% colonne + figure %%%%%%%%%%%%%%%%%
\newlength{\ExtendedTextWidth} % largeur du dbordement
% % pour les figure qui dbordent
\newlength{\ColoText}% largeur de la colonne "de texte"
\newlength{\ColoFigu}% largeur de la colonne "de figure"
\newlength{\fboxseptemp} % pour pouvoir restituerla valeur normale
\setlength{\fboxseptemp}{\fboxsep}% parce qu'on va coller le cadre
% % pour le draft
\newlength{\parindenttemp} % pour mettre une indentation
% % dans les minipages
\setlength{\parindenttemp}{\parindent}
%\setlength{\fboxsep}{\fboxseptemp}
\setlength{\ExtendedTextWidth}{\marginparwidth}
% \addtolength{\ExtendedTextWidth}{\marginparsep} % \retraita
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\TextFigu}[3][.66]{%
% \setlength{\fboxsep}{0pt}% mod 000912
% annul seulement en draft
\setlength{\ColoText}{#1\textwidth}%
\setlength{\ColoFigu}{\textwidth}%
\addtolength{\ColoFigu}{-\ColoText}%
\addtolength{\ColoText}{-.6em}%
\addtolength{\ColoFigu}{-.6em}%
\noi
\ifdraft
\setlength{\fboxsep}{0pt}% mod 000912
\fbox{%
\begin{minipage}[t]{\ColoText}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
#2
\end{minipage}}%
\hspace*{1.2em}%
\fbox{%
\begin{minipage}[t]{\ColoFigu}%
\par\vspace*{0mm}%
#3%
\end{minipage}}
\else
\begin{minipage}[t]{\ColoText}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
#2
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
\par\vspace*{0mm}% pour l'alignement sur le haut
#3%
\end{minipage}%
\fi%
\setlength{\fboxsep}{\fboxseptemp}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Modifications pour le header et le footer
\makeatletter
\def\ps@jsheadings%
{\let\@mkboth\@gobbletwo
\def\@oddhead{\hbox{} {\jsoddheadleft} \hfil
{\jsoddheadcenter} \hfil
{\jsoddheadright} \hbox{}}%
\def\@oddfoot{\hbox{} {\jsoddfootleft} \hfil
{\jsoddfootcenter} \hfil
{\jsoddfootright} \hbox{}}%
\def\@evenhead{\hbox{} {\jsevenheadleft} \hfil
{\jsevenheadcenter} \hfil
{\jsevenheadright} \hbox{}}%
\def\@evenfoot{\hbox{} {\jsevenfootleft} \hfil
{\jsevenfootcenter} \hfil
{\jsevenfootright} \hbox{}}%
}
\makeatother
%
\newcommand{\jsoddheadleft}{\makebox[0pt][l]{\teteimpgauche}}
\newcommand{\jsoddheadcenter}{\makebox{\teteimpcentre}}
\newcommand{\jsoddheadright}{\makebox[0pt][r]{\teteimpdroit}}
\newcommand{\jsoddfootleft}{\makebox[0pt][l]{\piedimpgauche}}
\newcommand{\jsoddfootcenter}{\makebox{\piedimpcentre}}
\newcommand{\jsoddfootright}{\makebox[0pt][r]{\piedimpdroit}}
\newcommand{\jsevenheadleft}{\makebox[0pt][l]{\tetepairgauche}}
\newcommand{\jsevenheadcenter}{\makebox{\tetepaircentre}}
\newcommand{\jsevenheadright}{\makebox[0pt][r]{\tetepairdroit}}
\newcommand{\jsevenfootleft}{\makebox[0pt][l]{\piedpairgauche}}
\newcommand{\jsevenfootcenter}{\makebox{\piedpaircentre}}
\newcommand{\jsevenfootright}{\makebox[0pt][r]{\piedpairdroit}}
%
\newcommand{\teteimpgauche}{}
\newcommand{\teteimpcentre}{{\footnotesize \textsl{\tetedroit}}}
\newcommand{\teteimpdroit}{}
\newcommand{\piedimpgauche}{{\scriptsize \piedgauche }}
\newcommand{\piedimpcentre}{\rm \thepage}
\newcommand{\piedimpdroit}{{\scriptsize \pieddroit }}
\newcommand{\tetepairgauche}{}
\newcommand{\tetepaircentre}{{\footnotesize \textsl{\tetegauche}}}
\newcommand{\tetepairdroit}{}
\newcommand{\piedpairgauche}{{\scriptsize \piedgauche }}
\newcommand{\piedpaircentre}{\rm \thepage}
\newcommand{\piedpairdroit}{{\scriptsize \pieddroit }}
%
\newcommand{\tetegauche}{} % ATTENTION tete de la page de gauche
\newcommand{\tetedroit}{} % ATTENTION tete de la page de droite
\newcommand{\piedgauche}{} % ATTENTION gauche du pied de page
\newcommand{\pieddroit}{} % ATTENTION droite du pied de page
%
\pagestyle{jsheadings}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Modifications pour sections
\makeatletter
\def\thesection {\arabic{section}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Modifications pour les figures
\makeatletter
\def\thefigure{\@arabic\c@figure}
\def\fps@figure{ht}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macros pour la mise en page
% espaces de lignes negatifs
\newcommand{\bigskipneg}{\vspace*{-5ex}} %960728
\newcommand{\medskipneg}{\vspace*{-2ex}} %960728
\newcommand{\smallskipneg}{\vspace*{-1ex}} %960728
\newcommand{\miniskipneg}{\vspace*{-0.25ex}} %960728
\newcommand{\skipneg}{\vspace*{-0.5cm}}
% indentation
\newcommand{\noi}{\noindent}
\newlength{\retraita} % retrait pour i), ii), a), etc.
\setlength{\retraita}{2.4em} % retrait pour i), ii), a), etc.
%
\newcommand{\jsreta}{\hspace*{-.5\retraita}}
\newcommand{\e}{\text{\quad}} % un moins petit espace
\newcommand{\ee}{\text{\qquad}} % un espace
\newcommand{\eee}{\text{\qquad \qquad}} % et un grand
% separateurs
\newcommand{\tristar}{{\begin{center} * \qquad * \\\ * \ \ \end{center}}}
\newcommand{\jsetoile}{{\begin{center} * \end{center}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% \section{abr. latines}
\newcommand{\acontrario}{{\itshape a contrario}\xspace } %
\newcommand{\ah}{{\itshape ad hoc}\xspace } % pour compatibilit
\newcommand{\adhoc}{{\itshape ad hoc}\xspace }
\newcommand{\apriorinosp}{{\itshape a priori}\xspace } % pas de blanc final
\newcommand{\apriori}{{\itshape a priori}\xspace } %
\newcommand{\afortiori}{{\itshape a fortiori}\xspace }
\newcommand{\artcit}{{\itshape art. cit.}\xspace }
\newcommand{\cf}{{\itshape cf.}\xspace }
\newcommand{\Cf}{{\itshape Cf.}\xspace }
\newcommand{\eg}{{\itshape e.g.}\xspace }
\newcommand{\etalii}{{\itshape et~al.}\xspace }
\newcommand{\etc}{{\itshape etc.}\xspace } % pas de blanc laiss aprs etc.
\newcommand{\ibid}{{\itshape ibid.}\xspace }
\newcommand{\idem}{{\itshape idem}\xspace }
\newcommand{\ie}{{\itshape i.e.}\xspace }
\newcommand{\infra}{{\itshape infra}\xspace }
\newcommand{\ipsofacto}{{\itshape ipso facto}\xspace }
\newcommand{\itin}{{\itshape in}\xspace }
\newcommand{\modulo}{{\itshape modulo}\xspace }
\newcommand{\mutmat}{{\itshape mutatis mutandis}\xspace } % pas de blanc final
\newcommand{\nb}{\noindent \mbox{\sc nota bene.}\xspace }
\newcommand{\opcit}{{\itshape op. cit.}\xspace }
\newcommand{\opcitnosp}{{\itshape op. cit.}}
\newcommand{\sed}{{\itshape sed}\xspace }
\newcommand{\sqq}{{\itshape sqq.}\xspace }
\newcommand{\supra}{{\itshape supra}\xspace }
\newcommand{\via}{{\itshape via}\xspace }
\newcommand{\vv}{{\itshape vice versa}\xspace } %960728 enlev le blanc final
\newcommand{\verbat}{{\itshape verbatim}\xspace } % pas de blanc final
\newcommand{\jsleq}{\leqslant }
\newcommand{\jsgeq}{\geqslant }
%%%%% tuning of two column macros
\newlength{\jsIndent}% largeur de la colonne "de figure"
\setlength{\jsIndent}{1.8cm}%
\setlength{\ColoText}{.3\textwidth}%
\setlength{\ColoFigu}{\textwidth}%
\addtolength{\ColoFigu}{-\ColoText}%
\addtolength{\ColoText}{-.6em}%
\addtolength{\ColoFigu}{-.6em}%
\addtolength{\ColoText}{\jsIndent}
%
\newlength{\ColSource}% largeur de la colonne "de texte"
\newlength{\ColFigur}% largeur de la colonne "de figure"
\setlength{\ColSource}{.7\textwidth}%
\setlength{\ColFigur}{\textwidth}%
\addtolength{\ColFigur}{-\ColSource}%
\addtolength{\ColSource}{-.6em}%
\addtolength{\ColFigur}{-.6em}%
\addtolength{\ColFigur}{\jsIndent}
%
\renewcommand{\tetegauche}{\VCSG manual} %ATTN tete de la page de gauche
\renewcommand{\tetedroit}{\VCSG manual} %ATTN tete de la page de droite
\renewcommand{\piedgauche}{Version 0.4}%ATTN gauche du pied de page
\renewcommand{\pieddroit}{October 27., 2008} %ATTN droite du pied de page
\renewcommand{\piedimpcentre}{--~~\rm \thepage ~~--}
\renewcommand{\piedpaircentre}{--~~\rm \thepage ~~--}
%%%%%
\newcommand{\sep}%
{\begin{center}
--- $\circ$ ---
\end{center}}
\newcommand{\PSTricks}{\texttt{PSTricks}\xspace}
\newcommand{\URLtilde}{${\scriptstyle\pmb{\sim}}$}
\makeindex
%%%%%
%\ShowFrame
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%
\ifital \thispagestyle{empty}\mbox{ }\clearpage%
\addtocounter{page}{-1}\fi
%
\title{{\LARGE \VCSG}\\
A package for drawing automata and graphs\\
\smallskip
{\large User's manual}}
\author{%
\textsl{Sylvain Lombardy}\\[0.5ex]
{\normalsize IGM-LabInfo , Univ. Paris-Est}%
\and
\textsl{Jacques Sakarovitch}\\[0.5ex]
{\normalsize LTCI, CNRS / TELECOM ParisTech}%
}
\date{October 27., 2008}
\maketitle
\begin{center}
{\large Version 0.4}
\end{center}
\sep
%
\VCSG is a package that allows to draw automata within
texts written using \LaTeX.
It is a set of macros that uses commands of the beautiful \PSTricks package,
due to Timothy van Zandt\footnote{%
The maintenance and evolution of \PSTricks has now been taken over by H.~Voss.}
and which is part of
the current \LaTeX\ distribution.
\VCSG is the result of the experience gained in composing the several
hundreds of
figures in the book \emph{El\'ements de th\'eorie des automates}
(\cite{Sak01}) and in several other papers and conferences slides
of the authors.
The design of \VCSG implements the following
underlying philosophy:
\begin{enumerate}
\item `simple' automata should be
described with simple commands.
\item Every element of a figure can easily be given a style
(which differs from the implicit one).
\item The complexity of commands (or the number of things to be remembered
to use them) should gradually grow with the complexity of the figure
composed by these commands.
\item It should be possible to handle the figures both in size and
appearance without modifying them.
\end{enumerate}
The following example\footnote{%
somewhat artificial but which exhibits most of the simple commands.}
shows how a simple automaton can be drawn
with commands, in which only the minimal information needed (position
and label of states, shape and label of transitions) is made explicit.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[p]{(0,0)}{A}\State{(3,0)}{B}
\State[r]{(6,0)}{C}
%
\Initial{A}\Final{C}
% transitions
\EdgeL{A}{B}{a}
\ArcL{B}{C}{b}\ArcL{C}{B}{b}
\LoopN{A}{a}\LoopS{C}{d}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[p]{(0,0)}{A} \State{(3,0)}{B} \State[r]{(6,0)}{C}
% initial--final
\Initial{A} \Final{C}
% transitions
\EdgeL{A}{B}{a} \ArcL{B}{C}{b} \ArcL{C}{B}{b}
\LoopN{A}{a} \LoopS{C}{d}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\bigskip \bigskip
The objectives of \VCSG are achieved by the implicit definition of a
large number of
parameters that control the geometry of the figure: size of states,
width of lines, \etc
and by the definition of commands that allow to
handle and modify these parameters.
The following pages gives a presentation of \VCSG that
gradually introduces the commands from the basic ones that allow
to draw already a good deal of automata to the more
sophisticated ones that are used to modify the internal parameters.
\setcounter{tocdepth}{1}
~
{\small
\tableofcontents
}
\newpage
\addtocounter{section}{-1}
%%%%%%%%%%%%%%%%%%%%%%
\section{Downloading and using the package}\label{sec.d}
The \VCSG package is downloadable from the URL:
\texttt{/igm.univ-mlv.fr/\URLtilde lombardy/Vaucanson-G/}
\noindent
and consists, beside the present manual, in seven files:
the wrapper \texttt{vaucanson-g.sty},
the main macro file \texttt{VauCanSon-G.tex},
and five other ancillary files\footnote{%
{\it Cf.} Section~\ref{sec.mod} for an explanation on the role of
these files.}
for options, patches and colors:
\texttt{VCPref-default.tex},
\texttt{VCPref-slides.tex},
\texttt{VCPref-beamer.tex},
\texttt{VCPref-mystyle.tex},
\texttt{VCColor-names.def}
\index{VCPref-default}%
\index{VCPref-slides}%
\index{VCPref-beamer}%
\index{VCPref-mystyle}%
\index{VCColor-names.def}%
that should all be stored in the user's \texttt{texinputs} directory.
A \LaTeX\ file that will use \VCSG macros should contain the call to
the wrapper in the preamble:
\verb+\usepackage{vaucanson-g}+
The \VCSG commands are to be used in a \LaTeX\ file and not in a plain \TeX\
file for it uses the macro \verb+\newcommand+ that does not exist in \TeX.
\VCSG is based on the \PSTricks package.
The knowledge of this macro package,
described in \cite{Girou94}, \cite[Ch.~4]{GRM97},
\cite{GRMRV07}, \cite{Voss07},
is not necessary to use the \VCSG commands.\footnote{%
It probably helps in understanding how they are built, and is
useful if one wants to make figures that consists of automata but
also contains other graphical elements
({\it cf.} Section~\ref{sec.pla}).}
On the contrary, \VCSG has somehow be written to save on it.
In particular, the \VCSG commands follow the simple (and rigid)
syntax of \LaTeX\ commands concerning the way the arguments are
specified, and not the much more flexible syntax of \PSTricks itself.
But the call to \PSTricks commands has the consequence that \VCSG
commands generate pieces of \texttt{Postscript} files which in turn
has two main outcomes\footnote{%
which a user should have in mind before sending complaint and
request.}:
\begin{itemize}
\item \VCSG is not compatible with \verb+pdflatex+ ;
\item the figures produced with \VCSG are not likely to be
seen on a \texttt{DVI} viewer: the space occupied by the figure
will appear empty and, in most cases, the labels will appear
at the bottom of it.
\end{itemize}
% %%%%%%%%%%%%%%%%%%%ù
% \section{Using Beamer document class}
\VCSG can be used with the \texttt{beamer} document class to design slides.
The document class
\index{beamer class}%
should be called with {\tt xcolor=pst,dvips} options:
\verb+\documentclass[xcolor=pst,dvips]{beamer}+.
\noindent
Thus equipped, we may begin.
%%%%%%%%%%%%%%%%%%%%%%
\section{Basic commands}\label{sec.b}
An automaton is a \emph{labelled directed graph} where some of the vertices,
called \emph{states}, are distinguished to be \emph{initial} or
\emph{final} states.
The basic commands allow then \emph{to define} and \emph{to draw}
states, to give them the quality of being initial or final and to give
them \emph{labels} as well.
They allow to draw \emph{transitions}
between states (that have been defined before);
there are 3 kinds of transitions: \emph{(straight) edges}, \emph{arcs} and
\emph{loops}.
These commands have to be put in an environment that defines \emph{a
picture}.
All graphical parameters of these elements (size, line width, \etc )
are kept implicit when using these basic commands.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{The \texttt{VCPicture} environment}\label{subsec.pic}
\index{VCPicture}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\begin{VCPicture}{+($x_{0}$, $y_{0}$)($x_{1}$, $y_{1}$)\verb+}+
\ldots
\verb+\end{VCPicture}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Defines a box that ``encloses'' the elements defined in the
environment.
Its lower left (resp. upper right) corner has
coordinates~($x_{0}$, $y_{0}$) (resp.~($x_{1}$, $y_{1}$)).
\end{minipage}%
\medskip
The~$x_{i}$ and~$y_{i}$ are either \emph{length} or \emph{numbers} in
which case they represent the corresponding length in centimeter (which
is the implicit length unit used in \VCSG).
The length of the box is thus~$x_{1}-x_{0}$, its
height~$y_{1}-y_{0}$, its \emph{baseline point} stands at the middle
of the height.
As usual in \TeX, a picture may well ``contain'' an element that
actually lays outside of the box.
Note that the environment has only \emph{one} argument consisting of \emph{two}
point coordinates enclosed in adjacent parentheses.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{The \texttt{State} commands}\label{subsec.sta}
\index{State}
States are represented by circles, inside which an information (the
\emph{Label}) can be written.
Every state is given a \emph{Name} which is used then internally in the figure to describe the
transitions that start from it or end at it.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\State[+\textsl{Label}\verb+]{+%
$(x,y)$\verb+}{+%
\textsl{Name}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Defines a state with name \textsl{Name} and draws it
at the coordinate~$(x,y)$ with label \textsl{Label} written inside.
\end{minipage}%
\medskip
\noi
The parameter \textsl{Label} is optional; default value is the empty
string.
It is written in `\TeX\ mathmode'.
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Initial[+\textsl{Dir}\verb+]{+%
\textsl{Name}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Makes the state \textsl{Name} initial, \ie draws an incoming arrow
from the direction \textsl{Dir} to state {\sl Name}.
\end{minipage}%
\index{Initial}\index{Final}
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Final[+\textsl{Dir}\verb+]{+%
\textsl{Name}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Makes the state \textsl{Name} final, \ie draws an outgoing arrow
from state {\sl Name} in the direction \textsl{Dir}.
\end{minipage}%
\medskip
\noi
The parameter \textsl{Dir} is optional; the possible values are the
eight main
compass points: {\sl n}, {\sl s}, {\sl e}, {\sl w}, {\sl ne}, {\sl
nw}, {\sl se} and {\sl sw}.
Default value is {\sl w} for \verb+\Initial+,
{\sl e} for \verb+\Final+.
Many authors, in particular those dealing with automata on infinite words,
rather indicate that a state is final by drawing it with doubleline.
The reason why it is not possible to achieve this result by a sequence of
two commands comes from the \PSTricks macros that are called by the \VCSG
commands.
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\FinalState[+\textsl{Label}\verb+]{+%
$(x,y)$\verb+}{+%
\textsl{Name}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Same as \verb+\State+ but draws state \textsl{Name}
with a doubleline which is a common way to indicate that a state is final.
\index{FinalState}
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[p]{(0,1)}{A} \State{(2,-1)}{B} \State[r]{(4,1)}{C}
\FinalState[r]{(6,-1)}{D}
% initial--final
\Initial{A} \Final{A}
\Initial[ne]{B}\Initial[nw]{B}
\Initial[se]{B}\Initial[sw]{B}
\Initial{C} \Final[w]{C} \Initial[n]{D} \Final[s]{D}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[p]{(0,1)}{A} \State{(2,-1)}{B} \State[r]{(4,1)}{C}
\FinalState[r]{(6,-1)}{D}
% initial--final
\InitialL{A} \Final{A}
\Initial[ne]{B} \Initial[nw]{B}
\Initial[se]{B} \Initial[sw]{B}
\Initial{C} \Final[w]{C} \Initial[n]{D} \Final[s]{D}
%
\end{VCPicture}%
\end{verbatim}
\normalsize
\end{minipage}%
%\newpage
%%%%%%%%%%%%%%%%%%%%%%
\subsection{The \texttt{Edge} commands}\label{subsec.edg}
Edges, like the other transitions, are \emph{oriented} from the origin
state to the end state.
The \emph{left} and the \emph{right} sides of a transition are defined
with respect to this orientation, being the left and the right hand of
someone standing on the origin state and following
the transition towards the end state.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\footnotesize
\verb+\EdgeL[+\textsl{Pos}\verb+]{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\medskip
\verb+\EdgeR[+\textsl{Pos}\verb+]{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draws a straight transition from the state \textsl{Start} to the
state \textsl{End} with the label \textsl{Label} on the left side
for \verb+\EdgeL+, on the right side for \verb+\EdgeR+.\index{Edge}
\end{minipage}%
\medskip
\noi
The parameter {\sl Pos} is optional.
It is a number ($0\jsleq \text{{\sl Pos}} \jsleq 1$) that defines the
position of the label on the edge.
Default value is~$.45$ and may be used most of the time ---
this slight disymmetry gives some ``dynamic'' to the figure.
Explicit value for {\sl Pos} is used to avoid collision with other
elements of the figure.
As for states, the label is written in `\TeX\ mathmode'.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\State[D]{(6,0)}{D}
% transitions
\EdgeR{A}{B}{a} \EdgeL{A}{C}{b} \EdgeR{B}{D}{c}
\EdgeL{C}{D}{d} \EdgeL{C}{B}{} \EdgeL[.3]{A}{D}{x}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\State[D]{(6,0)}{D}
% transitions
\EdgeR{A}{B}{a} \EdgeL{A}{C}{b} \EdgeR{B}{D}{c}
\EdgeL{C}{D}{d} \EdgeL{C}{B}{} \EdgeL[.3]{A}{D}{x}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\subsection{The \texttt{Arc} commands}\label{subsec.arc}
Arcs are transitions that link the {\sl Start} state to the {\sl End}
state with a curved line.
The main parameter of such a curve is the \emph{angle} made at both
ends by the curve with the straight line that goes from {\sl Start} to
{\sl End} and it can be oriented to the \emph{left} or to the
\emph{right}.
In the sequel, the letter \texttt{\textsl{X}} stands for either \verb+L+
or \verb+R+.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\footnotesize
\verb+\Arc+\texttt{\textsl{X}}\verb+[+\textsl{Pos}\verb+]{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\medskip
\verb+\LArc+\texttt{\textsl{X}}\verb+[+\textsl{Pos}\verb+]{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Same syntax as \verb+\Edge+\texttt{\textsl{X}}.\index{Arc}\index{LArc}
The starting angle is~$15^o$ for \verb+Arc+\texttt{\textsl{X}},
$30^o$ for \verb+LArc+\texttt{\textsl{X}}\verb++.
Parameter {\sl Pos} is optional.
Default value is~$.4$ .
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B} \Final[n]{C}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b} \LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ArcL{A}{B}{a'} \EdgeR{A}{C}{b'} \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B} \Final[n]{C}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b} \LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ArcL{A}{B}{a'} \EdgeR{A}{C}{b'} \EdgeL{B}{D}{c'}
\LArcR{C}{D}{d'}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\subsection{The \texttt{Loop} commands}\label{subsec.loo}
Loops are transitions that link a state to itself, a state which is
thus both the origin and the end of the transition.
The two main parameters of such a loop are the \emph{opening angle}
and the \emph{direction} of the loop.
In the sequel, the letter \texttt{\textsl{Y}} stands for any of the compass
points: \verb+N+, \verb+S+, \verb+E+, \verb+W+, \verb+NE+, \verb+NW+,
\verb+SE+ or \verb+SW+.\index{Loop}\index{CLoop}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\footnotesize
\verb+\Loop+\texttt{\textsl{Y}}\verb+[+\textsl{Pos}\verb+]{+%
\textsl{Name}\verb+}{+%
\textsl{Label}\verb+}+
\medskip
\verb+\CLoop+\texttt{\textsl{Y}}\verb+[+\textsl{Pos}\verb+]{+%
\textsl{Name}\verb+}{+%
\textsl{Label}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draw a loop around the state {\sl Name} with label {\sl Label}.
The direction of the loop is given by \texttt{\textsl{Y}}.
The opening of the loop is~$60^o$ for the \verb+Loop+\texttt{\textsl{Y}}\verb++ commands,
$44^o$ for the \verb+CLoop+\texttt{\textsl{Y}}\verb++ commands.
Parameter {\sl Pos} is optional.
Default value is~$.25$ .
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-3)(7,3)}
% states
\State[A]{(0,0)}{A} \State[B]{(3,-2)}{B} \State[C]{(3,2)}{C}
\State[D]{(6,0)}{D}
% transitions
\LoopE{A}{e} \LoopW{A}{w} \LoopS{A}{s} \LoopN[.5]{A}{n}
% \LoopNE{B}{ne} \LoopNW[.5]{B}{nw}
\LoopSE[.5]{B}{se} \LoopSW[.5]{B}{sw}
\CLoopNE[.6]{C}{ne} \CLoopNW[.6]{C}{nw}
% \CLoopSE[.5]{C}{se} \CLoopSW[.5]{C}{sw}
\CLoopE{D}{e} \CLoopW{D}{w} \CLoopS{D}{s} \CLoopN[.5]{D}{n}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-3)(7,3)}
% states
\State[A]{(0,0)}{A} \State[B]{(3,-2)}{B} \State[C]{(3,2)}{C}
\State[D]{(6,0)}{D}
% transitions
\LoopE{A}{e} \LoopW{A}{w} \LoopS{A}{s} \LoopN[.5]{A}{n}
\LoopSE[.5]{B}{se} \LoopSW[.5]{B}{sw}
\CLoopNE[.6]{C}{ne} \CLoopNW[.6]{C}{nw}
\CLoopE{D}{e} \CLoopW{D}{w} \CLoopS{D}{s} \CLoopN[.5]{D}{n}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\subsection{An example}\label{subsec.ex1}
This is an automaton with multiplicity in $\mathbb{N}$.
The multiplicity of a word~$u$ is the square of the number represented by~$u$
in base~$2$, when~$a$ is interpreted as~$0$ and $b$ as~$1$.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[i]{(0,0)}{A} \State[q]{(3,0)}{B} \State[t]{(6,0)}{C}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopN{A}{a} \LoopS{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopN[.75]{C}{4a} \LoopS[.75]{C}{4b}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[i]{(0,0)}{A} \State[q]{(3,0)}{B} \State[t]{(6,0)}{C}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopN{A}{a} \LoopS{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopN[.75]{C}{4a} \LoopS[.75]{C}{4b}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\section{Using preset parameters}\label{sec.pre}
Together with the basic commands, \VCSG gives easy access to two convenient
parameters for drawing automata: global scaling and state size.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Global scaling}\label{subsec.sca}
The meticulous reader has noticed that the actual size, mesured for
instance by the distance between the states, is not the one given in
the source code.
This is because we have slightly cheated and the source code of the
picture is indeed encapsulated in a \verb+\VCDraw+ command that uses
a preset parameter \verb+\VCScale+ as shown below, with no
cheating anymore.
\index{VCScale}\index{VCDraw}
\ShowFrame
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskipneg
\begin{center}
\begin{VCPicture}{(0,-1)(3,1)}
\State[p]{(0,0)}{A} \State[q]{(3,0)}{B}%
\end{VCPicture}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-1)(3,1)}
\State[p]{(0,0)}{A} \State[q]{(3,0)}{B}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\begin{center}
\VCDraw{%
\begin{VCPicture}{(0,-1)(3,1)}
\State[p]{(0,0)}{A} \State[q]{(3,0)}{B}%
\end{VCPicture}}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\VCDraw{%
\begin{VCPicture}{(0,-1)(3,1)}
\State[p]{(0,0)}{A} \State[q]{(3,0)}{B}%
\end{VCPicture}}
\end{verbatim}
\normalsize
\end{minipage}%
\medskip
\noi
Frames that appear on figures below are an option of \VCSG that we
shall see later. They point out the effect of the scale.
\medskip
\noi
There is no reason indeed for an author to ``program'' the drawing of
an automaton at the size it will appear on his, or her,
paper.
On the contrary, he, or she, is likely to sketch the figure on a
ruled paper at a larger scale, giving the points to be defined integer
coordinates.
And then she, or he, will try to put the figure within the text at a
reasonable size and thus would like to scale it.
The parameter \verb+\VCScale+ contains this global scaling factor and is
initialized to the value \verb+0.6+ , which corresponds to the
command \verb+\MediumPicture+.
Three other commands:
\verb+\TinyPicture+ ,
\verb+\SmallPicture+ and
\verb+\LargePicture+
are available, that set \verb+\VCScale+ to the values
\verb+0.42+ ,
\verb+0.5+ and
\verb+0.85+ respectively.
\index{MediumPicture}\index{TinyPicture}\index{SmallPicture}
\index{LargePicture}
These command have to be used \emph{outside} the scope of the
\verb+VCPicture+ environment; and this environment should be called
as the parameter of a \verb+\VCDraw+ .
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur-.7cm}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\TinyPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\SmallPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\MediumPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\LargePicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource+.7cm}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\TinyPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\SmallPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\MediumPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\LargePicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(1,1)}\State[p]{(0,0)}{A}\end{VCPicture}}
\end{verbatim}
\normalsize
\end{minipage}%
\HideFrame
% \medskip
\noi
In the sequel, and unless otherwise stated,
all the figure will be given at the \verb+\MediumPicture+
scale without mentionning the command \verb+\VCDraw+ in the source code.
% \smallskipneg
%%%%%%%%%%%%%%%%%%%%%%
\subsection{State size}\label{subsec.siz1}
There are \emph{three preset sizes} for the states, that are called by the
commands \verb+\SmallState+, \verb+\MediumState+ and
\verb+\LargeState+, that call for states of diameter
\verb+0.6cm+, \verb+0.9cm+ and \verb+1.2cm+ respectively.
The implicit size, \ie the one that states have if no explicit command
is given, is \verb+\MediumState+.
The ``small'' states are not likely to receive labels, unless their
size are changed by other commands.
\index{SmallState}\index{MediumState}\index{LargeState}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur-.7cm}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A}
\SmallState\State{(2,-2)}{B}
\MediumState\State[C]{(4,2)}{C}
\LargeState\State[D]{(6,0)}{D}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource+.7cm}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A}
\SmallState\State{(2,-2)}{B}
\MediumState\State[C]{(4,2)}{C}
\LargeState\State[D]{(6,0)}{D}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
% \medskip
\noi
When called outside the scope of the environment \verb+\VCPicture+ the
commands \verb+\SmallState+, \verb+\MediumState+ and
\verb+\LargeState+ set the implicit size of the states in all
pictures from that point on.
\ShowFrame%
% \smallskipneg
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur-.7cm}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\SmallState
\scalebox{\VCScale}{%
\begin{VCPicture}{(-1,-1)(1,1)}
\State[A]{(0,0)}{A}
\end{VCPicture}%
}\e
\LargeState
\scalebox{\VCScale}{%
\begin{VCPicture}{(-1,-1)(1,1)}
\State[A]{(0,0)}{A}
\end{VCPicture}%
}\e
\MediumState
\scalebox{\VCScale}{%
\begin{VCPicture}{(-1,-1)(1,1)}
\State[A]{(0,0)}{A}
\end{VCPicture}%
}
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource+.7cm}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\SmallState
\begin{VCPicture}{(-1,-1)(1,1)}\State[A]{(0,0)}{A} \end{VCPicture}
\LargeState
\begin{VCPicture}{(-1,-1)(1,1)}\State[A]{(0,0)}{A} \end{VCPicture}
\MediumState
\begin{VCPicture}{(-1,-1)(1,1)}\State[A]{(0,0)}{A} \end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\HideFrame
% \smallskipneg
\subsection{Variable size states}\label{subsec.varst}
% \medskip
\noi
%Independently of the preset size --- in this instance, of the \emph{height} ---
One can draw states which will be called \emph{variable states} and whose
\emph{width} is variable and \emph{fits the width of the
label}.\footnote{%
This makes sense for long labels and it may be the case then that
the label is not a mathematical variable or expression any more
but simple text.
In order to write labels in \TeX\ LR mode, the easiest way is to
write it as the parameter of a $\backslash$\texttt{text} command,
provided the \texttt{amsmath} package has been called in the
preamble.}
The height of
\index{StateVar}
\index{text}
\index{amsmath}
these variable states is fixed by the current preset state size.
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\StateVar[+\textsl{Label}\verb+]{+%
$(x,y)$\verb+}{+%
\textsl{Name}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Same as syntax as \verb+\State+.
\end{minipage}%
% \clearpage
% \medskip
\noi
Note that the current version of \VCSG uses a trick to make these
states with adaptable width.
They look like Egyptian cartouches but they are indeed
\emph{rectangles} which can be observed when transitions reach these
states in an oblique way.
Arcs between variable states of different width will look asymmetric
and often ungainly.
Other loops than ``north'' and ``south'' loops should not be drawn
around variable states. Moreover, in order to draw loops that have the same appearance as loops
around standard states, one should use
\verb+\LoopVarN+ or \verb+\LoopVarS+
that have the same syntax as \verb+\LoopN+ or \verb+\LoopS+.
\index{LoopVarN}\index{LoopVarS}
Another possibility is to call the \verb+\VarLoopOn+ command to make
all the subsequent loops suited to variable states.
Switching back to `normal' loops is made by \verb+\VarLoopOff+.
\index{VarLoopOn}
\index{VarLoopOff}
For the same reason, it is \emph{not possible} to make a variable
state initial or final with diagonal arrows ($ne$, $nw$, $se$, $sw$).
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\SmallPicture\VCDraw{%
\begin{VCPicture}{(0,-3)(8,3)}
% states
\State[AA]{(0,2)}{A} \StateVar[AA]{(2.5,2)}{B}
\StateVar[(b a^{*} b)^{*}]{(7,2)}{C}
\LargeState
\State[AA]{(0,-2)}{A1} \StateVar[AA]{(2.5,-2)}{B1}
\StateVar[(b a^{*} b)^{*}]{(7,-2)}{C1}
%
\Initial[n]{B} \Final{C} \Initial[s]{B1} \Final{C1}
%
\EdgeL{A}{B}{a} \ArcL{B}{C}{b} \ArcL{C}{C1}{c} \EdgeL{B1}{C}{a}
\ArcL{A1}{B1}{a} \LArcR{A1}{B1}{b} \LArcR{B1}{C1}{b}
\LoopN{A}{c} \LoopVarN{C}{c}
\LoopS{A1}{c} \VarLoopOn\LoopS{C1}{c}\VarLoopOff
\end{VCPicture}}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\SmallPicture\VCDraw{\begin{VCPicture}{(0,-3)(8,3)}
% states
\State[AA]{(0,2)}{A} \StateVar[AA]{(2.5,2)}{B}
\StateVar[(b a^{*} b)^{*}]{(7,2)}{C}
\LargeState \StateVar[(b a^{*} b)^{*}]{(7,-2)}{C1}
\State[AA]{(0,-2)}{A1} \StateVar[AA]{(2.5,-2)}{B1}
%
\Initial[n]{B} \Final{C} \Initial[s]{B1} \Final{C1}
%
\EdgeL{A}{B}{a} \ArcL{B}{C}{b} \ArcL{C}{C1}{c} \EdgeL{B1}{C}{a}
\ArcL{A1}{B1}{a} \LArcR{A1}{B1}{b} \LArcR{B1}{C1}{b}
\LoopN{A}{c} \LoopVarN{C}{c}
\LoopS{A1}{c} \VarLoopOn\LoopS{C1}{c}\VarLoopOff
\end{VCPicture}}
\end{verbatim}
\normalsize
\end{minipage}
\medskip
\noi
There exists\footnote{%
Since version 0.3 only.}
also a \verb+\FinalStateVar+ command, with the same syntax as
\verb+\StateVar+ and which draws a variable state with double line,
(independently of the current drawing style for the state), exactly
in the same way as does \verb+\FinalState+.
\index{FinalStateVar}%
\subsection{Very small states}\label{subsec.siz2}
There is actually a fourth size for states, called \emph{very small} states.
To define such a state one uses the command \verb+\VSState+ with
the same syntax as \verb+\State+. However, it is not possible, of course,
to put a label inside such a state.
\index{VSState}
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\SmallPicture\VCDraw{%
\begin{VCPicture}{(-3,-3)(3,3)}
% states
\State[A]{(0,0)}{A}
\VSState{(-2,2)}{G1}
\VSState{(-2,0)}{G2}
\VSState{(-2,-2)}{G3}
\VSState{(2,2)}{D1}
\VSState{(2,0)}{D2}
\VSState{(2,-2)}{D3}
\EdgeL{G1}{A}{a_1} \EdgeL{G2}{A}{a_2} \EdgeL{G3}{A}{a_3}
\EdgeL{A}{D1}{b_1} \EdgeL{A}{D2}{b_2} \EdgeL{A}{D3}{b_3}
\end{VCPicture}}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-3,-3)(3,3)}
% states
\State[A]{(0,0)}{A}
\VSState{(-2,2)}{G1} \VSState{(-2,0)}{G2} \VSState{(-2,-2)}{G3}
\VSState{(2,2)}{D1} \VSState{(2,0)}{D2} \VSState{(2,-2)}{D3}
\EdgeL{G1}{A}{a_1} \EdgeL{G2}{A}{a_2} \EdgeL{G3}{A}{a_3}
\EdgeL{A}{D1}{b_1} \EdgeL{A}{D2}{b_2} \EdgeL{A}{D3}{b_3}
\end{VCPicture}}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Miscellaneous}\label{subsec.misc1}
A few commands allow to tune the drawing of an automaton without
going to precise mastering of the parameters involved in the commands
and that we shall describe in section~4.
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Dimmed states and transitions}
~
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\DimState+ \ee
\verb+\DimEdge+
\medskip
\verb+\RstState+ \ee
\verb+\RstEdge+
\medskip
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draw states and transitions and their
respective labels in gray.
% , in such a way they appear as
% dimmed.
\smallskip
Restore the normal style.
\end{minipage}%
\index{DimState}\index{DimEdge}
\index{RstEdge}\index{RstState}
\medskip
\noi
May be used for instance in order to indicate the non accessible part
of an automaton.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
%% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\DimState \State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B} \Final[n]{C}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b}
\DimEdge \LArcR{B}{D}{c} \LArcL{C}{D}{d} \RstEdge
\ArcL{A}{B}{a'} \EdgeR{A}{C}{b'}
\DimEdge \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\DimState \State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B} \Final[n]{C}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b}
\DimEdge \LArcR{B}{D}{c} \LArcL{C}{D}{d} \RstEdge
\ArcL{A}{B}{a'} \EdgeR{A}{C}{b'}
\DimEdge \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Double lines}
~
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\StateLineDouble+ \ee \verb+\EdgeLineDouble+
\medskip
\verb+\StateLineSimple+ \ee \verb+\EdgeLineSimple+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draw states and transitions with double lines.
\index{StateLineDouble}\index{EdgeLineDouble}
\smallskip
Draw states and transitions with simple lines.
\index{StateLineSimple}\index{EdgeLineSimple}
\end{minipage}%
\medskip
\noi
May be used for emphasize transitions or states
of an automaton.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B}
\StateLineDouble \State[C]{(4,2)}{C}
\StateLineSimple \State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b}
\LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ArcL{A}{B}{a'} \EdgeLineDouble \EdgeR{A}{C}{b'}
\EdgeLineSimple \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B}
\StateLineDouble \State[C]{(4,2)}{C}
\StateLineSimple \State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b}
\LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ArcL{A}{B}{a'} \EdgeLineDouble \EdgeR{A}{C}{b'}
\EdgeLineSimple \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\noi
The command \verb+\FinalState{+$(x,y)$\verb+}{+$p$\verb+}+ is equivalent to
the sequence\\
\verb+\StateLineDouble \State{+$(x,y)$\verb+}{+$p$\verb+} \StateLineSimple+
if the current implicit mode is \verb+\StateLineSimple+ ,
it is equivalent to \verb+\State{+$(x,y)$\verb+}{+$p$\verb+}+ in the
other case.
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Hiding states}
~
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\HideState+ \ee
\medskip
\verb+\ShowState+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Cancel the drawing of states.\index{HideState}
\smallskip
Active the drawing of states.\index{ShowState}
\end{minipage}%
\medskip
\noi
May be useful for drawing slides that will be overlayed.\footnote{%
We began to write the package when overhead projectors were still
of common usage\ldots}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\HideState
\State[i]{(0,0)}{A} \State[t]{(6,0)}{C}
\ShowState
\State[q]{(3,0)}{B}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopN{A}{a} \LoopS{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopN[.75]{C}{4a} \LoopS[.75]{C}{4b}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\HideState
\State[i]{(0,0)}{A} \State[t]{(6,0)}{C}
\ShowState
\State[q]{(3,0)}{B}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopN{A}{a} \LoopS{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopN[.75]{C}{4a} \LoopS[.75]{C}{4b}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Reverse transitions}
~
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\ReverseArrow+ \ee
\medskip
\verb+\StraightArrow+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Exchange the origin and the end of a transition.\index{ReverseArrow}
\smallskip
Restore the normal style.\index{StraightArrow}
\end{minipage}%
\medskip
\noi
May be useful for modifying a part of a figure that had already been
written.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\State[D]{(6,0)}{D}
% transitions
\Final[s]{B}
\ArcR{A}{B}{a} \ArcL{A}{C}{b} \LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ReverseArrow
\Initial{A} \Final[n]{C}
\ArcL{A}{B}{a'} \EdgeR{A}{C}{b'} \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\State[D]{(6,0)}{D}
% transitions
\Final[s]{B}
\ArcR{A}{B}{a} \ArcL{A}{C}{b} \LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ReverseArrow
\Initial{A} \Final[n]{C}
\ArcL{A}{B}{a'} \EdgeR{A}{C}{b'} \EdgeL{B}{D}{c'}
\LArcR{C}{D}{d'}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Edge border}
~
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\EdgeBorder+ \ee
\medskip
\verb+\EdgeBorderOff+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draw edges with a white border on each side.\index{EdgeBorder}
\smallskip
Restore the normal style.\index{EdgeBorderOff}
\end{minipage}%
\medskip
\noi
May be used to make more readable a picture in which many arrows
cross each other.
The \emph{order} in which the edges are drawn becomes then meaningfull.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,1)}{A} \State[B]{(3,2)}{B} \State[C]{(6,1)}{C}
\State[D]{(0,-1)}{D} \State[E]{(3,-2)}{E} \State[F]{(6,-1)}{F}
% transitions
\EdgeR{A}{E}{a} \EdgeL[.8]{D}{B}{b} \EdgeR[.7]{B}{E}{b}
%
\EdgeBorder
\EdgeL[.35]{A}{F}{a} \EdgeR[.3]{E}{C}{d}
\EdgeBorderOff
\EdgeL{B}{F}{c}
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,1)}{A} \State[B]{(3,2)}{B} \State[C]{(6,1)}{C}
\State[D]{(0,-1)}{D} \State[E]{(3,-2)}{E} \State[F]{(6,-1)}{F}
% transitions
\EdgeR{A}{E}{a} \EdgeL[.8]{D}{B}{b} \EdgeR[.7]{B}{E}{b}
%
\EdgeBorder
\EdgeL[.35]{A}{F}{a} \EdgeR[.3]{E}{C}{d}
\EdgeBorderOff
\EdgeL{B}{F}{c}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Forth and back offset}
~
Normally, an edge lays on the line that links the center of the start
and end states.
Which forbid to have two straight edges in opposite directions
between states.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\ForthBackOffset+ \ee
\medskip
\verb+\RstEdgeOffset+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Shift the edge on the left handside.\index{ForthBackOffset}
\smallskip
Restore the normal style.\index{RstEdgeOffset}
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,1)}{A} \State[B]{(3,1)}{B} \State[C]{(6,1)}{C}
\LargeState
\State[A]{(0,-1)}{A1} \State[B]{(3,-1)}{B1} \State[C]{(6,-1)}{C1}
% transitions
\EdgeL{A}{B}{a}
\ForthBackOffset \EdgeL{B}{C}{b} \EdgeL{C}{B}{b}
\RstEdgeOffset
\EdgeL{A1}{B1}{a}
\ForthBackOffset \EdgeL{B1}{C1}{b} \EdgeL{C1}{B1}{b}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,1)}{A} \State[B]{(3,1)}{B} \State[C]{(6,1)}{C}
\LargeState
\State[A]{(0,-1)}{A1} \State[B]{(3,-1)}{B1}
\State[C]{(6,-1)}{C1}
% transitions
\EdgeL{A}{B}{a}
\ForthBackOffset \EdgeL{B}{C}{b} \EdgeL{C}{B}{b}
\RstEdgeOffset \EdgeL{A1}{B1}{a}
\ForthBackOffset \EdgeL{B1}{C1}{b} \EdgeL{C1}{B1}{b}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Zigzag edges}
~
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\footnotesize
\verb+\ZZEdgeL[+\textsl{Pos}\verb+]{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\medskip
\verb+\ZZEdgeR[+\textsl{Pos}\verb+]{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draws a ``zigzag'' transition from the state \textsl{Start} to the
state \textsl{End} with the label \textsl{Label} on the left or
the right side.\index{ZZEdge}
\end{minipage}%
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\VSState{(6,0)}{D}
% transitions
\EdgeR{A}{B}{a} \EdgeL{A}{C}{b} \EdgeR{B}{D}{c}
\ZZEdgeL{C}{D}{d} \ZZEdgeR{C}{B}{b}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B} \State[C]{(4,2)}{C}
\VSState{(6,0)}{D}
% transitions
\EdgeR{A}{B}{a} \EdgeL{A}{C}{b} \EdgeR{B}{D}{c}
\ZZEdgeL{C}{D}{d} \ZZEdgeR{C}{B}{b}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\paragraph{Lining up}
~
By default, labels of states are centered. When states are aligned, it may happen
that this seems ungainly. The following command solves this problem.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\AlignedLabel+ \ee
\medskip
\verb+\FloatingLabel+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Put labels of states on a virtual baseline.\index{AlignedLabel}
\smallskip
Center the label of states vertically.\index{FloatingLabel}
\end{minipage}%
\noi
Default option is \verb+\FloatingLabel+.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(0,-4)(6,1)}
% states
\State[p]{(0,0)}{A} \State[b]{(3,0)}{B} \State[a]{(6,0)}{C}
\AlignedLabel
\State[p]{(0,-3)}{A1} \State[b]{(3,-3)}{B1} \State[a]{(6,-3)}{C1}
%transitions
\EdgeL{A}{B}{a} \ArcL{B}{C}{b} \ArcL{C}{B}{c}
\EdgeL{A1}{B1}{a} \ArcL{B1}{C1}{b} \ArcL{C1}{B1}{c}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-4)(6,1)}
% states
\State[p]{(0,0)}{A} \State[b]{(3,0)}{B} \State[a]{(6,0)}{C}
\AlignedLabel
\State[p]{(0,-3)}{A1} \State[b]{(3,-3)}{B1}
\State[a]{(6,-3)}{C1}
%transitions
\EdgeL{A}{B}{a} \ArcL{B}{C}{b} \ArcL{C}{B}{c}
\EdgeL{A1}{B1}{a} \ArcL{B1}{C1}{b} \ArcL{C1}{B1}{c}
%
\end{VCPicture}%
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{The command \texttt{$\backslash$Point}}
~
This commands is a direct translation of a command from \PSTricks.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Point{+%
$(x,y)$\verb+}{+%
\textsl{Name}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets a point with name \textsl{Name} at the coordinate $(x,y)$.\index{Point}
\end{minipage}%
This command does \textsl{not} draw any point.
With \PSTricks, and thus with \VCSG, any line or curve must be drawn
\textsl{between} two predefined objects. That is the aim of \verb+\Point+.
For instance, initial and final arrows are drawn with this trick:
any time a state is defined, eight points are silently and implicitely defined around it.
%\noi
%\hspace*{-\jsIndent}
%\begin{minipage}[t]{\ColoText}
% \par\vspace*{0mm}% pour l'alignement sur le haut
% \footnotesize
%\verb+\Edge{+%
% \textsl{Start}\verb+}{+%
% \textsl{End}\verb+}+
%
%\end{minipage}%
%\hspace*{1.2em}%
%\begin{minipage}[t]{\ColoFigu}%
%% \setlength{\parindent}{\parindenttemp}%
%\par\vspace*{0mm}% pour l'alignement sur le haut
%Sets a point with name \textsl{Name} at the coordinate \textsl{x,y}.
%
%\smallskip
%
%Draws a straight arrow from the state \textsl{Start} to the state \textsl{End}.
%\end{minipage}%
%
%\medskip
\subsection{Writing composite labels}
Some useful tools are proposed to write composite labels on arrows.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\IOL{+%
\textsl{Input}\verb+}{+%
\textsl{Output}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Produces the string \textsl{Input}$\mid$\textsl{Output}, useful
when one draws transducers. This allows to modify the way it is done
by redefining command \verb+\IOL+.\index{IOL}
\end{minipage}%
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Stack+\texttt{\textsl{X}}\verb+Labels{+%
\textsl{Label1}\verb+}{+%
\textsl{Label2}\verb+}+
\medskip
\verb+\Stack+\texttt{\textsl{X}}\verb+LabelsP{+%
\textsl{Label1}\verb+}{+%
\textsl{Label2}\verb+}+
\medskip
\verb+\Line+\texttt{\textsl{X}}\verb+LabelsP{+%
\textsl{Label1}\verb+}{+%
\textsl{Label2}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
In these commands, \texttt{\textsl{X}} equals \texttt{Two} or \texttt{Three}.
In the later case, commands have obviously three arguments.
\verb+\Stack+\texttt{\textsl{X}}\verb+Labels+ gives a vertical arrangement of labels, whereas
\verb+\Stack+\texttt{\textsl{X}}\verb+LabelsP+ inserts symbols $+$ between them.
\verb+\Line+\texttt{\textsl{X}}\verb+LabelsP+ is the horizontal version of \verb+\Stack+\texttt{\textsl{X}}\verb+LabelsP+;
it can be redefined in order to change symbols, for instance.
\index{StackLabels}\index{LineLabelsP}
\end{minipage}%
\noi
The following automaton is the right sequential transducer that realizes the addition in base~$2$.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(-2,-2)(5,3)}
% states
\State[0]{(0,0)}{A} \State[1]{(3,0)}{B}
\Initial[n]{A}
\Final[s]{A} \FinalR{e}{B}{\IOL{}{1}}
%transitions
\LoopW[.5]{A}{\StackTwoLabelsP{\IOL{0}{0}}{\IOL{1}{1}}}
\LoopN[.7]{B}{\LineTwoLabelsP{\IOL{1}{0}}{\IOL{2}{1}}}
\ArcL{A}{B}{\IOL{2}{0}}
\ArcL{B}{A}{\IOL{0}{1}}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-2,-2)(5,3)}
% states
\State[0]{(0,0)}{A} \State[1]{(3,0)}{B}
\Initial[n]{A}
\Final[s]{A} \FinalR{e}{B}{\IOL{}{1}}
%transitions
\LoopW[.5]{A}{\StackTwoLabelsP{\IOL{0}{0}}{\IOL{1}{1}}}
\LoopN[.7]{B}{\LineTwoLabelsP{\IOL{1}{0}}{\IOL{2}{1}}}
\ArcL{A}{B}{\IOL{2}{0}}
\ArcL{B}{A}{\IOL{0}{1}}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\section{Composing a picture}\label{sec.com}
The commands described above allow to define most of the figures
representing automata in any textbook or technical paper.
Before turning to more sophisticated commands that are used
for less than 5 percent of the elements and that appear in less than
10 percent of the figures, let us turn to few commands that help in
composing the figures.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Structuring the automaton: The \texttt{VCPut} command}\label{subsec.rpu}
In many automata, a same pattern in states, and also in edges, is
reproduced several times in the figure.
The idea is not to try to ``program'' these regular patterns but to
allow the use of the ``copy-and-paste'' operations in the source
file as much as possible, with minimum corrections afterwards.
This will be achieved easily with the help of the
command~\verb+\VCPut+.\index{VCPut}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\VCPut{(+$x$,$y$\verb+)}{+ instructions\ldots \verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Translates the result of the instructions by the vector~($x$, $y$).
\end{minipage}%
\medskip
\noi
Note that this command is taken directly from \PSTricks but uses \VCSG's syntax.
%the special syntax of that command which is taken directly from
%PSTricks: the first argument ($x$,$y$)
%\emph{is not} put inside braces.
%There should not be any space before, after, and inside the
%parentheses.
Of course the commands that are to be put as the second argument
of~\verb+\VCPut+ are the defining states commands, with possibly
other~\verb+\VCPut+ inside.
The structuration of the figure \textit{via} the use of~\verb+\VCPut+
commands does not only save typing.
It makes also easier the tuning of the figure, and the reusability of
its parts.
In the example below, the two~\verb+\VCPut+ are used to place the
two parts of the automaton.
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
% \ShowFrame
\SmallPicture\VCDraw{%
\begin{VCPicture}{(-1,-2)(7,5)}
\VCPut{(0,3)}{\State[j]{(0,0)}{A1} \State[r]{(3,0)}{B1}}
\VCPut{(3,0)}{\State[s]{(0,0)}{A2} \State[u]{(3,0)}{B2}}
%
\Initial{A1} \Final{B2}
\EdgeL{A1}{B1}{b} \LoopN[.5]{A1}{a+b} \LoopN[.5]{B1}{2a+2b}
\EdgeR{A2}{B2}{b} \LoopS[.5]{A2}{2a+2b} \LoopS[.5]{B2}{4a+4b}
\EdgeR{A1}{A2}{b} \EdgeL{B1}{B2}{b} \EdgeL{A1}{B2}{b}
%
\end{VCPicture}
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-1,-2)(7,5)}
\VCPut{(0,3)}{\State[j]{(0,0)}{A1} \State[r]{(3,0)}{B1}}
\VCPut{(3,0)}{\State[s]{(0,0)}{A2} \State[u]{(3,0)}{B2}}
%
\Initial{A1} \Final{B2}
\EdgeL{A1}{B1}{b} \LoopN[.5]{A1}{a+b} \LoopN[.5]{B1}{2a+2b}
\EdgeR{A2}{B2}{b} \LoopS[.5]{A2}{2a+2b} \LoopS[.5]{B2}{4a+4b}
\EdgeR{A1}{A2}{b} \EdgeL{B1}{B2}{b} \EdgeL{A1}{B2}{b}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\noi
The \verb+\VCPut+ command can also be used to rotate a figure by using
an optional parameter.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\VCPut[+$r$\verb+]{(+$x$,$y$\verb+)}{+ instructions\ldots \verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Rotate the result of the instructions with angle~$r$ and center~$(0,0)$
and then translate it by the vector~($x$, $y$).
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
% \ShowFrame
\SmallPicture\VCDraw{%
\begin{VCPicture}{(-1,-1)(5,4)}
\StateVar[(0,0)]{(0,0)}{O}
\State[A]{(3,0)}{A}
\VCPut[90]{(0,0)}{\StateVar[90^o]{(3,0)}{B}}
\VCPut[90]{(4,0)}{\State[C]{(3,0)}{C}}
\LArcR{A}{B}{r} \EdgeL{B}{C}{t}
\end{VCPicture}
}
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-1,-1)(5,4)}
\StateVar[(0,0)]{(0,0)}{O}
\State[A]{(3,0)}{A}
\VCPut[90]{(0,0)}{\StateVar[90^o]{(3,0)}{B}}
\VCPut[90]{(4,0)}{\State[C]{(3,0)}{C}}
\LArcR{A}{B}{r} \EdgeL{B}{C}{t}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
The default option is that labels of states (except those of \emph{variable states}) are put in a horizontal
position (\verb+\RigidLabel+), but the command \verb+\SwivelLabel+
makes them rotate with the figure.\index{RigidLabel}\index{SwivelLabel}
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
% \ShowFrame
\SmallPicture\VCDraw{%
\begin{VCPicture}{(-5,-5)(5,5)}
\SwivelLabel
\State[1]{(4,0)}{A1}\LoopE{A1}{a}
\VCPut[40]{(0,0)}{\State[2]{(4,0)}{A2}\LoopE{A2}{a}\ArcR{A1}{A2}{b}}
\VCPut[80]{(0,0)}{\State[3]{(4,0)}{A3}\LoopE{A3}{a}\ArcR{A2}{A3}{b}}
\VCPut[120]{(0,0)}{\State[4]{(4,0)}{A4}\LoopE{A4}{a}}
\VCPut[160]{(0,0)}{\State[5]{(4,0)}{A5}\LoopE{A5}{a}}
\RigidLabel
\VCPut[200]{(0,0)}{\State[6]{(4,0)}{A6}\LoopE{A6}{a}\ArcR{A5}{A6}{b}}
\VCPut[240]{(0,0)}{\State[7]{(4,0)}{A7}\LoopE{A7}{a}\ArcR{A6}{A7}{b}}
\VCPut[280]{(0,0)}{\State[8]{(4,0)}{A8}}
\VCPut[320]{(0,0)}{\State[9]{(4,0)}{A9}}
\ArcR{A3}{A4}{b} \ArcR{A4}{A5}{b}
\ArcR{A7}{A8}{b} \ArcR{A8}{A9}{b} \ArcR{A9}{A1}{b}
\LoopL{280}{A8}{a} \LoopL{320}{A9}{a}
\end{VCPicture}
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-5,-5)(5,5)}
\SwivelLabel
\State[1]{(4,0)}{A1}\LoopE{A1}{a}
\VCPut[40]{(0,0)}{%
\State[2]{(4,0)}{A2}\LoopE{A2}{a}\ArcR{A1}{A2}{b}}
\VCPut[80]{(0,0)}{%
\State[3]{(4,0)}{A3}\LoopE{A3}{a}\ArcR{A2}{A3}{b}}
\VCPut[120]{(0,0)}{\State[4]{(4,0)}{A4}\LoopE{A4}{a}}
\VCPut[160]{(0,0)}{\State[5]{(4,0)}{A5}\LoopE{A5}{a}}
\RigidLabel
\VCPut[200]{(0,0)}{%
\State[6]{(4,0)}{A6}\LoopE{A6}{a}\ArcR{A5}{A6}{b}}
\VCPut[240]{(0,0)}{%
\State[7]{(4,0)}{A7}\LoopE{A7}{a}\ArcR{A6}{A7}{b}}
\VCPut[280]{(0,0)}{\State[8]{(4,0)}{A8}}
\VCPut[320]{(0,0)}{\State[9]{(4,0)}{A9}}
\ArcR{A3}{A4}{b} \ArcR{A4}{A5}{b}
\ArcR{A7}{A8}{b} \ArcR{A8}{A9}{b} \ArcR{A9}{A1}{b}
\LoopL{A8}{280}{a} \LoopL{A9}{320}{a}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
One can notice that \verb+\RigidLabel+ only acts on labels of states.
To draw arcs with ``rigid'' labels, commands have to be written outside
\verb+\VCPut+. We shall see later how to deal with the command \verb+\LoopL+
in order to give any orientation to loops without using \verb+\VCPut+.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Using separate files}\label{subsec.fil}
In order to use several times the same figure in the same or in
different papers, or even, as we shall see in the next section, in two
different contexts such as in a paper and in a slide for a talk,
it is convenient to have the figure written into a file and imported
in the main \LaTeX \ source file.
This can be handled by the following macros.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\VCCall{+\textsl{FileName}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Calls the file \textsl{FileName} and apply the~\verb+\VCScale+.\index{VCCall}
\end{minipage}%
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\SetVCDirectory{+\textsl{Directory}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets to \textsl{Directory} the directory where the file
\textsl{FileName} will be taken by the macro \verb+\VCCall+ .
Set to the current directory by default.
Usual Unix syntax is used to name directories.
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\ShowName+ \ee
\verb+\HideName+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets or unsets a flag that controls the printing of
\textsl{FileName} besides the figure drawn by \verb+\VCCall+.
\index{ShowName}\index{HideName}
\end{minipage}%
\medskip
\noi
For the example below, the following lines have been saved in the
file \verb+TwoStates.tex+:
\small
\begin{verbatim}
\begin{VCPicture}{(-1,-1)(4,1)}
\State[p]{(0,0)}{A} \State[q]{(3,0)}{B}%
\ArcL{A}{B}{b} \LArcL{B}{A}{a} \LoopE{B}{a}
\end{VCPicture}
\end{verbatim}
\normalsize
\verb+\VCCall+ applies the same parameters to figures described
in files as \verb+\VCDraw+ does.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
% \begin{center}
\ee \VCCall{TwoStates}
\medskip
\SmallPicture \ShowName
\ee \VCCall{TwoStates}
% \end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\VCCall{TwoStates}
\SmallPicture \ShowName
\VCCall{TwoStates}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Frame and grid}\label{subsec.ffra}
% %%%%%%%%%%%%%%%%%%%%%%
% \paragraph{Frame and grid}
% ~
Two macros that help placing the figure in the page, and the states in
the figure.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\ShowFrame+ \ee \verb+\HideFrame+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets or unsets a flag that controls the drawing of the \emph{bounding box} which is
defined by the parameter of the \verb+\VCPicture+ environment.
\index{ShowFrame}\index{HideFrame}
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\ShowGrid+ \ee \verb+\HideGrid+ \ee
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets or unsets a flag that controls the drawing of a \emph{grid} inside the
bounding box which is
defined by the parameter of the \verb+\VCPicture+ environment.
\index{ShowGrid}\index{HideGrid}
\end{minipage}%
\medskip
\noi
Default settings are \verb+\HideFrame+ and \verb+\HideGrid+ .
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
% \begin{center}
\ee \ShowFrame \ShowGrid \VCCall{TwoStates}
% \end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\footnotesize
\begin{verbatim}
\ShowFrame \ShowGrid \VCCall{TwoStates}
\end{verbatim}
\normalsize
\end{minipage}%
\subsection{The grid scale}
This parameter controls the value of the \PSTricks unit length.
As values that define the size of states and the width of lines are given with fixed units
(as \texttt{cm} or \texttt{pt}), they are not modified by this parameter.
However, the scale of the grid on which they are put, \ie the
distance between each other is modified by grid scale.
This parameter is actually the first (optional) argument of \verb+\VCDraw+
or \verb+\VCCall.+
The following example is the figure of Subsection~\ref{subsec.ex1}
with another grid scale:
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\VCDraw[.7]{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[i]{(0,0)}{A} \State[q]{(3,0)}{B} \State[t]{(6,0)}{C}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopN{A}{a} \LoopS{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopN[.75]{C}{4a} \LoopS[.75]{C}{4b}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\VCDraw[.7]{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[i]{(0,0)}{A} \State[q]{(3,0)}{B} \State[t]{(6,0)}{C}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopN{A}{a} \LoopS{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopN[.75]{C}{4a} \LoopS[.75]{C}{4b}
\end{VCPicture}
}
\end{verbatim}
\normalsize
\end{minipage}%
We can call \verb+TwoStates+ with another grid scale.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
% \begin{center}
\ee \ShowFrame \ShowGrid \VCCall[1.5]{TwoStates}
% \end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\bigskip
\footnotesize
\begin{verbatim}
\ShowFrame \ShowGrid \VCCall[1.5]{TwoStates}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\section{Parametrized drawing commands}\label{sec.par}
\noi
In the sequel, the letter \texttt{X} stands for either
\texttt{L} or \texttt{R}.
\subsection{Parametrized loops}
One can draw loops around state with any direction.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\medskip
\footnotesize
\verb+\LoopX[+\textsl{Pos}\verb+]{+%
\textsl{Direction}\verb+}{+%
\textsl{Name}\verb+}{+%
\textsl{Label}\verb+}+
\medskip
\verb+\CLoopX[+\textsl{Pos}\verb+]{+%
\textsl{Direction}\verb+}{+%
\textsl{Name}\verb+}{+%
\textsl{Label}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draw a loop around the state {\sl Name} in direction {\sl Direction},
which is an angle with respect to east, with label {\sl Label}.
As the label
is placed outside the loop, \verb+\LoopL+ is reversed
with respect to \verb+\LoopR+.
The opening of the loop is~$60^o$ for the \verb+LoopX+ commands,
$44^o$ for the \verb+CLoopX+ commands.\index{Loop}\index{CLoop}
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\SmallPicture\VCDraw{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[i]{(0,0)}{A} \State[q]{(3,0)}{B} \State[t]{(6,0)}{C}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopR{120}{A}{a} \LoopL{-120}{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopL[.5]{60}{C}{4a} \LoopR[.5]{-60}{C}{4b}
%
\end{VCPicture}%
}
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[i]{(0,0)}{A} \State[q]{(3,0)}{B} \State[t]{(6,0)}{C}
% initial-final
\Initial{A} \Final{C}
% transitions
\EdgeR{A}{B}{2b} \EdgeR{B}{C}{2b} \LArcL{A}{C}{b}
\LoopR{120}{A}{a} \LoopL{-120}{A}{b} \LoopS[.5]{B}{2a+2b}
\LoopL[.5]{60}{C}{4a} \LoopR[.5]{-60}{C}{4b}
%
\end{VCPicture}%
\end{verbatim}
\normalsize
\end{minipage}%
\subsection{Parametrized arcs}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColoText+9em}
\par\vspace*{0mm}% pour l'alignement sur le haut
% \medskip
\footnotesize
\verb+\VArcX[+\textsl{Pos}\verb+]{arcangle=+%
\textsl{x}\verb+,ncurv=+%
\textsl{v}\verb+}{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\end{minipage}%
\begin{minipage}[c]{\ColoFigu-9em}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
% \medskip
% \bigskip
Draw an arc from \textsl{Start} to \textsl{End} with label
\textsl{Label}, with a starting angle \texttt{x} and an eccentricity
\texttt{v}.
\index{VArc}
\end{minipage}%
\noi
The starting angle is defined by the parameter \verb+arcangle=+$x$
and is measured, going to the left if
\texttt{X=L}, to the right if \texttt{X=R}, from the line that goes
from \textsl{Start} to \textsl{End}, called the \emph{base line}.
% with an angle defined respectively by \texttt{arcangle}.
The parameter \verb+ncurv+ is the `eccentricity' of the arc and some
how measures the distance between the center of the arc and the base
line as one can observe on the figure below.
\index{eccentricity (of curve)}
The first (non optional) parameter of \verb+\VArcX+ contains
PSTrick's parameters, written with PSTrick's syntax: they are
separated by a comma and there must be no space inside the braces
that contains them.
All these parameters are optional, but this first parameter of
\verb+\VArcX+ itself is not an optional argument, which
means that this command must always have
four arguments (and possibly an optional one):
\begin{minipage}[c]{6cm}
\verb+\VArcL{arcangle=15}{A}{B}{x}+\\
\verb+\VArcL{ncurve=1}{A}{B}{x}+\\
\verb+\VArcL{}{A}{B}{x}+
\end{minipage}
\ are syntactically correct commands.
\noi
Default value for \verb+arcangle+
is the same as for \verb+\LArc+, whereas the default \verb+ncurv+
value is~$1$.
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(-3,-2)(3,6)}
%
\LargeState
\State[A]{(-2,0)}{A}
\State[B]{(2,0)}{B}
%transitions
\VArcR[.5]{arcangle=60,ncurv=.2}{A}{B}{0.2}
\VArcL[.5]{arcangle=60,ncurv=.8}{A}{B}{0.8}
\VArcL[.5]{arcangle=60,ncurv=2}{A}{B}{2}
\VArcR[.5]{arcangle=60,ncurv=6}{A}{B}{6}
\VArcL{arcangle=-60}{A}{B}{60}
\VArcR{arcangle=-90}{A}{B}{90}
\VArcR[.2]{arcangle=-120}{A}{B}{120}
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-3,-2)(3,6)}
% states
\LargeState
\State[A]{(-2,0)}{A}
\State[B]{(2,0)}{B}
%transitions
\VArcR[.5]{arcangle=45,ncurv=.2}{A}{B}{0.2}
\VArcL[.5]{arcangle=45,ncurv=.8}{A}{B}{0.8}
\VArcL[.5]{arcangle=45,ncurv=2}{A}{B}{2}
\VArcR[.5]{arcangle=45,ncurv=6}{A}{B}{6}
\VArcL{arcangle=-60}{A}{B}{60}
\VArcR{arcangle=-90}{A}{B}{90}
\VArcR[.2]{arcangle=-120}{A}{B}{120}
%
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\subsection{General curve}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColoText+12em}
\par\vspace*{0mm}% pour l'alignement sur le haut
% \medskip
\footnotesize
\verb+\VCurveX[+\textsl{Pos}\verb+]{angleA=+%
\textsl{x}\verb+,angleB=+%
\textsl{y}\verb+,ncurv=+%
\textsl{v}\verb+}{+%
\textsl{Start}\verb+}{+%
\textsl{End}\verb+}{+%
\textsl{Label}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColoFigu-12em}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
% \medskip
% \bigskip
Draw a curve from \textsl{Start} to \textsl{End} with label
\textsl{Label}, starting with an angle \textsl{x}, arriving with an
angle \textsl{y} and with an eccentricity \textsl{v}.
\end{minipage}%
\index{VCurve}
\index{angleA}
\index{angleB}
\medskip
\noi
A (B\'ezier) curve, computed by \PSTricks with the three parameters:
the \emph{starting angle} fixed by \verb+angleA=+\textsl{x}, the
ending angle fixed by \verb+angleB=+\textsl{y}, and the eccentricity
\verb+ncurv=+\textsl{v}.
The two angles are measured, as trigonometric angles are, from
the East direction and counterclockwise.
The syntax of these parameters is \PSTricks's and they are optional,
as in \verb+\VArcX+.
Default values for \verb+angleA+
and \verb+angleB+ are respectively $0$ and $180$; \verb+ncurv+ is fixed
by default to $1$.
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\scalebox{\VCScale}{%
\begin{VCPicture}{(-4,-4)(4,4)}
%
\State[A]{(-3,0)}{A}
\State[B]{(0,0)}{B}
\State[C]{(3,0)}{C}
%transitions
\VCurveL{angleA=90,angleB=135}{A}{B}{1}
\VCurveR[.5]{angleA=90,angleB=135,ncurv=.5}{A}{B}{0.5}
\VCurveL{angleA=90,angleB=135,ncurv=2}{A}{B}{2}
\VCurveR[.6]{angleA=-80,angleB=175}{A}{B}{b}
\VCurveR[.6]{angleA=-80,angleB=175}{A}{C}{c}
\VCurveL{angleB=20,angleB=160}{B}{C}{d}
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-4,-4)(4,4)}
%states
\State[A]{(-3,0)}{A}
\State[B]{(0,0)}{B}
\State[C]{(3,0)}{C}
%transitions
\VCurveL{angleA=90,angleB=135}{A}{B}{1}
\VCurveR[.5]{angleA=90,angleB=135,ncurv=.5}{A}{B}{0.5}
\VCurveL{angleA=90,angleB=135,ncurv=2}{A}{B}{2}
\VCurveR[.6]{angleA=-80,angleB=175}{A}{B}{b}
\VCurveR[.6]{angleA=-80,angleB=175}{A}{C}{c}
\VCurveL{angleB=20,angleB=160}{B}{C}{d}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\subsection{Transitions labelling}
\paragraph{Initial and final arrows with a label} When one deals with
tranducers, or automata with multiplicity, one may need to put
some labels on initial or final arrows.
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\InitialL[+\textsl{Pos}\verb+]{+%
\textsl{Dir}\verb+}{+\textsl{Name}\verb+}{+\textsl{Label}\verb+}+
\\ \verb+\InitialR[+\textsl{Pos}\verb+]{+%
\textsl{Dir}\verb+}{+\textsl{Name}\verb+}{+\textsl{Label}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Makes the state \textsl{Name} initial and writes \textsl{Label}
on the left or the right size of the incoming arrow.\index{Initial}\index{Final}
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\FinalL[+\textsl{Pos}\verb+]{+%
\textsl{Dir}\verb+}{+\textsl{Name}\verb+}{+\textsl{Label}\verb+}+
\\ \verb+\FinalR[+\textsl{Pos}\verb+]{+%
\textsl{Dir}\verb+}{+\textsl{Name}\verb+}{+\textsl{Label}\verb+}+
\normalsize
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Makes the state \textsl{Name} final and writes \textsl{Label}
on the left or the right size of the outgoinging arrow.
\end{minipage}%
\medskip
\noi
Here, the parameter \textsl{Dir} is not optional. Whereas, there is
an optional parameter \textsl{Pos} that defines the position
of the label on the arrow. Its default values is fixed to $0.1$ ({\it resp.} $0.9$)
for initial ({\it resp.} final) arrows. The label is thus written far enough of the state.
\paragraph{Independant labelling of transitions}
\medskip
There exists commands to label transitions that
have not been labeled yet or to put a second label on them.
These commands must directly follow the definition of
the transition that will be labeled.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\LabelL[+%
\textsl{Pos}\verb+]{+%
\textsl{Label}\verb+}+
\medskip
\verb+\LabelR[+%
\textsl{Pos}\verb+]{+%
\textsl{Label}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Puts a label on the previous transition. The default position of the label
is the same as for edges.\index{Label}
\end{minipage}%
\medskip
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
% \ShowFrame
%\SmallPicture
\VCDraw{%
\begin{VCPicture}{(-3,-2)(3,2)}
\State[A]{(-2,1)}{A} \State[B]{(2,1)}{B}
\State[C]{(-2,-1)}{C} \State[D]{(2,-1)}{D}
\EdgeL{A}{B}{u} \LabelR{\varphi(u)=3}
\LArcR{D}{C}{} \LabelL{v}
\VCurveL[.3]{angleA=45,angleB=-45}{B}{D}{a}
\LabelL[.5]{b} \LabelL[.7]{c}
%
\end{VCPicture}
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-3,-2)(3,2)}
\State[A]{(-2,1)}{A} \State[B]{(2,1)}{B}
\State[C]{(-2,-1)}{C} \State[D]{(2,-1)}{D}
%
\EdgeL{A}{B}{u} \LabelR{\varphi(u)=3}
\LArcR{D}{C}{} \LabelL{v}
\VCurveL[.3]{angleA=45,angleB=-45}{B}{D}{a}
\LabelL[.5]{b} \LabelL[.7]{c}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
\subsection{Miscellaneous}
\paragraph{Loops on variable states}
Instead of using \verb+\VarLoopN+ or \verb+\VarLoopS+, one can modify
parameters of loops to draw, for instance, many loops on variable states.
As usual, these loops may be drawn on the south or north side of
the states only.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\VarLoopOn+
\medskip
\verb+\VarLoopOff+
\medskip
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Modifies parameters in order to draw loops around variable states.
\index{VarLoopOn}\index{VarLoopOff}
\smallskip
Restore the normal style of loops.
\end{minipage}%
\noi
Command \verb+\LoopVarN+ is equivalent to the sequence
\verb+\LoopVarOn \LoopN \LoopVarOff+.
\paragraph{Saving memory}
In default mode, the call to a \verb+\State+ command
defines eight additional points, that allow then to draw initial and
final arrows in the prescribed compass direction.
In case of large figures, with many states, this ought to lead
to an overflow of \TeX\ memory. This is the reason why one can define
states without any additional point.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\PlainState+
\medskip
\verb+\FullState+
\medskip
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draw states with no additional points.\index{PlainState}
\smallskip
Draw states with eight points to draw initial or final arrows.\index{FullState}
\end{minipage}%
Of course, when in \verb+\PlainState+ mode, one can define states
with additional points.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\IFState[+\textsl{Label}\verb+]{+%
$(x,y)$\verb+}{+%
\textsl{Name}\verb+}+
\medskip
\verb+\IFXState[+\textsl{Label}\verb+]{+%
$(x,y)$\verb+}{+%
\textsl{Name}\verb+}+
\medskip
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Draws a state with four points ($n$, $s$, $e$, $w$).\index{IFState}
\smallskip
Draws a state with eight points ($n$, $s$, $e$, $w$, $ne$, $se$, $nw$, $sw$).
\index{IFXState}
\end{minipage}%
In \verb+\PlainState+ mode, one should not apply an \verb+\Initial+
or a \verb+\Final+ command to a state defined by \verb+\State+.
Likewise, these commands can be only used for \verb+\IFState+
with directions $n$, $s$, $e$ and $w$.
Note that even when in \verb+\FullState+ mode,
variable states defined by \verb+\StateVar+ have
the same four additional points as \verb+\IFState+.
%%%%%%%%%%%%%%%%%%%%%%
\section{Modifying and setting the parameters}\label{sec.mod}
The reason why the commands in \VCSG are simple and concise is that
all the parameters that control the geometry (size, angles,
\ldots) and the drawing (line width, line style, line color, \ldots)
of the states and transitions in an automaton are preset by \VCSG and
can be kept implicit.
But there are two instances where a user may want to modify these
preset values.
The first case is when one needs to tune a parameter in order to make
the figure more readable, or nicer.
Such a case has already been considered in
sections~\ref{subsec.edg}, \ref{subsec.arc} and~\ref{subsec.loo},
where the parameter \textsl{Pos}
that controls the position of the label of a transition along the
edge has been modified with an optional argument.
The parameters that will be considered in this section are not
optional parameters of already defined commands but parameters that
are set with their own commands.
The other case where a user will change the implicit parameters of
a figure or, more likely, of a set of figures, is when he (or she)
will be in the position to change completely the ``style'' of the
drawing.
For instance, a same set of figures may be used in a paper \emph{and} in a
series of slides for the presentation of the paper.
Of course, the figures have to be set at a larger scale, probably
in colour, and possibly with different relative sizes of the elements.
We begin with the description of the options for the latter case,
which is by far simpler. We then explain the syntax convention taken
to coin the names of the many commands that control the many
parameters.
Then comes the list of these parameters, for scaling first, then for
states, for transitions, and finally for the fine tuning of
some details of the drawing.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Style files}\label{sec.sty-fil}
The package \VCSG is loaded with default values that are all set up
in the file \verb+VCPref-default.tex+~.
\index{VCPref-default}%
\index{VCPref-slides}%
\index{VCPref-beamer}%
\index{VCPref-mystyle}%
The package comes with two other styles, in particular one for
drawing slides.
The normal way of using the different style files is to call the
wrapper \texttt{vaucanson-g} with an option:
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\usepackage[+\textsl{option}\verb+]{vaucanson-g}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
The default option is \texttt{default}; the other possible options are
\texttt{slides}, \texttt{beamer} and \texttt{mystyle}.
%\footnotemark
\end{minipage}%
% \footnotetext{There exists also, for downward compatibility, a
% \texttt{beamer} option which calls indeed the same file as
% \texttt{slides}.}%
% \stepcounter{footnote}%
% \medskip
% \smallskip
Although it is not the normal usage,
it is also possible to change style in the course of the text by
loading a style file with an \verb+\input+ command. In this
case, it is recommended to reset all parameters by calling
\verb+VCPref-default.tex+.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur+6em}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\hspace*{1cm}
\begin{center}
\VCCall{TwoStates}%
\input{VCPref-slides}%
\hspace*{-1cm}%
\VCCall{TwoStates}\\
\vspace*{.5cm}%
\input{VCPref-default}%
\input{VCPref-beamer}%
% \hspace*{1cm}%
\VCCall{TwoStates}\\
\vspace*{.5cm}%
\input{VCPref-default}
\input{VCPref-mystyle}
\VCCall{TwoStates}
\end{center}
\end{minipage}%
\hspace*{1.2em}%
%%%%
\begin{minipage}[c]{\ColSource-6em}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
% \vspace*{-1cm}
\footnotesize
\begin{verbatim}
\usepackage{vaucanson-g}
...
\VCCall{TwoStates}
...
\usepackage[slides]{vaucanson-g}
...
\VCCall{TwoStates}
...
\usepackage[beamer]{vaucanson-g}
...
\VCCall{TwoStates}
...
...
\input{VCPref-default} % gets back to default values
\input{VCPref-mystyle}
\VCCall{TwoStates}
\end{verbatim}
\normalsize
\end{minipage}%
\medskip
\noi
By editing the files \texttt{VCPref-mystyle}, \texttt{VCPref-beamer}
or \texttt{VCPref-slides}, and giving the
parameters the values he (or she) thinks more appropriate, a user may
easily build his (or her) own style for drawing automata.
Modifying directly \texttt{VCPref-default}, although possible, is not
necessarily a good idea.
By cut, editing and paste, it is not difficult create many style
files, and even, with an easy modification of the wrapper
itself to make them possible options.
The content of these style files are described in the following
subsections. \texttt{VCPref-slides}, \texttt{VCPref-beamer}
and \texttt{VCPref-mystyle} are
given at Appendix~B.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Syntax of parameter settings}
\label{sec.syn}
The set of values of all parameters defines a \emph{style} of figures.
Most of parameters, \eg \verb+\StateLineColor+ which defines the
color of the line
that delimits a state, may be given a \emph{temporary} value, within a
figure, without changing the style.
These parameters are dealt with by means of 3 different commands:
\noi
% \hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Chg+\textsl{Param}\verb+{+ \textsl{Val} \verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Gives the new value \textsl{Val} to \verb+\+\emph{Param}.
\end{minipage}%
% \smallskip
\noi
% \hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Rst+\textsl{Param}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Restores the style value in \verb+\+\emph{Param}.
\end{minipage}%
% \smallskip
\noi
% \hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\Set+\textsl{Param}\verb+{+ \textsl{Val} \verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets the style value for \verb+\+\emph{Param} to \textsl{Val} .
\end{minipage}%
\medskip
\noi
% In order to be effective, the command \verb+\Set+\textsl{Param} has to be
% called \emph{outside} a picture.
The command \verb+\Set+\textsl{Param} can be
called \emph{outside} a \verb+\VCPicture+ environment, in which case
it will be effective in all subsequent figures, until a new setting
of the same parameter.
Its natural place, if it is considered as a modification of the style,
is in the preamble, after the call to the package \VCSG.
If the command \verb+\Set+\textsl{Param} is
called \emph{inside} a \verb+\VCPicture+ environment, its effect will
be restricted to that figure.
Such parameters will be called \emph{adjustable parameters} in the
sequel.
Note that in the case where \verb+\+\textsl{Param} is a value
(a \emph{length} or a \emph{scale}), the
value of \textsl{Val} in \verb+\Chg+\textsl{Param}\verb+{+\textsl{Val}\verb+}+ is a
\emph{coefficient} which is applied to the style value of \verb+\+\textsl{Param}
defined with \verb+\Set+\textsl{Param}\verb+{+\textsl{Val}\verb+}+.
Therefore, in this case, \verb+\Rst+\textsl{Param} is equivalent to
\verb+\Chg+\textsl{Param}\verb+{1}+.
The other parameters, as those that define the ``dimmed'' style,
are called \emph{preset parameters}.
%Belong to that class those parameters that can be ``adjusted'' by means
%of an optionnal argument, \eg \verb+\EdgeLabelPosit+ which gives
%the implicit position of the label on an edge.
There is finally a class of parameters that fall in between the
adjustable and the preset ones, those for which several values are
``preset'' but that can be given other values.
%For instance, the scale of the
%picture is fixed by the parameter \verb+\VCScale+: it can given
%the preset values \verb+\NormalScale+, \verb+\SmallScale+ or
%\verb+\LargeScale+
%by means of the command \verb+\NormalPicture+, \verb+\SmallPicture+
%or \verb+\LargePicture+ respectively, or given any chosen value
%\textsl{Val} by the command \verb+\FixVScale{+\textsl{Val}\verb+}+ .
%
These parameters will be called \emph{multivalued preset parameters}.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Scale parameter {\rm(Multivalued preset parameter)}}\label{sec.sca-par}
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\FixVCScale{+\textsl{Scale}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets \verb+\VCScale+ to \textsl{Scale}.\index{FixVCScale}
\end{minipage}%
\medskip
\noi
The commands
\verb+\MediumPicture+, \verb+\SmallPicture+, \verb+\TinyPicture+ \
and \verb+\LargePicture+ set \verb+\VCScale+ to the values
\verb+\MediumScale+, \verb+\SmallScale+, \verb+\TinyScale+
and \verb+\LargeScale+ respectively.
Their values are
\begin{center}
\begin{tabular}{|c|c|c|c|}
\verb+\TinyScale+ & \verb+\SmallScale+ & \verb+\MediumScale+ &
\verb+\LargeScale+\\
\hline
$0.42$ & $0.5$ & $0.6$ & $0.85$ \\
\hline
\end{tabular}
\end{center}
%\texttt{0.85} respectively and can be modified with a \verb+\renewcommand+.
These preset values can be modified by a \verb+\renewcommand+.
%%%%%%%%%%%%%%%%%%%%%%
\subsection{State parameters}\label{sec.sta-par}
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{State diameter {\rm(Multivalued preset parameter)}}
~
This parameter controls, \via the commands
\verb+\MediumState+, \verb+\SmallState+
or \verb+\LargeState+ the value of a number of other preset parameters.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColoText}
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\verb+\FixStateDiameter{+\textsl{Diam}\verb+}+
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColoFigu}%
% \setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
Sets the state diameter to \textsl{Diam} (\textsl{Diam} is
a length) until the next call to a \verb+\ZState+ command, or to the
next figure if called inside a \verb+\VCPicture+.\index{FixStateDiameter}
\end{minipage}%
\smallskip
%\noi
%\hspace*{-\jsIndent}
%\begin{minipage}[t]{\ColoText}
% \par\vspace*{0mm}% pour l'alignement sur le haut
% \footnotesize
%\verb+\setlength{\ZStateDiameter}{+\textsl{ZDiam}\verb+}+
% \end{minipage}%
%\hspace*{1.2em}%
%\begin{minipage}[t]{\ColoFigu}%
%% \setlength{\parindent}{\parindenttemp}%
%\par\vspace*{0mm}% pour l'alignement sur le haut
Preset diameter sizes are:
\begin{center}
\begin{tabular}{|c|c|c|c|}
\verb+\VerySmallState+ & \verb+\SmallState+ & \verb+\MediumState+ &
\verb+\LargeState+\\
\hline
$0.3$cm & $0.6$cm & $0.9$cm & $1.2$cm\\
\hline
\end{tabular}
\end{center}
These values can be modified by a \verb+\renewcommand+. However, as
commands that call these parameters deal also with other parameters
as the eccentricity of loops or the size of initial and final arrows,
changing these values without modifying the other ones can lead to
an ungainly result.
The shape of a normalized automaton can be drawn in the following way:
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
%\SmallPicture
\VCDraw{%
\begin{VCPicture}{(-5,-3)(5,3)}
\FixStateDiameter{5cm} \ChgStateLabelScale{3}
\State[{\cal A}]{(0,0)}{A}
\MediumState \RstStateLabelScale
\State[i]{(-4,0)}{I} \State[t]{(4,0)}{T}
\VSState{(-1,-1)}{P1} \VSState{(-1,1)}{P2} \VSState{(-1.4,0)}{P3}
\VSState{(1,-1)}{Q1} \VSState{(1,1)}{Q2} \VSState{(1.4,0)}{Q3}
\Initial{I} \Final{T}
%
\EdgeL{I}{P1}{} \EdgeL{I}{P2}{} \EdgeL{I}{P3}{}
\EdgeL{Q1}{T}{} \EdgeL{Q2}{T}{} \EdgeL{Q3}{T}{}
\end{VCPicture}
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-5,-3)(5,3)}
\FixStateDiameter{5cm} \ChgStateLabelScale{3}
\State[{\cal A}]{(0,0)}{A}
\MediumState \RstStateLabelScale
\State[i]{(-4,0)}{I} \State[t]{(4,0)}{T}
\VSState{(-1,-1)}{P1} \VSState{(1,-1)}{Q1}
\VSState{(-1,1)}{P2} \VSState{(1,1)}{Q2 ]
\VSState{(-1.4,0)}{P3} \VSState{(1.4,0)}{Q3}
\Initial{I} \Final{T}
%
\EdgeL{I}{P1}{} \EdgeL{I}{P2}{} \EdgeL{I}{P3}{}
\EdgeL{Q1}{T}{} \EdgeL{Q2}{T}{} \EdgeL{Q3}{T}{}
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{State adjustable parameters}
~ Each following parameter can be modified by the command
\verb+\Chg+\textit{Parameter}. The style value can be restored by
\verb+\Rst+\textit{Parameter}
and one can set the style value with \verb+\Set+\textit{Parameter}.
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value & Possible values\\
\hline
\textit{StateLineStyle} & \texttt{solid} & \texttt{dashed}, \texttt{dotted}, \texttt{none}\\
\hline
\textit{StateLineWidth} & \texttt{1.8pt} &\\
\hline
\textit{StateLineColor} & \texttt{black} & \texttt{red}, \texttt{lightgray}, \ldots\\
\hline
\textit{StateLabelColor} & \texttt{black} & \texttt{blue}, \texttt{Salmon}, \ldots\\
\hline
\textit{StateLabelScale} & \texttt{1.7} &\\
\hline
\textit{StateFillStatus} & \texttt{solid} & \texttt{vlines}, \texttt{hlines}, \texttt{crosshatch}, \texttt{none}\\
\hline
\textit{StateFillColor} & \texttt{white} & \texttt{green}, \texttt{Purple}, \ldots\\
\hline
\end{tabular}
\end{center}
\index{StateLineStyle}\index{StateLineWidth}\index{StateLineColor}
\index{StateLabelColor}\index{StateLabelScale}\index{StateFillStatus}
\index{StateFillColor}
As it has been previously noticed, the argument of \verb+\ChgStateLineWidth+
is not a \texttt{length} but a coefficient applied to the style width.
For instance, with the default value of \textit{StateLineWidth},
after \verb+\ChgStateLineWidth{2}+
edges will be drawn with a \texttt{3.6pt} width.
When pictures are drawn to scale \verb+\VCScale+ that is set to \texttt{0.6},
printing state labels with scale \texttt{1.7} makes them to be as large
as characters of the text. As for line width, \verb+\ChgStateLabelScale{.5}+
sets the label scale to \texttt{0.85} that make then twice smaller
than characters of the text (because of \verb+\VCScale+).
\clearpage
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{State preset parameters}
~
They deal with the definition of ``dimmed'' states.
%To be modified with a \verb+\renewcommand+ .
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value\\
\hline
\textit{DimStateLineStyle} & \texttt{solid} \\
\hline
\textit{DimStateLineColor} & \texttt{gray} \\
\hline
\textit{DimStateLineCoef} & \texttt{1} \\
\hline
\textit{DimStateLabelColor} & \texttt{gray}\\
\hline
\textit{DimStateFillColor} & \texttt{white} \\
\hline
\end{tabular}
\end{center}
\index{DimStateLineStyle}\index{DimStateLineColor}\index{DimStateLineCoef}
\index{DimStateLabelColor}\index{DimStateFillColor}
\textit{DimStateLineCoef} is a coefficient that is applied to
\textit{StateLineWidth} in drawing dimmed states. It might be larger
than~$1$ to compensate optical effects when
\textit{DimStateLineStyle} is \texttt{dashed} or \texttt{dotted}.
The style of dimmed states can be fixed by the command
\\\verb+\FixDimState{+\textit{LineStyle}\verb+}{+\textit{LineColor}\verb+}{+\textit{LineCoef}%
\verb+}{+\textit{LabelColor}\verb+}{+\textit{FillColor}\verb+}+.
\index{FixDimState}
\medskip
In mode \textsl{StateLineDouble} or when one uses the command \verb+\FinalState+,
two parameters give the width of each of both lines
and the distance between them. These values are coefficients that are
applied to \textsl{StateLineWidth}.
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value\\
\hline
\textsl{StateLineDblCoef} & \texttt{0.6} \\
\hline
\textsl{StateLineDblSep} & \texttt{0.4} \\
\hline
\end{tabular}
\end{center}
\index{StateLineDblCoef}\index{StateLineDblSep}
These values can be fixed by the command
\verb+\FixStateLineDouble{+\textsl{Coef}\verb+}{+\textsl{Sep}\texttt{\}}.
\index{FixStateLineDouble}
%%%%%%%%%%%%%%%%%%%%%%
\subsection{Transition parameters}\label{sec.tra-par}
\paragraph{Edge adjustable parameters}
~ Each following parameter can be modified by the command
\verb+\Chg+\textit{Parameter}. The style value can be restored by \verb+\Rst+\textit{Parameter}
and one can set the style value with \verb+\Set+\textit{Parameter}.
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value & Possible values\\
\hline
\textit{EdgeLineStyle} & \texttt{solid} & \texttt{dashed}, \texttt{dotted}, \texttt{none}\\
\hline
\textit{EdgeLineWidth} & \texttt{1pt} &\\
\hline
\textit{EdgeLineColor} & \texttt{black} & many colours\\
\hline
\textit{EdgeLineDblStatus} & \texttt{false} &\texttt{true}\\
\hline
\textit{EdgeNodeSep} & \texttt{0pt} & \\
\hline
\textit{EdgeLabelColor} & \texttt{black} & many colours\\
\hline
\textit{EdgeLabelScale} & \texttt{1.7} &\\
\hline
\textit{EdgeLabelSep} & \texttt{3.5pt} & \\
\hline
\end{tabular}
\end{center}
\index{EdgeLineStyle}\index{EdgeLineWidth}\index{EdgeLineColor}
\index{EdgeLabelColor}\index{EdgeLabelScale}\index{EdgeLineDblStatus}
\index{EdgeLabelSep}\index{EdgeNodeSep}
As for states, the argument of \verb+\ChgEdgeLineWidth+ is
a coefficient applied to the style line width.
The parameter \textit{EdgeNodeSep} defines a distance between the
begining, and the end, of a transition and the state it starts from
and arrives to. The default value is \texttt{0pt}, that is, no
distance at all; but it may be the case, especially when there is no
line around the state that one may want to increase the distance
between the transition and the label of the state.
The parameter \textit{EdgeLabelSep} controls the distance between the
box that contains the label of the transition (built by \LaTeX) and
the transition.
\paragraph{Edge preset parameters}
~
A first class of preset parameters deals with the definition of ``dimmed'' edges.
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value\\
\hline
\textit{DimEdgeLineStyle} & \texttt{solid} \\
\hline
\textit{DimEdgeLineColor} & \texttt{gray} \\
\hline
\textit{DimEdgeLineCoef} & \texttt{1.2} \\
\hline
\textit{DimEdgeLabelColor} & \texttt{gray}\\
\hline
\end{tabular}
\end{center}
\index{DimEdgeLineStyle}\index{DimEdgeLineColor}\index{DimEdgeLineCoef}\index{DimEdgeLabelColor}
The style of dimmed edges can be fixed by the command
\\\verb+\FixDimEdge{+\textit{LineStyle}\verb+}{+\textit{LineColor}\verb+}{+\textit{LineCoef}%
\verb+}{+\textit{LabelColor}\verb+}+.
\index{FixDimEdge}
\medskip
The style of the border of edges (in mode \verb+\EdgeBorder+),
is defined by two parameters~:
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value\\
\hline
\textsl{EdgeLineBorderCoef} & \texttt{2} \\
\hline
\textsl{EdgeLineBorderColor} & \texttt{white} \\
\hline
\end{tabular}
\end{center}
\index{EdgeLineBorderCoef}\index{EdgeLineBorderColor}
\verb+\EdgeLineBorderCoef+ is a coefficient applied to \verb+\EdgeLineWidth+,
that gives the width of the border.\\The style of borders of edges can
be fixed by the command \verb+\FixEdgeBorder{+\textsl{Coef}\verb+}{+\textsl{Color}\texttt{\}}.
\index{FixEdgeBorder}
\medskip
The width of the double line of (in mode \textsl{EdgeLineDouble}),
is defined by two parameters, that give the width of each of both lines
and the distance between them. These values are coefficients that are
applied to \textsl{EdgeLineWidth}.
\begin{center}
\begin{tabular}{c|c|c|}
Parameter & Default value\\
\hline
\textsl{EdgeLineDblCoef} & \texttt{0.5} \\
\hline
\textsl{EdgeLineDblSep} & \texttt{0.6} \\
\hline
\end{tabular}
\end{center}
\index{EdgeLineDblCoef}\index{EdgeLineDblSep}
These values can be fixed by the command \verb+\FixEdgeLineDouble{+\textsl{Coef}\verb+}{+\textsl{Sep}\texttt{\}}.
\index{FixEdgeLineDouble}
\subsection{Advanced parameters}
These parameters can be changed by using the usual command \verb+\renewcommand+
(or \verb+\setlength+, when the parameter is a length).
As it has already be mentionned, the preset commands that set
the diameter of states control
parameters for drawing edges (the length of initial and final arrows or
the curvature of loops). Their values are:
\begin{center}
\begin{tabular}{c|c|c|c|}
\textit{X} & \verb+\ArrowOn+\textit{X} & \verb+\LoopOn+\textit{X} & \verb+\CLoopOn+\textit{X}\\
\hline
\verb+LargeState+ & \texttt{1.3} & \texttt{5.8} & \texttt{6}\\
\hline
\verb+MediumState+ & \texttt{1.5} & \texttt{5.8} & \texttt{8}\\
\hline
\verb+SmallState+ & \texttt{1.7} & \texttt{5.8} & \texttt{12}\\
\hline
\verb+VariableState+ & & \texttt{5.1} & \texttt{5.2}\\
\hline
\verb+VerySmallState+ & \texttt{5} & \texttt{15} & \\
\hline
\end{tabular}
\end{center}
\index{ArrowOnState}\index{LoopOnState}\index{CloopOnState}
\textit{ArrowOnX} is the coefficient that is applied to the radius of the state
to obtain the length of initial or final arrows. \textit{LoopOnX} and
\textit{CLoopOnX}
is the eccentricity of loops and closed loops respectively.
Another parameter determines whether the dimension of states
refer to the middle, the inner or the outer side of the boundary.
There exist one parameter for classical states and one
for states with double line:
\begin{center}
\begin{tabular}{c|c|}
Parameter & Default value \\
\hline
\verb+\StateDimen+ & \texttt{outer} \\
\hline
\verb+\StateDblDimen+ & \texttt{middle} \\
\hline
\end{tabular}
\end{center}\index{StateDimen}{\index{StateDblDimen}
The possible values are \texttt{inner}, \texttt{outer} or \texttt{middle}.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\ShowGrid
\VCDraw{%
\begin{VCPicture}{(-1,-1)(6,2)}
\ChgStateLineWidth{5}
\FixStateDiameter{1cm}
\renewcommand{\StateDimen}{inner}
\State{(0.5,0.5)}{I}
\renewcommand{\StateDimen}{middle}
\State{(2.5,0.5)}{M}
\renewcommand{\StateDimen}{outer}
\State{(4.5,0.5)}{O}
\end{VCPicture}}
\HideGrid
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\ShowGrid
\VCDraw{%
\begin{VCPicture}{(-1,-1)(6,2)}
\ChgStateLineWidth{5}
\FixStateDiameter{1cm}
\renewcommand{\StateDimen}{inner}
\State{(0.5,0.5)}{I}
\renewcommand{\StateDimen}{middle}
\State{(2.5,0.5)}{M}
\renewcommand{\StateDimen}{outer}
\State{(4.5,0.5)}{O}
\end{VCPicture}}
\HideGrid
\end{verbatim}
\end{minipage}%
%%%%%%%%%%%%%%%%%%%%%%
\paragraph{Transition adjustable geometric parameters}
~
All these parameters are adjustable. That means there
exist commands as \verb+\Set+\textsl{Parameter}, \verb+\Chg+\textsl{Parameter}
and \verb+\Rst+\textsl{Parameter}.
Arcs between states are characterized by some adjustable parameters:
\begin{center}
\begin{tabular}{c|c|c|c|}
\textsl{X} & \textsl{XAngle} & \textsl{XCurvature} & \textsl{XOffset} \\
\hline
\textsl{Arc} & \texttt{15} & \texttt{0.8} & \texttt{1}pt\\
\hline
\textsl{LArc} & \texttt{30} & \texttt{0.8} & =\textsl{ArcOffset}\\
\hline
\end{tabular}
\end{center}
\index{ArcAngle}\index{ArcCurvature}\index{ArcOffset}
\medskip
Except the curvature that depends on the size of states,
parameters that define loop,
the degree of opening and the offset, are adjustable parameters.
\begin{center}
\begin{tabular}{c|c|c|}
\textsl{X} & \textsl{XAngle} (degrees) & \textsl{XOffset} \\
\hline
\textsl{Loop} & \texttt{30} & \texttt{0}pt\\
\hline
\textsl{CLoop} & \texttt{22} & =\textsl{LoopOffset}\\
\hline
\textsl{LoopVar} & \texttt{28} & \texttt{0.7}pt\\
\hline
\end{tabular}
\index{LoopAngle}\index{LoopOffset}
\VCDraw{%
\begin{VCPicture}{(-3,-3)(3,3)}
\State{(0,0)}{A}
\Point{(0,0)}{B}
\Point{(-1,1.73)}{C}
\Point{(1,1.73)}{D}
\Point{(1,-1.73)}{E}
\Point{(1.09,-1.68)}{F}
\Point{(-.42,.92)}{G}
\Point{(1.86,-1.23)}{H}
\Point{(0.14,-2.23)}{I}
\ChgEdgeLineWidth{.5}
\EdgeR{H}{F}{} \EdgeR{I}{E}{}
\ChgEdgeArrowStyle{<->}
\ArcL[.5]{C}{D}{2\times\text{Angle}}
\ChgEdgeArrowStyle{-}
\EdgeR{E}{F}{\text{Offset}}
\DimEdge
\ChgEdgeLineWidth{.1}
\ChgEdgeLineStyle{dashed}
\EdgeL{E}{C}{} \EdgeL{B}{D}{} \EdgeL{F}{G}{}
\RstEdge
\LoopXL{.5}{90}{A}{30}{.1cm}{15}{}
%\LoopXL{.5}{A}{90}{30}{0}{15}{}
\end{VCPicture}%
}
\end{center}
\medskip
\noi
Likewise, one can modify the style of arrows, that are defined by
three adjustable parameters~:
\begin{center}
\begin{tabular}{c|c|}
Parameter & Default value \\
\hline
\textsl{EdgeArrowStyle} & \texttt{->} \\
\hline
\textsl{EdgeArrowWidth} & \texttt{5}pt \\
\hline
\textsl{EdgeArrowLengthCoef} & \texttt{1.4} \\
\hline
\textsl{EdgeArrowInsetCoef} & \texttt{0.1} \\
\hline
\end{tabular}
\VCDraw{%
\begin{VCPicture}{(-4,-2)(4,2)}
\pspolygon*(-1,-1)(0,1)(1,-1)(0,-.3)
\ChgEdgeArrowStyle{<->}
\Point{(-1.5,-1)}{A}
\Point{(-1.5,1)}{Ah}
\Point{(1.5,-1)}{B}
\Point{(1.5,-.3)}{Bh}
\Point{(-1,-1.5)}{C}
\Point{(1,-1.5)}{Ch}
\EdgeL{A}{Ah}{\text{Length}}
\EdgeR{B}{Bh}{\text{Inset}}
\EdgeR{C}{Ch}{\text{Width}}
\end{VCPicture}
}
\end{center}
\index{EdgeArrowStyle}\index{EdgeArrowWidth}%
\index{EdgeArrowLengthCoef}\index{EdgeArrowInsetCoef}
The {\em length} and the {\em inset} of arrows are given by
coefficients that are applied to the {\em width}.
There exists some other (non adjustable) parameters to define arrows
in special cases:
\verb+\EdgeArrowRevStyle+ is equal to \texttt{<-}, to draw transition
in reverse mode; for edges with double lines, the size of
arrows is a little bit more large.
It is defined by \verb+\EdgeDblArrowWidth+
and \verb+\EdgeDblArrowLengthCoef+ that are respectively equal to
\texttt{5.5}pt and \texttt{1.7}.
\medskip
\noi
Zigzag edges are characterized by some adjustable parameters:
\begin{center}
\begin{tabular}{c|c|}
Parameter & Default value \\
\hline
\textsl{ZZSize} & \texttt{0.9}cm \\
\hline
\textsl{ZZLineWidth} & \texttt{1.7} \\
\hline
\end{tabular}
\end{center}
\index{ZZSize}\index{ZZlineWidth}
\textsl{ZZSize} is the apparent diameter of the zigzag and \textsl{ZZLineWidth}
is a coefficient that is applied to \textsl{EdgeLineWidth} and gives
the width of the line.
\paragraph{Transition preset parameters}
~
The default position of labels on transitions depends on the type of transition.
For instance, on edges, this position is given by the variable \verb+\EdgeLabelPosit+
that is equal to $0.45$. The first column of the following array gives these values
for every transition.
\begin{center}
\begin{tabular}{c|c|c|}
\textsl{X} & \verb+\+\textsl{X}\texttt{LabelPosit} & \verb+\+\textsl{X}\texttt{LabelRevPosit} \\
\hline
\texttt{Edge} & \texttt{.45} & \texttt{.55}\\
\hline
\texttt{Arc} & \texttt{.4} & \texttt{.6}\\
\hline
\texttt{LArc} & \texttt{.4} & \texttt{.6}\\
\hline
\texttt{Loop} & \texttt{.25} & \texttt{.75}\\
\hline
\texttt{CLoop} & \texttt{.25} & \texttt{.75}\\
\hline
\texttt{Init} & \texttt{.1} & \texttt{.9}\\
\hline
\texttt{Final} & \texttt{.9} & \texttt{.1}\\
\hline
\end{tabular}
\end{center}
When the reverse mode is on, the position of label is given by
variables that correspond to the second column, as \verb+\EdgeLabelRevPosit+ for instance.
For the same type of transition, the sum of both variables
that defined position for straight and reverse arrows should
be equal to $1$ (if one wants to keep the same appearance when using
the \verb+ReverseArrow+ command).
These parameters can be modified with a \verb+\renewcommand+.
%%%%%%%%%%%%%%%%%%%%%%
\section{Using ``plain'' \PSTricks commands}
\label{sec.pla}
\VCSG is a set of macros based on \PSTricks. It is therefore
fully compatible with \PSTricks instructions.
Actually, the \verb+VCPicture+ environment is a specialization
of the \verb+pspicture+ environment; more, every state in \VCSG
is a \PSTricks node and every transition (loop, edge, arc)
is a node connection.
The following example shows how \VCSG commands can be mixed
with plain \PSTricks commands. For further explanation on
\PSTricks, we refer to~\cite{Girou94,GRM97,GRMRV07,Voss07}.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[t]{\ColFigur}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\bigskip
\begin{center}
\scalebox{\VCScale}{%
%
\begin{VCPicture}{(-7.5,-1)(3,2)}
\rput(-5,0){\rnode{X}{\psframebox{$\bigoplus$}}}
\rput(.5,0){\rnode{Y}{\psframebox{$\bigoplus$}}}
\State[1]{(-3.5,0)}{A}
\State[0]{(-1,0)}{B}
\State[0]{(2,0)}{C}
\Point{(-7,0)}{S}
\EdgeL{S}{X}{0011}
\EdgeL{X}{A}{}\EdgeL{A}{B}{}\EdgeL{B}{Y}{}\EdgeL{Y}{C}{}
\ncangles[angleB=90, armB=1cm]{C}{X}
\ncangles[angleB=90, armB=1cm]{C}{Y}
\end{VCPicture}}
\\The shif register for $1+x^2+x^3$
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[t]{\ColSource}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\begin{VCPicture}{(-7.5,-1)(3,2)}
\rput(-5,0){\rnode{X}{\psframebox{$\bigoplus$}}}% pstricks node
\rput(.5,0){\rnode{Y}{\psframebox{$\bigoplus$}}}% pstricks node
\State[1]{(-3.5,0)}{A} \State[0]{(-1,0)}{B} \State[0]{(2,0)}{C}
\Point{(-7,0)}{S}
\EdgeL{S}{X}{0011}
\EdgeL{X}{A}{} \EdgeL{A}{B}{} \EdgeL{B}{Y}{} \EdgeL{Y}{C}{}
\ncangles[angleB=90, armB=1cm]{C}{X}% pstricks connection
\ncangles[angleB=90, armB=1cm]{C}{Y}% pstricks connection
\end{VCPicture}
\end{verbatim}
\normalsize
\end{minipage}%
%
% %%%%%%%%%%%%%%%%%%%ù
% \section{Using Beamer document class}
% \VCSG can be used with Beamer document class to design slides.
% The document class
% should be called with {\tt xcolor=pst,dvips} options:
%
% \verb+\documentclass[xcolor=pst,dvips]{beamer}+.
\clearpage
% \vspace*{5cm}
\appendix
\begin{center}
{\Large \textsc{appendix}}
\end{center}
\section{Version history}
A first version of the package, which would be numbered 0.1, was
called \emph{Vaucanson} and used by the authors in their papers
between 2000 and 2003.
But, at the same time, the authors were involved, in cooperation with
the LRDE at EPITA, in the design of a \texttt{C++} platform for
programming automata, for which it was decided that there would be no
better name than Vaucanson as well.
We thus turned the name of the package for drawing automata to \VCSG.
% The name of every \textbf{file} of the library has been changed accordingly.
% No name of \textbf{command} in the package has been changed.
Version 0.2 was issued in May 2003 and made available on the web
together with this user's manual first version.
A series of bug corrections and slight improvements made us switch at
some point to version 0.3.
Just before sending the package to CTAN, we undertook a full review of
the code and updated the manual accordingly.
We call it version 0.4.
It is the last release before a completely new version of the
package, with many more options , which is currently under work.
\clearpage
\section{Style files}
\subsection{\texttt{slides} style}
{\footnotesize
\begin{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Package `Vaucanson-G' version 0.4
%%
%% This is file `VCPref-slides'.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Scales --- slides settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\LargeScale}{1.5}
\renewcommand{\MediumScale}{1.16}
\renewcommand{\SmallScale}{0.92}
\renewcommand{\TinyScale}{0.75}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% State aspect
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SetStateLineColor{blue}
\SetStateLineWidth{2pt}
\SetStateFillColor{Cyan}
\SetStateLabelColor{Sepia}
\FixDimState{solid}{YellowOrange}{1}{YellowOrange}{white}
%%%%%%%%%%%%%%
% Edge aspect
%%%%%%%%%%%%%%
\SetEdgeLineColor{Mahogany}
\SetEdgeLineWidth{1.2pt}
\SetEdgeLabelColor{OliveGreen}
%%% Dimmed edges
\FixDimEdge{dashed}{1.2}{Apricot}{Apricot}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{verbatim}}
\newpage
\subsection{\texttt{beamer} style}
{\footnotesize
\begin{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Package `Vaucanson-G' version 0.4
%%
%% This is file `VCPref-slides'.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Scales --- slides settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\LargeScale}{0.85}
\renewcommand{\MediumScale}{0.6}
\renewcommand{\SmallScale}{0.4}
\renewcommand{\TinyScale}{0.30}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% State aspect
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SetStateLineColor{blue}
\SetStateLineWidth{2pt}
\SetStateFillColor{Cyan}
\SetStateLabelColor{Sepia}
\FixDimState{solid}{YellowOrange}{1}{YellowOrange}{white}
%%%%%%%%%%%%%%
% Edge aspect
%%%%%%%%%%%%%%
\SetEdgeLineColor{Mahogany}
\SetEdgeLineWidth{1.2pt}
\SetEdgeLabelColor{OliveGreen}
%%% Dimmed edges
\FixDimEdge{dashed}{1.2}{Apricot}{Apricot}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{verbatim}}
\newpage
\subsection{\texttt{mystyle} style}
This file is given only on the purpose that it can be edited by the
user and called by the option \texttt{mystyle} of the wrapper(and this is the
reason why the \emph{name} \verb+VCPref-mystyle.tex+
of this file should not be changed).
The actual values given in this file as an example provide a style
which mimics the way automata are drawn with GasTeX \cite{Gast} as
can be witnessed below.
\noi
\hspace*{-\jsIndent}
\begin{minipage}[c]{\ColFigur+.5cm}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\begin{center}
\input{VCPref-mystyle}
\VCDraw{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B}
\FinalState[C]{(4,2)}{C} \State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b}
\LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ArcL{A}{B}{a'} \EdgeLineDouble \EdgeR{A}{C}{b'}
\EdgeLineSimple \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}%
}%
\end{center}
\end{minipage}%
\hspace*{1.2em}%
\begin{minipage}[c]{\ColSource-.5cm}
\setlength{\parindent}{\parindenttemp}%
\par\vspace*{0mm}% pour l'alignement sur le haut
\footnotesize
\begin{verbatim}
\input{VCPref-mystyle}
\VCDraw{%
\begin{VCPicture}{(0,-2)(6,2)}
% states
\State[A]{(0,0)}{A} \State[B]{(2,-2)}{B}
\FinalState[C]{(4,2)}{C} \State[D]{(6,0)}{D}
%initial-final
\Initial{A} \Final[s]{B}
% transitions
\ArcR{A}{B}{a} \ArcL{A}{C}{b}
\LArcR{B}{D}{c} \LArcL{C}{D}{d}
\ArcL{A}{B}{a'} \EdgeLineDouble \EdgeR{A}{C}{b'}
\EdgeLineSimple \EdgeL{B}{D}{c'} \LArcR{C}{D}{d'}
%
\end{VCPicture}}
\end{verbatim}
\normalsize
\end{minipage}%
\bigskip\bigskip
{\footnotesize
\begin{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Package `Vaucanson-G' version 0.4
%%
%% This is file `VCPref-mystyle'.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Scales ---
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\LargeScale}{1.2} %float : argument of a \scalebox
\renewcommand{\MediumScale}{1} %float
\renewcommand{\SmallScale}{.7} %float
\renewcommand{\TinyScale}{0.5} %float
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% State parameters --- Default settings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\LargeStateDiameter}{1.2cm} %length
\setlength{\MediumStateDiameter}{.8cm} %length
\setlength{\SmallStateDiameter}{.6cm} %length
\renewcommand{\StateDblDimen}{outer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% State aspect
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SetStateLineWidth{.14mm} %% length
\SetStateFillStatus{none} %% aspect
\SetStateFillColor{black} %% color
\SetStateLabelScale{1} %% float
\FixStateLineDouble{2}{5} %% Double style:
%%%%%%%%%%%%%%
% Edge aspect
%%%%%%%%%%%%%%
\SetEdgeLineWidth{.14mm} %% length
\SetEdgeLabelColor{black} %% color
\SetEdgeLabelScale{1} %% float
\FixEdgeLineDouble{1.5}{2} %% float :
%%% arrows
\SetEdgeArrowWidth{1.03mm} %width of the edge arrow
\SetEdgeArrowLengthCoef{1.37} %float :
\setlength{\EdgeDblArrowWidth}{1.3mm} %width :
\renewcommand{\EdgeDblArrowLengthCoef}{1.09} %
\SetEdgeArrowInsetCoef{0} %float : coef*\EdgeArrowSizeDim
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Arc geometry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\SetArcAngle{17} %% int (degree)
\SetLArcAngle{30} %% int (degree)
\SetArcCurvature{0.7} %% float
\SetArcOffset{1pt} %% length
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Loop geometry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\LoopOnLargeState}{5.5} %float
\renewcommand{\LoopOnMediumState}{7} %float : curvature
\renewcommand{\LoopOnSmallState}{9} %float
\renewcommand{\LoopOnVariableState}{4.5} %float
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Edge labels positionning
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\EdgeLabelPosit}{.5} %per cent
\renewcommand{\EdgeLabelRevPosit}{.5}
\renewcommand{\ArcLabelPosit}{.5}
\renewcommand{\ArcLabelRevPosit}{.5}
\renewcommand{\LArcLabelPosit}{.5}
\renewcommand{\LArcLabelRevPosit}{.5}
\renewcommand{\LoopLabelPosit}{.5}
\renewcommand{\LoopLabelRevPosit}{.5}
\renewcommand{\CLoopLabelPosit}{.5}
\renewcommand{\CLoopLabelRevPosit}{.5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Initial states parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\ArrowOnMediumState}{1} %float
\renewcommand{\ArrowOnSmallState}{1} %float
\renewcommand{\ArrowOnLargeState}{1} %float
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{verbatim}}
\clearpage
\begin{thebibliography}{99}
\bibitem{Girou94}
{\sc D.~Girou}
\newblock Pr\'esentation de PSTricks,
\newblock {\em Cahier GUTenberg} \textbf{16} (1994) 21-70.
% \texttt{http://www.tug.org/applications/PSTricks/}
\bibitem{Gast}
{\sc P.~Gastin}
\newblock {\em GasTeX: Graphs and Automata Simplified in TeX}.\\
\newblock \texttt{http://www.lsv.ens-cachan.fr/~gastin/gastex/gastex.html}
\bibitem{GRM97}
{\sc M.~Goossens, S.~Rahtz and F.~Mittelbach}
\newblock {\em The LaTeX Graphics Companion}.
\newblock Addison Wesley, 1997.
\bibitem{GRMRV07}
{\sc M.~Goossens, S.~Rahtz, F.~Mittelbach, D. Roegel, and H. Voss}
\newblock {\em The LaTeX Graphics Companion, 2nd Edition}.
\newblock Addison Wesley, 2007.
\bibitem{Sak01}
{\sc J. Sakarovitch},
\newblock {\em El\'ements de th\'eorie des automates}.
\newblock Vuibert, 2003.
\newblock Eng. trans. {\em Elements of Automata Theory}.
\newblock Cambridge University Press, to appear.
\bibitem{Voss07}
{\sc H. Voss},
\newblock {\em PSTricks -- Grafik f\"ur TeX und LaTeX}.
\newblock Lehmanns/Dante e.V., 4th ed. 2007.
\end{thebibliography}
Some examples of articles or slides that contain automata drawn with \VCSG
can be found at the following URLs:
\begin{itemize}
\item \texttt{http://www.enst.fr/${\scriptstyle\pmb{\sim}}$jsaka/}
\item \texttt{http:///igm.univ-mlv.fr/${\scriptstyle\pmb{\sim}}$lombardy/}
\end{itemize}
\printindex
%\newpage
%\input{VCManual_tab.tex}
\end{document}
%%%%%%%%%%%%%%%%%%%%%
|