File: foiltex.dtx

package info (click to toggle)
foiltex 2.1.4a-3
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 232 kB
  • ctags: 6
  • sloc: makefile: 48; sh: 28
file content (4247 lines) | stat: -rw-r--r-- 173,634 bytes parent folder | download | duplicates (4)
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
% ^^A        Metacomments 
% \iffalse
%
% foiltex.dtx Copyright (C) 1995,1997,1998,2002 IBM Corporation
%
%%
%% These files are updated versions of the FoilTeX package for use with
%% the new LaTeX2e.  There are many enhancements and a few bugs
%% have been fixed.  Undoubtedly there are many more.  Contact
%% the author if you find any bugs or have suggestions for improvement
%% of this suite of files.
%% ********************************************************************
% 
%<package|sample|17pt|20pt|25pt|30pt|short|fonts|oldstyle>\def\foiltexdate{2002/10/29}
%<package|sample|17pt|20pt|25pt|30pt|short|fonts|oldstyle>\def\foiltexversion{2.1.4a}
%<package|fonts>\NeedsTeXFormat{LaTeX2e}[1996/12/01]
%<sample|17pt|20pt|25pt|30pt|short|oldstyle>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesClass{foils}
%<17pt>\ProvidesFile{foil17.clo}
%<20pt>\ProvidesFile{foil20.clo}
%<25pt>\ProvidesFile{foil25.clo}
%<30pt>\ProvidesFile{foil30.clo}
%<short>\ProvidesFile{foilshrt.sty}
%<fonts>\ProvidesFile{fltfonts.def}
%<sample>\ProvidesFile{sampfoil.tex}
%<oldstyle>\ProvidesFile{foils.sty}
%<*driver>
\def\foiltexdate{2002/10/29}
\def\foiltexversion{2.1.4a}
\ProvidesFile{foiltex.drv}
%</driver>
       [\foiltexdate\space v\foiltexversion\space
%<package>        FoilTeX Class File, Copyright IBM 1995,1997,1998,2002]
%<17pt|20pt|25pt|30pt|short>        FoilTeX file (size option), Copyright IBM 1995,1997,1998,2002]
%<fonts>        FoilTeX font definition file, Copyright IBM 1995,1997,1998,2002]
%<sample>        Sample FoilTeX file, Copyright IBM 1995,1997,1998,2002]
%<oldstyle>        FoilTeX Compatibility Style File, Copyright IBM 1995,1997,1998,2002]
%<*driver>
]
\documentclass[draft]{ltxdoc}
\GetFileInfo{foiltex.drv}
%\EnableCrossrefs
%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
%\RecordChanges     % Gather update information
%\OnlyDescription  % uncomment for user instructions only
\DeclareRobustCommand\FoilTeX{{\normalfont%
   {\sffamily Foil}\kern-.03em{\rmfamily\TeX}}}
