1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
|
%%% amshelp.tex
%%% This is an AMS-LaTeX file
%%% Copyright (c) 1992, 2000, 2008, 2009, 2011, 2013 Philip S. Hirschhorn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%%% Philip Hirschhorn
%%% Department of Mathematics
%%% Wellesley College
%%% Wellesley, MA 02481
%%% psh@math.mit.edu
%%% psh@poincare.wellesley.edu
%%% This is an attempt to explain how to get up and running with
%%% AmS-LaTeX for someone having some familiarity with TeX,
%%% AMS-TeX, or LaTeX.
\newcommand{\filedate}{January 28, 2013}
%\newcommand{\filedate}{\today}
\newcommand{\fileversion}{Version 2.3}
%---------------------------------------------------------------------
%\documentclass[12pt]{amsart}
\documentclass{amsart}
\usepackage{url}
%\usepackage[pdfborderstyle={/S/U/W 1},hyperfootnotes=false]{hyperref}
%\usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref}
%\usepackage[colorlinks,pdfborder={0 0 0}]{hyperref}
\usepackage[colorlinks]{hyperref}
%\usepackage{hyperref}
% In case we're not using hyperref.sty:
\providecommand{\texorpdfstring}[2]{#1}
% The following can safely be used in \section commands
% without causing pdf warnings:
\newcommand{\bs}{\texorpdfstring{\char`\\}{}}
% We have to load amsrefs *after* hyperref. (Most packages must
% be loaded before hyperref; amsrefs is an exception to that.)
% We have to load amsrefs *before* loading Xy-pic, or else the
% \newcommand{\cir}{\textasciicircum} in textcmds.sty will complain.
% We can also use the optional argument ``lite'', as in
% \usepackage[lite]{amsrefs}, to avoid the problem by suppressing
% the reading of textcmds.sty
\usepackage[lite]{amsrefs}
\usepackage[all,cmtip]{xy}
\let\objectstyle=\displaystyle
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\numberwithin{equation}{section}
% Theorem environments
\theoremstyle{plain} %% This is the default, anyway
\newtheorem{thm}[equation]{Theorem}
\newtheorem{cor}[equation]{Corollary}
\newtheorem{lem}[equation]{Lemma}
\newtheorem{prop}[equation]{Proposition}
\theoremstyle{definition}
\newtheorem{defn}[equation]{Definition}
\theoremstyle{remark}
\newtheorem{rem}[equation]{Remark}
\newtheorem{ex}[equation]{Example}
\newtheorem{notation}[equation]{Notation}
\newtheorem{terminology}[equation]{Terminology}
%---------------------------------------------------------------------
%---------------------------------------------------------------------
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\begin{document}
\title[Running \AmS-\LaTeX]{Getting up and running\\
with \AmS-\LaTeX}
\author{Philip S. Hirschhorn}
\address{Department of Mathematics\\
Wellesley College\\
Wellesley, Massachusetts 02481}
\email{psh@math.mit.edu}
\date{\filedate, \fileversion}
\begin{abstract}
Together with the template file \texttt{template.tex}, these notes
are an attempt to tell you enough about \LaTeX{} and \AmS-\LaTeX{}
so that you can get started without having to read the book.
\end{abstract}
\maketitle
\tableofcontents
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Introduction}
This is an attempt to get you up and running with \AmS-\LaTeX{} as
quickly as possible. These instructions (along with the template file
\texttt{template.tex}) won't be a substitute for the full
documentation, but they'll give you enough to get started quickly and
only occasionally have to refer to the main documentation.
The current version of \AmS-\LaTeX{} (version 2.2) is a collection of
document classes and optional packages for the current version of
standard \LaTeX. \AmS-\LaTeX{} provides the document classes
\texttt{amsart}, \texttt{amsproc}, and \texttt{amsbook} (see
section~\ref{sec:DocClsCom}) to replace the standard document classes
\texttt{article}, \texttt{proc}, and \texttt{book}, and several
optional packages (mainly \texttt{amsmath}) that can be used with the
standard \LaTeX{} document classes. Thus, using \AmS-\LaTeX{} is
really using a variety of \LaTeX. If you're new to \LaTeX{}, and
these last few sentences made no sense to you at all, don't worry
about it. You don't have to know what the standard \LaTeX{} document
classes are in order to use the \AmS-\LaTeX{} replacements for them.
I'll be assuming that you have at least some experience with either
plain \TeX, \AmS-\TeX{} or \LaTeX, and I'll try to tell you what you
need to know so that you can get started with \AmS-\LaTeX{}
\emph{without} actually reading the \LaTeX{} user's
guide~\cite{latex}, or even taking much of a look at the \AmS-\LaTeX{}
user's guide~\cite{amslatexusersguide} or the short math guide for
\LaTeX~\cite{mathguide}.
If you've never used \emph{any} version of \TeX{} or \LaTeX, then I
recommend ``The not so short introduction to \LaTeXe{}'' by Tobias
Oetiker, Hubert Partl, Irene Hyna, and Elisabeth Schlegl
\cite{NotShort}. This is intended for those with no knowledge of
\TeX{} or \LaTeX, and concisely gives a description of what a \LaTeX{}
document looks like and how you type text and simple mathematics in a
\LaTeX{} document.
These instructions come with a template file \verb"template.tex",
which is an attempt to give you enough to fake your way through an
\AmS-\LaTeX{} file \emph{almost} without even reading these
instructions. I've included the text of that file in these
instructions as section~\ref{sec:template}, so you might want to take
a look at that now, and then just use the table of contents of these
instructions to find more information on whatever in that file
confuses you.
In case you haven't guessed, these instructions were printed using the
\texttt{amsart} document class of \AmS-\LaTeX, so you can get some
idea what it all looks like.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Basic \LaTeX{} stuff}
\label{sec:basicstuff}
In this section, we'll describe the three commands that must appear in
every \LaTeX{} document: \verb"\documentclass",
\verb"\begin{document}", and \verb"\end{document}". The complete
explanation of these can be found in the \LaTeX{} User's
Guide~\cite{latex} or in \emph{The not so short introduction to
\LaTeXe}~\cite{NotShort}. We'll also explain how to begin a new
section or subsection of the paper, and how \LaTeX{} manages to get
the cross-references right (which is also the explanation of why you
need to run a file through \LaTeX{} \emph{twice} to be sure that all
the cross-references are correct).
%--------------------------------------------------------------------
\subsection{The \texttt{\bs documentclass} command}
\label{sec:DocClsCom}
Before you type anything that actually appears in the paper, you must
include a \verb"\documentclass" command. It's easiest to just put the
\verb"\documentclass" command at the very beginning of the file,
possibly with a few lines of comments before it.
It's the choice of document class that determines whether you're using
\AmS-\LaTeX{} or just plain old \LaTeX. \AmS-\LaTeX{} provides the
document classes \texttt{amsart}, \texttt{amsproc}, and
\texttt{amsbook} as replacements for the standard \LaTeX{} document
classes \texttt{article}, \texttt{proc}, and \texttt{book}. If for
some reason you prefer to use the standard \LaTeX{} classes
\texttt{article}, \texttt{proc}, or \texttt{book}, you can still get
many of the features of \AmS-\LaTeX{} by including the command
\verb"\usepackage{amsmath}" after your \verb"\documentclass" command.
I'll only be discussing the \texttt{amsart} document class here. For
the others, see the \AmS-\LaTeX{} User's
Guide~\cite{amslatexusersguide}.
The simplest version of the \texttt{\bs documentclass} command is
\begin{center}
\verb"\documentclass{amsart}"
\end{center}
This will give you the default type size, which is 10~point type. If
you'd like to use 12~point type, then you should include the optional
argument \verb"[12pt]"; this makes the command
\begin{center}
\verb"\documentclass[12pt]{amsart}"
\end{center}
%--------------------------------------------------------------------
\subsection{Loading optional packages}
\label{sec:optpack}
There are at least three optional packages that are of interest. The
first is the \texttt{amsrefs} package, which makes it much easier to
create a bibliography (see section~\ref{sec:amsrefs}). To load the
\texttt{amsrefs} package, you put the line
\begin{center}
\verb"\usepackage[lite]{amsrefs}"
\end{center}
after the \verb"\documentclass" command. (For an explanation of why
we recommend using the optional argument \texttt{lite}, see
section~\ref{sec:refoptions}.)
Another important package is for when you want to use some of the
special symbols contained in the \AmS-Fonts package. These are
listed, along with all of the standard \LaTeX{} symbols, in
\texttt{symbols.pdf}, available at
\begin{center}
\url{http://www.ctan.org/tex-archive/info/symbols/math/symbols.pdf}
\end{center}
If you want the standard names for these symbols to be defined for
your use, then you need to use the optional package \texttt{amssymb}.
Thus, to use the default 10~point type, use \texttt{amsrefs} to create
a bibliography, and have the special symbols defined, use the commands
\begin{center}
\begin{tabular}{l}
\verb"\documentclass{amsart}"\\
\verb"\usepackage[lite]{amsrefs}"\\
\verb"\usepackage{amssymb}"
\end{tabular}
\end{center}
Another widely used optional package is \Xy-pic, which enables you to
draw commutative diagrams as part of your \LaTeX{} file rather than
creating them with a graphics package and importing the graphics.
(For commutative diagrams, see section~\ref{sec:xypic}). To use
\Xy-pic, you should include the commands
\begin{center}
\begin{tabular}{l}
\verb"\usepackage[all,cmtip]{xy}"\\
\verb"\let\objectstyle=\displaystyle"
\end{tabular}
\end{center}
That loads the \Xy-pic package and sets it so that the arrowheads used
are the same ones used in the rest of the document and the nodes in
the diagram are, by default, in \verb"\displaystyle". If you'd like
the default style for the nodes to be \verb"\textstyle", you should
omit the second of those two lines.
This document uses all of those packages, and so we used the commands
\begin{center}
\begin{tabular}{l}
\verb"\documentclass{amsart}"\\
\verb"\usepackage[lite]{amsrefs}"\\
\verb"\usepackage{amssymb}"\\
\verb"\usepackage[all,cmtip]{xy}"\\
\verb"\let\objectstyle=\displaystyle"
\end{tabular}
\end{center}
%---------------------------------------------------------------------
\subsection{\texttt{\bs begin\{document\}} and \texttt{\bs end\{document\}}}
Everything that is to appear in the document must appear in between
the \verb"\begin{document}" and \verb"\end{document}" commands. There
are no optional arguments for these commands, so they always look the
same. Anything following the \verb"\end{document}" command is
ignored. In addition to \verb"\usepackage" commands (see
section~\ref{sec:optpack}), you are allowed to have macro definitions
(i.e., newcommands; see section~\ref{sec:definitions}) before the
\verb"\begin{document}", and that's actually a good place for them,
but that's about all.
%---------------------------------------------------------------------
\subsection{Sections and subsections}
\label{sec:sections}
To begin a new section, you give the command
\begin{center}
\verb"\section{Section name}"
\end{center}
To begin the present section, I gave the command
\begin{center}
\verb"\section{Basic \LaTeX{} stuff}"
\end{center}
A section number is supplied automatically. If you want to be able to
make reference to that section, then you need to \emph{label} it.
Since I wanted to be able to demonstrate the cross-reference commands,
I actually began this section with the lines
\begin{center}
\begin{tabular}{l}
\verb"\section{Basic \LaTeX{} stuff}"\\
\verb"\label{sec:basicstuff}"
\end{tabular}
\end{center}
This allows me to type ``\verb"section~\ref{sec:basicstuff}"'' and
have it printed as ``section~\ref{sec:basicstuff}''.
To begin a new subsection, you give the command
\begin{center}
\verb"\subsection{Subsection name}"
\end{center}
To begin the present subsection, I gave the command
\begin{center}
\verb"\subsection{Sections and subsections}"
\end{center}
A subsection number is supplied automatically. If you want to be able
to make reference to that subsection, then you need to \emph{label}
it. This subsection was begun with the lines
\begin{center}
\begin{tabular}{l}
\verb"\subsection{Sections and subsections}"\\
\verb"\label{sec:sections}"
\end{tabular}
\end{center}
so if we type ``\verb"section~\ref{sec:sections}",'' it is printed as
``section~\ref{sec:sections}''.
Labels always take the number of the smallest enclosing structure.
Thus, a \verb"\label" command that's inside a section but \emph{not}
inside a subsection or Theorem or anything else will take the value of
the section counter, while a \verb"\label" command that's inside the
statement of a Theorem will take the value of that Theorem number.
For more information on this, see section~\ref{sec:xreferences}.
%--------------------------------------------------------------------
\subsubsection{Yes, there are subsubsections too}
I began this subsubsection with the command
\begin{center}
\verb"\subsubsection{Yes, there are subsubsections too}"
\end{center}
%--------------------------------------------------------------------
\subsubsection*{Sections without numbers}
I began this subsubsection with the command
\begin{center}
\verb"\subsubsection*{Sections without numbers}"
\end{center}
and got a subsubsection that wasn't numbered. If you give the command
\begin{center}
\verb"\section*{A Section Title}"
\end{center}
then you'll begin a new section that will not have a number.
%---------------------------------------------------------------------
\subsection{Italics \emph{for emphasis}}
If you want to use italics to emphasize a word or two, the \LaTeX{}
convention is not to explicitly switch to italics, but rather to use
the command \verb"\emph" (which means \emph{emphasize}). This command
works just like a font change command, except that it switches you
\emph{into} italics if the current font is upright and switches you
\emph{out of} italics if the current font is italics.
For example, if you type
\begin{center}
\verb"The whole is \emph{more} than the sum of its parts."
\end{center}
you'll get
\begin{center}
The whole is \emph{more} than the sum of its parts.
\end{center}
but if you type
\begin{verbatim}
\begin{thm}
The whole is \emph{more} than the sum of its parts.
\end{thm}
\end{verbatim}
you'll get
\begin{thm}
The whole is \emph{more} than the sum of its parts.
\end{thm}
\subsubsection*{Note}
The \verb"\emph" command is a recent addition to \LaTeX, and it has
the feature that it automatically inserts an italic correction where
needed. If you don't know what an italic correction is, you can
safely ignore this paragraph, but I will at least mention that all
those ``\verb"\/"'' commands frequently seen in \TeX{} (and older
\LaTeX) documents are all inserting italic corrections; the point of
this paragraph is that, with the current version of \LaTeX, you don't
have to do that anymore.
%---------------------------------------------------------------------
\subsection{Cross references and the table of contents}
This is an explanation of how \LaTeX{} manages to fill in
cross-references (see section~\ref{sec:xreferences}) to parts of the
file it hasn't processed yet, and what those \verb".aux" and
\verb".toc" files are.
%--------------------------------------------------------------------
\subsubsection*{Cross-References}
Every time \LaTeX{} processes your file, it writes an \emph{auxiliary}
file. Since the file containing these instructions is called
\verb"amshelp.tex", the auxiliary file is called \verb"amshelp.aux".
The auxiliary file contains the definitions of all the keys used for
cross-references. When \LaTeX{} begins to process your file, it first
looks for an \verb".aux" file, and reads it in if it exists. Of
course, this is the \verb".aux" file that was produced the \emph{last}
time that your file was processed, so the Theorem numbers, Section
numbers, etc., are all the ones from the last time the file was
processed.
The very first time that \LaTeX{} processes your file, there is no
\verb".aux" file, and so \LaTeX{} gives \emph{lots} of warning
messages about undefined labels, or whatever. Ignore all of this.
The \emph{next} time that you run \LaTeX, there \emph{will} be an
\verb".aux" file, and all the references will be filled in. (Yes, it
is possible, at least in theory, for some page number to change every
time you run \LaTeX{} on your file, even without any changes in the
source file, but this isn't very likely.)
\subsubsection*{The Table of Contents}
If you give the command \verb"\tableofcontents", then \LaTeX{} will
try to write a table of contents at that point, including the page
numbers of the sections. Obviously, \LaTeX{} can't know those page
numbers or section titles yet, so as \LaTeX{} processes your file, it
writes a \verb".toc" file containing the information it needs. (The
\verb".toc" file for these instructions is \verb"amshelp.toc".) Once
again, \LaTeX{} is always using the information from the \emph{last}
time that it processed your file.
If you \emph{do} include a table of contents in your document, and if
the table of contents takes up at least a page or so of space, then
you might have to run \LaTeX{} \emph{three} times in order to get all
of the cross-references right. The reason for this is that the first
time you run \LaTeX{} there isn't any \verb".toc" file listing the
section titles, and so the table of contents has nothing in it. The
second time you run \LaTeX{} you'll get a table of contents that lists
the page numbers for the sections from the last time you ran \LaTeX,
when the table of contents took up no space at all. Unfortunately,
during this second run, the table of contents will be created, and
will take up enough space to change the page numbers of the sections
from what they were during the first run. Only during the
\emph{third} run will the correct page numbers be written into the
table of contents. Since this doesn't change the amount of space that
the table of contents occupies, this version will be correct.
\subsubsection*{How do I know when everything is correct?}
After processing your file, \LaTeX{} checks whether all the
cross-reference numbers that it read from the \verb".aux" file are
correct. If any of them are incorrect, it prints a warning on the
screen at the very end of the run advising you that labels may have
changed and that you should run \LaTeX{} again to get the
cross-references right. Unfortunately, \LaTeX{} doesn't seem to check
that the table of contents entries are correct, so if you change the
name of a section in a way that doesn't make any page references
incorrect, you won't be warned to run \LaTeX{} again.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Title, Author, and the \texttt{\bs maketitle} command}
This stuff should go right after the \verb"\begin{document}" command.
I'll give a quick sketch here, which is probably all you'll ever
need, but the full explanation is given in \emph{Instructions for
preparation of papers and monographs: \AmS-\LaTeX} \cite{instr-l}.
If you are already familiar with \LaTeX, then you should be warned
that this part is slightly different from what you do when using the
standard \LaTeX{} \verb"article" document class.
%---------------------------------------------------------------------
\subsection{The title}
You specify the title with the command
\begin{center}
\verb"\title[Optional running title]{Actual title}"
\end{center}
These instructions used the title command
\begin{verbatim}
\title[Running \AmS-\LaTeX]{Getting up and running\\
with \AmS-\LaTeX}
\end{verbatim}
Notice that you indicate line breaks in the title with a double
backslash. If I had decided to omit the line break and also to have
the full title printed in the head of the odd numbered pages, I would
have used the command
\begin{center}
\verb"\title{Getting up and running with \AmS-\LaTeX}"
\end{center}
%---------------------------------------------------------------------
\subsection{The author, and the author's address}
The author is specified with an \verb"author" command:
\begin{center}
\verb"\author{Author's name}"
\end{center}
These directions used the command
\verb"\author{Philip S. Hirschhorn}".
The author's address is given in an address command, with double
backslashes to indicate line breaks. These instructions used the
command
\begin{center}
\begin{tabular}{l}
\verb"\address{Department of Mathematics\\"\\
\verb"Wellesley College\\"\\
\verb"Wellesley, Massachusetts 02481}"
\end{tabular}
\end{center}
If the author's current address is different from the address at which
the research was carried out, then you can specify the current address
with the command \verb"\curraddr". For example, you might type
\begin{center}
\begin{tabular}{l}
\verb"\curraddr{Department of Mechanics\\"\\
\verb"Brake and Wheel Bearing Division\\"\\
\verb"Serene Service Center\\"\\
\verb"Salem, Massachusetts 02139}"
\end{tabular}
\end{center}
You can also include an email address, with the \verb"\email"
command. These instructions used the command
\begin{center}
\verb"\email{psh@math.mit.edu}"
\end{center}
To acknowledge support, use the command \verb"\thanks", e.g.,
\begin{center}
\verb"\thanks{Supported in part by NSF grant 3.14159}"
\end{center}
This will be printed as a footnote on the first page.
%--------------------------------------------------------------------
\subsubsection*{Multiple authors}
If there are several authors, then each one should have a separate
\verb"\author" command, with each individual's address, current
address, email address, and thanks following that individual's
\verb"\author" command, in its own \verb"\address" command (and
\verb"\curraddr" command, and \verb"\thanks" command, and
\verb"\email" command). If there \emph{are} several authors, and
their combined names are too long for the running head on the even
numbered pages, you can give an optional argument to each
\verb"\author" command to supply a shortened form to use in the
running head, as in
\begin{center}
\verb"\author[P.S. Hirschhorn]{Philip S. Hirschhorn}".
\end{center}
(It's apparently a convention that the running head in a multiple
author paper should have only initials for the first and middle names,
but I don't think that I was invited to that convention.)
%---------------------------------------------------------------------
\subsection{The date}
This is pretty straightforward:
\begin{center}
\verb"\date{Whatever date you please}"
\end{center}
To have the date of processing used, use the command
\verb"\date{\today}".
%---------------------------------------------------------------------
\subsection{\texttt{\bs maketitle}}
After you've given all of the commands mentioned in this section, you
can give the command \verb"\maketitle". If you \emph{don't} give the
command \verb"\maketitle", a title won't be made. The exact
arrangement of all this information is determined by the document
class. In particular, the \verb"amsart" document class puts the
author's address at the \emph{end} of the paper.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Theorems, Propositions, Lemmas, etc.}
The instructions in this section assume that you're using the
\verb"\newtheorem" commands that I put in the file \verb"template.tex"
(see section~\ref{sec:template}).
%--------------------------------------------------------------------
\subsection{Stating theorems, propositions, etc.}
\label{sec:theorems}
To state a theorem, you do the following:
\begin{verbatim}
\begin{thm}
The square of the hypotenuse of a right triangle is equal to the
sum of the squares of the two adjacent sides.
\end{thm}
\end{verbatim}
If you do that, you'll get the following:
\begin{thm}
\label{pythagthm}
The square of the hypotenuse of a right triangle is equal to the sum
of the squares of the two adjacent sides.
\end{thm}
If you thought that it was only a proposition, you'd use
\begin{verbatim}
\begin{prop}
The square of the hypotenuse of a right triangle is equal to the
sum of the squares of the two adjacent sides.
\end{prop}
\end{verbatim}
and you'd get
\begin{prop}
The square of the hypotenuse of a right triangle is equal to the sum
of the squares of the two adjacent sides.
\end{prop}
If you think it's a theorem again, but you'd like to make reference to
it in some other part of the paper, you have to choose a \emph{key}
with which you'll refer to it, and then \emph{label} the theorem. If
you want to use the key \emph{pythagthm}, then it would look like the
following:
\begin{verbatim}
\begin{thm}
\label{pythagthm}
The square of the hypotenuse of a right triangle is equal to the
sum of the squares of the two adjacent sides.
\end{thm}
\end{verbatim}
If you later give the command \verb"\ref{pythagthm}", then that
command will expand to the \emph{number} that was assigned to that
theorem (in this case, \ref{pythagthm}). For more explanation of
cross-references, see section~\ref{sec:xreferences}.
If you'd like to state a theorem and give a \emph{name} to it, then
you can add an optional argument to the \verb"\begin{thm}" command.
If you type
\begin{verbatim}
\begin{thm}[Pythagoras]
The square of the hypotenuse of a right triangle is equal to the
sum of the squares of the two adjacent sides.
\end{thm}
\end{verbatim}
you'll get
\begin{thm}[Pythagoras]
The square of the hypotenuse of a right triangle is equal to the sum
of the squares of the two adjacent sides.
\end{thm}
%--------------------------------------------------------------------
\subsubsection*{Summary of environments provided in the template}
All of the following structures are numbered in the same sequence,
in the form SectionNumber.Number. Equations (i.e., displayed
formulas, whether they are equations or not) will be numbered in the
same sequence.
\begin{displaymath}
\begin{tabular}{c@{\hspace{4em}}l@{\hspace{4em}}c}
\multicolumn{3}{c}{Theorem Environments}\\*[8pt]
\hspace{1em}Name& Printed Form& Body font\\*[6pt]
\texttt{thm}& \textbf{Theorem}& Italic\\
\texttt{cor}& \textbf{Corollary}& Italic\\
\texttt{lem}& \textbf{Lemma}& Italic\\
\texttt{prop}& \textbf{Proposition}& Italic\\
\texttt{defn}& \textbf{Definition}& Normal\\
\texttt{rem}& \textit{Remark}& Normal\\
\texttt{ex}& \textit{Example}& Normal\\
\texttt{notation}& \textit{Notation}& Normal\\
\texttt{terminology}& \textit{Terminology}& Normal\\*[3pt]
\end{tabular}
\end{displaymath}
For full details, see the beginning of the template file (reproduced
here in section~\ref{sec:template}), after the comment ``The Theorem
Environments.''
%---------------------------------------------------------------------
\subsection{Proofs}
To give a proof, you do the following:
\begin{verbatim}
\begin{proof}
As any fool can plainly see, it's true!
\end{proof}
\end{verbatim}
and you'll get the following:
\begin{proof}
As any fool can plainly see, it's true!
\end{proof}
If the theorem said that a condition was both necessary and sufficient
for something, and you want to prove each part separately,
you can do the following:
\begin{verbatim}
\begin{proof}[Proof (sufficiency)]
Well, it's \emph{obviously} sufficient!
\end{proof}
\end{verbatim}
and you'll get
\begin{proof}[Proof (sufficiency)]
Well, it's \emph{obviously} sufficient!
\end{proof}
That is, the \verb"proof" environment allows you to use an optional
second argument that will appear in place of the word \verb"Proof".
If the proof of Theorem~\ref{pythagthm} does not appear immediately
after its statement, you might use the following:
\begin{verbatim}
\begin{proof}[Proof of Theorem~\ref{pythagthm}]
As any fool can plainly see, it's true!
\end{proof}
\end{verbatim}
and you'd get
\begin{proof}[Proof of Theorem~\ref{pythagthm}]
As any fool can plainly see, it's true!
\end{proof}
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Cross-References}
\label{sec:xreferences}
This section explains how to make reference to numbered sections,
theorems, equations, and bibliography items, with the correct
reference numbers filled in automatically by \LaTeX.
%---------------------------------------------------------------------
\subsection{References to sections, theorems and equations}
\label{sec:thmrefs}
For each structure in the manuscript to which you'll be making
reference, you must assign a \emph{key} that you'll use to refer to
that structure. For sections, theorems, numbered equations, and items
in an enumerated list (see section~\ref{sec:enumref}), you assign the
key using the \verb"\label" command and refer to it using either the
\verb"\ref" command or the \verb"\eqref" command. Each of these
commands takes one argument, which is the \emph{key} you're assigning
to the object. The command \verb"\ref{key}" produces the number that
was assigned to that structure and the command \verb"\eqref{key}"
produces that number enclosed in parentheses. (The \verb"\eqref"
command also ensures that the number and parentheses are always in an
upright font; see section~\ref{sec:EqRef}.) The convention is to use
\verb"\eqref" to refer to equation numbers, \verb"\cite" to refer to
bibliography entries (see section~\ref{sec:bibreferences}), and
\verb"\ref" to refer to everything else.
Consider the following example.
\begin{thm}
\label{homotopy}
If the maps $f\colon X \to Y$ and $g\colon X \to Y$ are homotopic,
then the induced homomorphisms $f_{*} \colon \mathrm{H}_{*}X \to
\mathrm{H}_{*}Y$ and $g_{*} \colon \mathrm{H}_{*}X \to
\mathrm{H}_{*}Y$ are equal.
\end{thm}
We typed that theorem as follows.
\begin{verbatim}
\begin{thm}
\label{homotopy}
If the maps $f\colon X \to Y$ and $g\colon X \to Y$ are homotopic,
then the induced homomorphisms $f_{*} \colon \mathrm{H}_{*}X \to
\mathrm{H}_{*}Y$ and $g_{*} \colon \mathrm{H}_{*}X \to
\mathrm{H}_{*}Y$ are equal.
\end{thm}
\end{verbatim}
If we now type ``\verb"see Theorem~\ref{homotopy}",'' then it will be
printed as ``see Theorem~\ref{homotopy}.''
%--------------------------------------------------------------------
\subsubsection*{So, what exactly is the label labeling?}
The command \verb"\label{key}" assigns to \verb"key" the value of the
\emph{smallest enclosing structure}. For example, we began this
section by typing
\begin{center}
\begin{tabular}{l}
\verb"\section{Cross-References}"\\
\verb"\label{sec:xreferences}"
\end{tabular}
\end{center}
and we began this subsection by typing
\begin{center}
\begin{tabular}{l}
\verb"\subsection{References to sections, theorems and equations}"\\
\verb"\label{sec:thmrefs}"
\end{tabular}
\end{center}
The phrase ``\verb"See section~\ref{sec:xreferences}"'' is printed as
``See section~\ref{sec:xreferences}'' while the phrase
%
``\verb"See section~\ref{sec:thmrefs}"'' is printed as ``See
section~\ref{sec:thmrefs}'' because the key \verb"sec:xreferences" was
defined inside of section~\ref{sec:xreferences} but outside of
section~\ref{sec:thmrefs}, while the key \verb"sec:thmrefs" was
defined inside of section~\ref{sec:thmrefs}.
%--------------------------------------------------------------------
\subsubsection{References to equations}
\label{sec:EqRef}
To make reference to a numbered equation, you assign the \emph{key} as
before, but you replace \verb"\ref" with \verb"\eqref", so that
parentheses will be printed around the equation number. For example,
if you type
\begin{verbatim}
\begin{equation}
\label{additivity}
\mathrm{H}_{*} \bigvee_{\alpha\in A} X_{\alpha} \approx
\bigoplus_{\alpha\in A}\mathrm{H}_{*} X_{\alpha}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{additivity}
\mathrm{H}_{*} \bigvee_{\alpha\in A} X_{\alpha} \approx
\bigoplus_{\alpha\in A}\mathrm{H}_{*} X_{\alpha}
\end{equation}
If we now type
\begin{verbatim}
\begin{thm}
Equation~\eqref{additivity} is true for all sorts of functors
$\mathrm{H}$.
\end{thm}
\end{verbatim}
then we'll get
\begin{thm}
Equation~\eqref{additivity} is true for all sorts of functors
$\mathrm{H}$.
\end{thm}
Notice the parentheses around the equation number, and the fact that
even though the theorem is set in slanted type, the equation number is
set in an upright font? This is the difference between \verb"\eqref"
and \verb"\ref"; the command \verb"\eqref" provides parentheses,
arranges it so that the number and surrounding parentheses are in an
upright font no matter what the surrounding font, and supplies an
italic correction if it's needed.
%---------------------------------------------------------------------
\subsection{References to page numbers}
If you want to make reference to the \emph{page} that contains a
label, rather than to the structure that is labeled, use the command
\verb"\pageref{key}". For example, if you type
\begin{verbatim}
See page~\pageref{homotopy} to find Theorem~\ref{homotopy}.
\end{verbatim}
you'll get ``See page~\pageref{homotopy} to find
Theorem~\ref{homotopy}.''
%---------------------------------------------------------------------
\subsection{Bibliographic references}
\label{sec:bibreferences}
Each bibliography item receives a \emph{key} as part of its basic
structure, and you refer to that item using the command
\verb"\cite{key}".
When using the \texttt{amsrefs} package, each item in the bibliography
is begun with
\begin{verbatim}
\bib{key}{TypeOfItem}{
\end{verbatim}
For example, the bibliography of these instructions contains the entry
\begin{verbatim}
\bib{HA}{book}{
author={Quillen, Daniel G.},
title={Homotopical Algebra},
series={Lecture Notes in Mathematics},
volume={43},
publisher={Springer-Verlag},
address={Berlin-New York},
date={1967}
}
\end{verbatim}
If we type ``\verb"This is the work of Quillen~\cite{HA}",'' then it
will be printed as ``This is the work of Quillen~\cite{HA}.'' Notice
that square brackets have been inserted around the bibliography item
number.
The \verb"\cite" command takes an optional argument, which allows you
to annotate the reference. If we type
``\verb"see~\cite[Chapter I]{HA}"'', then it will be printed as
``see~\cite[Chapter I]{HA}''. If you're using \texttt{amsrefs} (which
we strongly recommend), then there's an alternate form available: If
we type ``\verb"\cite{HA}*{Chapter I}"'', then we also get
``\cite{HA}*{Chapter I}'', and this second form is less likely to
cause errors when used, e.g., in the optional argument to a
\verb"\begin{theorem}" command (see section~\ref{sec:theorems}).
%--------------------------------------------------------------------
\subsubsection{Multiple references}
\label{sec:mulref}
If you're using \texttt{amsrefs} and when you refer to multiple
bibliography items you want to have the item numbers automatically
sorted and compressed (e.g., replacing ``7, 6, 5, 8'' with ``5--8''),
you can use the \verb"\cites" command. For example, if we type
\verb"\cites{HA,yellowmonster}" then we get \cites{HA,yellowmonster}.
If you want some of the references in the list to have annotations,
you put your \verb"\cite" commands into the argument of a
\verb"\citelist" command. For example, if we type
\verb"\citelist{\cite{HA}*{Chapter I} \cite{yellowmonster}}" then we
get \citelist{\cite{HA}*{Chapter I} \cite{yellowmonster}}.
%--------------------------------------------------------------------
\subsubsection{Author-year citations}
\label{sec:authyrcit}
If you're using \texttt{amsrefs} and you use the \texttt{author-year}
option to convert your references to the author-year format (see
section~\ref{sec:refoptions}), then there are two variations on the
\verb"\cite" command (\verb"\ycite" and \verb"\ocite") that are
useful. If we were using the \texttt{author-year} option in this
document, then
\begin{center}
\begin{tabular}{l@{ would be typeset as }l}
``\verb"\cite{yellowmonster}"''& ``(Bousfield and Kan, 1972)''\\
``\verb"\ycite{yellowmonster}"''& ``(1972)''\\
``\verb"\ocite{yellowmonster}"''& ``Bousfield and Kan (1972)''
\end{tabular}
\end{center}
Thus, you could type ``For further details, see
\verb"\cite{yellowmonster}"'', or ``Bousfield and Kan
\verb"\ycite{yellowmonster}" showed\ldots'', or ``This can be found in
\verb"\ocite{yellowmonster}"''.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Mathematics in running text}
This is pretty much exactly as it is in plain \TeX, except that you
have an extra option (which you can ignore). The simplest thing is to
just enclose between dollar signs any material that should be in math
mode. Thus, if you type
\begin{center}
\verb"Let $f\colon X \to Y$ be a continuous function."
\end{center}
you'll get
\begin{center}
Let $f\colon X \to Y$ be a continuous function.
\end{center}
(Note that if we had typed that as ``\verb"f: X \to Y"'' then the
spacing around the colon would be wrong, since the colon symbol is
typeset as a binary relation, with spaces on the two sides equal.)
The only novelty that \LaTeX{} introduces is that, instead of using a
dollar sign to toggle math mode on and off, you can use `\verb"\("' to
\emph{begin} math mode, and `\verb"\)"' to \emph{end} math mode.
Thus, the example above could also be typed as
\begin{center}
\verb"Let \(f\colon X \to Y\) be a continuous function."
\end{center}
This provides a tiny bit more error checking, but can
otherwise be safely ignored.
The reference \cite{mathguide} is an excellent concise summary of the
features of \AmS-\LaTeX{} for typesetting mathematics, both displayed
and in running text. It also includes lists of symbols available for
mathematics.
%--------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Displayed mathematics}
For a complete discussion of the environments for displayed
mathematics, including options for customizing equation numbers,
see~\cite[section~3]{amslatexusersguide}.
%--------------------------------------------------------------------
\subsection{Single line displays}
\label{sec:SngLne}
To display mathematics and number the display (so that you can refer
to it from elsewhere in the paper) you use the \verb"equation"
environment. (\LaTeX{} calls all such numbers \emph{equation
numbers}, whether or not the display has anything to do with
equations.) If you type
\begin{verbatim}
\begin{equation}
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\end{equation}
\end{verbatim}
you'll get
\begin{equation}
\label{pi1eqn}
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\end{equation}
If you'd like to be able to make reference to the equation number,
you need to \emph{label} the equation, using a \emph{key} that you
can use for referencing it:
\begin{verbatim}
\begin{equation}
\label{pi1eqn}
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\end{equation}
\end{verbatim}
If you later type ``\verb"see formula~\eqref{pi1eqn}"'' you'll get
``see formula~\eqref{pi1eqn}.'' (For more on cross-references to
formulas, see section~\ref{sec:thmrefs}.)
To display a single line of mathematics without an equation number,
you use the \verb"equation*" environment. (This is a common \LaTeX
ism: Adding an asterisk to the name of a numbered \LaTeX{} environment
often gives the unnumbered equivalent.) If you type
\begin{verbatim}
\begin{equation*}
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\end{equation*}
The \texttt{displaymath} environment is equivalent to this; you can
produce the same unnumbered display by typing
\begin{verbatim}
\begin{displaymath}
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\end{displaymath}
\end{verbatim}
You can also produce that same unnumbered display by typing
\begin{verbatim}
\[
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
\]
\end{verbatim}
but some people think that that makes your \LaTeX{} source file less
readable. Although you can also produce the same thing by typing
\begin{verbatim}
$$
\pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y
$$
\end{verbatim}
using double dollar signs is definitely deprecated.
%--------------------------------------------------------------------
\subsection{Text in displayed mathematics}
\label{sec:text}
To include text in a displayed mathematics environment you use the
\verb"\text" command, as in \verb"\text{here's some text}". The
\verb"\text" command is preferable to the standard \LaTeX{}
\verb"\mbox" command because \verb"\text" correctly adjusts its size
for use in subscripts and superscripts. For example, if you type
\begin{verbatim}
\begin{equation*}
\pi_{1}(X) \approx G * H
\quad\text{where $G$ is torsion and $H$ is torsion free}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\pi_{1}(X) \approx G * H
\quad\text{where $G$ is torsion and $H$ is torsion free}
\end{equation*}
and if you type
\begin{verbatim}
\begin{equation*}
X_{n} = \coprod_{\text{monomorphisms $[k] \to [n]$}} S_{k}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
X_{n} = \coprod_{\text{monomorphisms $[k] \to [n]$}} S_{k}
\end{equation*}
%--------------------------------------------------------------------
\subsection{Displaying multiple lines without alignment}
\label{sec:gather}
You can put several displayed lines together, each one centered, with
no alignment between the different lines, using the \verb"gather"
environment. When typing this, the lines are separated by a double
backslash \verb"\\". For example, if you type
\begin{verbatim}
\begin{gather}
(X\otimes L) \amalg_{(X\otimes K)} (Y\otimes K)
\longrightarrow Y\otimes L\\
X^{L} \longrightarrow X^{K} \times_{Y^{K}} Y^{L}
\end{gather}
\end{verbatim}
then you'll get
\begin{gather}
\label{eq:push}
(X\otimes L) \amalg_{(X\otimes K)} (Y\otimes K)
\longrightarrow Y\otimes L\\
\label{eq:pull}
X^{L} \longrightarrow X^{K} \times_{Y^{K}} Y^{L}
\end{gather}
The \verb"gather*" environment would produce the same thing without
the equation numbers. You can also label each line so that you can
refer to them: If you had typed that as
\begin{verbatim}
\begin{gather}
\label{eq:push}
(X\otimes L) \amalg_{(X\otimes K)} (Y\otimes K)
\longrightarrow Y\otimes L\\
\label{eq:pull}
X^{L} \longrightarrow X^{K} \times_{Y^{K}} Y^{L}
\end{gather}
\end{verbatim}
and then typed ``\verb"see \eqref{eq:push} or \eqref{eq:pull}"'',
you'd get ``see \eqref{eq:push} or \eqref{eq:pull}''.
There is also a \texttt{gathered} environment, which does not produce
a display of its own but rather produces a block of centered lines of
mathematics that can be used inside of another displayed mathematics
environment (see section~\ref{sec:gathered}).
%--------------------------------------------------------------------
\subsection{Displays with linebreaks}
\label{sec:multline}
For a long display that must be broken across several lines, you can
use the \texttt{multline} environment. (There is also a
\texttt{multline*} environment, which is similar except that it omits
the equation number.) When typing this, the lines are separated by a
double backslash \verb"\\". The first line will be shifted left of
center, the last will be shifted right of center, and the lines in
between those will be centered. For example, if you type
\begin{verbatim}
\begin{multline}
\label{eq:BigComp}
\mathrm{F} X\otimes\Delta[n] \xrightarrow{1 \otimes D}
\mathrm{F} X\otimes(\Delta[n]\times\Delta[n])\\
\xrightarrow{\sigma}
\mathrm{F}\bigl(X\otimes(\Delta[n]\times\Delta[n])\bigr)
\approx
\mathrm{F}\bigl((X\otimes\Delta[n])\otimes\Delta[n]\bigr)\\
\xrightarrow{\mathrm{F}(\alpha\otimes 1)}
\mathrm{F}(Y\otimes\Delta[n]) \xrightarrow{\mathrm{F}(\beta)}
\mathrm{F}(Z)
\end{multline}
\end{verbatim}
then you'll get
\begin{multline}
\label{eq:BigComp}
\mathrm{F} X\otimes\Delta[n] \xrightarrow{1 \otimes D}
\mathrm{F} X\otimes(\Delta[n]\times\Delta[n])\\
\xrightarrow{\sigma}
\mathrm{F}\bigl(X\otimes(\Delta[n]\times\Delta[n])\bigr)
\approx
\mathrm{F}\bigl((X\otimes\Delta[n])\otimes\Delta[n]\bigr)\\
\xrightarrow{\mathrm{F}(\alpha\otimes 1)}
\mathrm{F}(Y\otimes\Delta[n]) \xrightarrow{\mathrm{F}(\beta)}
\mathrm{F}(Z)
\end{multline}
You can then type ``\verb"the composition \eqref{eq:BigComp}"" and it
will appear as ``the composition \eqref{eq:BigComp}''.
%--------------------------------------------------------------------
\subsection{Displays with alignment}
\label{sec:align}
There are a number of ways to produce displays with multiple lines and
horizontal alignment between the lines.
\begin{itemize}
\item The \texttt{align} and \texttt{align*} environments allow
horizontal alignment of characters chosen from each line (see
section~\ref{sec:SingAlign}).
\item The \texttt{aligned} and \texttt{split} environments produce
alignments that can be be part of a larger display (see
section~\ref{sec:aligned}).
\item The \texttt{gathered} environment produces a block of several
lines, each centered as in the \texttt{gather} environment (see
section~\ref{sec:gather}), that can be part of a larger display (see
section~\ref{sec:gathered}). (Of course, this doesn't involve
horizontal alignment, but the \texttt{gathered} environment is often
used in conjunction with other display environments.)
\item The \texttt{align} and \texttt{align*} environments also allow
for multiple columns with alignment in each column (see
section~\ref{sec:MulAlign}).
\item The \texttt{flalign} and \texttt{flalign*} environments allow
multiple alignment points and place the outermost aligned blocks
flush against the margins (see section~\ref{sec:flalign}).
\item The \texttt{alignat} and \texttt{alignat*} environments allow
multiple alignment points and allow you to choose the spacing
between the columns (see section~\ref{sec:alignat}).
\item The \texttt{alignedat} environment is similar to the
\texttt{alignat*} environment, except that it produces an alignment
intended to be part of a larger display (see
section~\ref{sec:alignedat}).
\end{itemize}
%--------------------------------------------------------------------
\subsubsection{Displays with a single alignment point}
\label{sec:SingAlign}
To display several lines of mathematics with horizontal alignment, you
use the \texttt{align} environment. (There is also an \texttt{align*}
environment, which is similar except that it omits the equation
numbers.) When typing this, the lines are separated by a double
backslash \verb"\\" and each line has an ampersand \verb"&"
immediately preceding the symbol to be aligned with the corresponding
symbols on the other lines. For example, if you type
\begin{verbatim}
\begin{align}
\label{eq:pi1}
\pi_{1}(X\vee Y) &\approx \pi_{1}X * \pi_{1}Y\\
\label{eq:additivity}
\widetilde{\mathrm{H}}_{*}(X\vee Y) &\approx
\widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y
\end{align}
\end{verbatim}
then you'll get
\begin{align}
\label{eq:pi1}
\pi_{1}(X\vee Y) &\approx \pi_{1}X * \pi_{1}Y\\
\label{eq:additivity}
\widetilde{\mathrm{H}}_{*}(X\vee Y) &\approx
\widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y
\end{align}
and if you type ``\verb"see \eqref{eq:pi1} or \eqref{eq:additivity}"''
then you'll get ``see \eqref{eq:pi1} or \eqref{eq:additivity}''. For
another example, if you type
\begin{verbatim}
\begin{align*}
\mathcal{M}\bigl((\operatorname{colim} \boldsymbol{X})
\otimes K,Y\bigr) &\approx
\mathcal{M}(\operatorname{colim} \boldsymbol{X},Y^K)\\
&\approx \lim \mathcal{M}(\boldsymbol{X},Y^K)\\
&\approx \lim \mathcal{M}(\boldsymbol{X} \otimes K,Y)\\
&\approx \mathcal{M}\bigl(\operatorname{colim}
(\boldsymbol{X} \otimes K),Y\bigr)
\end{align*}
\end{verbatim}
then you'll get
\begin{align*}
\mathcal{M}\bigl((\operatorname{colim} \boldsymbol{X})
\otimes K,Y\bigr) &\approx
\mathcal{M}(\operatorname{colim} \boldsymbol{X},Y^K)\\
&\approx \lim \mathcal{M}(\boldsymbol{X},Y^K)\\
&\approx \lim \mathcal{M}(\boldsymbol{X} \otimes K,Y)\\
&\approx \mathcal{M}\bigl(\operatorname{colim}
(\boldsymbol{X} \otimes K),Y\bigr)
\end{align*}
Both the \texttt{align} and \texttt{align*} environments allow you to
have multiple columns in the display; for this, see
section~\ref{sec:MulAlign}.
%--------------------------------------------------------------------
\subsubsection{Alignments that are part of a larger display}
\label{sec:aligned}
The \texttt{aligned} environment does not create a display of its own.
Instead, it allows you to have several lines of mathematics, with
alignment as in the \texttt{align*} environment (see
section~\ref{sec:SingAlign}), which can then be used inside of a
displayed mathematics environment.
The \textbf{aligned} environment doesn't produce any equation numbers
of its own. If the enclosing display environment produces a number,
and if the \texttt{aligned} environment doesn't use the optional
argument of \texttt{[t]} or \texttt{[b]} (see \eqref{eq:dbltop} and
\eqref{eq:dblbot}), then that number is centered vertically in the
contents of the \texttt{aligned} environment. For an example of this,
see \eqref{eq:longeq}.
There is also a \texttt{split} environment, which is similar to the
\texttt{aligned} environment except that the \texttt{aligned}
environment has options (changing the vertical alignment (see the
examples in this section) or having multiple alignment points (see
section~\ref{sec:MulAlign})) that are not possible with the
\texttt{split} environment. Thus, a \texttt{split} environment can
always be replaced by an \texttt{aligned} environment.
For example, if you type
\begin{verbatim}
\begin{equation}
\label{eq:dblaligned}
\begin{aligned}
a &= b + c\\
d &= e + f
\end{aligned}
\qquad\text{which, of course, leads to}\qquad
\begin{aligned}
g &= h + i\\
j &= k + l
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:dblaligned}
\begin{aligned}
a &= b + c\\
d &= e + f
\end{aligned}
\qquad\text{which, of course, leads to}\qquad
\begin{aligned}
g &= h + i\\
j &= k + l
\end{aligned}
\end{equation}
The above example illustrates that, by default, when an
\texttt{aligned} (or \texttt{aligned*}) environment is used as part of
a display involving other elements, it is vertically aligned at its
center. The \texttt{aligned} environment can take an optional
argument of \texttt{[t]} or \texttt{[b]} to cause the alignment to be
vertically aligned at either the top or the bottom row. For example,
if you type
\begin{verbatim}
\begin{equation}
\label{eq:dbltop}
\begin{aligned}[t]
a &= b + c\\
d &= e + f
\end{aligned}
\qquad\text{which, of course, leads to}\qquad
\begin{aligned}[t]
g &= h + i\\
j &= k + l
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:dbltop}
\begin{aligned}[t]
a &= b + c\\
d &= e + f
\end{aligned}
\qquad\text{which, of course, leads to}\qquad
\begin{aligned}[t]
g &= h + i\\
j &= k + l
\end{aligned}
\end{equation}
and if you type
\begin{verbatim}
\begin{equation}
\label{eq:dblbot}
\begin{aligned}[b]
a &= b + c\\
d &= e + f
\end{aligned}
\qquad\text{which, of course, leads to}\qquad
\begin{aligned}[b]
g &= h + i\\
j &= k + l
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:dblbot}
\begin{aligned}[b]
a &= b + c\\
d &= e + f
\end{aligned}
\qquad\text{which, of course, leads to}\qquad
\begin{aligned}[b]
g &= h + i\\
j &= k + l
\end{aligned}
\end{equation}
The display created by an \texttt{aligned} environment can be used as
an element of a display. For example, if you type
\begin{verbatim}
\begin{equation*}
\left .
\begin{aligned}
f(x) &= \sin^{2} x\\
g(x) &= \cos^{2} x\\
h(x) &= \sin x + \cos x
\end{aligned}
\right \}
\qquad \text{A nice collection of functions}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\left .
\begin{aligned}
f(x) &= \sin^{2} x\\
g(x) &= \cos^{2} x\\
h(x) &= \sin x + \cos x
\end{aligned}
\right \}
\qquad \text{A nice collection of functions}
\end{equation*}
%--------------------------------------------------------------------
\subsubsection{Several centered lines as part of a larger display}
\label{sec:gathered}
The \texttt{gathered} environment does not create a display of its
own. Instead, it allows you to have several lines of mathematics,
each one centered as in the \texttt{gather} environment (see
section~\ref{sec:gather}), which can then be used inside of a
displayed mathematics environment. For example, if you type
\begin{verbatim}
\begin{equation}
\begin{gathered}
x^{2} + y^{2} = z^{2}\\
a = b + c
\end{gathered}
\qquad \text{and, in addition,}\qquad
\begin{aligned}
A &= B+C\\
&= D+E
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\begin{gathered}
x^{2} + y^{2} = z^{2}\\
a = b + c
\end{gathered}
\qquad \text{and, in addition,}\qquad
\begin{aligned}
A &= B+C\\
&= D+E
\end{aligned}
\end{equation}
The \texttt{gathered} environment can take the same optional argument
of \texttt{[t]} or \texttt{[b]} that the \texttt{aligned} argument can
take (see section~\ref{sec:aligned}) to cause the vertical alignment
to be on either the top or the bottom line. For example, if you type
\begin{verbatim}
\begin{equation}
\begin{gathered}[t]
x^{2} + y^{2} = z^{2}\\
a = b + c
\end{gathered}
\qquad \text{and, in addition,}\qquad
\begin{aligned}[t]
A &= B+C\\
&= D+E
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\begin{gathered}[t]
x^{2} + y^{2} = z^{2}\\
a = b + c
\end{gathered}
\qquad \text{and, in addition,}\qquad
\begin{aligned}[t]
A &= B+C\\
&= D+E
\end{aligned}
\end{equation}
%--------------------------------------------------------------------
\subsubsection{Multiple alignment points}
\label{sec:MulAlign}
The \texttt{align} and \texttt{align*} environments (see
section~\ref{sec:SingAlign}) as well as the \texttt{aligned}
environment (see section~\ref{sec:aligned}) can be used to create
displays in which each line is broken into several pieces, with each
piece horizontally aligned at a chosen character. That is: they can
be used to create a display with several columns, with alignment
within each column.
When typing this, the lines are separated by a double backslash
\verb"\\", the different displays on each line are separated by an
ampersand \verb"&", and the symbols to be aligned are preceded by an
ampersand \verb"&". For example, if you type
\begin{verbatim}
\begin{align*}
K &\approx G * H& i&= j+k& B &\subset C\\
H &\approx A_{0}*B_{0}& i'&= j'+k'& C &= D\cap E\\
G &\approx \coprod_{\alpha\in A} L_{\alpha}& i''&=j''+k''&
A &= D \cup E
\end{align*}
\end{verbatim}
then you'll get
\begin{align*}
K &\approx G * H& i&= j+k& B &\subset C\\
H &\approx A_{0}*B_{0}& i'&= j'+k'& C &= D\cap E\\
G &\approx \coprod_{\alpha\in A} L_{\alpha}& i''&=j''+k''&
A &= D \cup E
\end{align*}
When typing such an alignment with $n$ columns, each line will have at
most $2n-1$ ampersands.
For another example, if you type
\begin{verbatim}
\begin{align*}
\pi_{1}(X\vee Y) &\approx \pi_{1}(X) * \pi_{1}(Y)
&&\text{(by the van Kampen theorem)}\\
&\approx G*H &&\text{(by the computation in the previous section)}
\end{align*}
\end{verbatim}
then you'll get
\begin{align*}
\pi_{1}(X\vee Y) &\approx \pi_{1}(X) * \pi_{1}(Y)
&&\text{(by the van Kampen theorem)}\\
&\approx G*H &&\text{(by the computation in the previous section)}
\end{align*}
If you want to specify the separation between the columns in the
alignment, you should use the \texttt{alignat} environment (see
section~\ref{sec:alignat}).
%--------------------------------------------------------------------
\subsubsection{Alignments flush left and flush right}
\label{sec:flalign}
To produce alignments similar to those in section~\ref{sec:MulAlign}
except with the leftmost column flush left and the rightmost column
flush right, you use the \texttt{flalign} environment (or, to omit the
equation numbers, the \texttt{flalign*} environment). For example, if
you type
\begin{verbatim}
\begin{flalign*}
K &\approx G * H& i&= j+k& B &\subset C\\
H &\approx A_{0}*B_{0}& i'&= j'+k'& C &= D\cap E\\
G &\approx \coprod_{\alpha\in A} L_{\alpha}& i''&=j''+k''&
A &= D \cup E
\end{flalign*}
\end{verbatim}
then you'll get
\begin{flalign*}
K &\approx G * H& i&= j+k& B &\subset C\\
H &\approx A_{0}*B_{0}& i'&= j'+k'& C &= D\cap E\\
G &\approx \coprod_{\alpha\in A} L_{\alpha}& i''&=j''+k''&
A &= D \cup E
\end{flalign*}
%--------------------------------------------------------------------
\subsubsection{Multiple alignment points with chosen spacing}
\label{sec:alignat}
To produce alignments as in section~\ref{sec:MulAlign} except with the
ability to choose the amount of horizontal space between the columns,
you use the \texttt{alignat} environment (or, to omit the equation
numbers, the \texttt{alignat*} environment). These environments don't
insert any horizontal space between the columns, and so you can insert
the exact amount of space you want by including it at the beginning of
one of the columns.
The format of \texttt{alignat} is slightly different from that of the
\texttt{align} environment in that you must include an argument
specifying the number of columns. For example, if you type
\begin{verbatim}
\begin{alignat}{2}
K &\approx G*H& \qquad&\text{(by an earlier theorem)}\\
A &\approx \lim_{i\in I} A_{i}& &\text{(by the definition of $A$)}
\end{alignat}
\end{verbatim}
then you'll get
\begin{alignat}{2}
K &\approx G*H& \qquad&\text{(by an earlier theorem)}\\
A &\approx \lim_{i\in I} A_{i}& &\text{(by the definition of $A$)}
\end{alignat}
Note that it's only necessary to insert the \verb"\qquad" space in one
row; the alignment forces the space to appear in all rows.
%--------------------------------------------------------------------
\subsubsection{Multiple alignment points with chosen spacing as part of a larger display}
\label{sec:alignedat}
The \texttt{alignedat} environment is similar to the \texttt{aligned}
environment (see section~\ref{sec:aligned}), in that neither of them
create a display of their own but are instead used as a part of a
larger display, but the \texttt{alignedat} environment allows you to
choose the spacing between the columns. That is, the
\texttt{alignedat} environment doesn't insert any space between the
columns, so you can insert the exact amount of space you want by
including it at the beginning of one of the columns. The
\texttt{alignedat} environment also has a required argument stating
the number of columns. For example, if you type
\begin{verbatim}
\begin{equation*}
\left \{
\begin{alignedat}{2}
a &= b + c& d &= e + f\\
A &= B + C \qquad& D &= E + F
\end{alignedat}
\right \}
\qquad \text{Twin pairs of equations}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\left \{
\begin{alignedat}{2}
a &= b + c& d &= e + f\\
A &= B + C \qquad& D &= E + F
\end{alignedat}
\right \}
\qquad \text{Twin pairs of equations}
\end{equation*}
Note that it's only necessary to insert the \verb"\qquad" space in one
row; the alignment forces the space to appear in all rows.
%--------------------------------------------------------------------
\subsection{The \texttt{cases} environment}
\label{sec:cases}
There is a \texttt{cases} environment, which constructs the usual
display of several cases, and which is used as a part of one of the
displayed mathematics environments. For example, if you type
\begin{verbatim}
\begin{equation}
\label{eq:abs}
|x| =
\begin{cases}
x& \text{if $x \ge 0$}\\
-x& \text{if $x < 0$}
\end{cases}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:abs}
|x| =
\begin{cases}
x& \text{if $x \ge 0$}\\
-x& \text{if $x < 0$}
\end{cases}
\end{equation}
For another example, if you type
\begin{verbatim}
\begin{align*}
d_{i} \sigma &=
\begin{cases}
\alpha_{1} \xrightarrow{\sigma_{1}} \alpha_{2}
\xrightarrow{\sigma_{2}} \cdots
\xrightarrow{\sigma_{n-1}} \alpha_{n}
&\text{if $i=0$}\\
\alpha_0 \xrightarrow{\sigma_{0}} \cdots
\xrightarrow{\sigma_{i-2}} \alpha_{i-1}
\xrightarrow{\sigma_{i}\sigma_{i-1}} \alpha_{i+1}
\xrightarrow{\sigma_{i+1}} \cdots
\xrightarrow{\sigma_{n-1}} \alpha_{n}
&\text{if $0<i<n$}\\
\alpha_{0} \xrightarrow{\sigma_{0}} \alpha_{1}
\xrightarrow{\sigma_1} \cdots
\xrightarrow{\sigma_{n-2}} \alpha_{n-1}
&\text{if $i=n$}
\end{cases}\\
s_{i} \sigma &= \alpha_{0} \xrightarrow{\sigma_{0}} \cdots
\xrightarrow{\sigma_{i-1}} \alpha_{i}
\xrightarrow{1_{\alpha_{i}}} \alpha_{i}
\xrightarrow{\sigma_{i}} \alpha_{i+1}
\xrightarrow{\sigma_{i+1}} \cdots
\xrightarrow{\sigma_{n-1}} \alpha_{n}
\end{align*}
\end{verbatim}
then you'll get
\begin{align*}
d_{i} \sigma &=
\begin{cases}
\alpha_{1} \xrightarrow{\sigma_{1}} \alpha_{2}
\xrightarrow{\sigma_{2}} \cdots
\xrightarrow{\sigma_{n-1}} \alpha_{n}
&\text{if $i=0$}\\
\alpha_0 \xrightarrow{\sigma_{0}} \cdots
\xrightarrow{\sigma_{i-2}} \alpha_{i-1}
\xrightarrow{\sigma_{i}\sigma_{i-1}} \alpha_{i+1}
\xrightarrow{\sigma_{i+1}} \cdots
\xrightarrow{\sigma_{n-1}} \alpha_{n}
&\text{if $0<i<n$}\\
\alpha_{0} \xrightarrow{\sigma_{0}} \alpha_{1}
\xrightarrow{\sigma_1} \cdots
\xrightarrow{\sigma_{n-2}} \alpha_{n-1}
&\text{if $i=n$}
\end{cases}\\
s_{i} \sigma &= \alpha_{0} \xrightarrow{\sigma_{0}} \cdots
\xrightarrow{\sigma_{i-1}} \alpha_{i}
\xrightarrow{1_{\alpha_{i}}} \alpha_{i}
\xrightarrow{\sigma_{i}} \alpha_{i+1}
\xrightarrow{\sigma_{i+1}} \cdots
\xrightarrow{\sigma_{n-1}} \alpha_{n}
\end{align*}
%--------------------------------------------------------------------
\subsection{Multiple lines with equation numbers on some of them}
\label{sec:MuEqOneNo}
By default, most of the environments for displayed mathematics either
have an equation number on every line or no equation numbers at all.
In this section we discuss how to have multiple lines with either one
equation number for the entire display (see
sections~\ref{sec:MulLinOneNo} and \ref{sec:GatherCenter}) or equation
numbers on some of the lines but not all of them (see
section~\ref{sec:notag}).
%--------------------------------------------------------------------
\subsubsection{Multiple lines with horizontal alignment and one equation number}
\label{sec:MulLinOneNo}
To display multiple lines with horizontal alignment but with only one
equation number for the entire display, you use the \texttt{equation}
environment (see section~\ref{sec:SngLne}) to produce the equation
number and you put an \texttt{aligned} environment (see
section~\ref{sec:aligned}) inside of that to produce the alignment.
For example, if you type
\begin{verbatim}
\begin{equation}
\label{eq:BothCoprod}
\begin{aligned}
\pi_{1}(X\vee Y) &\approx \pi_{1}X * \pi_{1}Y\\
\widetilde{\mathrm{H}}_{*}(X\vee Y) &\approx
\widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:BothCoprod}
\begin{aligned}
\pi_{1}(X\vee Y) &\approx \pi_{1}X * \pi_{1}Y\\
\widetilde{\mathrm{H}}_{*}(X\vee Y) &\approx
\widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y
\end{aligned}
\end{equation}
and if you type ``\verb"the isomorphisms~\eqref{eq:BothCoprod}"'' then
you'll get ``the isomorphisms~\eqref{eq:BothCoprod}''.
For another example, if you type
\begin{verbatim}
\begin{equation}
\label{eq:longeq}
\begin{aligned}
F(a,b,c,d) &= \int_{a}^{b} \sin^{3}x \cos^{2}x \, dx
+ \int_{c}^{d} \sin^{3}x \cos x \, dx\\
&\quad + \int_{a}^{b} \sin^{2} x \cos^{2} x \, dx + \int_{c}^{d}
\sin x \cos x \, dx
\end{aligned}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:longeq}
\begin{aligned}
F(a,b,c,d) &= \int_{a}^{b} \sin^{3}x \cos^{2}x \, dx
+ \int_{c}^{d} \sin^{3}x \cos x \, dx\\
&\quad + \int_{a}^{b} \sin^{2} x \cos^{2} x \, dx + \int_{c}^{d}
\sin x \cos x \, dx
\end{aligned}
\end{equation}
If you'd like to specify the exact amount of horizontal space between
the columns, you'd use the \texttt{alignedat} environment (see
section~\ref{sec:alignedat}) in place of the \texttt{aligned}
environment.
%--------------------------------------------------------------------
\subsubsection{Multiple lines without horizontal alignment and with one equation number}
\label{sec:GatherCenter}
To create a display of multiple lines without horizontal alignment but
with each line centered, and to have a single equation number for the
entire display, you use the \texttt{equation} environment (see
section~\ref{sec:SngLne}) to produce the equation number and you put a
\texttt{gathered} environment (see section~\ref{sec:gathered}) inside
of that. For example, if you type
\begin{verbatim}
\begin{equation}
\label{eq:Corner}
\begin{gathered}
(X\otimes L) \amalg_{(X\otimes K)} (Y\otimes K)
\longrightarrow Y\otimes L\\
X^{L} \longrightarrow X^{K} \times_{Y^{K}} Y^{L}
\end{gathered}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:Corner}
\begin{gathered}
(X\otimes L) \amalg_{(X\otimes K)} (Y\otimes K)
\longrightarrow Y\otimes L\\
X^{L} \longrightarrow X^{K} \times_{Y^{K}} Y^{L}
\end{gathered}
\end{equation}
and if you type ``\verb"see~\eqref{eq:Corner}"'' then you'll get
``see~\eqref{eq:Corner}''.
%--------------------------------------------------------------------
\subsubsection{Suppressing some equation numbers: {\normalfont \texttt{\bs notag}}}
\label{sec:notag}
If you want to have equation numbers on some but not all of the lines
of a display, you can use an environment that numbers every line and
then suppress the equation number on particular lines by typing
\begin{center}
\verb"\notag"
\end{center}
at the end of each of those lines, either just before the double
backslash that ends the line or at the end of the last line. For
example, if you type
\begin{verbatim}
\begin{align}
a^{2} + b^{2} &= c^{2} \notag\\
\label{eq:ABC}
A^{2} + B^{2} &= C^{2}\\
p^{2} + q^{2} &- r^{2} \notag\\
\label{eq:PQR}
P^{2} + Q^{2} &= R^{2}
\end{align}
\end{verbatim}
then you'll get
\begin{align}
a^{2} + b^{2} &= c^{2} \notag\\
\label{eq:ABC}
A^{2} + B^{2} &= C^{2}\\
p^{2} + q^{2} &- r^{2} \notag\\
\label{eq:PQR}
P^{2} + Q^{2} &= R^{2}
\end{align}
and if you type ``\verb"equations~\eqref{eq:ABD} and \eqref{eq:PQR}"''
then you'll get``equations~\eqref{eq:ABC} and \eqref{eq:PQR}''.
%--------------------------------------------------------------------
\subsection{Overriding equation numbers}
\label{sec:EqNoOver}
There are commands \verb"\tag" and \verb"\tag*" that allow you to
override the normal equation numbering for any line of any of the
displayed mathematics environments. You can also suppress the equation
number entirely using the \verb"\notag" command (see
section~\ref{sec:notag}).
If you put the command ``\verb"\tag{stuff}"'' at the end of a line of
a display (either just before the double backslash that ends the line
or at the end of the last line), where ``\texttt{stuff}'' is arbitrary
text, then that arbitrary text will be placed on the page, enclosed in
parentheses, in place of an equation number. The command
``\verb"\tag*{stuff}"'' is similar, but it does not add the
parentheses. If these commands are used in a display that normally
has unnumbered lines, then ``\texttt{stuff}'' will be inserted anyway.
For example, if you type
\begin{verbatim}
\begin{equation}
\label{eq:add}
\widetilde{\mathrm{H}}_{*}(X\vee Y) \approx
\widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y
\tag*{$(*)$}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{eq:add}
\widetilde{\mathrm{H}}_{*}(X\vee Y) \approx
\widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y
\tag*{$(*)$}
\end{equation}
and if you type
%
``\verb"equation~\ref{eq:add} is additivity"'' then you'll get
``equation~\ref{eq:add} is additivity''. Note that we used the
command \verb"\tag*" and inserted the parentheses as part of the tag,
rather than using the command \verb"\tag", because we wanted cross
references to show the parentheses surrounding the asterisk.
%--------------------------------------------------------------------
%--------------------------------------------------------------------
\section{Commutative diagrams using \texorpdfstring{\Xy-pic}{Xy-pic}}
\label{sec:xypic}
\Xy-pic is a powerful package that enables you to draw very complex
commutative diagrams within your \LaTeX{} file, avoiding the need to
create the graphics separately and then import them. \Xy-pic isn't a
part of \AmS-LaTeX, but \Xy-pic and \AmS-LaTeX{} work quite well
together. We'll describe the most important features of \Xy-pic's
commutative diagram macros here. The full documentation for
commutative diagrams can be found in the \emph{\Xy-pic User's Guide}
\cite{xyguide}, and the full documentation for all of \Xy-pic, which
can do quite a bit more than draw commutative diagrams, can be found
in the \emph{\Xy-pic Reference Manual} \cite{xyrefer}.
%--------------------------------------------------------------------
\subsection{Basic diagrams}
\label{sec:basicdiag}
To use \Xy-pic to draw commutative diagrams, you include the lines
\begin{center}
\begin{tabular}{l}
\verb"\usepackage[all,cmtip]{xy}"\\
\verb"\let\objectstyle=\displaystyle"
\end{tabular}
\end{center}
in the preamble of your document, i.e., after the
\verb"\documentclass" command and before the \verb"\begin{document}"
command. You can omit the second of those two lines if you want the
nodes of your diagram to be in \verb"\textstyle" by default.
You create a diagram using the \verb"\xymatrix" command, immediately
followed by a pair of braces that enclose the diagram specification.
The diagram is described in a manner similar to the way matrices are
described:
\begin{enumerate}
\item There is a rectangular array of nodes of the diagram. A node
should not begin with a macro or with an asterisk, and so it's
safest (although not always required) to enclose each node in braces
\verb"{}".
\item The nodes in a row are separated by an ampersand \verb"&",
and the rows are separated by a double backslash \verb"\\".
\item An arrow is specified immediately following the node that is its
source (although this is not actually required; see
section~\ref{sec:SrcTrgt}). A straight line arrow is specified by
\verb"\ar[target]", where \verb"target" is
\begin{itemize}
\item \verb"r" for the node one place to the right,
\item \verb"l" for the node one place to the left,
\item \verb"d" for the node one place down,
\item \verb"u" for the node one place up,
\item \verb"rr" for the node two places to the right,
\item \verb"dr" for the node one place down and one place to the
right,
\item etc.
\end{itemize}
\end{enumerate}
It's also possible to have labels on the arrows (see
section~\ref{sec:labelarrow}), arrows that are built of things other
than a single solid line with a single arrowhead at the end (see
section~\ref{sec:arstyle}), curved arrows (see
section~\ref{sec:arcurve}), and arrows that pass over or under other
arrows (see sections~\ref{sec:ArUnder} and~\ref{sec:CrossArrow}).
For example,
if you type
\begin{verbatim}
\begin{equation}
\xymatrix{
{A}\ar[r] \ar[d]
&{B} \ar[d]\\
{C} \ar[r]
&{D}
}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\xymatrix{
{A}\ar[r] \ar[d]
&{B} \ar[d]\\
{C} \ar[r]
&{D}
}
\end{equation}
If you'd like the equation number to be centered vertically with
respect to the diagram, you should enclose the \verb"\xymatrix"
command in a \verb"\vcenter", as in
\begin{verbatim}
\begin{equation}
\vcenter{
\xymatrix{
{A}\ar[r] \ar[d]
&{B} \ar[d]\\
{C} \ar[r]
&{D}
}
}
\end{equation}
\end{verbatim}
in which case you'll get
\begin{equation}
\vcenter{
\xymatrix{
{A}\ar[r] \ar[d]
&{B} \ar[d]\\
{C} \ar[r]
&{D}
}
}
\end{equation}
Not all nodes need appear. To omit a node in the middle of a line,
just type the \verb"&" that moves you on to the next node. To omit a
node at the end of the line, just type the line-ending \verb"\\" and
go on to the next line. For example, if you type
\begin{verbatim}
\begin{equation*}
\xymatrix{
{A} \ar[rr] \ar[dr] \ar[d]
&& {B} \ar[dd]\\
{C} \ar[d] \ar[drr]
& {D} \ar[l] \ar[ur]\\
{E} \ar[rr]
&&{F}
}
\end{equation*}
\end{verbatim}
you'll get
\begin{equation*}
\xymatrix{
{A} \ar[rr] \ar[dr] \ar[d]
&& {B} \ar[dd]\\
{C} \ar[d] \ar[drr]
& {D} \ar[l] \ar[ur]\\
{E} \ar[rr]
&&{F}
}
\end{equation*}
Note that that diagram has three rows and three columns, but two of
the nodes in the second column and one of the nodes in the third
column are missing.
%--------------------------------------------------------------------
\subsection{Changing the spacing}
\label{sec:ChgSpc}
You can change the space between the rows of a diagram and the space
between the columns of a diagram. The following commands can be
inserted following the command \verb"\xymatrix" and before the left
brace that begins the diagram specification:
\begin{center}
\begin{tabular}{ll}
\texttt{@=dimen}& set row and column spacing to \texttt{dimen}\\
\texttt{@R=dimen}& set row spacing to \texttt{dimen}\\
\texttt{@C=dimen}& set column spacing to \texttt{dimen}
\end{tabular}
\end{center}
The \texttt{dimen} in all of these commands can be positive, zero, or
negative. (Negative \texttt{dimen}'s can be useful in diagrams with
very wide entries; see \eqref{diag:wide}.) Although you can use
whatever units you like for \texttt{dimen} (e.g., inches
(\texttt{in}), centimeters (\texttt{cm}), points (\texttt{pt}), etc.),
it's a good idea to measure vertical distances in \texttt{ex} (roughly
the height of an upper case ``X'') and horizontal distances in
\texttt{em} (roughly the width of an upper case ``M''), so that the
distance will be roughly correct even if you change font sizes.
For example, if you type
\begin{verbatim}
\begin{displaymath}
\vcenter{
\xymatrix@=2ex{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}% \xymatrix
}% \vcenter
\qquad\text{or}\qquad
\vcenter{
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}% \xymatrix
}% \vcenter
\qquad\text{or}\qquad
\vcenter{
\xymatrix@C=10ex{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}% \xymatrix
}% \vcenter
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\vcenter{
\xymatrix@=2ex{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}% \xymatrix
}% \vcenter
\qquad\text{or}\qquad
\vcenter{
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}% \xymatrix
}% \vcenter
\qquad\text{or}\qquad
\vcenter{
\xymatrix@C=10ex{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}% \xymatrix
}% \vcenter
\end{displaymath}
For an example of the usefulness of negative column spacing: If you
type
\begin{verbatim}
\newcommand{\pushout}[3]{#1\mathbin{\mathord{\amalg}_{#2}}#3}
\begin{equation}
\label{diag:wide}
\vcenter{
\xymatrix@C=-12em{
{\pushout{(A\otimes L)}
{A\otimes K}
{(B\otimes K)}
} \ar[r] \ar[dr]
& {B\otimes L}
& {\pushout{(P\otimes L)}
{P\otimes M}
{(Q\otimes M)}
} \ar[l] \ar[dl]\\
& {\pushout{\bigl(\pushout{(A\otimes L)}
{A\otimes K}
{(B\otimes K)}\bigr)}
{\pushout{(X\otimes L)}
{X\otimes K}
{(Y\otimes K)}}
{\bigl(\pushout{(P\otimes L)}
{P\otimes M}
{(Q\otimes M)}\bigr)}
} \ar[u]
}
}
\end{equation}
\end{verbatim}
then you'll get
\newcommand{\pushout}[3]{#1\mathbin{\mathord{\amalg}_{#2}}#3}
\begin{equation}
\label{diag:wide}
\vcenter{
\xymatrix@C=-12em{
{\pushout{(A\otimes L)}
{A\otimes K}
{(B\otimes K)}
} \ar[r] \ar[dr]
& {B\otimes L}
& {\pushout{(P\otimes L)}
{P\otimes M}
{(Q\otimes M)}
} \ar[l] \ar[dl]\\
& {\pushout{\bigl(\pushout{(A\otimes L)}
{A\otimes K}
{(B\otimes K)}\bigr)}
{\pushout{(X\otimes L)}
{X\otimes K}
{(Y\otimes K)}}
{\bigl(\pushout{(P\otimes L)}
{P\otimes M}
{(Q\otimes M)}\bigr)}
} \ar[u]
}
}
\end{equation}
which would never fit on the page without negative column spacing.
%--------------------------------------------------------------------
\subsection{Shifting nodes sideways}
\label{sec:ShiftSide}
You can shift a node to the right by enclosing it in braces and
preceding the opening brace with \verb"*+[r]" and shift it to the left
by enclosing it in braces and preceding the opening brace with
\verb"*+[l]". This can be useful, for example, if you want a node to
consist of both the name of something and its definition, but you want
the arrows to the node to point to the name, rather than to the center
of the node. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
Note that the large node at the upper right caused the columns to be
far apart, even though that node was shifted to the right before being
placed onto the page. To counteract that, you can decrease the column
spacing: If you type
\begin{verbatim}
\begin{displaymath}
\xymatrix@C=-2em{
{A} \ar[r] \ar[d]
& *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix@C=-2em{
{A} \ar[r] \ar[d]
& *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsection{Arrows passing under nodes; crossing arrows}
\label{sec:ArUnder}
Arrows can be created that go to a sequence of nodes, passing under
(i.e., leaving a small gap at) all the intermediate nodes. If an
arrow is created that passes under an empty node while a second arrow
crosses that node in the normal way, the effect is that the first
arrow passes under the second arrow. (For another way to have one
arrow pass under another, see section~\ref{sec:CrossArrow}.)
To draw an arrow that passes under a sequence of nodes and then goes
on to a final node, the \verb"\ar" is followed by \verb"'[node]" for
each node that you pass under, followed by \verb"[finalnode]". For
example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar '[r] '[rr] [rrr]
& {B}
& {}
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar '[r] '[rr] [rrr]
& {B}
& {}
& {D}
}
\end{displaymath}
For an example of crossing arrows, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix@=3ex{
{A} \ar[rr] \ar[dd] \ar'[dr][ddrr]
&& {B} \ar[dd] \ar[ddll]\\
& {}\\
{C} \ar[rr]
&& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix@=3ex{
{A} \ar[rr] \ar[dd] \ar'[dr][ddrr]
&& {B} \ar[dd] \ar[ddll]\\
& {}\\
{C} \ar[rr]
&& {D}
}
\end{displaymath}
Note that that diagram has three rows and three columns, but nothing
appears in either the second row or the second column. (For an
explanation of the command \verb"@=3ex", which changes the size of the
diagram, see section~\ref{sec:ChgSpc}.) For a more elaborate example,
if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix@=2ex{
{A} \ar[rr] \ar[dr] \ar[dd]
&& {B} \ar[dr] \ar'[d][dd]\\
& {A'} \ar[rr] \ar[dd]
&& {B'} \ar[dd]\\
{C} \ar'[r][rr] \ar[dr]
&& {D} \ar[dr]\\
& {C'} \ar[rr]
&& {D'}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix@=2ex{
{A} \ar[rr] \ar[dr] \ar[dd]
&& {B} \ar[dr] \ar'[d][dd]\\
& {A'} \ar[rr] \ar[dd]
&& {B'} \ar[dd]\\
{C} \ar'[r][rr] \ar[dr]
&& {D} \ar[dr]\\
& {C'} \ar[rr]
&& {D'}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsection{Labeling the arrows}
\label{sec:labelarrow}
It's possible to label an arrow, on one or both sides of the arrow.
(It's also possible to have the label ``break'' the arrow; for this,
see section~\ref{sec:arbreak}.) By default, the label is located
halfway from the center of the source to the center of the target.
This will often be halfway along the arrow, but not if the source and
the target are of different sizes. There are also options to place
the label along the midpoint of the arrow (see
section~\ref{sec:arcent}) or at an arbitrary point between the center
of the source and the center of the target (see
section~\ref{sec:LblArb}).
To put a label above an arrow (where ``above'' means when the paper is
oriented so that the arrow goes left to right), you type
\verb"^{thelabel}" either before or after the target. To put a label
below an arrow (where ``below'' means when the paper is oriented so
that the arrow goes left to right), you type \verb"_{thelabel}" either
before or after the target. Thus, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A}\ar[r]^{f} \ar[d]_{g}
&{B} \ar[d]^{h}\\
{C} \ar[r]_{k}^{\text{above}}
&{D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A}\ar[r]^{f} \ar[d]_{g}
&{B} \ar[d]^{h}\\
{C} \ar[r]_{k}^{\text{above}}
&{D}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsubsection{Centering the labels on the arrows}
\label{sec:arcent}
If you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{X\cup_{Y}Z} \ar[r]^{f} \ar[d]_{g}
&{B} \ar[d]^{h}\\
{C} \ar[r]_{k}
&{D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{X\cup_{Y}Z} \ar[r]^{f} \ar[d]_{g}
&{B} \ar[d]^{h}\\
{C} \ar[r]_{k}
&{D}
}
\end{displaymath}
Note that the label $f$ is halfway from the center of the arrow's
source to the center of the arrow's target, but it is not centered
along the arrow. To have that label centered along the arrow, we
insert a \verb"-" immediately following the \verb"^", so that we type
it as
\begin{center}
\verb"\ar[r]^-{f}"
\end{center}
and we then get
\begin{displaymath}
\xymatrix{
{X\cup_{Y}Z} \ar[r]^-{f} \ar_{g}[d]
&{B} \ar^{h}[d]\\
{C} \ar_{k}[r]
&{D}
}
\end{displaymath}
For another example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A \amalg_{B} C} \ar[r]^{\text{Add}}_{\sigma} \ar[d]
& {X} \ar[d]^{\psi}\\
{Y} \ar[r]^{\alpha}_{\text{Lifted}} \ar[r]
& {P\times_{Q}R}
}
\end{displaymath}
\end{verbatim}
you'll get
\begin{displaymath}
\xymatrix{
{A \amalg_{B} C} \ar[r]^{\text{Add}}_{\sigma} \ar[d]
& {X} \ar[d]^{\psi}\\
{Y} \ar[r]^{\alpha}_{\text{Lifted}} \ar[r]
& {P\times_{Q}R}
}
\end{displaymath}
but if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A \amalg_{B} C} \ar[r]^-{\text{Add}}_-{\sigma} \ar[d]
& {X} \ar[d]\\
{Y} \ar[r]^-{\alpha}_-{\text{Lifted}}
& {P\times_{Q}R}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A \amalg_{B} C} \ar[r]^-{\text{Add}}_-{\sigma} \ar[d]
& {X} \ar[d]\\
{Y} \ar[r]^-{\alpha}_-{\text{Lifted}}
& {P\times_{Q}R}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsubsection{Arbitrary placement of labels}
\label{sec:LblArb}
In addition to the possibility of centering a label along an arrow
(see section~\ref{sec:arcent}), it is possible to place a label at an
arbitrary point between the center of the source and the center of the
target. If \texttt{a} is a number between $0$ and $1$, then you can
place a label \texttt{a} of the way from the center of the source to
the center of the target by typing \verb"(a)" immediately following
the \verb"^" or \verb"_". For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix@C=8em{
{A} \ar[r]^(.3){f} \ar[d]
& {B} \ar[d]\\
{C} \ar[r]^{g} \ar[d]
& {D} \ar[d]\\
{E} \ar[r]_(.7){h}
& {F}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix@C=8em{
{A} \ar[r]^(.3){f} \ar[d]
& {B} \ar[d]\\
{C} \ar[r]^{g} \ar[d]
& {D} \ar[d]\\
{E} \ar[r]_(.7){h}
& {F}
}
\end{displaymath}
For a more elaborate example, with labels along segments of segmented
arrows, see diagram~\ref{diag:LblCube}.
%--------------------------------------------------------------------
\subsubsection{Labeling each segment of a segmented arrow}
\label{sec:LblSeg}
An arrow that uses the ``arrows passing under'' feature (see
section~\ref{sec:ArUnder}) will be in several segments, and a label
can be attached to each of the segments. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar '[r]^{f} '[rr]^{g} [rrr]^{h}
& {B}
& {}
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar '[r]^{f} '[rr]^{g} [rrr]^{h}
& {B}
& {}
& {D}
}
\end{displaymath}
For a more elaborate example, if you type
\begin{verbatim}
\begin{equation}
\label{diag:LblCube}
\vcenter{
\xymatrix@=2ex{
{A} \ar[rr]^{f} \ar[dr] \ar[dd]_{i}
&& {B} \ar[dr] \ar'[d][dd]^(.3){j}\\
& {A'} \ar[rr]^(.3){f'} \ar[dd]^(.25){i'}
&& {B'} \ar[dd]^{j'}\\
{C} \ar'[r]^{g}[rr] \ar[dr]
&& {D} \ar[dr]\\
& {C'} \ar[rr]_{g'}
&& {D'}
}
}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{diag:LblCube}
\vcenter{
\xymatrix@=2ex{
{A} \ar[rr]^{f} \ar[dr] \ar[dd]_{i}
&& {B} \ar[dr] \ar'[d][dd]^(.3){j}\\
& {A'} \ar[rr]^(.3){f'} \ar[dd]^(.25){i'}
&& {B'} \ar[dd]^{j'}\\
{C} \ar'[r]^{g}[rr] \ar[dr]
&& {D} \ar[dr]\\
& {C'} \ar[rr]_{g'}
&& {D'}
}
}
\end{equation}
%--------------------------------------------------------------------
\subsubsection{Breaking an arrow with a label}
\label{sec:arbreak}
Instead of placing a label to the side of an arrow, you can have the
label ``break'' the arrow. For this, you use the vertical bar
character \verb"|" in place of either \verb"^" or \verb"_".
For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r]|{f}
& {B} \ar[r]|{g}
& {C}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r]|{f}
& {B} \ar[r]|{g}
& {C}
}
\end{displaymath}
A label that breaks an arrow can be positioned anywhere along the
arrow, just as for labels placed alongside the arrow (see
sections~\ref{sec:arcent} and \ref{sec:LblArb}). For example, if you
type
\begin{verbatim}
\begin{equation*}
\xymatrix{
{A \amalg_{B} C} \ar[r]|-{f} \ar[d]_{i}
& {X} \ar[r]|(.7){m} \ar[d]^{p}
& {Y} \ar[dl]|(.3)n\\
{D} \ar[r]|-{g}
& {W \times_{Z} Y}
}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\xymatrix{
{A \amalg_{B} C} \ar[r]|-{f} \ar[d]_{i}
& {X} \ar[r]|(.7){m} \ar[d]^{p}
& {Y} \ar[dl]|(.3)n\\
{D} \ar[r]|-{g}
& {W \times_{Z} Y}
}
\end{equation*}
%--------------------------------------------------------------------
\subsection{More crossing arrows}
\label{sec:CrossArrow}
In section~\ref{sec:ArUnder} we presented a method of having an arrow
pass over another arrow by having them cross at an empty node. We
present here another method of having one arrow pass over another.
To have one arrow appear to cross over another, we create a small gap
in the second arrow at the spot at which the first arrow will cross.
We do this by breaking that second arrow with a label, as in
section~\ref{sec:arbreak}, using the special label \verb"\hole", which
just leaves an empty hole in the arrow. For example, if you type
\begin{verbatim}
\begin{equation*}
\xymatrix{
{A} \ar[dr]|{\hole}
& {B} \ar[dl]\\
{C}
& {D}
}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\xymatrix{
{A} \ar[dr]|{\hole}
& {B} \ar[dl]\\
{C}
& {D}
}
\end{equation*}
For another example, if you type
\begin{verbatim}
\begin{equation*}
\xymatrix{
{A} \ar[dr] \ar[r] \ar[d]
& {B} \ar[r]
& {C}\\
{D} \ar[urr]|(.33){\hole} \ar[r]
& {E}
}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\xymatrix{
{A} \ar[dr] \ar[r] \ar[d]
& {B} \ar[r]
& {C}\\
{D} \ar[urr]|(.33){\hole} \ar[r]
& {E}
}
\end{equation*}
(see section~\ref{sec:LblArb}). It took some trial and error to
figure out that \texttt{.33} was the number to use in the arrow with
the hole, but there's a much better way specify the location of the
hole: Instead of inserting that number between 0 and 1 that specifies
how far from the center of the source to the center of the target the
break should appear, you can specify the place to put the break using
the notation \verb"!{[node1];[node2]}" to denote the point on the
arrow at which a straight line from \verb"[node1]" to \verb"[node2]"
would cross the arrow. (\emph{Note:} This method only works for
straight line arrows.) That is, if you type
\begin{verbatim}
\begin{equation*}
\xymatrix{
{A} \ar[dr] \ar[r] \ar[d]
& {B} \ar[r]
& {C}\\
{D} \ar[urr]|!{[u];[r]}{\hole} \ar[r]
& {E}
}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\xymatrix{
{A} \ar[dr] \ar[r] \ar[d]
& {B} \ar[r]
& {C}\\
{D} \ar[urr]|!{[u];[r]}{\hole} \ar[r]
& {E}
}
\end{equation*}
The position of the hole is specified as \verb"!{[u];[r]}" because the
arrow with the hole begins at $D$ and, relative to that node, the
arrow that crosses over goes from the node \verb"[u]" to the node
\verb"[r]".
For another example, if you type
\begin{verbatim}
\begin{equation*}
\xymatrix{
{A} \ar[d] \ar[dr]
& {B} \ar[d] \ar[dr]
& {C} \ar[d]\\
{D}
\ar[urr]|!{[u];[r]}{\hole}
|!{[ur];[r]}{\hole}
|!{[ur];[rr]}{\hole}
& {E}
& {F}
}
\end{equation*}
\end{verbatim}
then you'll get
\begin{equation*}
\xymatrix{
{A} \ar[d] \ar[dr]
& {B} \ar[d] \ar[dr]
& {C} \ar[d]\\
{D}
\ar[urr]|!{[u];[r]}{\hole}
|!{[ur];[r]}{\hole}
|!{[ur];[rr]}{\hole}
& {E}
& {F}
}
\end{equation*}
%--------------------------------------------------------------------
\subsection{Making room for large labels}
\label{sec:labelroom}
Although \Xy-pic automatically leaves enough room for large nodes, it
ignores the size of the labels on the arrows when constructing the
diagram. Thus, if you have a particularly large label, it may
overwrite the nodes if you don't do something to make the diagram
larger. You can do that either by enlarging the entire diagram (see
section~\ref{sec:LblEnlrgeDiag}) or by creating a row (or column) all
of whose nodes are empty and have the arrows span the empty row (or
column) (see section~\ref{sec:emptynodes}).
%--------------------------------------------------------------------
\subsubsection{Enlarging the entire diagram}
\label{sec:LblEnlrgeDiag}
To enlarge the entire diagram, we use the spacing commands described
in section~\ref{sec:ChgSpc}. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A\amalg B} \ar[d]
\ar[r]^-{\operatorname{amalgamate}}
& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D}
\ar[r]_-{\operatorname{amalgamate}}
& {Y} \ar[r]
& {Q}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A\amalg B} \ar[d]
\ar[r]^-{\operatorname{amalgamate}}
& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D}
\ar[r]_-{\operatorname{amalgamate}}
& {Y} \ar[r]
& {Q}
}
\end{displaymath}
but if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix@C=6em{
{A\amalg B} \ar[d] \ar[r]^-{\operatorname{amalgamate}}
& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D} \ar[r]_-{\operatorname{amalgamate}}
& {Y} \ar[r]
& {Q}
}
\end{displaymath}
\end{verbatim}
(see section~\ref{sec:ChgSpc}) then you'll get
\begin{displaymath}
\xymatrix@C=6em{
{A\amalg B} \ar[d] \ar[r]^-{\operatorname{amalgamate}}
& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D} \ar[r]_-{\operatorname{amalgamate}}
& {Y} \ar[r]
& {Q}
}
\end{displaymath}
If you don't want to have to make the entire diagram larger, you can
just create a column of empty nodes (see
section~\ref{sec:emptynodes}).
%--------------------------------------------------------------------
\subsubsection{Creating a column of empty nodes}
\label{sec:emptynodes}
We continue the discussion of section~\ref{sec:LblEnlrgeDiag}: Instead
of enlarging the entire diagram, you can create an additional column
in between the first two columns and have all the nodes in the new
column be empty. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}}
&& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D} \ar[rr]_-{\operatorname{amalgamate}}
&& {Y} \ar[r]
& {Q}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}}
&& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D} \ar[rr]_-{\operatorname{amalgamate}}
&& {Y} \ar[r]
& {Q}
}
\end{displaymath}
Note that that diagram has four columns, but both of the nodes in the
second column are empty, and the labelled arrows are created as
\verb"\ar[rr]". If you'd like to create even more space for that
large label, you can put an \verb"\hspace" command into one of the
nodes in the second column. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}}
& {\hspace{3em}}
& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D} \ar[rr]_-{\operatorname{amalgamate}}
&& {Y} \ar[r]
& {Q}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}}
& {\hspace{3em}}
& {X} \ar[r] \ar[d]
& {P} \ar[d]\\
{C \amalg D} \ar[rr]_-{\operatorname{amalgamate}}
&& {Y} \ar[r]
& {Q}
}
\end{displaymath}
Note that we only put the \verb"\hspace" command into the first row;
there's no need to put it into every row.
%--------------------------------------------------------------------
\subsection{Different arrow styles}
\label{sec:arstyle}
It's possible to have arrows with tails, multiple heads, dotted,
dashed, or multiple shafts, and any combination of these (see
Table~\ref{tab:ArSty}). You can even omit both the head and the tail,
or omit the arrow entirely, which is useful for placing things into
the diagram in places outside of the grid of nodes (see
Diagram~\ref{diag:CentEq}).
\begin{table}
\centering
\begin{tabular}{c@{\qquad\qquad}l}
To produce:& \multicolumn{1}{c}{Type:}\\[1ex]
$\xymatrix{\ar@{.>}[r]&}$& \verb"\ar@{.>}[r]"\\
$\xymatrix{\ar@{-->}[r]&}$& \verb"\ar@{-->}[r]"\\
$\xymatrix{\ar@{=>}[r]&}$& \verb"\ar@{=>}[r]"\\
$\xymatrix{\ar@{:>}[r]&}$& \verb"\ar@{:>}[r]"\\
$\xymatrix{\ar@{->>}[r]&}$& \verb"\ar@{->>}[r]"\\
$\xymatrix{\ar@{>->}[r]&}$& \verb"\ar@{>->}[r]"\\
$\xymatrix{\ar@{<->}[r]&}$& \verb"\ar@{<->}[r]"\\
$\xymatrix{\ar@{-->>}[r]&}$& \verb"\ar@{-->>}[r]"\\
$\xymatrix{\ar@{>-->}[r]&}$& \verb"\ar@{>-->}[r]"\\
$\xymatrix{\ar@{<-->}[r]&}$& \verb"\ar@{<-->}[r]"\\
$\xymatrix{\ar@{|->}[r]&}$& \verb"\ar@{|->}[r]"\\
$\xymatrix{\ar@{^{(}->}[r]&}$& \verb"\ar@{^{(}->}[r]"\\
$\xymatrix{\ar@{_{(}->}[r]&}$& \verb"\ar@{_{(}->}[r]"\\
$\xymatrix{\ar@{=>>}[r]&}$& \verb"\ar@{=>>}[r]"\\
$\xymatrix{\ar@{<=>}[r]&}$& \verb"\ar@{<=>}[r]"\\
$\xymatrix{\ar@{:>>}[r]&}$& \verb"\ar@{:>>}[r]"\\
$\xymatrix{\ar@{<:>}[r]&}$& \verb"\ar@{<:>}[r]"\\
$\xymatrix{\ar@{-}[r]&}$& \verb"\ar@{-}[r]"\\
$\xymatrix{\ar@{.}[r]&}$& \verb"\ar@{.}[r]"\\
$\xymatrix{\ar@{=}[r]&}$& \verb"\ar@{=}[r]"\\
$\xymatrix{\ar@{}[r]&}$& \verb"\ar@{}[r]"\\[1ex]
\end{tabular}
\caption{Arrow Styles}
\label{tab:ArSty}
\end{table}
All of these arrows can point in whatever direction you choose; we
used \verb"[r]" in the table just for readability. For an example of
the use of invisible arrows: If you type
\begin{verbatim}
\begin{equation}
\label{diag:CentEq}
\vcenter{
\xymatrix{
{A} \ar@{.>}[r] \ar@{.>}[d] \ar@{}[dr]|{=}
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}
}
\end{equation}
\end{verbatim}
then you'll get
\begin{equation}
\label{diag:CentEq}
\vcenter{
\xymatrix{
{A} \ar@{.>}[r] \ar@{.>}[d] \ar@{}[dr]|{=}
& {B} \ar[d]\\
{C} \ar[r]
& {D}
}
}
\end{equation}
Note that the equals sign is inserted by having it break the middle of
the invisible arrow from the upper left node to the lower right node.
%--------------------------------------------------------------------
\subsection{Curved arrows}
\label{sec:arcurve}
It's possible to have arrows curve, either by specifying the amount
that they curve or by specifying the direction in which they leave
their source and the direction from which they arrive at their
target.
%--------------------------------------------------------------------
\subsubsection{Specifying the amount of the curve}
To have an arrow curve in the up direction (where ``up'' means when
the paper is oriented so that the arrow goes left to right) by a
default amount you follow the \verb"\ar" with \verb"@/^/"; that is,
you type \verb"\ar@/^/[target]". To have it curve in the down
direction by a default amount you follow the \verb"\ar" with
\verb"@/_/"; that is, you type \verb"\ar@/_/[target]" (or, if you want
to label the arrow, \verb"\ar@/_/[target]^{label}"). Thus, if you
type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@/^/[drr]^{p} \ar@{.>}[dr]|{\exists!} \ar@/_/[ddr]_{q}\\
& {B} \ar[r] \ar[d]
& {C} \ar[d]\\
& {D} \ar[r]
& {E}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@/^/[drr]^{p} \ar@{.>}[dr]|{\exists!} \ar@/_/[ddr]_{q}\\
& {B} \ar[r] \ar[d]
& {C} \ar[d]\\
& {D} \ar[r]
& {E}
}
\end{displaymath}
If you'd like to specify the amount of curve, you can specify a
dimension following the \verb"^" or the \verb"_", as in
\verb"\ar@/^1ex/[target]". (Although you can use whatever units you
like for \texttt{dimen} (e.g., inches (\texttt{in}), centimeters
(\texttt{cm}), points (\texttt{pt}), etc.), it's a good idea to
measure vertical distances in \texttt{ex} (roughly the height of an
upper case ``X'') and horizontal distances in \texttt{em} (roughly the
width of an upper case ``M''), so that the distance will be roughly
correct even if you change font sizes.) For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@/^3ex/[drr]^{p} \ar@{.>}[dr]|{\exists!}
\ar@/_3ex/[ddr]_{q}\\
& {B} \ar[r] \ar[d]
& {C} \ar[d]\\
& {D} \ar[r]
& {E}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@/^3ex/[drr]^{p} \ar@{.>}[dr]|{\exists!}
\ar@/_3ex/[ddr]_{q}\\
& {B} \ar[r] \ar[d]
& {C} \ar[d]\\
& {D} \ar[r]
& {E}
}
\end{displaymath}
and if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@{>->}[r]^{i}
& {B} \ar@{->>}[r]^{p}
& {C} \ar@{.>}@/_4ex/[l]_{s}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@{>->}[r]^{i}
& {B} \ar@{->>}[r]^{p}
& {C} \ar@{.>}@/_4ex/[l]_{s}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsubsection{Specifying the start and end directions}
\label{sec:CrvStEd}
To specify the start and end directions of a curved arrow you type
\verb"\ar@(start,end)[target]" where ``\verb"start"'' is the direction
towards which the arrow begins and ``\verb"end"'' is the direction
from which the arrow ends. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[dr]|{p} \ar@(r,u)[dr]^{f} \ar@(d,l)[dr]_{g}\\
& {B}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[dr]|{p} \ar@(r,u)[dr]^{f} \ar@(d,l)[dr]_{g}\\
& {B}
}
\end{displaymath}
and if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@(ur,ul)[rr]^{1_{A}} \ar[r]_{f}
& {B} \ar[r]_{g} \ar@(dr,dl)[rr]_{1_{B}}
& {A} \ar[r]_{f}
& {B}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@(ur,ul)[rr]^{1_{A}} \ar[r]_{f}
& {B} \ar[r]_{g} \ar@(dr,dl)[rr]_{1_{B}}
& {A} \ar[r]_{f}
& {B}
}
\end{displaymath}
Since the current node is denoted \verb"[]" (i.e., a pair of square
brackets with nothing inside), if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@(ur,dr)[]^{f}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@(ur,dr)[]^{f}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsection{Sliding arrows sideways; multiple arrows}
\label{sec:arslide}
It's possible to slide arrows sideways, so that you can have more than
one straight line arrow between a single pair of nodes. To do this,
you type \verb"\ar@<dimen>" to move the arrow ``upwards'' by
\verb"dimen" (where ``upwards'' means when the paper is held so that
the arrow goes from left to right). (A negative \verb"dimen" will
move the arrow ``downwards''.) Although you can use whatever units
you like for \texttt{dimen} (e.g., inches (\texttt{in}), centimeters
(\texttt{cm}), points (\texttt{pt}), etc.), it's a good idea to
measure vertical distances in \texttt{ex} (roughly the height of an
upper case ``X'') and horizontal distances in \texttt{em} (roughly the
width of an upper case ``M''), so that the distance will be roughly
correct even if you change font sizes. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@<1ex>[r]
& {B} \ar[r]
& {C} \ar@<-1ex>[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@<1ex>[r]
& {B} \ar[r]
& {C} \ar@<-1ex>[r]
& {D}
}
\end{displaymath}
For another example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{\coprod_{i \in I} A_{i}\quad}
\ar@<+.7ex>[r]^-{\phi} \ar@<-.7ex>[r]_-{\psi}
& {\quad\coprod_{i \in I} B_{i}}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{\coprod_{i \in I} A_{i}\quad}
\ar@<+.7ex>[r]^-{\phi} \ar@<-.7ex>[r]_-{\psi}
& {\quad\coprod_{i \in I} B_{i}}
}
\end{displaymath}
It's also possible to slide curved arrows sideways. For example, if
you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar@/^ 1ex/[r] \ar@/^ 1ex/@<1ex>[r]
& {B}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar@/^ 1ex/[r] \ar@/^ 1ex/@<1ex>[r]
& {B}
}
\end{displaymath}
%--------------------------------------------------------------------
\subsection{Specifying both the source and the target of an arrow}
\label{sec:SrcTrgt}
Up until now, all of our examples of arrows have gone from the current
node to a node specified in the code for the arrow. It's possible,
however, to specify both the source and the target of an arrow, rather
than letting the source be the current node. This allows you to save
the description of all of the arrows of a diagram until the end.
To draw an arrow who's source may not be at the current node, you type
\begin{center}
\verb"\ar[source];[target]"
\end{center}
instead of just \verb"\ar[target]". Since the current node is denoted
\verb"[]", typing \verb"\ar[target]" is the same as typing
\verb"\ar[];[target]".
For example, if you
type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A}
& {B}\\
{C}
& {D}
\ar^{f}[ul];[u]
\ar_{g}[l];[]
\ar_{h}[ul];[l]
\ar^{k}[u];[]
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A}
& {B}\\
{C}
& {D}
\ar^{f}[ul];[u]
\ar_{g}[l];[]
\ar_{h}[ul];[l]
\ar^{k}[u];[]
}
\end{displaymath}
Note that when we drew the arrows the current node was $D$, and so,
e.g., the target of the arrow labelled $g$ was specified as \verb"[]"
(which denotes the current node).
%--------------------------------------------------------------------
\subsection{Absolute specification of the source and target of an arrow}
\label{sec:AbsDesc}
Up until now, the target and source (see section~\ref{sec:SrcTrgt}) of
an arrow were always specified relative to the current node (see
section~\ref{sec:basicdiag}). It is possible to give instead an
absolute specification of the target and source of an arrow.
Each node of a diagram can be specified as
\begin{center}
\verb!"p,q"!
\end{center}
(including the double quote symbols) where \verb"p" is the row number
(counting from the top, where the first row is row number $1$) and
\verb"q" is the column number (counting from the left, where the first
column is column number $1$). For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar^{f}"1,2" \ar_{h}"2,1"
& {B} \ar^{k}"2,2"\\
{C} \ar_{g}"2,2"
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar^{f}"1,2" \ar_{h}"2,1"
& {B} \ar^{k}"2,2"\\
{C} \ar_{g}"2,2"
& {D}
}
\end{displaymath}
In that example, each arrow began at the current node. For example,
the arrow labelled $f$ began at the current node $A$ (and so it's
source was not specified) and its target $B$ was specified as
\verb!"1,2"! because it is in the first row, second column.
As described in section~\ref{sec:SrcTrgt}, you can also specify both
the source and target of an arrow, and this allows you to save the
specification of all the arrows until the end of the diagram. For
example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A}
& {B}
& {C}\\
{D}
& {E}
& {F}
\ar_{f} "1,1";"1,2"
\ar_{g} "1,2";"1,3"
\ar@(ur,ul)^{h} "1,1";"1,3"
\ar"1,1";"2,1"
\ar"1,2";"2,2"
\ar"1,3";"2,3"
\ar^{p} "2,1";"2,2"
\ar^{q} "2,2";"2,3"
\ar@(dr,dl)_{r} "2,1";"2,3"
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A}
& {B}
& {C}\\
{D}
& {E}
& {F}
\ar_{f} "1,1";"1,2"
\ar_{g} "1,2";"1,3"
\ar@(ur,ul)^{h} "1,1";"1,3"
\ar"1,1";"2,1"
\ar"1,2";"2,2"
\ar"1,3";"2,3"
\ar^{p} "2,1";"2,2"
\ar^{q} "2,2";"2,3"
\ar@(dr,dl)_{r} "2,1";"2,3"
}
\end{displaymath}
(For a description of the curved arrows, see
section~\ref{sec:CrvStEd}.) Note that, e.g., the arrow labelled $f$
is specified as
\begin{center}
\verb!\ar_{f} "1,1";"1,2"!
\end{center}
because it starts at $A$, which is in row $1$ column $1$, and goes to
$B$, which is in row $1$ column $2$.
%--------------------------------------------------------------------
\subsection{Nodes off of the grid}
\label{sec:NdOffGrd}
It's possible to place a node at an arbitrary point in the diagram
without affecting the positioning of the other nodes. You can also
assign a \emph{name} to the node that you can use later to draw arrows
to or from that node.
You place a node off the grid using the \emph{excursion} commands
\begin{center}
\verb"\save"\qquad and\qquad\verb"\restore"
\end{center}
In between those commands you can put commands to
\begin{itemize}
\item move from the current node using a displacement vector
``\verb"[]+<Dx,Dy>"'' (where \verb"Dx" is the horizontal
displacement and \verb"Dy" is the vertical displacement),
\item typeset a node there using ``\verb"*+{stuff}"'',
\item optionally name that node using ``\verb!*+{stuff}="name"!'', and
\item optionally draw arrows from whatever you've typeset there to
other nodes in the diagram. If you've named the new node, you can
specify the arrows later on, and the arrows can either start from
this node or go to this node (or both, as in the second example in
this section).
\end{itemize}
Although you can use whatever units you like for the displacements
(e.g., inches (\texttt{in}), centimeters (\texttt{cm}), points
(\texttt{pt}), etc.), it's a good idea to measure vertical distances
in \texttt{ex} (roughly the height of an upper case ``X'') and
horizontal distances in \texttt{em} (roughly the width of an upper
case ``M''), so that the displacement will be roughly correct even if
you change font sizes.
For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\save []+<3em, 3em>*+{H}
\ar@(l,ur)_{p}[l] \ar@(d,ur)^{r}[d] \ar_{q}[]
\restore
\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\save []+<3em, 3em>*+{H}
\ar@(l,ur)_{p}[l] \ar@(d,ur)^{r}[d] \ar_{q}[]
\restore
\\
{C} \ar[r]
& {D}
}
\end{displaymath}
We created the node $H$ off of the grid by starting at the node $B$
(in the first row, second column) and moving \verb"3em" to the right
and \verb"3em" up. We then drew three arrows starting at that node:
\begin{itemize}
\item The arrow $p$ goes to the node $A$, and so its target is
specified as \verb"[l]" since that is one node to the left of the
node $B$ (which is the current node from which we were on an
excursion),
\item the arrow $q$ goes to the node $B$, and so its target is
specified as \verb"[]" (a pair of square brackets with nothing
inside) since that is the current node, and
\item the arrow $r$ goes to the node $D$, and so its target is
specified as \verb"[d]" since it is one node below the current
node.
\end{itemize}
For another example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
\save []+<4em,1em>*+{H}="firstthing" \restore
\save []+<-1em,-3em>*+{K}="secondthing" \restore
\ar"firstthing";"1,2"_{p}
\ar"firstthing";"2,2"_{q}
\ar@(d,r)"firstthing";"secondthing"^{r}
\ar"secondthing";"2,2"_{s}
\ar"secondthing";"2,1"^{t}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]\\
{C} \ar[r]
& {D}
\save []+<4em,1em>*+{H}="firstthing" \restore
\save []+<-1em,-3em>*+{K}="secondthing" \restore
\ar"firstthing";"1,2"_{p}
\ar"firstthing";"2,2"_{q}
\ar@(d,r)"firstthing";"secondthing"^{r}
\ar"secondthing";"2,2"_{s}
\ar"secondthing";"2,1"^{t}
}
\end{displaymath}
In this diagram, the only nodes on the grid are $A$, $B$, $C$, and
$D$. After creating the nodes and arrows on the grid, we created the
nodes $H$ and $K$ and the arrows that go to and from these nodes.
\begin{itemize}
\item We created each of the nodes $H$ and $K$ with an excursion from
the node $D$, giving the name \texttt{firstthing} to the node $H$
and the name \texttt{secondthing} to the node \verb"K".
\item Each of the arrows to or from the nodes $H$ and $K$ specify both
their source and their target (a semicolon separates the source from
the target; see section~\ref{sec:SrcTrgt}).
\item Each of the arrows from either $H$ or $K$ to one of the nodes on
the grid describes that node on the grid absolutely (see
section~\ref{sec:AbsDesc}).
\end{itemize}
The arrow from $H$ to $K$ begins \verb"\ar@(d,r)" because it is a
curved arrow (see section~\ref{sec:CrvStEd}). Since that arrow goes
from the node $H$ (named \texttt{firsthing}) to the node $K$ (named
\texttt{secondthing}), the arrow is specified as
\begin{center}
\verb!\ar@(d,r)"firstthing";"secondthing"!
\end{center}
Finally, that arrow is labelled $r$, and so the complete specification
is
\begin{center}
\verb!\ar@(d,r)"firstthing";"secondthing"^{r}!
\end{center}
For another example, we show how to annotate ``diagram chase'' proofs
in homological algebra. If you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r]^{\alpha} \ar[d]_{f}
& {B} \ar[r]^{\beta} \ar[d]_{g}
% Add the element b of B:
\save []+<2ex,3ex>*+{b}="b"\restore
& {C} \ar[r]^{\gamma} \ar[d]_{h}
% Add the element c of C:
\save []+<0ex,3ex>*+{c}="c"\restore
& {D} \ar[r]^{\delta} \ar[d]_{j}
% Add the element d of D:
\save []+<2ex,3ex>*+{d}="d"\restore
& {E} \ar[d]_{k}\\
{A'} \ar[r]^{\alpha'}
& {B'} \ar[r]^{\beta'}
% Add the element b' of B':
\save []+<2ex,-5ex>*+{b'}="bprime"\restore
& {C'} \ar[r]^{\gamma'}
% Add the element c' of C':
\save []+<0ex,-3ex>*+{c'}="cprime"\restore
% Add the element c'-gamma(c) of C':
\save []+<1.5ex,-5ex>*+{(c'-\gamma(c))}="cprimeminus"\restore
& {D'} \ar[r]^{\delta'}
% Add the element \gamma'(c') of D':
\save []+<2ex,-3ex>*+{\gamma'(c')}="gammacprime"\restore
& {E'}
% Add the arrows connecting the elements:
\ar@{|->}"b";"bprime"
\ar@{|->}"c";"d"
\ar@{|->}"d";"gammacprime"
\ar@{|->}"cprime";"gammacprime"
\ar@{|->}"bprime";"cprimeminus"
}
\end{displaymath}
\end{verbatim}
then you'll get the following diagram, which that might be used in
part of the proof of the ``five lemma''.
\begin{displaymath}
\xymatrix{
{A} \ar[r]^{\alpha} \ar[d]_{f}
& {B} \ar[r]^{\beta} \ar[d]_{g}
% Add the element b of B:
\save []+<2ex,3ex>*+{b}="b"\restore
& {C} \ar[r]^{\gamma} \ar[d]_{h}
% Add the element c of C:
\save []+<0ex,3ex>*+{c}="c"\restore
& {D} \ar[r]^{\delta} \ar[d]_{j}
% Add the element d of D:
\save []+<2ex,3ex>*+{d}="d"\restore
& {E} \ar[d]_{k}\\
{A'} \ar[r]^{\alpha'}
& {B'} \ar[r]^{\beta'}
% Add the element b' of B':
\save []+<2ex,-5ex>*+{b'}="bprime"\restore
& {C'} \ar[r]^{\gamma'}
% Add the element c' of C':
\save []+<0ex,-3ex>*+{c'}="cprime"\restore
% Add the element c'-gamma(c) of C':
\save []+<1.5ex,-5ex>*+{(c'-\gamma(c))}="cprimeminus"\restore
& {D'} \ar[r]^{\delta'}
% Add the element \gamma'(c') of D':
\save []+<2ex,-3ex>*+{\gamma'(c')}="gammacprime"\restore
& {E'}
% Add the arrows connecting the elements:
\ar@{|->}"b";"bprime"
\ar@{|->}"c";"d"
\ar@{|->}"d";"gammacprime"
\ar@{|->}"cprime";"gammacprime"
\ar@{|->}"bprime";"cprimeminus"
}
\end{displaymath}
%--------------------------------------------------------------------
\subsection{Text objects}
\label{sec:TextObj}
You can insert a text object into a diagram by typing
\begin{center}
\verb"*\txt{Some text}"\quad or\quad \verb"*\txt<width>{Some text}"
\end{center}
In the first form you create linebreaks with a double backslash
``\verb"\\"'' and in the second form the lines are broken
automatically. Text objects by default don't have any blank space
around them, but you can add a bit of space by typing them as
\verb"*+\txt{Some text}", or even more space by typing them as
\verb"*++\txt{Some text}".
For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
*+\txt{Roses are red,\\ Violets are blue.\\
This is a contrived example,\\ And the rhyme is bad too.}
\ar@{=>}[r]
& *\txt<2in>{Four score and seven years ago our fathers brought
forth on this continent a new nation, conceived in liberty,
and dedicated to the proposition that all men are created
equal.}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
*+\txt{Roses are red,\\ Violets are blue.\\
This is a contrived example,\\ And the rhyme is bad too.}
\ar@{=>}[r]
& *\txt<2in>{Four score and seven years ago our fathers brought
forth on this continent a new nation, conceived in liberty,
and dedicated to the proposition that all men are created
equal.}
}
\end{displaymath}
We typed that first one as \verb"*+\txt" so that the arrow wouldn't
start too close to the text.
You can also shift a text object to the left (so that arrows to or
from the object will go to its right end instead of its center) by
typing it as
%
\verb"*+[l]\txt{Some text}" or to the right (so that arrows to or from
the object will go to its left end instead of its center) by typing it
as
%
\verb"*+[r]\txt{Some text}" (see section~\ref{sec:ShiftSide}). For
example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
*+[l]\txt{Interior} \ar[r] \ar[d]
& *+[r]\txt{Exterior} \ar[d]\\
{A} \ar[r]
& {B}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
*+[l]\txt{Interior} \ar[r] \ar[d]
& *+[r]\txt{Exterior} \ar[d]\\
{A} \ar[r]
& {B}
}
\end{displaymath}
Text objects are mostly used for adding annotations to a diagram (see
section~\ref{sec:Drop}).
%--------------------------------------------------------------------
\subsection{Arrows off of the grid}
\label{sec:OffGrid}
It's possible to draw arrows that begin or end at points other than
nodes. To do this, you specify the point by choosing a node and then
adding a displacement vector ``\verb"+<Dx,Dy>"'' from that node (where
\verb"Dx" is the horizontal displacement and \verb"Dy" is the vertical
displacement). (Although you can use whatever units you like for the
displacements (e.g., inches (\texttt{in}), centimeters (\texttt{cm}),
points (\texttt{pt}), etc.), it's a good idea to measure vertical
distances in \texttt{ex} (roughly the height of an upper case ``X'')
and horizontal distances in \texttt{em} (roughly the width of an upper
case ``M''), so that the displacement will be roughly correct even if
you change font sizes.) For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[d]+<4em,0ex>\\
{B}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[d]+<4em,0ex>\\
{B}
}
\end{displaymath}
since the arrow is pointing to the spot 4em to the right of the $B$.
For another example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A}
& {B}\\
{C}
& {D}
\ar[ul]+<-2em,0ex>;[]+<2em,0ex>
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A}
& {B}\\
{C}
& {D}
\ar[ul]+<-2em,0ex>;[]+<2em,0ex>
}
\end{displaymath}
(see section~\ref{sec:SrcTrgt}) because we specified the source as
being \verb"[ul]+<-2em,0ex>", i.e., 2em to the left of the node that's
one up and one to the left of the current node ($D$) and the target as
being \verb"[]+<2em,0ex>", i.e., 2em to the right of the current node
($D$).
For an example that combines displacements of source and target along
with curving arrows and labelled arrows: if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r]+<0em,-3ex>^{f}
& {B} \ar@(ur,ur)[d]+<2em,0ex>^{g}\\
{C}
& {D} \ar@/^ 2ex/[l];[]^{h}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r]+<0em,-3ex>^{f}
& {B} \ar@(ur,ur)[d]+<2em,0ex>^{g}\\
{C}
& {D} \ar@/^ 2ex/[l];[]^{h}
}
\end{displaymath}
Realistic examples of arrows off of the grid can be found in
section~\ref{sec:Drop}, where we show how to drop objects into a
diagram at either the source or the target of an arrow.
%--------------------------------------------------------------------
\subsection{Dropping objects into a diagram; annotations}
\label{sec:Drop}
You can drop an object at an arbitrary point of a diagram (i.e., not
necessarily at a node) by drawing an arrow to or from that point (see
section~\ref{sec:OffGrid}) and dropping the object at one of the ends
of the arrow. The object can be either mathematics or a text object
(see section~\ref{sec:TextObj}).
For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<5em,-5ex>*+\txt{This space\\is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<5em,-5ex>*+\txt{This space\\is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
Note that the text and the arrow from it was typed by first creating
the arrow
\begin{center}
\verb"\ar[]+<5em,-5ex>;[]"
\end{center}
whose source is displaced from the current node (see
sections~\ref{sec:SrcTrgt} and \ref{sec:OffGrid}) and whose target is
the current node, and then dropping the text object (see
section~\ref{sec:TextObj}) at the source by inserting
\begin{center}
\verb"*+\txt{This space\\is compact.}"
\end{center}
immediately after the specification of the source.
Note that the arrows to or from a text object by default go to its
center, and if a text object is dropped at a specified point by
default it's the center of the text object that lands at that point.
Thus, if you're typing a wide text object, you should be sure either
to leave enough room so that it doesn't overlap other parts of the
diagram or to shift the text object sideways (as in
section~\ref{sec:ShiftSide}). For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<5em,-5ex>*+\txt{This topological space is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<5em,-5ex>*+\txt{This topological space is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
but if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<10em,-5ex>*+\txt{This topological space is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
(in which we increased the horizontal displacement to 10em) then
you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<10em,-5ex>*+\txt{This topological space is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
and if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<5em,-5ex>*+[r]\txt{This topological space is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
(in which we typed
\begin{center}
\verb"*+[r]\txt{This topological space is compact.}"
\end{center}
to create the text object, i.e., we added ``\verb"[r]"'' to shift the
text object to the right; see section~\ref{sec:ShiftSide}) then you'll
get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]
& {B} \ar[d]
\ar[]+<5em,-5ex>*+[r]\txt{This topological space is compact.};[]\\
{C} \ar[r]
& {D}
}
\end{displaymath}
If you want to drop an object onto a spot other than at a node without
printing an arrow to or from that spot, you can draw an invisible
arrow going to that spot and drop the object at the end of the
invisible arrow. For example, if you type
\begin{verbatim}
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]_{f}
& {B} \ar[d]^{g}
\ar@{}[]+<8em,-4ex>*+\txt{Both $f$ and $g$\\are fibrations.}\\
{C} \ar[r]
& {D}
}
\end{displaymath}
\end{verbatim}
then you'll get
\begin{displaymath}
\xymatrix{
{A} \ar[r] \ar[d]_{f}
& {B} \ar[d]^{g}
\ar@{}[]+<8em,-4ex>*+\txt{Both $f$ and $g$\\are fibrations.}\\
{C} \ar[r]
& {D}
}
\end{displaymath}
The arrow to the text object is invisible because we typed it starting
with \verb"\ar@{}" (see section~\ref{sec:arstyle} and
Diagram~\ref{diag:CentEq}). After that, we typed
\begin{center}
\verb"[]+<8em,-4ex>*+\txt{Both $f$ and $g$\\are fibrations.}"
\end{center}
so that the arrow would go to the point 8em to the right and 4ex below
the current node, and we dropped the text object at that point.
%--------------------------------------------------------------------
%--------------------------------------------------------------------
\section{Including graphics}
\label{sec:graphics}
If you have graphics files that you want to include in your document,
then you should load the \verb"graphicx" package by putting the
command
\begin{center}
\verb"\usepackage{graphicx}"
\end{center}
after your \verb"\documentclass" command. (Note: The spelling
\verb"graphicx" is correct; the package graphicx.sty is the updated
version of the older package graphics.sty.) You can then include
graphics using the \verb"\includegraphics" command.
The standard practice is to include graphics inside of a \verb"figure"
environment, so that it can float to the next page if there isn't
enough room for it on the current page. This also allows you to give
a caption (printed below the graphics) and a label (for use in a
\verb"\ref" command). Thus, if you want to include the contents of
\verb"mygraphic.eps", you might type
\begin{verbatim}
\begin{figure}[h]
\centering
\includegraphics{mygraphics.eps}
\caption{A pretty picture}
\label{fig:pretty}
\end{figure}
\end{verbatim}
and you can then refer to it as \verb"figure~\ref{fig:pretty}". (The
\verb"\centering" command centers the graphics in the figure; this is
preferable to using a \verb"center" environment, which would add
additional vertical space.) It's important to note that the
\verb"\label" command must come \emph{after} the \verb"\caption"
command, since it's the \verb"\caption" command that creates the
number that the \verb"\label" command labels. You can also put the
\verb"\label" command \emph{inside} the caption, as in
\begin{center}
\verb"\caption{A pretty picture\label{fig:pretty}}"
\end{center}
and some people find that this helps prevent errors.
%--------------------------------------------------------------------
\subsection{Graphic formats: Postscript or pdf}
One problem to watch out for is that different versions of \LaTeX{}
require different types of graphics files:
\begin{itemize}
\item Standard \verb"latex" (which produces dvi files) requires
encapsulationed postscript graphics files, while
\item \verb"pdflatex" (which directly produces pdf files) requires pdf
graphics files.
\end{itemize}
This can be confusing, because some installations of \LaTeX{} give you
a \verb"latex" command that is actually running \verb"pdflatex". In
particular, the standard installation of \TeX Shop for Mac OS X gives
you a \verb"latex" command that actually runs \verb"pdflatex" and
produces a pdf file. \TeX Shop can be configured to run standard
\verb"latex" to produce dvi files and then convert them to pdf; for
this, see the list of frequently asked questions at
\begin{center}
\url{http://www.ams.org/authors/author-faq.html}
\end{center}
and search that page for ``texshop''.
On most systems, if you need to include encapsulated postscript
graphics and produce a pdf file, you can use plain old \verb"latex" to
produce a dvi file and then use \verb"dvipdf" to create the pdf file.
Another option is to use the \verb"epstopdf" program to create a
postscript file from your eps file.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Macro definitions, a.k.a.\ \texttt{\bs newcommand}}
\label{sec:definitions}
\LaTeX{} allows you to use the same \verb"\def" command that you use
in plain \TeX, but it's considered bad style. Instead, \LaTeX{} has
the \verb"\newcommand" and \verb"\renewcommand" commands, which do a
little error checking for you. In plain \TeX, you might use the
command
\begin{center}
\verb"\def\tensor{\otimes}"
\end{center}
but in \LaTeX{} the preferred form is
\begin{center}
\verb"\newcommand{\tensor}{\otimes}"
\end{center}
The advantage of this is that \LaTeX{} will check to see if there
already is a command with the name \verb"\tensor" and give you an
error message if there is. If you know that there is a previous
definition of \verb"\tensor" but you \emph{want} to override it,
then you use the command
\begin{center}
\verb"\renewcommand{\tensor}{\otimes}"
\end{center}
If you want to use macros with replaceable parameters, both
\verb"\newcommand" and \verb"\renewcommand" allow this. For the
equivalent of the plain \TeX{} command
\begin{center}
\verb"\def\pushout#1#2#3{#1\cup_{#2}#3}"
\end{center}
you use the \LaTeX{} command
\begin{center}
\verb"\newcommand{\pushout}[3]{#1\cup_{#2}#3}"
\end{center}
i.e., the command name is enclosed in braces, and the number of
parameters is enclosed in square brackets.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{Lists: \texttt{itemize, enumerate, and description}}
There are three list making environments:
\begin{itemize}
\item \texttt{itemize},
\item \texttt{enumerate}, and
\item \texttt{description}.
\end{itemize}
The \texttt{itemize} environment just lists the items with a marker in
front of each one. If you type
\begin{verbatim}
\begin{itemize}
\item This is the first item in the list, which runs on long enough
to spill over onto a second line.
\item This is the second item in the list, which is a bit shorter.
\item This is the last item.
\end{itemize}
\end{verbatim}
then you'll get
\begin{itemize}
\item This is the first item in the list, which runs on long enough
to spill over onto a second line.
\item This is the second item in the list, which is a bit shorter.
\item This is the last item.
\end{itemize}
The \texttt{enumerate} environment looks the same, except that the
items in the list are numbered. If you type
\begin{verbatim}
\begin{enumerate}
\item This is the first item in the list, which runs on long enough
to spill over onto a second line.
\item This is the second item in the list, which is a bit shorter.
\item This is the last item.
\end{enumerate}
\end{verbatim}
then you'll get
\begin{enumerate}
\item This is the first item in the list, which runs on long enough
to spill over onto a second line.
\item This is the second item in the list, which is a bit shorter.
\item This is the last item.
\end{enumerate}
The \texttt{description} environment requires an argument for each
\verb"\item" command, which will be printed at the beginning of the
item. If you type
\begin{verbatim}
\begin{description}
\item[sedge] A green plant, found in both wetlands and uplands.
Sedges are often confused with grasses and rushes.
\item[grass] A green plant, found in both wetlands and uplands.
Grasses are often confused with sedges and rushes.
\item[rush] A green plant, found in both wetlands and uplands.
Rushes are often confused with sedges and grasses
\end{description}
\end{verbatim}
you'll get
\begin{description}
\item[sedge] A green plant, found in both wetlands and uplands.
Sedges are often confused with grasses and rushes.
\item[grass] A green plant, found in both wetlands and uplands.
Grasses are often confused with sedges and rushes.
\item[rush] A green plant, found in both wetlands and uplands.
Rushes are often confused with sedges and grasses
\end{description}
These environments can be inserted within each other, and the
\verb"enumerate" environment keeps track of what level it's at, and
numbers its items accordingly. If you type
\begin{verbatim}
\begin{enumerate}
\item I went to the dry cleaners.
\item I went to the supermarket. I bought
\begin{enumerate}
\item bread,
\item cheese, and
\item Tabasco sauce.
\end{enumerate}
\item I went to the bank.
\end{enumerate}
\end{verbatim}
you'll get
\begin{enumerate}
\item I went to the dry cleaners.
\item I went to the supermarket. I bought
\begin{enumerate}
\item bread,
\item cheese, and
\item Tabasco sauce.
\end{enumerate}
\item I went to the bank.
\end{enumerate}
%--------------------------------------------------------------------
\subsection{Referring to enumerated items by number}
\label{sec:enumref}
If you want to refer to an item in an enumerated list by item number,
then you need to label the item using the \verb"\label" command and
then refer to it using the \verb"\ref" command, just as you do for
sections, subsections, theorems, etc.\ (see
section~\ref{sec:xreferences}). For example, if you type
\begin{verbatim}
\begin{enumerate}
\item \label{step:trans} Put the transmission into drive.
\item \label{step:brake} Release the parking brake.
\item \label{step:move} Start moving.
\end{enumerate}
You must complete steps \ref{step:trans} and \ref{step:brake}
before beginning step~\ref{step:move}.
\end{verbatim}
then you'll get
\begin{enumerate}
\item \label{step:trans} Put the transmission into drive.
\item \label{step:brake} Release the parking brake.
\item \label{step:move} Start moving.
\end{enumerate}
You must complete steps \ref{step:trans} and \ref{step:brake} before
beginning step~\ref{step:move}.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{The bibliography}
\label{sec:bibliography}
The recommended way to create a bibliography is to use the
\texttt{amsrefs} package (see section~\ref{sec:amsrefs}). This makes
it simple to type the bibliography items and have them correctly
formatted and automatically numbered, and makes it possible to change
the style of the bibliography without retyping the items. At the same
time, it allows you to preserve the structure of the information
contained in the items, and (optionally) to create a database of
possible references that can be reused in other documents.
The \texttt{amsrefs} package is fairly new. The classical method of
creating a bibliography from a database of possible references uses
Bib\TeX{}, which is a separate program that must be run in between the
runs of \LaTeX. If you already have one or more BiB\TeX{} databases,
\texttt{amsrefs} can make use of them through a special Bib\TeX{}
style file (see section~\ref{sec:bibtex}).
If for some reason you want to avoid the use of \texttt{amsrefs} and
of Bib\TeX, you can type and format the bibliography items any way you
choose by creating a \texttt{thebibliography} environment (see
section~\ref{sec:thebibliography}).
%--------------------------------------------------------------------
\subsection{Using \texttt{amsrefs}}
\label{sec:amsrefs}
To use \texttt{amsrefs}, you load it by putting the command
\begin{center}
\verb"\usepackage[lite]{amsrefs}"
\end{center}
into the preamble of your document, i.e., after the
\verb"\documentclass" command and before the \verb"\begin{document}"
command. You can then
\begin{enumerate}
\item begin the bibliography with the commands
\begin{verbatim}
\begin{bibdiv}
\begin{biblist}
\end{verbatim}
\item define the bibliography items using a \verb"\bib" command for
each item (see section~\ref{sec:bib}), and then
\item end the bibliography with the commands
\begin{verbatim}
\end{biblist}
\end{bibdiv}
\end{verbatim}
\end{enumerate}
The reason there are two different environments (the outer environment
\texttt{bibdiv} containing the inner environment \texttt{biblist}) is
that the \texttt{bibdiv} environment produces the chapter or section
heading for the bibliography (depending on what's appropriate for the
type of your document) and the \texttt{biblist} environment produces
the actual list of references. You can also type material in between
the \verb"\begin{bibdiv}" and \verb"begin{biblist}" commands and it
will be printed in between the heading for the list and the actual
list.
%--------------------------------------------------------------------
\subsection{The \texttt{\bs bib} command}
\label{sec:bib}
The information for each bibliography item inside the \texttt{bibdiv}
environment (see section~\ref{sec:amsrefs}) is entered using a
\verb"\bib" command. The format of a \verb"\bib" command is
\begin{verbatim}
\bib{ReferenceKey}{ReferenceType}{
comma separated list of keyword={value} statements
}
\end{verbatim}
where \texttt{ReferenceKey} is the key that will be used to refer to
the item with a \verb"\cite" command (see
section~\ref{sec:bibreferences}) and \texttt{ReferenceType} is either
\begin{quote}
\texttt{article}, \texttt{book}, \texttt{misc}, \texttt{report}, or
\texttt{thesis}.
\end{quote}
For example, the bibliography of these notes contains the following
\verb"\bib" commands:
\begin{verbatim}
\bib{yellowmonster}{book}{
author={Bousfield, A.K.},
author={Kan, D.M.},
title={Homotopy Limits, Completions and Localizations},
date={1972},
series={Lecture Notes in Mathematics},
volume={304},
publisher={Springer-Verlag},
address={Berlin-New York}
}
\bib{quil:rht}{article}{
author={Quillen, Daniel G.},
title={Rational Homotopy Theory},
journal={Ann. of Math. (2)},
volume={90},
date={1969},
pages={205--295}
}
\end{verbatim}
If those \verb"\bib" commands are in your \texttt{biblist}
environment, you can type
\begin{center}
\verb"see \cite{yellowmonster} and \cite{quil:rht}"
\end{center}
and it will be typeset as ``see \cite{yellowmonster} and
\cite{quil:rht}''.
Some of the rules governing the \verb"\bib" command are:
\begin{itemize}
\item The keywords must all be typed in lower case. (This is
different from in Bib\TeX{} databases, in which the case of field
names is ignored.)
\item The value in each ``\verb"keyword={value}"'' statement must
always be enclosed in braces. (This is different from in Bib\TeX{}
databases, in which the braces can sometimes be omitted.)
\item Author names must be typed in the form ``von Last, First, Jr.'',
as in ``\verb"author={Jones, John Paul}"'', or
``\verb"author={van Beethoven, Ludwig}"'', or
``\verb"author={Ford, Henry, Jr.}"''. This ensures there won't be
errors in reversing the first and last names, or when
\texttt{amsrefs} replaces the first and middle names with initials
(when the \texttt{initials} option is used; see
section~\ref{sec:refoptions}), or when \texttt{amsrefs} creates a
label based on the last name (when the \texttt{alphabetic} option is
used; see section~\ref{sec:refoptions}).
\item Multiple authors must each be listed in a separate \verb"author"
field.
\item The capitalization in the title should be exactly as you want it
to appear in the bibliography. (This is different from in Bib\TeX{}
databases, in which capitalization is often changed to fit a chosen
style.)
\item The date must be written in the form \verb"date={1776}", or
\verb"date={1776-07}", or \verb"date={1776-07-04}".
\end{itemize}
The full list of simple fields (i.e., fields that can appear at most
once) is
\begin{quote}
\texttt{address}, \texttt{booktitle}, \texttt{date},
\texttt{edition}, \texttt{eprint}, \texttt{hyphenation},
\texttt{journal}, \texttt{label}, \texttt{language}, \texttt{note},
\texttt{number}, \texttt{organization}, \texttt{pages},
\texttt{part}, \texttt{publisher}, \texttt{series}, \texttt{status},
\texttt{subtitle}, \texttt{title}, \texttt{type}, \texttt{volume},
and \texttt{xref}
\end{quote}
The full list of repeatable fields is
\begin{quote}
\texttt{author}, \texttt{editor}, \texttt{translator},
\texttt{isbn}, \texttt{issn}, and \texttt{review}.
\end{quote}
The full list of compound fields (for which the value of each is a
comma separated list of \verb"keyword={value}" statements) is
\begin{quote}
\texttt{book}, \texttt{conference}, \texttt{contribution},
\texttt{partial}, \texttt{reprint}, and \texttt{translation}.
\end{quote}
A description of the less obvious ones can be found in
\cite[section~5.2]{amsrefsguide}.
%--------------------------------------------------------------------
\subsection{Obtaining bibliographic information from MathSciNet}
\label{sec:mathscinet}
If you have access to MathSciNet (at
\url{http://www.ams.org/mathscinet}), then you can obtain a completely
filled out \verb"\bib" command (see section~\ref{sec:bib}) for any of
the publications listed there. To do this:
\begin{itemize}
\item Use MathSciNet to find the Mathematical Reviews review of the
publication.
\item Look near the upper left corner of the page for a pulldown menu
titled ``Select Alternative Format''.
\item Select ``AMSRefs'' from that menu; you'll get a new page showing
the \verb"\bib" command for the publication.
\item Copy that \verb"\bib" command and paste it into your \LaTeX{}
file.
\end{itemize}
%--------------------------------------------------------------------
\subsection{Using a database of possible references}
\label{sec:refbase}
If your list of \verb"\bib" commands (see section~\ref{sec:bib}) grows
so long that you don't want to include it in your \LaTeX{} file, or if
you want to reuse a collection of \verb"\bib" commands from other
papers, you can put all of your \verb"\bib" commands into a file and
have \texttt{amsrefs} extract only the ones used in your current
paper. To do this, you create a file whose name ends in \verb".ltb",
for example: \verb"myrefs.ltb", and put all of your \verb"\bib"
commands into that file. In such a file, it's important that each
\verb"\bib" command begins on a new line, and that that line contains
the first two arguments and the following open brace, as in
\begin{center}
\verb"\bib{ReferenceKey}{ReferenceType}{"
\end{center}
You then delete all of the \verb"\bib" commands from your \LaTeX{}
file and replace them with the single line
\begin{center}
\verb"\bibselect{myrefs}"
\end{center}
and \texttt{amsrefs} will automatically read \verb"myrefs.ltb" and
extract only those items that are cited in the current paper. Thus,
if you have the \verb"\bib" commands for all of your possible
references in the file \verb"myrefs.ltb", and you've loaded
\texttt{amsrefs} with the command \verb"\usepackage[lite]{amsrefs}" in
your preamble (see section~\ref{sec:amsrefs}), then you would create
the bibliography with the lines
\begin{verbatim}
\begin{bibdiv}
\begin{biblist}
\bibselect{myrefs}
\end{biblist}
\end{bibdiv}
\end{verbatim}
If your \LaTeX{} file contains the above lines and your file is named
\verb"mypaper.tex", then \LaTeX{} will create the file
\verb"mypaper.bbl" which will contain the \verb"\bib" commands for
only those references cited in your paper, and \verb"mypaper.bbl" will
automatically be read and used in your \LaTeX{} file.
If your \verb"\bib" commands are spread over several \verb".ltb"
files, you can either list them all, separated by commas, in the
argument of the \verb"\bibselect" command, as in
\begin{center}
\verb"\bibselect{myfirstrefs,mysecondrefs}"
\end{center}
or just use multiple \verb"\bibselect" commands, as in
\begin{center}
\begin{tabular}{l}
\verb"\bibselect{myfirstrefs}"\\
\verb"\bibselect{mysecondrefs}"
\end{tabular}
\end{center}
As described above, a \verb"\bibselect" command uses only the
references actually cited in your document. To list \emph{all} the
references in an \verb".ltb" file, whether or not they're cited in
your document, use the command
\begin{center}
\verb"\bibselect*{myrefs}"
\end{center}
%--------------------------------------------------------------------
\subsection{Using \texttt{amsrefs} with Bib\TeX}
\label{sec:bibtex}
If you already have a Bib\TeX{} database of possible references, you
can use that by combining Bib\TeX{} with \texttt{amsrefs}. If your
references are in the Bib\TeX{} file \verb"myrefs.bib", then you would
load the \texttt{amsrefs} package by putting the command
\verb"\usepackage[lite]{amsrefs}" in your preamble (in the same way
that you would load it if you were using \texttt{amsrefs} without
Bib\TeX; see section~\ref{sec:amsrefs}) and put the single line
\begin{center}
\verb"\bibliography{myrefs}"
\end{center}
where you want the bibliography to appear. (That is, you don't create
the \texttt{bibdiv} or \texttt{biblist} environments.) You then run
Bib\TeX{} on your file in the normal way, and Bib\TeX{} will create
the \verb".bbl" file. That \verb".bbl" file will contain the
\texttt{bibdiv} and \texttt{biblist} environments, and \LaTeX{} will
read it the next time that you run \LaTeX{} and create the
bibliography.
If you use this method, you don't use the \verb"\bibliographystyle"
command (and any such command in your \LaTeX{} file will be ignored).
%--------------------------------------------------------------------
\subsection{Options for the \texttt{amsrefs} package}
\label{sec:refoptions}
There are a number of optional arguments that you can use when loading
the \texttt{amsrefs} package (see section~\ref{sec:amsrefs}), most of
which affect the formatting of the bibliography. You use them by
listing them as optional arguments to the \verb"\usepackage" command
(see section~\ref{sec:amsrefs}). For example, we suggested that you
always use the optional argument \texttt{lite}, as in
\begin{center}
\verb"\usepackage[lite]{amsrefs}"
\end{center}
We'll describe the most important options here; the full list can be
found in \cite[section~6]{amsrefsguide}.
\begin{description}
\item[lite] We suggest that you always use this option in order to
avoid a conflict between \texttt{amsrefs} and the \Xy-pic package
(see section~\ref{sec:xypic}). If you don't use the \texttt{lite}
option, then \texttt{amsrefs} automatically loads the packages
\texttt{mathscinet} (which defines a number of special characters
and accents that are sometimes encountered when downloading data
from MathSciNet) and \texttt{txtcmds} (which provides shorthand
commands for a number of characters that are usually specified via
ligatures). The problem is that both \Xy-pic and the
\texttt{txtcmds} package define the command \verb"\cir" (they define
it to be entirely different things). If you load \texttt{txtcmds}
\emph{before} loading \Xy-pic then \Xy-pic will redefine \verb"\cir"
as it pleases while putting a warning into your \verb".log" file,
but if you load \texttt{txtcmds} \emph{after} loading \Xy-pic then
\LaTeX{} will stop with an error, since the \texttt{txtcmds} package
uses \verb"\newcommand" to define \verb"\cir". Unfortunately, if
you need to use the \texttt{mathscinet} package and you try to load
it by putting the command \verb"\usepackage{mathscinet}" after your
\verb"\documentclass" command, it will also load the
\texttt{txtcmds} package, so this doesn't avoid the conflict.
If you need to use both \Xy-pic and the definitions in the
\texttt{mathscinet} and \texttt{txtcmds} packages, you should load
\texttt{amsrefs} \emph{before} \Xy-pic, as in
\begin{center}
\begin{tabular}{l}
\verb"\usepackage{amsrefs}"\\
\verb"\usepackage[all,cmtip]{xy}"
\end{tabular}
\end{center}
to keep \LaTeX{} from generating an error when loading
\texttt{txtcmds}. (Of course, the command \verb"\cir" as defined in
\texttt{textcmds} will not be available.)
\item[initials] If you use this option, then all authors, editors, and
translators will have their first and middle names replaced by their
initials.
\item[alphabetic] If you use this option, as in
\begin{center}
\verb"\usepackage[alphabetic,lite]{amsrefs}"
\end{center}
then instead of numbers being used to label the bibliography
entries, you will get alphabetic labels similar to the
\texttt{alpha} style used by Bib\TeX, consisting of the first
letter(s) of each author name plus the year of publication.
\item[shortalphabetic] This is similar to the \texttt{alphabetic}
option, except that you'll get a shorter alphabetic label using only
the first letter of each author name.
\item[y2k] If you use the \texttt{alphabetic} option, only the last
two digits of the year are normally used in the label. If you also
use the \texttt{y2k} option, as in
\begin{center}
\verb"\usepackage[y2k,alphabetic,lite]{amsrefs}"
\end{center}
then the full year will be used.
\item[author-year] If you use this option, then bibliography items
will not be labelled at all, and references to them will be in the
author-year format similar to that described in
\verb"The Chicago Manual of Style". If you do use this option, you
may sometimes want to use the \verb"\ycite" and \verb"\ocite"
commands when referring to bibliography items (see
section~\ref{sec:authyrcit}).
\end{description}
%--------------------------------------------------------------------
\subsection{Avoiding both \texttt{amsrefs} and Bib\TeX}
\label{sec:thebibliography}
If for some reason you don't want to use \texttt{amsrefs} or Bib\TeX,
you can type each bibliography item exactly as you want it to appear
and have the items numbered automatically. To do this, you
\begin{enumerate}
\item begin the bibliography with the command
\begin{center}
\verb"\begin{thebibliography}{number}"
\end{center}
where \emph{number} is any number that, when printed, is as wide as
the widest number of any item in the bibliography,
\item define the bibliography items using a \verb"\bibitem" command
for each item (see section~\ref{sec:bibitem}), and then
\item end the bibliography with the command
\begin{center}
\verb"\end{thebibliography}"
\end{center}
\end{enumerate}
The only use made of the \verb"number" in
\verb"\begin{thebibliography}{number}" is that \LaTeX{} assumes that
its width when printed is at least as large as the width of any number
of an item in the bibliography. For example, if the bibliography will
contain between 10 and~99 items, you can use
\verb"\begin{thebibliography}{99}".
%--------------------------------------------------------------------
\subsubsection{Bibliography items}
\label{sec:bibitem}
When using the commands \verb"\begin{thebibliography}" and
\verb"\end{thebibliography}" to create the bibliography (see
section~\ref{sec:thebibliography}), each item is begun with a
\verb"\bibitem" command. The format is
\begin{center}
\verb"\bibitem{ReferenceKey}Item entry"
\end{center}
For example, had we not been using \texttt{amsrefs}, the bibliography
in these instructions might have contained the entry
\begin{verbatim}
\bibitem{yellowmonster}
A. K. Bousfield and D. M. Kan, \emph{Homotopy Limits, Completions
and Localizations,} Lecture Notes in Mathematics number 304,
Springer-Verlag, New York, 1972.
\end{verbatim}
The above entry would allow us to type
\begin{verbatim}
Homotopy inverse limits are discussed
in~\cite[Chapter 11]{yellowmonster}.
\end{verbatim}
and have it print as ``Homotopy inverse limits are discussed
in~\cite[Chapter 11]{yellowmonster}.'' For more on the \verb"\cite"
command, see section~\ref{sec:bibreferences}.
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\section{The template file}
\label{sec:template}
The following is the text of the file \verb"template.tex".
\begin{verbatim}
%%% template.tex
%%% This is a template for making up an AMS-LaTeX file
%%% Version of February 12, 2011
%%%---------------------------------------------------------
%%% The following command chooses the default 10 point type.
%%% To choose 12 point, change it to
%%% \documentclass[12pt]{amsart}
\documentclass{amsart}
%%% The following command loads the amsrefs package, which will be
%%% used to create the bibliography:
\usepackage[lite]{amsrefs}
%%% The following command defines the standard names for all of the
%%% special symbols in the AMSfonts package, listed in
%%% http://www.ctan.org/tex-archive/info/symbols/math/symbols.pdf
\usepackage{amssymb}
%%% The following commands allow you to use \Xy-pic to draw
%%% commutative diagrams. (You can omit the second line if you want
%%% the default style of the nodes to be \textstyle.)
\usepackage[all,cmtip]{xy}
\let\objectstyle=\displaystyle
%%% If you'll be importing any graphics, uncomment the following
%%% line. (Note: The spelling is correct; the package graphicx.sty is
%%% the updated version of the older graphics.sty.)
% \usepackage{graphicx}
%%% This part of the file (after the \documentclass command,
%%% but before the \begin{document}) is called the ``preamble''.
%%% This is where we put our macro definitions.
%%% Comment out (or delete) any of these that you don't want to use.
\newcommand{\tensor}{\otimes}
\newcommand{\homotopic}{\simeq}
\newcommand{\homeq}{\cong}
\newcommand{\iso}{\approx}
\DeclareMathOperator{\ho}{Ho}
\DeclareMathOperator*{\colim}{colim}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\M}{\mathcal{M}}
\newcommand{\W}{\mathcal{W}}
\newcommand{\itilde}{\tilde{\imath}}
\newcommand{\jtilde}{\tilde{\jmath}}
\newcommand{\ihat}{\hat{\imath}}
\newcommand{\jhat}{\hat{\jmath}}
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%% The Theorem environments:
%%%
%%%
%%% The following commands set it up so that:
%%%
%%% All Theorems, Corollaries, Lemmas, Propositions, Definitions,
%%% Remarks, Examples, Notations, and Terminologies will be numbered
%%% in a single sequence, and the numbering will be within each
%%% section. Displayed equations will be numbered in the same
%%% sequence.
%%%
%%%
%%% Theorems, Propositions, Lemmas, and Corollaries will have the most
%%% formal typesetting.
%%%
%%% Definitions will have the next level of formality.
%%%
%%% Remarks, Examples, Notations, and Terminologies will be the least
%%% formal.
%%%
%%% Theorem:
%%% \begin{thm}
%%%
%%% \end{thm}
%%%
%%% Corollary:
%%% \begin{cor}
%%%
%%% \end{cor}
%%%
%%% Lemma:
%%% \begin{lem}
%%%
%%% \end{lem}
%%%
%%% Proposition:
%%% \begin{prop}
%%%
%%% \end{prop}
%%%
%%% Definition:
%%% \begin{defn}
%%%
%%% \end{defn}
%%%
%%% Remark:
%%% \begin{rem}
%%%
%%% \end{rem}
%%%
%%% Example:
%%% \begin{ex}
%%%
%%% \end{ex}
%%%
%%% Notation:
%%% \begin{notation}
%%%
%%% \end{notation}
%%%
%%% Terminology:
%%% \begin{terminology}
%%%
%%% \end{terminology}
%%%
%%% Theorem environments
% The following causes equations to be numbered within sections
\numberwithin{equation}{section}
% We'll use the equation counter for all our theorem environments, so
% that everything will be numbered in the same sequence.
% Theorem environments
\theoremstyle{plain} %% This is the default, anyway
\newtheorem{thm}[equation]{Theorem}
\newtheorem{cor}[equation]{Corollary}
\newtheorem{lem}[equation]{Lemma}
\newtheorem{prop}[equation]{Proposition}
\theoremstyle{definition}
\newtheorem{defn}[equation]{Definition}
\theoremstyle{remark}
\newtheorem{rem}[equation]{Remark}
\newtheorem{ex}[equation]{Example}
\newtheorem{notation}[equation]{Notation}
\newtheorem{terminology}[equation]{Terminology}
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
\begin{document}
%%% In the title, use a double backslash "\\" to show a linebreak:
%%% Use one of the following two forms:
%%% \title{Text of the title}
%%% or
%%% \title[Short form for the running head]{Text of the title}
\title{}
%%% If there are multiple authors, they're described one at a time:
%%% First author: \author{} \address{} \curraddr{} \email{} \thanks{}
%%% Second author: \author{} \address{} \curraddr{} \email{} \thanks{}
%%% Third author: \author{} \address{} \curraddr{} \email{} \thanks{}
\author{}
%%% In the address, show linebreaks with double backslashes:
\address{}
%%% Current address is optional.
% \curraddr{}
%%% Email address is optional.
% \email{}
%%% If there's a second author:
% \author{}
% \address{}
% \curraddr{}
% \email{}
%%% To have the current date inserted, use \date{\today}:
\date{}
%%% To include an abstract, uncomment the following two lines and type
%%% the abstract in between them:
% \begin{abstract}
% \end{abstract}
\maketitle
%%% To include a table of contents, uncomment the following line:
% \tableofcontents
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%% Start the body of the paper here! E.G., maybe use:
%%% \section{Introduction}
%%% \label{sec:intro}
%%% For a numbered display, use
%%% \begin{equation}
%%% \label{something}
%%% The display goes here
%%% \end{equation}
%%% and you can refer to it as \eqref{something}.
%%% For an unnumbered display, use
%%% \begin{equation*}
%%% The display goes here
%%% \end{equation*}
%%% To import a graphics file, you must have said
%%% \usepackage{graphicx}
%%% in the preamble (i.e., before the \begin{document}).
%%% Putting it into a figure environment enables it to float to the
%%% next page if there isn't enough room for it on the current page.
%%% The \label command must come after the \caption command.
% \begin{figure}[h]
% \includegraphics{filename}
% \caption{Some caption}
% \label{somelabel}
% \end{figure}
%%% -------------------------------------------------------------------
%%% -------------------------------------------------------------------
%%% This is where we create the bibliography.
\begin{bibdiv}
\begin{biblist}
%%% The format of bibliography items is as in the following examples:
%%%
%%% \bib{yellowmonster}{book}{
%%% author={Bousfield, A.K.},
%%% author={Kan, D.M.},
%%% title={Homotopy Limits, Completions and Localizations},
%%% date={1972},
%%% series={Lecture Notes in Mathematics},
%%% volume={304},
%%% publisher={Springer-Verlag},
%%% address={Berlin-New York}
%%% }
%%% \bib{HA}{book}{
%%% author={Quillen, Daniel G.},
%%% title={Homotopical Algebra},
%%% series={Lecture Notes in Mathematics},
%%% volume={43},
%%% publisher={Springer-Verlag},
%%% address={Berlin-New York},
%%% date={1967}
%%% }
%%% \bib{serre:shfs}{article}{
%%% author={Serre, Jean-Pierre},
%%% title={Homologie Singuli\`ere des Espaces Fibr\'es. Applications},
%%% journal={Ann. of Math. (2)},
%%% date={1951},
%%% volume={54},
%%% pages={425--505}
%%% }
\end{biblist}
\end{bibdiv}
\end{document}
\end{verbatim}
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\begin{bibdiv}
\begin{biblist}
\bib{amslatexusersguide}{report}{
author={American Mathematical Society},
title={User's Guide for the \texttt{amsmath} Package},
edition={version 2.0},
date={2002-02-25},
eprint={ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf},
note={also available from CTAN
(the Comprehensive \TeX{} Archive Network) at
\url{http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/amsldoc.pdf}}
}
\bib{instr-l}{report}{
author={American Mathematical Society},
title={Instructions for Preparation of Papers and Monographs:
\AmS-\LaTeX},
date={2004-08},
eprint={ftp://ftp.ams.org/pub/tex/doc/amscls/instr-l.pdf}
}
\bib{testmath}{misc}{
author={American Mathematical Society},
title={Sample Paper for the \texttt{amsmath} Package},
date={1996-11},
note={available at \url{ftp://ftp.ams.org/pub/tex/amslatex/math/testmath.tex}}
}
\bib{yellowmonster}{book}{
author={Bousfield, A.K.},
author={Kan, D.M.},
title={Homotopy Limits, Completions and Localizations},
date={1972},
series={Lecture Notes in Mathematics},
volume={304},
publisher={Springer-Verlag},
address={Berlin-New York}
}
\bib{mathguide}{report}{
author={Downes, Michael},
title={Short Math Guide for \LaTeX},
edition={version 1.09},
publisher={American Mathematical Society},
eprint={ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf}
}
\bib{amsrefsguide}{report}{
author={Jones, David M.},
title={User's Guide to the \texttt{amsrefs} Package},
publisher={American Mathematical Society},
date={2007-10-16},
eprint={ftp://ftp.ams.org/pub/tex/amsrefs/amsrdoc.pdf}
}
\bib{latex}{book}{
author={Lamport, Leslie},
title={\LaTeX: A Document Preparation System},
edition={2},
publisher={Addison-Wesley},
date={1994}
}
\bib{NotShort}{report}{
author={Oetiker, Tobias},
author={Partl, Hubert},
author={Hyna, Irene},
author={Schlegl, Elisabeth},
title={The Not So Short Introduction to \LaTeXe},
edition={version 4.24},
eprint={http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}
}
\bib{HA}{book}{
author={Quillen, Daniel G.},
title={Homotopical Algebra},
series={Lecture Notes in Mathematics},
volume={43},
publisher={Springer-Verlag},
address={Berlin-New York},
date={1967}
}
\bib{quil:rht}{article}{
author={Quillen, Daniel G.},
title={Rational Homotopy Theory},
journal={Ann. of Math. (2)},
volume={90},
date={1969},
pages={205--295}
}
\bib{xyguide}{report}{
author={Rose, Kristoffer H.},
title={\Xy-pic User's Guide},
edition={version 3.85},
eprint={http://www.ctan.org/tex-archive/macros/generic/diagrams/xypic/xy-3.8.5/doc/xyguide.pdf}
}
\bib{xyrefer}{report}{
author={Rose, Kristoffer H.},
author={Moore, Ross},
title={\Xy-pic Reference Manual},
edition={version 3.85},
eprint={http://www.ctan.org/tex-archive/macros/generic/diagrams/xypic/xy-3.8.5/doc/xyrefer.pdf}
}
\end{biblist}
\end{bibdiv}
\end{document}
|