1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
|
References for TeX and Friends
Michael Wiedmann
<mw at miwie dot in-berlin dot de>
Copyright © ? Stephen Gilmore
Copyright © ? Torsten Martinsen
Copyright © 1988, 1994 Free Software Foundation, Inc.
Copyright © 1994 - 1996 Torsten Martinsen
Copyright © 2002, 2003 Peter Karp, Michael Wiedmann
Copyright © 2004 - 2012 Michael Wiedmann
License
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts,
and no Back-Cover Texts.
Revision History
Revision 0.4.1 2012-12-03
Removed obsolete file still referenced in Makefile (no visible
changes)
Revision 0.2.0 2003-01-11
License changed to GNU Free Documentation License.
Revision 0.0.1 2002-06-21
This version was adapted from the edition 1.6 of the LaTeX2e
documentation, converted to DocBook XML using texi2db, and
further edited manually.
__________________________________________________________
Table of Contents
Preface
Credits
1 TeX
1 PlainTeX
1.1 Overview
2 LaTeX
2.1 Options
2.2 Overview of LaTeX and Local Guide
2.3 Commands
2.4 Parameters
3 LaTeX Packages
3.1 amsmath
3.2 dcolumn
3.3 float
3.4 fontenc
3.5 german
3.6 graphics
3.7 hyperref
3.8 inputenc
3.9 KOMA-Script
3.10 mathpazo
3.11 varioref
3.12 Several Small Packages
4 Generic Packages
4.1 PiCTeX (tbd.)
4.2 PSTricks
5 fontinst (tbd.)
6 ConTeXt (tbd.)
6.1 Overview
7 Texinfo (tbd.)
2 pdfTeX
1 Options
1.1 --file-line-error-style
1.2 --fmt format
1.3 --help
1.4 --ini
1.5 --interaction mode
1.6 --ipc
1.7 --ipc-start
1.8 --jobname name
1.9 --kpathsea-debug bitmask
1.10 --maketex fmt
1.11 --no-maketex fmt
1.12 --output-comment string
1.13 --parse-first-line
1.14 --progname name
1.15 --recorder
1.16 --shell-escape
1.17 --translate-file tcxname
1.18 --version
2 Environment
3 Metafont (tbd.)
4 MetaPost
1 Options
1.1 --file-line-error-style
1.2 --help
1.3 --ini
1.4 --interaction mode
1.5 --jobname name
1.6 --kpathsea-debug bitmask
1.7 --mem mem
1.8 --parse-first-line
1.9 --progname name
1.10 --recorder
1.11 -T
1.12 --translate-file tcxname
1.13 --troff
1.14 --version
2 Environment
5 BibTeX
1 Parameters
2 Command Qualifiers
3 bib files
3.1 @STRING command
3.2 Entry Format
3.3 Entry Types
3.4 Field Text
3.5 Field Types
4 bst files
4.1 ABBRV.BST
4.2 ALPHA.BST
4.3 PLAIN.BST
4.4 SAMPLE.BST
4.5 UNSRT.BST
6 Make-Index
1 Options
1.1 -c
1.2 -g
1.3 -i
1.4 -l
1.5 -q
1.6 -r
1.7 -s sty
1.8 -o ind
1.9 -t log
1.10 -p no
1.11 -L
1.12 -T
2 Style File
2.1 Input Style Specifiers
2.2 Output Style Specifiers
3 Example
4 Ordering
5 Special Effects
7 xindy
1 Command List
1.1 Processing Commands
1.2 Markup Commands
1.3 Raw Index Interface
2 Invoking xindy
2.1 Command Line Options
2.2 Search Path
A Appendices
1 Bugs / Known Issues / Missing Features
2 About this Document
3 Release News
4 GNU Free Documentation License
Index
List of Tables
1.1 Options for \newcommand
1.2 Options for \newenvironment
1.3 Options for \newtheorem
1.4 Commands in a tabbing environment
1.5 Commands used inside a tabular environment
1.6 Standard styles distributed with BibTeX
1.7 Three environments that put LaTeX in math mode
1.8 Math Miscellany
1.9 Typefaces
1.10 Standard type size commands
1.11 Low-level font commands
1.12 Special coordinates and angles
Preface
LaTeX2e is a document preparation system implemented as a macro
package for Donald E. Knuth's TeX typesetting program.
LaTeX was originally conceived by Leslie Lamport.
This updated LaTeX reference is by no means complete, but it's
a first step towards a more complete LaTeX reference! We
welcome if we'll get pointed to missing commands or even better
when you make additions and further improvements and send them
to the authors.
TUG (TeX User Group) and DANTE (German TeX User Group) both
have excellent FAQ's which answer many questions or give great
pointers to additional resources both on the internet or in
books. Most if not all missing packages can also be found on
the CTAN servers.
This reference is not meant to replace the package
documentation or the standard literature like the LaTeX
handbook and the LaTeX companion. Look there for detailed
descriptions of the commands and even mostly more options and
examples.
The authors intend to extend this documentation to other TeX
related packages (e.g. ConTeXt, MetaPost, Metafont, etc.).
Contributions are very welcome!
Credits
The following people have contributed substantial parts to this
documentation project or helped in some other way (listed
alphabetically):
* Karl Berry
* Wolfgang Borgert
* Ramon Casellas
* Holger Danielsson
* James Devenish
* Hubert Gaesslein
* Peter Karp
* Rolf Niepraschk
* Hans Fredrik Nordhaug
* Simon Pepping
* Bob Stayton
* Herbert Voss
Chapter 1. TeX
Table of Contents
1 PlainTeX
1.1 Overview
2 LaTeX
2.1 Options
2.2 Overview of LaTeX and Local Guide
2.3 Commands
2.4 Parameters
3 LaTeX Packages
3.1 amsmath
3.2 dcolumn
3.3 float
3.4 fontenc
3.5 german
3.6 graphics
3.7 hyperref
3.8 inputenc
3.9 KOMA-Script
3.10 mathpazo
3.11 varioref
3.12 Several Small Packages
4 Generic Packages
4.1 PiCTeX (tbd.)
4.2 PSTricks
5 fontinst (tbd.)
6 ConTeXt (tbd.)
6.1 Overview
7 Texinfo (tbd.)
1 PlainTeX
1.1 Overview
For a really excellent reference of all TeX primitive control
sequences see David Bausum's TeX Primitive Control Sequences.
2 LaTeX
Note
The original file latex2e.texi contains the following copyright
and permission notice:
“Permission is granted to make and distribute verbatim copies
of this manual provided the copyright notice and this
permission notice are preserved on all copies.”
“Permission is granted to copy and distribute modified versions
of this manual under the conditions for verbatim copying,
provided that the entire resulting derived work is distributed
under the terms of a permission notice identical to this one.”
2.1 Options
LaTeX understands the following command line options.
2.1.1 -file-line-error-style
Print error messages in the form file:line:error.
2.1.2 -fmt=FMTNAME
Use FMTMAME instead of program name or a %& line.
2.1.3 -ini
Be initex, for dumping formats; this is implicitly true if the
program is called as initex.
2.1.4 -interaction=STRING
Set interaction mode
(STRING=batchmode/nonstopmode/scrollmode/errorstopmode).
2.1.5 -ipc
Send DVI output to a socket as well as the usual output file.
Note: not available on all systems.
2.1.6 -ipc-start
As -ipc, and also start the server at the other end.
Note: not available on all systems.
2.1.7 -jobname=STRING
Set the job name to STRING.
2.1.8 -kpathsea-debug=NUMBER
Sets path searching debugging flags according to the bits of
NUMBER.
2.1.9 [-no]-maketex=FMT
Disable/enable mktexFMT generation (FMT=tex/tfm).
2.1.10 -mltex
Enable MLTeX extensions such as \charsubdef.
2.1.11 -output-comment=STRING
use STRING for DVI file comment instead of date.
2.1.12 -parse-first-line
Parse of the first line of the input file.
2.1.13 -progname=STRING
Set program (and fmt) name to STRING.
2.1.14 -recorder
Enable filename recorder.
2.1.15 -shell-escape
Enable \write18{SHELL COMMAND}.
2.1.16 -src-specials
Insert source specials into the DVI file.
2.1.17 -src-specials=WHERE
Insert source specials in certain places of the DVI file. WHERE
is a comma-separated value list: cr display hbox math par
parend vbox.
2.1.18 -translate-file=TCXNAME
Use the TCX file TCXNAME.
2.1.19 -help
Display this help and exit.
2.1.20 -version
Output version information and exit.
2.2 Overview of LaTeX and Local Guide
The LaTeX command typesets a file of text using the TeX program
and the LaTeX Macro package for TeX. To be more specific, it
processes an input file containing the text of a document with
interspersed commands that describe how the text should be
formatted. It produces at least three files as output:
1. A Device Independent, or .dvi file. This contains commands
that can be translated into commands for a variety of
output devices. You can view the output of LaTeX by using a
program such as xdvi, which actually uses the .dvi file.
2. A transcript or .log file that contains summary information
and diagnostic messages for any errors discovered in the
input file.
3. An auxiliary or .aux file. This is used by LaTeX itself,
for things such as sectioning.
For a description of what goes on inside TeX, you should
consult The TeXbook by Donald E. Knuth, ISBN 0-201-13448-9,
published jointly by the American Mathematical Society and
Addison-Wesley Publishing Company.
For a description of LaTeX, you should consult:
LaTeX: A Document Preparation System, by Leslie Lamport,
Addison-Wesley Publishing Company, 2nd edition, 1994.
The LaTeX Companion, by Michel Goossens, Frank Mittelbach, and
Alexander Samarin, Addison-Wesley, 1994.
2.3 Commands
A LaTeX command begins with the command name, which consists of
a \ followed by either (a) a string of letters or (b) a single
non-letter. Arguments contained in square brackets, [], are
optional while arguments contained in braces, {}, are required.
NOTE: LaTeX is case sensitive. Enter all commands in lower case
unless explicitly directed to do otherwise.
2.3.1 Counters
Everything LaTeX numbers for you has a counter associated with
it. The name of the counter is the same as the name of the
environment or command that produces the number, except with no
\ (enumi - enumiv are used for the nested enumerate
environment). Below is a list of the counters used in LaTeX's
standard document classes to control numbering.
part paragraph figure enumi
chapter subparagraph table enumii
section page footnote enumiii
subsection equation mpfootnote enumiv
subsubsection
\addtocounter
The \addtocounter command increments the counter by the amount
specified by the value argument. The value argument can be
negative.
\alph{counter}
This command causes the value of the counter to be printed in
alphabetic characters. The \alph command uses lower case
alphabetic alphabetic characters, i.e., a, b, c... while the
\Alph command uses upper case alphabetic characters, i.e., A,
B, C....
\arabic{counter}
The \arabic command causes the value of the counter to be
printed in Arabic numbers, i.e., 3.
\fnsymbol{counter}
The \fnsymbol command causes the value of the counter to be
printed in a specific sequence of nine symbols that can be used
for numbering footnotes.
NB. counter must have a value between 1 and 9 inclusive.
\newcounter{foo}[counter]
The \newcounter command defines a new counter named foo. The
counter is initialized to zero.
The optional argument [counter] causes the counter foo to be
reset whenever the counter named in the optional argument is
incremented.
\refstepcounter{counter}
The \refstepcounter command works like \stepcounter. See
\stepcounter, except it also defines the current \ref value to
be the result of \thecounter.
\roman{counter}
This command causes the value of the counter to be printed in
Roman numerals. The \roman command uses lower case Roman
numerals, i.e., i, ii, iii..., while the \Roman command uses
upper case Roman numerals, i.e., I, II, III....
\stepcounter{counter}
The \stepcounter command adds one to the counter and resets all
subsidiary counters.
\setcounter{counter}{value}
The \setcounter command sets the value of the counter to that
specified by the value argument.
\usecounter{counter}
The \usecounter command is used in the second argument of the
list environment to allow the counter specified to be used to
number the list items.
\value{counter}
The \value command produces the value of the counter named in
the mandatory argument. It can be used where LaTeX expects an
integer or number, such as the second argument of a \setcounter
or \addtocounter command, or in:
\hspace{\value{foo}\parindent}
It is useful for doing arithmetic with counters.
2.3.2 Cross References
One reason for numbering things like figures and equations is
to refer the reader to them, as in See Figure 3 for more
details. A smarter version of the cross reference commands is
available in the package varioref.
\label{key}
A \label command appearing in ordinary text assigns to the key
the number of the current sectional unit; one appearing inside
a numbered environment assigns that number to the key.
A key can consist of any sequence of letters, digits, or
punctuation characters. Upper and lowercase letters are
different.
To avoid accidentally creating two labels with the same name,
it is common to use labels consisting of a prefix and a suffix
separated by a colon. The prefixes conventionally used are
* cha for chapters
* sec for lower-level sectioning commands
* fig for figures
* tab for tables
* eq for equations
Thus, a label for a figure would look like fig:bandersnatch.
\pageref{key}
The \pageref command produces the page number of the place in
the text where the corresponding \label command appears. ie.
where \label{key} appears. For a smart version see \vpageref.
\ref{key}
The \ref command produces the number of the sectional unit,
equation number, ... of the corresponding \label command. For a
smart version see \vref.
2.3.3 Definitions
\newcommand
\newcommand{cmd}[args]{definition}
\newcommand{cmd}[args][default]{definition}
\renewcommand{cmd}[args]{definition}
\renewcommand{cmd}[args][default]{definition}
These commands define (or redefine) a command.
Table 1.1. Options for \newcommand
cmd A command name beginning with a \. For \newcommand it must
not be already defined and must not begin with \end; for
\renewcommand it must already be defined.
args An integer from 1 to 9 denoting the number of arguments of
the command being defined. The default is for the command to
have no arguments.
def If this optional parameter is present, it means that the
command's first argument is optional. The default value of the
optional argument is def.
definition The text to be substituted for every occurrence of
cmd; a parameter of the form #n in cmd is replaced by the text
of the nth argument when this substitution takes place.
\newenvironment
\newenvironment{nam}[args]{begdef}{enddef}
\newenvironment{nam}[args][default]{begdef}{enddef}
\renewenvironment{nam}[args]{begdef}{enddef}
These commands define or redefine an environment.
Table 1.2. Options for \newenvironment
nam The name of the environment. For \newenvironment there must
be no currently defined environment by that name, and the
command \nam must be undefined. For \renewenvironment the
environment must already be defined.
args An integer from 1 to 9 denoting the number of arguments of
the newly-defined environment. The default is no arguments.
Arguments can only be used in te {begdef} part.
default If this is specified, the first argument is optional,
and default gives the default value for that argument.
begdef The text substituted for every occurrence of
\begin{nam}; a parameter of the form #n in cmd is replaced by
the text of the nth argument when this substitution takes
place.
enddef The text substituted for every occurrence of \end{nam}.
It may not contain any argument parameters.
\newtheorem
\newtheorem{env_name}{caption}[within]
\newtheorem{env_name}[numbered_like]{caption}
This command defines a theorem-like environment.
Table 1.3. Options for \newtheorem
env_name The name of the environment to be defined. A string of
letters. It must not be the name of an existing environment or
counter.
caption The text printed at the beginning of the environment,
right before the number. This may simply say Theorem, for
example.
within The name of an already defined counter, usually of a
sectional unit. Provides a means of resetting the new theorem
counter within the sectional unit.
numbered_like The name of an already defined theorem-like
environment.
The \newtheorem command may have at most one optional argument.
\newfont
\newfont{cmd}{font_name}
Defines the command name cmd, which must not be currently
defined, to be a declaration that selects the font named
font_name to be the current font.
2.3.4 Document Classes
Valid LaTeX document classes include:
* article
* report
* letter
* book
* slides
Other document classes are often available. See Overview, for
details. They are selected with the following command:
\documentclass [options] {class}
All the standard classes (except slides) accept the following
options for selecting the typeface size (10pt is default):
10pt, 11pt, 12pt
All classes accept these options for selecting the paper size
(default is letter):
a4paper, a5paper, b5paper, letterpaper, legalpaper,
executivepaper
Miscellaneous options:
* landscape --- selects landscape format. Default is
portrait.
* titlepage, notitlepage --- selects if there should be a
separate title page.
* leqno --- equation number on left side of equations.
Default is right side.
* fleqn --- displayed formulas flush left. Default is
centered.
* openbib --- use open bibliography format.
* draft, final --- mark/do not mark overfull boxes with a
rule. Default is final.
These options are not available with the slides class:
* oneside, twoside --- selects one- or twosided layout.
Default is oneside, except for the book class.
* openright, openany --- determines if a chapter should start
on a right-hand page. Default is openright for book.
* onecolumn, twocolumn --- one or two columns. Defaults to
one column.
The slides class offers the option clock for printing the time
at the bottom of each note.
If you specify more than one option, they must be separated by
a comma.
Additional packages are loaded by a
\usepackage[options]{pkg}
command. If you specify more than one package, they must be
separated by a comma.
Any options given in the \documentclass command that are
unknown by the selected document class are passed on to the
packages loaded with \usepackage.
2.3.5 Layout
Miscellaneous commands for controlling the general layout of
the page.
\flushbottom
The \flushbottom declaration makes all text pages the same
height, adding extra vertical space when necessary to fill out
the page.
This is the standard if twocolumn mode is selected.
\onecolumn
The \onecolumn declaration starts a new page and produces
single-column output.
\raggedbottom
The \raggedbottom declaration makes all pages the height of the
text on that page. No extra vertical space is added.
\twocolumn
\twocolumn[text]
The \twocolumn declaration starts a new page and produces
two-column output. If the optional text argument is present, it
is typeset in one-column mode.
2.3.6 Environments
LaTeX provides a number of different paragraph-making
environments. Each environment begins and ends in the same
manner.
\begin{environment-name}
.
.
.
\end{environment-name}
array
\begin{array}{col1col2...coln}
column 1 entry & column 2 entry ... & column n entry \\
.
.
.
\end{array}
Math arrays are produced with the array environment. It has a
single mandatory argument describing the number of columns and
the alignment within them. Each column, coln, is specified by a
single letter that tells how items in that row should be
formatted.
* c --- for centered
* l --- for flush left
* r --- for flush right
Column entries must be separated by an &. Column entries may
include other LaTeX commands. Each row of the array must be
terminated with the string \\.
Note that the array environment can only be used in math mode,
so normally it is used inside an equation environment.
center
\begin{center}
Text on line 1 \\
Text on line 2 \\
.
.
.
\end{center}
The center environment allows you to create a paragraph
consisting of lines that are centered within the left and right
margins on the current page. Each line must be terminated with
the string \\.
\centering
This declaration corresponds to the center environment. This
declaration can be used inside an environment such as quote or
in a parbox. The text of a figure or table can be centered on
the page by putting a \centering command at the beginning of
the figure or table environment.
Unlike the center environment, the \centering command does not
start a new paragraph; it simply changes how LaTeX formats
paragraph units. To affect a paragraph unit's format, the scope
of the declaration must contain the blank line or \end command
(of an environment like quote) that ends the paragraph unit.
description
\begin{description}
\item [label] First item
\item [label] Second item
.
.
.
\end{description}
The description environment is used to make labelled lists. The
label is bold face and flushed right.
enumerate
\begin{enumerate}
\item First item
\item Second item
.
.
.
\end{enumerate}
The enumerate environment produces a numbered list.
Enumerations can be nested within one another, up to four
levels deep. They can also be nested within other
paragraph-making environments.
Each item of an enumerated list begins with an \item command.
There must be at least one \item command within the
environment.
The enumerate environment uses the enumi through enumiv
counters (see Counters). The type of numbering can be changed
by redefining \theenumi etc.
eqnarray
\begin{eqnarray}
math formula 1 \\
math formula 2 \\
.
.
.
\end{eqnarray}
The eqnarray environment is used to display a sequence of
equations or inequalities. It is very much like a three-column
array environment, with consecutive rows separated by \\ and
consecutive items within a row separated by an &.
An equation number is placed on every line unless that line has
a \nonumber command.
The command \lefteqn is used for splitting long formulas across
lines. It typesets its argument in display style flush left in
a box of zero width.
equation
\begin{equation}
math formula
\end{equation}
The equation environment centers your equation on the page and
places the equation number in the right margin.
figure
\begin{figure}[placement]
body of the figure
\caption{figure title}
\end{figure}
Figures are objects that are not part of the normal text, and
are usually floated to a convenient place, like the top of a
page. Figures will not be split between two pages.
The optional argument [placement] determines where LaTeX will
try to place your figure. There are four places where LaTeX can
possibly put a float:
1. h (Here) - at the position in the text where the figure
environment appears.
2. t (Top) - at the top of a text page.
3. b (Bottom) - at the bottom of a text page.
4. p (Page of floats) - on a separate float page, which is a
page containing no text, only floats.
The standard report and article classes use the default
placement tbp.
The body of the figure is made up of whatever text, LaTeX
commands, etc. you wish. The \caption command allows you to
title your figure.
flushleft
\begin{flushleft}
Text on line 1 \\
Text on line 2 \\
.
.
.
\end{flushleft}
The flushleft environment allows you to create a paragraph
consisting of lines that are flushed left, to the left-hand
margin. Each line must be terminated with the string \\.
\raggedright
This declaration corresponds to the flushleft environment. This
declaration can be used inside an environment such as quote or
in a parbox.
Unlike the flushleft environment, the \raggedright command does
not start a new paragraph; it simply changes how LaTeX formats
paragraph units. To affect a paragraph unit's format, the scope
of the declaration must contain the blank line or \end command
(of an environment like quote) that ends the paragraph unit.
flushright
\begin{flushright}
Text on line 1 \\
Text on line 2 \\
.
.
.
\end{flushright}
The flushright environment allows you to create a paragraph
consisting of lines that are flushed right, to the right-hand
margin. Each line must be terminated with the string \\.
\raggedleft
This declaration corresponds to the flushright environment.
This declaration can be used inside an environment such as
quote or in a parbox.
Unlike the flushright environment, the \raggedleft command does
not start a new paragraph; it simply changes how LaTeX formats
paragraph units. To affect a paragraph unit's format, the scope
of the declaration must contain the blank line or \end command
(of an environment like quote) that ends the paragraph unit.
itemize
\begin{itemize}
\item First item
\item Second item
.
.
.
\end{itemize}
The itemize environment produces a bulleted list. Itemizations
can be nested within one another, up to four levels deep. They
can also be nested within other paragraph-making environments.
Each item of an itemized list begins with an \item command.
There must be at least one \item command within the
environment.
The itemize environment uses the itemi through itemiv counters
(see Counters). The type of numbering can be changed by
redefining \theitemi etc.
letter
This environment is used for creating letters. See Letters.
list
The list environment is a generic environment which is used for
defining many of the more specific environments. It is seldom
used in documents, but often in macros.
\begin{list}{label}{spacing}
\item First item
\item Second item
.
.
.
\end{list}
The {label} argument specifies how items should be labelled.
This argument is a piece of text that is inserted in a box to
form the label. This argument can and usually does contain
other LaTeX commands.
The {spacing} argument contains commands to change the spacing
parameters for the list. This argument will most often be null,
i.e., {}. This will select all default spacing which should
suffice for most cases.
minipage
\begin{minipage}[position][height][inner-pos]{width}
text
\end{minipage}
The minipage environment is similar to a \parbox command. It
takes the same optional position argument and mandatory width
argument. You may use other paragraph-making environments
inside a minipage.
Footnotes in a minipage environment are handled in a way that
is particularly useful for putting footnotes in figures or
tables. A \footnote or \footnotetext command puts the footnote
at the bottom of the minipage instead of at the bottom of the
page, and it uses the mpfootnote counter instead of the
ordinary footnote counter See Counters.
NOTE: Don't put one minipage inside another if you are using
footnotes; they may wind up at the bottom of the wrong
minipage.
picture
\begin{picture}(width,height)(x offset,y offset)
.
.
picture commands
.
.
\end{picture}
The picture environment allows you to create just about any
kind of picture you want containing text, lines, arrows and
circles. You tell LaTeX where to put things in the picture by
specifying their coordinates. A coordinate is a number that may
have a decimal point and a minus sign --- a number like 5, 2.3
or -3.1416. A coordinate specifies a length in multiples of the
unit length \unitlength, so if \unitlength has been set to 1cm,
then the coordinate 2.54 specifies a length of 2.54
centimetres. You can change the value of \unitlength anywhere
you want, using the \setlength command, but strange things will
happen if you try changing it inside the picture environment.
A position is a pair of coordinates, such as (2.4,-5),
specifying the point with x-coordinate 2.4 and y-coordinate -5.
Coordinates are specified in the usual way with respect to an
origin, which is normally at the lower-left corner of the
picture. Note that when a position appears as an argument, it
is not enclosed in braces; the parentheses serve to delimit the
argument.
The picture environment has one mandatory argument, which is a
position. It specifies the size of the picture. The environment
produces a rectangular box with width and height determined by
this argument's x- and y-coordinates.
The picture environment also has an optional position argument,
following the size argument, that can change the origin.
(Unlike ordinary optional arguments, this argument is not
contained in square brackets.) The optional argument gives the
coordinates of the point at the lower-left corner of the
picture (thereby determining the origin). For example, if
\unitlength has been set to 1mm, the command
\begin{picture}(100,200)(10,20)
produces a picture of width 100 millimetres and height 200
millimetres, whose lower-left corner is the point (10,20) and
whose upper-right corner is therefore the point (110,220). When
you first draw a picture, you will omit the optional argument,
leaving the origin at the lower-left corner. If you then want
to modify your picture by shifting everything, you just add the
appropriate optional argument.
The environment's mandatory argument determines the nominal
size of the picture. This need bear no relation to how large
the picture really is; LaTeX will happily allow you to put
things outside the picture, or even off the page. The picture's
nominal size is used by LaTeX in determining how much room to
leave for it.
Everything that appears in a picture is drawn by the \put
command. The command
\put (11.3,-.3){...}
puts the object specified by ... in the picture, with its
reference point at coordinates (11.3,-.3). The reference points
for various objects will be described below.
The \put command creates an LR box. You can put anything in the
text argument of the \put command that you'd put into the
argument of an \mbox and related commands. When you do this,
the reference point will be the lower left corner of the box.
Picture commands:
\circle{diameter}, \circle*{diameter}
The \circle command produces a circle with a diameter as close
to the specified one as possible. If the *-form of the command
is used, LaTeX draws a solid circle.
Note that only circles up to 40 pt can be drawn.
\dashbox
Draws a box with a dashed line.
\dashbox{dash_length}(width,height){...}
The \dashbox has an extra argument which specifies the width of
each dash. A dashed box looks best when the width and height
are multiples of the dash_length.
\frame{...}
The \frame command puts a rectangular frame around the object
specified in the argument. The reference point is the bottom
left corner of the frame. No extra space is put between the
frame and the object.
\framebox(width,height)[position]{...}
The \framebox command is exactly the same as the \makebox
command, except that it puts a frame around the outside of the
box that it creates.
The framebox command produces a rule of thickness \fboxrule,
and leaves a space \fboxsep between the rule and the contents
of the box.
\line(x slope,y slope){length}
The \line command draws a line of the specified length and
slope.
Note that LaTeX can only draw lines with slope = x/y, where x
and y have integer values from -6 through 6.
\linethickness{dimension}
Declares the thickness of horizontal and vertical lines in a
picture environment to be dimension, which must be a positive
length. It does not affect the thickness of slanted lines and
circles, or the quarter circles drawn by \oval to form the
corners of an oval.
\makebox(width,height)[position]{...}
The \makebox command for the picture environment is similar to
the normal \makebox command except that you must specify a
width and height in multiples of \unitlength.
The optional argument, [position], specifies the quadrant that
your text appears in. You may select up to two of the
following:
* t - Moves the item to the top of the rectangle
* b - Moves the item to the bottom
* l - Moves the item to the left
* r - Moves the item to the right
See \makebox.
\multiput(x coord,y coord)(delta x,delta y){number of copies}{object}
The \multiput command can be used when you are putting the same
object in a regular pattern across a picture.
\oval(width,height)[portion]
The \oval command produces a rectangle with rounded corners.
The optional argument, [portion], allows you to select part of
the oval.
* t - Selects the top portion
* b - Selects the bottom portion
* r - Selects the right portion
* l - Selects the left portion
Note that the corners of the oval are made with quarter circles
with a maximum radius of 20 pt, so large ovals will look more
like boxes with rounded corners.
\put(x coord,y coord){ ... }
The \put command places the item specified by the mandatory
argument at the given coordinates.
\shortstack[position]{... \\ ... \\ ...}
The \shortstack command produces a stack of objects. The valid
positions are:
* r - Moves the objects to the right of the stack
* l - Moves the objects to the left of the stack
* c - Moves the objects to the centre of the stack (default)
\vector(x slope,y slope){length}
The \vector command draws a line with an arrow of the specified
length and slope. The x and y values must lie between -4 and
+4, inclusive.
quotation
\begin{quotation}
text
\end{quotation}
The margins of the quotation environment are indented on the
left and the right. The text is justified at both margins and
there is paragraph indentation. Leaving a blank line between
text produces a new paragraph.
quote
\begin{quote}
text
\end{quote}
The margins of the quote environment are indented on the left
and the right. The text is justified at both margins. Leaving a
blank line between text produces a new paragraph.
tabbing
\begin{tabbing}
text \= more text \= still more text \= last text \\
second row \> \> more \\
.
.
.
\end{tabbing}
The tabbing environment provides a way to align text in
columns. It works by setting tab stops and tabbing to them much
the way you do with an ordinary typewriter.
It is best suited for cases where the width of each column is
constant and known in advance.
This environment can be broken across pages, unlike the tabular
environment.
The following commands can be used inside a tabbing
environment:
Table 1.4. Commands in a tabbing environment
\= Sets a tab stop at the current position.
\> Advances to the next tab stop.
\< This command allows you to put something to the left of the
local margin without changing the margin. Can only be used at
the start of the line.
\+ Moves the left margin of the next and all the following
commands one tab stop to the right.
\- Moves the left margin of the next and all the following
commands one tab stop to the left.
\' Moves everything that you have typed so far in the current
column, i.e. everything from the most recent \>, \<, \', \\, or
\kill command, to the right of the previous column, flush
against the current column's tab stop.
\` Allows you to put text flush right against any tab stop,
including tab stop 0. However, it can't move text to the right
of the last column because there's no tab stop there. The \`
command moves all the text that follows it, up to the \\ or
\end{tabbing} command that ends the line, to the right margin
of the tabbing environment. There must be no \> or \' command
between the \` and the command that ends the line.
\kill Sets tab stops without producing text. Works just like \\
except that it throws away the current line instead of
producing output for it. The effect of any \=, \+ or \-
commands in that line remain in effect.
\pushtabs Saves all current tab stop positions. Useful for
temporarily changing tab stop positions in the middle of a
tabbing environment.
\poptabs Restores the tab stop positions saved by the last
\pushtabs.
\a In a tabbing environment, the commands \=, \' and \` do not
produce accents as normal. Instead, the commands \a=, \a' and
\a` are used.
This example typesets a Pascal function in a traditional
format:
\begin{tabbing}
function \= fact(n : integer) : integer;\\
\> begin \= \+ \\
\> if \= n $>$ 1 then \+ \\
fact := n * fact(n-1) \- \\
else \+ \\
fact := 1; \-\- \\
end;\\
\end{tabbing}
table
\begin{table}[placement]
body of the table
\caption{table title}
\end{table}
Tables are objects that are not part of the normal text, and
are usually floated to a convenient place, like the top of a
page. Tables will not be split between two pages.
The optional argument [placement] determines where LaTeX will
try to place your table. There are four places where LaTeX can
possibly put a float:
* h : Here - at the position in the text where the table
environment appears.
* t : Top - at the top of a text page.
* b : Bottom - at the bottom of a text page.
* p : Page of floats - on a separate float page, which is a
page containing no text, only floats.
The standard report and article classes use the default
placement [tbp].
The body of the table is made up of whatever text, LaTeX
commands, etc., you wish. The \caption command allows you to
title your table.
tabular
\begin{tabular}[pos]{cols}
column 1 entry & column 2 entry ... & column n entry \\
.
.
.
\end{tabular}
or
\begin{tabular*}{width}[pos]{cols}
column 1 entry & column 2 entry ... & column n entry \\
.
.
.
\end{tabular*}
These environments produce a box consisting of a sequence of
rows of items, aligned vertically in columns. The mandatory and
optional arguments consist of:
Table 1.5. Commands used inside a tabular environment
width Specifies the width of the tabular* environment. There
must be rubber space between columns that can stretch to fill
out the specified width.
pos Specifies the vertical position; default is alignment on
the centre of the environment.
* t - align on top row
* b - align on bottom row
cols Specifies the column formatting. It consists of a sequence
of the following specifiers, corresponding to the sequence of
columns and intercolumn material.
* l - A column of left-aligned items.
* r - A column of right-aligned items.
* c - A column of centred items.
* | - A vertical line the full height and depth of the
environment.
* @{text} - This inserts text in every row. An @-expression
suppresses the intercolumn space normally inserted between
columns; any desired space between the inserted text and
the adjacent items must be included in text. An
\extracolsep{wd} command in an @-expression causes an extra
space of width wd to appear to the left of all subsequent
columns, until countermanded by another \extracolsep
command. Unlike ordinary intercolumn space, this extra
space is not suppressed by an @-expression. An \extracolsep
command can be used only in an @-expression in the cols
argument.
* p{wd} - Produces a column with each item typeset in a
parbox of width wd, as if it were the argument of a
\parbox[t]{wd} command. However, a \\ may not appear in the
item, except in the following situations:
1. inside an environment like minipage, array, or
tabular.
2. inside an explicit \parbox.
3. in the scope of a \centering, \raggedright, or
\raggedleft declaration. The latter declarations must
appear inside braces or an environment when used in a
p-column element.
* *{num}{cols} - Equivalent to num copies of cols, where num
is any positive integer and cols is any list of
column-specifiers, which may contain another *-expression.
These commands can be used inside a tabular environment:
\cline{i-j}
The \cline command draws horizontal lines across the columns
specified, beginning in column i and ending in column j, which
are identified in the mandatory argument.
\hline
The \hline command will draw a horizontal line the width of the
table. It's most commonly used to draw a line at the top,
bottom, and between the rows of the table.
\multicolumn
\multicolumn{cols}{pos}{text}
The \multicolumn is used to make an entry that spans several
columns. The first mandatory argument, cols, specifies the
number of columns to span. The second mandatory argument, pos,
specifies the formatting of the entry; c for centred, l for
flushleft, r for flushright. The third mandatory argument,
text, specifies what text is to make up the entry.
\vline
The \vline command will draw a vertical line extending the full
height and depth of its row. An \hfill command can be used to
move the line to the edge of the column. It can also be used in
an @-expression.
thebibliography
\begin{thebibliography}{widest-label}
\bibitem[label]{cite_key}
.
.
.
\end{thebibliography}
The thebibliography environment produces a bibliography or
reference list. In the article class, this reference list is
labelled References; in the report class, it is labelled
Bibliography.
* widest-label: Text that, when printed, is approximately as
wide as the widest item label produces by the \bibitem
commands.
\bibitem[label]{cite_key}
The \bibitem command generates an entry labelled by label. If
the label argument is missing, a number is generated as the
label, using the enumi counter. The cite_key is any sequence of
letters, numbers, and punctuation symbols not containing a
comma. This command writes an entry on the .aux file containing
cite_key and the item's label. When this .aux file is read by
the \begin{document} command, the item's label is associated
with cite_key, causing the reference to cite_key by a \cite
command to produce the associated label.
\cite[text]{key_list}
The key_list argument is a list of citation keys. This command
generates an in-text citation to the references associated with
the keys in key_list by entries on the .aux file read by the
\begin{document} command.
The optional text argument will appear after the citation, i.e.
\cite[p.~2f.]{knuth} might produce `[Knuth, p. 2]'.
The package cite.sty allows a line break in the \cite reference
and can sort numerical entries.
overcite.sty makes citations like footnotes.
\nocite{key_list}
The \nocite command produces no text, but writes key_list,
which is a list of one or more citation keys, on the .aux file.
\nocite{*} uses all entries from the BibTeX database.
Using BibTeX
If you use the BibTeX program by Oren Patashnik (highly
recommended if you need a bibliography of more than a couple of
titles) to maintain your bibliography, you don't use the
thebibliography environment. Instead, you include the lines
\bibliographystyle{style}
\bibliography{bibfile}
where style refers to a file style.bst, which defines how your
citations will look.
Table 1.6. Standard styles distributed with BibTeX
alpha Sorted alphabetically. Labels are formed from name of
author and year of publication.
plain Sorted alphabetically. Labels are numeric.
unsrt Like plain, but entries are in order of citation.
abbrv Like plain, but more compact labels.
In addition, numerous other BibTeX style files exist tailored
to the demands of various publications.
The argument to \bibliography refers to the file bibfile.bib,
which should contain your database in BibTeX format. Only the
entries referred to via \cite and \nocite will be listed in the
bibliography.
theorem
\begin{theorem}
theorem text
\end{theorem}
The theorem environment produces Theorem x in boldface followed
by your theorem text.
titlepage
\begin{titlepage}
text
\end{titlepage}
The titlepage environment creates a title page, i.e. a page
with no printed page number or heading. It also causes the
following page to be numbered page one. Formatting the title
page is left to you. The \today command comes in handy for
title pages.
Note that you can use the \maketitle (see \maketitle) command
to produce a standard title page.
verbatim
\begin{verbatim}
text
\end{verbatim}
The verbatim environment is a paragraph-making environment that
gets LaTeX to print exactly what you type in. It turns LaTeX
into a typewriter with carriage returns and blanks having the
same effect that they would on a typewriter.
\verb char literal_text char \verb*char literal_text char
Typesets literal_text exactly as typed, including special
characters and spaces, using a typewriter (\tt) type style.
There may be no space between \verb or \verb* and char (space
is shown here only for clarity). The *-form differs only in
that spaces are printed
verse
\begin{verse}
text
\end{verse}
The verse environment is designed for poetry, though you may
find other uses for it.
The margins are indented on the left and the right. Separate
the lines of each stanza with \\, and use one or more blank
lines to separate the stanzas.
2.3.7 Footnotes
Footnotes can be produced in one of two ways. They can be
produced with one command, the \footnote command. They can also
be produced with two commands, the \footnotemark and the
\footnotetext commands. See the specific command for
information on why you would use one over the other.
\footnote[number]{text}
The \footnote command places the numbered footnote text at the
bottom of the current page. The optional argument, number, is
used to change the default footnote number. This command can
only be used in outer paragraph mode; i.e., you cannot use it
in sectioning commands like \chapter, in figures, tables or in
a tabular environment.
\footnotemark
The \footnotemark command puts the footnote number in the text.
This command can be used in inner paragraph mode. The text of
the footnote is supplied by the \footnotetext command.
This command can be used to produce several consecutive
footnote markers referring to the same footnote by using
\footnotemark[\value{footnote}]
after the first \footnote command.
\footnotetext[number]{text}
The \footnotetext command produces the text to be placed at the
bottom of the page. This command can come anywhere after the
\footnotemark command. The \footnotetext command must appear in
outer paragraph mode.
The optional argument, number, is used to change the default
footnote number.
2.3.8 Lengths
A length is a measure of distance. Many LaTeX commands take a
length as an argument.
\newlength
\newlength{\gnat}
The \newlength command defines the mandatory argument, \gnat,
as a length command with a value of 0in. An error occurs if a
\gnat command already exists.
\setlength
\setlength{\gnat}{length}
The \setlength command is used to set the value of a length
command. The length argument can be expressed in any terms of
length LaTeX understands, i.e., inches (in), millimetres (mm),
points (pt), etc.
\addtolength
\addtolength{\gnat}{length}
The \addtolength command increments length command by the
amount specified in the length argument. It can be a negative
amount.
\settodepth
\settodepth{\gnat}{text}
The \settodepth command sets the value of a length command
equal to the depth of the text argument.
\settoheight
\settoheight{\gnat}{text}
The \settoheight command sets the value of a length command
equal to the height of the text argument.
\settowidth
\settowidth{\gnat}{text}
The \settowidth command sets the value of a length command
equal to the width of the text argument.
Predefined lengths
\width
\height
\depth
\totalheight
These length parameters can be used in the arguments of the
box-making commands See Spaces & Boxes. They specify the
natural width etc. of the text in the box. \totalheight equals
\height + \depth. To make a box with the text stretched to
double the natural size, e.g., say
\makebox[2\width]{Get a stretcher}
2.3.9 Letters
You can use LaTeX to typeset letters, both personal and
business. The letter document class is designed to make a
number of letters at once, although you can make just one if
you so desire.
Your .tex source file has the same minimum commands as the
other document classes, i.e., you must have the following
commands as a minimum:
\documentclass{letter}
\begin{document}
... letters ...
\end{document}
Each letter is a letter environment, whose argument is the name
and address of the recipient. For example, you might have:
\begin{letter}{Mr. Joe Smith\\ 2345 Princess St.\\ Edinburgh, EH1 1AA}
...
\end{letter}
The letter itself begins with the \opening command. The text of
the letter follows. It is typed as ordinary LaTeX input.
Commands that make no sense in a letter, like \chapter, do not
work. The letter closes with a \closing command.
After the closing, you can have additional material. The \cc
command produces the usual cc: .... There's also a similar
\encl command for a list of enclosures. With both these
commands, use \\ to separate the items.
These commands are used with the letter class:
\address
\address{Return address}
The return address, as it should appear on the letter and the
envelope. Separate lines of the address should be separated by
\\ commands. If you do not make an \address declaration, then
the letter will be formatted for copying onto your
organisation's standard letterhead. (See Overview, for details
on your local implementation). If you give an \address
declaration, then the letter will be formatted as a personal
letter.
\cc
\cc{Kate Schechter\\Rob McKenna}
Generate a list of other persons the letter was sent to. Each
name is printed on a separate line.
\closing
\closing{text}
The letter closes with a \closing command, i.e.,
\closing{Best Regards,}
\encl
\encl{CV\\Certificates}
Generate a list of enclosed material.
\location
\location{address}
This modifies your organisation's standard address. This only
appears if the firstpage pagestyle is selected.
\makelabels
\makelabels{number}
If you issue this command in the preamble, LaTeX will create a
sheet of address labels. This sheet will be output before the
letters.
\name
\name{June Davenport}
Your name, used for printing on the envelope together with the
return address.
\opening
\opening{text}
The letter begins with the \opening command. The mandatory
argument, text, is whatever text you wish to start your letter,
i.e.,
\opening{Dear Joe,}
\ps
\ps
Use this command before a postscript.
\signature
\signature{Harvey Swick}
Your name, as it should appear at the end of the letter
underneath the space for your signature. Items that should go
on separate lines should be separated by \\ commands.
\startbreaks
\startbreaks
Used after a \stopbreaks command to allow page breaks again.
\stopbreaks
\stopbreaks
Inhibit page breaks until a \startbreaks command occurs.
\telephone
\telephone{number}
This is your telephone number. This only appears if the
firstpage pagestyle is selected.
2.3.10 Line & Page Breaking
The first thing LaTeX does when processing ordinary text is to
translate your input file into a string of glyphs and spaces.
To produce a printed document, this string must be broken into
lines, and these lines must be broken into pages. In some
environments, you do the line breaking yourself with the \\
command, but LaTeX usually does it for you.
\\
\\[extra-space], \\*[extra-space]
The \\ command tells LaTeX to start a new line. It has an
optional argument, extra-space, that specifies how much extra
vertical space is to be inserted before the next line. This can
be a negative amount.
The \\* command is the same as the ordinary \\ command except
that it tells LaTeX not to start a new page after the line.
\-
The \- command tells LaTeX that it may hyphenate the word at
that point. LaTeX is very good at hyphenating, and it will
usually find all correct hyphenation points. The \- command is
used for the exceptional cases.
Note that when you insert \- commands in a word, the word will
only be hyphenated at those points and not at any of the
hyphenation points that LaTeX might otherwise have chosen.
\cleardoublepage
The \cleardoublepage command ends the current page and causes
all figures and tables that have so far appeared in the input
to be printed. In a two-sided printing style, it also makes the
next page a right-hand (odd-numbered) page, producing a blank
page if necessary.
\clearpage
The \clearpage command ends the current page and causes all
figures and tables that have so far appeared in the input to be
printed.
\enlargethispage
\enlargethispage{size}
\enlargethispage*{size}
Enlarge the \textheight for the current page by the specified
amount; e.g. \enlargethispage{\baselineskip} will allow one
additional line.
The starred form tries to squeeze the material together on the
page as much as possible. This is normally used together with
an explicit \pagebreak.
\samepage
\samepage
The object in the argument {} should be on the current page.
\fussy
\fussy
This declaration (which is the default) makes TeX more fussy
about line breaking. This can avoids too much space between
words, but may produce overfull boxes.
This command cancels the effect of a previous \sloppy command.
\sloppy
\hyphenation
\hyphenation{words}
The \hyphenation command declares allowed hyphenation points,
where words is a list of words, separated by spaces, in which
each hyphenation point is indicated by a - character.
\linebreak
\linebreak[number]
The \linebreak command tells LaTeX to break the current line at
the point of the command. With the optional argument, number,
you can convert the \linebreak command from a demand to a
request. The number must be a number from 0 to 4. The higher
the number, the more insistent the request is.
The \linebreak command causes LaTeX to stretch the line so it
extends to the right margin.
\newline
The \newline command breaks the line right where it is. It can
only be used in paragraph mode.
\newpage
The \newpage command ends the current page. In contrast to
\pagebreak it can produce a partly empty page, even when
\flushbottom is active.
\nolinebreak
\nolinebreak[number]
The \nolinebreak command prevents LaTeX from breaking the
current line at the point of the command. With the optional
argument, number, you can convert the \nolinebreak command from
a demand to a request. The number must be a number from 0 to 4.
The higher the number, the more insistent the request is.
\nopagebreak
\nopagebreak[number]
The \nopagebreak command prevents LaTeX from breaking the
current page at the point of the command. With the optional
argument, number, you can convert the \nopagebreak command from
a demand to a request. The number must be a number from 0 to 4.
The higher the number, the more insistent the request is.
\pagebreak
\pagebreak[number]
The \pagebreak command tells LaTeX to break the current page at
the point of the command. With the optional argument, number,
you can convert the \pagebreak command from a demand to a
request. The number must be a number from 0 to 4. The higher
the number, the more insistent the request is.
\sloppy
\sloppy
This declaration makes TeX less fussy about line breaking. This
can prevent overfull boxes, but may leave too much space
between words.
Lasts until a \fussy command is issued. \fussy.
2.3.11 Making Paragraphs
A paragraph is ended by one or more completely blank lines ---
lines not containing even a %. A blank line should not appear
where a new paragraph cannot be started, such as in math mode
or in the argument of a sectioning command.
\indent
\indent
This produces a horizontal space whose width equals the width
of the paragraph indentation. It is used to add paragraph
indentation where it would otherwise be suppressed.
\noindent
\noindent
When used at the beginning of the paragraph, it suppresses the
paragraph indentation. It has no effect when used in the middle
of a paragraph.
\par
Equivalent to a blank line; often used to make command or
environment definitions easier to read.
2.3.12 Margin Notes
The command \marginpar[left]{right} creates a note in the
margin. The first line will be at the same height as the line
in the text where the \marginpar occurs.
When you only specify the mandatory argument right, the text
will be placed
* in the right margin for one-sided layout
* in the outside margin for two-sided layout
* in the nearest margin for two-column layout.
By issuing the command \reversemarginpar, you can force the
marginal notes to go into the opposite (inside) margin.
When you specify both arguments, left is used for the left
margin, and right is used for the right margin.
The first word will normally not be hyphenated; you can enable
hyphenation by prefixing the first word with a \hspace{0pt}
command.
2.3.13 Math Formulae
Table 1.7. Three environments that put LaTeX in math mode
math For Formulae that appear right in the text.
displaymath For Formulae that appear on their own line.
equation The same as the displaymath environment except that it
adds an equation number in the right margin.
The math environment can be used in both paragraph and LR mode,
but the displaymath and equation environments can be used only
in paragraph mode. The math and displaymath environments are
used so often that they have the following short forms:
\(...\) instead of \begin{math}...\end{math}
\[...\] instead of \begin{displaymath}...\end{displaymath}
In fact, the math environment is so common that it has an even
shorter form:
$ ... $ instead of \(...\)
Subscripts & Superscripts
To get an expression exp to appear as a subscript, you just
type _{exp} . To get exp to appear as a superscript, you type
^{exp }. LaTeX handles superscripted superscripts and all of
that stuff in the natural way. It even does the right thing
when something has both a subscript and a superscript.
Math Symbols
Spacing in Math Mode
In a math environment, LaTeX ignores the spaces you type and
puts in the spacing that it thinks is best. LaTeX formats
mathematics the way it's done in mathematics texts. If you want
different spacing, LaTeX provides the following four commands
for use in math mode:
1. \; - a thick space
2. \: - a medium space
3. \, - a thin space
4. \! - a negative thin space
Math Miscellany
Table 1.8. Math Miscellany
\cdots Produces a horizontal ellipsis where the dots are raised
to the centre of the line.
\ddots Produces a diagonal ellipsis.
\frac{num}{den} Produces the fraction num divided by den.
\ldots Produces an ellipsis. This command works in any mode,
not just math mode.
\overbrace{text} Generates a brace over text.
\overline{text} Causes the argument text to be overlined.
\sqrt[root]{arg} Produces the square root of its argument. The
optional argument, root, determines what root to produce, i.e.,
the cube root of x+y would be typed as $\sqrt[3]{x+y}$.
\underbrace{text} Generates text with a brace underneath.
\underline{text} Causes the argument text to be underlined.
This command can also be used in paragraph and LR modes.
\vdots Produces a vertical ellipsis.
\ensuremath{} It's argument is set in math mode. This is needed
for own definitions.
2.3.14 Modes
When LaTeX is processing your input text, it is always in one
of three modes:
* paragraph mode
* Math mode
* Left-to-right mode, called LR mode for short
LaTeX changes mode only when it goes up or down a staircase to
a different level, though not all level changes produce mode
changes. Mode changes occur only when entering or leaving an
environment, or when LaTeX is processing the argument of
certain text-producing commands.
Paragraph mode is the most common; it's the one LaTeX is in
when processing ordinary text. In that mode, LaTeX breaks your
text into lines and breaks the lines into pages. LaTeX is in
math mode when it's generating a mathematical formula. In LR
mode, as in paragraph mode, LaTeX considers the output that it
produces to be a string of words with spaces between them.
However, unlike paragraph mode, LaTeX keeps going from left to
right; it never starts a new line in LR mode. Even if you put a
hundred words into an \mbox, LaTeX would keep typesetting them
from left to right inside a single box, and then complain
because the resulting box was too wide to fit on the line.
LaTeX is in LR mode when it starts making a box with an \mbox
command. You can get it to enter a different mode inside the
box - for example, you can make it enter math mode to put a
formula in the box. There are also several text-producing
commands and environments for making a box that put LaTeX in
paragraph mode. The box make by one of these commands or
environments will be called a parbox. When LaTeX is in
paragraph mode while making a box, it is said to be in inner
paragraph mode. Its normal paragraph mode, which it starts out
in, is called outer paragraph mode.
2.3.15 Page Styles
The \documentclass command determines the size and position of
the page's head and foot. The page style determines what goes
in them.
\maketitle
\maketitle
The \maketitle command generates a title on a separate title
page. In the article class, \maketitle will also switch to
pagestyle plain. See Page Styles for commands to change page
numbering.
Information used to produce the title is obtained from the
following declarations:
See Page Styles for the commands to give the information.
\author
\author{names}
The \author command declares the author(s), where names is a
list of authors separated by \and commands. Use \\ to separate
lines within a single author's entry -- for example, to give
the author's institution or address.
\date
\date{text}
The \date command declares text to be the document's date. With
no \date command, the current date is used.
\thanks
\thanks{text}
The \thanks command produces a \footnote to the title.
\title
\title{text}
The \title command declares text to be the title. Use \\ to
tell LaTeX where to start a new line in a long title.
\pagenumbering
\pagenumbering{num_style}
Specifies the style of page numbers. Possible values of
num_style are:
* arabic - Arabic numerals
* roman - Lowercase Roman numerals
* Roman - Uppercase Roman numerals
* alph - Lowercase letters
* Alph - Uppercase letters
\pagestyle
\pagestyle{option}
The \pagestyle command changes the style from the current page
on throughout the remainder of your document.
The valid options are:
* plain - Just a plain page number.
* empty - Produces empty heads and feet - no page numbers.
* headings - Puts running headings on each page. The document
style specifies what goes in the headings.
* myheadings - You specify what is to go in the heading with
the \markboth or the \markright commands.
\markboth
\markboth{left head}{right head}
The \markboth command is used in conjunction with the page
style myheadings for setting both the left and the right
heading. You should note that a left-hand heading is generated
by the last \markboth command before the end of the page, while
a right-hand heading is generated by the first \markboth or
\markright that comes on the page if there is one, otherwise by
the last one before the page.
\markright
\markright{right head}
The \markright command is used in conjunction with the page
style myheadings for setting the right heading, leaving the
left heading unchanged. You should note that a left-hand
heading is generated by the last \markboth command before the
end of the page, while a right-hand heading is generated by the
first \markboth or \markright that comes on the page if there
is one, otherwise by the last one before the page.
\thispagestyle
\thispagestyle{option}
The \thispagestyle command works in the same manner as the
\pagestyle command except that it changes the style for the
current page only.
2.3.16 Sectioning
Sectioning commands provide the means to structure your text
into units.
* \part
* \chapter (report and book class only)
* \section
* \subsection
* \subsubsection
* \paragraph
* \subparagraph
All sectioning commands take the same general form, i.e.,
\chapter[optional]{title}
In addition to providing the heading in the text, the mandatory
argument of the sectioning command can appear in two other
places:
1. The table of contents
2. The running head at the top of the page
You may not want the same thing to appear in these other two
places as appears in the text heading. To handle this
situation, the sectioning commands have an optional argument
that provides the text for these other two purposes.
All sectioning commands have *-forms that print a title, but do
not include a number and do not make an entry in the table of
contents.
\appendix
The \appendix command changes the way sectional units are
numbered. The \appendix command generates no text and does not
affect the numbering of parts. The normal use of this command
is something like
\chapter{The First Chapter}
...
\appendix
\chapter{The First Appendix}
2.3.17 Spaces & Boxes
All the predefined length parameters See Predefined lengths can
be used in the arguments of the box-making commands.
\dotfill
The \dotfill command produces a rubber length that produces
dots instead of just spaces.
\hfill
The \hfill fill command produces a rubber length which can
stretch or shrink horizontally. It will be filled with spaces.
\hrulefill
The \hrulefill fill command produces a rubber length which can
stretch or shrink horizontally. It will be filled with a
horizontal rule.
\hspace
\hspace{length}, \hspace*{length}
The \hspace command adds horizontal space. The length of the
space can be expressed in any terms that LaTeX understands,
i.e., points, inches, etc. You can add negative as well as
positive space with an \hspace command. Adding negative space
is like backspacing.
LaTeX removes horizontal space that comes at the end of a line.
If you don't want LaTeX to remove this space, include the
optional * argument. Then the space is never removed.
\addvspace
\addvspace{length}
The \addvspace command normally adds a vertical space of height
length. However, if vertical space has already been added to
the same point in the output by a previous \addvspace command,
then this command will not add more space than needed to make
the natural length of the total vertical space equal to length.
\bigskip
The \bigskip command is equivalent to \vspace{bigskipamount}
where bigskipamount is determined by the document class.
\medskip
The \medskip command is equivalent to \vspace{medskipamount}
where medskipamount is determined by the document class.
\smallskip
\smallskip
The \smallskip command is equivalent to
\vspace{smallskipamount} where smallskipamount is determined by
the document class.
\vfill
The \vfill fill command produces a rubber length which can
stretch or shrink vertically.
\vspace
\vspace{length}, \vspace*{length}
The \vspace command adds vertical space. The length of the
space can be expressed in any terms that LaTeX understands,
i.e., points, inches, etc. You can add negative as well as
positive space with an \vspace command.
LaTeX removes vertical space that comes at the end of a page.
If you don't want LaTeX to remove this space, include the
optional * argument. Then the space is never removed.
\fbox
\fbox{text}
The \fbox command is exactly the same as the \mbox command,
except that it puts a frame around the outside of the box that
it creates.
\framebox
\framebox[width][position]{text}
The \framebox command is exactly the same as the \makebox
command, except that it puts a frame around the outside of the
box that it creates.
The framebox command produces a rule of thickness \fboxrule,
and leaves a space \fboxsep between the rule and the contents
of the box.
lrbox
\begin{lrbox}{cmd} text \end{lrbox}
This is the environment form of \sbox.
The text inside the environment is saved in the box cmd, which
must have been declared with \newsavebox.
\makebox
\makebox[width][position]{text}
The \makebox command creates a box just wide enough to contain
the text specified. The width of the box is specified by the
optional width argument. The position of the text within the
box is determined by the optional position argument.
* c --- centred (default)
* l --- flushleft
* r --- flushright
* s --- stretch from left to right margin. The text must
contain stretchable space for this to work.
See \makebox (picture).
\mbox
\mbox{text}
The \mbox command creates a box just wide enough to hold the
text created by its argument.
Use this command to prevent text from being split across lines.
\newsavebox
\newsavebox{cmd}
Declares cmd, which must be a command name that is not already
defined, to be a bin for saving boxes.
\parbox
\parbox[position][height][inner-pos]{width}{text}
A parbox is a box whose contents are created in paragraph mode.
The \parbox has two mandatory arguments:
* width - specifies the width of the parbox, and
* text - the text that goes inside the parbox.
LaTeX will position a parbox so its centre lines up with the
centre of the text line. The optional position argument allows
you to line up either the top or bottom line in the parbox
(default is top).
If the height argument is not given, the box will have the
natural height of the text.
The inner-pos argument controls the placement of the text
inside the box. If it is not specified, position is used.
* t --- text is placed at the top of the box.
* c --- text is centred in the box.
* b --- text is placed at the bottom of the box.
* s --- stretch vertically. The text must contain vertically
stretchable space for this to work.
A \parbox command is used for a parbox containing a small piece
of text, with nothing fancy inside. In particular, you
shouldn't use any of the paragraph-making environments inside a
\parbox argument. For larger pieces of text, including ones
containing a paragraph-making environment, you should use a
minipage environment See minipage.
\raisebox
\raisebox{distance}[extend-above][extend-below]{text}
The \raisebox command is used to raise or lower text. The first
mandatory argument specifies how high the text is to be raised
(or lowered if it is a negative amount). The text itself is
processed in LR mode.
Sometimes it's useful to make LaTeX think something has a
different size than it really does - or a different size than
LaTeX would normally think it has. The \raisebox command lets
you tell LaTeX how tall it is.
The first optional argument, extend-above, makes LaTeX think
that the text extends above the line by the amount specified.
The second optional argument, extend-below, makes LaTeX think
that the text extends below the line by the amount specified.
\rule
\rule[raise-height]{width}{thickness}
The \rule command is used to produce horizontal lines. The
arguments are defined as follows:
* raise-height - specifies how high to raise the rule
(optional)
* width - specifies the length of the rule (mandatory)
* thickness - specifies the thickness of the rule (mandatory)
\savebox
\savebox{cmd}[width][pos]{text}
This command typeset text in a box just as for \makebox.
However, instead of printing the resulting box, it saves it in
bin cmd, which must have been declared with \newsavebox.
\sbox
\sbox{cmd}\{text}
This commands typesets text in a box just as for \mbox.
However, instead of printing the resulting box, it saves it in
cmd, which must have been declared with \newsavebox.
\usebox
\usebox{cmd}
Prints the box most recently saved in bin cmd by a \savebox
command.
2.3.18 Special Characters
The following characters play a special role in LaTeX and are
called special printing characters, or simply special
characters.
# $ % & ~ _ ^ \ { }
Whenever you put one of these special characters into your
file, you are doing something special. If you simply want the
character to be printed just as any other letter, include a \
in front of the character. For example, \$ will produce $ in
your output.
One exception to this rule is the \ itself because \\ has its
own special meaning. A \ is produced by typing $\backslash$ in
your file.
Also, \~ means `place a tilde accent over the following
letter', so you will probably want to use \verb instead.
In addition, you can access any character of a font once you
know its number by using the \symbol command. For example, the
character used for displaying spaces in the \verb* command has
the code decimal 32, so it can be typed as \symbol{32}.
You can also specify octal numbers with ' or hexadecimal
numbers with ", so the previous example could also be written
as \symbol{'40} or \symbol{"20}.
2.3.19 Special Symbols
Accents on Characters
The rules differ somewhat depending whether you are in text
mode, math modes, or the tabbing environment.
Text Mode
The following accents may be placed on letters. Although o is
used in most of the example, the accents may be placed on any
letter. Accents may even be placed above a missing letter; for
example, \~{} produces a tilde over a blank space.
The following commands may be used only in paragraph or LR
mode:
* \`{o} produces a grave accent, ò
* \'{o} produces an acute accent, ó
* \^{o} produces a circumflex, ô
* \"{o} produces an umlaut or dieresis, ö
* \H{o} produces a long Hungarian umlaut
* \~{o} produces a tilde, õ
* \c{c} produces a cedilla, ç
* \={o} produces a macron accent (a bar over the letter)
* \b{o} produces a bar under the letter
* \.{o} produces a dot over the letter
* \d{o} produces a dot under the letter
* \u{o} produces a breve over the letter
* \v{o} produces a v over the letter
* \t{oo} produces a tie (inverted u) over the two letters
Note that the letters i and j require special treatment when
they are given accents because it is often desirable to replace
the dot with the accent. For this purpose, the commands \i and
\j can be used to produce dotless letters.
For example,
* \^{\i} should be used for i, circumflex, î
* \"{\i} should be used for i, umlaut, ï
Math Mode
Several of the above and some similar accents can also be
produced in math mode. The following commands may be used only
in math mode:
* \hat{o} is similar to the circumflex (cf. \^)
* \widehat{oo} is a wide version of \hat over several letters
* \check{o} is a vee or check (cf. \v)
* \tilde{o} is a tilde (cf. \~)
* \widetilde{oo} is a wide version of \tilde over several
letters
* \acute{o} is an acute accent (cf. \`)
* \grave{o} is a grave accent (cf. >\')
* \dot{o} is a dot over the letter (cf. \.)
* \ddot{o} is a double dot over the letter
* \breve{o} is a breve (cf. \u)
* \bar{o} is a macron (cf. \=)
* \vec{o} is a vector (arrow) over the letter
Tabbing Environment
Some of the accent marks used in running text have other uses
in the Tabbing Environment. In that case they can be created
with the following command:
* >\a' for an acute accent
* \a` for a grave accent
* \a= for a macron accent
Arrows
LaTeX provides commands for all sorts of arrows. The following
commands are used only in math mode.
In general the command names are created from left, right, up,
or down. leftright gives a double headed arrow. Prefacing with
long gives a longer arrow. Capitalizing the first letter gives
a double-shanked arrow.
Examples are:
* \leftarrow
* \Leftarrow
* \longleftarrow
* \Longleftarrow
* \rightarrow
* \Rightarrow
* \longrightarrow
* \Longrightarrow
* \leftrightarrow
* \Leftrightarrow
* \longleftrightarrow
* \uparrow
* \downarrow
* \Uparrow
* >\nearrow points from southwest to northeast
* \searrow points from northwest to southeast
* \swarrow points from northeast to southwest
* \nwarrow points from southeast to northwest
The \stackrel command is useful for putting things over or
under your arrow.
See also:
* Math Symbols
* Binary and Relational Operators
* Greek Letters
* Miscellaneous Symbols
* Variable Size Math Symbols
Binary and Relational Operators
Some math symbols are obtained by typing the corresponding
keyboard character. Examples include
+ - = < >
Note
plus, minus, and equal sign may be used in either text or math
mode, but < and > are math mode only (they produce inverted
exclamation and question marks, respectively, in text mode).
The following commands may be used only in math mode:
* \pm plus or minus sign
* \mp minus or plus sign
* \times times (an "x")
* \div divided by sign
* \ast an asterisk (centered)
* \star a five-point star (centered)
* \bullet a bullet
* \circ an open bullet
* \cdot a centered dot
* \leq less than or equal to
* \ll much less than
* \subset is a subset of
* \geq greater than or equal to
* \gg much greater than
* \equiv equivalence symbol
* \sim similar to
* \simeq similar or equal to
* \approx approximately equal to
* \neq not equal to
* \per "perpendicular to" symbols
* \propto proportional to
Note that greater than and less than are obtained simply by
entering > and <.
A slash, indicating not can be placed through a symbol (or a
letter) with the \not command. For example, not less than is
\not< and not less than or equal to is \not\leq. If the slash
isn't properly positioned it can be moved by putting a math
mode spacing command between the \notand the symbol.
Delimiters
Delimiters are objects which act logically like parentheses.
These can be used only in math mode.
The delimiters recognized by LaTeX include:
* ( (left parenthesis)
* ) (right parenthesis)
* [ (left bracket)
* ] (right bracket)
* \{ (left brace)
* \} (right brace)
* | (vertical line)
* \vert (vertical line)
* \| (double vertical lines)
* \Vert (double vertical lines)
* / (slash)
* \backslash (backslash)
* \langle (left angle bracket)
* \rangle (right angle bracket)
* \uparrow (uparrow)
* \downarrow (down arrow)
* \updownarrow (up/down arrow)
Making Delimiters the Right Size
Delimiters in formulas should be big enough to fit around the
formulas they delimit (for example arround arrays). To obtain
stretchable delimiters (LaTeX makes them the appropriate size)
type a \left or \right command before the delimiter. \left and
\right commands must come in matching pairs, although the
delimiters themselves need not be the same. Thus, \left \{ ...
\right \[ produces a legal pair. In cases where only one
delimiter is desired, it is possible to make the matching
delimiter invisible by typing a period (.) after the command,
i.e., \left. or \right.
In an eqnarray environment the matching \left and \right cannot
be split between lines and it may be necessary to use an
invisible \right. and \left. to terminate and begin parts on
different lines. In this case a second problem may arise, since
the size of the delimiters will be chosen only for the local
part, so that the size of the visible left and right delimiters
might not match. The solution is to trick LaTeX into thinking
that both parts have the same vertical height. This can be done
by placing a strut, that is a zero-width \rule. It can also be
accomplished with the \vphantom command, which I have not found
documented, but which appears to work.
\vphantom{construct} creates a zero-width object with the
height of construct. The argument can contain things such as
\frac or the variable size math symbols and should be chosen
according to what is in the section with the delimiter you want
to match.
Some Examples
A six-j symbol
\[ \left\{
\begin{array}{ccc}
a & b & c \\
d & e & f \end{array}
\right>\} \]
This should be displayed something like (insofar as it can be
rendered in "ascii art"):
( a b c )
- -
( d e f )
Note that the \[ ... \] set this off as Display Math, and that
the Array Environment is used to generate the three centered
columns inside the braces.
A "multiple choice" equation
\[ f(x) =
\left\{ \begin{array}{l}
0, x < 0 \\ 1, x = 0 \\
2, x > 0 \end{array} \right. \]
will be displayed as
( 0, x < 0
f(x) = - 1, x = 0
( 2, x > 0
Note that the invisible \right delimiter is specified using a
period.
Ellipsis
Ellipses (three dots) can be produced by the following commands
* \ldots horizontally at bottom of line
* \cdots horizontally center of line (math mode only)
* \ddots diagonal (math mode only)
* \vdots vertical (math mode only)
Greek Letters
These commands may be used only in math mode:
* \alpha
* \beta
* \gamma
* \delta
* \epsilon
* \varepsilon (variation, script-like)
* \zeta
* \eta
* \theta
* \vartheta (variation, script-like)
* \iota
* \kappa
* \lambda
* \mu
* \nu
* \xi
* \pi
* \varpi (variation)
* \rho
* \varrho (variation, with the tail)
* \sigma
* \varsigma (variation, script-like)
* \tau
* \upsilon
* \phi
* \varphi (variation, script-like)
* \chi
* \psi
* \omega
Capital letters:
* \Gamma
* \Delta
* \Theta
* \Lambda
* \Xi
* \Pi
* \Sigma
* \Upsilon
* \Phi
* \Psi
* \Omega
See also:
* Math Symbols
* Accents
* Miscellaneous Symbols
Miscellaneous Symbols
Some symbols for math
The following symbols are also used only in math mode
* \aleph Hebrew aleph
* \hbar h-bar, Planck's constant
* \imath variation on i; no dot
* \jmath variation on j; no dot
* \ell script (loop) l
* \wp fancy script lowercase P
* \Re script capital R (Real)
* \Im script capital I (Imaginary)
* \prime prime (also obtained by typing ')
* \nabla inverted capital Delta
* \surd radical (square root) symbol
* \angle angle symbol
* \forall for all (inverted A)
* \exists exists (left-facing E)
* \partial partial derivative symbol
* \infty infinity symbol
* \triangle open triangle symbol
* \Box open square
* \Diamond open diamond
* \flat music: flat symbol
* \natural music: natural symbol
* \clubsuit playing cards: club suit symbol
* \diamondsuit playing cards: diamond suit symbol
* \heartsuit playing cards: heart suit symbol
* \spadesuit playing cards: space suit symbol
Some Other Symbols
The following symbols can be used in any mode:
* \dag dagger
* >\ddag double dagger
* >\S section symbol
* >\P paragraph symbol
* >\copyright copyright symbol
* >\pounds British pound sterling symbol
Calligraphic Style Letters
Twenty-six calligraphic letters are provided (the upper case
alphabet). These can only be used in math mode.
In LaTeX 2.09 they are produced with the \cal declaration:
${\cal A}$
In LaTeX2e they are obtained with the \mathcal command:
$\mathcal{CAL}$
Math Functions
Functions like log or cos are normally used in math mode.
However, inmath mode strings of letters are treated as a
product of variables, which would normally be displayed in math
italics rather than a text font which would be appropriate for
these functions. To get proper display of such functions they
are generated with LaTeX commands.
Some of these commands are:
* \arccos
* \arcsin
* \arctan
* \cos
* \cosh
* \cot
* \coth
* \csc
* \deg
* \det
* \dim
* \exp
* \gcd
* \hom
* \inf
* \ker
* \lg
* \lim
* \liminf
* \limsup
* \ln
* \log
* \max
* \min
* \sec
* \sin
* \sinh
* \sup
* \tan
* \tanh
Two commands are provided for the "modulus" function
* \bmod
* \pmod{}
The former would be used to write "a mod b" as a \bmod b and
the latter, which requires an argument that is displayed in
parentheses, would be used to write "n = i (mod j)" as n = i
\pmod{j}
Variable Size Math Symbols
The size of some mathematical symbols, notably summation signs,
product signs, and integral signs, depends on the environment
in which they appear (i.e., displaymath as opposed to math
environments.
These include:
* \sum a summation sign (capital sigma)
* \prod a product (capital pi)
* \coprod a coproduct (inverted capital pi)
* \int an integral sign
* \oint a surface (circular) integral sign
* \bigcup big "U"
* \bigcap big inverted "U"
* \bigvee big "V"
* \bigwedge big inverted "V"
* \bigodot big "O" with dot at center
* \bigotimes big "O" with cross inside
* \bigoplus big "O" with a + inside
* \biguplus big "U" with a + inside
The \sqrt command also produces a variable size symbol
appropriate for the size of hte radicand argument.
The "limits" associated with these symbols are entered as
subscripts for entries appearing below the symbol and as
superscripts for entries appearing above the symbol. For
example the sum from n=0 to infinity of x^n would be entered as
\sum_{n=0}^{\infty} x_{n}
The actual placement of the limits depends on whether this is
in displaymath mode in which case they are placed below/above
or in math mode in running text in which case they are placed
as regular subscripts and superscripts.
Note that it is possible to treat several of these symbols (a
common example would be a double sum) as a single symbol for
placing limits above and/or below by using the \mathop command.
Hats and tildes over symbols which stretch (as best they can)
to the correct size for their arguments are produced by
\widehat and \widetilde
2.3.20 Splitting the Input
A large document requires a lot of input. Rather than putting
the whole input in a single large file, it's more efficient to
split it into several smaller ones. Regardless of how many
separate files you use, there is one that is the root file; it
is the one whose name you type when you run LaTeX.
\include
\include{file}
The \include command is used in conjunction with the
\includeonly command for selective inclusion of files. The file
argument is the first name of a file, denoting file.tex. If
file is one the file names in the file list of the \includeonly
command or if there is no \includeonly command, the \include
command is equivalent to
\clearpage \input{file} \clearpage
except that if the file file.tex does not exist, then a warning
message rather than an error is produced. If the file is not in
the file list, the \include command is equivalent to
\clearpage.
The \include command may not appear in the preamble or in a
file read by another \include command.
\includeonly
\includeonly{file_list}
The \includeonly command controls which files will be read in
by an \include command. file_list should be a comma-separated
list of filenames. Each filename must match exactly a filename
specified in a \include command. This command can only appear
in the preamble.
\input
\input{file}
The \input command causes the indicated file to be read and
processed, exactly as if its contents had been inserted in the
current file at that point. The file name may be a complete
file name with extension or just a first name, in which case
the file file.tex is used.
2.3.21 Starting & Ending
Your input file must contain the following commands as a
minimum:
\documentclass{class}
\begin{document}
... your text goes here ...
\end{document}
where the class selected is one of the valid classes for LaTeX.
See Document Classes (and see Overview), for details of the
various document classes available locally.
You may include other LaTeX commands between the \documentclass
and the \begin{document} commands (i.e., in the `preamble').
2.3.22 Table of Contents
A table of contents is produced with the \tableofcontents
command. You put the command right where you want the table of
contents to go; LaTeX does the rest for you. It produces a
heading, but it does not automatically start a new page. If you
want a new page after the table of contents, include a \newpage
command after the \tableofcontents command.
There are similar commands \listoffigures and \listoftables for
producing a list of figures and a list of tables, respectively.
Everything works exactly the same as for the table of contents.
NOTE: If you want any of these items to be generated, you
cannot have the \nofiles command in your document.
\addcontentsline
\addcontentsline{file}{sec_unit}{entry}
The \addcontentsline command adds an entry to the specified
list or table where:
* file is the extension of the file on which information is
to be written: toc (table of contents), lof (list of
figures), or lot (list of tables).
* sec_unit controls the formatting of the entry. It should be
one of the following, depending upon the value of the file
argument:
1. toc --- the name of the sectional unit, such as part
or subsection.
2. lof --- figure
3. lot --- table
* entry is the text of the entry.
\addtocontents
\addtocontents{file}{text}
The \addtocontents command adds text (or formatting commands)
directly to the file that generates the table of contents or
list of figures or tables.
* file is the extension of the file on which information is
to be written: toc (table of contents), lof (list of
figures), or lot (list of tables).
* text is the information to be written.
2.3.23 Terminal Input/Output
\typein
\typein[cmd]{msg}
Prints msg on the terminal and causes LaTeX to stop and wait
for you to type a line of input, ending with return. If the cmd
argument is missing, the typed input is processed as if it had
been included in the input file in place of the \typein
command. If the cmd argument is present, it must be a command
name. This command name is then defined or redefined to be the
typed input.
\typeout
\typeout{msg}
Prints msg on the terminal and in the log file. Commands in msg
that are defined with \newcommand or \renewcommand are replaced
by their definitions before being printed.
LaTeX's usual rules for treating multiple spaces as a single
space and ignoring spaces after a command name apply to msg. A
\space command in msg causes a single space to be printed. A
^^J in msg prints a newline.
2.3.24 Typefaces
The typeface is specified by giving the size and style. A
typeface is also called a font.
\Styles
The following type style commands are supported by LaTeX.
These commands are used like \textit{italics text}. The
corresponding command in parenthesis is the declaration form,
which takes no arguments. The scope of the declaration form
lasts until the next type style command or the end of the
current group.
The declaration forms are cumulative; i.e., you can say
\sffamily\bfseries to get sans serif boldface.
You can also use the environment form of the declaration forms;
e.g. \begin{ttfamily}...\end{ttfamily}.
Table 1.9. Typefaces
\textrm (\rmfamily) Roman.
\textit (\itshape) , \emph Emphasis (toggles between \textit
and \textrm).
\textmd (\mdseries) Medium weight (default). The opposite of
boldface.
\textbf (\bfseries) Boldface.
\textup (\upshape) Upright (default). The opposite of slanted.
\textsl (\slshape) Slanted.
\textsf (\sffamily) Sans serif.
\textsc (\scshape) Small caps.
\texttt (\ttfamily) Typewriter.
\textnormal (\normalfont) Main document font.
\mathrm Roman, for use in math mode.
\mathbf Boldface, for use in math mode. For bold symbols or
complete equations take a look at \boldsymbol and \bm.
\mathsf Sans serif, for use in math mode.
\mathtt Typewriter, for use in math mode.
\mathit Italics, for use in math mode, e.g. variable names with
several letters.
\mathnormal For use in math mode, e.g. inside another type
style declaration.
\mathcal `Calligraphic' letters, for use in math mode.
In addition, the command \mathversion{bold} can be used for
switching to bold letters and symbols in formulas.
\mathversion{normal} restores the default.
Sizes
The following standard type size commands are supported by
LaTeX.
The commands as listed here are "declaration forms". The scope
of the declaration form lasts until the next type style command
or the end of the current group.
You can also use the environment form of these commands; e.g.
\begin{tiny}...\end{tiny}.
Table 1.10. Standard type size commands
\tiny
\scriptsize
\footnotesize
\small
\normalsize (default)
\large
\Large
\LARGE
\huge
\Huge
Low-level font commands
These commands are primarily intended for writers of macros and
packages. The commands listed here are only a subset of the
available ones. For full details, you should consult Chapter 7
of The LaTeX Companion.
Table 1.11. Low-level font commands
\fontencoding{enc} Select font encoding. Valid encodings
include OT1 and T1.
\fontfamily{family} Select font family. Valid families include:
* cmr for Computer Modern Roman
* cmss for Computer Modern Sans Serif
* cmtt for Computer Modern Typewriter
and numerous others.
\fontseries{series} Select font series. Valid series include:
* m Medium (normal)
* b Bold
* c Condensed
* bc Bold condensed
* bx Bold extended
and various other combinations.
\fontshape{shape} Select font shape. Valid shapes are:
* n Upright (normal)
* it Italic
* sl Slanted (oblique)
* sc Small caps
* ui Upright italics
* ol Outline
The two last shapes are not available for most font families.
\fontsize{size}{skip} Set font size. The first parameter is the
font size to switch to; the second is the \baselineskip to use.
The unit of both parameters defaults to pt. A rule of thumb is
that the baselineskip should be 1.2 times the font size.
\selectfont The changes made by calling the four font commands
described above do not come into effect until \selectfont is
called.
\usefont{enc}{family}{series}{shape} Equivalent to calling
\fontencoding, \fontfamily, \fontseries and \fontshape with the
given parameters, followed by \selectfont.
2.4 Parameters
The input file specification indicates the file to be
formatted; TeX uses .tex as a default file extension. If you
omit the input file entirely, TeX accepts input from the
terminal. You specify command options by supplying a string as
a parameter to the command; e.g.
latex \scrollmode\input foo.tex
will process foo.tex without pausing after every error.
Output files are always created in the current directory. When
you fail to specify an input file name, TeX bases the output
names on the file specification associated with the logical
name TEX_OUTPUT, typically texput.log.
3 LaTeX Packages
3.1 amsmath
amsmath consists of several packages to aid in typesetting
math.
\boldsymbol
Produces a bold math symbol. When not only a single
symbol, but a complete equation has to be bold you might
consider using the superior \bm command which takes
better care of spacing.
\pmb
Can be used for mathematic symbols, when no bold version
is available. It prints the standard symbol several
times slightly shifted and is inferior to a real bold
font!
3.2 dcolumn
\usepackage{dcolumn}
Defines a system for defining columns of entries in an array or
tabular which are to be aligned on a decimal point.
This package defines D to be a column specifier with three
arguments:
D{sep.tex}{sep.dvi}{decimal places}
sep.tex should be a single character, this is used as the
separator in the .tex file. It will usually be '.' or ','.
sep.dvi is used as the separator in the output.
decimal places should be the maximum number of decimal places
in the column.
\newcolumntype can be used to define own column types.
3.3 float
Note
The contents of this section was taken from the documentation
of float v1.3d of 2001/11/08.
“This style option improves the interface for defining objects
such as figures and tabels in LaTeX. It adds the notion of a
float style that governs the appearance of floats.”
\newfloat{<placement>}{<ext>}[<within>]
Add a new class of floats.
\floatstyle{<style>}
Sets a default float style.
\floatname{<style>}{<name>}
Define the float name used in the caption of a float.
\floatplacement{<>}{<placement>}
Resets the default placement specifier of a class of
floats.
\restylefloat<style>
Change styles for the standard float types figure and
table.
\listof{<type>}{<title>}
Produces a list of all floats of a given class.
3.4 fontenc
\usepackage[T1]{fontenc}
chooses T1-fonts and allows correct automatic hyphenation.
3.5 german
Das german Paket muß geladen sein:
"a
erzeugt ein ä
entsprechend "o, "u, "A, "O, "U, "s (ß)
"ck
wird bei Trennung zu k-k
"ff
wird bei Trennung zu ff-f
entsprechend "ll, "mm, "pp, "rr, "tt
\glqq
oder "` erzeugt untere doppelte Anführungszeichen
\grqq
oder "' erzeugt obere doppelte Anführungszeichen
\glq
erzeugt untere einfache Anführungszeichen
\flqq
oder "< doppelte linke französische Anführungszeichen
\frqq
oder "> doppelte rechte französische Anführungszeichen
\flq
einfache linke französische Anführungszeichen
\frq
einfache rechte französische Anführungszeichen
"|
verhindert eine Ligatur an der Stelle
\-
markiert mögliche Trennstelle, im restlichen Wort ist
keine Trennung mehr möglich
"-
Trennvorschlag, der Rest des Wortes kann noch
automatisch getrennt werden
""
Trennvorschlag, bei dem bei einer Trennung kein
Bindestrich eingefügt wird
"~
Bindestrich, an dem nicht getrennt werden darf
"=
Bindestrich, an dem getrennt werden darf
\dq
erzeugt ein nicht-typographisches gerades
Anführungszeichen
\texttt{\dq}
<
oder \dq ergibt das Zoll-Zeichen
3.6 graphics
Look up details in grfguide.
3.6.1 \includegraphics
\includegraphics[]{picture-name}
File extensions of the graphics should be omitted, so it's
easier to change the format (for example for pdf or ps output).
3.6.2 \graphicspath
\graphicspath{dir-list}
dir-list is a list of absolute or relative paths, where the
command \includegraphics{} searches for the graphic files:
\graphicspath{{eps/}{tiff/}} would cause the system to look in
the subdirectories eps and tiff of the current directory. This
is unix syntax, on a Mac it would be:
\graphicspath{{:eps:}{:tiff:}}
Under Windows/DOS use also the slash / to separate directories.
Not all tex installations can handle filenames with spaces. So
it's better to avoid them.
3.7 hyperref
For more infos read in the book LaTeX Web Companion or Mit
LaTeX ins Web.
3.7.1 Options
4
use Acrobat 4 features (default: false).
a4paper, a5paper, b5paper, legalpaper, letterpaper,
executivepaper
use the specified paper size.
anchorcolor
set color of anchors (default: black).
backref
do bibliographical back references (default: false).
baseurl
set base URL for document (default: empty).
bookmarks
make bookmarks (default: true).
bookmarksnumbered
put section numbers in bookmarks (default: false).
bookmarksopen
open up bookmark tree (default: false).
bookmarksopenlevel
level to which bookmarks are open (default: \maxdimen).
bookmarkstype
to specify which `toc' file to mimic toc.
breaklinks
allow links to break over lines (default: false).
citebordercolor
color of border around cites (default: 0 1 0).
citecolor
color of citation links (default: green).
colorlinks
color links (default: false).
debug
provide details of anchors defined (same as verbose,
default: false).
draft
do not do any hyper linking (default: false).
dvipdf, dvipdfm, dvips, dvipsone, dviwindo, hypertex,
latex2html, pdftex, tex4ht, textures, ps2pdf, vtex
use the specified backend.
extension
suffix of linked files (default: dvi).
filebordercolor
color of border around file links (default: 0 .5 .5).
filecolor
color of file links (default: cyan).
frenchlinks
use small caps instead of color for links (default:
false).
hyperfigures
make figures hyper links (default: false).
hyperindex
set up hyperlinked indices (default: true).
hypertexnames
use guessable names for links (default: true).
implicit
redefine LaTeX internals (default: true).
linkbordercolor
color of border around links (default: 1 0 0).
linkcolor
color of links (default: red).
linktocpage
make page number, not text, be link on TOC, LOF and LOT
(default: false).
menubordercolor
color of border around menu links (default: 1 0 0).
menucolor
color for menu links (default: red).
naturalnames
use LaTeX-computed names for links (default: false).
nesting
allow nesting of links (default: false).
pageanchor
put an anchor on every page (default: true).
pagebackref
backreference by page number (default: false).
pagebordercolor
color of border around page links (default: 1 1 0).
pagecolor
color of page links (default: red).
pdfauthor
text for PDF Author field (default: empty).
pdfborder
width of PDF link border (default: 0 0 1; 0 0 0 for
colorlinks)
pdfcenterwindow
position the document window center of the screen
(default: false).
pdfcreator
text for PDF Creator field (default: LaTeX with hyperref
package).
pdffitwindow
resize document window to fit document size (default:
false).
pdfhighlight
set highlighting of PDF links (default: /I).
pdfkeywords
text for PDF Keywords field (default: empty).
pdfmenubar
make PDF viewer's menu bar visible (default: true).
pdfnewwindow
make links that open another PDF file start a new window
(default: false).
pdfpagelayout
set layout of PDF pages (default: empty).
pdfpagemode
set default mode of PDF display (default: empty).
pdfpagescrop
set crop size of PDF document (default: empty).
pdfpagetransition
set PDF page transition style (default: empty).
pdfproducer
text for PDF Producer field (default: empty).
pdfstartpage
page at which PDF document opens (default: 1).
pdfstartview
starting view of PDF document (default: /Fit).
pdfsubject
text for PDF Subject field (default: empty).
pdftitle
text for PDF Title field(default: empty).
pdftoolbar
make PDF toolbar visible (default: true).
pdfview
PDF `view' when on link traversal (default: empty).
pdfwindowui
make PDF user interface elements visible (default:
true).
plainpages
do page number anchors as plain arabic (default: true).
raiselinks
raise up links (for HyperTeX backend; default: false).
runbordercolor
color of border around run links (default: 0 .7 .7).
unicode
Unicode encoded pdf strings (default: true).
urlbordercolor
color of border around URL links (default: 0 1 1).
urlcolor
color of URL links (default: magenta).
verbose
be chatty (default: false).
3.7.2 Commands
\texorpdfstring{TeX-string}{pdf-string}
allows different texts for PDF or TeX creation.
\section{The role of \texorpdfstring{H$_2$O}{water}}
\href{URL}{Text}
the text will be resolved into a URL. The URL must be
complete, according to a base-url which might be defined
in a \hyperbaseurl.
\href{http://www.karpfenteich.net/pit/}{Peter's input tips}
\hyperbaseurl{URL}
defines a base URL, which is preset to a given URL. This
helps to make portable documents.
\hyperimage{image-URL}
includes the picture of the URL reference.
\hyperref{URL}{category}{name}{text}, \hyperref[mark]{text}
text is activated as a hyperlink to the point which is
defined with a \label command with the symbolic name
mark.
\hyperlink{name}{text}, \hyertarget{name}{text}
\hyperlink creates an internal link to an object which
is somewhere defined with a \hypertarget command.
For HTML the command \hyperlink inserts a # character in
front of each link. Thus it'll refer to the topical
document, while \href will expect a complete URL.
\autoref{marker}
\autoref is a substitution for the standard \ref
command. It inserts a context sensitive phrase.
see \autoref{foo}
for a \label in a section will output see section 3 for
an example.
There are macros to change the default output with the
help of the \renewcommand:
\figurename *\figurename*
\tablename *\tablename*
\partname *\partname*
\appendixname *\appendixname*
\equationname *\equationname*
\Itemname *\Itemname*
\chaptername *\chaptername*
\sectionname *\sectionname*
\subsectionname *\subsesctionname*
\subsubsectionname *\subsubsectionname*
\paragraphname *\paragraphname*
\Hfootnotename *\Hfootnotename*
\AMSname *\AMSname*
\theoremname *\theoremname*
\nolinkurl
Allows line breaks in a verbatim like environment like
\url, but without the hyperlink function. This is useful
to define own commands like this example:
\newcommand*{\urlw}[1]{\href{http://www.#1}%
{\nolinkurl{www.#1}}}
This new defined command \urlw allows the user to
typeset a linkable (this function is offered by \href)
www.example.org address in the latex source like this:
\urlw{example.org}
This will produce the string www.example.org which is
hyperlinked and breakable (when the driver like pdfTeX
allows line breaks in links).
3.8 inputenc
\usepackage[encoding name]{inputenc}
Allows to specify an input encoding for direct input of
character codes > 127, e.g. accented characters.
Important encodings are:
latin9, latin1
Linux, Unix, VMS
ansinew
Windows (codepage 1252)
cp850
OS/2, MSDOS (codpage 850)
applemac
Apple Macintosh
3.9 KOMA-Script
The KOMA-Script package has a very detailed and well written
documentation. Read the scrguide for further information! :-)
3.9.1 Page-Layout
\typearea[BCOR]{DIV}
\areaset[BCOR]{Breite}{Höhe}
3.9.2 Options
headinclude, headexclude, footinclude, footexclude
will determine if headers and footers are used in the
calculation of the page size. Default is exclude.
Include will make the text area smaller.
DIV
is a factor which determins how large the used page size
is. This method takes care of good typography.
Try values between 10 and 15. Higher values will cause
smaller margins. An example would be: DIV12.
BCOR
Binding correction. Takes care of the loss of the
visible paper size when the paper is cut and a book is
bound.
3.9.3 Letter Class scrlttr2
This reference is based on the excellent scrguien.pdf from
2002-09-06.
Options
Defining Options Later
\KOMAoptions{options list}
Use this to change options after loading the class. List
single or multiple options, separated by commas.
Page Layout Options
paper=format
Defines the paper format.
BCOR=length, DIV=value, headlines=count
Divisor, binding correction, and number of headlines.
enlargefirstpage
If true some more text would fit on the first page
Other Layout Options
twoside
Activate possibilities of a double-sided document, but
stay with with the one-sided layout as far as possible.
cleardoublepage=style
Inserted pages by \cleardoublepage get one of these page
styles:
+ empty
+ plain
+ standard
headsepline, footsepline
Insert a separator line below the head or above the
foot.
mpinclude, mpexclude
These two options of the typearea package should not be
used with scrlttr2.
pagenumber=position
This option defines if and where a page number will be
placed. Possible values are:
bot, foot
Page number in foot, horizontal position not
changed
botcenter, botcentered, botmiddle, footcenter,
footcentered, footmiddle
Page number infoot,centered
botleft, footleft
Page number in foot, left justified
botrigth, footright
Page number in foot, right justified
center, centered, middle
Page number centered horizontally, vertical
position not changed
false, no, off
No page number
head, top
Page number in head, horizontal position not
changed
headcenter, headcentered, headmiddle, topcenter,
topcentered, topmiddle
Page number in head, centered
headleft, topleft
Page number in head, left justified
headright, topright
Page number in head, right justified
left
Page number left, vertical position not changed
right
Page number right, vertical position not changed
Default is botcenter
parskip=value
Mark paragraphs alternatively by vertical skip. Possible
values are:
false, off
Paragraph indentation instead of verticalk space
full, on, true
One line vertical space between paragraphs; at
least 1 em free space in the last line.
full*
One line vertical space betwen paragraphs; at
least a quarter of a line free space at the end of
a paragraph.
full+
One line vertical space betwen paragraphs; at
least a third of aline free space at the end of a
paragraph.
full-
One line vertical space betwen paragraphs; last
line of a paragraph may be arbitrarily filled.
half
Half a line vertical space between paragraphs; at
least 1 em free space in the last line.
half*
Half a line vertical space between paragraphs; at
least a quarter of a line free space at the end of
a paragraph.
half+
Half a line vertical space between paragraphs; at
least a third of a line free space at the end of a
paragraph.
half-
One line vertical space between paragraphs; last
line may be arbitrarily filled.
Default is false.
Font Options
fontsize=size
Font size of the document. Defaults to 12pt.
Options for Letterhead and Address
fromalign
Defines the placement of the from address in the
letterhead. Possible values are:
center, centered, middle
Return address centered.
false, no, off
Standard design for return address.
left
Left justified return address.
rigth
Right justified return address.
Default is left
fromrule
Allows to place a horizontal rule within return address.
Possible values are:
afteraddress, below, true, yes
Line below return address
aftername
Line right below sender's name
false, no, off
No line.
Default is false.
fromphone
Defines whether the phone number will be part of the
return address.
fromfax
Defines whether the facsimile number will be part of the
return address.
fromemail
Defines whether the email address will be part of the
return address.
fromurl
Defines whether the URL will be part of the return
address.
fromlogo
Defines whether the logo will be part of the return
address.
addrfield
Defines whether a return address field will be set.
backaddress
Defines whether a return address for window envelopes
will be set.
subject
Choose of your subject should have a title and if the
subject should be set before or after the opening.
Possible values are:
afteropening
Set subject after opening.
beforeopening
Set subject before opening.
titled
Add title to subject.
untitled
Do not add title to subject.
Defaults are beforeopening and untitled.
locfield
Toggle between presets for the field width of
additionbal sender attributes.
narrow
Small sender supplement field.
wide
Wide sender supplement field.
Default is narrow.
foldmarks
Activates fold marks.
numericaldate
Toggles between standard, language-dependent date
presentation and a short, numerical one.
refline
Defines that the reference line may extend beyond the
normal type area.
Format Options
draft
Toggles between the final and the draft version.
Letter Class Option Files
\LoadLetterOption{name}
Load a lco file. name is the filename without suffix.
Predefined lco files:
DIN
For A4 size paper, complying with DIN 676.
DINmtext
For A4 size paper, complying with DIN 676, but
using an alternate layout with more text on the
first page.
KOMAold
Fo AQ4 paper size using a layout close to the
obsolete scrlettr class.
SN
For Swiss letters with address field on the right
side, according to SN 010 130
SNleft
For Swiss letters with address field on the left
side.
\LetterOptionNeedsPaperSize{option name}{paper size}
Useful to be abel to emit warnings if the user selects a
different paper size from the one the lco file is based
on.
General Document Properties
Font Selection
See also the section for Changing Fonts in KOMA-Script (still
to be written).
backaddress
Back address for a window envelope
descriptionlabel
Label in a description environment
fromaddress
Sender's address in letterhead
fromname
Sender's address in letterhead if different from
fromaddress
pagefoot
Footer, sometimes header of a page
pagehead
Header, sometimes footer of a page
pagenumber
Page number in footer or header
subject
Subject in the opening
title
Headline in the opening
Page Style
See also the section for Page Style in KOMA-Script (still to be
written).
empty
Entirely empty headers and footers
plain
Empty head and and only page number in header or footer
headings
Automatic page headings
myheadings
Manual page headings
Variables
The main difference between a command and a variable is that a
command usually triggers an action whereas a variable only
consists of plain text. Furthermore a variable can have an
additional description.
\newkomavar[description]{name},
\newkomavar*[description]{name}, \addtoreffields{name}
\newkomavar defines a new variable, addressed with name.
The command \addtoreffields adds the variable name to
the reference fields. See section Business Line.
The command \newkomavar* works like \newkomavar with an
additional call of the command \addtoreffields.
Overview of all variables:
backaddress
Back address for window envelopes
backaddressseparator
Separator within the back address
ccseparator
Separator between title of additional recipients and
additional recipients
customer
Customer number
date
Date
emailseparator
Separator between e-mail name and e-mail address
enclseparator
Separator between title of enclosure and and enclosures
faxseparator
Separator between title of fax and fax number
fromaddress
Sender's address without its name
frombank
Sender's bank account
fromemail
Sender's e-mail
fromfax
Sender's fax number
fromlogo
Commands for inserting the sender's logo
fromname
Complete name of the sender
fromphone
Sender's telephone number
fromurl
URL of the sender
invoice
Invoice number
location
More details of the sender
myref
Sender's reference
place
Place
placeseparator
Separator between place and date
phoneseparator
Separator between title of telephone and telephone
number
signature
Signature beneath the ending of the letter
specialmail
Special mail
subject
Subject
subjectseparator
Separator between title of subject and subject
title
Letter title
toname
Complete name of recipient
toaddress
Address of recipient without its name
yourmail
Date of recipient's mail
yourref
Recipient's reference
\setkomavar{name}[description]{content},
\setkomavar*{name}{description}
\setkomavar sets the content of the variable name. The
optional argument sets the description of the variable.
\setkomavar* only sets the description.
\usekomavar[command]{name}, \usekomavar*[command]{name}
\usekomavar gives you access to the content of the
variable name.
\usekomavar* gives you access to the description of the
variable name.
\ifkomavarempty{name}{true}{false},
\ifkomavarempty*{name}{true}{false}
The true argument will be executed if the content or
description is empty. Otherwise the false argument will
be executed.
The starred version handles the description of a
variable, the variant without star the content.
Pseudo Lengths
\@newplength{name}
Defines a new pseudo length
\useplength{name}
Access value of pseudo length name
\setlengthtoplength[factor]{length}{pseudo length} ,
\addtolengthplength[factor]{length}{pseudo length}
Assign a multiple of pseudo length to a real length.
Adds a multiple of pseudo length to length.
\@setplength[factor]{pseudo length}{value} ,
\@addtoplength[factor]{pseudo length}{value}
Assign a multiple of a value to a pseudo length. Adds
value to pseudo length.
Letter Declaration
Letterhead
firstheadvpos
Distance between the top of the sheet and the
letterhead.
firstheadwidth
Width of the letterhead.
fromname, fromaddress, fromphone, fromfax, fromemail, fromurl,
fromlogo
This variables give all statements concerning the sender
necessary to create the letterhead.
phoneseparator, faxseparator, emailseparator, urlseparator
Separators for variables in letterhead.
\firsthead{construction}
Create letterhead freely.
Footer
firstfootvpos
Distance between footer and upper border of the sheet.
firstfootwidth
Width of letter's firstpage footer.
\firstfoot{Construction}
Set definition for first page's footer
Address
toaddrvpos, toaddrhpos
Distance between address window of a window envelope and
the upper and left border of the sheet.
toaddrwidth
Width of the address window.
toaddrindent
Value of indentation for the address from the left
border.
backaddress, backaddressseparator, backaddrheight
Double backslashes within return address will be
exchanged with backaddressseparator. Height of the
return address field.
specialmail, specialmailindent, specialmailrightindent
Optionally set between return address and addressee.
specialmailindent and specialmailrightindent determine
left and right indentation.
toname, toaddress
Usually not set directly by the user.
\begin{letter}[options]{address}
Major point of the letter class.
\AtBeginLetter{command}
Hook for commands run at begin of a letter.
Sender's Extension
locwidth
Declares width of sender's extensions.
location
Content of sender's extension.
Business Line
refvpos
Distance between upper border of sheet and business
line.
refwidth
Available width for the business line.
refaftervskip
Vertical space to be inserted beneath business line.
place, placeseparator
If all variables for business line are empty, the
content of place and placeseparator will be set,
followed by content of date.
yourref, yourmail, myref, customer, invoice, date
Typical fields for business lines.
Title and Subject Line
title
Additional tile. Set centered beneath the business line.
subject, subjectseparator
Set the subject of the letter, optional prefixed by a
label.
Further Issues
tfoldmarkvpos, bfoldmarkvpos
Position of upper and lower fold mark.
foldmarkhpos
Distance between fold marks and the sheet's left border.
frombank
Internally not used yet.
\nexthead{construction}, \nextfoot{construction}
Create letter head or foot for the following pages
freely.
The Text
Opening
\opening{opening}
Set the opening of the letter.
Footnotes
See section Footnotes in KOMA-Script (still to be written).
Lists
See section Lists in KOMA-Script (still to be written).
Margin Notes
See section Margin Notes in KOMA-Script (still to be written).
Text Emphasis
See section Logical Markup of Text in KOMA-Script (still to be
written).
Closing Part
Closing
signature
Inlcudes an explanation for the inscription. Defaults to
\usekomavar{fromname}.
\closing{closing phrase}
Typesets the colsing phrase follwoed by a vertical space
and the contents fo variable signature.
sigindent, sigbeforevskip, \raggedsignature
Indentation of the box for closing phrase, inscription
and signature (defaults to 0mm). Vertical space between
closing phrase and signature (defaults to two lines).
Alignment inside the box.
Postscript, Carbon Copy, and Enclosures
\ps
Set a postscript.
\cc{distribution list}, ccseparator
Set a ddistribution list. If the contents of ccseparator
isn't empty then the name and the content of the
variable is inserted prior to distribution list.
\encl{enclosures}, enclseparator
Same structur as the distribution list.
Language Support
Language Selection
\captionenglish, \captionUSenglish, \captionamerican,
\captionbritish, \captionUKenglish, \captiongerman,
\captionngerman, \captionaustrian, \captionfrench,
\captionitalian, \captionspanish, \captiondutch,
\captioncroatian
If the used language selection scheme does not support
switching the language the above commands can be used
directly.
\dateenglish, \dateUSenglish, \dateamerican, \datebritish,
\dateUKenglish, \dategerman, \datengerman,
\dateaustrian, \datefrench, \dateitalian, \datespanish,
\datedutch, \datecrotian
Numerical date representation.
Language-Dependent Terms
\yourrefname, \youremailname, \myrefname, \customername,
\invoicename, \subjectname, \ccname, \enclname,
\headtoname, \headfromname, \datename, \pagename,
\phonename, \faxname, \emailname, \wwwname, \bankname
These defintions can be modified to support a new
language of for private customization.
Defining Language Terms
\providecaptioname{language}{term}{definition},
\newcaptioname{language}{term}{defintion},
\renewcaptionname{language}{term}{definition}
Assign a definition for a language to a term.
Address Files and Circular Letters
\adrentry{Lastname}{Firstname}{Address}{Telephone}{F1}{F2}{Comm
ent}{Key}
Address entry for address files. The file extension has
to be .adr!
\addrentry{Lastname}{Firstname}{Address}{Telephone}{F1}{F2}{F3}
{F4}{Key}
This command supports four freely definable parameters
for an address entry.
\adrchar{initial letter}, \addrchar{initial letter}
Separator for address entries. Ignored by scrlttr2.
3.9.4 Address Files with scraddr
\InputAddressFile{file name}
Read the contents of the given address file. Filename
extension has to be .adr and has to be omitted in the
argument.
\Name{Key}, \FirstName{Key}, \LastName{Key}, \Address{Key},
\Telephone{Key}, \FreeI{Key}, \FreeII{Key},
\Comment{Key}, \FreeIII{Key}, \FreeIV{Key}
Access to the data in address file. \Name is a
concatenation of \FirstName and \LastName.
AdrFreeIVempty, AdrFreeIVshow, AdrFreeIVwarn, AdrFreeIVstop
Package warning options. Defaults to AdrFreeIVshow.
3.10 mathpazo
Math fonts for the use with the Palatino font.
3.10.1 \upDelta / \upOmega
Math fonts for the use with the Palatino font.
Package options are:
[slantedGreek]
Uppercase Greek will be typeset slanted.
[noBBpl]
Do not use PazoMathBlackboardBold as (partial)
blackboard bold font (e.g with \mathbb{R}).
[osf]
Make the font family pplj (Palatino with old style
numerals) the default roman font, and use an alternative
version of the virtual math italic fonts (zplmrj7m and
zplmbj7m) with upright Palatino old style numerals for
use with the \oldstylenums command.
[osfeqnnum]
Use old style numerals for equation numbering.
3.11 varioref
Smarter version of the original latex2e cross reference
commands. Generated strings are customizable, Babel options are
recognized (further info in the package documentation).
\vref, \vpageref
\vref is similar to \ref but adds an additional page
reference, like on the facing page or on page 27
whenever the corresponding \label is not on the same
page.
\vpageref is a variation of \pageref with similar
functionality.
\vrefrange, \vpagerefrange
The \v...range commands take two labels as arguments and
produce strings which depend on wether or not these
labels fall onto a single page or on different pages.
\vref*, \vpageref*, \vpagerefrange*
Star * variants do not add any space before the
generated text for situations like:
(\vref{foo} ...)
3.12 Several Small Packages
Must be loaded with the usual \usepackage command. Further info
for a package to be found in the documentation (dvi, pdf, ps)
or in the sty-file itself.
3.12.1 bm
Bold math symbols or equations with better spacing then the
\boldsymbold command. If possible load after other packages
which redefine the fonts. When no bold font is available for a
certain char bm will use poor man's bold \pmb.
\bm
Produces bold math symbol or equation.
\unboldmath
Can be used to set parts of an equation unbold.
3.12.2 url
Defines line breakable hyperlinked (uses hyperref package)
verbatim input for urls and e-mail addresses.
Example: \url{http://example.org} outputs http://example.org.
Related commands are \href and \nolinkurl.
4 Generic Packages
4.1 PiCTeX (tbd.)
tbd.
4.2 PSTricks
4.2.1 Overview
The idea behind the PSTricks package of Timothy van Zandt is to
provide most of the PostScript language in LaTeX and TeX
syntax.
4.2.2 Commands and Parameters
4.2.2.1 Color
\newgray{color}{num} , \newrgbcolor{color}{num1 num2 num3} ,
\newhsbcolor{color}{num1 num2 num3} ,
\newcmykcolor{color}{num1 num2 num3 num4}
Note that these commands are obsolete for LaTeX. Load PSTricks
with \usepackage{pstcol} and use the standard LaTeX color
commands instead.
4.2.2.2 Setting graphics parameters
\psset{par1=value1,par2=value2,...}
4.2.2.3 Dimensions, coordinates and angles
\pssetlength{cmd}{dim}
unit=dim, xunit=dim, yunit=dim, yunit=dim
Default: 1cm
\degrees[num]
\radians
4.2.2.4 Basic graphics parameters
linewidth=dim
Default: .8pt
linecolor=color
Default: black
showpoints=true/false
Default: false
4.2.2.5 Lines and polygons
linearc=dim
Default: 0pt
framearc=num
Default: 0
cornersize=relative/absolute
Default: relative
\psline*[par]{arrows}(x0,y0)(x1,y1)...(xn,yn)
\qline(coor0)(coor1)
\pspolygon*[par](x0,y0)(x1,y1)(x2,y2)...(xn,yn)
\psframe*[par](x0,y0)(x1,y1)
4.2.2.6 Arcs, circles and ellipses
\pscircle*[par](x0,y0){radius}
\qdisk(coor){radius}
\pswedge*[par](x0,y0){radius}{angle1}{angle2}
\psellipse*[par](x0,y0)(x1,y1)
\psarc*[par]{arrows}(x,y){radius}{angleA}{angleB}
\psarcn*[par]{arrows}(x,y){radius}{angleA}{angleB}
arcsep=dim, arcsepA=dim, arcsepB=dim
Default: 0pt
4.2.2.7 Curves
\psbezier*[par]{arrows}(x0,y0)(x1,y1)(x2,y2)(x3,y3)
\parabola*[par]{arrows}(x0,y0)(x1,y1)
\pscurve*[par]{arrows}(x1,y1)...(xn,yn)
\psecurve*[par]{arrows}(x1,y1)...(xn,yn)
\psccurve*[par]{arrows}(x1,y1)...(xn,yn)
curvature=num1 num2 num3
Default: 1 .1 0
4.2.2.8 Dots
\psdots*[par](x1,y1)(x2,y2)...(xn,yn)
dotstyle=style
Default: *
Dots: *, o, +, triangle, triangle*, square, square*,
pentagon, pentagon*, |
dotscale=num1 num2
Default: 1
dotangle=angle
Default: 0
4.2.2.9 Grids
\psgrid(x0,y0)(x1,y1)(x2,y2)
gridwidth=dim
Default: .8pt
gridcolor=color
Default: black
griddots=num
Default: 0
gridlabels=dim
Default: 10pt
gridlabelcolor=color
Default: black
subgriddiv=int
Default: 5
subgridwidth=dim
Default: .4pt
subgridcolor=color
Default: gray
subgriddots=num
Default: 0
4.2.2.10 Plots
\fileplot*[par]{file}
\dataplot*[par]{commands}
\savedata{command}[data]
\readdata{command}{file}
\listplot*[par]{list}
\psplot*[par]{xmin}{xmax}{function}
\parametricplot*[par]{tmin}{tmax}{function}
plotstyle=style
Default: line
plotpoints=int
Default: 50
4.2.2.11 Coordinate systems
origin={coor}
Default: 0pt,0pt
swapaxes=true
Default: false
4.2.2.12 Line styles
linestyle=style
Default: solid
dash=dim1 dim2
Default: 5pt 3pt
dotsep=dim
Default: 3pt
border=dim
Default: 0pt
bordercolor=color
Default: white
doubleline=true/false
Default: false
doublesep=dim
Default: 1.25\pslinewidth
doublecolor=color
Default: white
shadow=true/false
Default: false
shadowsize=dim
Default: 3pt
shadowangle=angle
Default: -45
shadowcolor=color
Default: darkgray
dimen=outer/inner/middle
Default: outer
4.2.2.13 Fill styles
fillstyle=style
Default: none
fillcolor=color
Default: white
hatchwidth=dim
Default: .8pt
hatchsep=dim
Default: 4pt
hatchcolor=color
Default: black
hatchangle=rot
Default: 45
4.2.2.14 Arrowheads and such
arrows=style
Default: -
Arrows: -, <->, >-<, <<->>, >>-<<, |-|, |*-|*, [-], (-),
o-o, *-*, oo-oo, **-**, c-c, cc-cc, C-C
arrowsize=dim num
Default: 2pt 3
arrowlength=num
Default: 1.4
arrowinset=num
Default: .4
tbarsize=dim num
Default: 2pt 5
bracketlength=num, rbracketlength=num
Default: .15
dotsize=dim num
Default: .5pt 2.5
arrowscale=num1 num2
Default: 1
4.2.2.15 Custom styles
\newpsobject{name}{object}{par1=value1,...}
\newpsstyle{name}{par1=value1,...}
4.2.2.16 The basics
\pscustom*[par]{commands}
4.2.2.17 Parameters
linetype=int
Default: 0
4.2.2.18 Graphics objects
liftpen=0/1/2
Default: 0
4.2.2.19 Safe tricks
\newpath
\moveto(coor)
\closepath
\stroke[par]
\fill[par]
\gsave
\grestore
\translate(coor)
\scale{num1 num2}
\rotate{angle}
\swapaxes
\msave
\mrestore
\openshadow[par]
\closedshadow[par]
\movepath(coor)
4.2.2.20 Pretty safe tricks
\lineto(coor)
\rlineto(coor)
\curveto(x1,y1)(x2,y2)(x3,y3)
\rcurveto(x1,y1)(x2,y2)(x3,y3)
4.2.2.21 For hackers only
\code{code}
\dim{dim}
\coor(x1,y1)(x2,y2)...(xn,yn)
\rcoor(x1,y1)(x2,y2)...(xn,yn)
\file{file}
\arrows{arrows}
\setcolor{color}
4.2.2.22 Pictures
\pspicture*[baseline](x0,y0)(x1,y1)
\endpspicture
4.2.2.23 Placing and rotating whatever
\rput*[refpoint]{rotation}(x,y){stuff}
\uput*{labelsep}[refangle]{rotation}(x,y){stuff}
\pslabelsep
labelsep=dim
Default: 5pt
4.2.2.24 Repetition
\multirput*[refpoint]{angle}(x0,y0)(x1,y1){int}{stuff}
\multips{angle}(x0,y0)(x1,y1){int}{graphics}
4.2.2.25 Axes
\psaxes*[par]{arrows}(x0,y0)(x1,y1)(x2,y2)
Horizontal Vertical Dflt Description
Ox=num Oy=num 0 Label at origin.
Dx=num Dy=num 1 Label increment.
dx=dim oy=dim 0pt Dist btwn labels.
labels=all/x/y/none
Default: all
showorigin=true/false
Default: true
ticks=all/x/y/none
Default: all
tickstyle=full/top/bottom
Default: full
ticksize=dim
Default: 3pt
\psxlabel, \psylabel
axesstyle=axes/frame/none
Default: axes
4.2.2.26 Framed boxes
framesep=dim
Default: 3pt
boxsep=true/false
Default: true
\psframebox*[par]{stuff}
\psdblframebox*[par]{stuff}
\psshadowbox*[par]{stuff}
\pscirclebox*[par]{stuff}
\cput*[par]{angle}(x,y){stuff}
\psovalbox*[par]{stuff}
4.2.2.27 Clipping
\clipbox[dim]{stuff}
\psclip{graphics} ... \endpsclip
4.2.2.28 Rotation and scaling boxes
\rotateleft{stuff}
\rotateright{stuff}
\rotatedown{stuff}
\scalebox{num1 num2}{stuff}
\scaleboxto(x,y){stuff}
4.2.2.29 Nodes
\rnode[refpoint]{name}{stuff}
\Rnode(x,y){name}{stuff}
\RnodeRef
\pnode(x,y){name}
\cnode*[par](x,y){radius}{name}
\circlenode*[par]{name}{stuff}
\cnodeput*[par]{angle}(x,y){name}{stuff}
\ovalnode*[par]{name}{stuff}
4.2.2.30 Node connections
nodesep=dim
Default: 0
offset=dim
Default: 0
arm=dim
Default: 10pt
angle=angle
Default: 0
arcangle=angle
Default: 8
ncurv=num
Default: .67
loopsize=dim
Default: 1cm
\ncline*[par]{arrows}{nodeA}{nodeB}
\ncLine*[par]{arrows}{nodeA}{nodeB}
\nccurve*[par]{arrows}{nodeA}{nodeB}
\ncarc*[par]{arrows}{nodeA}{nodeB}
\ncbar*[par]{arrows}{nodeA}{nodeB}
\ncdiag*[par]{arrows}{nodeA}{nodeB}
\ncdiagg*[par]{arrows}{nodeA}{nodeB}
\ncangle*[par]{arrows}{nodeA}{nodeB}
\ncangles*[par]{arrows}{nodeA}{nodeB}
\ncloop*[par]{arrows}{nodeA}{nodeB}
\nccircle*[par]{arrows}{node}{radius}
\pcline*[par]{arrows}(x1,y1)(x2,y2)
\pccurve*[par]{arrows}(x1,y1)(x2,y2)
\pcarc*[par]{arrows}(x1,y1)(x2,y2)
\pcbar*[par]{arrows}(x1,y1)(x2,y2)
\pcdiag*[par]{arrows}(x1,y1)(x2,y2)
\pcangle*[par]{arrows}(x1,y1)(x2,y2)
\pcloop*[par]{arrows}(x1,y1)(x2,y2)
4.2.2.31 Attaching labels to node connections
\lput*[refpoint]{rotation}(pos){stuff}
\aput*[labelsep]{angle}(pos){stuff}
\bput*[labelsep]{angle}(pos){stuff}
\mput*[refpoint]{stuff}
\Aput*[labelsep]{stuff}
\Bput*[labelsep]{stuff}
4.2.2.32 Coils and zigzags
\pscoil*[par]{arrows}(x0,y0)(x1,y1)
\psCoil*[par]{angle1}{angle2}
\pszigzag*[par]{arrows}(x0,y0)(x1,y1)
coilwidth=dim
Default: 1cm
coilheight=num
Default: 1
coilarm=dim
Default: .5cm
coilaspect=angle
Default: 45
coilinc=angle
Default: 10
\nccoil*[par]{arrows}{nodeA}{nodeB}
\nczigzag*[par]{arrows}{nodeA}{nodeB}
\pccoil*[par]{arrows}(x1,y1)(x2,y2)
\pczigzag*[par]{arrows}(x1,y1)(x2,y2)
4.2.2.33 Special coordinates
\SpecialCoor
Table 1.12. Special coordinates and angles
Coordinate Example Description
(x,y) (3,4) Cartesian coordinate.
(r;a) (3;110) Polar coordinate.
(node) (A) Center of node.
([par]node) ([angle=45]A) Relative to node.
(!ps) (!5 3.3 2 exp) Raw PostScript.
(coor1|coor2) (A|1in;30) Combination.
Angle Example Description
num 45 Angle.
(coor) (-1,1) Coordinate (vector).
!ps !33 sqrt Raw PostScript.
\NormalCoor
4.2.2.34 Overlays
\overlaybox stuff\endoverlaybox
\psoverlay{string}
\putoverlaybox{string}
gradbegin=color
Default: gradbegin
gradend=color
Default: gradend
gradlines=int
Default: 500
gradmidpoint=num
Default: .9
gradangle=angle
Default: 0
4.2.2.35 Typesetting text along a path
\pstextpath[pos](x,y){graphics object}{text}
4.2.2.36 Stroking and filling character paths
\pscharpath*[par]{text}
\pscharclip*[par]{text} ... \endpscharclip
4.2.2.37 Exporting EPS files
\TeXtoEPS ... \endTeXtoEPS
\PSTtoEPS[par]{file}{graphics objects}
bbllx=dim
Default: -1pt
bblly=dim
Default: -1pt
bburx=dim
Default: 1pt
bbury=dim
Default: 1pt
headerfile=file
Default: s
headers=none/all/user
Default: none
4.2.2.38 Boxes
\psmathboxtrue, \psmathboxfalse
\everypsbox{commands}
\pslongbox{name}{cmd}
\psverbboxtrue, \psverbboxfalse
4.2.2.39 Tips and More Tricks
\pslbrace, \psrbrace
4.2.3 List of Additional PSTricks Packages
psgo
Draw Go diagrams
pst-blur
PSTricks package for "blurred" shadows
pst-euc
Géométrie en LaTeX et PSTricks
pst-fr3d
Three dimensional framed Boxes
pst-ghsb
PSTricks package for HSB Gradients
pst-gr3d
PSTricks package for 3D grids
pst-lens
Optique géométrique
pst-node
PSTricks package for nodes
pst-ob3d
A PSTricks package for three dimensional basic objects
pst-osci
Oscilloscopes with PSTricks
pst-poly
Polygons with PSTricks
pst-tree
PSTricks package for trees
pst-uml
Draw easily diagrams with UML notation
vaucansom.sty
Drawing automata
5 fontinst (tbd.)
tbd.
6 ConTeXt (tbd.)
6.1 Overview
ConTeXt is based on PlainTeX and MetaPost and gets controlled
with some Perl scripts. It's mainly targeted towards layout
oriented users and especially useful for presentations. It's
extensible by the use of modules and has in it's base
distribution already a large amount of functionality. The
preferred output format is PDF, but DVI is possible too.
Some of the unique features of ConTeXt are:
* Inline XML (including MathML, ChemML, and PhysML)
* really good XML support in general
* inline MetaPost
7 Texinfo (tbd.)
tbd.
Chapter 2. pdfTeX
Table of Contents
1 Options
1.1 --file-line-error-style
1.2 --fmt format
1.3 --help
1.4 --ini
1.5 --interaction mode
1.6 --ipc
1.7 --ipc-start
1.8 --jobname name
1.9 --kpathsea-debug bitmask
1.10 --maketex fmt
1.11 --no-maketex fmt
1.12 --output-comment string
1.13 --parse-first-line
1.14 --progname name
1.15 --recorder
1.16 --shell-escape
1.17 --translate-file tcxname
1.18 --version
2 Environment
Note
The contents of this section was taken from pdftex(1).
1 Options
pdfTeX understands the following command line options.
1.1 --file-line-error-style
Print error messages in the form file:line:error which is
similar to the way many compilers format them.
1.2 --fmt format
Use format as the name of the format to be used, instead of the
name by which pdfTeX was called or a %& line.
1.3 --help
Print help message and exit.
1.4 --ini
Be pdfinitex, for dumping formats; this is implicitly true if
the program is called as pdfinitex.
1.5 --interaction mode
Sets the interaction mode. The mode can be one of batchmode,
nonstopmode, scrollmode, and errorstopmode. The meaning of
these modes is the same as that of the corresponding \commands.
1.6 --ipc
Send DVI or PDF output to a socket as well as the usual output
file. Whether this option is available is the choice of the
installer.
1.7 --ipc-start
As --ipc, and starts the server at the other end as well.
Whether this option is available is the choice of the
installer.
1.8 --jobname name
Use name for the job name, instead of deriving it from the name
of the input file.
1.9 --kpathsea-debug bitmask
Sets path searching debugging flags according to the bitmask.
See the Kpathsea manual for details.
1.10 --maketex fmt
Enable mktexfmt, where fmt must be one of tex or tfm.
1.11 --no-maketex fmt
Disable mktexfmt, where fmt must be one of tex or tfm.
1.12 --output-comment string
Use string for the DVI file comment instead of the date.
1.13 --parse-first-line
If the first line of the main input file begins with %& parse
it to look for a dump name or a --translate-file option.
1.14 --progname name
Pretend to be program name. This affects both the format used
and the search paths.
1.15 --recorder
Enable the filename recorder. This leaves a trace of the files
opened for input and output in a file with extension .fls.
1.16 --shell-escape
Enable the \write18{command} construct. The command can be any
Bourne shell command. This construct is normally disallowed for
security reasons.
1.17 --translate-file tcxname
Use the tcxname translation table.
1.18 --version
Print version information and exit.
2 Environment
See the Kpathsearch library documentation (the `Path
specifications' node) for the details of how the environment
variables are used when searching. The kpsewhich utility can be
used to query the values of the variables.
One caveat: In most pdfTeX formats, you cannot use ~ in a
filename you give directly to pdfTeX, because ~ is an active
character, and hence is expanded, not taken as part of the
filename. Other programs, such as Metafont, do not have this
problem.
TEXMFOUTPUT
Normally, pdfTeX puts its output files in the current
directory. If any output file cannot be opened there, it
tries to open it in the directory specified in the
environment variable TEXMFOUTPUT. There is no default
value for that variable. For example, if you say pdftex
paper and the current directory is not writable, if
TEXMFOUTPUT has the value /tmp, pdfTeX attempts to
create /tmp/paper.log (and /tmp/paper.pdf, if any output
is produced.)
TEXINPUTS
Search path for \input and \openin files. This should
probably start with ``.'', so that user files are found
before system files. An empty path component will be
replaced with the paths defined in the texmf.cnf file.
For example, set TEXINPUTS to ".:/home/usr/tex:" to
prepend the current direcory and ``/home/user/tex'' to
the standard search path.
TEXFONTS
earch path for font metric (.tfm) files.
TEXFORMATS
Search path for format files.
TEXPOOL
Search path for pdfinitex internal strings.
TEXEDIT
Command template for switching to editor. The default,
usually vi, is set when pdfTeX is compiled.
Chapter 3. Metafont (tbd.)
tbd.
Chapter 4. MetaPost
Table of Contents
1 Options
1.1 --file-line-error-style
1.2 --help
1.3 --ini
1.4 --interaction mode
1.5 --jobname name
1.6 --kpathsea-debug bitmask
1.7 --mem mem
1.8 --parse-first-line
1.9 --progname name
1.10 --recorder
1.11 -T
1.12 --translate-file tcxname
1.13 --troff
1.14 --version
2 Environment
Note
The contents of this section was taken from mpost(1).
MetaPost is a programming language much like Knuth's Metafont
except that it outputs PostScript programs instead of bitmaps.
Borrowed from Metafont are the basic tools for creating and
manipulating pictures. These include numbers, coordinate pairs,
cubic splines, affine transformations, text strings, and
boolean quantities. Additional features facilitate integrating
text and graphics and accessing special features of PostScript
such as clipping, shading, and dashed lines. Another feature
borrowed from Metafont is the ability to solve linear equations
that are given implicitly, thus allowing many programs to be
written in a largely declarative style. By building complex
operations from simpler ones, MetaPost achieves both power and
exibility.
1 Options
MetaPost understands the following command line options.
1.1 --file-line-error-style
Print error messages in the form file:line:error which is
similar to the way many compilers format them.
1.2 --help
Print help message and exit.
1.3 --ini
Be inimpost, for dumping bases; this is implicitly true if the
program is called as inimpost.
1.4 --interaction mode
Sets the interaction mode. The mode can be one of batchmode,
nonstopmode, scrollmode, and errorstopmode. The meaning of
these modes is the same as that of the corresponding commands.
1.5 --jobname name
Use name for the job name, instead of deriving it from the name
of the input file.
1.6 --kpathsea-debug bitmask
Sets path searching debugging flags according to the bitmask.
See the Kpathsea manual for details.
1.7 --mem mem
Use mem as the name of the mem to be used, instead of the name
by which MetaPost was called or a %& line.
1.8 --parse-first-line
If the first line of the main input file begins with %& parse
it to look for a dump name or a --translate-file option.
1.9 --progname name
Pretend to be program name. This affects both the format used
and the search paths.
1.10 --recorder
Enable the filename recorder. This leaves a trace of the files
opened for input and output in a file with extension .fls.
1.11 -T
Produce TROFF output.
1.12 --translate-file tcxname
Use the tcxname translation table.
1.13 --troff
As -T.
1.14 --version
Print version information and exit.
2 Environment
See the Kpathsearch library documentation (the `Path
specifications' node) for the details of how the environment
variables are use when searching. The kpsewhich utility can be
used to query the values of the variables.
If the environment variable TEXMFOUTPUT is set, MetaPost
attempts to put its output files in it, if they cannot be put
in the current directory.
Here is a list of the environment variables which affect the
behavior of MetaPost:
MPINPUTS
Search path for input files.
MFINPUTS
Auxiliary search path for input files with .mf
extensions.
MPSUPPORT
Directory for various tables for handling included TeX
and troff.
MPXCOMMAND
The name of a shell script that converts embedded
typesetting commands to a form that MetaPost
understands. Defaults: makempx for TeX and troffmpx for
troff.
TEX
The version of TeX - or LaTeX - to use when processing
btex and verbatimtex commands. Default TeX. This version
of MetaPost allows you to use a `%&format' line instead.
TROFF
The troff pipeline for btex and verbatimtex commands.
Default eqn -d\$\$ | troff
MPEDIT
A command template for invoking an editor.
A .mem file is a binary file that permits fast loading of macro
packages. MetaPost reads the default plain.mem unless another
.mem file is specified at the start of the first line with an &
just before it. There is also an mfplain.mem that simulates
plain Metafont so that MetaPost can read .mf fonts. (Plain
Metafont is described in The Metafontbook).
Experts can create .mem files by invoking inimpost and giving
macro definitions followed by a dump command.
The MetaPost language is similar to Metafont, but the manual A
User's Manual for MetaPost assumes no knowledge of Metafont.
MetaPost does not have bitmap output commands or Metafont's
online display mechanism.
Chapter 5. BibTeX
Table of Contents
1 Parameters
2 Command Qualifiers
3 bib files
3.1 @STRING command
3.2 Entry Format
3.3 Entry Types
3.4 Field Text
3.5 Field Types
4 bst files
4.1 ABBRV.BST
4.2 ALPHA.BST
4.3 PLAIN.BST
4.4 SAMPLE.BST
4.5 UNSRT.BST
Note
The contents of this section was taken from the HTML helppages
for BibTeX of Norman Walsh (Version 1.0, 12 Apr 94).
Invokes the BibTeX utility to compile a bibliography file for
LaTeX. Full details can be found in "LaTeX: A Document
Preparation System" by Leslie Lamport.
1 Parameters
bibliography-file-spec
Specifies the name of the bibliography database file to be
compiled by BibTeX. If the file specification does not include
a file type, BibTeX assumes a default type of BIB.
2 Command Qualifiers
/BIBINPUTS /BIBINPUTS=(name,...)
Specify directories containing input files, and the order in
which they will be searched to locate each input file. A null
value in the list indicates the current directory. The search
procedure TeX uses to locate input files is to first search
your default directory and then search each of the directories
specified by the /BIBINPUTS option.
Default is /BIBINPUTS=(TEX_BIB:); TeX looks in the directory
associated with the logical name TEX_BIB.
/STATS /STATS /NOSTATS [D]
This qualifier is used while debugging .BST files to determine
BIBTEX memory usage.
/TEXINPUTS /TEXINPUTS=(name,...)
Specify directories containing input files, and the order in
which they will be searched to locate each input file. A null
value in the list indicates the current directory. The search
procedure TeX uses to locate input files is to first search
your default directory and then search each of the directories
specified by the /TEXINPUTS option.
Default is /TEXINPUTS=(TEX_INPUTS); TeX looks in the directory
associated with the logical name TEX_INPUTS.
/TRACE /TRACE /NOTRACE [D]
This qualifier is used while debugging .BST files to follow
program flow.
3 bib files
This help entry contains the same information as Appendix B of
the LaTeX manual. It describes the format of a bibliography
database (.BIB) file.
A bibliography database file may contains two types of entry -
an abbreviation definition or a reference entry for citation.
3.1 @STRING command
The @STRING command is used to define abbreviations for use by
BibTeX within the bibliography database file. The command
@string{jgg1 = "Journal of Gnats and Gnus, Series~1"}
defines 'jgg1' to be the abbreviation for the string "Journal
of Gnats and Gnus, Series~1". Parentheses can be used in place
of the outermost braces in the @string command, and braces can
be used instead of the quotation marks. The text must have
matching braces.
The case of letters is ignored in an abbreviation as well as in
the command name @string, so the command above could have been
written:
@STRING{JgG1 = "Journal of Gnats and Gnus, Series~1"}
A @string command can appear anywhere before or between entries
in a bibliography database file. However, it must come before
any use of the abbreviation, so a sensible place for @string
commands is at the beginning of the file. A @string command in
the bibliography database file takes precedence over a
definition made by the bibliography style, so it can be used to
change the definition of an abbreviation such as 'Feb'.
3.2 Entry Format
A bibliography database file contains a series of reference
entries like the following:
@BOOK{kn:gnus,
AUTHOR = "Donald E. Knudson",
TITLE = "1966 World Gnus Almanac",
PUBLISHER = {Permafrost Press},
ADDRESS = {Novisibirsk} }
The @BOOK states that this is an entry of type book. various
entry types are described below. The 'kn:gnus' is the citation
key, as it appears in the argument of a \cite command referring
to the entry.
This entry has four fields, named AUTHOR, TITLE, PUBLISHER and
ADDRESS. The meanings of these and other fields are described
below. A field consists of the name, an '=' character with
optional space around it, followed by its text. The text of a
field is a string of characters, with no unmatched braces,
surrounded by either a pair of braces or a pair of '"'
characters. Entry fields are separated from one another, and
from the citation key, by commas. A comma may have optional
space around it.
The outermost braces that surround the entire entry may be
replaced by parentheses. As in TeX input files, an end-of-line
character counts as a space and one space is equivalent to many
spaces. Unlike TeX, BibTeX ignores the case of letters in the
entry type, citation key and field names. The above entry could
have been typed as follows:
@BOOK(kn:gnus, author = {Donald E. Knudson},
TITLE = "1966 World Gnus Almanac",
PUBLISHER = {Permafrost Press},
ADDRESS = {Novisibirsk} )
However, the case of letters does matter to LaTeX, so the
citation key ("kn:gnus" in the example above) should appear
exactly the same in all \cite commands in the LaTeX input file.
The quotes or braces can be omitted around text consisting
entirely of numerals. The following two fields are equivalent:
Volume = "27" Volume = 27
3.3 Entry Types
When entering a reference in the bibliography database, the
first thing to decide is what type of entry it is. No fixed
classification scheme can be complete, but BibTeX provides
enough entry types to handle almost any reference reasonably
well.
References to different types of publications contain different
information; a reference to a journal might include the volume
and number of the journal, which is usually not meaningful for
a book. Therefore, database entries of different types have
different fields for each entry type, the fields are divided
into three classes:
Required
omitting the field will produce an error message and may
result in a badly formatted bibliography entry. If the
required information is not meaningful, you are using
the wrong entry type.
Optional
the field's information will be used if present, but can
be omitted without causing any formatting problems. A
reference should contain any available information that
might help the reader, so you should include the
optional field if it is applicable.
Ignored
the field is ignored. BibTeX ignores any field that is
not required or optional, so you can include any fields
you want in a bibliography entry. It's often a good idea
to put all relevant information about a reference in its
bibliography entry - even information that may never
appear in the bibliography. For example, if you want to
keep an abstract of a paper in a computer file, put it
in an 'abstract' field in the paper's bibliography
entry. The bibliography database file is likely to be as
good a place as any for the abstract, and it is possible
to design a bibliography style for printing selected
abstracts.
BibTeX ignores the case of letters in the entry type.
3.3.1 article entry
An article from a journal or magazine.
Format:
@ARTICLE{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, journal, year
Optional fields: volume, number, pages, month, note, key
3.3.2 book entry
A book with an explicit publisher.
Format:
@BOOK{citation_key,
required_fields [, optional_fields] }
Required fields: author or editor, title, publisher, year
Optional fields: volume, series, address, edition, month, note,
key
3.3.3 booklet entry
A work that is printed and bound, but without a named publisher
or sponsoring institution.
Format:
@BOOKLET{citation_key,
required_fields [, optional_fields] }
Required fields: title
Optional fields: author, howpublished, address, month, year,
note, key
3.3.4 conference entry
An article in the proceedings of a conference. This entry is
identical to the 'inproceedings' entry and is included for
compatibility with another text formatting system.
Format:
@CONFERENCE{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, booktitle, year
Optional fields: editor, pages, organization, publisher,
address, month, note, key
3.3.5 inbook entry
A part of a book, which may be a chapter and/or a range of
pages.
Format:
@INBOOK{citation_key,
required_fields [, optional_fields] }
Required fields: author or editor, title, chapter and/or pages,
publisher, year
Optional fields: volume, series, address, edition, month, note,
key
3.3.6 incollection entry
A part of a book with its own title.
Format:
@INCOLLECTION{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, booktitle, year
Optional fields: editor, pages, organization, publisher,
address, month, note, key
3.3.7 inproceedings entry
An article in the proceedings of a conference.
Format:
@INPROCEEDINGS{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, booktitle, year
Optional fields: editor, pages, organization, publisher,
address, month, note, key
3.3.8 manual entry
Technical documentation.
Format:
@MANUAL{citation_key,
required_fields [, optional_fields] }
Required fields: title
Optional fields: author, organization, address, edition, month,
year, note, key
3.3.9 mastersthesis entry
A Master's thesis.
Format:
@MASTERSTHESIS{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, school, year
Optional fields: address, month, note, key
3.3.10 misc entry
Use this type when nothing else seems appropriate.
Format:
@MISC{citation_key,
required_fields [, optional_fields] }
Required fields: none
Optional fields: author, title, howpublished, month, year,
note, key
3.3.11 phdthesis entry
A PhD thesis.
Format:
@PHDTHESIS{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, school, year
Optional fields: address, month, note, key
3.3.12 proceedings entry
The proceedings of a conference.
Format:
@PROCEEDINGS{citation_key,
required_fields [, optional_fields] }
Required fields: title, year
Optional fields: editor, publisher, organization, address,
month, note, key
3.3.13 techreport entry
A report published by a school or other institution, usually
numbered within a series.
Format:
@TECHREPORT{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, institution, year
Optional fields: type, number, address, month, note, key
3.3.14 unpublished entry
A document with an author and title, but not formally
published.
Format:
@UNPUBLISHED{citation_key,
required_fields [, optional_fields] }
Required fields: author, title, note
Optional fields: month, year, key
3.4 Field Text
The text of the field is enclosed in braces or double quote
characters. A part of the text is said to be enclosed in braces
if it lies inside a matching pair of braces other than the ones
enclosing the entire entry or the entire field text.
BibTeX manipulates the case of letters in the field text as
described in the subtopics below.
3.4.1 Names
The text of an author or editor field represents a list of
names. The bibliography style determines the format in which
the name is printed: whether the first name or last name
appears first, if the full first name or just the first initial
is used, etc. The bibliography file entry simply tells BibTeX
what the name is.
You should type an author's complete name and let the
bibliography style decide what to abbreviate. (But an author's
complete name may be "Donald~E. Knuth" or even "J.~P.~Morgan";
you should type it the way the author would like it to appear,
if that's known.)
Most names can be entered in the obvious way, either with or
without a comma, as in the following examples:
"John Paul Jones" "Jones, John Paul" "Ludwig von Beethoven"
"von Beethoven, Ludwig"
Some people have multiple last names - for example, Per Brinch
Hansen's last name is Brinch~Hansen. His name should be typed
with a comma:
"Brinch Hansen, Per"
To understand why, you must understand how BibTeX handles names
(for what follows, a "name" corresponds to a person).
Each name consists of four parts: First, von, Last, and~Jr;
each part consists of a (possibly empty) list of name-tokens.
For example the First part of Per Brinch~Hansen's name has the
single token "Per"; the Last part has two, "Brinch" and
"Hansen"; and the von and Jr parts are empty. If you had typed
"Per Brinch Hansen"
instead, BibTeX would erroneously think "Brinch" were a
First-part token, just as "Paul" is a First-part token in
"John~Paul Jones".
Here's another example:
"Charles Louis Xavier Joseph de la Vallee Poussin"
This name has four tokens in the First part, two in the von,
and two in the Last. Here BibTeX knows where one part ends and
the other begins because the tokens in the von part begin with
lower-case letters.
If you want BibTeX to consider something a single token,
enclose it in braces. You should do this, for example, if a
comma is part of a name:
"{Barnes and Noble, Inc.}" "{Barnes and} {Noble, Inc.}"
"{Barnes} {and} {Noble,} {Inc.}"
The braces surrounding the comma keep "Inc." from being
interpreted as a First token; this name has only a Last part,
with either one, two, or four tokens (there must be a space
separating the tokens in the second and third forms). Probably
the second form is slightly more meaningful, but don't lose
sleep over this since only rarely will an institution be an
author or editor.
So the two names
"von Beethoven, Ludwig" "{von Beethoven}, Ludwig"
are considered by BibTeX to be different names. In the first,
"Beethoven" is the Last part and "von" is the von part; in the
second, which in this case happens to be incorrect, the Last
part has a single token and there's no von part. The
bibliography style will probably print both the same, but it
may alphabetize and label them differently.
"Juniors" pose a special problem. Most people having "Jr." in
their name precede it with a comma. Such a name should be
entered as follows:
"Ford, Jr., Henry"
However, a few people do not use a comma. They are handled by
considering the "Jr." to be part of the last Last token:
"{Steele Jr.}, Guy L." "Guy L. {Steele Jr.}"
This name has no Jr part.
To summarize, you may type a name in one of three forms:
"First von Last" "von Last, First" "von Last, Jr, First"
You may almost always use the first form; you shouldn't if
either there's a Jr part or the Last part has multiple tokens
but there's no von part.
If there are multiple authors or editors, their names must be
separated by the word "and", surrounded by spaces, not enclosed
in braces:
AUTHOR = "Ralph Alpher and Bethe, Hans and George Gamow"
Since BibTeX interprets commas as separating parts of a name
and "and" as separating names themselves, this example has
three coauthors: Ralph Alpher, Hans Bethe, and George Gamow. If
the word "and" appears as part of a name, it must be enclosed
in braces, as in the example of "Barnes and Noble,~Inc." given
above. If you have too many names to list in a field, you can
end the list with "and others"; the standard styles
appropriately append an "et al."
BibTeX's rules are actually a bit more complicated than
indicated here, but this description will suffice for most
names.
3.4.2 Titles
The bibliography style determines whether or not a title is
capitalized; the titles of books usually are, the title of
articles usually are not. You type a title the way it should
appear if it is capitalized (you should capitalize everything
but articles and unstressed conjunctions and prepositions, and
even these should be capitalized as the first word or the first
after a colon):
TITLE = "The Agony and the Ecstasy"
BibTeX will change uppercase letters to lowercase if
appropriate. Uppercase letters that should not be changed are
enclosed in braces. The following two titles are equivalent;
the "A" of "Africa" will not be made lowercase.
"The Gnats and Gnus of {Africa}" "The Gnats and Gnus of
{A}frica"
3.4.3 Abbreviations
Instead of an ordinary text string, the text of a field can be
replaced by an abbreviation for it. An abbreviation is a string
of characters that starts with a letter and does not contain a
space or any of the following ten characters:
" # % ' ( ) , = { }
The abbreviation is typed in place of the text field, with no
braces or quotation marks. If 'jgg1' is an abbreviation for
Journal of Gnats and Gnus, Series~1
then the following are equivalent:
JOURNAL = jgg1 JOURNAL = "Journal of Gnats and Gnus, Series~1"
Some abbreviations are predefined by the bibliography style.
These always include the usual 3 letter abbreviations for the
month: jan, feb, mar etc.
Bibliography styles usually contain abbreviations for the names
of commonly referenced journals. Consult the Local Guide for a
list of the predefined abbreviations for the bibliography
styles available.
You can define your own abbreviations by using BibTeX's @STRING
command.
3.5 Field Types
Below is a list of all fields recognized by the standard
bibliography styles. An entry can also contain other fields,
which are ignored by those styles.
BibTeX ignores the case of letters in the field names.
3.5.1 address field
Publisher's address. For major publishing houses, just the city
is given. For small publishers, you can help the reader by
giving the complete address.
Format:
ADDRESS = field_text
3.5.2 annote field
An annotation, used only for annotated bibliography styles
(which are not among the standard ones).
Format:
ANNOTE = field_text
3.5.3 author field
The name(s) of the author(s).
Format:
AUTHOR = field_text
3.5.4 booktitle field
Title of a book, part of which is being cited.
Format:
BOOKTITLE = field_text
3.5.5 chapter field
A chapter number.
Format:
CHAPTER = field_text
3.5.6 edition field
The edition of a book - for example, "second".
Format:
EDITION = field_text
3.5.7 editor field
Name(s) of editor(s). If there is also an "author" field, then
the "editor" field gives the editor of the book or collection
in which the reference appears.
Format:
EDITOR = field_text
3.5.8 howpublished field
How something strange has been published.
Format:
HOWPUBLISHED = field_text
3.5.9 institution field
The institution that published the work.
Format:
INSTITUTION = field_text
3.5.10 journal field
A journal name. Abbreviations are provided for many journals;
see the Local Guide.
Format:
JOURNAL = field_text
3.5.11 key field
Used for alphabetizing and creating a label when the "author"
and "editor" fields are missing. This field should not be
confused with the citation key that appears in the \cite
command and at the beginning of the entry.
Format:
KEY = field_text
3.5.12 month field
The month in which the work was published or, for an
unpublished work, in which it was written.
Format:
MONTH = field_text
3.5.13 note field
Any additional information that can help the reader.
Format:
NOTE = field_text
3.5.14 number field
The number of a journal, magazine, or technical report. An
issue of a journal or magazine is usually identified by its
volume and number; the organization that issues a technical
report usually gives it a number.
Format:
NUMBER = field_text
3.5.15 organization field
The organization sponsoring a conference.
Format:
ORGANIZATION = field_text
3.5.16 pages field
A page number or range of numbers such as "42--111"; you may
also have several of these, separating them with commas:
"7,41,73--97". The standard styles convert a single dash to a
double. >
Format:
PAGES = field_text
3.5.17 publisher field
The publisher's name.
Format:
PUBLISHER = field_text
3.5.18 school field
The name of the school where a thesis was written.
Format:
SCHOOL = field_text
3.5.19 series field
The name of a series or set of books. When citing an entire
book, the the "title" field gives its title and an optional
"series" field gives the name of a series in which the book is
published.
Format:
SERIES = field_text
3.5.20 title field
The work's title.
Format:
TITLE = field_text
3.5.21 type field
The type of a technical report - for example, "Research Note".
Format:
TYPE = field_text
3.5.22 volume field
The volume of a journal or multivolume book work.
Format:
VOLUME = field_text
3.5.23 year field
The year of publication or, for an unpublished work, the year
it was written. This field's text should contain only numerals.
Format:
YEAR = field_text
4 bst files
Bibliography style files define the style of a bibliography
source list.
The standard bibliography style files are PLAIN, UNSRT, ALPHA
and ABBRV.
If you want to make a bibliography style of your own, look at
SAMPLE.BST.
4.1 ABBRV.BST
This style is the same as the style defined in PLAIN.BST,
except that entries are more compact because first names, month
names and journal names are abbreviated.
4.2 ALPHA.BST
This style is the same as the style defined in PLAIN.BST except
that entry labels like "Knu66", formed from the author's name
and the year of publication, are used.
4.3 PLAIN.BST
This style is formatted more or less as suggested by
Mary-Claire van Leunen in "A Handbook for Scholars" (Alfred A.
Knopf, New York, 1979). Entries are sorted alphabetically and
are labelled with numbers.
4.4 SAMPLE.BST
This is a sample bibliography style file meant to help you
construct a new style. It creates a bibliography in which
entries appear as follows:
[Jones79] Jones, R. L. and Richards, P. Q. The Birds and the
Bees. {\it Journal of Irreproducible Results 4}, 2 (Jan. 1979),
27-33.
[Jones82a] Jones, P. G. The Bees and the Trees ... (1982).
[Jones82b] Jones, R. L. The Trees and the Peas ... (1982).
[Krist74] Kristofferson, R. P. Peopl and Places ... (1974)
It should illustrate how you write a style file. The functions
are described in an informal Pascal-like style in comments.
Because of the way while loops and if-then-else statements must
use functions, the following convention is used. If a while
loop is labeled 'foo' in the informal description, then its
test and body are the functions named 'foo.test' and
'foo.body'. If an if statement is labeled 'foo', then its two
clauses are the functions named 'foo.then' and 'foo.else'.
(Null clauses just use the 'skip$' function.) Note that because
functions have to be defined in terms of already-defined
functions, the actual function definitions are given in a
'bottom-up' order.
4.5 UNSRT.BST
This style is that same as PLAIN.BST except that entries appear
in the order of their first citation.
Chapter 6. Make-Index
Table of Contents
1 Options
1.1 -c
1.2 -g
1.3 -i
1.4 -l
1.5 -q
1.6 -r
1.7 -s sty
1.8 -o ind
1.9 -t log
1.10 -p no
1.11 -L
1.12 -T
2 Style File
2.1 Input Style Specifiers
2.2 Output Style Specifiers
3 Example
4 Ordering
5 Special Effects
Note
The contents of this section was taken from the HTML helppages
for Make-Index of Norman Walsh (Version 1.0, 12 Apr 94).
Some obvious errors in this documentation have been corrected
according to makeindex(1L).
Additional information was taken from makeindex(1L) and the
program source files as found in teTeX 2.0.2.
Make-Index is a general purpose index processor. It takes one
or more raw index files (normally generated by a formatter),
sorts the entries, and produces the actual index file. It is
not dependent on any particular format of raw index file,
although the .idx file generated by LaTeX is the default. Up to
three levels (0, 1, and 2) of subitem nesting within the same
entry is supported. The input format may be redefined in a
style file so that raw index or glossary output from other
formatters may be processed. The style file also defines the
style of output index file. Unless specified otherwise, the
file name base of the first input file (idx0) is used to
determine other related input/output files. The default input
file type is .idx.
1 Options
Make-Index is a Unix program, and therefore has a Unix-style
command line. Instead of qualifiers delimited with a slash (/),
Make-Index options are delimited with a hyphen (-).
1.1 -c
Enable blank compression. By default every blank counts in the
index key. The -c option ignores leading and trailing blanks
and tabs and compresses intermediate ones to a single space.
1.2 -g
Employ German word ordering in the index, in accord with rules
set forth in DIN 5007. The quote character must be redefined in
a style file (for example, redefine quote as '+'). If the quote
character is not redefined, Make-Index will produce an error
message and abort.
1.3 -i
Use stdin as the input file. When this option is specified and
the -o is not, output is written to stdout.
1.4 -l
Use letter ordering. Default is word ordering (explained in the
Ordering section).
1.5 -q
Quiet mode, send no messages to stderr. By default progress and
error messages are sent to stderr as well as the transcript
file. The -q option disables the stderr messages.
1.6 -r
Disable implicit page range formation. By default three or more
successive pages will be automatically abbreviated as a range
(e.g. 1--5). The -r option disables it, making the explicit
range operators the only way to create page ranges (see the
Special Effects section below).
1.7 -s sty
Take sty as the style file. There is no default for the style
file name. The environment variable INDEXSTYLE defines the path
where the style file should be found.
1.8 -o ind
Take ind as the output index file. By default the file name
base of the first input file idx0 concatenated with the
extension .ind is used as the output file name.
1.9 -t log
Take log as the transcript file. By default the file name base
of the first input file idx0 concatenated with the extension
.ilg is used as the transcript file name.
1.10 -p no
Set the starting page number of the output index file to be no.
This is useful when the index file is to be formatted
separately. Other than pure numbers, three special cases are
allowed for no: any, odd, and even. In these special cases, the
starting page number is determined by retrieving the last page
number from the source log file. The source log file name is
determined by concatenating the file name base of the first raw
index file (idx0) with the extension .log. The last source page
is obtained by searching backward in the log file for the first
instance of a number included in [...]. If a page number is
missing or the log file is not found, no attempt will be made
to set the starting page number. The meaning of each of these
cases follows:
any
The starting page is the last source page number plus 1.
odd
The starting page is the first odd page following the
last source page number.
even
The starting page is the first even page following the
last source page number.
1.11 -L
Sort based on locale settings. String comparisons for sorting
are done using strcoll(3), which compares strings according to
the current locale category LC_COLLATE.
Not available on all systems (depends on compile time
settings).
1.12 -T
Special support for Thai documents.
Not available on all systems (depends on compile time
settings).
2 Style File
The style file format is very simple. It is a list of
<specifier, attribute> pairs. There are two types of specifiers
(input and output). The pairs don't have to obey any particular
order in the file. A line lead by `%' is a comment. The
following is a list of all the specifiers and their respective
arguments where <string> is an arbitrary string delimited by
double quotes ("..."), <char> is a single letter embraced by
single quotes ('...'), and <number> is a nonnegative integer.
The maximum length of a <string> is 144. Notice that a
backslash must be escaped (by an extra backslash) in the string
quotation. Anything not specified in the style file will be
assigned a default value, which is shown on a separate line.
This file can reside anywhere in the path defined by the
environment variable INDEXSTYLE.
2.1 Input Style Specifiers
2.1.1 actual <char>
Default: @
The symbol which indicates that the next entry is to appear in
the actual index file.
2.1.2 arg_close <char>
Default: }
This is the closing delimiter for the index entry argument.
2.1.3 arg_open <char>
Default: {
This is the opening delimiter for the index entry argument.
2.1.4 encap <char>
Default: |
The symbol which indicates that the rest of the argument list
is to be used as the encapsulating command for the page number.
2.1.5 escape <char>
Default: \\
The symbol which escapes the next letter, unless its preceding
letter is escape. In other words, quote is used to escape the
letter which immediately follows it. But if it is preceded by
escape, it does not escape anything.
Notice that the two symbols must be distinct.
2.1.6 keyword <string>
Default: "\\indexentry"
This is the command which tells Make-Index that its argument is
an index entry.
2.1.7 level <char>
Default: !
The delimiter which denotes a new level of subitem.
2.1.8 quote <char>
Default: "
quote is used to escape the letter which immediately follows
it, but if it is preceded by escape, it is treated as a
ordinary character. These two symbols must be distinct.
2.1.9 range_close <char>
Default: )
The closing delimiter indicating the end of an explicit page
range.
2.1.10 range_open <char>
Default: (
The opening delimiter indicating the beginning of an explicit
page range.
2.2 Output Style Specifiers
2.2.1 page_compositor <string>
Default: "-"
This specifier is used to separate a range of page numbers.
Officially undocumented!
2.2.2 preamble <string>
Default: "\\begin{theindex}\n"
The preamble of actual index file.
2.2.3 postamble <string>
Default: "\n\n\\end{theindex}\n"
The postamble of actual index file.
2.2.4 setpage_prefix <string>
Default: "\n \\setcounter{page}{"
The prefix of the command which sets the starting page number.
2.2.5 setpage_suffix <string>
Default: "}\n"
The suffix of the command which sets the starting page number.
2.2.6 group_skip <string>
Default: "\n\n \\indexspace\n"
The vertical space to be inserted before a new group begins.
2.2.7 heading_prefix <string>
Default: ""
The header prefix to be inserted before a new letter begins.
2.2.8 heading_suffix <string>
Default: ""
The header suffix to be inserted before a new letter begins.
2.2.9 headings_flag <string>
Default: 0
The flag indicating the condition of inserting new letter
header. Default is 0, which means no header. Positive means
insert an uppercase letter between prefix and suffix. Negative
means insert a lowercase letter.
2.2.10 symhead_positive <string>
Default: "Symbols"
Heading for symbols to be inserted if headings_flag is
positive.
2.2.11 symhead_negative <string>
Default: "symbols"
Heading for symbols to be inserted if headings_flag is
negative.
2.2.12 numhead_positive <string>
Default: "Numbers"
Heading for numbers to be inserted if headings_flag is
positive.
2.2.13 numhead_negative <string>
Default: "numbers"
Heading for numbers to be inserted if headings_flag is
negative.
2.2.14 item_0 <string>
Default: "\n \\item "
The command to be inserted between two primary (level 0) items.
2.2.15 item_1 <string>
Default: "\n \\subitem "
The command to be inserted between two secondary (level 1)
items.
2.2.16 item_2 <string>
Default: "\n \\subsubitem "
The command to be inserted between two level 2 items.
2.2.17 item_01 <string>
Default: "\n \\subitem "
The command to be inserted between a level 0 item and a level 1
item.
2.2.18 item_x1 <string>
Default: "\n \\subitem "
The command to be inserted between a level 0 item and a level 1
item. The difference between this and previous is that in this
case the level 0 item doesn't have any page numbers.
2.2.19 item_12 <string>
Default: "\n \\subsubitem "
The command to be inserted between a level 1 item and a level 2
item.
2.2.20 item_x2 <string>
Default: "\n \\subsubitem "
The command to be inserted between a level 1 item and a level 2
item. The difference between this and previous is that in this
case the level 1 item doesn't have any page numbers.
2.2.21 delim_0 <string>
Default: ", "
The delimiter to be inserted between a level 0 key and its
first page number. Default is a comma followed by a blank.
2.2.22 delim_1 <string>
Default: ", "
The delimiter to be inserted between a level 1 key and its
first page number. Default is a comma followed by a blank.
2.2.23 delim_2 <string>
Default: ", "
The delimiter to be inserted between a level 2 key and its
first page number. Default is a comma followed by a blank.
2.2.24 delim_n <string>
Default: ", "
The delimiter to be inserted between two page numbers for the
same key in any level. Default is a comma followed by a blank.
2.2.25 delim_r <string>
Default: "--"
The delimiter to be inserted between the starting and ending
page numbers of a range.
2.2.26 delim_t <string>
Default: ""
The delimiter to be inserted at the end of a page list. This
delimiter has no effect on entries which have no associated
page list.
2.2.27 encap_prefix <string>
Default: "\\"
The prefix for the command which encapsulates the page number.
2.2.28 encap_infix <string>
Default: "{"
The prefix for the command which encapsulates the page number.
2.2.29 encap_suffix <string>
Default: "}"
The suffix for the command which encapsulates the page number.
2.2.30 line_max <number>
Default: 72
The maximum length of a line in the output beyond which a line
wraps around.
2.2.31 indent_space <string>
Default: "\t\t"
The space to be inserted in front of a wrapped line. Default is
two tabs.
2.2.32 indent_length <number>
Default: 16
The length of indent_space. In the default case this is 16 (for
2 tabs).
2.2.33 suffix_2p <string>
Default: ""
Delimiter to replace the range delimiter and the second page
number of a two page list. When present, it overrides delim_r.
2.2.34 suffix_3p <string>
Default: ""
Delimiter to replace the range delimiter and the second page
number of a three page list. When present, it overrides delim_r
and suffix_mp.
2.2.35 suffix_mp <string>
Default: ""
Delimiter to replace the range delimiter and the second page
number of a multiple page list (three or more pages). When
present, it overrides delim_r.
3 Example
The following example shows a style file called book.isty which
defines a stand-alone index for a book. By stand-alone, we mean
it can be formatted independent of the main source.
preamble
"\\documentstyle[12pt]{book}
\\begin{document}
\\begin{theindex}
{\\small\n"
postamble
"\n\n}
\\end{theindex}
\\end{document}\n"
Suppose a particular book style requires the index (as well as
any chapters) to start from an odd page number. Given foo.idx
as the raw index file, the following command line produces an
index in file foo-.ind.
makeindex -s book.isty -o foo-.ind -p odd foo
The reason to use a non-default output file name is to avoid
clobbering the source output (presumably foo.dvi) because if
the index is in file foo.ind, its output will also be in
foo.dvi as a result of separate formatting using . In the
example the index is in foo-.ind, its output will be in
foo-.dvi and thus introduces no confusion.
4 Ordering
By default makeindex assumes word ordering. The -l option turns
it into letter ordering. The only difference is whether a blank
is treated as an effective letter or not. In word ordering, a
blank precedes any letter in the alphabet, whereas in letter
ordering, it doesn't count at all. This is best illustrated by
the following example:
word order letter order
sea lion seal
seal seal lion
Numbers are sorted in numeric order. For instance,
9 (nine), 123
123 10 (ten), see Derek, Bo
Letters are first sorted with uppercase and lowercase
considered identical; then, within identical words the
uppercase letter precedes its lowercase counterpart.
Patterns lead by a special symbol precede numbers, which
precede patterns lead by a letter. The symbol here refers to
anything not in the union of digits and English alphabet. This
includes those which follow 'z' in the ASCII chart. As a
special case, anything started with a digit but mixed with
non-digits is considered a symbol-leading pattern instead of a
number.
5 Special Effects
In the normal case entries such as
\indexentry{alpha}{1}
\indexentry{alpha!beta}{3}
\indexentry{alpha!beta!gamma}{10}
in the raw index file will be converted to
\item alpha, 1
\subitem beta, 3
\subsubitem gamma, 10
in the output index file by Make-Index. Notice that the level
symbol (!) is used to delimit levels of nesting.
It is possible to make an item appear in a designated form by
using the actual (@) operator. For instance,
\indexentry{alpha@{\it alpha\/}}{1}
will become
\item {\it alpha\/} 1
after the conversion. The idea is that the pattern preceding @
is used as sort key, whereas the one following it is put in the
actual result. However, the same key with and without the
actual part are regarded as distinct entries.
It is also possible to encapsulate a page number with a
designated command using the encap (|) operator. For example,
in the default case,
\indexentry{alpha|bold}{1}
will be converted to
\item alpha \bold{1}
where \bold{n} will expand to {\bf n}. This allows the encap
operator to be used to set pages in different fonts, thereby
conveying more information about whatever being indexed. For
instance, given the same key the page where its definition
appears can be in one font while where its primary example is
given can be in another, with other ordinary appearances in a
third. Notice that in this example, the three output attributes
associated with page encapsulation encap_prefix, encap_infix,
and encap_suffix correspond respectively to backslash, left
brace, and right brace. If this is to be formatted by languages
other than , they would be defined differently.
By the same token, the encap operator can be used to make cross
references in the index. For instance,
\indexentry{alpha|see{beta}}{1}
will become
\item alpha \see{beta}{1}
in the output index file after the conversion, where
\see{beta}{1}
will expand to
{\it see\/} beta
Notice that in a cross reference like this the page number
disappears. Therefore, where to insert such a command in the
source is immaterial.
A pair of encap concatenated with range_open (|() and with
range_close (|)) creates an explicit page range. That is,
\indexentry{alpha|(}{1}
\indexentry{alpha|)}{5}
will become
\item alpha, 1--5
Intermediate pages indexed by the same key will be merged into
the range implicitly. This is especially useful when an entire
section about a particular subject is to be indexed, in which
case only the range opening and closing operators need to be
inserted at the beginning and end of the section, respectively.
This explicit page range formation can also include an extra
command to set the page range in a designated font. Thus
\indexentry{alpha|(bold}{1}
\indexentry{alpha|)}{5}
will become
\item alpha, \bold{1--5}
A couple of special cases are worth mentioning here. First,
entries like
\indexentry{alpha|(}{1}
\indexentry{alpha|bold}{3}
\indexentry{alpha|)}{5}
will be interpreted as
\item alpha, \bold{3}, 1--5
but with a warning message in the transcript about the
encounter of an inconsistent page encapsulator. Secondly, an
explicit range beginning in a Roman page number and ending in
Arabic is considered an error. In a case like this the range is
broken into two subranges, if possible, one in Roman, the other
in Arabic. For instance,
\indexentry{alpha|(}{i}
\indexentry{alpha}{iv}
\indexentry{alpha}{3}
\indexentry{alpha|)}{7}
will be turned into
\item alpha, 1--iv, 3--7
with a warning message in the transcript complaining about the
illegal range formation.
Finally, every special symbol mentioned in this section may be
escaped by the quote operator ("). Thus
\indexentry{alpha"@beta}{1}
will actually become
\item alpha@beta, 1
as a result of executing Make-Index. However, if quote is
preceded by escape (\), its following letter is not escaped.
That is,
\indexentry{f\"ur}{1}
means
\item f\"ur, 1
which represents umlaut accented u to the family of processors.
Chapter 7. xindy
Table of Contents
1 Command List
1.1 Processing Commands
1.2 Markup Commands
1.3 Raw Index Interface
2 Invoking xindy
2.1 Command Line Options
2.2 Search Path
Note
The content of this section was taken from the original
documentation of xindy V2.1 (Doc/manual*.html).
xindy means flexible indexing system. It is an indexing system
that can be used to generate book-like indexes for arbitrary
document preparation systems. This term includes systems such
as TeX and LaTeX, the Nroff-family or SGML-based systems (e.g.
HTML) that process some kind of text and generate indexing
information. It is not fixed to any specific system, but can be
configured for a wide variety of purposes.
1 Command List
Here is the complete list of xindy's commands that may be used
in the index style. The symbol name always refers to a string.
We separate the commands into the processing and markup
commands. The commands are listed in alphabetical order.
The parenthesis [ and ] denote optional parts of the syntax and
{ and } denote the grouping of elements. A vertical bar
indicates alternatives. However, the enclosing round braces are
part of the syntax and must be supplied.
1.1 Processing Commands
1.1.1 define-alphabet
(define-alphabet name string-list)
Defines name to be the alphabet consisting of all elements of
the string-list. Examples:
(define-alphabet "example-alphabet" ("An" "Example" "Alphabet"))
defines an alphabet consisting of exactly three symbols. For
the successor relationship holds: succ("An")="Example" and
succ("Example")="Alphabet". The built-in alphabet digits is
defined as follows:
(define-alphabet "digits"
("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))
1.1.2 define-attributes
(define-attributes attribute-list)
Defines all attributes the raw index may contain. Parameter
attribute-list is a list of list of strings. The nesting level
must not be more than 2. So (..(..)..) is allowed, whereas
(..(..(..)..)..) is not.
The list has two kinds of elements: strings and list of
strings. A single string is treated as if it were a single
element list. So the lists ("definition") and ( ("definition")
) are equivalent. All elements forming a list are a so-called
attribute group. The members of a group are written to the
output file before any member of the following groups are
written.
Examples of valid attributes lists are:
("definition" "usage") defines two attribute groups. The first
one contains all references with the attribute definition and
the second one all with the attribute usage.
(("definition" "important") "usage") defines two attribute
groups. The first one contains all references with the
attributes definition or important and the second one all with
the attribute usage. In the attribute group ("definition"
"important") the attribute definition overrides important.
1.1.3 define-crossref-class
(define-crossref-class name [:unverified])
Defines name to be a class of cross references. We distinguish
two types of cross reference classes. Verified cross reference
classes can be checked for dangling references. If for instance
a cross reference points to the non-existent keyword `foo' a
warning is issued and the user is advised to correct the
invalid cross reference. This is the default. If for some
reasons this mechanism must be deactivated the switch
:unverified can be used to suppress this behaviour.
1.1.4 define-letter-group
(define-letter-group name [:before lgname] [:after lgname]
[:prefixes list-of-prefixes])
(define-letter-groups list-of-letter-groups)
This command defines a letter group with name name, which must
be a string value, grouping all index entries that have a sort
key beginning with the prefix name. The command
(define-letter-group "a")
is equivalent to the command
(define-letter-group "a" :prefixes ("a"))
Using the latter form one can associate more than one prefix
with a given letter group. Also further prefixes can be added
to an already existing letter group by simply defining the same
letter group again. This results not in a redefinition but in
adding more prefixes to the currently defined prefixes.
Example:
(define-letter-group "a")
defines a letter group containing all index entries beginning
with the string "a".
(define-letter-group "c" :after "a")
defines a letter group containing all index entries beginning
with the string "c". The letter group appears behind the letter
group "a"
(define-letter-group "b" :after "a" :before "c")
inserts letter group "b" between letter group "a" and "c". This
allows incremental definition of letter groups by extending
already defined ones.
The arguments :after and :before define a partial order on the
letter groups. xindy tries to convert this partial order into a
total one. If this is impossible due to circular definitions,
an error is reported. If more than one possible total ordering
can result, it is left open which one is used, so one should
always define a complete total order.
The command define-letter-groups (with an `s' at the end) is
simply an abbreviation for a sequence of define-letter-group
definitions where the elements are ordered in the ordering
given by the list. Example:
(define-letter-groups ("a" "b" "c")
equals the definitions
(define-letter-group "a")
(define-letter-group "b" :after "a")
(define-letter-group "c" :after "b")
See also commands markup-letter-group-list and
markup-letter-group for further information.
1.1.5 define-location-class
(define-location-class name layer-list
[:min-range-length num]
[:hierdepth depth]
[:var])
Defines name to be a location class consisting of the given
list of layers. A list of layers consists of names of basetypes
and/or strings representing separators. Separators must follow
the keyword argument :sep. If the keyword :min-range-length is
specified we define the minimum range length to be used when
building ranges. The argument num must be a positive integer
number or the keyword none in which case the building of ranges
is disallowed. If the switch :var is specified the declared
class is of type variable, i.e. it is a var-location-class.
Since building of ranges is currently only allowed for standard
classes :var and :min-range-length must not be used together.
The keyword argument :hierdepth can be used to declare that the
location references have to be tagged in a hierarchical form.
Its argument depth must be an integer number indicating the
number of layers the hierarchy does contain. See command
markup-locref-list for more information. Examples:
(define-location-class "page-numbers" ("arabic-numbers")
:minimum-range-length 3)
Defines the location class page-numbers consisting of one layer
which is the alphabet arabic-numbers. Since the minimum range
length is set to 3 the location references 2, 3 and 4 don't
form a range because the range length is only 2. But the
references 6, 7, 8, and 9 are enough to form a range. Some
example instances of this class are 0, 1, ... 2313, etc.
(define-location-class "sections" :var
("arabic-numbers" :sep "."
"arabic-numbers" :sep "."
"arabic-numbers"))
defines a variable location class. Valid instances are 1, 1.1,
1.2, 2, 2.4.5, but none of 2-3 (wrong separator), 1.2.3.4 (more
than 3 layers), 2.3.iv (roman number instead of arabic one).
1.1.6 define-location-class-order
(define-location-class-order list)
Defines the order in which the location classes are written to
the output file. The parameter list is a list of names of
location classes. Examples:
(define-location-class-order
("page-numbers" "sections" "xrefs"))
tells the system that the page numbers should appear before the
section numbers and that the cross references should appear at
the end. If this command is omitted, the declaration order of
the location classes in the index style is implicitly used as
the output order. In the case that a location class does not
appear in the list, the output may behave unexpectedly, so one
should always enumerate all used location classes when using
this command.
1.1.7 define-rule-set
(define-rule-set name
[ :inherit-from ("rule-set" "rule-set-2") ]
:rules (<rule>...) )
A complete specification of a multi-phase sorting process for a
language requires that some rules have to appear in several
subsequent sorting phases. Rule sets can be used to define a
set of rules that can be instantiated in an arbitrary sorting
phase. Basically, they offer means to separate the definition
of sorting rules from their instantiation, hence, acting as a
wrapper for calls to sort-rule. They do not add new
functionality that is not already present with sort-rule.
A rule can be of the form:
<rule> ::= ("pattern" "replacement"
[:string|:bregexp|:egegexp] [:again])
The following incomplete example defines a new rule set of name
isolatin1-tolower that inherits definitions from rule set
latin-tolower, overriding or adding the sort rules in the list
of :rules.
(define-rule-set "isolatin1-tolower"
:inherit-from ("latin-tolower")
:rules (("?" "?" :string :again)
("?" "?" :string :again)
("?" "?" :string :again)
("?" "?" :string :again)
("?" "?" :string :again)
("?" "?" :string :again)
("?" "?" :string :again)
...
)
...)
Rule sets can be instantiated with the command use-rule-set.
For further descriptions on the sorting model refer to the
command sort-rule.
1.1.8 define-sort-rule-orientations
(define-sort-rule-orientations (orientations...))
Defines the order for the different sorting phases. The
currently implemented orientations are forward and backward.
This command must precede all sort-rule commands in an index
style. It defines the orientations and implicitly sets the
maximum number of sorting phases performed.
For further descriptions on the sorting model refer to the
command sort-rule.
1.1.9 merge-rule
(merge-rule pattern replacement [:again]
[:bregexp | :eregexp | :string])
Defines a keyword mapping rule that can be used to generate the
merge key from the main key of an index entry. This mapping is
necessary to map all keywords that are differently written but
belong to the same keyword to the same canonical keyword.
The parameter pattern can be a POSIX-compliant regular
expression or an ordinary string. The implementation uses the
GNU Rx regular expression library which implements the POSIX
regular expressions. Regular expressions (REs) can be specified
as basic regular expressions (BREs) or extended regular
expressions (EREs). You can use the switch :bregexp to force
the interpretation of the pattern as a BRE, or :eregexp to
interpret it as an ERE. If you want xindy to interpret the
pattern literally, use the switch :string. If none of these
switches is selected, xindy uses an auto-detection mechanism to
decide, if the pattern is a regular expression or not. If it
recognizes the pattern as a RE, it interprets it as an ERE by
default.
The parameter replacement must be a string possibly containing
the special characters & (substitutes for the complete match)
and \1 ,..., \9 (substituting for the n-th submatch. Examples:
(merge-rule "A" "a")
replaces each occurrence of the uppercase letter `A' with its
lowercase counterpart.
(merge-rule "\~"([AEOUaeou])" "\1")
transforms the TeX umlaut-letters into their stripped
counterparts, such that `\"A ' is treated as an `A' afterwards.
The following sequences have a special meaning:
` ~n '
End of line symbol (linefeed).
` ~b '
The ISO-Latin character with the lowest ordinal number.
` ~e '
The ISO-Latin character with the highest ordinal number.
` ~~ '
The tilde character.
` ~" '
The double quote character.
Tilde characters and double quotes have to be quoted themselves
with a tilde character. The special characters ` ~b ' and ` ~e
' allow the definition of arbitrary sorting orders by rules. In
connection with an additional character every position in the
alphabet can be described. E.g. ` m~e ' is lexicographically
placed between `m' and `n'.
Due to efficiency, rules that just exchange characters or
substitute constant character sequences are not treated as
regular expressions. Therefore, instead of using the rule
(merge-rule "[A-Z]" "&")
it is more efficient (though less comfortable) to use
(merge-rule "A" "Ax")
(merge-rule "B" "Bx")
...
(merge-rule "Z" "Zx")
Usually rules are applied in order of their definition. Rules
with a special prefix precede those that begin with a class of
characters, so that the search pattern `alpha' is checked
before `.*', but `auto' and `a.*' are checked in order of their
definition.
The first rule from a style file that matches the input is
applied and the process restarts behind the substituted text.
If no rule could be applied, the actual character is copied
from the input and the process continues with the next
character.
Sometimes it is necessary to apply rules anew to the result of
a transformation. By specifying the keyword argument :again in
the merge rule the rule is marked as mutable, which means that
after using this rule the transformation process shall restart
at the same place. E.g. the rule
(merge-rule "\$(.*)\$" "\1" :again)
deletes all surrounding `$ ' symbols from the input.
See also command sort-rule.
1.1.10 merge-to
(merge-to attr-from attr-to [:drop])
A merge rule says that the attribute attr-from can be used to
build ranges in attr-to. Both attributes must name valid
attribute names. The switch :drop indicates, that the original
location reference with attribute attr-from has to be dropped
(removed), if a successful range was built with location
references in attribute attr-to. A detailed description is
given in the section about processing phases.
1.1.11 require
(require filename)
This command allows to load more index style modules. The
module is searched in the directories defined in the search
path. The file is read in and processing of the current file
continues. The argument filename must be a string. This allows
to decompose the index style into several modules that can be
included into the topmost index style file. Example:
(require "french/alphabet.xdy")
(require "french/sort-rules.xdy")
(require "tex/locations.xdy")
(require "tex/markup.xdy")
Submodules can load other submodules as well. If a file is
required that was already loaded, the require command is simply
ignored and processing continues without including this file
twice. See also command searchpath.
1.1.12 searchpath
(searchpath {path-string | path-list})
This command adds the given paths to the list of paths, xindy
searches for index style files. The argument path-string must
be a colon-separated string of directory names. If this path
ends with a colon the default search path is added to the end
of the path list. Example:
(searchpath ".:/usr/local/lib/xindy:/usr/local/lib/xindy/english:")
adds the specified directories to the search path. Since the
last path ends with a colon, the built-in search path is added
at the end. Specifying
(searchpath ("."
"/usr/local/lib/xindy"
"/usr/local/lib/xindy/english"
:default))
yields exactly the same result as the example above. Here
path-list must be a list of strings and/or the keyword(s)
:default and :last. The keyword :default signifies that the
default pathnames are to be inserted at the specified position
in the list. The keyword :last allows to insert the currently
active paths at the indicated position. Since this allows to
insert the built-in paths at any position and incrementally
adding new paths to the search path, this version of the
command ist more flexible than the first version.
1.1.13 sort-rule
(sort-rule pattern replacement [:run level] [:again])
Defines a keyword mapping rule that can be used to generate the
sort key of an index entry from the merge key. This key is used
to sort the index entries lexicographically after they have
been merged using the merge key.
The argument :run indicates that this rule is only in effect a
the specified level (default is level 0). For a detailed
discussion on the definition of sort rules for different layers
refer to the documentation about the new sorting scheme
(new-sort-rules) that comes with this distribution.
See command merge-rule for more information about keyword
rules.
1.1.14 use-rule-set
(use-rule-set [:run phase]
[:rule-set ( <rule-set>... ))
This command instantiates the gives rule sets to be in effect
at sorting phase phase. The order of the rule sets given with
argument :rule-set is significant. Rule set entries of rule set
appearing at the beginning of the list override entries in rule
sets at the end of the list.
The following example declares that in phase 0 the rule sets
din5007 and isolatin1-tolower should be active, whereas in
phase 2 the other rule sets have to be applied.
(use-rule-set :run 0
:rule-set ("din5007" "isolatin1-tolower"))
(use-rule-set :run 1
:rule-set ("resolve-umlauts"
"resolve-sharp-s"
"isolatin1-tolower"
))
For a discussion on rule sets refer to command define-rule-set.
1.2 Markup Commands
The following commands can be used to define the markup of the
index. They don't have any influence on the indexing process.
Since the markup scheme is characterized by the concept of
environments, the syntax and naming scheme of all commands
follows a simple structure.
The commands can be separated into environment and
list-environment commands. All commands of the first group
support the keyword arguments :open and :close, whereas the
second group additionally supports the keyword argument :sep.
If one of these keyword arguments is missing, the default
markup tag is always the empty tag. The :open tag is always
printed before the object itself and the :close tag is always
printed after the object has been printed. If a list is printed
the :sep tag is printed between two elements of the list but
not before the first element, or after the last one. All
commands dealing with a list have the suffix `-list' as part of
their command name.
Since the number of commands and the heavy usage of default and
specialized tags makes the markup somehow complex (but very
powerful) we have added a mechanism to trace the markup tags
xindy omits during its markup phase with the command
markup-trace.
Here follows the list of markup commands in alphabetical order
with some of the commands grouped together.
1.2.1 markup-attribute-group-list
(markup-attribute-group-list [:open string] [:close string]
[:sep string])
(markup-attribute-group [:open string] [:close string]
[:group group-num])
Location class groups consist of lists of attribute groups. The
markup of this list can be defined with the command
markup-attribute-group-list.
To allow different markup for different attribute groups the
command markup-attribute-group can be specialized on the group
number with the keyword argument :group which must be an
integer number. E.g., given are the groups ("definition"
"theorem") and ("default") with group numbers 0 and 1, then
(markup-attribute-group :open "<group0>" :close </group0>"
:group 0)
(markup-attribute-group :open "<group1>" :close "</group1>"
:group 1)
can be used to assign different markup for both groups in a
SGML-based language.
1.2.2 markup-crossref-list
(markup-crossref-list [:open string] [:close string]
[:sep string]
[:class crossref-class])
(markup-crossref-layer-list [:open string] [:close string]
[:sep string]
[:class crossref-class])
(markup-crossref-layer [:open string] [:close string]
[:class crossref-class])
A crossref class group contains cross references of the same
class. The separator between the classes is defined with the
(markup-locclass-list :sep)-parameter. A list of cross
references can be tagged with the command markup-crossref-list
that specializes on the :class argument.
Each cross reference is determined by a list of layers
indicating the target of the cross reference. To define a
suitable markup for such a list the command
markup-crossref-layer-list can be used.
Each layer of a cross reference can be assigned two tags that
specialize on the class of the reference, like all other
commands.
A suitable markup for a cross reference class see within
LaTeX2e could look like that:
(markup-crossref-list :class "see" :open "\emph{see} "
:sep "; ")
(markup-crossref-layer-list :class "see" :sep ",")
(markup-crossref-layer :class "see"
:open "\textbf{" :close "}")
An example output could look like ... see house; garden,winter;
greenhouse
1.2.3 markup-index
(markup-index [:open string] [:close string]
[ :flat | :tree | :hierdepth depth ])
Defines the markup tags that enclose the whole index via the
:open and :close parameters. Examples:
(markup-index :open "Here comes the index~n"
:close "That's all folks!~n")
defines that the :open string is printed before the rest of the
index and the :close string appears after the index is printed.
Additionally one can specify the form of the generated index.
It is possible to produce flat indexes by specifying the switch
:flat, to generate a tree with the :tree switch or any kind of
mixture between both by specifying the depth up to which trees
shall be built with the parameter :hierdepth. Its argument
depth is the number of layers that can be formed into a tree.
Therefore :flat is an abbrevation of :hierdepth 0 and :tree is
an abbrevation of :hierdepth max-depth, with max-depth being
the maximum number of layers a keyword has. An example: the
keywords
("tree" "binary" "AVL")
("tree" "binary" "natural")
can be transformed in the following ways:
A flat index (:flat or :hierdepth 0)
tree binary AVL
tree binary natural
with :hierdepth 1
tree
binary AVL
binary natural
and a tree (:tree or :hierdepth > 1)
tree
binary
AVL
natural
Most often one will create tree-like indexes or ones that are
flat.
1.2.4 markup-indexentry-list
(markup-indexentry-list [:open string] [:close string]
[:sep string] [:depth integer])
(markup-indexentry [:open string] [:close string]
[:depth integer])
Letter groups consists of a list of index entries. The command
markup-indexentry-list defines the markup of these lists. The
markup can be specialized on the depth if the index is
hierarchically organized. The command
(markup-indexentry-list :open "\begin{IdxentList}"
:close "\end{IdxentList}"
:sep "~n")
defines that the index entries of all layers are wrapped into
the given markup tags. If additionally
(markup-indexentry-list :open "\begin{IdxentListII}"
:close "\end{IdxentListII}"
:sep "~n"
:depth 2)
is defined, all index entry lists of all layers (except layer
2) are tagged according to the first specification, and the
index entry list within depth 2 are tagged according to the
second rule.
The command markup-indexentry defines the markup of an index
entry at a given depth. Since index entries may also contain
subentries and the markup for subentries may be different in
different layers, the optional keyword argument :depth can be
used to assign different markup for different layers. If depth
is ommited the default markup for all possible depths is
defined. The top-most index entries have depth 0.
(markup-indexentry :open "\begin{Indexentry}"
:close "\end{Indexentry}")
defines that the index entries of all layers are wrapped into
the given markup tags. If additionally
(markup-indexentry :open "\begin{IndexentryII}"
:close "\end{IndexentryII}"
:depth 2)
is defined, all index entries of all layers (except layer 2)
are tagged according to the first specification, and the index
entries with depth 2 are tagged according to the second rule.
1.2.5 markup-keyword-list
(markup-keyword-list [:open string] [:close string]
[:sep string] [:depth integer])
(markup-keyword [:open string] [:close string]
[:depth integer])
The print key of an index entry consists of a list of strings.
The markup of this list can be defined with the command
markup-keyword-list. The keyword argument :depth may be
specified to define the markup of the list at a particular
depth.
The keyword of an index entry consists of a list of strings.
Each of these components is tagged with the strings defined
with the command markup-keyword. Since we maybe need different
markup for different layers, the optional keyword argument can
be used to specialize this markup for some depth.
1.2.6 markup-letter-group-list
(markup-letter-group-list [:open string] [:close string]
[:sep string])
(markup-letter-group [:open string] [:close string] [:group group-name]
[:open-head string] [:close-head string]
[:upcase | :downcase | :capitalize])
The first command defines the markup of the letter group with
name group-name. Since the markup of letter groups often
contains the name of the letter group as a part of it, the
other keyword arguments allow an additional markup for this
group name. If one of the parameters :open-head and :close-head
is specified additional markup is added as can be described as
follows:
<OPEN>
IF (:open-head OR :close-head)
<OPEN-HEAD>
transformer-of(<GROUP-NAME>)
<CLOSE-HEAD>
FI
<INDEXENTRIES...>
<CLOSE>
Here, transformer-of is a function that possibly transforms the
string representing the group name into another string. The
transformers we currently support can be specified with the
switches :upcase, :downcase and :capitalize which result in the
corresponding string conversions. If none of them is specified
no transformation is done at all.
The command markup-letter-group defines the markup of the list
of letter groups.
1.2.7 markup-locclass-list
(markup-locclass-list [:open string] [:close string]
[:sep string])
Each index entry contains a list of location class groups. This
markup command can be used to define the markup of this list.
1.2.8 markup-locref
(markup-locref [:open string] [:close string]
[:class locref-class]
[:attr attribute]
[:depth integer])
The markup tags of a location reference can be specialized on
the three arguments :class, :attr and additionally, if
sub-references are used, :depth. Most often one will only use a
tag depending on the attribute. For example, all location
references with the attribute definition should appear in a
font series like bold, emphasizing the importance of this
location reference; those with the attribute default in font
shape italic. The markup in this case would not specialize on
the depth or any particular class. A valid definition, suitable
for a usage within HTML, could look like this.
(markup-locref :open "<B>" :close "</B>" :attr "definition")
(markup-locref :open "<I>" :close "</I>" :attr "default")
1.2.9 markup-locref-class
(markup-locref-class [:open string] [:close string]
[:class locref-class])
All location references of a particular location reference
class can be wrapped into the tags defined by this command. It
specializes on the keyword argument :class.
1.2.10 markup-locref-layer
(markup-locref-layer [:open string] [:close string]
[:depth integer] [:layer integer]
[:class locref-class])
(markup-locref-layer-list [:open string] [:close string]
[:sep string]
[:depth integer]
[:class locref-class])
A location reference contains a list of location reference
layers. The second markup command can be used to markup this
list. It specializes on the class of the location references
and the depth (if sub-references are used).
The first command allows to tag the elements of a layer list
differently. The first element of this list can is
specialisable with :layer 0, the next element with :layer 1,
etc. See the next example for an example.
1.2.11 markup-locref-list
(markup-locref-list [:open string] [:close string] [:sep string]
[:depth integer] [:class locref-class])
An attribute group contains a list of location references
and/or ranges. Additionally a layered location reference itself
may contain sub-references that are stored as a list of
location references. We specialize the markup for these lists
on the location class they belong to with the keyword argument
:class, and on :depth that specializes on the different
subentry levels when using location references with
sub-references.
Given is a list of location references that have the class
description
(define-location-class "Appendix"
("ALPHA" :sep "-" "arabic-numbers")
:hierdepth 2)
This location class has instances like A-1, B-5, etc. The
keyword argument :hierdepth 2 informs xindy to markup these
location references in a hierarchical form. With the commands
(markup-locref-list :sep "; "
:depth 0 :class "Appendix")
(markup-locref-list :open " " :sep ","
:depth 1 :class "Appendix")
(markup-locref-layer :open "{\bf " :close "}" :layer 0
:depth 0 :class "Appendix")
we obtain a markup sequence for some example data that could
look like
\bf A} 1,2,5; {\bf B} 5,6,9; {\bf D} 1,5,8; ...
1.2.12 markup-range
(markup-range [:open string] [:close string] [:sep string]
[:class locref-class]
[:length num] [:ignore-end])
A range consists of two location references. Markup can be
specified with the :open and :close arguments and one separator
given by the argument :sep.
Since both location references are tagged with markup defined
by the command markup-locref a specialization on attributes or
depth is not necessary. Specialization is allowed on the class
they belong to, because the separator between two location
refences may be different for each location class. Argument
:length can be used to define different markup for different
lengths. In conjunction with :length is may be useful not to
print the second location reference at all. For example, one
wishes to markup ranges of length 1 in the form Xf. instead of
X--Y. This can be accomplished with the switch :ignore-end.
The markup tags for a range (X,Y) can be described as follows:
<OPEN>
Markup of location reference X
<SEP>
IF (not :ignore-end)
Markup of location reference Y
FI
<CLOSE>
The following tags can be used to define a range of page
numbers (given in a location class page-numbers) without
considering the open and close parameters:
(markup-range :sep "-" :class "page-numbers")
Location ranges then appear separated by a hyphen in a form
like this:
..., 5-8, 19-23, ...
1.2.13 (markup-trace [:on] [:open string] [:close string])
This command can be used to activate the tracing of all markup
commands xindy executes. The switch :on activates the trace. If
:on is omitted, the command line flag -t can be used as well.
All tags which are emitted but not yet defined explicitly by
the user are tagged with a symbolic notation indicating the
commands that must be used to define this tag. The defaults for
the keyword argument :open is `<' and for :close is `>'. The
beginning of an example output could look like:
<INDEX:OPEN>
<LETTER-GROUP-LIST:OPEN>
<LETTER-GROUP:OPEN ["a"]>
<INDEXENTRY-LIST:OPEN [0]>
<INDEXENTRY:OPEN [0]>
<KEYWORD-LIST:OPEN [0]>
<KEYWORD:OPEN [0]>
...
We use a simple indentation scheme to make the structure of the
tags visible. The symbolic tag <LETTER-GROUP:OPEN ["a"]> for
example indicates that the tag that can be specified with the
command
(markup-letter-group :open "XXX" :group "a" ... )
is emitted at this point in the markup process. By
incrementally adding markup commands to the index, more and
more tags can be defined until the whole markup is defined.
This general mechanism should allow everyone understand the
markup process. The best is to start with a small index, define
the complete markup and afterwards process the whole index.
Additionally one can enclose the symbolic tags into an
environment that is neutral to the document preparation system,
such as a comment. For TeX this could be
(markup-trace :open "%%" :close "~n")
or a definition in the TeX document like
\def\ignore#1{}
combined with the command
(markup-trace :open "\ignore{" :close "}")
1.3 Raw Index Interface
This section can be skipped if the reader is not interested in
adapting xindy to a new document preparation system.
The raw index is the file that represents the index that is to
be processed. Since many different document preparation systems
may use different forms of index representations, their output
must be transformed in a form readable by xindy. We also could
have written an configurable parser performing this task, but
usually a tool written with some text processing tools such as
perl, sed or awk can achieve the same task as well. Therefore,
adapting xindy to a completely different system can mostly be
done by writing an appropriate raw index filter.
The format of the raw index interface of xindy is defined as
follows:
(indexentry { :key string-list [:print string-list]
| :tkey list-of-layers }
[:attr string]
{ :locref string [:open-range | :close-range]
| :xref string-list } )
The pseudo variable string is a sequence of characters
surrounded by double quotes, e.g.
"Hi, it's me" "one" "a string with two \"double quotes\""
are three examples of valid strings. If you need to include a
double quote as a literal character, you must quote it itself
with a backslash as shown in the third example. A string list
is simply a list of strings separated by whitespaces and
surrounded by round braces. An example of a string list is
("This" "is" "a" "list" "of" "strings")
So far about the syntax. The semantics of the different
elements are described here.
:key
The argument string list defines the keyword of the
index entry. It must be a list of strings, since the
keyword may consist of different layers such as ("heap"
"fibonacci").
:print
The optional print key defines the way the keyword has
to be printed in the markup phase.
:tkey
Another possibility to define the keys of an index entry
is with the :tkey keyword argument. It can be used
instead of the :key and :print arguments. Instead of
specifying separately the key and the corresponding
print key, we define the keyword by its layers. Each
layer consist of a list of one or two strings. The first
string will be interpreted as the main key, whereas the
second one will become the print key. If the print key
is ommited, the main key is taken instead. So the
definition
:tkey (("This") ("is") ("a") ("bang" "BANG !!!"))
is equivalent to
:key ("This" "is" "a" "bang")
:print ("This" "is" "a" "BANG !!!")
:locref
The reference an index entry describes can be a location
reference or a cross reference. The switch :locref
describes a location reference. Its optional arguments
are :open-range and :close-range. The string that must
be supplied must somehow encode the location reference.
It might look like the string "25" representing the page
number 25, or "Appendix-I" representing the first
appendix numbered in uppercase roman numerals.
:open-range,:close-range
These are switches that do not take any arguments. They
describe the beginning and ending of a range, starting
or ending from the location reference that is given by
the argument :locref. If they are supplied, the location
reference may have influence on the way ranges are
build.
:xref
These arguments choose the second alternative. The
argument string list of parameter :xref describes where
the index entry should point to.
:attr
This parameter may be used to tag a location reference
with a certain attribute or it names the class of a
cross reference. It may also used to associate different
markup for different attributes in the markup phase. If
this parameter is omitted or is the empty string, the
indexentry is declared to have the attribute default.
Some examples:
(indexentry :key ("airplane") :locref "25" :attr "default")
defines an index entry with the key airplane' indexed on page
25'. This index entry has the attribute default.
(indexentry :key ("house") :xref("building") :attr "see")
defines a cross reference with the key house pointing to the
term building. This cross reference belongs to the cross
reference class see.
(indexentry :key ("house") :xref("building") :open-range)
is an invalid specification, since :open-range mustn't be used
together with cross references.
2 Invoking xindy
2.1 Command Line Options
The following command line options are accepted:
xindy [-h] [-t] [-v] [-l logfile] [-o outfile]
[-L n] [-f filterprog]
indexstyle raw-index
The argument indexstyle names a file, containing the index
style description. The argument raw-index names a file,
containing the raw index. Both arguments are mandatory.
-h
Gives a short summary of all command line options.
-l
Writes helpful information into the specified logfile.
For example, the keyword mappings are written into this
file, so one can check if the intended mappings were
actually performed this way.
-o
Explicitly defines the name of the output file. If not
given, the name of the raw-index is used with its
extension changed to .ind (or added, if it had no
extension at all).
-t
Enters tracing mode of the symbolic markup tags. The
format of the emitted tags can be defined with the
command markup-trace.
-L
Set the xindy logging-level to n.
-f
Run filterprog on raw-index before reading. The program
must act as a filter reading from stdin and writing to
stdout. The most obvious use of this option in
conjunction with TeX is to run -f tex2xindy on the index
file prior to reading the entries into xindy.
-v
Shows the version number of xindy.
Errors and warnings are reported to stdout and additionally to
the logfile if -l was specified.
2.2 Search Path
The system uses the concept of a search path for finding the
index style files and modules. The searchpath can be set with
the environment variable XINDY_SEARCHPATH which must contain a
list of colon-separated directories. If it ends with a colon,
the built-in searchpath is added to the entire searchpath. See
the command searchpath for further details.
Appendix A. Appendices
Table of Contents
1 Bugs / Known Issues / Missing Features
2 About this Document
3 Release News
4 GNU Free Documentation License
Index
1 Bugs / Known Issues / Missing Features
PDF
A PDF file is no longer supported.
Texinfo
Currently we don't know any working solution to convert
DocBook XML to Texinfo (at least not for a complex
document). Anyone who wants to work on this issue is
highly welcome. A starting point could be the docbook2X
project at http://docbook2x.sourceforge.net.
vim-help
Quite a few poeple are asking for a version in vim-help
format. Srinath Avadhanula has already done some work on
this.
2 About this Document
The source format of this document is DocBook XML (V4.3).
The various output formats were generated using:
* xsltproc (libxml2-2.6.26/libxslt-1.1.26) as XSLT processor
* DocBook XSL Stylesheets (V1.77.1) for HTML and Epub
You'll always find the newest version of this document at
http://www.miwie.org/tex-refs/.
3 Release News
V0.4.1 12-12-03
+ Removed obsolete file still referenced in Makefile (no
visible changes)
V0.4.0 12-12-02
+ Minor changes for Epub output
+ Added missing IDs on some sections and tables
V0.3.9 05-05-14
+ Consistent naming scheme of IDs to ease the use of
this reference for other projects
+ Added new section float in chapter LaTeX
V0.3.8 04-10-28
+ Minor changes in \maketitle
V0.3.7 04-08-26
+ Corrected typos and markup errors in chapter BibTeX
+ Switched to DocBook XML V4.3
+ Added new section Options in chapter LaTeX
V0.3.6 04-06-21
+ Added a note in chapter LaTeX with the copyright and
permission notice of the original file latex2.texi
+ Corrected typos and added missing hyperlinks in
chapter xindy
+ PDF file optimized/linearized and some finetuning
V0.3.5 04-05-01
+ Added content to chapters MetaPost and pdfTeX
+ Enhanced index for chapter Make-Index
V0.3.4 04-04-24
+ Version control system changed from CVS to SVN
+ Added missing entries to chapter Make-Index
V0.3.3 04-01-26
+ Corrected again section Output Style Specifiers and
Input Style Specifiers of chapter Make-Index
+ Corrected some symbols in the index
V0.3.2 04-01-16
+ Corrected sections Output Style Specifiers and Input
Style Specifiers of chapter Make-Index
+ Enhanced index in PDF
V0.3.1 04-01-06
+ More work on PDF
+ Modularized XSL stylesheet files
+ Corrected some typos
V0.3.0 03-12-25
+ Changed document root to book
+ More work on PDF version
+ Using new XSL stylesheets V1.64.1
+ Minor fixes
V0.2.6 03-10-27
+ Rearranged appendix
+ Work on PDF version
V0.2.5 03-10-17
+ Added contents of GNU FDL in appendix
+ Using new XSL stylesheets V1.62.4
+ Switched to xsltproc as XSLT-processor
+ Reedited some deeply nested sections
+ Changed colors in CSS
V0.2.4 03-09-06
+ Added subsection dcolumn
+ Subsection fontenc translated into english
+ Corrected typo in \sbox
V0.2.3 03-04-12
+ Provide PDF output using ConTeXt and DocBook In
ConTeXt (still experimental)
+ Reedited (beautified) sections LaTeX / Commands /
Counters | Cross References | Definitions | Layout |
Environments | Footnotes
V0.2.2 03-01-26
+ Added bzip2 compressed version of source and outfiles
tarball
+ Using new XSL stylesheets V1.60.1
+ Eliminated more spurious  characters in HTML
output
V0.2.1 03-01-18
+ Using new XSL stylesheets V1.59.2
+ Eliminated spurious  characters
V0.2.0 03-01-11
+ Using new XSL stylesheets V1.58.1
+ Minor changes to CSS file
+ License changed to GNU Free Documentation License
+ Added subsection Commands and Parameters to section
PSTricks
+ Reworked inputenc section
V0.1.3 02-10-17
+ Started rework of KOMA-Script section
+ Added subsection Additional PSTricks Packages
+ Using new XSL stylesheets V1.56.1
V0.1.2 02-10-01
+ Reworked hyperref section
V0.1.1 02-09-19
+ Added template sections for PiCTeX and Texinfo
+ Added subsection Release News in appendix About this
Document
+ Using new XSL stylesheets V1.55.0
+ Added missing CSS file to outfiles tarball
+ Corrected wrong FPI
V0.1.0 02-08-20
+ Eliminated trailing '.' in numbered sections
+ Minor markup errors corrected
+ Reworked CSS file
V0.0.5 02-08-10
+ Switched to DocBook XML 4.2
+ Sections 'Bibindex' and 'xindy' completed
V0.0.4 02-07-25
+ Section 'Makeindex' completed
V0.0.3 02-07-13
+ New XSL stylesheets solve bug in creating index (no
other changes)
V0.0.2 02-07-05
+ New (template) sections 'fontinst', 'Bibtex',
'Makeindex', and 'xindy'
+ New section 'Special Symbols'
+ Added information for 'german' package
+ Registered as a new project (tex-refs) on
freshmeat.net
V0.0.1 02-06-21
+ First official announcement
4 GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
of such a section when you modify the Document means that it remains a
section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section all
the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
"History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections
Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this documen
t
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LI
ST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
|