\newcommand\at{\char '100 }  % An @ sign character for \tt font
\newcommand\bs{\char '134 }  % A backslash character for \tt font
\newcommand{\AMSTeX}{{$\cal A$}\kern-.1667em\lower.5ex\hbox{$\cal M$}%
    \kern-.125em{$\cal S$}-\TeX}
\newcommand{\VTeX}{V\TeX}
\newcommand{\postscript}{\textsc{PostScript}}
\newcommand\listi{ \bs\at listI}
\newcommand\textsfb[1]{\textsf{\textbf{#1}}}
\newcommand\textsfi[1]{\textsf{\textsl{#1}}}
\newcommand\tabfiller[1]{\vrule height #1 width 0pt}
\DeclareFixedFont{\samphugesf}{OT1}{cmss}{m}{n}{20.78}
\hfuzz 1pt
\usepackage{latexsym}
\let\oldendverbatim\endverbatim
\def\endverbatim{\oldendverbatim\vskip-\baselineskip}
\AtBeginDocument{\DeleteShortVerb{\|}}

\begin{document}
 \title{The \FoilTeX\ class package\thanks{This package
        has version number~v\foiltexversion, last
        revised \foiltexdate.}}
 \author{Jim Hafner\\
  IBM Research Division\\
  Almaden Research Center, K56-B2\\
  650 Harry Road\\
  San Jose, CA 95120-6099\\
 \texttt{hafner@almaden.ibm.com}}
 \date{Printed on \today}
 \maketitle
 \DocInput{foiltex.dtx}
\end{document}
%</driver>
%
% \fi
% 
% \CheckSum{3616}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%
% \changes{v2}{\foiltexdate}
%     {\FoilTeX\ version~\foiltexversion, for \LaTeXe.}
%
% \section*{Preface}
% The original \FoilTeX\ was a \LaTeX-like system for typesetting foils
% which used its own format file.  This new version has converged into a
% \LaTeXe\ class package.  Its features include simplicity of use,
% compatibility with \LaTeX, large sans serif font as default, extra
% macros to start foils with bold headings and special mechanisms to
% control the footer and header.  The primary enhancement, besides the
% gain obtained by being just a class file for \LaTeXe, is the addition
% of simple tools to rotate either the entire set of foils to landscape
% mode or to rotate individual foils.  Because this is integrated with
% \LaTeXe, the use of color and other fancy stuff comes automatically.
% No additional utilities are required.
% 
% This document is the user guide for \FoilTeX\ and describes its basic
% features and components.
% 
% There are restrictions on the use of \FoilTeX.  Please refer to
% Section~\ref{sec:restrictions} for more information\footnote{Copyright
% \copyright 1995,1997,1998,2002 by International Business Machines Corporation.}.
% 
% \TeX\ is a trademark of the American Mathematical Society.
% \postscript\ is a trademark of Adobe Systems, Incorporated.  
% 
% \newpage
% 
% \tableofcontents\newpage
% 
% This document describes the \FoilTeX\ system (version~\foiltexversion)
% for making foils (slides, transparencies, overheads, etc.).  In
% contrast to the previous version which required its own format file,
% this new version is fully integrated into \LaTeXe\ as a class package.
% Like the earlier version, it is much simpler to use than \SliTeX\ (or
% the \SliTeX\ class package), and should be very easy for typical
% \LaTeX\ users to master.  This document tells you about the special
% features it has and the extra macros that have been added.  It also
% includes installation instructions which are now much easier than
% version~1.0.1.  Other than some differences with font availability
% (sizes not families), it should work under any
% implementation of \LaTeXe.  It is assumed that you are already familiar
% with \LaTeX.  If not, you should get the books \emph{\LaTeX: A
% Document Preparation System} 2nd edition, by Leslie
% Lamport~\cite{latexbook}, and \emph{The \LaTeX{} Companion}, by Michel
% Goossens, Frank Mittelbach and Alexander Samarin~\cite{companion}.
% 
% \section{The \FoilTeX\ package} \label{sec:package}
%  
% The \FoilTeX\ package consists of the files listed in
% Table~\ref{tab:package} on top of the basic implementation of \LaTeXe.
% You will probably get it packaged with just the first three files.  The
% others are generated by running \LaTeX\ on the \texttt{foiltex.ins}
% file (see Section~\ref{sec:installation} for more details).
% Documentation (both user guide and code description) can be obtained
% by running \LaTeX\ on the \texttt{foiltex.dtx} file.  
% 
% \begin{table}[htb]
% \caption{The files in the \FoilTeX\ package}\label{tab:package}
% \begin{center}
% \begin{tabular}{ll}
%     \texttt{readme.flt}  & a simple readme file \\
%     \texttt{foiltex.ins} & driver file for unpacking        \\
%     \texttt{foiltex.dtx} & user guide and documented source \\
%     \texttt{foils.cls}   & main class file                  \\
%     \texttt{fltfonts.def}& font definition file             \\
%     \texttt{foils.sty}   & compatibility mode style file    \\
%     \texttt{foil17.clo}  & {17pt} class option file  \\
%     \texttt{foil20.clo}  & {20pt} class option file  \\
%     \texttt{foil25.clo}  & {25pt} class option file  \\
%     \texttt{foil30.clo}  & {30pt} class option file  \\
%     \texttt{foilshrt.clo}& {shortform} class option file (new in 2.1.3) \\
%     \texttt{sampfoil.tex}& sample \FoilTeX\ file            
% \end{tabular}
% \end{center}
% \end{table}
% 
%  
% The main class file, \texttt{foils.cls}, together with
% \texttt{fltfonts.def} form the heart of \FoilTeX.  The former defines
% the basic set of macros that are used (and includes a request to input
% the latter) and the latter defines all the fonts used by \FoilTeX.
% Font selection is done via the \LaTeXe\ NFSS scheme.  The
% \texttt{foils.sty} file is just a wrapper for \texttt{foils.cls} in
% compatibility mode. 
%  
% The next group of files are the class option files that change the
% default font sizes and some list spacing parameters. See
% Sections~\ref{sec:starting} and~\ref{sec:fonts} for more information
% about these files.
% 
% The last file is a relatively extensive sample file.  It demonstrates
% some of the basic features and is self-documented.  If you don't like
% reading documentation (like this) you can probably do pretty well with
% \FoilTeX\ simply by browsing through the sample file and looking at
% its output. To see its output (after installation), simply type
% \begin{verbatim}
%     latex sampfoil
% \end{verbatim}
% This creates the \verb|.dvi| and \verb|.aux| files.  You will need to
% rerun this step to get the cross-referencing right.  You can then
% preview or print this as you would any other \verb|.dvi| file.  
% 
% \subsection{Package differences with original \FoilTeX}
% \label{sec:differences}
% 
% The original \FoilTeX\ package (version 1.0.1) contained a number of
% similar files plus many more.  Because \FoilTeX\ is now integrated
% with \LaTeX, the additional files are no longer necessary.  For
% example, we no longer include the \texttt{colordvi.sty} files since
% this is handled in a much cleaner and more integrated way with the
% \texttt{color.sty} of the \texttt{graphics} package.  We also don't
% include anything for \postscript\ fonts since that is nicely handled
% with the PSNFSS packages.  Because we are integrated with \LaTeX,
% you can even use the \texttt{t1enc.sty} package to access the EC
% fonts (see below).  (This has not been extensively tested because
% the author doesn't use them, but it did work on some smaller test
% cases, e.g., \texttt{sampfoil.tex}.)  There are no more
% system-specific files since that is handled directly by the \LaTeX\
% installation.  Similarly, we don't need to include a file for using
% the \AMSTeX\ fonts.  Finally, the ``This is \emph{not} \LaTeX''
% warning has been removed as it is completely irrelevant now.
% 
% \subsection{Additional Features in Version~2.1}
% \label{sec:newin2.1}
%
% There are very few new features in this version.  The biggest change
% is the support for the new EC fonts (and backlevel support for the
% DC fonts version~1.3 which was not included in version~2.0.1 of
% \FoilTeX).  An alternative to the \texttt{t1enc.sty} package for
% accessing the EC fonts (with the \texttt{T1} encoding) is via the line
% \begin{verbatim}
%    \usepackage[T1]{fontenc}
% \end{verbatim}
% in the preamble.  See Section~\ref{sec:newoptionsin2.1} for more
% information about using these fonts.  Note, that we have no support
% for the TC (\TeX{} Companion) fonts, since we don't understand how
% they are used.
%
% The only other changes are either small bug fixes (most notably with
% the footline --- thanks to Angelika Schneider for finding two!) and a
% re-encoding of the \texttt{fltfonts.def} file so that it is smaller.
% Version~2.1.1 has a small bug fix to the order of list environment 
% definitions. 
% 
% \subsection{Additional Features in Version~2.1.3}
% \label{sec:newin2.1.3}
%
% Version~2.1.2 probably never made it outside of IBM, but it included
% a number of other bug fixes.  Version~2.1.3 has the following
% additional features:
% \begin{itemize}
% \item Addition of a \verb|\captionfraction| command
% to set the width of the captions as a fraction of the text width.
% With these, we have deprecated \verb|\captionwidth|.  See
% Section~\ref{sec:dimensions}.  This was found by John Wu.
% \item Rotation support for DVIPSONE from Y\&Y, Inc.  My thanks to
% them for passing on the necessary code changes. 
% \item Addition of \texttt{shortform} class option, which can be used
% to generate a document which takes up much less space (paper,
% mostly).  This was added in response to some requests by Neal Beck
% who asked for something like this over a year ago. 
% \item Bug fix for the \texttt{figure*} and \texttt{table*} and
% related environments (these were supposed to be unnumbered but
% always had a number).  Thanks to Scott Berger for finding this
% problem.
% \item Bug fix for the \verb|\big| and related operators.  This bug
% was reported by Hans-Peter Zehrfeld (thanks).
% \item Additional support for other paper sizes, as provided by Owen
% Kelly.  These new sizes are \texttt{ledgerpaper},
% \texttt{legalpaper}, \texttt{a3paper}, \texttt{a2paper},
% \texttt{a1paper}.  The second of these had been suppressed in
% earlier versions.  It is restored here on request.
% \end{itemize}
%
% \subsection{Additional Features in Version~2.1.4}
% \label{sec:newin2.1.4}
%
% Version~2.1.4 has the following additional features and fixes:
% \begin{itemize}
% \item Patches to enable rotation with MicroPress' \VTeX, courtesy of
% M.~Vulis and W.~Schmidt, from May~2000.
% \item New paper (sort of) dimensions for screen display of foils,
% provided by Stephen Sangwine. 
% \item Enhancements to work with PDF\LaTeX.
% \item Interoperability patches for \texttt{hyperref}. 
% \item A simple mechanism (\texttt{fltfonts.cfg} configuration file) 
% to allow for more user-customizable fonts.
% \end{itemize}
%
% Many thanks to all who contributed these patches and fixes and 
% suggestions and my apologies for taking so long to incorporate them.
%
% Version~2.1.4a fixes an interoperability problem between
% \texttt{dvips} and Ghostview --- landscape foils are rotated so they
% aren't upside down anymore!  
%
% \subsection{Related Packages on CTAN} \label{sec:otherstuff}
%
% A number of people have contributed to the \FoilTeX{} family (in
% some ways indirectly).   For example, check out \texttt{epslatex.ps}
% by Keith Reckdahl which describes a way to put a EPS Logo on
% every page and still manage to keep the size of the reluting
% PostScript file small (effectively only loading the real EPS logo
% only once as a header file).  You can find this document in the
% \texttt{info} directory on your favorite CTAN.
%
% Another package you can find on CTAN is the \textsf{FoilHTML}
% package by Boris Veytsman.  It provides extensions to
% \texttt{latex2html} to handle \FoilTeX's extra macross. 
%
% If you want to put multiple foils (reduced) on a single page, you
% can use the \texttt{psnup} utility (found in most good \TeX{}
% bundles). 
%
% \section{Getting started: the {\tt \bs documentclass} command}
% \label{sec:starting}
%  
% \DescribeMacro{\documentclass\{foils\}}
% To create a \FoilTeX\ document, you edit a
% \LaTeX\ file.  Instead of the standard \LaTeX\ options specified in the
% \verb|\documentclass| command, you should use
% {\tt\begin{tabbing}
% \phantom{xxxx}\=\bs documentclass[{\it opts}]\{foils\}
% \end{tabbing}}
% \noindent Here, the \textit{opts} list can include most of the
% standard \LaTeX\ class file options plus a few more \FoilTeX-specific
% ones that are documented in Section~\ref{sec:classoptions}.
%  
% \DescribeMacro{17pt,20pt,25pt,30pt}
% \DescribeMacro{shortform}
% By default, \texttt{foils.cls} loads \texttt{foil20.clo} and sets up
% the normal size fonts at 20pt.  Analogous to \LaTeX's \texttt{11pt}
% and \texttt{12pt} style options, \FoilTeX\ has \texttt{25pt},
% \texttt{30pt} and \texttt{17pt} options.  For example, to make normal
% size at 25pt the command
% {\tt \begin{tabbing}
% \phantom{xxxx}\=\bs documentclass[25pt,{\it opts}]\{foils\}
% \end{tabbing}}
% \noindent will do the trick.  The default
% \texttt{20pt} \emph{is} an acceptable option, though it is redundant.
% Besides the \texttt{pt}-type options, version~2.1.3 adds the
% \texttt{shortform} option.  This can be used instead to create a
% document which takes up much less space (paper?) and so is suitable
% for redistribution.  The text is sized similar to the \texttt{12pt}
% option of \texttt{article.cls}.
%
% Once you have created your \FoilTeX\ file, run \LaTeX\ on it to get
% your \texttt{.dvi} file:
% {\tt\begin{tabbing}
% \phantom{xxxx}\= latex {\it filename}
% \end{tabbing}}
% 
%  
% \section{The basic features} \label{sec:basic1.0}
% 
% \FoilTeX\ has a number of (hopefully useful) built-in features.  The
% first is that the basic fonts are in large size, approximately 20pt,
% (so you do not need to do size changing to get large type).  The
% default font is also \textsf{sans serif} as this (in the opinion of
% many) looks better on foils than serif fonts like roman.  We have
% implemented \LaTeX's font and font size changing commands relative to
% this default.  More information about fonts and size changing can be
% found in Section~\ref{sec:fonts}.
% 
% In spite of the fact that the basic font is sans serif, the numerals
% and other symbols from the roman font when used in math mode are still
% in the roman font.  Thus mathematics will look exactly the same as in
% \LaTeX\ (only larger) but numerals in text will appear in sans serif.
% This is one of its nicer features. 
% 
% In addition, almost all \LaTeX\ macros are available including
% automatic referencing and citation, footnotes, and itemize (which will
% probably be very popular for foils).  The user is not expected to have
% to do anything to control font types or size changing, except as might
% be expected in a typical \LaTeX\ document.
% 
% \DescribeMacro{sampfoil.tex}
% The next subsections describe a number of additional macros and
% features that have been defined to make foilmaking easier.  See the
% \texttt{sampfoil.tex} file for a look at how some of these are used.
% 
% \subsection{The class options}\label{sec:classoptions}
% 
% The following standard \LaTeX\ class options are \emph{not} supported
% in \FoilTeX\ because they don't make sense in this environment:
% \begin{verbatim}
%    a5paper, b5paper, executivepaper, 10pt, 11pt, 12pt, 
%    oneside, twoside, openright, openany, titlepage, notitlepage, 
%    onecolumn, twocolumn.
% \end{verbatim}
% These all default to no-ops and, with the exception of
% \texttt{oneside}, \texttt{titlepage} and \texttt{onecolumn}, all give
% a warning message.
% 
% \DescribeMacro{35mmSlide}
% \DescribeMacro{Screen4to3|Screen16to9}
% \DescribeMacro{headrule}
% \DescribeMacro{footrule}
% \DescribeMacro{dvips|dvipsone|vtex}
% \DescribeMacro{magscalefonts}
% \DescribeMacro{useDCfonts}
% \DescribeMacro{*paper}
% \DescribeMacro{landscape}
% The following new options are supported in \FoilTeX.  
% \begin{description}
% \item[\texttt{35mmSlide}] This sets up the page layout for 7.33in.~by
% 11in.~paper, which is about the same aspect ratio as a 35mm slide.  You
% can use this if you plan to reproduce on this medium. 
% \item[\texttt{Screen4to3|Screen16to9}] These set up page layout for
% portrait display but in dimensions suitable for a computer display
% (without rotation). 
% \item[\texttt{headrule}] This places a rule below the header on every
% page (except the title page).  
% \item[\texttt{footrule}] This places a rule above the footer on every
% page (except the title page).   These two items seemed to be in demand
% and should preclude the use of \texttt{fancyheadings.sty} which can
% collide with some of \FoilTeX's page layout (see
% Section~\ref{sec:fancyhead} for additional information). 
% \item[\texttt{dvips|dvipsone|vtex}] 
% In order to support rotated foils and \texttt{landscape} in a clean
% way, we need to issue \verb|\special|s which are driver dependent.
% Since we only had access to one \postscript\ driver, namely,
% Rokicki's \texttt{dvips}, we could only support these
% \verb|\special|s for this one driver.  Declaring this option enables
% this special code.  The folks a Y\&Y, Inc., have passed on the
% necessary modifications to support their DVIPSONE driver.  Since I
% can't test this, I don't support it, but it's included in case it
% helps.  
% \FoilTeX~2.1.4 can also generate \verb|\special|s appropriate for use
% with \VTeX\ in PDF or \postscript\ mode. These can be accessed with
% the \texttt{vtex} option, but that is \emph{not} required as \VTeX\ is
% autodetected.  As with DVIPSONE, I have no way to test this, so it
% is supplied unsupported (by me, anyway). 
% See also Section~\ref{sec:acknowledgements} and 
% Section~\ref{sec:newin2.1.4}.  
% \item[\texttt{magscalefonts}]
% When using the \texttt{T1} encoding, use mag-scaled versions of the
% 10pt fonts (with some exceptions) rather than the large design sizes
% of the EC (or DC) fonts.  This is new in version~2.1 (see
% Section~\ref{sec:newoptionsin2.1}).
% \item[\texttt{useDCfonts}]
% \FoilTeX{} now supports the official EC fonts with the \texttt{T1}
% encoding.  For legacy users, this option will revert back to the
% last release of the DC fonts (version~1.3).  This is new in
% version~2.1 (see Section~\ref{sec:newoptionsin2.1}).
% \item[\texttt{*paper}]
% We've added support for these other papers sizes for making
% posters.  These are 
%  \begin{itemize}
%  \item[] \texttt{ledgerpaper} at 11in by 17in.
%  \item[] \texttt{legalpaper} at 14in by 8.5in.
%  \item[] \texttt{a3paper} at 420mm by 297mm.
%  \item[] \texttt{a2paper} at 594mm by 420mm.
%  \item[] \texttt{a1paper} at 840mm by 594mm.
%  \end{itemize}
% \item[\texttt{landscape}] 
% This adjusts the page dimensions by essentially swapping height and
% width.  Typically, it does not force the driver to do the necessary
% rotation steps.  As mentioned, in \FoilTeX\ with the \texttt{dvips},
% \texttt{dvipsone} or \texttt{vtex} option, both actions are handled
% automatically. 
% \end{description}
%
% \textbf{Note:} It is \emph{highly} recommended that users place most
% of the class options in a \texttt{foiltex.cfg} file (see
% Section~\ref{code:default-options}) instead of having
% them specified in the source file itself (as a class option).  This
% allows for better portability of documents.
%
% \subsubsection{Default options and \texttt{foiltex.cfg}} 
% \label{code:default-options}
% \DescribeMacro{foiltex.cfg}
% The default options for \FoilTeX\ are \texttt{letterpaper,20pt,final}.  
% However, you can have your own set of modified default options for
% \FoilTeX\ simply by having in your inputs path a file called
% \texttt{foiltex.cfg} with a line containing \verb|\ExecuteOptions|
% statements.  E.g., to configure for \texttt{dvips} and
% \texttt{landscape} and older DC fonts, your \texttt{foiltex.cfg}
% file might look like 
% \begin{verbatim}
%    \ExecuteOptions{dvips,landscape,useDCfonts}
% \end{verbatim}
% This file is not required, but can help set things up either
% system-wide or just for your personal use. 
%  
% \subsubsection{Default fonts and \texttt{fltfonts.cfg}}
% \label{code:default-fonts}
% \DescribeMacro{fltfonts.cfg}
% The default fonts for \FoilTeX\ are based on CM or EC/DC fonts
% and are loaded through the \texttt{fltfonts.def} file supplied in
% the package. 
% However, if you or your \TeX\ system are very clever, you can have
% your own set of preferred fonts.  To do this, place a file called 
% \texttt{fltfonts.cfg} in your inputs path. Include in this file
% enough information (e.g., a modified \texttt{fltfonts.def} file or 
% instructions to load other font definition files (e.g., \texttt{.fd}
% extensions)) to configure the fonts you like.
% The \texttt{fltfonts.cfg} file is not required, but can help set
% things up either system-wide or just for your personal use.
% Note, however, that this mechanism should be used with caution.
% 
% \subsubsection{New Options in Version~2.1} 
% \label{sec:newoptionsin2.1}
%
% There are two options new to version~2.1.  The first is the
% \texttt{magscalefonts}.  With the original \texttt{OT1} font
% encoding, the large fonts are basically scaled versions of the 10pt
% CM fonts (with a few exceptions).  Using the \texttt{T1} encoding,
% the fonts are sized by changing the design point size, not scaling a
% small font.  With the use of the EC fonts in this encoding, the
% presentation of the foils is \emph{very} different, since scaled
% versions of small fonts look very different from large point design
% fonts.  The author personally found that these scaled EC fonts
% looked thin and did not present themselves well.  Consequently,
% declaring this option will replace the large design fonts with
% scaled versions of the smaller fonts (e.g., the normal font
% \texttt{ecss2074} is replaced by \texttt{ecss1000 scaled 2074}).  The
% disadvantage of using this option is that you will need effectively
% two sets of large EC fonts, the scaled small fonts and the large
% design fonts.  I don't know any other way to deal with this problem.
% This option has no effect when using the \texttt{OT1} encoding
% (which is the default).
%
% The second additional option, \texttt{useDCfonts}, is probably
% temporary (to be removed at a later date).  This option will use the
% (now unsupported?) DC fonts version~1.3 instead of the default EC
% fonts.  This is included as a courtesy for DC font users who are not
% yet ready to move to the official EC fonts.  This also works in
% conjuction with the \texttt{magscalefonts} option with the same
% reasons and caveats as above.  This option has no effect
% \emph{unless} you do something to change the font encoding to
% \texttt{T1}.   
%
% You can add either or both of these options to your
% \texttt{foiltex.cfg} file as desired (see above). 
%
% \subsubsection{New Options in Version~2.1.3} 
% \label{sec:newoptionsin2.1.3}
%
% As mentioned in Section~\ref{sec:newin2.1.3}, the following options
% are new in this version: \texttt{dvipsone}, \texttt{shortform}.
% The first provides rotation support for Y\&Y, Inc.'s PostScript
% driver.  This can be put in your \texttt{foiltex.cfg} file.  
% The second, as described above, provides a method for
% generating an output document which uses less paper.  This is
% probably \emph{not} suitable for the configuration file.
% Also, we've added support for more (larger) paper sizes.
%
% \subsubsection{New Options in Version~2.1.4} 
% \label{sec:newoptionsin2.1.4}
%
% We've added the following new options (descibed elsewhere) to this
% release: \texttt{Screen4to3}, \texttt{Screen16to9}, \texttt{vtex} (not
% needed as this is auto-detected). 
%
% \subsection{The \texttt{\bs maketitle} command}\label{sec:maketitle}
% 
% \DescribeMacro{\maketitle}
% \FoilTeX's \verb|\maketitle| command produces results similar to
% \LaTeX's \texttt{titlepage} class option.  That is, it reads the
% contents of \verb|\title{}|, \verb|\author{}|, etc., and produces a
% titlepage, actually a title foil.  The title itself appears
% horizontally centered
% and down a small space from the top, in a \verb|\Large| bold sans
% serif font.  The author's name with address and date appear under the
% title, centered and in the \verb|\normalsize| font.  If desired, this
% can be followed by a (necessarily short) abstract with the word
% ``Abstract'' appearing in bold and centered above the text of the
% abstract.  The footer of the title page will contain some special text
% (see Section~\ref{sec:MyLogo} for more details).  The difference with
% the \texttt{titlepage} class option is that the abstract appears on
% the same page as the title/author information (provided \LaTeX\ didn't
% force a page break).
% 
% \subsection{The \texttt{\bs foilhead} and \texttt{\bs rotatefoilhead}
% macros}\label{sec:foilhead} 
% 
% \DescribeMacro{\foilhead}
% \DescribeMacro{\rotatefoilhead}
% You start new foils with either the \verb|\foilhead| or
% \verb|\rotatefoilhead| macros.  Their use is described
% by the following examples:
% {\tt\begin{tabbing}
% \phantom{xxxx}\= \bs foilhead\{{\it text}\} \\
% \phantom{xxxx}\= \bs foilhead[{\it length}]\{{\it text}\} 
% \end{tabbing}}
% \noindent This starts a new page and puts \textit{text} in
% \verb|\large| bold type at the top center of the new page.  After the
% header, a vertical space is added providing
% an automatic cushion between the header and the body of the foil.  You
% can adjust this space either up or down by putting in the optional
% argument a \TeX\ \textit{length}.  For example, if you want the body of your
% foil to sit closer to the header, you could use the command
% \begin{verbatim}
%     \foilhead[-.5in]{This is the Header}
% \end{verbatim}
% The default spacing is equal to the sum of 
% \begin{verbatim}
%     \parskip + \baselineskip + \foilheadskip
% \end{verbatim}
% The dimension \verb|\foilheadskip| is new to \FoilTeX~v\foiltexversion\ 
% and defaults to
% \texttt{18pt plus 0pt minus 18pt} in normal mode and \texttt{.25in} in
% compatibility mode.  You can reset this default using a
% \verb|\setlength| command.
% 
% The new (to \FoilTeX~v\foiltexversion) macro \verb|\rotatefoilhead| can
% be used just like the above.  If the \texttt{dvips} class option has
% been declared, then it attempts to rotate the \emph{entire} foil 90
% degrees from the default position.  This means a couple of things.
% First, if the default position is potrait, then this foil will be
% rotated to landscape.  If the default position is landscape (by use of
% the \texttt{landscape} option), then it rotates to portrait.  A
% similar thing happens if the \texttt{dvipsone} option is enabled.
% 
% Furthermore, if \LaTeX\ decides that it needs to split a rotated foil
% into more than one page, each of these pages will also be rotated.
% Normal orientation is recovered by the next invocation of
% \verb|\foilhead|.  
% 
% The \texttt{lscape} and other package files that can be
% used to rotate the contents of a page only rotate the page body but
% leave the header and footer in their normal orientation.  This makes
% sense in documents but not on foils.  Consequently, we have to support
% rotation in a different way.  \verb|\rotatefoilhead| will rotate
% everything on the page. 
% 
% These macros should be used to start any new foil, especially if a new
% heading is needed.  If you try to put too much text on a single foil,
% \FoilTeX\ will do its own page break.  This could cause some odd
% vertical spacing since there is a fair amount of stretchability in
% vertical glue, particularly in list environments.  This can easily be
% fixed simply by forcing a page break with an empty \verb|\foilhead{}|
% command or a \verb|\newpage| command.
% 
% \subsection{The \texttt{\bs MyLogo} and \texttt{\bs
% Restriction} macros} \label{sec:MyLogo}
% 
% \DescribeMacro{\MyLogo}
% \DescribeMacro{\Restriction}
% Another pair of macros not in standard \LaTeX are \verb|\MyLogo| and
% \verb|\Restriction|.  
% Each takes a single argument and is used to control the
% contents of part of the footline.  By design, the footline consists
% of the contents of \verb|\MyLogo| followed by the contents of
% \verb|\Restriction| all left justified, with the page number right
% justified\footnote{For the title foil, there is no page number;
% \texttt{\bs MyLogo} and \texttt{\bs Restriction} are centered and
% appear in \texttt{\bs footnotesize} font.}.  On the main foils, the
% default font size is \verb|\tiny|.  The contents of these macros can
% be an empty box as well.  By default, \verb|\Restriction| is empty and
% \verb|\MyLogo| is the phrase ``\textsf{-- Typeset by \FoilTeX\ --}''.
% 
% The declarations for these macros would normally be placed in the
% preamble to the document, i.e., before the \verb|\begin{document}|
% command.  However, these macros can be declared or redeclared at any
% place in the document.  They (and all the other commands that control
% the footer and header) are sensitive to \LaTeX's output routine.
% Consequently, care must be taken in their placement to be sure they
% act on the correct pages.  In the preamble or immediately after the
% \verb|\foilhead| command are best.  In addition, there are macro
% switches that can be used to easily turn on or off the logo, without
% having to do any redeclarations.  See Section~\ref{sec:toggle} for
% more information.
% 
% \verb|\MyLogo| is really intended for something idiosyncratic to the
% speaker or his organization.  For example, if you use the
% \texttt{graphics} or \texttt{graphicx} packages of \LaTeXe, you can
% put an \verb|\includegraphics| macro in \verb|\MyLogo| to get some
% graphic as the logo on every page:
% \begin{verbatim}
%    \MyLogo{\includegraphics[height=1in]{arclogo}}
% \end{verbatim}
% (together with a preamble command \verb|\usepackage{graphicx}|)
% puts a one inch tall version of the IBM Almaden Research Center logo
% (in EPS format) in the lower left corner of all the author's foils.
% \verb|\Restriction| was included in case you want to have each foil
% identified for a particular audience.  For example, at IBM, we have
% the option of displaying the IBM logo and words like
% ``Confidential''.  The defaults are set in \texttt{foils.cls}.
% 
% 
% \subsubsection{Toggling the logo}\label{sec:toggle}
% 
% \DescribeMacro{\LogoOff}
% \DescribeMacro{\LogoOn}
% Users of an early IBM version of \FoilTeX\ requested an easier
% mechanism (than undefining/redefining \verb|\MyLogo|) for inhibiting a
% logo from appearing on selected foils or all foils.  We implemented
% this feature with two switches.  These macros are \verb|\LogoOn| and
% \verb|\LogoOff| and they do exactly what their names imply.  If
% \verb|\LogoOff| appears before the footer is processed by the output
% routine no logo will appear (as if \verb|\MyLogo{}| were declared).
% This stays in effect until \verb|\LogoOn| is encountered, at which
% point the contents of \verb|\MyLogo| are restored.
%  
% So, for example, if you do not want the logo to appear at all, you can
% put the \verb|\LogoOff| command \emph{before} the
% \verb|\begin{document}| command.  If you want the logo only on the
% title page, then you can put this command \emph{after} the first
% occurrence of \verb|\foilhead|.  You can then turn the logo back on by
% putting the \verb|\LogoOn| command in a convenient place.
%  
% \subsection{The other three corners of the page} \label{sec:head-foot}
%  
% \DescribeMacro{\rightfooter}
% \DescribeMacro{\leftheader}
% \DescribeMacro{\rightheader}
% Since the macros \verb|\Restriction| and \verb|\MyLogo| control the
% bottom left corner of the page, there are other macros for putting
% text in the other three corners.  These are, not surprisingly,
% {\tt\begin{tabbing}
% \phantom{xxxx}\= \bs rightfooter\{{\it text}\}  \\
%               \> \bs leftheader\{{\it text}\}   \\
%               \> \bs rightheader\{{\it text}\}
% \end{tabbing}}
% \noindent They each take one argument, the text you want to place in
% the associated corner of the page.  These can also be redeclared
% within the document with the appropriate attention paid to the
% output routine.  See Section~\ref{sec:MyLogo}.
%  
% By default the headers are empty and the lower right footer is just
% the page number:
% \begin{verbatim}
%     \rightheader{}
%     \leftheader{}
%     \rightfooter{\quad\textsf{\thepage}}
% \end{verbatim}
% except on the title page where they are all suppressed.  You can
% easily suppress page numbering by declaring \verb|\rightfooter{}|.
% Unless controlled by a font size changing command, text in these
% regions appear in a \verb|\tiny| font.  These defaults are set in
% \texttt{foils.cls}
% 
% \subsection{Header and footer rules and \texttt{fancyheadings.sty}}
% \label{sec:fancyhead}
% 
% Many users requested a simple utility for putting rulers in the header
% or footer.  As mentioned above in Section~\ref{sec:classoptions}, this is
% now easily obtained with the \texttt{headrule} and \texttt{footrule}
% class options.
% 
% \DescribeMacro{\headwidth}
% Some users prefer to use the \texttt{fancyheadings.sty} package to
% control their headers and footers.  This allows control of rules, as
% well as centered text in these areas (which we thought was too much
% clutter).  To get \texttt{fancyheadings.sty} to work correctly with
% \FoilTeX's page rotation mechanism, add the following to your
% preamble:
% \begin{verbatim}
%     \let\headwidth\textwidth
% \end{verbatim}
% 
% \subsection{Predefined \texttt{Theorem} and \texttt{Proof} environments}
% \label{sec:theorem}
% 
% \DescribeMacro{\newtheorem}
% \DescribeMacro{Theorem}
% \DescribeMacro{Lemma}
% \DescribeMacro{Corollary}
% \DescribeMacro{Proposition}
% \DescribeMacro{Definition}
% \DescribeMacro{Proof}
% There are a number of (both starred and unstarred) \verb|\newtheorem|
% environments built in.  These are for \texttt{Theorem}, \texttt{Lemma}, {\tt
% Corollary}, \texttt{Proposition} and \texttt{Definition}.  Note the
% uppercased first letter (to avoid possible collisions with
% user-defined environments of this type).  Each must begin and end with
% \verb|\begin{}| and \verb|\end{}| commands as usual.  Their text
% begins with a bold sans serif label like \textsfb{Theorem} and the
% content of each is typeset in \textsfi{slanted sans serif}.  The
% unstarred forms are sequentially numbered and support automatic
% referencing. The starred forms suppress the numbering and referencing.
% 
% All these environments also support an optional argument that can be
% used for the inventor, common name of the theorem, etc.. 
% Thus
% \begin{verbatim}
%    \begin{Theorem*}[Gauss] Quadratic reciprocity is true!
%    \end{Theorem*}
% \end{verbatim}
% will produce (in large type)
% \begin{quotation}
%    \textsfb{Theorem. [Gauss]} \textsf{\textsl{ Quadratic
% reciprocity is true!}} 
% \end{quotation}
% The unstarred form will be numbered.
% 
% To implement this, we added code to \LaTeX's \verb|\newtheorem| macro
% which defines \emph{both} the starred and unstarred forms of these
% environments at the same time.  In this way, users could easily add
% their own versions of similar environments.  For example, 
% \begin{verbatim}
%   \newtheorem{Axiom}{Axiom}
% \end{verbatim}
% would define two environments \texttt{Axiom} and \texttt{Axiom*} that
% behaved just like \texttt{Theorem} and \texttt{Theorem*}.  In all other
% respects, e.g., numbering convention, \verb|\newtheorem| behaves just
% as in \LaTeX.
% 
% Finally, there is a \verb|Proof| environment which opens with the word
% \textsfb{Proof} and ends with a $\Box$.  The contents are 
% printed in the
% normal font.
%  
% \subsection{Mathematics in bold typeface}\label{sec:boldmath}
% 
% \DescribeMacro{\bm}
% Because \FoilTeX\ is fully integrated into \LaTeX, getting bold math
% is pretty much the same.  The only thing we did was to add some extra
% facilities to get at it.  The first we add is the \verb|\bm| macro
% which takes one argument:
% {\tt\begin{tabbing}
% \phantom{xxxx}\= \bs bm\{{\it formula}\}
% \end{tabbing}}
% \noindent This takes it argument (within mathematics mode) and
% replaces it with it emboldened version.  This is different from the
% \verb|\mathbf| command in that it emboldens everything including
% symbols.  The new version of this (as opposed to \FoilTeX\ v~1.0.1) 
% is much better.  It deals correctly with the current math
% style and so should work even in superscripts! 
% 
% \DescribeMacro{boldequation}
% The second method for getting bold mathematics is a pair of
% environments:
% {\tt\begin{tabbing}
% \phantom{xxxx}\= \bs begin\{boldequation\} \\ 
%     \> {\it formula} \\
%     \> \bs end\{boldequation\} \\
%     \> \\
% \phantom{xxxx}\> \bs begin\{boldequation*\} \\
%     \> {\it formula} \\
%     \> \bs end\{boldequation*\} 
% \end{tabbing}}
% \noindent They both set \textit{formula} in bold (even  super- and
% subscripts).  The unstarred form has automatic referencing and is
% numbered; the starred form inhibits the numbering and referencing.
% Essentially, they just do an automatic \verb|\boldmath| at the
% beginning and an \verb|\unboldmath| at the end of the formula.
% 
% \subsection{Hyphenation and raggedright}\label{sec:ragged}
% 
% \DescribeMacro{\righthyphenmin}
% \DescribeMacro{\lefthyphenmin}
% \DescribeMacro{\raggedright}
% \FoilTeX\ turns off hyphenation but allows a fair amount of horizontal
% interword spacing.  Unfortunately, this can create some unpleasant
% line breaks (at times).  This can be fixed with either a manual fill
% and line break (I use \verb|\hfil\break| but that's very \TeX y) or by
% inserting a discretionary hyphen (better to have them only when needed
% than to have them happen unpredictably). 
% 
% Some users feel that \verb|\raggedright| is preferable for foils.  It
% was decided not to make this the default (as this is not the author's
% opinion), but to leave this to the user's discretion.  To get this
% effect, simply put \verb|\raggedright| in the preamble to your
% document.  This will also reduce the spacing problems.
% 
% We turned off hyphenation by setting \verb|\righthyphenmin| and
% \verb|\lefthyphenmin| each to 100.  Resetting this to smaller numbers
% (less than the length of typical words) will restart hyphenation.
% (This is an improvement over version 1.0.1, where we didn't even load
% the hyphenation tables into the format.)
% 
% \subsection{Non-floating floats}\label{sec:floats}
% 
% \DescribeMacro{figure}
% \DescribeMacro{table}
% Many people like to use figures and tables in their foils and
% typically want to use them with the same interface as they do in
% documents (namely, using the \texttt{figure} and \texttt{table}
% environments).  Unfortunately, in standard \LaTeX\ these are
% ``floats'' which means they can appear on some place other than their
% current spot.  This, of course, makes no sense on foils.  To alleviate
% this, we define these environments but as non-floats.  The user syntax
% is identical to standard \LaTeX, but a couple of things happen.
% First, the placement parameters are completely ignored.  Second, they
% don't float (equivalent to \texttt{[H]} placement).  Third, there is no
% ``List of Figures'' or ``List of Tables'' data generated.
% The only other difference is that the starred forms of these
% environments are unnumbered (as opposed to being one-column in a
% two-column document). 
% 
% \DescribeMacro{\newnonfloat}
% We have added a simple mechanism for the user to add their own version
% of these non-floats.  This is done with the \verb|\newnonfloat|
% mechanism.  For example, the \texttt{figure} and \texttt{figure*}
% (unnumbered) environments of \FoilTeX\ are defined with:
% \begin{verbatim}
%     \newnonfloat{figure}{Figure}
% \end{verbatim}
%  
% \subsection{User adjustable dimensions}\label{sec:dimensions}
% 
% \DescribeMacro{\foilheadskip}
% \DescribeMacro{\abovefloatskip}
% \DescribeMacro{\captionfraction}
% \DescribeMacro{\abovetitleskip}
% \DescribeMacro{\titleauthorskip}
% \DescribeMacro{\authorauthorskip}
% \DescribeMacro{\authordateskip}
% \DescribeMacro{\dateabstractskip}
% There are a number of new dimensions added to \FoilTeX\ which the user
% can adjust as they desire.  One, \verb|\foilheadskip| has already been
% mentioned. 
% 
% For controlling the space around floats there are a number of
% dimensions.  First, there are the two predefined in \LaTeX, namely,
% \verb|\abovecaptionskip| and \verb|\belowcaptionskip|.  Next, we
% added one (\verb|\abovefloatskip|) for the space above the
% non-float.  See the code for default settings for these skips.
% Finally, in version~2.1.2 we added a \verb|\captionfraction| command
% to set the width of the captions as a fraction of the text width.
% Implementation is similar to \LaTeX's fractions for floats, so that
% it should be reset with the \verb|\renewcommand|.  The default value
% is $1.0$.  Releases of \FoilTeX\ before version~2.1.2 allowed the
% user to set the caption width with the dimension
% \verb|\captionwidth|.  This was buggy and behaved badly under
% rotations and landscape and so has been deprecated.
% 
% For the titlepage, between every single vertical item there is some
% extra space.  These spaces can take up a lot of room and if you have a
% lot of authors or a long title or a long abstract and can't get
% everything you want on the page, adjust these parameters as needed:
% \begin{verbatim}
%     \abovetitleskip, \titleauthorskip, \authorauthorskip, 
%     \authordateskip, \dateabstractskip
% \end{verbatim}
% 
% \DescribeMacro{\zerolistvertdimens}
% Furthermore, there is a new declaration called \verb|\zerolistvertdimens|.
% You can use this \emph{inside} a list environment to shrink all the
% vertical spacing to a minimum. 
% 
% \subsection{Differences with \LaTeX}\label{sec:latex}
% 
% \DescribeMacro{\em}
% \DescribeMacro{\emph}
% One simple difference is that the \LaTeX\ commands \verb|\em| and
% \verb|\emph| switch from any unslanted font to \textsfi{slanted sans
% serif} and from any slanted font to \textsf{unslanted sans serif}, not
% to \textit{text italics} and roman, respectively.
%  
% Unlike \TeX/\LaTeX, numerals in \FoilTeX\ look different when they are
% in ordinary text from when they are in math-mode.  This means that
% \texttt{12345} in text will print as \textsf{12345} and \verb|$12345$|
% prints as $12345$.
%  
% \subsection{Future versions} \label{sec:future}
% 
% There are plans for two major additions to \FoilTeX.  These are
% support for user comments (side notes) and for overlays.  There is no
% time-table for these upgrades.  (As one can probably tell, this many
% take a really long time to do. Or as history has shown, probably
% won't ever come to be.)
%  
% In the meantime, you can play with the \texttt{comment} package for
% side notes and the color package (using \texttt{white} to hide text)
% for overlays.  For side notes, you can use the comment environment's
% suppressed mode for the real foils.  Then use the \texttt{shortform}
% option and enabled comments to generate the side note foils.  The
% foils will layout very differently, but the content will be there.
%
% \FoilTeX\ should be able to handle rotation and landscape with other
% dvi drivers.  This will be added only with user assistence because the
% author has no way to test other drivers.
% 
% \section{Fonts and their sizes} \label{sec:fonts}
%  
% As noted earlier, the default font at \verb|\normalsize| is a
% {\samphugesf sans serif} font at size 20pt, unless one of the
% \texttt{[17pt]}, \texttt{[25pt]}, \texttt{[30pt]} or
% \texttt{shortform} options have been 
% declared in the \verb|\documentclass| command.  Table~\ref{tab:fonts}
% shows the control sequences for other accessible text fonts and the
% name of the font in a sample of its type.  These control sequences
% give the font at the current size.  Font size changing commands for
% each of the normal point size options are described by
% Table~\ref{tab:sizes}.  Note that \verb|\bf| and \verb|\sl| yield sans
% serif fonts, not the usual variations on roman.   
%
%
% \begin{table}[htb]
% \begin{center}
% \caption{Available fonts and their names.}\label{tab:fonts}
% \begin{tabular}{|l|c|}
% \multicolumn{2}{l}{} \\[5pt]  \hline
% command          & font names \tabfiller{13pt} \\[3pt] \hline
% \texttt{\bs sf}  & \textsf{Sans Serif} \\ \hline
% \texttt{\bs it}  & \textit{Text Italic} \\ \hline
% \texttt{\bs sl}  & \textsfi{Slanted Sans Serif} \\ \hline
% \texttt{\bs bf}  & \textsfb{Bold Sans Serif} \\ \hline
% \texttt{\bs tt}  & \texttt{Typewriter} \\ \hline
% \texttt{\bs rm}  & \textrm{Roman} \\ \hline
% \texttt{\bs sc}  & \textsc{Small Caps} \\ \hline
% \end{tabular}
% \end{center}
% \end{table}
% 
% \begin{table}[htb]
% \centering
% \caption{Type sizes for \FoilTeX\ size-changing
% commands for the different document style options.  In compatibility
% mode, the largest size is 43pt.}\label{tab:sizes}  
% \begin{tabular}{|l|c|c|c|c|c|}
% \multicolumn{6}{l}{} \\ 
%  \cline{2-6}
% \multicolumn{1}{l}{}  & \multicolumn{5}{|c|}{doc-options} \\ \hline
%  size \tabfiller{13pt} &  20pt  &  17pt  & 25pt  & 30pt & shortform\\[3pt] \hline
% \verb|\tiny|         & 12pt & 12pt & 12pt & 14pt & 12pt\\ \hline
% \verb|\scriptsize|   & 12pt & 12pt & 14pt & 17pt & 12pt\\ \hline
% \verb|\footnotesize| & 14pt & 12pt & 17pt & 20pt & 12pt\\ \hline
% \verb|\small|        & 17pt & 14pt & 20pt & 25pt & 12pt\\ \hline
% \verb|\normalsize|   & 20pt & 17pt & 25pt & 30pt & 12pt\\ \hline
% \verb|\large|        & 25pt & 20pt & 30pt & 36pt & 14pt\\ \hline
% \verb|\Large|        & 30pt & 25pt & 36pt & 43pt & 17pt\\ \hline
% \verb|\LARGE|        & 36pt & 30pt & 43pt & 51pt & 20pt\\ \hline
% \verb|\huge|         & 43pt & 36pt & 51pt & 51pt & 25pt\\ \hline
% \verb|\Huge|         & 51pt & 43pt & 51pt & 51pt & 25pt\\ \hline
% \end{tabular}
% \end{table}
%  
% \begin{table}[htb]
% \centering
% \caption{Mathematics type styles and their point sizes at \texttt{\bs
% normalsize} for the different document style options.}\label{tab:scripts}
% \begin{tabular}{|l|c|c|c|c|c|}
% \multicolumn{6}{l}{} \\
% \cline{2-6}
%  \multicolumn{1}{l}{} & \multicolumn{5}{|c|}{doc-options} \\ \hline
%  style  \tabfiller{13pt}         & 20pt & 17pt & 25pt & 30pt & shortform\\[3pt] \hline
% \textsl{displaystyle,textstyle}  & 20pt & 17pt & 25pt & 30pt & 12pt\\ \hline
% \textsl{scriptstyle}             & 14pt & 12pt & 17pt & 20pt & 12pt\\ \hline
% \textsl{scriptscriptstyle}       & 12pt & 12pt & 14pt & 17pt & 12pt\\ \hline
% \end{tabular}
% \end{table}
% 
%  
%  
% 
% There are also the corresponding \verb|\textsf| and related macros.
% These will work as expected, namely they switch the corresponding font
% characteristic based on the \emph{current} font. 
%  
% Mathematics is also automatically displayed at normal size unless
% magnified by a size changing declaration.  Table~\ref{tab:scripts}
% describes the font point sizes for \TeX's mathematics styles at each
% of the normal point size options.  
% 
% In the previous version of \FoilTeX, we loaded the \LaTeX\ circle and
% line fonts at \verb|\magstep4|.  This had the advantage that the
% lines where thicker and some pictures would scale nicely to foils.
% Unfortunately, this seems to have created as many problems as it
% solved.  Consequently, in the new version, these fonts are not scaled
% except in compatibility mode.   
% 
% 
% \section{Making color foils} \label{sec:color}
% 
% Because color has now been integrated into \LaTeX\ itself, we don't
% add much of anything for color support.  Users are encouraged to use
% the \texttt{color} package of the \texttt{graphics} package.  We no
% longer recommend the \texttt{colordvi} style file that came with the
% old \FoilTeX\ and still comes as part of Rokicki's \texttt{dvips}.  In
% general it will work OK, but there will be some minor problems that
% crop up.
% 
% We have added just enough compatibility mode to the new \FoilTeX\ so
% that old files which use \texttt{colordvi} should still run correctly.
% 
% \section{Using {\sc PostScript} fonts} \label{sec:postscript}
% 
% There is not much to say here since the PSNFSS packages do a nice job
% of things.  The only thing to remember is that the default font family
% is the \verb|\sfdefault| so that using a package that only changes the
% \verb|\rmdefault| won't help you much.  Using a package like
% \texttt{times.sty} will change the \verb|\sfdefault| to Helvetica and
% \emph{not} to Times-Roman as you might expect.   To get your foils
% (mostly) into Times-Roman, just say
% \begin{verbatim}
%     \renewcommand{\sfdefault}{ptm}
% \end{verbatim}
% somewhere in the preamble.
% 
% \section{Installing \FoilTeX} \label{sec:installation}
% 
% To install \FoilTeX, simply run \LaTeX\ on the \texttt{foiltex.ins}
% file and then follow the instructions at the end.  Essentially, just
% copy the generated files to the appropriate location in your
% \TeX\ inputs, examples and doc trees.   
% 
% \section{Usage restrictions}\label{sec:restrictions}
% 
% \subsection{Experimental Software Disclaimer}
% 
% This program is provided free of charge on an ``AS IS'' basis without
% warranty of any kind, either expressed or implied, including but not
% limited to implied warranties of merchantability and fitness for a
% particular purpose.  IBM does not warrant that the functions contained
% in this program will meet the user's requirements or that the
% operation of this program will be uninterrupted or error-free.  You
% are solely responsible for determining the appropriateness of using
% this program and assume all risks associated with its use, including
% but not limited to the risks of program errors, damage to or the loss
% of data, programs or equipment, and unavailability or interruption of
% operations.
% 	
% Acceptance and use of this program constitutes the user's
% understanding that he/she will have no recourse to IBM for any actual
% or consequential damages, including, but not limited to, lost profits
% or savings, arising out of the use or inability to use this program,
% or any damages claimed by you based on a third party claim.  Even if
% the user informs IBM of the possibility of such damages, IBM expects
% the user of this program to accept the risk of any harm arising out of
% the use of this program, or the user shall not attempt to use this
% program for any purpose.
%
% \subsection{User Agreement}
% 
% BY ACCEPTANCE AND USE OF THIS  PROGRAM THE USER AGREES TO
% THE FOLLOWING:
% 
% \begin{enumerate}\def\theenumi{\alph{enumi}} 
% 
% \item \label{itema} The user is granted permission to copy this
% program to the extent 
% reasonably required for such use.  This program may be redistributed
% on a not-for-profit basis, as long as WARRANTY DISCLAIMER, this USER
% AGREEMENT, and the copyright notice are included with the program.
% 
% \item All title, ownership and rights to this program and any copies
% remain with IBM, irrespective of the ownership of the media on which
% the program resides.
% 
% \item The user is permitted to create derivative works to this program.  
% However, all copies of the program and its derivative works must
% contain the IBM copyright notice, the WARRANTY DISCLAIMER and this
% USER AGREEMENT.  Furthermore, the user must document and initial
% within the program all changes he/she makes.
% 
% \item By furnishing this program to the user, IBM does \emph{not}
% grant either 
% directly or by implication, estoppel, or otherwise any license under
% any patents, patent applications, trademarks, copyrights or other 
% rights belonging to IBM or to any third party, except as expressly 
% provided herein.
% 
% \item The user understands and agrees that this program, and any
% derivative works made from this program, are not to be sold for profit
% or commercially exploited in any manner.  However, this use
% restriction shall not operate to deny the right to redistribute the
% program on a not-for-profit basis, as provided in
% paragraph~\ref{itema}, above.
%
% \item IBM requests that the user supply to IBM a copy of any changes,
% enhancements, or derivative works which the user may create.  The user
% grants to IBM and its subsidiaries an irrevocable, nonexclusive,
% worldwide and royalty-free license to use, execute, reproduce,
% display, perform, prepare derivative works based upon, and distribute,
% (INTERNALLY AND EXTERNALLY) copies of any and all such materials and
% derivative works thereof, and to sublicense others to do any, some or
% all of the foregoing, (including supporting documentation).
% 
% \end{enumerate}
% 
% \section{Acknowledgements, requests and help}\label{sec:acknowledgements}
% 
% For the first release of \FoilTeX, we had the following
% acknowledgement:
% \begin{quote}
% We would like to thank and acknowledge the following people in IBM for
% their great assistance in helping to put \FoilTeX\ together: Katherine
% Hitchcock, Myron Flickner, Ekkehard Blanz, Melanie Fulgham, Peter
% Haas, Rocky Bernstein and the many users who contributed their
% constructive comments on the early test versions within IBM.
% 
% A special thanks goes to Tomas Rokicki for implementing our color
% setup in his driver and another to Sheri Gish of IBM for asking the
% right (or was it wrong?) question that got this project started.
% \end{quote}
% 
% We echo that acknowledgement again because there would not be a
% version~2.0 or later without the first release and their help.  But, 
% putting together this new release required a new team of helpers. 
% Mostly, I want to thank the \LaTeX3 team for doing such a great job
% with \LaTeXe.  Implementing much of \FoilTeX\ was greatly eased by the
% way \LaTeXe\ is constructed and implemented.
% 
% Beyond this, the \LaTeXe\ team was very helpful in a number of
% discussions about design issues for \FoilTeX, particularly on font
% issues but also on a number of others.  Let me single out the
% following for exceptional service beyond the call: David Carlisle,
% Sebastian Rahtz, Frank Mittelbach and Alan Jeffrey.
% 
% I also want to thank all the many users who have expressed their
% interest in \FoilTeX{} and who have made suggestions, comments,
% pointed out the bugs and provided fixes.
% 
% A special thanks to the folks at Y\&Y, Inc., including Louis Vosloo,
% for providing the stuff needed for landscaping with DVIPSONE.
%
% Similar special thanks to the folks at Micropress, Inc.,
% specifically Michael Vulis and Walter Schmidt for the stuff needed to
% work with \VTeX.
%
% The following contributed suggestions and code snippets that are if
% not in fact at least in spirit including in this release: Hans Fredrik
% Nordhaug, Heiko Oberdiek, Stephen Sangwine, Thomas Sailer, Drew
% Ronnenberg.  Their contributions are gratefully acknowledged.
%
% \FoilTeX\ is intended to be easy to use, useful and to produce
% beautiful foils.  Consequently, the author welcomes any comments or
% suggestions.
% 
% The author also requests help in supporting landscape and rotation
% with other drivers.   If you find a solution, please pass it back to
% the author for incorporation in future updates of \FoilTeX.
%
% If you have a question that you can't answer by reading \textit{both}
% this document and~\cite{latexbook,companion}, or by posting your
% question to your local \TeX perts or to the usual forums, you can
% contact the author.
% 
% 
% \StopEventually{
% \begin{thebibliography}{9}
%
% \bibitem{companion} Michel Goossens, Frank Mittelbach and Alexander 
% Samarin, \textit{The \LaTeX{} Companion}, Addison-Wesley, Reading,
% Massachusetts, 1994.
%
% \bibitem{texbook} Donald Knuth, \textit{The \TeX book}, Addison-Wesley,
% Reading, Massachusetts, 1983, revised in 1993.
%
% \bibitem{latexbook} Leslie Lamport, \textit{\LaTeX: A Document
% Preparation System}, 2nd ed., Addison-Wesley, Reading, Massachusetts,
% 1994.
%
% \end{thebibliography}
% } 
% \section{A sample file} \label{sec:sample}
% In this section we give a complete and self-annotated sample file.  We
% try in this sample to demonstrate or comment on most of the basic
% features and show how the fonts look in \FoilTeX.   More details can
% be found in the sections above.
%    \begin{macrocode}
%<*sample>
 %%%% Everything above this sentence is relevant only to this    %%%%%
 %%%% sample and should not be included in your foils document.  %%%%%
 % Start with a \documentclass declaration.  The [20pt] is optional 
 % as that is the default.  The [dvips] option is supplied here even
 % though it really belongs in the {foiltex.cfg} file for the site/user.
\documentclass[20pt,dvips]{foils}
 %
 % An alternate uses smaller fonts, passes the draft mode to other 
 % included packages (e.g., graphics packages) and does everything 
 % in landscape mode. 
 % \documentclass[17pt,draft,landscape]{foils}  
 %
 % This next version declares the setup for Rokicki's dvips so that we
 % can support rotated foils and the use of color names. 
 %\documentclass[20pt,dvips]{foils}
 %
 % Add other packages you might want to use here.  E.g., you can
 % use the \usepackage{graphics} or \usepackage{graphicx} to include
 % figures (e.g., postscript figures) or \usepackage{color} for color.
 % See the \FoilTeX documentation for use of color.
 % \usepackage{graphicx}
 % \usepackage[usenames]{color}
 % Use this package file for the special \LaTeX symbols.
 % 
\usepackage{latexsym}
 %
 % Declare the title, author and date as you would in regular \LaTeX.
 %
\title{A Sample Foils Document}
 %
\author{Jim Hafner\\
        IBM Research Division\\
        Almaden Research Center\\
        \texttt{hafner@almaden.ibm.com}
        }
 % This is optional 
\date{\today}
 %
 % We set up the header and footer information now.  \Restriction is 
 % always placed next to \MyLogo on the bottom left corner of the
 % page.  The other macros have their obvious placement.  If you want 
 % nothing, leave the contents of these declarations empty.  Note that
 % ``-- Typeset by FoilTeX --'' logo will print automatically, unless
 % controlled by redefining \MyLogo or by using the switches \LogoOn 
 % and \LogoOff. 
 %
 %\MyLogo{-- Typeset by \FoilTeX\ --}   % this is the default
 %\rightfooter{quad\textsf{\thepage}}   % this is the default
\leftheader{Jim Hafner}
\rightheader{\foiltexdate}                % \foiltexdate is defined above
\Restriction{Is this for a restricted audience?}
 %
\newcommand\bs{\char '134}   %  a backslash character for the \tt font
 %
 % Now we can begin the document.  The first thing is the title page  
 % on which we might put a VERY short abstract.
\begin{document}
\maketitle
 %
\begin{abstract}
This is where an abstract might go if you want one.  There is usually
not a lot of room for much here.
\end{abstract}
 %
 % Now we can begin to start the individual foils.  Note that we let
 % \LaTeX split the pages and don't force each foil to be a separate
 % page.   We use \foilhead to start a new foil or foil topic. 
\foilhead{Colors}

\FoilTeX\ (version 2) is fully integrated with \LaTeXe\ so that the
supported \texttt{color} package (part of the \texttt{graphics}
package) is the preferred way to use colors.   

For examples, see the \texttt{graphics} package documentation.

You can still use the old \texttt{colordvi} package that comes with
Rokicki's \texttt{dvips}, but some things won't work exactly as
expected (except in compatibility mode).

\foilhead[-.5in]{Itemize}
\LogoOff  % We decided to turn the logo off on this page.
          % The rest of the footer and header will stay the same.
 % This foil has a lot on it so we used the [-.5in] option to move the
 % body of the foil closer to the foilhead.  We could move it down with
 % a positive length.
 %
 % By default there is large item separation at the first level (equal
 % to \parsep).  At the lower levels, it decreases to 0.  To change
 % you can either try to redefine \@listii and \@listiii in a style
 % file or you can change it internally to an item list.  See comment
 % below at second level.
 
\begin{itemize}
\item
This is the first level of an itemize.
  \begin{itemize}     % \itemsep 20pt % this stretches the space
                      % between items but only at this level. We leave
                      % the default here. 
  \item Here we jump to second level
     \begin{itemize}  
     \item Even third level (and there is a fourth level as well).
     \item The second item at third level.
     \end{itemize}
  \item The second item at second level.
  \item A third item at second level.
  \end{itemize}
\item The second item at first level.
\item A third item at first level.
\end{itemize}
 
Note that we have turned off the logo on this page.  It returns on the
next page.

\foilhead{}
\LogoOn
 
This should be a \emph{new foil} with no header, followed by a quote:
\begin{quote}
\ldots it's a good idea to make your input file as easy to
read as possible.
\end{quote}
and some enumerating:
\begin{enumerate}
\item this is enumerated
\item this is also enumerated
\end{enumerate}

\begin{center}
\framebox{\parbox{5.5in}{Above, we used \texttt{\bs emph\{new foil\}}
instead of the old \texttt{\{\bs em new foil\bs/\}}!}} 
\end{center}

On the following page we decided to stop the headers from appearing
and move the date to the footline.

 % Here are more samples of font actions, particularly size changing.
 % We retained the ability to get a true Roman font via \textrm.

\foilhead{Fonts}
\rightheader{}   % These cancel the headlines from now on
\leftheader{}    %
\rightfooter{\foiltexdate\quad\textsf{\thepage}}

\begin{itemize}
\item This shows \textit{italics}, \textsl{slanted}, \textbf{boldface},
\texttt{typewriter}, \textrm{roman}, and \textsc{small caps}.
\item Unslanted \emph{emphasize} and 
      \textsl{slanted \emph{emphasize}}.
\item \texttt{\bs textrm} means \textrm{roman and
      \texttt{\bs textsf} means \textsf{sans serif}}.
\item size changing from {\tiny tiny}, 
      {\scriptsize scriptsize}, 
      {\footnotesize footnotesize},
      {\small small}, {\normalsize 
      normalsize},\,{\large large},%
      {\Large Large},\,{\LARGE LARGE},
      {\huge huge}, and {\Huge Huge}.
\item 12pt is the smallest preloaded.
\item 43pt is the largest preloaded in compatibility mode.
\item 51pt is the largest preloaded in normal mode.
\end{itemize}
 
\foilhead{Special Characters and Accents}
 
\begin{itemize}
\item Here is a list of accents: 
  \begin{itemize}
   \item \`{o}, \'{o}, \^{o}, \"{o}, \~{o}, \={o}, \.{o}, \u{o}, 
         \v{o}, \H{o}, \t{oo}, \c{o}, \d{o}, \b{o}.
  \end{itemize}
\item First in paragraph mode (with \verb|\copyright|): 
  \begin{itemize}
  \item \dag, \ddag, \S, \P, \pounds, 0123456789, \copyright
  \end{itemize}
\item Then in math mode: (numerals are different!)
  \begin{itemize}
  \item $\dag$, $\ddag$, $\S$, $\P$, $\pounds$, 
        $0123456789$
  \end{itemize}
\item Here are more non-english language symbols:  
  \begin{itemize}
  \item \oe, \OE, \ae, \AE, \aa,   \AA, \o, \O, \l, \L, \ss, ?`, !`
  \end{itemize}
\item \textrm{\TeX}'s special symbols: \#, \$, \%, \&, \_, \{, \}.
\end{itemize}
 
\foilhead{Some Mathematics}
 
$$
{\cal F}\cdots\frac{x+y}{1+\frac{y}{z+1}} =\sqrt{x+y}\times \sqrt[n]{2}
$$
 
Here are some funny math symbols (we needed the \texttt{latexsym}
package for a couple of these):
$$
\forall\exists\flat\natural\sharp\partial\angle\Re\mho\jmath\aleph
$$
$$
\infty\Diamond\clubsuit\diamondsuit\spadesuit\heartsuit\ell
$$
$$
\bigcap\bigcup\bigvee\bigwedge\bigodot\bigotimes\bigoplus\biguplus
\sum\prod\coprod\int\oint
$$
$$
\sum_{i=1}^nx_i =\int_0^1 f[x]dx.
$$
and $\gcd(m,n)$ and $x\equiv y\pmod{a+b}$.
 
\foilhead{More Math: arrays}
 
$$
\begin{array}{clcr}
a+b+c & uv    & x-y & 27 \\
a+b   & u+v   & z   & 134  \\
a     & 3u+vw & xyz & 2,978
\end{array}
$$
 
$$
\left( \begin{array}{c}
    \left| \begin{array}{cc}
            x_{11} & x_{12} \\
            x_{21} & x_{22}
           \end{array}
     \right| \\
      y \\
      z
      \end{array}
\right)
$$
 
$$
x=\left\{ \begin{array}{ll}
             y & \mbox{if $y>0$} \\
             z+y & \mbox{otherwise}
          \end{array}
   \right.
$$
 
\foilhead{More Math: \texttt{equation} and \texttt{array} Numbering}
 
Here is a numbered equation
\begin{equation}
  E=mc^2
\end{equation}
and a numbered array
\begin{eqnarray}
 x & = & 17y \\
 y & > & a+b+c+d+e+f+\nonumber \\
   &   & k+l+m+n+o+p
\end{eqnarray}
 
More math accents: $\hat{a}$, $\check{a}$, $\breve{a}$, $\acute{a}$,
$\grave{a}$, $\tilde{a}$, $\bar{a}$, $\vec{a}$, $\dot{a}$, $\ddot{a}$.
 
Over and underline:
$$
  \overline{\overline{x}^{2} + 1}
\qquad
\overbrace{a+\underbrace{b+c}_{25}+d}^{16\alpha}
$$
 
\foilhead{Bold Mathematics}
 
The \verb|boldequation| environment, with
numbering yields
\begin{boldequation} \label{eq:bold}
   2\sqrt{x} \Pi^y \sim\pi\times x
\end{boldequation}
and without numbering yields
\begin{boldequation*}
   2\sqrt{x} \Pi^y \sim\pi\times x
\end{boldequation*}
We can reference bold equations like (\ref{eq:bold}).
 
There is also \verb|\mathbf| and \verb|\bm| in the middle of a formula,
with \hfil\break \verb|\mathbf{a +} a + \bm{a+x\pi-\rho} -\rho|
$$
\mathbf{a +}a+\bm{a+x\pi-\rho} -\rho
$$
Note the difference between the two bold ``a'' in result. 
 
\foilhead{Theorem and Proof Environments}

\begin{Theorem}[TUG'92] 
There are some \TeX\ tools that are easier to use than others.  This
theorem is numbered and has an optional acknowledgement.
\end{Theorem}

\begin{Corollary*} 
This obvious corollary is not numbered because it uses the *-form.
\end{Corollary*}

\begin{Proof}
The details of the proof are left to the reader.  Note that the
environment names are case sensitive.
\end{Proof}

We put a header back on the next foil to see that it is correctly
rotated. 

\rotatefoilhead{Rotated Foils}
\leftheader{I'm rotated!}

This entire page will (should?)~be rotated if we declared the
\verb|\documentclass| option \texttt{dvips} or other supported driver
option.  (For \texttt{pdflatex}, this works without giving any
options!)  In the other cases, this is not supported and the user is
warned.

The next foil will return to normal.  Only foils that begin with
\verb|\rotatefoilhead| will be rotated.  If \LaTeX\ needs to split a
rotated foil into two foils, \emph{both} will be rotated.

\foilhead{Tables and Figures}
\leftheader{}

Here is a short table:

\begin{table}
\begin{center}
\begin{tabular}{|l|c|r|} \hline
First stuff & Second stuff & Third Stuff \\ \hline\hline
foo & bar & bug \\ \hline
foofoo & barbar & bugbug \\ \hline
\end{tabular}
\caption{\label{tab:one}This is the first table.}
\end{center}
\end{table}

The above table is Table~\ref{tab:one}.  It is a ``nonfloat'', since
it doesn't float at all, but appears right where it was placed in the
document.  

 % In the picture environment, we have put the fonts back to \LaTeX's
 % normal size.  This may have been a mistake but ... 
\foilhead{\texttt{picture} Environments}
 
\begin{figure}
\begin{center}
\setlength{\unitlength}{.08in}
\begin{picture}(50,50)(0,0)
 %\thicklines         % don't know why it looks worse with this
\put(10,35){\framebox(10,10){gnat}}
\put(30,20){\circle{20}}
\put(30,20){\vector(0,1){2}}
\put(45,35){\circle*{5}}
\put(30,20){\oval(20,30)}
\end{picture}
\end{center}
\caption{Isn't this a pretty picture?}
\end{figure}

\verb|\thicklines| would be nice here but the picture doesn't look as
good that way (why?).  We should use the \texttt{graphics} package to
load our graphics pictures here.  Note that this Figure doesn't float!
 
\foilhead{Marginal Notes, Footnotes and Citations}
 
A marginal note\footnote{This is a footnote.}
is made with the \verb|\marginpar| command, having the
text as its argument.  The note\marginpar{This is a mar\-gin\-al note}
is placed in the margin, its first line even with the line of the text
containing the command\footnote{This is a second footnote.}.
 
This is shows \fbox{frameboxes} at work. We can even cite references
like \cite{rocky} and \cite{bullwinkle}.

 % We can use any bibliography mechanism, including BibTeX. 
\begin{thebibliography}{99}
 
\bibitem{rocky} Rocky and Bullwinkle, Open problems, in \textsl{Mr.
Know-it-all's Rock Encyclopedia}.
 
\bibitem{bullwinkle} Bullwinkle, Getting things out of hats,
\textsl{Annals} \textbf{1} (1990BC), 1--2.
 
\end{thebibliography}
 
\foilhead{Other Features}
\raggedright

\begin{itemize}
\item \verb|\raggedright| can be used in the preamble to get this
      effect throughout as we did on this page.
\item Access to the AMS Fonts symbols and Euler fonts can easily be
      obtained with the \texttt{amsmath} packages.  You might not get
      fonts at the largest sizes however. 
\item \textsc{PostScript} fonts can used just by adding any of the
      package files from the PSNFSS package.   
\end{itemize}

\end{document}
%</sample>
%    \end{macrocode}
%
% \section{Description of the code in the \FoilTeX\ package}
% \label{code:description}
% 
% In this section we describe the macros used in the package.  This is
% broken up into a number of parts.  In the first part we describe the
% code that sets up and implements the option parsing.  This includes
% the loading of the font definition information and the size option
% file.  Details of the font data itself can be found in
% Section~\ref{code:fonts}.  In the second subsection, we define the
% basic macros used in \FoilTeX.
% Subsections~\ref{code:lists-spacing}-\ref{code:lists-struct} have the
% code for list spacing and list structures.  Page layout is described
% in Subsections~\ref{code:page}-\ref{code:page-style}.  The next
% subsections cover bibliographies (\ref{code:biblio}), non-floating
% floats (\ref{code:floats}), foil heads~(\ref{code:foil-title}), new
% theorem environments~(\ref{code:theorems}), and bold
% mathematics~(\ref{code:boldmath}).
% 
% \subsection{The package options} \label{code:options}
% \begin{macro}{\if@openbib}
% \begin{macro}{\if@landscape}
% \begin{macro}{\if@dvips}
% \begin{macro}{\if@dvipsone}
% \begin{macro}{\if@vtex}
% \begin{macro}{\if@header@rule}
% \begin{macro}{\if@footer@rule}
% \begin{macro}{\if@magscaleECfonts} 
% \begin{macro}{\if@useDCfonts} 
% \begin{macro}{\if@pdftex} 
% To setup some of the mechanisms for parsing the package options, we
% need a few conditionals.  The first and second conditionals are
% related to standard \LaTeX\ document class options.  The
% \verb|\if@dvips|, \verb|if@dvipsone| and \verb|if@vtex|
% conditionals, if true, sets up the necessary
% \verb|\special|s for page rotation and the like.  These are only
% supported for Rokicki's \texttt{dvips} and provided for Y\&Y, Inc's,
% \texttt{dvipsone} amd MicroPress' \VTeX.  The two rule conditionals
% determine if a rule is set in the header and footer, respectively.
% By default, all of these conditionals are false.  The next two deal
% with how \texttt{T1} encoded fonts are used.   The last is for
% \texttt{pdftex} detection. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
%<*package> 
\newif\if@openbib \@openbibfalse
\newif\if@landscape \@landscapefalse
\newif\if@dvips \@dvipsfalse
\newif\if@dvipsone \@dvipsonefalse
\newif\if@vtex \@vtexfalse
\ifx\VTeXversion\undefined\else\@vtextrue\fi % autodetect
\newif\if@header@rule \@header@rulefalse
\newif\if@footer@rule \@footer@rulefalse
\newif\if@pdftex \@pdftexfalse
\newif\if@magscaleECfonts \@magscaleECfontsfalse
\newif\if@useDCfonts \@useDCfontsfalse
%    \end{macrocode}
% \begin{macro}{a4paper}
% \begin{macro}{letterpaper}
% \begin{macro}{35mmSlide}
% \begin{macro}{Screen4to3}
% \begin{macro}{Screen16to9}
% \begin{macro}{landscape}
% \begin{macro}{ledgerpaper}
% \begin{macro}{legalpaper}
% \begin{macro}{a3paper}
% \begin{macro}{a2paper}
% \begin{macro}{a1paper}
% These document class options are used to set the paper layout.
% Most of these are standard \LaTeX, but a few, namely
% \texttt{35mmSlide}, \texttt{Screen4to3} and \texttt{Screen16to9}, 
% are new to \FoilTeX.   The first sets the paper
% dimesions in the aspect ratio for 35mm film, namely, $2\times 3$ and
% just big enough to fit on US letter paper (I'd have picked A4 paper,
% but I'm US centric!).   The next two, set them to relative
% dimensions for full screen displays at rations 4x3 and 16x9.  These
% are already rotated for displays so \texttt{landscape} is not
% required!  (Thanks to Stephen Sangwine for this contribution which I
% included unchanged and which explains the metric units.)
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{ledgerpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {7.33in}}
\DeclareOption{legalpaper}
   {\setlength\paperheight {14in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{a3paper}
   {\setlength\paperheight {420mm}%
    \setlength\paperwidth  {297mm}}
\DeclareOption{a2paper}
   {\setlength\paperheight {594mm}%
    \setlength\paperwidth  {420mm}}
\DeclareOption{a1paper}
   {\setlength\paperheight {840mm}%
    \setlength\paperwidth  {594mm}}
\DeclareOption{35mmSlide}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {7.33in}}
\DeclareOption{Screen4to3}
   {\setlength\paperwidth {297mm}%
    \setlength\paperheight  {0.75\paperwidth}}
\DeclareOption{Screen16to9}
   {\setlength\paperwidth {297mm}%
    \setlength\paperheight  {0.5625\paperwidth}}
\DeclareOption{landscape}
   {\setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}%
    \@landscapetrue}
%    \end{macrocode}
% \begin{macro}{\@ptsize}
% As in the standard \LaTeX\ classes, this macro holds the point size of
% the normal font.   The available options here are
% \texttt{17pt}, \texttt{20pt}, \texttt{25pt}, \texttt{30pt} with 
% \texttt{20pt} being the default.  There is also a special option
% \texttt{shortform} which compresses the full large pages into a
% shorter form.  In this form, text is smaller (generally 12pt), new
% foils do not cause a page break, only a vertical skip.  This is
% useful for making either hard or soft copy for redistribution (to
% save paper). 
% \end{macro}
%    \begin{macrocode}
\newcommand\@ptsize{}
\DeclareOption{shortform}{\renewcommand\@ptsize{shrt}}
\DeclareOption{17pt}{\renewcommand\@ptsize{17}}
\DeclareOption{20pt}{\renewcommand\@ptsize{20}}
\DeclareOption{25pt}{\renewcommand\@ptsize{25}}
\DeclareOption{30pt}{\renewcommand\@ptsize{30}}
%    \end{macrocode}
% The next few options are standard \LaTeX: \texttt{leqno}, \texttt{fleqn},
% \texttt{draft}, \texttt{final}, \texttt{openbib}. 
%    \begin{macrocode}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\DeclareOption{openbib}{\@openbibtrue}
%    \end{macrocode}
% \begin{macro}{headrule}
% \begin{macro}{footrule}
% The ``rule'' options enable rules in the header and footer. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\DeclareOption{headrule}{\@header@ruletrue}
\DeclareOption{footrule}{\@footer@ruletrue}
%    \end{macrocode}
% \begin{macro}{dvips|dvipsone|vtex}
% One of the \texttt{dvips}, \texttt{dvipsone} or \texttt{vtex} option
% are \emph{required} for the rotation of
% individual foils.  We also use this together with the
% \texttt{landscape} option to issue the \verb|\special{landscape}|
% required to rotate the whole document.  This just saves the user from
% doing it. 
% \end{macro}
%    \begin{macrocode}
\DeclareOption{dvips}{\@dvipstrue}
\DeclareOption{dvipsone}{\@dvipsonetrue}
\DeclareOption{vtex}{\@vtextrue}
%    \end{macrocode}
% \begin{macro}{magscalefonts}
% \begin{macro}{useDCfonts}
% These two options control the conditionals which trigger changes in
% the use of the \texttt{T1} encoding.  See
% Section~\ref{sec:newoptionsin2.1} for more details.
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\DeclareOption{magscalefonts}{\@magscaleECfontstrue}
\DeclareOption{useDCfonts}{\@useDCfontstrue}
%    \end{macrocode}
% Because a number of standard \LaTeX\ options don't make sense in
% \FoilTeX, we have disabled them.  These options are \texttt{a5paper},
% \texttt{b5paper},\texttt{executivepaper},
% \texttt{10pt}, \texttt{11pt}, \texttt{12pt}, \texttt{oneside},
% \texttt{twoside}, \texttt{openright}, \texttt{openany},
% \texttt{titlepage}, \texttt{notitlepage}, \texttt{onecolumn},
% \texttt{twocolumn}. With the exceptions of \texttt{oneside},
% \texttt{titlepage}, \texttt{onecolumn}, they all return a warning to
% the user.  In the case of point size options, suggestions are given to
% the user to try the official \FoilTeX\ size options.  (Note, in
% versions prior to~2.1.3, \texttt{legalpaper} was not available.)
%    \begin{macrocode}
\DeclareOption{a5paper}{%
    \ClassWarningNoLine{FoilTeX}{No 'a5paper' option for foils.}}
\DeclareOption{b5paper}{%
    \ClassWarningNoLine{FoilTeX}{No 'b5paper' option for foils.}}
\DeclareOption{executivepaper}{%
    \ClassWarningNoLine{FoilTeX}{No 'executivepaper' option for foils.}}
\DeclareOption{10pt}{%
    \ClassWarningNoLine{FoilTeX}{No '10pt' foils option, try shortform,
    17pt, 20pt, 25pt or 30pt (defaulting to 20pt).}}
\DeclareOption{11pt}{%
    \ClassWarningNoLine{FoilTeX}{No '11pt' foils option, try shortform,
    17pt, 20pt, 25pt or 30pt (defaulting to 20pt).}}
\DeclareOption{12pt}{%
    \ClassWarningNoLine{FoilTeX}{No '12pt' foils option, try shortform,
    17pt, 20pt, 25pt or 30pt (defaulting to 20pt).}}
\DeclareOption{oneside}{}
\DeclareOption{twoside}{%
    \ClassWarningNoLine{FoilTeX}{No 'twoside' option for foils.}}
\DeclareOption{openright}{%
    \ClassWarningNoLine{FoilTeX}{No 'openright' option for foils.}}
\DeclareOption{openany}{%
    \ClassWarningNoLine{FoilTeX}{No 'openany' option for foils.}}
\DeclareOption{titlepage}{}
\DeclareOption{notitlepage}{%
    \ClassWarningNoLine{FoilTeX}{No 'notitlepage' option for foils.}}
\DeclareOption{onecolumn}{}
\DeclareOption{twocolumn}{%
    \ClassWarningNoLine{FoilTeX}{No 'twocolumn' layout for foils.}}
%    \end{macrocode}
% Here we execute the default options and do the processing of the
% document class option list and what is specified in the
% \texttt{foiltex.cfg} file if one exists.
%
% When \VTeX\ is autodetected the \texttt{vtex} option is not required
% and the \texttt{dvips} and \texttt{dvipsone} options are disabled. 
% Version~2.1.4 adds PDF\LaTeX\ auto-detection. This code was supplied
% by Hans Fredrik Nordhaug, which he claims was borrowed from Heiko
% Oberdiek \texttt{ifpdf} package.  It also suppressed the other 
% driver options (except the \texttt{vtex} as I don't know how this
% integrates with \VTeX.) 
%    \begin{macrocode}
\ExecuteOptions{letterpaper,20pt,final}
\InputIfFileExists{foiltex.cfg}{}{}
\ProcessOptions
\ifx\pdfoutput\undefined
\else
  \ifx\pdfoutput\relax
  \else
    \ifcase\pdfoutput
    \else
      \@pdftextrue
    \fi
  \fi
\fi
\if@vtex
  \if@dvips
  \ClassWarningNoLine{FoilTeX}{%
      Option 'dvips' is ignored when running vtex}
  \fi
  \if@dvipsone
  \ClassWarningNoLine{FoilTeX}{%
      Option 'dvipsone' is ignored when running vtex}
  \fi
  \@dvipsfalse\@dvipsonefalse
\fi
\if@pdftex
  \if@dvips
  \ClassWarningNoLine{FoilTeX}{%
      Option 'dvips' is ignored when running pdflatex}
  \fi
  \if@dvipsone
  \ClassWarningNoLine{FoilTeX}{%
      Option 'dvipsone' is ignored when running pdflatex}
  \fi
  \@dvipsfalse\@dvipsonefalse
\fi
\if@landscape
%    \end{macrocode}
% \texttt{dvips} will recognize the paper format to be landscape
% and rotate the page contents appropriately to fit on portrait paper.
% Additionally, we instruct \texttt{dvips} to rotate counter-clockwise 
% rather than clockwise, so as to match Ghostscript.  
% With \texttt{dvipsone}, the `landscape' \verb|\special| is issued.
%    \begin{macrocode}
  \if@dvips\AtBeginDvi{\special{! /landplus90 true store}}\else%
  \if@dvipsone{\special{landscape}}%
%    \end{macrocode}
% With \VTeX, landscape mode is handled in different ways in PDF and
% PostScript mode:
% \begin{itemize}
% \item In PDF mode, the MediaSize is determined from the landscape
%   paper size, as usual.  
% \item In PS mode, the BoundingBox is set to the corresponding 
%   \emph{portrait} paper size, and the page contents is rotated, 
%   so that the foils can easily be printed on portrait-oriented paper.
% \end{itemize}
%    \begin{macrocode}
  \else\if@vtex\ifnum\OpMode=2{%
     \immediate\special{landscape}%
     \AtBeginDocument{\mediaheight=\paperwidth\mediawidth=\paperheight}%
  }\fi 
  \fi\fi\fi
\fi
%    \end{macrocode}
% Finally we are ready to load the other \FoilTeX\ external files
% required.  The first checks to see if there is a \texttt{ftlfonts.cfg}
% file which contains local alternative font definitions.  If not, then
% we load the default font definition information.  (This was changed in
% version~2.1.4 to accommodate systems like \VTeX\ which might want to
% customize font usage without modifying the default files.) The
% default font definitions include font shape data usually stored in
% \texttt{.fd} files; we put them together for simplicity and to reduce
% the number of files loaded.  The second is the file used for the size
% option.
%    \begin{macrocode}
\InputIfFileExists{fltfonts.cfg}{}{\input{fltfonts.def}}
\input{foil\@ptsize.clo}
%    \end{macrocode}
%
% \subsection{Some basic macros}\label{code:basic-macros}
% \begin{macro}{\FoilTeX}
% Of course, we have to define the \FoilTeX\ logo.  As is done for the
% \LaTeX\ logos, We use the new \verb|\DeclareRobustCommand|.  Note
% that, in contrast with the other logos, we force the \FoilTeX\ logo to
% always appear in the same font family, shape and series with only the
% size varying.  
% \end{macro}
%    \begin{macrocode}
\DeclareRobustCommand\FoilTeX{{\normalfont%
   {\sffamily Foil}\kern-.03em{\rmfamily\TeX}}}
%    \end{macrocode}
% \begin{macro}{underscore}
% The underscore in \LaTeX\ is too thin, in fact it has fixed thickness
% independent of the font size.  This makes some sense if the font sizes
% aren't allowed to vary that much.   We fix it here so that it varies
% with font size always. 
% \end{macro}
%    \begin{macrocode}
\renewcommand\_{\leavevmode\kern.06em\vbox{\hrule width.4em height.12ex}}
%    \end{macrocode} 
% \begin{macro}{\footnoterule}
% \begin{macro}{\@makefntext}
% \begin{macro}{\@makefnmark}
% The default \LaTeX\ footnote rule is to short (2in) on foils so we make
% it longer.  Note that the thickness of the rule is still the same
% (.4pt).   The macro for making the footnote text is not part of the
% default format but is defined in class files like
% \texttt{article.cls}.  We steal that definition and put it here. 
% Curiously, the macro for making the footnote mark \emph{is} defined in
% the format (\texttt{latex.ltx}), but we fix it here so that it gets
% sans serif numerals.
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\renewcommand\footnoterule{\kern-3\p@\hrule width.4\textwidth\kern2.6\p@}
\newcommand\@makefntext[1]{\parindent 1em\noindent
 \hbox to 1.8em{\hss\@makefnmark}#1}
\def\@makefnmark{\hbox{$^{\mathsf{\@thefnmark}}\m@th$}}
%    \end{macrocode} 
% \begin{macro}{\marginpar}
% \begin{macro}{\@oldmarginpar}
% \begin{macro}{\@foilmarginpar}
% \begin{macro}{\@foilmarginparR}
% \begin{macro}{\@foilmarginparRL}
% The default definition of \verb|\marginpar| doesn't work well in
% \FoilTeX\ because of the lack of hyphenation, the large size of the
% fonts and the very narrow space for these items.  So, we fix it a
% little by forcing it to be \verb|\raggedright| (for right margin
% paragraphs) and \verb|\raggedleft| (for left margin paragraphs).  We
% cheat here so that we don't need to worry about what is happening in
% \LaTeX's innards in this context.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\let\@oldmarginpar\marginpar
\def\@marginragged{\if@reversemargin\raggedleft\else\raggedright\fi}
\def\@foilmarginpar{\@ifnextchar[{\@foilmarginparRL}{\@foilmarginparR}}
\def\@foilmarginparRL[#1]#2{%
  \@oldmarginpar[{\@marginragged #1\par}]{{\@marginragged #2\par}}}
\def\@foilmarginparR#1{\@oldmarginpar{\@marginragged #1\par}}
\let\marginpar\@foilmarginpar
%    \end{macrocode}
% \begin{macro}{\Black}
% \begin{macro}{\globalColor}
% Stricly speaking, we probably shouldn't define these and they
% shouldn't be part of a \FoilTeX\ class file, since they are not
% completely compatible with the color package.  However, we still
% define them and use them for two purposes.  First is backward
% compatibility with old \FoilTeX\ documents, and second, so that things
% still work reasonably well with the old \texttt{colordvi} style file. 
% They are both defined as no-ops.
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\def\Black#1{#1}
\def\globalColor#1{#1} 
%    \end{macrocode}
% \begin{macro}{\today}
% Since this one isn't defined by default, we define it. 
% \end{macro}
%    \begin{macrocode}
\newcommand\today{\ifcase\month\or
 January\or February\or March\or April\or May\or June\or
 July\or August\or September\or October\or November\or December\fi
 \space\number\day, \number\year}
%    \end{macrocode}
% \begin{macro}{\lineskip}
% \begin{macro}{\normallineskip}
% \begin{macro}{\baselinestretch}
% \begin{macro}{\parskip}
% \begin{macro}{\parindent}
% \begin{macro}{\jot}
% Next, we set a few of the basic space parameters.  Note that we
% have increased the \verb|\parindent| in the new version but retained
% the old value in compatibility mode for old versions of \FoilTeX\
% files.  The value for baseline stretch is not strictly needed since
% that is the default.  We put it here for completeness.  We adjust
% the spacing set by \verb|\jot| in the new mode, since we found we used
% this a lot in practice.  We left it as the default in compatibility
% mode. 
% \end{macro} 
% \end{macro} 
% \end{macro} 
% \end{macro} 
% \end{macro} 
% \end{macro} 
%    \begin{macrocode}
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{1}
\setlength\parskip{18\p@ \@plus 4\p@ \@minus 4\p@}
\if@compatibility
 \setlength\parindent{15\p@}
 \setlength\jot{3\p@}    
\else
 \setlength\parindent{30\p@}
 \setlength\jot{10\p@}    
\fi
%    \end{macrocode}
% \begin{macro}{\righthyphenmin}
% \begin{macro}{\lefthyphenmin}
% We set these minimum hyphenation values to some large value so that we
% can disable hyphenation.  This is unlike \FoilTeX~v1.0.1, where we turned
% off hyphenation by disabling the hyphenation tables.   This is more or
% less essential here since the tables are already loaded by the \LaTeX\
% format.  It does have the additional advantage in that the user can
% re-enable it simply by resetting these values. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\righthyphenmin=100
\lefthyphenmin=100
%    \end{macrocode}
% \begin{macro}{\@eqnnum}
% \begin{macro}{\theequation}
% We set the equation number in the default sans serif font (don't
% exactly know why this is necessary --- maybe it is not!) and place it
% in arabic numerals. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\def\@eqnnum{\hbox{\reset@font\sffamily (\theequation)}} 
\renewcommand\theequation{\arabic{equation}}
%    \end{macrocode}
% \begin{macro}{titlepage}
% \begin{macro}{\@pnumwidth}
% \begin{macro}{@tocrmarg}
% \begin{macro}{\@dotsep}
% We leave the next set of macros here, even though they are either 
% irrelevant or taken care of by other things (like \verb|\maketitle|), 
% just in case someone wants to use them.  They are not supported except
% in compatibility mode.  The parameter settings are used only in the
% table of contents (which we don't have on foils), so these are
% irrelevant. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\if@compatibility
  \newenvironment{titlepage}{%
    \@restonecolfalse \newpage \thispagestyle{empty}
      \setcounter{page}{0}}{\newpage}
 \newcommand\@pnumwidth{1.55em}
 \newcommand\@tocrmarg {2.55em}
 \newcommand\@dotsep{4.5}
\fi
%    \end{macrocode}
% \begin{macro}{\sloppyfoils}
% We can be really sloppy with tolerances and fuzz on foils, so we set
% the parameters for this and invoke (probably could just avoid the
% definition all together).
% \end{macro}
%    \begin{macrocode}
\def\sloppyfoils{\tolerance 9000 \hfuzz 2\p@ \vfuzz 2\p@ \hbadness 2000}
\sloppyfoils
%    \end{macrocode}
% \subsection{List environments: spacing}\label{code:lists-spacing}
% In this subsection, we set up all the code needed for list
% environments spacing.  Most of this is extracted in some form or
% another from the basic \LaTeX\ classes like \texttt{article} with some
% modifications for use in foils.
% \begin{macro}{\leftmargin*}
% We begin with the list margin indentation parameters.
% \end{macro}
%
%    \begin{macrocode}
\setlength\leftmargini{25\p@}
\setlength\leftmarginii{22\p@} 
\setlength\leftmarginiii{18.7\p@}
\setlength\leftmarginiv{17\p@}
\setlength\leftmarginv{10\p@}
\setlength\leftmarginvi{10\p@}
\setlength\leftmargin\leftmargini
%    \end{macrocode}
% \begin{macro}{\labelwidth}
% \begin{macro}{\labelsep}
% We need to set the label width and label separation parameters.
% Unfortunately, they were done in the wrong order in the old \FoilTeX,
% so here we do it right but under compatibility mode, do it the old way
% so things don't change.
% \end{macro}
% \end{macro}
%     \begin{macrocode}
\if@compatibility
  \setlength\labelwidth\leftmargini\advance\labelwidth-\labelsep
  \setlength\labelsep{.5em}
\else
  \setlength\labelsep{10\p@}
  \setlength\labelwidth\leftmargini\advance\labelwidth-\labelsep
\fi 
%    \end{macrocode}
% \begin{macro}{\partopsep}
% This is set fairly small, no reason to be too spacious.
% \end{macro}
%    \begin{macrocode}
\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
%    \end{macrocode}
% \begin{macro}{\@listIa}
% \begin{macro}{\@listIb}
% \begin{macro}{\@listIc}
% \begin{macro}{\@listId}
% These macros define the spacing for top level list environments.  We
% define four default sets of parameters and overlap their usage in the
% various point size class option files.  
% Table~\ref{tab:listI} shows the usage of each with respect to font
% size.  (This table is somewhat different in
% compatibility mode, particularly for small relative font sizes in the
% larger class options.  See Section~\ref{code:clo} for the details.)
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{table}
% \begin{center}
% \begin{tabular}{|l|l|l|} \hline
% $\ge$20pt & {\tt \listi a} \\ \hline
% 17pt & {\tt \listi b} \\ \hline
% 14pt & {\tt \listi c} \\ \hline
% 12pt, shortform & {\tt \listi d} \\ \hline
% \end{tabular}
% \end{center}
% \caption{\label{tab:listI}Usage of \texttt{\bs\at listI*} styles
% versus font size in \LaTeX2e\ mode.}  
% \end{table}
%    \begin{macrocode}
\newcommand\@listIa{\leftmargin\leftmargini
\topsep 14\p@ \@plus 2\p@ \@minus 4\p@
\parsep 14\p@ \@plus 4\p@ \@minus 4\p@
\itemsep 14\p@ \@plus 4\p@ \@minus 2\p@}
\newcommand\@listIb{\leftmargin\leftmargini
\topsep 8\p@ \@plus 2\p@ \@minus 2\p@      
\parsep 2\p@ \@plus 1\p@ \@minus 1\p@      
\itemsep \parsep}
\newcommand\@listIc{\leftmargin\leftmargini
\topsep 6\p@ \@plus 1\p@ \@minus 1\p@      
\parsep 2\p@ \@plus 1\p@ \@minus 1\p@
\itemsep \parsep}
\newcommand\@listId{\leftmargin\leftmargini
\topsep 4\p@ \@plus 1\p@ \@minus 1\p@
\parsep 2\p@ \@plus 1\p@ \@minus 1\p@
\itemsep \parsep}
%    \end{macrocode}
% \begin{macro}{\@listi*}
% Now we set the parameters for lower level lists.  These are fixed
% throughout all the point sizes.  Essentially, there is very little
% additional space here except the indentation.  We allowed a fair
% amount of space in the top level, however.  We close this section
% with a call to \verb|\normalsize| to make sure that all the internal
% list macros are defined appropriately.  This call is also done in
% each of the \texttt{foil*.clo} files but before the above parameters
% sets are defined.  This caused a problem by delaying the definition
% of \verb|\@listi|.  This is new in version~2.1.1. (Alternatively, we
% could move all this stuff \emph{before} we load these \texttt{.clo}
% files but that seemed to be too much of a change.)
% \end{macro}
%    \begin{macrocode}
\newcommand\@listii{\leftmargin\leftmarginii
 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
 \topsep \z@  
 \parsep \z@ 
 \itemsep \parsep}
\newcommand\@listiii{\leftmargin\leftmarginiii
 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
 \partopsep 1\p@ \@plus 0\p@ \@minus 1\p@ 
 \topsep \z@ 
 \parsep \z@ 
 \itemsep \topsep}
\newcommand\@listiv{\leftmargin\leftmarginiv
 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\newcommand\@listv{\leftmargin\leftmarginv
 \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\newcommand\@listvi{\leftmargin\leftmarginvi
 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
\normalsize
%    \end{macrocode}
% \begin{macro}{\zerolistvertdimens}
% We define this macro in the new version so we have a simple mechanism
% for shrinking as much as possible all the vertical space in list
% environments. 
% \end{macro}
%    \begin{macrocode}
\if@compatibility
 \let\zerolistvertdimens\relax
\else
 \def\zerolistvertdimens{\parskip0pt\topsep0pt\partopsep0pt%
    \parsep0pt\itemsep0pt}
\fi
%    \end{macrocode}
% \subsection{List environments: structure} 
% \label{code:lists-struct}
% Here we take up the structure of list environments including the
% standard environments like \texttt{verse} and \texttt{description}
% \begin{macro}{\@item}
% We start by redefining \verb|\@item| in
% compatibility mode to get the effect we had before for protecting the
% item label from spurious color corruption.   This of course will only
% work with the \texttt{colordvi} style.  As mentioned above, this is
% not the recommended way to do color in the new \LaTeX.   This code
% is mostly taken from the new \LaTeX\ and modified to fit the old
% needs.  The only real change is in the addition of the
% \verb|\globalColor| macro surrounding the \verb|\makelabel|.
% \end{macro}
%    \begin{macrocode}
\if@compatibility
 \def\@item[#1]{%
   \if@noparitem 
     \@donoparitem
   \else 
     \if@inlabel \indent \par \fi
     \ifhmode \unskip\unskip \par \fi 
     \if@newlist 
       \if@nobreak 
         \@nbitem 
       \else
         \addpenalty\@beginparpenalty
         \addvspace\@topsep \addvspace{-\parskip}
       \fi
     \else 
       \addpenalty\@itempenalty \addvspace\itemsep 
     \fi 
     \global\@inlabeltrue 
   \fi
 \everypar{\global\@minipagefalse\global\@newlistfalse 
   \if@inlabel
     \global\@inlabelfalse \hskip -\parindent \box\@labels \penalty\z@ 
   \fi
   \everypar{}}
 \global\@nobreakfalse
 \if@noitemarg \@noitemargfalse 
   \if@nmbrlist \refstepcounter{\@listctr}\fi 
 \fi
 \sbox\@tempboxa{\globalColor{\makelabel{#1}}} \global\setbox\@labels
 \hbox{\unhbox\@labels \hskip \itemindent
   \hskip -\labelwidth \hskip -\labelsep 
   \ifdim 
     \wd\@tempboxa >\labelwidth \box\@tempboxa
   \else 
     \hbox to\labelwidth {\unhbox\@tempboxa}
   \fi
   \hskip \labelsep}
 \ignorespaces
 }
\fi
%    \end{macrocode}
% \begin{macro}{\theenum*}
% \begin{macro}{\labelenum*}
% \begin{macro}{\labelitem*}
% We set up the default format for the enumeration list numbers at the
% four default levels.  Similarly, we default the tags for the itemized
% lists.  
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\renewcommand\theenumi{\arabic{enumi}}
\renewcommand\theenumii{\alph{enumii}}
\renewcommand\theenumiii{\roman{enumiii}}
\renewcommand\theenumiv{\Alph{enumiv}}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi(\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{(\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
\newcommand\labelitemi{$\m@th\bullet$}
\newcommand\labelitemii{{\normalfont\bfseries --}}
\newcommand\labelitemiii{$\m@th\ast$}
\newcommand\labelitemiv{$\m@th\cdot$}
%    \end{macrocode}
% \begin{macro}{\descriptionlabel}
% \begin{macro}{description}
% \begin{macro}{verse}
% \begin{macro}{quotation}
% \begin{macro}{quote}
% Finally, we predefine the standard environments which are built from
% the list environment.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newcommand\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1}
\newenvironment{description}{\list{}{\labelwidth\z@ 
  \itemindent-\leftmargin \let\makelabel\descriptionlabel}}{\endlist}
\newenvironment{verse}{\let\\=\@centercr
 \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
 \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}{\endlist}
\newenvironment{quotation}{\list{}{\listparindent 1.5em
 \itemindent\listparindent
 \rightmargin\leftmargin \parsep 0\p@ \@plus 1\p@}\item[]}{\endlist}
\newenvironment{quote}{\list{}{\rightmargin\leftmargin}\item[]}{\endlist}
%    \end{macrocode}
% \subsection{Page layout parameters}\label{code:page} 
% In this section we setup the parameters that adjust the page layout,
% including margins, text height and width, etc.  
% \begin{macro}{\oddsidemargin}
% \begin{macro}{\evensidemargin}
% \begin{macro}{\topmargin}
% \begin{macro}{\headsep}
% \begin{macro}{\headheight}
% \begin{macro}{\footskip}
% \begin{macro}{\head@footskip}
% \begin{macro}{\footnotesep}
% \begin{macro}{\footins}
% \begin{macro}{\@mpfootins}
% We start with the margin settings and the header settings.  Some
% things change a little in the new version so we keep the old versions
% in compatibility mode.  This is mostly for the footer stuff.  Of
% course, the \verb|\footheight|, \verb|@maxsep| and
% \verb|\@dblmaxsep|
% are no-ops in all cases but is only
% defined in compatibility mode.  In the default mode (i.e.,
% non-compatibility) the \verb|\head@footskip| length contains the sum
% of the vertical space taken by the header and footer.  The description
% of this is given below.  Initially it is set to one inch and the
% \verb|\footskip| is calculated from this.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\setlength\oddsidemargin{0\p@}
\setlength\evensidemargin{0\p@}
\setlength\topmargin{0\p@}
\setlength\headsep{14\p@}
\setlength\headheight{15\p@}
\if@compatibility
 \setlength\footheight{25\p@}  
 \setlength\footskip{45\p@}
 \setlength\@maxsep{20\p@}
 \setlength\@dblmaxsep{20\p@}
\else
 \newdimen\head@footskip
 \setlength\head@footskip{1in}  
 \setlength\footskip{\head@footskip}
 \addtolength\footskip{-\headsep}
 \addtolength\footskip{-\headheight}
\fi
\setlength\footnotesep{10\p@}
\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
\skip\@mpfootins = \skip\footins
%    \end{macrocode}
% \begin{macro}{\marginparwidth}
% \begin{macro}{\marginparsep}
% \begin{macro}{\marginparpush}
% Here we set up the dimensions for margin paragraphs.  We base these
% on one inch margins, so if the user choses to shrink these margins and
% plans to use margin paragraphs, they should be careful about these
% dimensions. 
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\setlength\marginparwidth{54\p@}
\setlength\marginparsep{10\p@}
\setlength\marginparpush{5\p@}
%    \end{macrocode}
% \begin{macro}{\textheight}
% \begin{macro}{\textwidth}
% \begin{macro}{\@foilheight}
% \begin{macro}{\@foilwidth}
% \begin{macro}{\@rotdimens}
% \begin{macro}{\@defaultdimens}
% \begin{macro}{\@rotdimens@pdf}
% \begin{macro}{\@defaultdimens@pdf}
% \begin{macro}{\setp@gelayoutdimens}
% We have added in the new version a \verb|\@foilheight| and
% \verb|\@foilwidth| which are internal dimensions of the printable area
% of the page (excluding margin paragraphs and the like).  They are
% setup initially as the paper dimensions less two inches (each) since
% we set the default top margin and side margins to zero.  This leaves
% exactly a one inch margin all the way around in all supported paper
% sizes.  At the \verb|\begin{document}| we invoke a macro
% (\verb|\setp@gelayoutdimens|) that adjusts these dimensions to account
% for user settings for page layout.  Furthermore, it defines the
% internal commands \verb|\@rotdimens| and \verb|\@defaultdimens| which
% are used to perform the rotation of individual pages (including header
% and footer).  Set up this way, the macros can take into account the
% rotation of the whole document done by a \texttt{landscape} class
% option (since this is based only on the paper dimensions).
% 
% In compatibility mode, we use the parameter settings of \FoilTeX~v1.0.1
% for text height but in the new version we let the text height expand
% to its largest possible subject to space for header and margins.  Also
% in this mode, we disable the \verb|\@rotdimens| and
% \verb|\@defaultdimens| since we didn't support this in the old
% version.
%
% Note: I understand the \texttt{dvips} can set the paper sizes
% automatically with a \verb|\special| command. However, I've chosen not
% to use that here because (a) limitations in my testing environment and
% (b) possible incompatibilities with other drivers. 
%
% We've included some additional code to deal with another
% incompatibility with \texttt{hyperref}.  This again is provided by Heiko
% Oberdiek via Hans Fredrik Nordhaug.
%
% Finally, version~2.1.4 provides additional page dimension
% manipulations for PDF\LaTeX.  This was provided by in a number of
% similar forms by a few people.  See Section~\ref{sec:acknowledgements}. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\if@compatibility
 \setlength\textheight{7.6in}  
 \setlength\textwidth{6.5in}
 \let\@rotdimens\relax         
 \let\@defaultdimens\relax     
\else
 \newdimen\@foilheight
 \newdimen\@foilwidth
 \setlength\textheight{\paperheight}
 \addtolength\textheight{-2in}
 \addtolength\textheight{-\head@footskip}
 \setlength\textwidth{\paperwidth}
 \addtolength\textwidth{-2in}
 \def\setp@gelayoutdimens{%
  \setlength\head@footskip{\footskip}
  \addtolength\head@footskip{\headsep}
  \addtolength\head@footskip{\headheight}
  \setlength\@foilheight{\textheight}
  \addtolength\@foilheight{\head@footskip}
  \setlength\@foilwidth{\textwidth}
  \def\@rotdimens{\textheight\@foilwidth \textwidth\@foilheight 
        \addtolength\textheight{-\head@footskip}
        \vsize\textheight \hsize\textwidth \linewidth\textwidth
        \columnwidth\textwidth \@colroom\textheight \@colht\textheight}
  \def\@rotdimens@pdf{%
        \setlength{\pdfpagewidth}{\strip@pt\paperheight truept}%
        \setlength{\pdfpageheight}{\strip@pt\paperwidth truept}}
  \def\@defaultdimens{\textheight\@foilheight \textwidth\@foilwidth
        \addtolength\textheight{-\head@footskip}
        \vsize\textheight \hsize\textwidth \linewidth\textwidth
        \columnwidth\textwidth \@colroom\textheight \@colht\textheight}
   \def\@defaultdimens@pdf{%
        \setlength{\pdfpagewidth}{\strip@pt\paperwidth truept}%
        \setlength{\pdfpageheight}{\strip@pt\paperheight truept}}
   \@defaultdimens
   \if@pdftex\@defaultdimens@pdf\fi}   % end of \def\setp@gelayoutdimens
\fi
\AtBeginDocument{\if@compatibility\else\setp@gelayoutdimens\fi
% For \texttt{dvips} we pass the paper size to the driver (so user's
% don't have to invoke \texttt{dvips} with the \texttt{-t papersize}
% option; thanks to Hans Fredrik Nordhaug for this fix.). This may also
% be usable with \texttt{dvipsone} but we have no way to test that.
% With VTeX this isn't necessary.
  \if@dvips
    \AtBeginDvi{\special{%
    papersize=\the\paperwidth,\the\paperheight}}%
  \fi
  \@ifpackageloaded{hyperref}{%
  \def\@begindvi{\foil@begindvi \unvbox \@begindvibox
                 \ifHy@pageanchor \@hyperfixhead 
      \gdef\@begindvi{\foil@begindvi\@hyperfixhead}%
    \else
      \gdef\@begindvi{\foil@begindvi\HyPL@EveryPage}% 
    \fi}}{}%
}
%    \end{macrocode}
% \begin{macro}{\@*penalty}
% A number of parameters for float separation and the like are set to
% the defaults in \LaTeX\ (both old and new versions) so we leave out
% settings for these in this class file.  We do set up the penalty
% values (not really knowing what they do) to values consistent with
% other class files and old style files. 
% \end{macro}
%    \begin{macrocode}
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
%    \end{macrocode}
% \begin{macro}{\arraycolsep}
% \begin{macro}{\tabcolsep}
% \begin{macro}{\arrayrulewidth}
% \begin{macro}{\doublerulesep}
% \begin{macro}{\tabbingsep}
% Here are some settings for space in tables and tabbing environments.
% These aren't terribly critical but something has to be set. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\setlength\arraycolsep{10\p@}
\setlength\tabcolsep{12\p@}
\setlength\arrayrulewidth{1\p@}
\setlength\doublerulesep{3\p@}
\setlength\tabbingsep\labelsep
%    \end{macrocode}
% \begin{macro}{\fboxsep}
% \begin{macro}{\fboxrule}
% And finally some settings for the frame box rule and separation.  We
% make the separation a bit bigger to compensate for the larger fonts.   
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\if@compatibility
 \setlength\fboxsep{6\p@}
\else
 \setlength\fboxsep{10\p@}
\fi
\setlength\fboxrule{1\p@}
%    \end{macrocode}
% \subsection{The title page}\label{code:titlepage}
% In this section we describe the construction of the title page macros.
% 
% \begin{macro}{\abovetitleskip}
% \begin{macro}{\titleauthorskip}
% \begin{macro}{\authorauthorskip}
% \begin{macro}{\authordateskip}
% \begin{macro}{\dateabstractskip}
% I'm a big fan of letting the user easily adjust spacing in lots of
% different contexts, so we set all the vertical spacing parameters as
% adjustable lengths instead of hardcoding their values.  This may take
% too many \TeX\ resources but hopefully not (I'm sure I'll get messages
% about this if it does).   Each of these dimensions adjust vertical
% space on the title page.  Each name indicates where the space is,
% so the user can easily shrink or stretch space as necessary.  The
% default values are as in the old \FoilTeX~v1.0.1, so this should cause no
% additional confusion. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newlength\abovetitleskip
\newlength\titleauthorskip
\newlength\authorauthorskip
\newlength\authordateskip
\newlength\dateabstractskip
\setlength\abovetitleskip{2em}
\setlength\titleauthorskip{1.5em}
\setlength\authorauthorskip{.5em}
\setlength\authordateskip{1em} 
\setlength\dateabstractskip{1em}
%    \end{macrocode}
% \begin{macro}{\maketitle}
% \begin{macro}{\@maketitle}
% We don't do too much that is not in \texttt{article.cls} for defining
% the \verb|\maketitle| and \verb|\@maketitle| commands.  About the only
% differences are the addition of these adjustable spacing parameters.
% (By changing the way footnote marks are done overall, we no longer
% need to change the definitions within the \verb|\maketitle| as in the
% old \FoilTeX.)  This fixed a bug when the user tried to redefine the
% footnote mark in terms of the footnote symbols. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\def\maketitle{\par 
  \begingroup 
    \setcounter{page}{0}
    \def\thefootnote{\fnsymbol{footnote}} \newpage 
    \@maketitle
    \thispagestyle{foilheadings} 
    \@thanks 
  \endgroup
  \setcounter{footnote}{0}
  \let\maketitle\relax \let\@maketitle\relax
  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax%
}
%    \end{macrocode}
% Note that in \verb|\@maketitle| we use the \verb|\zerolistvertdimens| to
% get all the list spacing shrunk to zero so we can control it
% explicitly with the above parameters. 
%    \begin{macrocode}
\def\@maketitle{\newpage
  \zerolistvertdimens
  \if@compatibility\else
    \advance\abovetitleskip -\baselineskip % \null adds this space
  \fi
  \null\vskip\abovetitleskip
  \begin{center}
     {\Large\bfseries \@title \par} 
     \vskip\titleauthorskip
     {\lineskip \authorauthorskip
       \begin{tabular}[t]{c}\@author\end{tabular}
       \par}
     \vskip\authordateskip {\@date}
  \end{center}    
  \par\vfil
}
%    \end{macrocode}
% \begin{macro}{\abstractname}
% \begin{macro}{abstract}
% To complete the title page, we add the code for the abstract
% environment, if desired by the user.   We define the
% \verb|\abstractname| so the user can do this in their favorite
% language.  We then construct the environment using the new parameters
% and still try to simulate the old layout.  
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newcommand\abstractname{Abstract}
\newenvironment{abstract}{%
  \if@compatibility
    \dateabstractskip\parskip
    \advance\dateabstractskip\topsep
    \advance\dateabstractskip\baselineskip
  \fi
  \vskip\dateabstractskip
  \centerline{\reset@font\bfseries\abstractname}
  \if@compatibility\vspace{-.5em}\vspace{0\p@}\fi
  \list{}{\listparindent 1.5em
          \itemindent\listparindent \rightmargin\leftmargin
          \zerolistvertdimens
         }\item[]%
  }{\endlist\vfill}
%    \end{macrocode}
% \subsection{Page style}\label{code:page-style}
% We have now arrived at the part of the code that deals with the page
% style, headers, footers, etc. 
% \begin{macro}{\leftheader}
% \begin{macro}{\rightheader}
% \begin{macro}{\rightfooter}
% \begin{macro}{\@leftheader}
% \begin{macro}{\@rightheader}
% \begin{macro}{\@rightfooter}
% We start with three corners of the page (all but the bottom left
% corner).  These are simply controlled using the next set of
% declaration macros.  They each define internal macros which are placed
% in the appropriate place in the header and footer.  The default
% definitions for the header is empty and for the right footer is the
% page number.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newcommand\leftheader[1]{\gdef\@leftheader{#1}}
\newcommand\rightheader[1]{\gdef\@rightheader{#1}}
\newcommand\rightfooter[1]{\gdef\@rightfooter{#1}}
\leftheader{}
\rightheader{}
\rightfooter{\quad\textsf{\thepage}}
%    \end{macrocode}
% \begin{macro}{\ifLogo}
% \begin{macro}{\LogoOff}
% \begin{macro}{\LogoOn}
% \begin{macro}{\Restriction}
% \begin{macro}{\MyLogo}
% The left footer is a combination of two macros, \verb|\MyLogo| and
% \verb|\Restriction|.  By default, the logo appears and is set to be
% the string ``Typeset by \FoilTeX''.  The \verb|\Restriction| is empty,
% but can be used for things like ``Confidential'' or perhaps for
% something that is aimed to the intended audience.  The \verb|\LogoOff| and
% \verb|\LogoOn| declarations are conditional toggles that turn on or
% off the setting of the logo.  The conditional they set is tested by 
% \verb|\ifLogo|, which defaults to true.  This gives a simple mechanism 
% for turning it off completely, or perhaps on individual pages as
% necessary. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newif\ifLogo \Logotrue
\newcommand\LogoOff{\Logofalse}
\newcommand\LogoOn{\Logotrue}
\newcommand\Restriction[1]{\gdef\@Restriction{#1}}
\Restriction{}
\newcommand\MyLogo[1]{\gdef\@MyLogo{\ifLogo{#1}\else\fi}}
\MyLogo{-- Typeset by \FoilTeX\ --}
%    \end{macrocode}
% \begin{macro}{\ps@foilheadings}
% Now that we have the code so the user can easily set up the contents
% of the page style, we need to use these to construct the page style. 
% We have added some extras to this new version.  In particular, we now
% support a rule below the header and a rule above the footer (much as
% is available with \texttt{fancyheadings.sty}).   We still wrap
% everything in the \verb|\Black| macro for backwards compatibility and
% just in case the user decides to use \texttt{colordvi.sty}, though we
% don't recommend it or really support it.  Note that these headings are
% different on the title page.  We also clean this up abit from the old
% version by using \verb|\let| to do the even pages. 
%
% We made changes here to fix a problem with the footrule being placed
% over a graphic in the footer if the graphic was too tall. 
% \end{macro}
%    \begin{macrocode}
\newsavebox\@tempfootbox
\newdimen\@tempfootht
\newcommand\ps@foilheadings{\let\@mkboth\@gobbletwo
  \def\@oddhead{%
    \ifnum \c@page>0 
      {\Black{%
      \if@header@rule\hbox to\z@{\rule[-5\p@]{\textwidth}{1\p@}\hss}\fi
      \reset@font\tiny
      \@leftheader\hfil\@rightheader}}%
    \else
      \hfill
    \fi}%
  \def\@oddfoot{%
    \ifnum \c@page>0 
      {\Black{%
      \sbox\@tempfootbox{\tiny\@MyLogo\ \@Restriction\hfil\@rightfooter}%
      \@tempfootht\ht\@tempfootbox
      \advance\@tempfootht 5.66666\p@
      \if@footer@rule%
      \hbox to\z@{\rule[\@tempfootht]{\textwidth}{1\p@}\hss}%
      \fi%
      \reset@font\tiny
     \@MyLogo\ \@Restriction\hfil\@rightfooter}}%
    \else 
      {\Black{\hfil\reset@font\footnotesize%
       \@MyLogo\ \@Restriction\hfil}}%
    \fi}%
  \let\@evenhead\@oddhead%
  \let\@evenfoot\@oddfoot%
}
\ps@foilheadings 
%    \end{macrocode}
% \begin{macro}{\pagenumbering}
% \begin{macro}{\onecolumn}
% \begin{macro}{\mark}
% Finally, we set the page numbering style, force this to one column
% (who'd want two column foils anyway) and fill the \verb|\mark| with
% empty stuff just to cover our bases (this is irrelevant on foils).
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\pagenumbering{arabic}
\onecolumn
\mark{{}{}}
%    \end{macrocode}
% \subsection{Bibliography or References} \label{code:biblio}
% \begin{macro}{\refname}
% \begin{macro}{\bibindent}
% \begin{macro}{\newblock}
% \begin{macro}{thebibliography}
% Though they may not be used very much, we do support a bibliography
% environment.   This is a modified version of that from
% \texttt{article.cls}.  The essential changes are the deletion of
% anything that adjusts the header (e.g., \verb|\@mkboth|)
% since this is irrelevant for foils and the replacement of a sectioning
% macro with just the placement of the \verb|\refname|, which is defined
% first. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newcommand\refname{References}
\newdimen\bibindent
\setlength\bibindent{1.5em}
\newcommand\newblock{}
\newenvironment{thebibliography}[1]{
 \vskip 3.5ex \@plus -1ex \@minus -.2ex 
 \noindent{\large\bfseries\refname}
 \vskip 2.3ex \@plus .2ex 
 \list{\@biblabel{\arabic{enumiv}}}%
 {\settowidth\labelwidth{\@biblabel{#1}}%
 \leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \if@openbib
   \advance\leftmargin\bibindent
   \itemindent -\bibindent
   \listparindent \itemindent
   \parsep \z@
 \fi
 \usecounter{enumiv}%
 \let\p@enumiv\@empty
 \renewcommand\theenumiv{\arabic{enumiv}}}
 \if@openbib
   \renewcommand\newblock{\par}
 \else 
   \renewcommand\newblock{\hskip .11em \@plus .33em \@minus -.07em}
 \fi
 \sloppy\clubpenalty4000\widowpenalty4000%
 \sfcode`\.=\@m\relax}%
 {\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
 \endlist}
%    \end{macrocode}
% \subsection{Non-floating floats}\label{code:floats}
% In this section we construct new definitions for float-type
% environments that don't actually float!   They will look to the user
% like any other float environment but will act as if given the
% \texttt{[H]} (put it HERE!) placement.
% 
% \begin{macro}{\abovecaptionskip}
% \begin{macro}{\belowcaptionskip}
% \begin{macro}{\abovefloatskip}
% \begin{macro}{\captionfraction}
% First we set up some parameters that control the spacing around and
% within floats.  They have obvious meanings based on their names.  The
% default values for these spaces are as in standard \LaTeX\ where most
% of them are hardcoded.  Here we let the user set them.  
%
% Many users want the caption to have different width than the text
% width, so here it can be set by the user.  The old \FoilTeX\ method
% was to set the dimension \verb|\captionwidth|.  This actually
% introduced a bug when combined with \verb|\rotatefoilhead|.  In this
% new version of \FoilTeX, we do two things.  First, we fix the bug,
% but we also introduce an alternative (and preferred) method for
% adjusting the caption width with \verb|\captionfraction|.  As with
% other \LaTeX\ fractions (for floats), this is reset with the
% \verb|\renewcommand|.  The default value is $1.0$.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
\newlength\@captionwidth
\newlength\captionwidth
\newcommand\captionfraction{1.0}
\newlength\abovefloatskip
\setlength\abovecaptionskip{15\p@ \@plus 5\p@ \@minus 5\p@}
\setlength\belowcaptionskip{0\p@}
\setlength\captionwidth\z@
\setlength\abovefloatskip{20\p@ \@plus 5\p@ \@minus 10\p@}
%    \end{macrocode}
% \begin{macro}{\ext@table}
% \begin{macro}{\ext@table}
% These two are defined only to fill an incompatibility between the
% \texttt{hyperref} package (which shouldn't need it as of version 6.66j
% of that package), but we include it here just in case it might be
% needed for some other package (pdflatex?). 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\providecommand*\ext@table{lot}%
\providecommand*\ext@figure{lof}%
%    \end{macrocode}
% \begin{macro}{\@makecaption}
% \begin{macro}{\@caption}
% \begin{macro}{\caption}
% For non-floating environments like ``figure'' and ``table'', we are
% going to provide a \verb|*|-form which is unnumbered.  To enable
% that in an easy way, we make a conditional which can be used to
% determine whether we are to include counter or not in the caption.
% This requires some modifications to a couple of macros.  Other
% changes are noted below.
% We modify the standard definition for \verb|\@makecaption| so
% that it uses the \verb|\captionwidth| parameter (old method) or the
% \verb|\captionfraction| (new method).  Then we modify the
% \verb|\@caption| macro, removing all the extraneous stuff that added
% things to the table of contents and the like.  Any text in the
% optional argument to a \verb|\caption| command is just swallowed.
% Finally we modify the definition of \verb|\caption| to skip
% incrementing a counter in \emph{starmode} (since there isn't one!).
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newif\if@starmode\@starmodefalse
\newcommand\@makecaption[2]{%
%    \end{macrocode}
% To set the internal \verb|\@captionwidth| we first check for the old
% method. If \verb|\captionwidth| was set by the user, then we take
% the minimum of this value and \verb|\hsize|.   If not, then the new
% method sets the caption width by taking the fraction of the
% \verb|\hsize| in all cases.
%    \begin{macrocode}
 \ifdim\captionwidth>\z@
   \ifdim\captionwidth>\hsize
     \setlength\@captionwidth\hsize
   \else
     \setlength\@captionwidth\captionwidth
   \fi
 \else
   \setlength\@captionwidth{\captionfraction\hsize}
 \fi
%    \end{macrocode}
% Now we layout the caption itself in something no bigger than the
% above dimension, but ignoring the counter in \verb|*|-mode.
%    \begin{macrocode}
 \vskip \abovecaptionskip
 \if@starmode\sbox\@tempboxa{#2}\else\sbox\@tempboxa{#1: #2}\fi%
 \ifdim \wd\@tempboxa >\@captionwidth 
   \centering\parbox[t]{\@captionwidth}{\unhbox\@tempboxa\par} 
 \else 
   \hbox to\hsize{\hfil\box\@tempboxa\hfil}
 \fi
 \vskip\belowcaptionskip}
\long\def\@caption#1[#2]#3{\par \begingroup \@parboxrestore \normalsize
 \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
 \endgroup}
\def\caption{\if@starmode\else\refstepcounter\@captype\fi%
 \@dblarg{\@caption\@captype}}
%    \end{macrocode}
% \begin{macro}{\@xfloat}
% To construct non-floating floats, we need to do a couple of things.
% First, we take out anything from the \verb|\@xfloat| that refers to
% placement, since these don't move.  We also take out all the float
% penalty code and anything that saves this stuff in the float list
% since that is now irrelevant. This cleans up this code considerably.
% Basically, all it does now is build a box with the appropriate
% grouping and wrapping.  Note that this starts a couple of groups
% which have to be closed later (at the end of the environment). 
% \end{macro}
%    \begin{macrocode}
\def\@xfloat#1[#2]{%
   \def \@captype {#1}%
   \ifhmode \@bsphack \fi \vskip\abovefloatskip
   \vbox\bgroup \color@begingroup \normalcolor
   \hsize\columnwidth \@parboxrestore
   \if@nobreak
     \def\outer@nobreak{\global\@nobreaktrue}\global\@nobreakfalse
   \fi}
%    \end{macrocode}
% \begin{macro}{\end@nonfloat}
% This macro is used to close the non-float environments.   We could
% have modified the \verb|\end@float| and used that but it seemed like
% this was simpler.
% \end{macro}
%    \begin{macrocode}
\def\end@nonfloat{\par\vskip\z@skip 
   \color@endgroup
   \outer@nobreak
   \egroup}
%    \end{macrocode}
% \begin{macro}{\newnonfloat}
% This new macro is a general mechanism for defining or creating
% non-floating environments.   It is probably similar to what can be
% found in \texttt{float.sty}, but we didn't check that for our
% purposes.  Each invocation of this macro will create \emph{two}
% environments, a non-starred version and a starred version.  The
% starred version is not numbered (and so non-reference-able). 
% The first thing this macro does is define the \emph{name} of the
% environment, i.e., the non-float type used in the caption.   It next
% defines a counter for the non-starred version of the environment. 
% It sets the style of the counter to arabic (this can probably be
% overriden by the user, but we haven't tested this).  Next it sets the
% style for the caption structure just as in standard \LaTeX.   Finally,
% it defines the actual environments in terms of \verb|\@float| and
% \verb|\end@nonfloat|.   The former is defined within \LaTeX\ in terms
% of \verb|\@xfloat| (modified above).  
% \end{macro}
%    \begin{macrocode}
\newcommand\newnonfloat[2]{%
  \expandafter\newcommand\csname#1name\endcsname{#2}%
  \expandafter\newcounter{#1}%
  \expandafter\renewcommand\csname the#1\endcsname
        {\@arabic\csname c@#1\endcsname}%
  \expandafter\newcommand\csname fnum@#1\endcsname
    {\csname#1name\endcsname~\csname the#1\endcsname}%
  \expandafter\newenvironment{#1}{\@float{#1}}{\end@nonfloat}%
  \expandafter\newenvironment{#1*}{\@float{#1}\@starmodetrue}%
                                  {\end@nonfloat}%
}
%    \end{macrocode}
% \begin{macro}{table}
% \begin{macro}{figure}
% \begin{macro}{\figurename}
% \begin{macro}{\tablename}
% Finally, we use the above constructor to give definitions for the
% standard \texttt{table}, \texttt{table*}, \texttt{figure}, and
% \texttt{figure*} environments.   Note that the starred forms mean
% unnumbered versions and \emph{not} two column versions.  The
% \verb|\newnonfloat| automatically defines a ``name'' macro for the
% non-float.  So, for example, the following declarations define
% \verb|\tablename| and \verb|\figurename| to ``Table'' and ``Figure'',
% respectively. 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newnonfloat{table}{Table}
\newnonfloat{figure}{Figure}
%    \end{macrocode}
% \subsection{The foil title macros and foil rotation} \label{code:foil-title}
% We next describe the macros for starting new foils.   There are some
% enhancements to the old version here.  In particular, we now have a
% simple way to support rotated foils.
% \begin{macro}{\foilheadskip}
% Of course, we have a length parameter that we use to set the vertical
% spacing around the foil title (called \verb|\foilhead|, perhaps in
% error).   This is set to a new value in the new \FoilTeX, with much
% more shrinkability.  We hope this reduces the amount of manual
% fiddling usually needed to squeeze that extra bit of stuff on a single
% foil.   The default space between the foil title and the text below it
% is set as \texttt{\bs parskip+\bs baselineskip+\bs foilheadskip+[option]}
% where the \texttt{[option]} comes from the optional argument in the
% \verb|\foilhead| macro. 
% \end{macro}
%    \begin{macrocode}
\newlength\foilheadskip
\if@compatibility
  \setlength\foilheadskip{.25in}
\else 
  \setlength\foilheadskip{18\p@ \@plus 0\p@ \@minus 18\p@}  
\fi
%    \end{macrocode}
% \begin{macro}{\foil@rot@start}
% This macro is used exclusively for individual foil rotation and is
% only called if one of the \texttt{dvips}, \texttt{dvipsone} or
% \texttt{vtex} options is in
% place.  In effect, this 
% issues a \postscript\ call to translate vertically by the
% current \verb|\@foilheight| (or in the case
% of \VTeX\ horizontally by \verb|\@foilwidth|) and 
% then do the necessary rotation.  We
% don't need to do any graphics save or restore in this process since it
% is only invoked at the very beginning of a page where this has just
% happened.   This is disables (mostly) for PDF\LaTeX. 
% \end{macro}
%    \begin{macrocode}
\if@dvips
\def\foil@rot@start{\special{ps: 
  0 \strip@pt\@foilheight\space 72.27 div Resolution mul translate 
  90 neg rotate}}%
\else\if@dvipsone
\def\foil@rot@start{\special{ps: 
  0 \strip@pt\@foilheight\space 72.27 mul 65536 mul rmoveto
  90 rotate}}%
\else\if@vtex
\def\foil@rot@start{\special{pS:
  \strip@pt\@foilwidth\space 72.27 div 72 mul 0 translate
  90 neg rotate}}%
\else\if@pdftex
\def\foil@rot@start{}%
\fi\fi\fi\fi
%    \end{macrocode}
% \begin{macro}{\ifcur@rot@state}
% \begin{macro}{\ifnew@rot@state}
% We need some mechanism to test the current state of rotation so we
% know whether we should issue the rotation call again if there are two
% invocations of rotated foils in a row.   We capture this in these
% conditionals. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newif\ifcur@rot@state
\newif\ifnew@rot@state
%    \end{macrocode}
% \begin{macro}{\foilhead}
% \begin{macro}{\rotatefoilhead}
% We can now define the macros used for starting new foils, both in
% standard orientation and rotated.  (Note that standard is not by
% default portrait if the \texttt{landscape} class option is set.)
% These are both defined in terms of \verb|\@foilhead| which is used to
% parse the optional argument for vertical space adjustment.   
% \verb|\foilhead| sets the state of the ``new'' foil to non-rotated,
% then happily goes off to \verb|\@foilhead|.   \verb|\rotatefoilhead|
% is not supported in compatibility mode so it isn't even defined there.
% Rotation is not supported unless one of the \texttt{dvips}, 
% \texttt{dvipsone} or \texttt{vtex} class options is
% declared but we only issue a warning in this case and set the ``new''
% state to non-rotated.   If all the pieces are in place, it sets the
% ``new'' state to rotated.  Finally, it goes off to \verb|\@foilhead|. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newcommand\foilhead{\new@rot@statefalse%        set state for the page
   \@ifnextchar[{\@foilhead}{\@foilhead[0\p@]}}
\if@compatibility
\else 
  \newcommand\rotatefoilhead{%
    \if@dvips
      \new@rot@statetrue
    \else\if@dvipsone
      \new@rot@statetrue
    \else\if@vtex
      \new@rot@statetrue
    \else\if@pdftex
      \new@rot@statetrue
    \else
      \ClassWarningNoLine{FoilTex}{%
       Without the 'dvips', 'dvipsone' or 'vtex' option \MessageBreak
       (when running LaTeX), rotation is not supported} 
      \new@rot@statefalse
    \fi\fi\fi\fi
    \@ifnextchar[{\@foilhead}{\@foilhead[0\p@]}}
\fi
%    \end{macrocode}
% \begin{macro}{\@foilhead}
% The new version of the \verb|\@foilhead| macro now has more work to
% do.  First, it clears the previous page so we start fresh on a new
% page.  Next, it checks if we are supposed to rotate this page.  If so,
% it sets the current page state to rotated and establishes the
% dimensions for the rotated page (\verb|\@rotdimens|, see
% Section~\ref{code:page}).  If not, it sets the current page state to
% non-rotated and establishes the non-rotated page dimensions
% (\verb|\@defaultdimens|, see Section~\ref{code:page}).   Then it sets
% the font in large boldface, centers the title and adjusts
% the vertical spacing.   We also wrap this header in a color group and 
% reset to normal color so it doesn't get corrupted by other things.
% \end{macro}
%    \begin{macrocode}
\def\@foilhead[#1]#2{\vfill\eject
  \ifnew@rot@state
    \cur@rot@statetrue\@rotdimens
    \if@pdftex\@rotdimens@pdf\fi % add this if pdftex
  \else
    \cur@rot@statefalse\@defaultdimens
    \if@pdftex\@defaultdimens@pdf\fi % add this if pdftex
  \fi
  {\color@begingroup\normalcolor
   \reset@font\large\bfseries\centering#2\par\null\color@endgroup}%
  \advance\foilheadskip by #1 \vspace{\foilheadskip}
  \advance\foilheadskip by -#1}
%    \end{macrocode}
% \begin{macro}{\@shipoutsetup}
% We do some trickery here to get the right things to happen at shipout
% to enable rotation.  Namely, before we do any shipout, if rotation is
% in effect, we issue the \verb|\foil@rot@start| (handled by
% \texttt{dvips}) and then do the shipout.  This enables us to interact
% with perhaps other utilities that muck with these internals and make
% sure that the rotation stuff happens at exactly the right point.
% The trickery is standard stuff, save the old definition, and merge the
% saved defintion with the new stuff added.
% \end{macro}
%    \begin{macrocode}
 %\let\old@shipoutsetup\@shipoutsetup
 %\def\@shipoutsetup{%
 %  \ifcur@rot@state\foil@rot@start\fi  
 %  \old@shipoutsetup}
%    \end{macrocode}
%\begin{macro}{\@begindvi} 
%\begin{macro}{\foil@begindvi} 
% Unfortunately, They changed the output routine so this old stuff above
% didn't work anymore, which is why it is commented out. Below is a
% hack that resolves the problem but some of Them (the \LaTeX3 team) 
% didn't like it because it misuses the command \verb|\@begindvi|. We
% use it anyway.  First check to see if They change things again in
% the future with \verb|\CheckCommand*|.  If so, this will warn the
% user (and so me).  Next we hack in something to get the rotation
% effects we need.  This is hacked further in~2.1.4 for
% \texttt{hyperref} interactions. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\CheckCommand*\@begindvi{%
  \unvbox \@begindvibox
 \global\let \@begindvi \@empty}
 % the old definitions
 %\def \@begindvi{%
 %  \ifcur@rot@state\foil@rot@start\fi
 %  \unvbox \@begindvibox
 % %\global\let \@begindvi \@empty
 %  \gdef\@begindvi{\ifcur@rot@state\foil@rot@start\fi\@empty}
 %}
\def\foil@begindvi{%
  \ifcur@rot@state\foil@rot@start\fi
}
\def\@begindvi{%
  \foil@begindvi
  \unvbox \@begindvibox
  \gdef\@begindvi{\foil@begindvi\@empty}
}
%    \end{macrocode}
% \begin{macro}{\@outputpage} 
% The more recommended fix follows.  It really isn't very robust but it
% is what They recommended.  Essentially, I check the old definition of
% \verb|\@outputpage| (the one from \LaTeXe, 1995/06/01 patch level~3)
% and see if this has changed at all.  If it has, then the user gets a
% warning to this effect.  I then simply redefine it the way I want it
% based on this definition.  All this does is provide some warning in
% case the official definition changed when I wasn't looking. 
% \end{macro}
%    \begin{macrocode}
 %\CheckCommand*\@outputpage{%
 %\begingroup
 % \set@typeset@protect
 % \@shipoutsetup
 % \let \protect \noexpand
 % \shipout \vbox{%
 %   \set@typeset@protect
 %   \aftergroup\set@typeset@protect
 %   \@begindvi
 %   \vskip \topmargin
 %   \moveright\@themargin \vbox {%
 %     \setbox\@tempboxa \vbox to\headheight{%
 %       \vfil
 %       \color@hbox
 %         \normalcolor
 %         \hb@xt@\textwidth {%
 %           \let \label \@gobble
 %           \let \index \@gobble
 %           \let \glossary \@gobble %% 21 Jun 91
 %           \@thehead
 %           }%
 %       \color@endbox
 %       }%                        %% 22 Feb 87
 %     \dp\@tempboxa \z@
 %     \box\@tempboxa
 %     \vskip \headsep
 %     \box\@outputbox
 %     \baselineskip \footskip
 %     \color@hbox
 %       \normalcolor
 %       \hb@xt@\textwidth{%
 %         \let \label \@gobble
 %         \let \index \@gobble      %% 22 Feb 87
 %         \let \glossary \@gobble   %% 21 Jun 91
 %         \@thefoot
 %         }%
 %     \color@endbox
 %     }%
 %   }%
 % \endgroup
 % \global \@colht \textheight
 % \stepcounter{page}%
 % \let\firstmark\botmark
 %}
 %\def\@outputpage{%
 %\begingroup
 % \set@typeset@protect
 % \@shipoutsetup
 % \let \protect \noexpand
 % \shipout \vbox{%
 %   \set@typeset@protect
 %  \aftergroup\set@typeset@protect
 %   \@begindvi
 % \ifcur@rot@state\foil@rot@start\fi  %% added by for foils.cls   
 %   \vskip \topmargin
 %   \moveright\@themargin \vbox {%
 %     \setbox\@tempboxa \vbox to\headheight{%
 %       \vfil
 %       \color@hbox
 %         \normalcolor
 %         \hb@xt@\textwidth {%
 %           \let \label \@gobble
 %           \let \index \@gobble
 %           \let \glossary \@gobble %% 21 Jun 91
 %           \@thehead
 %           }%
 %       \color@endbox
 %       }%                        %% 22 Feb 87
 %     \dp\@tempboxa \z@
 %     \box\@tempboxa
 %     \vskip \headsep
 %     \box\@outputbox
 %     \baselineskip \footskip
 %     \color@hbox
 %       \normalcolor
 %       \hb@xt@\textwidth{%
 %         \let \label \@gobble
 %         \let \index \@gobble      %% 22 Feb 87
 %         \let \glossary \@gobble   %% 21 Jun 91
 %         \@thefoot
 %         }%
 %     \color@endbox
 %     }%
 %   }%
 % \endgroup
 % \global \@colht \textheight
 % \stepcounter{page}%
 % \let\firstmark\botmark
 %}
%    \end{macrocode} 
% \subsection{Theorem-like environments}\label{code:theorems}
% The next few macros set up special environments for theorem-like
% structures.  The unstarred forms are numbered; the starred
% forms are unnumbered.  We use slanted fonts for all of these.
% User's can easily change this if they wish.  Both the starred and
% unstarred are created with one simple \verb|\newtheorem| declaration
% (similar to the non-floats of Section~\ref{code:floats}).
% We try to use as much of the default \LaTeX\ stuff as possible here.
% 
% \begin{macro}{\newtheorem}
% \begin{macro}{\@Othm}
% \begin{macro}{\@Nthm}
% \begin{macro}{\@Sthm}
% \begin{macro}{\@starthm}
% \begin{macro}{\@xstarthm}
% \begin{macro}{\@ystarthm}
% As in the standard definition, we have to deal with optional
% arguments to the \verb|\newtheorem| declaration.  We set this up an
% extra level deep by intercepting the default arguments with
% \verb|\@Othm| and \verb|\@Nthm| and then passing the arguments down
% one level simultaneously to the new \verb|\@Sthm| and the old
% \verb|\@othm| and \verb|\@nthm|.   The \verb|\@Sthm| defines the
% starred name and the environment in terms of the \verb|\@starthm|,
% which again recursively calls subconstructs to deal with the second
% optional argument and which do the actual environment construction.
% This is very parallel to standard \LaTeX.   Notice that we put
% everything in slanted text.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\def\newtheorem#1{\@ifnextchar[{\@Othm{#1}}{\@Nthm{#1}}}
\def\@Othm#1[#2]#3{\@Sthm{#1}{#3}\@othm{#1}[#2]{#3}}
\def\@Nthm#1#2{\@Sthm{#1}{#2}\@nthm{#1}{#2}}
\def\@Sthm#1#2{{{\global\@namedef{#1*}{\@starthm{#2}}
   \global\@namedef{end#1*}{\@endtheorem}}}}
\def\@starthm#1{\@ifnextchar[{\@ystarthm{#1}}{\@xstarthm{#1}}}
\def\@xstarthm#1{\@beginstartheorem{#1} \ignorespaces} 
\def\@ystarthm#1[#2]{\@opargbeginstartheorem{#1}{#2}\ignorespaces}
\def\@begintheorem#1#2{\trivlist 
      \item[\hskip\labelsep{\bfseries #1\ #2. }]\slshape}
\def\@opargbegintheorem#1#2#3{\trivlist 
      \item[\hskip\labelsep{\bfseries #1\ #2.\ [#3] }]\slshape}
\def\@beginstartheorem#1{\trivlist
      \item[\hskip\labelsep{\bfseries #1. }]\slshape}
\def\@opargbeginstartheorem#1#2{\trivlist 
      \item[\hskip\labelsep{\bfseries #1.\ [#2] }]\slshape}
%    \end{macrocode}
% \begin{macro}{Theorem}
% \begin{macro}{Lemma}
% \begin{macro}{Corollary}
% \begin{macro}{Proposition}
% \begin{macro}{Definition}
% For convenience, we predefine a few of the more standard environments.
% We use up token space here so perhaps this will have to be disabled so
% the user can do this for themselves.   Note that the names are
% UpperCased to avoid some conflicts with user definitions that might
% already be in place.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newtheorem{Theorem}{Theorem}
\newtheorem{Lemma}{Lemma}
\newtheorem{Corollary}{Corollary}
\newtheorem{Proposition}{Proposition}
\newtheorem{Definition}{Definition}
%    \end{macrocode}
% \begin{macro}{Proof}
% \begin{macro}{\ProofBox}
% Finally, we set up a default \texttt{Proof} environment, with a nifty
% little square box at the end (this typically would come from the
% \texttt{latexsym} package but we steal just what we need for this to
% work here. 
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\newenvironment{Proof}{\begin{trivlist}\item[] {\bfseries Proof.}}{%
  \ifhmode\nolinebreak[4]~$\ProofBox$\else$\ProofBox$\fi \end{trivlist}}
\DeclareMathSymbol\ProofBox{0}{flasy}{"32}
%    \end{macrocode}
% \subsection{Boldface mathematics}\label{code:boldmath}
% \begin{macro}{\bm}
% \begin{macro}{\bmstyle}
% \begin{macro}{boldequation*}
% \begin{macro}{boldequation}
% Happily, in the new \LaTeX, this is all done much better,
% particularly, with font selection.  What we do here is just define a
% simple macro for setting small pieces of mathematics in bold (italics)
% and entire equations.  This is mostly for backward compatibility.
% Note that the \verb|\bm| macro is now much more robust.  It uses the
% \verb|\mathpalette| to set the style of its contents in the style of
% its surrounding environment rather than in just \verb|\textstyle| as
% was done in the earlier \FoilTeX.  There are two bold equation
% environments, a starred (unnumbered) form and the unstarred (numbered)
% form.   These environments have their macros constructed explicitly,
% rather than with the \verb|\newenvironment| declaration.
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%    \begin{macrocode}
\def\bm#1{\mathpalette\bmstyle{#1}}
\def\bmstyle#1#2{\mbox{\boldmath$#1#2$}}
\@namedef{boldequation*}{\boldmath$$}
\@namedef{endboldequation*}{$$\global\@ignoretrue\unboldmath}
\def\boldequation{\boldmath$$\refstepcounter{equation}}
\def\endboldequation{\eqno\@eqnnum%
    $$\global\@ignoretrue\unboldmath}
%</package>
%    \end{macrocode}
% \section{The class option files} \label{code:clo}
% In these subsections we simply do a dump of the code for the size
% class option files.   There is nothing deep here going on.  Mostly we
% set the font sizes for the different relative font scaling, and adjust
% some of the basic settings in each level for display skips and for top
% level lists.   There are two things to note here.  First,  we have 
% added some larger fonts (51pt) over what was directly available in the
% old version.   Second, the list setting parameters are set differently
% in the new version but act exactly as they did before in compatibility
% mode. 
%
% New here in version~2.1.3 are definitions for the \verb|\big| and
% related operators which are now scaled according to the default font
% size (with the exception of \texttt{shortform} where this is not
% needed).  In base \LaTeX{}, these are handled the same across the
% different point sizes (because those sizes varied so little).  The
% numbers here are basically computed from the values in the base
% \LaTeX.  An alternative approach to this is the \texttt{exscale}
% package.
%
% \subsection{The \texttt{17pt} option} \label{code:17pt}
%    \begin{macrocode}
%<*17pt>
\def\normalsize{\@setfontsize\normalsize\@xviipt{22}%
\abovedisplayskip 20\p@ \@plus 3\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 2\p@
\belowdisplayshortskip 4\p@ \@plus 2\p@ \@minus 2\p@
\let\@listi\@listIb}
\normalsize

\def\small{\@setfontsize\small\@xivpt{18}%
\abovedisplayskip 16\p@ \@plus 2\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 1\p@
\belowdisplayshortskip 3\p@ \@plus 1\p@ \@minus 2\p@
\let\@listi\@listIc}
 
\def\footnotesize{\@setfontsize\footnotesize\@xiipt{15}%
\abovedisplayskip 13\p@ \@plus 2\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 1\p@
\belowdisplayshortskip 2\p@ \@plus 1\p@ \@minus 1\p@
\let\@listi\@listId}
 
\def\large{\@setfontsize\large\@xxpt\@xxvpt
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\let\@listi\@listIa}
 
\let\scriptsize=\footnotesize
\let\tiny=\footnotesize
\def\Large{\@setfontsize\Large\@xxvpt{32}\let\@listi\@listIa}
\def\LARGE{\@setfontsize\LARGE\@xxxpt{38}\let\@listi\@listIa}
\def\huge{\@setfontsize\huge\@xxxvipt{45}\let\@listi\@listIa}
\def\Huge{\@setfontsize\Huge\@xliiipt{54}\let\@listi\@listIa}

\def\big#1{{\hbox{$\left#1\vbox to14.5\p@{}\right.\n@space$}}}
\def\Big#1{{\hbox{$\left#1\vbox to19.5\p@{}\right.\n@space$}}}
\def\bigg#1{{\hbox{$\left#1\vbox to24.5\p@{}\right.\n@space$}}}
\def\Bigg#1{{\hbox{$\left#1\vbox to30\p@{}\right.\n@space$}}}
%</17pt>
%    \end{macrocode}
% \subsection{The \texttt{20pt} option} \label{code:20pt}
%    \begin{macrocode}
%<*20pt>
\def\normalsize{\@setfontsize\normalsize\@xxpt\@xxvpt
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@ 
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\let\@listi\@listIa}
\normalsize
 
\def\small{\@setfontsize\small\@xviipt{22}%
\abovedisplayskip 20\p@ \@plus 3\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 2\p@
\belowdisplayshortskip 4\p@ \@plus 2\p@ \@minus 2\p@
\let\@listi\@listIb}
 
\def\footnotesize{\@setfontsize\footnotesize\@xivpt{18}%
\abovedisplayskip 16\p@ \@plus 2\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 1\p@
\belowdisplayshortskip 3\p@ \@plus 1\p@ \@minus 2\p@
\let\@listi\@listIc}
 
\def\scriptsize{\@setfontsize\scriptsize\@xiipt{15}%
 \if@compatibility\else\let\@listi\@listId\fi}
\let\tiny=\scriptsize
\def\large{\@setfontsize\large\@xxvpt{32}}
\def\Large{\@setfontsize\Large\@xxxpt{38}}
\def\LARGE{\@setfontsize\LARGE\@xxxvipt{45}}
\def\huge{\@setfontsize\huge\@xliiipt{54}}
\if@compatibility
  \let\Huge=\huge
\else
  \def\Huge{\@setfontsize\huge\@lipt{62}}
\fi

\def\big#1{{\hbox{$\left#1\vbox to17\p@{}\right.\n@space$}}}
\def\Big#1{{\hbox{$\left#1\vbox to23\p@{}\right.\n@space$}}}
\def\bigg#1{{\hbox{$\left#1\vbox to27\p@{}\right.\n@space$}}}
\def\Bigg#1{{\hbox{$\left#1\vbox to35\p@{}\right.\n@space$}}}
%</20pt>
%    \end{macrocode}
% \subsection{The \texttt{25pt} option} \label{code:25pt}
%    \begin{macrocode}
%<*25pt>
\def\normalsize{\@setfontsize\normalsize\@xxvpt{32}%
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\let\@listi\@listIa}
\normalsize 

\def\small{\@setfontsize\small\@xxpt\@xxvpt
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\if@compatibility
 \let\@listi\@listIb
\else
 \let\@listi\@listIa\fi
}
 
\def\footnotesize{\@setfontsize\footnotesize\@xviipt{22}%
\abovedisplayskip 20\p@ \@plus 3\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 2\p@
\belowdisplayshortskip 4\p@ \@plus 2\p@ \@minus 2\p@
\let\@listi\@listIb}
 
\def\scriptsize{\@setfontsize\scriptsize\@xivpt{18}%
 \if@compatibility\else\let\@listi\@listIc\fi}
\def\tiny{\@setfontsize\tiny\@xiipt{15}%
 \if@compatibility\else\let\@listi\@listId\fi}
\def\large{\@setfontsize\large\@xxxpt{38}}
\def\Large{\@setfontsize\Large\@xxxvipt{45}}
\def\LARGE{\@setfontsize\LARGE\@xliiipt{54}}
\if@compatibility
  \let\huge=\LARGE
  \let\Huge=\LARGE
\else
  \def\huge{\@setfontsize\huge\@lipt{62}}
  \let\Huge=\huge
\fi

\def\big#1{{\hbox{$\left#1\vbox to21\p@{}\right.\n@space$}}}
\def\Big#1{{\hbox{$\left#1\vbox to29\p@{}\right.\n@space$}}}
\def\bigg#1{{\hbox{$\left#1\vbox to36\p@{}\right.\n@space$}}}
\def\Bigg#1{{\hbox{$\left#1\vbox to44\p@{}\right.\n@space$}}}
%</25pt>
%    \end{macrocode}
% \subsection{The \texttt{30pt} option} \label{code:30pt}
%    \begin{macrocode}
%<*30pt>
\def\normalsize{\@setfontsize\normalsize\@xxxpt{38}%
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\let\@listi\@listIa}
\normalsize

\def\small{\@setfontsize\small\@xxvpt{32}%
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\if@compatibility
 \let\@listi\@listIb
\else
 \let\@listi\@listIa\fi
}
 
\def\footnotesize{\@setfontsize\footnotesize\@xxpt\@xxvpt
\abovedisplayskip 30\p@ \@plus 3\p@ \@minus 9\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 3\p@
\belowdisplayshortskip 7\p@ \@plus 3\p@ \@minus 4\p@
\if@compatibility
 \let\@listi\@listIb
\else
 \let\@listi\@listIa\fi
}
 
\def\scriptsize{\@setfontsize\scriptsize\@xviipt{22}%
 \if@compatibility\else\let\@listi\@listIb\fi}
\def\tiny{\@setfontsize\tiny\@xivpt{18}%
 \if@compatibility\else\let\@listi\@listIc\fi}
\def\large{\@setfontsize\large\@xxxvipt{45}}
\def\Large{\@setfontsize\Large\@xliiipt{54}}
\if@compatibility
  \let\LARGE=\Large
  \let\huge=\Large
  \let\Huge=\Large
\else
  \def\LARGE{\@setfontsize\LARGE\@lipt{62}}
  \let\huge=\LARGE
  \let\Huge=\LARGE
\fi

\def\big#1{{\hbox{$\left#1\vbox to25.5\p@{}\right.\n@space$}}}
\def\Big#1{{\hbox{$\left#1\vbox to34.5\p@{}\right.\n@space$}}}
\def\bigg#1{{\hbox{$\left#1\vbox to43.5\p@{}\right.\n@space$}}}
\def\Bigg#1{{\hbox{$\left#1\vbox to52.5\p@{}\right.\n@space$}}}
%</30pt>
%    \end{macrocode}
% \subsection{The \texttt{shortform} option} \label{code:short}
% In this version, we set \verb|\normalsize| and hang all smaller
% sizes off of this.  For larger sizes, we take a simple short cut.
% We are making no attempt to optimize most of this, just to scale
% the fonts to a much smaller relative size.  
%
% Finally, because we want to change \verb|\foilhead| so that it
% doesn't force a page break, we redefine \verb|\@foilhead| in a much
% more simple manner.  This is done in \verb|\AtBeginDocument| since
% this file is read before the definitions in \texttt{foils.cls}.  (We
% also make a change to \verb|\parskip| so that paragraphs are less
% separated.)
%    \begin{macrocode}
%<*short>
\def\normalsize{\@setfontsize\normalsize\@xiipt{15}
\abovedisplayskip 12\p@ \@plus 3\p@ \@minus 4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ \@plus 2\p@
\belowdisplayshortskip 4\p@ \@plus 2\p@ \@minus 2\p@
\let\@listi\@listId}
\normalsize

\let\small\normalsize
\let\footnotesize\normalsize
\let\scriptsize=\footnotesize
\let\tiny=\footnotesize

\def\large{\@setfontsize\large\@xivpt{18}\let\@listi\@listId}
\def\Large{\@setfontsize\Large\@xviipt{22}\let\@listi\@listId}
\def\LARGE{\@setfontsize\LARGE\@xxpt{25}\let\@listi\@listId}
\def\huge{\@setfontsize\huge\@xxvpt{30}\let\@listi\@listId}
\let\Huge\huge

\AtBeginDocument{
\def\@foilhead[#1]#2{{\vspace{2em}\pagebreak[1]%
     \color@begingroup\normalcolor
     \reset@font\large\bfseries\centering#2\nopagebreak[4]%
     \par\null\color@endgroup}}%
\setlength\parskip{4\p@ \@plus 4\p@ \@minus 4\p@}
}
%</short>
%    \end{macrocode}
% \section{Compatibility mode}\label{code:compatibility}
% We include here the code for generating the compatibilty mode style
% file.   This is modelled after the \LaTeX\ \texttt{article.sty}.
%    \begin{macrocode}
%<*oldstyle>
\@obsoletefile{foils.cls}{foils.sty}
\LoadClass{foils}
%</oldstyle>
%    \end{macrocode}
% \section{Font definitions}\label{code:fonts}
% Here starts everything that sets up font information.   For almost
% everything we use a new font family.  These names are essentially
% the standard names with an \texttt{f} prefix.  We could probably get
% away with just overriding the standard ones but we don't really know
% what we're doing here and this seems to work.
% We begin with a short section that sets up the default font
% characteristics.  We absolutely need to do the family definition (and
% at this early stage) to make sure that the default \LaTeX\ stuff is not
% loaded.  (The \verb|\normalsize| declaration in the
% \verb|foil\@ptsize.clo| files think these are the \LaTeX\ defaults of
% \verb|{OT1}{cmr}{m}{n}| and these don't come in a large enough
% size!). The other lines are not strictly needed but we add them for
% completeness. 
%    \begin{macrocode}
%<*fonts>
\def\f@encoding{OT1}
\def\f@family{fcmss}
\def\f@series{m}
\def\f@shape{n}
%    \end{macrocode}
% \subsection{Font macro utilities}
% \label{code:fontmacros}
% Here we add a couple of short hand macros for declaring font shapes.
% These are blazenly borrowed from a recent \LaTeXe{} release (clever
% of those people to come up with such nice shorthand).  Note that we
% have to wrap this in some special category code changes (in a group)
% to get the parsing correct).  We have two versions of the general
% font shape definition, one for \texttt{OT1} encoding and one for the
% \texttt{T1} encoding.  We have another version for math families,
% one for substition and a special \emph{odd} one because CMR is used
% in both math and text mode (sometimes). The last conditional test
% just makes it easier to implement the EC to DC font switch.
%    \begin{macrocode}
\begingroup
\nfss@catcodes
\providecommand{\flt@family}[5]{%
  \DeclareFontShape{#1}{#2}{#3}{#4}
  {<12><14.4><17.28><20.74><24.88><29.86>
   <35.83><43.00><51.60> #5 }{}}
\providecommand{\fltodd@family}[6]{%
  \DeclareFontShape{#1}{#2}{#3}{#4}
  {<12.1><14.5><17.38> #5
   <12><14.4><17.28><20.74><24.88><29.86><35.83><43.00><51.60> #6}{}}
\providecommand{\flt@subfamily}[5]{%
  \DeclareFontShape{#1}{#2}{#3}{#4}{<->ssub * #5}{}}
\providecommand{\fltEC@family}[5]{%
  \DeclareFontShape{#1}{#2}{#3}{#4}
  {<12><14.4><17.28><20.74><24.88><29.86>
   <35.83><43.00><51.60> genb * #5}{}}
\providecommand{\fltmath@family}[6]{%
  \DeclareFontShape{#1}{#2}{#3}{#4}
  {<12.1><14.5><17.38> #5
   <20.74><24.88><29.86><35.83><43.00><51.60> #6}{}}
\if@useDCfonts
\def\EC{dc}
\def\ECrm{dcr}
\def\ECrb{dcb}
\def\ECui{dcu}
\else
\def\EC{ec}
\def\ECrm{ecrm}
\def\ECrb{ecrb}
\def\ECui{ecui}
\fi
%    \end{macrocode}
%
% \subsection{The font family and shape declarations: \texttt{OT1}}
% \label{code:fontshapeOT1} 
% Mostly we just set up only large versions of the fonts.  We had to
% do some non-obvious things here in the smaller versions.  See
% Subsection~\ref{code:mathfonts} for more information (this will
% explain the 12.1, 14.5 and 17.38 sizes below instead of the expected
% 12.0, 14.4 and 17.28).   We first load the font family and shape
% information for the standard Computer Modern text fonts.  We start
% with Roman (family \texttt{fcmr}).
%    \begin{macrocode}
\DeclareFontFamily{OT1}{fcmr}{}
%    \end{macrocode}
% First we make a shape declaration for medium/normal. Note that we are a
% bit redundant here on the smaller point sizes.
% That is so that the math sizes and the scaled text sizes can work
% together without generating too many error messages.  See also
% Subsection~\ref{code:mathfonts}.  
%    \begin{macrocode}
 \fltodd@family{OT1}{fcmr}{m}{n}   {cmr7}{cmr10}
%    \end{macrocode}
% Then we make one for medium/italics. (Slanted is handled by a
% substitution given later to the default family \texttt{fcmss}.)
%    \begin{macrocode}
 \flt@family{OT1}{fcmr}{m}{it}     {cmti10}
%    \end{macrocode}
% We really should have a small caps version of cmss, but no such font
% is default, so we leave it as is. 
%    \begin{macrocode}
 \flt@family{OT1}{fcmr}{m}{sc}     {cmcsc10}
%    \end{macrocode}
% Now, we add one for bold-extended.
%    \begin{macrocode}
 \flt@family{OT1}{fcmr}{bx}{n}     {cmbx10}
%    \end{macrocode}
% Next, we add some for bold-extended in italics and slanted.  We
% don't expect these to get called directly, but as substitution fonts
% for sans serif versions. 
%    \begin{macrocode}
 \flt@family{OT1}{fcmr}{bx}{sl}    {cmbxsl10}
%    \end{macrocode}
% As in the standard \LaTeX, we use the upright shape font,
% essentially only for the \verb|\pounds| symbol.
%    \begin{macrocode}
 \flt@family{OT1}{fcmr}{m}{ui}     {cmu10}
% Finally, we fill in a few missing gaps with substition fonts.
 \flt@subfamily{OT1}{fcmr}{m}{sl}  {fcmss/m/sl}
 \flt@subfamily{OT1}{fcmr}{b}{n}   {fcmr/bx/n}
 \flt@subfamily{OT1}{fcmr}{bx}{it} {fcmr/bx/sl}
%    \end{macrocode}
% Now we set up the essential stuff for the default family, San Serif
% (\texttt{fcmss}).   Please consult pages~201--202 of~\cite{companion}
% for more information about the use of \verb|\fontdimen| stuff here.
% Essentially, we are allowing more inter-word space stretching, to 
% compensate for the lack of hyphenation. 
%    \begin{macrocode}
\DeclareFontFamily{OT1}{fcmss}{\fontdimen3\font=1.7\fontdimen3\font}
%    \end{macrocode}
% First we make a shape declaration for medium/normal.
%    \begin{macrocode}
 \flt@family{OT1}{fcmss}{m}{n}     {cmss10}
%    \end{macrocode}
% Here is the slanted version.
%    \begin{macrocode}
 \flt@family{OT1}{fcmss}{m}{sl}    {cmssi10}
%    \end{macrocode}
% I don't know why this is here, but it is analogous to what is in the
% standard sets so we leave it in, just rescale the sizes.  This is
% semi-bold condensed (or is that demi-bold condensed?).
%    \begin{macrocode}
 \flt@family{OT1}{fcmss}{sbc}{n}   {cmssdc10}
%    \end{macrocode}
% Finally, we get to the bold versions.   There really is a bold
% extended sans serif so we point off to that.  
%    \begin{macrocode}
 \flt@family{OT1}{fcmss}{bx}{n}    {cmssbx10}
%    \end{macrocode}
% Here are all the substitution fonts.  
% Sans serif italics is not a standard font so
% we substitute roman italics.  That's OK, because we will use slanted for
% emphasize anyway and I think user's expect roman italics.
%    \begin{macrocode}
 \flt@subfamily{OT1}{fcmss}{m}{it} {fcmr/m/it}
%    \end{macrocode}
% For small-caps, we substitute the roman small caps, which is what I
% think most users will expect and because we don't really have a
% small caps, sans serif. 
%    \begin{macrocode}
 \flt@subfamily{OT1}{fcmss}{m}{sc} {fcmr/m/sc}
%    \end{macrocode}
% We again use the roman upright for the \verb|\pounds| symbol. 
%    \begin{macrocode}
 \flt@subfamily{OT1}{fcmss}{m}{ui} {fcmr/m/ui}
%    \end{macrocode}
% There is no plain bold, consequently, we substitute the bold
% extended.  Finally, if someone asks for slanted or italics in bold
% extended, since we don't have either of these we substitute the
% roman counter parts.  It seemed that if the user was in either bold
% extended (or italics) and wanted to italicize (or embolden), then
% they should see some change.  From above, the \verb|fcmr/bx/it| is
% replaced by \verb|fcmr/bx/sl| so this becomes our complete
% substitute for bold italics sans serif.  We do these latter
% substitutions with a warning, so the user knows what happens and it
% doesn't come as a complete surprise.
%    \begin{macrocode}
 \flt@subfamily{OT1}{fcmss}{b}{n}  {fcmss/bx/n}
 \flt@subfamily{OT1}{fcmss}{bx}{sl}{fcmr/bx/sl}
 \flt@subfamily{OT1}{fcmss}{bx}{it}{fcmr/bx/it}
%    \end{macrocode}
% Next we add the typewriter font (\texttt{fcmtt}).   This is short and
% sweet.  We set up for medium normal and slanted and everything else is
% a substitution. 
%    \begin{macrocode}
\DeclareFontFamily{OT1}{fcmtt}{\hyphenchar\font\m@ne}
 \flt@family{OT1}{fcmtt}{m}{n}     {cmtt10}
 \flt@family{OT1}{fcmtt}{m}{sl}    {cmsltt10}
 \flt@subfamily{OT1}{fcmtt}{m}{it} {fcmtt/m/sl}
 \flt@subfamily{OT1}{fcmtt}{bx}{n} {fcmtt/m/n}
 \flt@subfamily{OT1}{fcmtt}{bx}{it}{fcmtt/m/it}
 \flt@subfamily{OT1}{fcmtt}{bx}{sl}{fcmtt/m/sl}
%    \end{macrocode}
%
%
% \subsection{The font family and shape declarations: \texttt{T1}}
% \label{code:fontshapeT1} 
%
% Now we do the same for the EC font encoding.  This is a bit tricky
% since we want to support choices between large design sizes and
% scaled fonts and choices between EC and old DC fonts. This has not
% been extensively tested but it seems to work and is logically
% consistent with the stuff from the LaTeX distribution, up to some
% changes to be consistent with how \FoilTeX{} dealt with the old
% versions of DC fonts.  Where different, I've left \LaTeXe's model as
% a comment.  Feel free to switch if you want.  We make no additional
% comments throughout the rest of these part.
%    \begin{macrocode}
\DeclareFontFamily{T1}{fcmr}{}
 \if@magscaleECfonts
  \flt@family{T1}{fcmr}{m}{n}      {\ECrm 1000}
  \flt@family{T1}{fcmr}{m}{it}     {\EC ti1000}
  \flt@family{T1}{fcmr}{m}{sc}     {\EC cc1000}
  \flt@family{T1}{fcmr}{bx}{n}     {\EC bx1000}
  \flt@family{T1}{fcmr}{bx}{sl}    {\EC bl1000}
  \flt@family{T1}{fcmr}{m}{ui}     {\ECui 1000}
 \else
  \fltEC@family{T1}{fcmr}{m}{n}    {\ECrm}
  \fltEC@family{T1}{fcmr}{m}{it}   {\EC ti}
  \fltEC@family{T1}{fcmr}{m}{sc}   {\EC cc}
  \fltEC@family{T1}{fcmr}{bx}{n}   {\EC bx}
  \fltEC@family{T1}{fcmr}{bx}{sl}  {\EC bl}
  \fltEC@family{T1}{fcmr}{m}{ui}   {\ECui}
 \fi
 \flt@subfamily{T1}{fcmr}{m}{sl}   {fcmss/m/sl}
 %\if@magscaleECfonts
 % \flt@family{T1}{fcmr}{m}{sl}    {\EC sl1000}
 %\else
 % \fltEC@family{T1}{fcmr}{m}{sl}  {\EC sl}
 %\fi
 \flt@subfamily{T1}{fcmr}{b}{n}    {fcmr/bx/n}
 \flt@subfamily{T1}{fcmr}{bx}{it}  {fcmr/bx/sl}
\DeclareFontFamily{T1}{fcmss}{\fontdimen3\font=1.7\fontdimen3\font}
 \if@magscaleECfonts
  \flt@family{T1}{fcmss}{m}{n}     {\EC ss1000}
  \flt@family{T1}{fcmss}{m}{sl}    {\EC si1000}
  \flt@family{T1}{fcmss}{bx}{n}    {\EC sx1000}
 \else
  \fltEC@family{T1}{fcmss}{m}{n}   {\EC ss}
  \fltEC@family{T1}{fcmss}{m}{sl}  {\EC si}
  \fltEC@family{T1}{fcmss}{bx}{n}  {\EC sx}
 \fi
 \flt@family{T1}{fcmss}{sbc}{n}    {\EC ssdc10}
 \flt@subfamily{T1}{fcmss}{m}{it}  {fcmr/m/it}
 %\if@magscaleECfonts
 % \flt@family{T1}{fcmss}{m}{it}   {\EC si1000}
 %\else
 % \fltEC@family{T1}{fcmss}{m}{it} {\EC si}
 %\fi
 \flt@subfamily{T1}{fcmss}{m}{sc}  {fcmr/m/sc}
 \flt@subfamily{T1}{fcmss}{m}{ui}  {fcmr/m/ui}
 \flt@subfamily{T1}{fcmss}{b}{n}   {fcmss/bx/n}
 \flt@subfamily{T1}{fcmss}{bx}{it} {fcmr/bx/it}
 %\if@magscaleECfonts
 % \flt@family{T1}{fcmss}{bx}{it}  {\EC so1000}
 %\else
 % \fltEC@family{T1}{fcmss}{bx}{it}{\EC so}
 %\fi
 \flt@subfamily{T1}{fcmss}{bx}{sl} {fcmr/bx/sl}
 %\if@magscaleECfonts
 % \flt@family{T1}{fcmss}{bx}{sl}  {\EC so1000}
 %\else
 % \fltEC@family{T1}{fcmss}{bx}{sl}{\EC so}
 %\fi
\DeclareFontFamily{T1}{fcmtt}{\hyphenchar\font\m@ne}
 \if@magscaleECfonts
  \flt@family{T1}{fcmtt}{m}{n}     {\EC tt1000}
  \flt@family{T1}{fcmtt}{m}{sl}    {\EC st1000}
 \else
  \fltEC@family{T1}{fcmtt}{m}{n}   {\EC tt}
  \fltEC@family{T1}{fcmtt}{m}{sl}  {\EC st}
 \fi
 \flt@subfamily{T1}{fcmtt}{m}{it}  {fcmtt/m/sl}
 %\if@magscaleECfonts
 % \flt@family{T1}{fcmtt}{m}{it}   {\EC it1000}
 %\else
 % \fltEC@family{T1}{fcmtt}{m}{it} {\EC it}
 %\fi
 \flt@subfamily{T1}{fcmtt}{bx}{n}  {fcmtt/m/n}
 \flt@subfamily{T1}{fcmtt}{bx}{it} {fcmtt/m/it}
 \flt@subfamily{T1}{fcmtt}{bx}{sl} {fcmtt/m/sl}
% %%%%%% DO WE NEED TO DO THE TS1 COMPANION FONTS???? %%%%%%%%%%%%%
%    \end{macrocode}
% \subsection{The font family and shape declarations: \texttt{OM*}}
% \label{code:fontshapeOM*} 
% Of course, we still haven't dealt directly with any of the math fonts.
% We start with math italics.  Note again the strange point sizes in the
% smaller fonts. 
%    \begin{macrocode}
\DeclareFontFamily{OML}{fcmm}{\skewchar\font'177}
 \fltmath@family{OML}{fcmm}{m}{it} {cmmi7}{cmmi10}
 \fltmath@family{OML}{fcmm}{b}{it} {cmmib7}{cmmib10}
 \flt@subfamily{OML}{fcmm}{bx}{it} {fcmm/b/it}
%    \end{macrocode}
% Next we add the standard symbol fonts in normal and bold.
%    \begin{macrocode}
\DeclareFontFamily{OMS}{fcmsy}{\skewchar\font'60}
 \fltmath@family{OMS}{fcmsy}{m}{n} {cmsy7}{cmsy10}
 \fltmath@family{OMS}{fcmsy}{b}{n} {cmbsy7}{cmbsy10}
 \flt@subfamily{OMS}{fcmsy}{bx}{n} {fcmsy/b/n}
%    \end{macrocode}
% The December 1994 release added stuff for cmr math symbols, so we
% have to do the same here to avoid warning messages.  We add a few
% more than what is in the standard \LaTeX\ because we don't like these
% warning messages.
%    \begin{macrocode}
\DeclareFontFamily{OML}{fcmss}{\skewchar\font'177}
 \flt@subfamily{OML}{fcmss}{m}{n}  {fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{m}{it} {fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{m}{sl} {fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{m}{sc} {fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{bx}{n} {fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{b}{n}  {fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{bx}{sl}{fcmm/m/it}
 \flt@subfamily{OML}{fcmss}{bx}{it}{fcmm/m/it}
\DeclareFontFamily{OMS}{fcmss}{\skewchar\font'60}
 \flt@subfamily{OMS}{fcmss}{m}{n}  {fcmsy/m/n}
 \flt@subfamily{OMS}{fcmss}{m}{it} {fcmsy/m/n}
 \flt@subfamily{OMS}{fcmss}{m}{sl} {fcmsy/m/n}
 \flt@subfamily{OMS}{fcmss}{m}{sc} {fcmsy/m/n}
 \flt@subfamily{OMS}{fcmss}{bx}{n} {fcmsy/b/n}
 \flt@subfamily{OMS}{fcmss}{b}{n}  {fcmsy/b/n}
 \flt@subfamily{OMS}{fcmss}{bx}{sl}{fcmsy/b/n}
 \flt@subfamily{OMS}{fcmss}{bx}{it}{fcmsy/b/n}
\DeclareFontFamily{OML}{fcmr}{\skewchar\font'177}
 \flt@subfamily{OML}{fcmr}{m}{n}   {fcmm/m/it}
\DeclareFontFamily{OML}{fcmtt}{\skewchar\font'177}
 \flt@subfamily{OML}{fcmtt}{m}{n}  {fcmm/m/it}
\DeclareFontFamily{OMS}{fcmr}{\skewchar\font'60}
 \flt@subfamily{OMS}{fcmr}{m}{n}   {fcmsy/m/n}
\DeclareFontFamily{OMS}{fcmtt}{\skewchar\font'60}
 \flt@subfamily{OMS}{fcmtt}{m}{n}  {fcmsy/m/n}
%    \end{macrocode}
% Don't forget the extended symbol font for delimiters and the like.
%    \begin{macrocode}
\DeclareFontFamily{OMX}{fcmex}{}{}
 \fltmath@family{OMX}{fcmex}{m}{n} {cmex7}{cmex10}
%    \end{macrocode}
% We were going to add one for a new \FoilTeX-\LaTeX\ symbol font
% (\texttt{flasy}) but decided that was a bit much.  Instead, we just
% set up the \texttt{lasy} font family and modify its parameters here.
% In this way, if the user specifies \verb|\usepackage{latexsym}| the default
% Ulasy.fd is \emph{not} loaded and the sizes don't get overrun.  Also,
% we avoid having to expressly define all the required symbols.  We do
% define a symbol font (\texttt{flasy}) however so we can use it for
% the closing box at the end of proofs.
%    \begin{macrocode}
\DeclareFontFamily{U}{lasy}{}
 \fltmath@family{U}{lasy}{m}{n}    {lasy7}{lasy10}
 \flt@family{U}{lasy}{b}{n}        {lasyb10}
\endgroup  % end of nfss@catcodes group
\DeclareSymbolFont{flasy}{U}{lasy}{m}{n}
%    \end{macrocode}
% \subsection{The font selection mechanisms} \label{code:fontsel}
% We've got all the font family and shape declaration tables set up.
% Now we configure the font selection mechanism for \FoilTeX.  First we
% define the defaults.
%    \begin{macrocode}
\def\rmdefault{fcmr}
\def\sfdefault{fcmss}
\def\ttdefault{fcmtt}
\def\itdefault{it}
\def\sldefault{sl}
\def\bfdefault{bx}
%    \end{macrocode}
% This next definition finally sets up the sans serif as the default
% family. 
%    \begin{macrocode}
\renewcommand\familydefault{\sfdefault}
%    \end{macrocode}
% Next we set up the old font changing commands and the ones used in
% math (except small caps and slanted which are prohibited in math). 
% Notice here that (in contrast to \SliTeX) the \verb|\rm| is still
% roman!  Also, we replace the \verb|\em| declaration so that it
% switches between the upright shape and the \textsl{slanted} shape.
%    \begin{macrocode}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} 
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} 
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} 
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} 
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} 
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} 
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} 
\DeclareRobustCommand\em{\@nomath\em \ifdim \fontdimen\@ne\font >\z@
     \upshape \else \slshape \fi}
%    \end{macrocode}
% \subsection{Math and symbol fonts}\label{code:mathfonts}
% We need to replace all the standard symbol, operator, letter and large
% symbol fonts with our new font families as declared above in
% Subsection~\ref{code:fontshapeOM*}.   We do this for both normal and
% bold equations. 
%    \begin{macrocode}
\SetSymbolFont{operators}{normal}{OT1}{fcmr}{m}{n}
\SetSymbolFont{letters}{normal}{OML}{fcmm}{m}{it}
\SetSymbolFont{symbols}{normal}{OMS}{fcmsy}{m}{n}
\SetSymbolFont{largesymbols}{normal}{OMX}{fcmex}{m}{n}
\SetSymbolFont{operators}{bold}{OT1}{fcmr}{bx}{n}
\SetSymbolFont{letters}{bold}{OML}{fcmm}{b}{it}
\SetSymbolFont{symbols}{bold}{OMS}{fcmsy}{b}{n}
\SetSymbolFont{largesymbols}{bold}{OMX}{fcmex}{m}{n}
%    \end{macrocode}
% We also need to set up the math alphabets for the font change commands
% and declarations in math mode.  Note that we expressly set the math
% fonts to roman unless expressly asked for with \verb|\mathsf| or
% \verb|\mathtt|.  All the others (\verb|\mathbf| and \verb|\mathit|,
% along with \verb|\mathrm|) yield the roman (serif) counterpart.  This is
% in constrast to what we do in text. 
%    \begin{macrocode}
\DeclareMathAlphabet{\mathrm}{OT1}{fcmr}{m}{n}
\DeclareMathAlphabet{\mathbf}{OT1}{fcmr}{bx}{n}
\DeclareMathAlphabet{\mathsf}{OT1}{fcmss}{m}{n}
\DeclareMathAlphabet{\mathit}{OT1}{fcmr}{m}{it}
\DeclareMathAlphabet{\mathtt}{OT1}{fcmtt}{m}{n}
%    \end{macrocode}
% Here are a few commands for caligraphic and math italics fonts: 
%    \begin{macrocode}
\DeclareRobustCommand*\cal{\@fontswitch{\relax}{\mathcal}}
\DeclareRobustCommand*\mit{\@fontswitch{\relax}{\mathnormal}}
%    \end{macrocode}
% Now we get to the nub of the subtle issue of font point sizes.  The
% natural thing to want to do (and was easy to do in OFSS) was the
% following.  First determine the font (with natural point size) you want,
% determine mag-scaling needed to get this to the approximate point size
% desired and hard-code this as exactly equal.   So, we could say that 
% a 12pt version of a 7pt font was just scaled by magstep~3.  This was
% in spite of the fact that this was more likely to be a 12.1pt font. 
% In NFSS, the desired point size and the design size are used to
% compute the scaling desired so a declaration like 12pt scaling of 7pt
% font would require a non-standard magnification (and so drivers would
% either have to generate a whole new library of fonts, or scale
% existing fonts or \LaTeX\ would have to scream out error messages
% about font substitutions.   
% 
% This could be avoided if we simply used scaled versions of just 10pt
% fonts, but we found in the earlier \FoilTeX\ that it looked much
% better in math mode to try to maintain as much of the relative scaling
% of fonts as was in Knuth's original design, namely 10pt (design-size)
% font should have a 7pt (design-size) exponent and 5pt super-exponent.
% In \FoilTeX, we compromise a little on this and try to force (as can
% be seen from the font shape declarations above) scaled versions of 7pt
% fonts for exponents and smaller scaled versions of 7pt for
% super-exponents.  But of course, this means that the math size for
% this needs to reflect this as much as possible (hence the 12.1pt
% version of 7pt fonts).   On the other hand, some text fonts that also
% play a role in math mode (like roman) need to have their corresponding
% 12pt text versions (in \verb|\tiny|, for example).  That's why some of
% these fonts have size information for 12.1pt (cmr7) and 12pt (cmr10). 
% 
% Consequently, we declare some tokens for the small math sizes as 12.1,
% 14.5 and 17.38 and then set the math sizes for the various point
% sizes.  We also stick to the principle that no font should be smaller
% than 12pt so this limits what we can do in exponents and the like. 
% We add one for really big fonts but only if we are not running in
% compatibility mode.  Somewhere at sometime I wanted these really big
% stuff and so here it is now.
%    \begin{macrocode}
\newcommand\@xii@ipt{12.1}
\newcommand\@xiv@vpt{14.5}
\newcommand\@xvii@iiipt{17.38}
\newcommand\@xxxpt{29.86}
\newcommand\@xxxvipt{35.83}
\newcommand\@xliiipt{43}
\newcommand\@lipt{51.60}
\DeclareMathSizes{\@xiipt}{\@xii@ipt}{\@xii@ipt}{\@xii@ipt}
\DeclareMathSizes{\@xivpt}{\@xiv@vpt}{\@xii@ipt}{\@xii@ipt}
\DeclareMathSizes{\@xviipt}{\@xvii@iiipt}{\@xii@ipt}{\@xii@ipt}
\DeclareMathSizes{\@xxpt}{\@xxpt}{\@xiv@vpt}{\@xii@ipt}
\DeclareMathSizes{\@xxvpt}{\@xxvpt}{\@xvii@iiipt}{\@xiv@vpt}
\DeclareMathSizes{\@xxxpt}{\@xxxpt}{\@xxpt}{\@xvii@iiipt}
\DeclareMathSizes{\@xxxvipt}{\@xxxvipt}{\@xxvpt}{\@xxpt}
\DeclareMathSizes{\@xliiipt}{\@xliiipt}{\@xxxpt}{\@xxvpt}
\if@compatibility\else
  \DeclareMathSizes{\@lipt}{\@lipt}{\@xxxvipt}{\@xxxpt}
\fi
%    \end{macrocode}
% Finally, we have to deal with the picture environment fonts (circle
% and line).  These seem to be broken no matter what I do.  I liked the
% fatter lines that I got with the magscaled versions in the old
% \FoilTeX, but it seemed to be very hard to convert user's pictures
% from \LaTeX\ to \FoilTeX.  So, in the new version we don't scale and
% in compatibility mode, we do scale.   In either case, it's easy to
% generate pictures that just don't work!  
%    \begin{macrocode}
\if@compatibility   
  \font\tencirc=lcircle10 scaled \magstep4 
  \font\tencircw=lcirclew10 scaled \magstep4
  \font\tenln=line10 scaled \magstep4
  \font\tenlnw=linew10 scaled \magstep4
\else 
  \font\tencirc=lcircle10
  \font\tencircw=lcirclew10
  \font\tenln=line10
  \font\tenlnw=linew10
\fi
%</fonts>
%    \end{macrocode}
%
%
% \Finale  
%
\endinput
%%%%% A template for option file inclusion %%%%%%%%%%%%%%%
%    \begin{macrocode}
%<*option>
%</option>
%    \end{macrocode}