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
|
<html lang="en">
<head>
<title>Kpathsea: A library for path searching</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Kpathsea: A library for path searching">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the Kpathsea library for path searching.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2007 Karl Berry & Olaf Weber.
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.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by the Free Software Foundation.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<h1 class="settitle">Kpathsea: A library for path searching</h1>
<div class="node">
<p><hr>
<a name="Top"></a>
Next: <a rel="next" accesskey="n" href="#Introduction">Introduction</a>,
Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
</div>
<h2 class="unnumbered">Kpathsea library</h2>
<p>This manual documents how to install and use the Kpathsea library for
filename lookup. It corresponds to version 3.5.6,
released in January 2007.
<ul class="menu">
<li><a accesskey="1" href="#Introduction">Introduction</a>: Overview.
<li><a accesskey="2" href="#Installation">Installation</a>: Compilation, installation, and bug reporting.
<li><a accesskey="3" href="#Path-searching">Path searching</a>: How filename lookups work.
<li><a accesskey="4" href="#TeX-support">TeX support</a>: Special support for TeX-related file lookups.
<li><a accesskey="5" href="#Programming">Programming</a>: How to use Kpathsea features in your program.
<li><a accesskey="6" href="#Index">Index</a>: General index.
</ul>
<div class="node">
<p><hr>
<a name="Introduction"></a>
Next: <a rel="next" accesskey="n" href="#Installation">Installation</a>,
Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">1 Introduction</h2>
<p><a name="index-introduction-1"></a><a name="index-fundamental-purpose-of-Kpathsea-2"></a>
This manual corresponds to version 3.5.6 of the Kpathsea
library, released in January 2007.
<p>The library's fundamental purpose is to return a filename from a list of
directories specified by the user, similar to what shells do when
looking up program names to execute.
<p><a name="index-programs-using-the-library-3"></a>The following software, all of which we maintain, uses this library:
<ul>
<li>Dviljk (see the `<samp><span class="samp">dvilj</span></samp>' man page)
<li>Dvipsk (see <a href="dvips.html#Top">Introduction</a>)
<li>GNU font utilities (see <a href="fontu.html#Top">Introduction</a>)
<li>Web2c (see <a href="web2c.html#Top">Introduction</a>)
<li>Xdvik (see the `<samp><span class="samp">xdvi</span></samp>' man page)
</ul>
<p class="noindent">Other software that we do not maintain also uses it.
<p><a name="index-interface_002c-not-frozen-4"></a><a name="index-comments_002c-making-5"></a><a name="index-suggestions_002c-making-6"></a>We are still actively maintaining the library (and probably always will
be, despite our hopes). If you have comments or suggestions, please send
them to us (see <a href="#Reporting-bugs">Reporting bugs</a>).
<p><a name="index-conditions-for-use-7"></a><a name="index-license-for-using-the-library-8"></a><a name="index-GNU-General-Public-License-9"></a>We distribute the library under the GNU Library General Public License
(LGPL). In short, this means if you write a program using the library,
you must (offer to) distribute the source to the library, along with any
changes you have made, and allow anyone to modify the library source and
distribute their modifications. It does not mean you have to distribute
the source to your program, although we hope you will. See the files
<samp><span class="file">GPL</span></samp> and <samp><span class="file">LGPL</span></samp> for the text of the GNU licenses.
<p><a name="index-g_t_0040TeX_007b_007d-Users-Group-10"></a>If you know enough about TeX to be reading this manual, then you (or
your institution) should consider joining the TeX Users Group (if
you're already a member, great!). TUG produces the periodical
<cite>TUGboat</cite>, sponsors an annual meeting and publishes the
proceedings, and arranges courses on TeX for all levels of users
throughout the world. Anyway, here is the address:
<p><a name="index-tug_0040_0040tug_002eorg-11"></a>
<pre class="display"> TeX Users Group
P.O. Box 2311
Portland OR 97208-2311
USA
phone: +1 503 223-9994
fax: +1 503 223-3960
email: <a href="mailto:tug@tug.org">tug@tug.org</a>
</pre>
<ul class="menu">
<li><a accesskey="1" href="#History">History</a>
</ul>
<div class="node">
<p><hr>
<a name="History"></a>
Up: <a rel="up" accesskey="u" href="#Introduction">Introduction</a>
</div>
<h3 class="section">1.1 History</h3>
<p><a name="index-history-of-Kpathsea-12"></a>
<a name="index-Knuth_002c-Donald-E_002e-13"></a>(This section is for those people who are curious about how the library
came about.) (If you like to read historical accounts of software, we
urge you to seek out the GNU Autoconf manual and the “Errors of
TeX” paper by Don Knuth, published in <cite>Software—Practice and
Experience</cite> 19(7), July 1989.)
<p><a name="index-Morgan_002c-Tim-14"></a><a name="index-Rokicki_002c-Tom-15"></a><a name="index-Berry_002c-Karl-16"></a><a name="index-VAX-11_002f750-17"></a><a name="index-Sun-2-18"></a><a name="index-pxp-_0040r_007bPascal-preprocessor_007d-19"></a><a name="index-pc-_0040r_007bPascal-compiler_007d-20"></a>[Karl writes.] My first ChangeLog entry for Web2c seems to be February
1990, but I may have done some work before then. In any case, Tim
Morgan and I were jointly maintaining it for a time. (I should mention
here that Tim had made Web2c into a real distribution long before I had
ever used it or even heard of it, and Tom Rokicki did the original
implementation. I was using <code>pxp</code> and <code>pc</code> on VAX 11/750's
and the hot new Sun 2 machines.)
<p>It must have been later in 1990 and 1991 that I started working on
<cite>TeX for the Impatient</cite>. Dvips, Xdvi, Web2c, and the GNU
fontutils (which I was also writing at the time) all used different
environment variables, and, more importantly, had different bugs in
their path searching. This became extremely painful, as I was stressing
everything to the limit working on the book. I also desperately wanted
to implement subdirectory searching, since I couldn't stand putting
everything in one big directory, and also couldn't stand having to
explicitly specify <samp><span class="file">cm</span></samp>, <samp><span class="file">pandora</span></samp>, <small class="dots">...</small> in a path.
<p><a name="index-Vojta_002c-Paul-21"></a>In the first incarnation, I just hacked separately on each
program—that was the original subdirectory searching code in both Xdvi
and Dvips, though I think Paul Vojta has completely rewritten Xdvi's
support by now. That is, I tried to go with the flow in each program,
rather than changing the program's calling sequences to conform to
common routines.
<p>Then, as bugs inevitably appeared, I found I was fixing the same thing
three times (Web2c and fontutils were always sharing code, since I
maintained those—there was no Dvipsk or Xdvik or Dviljk at this
point). After a while, I finally started sharing source files. They
weren't yet a library, though. I just kept things up to date with shell
scripts. (I was developing on a 386 running ISC 2.2 at the time, and so
didn't have symbolic links. An awful experience.)
<p><a name="index-MacKenzie_002c-David-22"></a>The ChangeLogs for Xdvik and Dvipsk record initial releases of those
distributions in May and June 1992. I think it was because I was tired
of the different configuration strategies of each program, not so much
because of the path searching. (Autoconf was being developed by David
MacKenzie and others, and I was adapting it to TeX and friends.)
<p><a name="index-zuhn_002c-david-23"></a>I started to make a separate library that other programs could link with
on my birthday in April 1993, according to the ChangeLog. I don't
remember exactly why I finally took the time to make it a separate
library; a conversation with david zuhn that initiated it. Just seemed
like it was time.
<p><a name="index-Walsh_002c-Norman-24"></a><a name="index-Neumann_002c-Gustaf-25"></a>Dviljk got started in March 1994 after I bought a Laserjet 4. (Kpathsea
work got suspended while Norm Walsh and I, with Gustaf Neumann's help,
implemented a way for TeX to get at all those neat builtin LJ4 fonts
<small class="dots">...</small> such a treat to have something to typeset in besides Palatino!)
<p>By spring of 1995, I had implemented just about all the path-searching
features in Kpathsea that I plan to, driven beyond my initial goals by
Thomas Esser and others. I then started to integrate Web2c with
Kpathsea. After the release of a stable Web2c, I hope to be able to stop
development, and turn most of my attention back to making fonts for GNU.
(Always assuming Micros**t hasn't completely obliterated Unix by then,
or that software patents haven't stopped software development by anybody
smaller than a company with a million-dollar-a-year legal budget. Which
is actually what I think is likely to happen, but that's another
story<small class="dots">...</small>)
<p><a name="index-Weber_002c-Olaf-26"></a>[Olaf writes.] At the end of 1997, UNIX is still alive and kicking,
individuals still develop software, and Web2c development still
continues. Karl had been looking for some time for someone to take up
part of the burden, and I volunteered.
<div class="node">
<p><hr>
<a name="Installation"></a>
Next: <a rel="next" accesskey="n" href="#Path-searching">Path searching</a>,
Previous: <a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">2 Installation</h2>
<p><a name="index-installation-27"></a><a name="index-configuration-28"></a><a name="index-compilation-29"></a>
(A copy of this chapter is in the distribution file <samp><span class="file">kpathsea/INSTALL</span></samp>.)
<p>The procedure for Kpathsea (and Web2c, etc.) configuration and
installation follows. If you encounter trouble, see <a href="#Common-problems">Common problems</a>, a copy of which is in the file <samp><span class="file">kpathsea/BUGS</span></samp>.
<ul class="menu">
<li><a accesskey="1" href="#Simple-installation">Simple installation</a>: If you just want to do it.
<li><a accesskey="2" href="#Custom-installation">Custom installation</a>: If you want to change things around.
<li><a accesskey="3" href="#Security">Security</a>: Who can write what files, etc.
<li><a accesskey="4" href="#TeX-directory-structure">TeX directory structure</a>: Managing the horde of TeX input files.
<li><a accesskey="5" href="#unixtex_002eftp">unixtex.ftp</a>: Getting software via FTP, on CD-ROM, or on tape.
<li><a accesskey="6" href="#Reporting-bugs">Reporting bugs</a>: Where and how to report bugs.
</ul>
<div class="node">
<p><hr>
<a name="Simple-installation"></a>
Next: <a rel="next" accesskey="n" href="#Custom-installation">Custom installation</a>,
Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
</div>
<h3 class="section">2.1 Simple installation</h3>
<p><a name="index-simple-installation-30"></a><a name="index-installation_002c-simple-31"></a>
<a name="index-precompiled-executables_002c-instead-of-installation-32"></a><a name="index-installation_002c-getting-executables-instead-of-33"></a>Installing TeX and friends for the first time can be a daunting
experience. Thus, you may prefer to skip this whole thing and just get
precompiled executables: see <a href="#unixtex_002eftp">unixtex.ftp</a>.
<p>This section explains what to do if you wish to take the defaults for
everything, and generally to install in the simplest possible way. Most
steps here refer to corresponding subsection in the next section which
explains how to override defaults and generally gives more details.
<p>By default everything will be installed under <samp><span class="file">/usr/local</span></samp> and the
following discussion assumes this. However, if you already have TeX
installed, its location is used to derive the directory under which
everything is to be installed.
<ol type=1 start=1>
<li>Be sure you have enough disk space: approximately 8 megabytes for the
compressed archives, 15MB for sources, 50MB for compilation, 40MB for
the (initial) installed system (including library files). See <a href="#Disk-space">Disk space</a>.
<li>Retrieve these distribution archives:
<dl>
<dt><a href="ftp://ftp.tug.org/tex/texk.tar.gz">ftp://ftp.tug.org/tex/texk.tar.gz</a><dd>These are the sources, which you will be compiling.
<br><dt><a href="ftp://ftp.tug.org/tex/texklib.tar.gz">ftp://ftp.tug.org/tex/texklib.tar.gz</a><dd>This is a basic set of input files. You should unpack it in the
directory <samp><span class="file">/usr/local/share</span></samp>; doing so will create a <samp><span class="file">texmf</span></samp>
subdirectory there.
</dl>
<p>These archives are mirrored on the CTAN hosts, in the
<samp><span class="file">systems/web2c</span></samp> directory.
<p class="noindent">See <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a>.
<li>When using the default search paths, there is no need to edit any
distribution files. See <a href="#Changing-search-paths">Changing search paths</a>.
<li>At the top level of the distribution, run `<samp><span class="samp">sh configure</span></samp>'. (If you
have the GNU Bash shell installed, run `<samp><span class="samp">bash configure</span></samp>'.)
See <a href="#Running-configure">Running configure</a>.
<li>`<samp><span class="samp">make</span></samp>'. See <a href="#Running-make">Running make</a>. If you are using a BSD 4.4 system
such as FreeBSD or NetBSD, you may have to use GNU make (often installed
in <samp><span class="file">/usr/local/bin</span></samp>), not the BSD make.
<li>`<samp><span class="samp">make install</span></samp>'. See <a href="#Installing-files">Installing files</a>.
<li>`<samp><span class="samp">make distclean</span></samp>'. See <a href="#Cleaning-up">Cleaning up</a>.
<li>Set up a cron job to rebuild the filename database that makes searching
faster. This line will rebuild it every midnight:
<pre class="example"> 0 0 * * * cd /usr/local/share/texmf && <var>/bindir</var>/mktexlsr
</pre>
<p>See <a href="#Filename-database-generation">Filename database generation</a>, and <a href="#Filename-database">Filename database</a>.
<li><a name="index-printer-configuration-files-34"></a><a name="index-PostScript-fonts_002c-additional-35"></a><a name="index-color-printers_002c-configuring-36"></a>If you're installing Dvips, you also need to set up configuration files
for your printers and make any additional PostScript fonts available.
See <a href="dvips.html#Installation">Installation</a>. If you have any color printers,
see <a href="dvips.html#Color-device-configuration">Color device configuration</a>.
<li>The first time you run a DVI driver, a bunch of PK fonts will be built
by Metafont via <code>mktexpk</code> (and added to the filename database).
This will take some time. Don't be alarmed; they will created only this
first time (unless something is wrong with your path definitions).
<p>By default, <code>mktexpk</code> will create these fonts in a hierarchy
under <samp><span class="file">/var/tmp/texfonts</span></samp>; it simply assumes that <samp><span class="file">/var/tmp</span></samp>
exists and is globally writable. If you need a different arrangement,
see <a href="#mktex-configuration">mktex configuration</a>.
<p>See <a href="#mktex-scripts">mktex scripts</a>.
<li><a name="index-fonts_002c-being-created-37"></a><a name="index-mktexpk-_0040r_007b_002c-initial-runs_007d-38"></a><a name="index-tests_002c-simple-39"></a>For some simple tests, try `<samp><span class="samp">tex story \\bye</span></samp>' and `<samp><span class="samp">latex
sample2e</span></samp>'. Then run <samp><span class="file">xdvi story</span></samp> or <samp><span class="file">dvips sample2e</span></samp> on the
resulting DVI files to preview/print the documents. See <a href="#Installation-testing">Installation testing</a>.
</ol>
<div class="node">
<p><hr>
<a name="Custom-installation"></a>
Next: <a rel="next" accesskey="n" href="#Security">Security</a>,
Previous: <a rel="previous" accesskey="p" href="#Simple-installation">Simple installation</a>,
Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
</div>
<h3 class="section">2.2 Custom installation</h3>
<p><a name="index-custom-installation-40"></a><a name="index-installation_002c-customized-41"></a>
Most sites need to modify the default installation procedure in some
way, perhaps merely changing the prefix from `<samp><span class="samp">/usr/local</span></samp>', perhaps
adding extra compiler or loader options to work around <code>configure</code>
bugs. This section explains how to override default choices. For
additional distribution-specific information:
<ul>
<li><samp><span class="file">dviljk/INSTALL</span></samp>.
<li>See <a href="dvips.html#Installation">Installation</a>.
<li>See <a href="web2c.html#Installation">Installation</a>.
<li><samp><span class="file">xdvik/INSTALL</span></samp>.
</ul>
<p><a name="index-non_002dUnix-operating-systems-42"></a><a name="index-Amiga-support-43"></a><a name="index-DOS-support-44"></a><a name="index-OS_002f2-support-45"></a><a name="index-VMS-support-46"></a>These instructions are for Unix systems. Other operating-system
specific distributions have their own instructions. The code base
itself supports Amiga, DOS, OS/2, and VMS.
<p>Following are the same steps as in the previous section (which describes
the simplest installation), but with much more detail.
<ul class="menu">
<li><a accesskey="1" href="#Disk-space">Disk space</a>
<li><a accesskey="2" href="#Kpathsea-application-distributions">Kpathsea application distributions</a>
<li><a accesskey="3" href="#Changing-search-paths">Changing search paths</a>
<li><a accesskey="4" href="#Running-configure">Running configure</a>
<li><a accesskey="5" href="#Running-make">Running make</a>
<li><a accesskey="6" href="#Installing-files">Installing files</a>
<li><a accesskey="7" href="#Cleaning-up">Cleaning up</a>
<li><a accesskey="8" href="#Filename-database-generation">Filename database generation</a>
<li><a accesskey="9" href="#mktex-scripts">mktex scripts</a>
<li><a href="#Installation-testing">Installation testing</a>
</ul>
<div class="node">
<p><hr>
<a name="Disk-space"></a>
Next: <a rel="next" accesskey="n" href="#Kpathsea-application-distributions">Kpathsea application distributions</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.1 Disk space</h4>
<p><a name="index-disk-space_002c-needed-47"></a><a name="index-total-disk-space-48"></a><a name="index-size-of-distribution-archives-49"></a>Here is a table showing the disk space needed for each distribution
(described in the next section). The `(totals)' line reflects the
`<samp><span class="samp">texk</span></samp>' source distribution and `<samp><span class="samp">texklib</span></samp>'; the individual
distributions don't enter into it. Sizes are in megabytes. All numbers
are approximate.
<p><table summary=""><tr align="left"><td valign="top">Distribution </td><td valign="top">.tar.gz </td><td valign="top">Unpacked </td><td valign="top">Compiled </td><td valign="top">Installed
<br></td></tr><tr align="left"><td valign="top">dviljk </td><td valign="top">.9 </td><td valign="top">3.8 </td><td valign="top">
<br></td></tr><tr align="left"><td valign="top">dvipsk </td><td valign="top">.9 </td><td valign="top">3.2 </td><td valign="top">
<br></td></tr><tr align="left"><td valign="top">xdvik </td><td valign="top">.7 </td><td valign="top">2.5 </td><td valign="top">
<br></td></tr><tr align="left"><td valign="top">web2c </td><td valign="top">1.3 </td><td valign="top">5.0 </td><td valign="top">
<br></td></tr><tr align="left"><td valign="top">web </td><td valign="top">1.9 </td><td valign="top">6.5 </td><td valign="top">- </td><td valign="top">-
<br></td></tr><tr align="left"><td valign="top">texk </td><td valign="top">7.5 </td><td valign="top">32.1 </td><td valign="top">95.3 </td><td valign="top">33.5
<br></td></tr><tr align="left"><td valign="top">texklib </td><td valign="top">6.3 </td><td valign="top">15.0 </td><td valign="top">- </td><td valign="top">15.0
<br></td></tr><tr align="left"><td valign="top">(totals) </td><td valign="top">14.6 </td><td valign="top">47.1 </td><td valign="top">95.3 </td><td valign="top">48.5
<br></td></tr></table>
<div class="node">
<p><hr>
<a name="Kpathsea-application-distributions"></a>
Next: <a rel="next" accesskey="n" href="#Changing-search-paths">Changing search paths</a>,
Previous: <a rel="previous" accesskey="p" href="#Disk-space">Disk space</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.2 Kpathsea application distributions</h4>
<p><a name="index-distributions_002c-compiling-simultaneously-50"></a><a name="index-version-number_002c-of-Kpathsea-51"></a><a name="index-Kpathsea-version-number-52"></a>
<a name="index-distributions_002c-not-compiling-53"></a><a name="index-NeXT_002c-lacking-X11-54"></a><a name="index-X11_002c-lacking-on-NeXT-55"></a>The archive <a href="ftp://ftp.tug.org/tex/texk.tar.gz">ftp://ftp.tug.org/tex/texk.tar.gz</a> contains all of the
Kpathsea applications I maintain, and the library itself. For example,
since NeXT does not generally support X11, you'd probably want to skip
`<samp><span class="samp">xdvik</span></samp>' (or simply remove it after unpacking <samp><span class="file">texk.tar.gz</span></samp>.
If you are not interested in all of them, you can also retrieve them
separately:
<p><a name="index-DVI-drivers-56"></a>
<dl>
<dt><samp><span class="file">dviljk.tar.gz</span></samp><dd><a name="index-PCL-driver-57"></a><a name="index-LaserJet-drive-58"></a>DVI to PCL, for LaserJet printers.
<br><dt><samp><span class="file">dvipsk.tar.gz</span></samp><dd><a name="index-PDF-generation-59"></a><a name="index-PostScript-driver-60"></a>DVI to PostScript, for previewers, printers, or PDF generation.
<br><dt><samp><span class="file">web2c.tar.gz</span></samp><dd>The software needed to compile TeX and friends.
<br><dt><samp><span class="file">web.tar.gz</span></samp><dd>The original WEB source files, also used in compilation.
<br><dt><samp><span class="file">xdvik.tar.gz</span></samp><dd><a name="index-X11-previewer-61"></a>DVI previewing under the X window system.
</dl>
<p><a name="index-Babel-62"></a><a name="index-non_002dEnglish-typesetting-63"></a>If you want to use the Babel LaTeX package for support of non-English
typesetting, you may need to retrieve additional files. See the file
<samp><span class="file">install.txt</span></samp> in the Babel distribution.
<div class="node">
<p><hr>
<a name="Changing-search-paths"></a>
Next: <a rel="next" accesskey="n" href="#Running-configure">Running configure</a>,
Previous: <a rel="previous" accesskey="p" href="#Kpathsea-application-distributions">Kpathsea application distributions</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.3 Changing search paths</h4>
<p><a name="index-search-paths_002c-changing-default-64"></a><a name="index-paths_002c-changing-default-65"></a><a name="index-texmf_002ein_0040r_007b_002c-editing_007d-66"></a>If the search paths for your installation differ from the standard
TeX directory structure (see <a href="tds.html#Top">Introduction</a>), edit the file <samp><span class="file">kpathsea/texmf.in</span></samp>
as desired, before running <code>configure</code>. For example, if you have
all your fonts or macros in one big directory.
<p>You may also wish to edit the file <samp><span class="file">mktex.cnf</span></samp>, either before or
after installation, to control various aspects of <code>mktexpk</code> and
friends. See <a href="#mktex-configuration">mktex configuration</a>.
<p>You do not need to edit <samp><span class="file">texmf.in</span></samp> to change the default
top-level or other installation <em>directories</em> (only the paths).
You can and should do that when you run <code>configure</code> (next step).
<p>You also do not need to edit <samp><span class="file">texmf.in</span></samp> if you are willing to
rely on <samp><span class="file">texmf.cnf</span></samp> at runtime to define the paths, and let the
compile-time default paths be incorrect. Usually there is no harm in
doing this.
<p>The section below explains default generation in more detail.
<ul class="menu">
<li><a accesskey="1" href="#Default-path-features">Default path features</a>
<li><a accesskey="2" href="#Default-path-generation">Default path generation</a>
</ul>
<div class="node">
<p><hr>
<a name="Default-path-features"></a>
Next: <a rel="next" accesskey="n" href="#Default-path-generation">Default path generation</a>,
Up: <a rel="up" accesskey="u" href="#Changing-search-paths">Changing search paths</a>
</div>
<h5 class="subsubsection">2.2.3.1 Default path features</h5>
<p><a name="index-default-path-features-67"></a><a name="index-features_002c-of-default-paths-68"></a>
The purpose of having all the different files described in the section
above is to avoid having the same information in more than one place. If
you change the installation directories or top-level prefix at
<code>configure</code>-time, those changes will propagate through the whole
sequence. And if you change the default paths in <samp><span class="file">texmf.in</span></samp>,
those changes are propagated to the compile-time defaults.
<p>The Make definitions are all repeated in several <tt>Makefile</tt>'s; but
changing the top-level <samp><span class="file">Makefile</span></samp> should suffice, as it passes down
all the variable definitions, thus overriding the submakes. (The
definitions are repeated so you can run Make in the subdirectories, if
you should have occasion to.)
<p><a name="index-MAKETEX_005fMODE-69"></a><a name="index-paths_002c-device-name-included-in-70"></a>By default, the bitmap font paths end with `<samp><span class="samp">/$MAKETEX_MODE</span></samp>', thus
including the device name (usually a Metafont mode name such as
`<samp><span class="samp">ljfour</span></samp>'). This distinguishes two different devices with the same
resolution—a write/white from a write/black 300<span class="dmn">dpi</span> printer, for
example.
<p><a name="index-kpse_005finit_005fprog_0040r_007b_002c-and-_0040code_007bMAKETEX_005fMODE_007d_007d-71"></a><a name="index-proginit_002ec-72"></a>However, since most sites don't have this complication, Kpathsea
(specifically, the <code>kpse_init_prog</code> function in
<samp><span class="file">kpathsea/proginit.c</span></samp>) has a special case: if the mode has not been
explicitly set by the user (or in a configuration file), it sets
<code>MAKETEX_MODE</code> to <code>/</code>. This makes the default PK path, for
example, expand into <code>.../pk//</code>, so fonts will be found even if
there is no subdirectory for the mode (if you arranged things that way
because your site has only one printer, for example) or if the program
is mode-independent (e.g., <code>pktype</code>).
<p>To make the paths independent of the mode, simply edit
<samp><span class="file">texmf.in</span></samp> before installation, or the installed
<samp><span class="file">texmf.cnf</span></samp>, and remove the `<samp><span class="samp">$MAKETEX_MODE</span></samp>'.
<p>See <a href="#mktex-script-arguments">mktex script arguments</a>, for how this interacts with <code>mktexpk</code>.
<p><a name="index-HIER-73"></a><a name="index-kpathsea_002fHIER-74"></a>See <a href="#TeX-directory-structure">TeX directory structure</a>, for a
description of the default arrangement of the input files that comprise
the TeX system. The file <samp><span class="file">kpathsea/HIER</span></samp> is a copy of that
section.
<div class="node">
<p><hr>
<a name="Default-path-generation"></a>
Previous: <a rel="previous" accesskey="p" href="#Default-path-features">Default path features</a>,
Up: <a rel="up" accesskey="u" href="#Changing-search-paths">Changing search paths</a>
</div>
<h5 class="subsubsection">2.2.3.2 Default path generation</h5>
<p><a name="index-default-paths_002c-changing-75"></a><a name="index-paths_002c-changing-default-76"></a><a name="index-installation_002c-changing-default-directories-77"></a><a name="index-directories_002c-changing-default-installation-78"></a>
This section describes how the default paths are constructed.
<p>You may wish to ignore the whole mess and simply edit <samp><span class="file">texmf.cnf</span></samp>
after it is installed, perhaps even copying it into place beforehand so
you can complete the installation, if it seems necessary.
<p><a name="index-default-paths_002c-how-they_0027re-made-79"></a>To summarize the chain of events that go into defining the default paths:
<ol type=1 start=1>
<li>`<samp><span class="samp">configure</span></samp>' creates a <samp><span class="file">Makefile</span></samp> from each <samp><span class="file">Makefile.in</span></samp>.
<li><a name="index-texmf_002esed-80"></a>When Make runs in the <samp><span class="file">kpathsea</span></samp> directory, it creates a file
<samp><span class="file">texmf.sed</span></samp> that substitutes the Make value of <code>$(var)</code> for a
string <code>@var@</code>. The variables in question are the one that
define the installation directories.
<li><a name="index-texmf_002ein-81"></a><a name="index-texmf_002ecnf_0040r_007b_002c-generated_007d-82"></a><samp><span class="file">texmf.sed</span></samp> (together with a little extra magic—see
<samp><span class="file">kpathsea/Makefile</span></samp>) is applied to <samp><span class="file">texmf.in</span></samp> to generate
<samp><span class="file">texmf.cnf</span></samp>. This is the file that will eventually be installed
and used.
<li><a name="index-paths_002eh-83"></a>The definitions in <samp><span class="file">texmf.cnf</span></samp> are recast as C <code>#define</code>'s in
<samp><span class="file">paths.h</span></samp>. These values will be the compile-time defaults; they
are not used at runtime unless no <samp><span class="file">texmf.cnf</span></samp> file can be found.
<p>(That's a lie: the compile-time defaults are what any extra <tt>:</tt>'s in
<samp><span class="file">texmf.cnf</span></samp> expand into; but the paths as distributed have no extra
<tt>:</tt>'s, and there's no particular reason for them to.)
</ol>
<div class="node">
<p><hr>
<a name="Running-configure"></a>
Next: <a rel="next" accesskey="n" href="#Running-make">Running make</a>,
Previous: <a rel="previous" accesskey="p" href="#Changing-search-paths">Changing search paths</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.4 Running <code>configure</code></h4>
<p><a name="index-configure_0040r_007b_002c-running_007d-84"></a><a name="index-c_002dauto_002ein-85"></a><a name="index-Makefile_002ein-86"></a><a name="index-ac_005finclude_0040r_007b_002c-Autoconf-extension_007d-87"></a><a name="index-g_t_0040_0040_0040var_007bvar_007d_0040_0040-substitutions-88"></a><a name="index-system-dependencies-89"></a>Run <code>sh configure </code><var>options</var> (in the top-level directory, the
one containing <samp><span class="file">kpathsea/</span></samp>), possibly using a shell other than
<code>sh</code> (see <a href="#configure-shells">configure shells</a>).
<p><code>configure</code> adapts the source distribution to the present system
via <code>#define</code>'s in <samp><span class="file">*/c-auto.h</span></samp>, which are created from the
corresponding <samp><span class="file">c-auto.in</span></samp>. It also creates a <samp><span class="file">Makefile</span></samp> from
the corresponding <samp><span class="file">Makefile.in</span></samp>, doing `<samp><span class="samp">@</span><var>var</var><span class="samp">@</span></samp>' and
`<samp><span class="samp">ac_include</span></samp>' substitutions).
<p><a name="index-README_002eCONFIGURE-90"></a><a name="index-kpathsea_002fREADME_002eCONFIGURE-91"></a><code>configure</code> is the best place to control the configuration,
compilation, and installed location of the software, either via
command-line options, or by setting environment variables before
invoking it. For example, you can disable <code>mktexpk</code> by default
with the option `<samp><span class="samp">--disable-mktexpk</span></samp>'.
See <a href="#configure-options">configure options</a>.
<ul class="menu">
<li><a accesskey="1" href="#configure-shells">configure shells</a>
<li><a accesskey="2" href="#configure-options">configure options</a>
<li><a accesskey="3" href="#configure-environment">configure environment</a>
<li><a accesskey="4" href="#configure-scenarios">configure scenarios</a>
<li><a accesskey="5" href="#Shared-library">Shared library</a>
</ul>
<div class="node">
<p><hr>
<a name="configure-shells"></a>
Next: <a rel="next" accesskey="n" href="#configure-options">configure options</a>,
Up: <a rel="up" accesskey="u" href="#Running-configure">Running configure</a>
</div>
<h5 class="subsubsection">2.2.4.1 <code>configure</code> shells</h5>
<p><a name="index-shells-and-_0040code_007bconfigure_007d-92"></a><a name="index-bash_0040r_007b_002c-recommended-for-running-_0040code_007bconfigure_007d_007d-93"></a>
Considerable effort has gone into trying to ensure that the
<code>configure</code> scripts can be run by most Bourne shell variants.
If <code>sh</code> runs into trouble, your best bet is to use Bash, the GNU
Bourne-again shell (see <a href="bash.html#Top">Top</a>).
<p>Bourne shell variants for which problems have been reported in the past
are:
<dl>
<dt><code>ksh</code><dd><a name="index-ksh_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-94"></a><a name="index-bsh_0040r_007b_002c-ok-with-_0040code_007bconfigure_007d_007d-95"></a><a name="index-Korn-shell_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-96"></a><a name="index-AIX-shells-and-_0040code_007bconfigure_007d-97"></a>Old versions of the Korn shell may fail to handle the scripts. The Korn
shell may be installed as <samp><span class="file">/bin/sh</span></samp> on AIX, in which case
<samp><span class="file">/bin/bsh</span></samp> may serve instead.
<br><dt><code>ash</code><dd><a name="index-ash_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-98"></a><a name="index-NetBSD-shells-and-_0040code_007bconfigure_007d-99"></a><a name="index-FreeBSD-shells-and-_0040code_007bconfigure_007d-100"></a><a name="index-Linux-shells-and-_0040code_007bconfigure_007d-101"></a>Old versions of ash are unable to handle the scripts. Ash is sometimes
installed as <samp><span class="file">/bin/sh</span></samp> on NetBSD, FreeBSD, and Linux systems.
<samp><span class="file">/bin/bash</span></samp> should be available for those systems, but might not be
part of a default installation.
<br><dt><span class="roman">Ultrix</span><code> /bin/sh</code><dd><a name="index-DEC-shells-and-_0040code_007bconfigure_007d-102"></a><a name="index-Ultrix-shells-and-_0040code_007bconfigure_007d-103"></a><a name="index-sh5_0040r_007b_002c-ok-with-_0040code_007bconfigure_007d_007d-104"></a><samp><span class="file">/bin/sh</span></samp> under Ultrix is a DEC-grown shell that is notably
deficient in many ways. <samp><span class="file">/bin/sh5</span></samp> may be necessary.
</dl>
<div class="node">
<p><hr>
<a name="configure-options"></a>
Next: <a rel="next" accesskey="n" href="#configure-environment">configure environment</a>,
Previous: <a rel="previous" accesskey="p" href="#configure-shells">configure shells</a>,
Up: <a rel="up" accesskey="u" href="#Running-configure">Running configure</a>
</div>
<h5 class="subsubsection">2.2.4.2 <code>configure</code> options</h5>
<p><a name="index-g_t_0040code_007bconfigure_007d-options-105"></a>
For a complete list of all <code>configure</code> options, run `<samp><span class="samp">configure
--help</span></samp>' or see <a href="autoconf.html#Invoking-configure">Running <code>configure</code> scripts</a>, (a copy is in the file <samp><span class="file">kpathsea/README.CONFIGURE</span></samp>).
The generic options are listed first in the `<samp><span class="samp">--help</span></samp>' output, and
the package-specific options come last. The environment variables
<code>configure</code> pays attention to are listed below.
<p>Options particularly likely to be useful are `<samp><span class="samp">--prefix</span></samp>',
`<samp><span class="samp">--datadir</span></samp>', and the like; see <a href="#configure-scenarios">configure scenarios</a>.
<p><a name="index-g_t_002d_002dwith-_0040r_007boptions_007d-106"></a><a name="index-g_t_002d_002denable-_0040r_007boptions_007d-107"></a><a name="index-configuration-of-optional-features-108"></a><a name="index-options-to-_0040code_007bconfigure_007d-109"></a>This section gives pointers to descriptions of the `<samp><span class="samp">--with</span></samp>' and
`<samp><span class="samp">--enable</span></samp>' options to <code>configure</code> that Kpathsea-using programs
accept.
<dl>
<dt>`<samp><span class="samp">--without-mktexmf-default</span></samp>'<dt>`<samp><span class="samp">--without-mktexpk-default</span></samp>'<dt>`<samp><span class="samp">--without-mktextfm-default</span></samp>'<dt>`<samp><span class="samp">--with-mktextex-default</span></samp>'<dd>Enable or disable the dynamic generation programs. See <a href="#mktex-configuration">mktex configuration</a>.
<br><dt>`<samp><span class="samp">--enable-shared</span></samp>'<dd><a name="index-g_t_002d_002denable_002dshared-110"></a>Build Kpathsea as a shared library, and link against it. Also build the
usual static library. See <a href="#Shared-library">Shared library</a>.
<br><dt>`<samp><span class="samp">--disable-static</span></samp>'<dd><a name="index-g_t_002d_002ddisable_002dstatic-111"></a>Build only the shared library. Implies `<samp><span class="samp">--enable-shared</span></samp>'.
<br><dt>`<samp><span class="samp">--enable-maintainer-mode</span></samp>'<dd><a name="index-g_t_002d_002denable_002dmaintainer_002dmode-112"></a>Enables make targets that are useful for the maintainer and likely to be
a pain for anyone else; the makefiles created when this option is
enabled may not work at all for you. You have been warned.
</dl>
<div class="node">
<p><hr>
<a name="configure-environment"></a>
Next: <a rel="next" accesskey="n" href="#configure-scenarios">configure scenarios</a>,
Previous: <a rel="previous" accesskey="p" href="#configure-options">configure options</a>,
Up: <a rel="up" accesskey="u" href="#Running-configure">Running configure</a>
</div>
<h5 class="subsubsection">2.2.4.3 <code>configure</code> environment</h5>
<p><code>configure</code> uses the value of the following environment variables in
determining your system's characteristics, and substitutes for them in
<tt>Makefile</tt>'s:
<dl>
<dt>`<samp><span class="samp">CC</span></samp>'<a name="index-CC-113"></a><dd><a name="index-gcc_0040r_007b_002c-compiling-with_007d-114"></a><a name="index-cc_0040r_007b_002c-compiling-with_007d-115"></a>The compiler to use: default is <code>gcc</code> if it's installed, otherwise
<code>cc</code>.
<br><dt>`<samp><span class="samp">CFLAGS</span></samp>'<a name="index-CFLAGS-116"></a><dd><a name="index-compiler-options_002c-specifying-117"></a>Options to give the compiler: default is `<samp><span class="samp">-g -O2</span></samp>' for <code>gcc</code>,
`<samp><span class="samp">-g</span></samp>' otherwise. <code>CFLAGS</code> comes after any other options. You
may need to include <code>-w</code> here if your compilations commonly have
useless warnings (e.g., <code>NULL redefined</code>), or <code>configure</code> may
fail to detect the presence of header files (it takes the messages on
standard error to mean the header file doesn't exist).
<br><dt>`<samp><span class="samp">CPPFLAGS</span></samp>'<a name="index-CPPFLAGS-118"></a><dd><a name="index-configuration-compiler-options-119"></a>Options to pass to the compiler preprocessor; this matters most for
configuration, not the actual source compilation. The <code>configure</code>
script often does only preprocessing (e.g., to check for the existence
of <tt>#include</tt> files), and <code>CFLAGS</code> is not used for this. You may
need to set this to something like
`<samp><span class="samp">-I/usr/local/include/wwwhatever</span></samp>' if you have the libwww library
installed for hyper-xdvik (see <samp><span class="file">xdvik/INSTALL</span></samp>).
<br><dt>`<samp><span class="samp">DEFS</span></samp>'<a name="index-DEFS-120"></a><dd><a name="index-preprocessor-options-121"></a>Additional preprocessor options, but not used by <code>configure</code>.
Provided for enabling or disabling program features, as documented in
the various program-specific installation instructions. <code>DEFS</code>
comes before any compiler options included by the distribution
<samp><span class="file">Makefile</span></samp>s or by <code>configure</code>.
<br><dt>`<samp><span class="samp">LDFLAGS</span></samp>'<a name="index-LDFLAGS-122"></a><dd><a name="index-loader-options-123"></a>Additional options to give to the loader. <code>LDFLAGS</code> comes before
any other linker options.
<br><dt>`<samp><span class="samp">LIBS</span></samp>'<a name="index-LIBS-124"></a><dd><a name="index-libraries_002c-specifying-additional-125"></a>Additional libraries to link with.
</dl>
<div class="node">
<p><hr>
<a name="configure-scenarios"></a>
Next: <a rel="next" accesskey="n" href="#Shared-library">Shared library</a>,
Previous: <a rel="previous" accesskey="p" href="#configure-environment">configure environment</a>,
Up: <a rel="up" accesskey="u" href="#Running-configure">Running configure</a>
</div>
<h5 class="subsubsection">2.2.4.4 <code>configure</code> scenarios</h5>
<p>Here are some common installation scenarios:
<ul>
<li>Including X support in Metafont. This is disabled by default, since
many sites have no use for it, and it's a leading cause of configuration
problems.
<pre class="example"> configure --with-x
</pre>
<li><a name="index-g_t_0040TeX_007b_007d-hierarchy_002c-one-126"></a>Putting the binaries, TeX files, GNU info files, etc. into a single
TeX hierarchy, say <samp><span class="file">/here/texmf</span></samp>, requires overriding defaults in
<code>configure</code>:
<pre class="example"> configure --prefix=/here/texmf --datadir=/here
</pre>
<li><a name="index-multiple-architectures_002c-compiling-on-127"></a><a name="index-architectures_002c-compiling-multiple-128"></a><a name="index-symbolic-link-trees_002c-for-multiple-architectures-129"></a><a name="index-g_t_002d_002dsrcdir_0040r_007b_002c-for-building-multiple-architectures_007d-130"></a><a name="index-lndir-_0040r_007bfor-building-symlink-trees_007d-131"></a>You can compile on multiple architectures simultaneously either by
building symbolic link trees with the <code>lndir</code> script from the X11
distribution, or with the `<samp><span class="samp">--srcdir</span></samp>' option:
<pre class="example"> configure --srcdir=<var>srcdir</var>
</pre>
<li><a name="index-multiple-architectures_002c-directories-for-132"></a>If you are installing binaries for multiple architectures into a single
hierarchy, you will probably want to override the default <samp><span class="file">bin</span></samp> and
<samp><span class="file">lib</span></samp> directories, something like this:
<pre class="example"> configure --prefix=<var>texmf</var> --datadir=<var>texmf</var> \
--bindir=<var>texmf</var>/<var>arch</var>/bin --libdir=<var>texmf</var>/<var>arch</var>/lib
make texmf=<var>texmf</var>
</pre>
<p><a name="index-depot-133"></a><a name="index-automounter_002c-and-configuration-134"></a>(Unless you make provisions for architecture-specific files in
other ways, e.g., with Depot or an automounter.)
<li><a name="index-g_t_002dO_0040r_007b_002c-compiling-with_007d-135"></a><a name="index-g_t_002dg_0040r_007b_002c-compiling-without_007d-136"></a><a name="index-optimization_002c-enabling-137"></a><a name="index-debugging-with-_0040samp_007b_002dg_007d_002c-disabling-138"></a>To compile with optimization (to compile without debugging, remove the
`<samp><span class="samp">-g</span></samp>'):
<pre class="example"> env CFLAGS="-g -O" sh configure ...
</pre>
<p class="noindent">For a potential problem if you optimize, see <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>.
</ul>
<div class="node">
<p><hr>
<a name="Shared-library"></a>
Previous: <a rel="previous" accesskey="p" href="#configure-scenarios">configure scenarios</a>,
Up: <a rel="up" accesskey="u" href="#Running-configure">Running configure</a>
</div>
<h5 class="subsubsection">2.2.4.5 Shared library</h5>
<p><a name="index-shared-library_002c-making-139"></a>
<a name="index-g_t_002d_002denable_002dshared-140"></a>You can compile Kpathsea as a shared library on a few systems, by
specifying the option `<samp><span class="samp">--enable-shared</span></samp>' when you run
`<samp><span class="samp">configure</span></samp>'.
<p><a name="index-code-sharing-141"></a>The main advantage in doing this is that the executables can then share
the code, thus decreasing memory and disk space requirements.
<p>On some systems, you can record the location of shared libraries in a
binary, usually by giving certain options to the linker. Then
individual users do not need to set their system's environment variable
(e.g., <code>LD_LIBRARY_PATH</code>) to find shared libraries. If you want to
do this, you will need to add the necessary options to <code>LDFLAGS</code>
yourself; for example, on Solaris, include something like
`<samp><span class="samp">-R${prefix}/lib</span></samp>', on IRIX or Linux, use
`<samp><span class="samp">-rpath${prefix}/lib</span></samp>'. (Unfortunately, making this happen by
default is very difficult, because of interactions with an existing
installed shared library.)
<p>Currently, shared library support is implemented only on Linux, SunOS 4
(Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're
interested and willing in adding support for other systems, please see
the `<samp><span class="samp">configure</span></samp>' mode in the <samp><span class="file">klibtool</span></samp> script, especially the
host-specific case statement around line 250.
<div class="node">
<p><hr>
<a name="Running-make"></a>
Next: <a rel="next" accesskey="n" href="#Installing-files">Installing files</a>,
Previous: <a rel="previous" accesskey="p" href="#Running-configure">Running configure</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.5 Running <code>make</code></h4>
<p><a name="index-make_0040r_007b_002c-running_007d-142"></a>
<a name="index-texmf_002ecnf_0040r_007b_002c-creating_007d-143"></a><a name="index-paths_002eh_0040r_007b_002c-creating_007d-144"></a><code>make</code> (still in the top-level directory). This also creates the
<samp><span class="file">texmf.cnf</span></samp> and <samp><span class="file">paths.h</span></samp> files that define the default search
paths, and (by default) the `<samp><span class="samp">plain</span></samp>' and `<samp><span class="samp">latex</span></samp>' TeX formats.
<p><a name="index-fallback-resolutions_002c-overriding-145"></a>You can override directory names and other values at <code>make</code>-time.
<samp><span class="file">make/paths.make</span></samp> lists the variables most commonly reset. For
example, `<samp><span class="samp">make default_texsizes=600</span></samp>' changes the list of fallback
resolutions.
<p>You can also override each of <code>configure</code>'s environment variables
(see <a href="#configure-environment">configure environment</a>). The Make variables have the same names.
<p>Finally, you can supply additional options via the following variables.
(<code>configure</code> does not use these.)
<dl>
<dt>`<samp><span class="samp">XCPPFLAGS</span></samp>'<a name="index-XCPPFLAGS-146"></a><dt>`<samp><span class="samp">XDEFS</span></samp>'<a name="index-XDEFS-147"></a><dd><a name="index-preprocessor-options_002c-additional-148"></a>Preprocessor options.
<br><dt>`<samp><span class="samp">XCFLAGS</span></samp>'<a name="index-XCFLAGS-149"></a><dd><a name="index-compiler-options_002c-additional-150"></a>Compiler options.
<br><dt>`<samp><span class="samp">XLDFLAGS</span></samp>'<a name="index-XLDFLAGS-151"></a><dd><a name="index-loader-options_002c-initial-152"></a>Loader options (included at beginning of link commands).
<br><dt>`<samp><span class="samp">XLOADLIBES</span></samp>'<a name="index-XLOADLIBES-153"></a><dd><a name="index-loader-options_002c-final-154"></a>More loader options (included at end of link commands).
<br><dt>`<samp><span class="samp">XMAKEARGS</span></samp>'<a name="index-XMAKEARGS-155"></a><dd><a name="index-Make-arguments_002c-additional-156"></a>Additional Make arguments passed to all sub-<code>make</code>'s. You may need
to include assignments to the other variables here via <code>XMAKEARGS</code>;
for example: `<samp><span class="samp">make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"</span></samp>'.
</dl>
<p><a name="index-compiler_002c-changing-157"></a><a name="index-libraries_002c-changing-158"></a>It's generally a bad idea to use a different compiler (`<samp><span class="samp">CC</span></samp>') or
libraries (<code>LIBS</code>) for compilation than you did for configuration,
since the values <code>configure</code> determined may then be incorrect.
<p><a name="index-universe_002c-BSD-vs_002e_0040_003a-system-V-159"></a><a name="index-BSD-universe-160"></a><a name="index-system-V-universe-161"></a><a name="index-Solaris-BSD-compatibility_002c-not-162"></a><a name="index-libucb_0040r_007b_002c-avoiding_007d-163"></a><a name="index-ucbinclude_0040r_007b_002c-avoiding_007d-164"></a>Adding compiler options to change the “universe” you are using
(typically BSD vs. system V) is generally a cause of trouble. It's
best to use the native environment, whatever that is; <code>configure</code>
and the software usually adapt best to that. In particular, under
Solaris 2.x, you should not use the BSD-compatibility library
(<samp><span class="file">libucb</span></samp>) or include files (<samp><span class="file">ucbinclude</span></samp>).
<p><a name="index-Babel-165"></a>If you want to use the Babel LaTeX package for support of non-English
typesetting, you need to modify some files before making the LaTeX
format. See the file <samp><span class="file">install.txt</span></samp> in the Babel distribution.
<div class="node">
<p><hr>
<a name="Installing-files"></a>
Next: <a rel="next" accesskey="n" href="#Cleaning-up">Cleaning up</a>,
Previous: <a rel="previous" accesskey="p" href="#Running-make">Running make</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.6 Installing files</h4>
<p><a name="index-installing-files-166"></a>
The basic command is the usual <code>make install</code>. For security
issues, see <a href="#Security">Security</a>.
<p>The first time you install any manual in the GNU Info system, you should
add a line (you choose where) to the file <samp><span class="file">dir</span></samp> in your
`<samp><span class="samp">$(infodir)</span></samp>' directory. Sample text for this is given near the top
of the Texinfo source files (<samp><span class="file">kpathsea/kpathsea.texi</span></samp>,
<samp><span class="file">dvipsk/dvips.texi</span></samp>, and <samp><span class="file">web2c/doc/web2c.texi</span></samp>).
If you have a recent version of the GNU Texinfo distribution installed
(<a href="ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz">ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz</a> or later), this
should happen automatically.
<p>On the offchance that this is your first Info installation, the
<samp><span class="file">dir</span></samp> file I use is included in the distribution as
<samp><span class="file">etc/dir-example</span></samp>.
<p><a name="index-multiple-architectures_002c-installing-on-167"></a><a name="index-architecture_002d_0028in_0029dependent-files_002c-installing-only-168"></a><a name="index-installation_002c-architecture_002d_0028in_0029dependent-files-only-169"></a>You may wish to use one of the following targets, especially if you are
installing on multiple architectures:
<ul>
<li><a name="index-install_002dexec-_0040r_007bMake-target_007d-170"></a><code>make install-exec</code> to install in architecture-dependent
directories, i.e., ones that depend on the <code>$(exec_prefix)</code> Make
variable. This includes links to binaries, libraries, etc., not just
“executables”.
<li><a name="index-install_002ddata-_0040r_007bMake-target_007d-171"></a><code>make install-data</code> to install in architecture-independent
directories, such as documentation, configuration files, pool files, etc.
</ul>
<p><a name="index-AFS-172"></a><a name="index-Andrew-File-System_002c-installing-with-173"></a><a name="index-g_t_002fafs_002f_0040dots_007b_007d-_0040r_007b_002c-installing-into_007d-174"></a>If you use the Andrew File System, the normal path (e.g.,
<var>prefix</var>/bin) only gets you to a read-only copy of the files, and
you must specify a different path for installation. The best way to do this
is by setting the `<samp><span class="samp">prefix</span></samp>' variable on the <code>make</code> command
line. The sequence becomes something like this:
<pre class="example"> configure --prefix=/whatever
make
make install prefix=/afs/.<var>system.name</var>/system/1.3/@sys/whatever
</pre>
<p><a name="index-ls_002dR-_0040r_007band-AFS_007d-175"></a><a name="index-relative-filenames-in-_0040file_007bls_002dR_007d-176"></a>With AFS, you will definitely want to use relative filenames in
<samp><span class="file">ls-R</span></samp> (see <a href="#Filename-database">Filename database</a>), not absolute filenames. This
is done by default, but check anyway.
<div class="node">
<p><hr>
<a name="Cleaning-up"></a>
Next: <a rel="next" accesskey="n" href="#Filename-database-generation">Filename database generation</a>,
Previous: <a rel="previous" accesskey="p" href="#Installing-files">Installing files</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.7 Cleaning up</h4>
<p><a name="index-distclean-_0040r_007bMake-target_007d-177"></a>The basic command is <code>make distclean</code>. This removes all files
created by the build.
<p>Alternatively,
<ul>
<li><a name="index-mostlyclean-_0040r_007bMake-target_007d-178"></a><code>make mostlyclean</code> if you intend to compile on another
architecture. For Web2C, since the generated C files are portable,
they are not removed. If the <code>lex</code> vs. <code>flex</code> situation
is going to be different on the next machine, <code>rm
web2c/lex.yy.c</code>.
<li><a name="index-clean-_0040r_007bMake-target_007d-179"></a><code>make clean</code> to remove files created by compiling, but leave
configuration files and Makefiles.
<li><a name="index-maintainer_002dclean-_0040r_007bMake-target_007d-180"></a><code>make maintainer-clean</code> to remove everything that the Makefiles can
rebuild. This is more than `<samp><span class="samp">distclean</span></samp>' removes, and you should
only use it if you are thoroughly conversant with (and have the necessary
versions of) Autoconf.
<li><a name="index-extraclean-_0040r_007bMake-target_007d-181"></a><code>make extraclean</code> to remove other junk, e.g., core files, log
files, patch rejects. This is independent of the other `<samp><span class="samp">clean</span></samp>'
targets.
</ul>
<div class="node">
<p><hr>
<a name="Filename-database-generation"></a>
Next: <a rel="next" accesskey="n" href="#mktex-scripts">mktex scripts</a>,
Previous: <a rel="previous" accesskey="p" href="#Cleaning-up">Cleaning up</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.8 Filename database generation</h4>
<p><a name="index-filename-database-generation-182"></a><a name="index-generation-of-filename-database-183"></a>
You will probably want to set up a <code>cron</code> entry on the appropriate
machine(s) to rebuild the filename database nightly or so, as in:
<pre class="example"> 0 0 * * * cd <var>texmf</var> && <var>/bindir</var>/mktexlsr
</pre>
<p class="noindent">See <a href="#Filename-database">Filename database</a>.
<p>Although the <code>mktex...</code> scripts make every effort to add
newly-created files on the fly, it can't hurt to make sure you get a
fresh version every so often.
<div class="node">
<p><hr>
<a name="mktex-scripts"></a>
Next: <a rel="next" accesskey="n" href="#Installation-testing">Installation testing</a>,
Previous: <a rel="previous" accesskey="p" href="#Filename-database-generation">Filename database generation</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.9 <samp><span class="file">mktex</span></samp> scripts</h4>
<p><a name="index-g_t_0040file_007bmktex_007d-scripts-184"></a><a name="index-scripts-for-file-creation-185"></a>
<a name="index-font-set_002c-infinite-186"></a><a name="index-dynamic-creation-of-files-187"></a><a name="index-Sauter-fonts_002c-and-dynamic-source-creation-188"></a><a name="index-EC-fonts_002c-and-dynamic-source-creation-189"></a>If Kpathsea cannot otherwise find a file, for some file types it is
configured by default to invoke an external program to create it
dynamically (see <a href="#mktex-configuration">mktex configuration</a>). This is most useful for
fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as
the Sauter and EC fonts), since any given document can use fonts never
before referenced. Trying to build all fonts in advance is therefore
impractical, if not impossible.
<p>The script is passed the name of the file to create and possibly other
arguments, as explained below. It must echo the full pathname of the
file it created (and nothing else) to standard output; it can write
diagnostics to standard error.
<ul class="menu">
<li><a accesskey="1" href="#mktex-configuration">mktex configuration</a>
<li><a accesskey="2" href="#mktex-script-names">mktex script names</a>
<li><a accesskey="3" href="#mktex-script-arguments">mktex script arguments</a>
</ul>
<div class="node">
<p><hr>
<a name="mktex-configuration"></a>
Next: <a rel="next" accesskey="n" href="#mktex-script-names">mktex script names</a>,
Up: <a rel="up" accesskey="u" href="#mktex-scripts">mktex scripts</a>
</div>
<h5 class="subsubsection">2.2.9.1 <samp><span class="file">mktex</span></samp> configuration</h5>
<p><a name="index-g_t_0040file_007bmktex_007d-script-configuration-190"></a><a name="index-configuration-of-_0040file_007bmktex_007d-scripts-191"></a><a name="index-enabling-_0040file_007bmktex_007d-scripts-192"></a><a name="index-disabling-_0040file_007bmktex_007d-scripts-193"></a>
The following file types can run an external program to create missing
files: <samp><span class="file">pk</span></samp>, <samp><span class="file">tfm</span></samp>, <samp><span class="file">mf</span></samp>, <samp><span class="file">tex</span></samp>; the scripts are
named <samp><span class="file">mktexpk</span></samp>, <samp><span class="file">mktextfm</span></samp>, <samp><span class="file">mktexmf</span></samp>, and
<samp><span class="file">mktextex</span></samp>.
<p>In the absence of <code>configure</code> options specifying otherwise,
everything but <samp><span class="file">mktextex</span></samp> will be enabled by default. The
<code>configure</code> options to change the defaults are:
<p><a name="index-g_t_0040code_007bconfigure_007d-options-for-_0040file_007bmktex_007d-scripts-194"></a><a name="index-g_t_002d_002dwithout_002dmktexmf_002ddefault-195"></a><a name="index-g_t_002d_002dwithout_002dmktexpk_002ddefault-196"></a><a name="index-g_t_002d_002dwithout_002dmktextfm_002ddefault-197"></a><a name="index-g_t_002d_002dwith_002dmktextex_002ddefault-198"></a>
<pre class="example"> --without-mktexmf-default
--without-mktexpk-default
--without-mktextfm-default
--with-mktextex-default
</pre>
<p>The <code>configure</code> setting is overridden if the environment variable
or configuration file value named for the script is set; e.g.,
<samp><span class="file">MKTEXPK</span></samp> (see <a href="#mktex-script-arguments">mktex script arguments</a>).
<p><a name="index-mktex_002ecnf-199"></a><a name="index-site-overrides-for-_0040code_007bmktex_0040dots_007b_007d_007d-200"></a>As distributed, all the scripts source a file
<samp><span class="file">texmf/web2c/mktex.cnf</span></samp> if it exists, so you can override
various defaults. See <samp><span class="file">mktex.opt</span></samp>, for instance, which defines
the default mode, resolution, some special directory names, etc. If you
prefer not to change the distributed scripts, you can simply create
<samp><span class="file">mktex.cnf</span></samp> with the appropriate definitions (you do not need to
create it if you have nothing to put in it). <samp><span class="file">mktex.cnf</span></samp> has no
special syntax; it's an arbitrary Bourne shell script. The distribution
contains a sample <samp><span class="file">mktex.cnf</span></samp> for you to copy and modify as you
please (it is not installed anywhere).
<p><a name="index-mktex_002eopt-201"></a><a name="index-MT_005fFEATURES-202"></a>In addition, you can configure a number of features with the
<code>MT_FEATURES</code> variable, which you can define:
<ul>
<li>in <samp><span class="file">mktex.opt</span></samp>, as just mentioned;
<li>by editing the file <samp><span class="file">mktex.opt</span></samp>, either before `<samp><span class="samp">make
install</span></samp>' (in the source hierarchy) or after (in the installed
hierarchy);
<li>or in the environment.
</ul>
<p>If none of the options below are enabled, <code>mktexpk</code>,
<code>mktextfm</code>, and <code>mktexmf</code> follow the following procedure to
decide where fonts should be installed. Find the tree where the font's
sources are, and test the permissions of the `<samp><span class="samp">fonts</span></samp>' directory of
that tree to determine whether it is writable. If it is, put the files
in the tree in appropriate locations. If it isn't writable, see whether
the tree is a system tree (named in <code>SYSTEXMF</code>). If so, the
<code>VARTEXFONTS</code> tree is used. In all other cases the working
directory is used.
<p>The `<samp><span class="samp">appendonlydir</span></samp>' option is enabled by default.
<dl>
<dt>`<samp><span class="samp">appendonlydir</span></samp>'<a name="index-appendonlydir-203"></a><dd><a name="index-directories_002c-making-append_002donly-204"></a><a name="index-mktexdir-205"></a>Tell <code>mktexdir</code> to create directories append-only, i.e., set
their sticky bit (see <a href="coreutils.html#Mode-Structure">Mode Structure</a>). This feature is silently ignored on non-Unix platforms
(e.g. Windows/NT and MS-DOS) which don't support similar functionality.
This feature is enabled by default.
<br><dt>`<samp><span class="samp">dosnames</span></samp>'<a name="index-dosnames-206"></a><dd><a name="index-g_t8_002e3-filenames_002c-using-207"></a><a name="index-DOS-compatible-names-208"></a><a name="index-dpi_0040var_007bnnn_007d-directories-209"></a>Use 8.3 names; e.g., <samp><span class="file">dpi600/cmr10.pk</span></samp> instead of
<samp><span class="file">cmr10.600pk</span></samp>. Note that this feature only affects filenames that
would otherwise clash with other TeX-related filenames; <samp><span class="file">mktex</span></samp>
scripts do nothing about filenames which exceed the 8+3 MS-DOS limits
but remain unique when truncated (by the OS) to these limits, and nether
do the scripts care about possible clashes with files which aren't
related with TeX. For example, <samp><span class="file">cmr10.600pk</span></samp> would clash with
<samp><span class="file">cmr10.600gf</span></samp> and is therefore changed when `<samp><span class="samp">dosnames</span></samp>' is in
effect, but <samp><span class="file">mf.pool</span></samp> and <samp><span class="file">mp.base</span></samp> don't clash with any
TeX-related files and are therefore unchanged.
<p>This feature is turned on by default on MS-DOS. If you do not wish
`<samp><span class="samp">dosnames</span></samp>' to be set on an MS-DOS platform, you need to set the
<code>MT_FEATURES</code> environment variable to a value that doesn't include
`<samp><span class="samp">dosnames</span></samp>'. You can also change the default setting by editing
<samp><span class="file">mktex.opt</span></samp>, but only if you use the <samp><span class="file">mktex</span></samp> shell scripts;
the emulation programs don't consult <samp><span class="file">mktex.opt</span></samp>.
<br><dt>`<samp><span class="samp">fontmaps</span></samp>'<a name="index-fontmaps-210"></a><dd><a name="index-fontmaps-211"></a><a name="index-fontname-212"></a>Instead of deriving the location of a font in the destination tree from
the location of the sources, the aliases and directory names from the
Fontname distribution are used. (see <a href="fontname.html#Top">Introduction</a>).
<br><dt>`<samp><span class="samp">nomfdrivers</span></samp>'<a name="index-nomfdrivers-213"></a><dd><a name="index-metafont-driver-files-214"></a>Let mktexpk and mktextfm create metafont driver files in a temporary
directory. These will be used for just one metafont run and not
installed permanently.
<br><dt>`<samp><span class="samp">nomode</span></samp>'<a name="index-nomode-215"></a><dd><a name="index-mode-directory_002c-omitting-216"></a>Omit the directory level for the mode name; this is fine as long as
you generate fonts for only one mode.
<br><dt>`<samp><span class="samp">stripsupplier</span></samp>'<a name="index-stripsupplier-217"></a><dd><a name="index-supplier-directory_002c-omitting-218"></a>Omit the font supplier name directory level.
<br><dt>`<samp><span class="samp">striptypeface</span></samp>'<a name="index-striptypeface-219"></a><dd><a name="index-typeface-directory_002c-omitting-220"></a>Omit the font typeface name directory level.
<br><dt>`<samp><span class="samp">strip</span></samp>'<a name="index-strip-221"></a><dd><a name="index-supplier-directory_002c-omitting-222"></a><a name="index-typeface-directory_002c-omitting-223"></a>Omit the font supplier and typeface name directory levels. This feature
is deprecated in favour of `<samp><span class="samp">stripsupplier</span></samp>' and `<samp><span class="samp">striptypeface</span></samp>'.
<br><dt>`<samp><span class="samp">varfonts</span></samp>'<a name="index-varfonts-224"></a><dd><a name="index-g_t_002fvar_002ftmp_002ftexfonts-225"></a><a name="index-VARTEXFONTS-226"></a><a name="index-Linux-File-System-Standard-227"></a>When this option is enabled, fonts that would otherwise be written in
system texmf tree go to the <code>VARTEXFONTS</code> tree instead. The
default value in <samp><span class="file">kpathsea/Makefile.in</span></samp> is
<samp><span class="file">/var/tmp/texfonts</span></samp>. The <cite>Linux File System Standard</cite>
recommends <samp><span class="file">/var/tex/fonts</span></samp>.
<p><a name="index-USE_005fVARTEXFONTS-228"></a>The `<samp><span class="samp">varfonts</span></samp>' setting in <code>MT_FEATURES</code> is overridden by the
<code>USE_VARTEXFONTS</code> environment variable: if set to `<samp><span class="samp">1</span></samp>', the
feature is enabled, and if set to `<samp><span class="samp">0</span></samp>', the feature is disabled.
<br><dt>`<samp><span class="samp">texmfvar</span></samp>'<a name="index-texmfvar-229"></a><dd><a name="index-TEXMFVAR-230"></a>Force generated files that would go into a system tree (as defined by
<code>SYSTEXMF</code>) into <code>TEXMFVAR</code>. Starting with teTeX-3.0, the
variable <code>TEXMFVAR</code> is always set. The `<samp><span class="samp">varfonts</span></samp>' feature takes
precedence if also set.
<p><a name="index-USE_005fTEXMFVAR-231"></a>The `<samp><span class="samp">texmfvar</span></samp>' setting in <code>MT_FEATURES</code> is overridden by the
<code>USE_TEXMFVAR</code> environment variable: if set to `<samp><span class="samp">1</span></samp>', the
feature is enabled, and if set to `<samp><span class="samp">0</span></samp>', the feature is disabled.
</dl>
<div class="node">
<p><hr>
<a name="mktex-script-names"></a>
Next: <a rel="next" accesskey="n" href="#mktex-script-arguments">mktex script arguments</a>,
Previous: <a rel="previous" accesskey="p" href="#mktex-configuration">mktex configuration</a>,
Up: <a rel="up" accesskey="u" href="#mktex-scripts">mktex scripts</a>
</div>
<h5 class="subsubsection">2.2.9.2 <samp><span class="file">mktex</span></samp> script names</h5>
<p><a name="index-g_t_0040file_007bmktex_007d-script-names-232"></a><a name="index-names-for-_0040file_007bmktex_007d-scripts-233"></a>
<a name="index-tex_002dmake_002ec-234"></a><a name="index-kpse_005fmake_005fspecs-235"></a>The following table shows the default name of the script for each
possible file types. (The source is the variable <code>kpse_make_specs</code>
in <samp><span class="file">kpathsea/tex-make.c</span></samp>.)
<dl>
<dt><samp><span class="file">mktexpk</span></samp><dd><a name="index-mktexpk-236"></a>Glyph fonts.
<br><dt><samp><span class="file">mktextex</span></samp><dd><a name="index-mktextex-237"></a>TeX input files.
<br><dt><samp><span class="file">mktexmf</span></samp><dd><a name="index-mktexmf-238"></a>Metafont input files.
<br><dt><samp><span class="file">mktextfm</span></samp><dd><a name="index-mktextfm-239"></a>TFM files.
</dl>
<p><a name="index-DVIPSMAKEPK-240"></a><a name="index-XDVIMAKEPK-241"></a><a name="index-DVILJMAKEPK-242"></a>These names are overridden by an environment variable specific
to the program—for example, <code>DVIPSMAKEPK</code> for Dvipsk.
<!-- next two paragraphs are repeated in dvips.texi -->
<p><a name="index-missfont_002elog-243"></a><a name="index-failed-_0040code_007bmktex_0040dots_007b_007d_007d-script-invocation-244"></a>If a <code>mktex...</code> script fails, the invocation is appended to a
file <samp><span class="file">missfont.log</span></samp> (by default) in the current directory. You can
then execute the log file to create the missing files after fixing the
problem.
<p><a name="index-TEXMFOUTPUT-245"></a><a name="index-MISSFONT_005fLOG-246"></a>If the current directory is not writable and the environment variable or
configuration file value <code>TEXMFOUTPUT</code> is set, its value is
used. Otherwise, nothing is written. The name `<samp><span class="samp">missfont.log</span></samp>' is
overridden by the <code>MISSFONT_LOG</code> environment variable or
configuration file value.
<div class="node">
<p><hr>
<a name="mktex-script-arguments"></a>
Previous: <a rel="previous" accesskey="p" href="#mktex-script-names">mktex script names</a>,
Up: <a rel="up" accesskey="u" href="#mktex-scripts">mktex scripts</a>
</div>
<h5 class="subsubsection">2.2.9.3 <samp><span class="file">mktex</span></samp> script arguments</h5>
<p><a name="index-arguments-to-_0040file_007bmktex_007d-247"></a>
The first argument to a <samp><span class="file">mktex</span></samp> script is always the name
of the file to be created.
<p>In the default <samp><span class="file">mktexpk</span></samp> implementation, additional arguments may
also be passed:
<dl>
<dt>`<samp><span class="samp">--dpi </span><var>num</var></samp>'<dd>Sets the resolution of the generated font to <var>num</var>.
<br><dt>`<samp><span class="samp">--mfmode </span><var>name</var></samp>'<dd>Sets the Metafont mode to <var>name</var>.
<br><dt>`<samp><span class="samp">--bdpi </span><var>num</var></samp>'<dd>Sets the the “base dpi” for the font. This must match the mode being
used.
<br><dt>`<samp><span class="samp">--mag </span><var>string</var></samp>'<dd>A “magstep” string suitable for the Metafont <code>mag</code> variable.
This must match the combination of <var>bdpi</var> and <var>dpi</var> being used.
<br><dt>`<samp><span class="samp">--destdir </span><var>string</var></samp>'<dd>A directory name. If the directory is absolute, it is used as-is.
Otherwise, it is appended to the root destination directory set in the
script.
</dl>
<!-- The feature mentioned here doesn't seem to be implemented. -->
<!-- Worse, the variable name clashed with the "switch" used to select -->
<!-- whether a mktex program is run at all. However, a dearth of -->
<!-- complains suggests that no-one was using it anyway. -->
<!-- @vindex MKTEXPK @r{environment variable} -->
<!-- @cindex specification for @code{mktexpk} -->
<!-- You can change the specification for the arguments passed to the -->
<!-- external script by setting the environment variable named as the script -->
<!-- name, but all capitals-@code{MKTEXPK}, for example. If you've -->
<!-- changed the script name by setting (say) @code{DVIPSMAKEPK} to -->
<!-- @samp{foo}, then the spec is taken from the environment variable -->
<!-- @code{FOO}. -->
<!-- The spec can contain any variable references, to the above variables or -->
<!-- any others. As an example, the default spec for @code{mktexpk} is: -->
<!-- @example -->
<!-- $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE -->
<!-- @end example -->
<!-- @noindent The convention of passing the name of the file to be created -->
<!-- as the first argument cannot be changed. -->
<div class="node">
<p><hr>
<a name="Installation-testing"></a>
Previous: <a rel="previous" accesskey="p" href="#mktex-scripts">mktex scripts</a>,
Up: <a rel="up" accesskey="u" href="#Custom-installation">Custom installation</a>
</div>
<h4 class="subsection">2.2.10 Installation testing</h4>
<p><a name="index-testing_002c-post_002dinstallation-248"></a><a name="index-installation-testing-249"></a>
Besides the tests listed in <a href="#Simple-installation">Simple installation</a>, you can try
running `<samp><span class="samp">make check</span></samp>'. This includes the torture tests (trip, trap,
and mptrap) that come with Web2c (see <a href="web2c.html#Triptrap">Triptrap</a>).
<div class="node">
<p><hr>
<a name="Security"></a>
Next: <a rel="next" accesskey="n" href="#TeX-directory-structure">TeX directory structure</a>,
Previous: <a rel="previous" accesskey="p" href="#Custom-installation">Custom installation</a>,
Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
</div>
<h3 class="section">2.3 Security</h3>
<p><a name="index-security-considerations-250"></a>
None of the programs in the TeX system require any special system
privileges, so there's no first-level security concern of people gaining
illegitimate root access.
<p><a name="index-trojan-horse-attack-251"></a><a name="index-g_t_002erhosts_0040r_007b_002c-writable-by-_0040TeX_007b_007d_007d-252"></a>A TeX document, however, can write to arbitrary files, e.g.,
<samp><span class="file">~/.rhosts</span></samp>, and thus an unwitting user who runs TeX on a random
document is vulnerable to a trojan horse attack. This loophole is
closed by default, but you can be permissive if you so desire in
<samp><span class="file">texmf.cnf</span></samp>. See <a href="web2c.html#tex-invocation">tex invocation</a>. MetaPost has
the same issue.
<p>Dvips, Xdvi, and TeX can also execute shell commands under some
circumstances. To disable this, see the `<samp><span class="samp">-R</span></samp>' option in <a href="dvips.html#Option-details">Option details</a>, the xdvi man page, and <a href="web2c.html#tex-invocation">tex invocation</a>, respectively.
<p><a name="index-local-cache-of-fonts-253"></a><a name="index-cache-of-fonts_002c-local-254"></a>Another security issue arises because it's very useful—almost
necessary—to make arbitrary fonts on user demand with <code>mktexpk</code>
and friends. Where do these files get installed? By default, the
<code>mktexpk</code> distributed with Kpathsea assumes a world-writable
<samp><span class="file">/var/tmp</span></samp> directory; this is a simple and convenient approach, but
it may not suit your situation because it means that a local cache of
fonts is created on every machine.
<p><a name="index-globally-writable-directories-255"></a>To avoid this duplication, many people consider a shared, globally
writable font tree desirable, in spite of the potential security
problems. To do this you should change the value of <code>VARTEXFONTS</code>
in <samp><span class="file">texmf.cnf</span></samp> to refer to some globally known directory.
See <a href="#mktex-configuration">mktex configuration</a>.
<p><a name="index-append_002donly-directories-and-_0040code_007bmktexpk_007d-256"></a>The first restriction you can apply is to make newly-created directories
under <samp><span class="file">texmf</span></samp> be append-only with an option in <samp><span class="file">mktex.cnf</span></samp>.
See <a href="#mktex-configuration">mktex configuration</a>.
<p><a name="index-group_002dwritable-directories-257"></a><a name="index-setgid-scripts-258"></a>Another approach is to establish a group (or user) for TeX files,
make the <samp><span class="file">texmf</span></samp> tree writable only to that group (or user), and
make <code>mktexpk</code> et al. setgid to that group (or setuid to that
user). Then users must invoke the scripts to install things. (If
you're worried about the inevitable security holes in scripts, then you
could write a C wrapper to exec the script.)
<p><a name="index-file-permissions-259"></a><a name="index-permissions_002c-file-260"></a>The <samp><span class="file">mktex...</span></samp> scripts install files with the same read and
write permissions as the directory they are installed in. The
executable, sgid, suid, and sticky bits are always cleared.
<p><a name="index-directory-permissions-261"></a><a name="index-permissions_002c-directory-262"></a>Any directories created by the <samp><span class="file">mktex...</span></samp> scripts have the
same permissions as their parent directory, unless the
<code>appendonlydir</code> feature is used, in which case the sticky bit is
always set.
<div class="node">
<p><hr>
<a name="TeX-directory-structure"></a>
Next: <a rel="next" accesskey="n" href="#unixtex_002eftp">unixtex.ftp</a>,
Previous: <a rel="previous" accesskey="p" href="#Security">Security</a>,
Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
</div>
<h3 class="section">2.4 TeX directory structure</h3>
<p><a name="index-TEXMF-263"></a><a name="index-g_t_0040TeX_007b_007d-directory-structure-264"></a><a name="index-directory-structure_002c-for-_0040TeX_007b_007d-files-265"></a><a name="index-skeleton-_0040TeX_007b_007d-directory-266"></a><a name="index-TDS-267"></a>
This section describes the default installation hierarchy of the
distribution. It conforms to both the GNU coding standards and the
TeX directory structure (TDS) standard. For rationale and further
explanation, please see those documents. The GNU standard is available
as <a href="ftp://prep.ai.mit.edu/pub/gnu/standards/standards.texi">ftp://prep.ai.mit.edu/pub/gnu/standards/standards.texi</a> and
mirrors. The TDS document is available from
<samp><var>CTAN:</var><span class="file">/tex-archive/tds</span></samp> (see <a href="#unixtex_002eftp">unixtex.ftp</a>).
<p>You can change the default paths in many ways (see <a href="#Changing-search-paths">Changing search paths</a>). One common desire is to put everything (binaries and all)
under a single top-level directory such as <samp><span class="file">/usr/local/texmf</span></samp> or
<samp><span class="file">/opt/texmf</span></samp>—in the terms used below, make <var>prefix</var> and
<var>texmf</var> the same. For specific instructions on doing that,
see <a href="#configure-scenarios">configure scenarios</a>.
<p>Here is a skeleton of the default directory structure, extracted from
the TDS document:
<pre class="example"> <var>prefix</var>/ <span class="roman">installation root (<samp>/usr/local</samp> by default)</span>
bin/ <span class="roman">executables</span>
man/ <span class="roman">man pages</span>
include/ <span class="roman">C header files</span>
info/ <span class="roman">GNU info files</span>
lib/ <span class="roman">libraries (<samp>libkpathsea.*</samp>)</span>
share/ <span class="roman">architecture-independent files</span>
texmf/ <span class="roman">TDS root</span>
bibtex/ <span class="roman">BibTeX input files</span>
bib/ <span class="roman">BibTeX databases</span>
base/ <span class="roman">base distribution (e.g., `<samp>xampl.bib</samp>')</span>
misc/ <span class="roman">single-file databases</span>
<var>pkg</var>/ <span class="roman">name of a package</span>
bst/ <span class="roman">BibTeX style files</span>
base/ <span class="roman">base distribution (e.g., `<samp>plain.bst</samp>', `<samp>acm.bst</samp>')</span>
misc/ <span class="roman">single-file styles</span>
<var>pkg</var>/ <span class="roman">name of a package</span>
doc/ <span class="roman">additional documentation</span>
dvips/ <span class="roman">`<samp>.pro</samp>', `<samp>.ps</samp>', `<samp>psfonts.map</samp>'</span>
fonts/ <span class="roman">font-related files</span>
<var>type</var>/ <span class="roman">file type (e.g., `<samp>tfm</samp>', `<samp>pk</samp>')</span>
<var>mode</var>/ <span class="roman">type of output device (types `<samp>pk</samp>' and `<samp>gf</samp>' only)</span>
<var>supplier</var>/ <span class="roman">name of a font supplier (e.g., `<samp>public</samp>')</span>
<var>typeface</var>/ <span class="roman">name of a typeface (e.g., `<samp>cm</samp>')</span>
dpi<var>nnn</var>/ <span class="roman">font resolution (types `<samp>pk</samp>' and `<samp>gf</samp>' only)</span>
metafont/ <span class="roman">Metafont (non-font) input files</span>
base/ <span class="roman">base distribution (e.g., `<samp>plain.mf</samp>')</span>
misc/ <span class="roman">single-file packages (e.g., `<samp>modes.mf</samp>')</span>
<var>pkg</var>/ <span class="roman">name of a package (e.g., `<samp>mfpic</samp>')</span>
metapost/ <span class="roman">MetaPost input files</span>
base/ <span class="roman">base distribution (e.g., `<samp>plain.mp</samp>')</span>
misc/ <span class="roman">single-file packages</span>
<var>pkg</var>/ <span class="roman">name of a package</span>
support/ <span class="roman">support files for MetaPost-related utilities (e.g., `<samp>trfonts.map</samp>')</span>
mft/ <span class="roman">`<samp>MFT</samp>' inputs (e.g., `<samp>plain.mft</samp>')</span>
tex/ <span class="roman">TeX input files</span>
<var>format</var>/ <span class="roman">name of a format (e.g., `<samp>plain</samp>')</span>
base/ <span class="roman">base distribution for </span><var>format</var><span class="roman"> (e.g., `<samp>plain.tex</samp>')</span>
misc/ <span class="roman">single-file packages (e.g., `<samp>webmac.tex</samp>')</span>
local/ <span class="roman">local additions to or local configuration files for </span><var>format</var>
<var>pkg</var>/ <span class="roman">name of a package (e.g., `<samp>graphics</samp>', `<samp>mfnfss</samp>')</span>
generic/ <span class="roman">format-independent packages</span>
hyphen/ <span class="roman">hyphenation patterns (e.g., `<samp>hyphen.tex</samp>')</span>
images/ <span class="roman">image input files (e.g., Encapsulated PostScript)</span>
misc/ <span class="roman">single-file format-independent packages (e.g., `<samp>null.tex</samp>').</span>
<var>pkg</var>/ <span class="roman">name of a package (e.g., `<samp>babel</samp>')</span>
web2c/ <span class="roman">implementation-dependent files (<samp>.pool</samp>, <samp>.fmt</samp>, <samp>texmf.cnf</samp>, etc.)</span>
</pre>
<p>Some concrete examples for most file types:
<pre class="example"> /usr/local/bin/tex
/usr/local/man/man1/xdvi.1
/usr/local/info/kpathsea.info
/usr/local/lib/libkpathsea.a
/usr/local/share/texmf/bibtex/bst/base/plain.bst
/usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
/usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf
/usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm
/usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa
/usr/local/share/texmf/metafont/base/plain.mf
/usr/local/share/texmf/metapost/base/plain.mp
/usr/local/share/texmf/tex/plain/base/plain.tex
/usr/local/share/texmf/tex/generic/hyphen/hyphen.tex
/usr/local/share/texmf/web2c/tex.pool
/usr/local/share/texmf/web2c/tex.fmt
/usr/local/share/texmf/web2c/texmf.cnf
</pre>
<div class="node">
<p><hr>
<a name="unixtex.ftp"></a>
<a name="unixtex_002eftp"></a>
Next: <a rel="next" accesskey="n" href="#Reporting-bugs">Reporting bugs</a>,
Previous: <a rel="previous" accesskey="p" href="#TeX-directory-structure">TeX directory structure</a>,
Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
</div>
<h3 class="section">2.5 <samp><span class="file">unixtex.ftp</span></samp>: Obtaining TeX</h3>
<p><a name="index-obtaining-_0040TeX_007b_007d-268"></a><a name="index-retrieving-_0040TeX_007b_007d-269"></a>
<a name="index-unixtex_002eftp-270"></a><a name="index-tug_002eorg-271"></a><a name="index-www_002etug_002eorg-272"></a><a name="index-ftp_002etug_002eorg-273"></a>This
is <a href="ftp://ftp.tug.org/tex/unixtex.ftp">ftp://ftp.tug.org/tex/unixtex.ftp</a>, last updated 26 December
2003. Also available as <a href="http://www.tug.org/unixtex.ftp">http://www.tug.org/unixtex.ftp</a>. The
IP address is currently <code>[130.225.2.178]</code>. It is also in
Kpathsea source distributions as <samp><span class="file">etc/unixtex.ftp</span></samp> (although the
network version is usually newer). Mail <a href="mailto:tex-k@mail.tug.org">tex-k@mail.tug.org</a>
with comments or questions.
<p>Following are general instructions for Unix or other sites who wish to
acquire the Web2c distribution, (plain) TeX, LaTeX (2e),
BibTeX, Metafont, MetaPost, DVI processors for the X window system,
PostScript, the PCL language in the HP LaserJet, and related programs.
They are oriented towards building from the original sources, though
some information on alternative packages is included in the last
section. See also <a href="http://www.tug.org/web2c/">http://www.tug.org/web2c/</a>, the Web2c and
Kpathsea home page.
<p>Please note that the Web2c distribution is a bare-bones distribution
in source form, and building a complete installation from it is a
non-trivial matter. For most uses, it is a better idea to install a
distribution with pre-packaged binaries for your platform. The
principal example of such a distribution is TeX Live
(<a href="http://www.tug.org/texlive/">http://www.tug.org/texlive/</a>), which is based on the
Web2c sources.
<p>Please consider joining the TeX Users Group (TUG) or another user
group of your choice to help support the maintenance and development
of the programs you retrieve. See <a href="http://www.tug.org/join.html">http://www.tug.org/join.html</a>
for information and the membership registration form, and
<a href="http://www.tug.org/usergroups.html">http://www.tug.org/usergroups.html</a> for a listing of all user groups.
<p>For actual installation instructions after obtaining the necessary
sources, see <a href="#Installation">Installation</a>. A copy is in the distribution file
<samp><span class="file">kpathsea/INSTALL</span></samp>.
<ul class="menu">
<li><a accesskey="1" href="#Electronic-distribution">Electronic distribution</a>: CTAN and so forth.
<li><a accesskey="2" href="#CD_002dROM-distribution">CD-ROM distribution</a>
<li><a accesskey="3" href="#Other-TeX-packages">Other TeX packages</a>
</ul>
<!-- * Tape distribution:: -->
<!-- used to be in this menu. -->
<div class="node">
<p><hr>
<a name="Electronic-distribution"></a>
Next: <a rel="next" accesskey="n" href="#CD_002dROM-distribution">CD-ROM distribution</a>,
Up: <a rel="up" accesskey="u" href="#unixtex_002eftp">unixtex.ftp</a>
</div>
<h4 class="subsection">2.5.1 Electronic distribution</h4>
<p><a name="index-ftp-retrieval-274"></a><a name="index-obtaining-Web2c-by-ftp-275"></a><a name="index-distributions_002c-via-ftp-276"></a>
<a name="index-CTAN_002c-defined-277"></a><a name="index-backbone-of-CTAN-278"></a>In many places we refer to <var>CTAN:</var>. This is <em>both</em> a host name
and a directory name. Here are the primary locations:
<pre class="example"> <a href="ftp://ctan.tug.org/tex-archive/">ftp://ctan.tug.org/tex-archive/</a> <span class="roman">(Vermont, USA)</span>
<a href="ftp://ftp.dante.de/tex-archive/">ftp://ftp.dante.de/tex-archive/</a> <span class="roman">(Germany)</span>
<a href="ftp://ftp.tex.ac.uk/tex-archive/">ftp://ftp.tex.ac.uk/tex-archive/</a> <span class="roman">(England)</span>
</pre>
<p class="noindent"><a name="index-README_002emirrors-279"></a><a name="index-CTAN_002esites-280"></a><a name="index-mirrors_002c-FTP-281"></a>CTAN has many mirrors worldwide; see the top-level file
<samp><span class="file">README.mirrors</span></samp> from one of the sites above or see
<a href="http://www.tug.org/CTAN.sites">http://www.tug.org/CTAN.sites</a>.
<p><a name="index-World-Wide-Web-CTAN-access-282"></a><a name="index-email-CTAN-access-283"></a><a name="index-NFS-CTAN-access-284"></a>You can also access CTAN via the World Wide Web, electronic
mail, or NFS. The same <samp><span class="file">README.mirrors</span></samp> file explains how.
<p><a name="index-binary-mode_002c-for-file-transfers-285"></a>You will need to retrieve some or all of the following archives,
depending on your needs (don't forget to set binary mode for file
transfers):
<dl>
<dt><samp><var>CTAN:</var><span class="file">/systems/web2c/web.tar.gz</span></samp><dd><a name="index-Knuth_002c-Donald-E_002e_002c-original-author-286"></a>The original WEB source files, written primarily by Don Knuth. Required
unless you already have this <samp><span class="file">web</span></samp> version. (The WEB sources
change irregularly with respect to Web2c itself.) Unpacks into
<samp><span class="file">web2c-</span><var>version</var></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/web2c.tar.gz</span></samp><dd>The Web2c system. Required. Also unpacks into
<samp><span class="file">web2c-</span><var>version</var></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/web2c-etex.tar.gz</span></samp><dd>Additions to the Web2c system for building e-TeX. Optional. Unpacks
into <samp><span class="file">web2c-</span><var>version</var></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/etexlib.tar.gz</span></samp><dd>Additions to the texmf tree needed to build e-TeX. Optional.
Unpacks into <samp><span class="file">texmf/</span></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/etexdoc.tar.gz</span></samp><dd>Documentation for e-TeX as an addition to the texmf tree. Optional.
Unpacks into <samp><span class="file">texmf/</span></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/web2c-omega.tar.gz</span></samp><dd>Additions to the Web2c system for building Omega. Optional. Unpacks
into <samp><span class="file">web2c-</span><var>version</var></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/omegalib.tar.gz</span></samp><dd>Additions to the texmf tree needed to build Omega. Optional. Unpacks
into <samp><span class="file">texmf/</span></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/omegadoc.tar.gz</span></samp><dd>Documentation for Omega as an addition to the texmf tree. Optional.
Unpacks into <samp><span class="file">texmf/</span></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/web2c-pdftex.tar.gz</span></samp><dd>Additions to the Web2c system for building pdfTeX. Optional.
Unpacks into <samp><span class="file">web2c-</span><var>version</var></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/systems/web2c/pdftexlib.tar.gz</span></samp><dd>Additions to the texmf tree needed to build pdfTeX. Optional.
Unpacks into <samp><span class="file">texmf/</span></samp>.
<br><dt><samp><var>CTAN:</var><span class="file">/dviware/xdvik/xdvik.tar.gz</span></samp><dd>X window system DVI previewer. Unpacks into <samp><span class="file">xdvik-</span><var>version</var></samp>.
Optional.
</dl>
<p>Additional drivers, macro files, and other support are needed to build
a working system. These are available in teTeX.
<p>All that said, the originating host for the software above is
<samp><span class="file">ftp.tug.org</span></samp>. You can retrieve these distributions (but not much
else) from the <samp><span class="file">tex/</span></samp> directory on that host.
<div class="node">
<p><hr>
<a name="CD-ROM-distribution"></a>
<a name="CD_002dROM-distribution"></a>
Next: <a rel="next" accesskey="n" href="#Other-TeX-packages">Other TeX packages</a>,
Previous: <a rel="previous" accesskey="p" href="#Electronic-distribution">Electronic distribution</a>,
Up: <a rel="up" accesskey="u" href="#unixtex_002eftp">unixtex.ftp</a>
</div>
<h4 class="subsection">2.5.2 CD-ROM distribution</h4>
<p><a name="index-CD_002dROM-distributions-287"></a><a name="index-obtaining-Web2c-on-CD_002dROM-288"></a><a name="index-distributions_002c-on-CD_002dROM-289"></a>
Numerous organizations distribute various TeX CD-ROM's (and DVD's):
<ul>
<li><a name="index-g_t_0040TeX_007b_007d-Live-CD_002dROM-290"></a>Virtually all the TeX user groups collaborate to produce the
<cite>TeX Live</cite> distribution once a year; see
<a href="http://www.tug.org/texlive/">http://www.tug.org/texlive/</a> for more information.
<li><a name="index-Free-Software-Foundation-291"></a><a name="index-FSF-Source-Code-CD_002dROM-292"></a>The Free Software Foundation's <cite>Source Code CD-ROM</cite> contains the
minimal TeX source distribution described in the previous section
(i.e., enough to print GNU documentation); email
<a href="mailto:gnu@gnu.org">gnu@gnu.org</a>.
<!-- Commented out: the information is outdated in way or another. -->
<!-- @item -->
<!-- The Gateway@! CD-ROM set contains a runnable NetBSD/Amiga distribution -->
<!-- and sources; see @url{http://www.netbsd.org/Sites/cdroms.html}. -->
<!-- @item -->
<!-- The InfoMagic CD-ROM is a copy of CTAN (see previous section); see -->
<!-- @url{http://www.infomagic.com}. -->
<!-- @item -->
<!-- @cindex 4all@TeX{} Live CD-ROM -->
<!-- @cindex NTG -->
<!-- NTG (Dutch-speaking @TeX{} user group) produced the 4all@TeX{} CD-ROM; -->
<!-- email @email{ntg@@nic.surfnet.nl}, or see -->
<!-- @url{http://www.ntg.nl/4allcd/}. This is a runnable system. -->
<!-- @item -->
<!-- @cindex Prime Time @TeX{}cetera CD-ROM -->
<!-- The Prime Time @TeX{}cetera CD-ROM is also a copy of CTAN; email -->
<!-- @email{ptf@@ctcl.com} or see @url{http://www.ptf.com/ptf/}. -->
<!-- @item -->
<!-- @cindex Walnut Creek @TeX{} CD-ROM -->
<!-- Walnut Creek's @TeX{} CD-ROM is also a copy of CTAN; email -->
<!-- @email{info@@cdrom.com} or see -->
<!-- @url{http://www.cdrom.com:/titles/tex.html}. -->
<li><a name="index-Linux_002c-using-Web2c-293"></a>Most Linux distributions include some TeX package based on
Web2c; see the Linux documentation file `<samp><span class="samp">Distribution-HOWTO</span></samp>' for a
comparison of Linux distributions, available (for example) via
<a href="http://www.linux.org">http://www.linux.org</a>.
</ul>
<p>If you know of additional TeX distributions to add to this
list, please inform <a href="mailto:tex-k@mail.tug.org">tex-k@mail.tug.org</a>.
<div class="node">
<p><hr>
<a name="Other-TeX-packages"></a>
Previous: <a rel="previous" accesskey="p" href="#CD_002dROM-distribution">CD-ROM distribution</a>,
Up: <a rel="up" accesskey="u" href="#unixtex_002eftp">unixtex.ftp</a>
</div>
<h4 class="subsection">2.5.3 Other TeX packages</h4>
<p><a name="index-other-_0040TeX_007b_007d-distributions-294"></a><a name="index-g_t_0040TeX_007b_007d-distributions-besides-Web2c-295"></a>
<a name="index-Amiga-_0040TeX_007b_007d-implementations-296"></a><a name="index-Acorn-_0040TeX_007b_007d-implementations-297"></a><a name="index-VMS-_0040TeX_007b_007d-implementations-298"></a><a name="index-Macintosh-_0040TeX_007b_007d-implementations-299"></a><a name="index-DOS-_0040TeX_007b_007d-implementations-300"></a><a name="index-Windows-_0040TeX_007b_007d-implementations-301"></a>Many other TeX implementations are available in
<samp><var>CTAN:</var><span class="file">/systems</span></samp>, including ready-to-run distributions for
Unix, Amiga, Acorn, VMS, Macintosh, DOS, and Windows (in various forms).
Although Web2c has support in the source code for many operating
systems, and in fact some of the other distributions are based on it,
it's unlikely to work as distributed on anything but Unix. (Please
contribute improvements!)
<p><a name="index-te_0040TeX_007b_007d-302"></a><a name="index-precompiled-Unix-binaries-303"></a>The principal user-oriented Unix distribution based on Web2c is the
teTeX distribution. It includes complete sources, and runs on
all modern Unix variants, including Linux. It contains many
TeX-related programs besides those in the core Web2c.
<p><a name="index-labrea_002estanford_002eedu-304"></a><a name="index-Knuth_002c-Donald-E_002e_002c-archive-of-programs-by-305"></a>The host <tt>labrea.stanford.edu</tt> is the original source for the files
for which Donald Knuth is directly responsible: <samp><span class="file">tex.web</span></samp>,
<samp><span class="file">plain.tex</span></samp>, etc. However, unless you want to build your TeX
library tree ab initio, it is more reliable and less work to retrieve
these files as part of the above packages. In any case, <tt>labrea</tt> is
not the canonical source for anything except what was created by
Stanford TeX project, so do not rely on all the files available at
that ftp site being up-to-date.
<div class="node">
<p><hr>
<a name="Reporting-bugs"></a>
Previous: <a rel="previous" accesskey="p" href="#unixtex_002eftp">unixtex.ftp</a>,
Up: <a rel="up" accesskey="u" href="#Installation">Installation</a>
</div>
<h3 class="section">2.6 Reporting bugs</h3>
<p><a name="index-reporting-bugs-306"></a><a name="index-bugs_002c-reporting-307"></a>
(A copy of this chapter is in the file <samp><span class="file">kpathsea/BUGS</span></samp>.)
<p><a name="index-tex_002dk_0040_0040mail_002etug_002eorg-_0040r_007b_0028bug-address_0029_007d-308"></a><a name="index-bug-address-309"></a>If you have problems or suggestions, please report them to
<a href="mailto:tex-k@mail.tug.org">tex-k@mail.tug.org</a> using the bug checklist below.
<p>Please report bugs in the documentation; not only factual errors or
inconsistent behavior, but unclear or incomplete explanations, typos,
wrong fonts, <small class="dots">...</small>
<ul class="menu">
<li><a accesskey="1" href="#Bug-checklist">Bug checklist</a>: What to include in a good bug report.
<li><a accesskey="2" href="#Mailing-lists">Mailing lists</a>: Joining the bugs or announcements mailing lists.
<li><a accesskey="3" href="#Debugging">Debugging</a>: Analyzing runtime problems.
<li><a accesskey="4" href="#Logging">Logging</a>: Recording searches.
<li><a accesskey="5" href="#Common-problems">Common problems</a>: When things go wrong.
</ul>
<div class="node">
<p><hr>
<a name="Bug-checklist"></a>
Next: <a rel="next" accesskey="n" href="#Mailing-lists">Mailing lists</a>,
Up: <a rel="up" accesskey="u" href="#Reporting-bugs">Reporting bugs</a>
</div>
<h4 class="subsection">2.6.1 Bug checklist</h4>
<p><a name="index-checklist-for-bug-reports-310"></a><a name="index-bug-checklist-311"></a>
Before reporting a bug, please check below to be sure it isn't already
known (see <a href="#Common-problems">Common problems</a>).
<p>Bug reports should be sent via electronic mail to
<a href="mailto:tex-k@mail.tug.org">tex-k@mail.tug.org</a>, or by postal mail to 135 Center Hill Road /
Plymouth, MA 02360 / USA.
<p>The general principle is that a good bug report includes all the
information necessary for reproduction. Therefore, to enable
investigation, your report should include the following:
<ul>
<li><a name="index-version-numbers_002c-determining-312"></a>The version number(s) of the program(s) involved, and of Kpathsea
itself. You can get the former by giving a sole option `<samp><span class="samp">--version</span></samp>'
to the program, and the latter by running `<samp><span class="samp">kpsewhich --version</span></samp>'.
The <samp><span class="file">NEWS</span></samp> and <samp><span class="file">ChangeLog</span></samp> files also contain the version
number.
<li><a name="index-uname-313"></a>The hardware, operating system (including version number), compiler, and
<code>make</code> program you are using (the output of <code>uname -a</code> is a
start on the first two, though often incomplete). If the bug involves
the X window system, include X version and supplier information as well
(examples: X11R6 from MIT; X11R4 from HP; OpenWindows 3.3 bundled with
SunOS 4.1.4).
<li><a name="index-config_002elog-314"></a>Any options you gave to <code>configure</code>. This is recorded in the
<samp><span class="file">config.status</span></samp> files.
<p><a name="index-configuration-bugs-315"></a><a name="index-config_002estatus-316"></a>If you are reporting a bug in `<samp><span class="samp">configure</span></samp>' itself, it's probably
system-dependent, and it will be unlikely the maintainers can do
anything useful if you merely report that thus-and-such is broken.
Therefore, you need to do some additional work: for some bugs, you can
look in the file <samp><span class="file">config.log</span></samp> where the test that failed should
appear, along with the compiler invocation and source program in
question. You can then compile it yourself by hand, and discover why
the test failed. Other `<samp><span class="samp">configure</span></samp>' bugs do not involve the
compiler; in that case, the only recourse is to inspect the
<code>configure</code> shell script itself, or the Autoconf macros that
generated <code>configure</code>.
<li>The log of all debugging output, if the bug is in path searching. You
can get this by setting the environment variable <code>KPATHSEA_DEBUG</code>
to `<samp><span class="samp">-1</span></samp>' before running the program. Please look at the log
yourself to make sure the behavior is really a bug before reporting it;
perhaps “old” environment variable settings are causing files not to
be found, for example.
<li>The contents of any input files necessary to reproduce the bug. For
bugs in DVI-reading programs, for example, this generally means a DVI
file (and any EPS or other files it uses)—TeX source files are
helpful, but the DVI file is necessary, because that's the actual
program input.
<p><a name="index-shar_0040r_007b_002c-recommended_007d-317"></a>GNU <code>shar</code>, available from <a href="ftp://prep.ai.mit.edu/pub/gnu">ftp://prep.ai.mit.edu/pub/gnu</a> is
a convenient way of packaging multiple (possibly binary) files for
electronic mail. If you feel your input files are too big to send by
email, you can ftp them to <a href="ftp://ftp.tug.org/incoming">ftp://ftp.tug.org/incoming</a> (that
directory is writable, but not readable).
<li><a name="index-context-diff-318"></a><a name="index-sending-patches-319"></a><a name="index-ChangeLog-_0040r_007bentry_007d-320"></a>If you are sending a patch (do so if you can!), please do so in the form
of a context diff (`<samp><span class="samp">diff -c</span></samp>') against the original distribution
source. Any other form of diff is either not as complete or harder for
me to understand. Please also include a <samp><span class="file">ChangeLog</span></samp> entry.
<li><a name="index-stack-trace-321"></a><a name="index-debugger-322"></a><a name="index-crashes_002c-reporting-323"></a><a name="index-core-dumps_002c-reporting-324"></a><a name="index-null-pointers_002c-dereferencing-325"></a><a name="index-gdb_0040r_007b_002c-recommended_007d-326"></a>If the bug involved is an actual crash (i.e., core dump), it is easy and
useful to include a stack trace from a debugger (I recommend the GNU
debugger GDB, available from <a href="ftp://prep.ai.mit.edu/pub/gnu">ftp://prep.ai.mit.edu/pub/gnu</a>). If
the cause is apparent (a <code>NULL</code> value being dereferenced, for
example), please send the details along. If the program involved is
TeX or Metafont, and the crash is happening at apparently-sound code,
however, the bug may well be in the compiler, rather than in the program
or the library (see <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>).
<li>Any additional information that will be helpful in reproducing,
diagnosing, or fixing the bug.
</ul>
<div class="node">
<p><hr>
<a name="Mailing-lists"></a>
Next: <a rel="next" accesskey="n" href="#Debugging">Debugging</a>,
Previous: <a rel="previous" accesskey="p" href="#Bug-checklist">Bug checklist</a>,
Up: <a rel="up" accesskey="u" href="#Reporting-bugs">Reporting bugs</a>
</div>
<h4 class="subsection">2.6.2 Mailing lists</h4>
<p><a name="index-mailing-lists-327"></a><a name="index-bug-mailing-list-328"></a><a name="index-announcement-mailing-list-329"></a>
Web2c and Kpathsea in general are discussed on the mailing list
<a href="mailto:tex-k@mail.tug.org">tex-k@mail.tug.org</a>.
<a name="index-tex_002dk_002drequest_0040_0040mail_002etug_002eorg-330"></a>To join, email <a href="mailto:tex-k-request@mail.tug.org">tex-k-request@mail.tug.org</a> with a line
consisting of
<pre class="example"> subscribe <var>you</var>@<var>your.preferred.email.address</var>
</pre>
<p class="noindent">in the body of the message.
<p>You do not need to join to submit a report, nor will it affect whether
you get a response. There is no Usenet newsgroup equivalent (if you can
be the one to set this up, email `<samp><span class="samp">tex-k-request</span></samp>'). Traffic on the
list is fairly light, and is mainly bug reports and enhancement requests
to the software. The best way to decide if you want to join or not is
read some of the archives from <a href="ftp://ftp.tug.org/mail/archives/tex-k/">ftp://ftp.tug.org/mail/archives/tex-k/</a>.
<p>Be aware that large data files are sometimes included in bug reports.
If this is a problem for you, do not join the list.
<p><a name="index-tex_002darchive_0040_0040math_002eutah_002eedu-331"></a><a name="index-announcement-mailing-list-332"></a>If you only want announcements of new releases, not bug reports and
discussion, join <a href="mailto:tex-archive@math.utah.edu">tex-archive@math.utah.edu</a> (via mail to
<a href="mailto:tex-archive-request@math.utah.edu">tex-archive-request@math.utah.edu</a>).
<p><a name="index-g_t_0040TeX_007b_007d-help-mailing-list-333"></a><a name="index-La_0040TeX_007b_007d-help-mailing-list-334"></a><a name="index-Usenet-_0040TeX_007b_007d-newsgroup-335"></a><a name="index-newsgroup-for-_0040TeX_007b_007d-336"></a><a name="index-help_002c-mailing-list-for-general-_0040TeX_007b_007d-337"></a><a name="index-info_002dtex_0040_0040shsu_002eedu-338"></a><a name="index-comp_002etext_002etex-339"></a>If you are looking for general TeX help, such as how to use LaTeX,
please use the mailing list <a href="mailto:info-tex@shsu.edu">info-tex@shsu.edu</a> mailing list,
which is gatewayed to the `<samp><span class="samp">comp.text.tex</span></samp>' Usenet newsgroup (or post
to the newsgroup; the gateway is bidirectional).
<div class="node">
<p><hr>
<a name="Debugging"></a>
Next: <a rel="next" accesskey="n" href="#Logging">Logging</a>,
Previous: <a rel="previous" accesskey="p" href="#Mailing-lists">Mailing lists</a>,
Up: <a rel="up" accesskey="u" href="#Reporting-bugs">Reporting bugs</a>
</div>
<h4 class="subsection">2.6.3 Debugging</h4>
<p><a name="index-debugging-340"></a><a name="index-runtime-debugging-341"></a><a name="index-options-for-debugging-342"></a>
<a name="index-kpathsea_005fdebug-343"></a><a name="index-debug_002eh-344"></a>Kpathsea provides a number of runtime debugging options, detailed below
by their names and corresponding numeric values. When the files you
expect aren't being found, the thing to do is enable these options and
examine the output.
<p>You can set these with some runtime argument (e.g., `<samp><span class="samp">-d</span></samp>') to the
program; in that case, you should use the numeric values described in
the program's documentation (which, for Dvipsk and Xdvik, are different
than those below). It's best to give the `<samp><span class="samp">-d</span></samp>' (or whatever) option
first, for maximal output. Dvipsk and Xdvik have additional
program-specific debugging options as well.
<p><a name="index-KPATHSEA_005fDEBUG-345"></a><a name="index-kpathsea_005fdebug-346"></a>You can also set the environment variable <code>KPATHSEA_DEBUG</code>; in this
case, you should use the numbers below. If you run the program under a
debugger and set the variable <code>kpathsea_debug</code>, also use the numbers
below.
<p><a name="index-g_t_002d1-_0040r_007bdebugging-value_007d-347"></a>In any case, by far the simplest value to use is `<samp><span class="samp">-1</span></samp>', which will
turn on all debugging output. This is usually better than guessing
which particular values will yield the output you need.
<p><a name="index-debugging-output-348"></a><a name="index-standard-error-and-debugging-output-349"></a>Debugging output always goes to standard error, so you can redirect it
easily. For example, in Bourne-compatible shells:
<pre class="example"> dvips -d -1 ... 2>/tmp/debug
</pre>
<p><a name="index-Kpsewhich_002c-and-debugging-350"></a>It is sometimes helpful to run the standalone Kpsewhich utility
(see <a href="#Invoking-kpsewhich">Invoking kpsewhich</a>), instead of the original program.
<p><a name="index-numeric-debugging-values-351"></a>In any case, you can <em>not</em> use the <em>names</em> below; you must
always use somebody's numbers. (Sorry.) To set more than one
option, just sum the corresponding numbers.
<dl>
<dt><code>KPSE_DEBUG_STAT </code><span class="roman">(1)</span><a name="index-KPSE_005fDEBUG_005fSTAT-_0040r_007b_00281_0029_007d-352"></a><dd>Report `<samp><span class="samp">stat</span></samp>'(2) calls. This is useful for verifying that your
directory structure is not forcing Kpathsea to do many additional file
tests (see <a href="#Slow-path-searching">Slow path searching</a>, and see <a href="#Subdirectory-expansion">Subdirectory expansion</a>). If you are using an up-to-date <samp><span class="file">ls-R</span></samp> database
(see <a href="#Filename-database">Filename database</a>), this should produce no output unless a
nonexistent file that must exist is searched for.
<br><dt><code>KPSE_DEBUG_HASH </code><span class="roman">(2)</span><a name="index-KPSE_005fDEBUG_005fHASH-_0040r_007b_00282_0029_007d-353"></a><dd>Report lookups in all hash tables: <samp><span class="file">ls-R</span></samp> and <samp><span class="file">aliases</span></samp>
(see <a href="#Filename-database">Filename database</a>); font aliases (see <a href="#Fontmap">Fontmap</a>); and config
file values (see <a href="#Config-files">Config files</a>). Useful when expected values are not
being found, e.g.., file searches are looking at the disk instead of
using <samp><span class="file">ls-R</span></samp>.
<br><dt><code>KPSE_DEBUG_FOPEN </code><span class="roman">(4)</span><a name="index-KPSE_005fDEBUG_005fFOPEN-_0040r_007b_00284_0029_007d-354"></a><dd><a name="index-fopen_0040r_007b_002c-redefined_007d-355"></a>Report file openings and closings. Especially useful when your system's
file table is full, for seeing which files have been opened but never
closed. In case you want to set breakpoints in a debugger: this works by
redefining `<samp><span class="samp">fopen</span></samp>' (`<samp><span class="samp">fclose</span></samp>') to be `<samp><span class="samp">kpse_fopen_trace</span></samp>'
(`<samp><span class="samp">kpse_fclose_trace</span></samp>').
<br><dt><code>KPSE_DEBUG_PATHS </code><span class="roman">(8)</span><a name="index-KPSE_005fDEBUG_005fPATHS-_0040r_007b_00288_0029_007d-356"></a><dd><a name="index-kpse_005fformat_005finfo_005ftype-357"></a>Report general path information for each file type Kpathsea is asked to
search. This is useful when you are trying to track down how a
particular path got defined—from <samp><span class="file">texmf.cnf</span></samp>, <samp><span class="file">config.ps</span></samp>,
an environment variable, the compile-time default, etc. This is the
contents of the <code>kpse_format_info_type</code> structure defined in
<samp><span class="file">tex-file.h</span></samp>.
<br><dt><code>KPSE_DEBUG_EXPAND </code><span class="roman">(16)</span><a name="index-KPSE_005fDEBUG_005fEXPAND-_0040r_007b_002816_0029_007d-358"></a><dd>Report the directory list corresponding to each path element Kpathsea
searches. This is only relevant when Kpathsea searches the disk, since
<samp><span class="file">ls-R</span></samp> searches don't look through directory lists in this way.
<br><dt><code>KPSE_DEBUG_SEARCH </code><span class="roman">(32)</span><a name="index-KPSE_005fDEBUG_005fSEARCH-_0040r_007b_002832_0029_007d-359"></a><dd>Report on each file search: the name of the file searched for, the path
searched in, whether or not the file must exist (when drivers search for
<samp><span class="file">cmr10.vf</span></samp>, it need not exist), and whether or not we are
collecting all occurrences of the file in the path (as with, e.g.,
<samp><span class="file">texmf.cnf</span></samp> and <samp><span class="file">texfonts.map</span></samp>), or just the first (as with
most lookups). This can help you correlate what Kpathsea is doing with
what is in your input file.
<br><dt><code>KPSE_DEBUG_VARS </code><span class="roman">(64)</span><a name="index-KPSE_005fDEBUG_005fVARS-_0040r_007b_002864_0029_007d-360"></a><dd>Report the value of each variable Kpathsea looks up. This is useful for
verifying that variables do indeed obtain their correct values.
<br><dt><code>GSFTOPK_DEBUG </code><span class="roman">(128)</span><a name="index-GSFTOPK_005fDEBUG-_0040r_007b_0028128_0029_007d-361"></a><dd>Activates debugging printout specific to <code>gsftopk</code> program.
<br><dt><code>MAKETEX_DEBUG </code><span class="roman">(512)</span><a name="index-MAKETEX_005fDEBUG-_0040r_007b_0028512_0029_007d-362"></a><dd>If you use the optional <code>mktex</code> programs instead of the
traditional shell scripts, this will report the name of the site file
(<samp><span class="file">mktex.cnf</span></samp> by default) which is read, directories created by
<code>mktexdir</code>, the full path of the <samp><span class="file">ls-R</span></samp> database built by
<code>mktexlsr</code>, font map searches, <code>MT_FEATURES</code> in effect,
parameters from <code>mktexnam</code>, filenames added by
<code>mktexupd</code>, and some subsidiary commands run by the programs.
<br><dt><code>MAKETEX_FINE_DEBUG </code><span class="roman">(1024)</span><a name="index-MAKETEX_005fFINE_005fDEBUG-_0040r_007b_00281024_0029_007d-363"></a><dd>When the optional <code>mktex</code> programs are used, this will print
additional debugging info from functions internal to these programs.
</dl>
<p><a name="index-g_t_0040samp_007bkdebug_003a_007d-364"></a><a name="index-hash_005fsummary_005fonly-_0040r_007bvariable-for-debugging_007d-365"></a><a name="index-hash-table-buckets_002c-printing-366"></a>Debugging output from Kpathsea is always written to standard error, and
begins with the string `<samp><span class="samp">kdebug:</span></samp>'. (Except for hash table buckets,
which just start with the number, but you can only get that output
running under a debugger. See comments at the <code>hash_summary_only</code>
variable in <samp><span class="file">kpathsea/db.c</span></samp>.)
<div class="node">
<p><hr>
<a name="Logging"></a>
Next: <a rel="next" accesskey="n" href="#Common-problems">Common problems</a>,
Previous: <a rel="previous" accesskey="p" href="#Debugging">Debugging</a>,
Up: <a rel="up" accesskey="u" href="#Reporting-bugs">Reporting bugs</a>
</div>
<h4 class="subsection">2.6.4 Logging</h4>
<p><a name="index-log-file-367"></a>
<a name="index-logging-successful-searches-368"></a><a name="index-recording-successful-searches-369"></a><a name="index-usage-patterns_002c-finding-370"></a><a name="index-disk-usage_002c-reducing-371"></a>Kpathsea can record the time and filename found for each successful
search. This may be useful in finding good candidates for deletion when
your filesystem is full, or in discovering usage patterns
at your site.
<p><a name="index-TEXMFLOG-372"></a>To do this, define the environment or config file variable
<code>TEXMFLOG</code>. The value is the name of the file to append the
information to. The file is created if it doesn't exist, and appended
to if it does.
<p><a name="index-epoch_002c-seconds-since-373"></a><a name="index-time-_0040r_007bsystem-call_007d-374"></a>Each successful search turns into one line in the log file: two words
separated by a space. The first word is the time of the search, as the
integer number of seconds since “the epoch”, i.e., UTC midnight 1
January 1970 (more precisely, the result of the <code>time</code> system
call). The second word is the filename.
<p>For example, after <code>setenv TEXMFLOG /tmp/log</code>, running Dvips on
<samp><span class="file">story.dvi</span></samp> appends the following lines:
<pre class="example"> 774455887 /usr/local/share/texmf/dvips/config.ps
774455887 /usr/local/share/texmf/dvips/psfonts.map
774455888 /usr/local/share/texmf/dvips/texc.pro
774455888 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmbx10.600pk
774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmsl10.600pk
774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
774455889 /usr/local/share/texmf/dvips/texc.pro
</pre>
<p><a name="index-privacy_002c-semblance-of-375"></a>Only filenames that are absolute are recorded, to preserve
some semblance of privacy.
<div class="node">
<p><hr>
<a name="Common-problems"></a>
Previous: <a rel="previous" accesskey="p" href="#Logging">Logging</a>,
Up: <a rel="up" accesskey="u" href="#Reporting-bugs">Reporting bugs</a>
</div>
<h4 class="subsection">2.6.5 Common problems</h4>
<p><a name="index-common-problems-376"></a><a name="index-problems_002c-common-377"></a><a name="index-FAQ_002c-Kpathsea-378"></a>
Here are some common problems with configuration, compilation, linking,
execution, <small class="dots">...</small>
<ul class="menu">
<li><a accesskey="1" href="#Unable-to-find-files">Unable to find files</a>: If your program can't find fonts (or whatever).
<li><a accesskey="2" href="#Slow-path-searching">Slow path searching</a>: If it takes forever to find anything.
<li><a accesskey="3" href="#Unable-to-generate-fonts">Unable to generate fonts</a>: If mktexpk fails.
<li><a accesskey="4" href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>: Likely compiler bugs.
<li><a accesskey="5" href="#Empty-Makefiles">Empty Makefiles</a>: When configure produces empty makefiles.
<li><a accesskey="6" href="#XtStrings">XtStrings</a>: When _XtStrings is undefined.
<li><a accesskey="7" href="#dlopen">dlopen</a>: When dlopen is undefined.
<li><a accesskey="8" href="#ShellWidgetClass">ShellWidgetClass</a>: For dynamic linking troubles under OpenWindows.
<li><a accesskey="9" href="#Pointer-combination-warnings">Pointer combination warnings</a>: For old compilers that don't grok char *.
</ul>
<div class="node">
<p><hr>
<a name="Unable-to-find-files"></a>
Next: <a rel="next" accesskey="n" href="#Slow-path-searching">Slow path searching</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.1 Unable to find files</h5>
<p><a name="index-unable-to-find-files-379"></a><a name="index-files_002c-unable-to-find-380"></a>
If a program complains it cannot find fonts (or other input files), any
of several things might be wrong. In any case, you may find the
debugging options helpful. See <a href="#Debugging">Debugging</a>.
<ul>
<li>Perhaps you simply haven't installed all the necessary files; the basic
fonts and input files are distributed separately from the programs.
See <a href="#unixtex_002eftp">unixtex.ftp</a>.
<li><a name="index-g_t_002fetc_002fprofile-381"></a><a name="index-environment-variables_002c-old-382"></a>You have (perhaps unknowingly) told Kpathsea to use search paths that
don't reflect where the files actually are. One common cause is having
environment variables set from a previous installation, thus overriding
what you carefully set in <samp><span class="file">texmf.cnf</span></samp> (see <a href="#Supported-file-formats">Supported file formats</a>). System <samp><span class="file">/etc/profile</span></samp> or other files such may be the
culprit.
<li><a name="index-symbolic-links-not-found-383"></a><a name="index-leaf-directories-wrongly-guessed-384"></a>Your files reside in a directory that is only pointed to via a symbolic
link, in a leaf directory and is not listed in <samp><span class="file">ls-R</span></samp>.
<p>Unfortunately, Kpathsea's subdirectory searching has an irremediable
deficiency: If a directory <var>d</var> being searched for subdirectories
contains plain files and symbolic links to other directories, but no
true subdirectories, <var>d</var> will be considered a leaf directory, i.e.,
the symbolic links will not be followed. See <a href="#Subdirectory-expansion">Subdirectory expansion</a>.
<p>You can work around this problem by creating an empty dummy subdirectory
in <var>d</var>. Then <var>d</var> will no longer be a leaf, and the symlinks will
be followed.
<p>The directory immediately followed by the `<samp><span class="samp">//</span></samp>' in the path
specification, however, is always searched for subdirectories, even if
it is a leaf. Presumably you would not have asked for the directory to
be searched for subdirectories if you didn't want it to be.
<li>If the fonts (or whatever) don't already exist, <code>mktexpk</code> (or
<code>mktexmf</code> or <code>mktextfm</code>) will try to create them. If
these rather complicated shell scripts fail, you'll eventually get an
error message saying something like `<samp><span class="samp">Can't find font
</span><var>fontname</var></samp>'. The best solution is to fix (or at least report) the
bug in <code>mktexpk</code>; the workaround is to generate the necessary
fonts by hand with Metafont, or to grab them from a CTAN site
(see <a href="#unixtex_002eftp">unixtex.ftp</a>).
<li>There is a bug in the library. See <a href="#Reporting-bugs">Reporting bugs</a>.
</ul>
<div class="node">
<p><hr>
<a name="Slow-path-searching"></a>
Next: <a rel="next" accesskey="n" href="#Unable-to-generate-fonts">Unable to generate fonts</a>,
Previous: <a rel="previous" accesskey="p" href="#Unable-to-find-files">Unable to find files</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.2 Slow path searching</h5>
<p><a name="index-excessive-startup-time-385"></a><a name="index-slow-startup-time-386"></a><a name="index-startup-time_002c-excessive-387"></a>
If your program takes an excessively long time to find fonts or other
input files, but does eventually succeed, here are some possible culprits:
<ul>
<li>Most likely, you just have a lot of directories to search, and that
takes a noticeable time. The solution is to create and maintain a
separate <samp><span class="file">ls-R</span></samp> file that lists all the files in your main TeX
hierarchy. See <a href="#Filename-database">Filename database</a>. Kpathsea always uses <samp><span class="file">ls-R</span></samp>
if it's present; there's no need to recompile or reconfigure any of the
programs.
<li>Your recursively-searched directories (e.g.,
<samp><span class="file">/usr/local/share/texmf/fonts//</span></samp>), contain a mixture of files and
directories. This prevents Kpathsea from using a useful optimization
(see <a href="#Subdirectory-expansion">Subdirectory expansion</a>).
<p>It is best to have only directories (and perhaps a <samp><span class="file">README</span></samp>) in the
upper levels of the directory structure, and it's very important to have
<em>only</em> files, and no subdirectories, in the leaf directories where
the dozens of TFM, PK, or whatever files reside.
</ul>
<p>In any case, you may find the debugging options helpful in determining
precisely when the disk or network is being pounded. See <a href="#Debugging">Debugging</a>.
<div class="node">
<p><hr>
<a name="Unable-to-generate-fonts"></a>
Next: <a rel="next" accesskey="n" href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>,
Previous: <a rel="previous" accesskey="p" href="#Slow-path-searching">Slow path searching</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.3 Unable to generate fonts</h5>
<p><a name="index-unable-to-generate-fonts-388"></a><a name="index-font-generation-failures-389"></a>
Metafont outputs fonts in bitmap format, tuned for a particular
device at a particular resolution, in order to allow for the
highest-possible quality of output. Some DVI-to-whatever programs,
such as Dvips, try to generate these on the fly when they are needed,
but this generation may fail in several cases.
<p><a name="index-g_t_0040code_007bmktexpk_007d-can_0027t-guess-mode-390"></a>If <code>mktexpk</code> runs, but fails with this error:
<pre class="example"> mktexpk: Can't guess mode for <var>nnn</var> dpi devices.
mktexpk: Use a config file to specify the mode, or update me.
</pre>
<p>you need to ensure the resolution and mode match; just
specifying the resolution, as in <code>-D 360</code>, is not enough.
<p>You can specify the mode name with the <code>-mode</code> option on the
Dvips command line, or in a Dvips configuration file (see <a href="dvips.html#Config-files">Config files</a>), such as <samp><span class="file">config.ps</span></samp> in your document
directory, <samp><span class="file">~/.dvipsrc</span></samp> in your home directory, or in a system
directory (again named <samp><span class="file">config.ps</span></samp>). (Other drivers use other
files, naturally.)
<p>For example, if you need 360<span class="dmn">dpi</span> fonts, you could include this in
a configuration file:
<pre class="example"> D 360
M lqmed
</pre>
<p><a name="index-Metafont-using-the-wrong-device-391"></a><a name="index-device_002c-wrong-392"></a>If Metafont runs, but generates fonts at the wrong resolution or for
the wrong device, most likely <code>mktexpk</code>'s built-in guess for the
mode is wrong, and you should override it as above.
<p>See <a href="ftp://ftp.tug.org/tex/modes.mf">ftp://ftp.tug.org/tex/modes.mf</a> for a list of resolutions and
mode names for most devices (additional submissions are welcome).
<p><a name="index-g_t_002e2602gf-393"></a><a name="index-g_t2602gf-394"></a><a name="index-Metafont-making-too_002dlarge-fonts-395"></a><a name="index-proof-mode-396"></a><a name="index-online-Metafont-display_002c-spurious-397"></a>If Metafont runs but generates fonts at a resolution of 2602<span class="dmn">dpi</span>
(and prints out the name of each character as well as just a character
number, and maybe tries to display the characters), then your Metafont
base file probably hasn't been made properly. (It's using the default
<code>proof</code> mode, instead of an actual device mode.) To make a proper
<samp><span class="file">plain.base</span></samp>, assuming the local mode definitions are contained in
a file <samp><span class="file">modes.mf</span></samp>, run the following command (assuming Unix):
<pre class="example"> inimf "plain; input modes; dump"
</pre>
<p class="noindent"><a name="index-plain_002ebase-398"></a>Then copy the <samp><span class="file">plain.base</span></samp> file from the current directory to where
the base files are stored on your system
(<samp><span class="file">/usr/local/share/texmf/web2c</span></samp> by default), and make a link
(either hard or soft) from <samp><span class="file">plain.base</span></samp> to <samp><span class="file">mf.base</span></samp> in that
directory.
See <a href="web2c.html#inimf-invocation">inimf invocation</a>.
<p><a name="index-Metafont-installation-399"></a>If <code>mf</code> is a command not found at all by <code>mktexpk</code>, then you
need to install Metafont (see <a href="#unixtex_002eftp">unixtex.ftp</a>).
<div class="node">
<p><hr>
<a name="TeX-or-Metafont-failing"></a>
Next: <a rel="next" accesskey="n" href="#Empty-Makefiles">Empty Makefiles</a>,
Previous: <a rel="previous" accesskey="p" href="#Unable-to-generate-fonts">Unable to generate fonts</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.4 TeX or Metafont failing</h5>
<p><a name="index-g_t_0040TeX_007b_007d-failures-400"></a><a name="index-Metafont-failures-401"></a><a name="index-compiler-bugs-402"></a>If TeX or Metafont get a segmentation fault or otherwise fail while
running a normal input file, the problem is usually a compiler bug
(unlikely as that may sound). Even if the trip and trap tests are
passed, problems may lurk. Optimization occasionally causes trouble in
programs other than TeX and Metafont themselves, too.
<p>Insufficient swap space may also cause core dumps or other erratic
behavior.
<p><a name="index-optimization-caveat-403"></a>For a workaround, if you enabled any optimization flags, it's best to
omit optimization entirely. In any case, the way to find the facts is
to run the program under the debugger and see where it's failing.
<p><a name="index-GNU-C-compiler-bugs-404"></a><a name="index-system-C-compiler-bugs-405"></a>Also, if you have trouble with a system C compiler, I advise trying the
GNU C compiler. And vice versa, unfortunately; but in that case I also
recommend reporting a bug to the GCC mailing list; see <a href="gcc.html#Bugs">Bugs</a>.
<p><a name="index-compiler-bugs_002c-finding-406"></a>To report compiler bugs effectively requires perseverance and
perspicacity: you must find the miscompiled line, and that usually
involves delving backwards in time from the point of error, checking
through TeX's (or whatever program's) data structures. Things are
not helped by all-too-common bugs in the debugger itself. Good luck.
<p><a name="index-ANSI-C-407"></a><a name="index-HP_002dUX_002c-compiling-on-408"></a><a name="index-compiling-on-HP_002dUX-409"></a>One known cause of trouble is the way arrays are handled. Some of the
Pascal arrays have a lower index other than 0, and the C code will take
the pointer to the allocated memory, subtract the lower index, and use
the resulting pointer for the array. While this trick often works, ANSI
C doesn't guarantee that it will. It it known to fail on HP-UX 10
mchines when the native compiler is used, unless the `<samp><span class="samp">+u</span></samp>' compiler
switch was specified. Using GCC will work on this platform as well.
<div class="node">
<p><hr>
<a name="Empty-Makefiles"></a>
Next: <a rel="next" accesskey="n" href="#XtStrings">XtStrings</a>,
Previous: <a rel="previous" accesskey="p" href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.5 Empty Makefiles</h5>
<p><a name="index-Makefiles_002c-empty-410"></a><a name="index-sed-_0040r_007berror-from-_0040code_007bconfigure_007d_007d-411"></a><a name="index-configure-_0040r_007berror-from-_0040code_007bsed_007d_007d-412"></a><a name="index-NetBSD-_0040code_007bconfigure_007d-error-413"></a><a name="index-FreeBSD-_0040code_007bconfigure_007d-error-414"></a><a name="index-Mach10-_0040code_007bconfigure_007d-error-415"></a><a name="index-AIX-4_002e1-_0040code_007bconfigure_007d-error-416"></a><a name="index-NeXT-_0040code_007bsed_007d-error-417"></a>
On some systems (NetBSD, FreeBSD, AIX 4.1, and Mach10), <code>configure</code>
may fail to properly create the Makefiles. Instead, you get an error
which looks something like this:
<pre class="example"> prompt$ ./configure
...
creating Makefile
sed: 1: "\\@^ac_include make/pat ...": \ can not be used as a string delimiter
</pre>
<p>So far as I know, the bug here is in <code>/bin/sh</code> on these systems. I
don't have access to a machine running any of them, so if someone can
find a workaround that avoids the quoting bug, I'd be most
grateful. (Search for <code>ac_include</code> in the <code>configure</code> script
to get to the problematic code.)
<p>It should work to run <code>bash configure</code>, instead of using
<code>/bin/sh</code>. You can get Bash from
<a href="ftp://prep.ai.mit.edu/pub/gnu">ftp://prep.ai.mit.edu/pub/gnu</a> and mirrors.
<p>Another possible cause (reported for NeXT) is a bug in the <code>sed</code>
command. In that case the error may look like this:
<pre class="example"> Unrecognized command: \@^ac_include make/paths.make@r make/paths.make
</pre>
<p>In this case, installing GNU <code>sed</code> should solve the problem. You
can get GNU <code>sed</code> from the same places as Bash.
<div class="node">
<p><hr>
<a name="XtStrings"></a>
Next: <a rel="next" accesskey="n" href="#dlopen">dlopen</a>,
Previous: <a rel="previous" accesskey="p" href="#Empty-Makefiles">Empty Makefiles</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.6 <code>XtStrings</code></h5>
<p><a name="index-XtStrings-418"></a>You may find that linking X programs results in an error from the linker
that `<samp><span class="samp">XtStrings</span></samp>' is undefined, something like this:
<pre class="example"> gcc -o virmf ...
.../x11.c:130: undefined reference to `XtStrings'
</pre>
<p>This generally happens because of a mismatch between the X include files
with which you compiled and the X libraries with which you linked;
often, the include files are from MIT and the libraries from Sun.
<p>The solution is to use the same X distribution for compilation and
linking. Probably `<samp><span class="samp">configure</span></samp>' was unable to guess the proper
directories from your installation. You can use the <code>configure</code>
options `<samp><span class="samp">--x-includes=</span><var>path</var></samp>' and
`<samp><span class="samp">--x-libraries=</span><var>path</var></samp>' to explicitly specify them.
<div class="node">
<p><hr>
<a name="dlopen"></a>
Next: <a rel="next" accesskey="n" href="#ShellWidgetClass">ShellWidgetClass</a>,
Previous: <a rel="previous" accesskey="p" href="#XtStrings">XtStrings</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.7 <code>dlopen</code></h5>
<p><a name="index-static-linking-and-_0040code_007bdlsym_007d-419"></a><a name="index-dlopen-420"></a><a name="index-dlsym-421"></a><a name="index-dlclose-422"></a><a name="index-wcstombs-423"></a><a name="index-libdl_002ea-424"></a>(This section adapted from the file <samp><span class="file">dlsym.c</span></samp> in the X distribution.)
<p>The <code>Xlib</code> library uses the standard C function <code>wcstombs</code>.
Under SunOS 4.1, <code>wcstombs</code> uses the `<samp><span class="samp">dlsym</span></samp>' interface defined
in <samp><span class="file">libdl.so</span></samp>. Unfortunately, the SunOS 4.1 distribution does not
include a static `<samp><span class="samp">libdl.a</span></samp>' library.
<p>As a result, if you try to link an X program statically under SunOS, you
may get undefined references to <code>dlopen</code>, <code>dlsym</code>, and
<code>dlclose</code>. One workaround is to include these definitions
when you link:
<pre class="example"> void *dlopen() { return 0; }
void *dlsym() { return 0; }
int dlclose() { return -1; }
</pre>
<p><a name="index-dlsym_002ec-425"></a>These are contained in the <samp><span class="file">dlsym.c</span></samp> file in the MIT X
distribution.
<div class="node">
<p><hr>
<a name="ShellWidgetClass"></a>
Next: <a rel="next" accesskey="n" href="#Pointer-combination-warnings">Pointer combination warnings</a>,
Previous: <a rel="previous" accesskey="p" href="#dlopen">dlopen</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.8 <code>ShellWidgetClass</code></h5>
<p><a name="index-dynamic-linking-problems-with-OpenWin-libraries-426"></a><a name="index-OpenWin-libraries_002c-dynamic-linking-problems-427"></a><a name="index-get_005fwmShellWidgetClass-428"></a><a name="index-get_005fapplicationShellWidgetClass-429"></a>
<a name="index-comp_002esys_002esun_002eadmin-_0040r_007bFAQ_007d-430"></a><a name="index-FAQ_002c-_0040t_007bcomp_002esys_002esun_002eadmin_007d-431"></a>(This section adapted from the <tt>comp.sys.sun.admin</tt> FAQ.)
<p>If you are linking with Sun's OpenWindows libraries in SunOS 4.1.x, you
may get undefined symbols <code>_get_wmShellWidgetClass</code> and
<code>_get_applicationShellWidgetClass</code> when linking. This problem does
not arise using the standard MIT X libraries under SunOS.
<p><a name="index-Xmu-_0040r_007blibrary-problems_007d-432"></a>The cause is bugs in the <code>Xmu</code> shared library as shipped from Sun.
There are several fixes:
<ul>
<li>Install the free MIT distribution from `<samp><span class="samp">ftp.x.org</span></samp>' and mirrors.
<li>Get the OpenWindows patches listed below.
<li>Statically link the <code>Xmu</code> library into the executable.
<li>Avoid using <code>Xmu</code> at all. If you are compiling
Metafont, see <a href="web2c.html#Online-Metafont-graphics">Online Metafont graphics</a>. If you are
compiling Xdvi, see the <code>-DNOTOOL</code> option in <samp><span class="file">xdvik/INSTALL</span></samp>.
<li>Ignore the errors. The binary runs fine regardless.
</ul>
<p><a name="index-Sun-OpenWin-patches-433"></a><a name="index-patches_002c-Sun-OpenWin-434"></a>Here is the information for getting the two patches:
<pre class="display"> Patch ID: 100512-02
Bug ID's: 1086793, 1086912, 1074766
Description: 4.1.x OpenWindows 3.0 <code>libXt</code> jumbo patch
Patch ID: 100573-03
Bug ID: 1087332
Description: 4.1.x OpenWindows 3.0 undefined symbols when using shared <code>libXmu</code>.
</pre>
<p><a name="index-static-linking-435"></a>The way to statically link with <code>libXmu</code> depends on whether you are
using a Sun compiler (e.g., <code>cc</code>) or <code>gcc</code>. If the latter,
alter the <code>x_libs</code> Make variable to include
<p><a name="index-g_t_002dstatic-436"></a><a name="index-g_t_002ddynamic-437"></a>
<pre class="example"> -static -lXmu -dynamic
</pre>
<p><a name="index-g_t_002dBstatic-438"></a><a name="index-g_t_002dBdynamic-439"></a>If you are using the Sun compiler, use `<samp><span class="samp">-Bstatic</span></samp>' and `<samp><span class="samp">-Bdynamic</span></samp>'.
<div class="node">
<p><hr>
<a name="Pointer-combination-warnings"></a>
Previous: <a rel="previous" accesskey="p" href="#ShellWidgetClass">ShellWidgetClass</a>,
Up: <a rel="up" accesskey="u" href="#Common-problems">Common problems</a>
</div>
<h5 class="subsubsection">2.6.5.9 Pointer combination warnings</h5>
<p><a name="index-warnings_002c-pointer-combinations-440"></a><a name="index-pointer-combination-warnings-441"></a><a name="index-illegal-pointer-combination-warnings-442"></a><a name="index-cc-_0040r_007bwarnings_007d-443"></a>When compiling with old C compilers, you may get some warnings about
“illegal pointer combinations”. These are spurious; just ignore them.
I decline to clutter up the source with casts to get rid of them.
<!-- This isn't worth including any more, OSF 1.x is too old. -->
<!-- The other XtInherit problem (R4 Xlib on Suns) should never come up, -->
<!-- but the answer from the X faq is included anyway. -->
<!-- @node XtInherit -->
<!-- @subsubsection @code{XtInherit} -->
<!-- @findex XtInherit @r{bug on OSF/1} -->
<!-- @cindex OSF/1 loader bug and @code{XtInherit} -->
<!-- @cindex Alpha OSF/1 loader bug and @code{XtInherit} -->
<!-- On DEC OSF/1 1.x systems, the loader has a bug that manifests itself in -->
<!-- the following error (all on one line, but for the sake of the paper -->
<!-- width it's broken here): -->
<!-- @example -->
<!-- xdvik/xdvi: /sbin/loader: Fatal Error: search_for_undefineds: -->
<!-- symbol _XtInherit should not have any relocation entry -->
<!-- @end example -->
<!-- @noindent According to Michael Rickabaugh @code{<mjr@@quarry.enet.dec.com>}: -->
<!-- @quotation -->
<!-- This is a bug fixed in DEC OSF/1 2.0. -->
<!-- If you know how, installing @file{/sbin/loader} from a 2.0 system onto a -->
<!-- 1.3 system will work. Make sure that @file{/usr} is @emph{not} mounted -->
<!-- when you do this. (If you forget about umounting @code{/usr}, it is -->
<!-- possible most of your filesystems will become corrupted.) -->
<!-- Otherwise, I suggest getting a later CD and running -->
<!-- @file{/usr/sbin/installupdate}. -->
<!-- @end quotation -->
<!-- Alternatively, you may be able to use the freely available X11 libraries -->
<!-- that come with the MIT distribution (on @file{ftp.x.org}, for example). -->
<!-- Linking statically, perhaps only with some of the X libraries, may also -->
<!-- work. -->
<!-- The Sun XtInherit weirdness, from the comp.windows.x FAQ: -->
<!-- Subject: 126)! What are these problems with "*_XtInherit* not found" on the Sun? -->
<!-- When I link a X program that I wrote on a SunOS 4.0.3 or 4.1 machine I get the -->
<!-- error "ld.so: symbol not found *_XtInherit*". -->
<!-- What you are seeing is a side-effect of a kludge in the R4 libXt.a to -->
<!-- get Sun shared libraries working. Apparently, you can't share a function that -->
<!-- is both called and compared, as *_XtInherit* is. This was handled by putting -->
<!-- *_XtInherit* in the same file as a function that is always used, thereby -->
<!-- guaranteeing that it would be loaded - that is, in Initialize.c, where -->
<!-- XtToolkitInitialize() and XtInitialize() reside. These routines would normally -->
<!-- be called. -->
<!-- You are probably seeing this error because your program is not a normal -->
<!-- Xt-based program and does not call XtToolkitInitialize() anywhere. -->
<!-- 1) it may be a program that uses Xt functions but never opens a -->
<!-- connection to the X server. [OSF/Motif's 1.1.0 UIL had this problem; it called -->
<!-- XtMalloc() and other Xt functions.] The solution is to add the call to your -->
<!-- program; the function does not have to be executed, just linked in. -->
<!-- 2) alternatively, your program doesn't need any Xt functions and is -->
<!-- correct in not calling XtToolkitInitialize() - it may be an Xlib or XView -->
<!-- program. In this case, you can remove -lXt from your link command. -->
<!-- It should not be necessary to link the shared libraries statically, -->
<!-- although this will certainly solve the problem. -->
<!-- * Empty Makefiles:: If configure gives you sed errors. -->
<!-- * wchar_t:: For wchar_t difficulties. -->
<div class="node">
<p><hr>
<a name="Path-searching"></a>
Next: <a rel="next" accesskey="n" href="#TeX-support">TeX support</a>,
Previous: <a rel="previous" accesskey="p" href="#Installation">Installation</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">3 Path searching</h2>
<p><a name="index-path-searching-444"></a>
This chapter describes the generic path searching mechanism Kpathsea
provides. For information about searching for particular file types
(e.g., TeX fonts), see the next chapter.
<ul class="menu">
<li><a accesskey="1" href="#Searching-overview">Searching overview</a>: Basic scheme for searching.
<li><a accesskey="2" href="#Path-sources">Path sources</a>: Where search paths can be defined.
<li><a accesskey="3" href="#Path-expansion">Path expansion</a>: Special constructs in search paths.
<li><a accesskey="4" href="#Filename-database">Filename database</a>: Using an externally-built list to search.
<li><a accesskey="5" href="#Invoking-kpsewhich">Invoking kpsewhich</a>: Standalone path lookup.
</ul>
<div class="node">
<p><hr>
<a name="Searching-overview"></a>
Next: <a rel="next" accesskey="n" href="#Path-sources">Path sources</a>,
Up: <a rel="up" accesskey="u" href="#Path-searching">Path searching</a>
</div>
<h3 class="section">3.1 Searching overview</h3>
<p><a name="index-searching-overview-445"></a><a name="index-path-searching_002c-overview-446"></a><a name="index-overview-of-path-searching-447"></a>
<a name="index-search-path_002c-defined-448"></a>A <dfn>search path</dfn> is a colon-separated list of <dfn>path elements</dfn>,
which are directory names with a few extra frills. A search path can
come from (a combination of) many sources; see below. To look up a file
`<samp><span class="samp">foo</span></samp>' along a path `<samp><span class="samp">.:/dir</span></samp>', Kpathsea checks each element of
the path in turn: first <samp><span class="file">./foo</span></samp>, then <samp><span class="file">/dir/foo</span></samp>, returning
the first match (or possibly all matches).
<p><a name="index-magic-characters-449"></a><a name="index-g_t_003a-_0040r_007bmay-not-be-_003a_007d-450"></a><a name="index-g_t_002f-_0040r_007bmay-not-be-_002f_007d-451"></a>The “colon” and “slash” mentioned here aren't necessarily `<samp><span class="samp">:</span></samp>'
and `<samp><span class="samp">/</span></samp>' on non-Unix systems. Kpathsea tries to adapt to other
operating systems' conventions.
<p><a name="index-database-search-452"></a><a name="index-searching-the-database-453"></a>To check a particular path element <var>e</var>, Kpathsea first sees if a
prebuilt database (see <a href="#Filename-database">Filename database</a>) applies to <var>e</var>, i.e.,
if the database is in a directory that is a prefix of <var>e</var>. If so,
the path specification is matched against the contents of the database.
<p><a name="index-floating-directories-454"></a><a name="index-filesystem-search-455"></a><a name="index-disk-search-456"></a><a name="index-searching-the-disk-457"></a>If the database does not exist, or does not apply to this path element,
or contains no matches, the filesystem is searched (if this was not
forbidden by the specification with `<samp><span class="samp">!!</span></samp>' and if the file being
searched for must exist). Kpathsea constructs the list of directories
that correspond to this path element, and then checks in each for the
file being searched for. (To help speed future lookups of files in the
same directory, the directory in which a file is found is floated to the
top of the directory list.)
<p><a name="index-must-exist-458"></a><a name="index-VF-files_002c-not-found-459"></a><a name="index-cmr10_002evf-460"></a><a name="index-g_t_005copenin-461"></a>The “file must exist” condition comes into play with VF files and
input files read by the TeX `<samp><span class="samp">\openin</span></samp>' command. These files may
not exist (consider <samp><span class="file">cmr10.vf</span></samp>), and so it would be wrong to search
the disk for them. Therefore, if you fail to update <samp><span class="file">ls-R</span></samp> when
you install a new VF file, it will never be found.
<p>Each path element is checked in turn: first the database, then the disk.
If a match is found, the search stops and the result is returned. This
avoids possibly-expensive processing of path specifications that are
never needed on a particular run. (Unless the search explicitly
requested all matches.)
<p><a name="index-expansion_002c-path-element-462"></a>Although the simplest and most common path element is a directory name,
Kpathsea supports additional features in search paths: layered default
values, environment variable names, config file values, users' home
directories, and recursive subdirectory searching. Thus, we say that
Kpathsea <dfn>expands</dfn> a path element, meaning transforming all the
magic specifications into the basic directory name or names. This
process is described in the sections below. It happens in the same
order as the sections.
<p><a name="index-absolute-filenames-463"></a><a name="index-relative-filenames-464"></a><a name="index-explicitly-relative-filenames-465"></a><a name="index-filenames_002c-absolute-or-explicitly-relative-466"></a>Exception to all of the above: If the filename being searched for is
absolute or explicitly relative, i.e., starts with `<samp><span class="samp">/</span></samp>' or `<samp><span class="samp">./</span></samp>'
or `<samp><span class="samp">../</span></samp>', Kpathsea simply checks if that file exists.
<p><a name="index-permission-denied-467"></a><a name="index-unreadable-files-468"></a><a name="index-access-warnings-469"></a><a name="index-warnings_002c-file-access-470"></a><a name="index-lost_002bfound-_0040r_007bdirectory_007d-471"></a><a name="index-TEX_005fHUSH-472"></a>Ordinarily, if Kpathsea tries to access a file or directory that cannot
be read, it gives a warning. This is so you will be alerted to
directories or files that accidentally lack read permission (for
example, a <samp><span class="file">lost+found</span></samp>). If you prefer not to see these warnings,
include the value `<samp><span class="samp">readable</span></samp>' in the <code>TEX_HUSH</code> environment
variable or config file value.
<p>This generic path searching algorithm is implemented in
<samp><span class="file">kpathsea/pathsearch.c</span></samp>. It is employed by a higher-level
algorithm when searching for a file of a particular type (see <a href="#File-lookup">File lookup</a>, and <a href="#Glyph-lookup">Glyph lookup</a>).
<div class="node">
<p><hr>
<a name="Path-sources"></a>
Next: <a rel="next" accesskey="n" href="#Path-expansion">Path expansion</a>,
Previous: <a rel="previous" accesskey="p" href="#Searching-overview">Searching overview</a>,
Up: <a rel="up" accesskey="u" href="#Path-searching">Path searching</a>
</div>
<h3 class="section">3.2 Path sources</h3>
<p><a name="index-path-sources-473"></a><a name="index-sources-for-search-paths-474"></a>
A search path can come from many sources. In the order in which
Kpathsea uses them:
<ol type=1 start=1>
<li><a name="index-environment-variable_002c-source-for-path-475"></a>A user-set environment variable, e.g., <code>TEXINPUTS</code>.
Environment variables with an underscore and the program name appended
override; for example, <code>TEXINPUTS_latex</code> overrides <code>TEXINPUTS</code>
if the program being run is named `<samp><span class="samp">latex</span></samp>'.
<li>A program-specific configuration file, e.g., an `<samp><span class="samp">S /a:/b</span></samp>' line in
Dvips' <samp><span class="file">config.ps</span></samp> (see <a href="dvips.html#Config-files">Config files</a>).
<li><a name="index-configuration-file_002c-source-for-path-476"></a><a name="index-Kpathsea-config-file_002c-source-for-path-477"></a><a name="index-texmf_002ecnf_0040r_007b_002c-source-for-path_007d-478"></a>A line in a Kpathsea configuration file <samp><span class="file">texmf.cnf</span></samp>, e.g.,
`<samp><span class="samp">TEXINPUTS=/c:/d</span></samp>' (see below).
<li><a name="index-compilation-value_002c-source-for-path-479"></a>The compile-time default (specified in <samp><span class="file">kpathsea/paths.h</span></samp>).
</ol>
<p>You can see each of these values for a given search path by using the
debugging options (see <a href="#Debugging">Debugging</a>).
<p>These sources may be combined via default expansion (see <a href="#Default-expansion">Default expansion</a>).
<ul class="menu">
<li><a accesskey="1" href="#Config-files">Config files</a>: Kpathsea's runtime config files (texmf.cnf).
</ul>
<div class="node">
<p><hr>
<a name="Config-files"></a>
Up: <a rel="up" accesskey="u" href="#Path-sources">Path sources</a>
</div>
<h4 class="subsection">3.2.1 Config files</h4>
<p><a name="index-config-files-480"></a><a name="index-texmf_002ecnf_0040r_007b_002c-definition-for_007d-481"></a>
<a name="index-runtime-configuration-files-482"></a><a name="index-TEXMFCNF-483"></a>As mentioned above, Kpathsea reads <dfn>runtime configuration files</dfn>
named <samp><span class="file">texmf.cnf</span></samp> for search path and other definitions. The
search path used to look for these configuration files is named
<code>TEXMFCNF</code>, and is constructed in the usual way, as described
above, except that configuration files cannot be used to define the
path, naturally; also, an <samp><span class="file">ls-R</span></samp> database is not used to search for
them.
<p>Kpathsea reads <em>all</em> <samp><span class="file">texmf.cnf</span></samp> files in the search path, not
just the first one found; definitions in earlier files override those in
later files. Thus, if the search path is `<samp><span class="samp">.:$TEXMF</span></samp>', values from
<samp><span class="file">./texmf.cnf</span></samp> override those from <samp><span class="file">$TEXMF/texmf.cnf</span></samp>.
<p>While (or instead of) reading this description, you may find it helpful
to look at the distributed <samp><span class="file">texmf.cnf</span></samp>, which uses or at least
mentions most features. The format of <samp><span class="file">texmf.cnf</span></samp> files follows:
<ul>
<li><a name="index-comments_002c-in-_0040file_007btexmf_002ecnf_007d-484"></a>Comments start with `<samp><span class="samp">%</span></samp>' and continue to the end of the line.
<li><a name="index-blank-lines_002c-in-_0040file_007btexmf_002ecnf_007d-485"></a>Blank lines are ignored.
<li><a name="index-backslash_002dnewline-486"></a><a name="index-continuation-character-487"></a><a name="index-whitespace_002c-not-ignored-on-continuation-lines-488"></a><a name="index-g_t_005c_0040r_007b_002c-line-continuation-in-_0040file_007btexmf_002ecnf_007d_007d-489"></a>A `<samp><span class="samp">\</span></samp>' at the end of a line acts as a continuation character, i.e.,
the next line is appended. Whitespace at the beginning of continuation
lines is not ignored.
<li>Each remaining line must look like
<pre class="example"> <var>variable</var> <span class="roman">[</span>. <var>progname</var><span class="roman">]</span> <span class="roman">[</span>=<span class="roman">]</span> <var>value</var>
</pre>
<p class="noindent">where the `<samp><span class="samp">=</span></samp>' and surrounding whitespace is optional.
<li><a name="index-identifiers_002c-characters-valid-in-490"></a>The <var>variable</var> name may contain any character other than whitespace,
`<samp><span class="samp">=</span></samp>', or `<samp><span class="samp">.</span></samp>', but sticking to `<samp><span class="samp">A-Za-z_</span></samp>' is safest.
<li>If `<samp><span class="samp">.</span><var>progname</var></samp>' is present, the definition only
applies if the program that is running is named (i.e., the last
component of <code>argv[0]</code> is) <var>progname</var> or
<samp><var>progname</var><span class="file">.exe</span></samp>. This allows different flavors of TeX to
have different search paths, for example.
<li><a name="index-right_002dhand-side-of-variable-assignments-491"></a><var>value</var> may contain any characters except `<samp><span class="samp">%</span></samp>' and `<samp><span class="samp">@</span></samp>'.
(These restrictions are only necessary because of the processing done on
<samp><span class="file">texmf.cnf</span></samp> at build time, so you can stick those characters in
after installation if you have to.) The `<samp><span class="samp">$</span><var>var</var><span class="samp">.</span><var>prog</var></samp>'
feature is not available on the right-hand side; instead, you must use
an additional variable (see below for example). A `<samp><span class="samp">;</span></samp>' in
<var>value</var> is translated to `<samp><span class="samp">:</span></samp>' if running under Unix; this is
useful to write a single <samp><span class="file">texmf.cnf</span></samp> which can be used under both
Unix and NT.
<li>All definitions are read before anything is expanded, so you can
use variables before they are defined (like Make, unlike most other
programs).
</ul>
<p class="noindent">Here is a configuration file fragment illustrating most of
these points:
<pre class="example"> % TeX input files -- i.e., anything to be found by \input or \openin ...
latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex//
latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex//
TEXINPUTS = .:$TEXMF/tex//
TEXINPUTS.latex209 = $latex209_inputs
TEXINPUTS.latex2e = $latex2e_inputs
TEXINPUTS.latex = $latex2e_inputs
</pre>
<p><a name="index-shell-scripts-as-configuration-files-492"></a><a name="index-configuration-files-as-shell-scripts_002e-493"></a>Although this format has obvious similarities to Bourne shell
scripts—change the comment character to <code>#</code>, disallow spaces
around the <code>=</code>, and get rid of the <code>.</code><var>name</var> convention,
and it could be run through the shell. But there seemed little
advantage to doing this, since all the information would have to passed
back to Kpathsea and parsed there anyway, since the <code>sh</code> process
couldn't affect its parent's environment.
<p><a name="index-cnf_002ec-494"></a>The implementation of all this is in <samp><span class="file">kpathsea/cnf.c</span></samp>.
<div class="node">
<p><hr>
<a name="Path-expansion"></a>
Next: <a rel="next" accesskey="n" href="#Filename-database">Filename database</a>,
Previous: <a rel="previous" accesskey="p" href="#Path-sources">Path sources</a>,
Up: <a rel="up" accesskey="u" href="#Path-searching">Path searching</a>
</div>
<h3 class="section">3.3 Path expansion</h3>
<p><a name="index-path-expansion-495"></a><a name="index-expansion_002c-search-path-496"></a>
Kpathsea recognizes certain special characters and constructions in
search paths, similar to that in shells. As a general example:
`<samp><span class="samp">~$USER/{foo,bar}//baz</span></samp>' expands to all subdirectories under
directories <samp><span class="file">foo</span></samp> and <samp><span class="file">bar</span></samp> in <tt>$USER</tt>'s home directory that
contain a directory or file <samp><span class="file">baz</span></samp>. These expansions are explained
in the sections below.
<ul class="menu">
<li><a accesskey="1" href="#Default-expansion">Default expansion</a>: a: or :a or a::b expands to a default.
<li><a accesskey="2" href="#Variable-expansion">Variable expansion</a>: $foo and ${foo} expand to environment values.
<li><a accesskey="3" href="#Tilde-expansion">Tilde expansion</a>: ~ and ~user expand to home directories.
<li><a accesskey="4" href="#Brace-expansion">Brace expansion</a>: a{foo,bar}b expands to afoob abarb.
<li><a accesskey="5" href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a>: . is replaced with $KPSE_DOT if it is defined.
<li><a accesskey="6" href="#Subdirectory-expansion">Subdirectory expansion</a>: a// and a//b recursively expand to subdirs.
</ul>
<div class="node">
<p><hr>
<a name="Default-expansion"></a>
Next: <a rel="next" accesskey="n" href="#Variable-expansion">Variable expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-expansion">Path expansion</a>
</div>
<h4 class="subsection">3.3.1 Default expansion</h4>
<p><a name="index-g_t_003a_003a-_0040r_007bexpansion_007d-497"></a><a name="index-doubled-colons-498"></a><a name="index-leading-colons-499"></a><a name="index-trailing-colons-500"></a><a name="index-extra-colons-501"></a><a name="index-default-expansion-502"></a><a name="index-expansion_002c-default-503"></a>
If the highest-priority search path (see <a href="#Path-sources">Path sources</a>) contains an
<dfn>extra colon</dfn> (i.e., leading, trailing, or doubled), Kpathsea
inserts at that point the next-highest-priority search path that is
defined. If that inserted path has an extra colon, the same happens
with the next-highest. (An extra colon in the compile-time default
value has unpredictable results, so installers beware.)
<p>For example, given an environment variable setting
<pre class="example"> setenv TEXINPUTS /home/karl:
</pre>
<p class="noindent">and a <code>TEXINPUTS</code> value from <samp><span class="file">texmf.cnf</span></samp> of
<pre class="example"> .:$TEXMF//tex
</pre>
<p class="noindent">then the final value used for searching will be:
<pre class="example"> /home/karl:.:$TEXMF//tex
</pre>
<p>Put another way, default expansion works on “formats” (search
paths), and not directly on environment variables. Example, showing
the trailing `<samp><span class="samp">:</span></samp>' ignored in the first case and expanded in the second:
<pre class="example"> $ env TTFONTS=/tmp: kpsewhich --expand-path '$TTFONTS'
/tmp
$ env TTFONTS=/tmp: kpsewhich --show-path=.ttf
/tmp:.:/home/olaf/texmf/fonts/truetype//:...
</pre>
<p>Since Kpathsea looks for multiple configuration files, it would be
natural to expect that (for example) an extra colon in
<samp><span class="file">./texmf.cnf</span></samp> would expand to the path in <samp><span class="file">$TEXMF/texmf.cnf</span></samp>.
Or, with Dvips' configuration files, that an extra colon in
<samp><span class="file">config.$PRINTER</span></samp> would expand to the path in <samp><span class="file">config.ps</span></samp>.
This doesn't happen. It's not clear this would be desirable in all
cases, and trying to devise a way to specify the path to which the extra
colon should expand seemed truly baroque.
<a name="index-Bach_002c-Johann-Sebastian-504"></a>
Technicality: Since it would be useless to insert the default value in
more than one place, Kpathsea changes only one extra `<samp><span class="samp">:</span></samp>' and leaves
any others in place (they will eventually be ignored). Kpathsea checks
first for a leading `<samp><span class="samp">:</span></samp>', then a trailing `<samp><span class="samp">:</span></samp>', then a doubled
`<samp><span class="samp">:</span></samp>'.
<p><a name="index-kdefault_002ec-505"></a>You can trace this by debugging “paths” (see <a href="#Debugging">Debugging</a>).
Default expansion is implemented in the source file
<samp><span class="file">kpathsea/kdefault.c</span></samp>.
<div class="node">
<p><hr>
<a name="Variable-expansion"></a>
Next: <a rel="next" accesskey="n" href="#Tilde-expansion">Tilde expansion</a>,
Previous: <a rel="previous" accesskey="p" href="#Default-expansion">Default expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-expansion">Path expansion</a>
</div>
<h4 class="subsection">3.3.2 Variable expansion</h4>
<p><a name="index-g_t_0024-_0040r_007bexpansion_007d-506"></a><a name="index-environment-variables-in-paths-507"></a><a name="index-variable-expansion-508"></a><a name="index-expansion_002c-variable-509"></a><a name="index-texmf_002ecnf_0040r_007b_002c-and-variable-expansion_007d-510"></a>
`<samp><span class="samp">$foo</span></samp>' or `<samp><span class="samp">${foo}</span></samp>' in a path element is replaced by (1) the
value of an environment variable `<samp><span class="samp">foo</span></samp>' (if defined); (2) the value
of `<samp><span class="samp">foo</span></samp>' from <samp><span class="file">texmf.cnf</span></samp> (if defined); (3) the empty string.
<p>If the character after the `<samp><span class="samp">$</span></samp>' is alphanumeric or `<samp><span class="samp">_</span></samp>', the
variable name consists of all consecutive such characters. If the
character after the `<samp><span class="samp">$</span></samp>' is a `<samp><span class="samp">{</span></samp>', the variable name consists
of everything up to the next `<samp><span class="samp">}</span></samp>' (braces may not be nested around
variable names). Otherwise, Kpathsea gives a warning and ignores the
`<samp><span class="samp">$</span></samp>' and its following character.
<p><a name="index-quoting-variable-values-511"></a><a name="index-shell-variables-512"></a>You must quote the <tt>$</tt>'s and braces as necessary for your shell.
<em>Shell</em> variable values cannot be seen by Kpathsea, i.e., ones
defined by <code>set</code> in C shells and without <code>export</code> in Bourne
shells.
<p>For example, given
<pre class="example"> setenv tex /home/texmf
setenv TEXINPUTS .:$tex:${tex}prev
</pre>
<p class="noindent">the final <code>TEXINPUTS</code> path is the three directories:
<pre class="example"> .:/home/texmf:/home/texmfprev
</pre>
<p>The `<samp><span class="samp">.</span><var>progname</var></samp>' suffix on variables and
`<samp><span class="samp">_</span><var>progname</var></samp>' on environment variable names are not implemented
for general variable expansions. These are only recognized when search
paths are initialized (see <a href="#Path-sources">Path sources</a>).
<p><a name="index-variable_002ec-513"></a>Variable expansion is implemented in the source file
<samp><span class="file">kpathsea/variable.c</span></samp>.
<div class="node">
<p><hr>
<a name="Tilde-expansion"></a>
Next: <a rel="next" accesskey="n" href="#Brace-expansion">Brace expansion</a>,
Previous: <a rel="previous" accesskey="p" href="#Variable-expansion">Variable expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-expansion">Path expansion</a>
</div>
<h4 class="subsection">3.3.3 Tilde expansion</h4>
<p><a name="index-g_t_007e-_0040r_007bexpansion_007d-514"></a><a name="index-home-directories-in-paths-515"></a><a name="index-tilde-expansion-516"></a><a name="index-expansion_002c-tilde-517"></a>
<a name="index-HOME_0040r_007b_002c-as-_007e-expansion_007d-518"></a>A leading `<samp><span class="samp">~</span></samp>' in a path element is replaced by the value of the
environment variable <code>HOME</code>, or <samp><span class="file">.</span></samp> if <code>HOME</code> is not set.
<p>A leading `<samp><span class="samp">~</span><var>user</var></samp>' in a path element is replaced by
<var>user</var>'s home directory from the system <samp><span class="file">passwd</span></samp> database.
<p>For example,
<pre class="example"> setenv TEXINPUTS ~/mymacros:
</pre>
<p class="noindent">will prepend a directory <samp><span class="file">mymacros</span></samp> in your home
directory to the default path.
<p><a name="index-g_t_0040t_007broot_007d-user-519"></a><a name="index-trailing-_0040samp_007b_002f_007d-in-home-directory-520"></a><a name="index-g_t_002f_0040r_007b_002c-trailing-in-home-directory_007d-521"></a>As a special case, if a home directory ends in `<samp><span class="samp">/</span></samp>', the trailing
slash is dropped, to avoid inadvertently creating a `<samp><span class="samp">//</span></samp>' construct
in the path. For example, if the home directory of the user `<samp><span class="samp">root</span></samp>'
is `<samp><span class="samp">/</span></samp>', the path element `<samp><span class="samp">~root/mymacros</span></samp>' expands to just
`<samp><span class="samp">/mymacros</span></samp>', not `<samp><span class="samp">//mymacros</span></samp>'.
<p><a name="index-tilde_002ec-522"></a>Tilde expansion is implemented in the source file <samp><span class="file">kpathsea/tilde.c</span></samp>.
<div class="node">
<p><hr>
<a name="Brace-expansion"></a>
Next: <a rel="next" accesskey="n" href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a>,
Previous: <a rel="previous" accesskey="p" href="#Tilde-expansion">Tilde expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-expansion">Path expansion</a>
</div>
<h4 class="subsection">3.3.4 Brace expansion</h4>
<p><a name="index-g_t_0040_007b-_0040r_007bexpansion_007d-523"></a><a name="index-brace-expansion-524"></a>
`<samp><span class="samp">x{</span><var>a</var><span class="samp">,</span><var>b</var><span class="samp">}y</span></samp>' expands to `<samp><span class="samp">x</span><var>a</var><span class="samp">y:x</span><var>b</var><span class="samp">y</span></samp>'.
For example:
<pre class="example"> foo/{1,2}/baz
</pre>
<p class="noindent">expands to `<samp><span class="samp">foo/1/baz:foo/2/baz</span></samp>'. `<samp><span class="samp">:</span></samp>' is the path
separator on the current system; e.g., on a DOS system, it's `<samp><span class="samp">;</span></samp>'.
<p>Braces can be nested; for example, `<samp><span class="samp">x{A,B{1,2}}y</span></samp>' expands to
`<samp><span class="samp">xAy:xB1y:xB2y</span></samp>'.
<p>Multiple non-nested braces are expanded from right to left; for example,
`<samp><span class="samp">x{A,B}{1,2}y</span></samp>' expands to `<samp><span class="samp">x{A,B}1y:x{A,B}2y</span></samp>', which
expands to `<samp><span class="samp">xA1y:xB1y:xA2y:xB2y</span></samp>'.
<p><a name="index-multiple-_0040TeX_007b_007d-hierarchies-525"></a>This feature can be used to implement multiple TeX hierarchies, by
assigning a brace list to <code>$TEXMF</code>, as mentioned in
<samp><span class="file">texmf.in</span></samp>.
<p>You can also use the path separator in stead of the comma. The last
example could have been written `<samp><span class="samp">x{A:B}{1:2}y</span></samp>'.
<p><a name="index-expand_002ec-526"></a>Brace expansion is implemented in the source file
<samp><span class="file">kpathsea/expand.c</span></samp>. It is a modification of the Bash sources, and
is thus covered by the GNU General Public License, rather than the
Library General Public License that covers the rest of Kpathsea.
<div class="node">
<p><hr>
<a name="KPSE_DOT-expansion"></a>
<a name="KPSE_005fDOT-expansion"></a>
Next: <a rel="next" accesskey="n" href="#Subdirectory-expansion">Subdirectory expansion</a>,
Previous: <a rel="previous" accesskey="p" href="#Brace-expansion">Brace expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-expansion">Path expansion</a>
</div>
<h4 class="subsection">3.3.5 <code>KPSE_DOT</code> expansion</h4>
<p><a name="index-KPSE_005fDOT-_0040r_007bexpansion_007d-527"></a>
When <code>KPSE_DOT</code> is defined in the environment, it names a directory
that should be considered the current directory for the purpose of
looking up files in the search paths. This feature is needed by the
`<samp><span class="samp">mktex...</span></samp>' scripts <a href="#mktex-scripts">mktex scripts</a>, because these
change the working directory. You should not ever define it yourself.
<div class="node">
<p><hr>
<a name="Subdirectory-expansion"></a>
Previous: <a rel="previous" accesskey="p" href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-expansion">Path expansion</a>
</div>
<h4 class="subsection">3.3.6 Subdirectory expansion</h4>
<p><a name="index-g_t_002f_002f-528"></a><a name="index-subdirectory-searching-529"></a><a name="index-expansion_002c-subdirectory-530"></a>
<a name="index-alphabetical-order_002c-not-531"></a>Two or more consecutive slashes in a path element following a directory
<var>d</var> is replaced by all subdirectories of <var>d</var>: first those
subdirectories directly under <var>d</var>, then the subsubdirectories under
those, and so on. At each level, the order in which the directories are
searched is unspecified. (It's “directory order”, and definitely not
alphabetical.)
<p>If you specify any filename components after the `<samp><span class="samp">//</span></samp>', only
subdirectories which match those components are included. For example,
`<samp><span class="samp">/a//b</span></samp>' would expand into directories <samp><span class="file">/a/1/b</span></samp>, <samp><span class="file">/a/2/b</span></samp>,
<samp><span class="file">/a/1/1/b</span></samp>, and so on, but not <samp><span class="file">/a/b/c</span></samp> or <samp><span class="file">/a/1</span></samp>.
<p>You can include multiple `<samp><span class="samp">//</span></samp>' constructs in the path.
<p>`<samp><span class="samp">//</span></samp>' at the beginning of a path is ignored; you didn't really want
to search every directory on the system, did you?
<p><a name="index-trick-for-detecting-leaf-directories-532"></a><a name="index-leaf-directory-trick-533"></a><a name="index-Farwell_002c-Matthew-534"></a><a name="index-MacKenzie_002c-David-535"></a>I should mention one related implementation trick, which I took from GNU
find. Matthew Farwell suggested it, and David MacKenzie implemented it.
<p><a name="index-st_005fnlink-536"></a>The trick is that in every real Unix implementation (as opposed to the
POSIX specification), a directory which contains no subdirectories will
have exactly two links (namely, one for <samp><span class="file">.</span></samp> and one for <samp><span class="file">..</span></samp>).
That is to say, the <code>st_nlink</code> field in the `<samp><span class="samp">stat</span></samp>' structure
will be two. Thus, we don't have to stat everything in the bottom-level
(leaf) directories—we can just check <code>st_nlink</code>, notice it's two,
and do no more work.
<p>But if you have a directory that contains a single subdirectory and 500
regular files, <code>st_nlink</code> will be 3, and Kpathsea has to stat every
one of those 501 entries. Therein lies slowness.
<p><a name="index-UNIX_005fST_005fLINK-537"></a>You can disable the trick by undefining <code>UNIX_ST_LINK</code> in
<samp><span class="file">kpathsea/config.h</span></samp>. (It is undefined by default except under Unix.)
<p><a name="index-elt_002ddirs_002ec-538"></a>Unfortunately, in some cases files in leaf directories are
<code>stat</code>'d: if the path specification is, say,
`<samp><span class="samp">$TEXMF/fonts//pk//</span></samp>', then files in a subdirectory
`<samp><span class="samp">.../pk</span></samp>', even if it is a leaf, are checked. The reason cannot
be explained without reference to the implementation, so read
<samp><span class="file">kpathsea/elt-dirs.c</span></samp> (search for `<samp><span class="samp">may descend</span></samp>') if you are
curious. And if you can find a way to <em>solve</em> the problem, please
let me know.
<p><a name="index-elt_002ddirs_002ec-539"></a>Subdirectory expansion is implemented in the source file
<samp><span class="file">kpathsea/elt-dirs.c</span></samp>.
<div class="node">
<p><hr>
<a name="Filename-database"></a>
Next: <a rel="next" accesskey="n" href="#Invoking-kpsewhich">Invoking kpsewhich</a>,
Previous: <a rel="previous" accesskey="p" href="#Path-expansion">Path expansion</a>,
Up: <a rel="up" accesskey="u" href="#Path-searching">Path searching</a>
</div>
<h3 class="section">3.4 Filename database (<code>ls-R</code>)</h3>
<p><a name="index-filename-database-540"></a><a name="index-database_002c-for-filenames-541"></a><a name="index-externally_002dbuilt-filename-database-542"></a>
Kpathsea goes to some lengths to minimize disk accesses for searches
(see <a href="#Subdirectory-expansion">Subdirectory expansion</a>). Nevertheless, at installations with
enough directories, searching each possible directory for a given file
can take an excessively long time (depending on the speed of the disk,
whether it's NFS-mounted, how patient you are, etc.).
<p>In practice, a font tree containing the standard PostScript and PCL
fonts is large enough for searching to be noticeably slow on typical
systems these days. Therefore, Kpathsea can use an externally-built
“database” file named <samp><span class="file">ls-R</span></samp> that maps files to directories, thus
avoiding the need to exhaustively search the disk.
<p>A second database file <samp><span class="file">aliases</span></samp> allows you to give additional
names to the files listed in <samp><span class="file">ls-R</span></samp>. This can be helpful to adapt
to “8.3” filename conventions in source files.
<p>The <samp><span class="file">ls-R</span></samp> and <samp><span class="file">aliases</span></samp> features are implemented in the
source file <samp><span class="file">kpathsea/db.c</span></samp>.
<ul class="menu">
<li><a accesskey="1" href="#ls_002dR">ls-R</a>: The main filename database.
<li><a accesskey="2" href="#Filename-aliases">Filename aliases</a>: Aliases for those names.
<li><a accesskey="3" href="#Database-format">Database format</a>: Syntax details of the database file.
</ul>
<div class="node">
<p><hr>
<a name="ls-R"></a>
<a name="ls_002dR"></a>
Next: <a rel="next" accesskey="n" href="#Filename-aliases">Filename aliases</a>,
Up: <a rel="up" accesskey="u" href="#Filename-database">Filename database</a>
</div>
<h4 class="subsection">3.4.1 <samp><span class="file">ls-R</span></samp></h4>
<p><a name="index-ls_002dR-_0040r_007bdatabase-file_007d-543"></a><a name="index-TEXMFDBS-544"></a>
As mentioned above, you must name the main filename database
<samp><span class="file">ls-R</span></samp>. You can put one at the root of each TeX installation
hierarchy you wish to search (<code>$TEXMF</code> by default); most sites have
only one hierarchy. Kpathsea looks for <samp><span class="file">ls-R</span></samp> files along the
<code>TEXMFDBS</code> path, so that should presumably match the list of
hierarchies.
<p>The recommended way to create and maintain `<samp><span class="samp">ls-R</span></samp>' is to run the
<code>mktexlsr</code> script, which is installed in `<samp><span class="samp">$(bindir)</span></samp>'
(<samp><span class="file">/usr/local/bin</span></samp> by default). That script goes to some trouble to
follow symbolic links as necessary, etc. It's also invoked by the
distributed `<samp><span class="samp">mktex...</span></samp>' scripts.
<p><a name="index-ls_002dR_0040r_007b_002c-simplest-build_007d-545"></a>At its simplest, though, you can build <samp><span class="file">ls-R</span></samp> with the command
<pre class="example"> cd <var>/your/texmf/root</var> && ls -LAR ./ >ls-R
</pre>
<p class="noindent"><a name="index-g_t_002d_002dcolor_003dtty-546"></a><a name="index-g_t_002fetc_002fprofile-_0040r_007band-aliases_007d-547"></a>presuming your <code>ls</code> produces the right output format (see the
section below). GNU <code>ls</code>, for example, outputs in this format.
Also presuming your <code>ls</code> hasn't been aliased in a system file
(e.g., <samp><span class="file">/etc/profile</span></samp>) to something problematic, e.g., `<samp><span class="samp">ls
--color=tty</span></samp>'. In that case, you will have to disable the alias before
generating <samp><span class="file">ls-R</span></samp>. For the precise definition of the file format,
see <a href="#Database-format">Database format</a>.
<p>Regardless of whether you use the supplied script or your own, you will
almost certainly want to invoke it via <code>cron</code>, so when you make
changes in the installed files (say if you install a new LaTeX
package), <samp><span class="file">ls-R</span></samp> will be automatically updated.
<p><a name="index-g_t_002dA-_0040r_007boption-to-_0040code_007bls_007d_007d-548"></a><a name="index-dot-files-549"></a><a name="index-g_t_002e-_0040r_007bfiles_007d-550"></a><a name="index-g_t_002e-_0040r_007bdirectories_002c-ignored_007d-551"></a><a name="index-g_t_002etex-_0040r_007bfile_002c-included-in-_0040file_007bls_002dR_007d_007d-552"></a>The `<samp><span class="samp">-A</span></samp>' option to <code>ls</code> includes files beginning with `<samp><span class="samp">.</span></samp>'
(except for <samp><span class="file">.</span></samp> and <samp><span class="file">..</span></samp>), such as the file <samp><span class="file">.tex</span></samp>
included with the LaTeX tools package. (On the other hand,
<em>directories</em> whose names begin with `<samp><span class="samp">.</span></samp>' are always ignored.)
<p><a name="index-symbolic-links_002c-and-_0040file_007bls_002dR_007d-553"></a><a name="index-g_t_002dL-_0040r_007boption-to-_0040code_007bls_007d_007d-554"></a>If your system does not support symbolic links, omit the `<samp><span class="samp">-L</span></samp>'.
<p><a name="index-automounter_002c-and-_0040file_007bls_002dR_007d-555"></a><a name="index-NFS-and-_0040file_007bls_002dR_007d-556"></a><code>ls -LAR </code><var>/your/texmf/root</var> will also work. But using
`<samp><span class="samp">./</span></samp>' avoids embedding absolute pathnames, so the hierarchy can be
easily transported. It also avoids possible trouble with automounters
or other network filesystem conventions.
<p><a name="index-warning-about-unusable-_0040file_007bls_002dR_007d-557"></a><a name="index-unusable-_0040file_007bls_002dR_007d-warning-558"></a>Kpathsea warns you if it finds an <samp><span class="file">ls-R</span></samp> file, but the file does
not contain any usable entries. The usual culprit is running plain
`<samp><span class="samp">ls -R</span></samp>' instead of `<samp><span class="samp">ls -LR ./</span></samp>' or `<samp><span class="samp">ls -R
</span><var>/your/texmf/root</var></samp>'. Another possibility is some system directory
name starting with a `<samp><span class="samp">.</span></samp>' (perhaps if you are using AFS); Kpathsea
ignores everything under such directories.
<p><a name="index-g_t_0021_0021-_0040r_007bin-path-specifications_007d-559"></a><a name="index-disk-searching_002c-avoiding-560"></a>Because the database may be out-of-date for a particular run, if a file
is not found in the database, by default Kpathsea goes ahead and
searches the disk. If a particular path element begins with `<samp><span class="samp">!!</span></samp>',
however, <em>only</em> the database will be searched for that element,
never the disk. If the database does not exist, nothing will be
searched. Because this can surprise users (“I see the font
<samp><span class="file">foo.tfm</span></samp> when I do an <code>ls</code>; why can't Dvips find it?”), it
is not in any of the default search paths.
<div class="node">
<p><hr>
<a name="Filename-aliases"></a>
Next: <a rel="next" accesskey="n" href="#Database-format">Database format</a>,
Previous: <a rel="previous" accesskey="p" href="#ls_002dR">ls-R</a>,
Up: <a rel="up" accesskey="u" href="#Filename-database">Filename database</a>
</div>
<h4 class="subsection">3.4.2 Filename aliases</h4>
<p><a name="index-filename-aliases-561"></a><a name="index-aliases_002c-for-filenames-562"></a>
In some circumstances, you may wish to find a file under several names.
For example, suppose a TeX document was created using a DOS system
and tries to read <samp><span class="file">longtabl.sty</span></samp>. But now it's being run on a Unix
system, and the file has its original name, <samp><span class="file">longtable.sty</span></samp>. The
file won't be found. You need to give the actual file
<samp><span class="file">longtable.sty</span></samp> an alias `<samp><span class="samp">longtabl.sty</span></samp>'.
<!-- As another example, suppose you are creating a @TeX{} distribution on a -->
<!-- CD-ROM or a DOS system; then the file @file{mf.base} gets stored as -->
<!-- @file{mf.bas}. But Metafont on Unix wants to find @file{mf.base}. Here -->
<!-- you need to give the actual file @file{mf.bas} an alias @samp{mf.base}. -->
<p>You can handle this by creating a file <samp><span class="file">aliases</span></samp> as a companion to
the <samp><span class="file">ls-R</span></samp> for the hierarchy containing the file in question. (You
must have an <samp><span class="file">ls-R</span></samp> for the alias feature to work.)
<p>The format of <samp><span class="file">aliases</span></samp> is simple: two whitespace-separated words
per line; the first is the real name <samp><span class="file">longtable.sty</span></samp>, and second is
the alias (<samp><span class="file">longtabl.sty</span></samp>). These must be base filenames, with no
directory components. <samp><span class="file">longtable.sty</span></samp> must be in the sibling
<samp><span class="file">ls-R</span></samp>.
<p>Also, blank lines and lines starting with `<samp><span class="samp">%</span></samp>' or `<samp><span class="samp">#</span></samp>' are
ignored in <samp><span class="file">aliases</span></samp>, to allow for comments.
<p>If a real file <samp><span class="file">longtabl.sty</span></samp> exists, it is used regardless of any
aliases.
<div class="node">
<p><hr>
<a name="Database-format"></a>
Previous: <a rel="previous" accesskey="p" href="#Filename-aliases">Filename aliases</a>,
Up: <a rel="up" accesskey="u" href="#Filename-database">Filename database</a>
</div>
<h4 class="subsection">3.4.3 Database format</h4>
<p><a name="index-format-of-external-database-563"></a><a name="index-database_002c-format-of-564"></a>
The “database” read by Kpathsea is a line-oriented file of plain
text. The format is that generated by GNU (and most other) <code>ls</code>
programs given the `<samp><span class="samp">-R</span></samp>' option, as follows.
<ul>
<li>Blank lines are ignored.
<li>If a line begins with `<samp><span class="samp">/</span></samp>' or `<samp><span class="samp">./</span></samp>' or `<samp><span class="samp">../</span></samp>' and ends with
a colon, it's the name of a directory. (`<samp><span class="samp">../</span></samp>' lines aren't useful,
however, and should not be generated.)
<li>All other lines define entries in the most recently seen directory.
<tt>/</tt>'s in such lines will produce possibly-strange results.
<li>Files with no preceding directory line are ignored.
</ul>
<p>For example, here's the first few lines of <samp><span class="file">ls-R</span></samp> (which totals
about 30K bytes) on my system:
<pre class="example"> bibtex
dvips
fonts
ls-R
metafont
metapost
tex
web2c
./bibtex:
bib
bst
doc
./bibtex/bib:
asi.bib
btxdoc.bib
...
</pre>
<div class="node">
<p><hr>
<a name="Invoking-kpsewhich"></a>
Previous: <a rel="previous" accesskey="p" href="#Filename-database">Filename database</a>,
Up: <a rel="up" accesskey="u" href="#Path-searching">Path searching</a>
</div>
<h3 class="section">3.5 <code>kpsewhich</code>: Standalone path searching</h3>
<p><a name="index-kpsewhich-565"></a><a name="index-path-searching_002c-standalone-566"></a><a name="index-standalone-path-searching-567"></a>
The Kpsewhich program exercises the path searching functionality
independent of any particular application. This can also be useful as a
sort of <code>find</code> program to locate files in your TeX hierarchies,
perhaps in administrative scripts. It is used heavily in the
distributed `<samp><span class="samp">mktex...</span></samp>' scripts.
<p>Synopsis:
<pre class="example"> kpsewhich <var>option</var>... <var>filename</var>...
</pre>
<p>The options and filename(s) to look up can be intermixed.
Options can start with either `<samp><span class="samp">-</span></samp>' or `<samp><span class="samp">--</span></samp>', and any unambiguous
abbreviation is accepted.
<ul class="menu">
<li><a accesskey="1" href="#Path-searching-options">Path searching options</a>: Changing the mode, resolution, etc.
<li><a accesskey="2" href="#Auxiliary-tasks">Auxiliary tasks</a>: Path and variable expansion.
<li><a accesskey="3" href="#Standard-options">Standard options</a>: --help and --version.
</ul>
<div class="node">
<p><hr>
<a name="Path-searching-options"></a>
Next: <a rel="next" accesskey="n" href="#Auxiliary-tasks">Auxiliary tasks</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-kpsewhich">Invoking kpsewhich</a>
</div>
<h4 class="subsection">3.5.1 Path searching options</h4>
<p><a name="index-path-searching-options-568"></a>
Kpsewhich looks up each non-option argument on the command line as a
filename, and returns the first file found. There is no option to
return all the files with a particular name (you can run the Unix
`<samp><span class="samp">find</span></samp>' utility for that, see <a href="findutils.html#Invoking-find">Invoking find</a>).
<p>Various options alter the path searching behavior:
<dl>
<dt>`<samp><span class="samp">--dpi=</span><var>num</var></samp>'<dd><a name="index-g_t_002d_002ddpi_003d_0040var_007bnum_007d-569"></a><a name="index-g_t_002dD-_0040var_007bnum_007d-570"></a><a name="index-resolution_002c-setting-571"></a>Set the resolution to <var>num</var>; this only affects `<samp><span class="samp">gf</span></samp>' and
`<samp><span class="samp">pk</span></samp>' lookups. `<samp><span class="samp">-D</span></samp>' is a synonym, for compatibility with
Dvips. Default is 600.
<br><dt>`<samp><span class="samp">--engine=</span><var>name</var></samp>'<dd><a name="index-g_t_002d_002dengine_003d_0040var_007bname_007d-572"></a><a name="index-engine-name-573"></a>Set the engine name to <var>name</var>. By default it is not set. The
engine name is used in some search paths to allow files with the same
name but used by different engines to coexist.
<br><dt>`<samp><span class="samp">--format=</span><var>name</var></samp>'<dd><a name="index-g_t_002d_002dformat_003d_0040var_007bname_007d-574"></a>Set the format for lookup to <var>name</var>. By default, the format is
guessed from the filename, with `<samp><span class="samp">tex</span></samp>' being used if nothing else
fits. The recognized filename extensions (including any leading
`<samp><span class="samp">.</span></samp>') are also allowable <var>name</var>s.
<p>All formats also have a name, which is the only way to specify formats
with no associated suffix. For example, for Dvips configuration files
you can use `<samp><span class="samp">--format="dvips config"</span></samp>'. (The quotes are for the
sake of the shell.)
<p>Here's the current list of recognized names and the associated suffixes.
See <a href="#Supported-file-formats">Supported file formats</a>, for more information on each of these.
<pre class="example"> gf: gf
pk: pk
bitmap font
afm: .afm
base: .base
bib: .bib
bst: .bst
cnf: .cnf
ls-R: ls-R
fmt: .fmt
map: .map
mem: .mem
mf: .mf
mfpool: .pool
mft: .mft
mp: .mp
mppool: .pool
MetaPost support
ocp: .ocp
ofm: .ofm .tfm
opl: .opl
otp: .otp
ovf: .ovf
ovp: .ovp
graphic/figure: .eps .epsi
tex: .tex
TeX system documentation
texpool: .pool
TeX system sources
PostScript header/font: .pro
Troff fonts
tfm: .tfm
type1 fonts: .pfa .pfb
vf: .vf
dvips config
ist: .ist
truetype fonts: .ttf .ttc
type42 fonts
web2c files
other text files
other binary files
misc fonts
web: .web
cweb: .w .web
enc: .enc
cmap: .cmap
sfd: .sfd
opentype fonts
pdftex config
lig files: .lig
texmfscripts
</pre>
<p>This option and `<samp><span class="samp">--path</span></samp>' are mutually exclusive.
<br><dt>`<samp><span class="samp">--interactive</span></samp>'<dd><a name="index-g_t_002d_002dinteractive-575"></a><a name="index-interactive-query-576"></a>After processing the command line, read additional filenames to look up
from standard input.
<br><dt>`<samp><span class="samp">-mktex=</span><var>filetype</var></samp>'<dt>`<samp><span class="samp">-no-mktex=</span><var>filetype</var></samp>'<dd><a name="index-g_t_002dmktex_003d_0040var_007bfiletype_007d-577"></a><a name="index-g_t_002dno_002dmktex_003d_0040var_007bfiletype_007d-578"></a>Turn on or off the `<samp><span class="samp">mktex</span></samp>' script associated with <var>filetype</var>.
The only values that make sense for <var>filetype</var> are `<samp><span class="samp">pk</span></samp>',
`<samp><span class="samp">mf</span></samp>', `<samp><span class="samp">tex</span></samp>', and `<samp><span class="samp">tfm</span></samp>'. By default, all are off in
Kpsewhich. See <a href="#mktex-scripts">mktex scripts</a>.
<br><dt>`<samp><span class="samp">--mode=</span><var>string</var></samp>'<dd><a name="index-g_t_002d_002dmode_003d_0040var_007bstring_007d-579"></a>Set the mode name to <var>string</var>; this also only affects `<samp><span class="samp">gf</span></samp>' and
`<samp><span class="samp">pk</span></samp>' lookups. No default: any mode will be found. See <a href="#mktex-script-arguments">mktex script arguments</a>.
<br><dt>`<samp><span class="samp">--must-exist</span></samp>'<dd><a name="index-g_t_002d_002dmust_002dexist-580"></a>Do everything possible to find the files, notably including searching
the disk. By default, only the <samp><span class="file">ls-R</span></samp> database is checked, in the
interest of efficiency.
<br><dt>`<samp><span class="samp">--path=</span><var>string</var></samp>'<dd><a name="index-g_t_002d_002dpath_003d_0040var_007bstring_007d-581"></a>Search along the path <var>string</var> (colon-separated as usual), instead
of guessing the search path from the filename. `<samp><span class="samp">//</span></samp>' and all the
usual expansions are supported (see <a href="#Path-expansion">Path expansion</a>). This option
and `<samp><span class="samp">--format</span></samp>' are mutually exclusive. To output the complete
directory expansion of a path, instead of doing a one-shot lookup, see
`<samp><span class="samp">--expand-path</span></samp>' in the following section.
<br><dt>`<samp><span class="samp">--progname=</span><var>name</var></samp>'<dd><a name="index-g_t_002d_002dprogname_003d_0040var_007bname_007d-582"></a>Set the program name to <var>name</var>; default is `<samp><span class="samp">kpsewhich</span></samp>'. This
can affect the search paths via the `<samp><span class="samp">.</span><var>prognam</var></samp>' feature in
configuration files (see <a href="#Config-files">Config files</a>).
</dl>
<div class="node">
<p><hr>
<a name="Auxiliary-tasks"></a>
Next: <a rel="next" accesskey="n" href="#Standard-options">Standard options</a>,
Previous: <a rel="previous" accesskey="p" href="#Path-searching-options">Path searching options</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-kpsewhich">Invoking kpsewhich</a>
</div>
<h4 class="subsection">3.5.2 Auxiliary tasks</h4>
<p><a name="index-auxiliary-tasks-583"></a>
Kpsewhich provides some additional features not strictly related to path
lookup:
<ul>
<li><a name="index-g_t_002d_002ddebug_003d_0040var_007bnum_007d-584"></a>`<samp><span class="samp">--debug=</span><var>num</var></samp>' sets the debugging options to <var>num</var>.
See <a href="#Debugging">Debugging</a>.
<li><a name="index-g_t_002d_002dvar_002dvalue_003d_0040var_007bvariable_007d-585"></a>`<samp><span class="samp">--var-value=</span><var>variable</var></samp>' output the value of <var>variable</var>.
<li><a name="index-g_t_002d_002dexpand_002dbraces_003d_0040var_007bstring_007d-586"></a>`<samp><span class="samp">--expand-braces=</span><var>string</var></samp>' outputs the variable and brace
expansion of <var>string</var>. See <a href="#Path-expansion">Path expansion</a>.
<li><a name="index-g_t_002d_002dexpand_002dvar_003d_0040var_007bstring_007d-587"></a>`<samp><span class="samp">--expand-var=</span><var>string</var></samp>' outputs the variable expansion of
<var>string</var>. For example, the `<samp><span class="samp">mktex...</span></samp>' scripts run
`<samp><span class="samp">kpsewhich --expand-var='$TEXMF'</span></samp>' to find the root of the TeX system
hierarchy. See <a href="#Path-expansion">Path expansion</a>.
<li><a name="index-g_t_002d_002dexpand_002dpath_003d_0040var_007bstring_007d-588"></a>`<samp><span class="samp">--expand-path=</span><var>string</var></samp>' outputs the complete expansion of
<var>string</var> as a colon-separated path. This is useful to construct a
search path for a program that doesn't accept recursive subdirectory
specifications. Nonexistent directories are culled from the output:
<pre class="example"> $ kpsewhich --expand-path '/tmp'
=> /tmp
$ kpsewhich --expand-path '/nonesuch'
=>
</pre>
<p>For one-shot uses of an arbitrary (not built in to Kpathsea) path, see
`<samp><span class="samp">--path</span></samp>' in the previous section.
<li><a name="index-g_t_002d_002dshow_002dpath_003d_0040var_007bname_007d-589"></a>`<samp><span class="samp">--show-path=</span><var>name</var></samp>' shows the path that would be used for file
lookups of file type <var>name</var>. Either a filename extension
(`<samp><span class="samp">pk</span></samp>', `<samp><span class="samp">.vf</span></samp>', etc.) or an integer can be used, just as with
`<samp><span class="samp">--format</span></samp>', described in the previous section.
</ul>
<div class="node">
<p><hr>
<a name="Standard-options"></a>
Previous: <a rel="previous" accesskey="p" href="#Auxiliary-tasks">Auxiliary tasks</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-kpsewhich">Invoking kpsewhich</a>
</div>
<h4 class="subsection">3.5.3 Standard options</h4>
<p><a name="index-standard-options-590"></a>
Kpsewhich accepts the standard GNU options:
<ul>
<li><a name="index-g_t_002d_002dhelp-591"></a>`<samp><span class="samp">--help</span></samp>' prints a help message on standard output and exits.
<li><a name="index-g_t_002d_002dversion-592"></a>`<samp><span class="samp">--version</span></samp>' prints the Kpathsea version number and exits.
</ul>
<div class="node">
<p><hr>
<a name="TeX-support"></a>
Next: <a rel="next" accesskey="n" href="#Programming">Programming</a>,
Previous: <a rel="previous" accesskey="p" href="#Path-searching">Path searching</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">4 TeX support</h2>
<p><a name="index-g_t_0040TeX_007b_007d-support-593"></a>
Although the basic features in Kpathsea can be used for any type of path
searching, it came about (like all libraries) with a specific
application in mind: I wrote Kpathsea specifically for TeX system
programs. I had been struggling with the programs I was using (Dvips,
Xdvi, and TeX itself) having slightly different notions of how to
specify paths; and debugging was painful, since no code was shared.
<p>Therefore, Kpathsea provides some TeX-specific formats and features.
Indeed, many of the supposedly generic path searching features were
provided because they seemed useful in that conTeXt (font lookup,
particularly).
<p>Kpathsea provides a standard way to search for files of any of the
supported file types; glyph fonts are a bit different than all the rest.
Searches are based solely on filenames, not file contents—if a GF
file is named <samp><span class="file">cmr10.600pk</span></samp>, it will be found as a PK file.
<ul class="menu">
<li><a accesskey="1" href="#Supported-file-formats">Supported file formats</a>: File types Kpathsea knows about.
<li><a accesskey="2" href="#File-lookup">File lookup</a>: Searching for most kinds of files.
<li><a accesskey="3" href="#Glyph-lookup">Glyph lookup</a>: Searching for bitmap fonts.
<li><a accesskey="4" href="#Suppressing-warnings">Suppressing warnings</a>: Avoiding warnings via TEX_HUSH.
</ul>
<div class="node">
<p><hr>
<a name="Supported-file-formats"></a>
Next: <a rel="next" accesskey="n" href="#File-lookup">File lookup</a>,
Up: <a rel="up" accesskey="u" href="#TeX-support">TeX support</a>
</div>
<h3 class="section">4.1 Supported file formats</h3>
<p><a name="index-supported-file-formats-594"></a><a name="index-file-formats_002c-supported-595"></a>
<a name="index-environment-variables-for-_0040TeX_007b_007d-596"></a><a name="index-g_t_0040TeX_007b_007d-environment-variables-597"></a>
Kpathsea has support for a number of file types. Each file type has a
list of environment and config file variables that are checked to define
the search path, and most have a default suffix that plays a role in
finding files (see the next section). Some also define additional
suffixes, and/or a program to be run to create missing files on the fly.
<p><a name="index-program_002dvarying-paths-598"></a>Since environment variables containing periods, such as
`<samp><span class="samp">TEXINPUTS.latex</span></samp>', are not allowed on some systems, Kpathsea looks
for environment variables with an underscore, e.g.,
`<samp><span class="samp">TEXINPUTS_latex</span></samp>' (see <a href="#Config-files">Config files</a>).
<p>The following table lists the above information.
<dl>
<dt>`<samp><span class="samp">afm</span></samp>'<dd><a name="index-g_t_002eafm-599"></a><a name="index-AFMFONTS-600"></a>(Adobe font metrics, see <a href="dvips.html#Metric-files">Metric files</a>)
<code>AFMFONTS</code>;
suffix `<samp><span class="samp">.afm</span></samp>'.
<br><dt>`<samp><span class="samp">base</span></samp>'<dd><a name="index-g_t_002ebase-601"></a><a name="index-MFBASES-602"></a><a name="index-TEXMFINI-603"></a>(Metafont memory dump, see <a href="web2c.html#Memory-dumps">Memory dumps</a>)
<code>MFBASES</code>, <code>TEXMFINI</code>;
suffix `<samp><span class="samp">.base</span></samp>'.
<br><dt>`<samp><span class="samp">bib</span></samp>'<dd><a name="index-g_t_002ebib-604"></a><a name="index-BIBINPUTS-605"></a><a name="index-TEXBIB-606"></a>(BibTeX bibliography source, see <a href="web2c.html#bibtex-invocation">bibtex invocation</a>)
<code>BIBINPUTS</code>, <code>TEXBIB</code>;
suffix `<samp><span class="samp">.bib</span></samp>'.
<br><dt>`<samp><span class="samp">bst</span></samp>'<dd><a name="index-g_t_002ebst-607"></a><a name="index-BSTINPUTS-608"></a>(BibTeX style file, see <a href="web2c.html#Basic-BibTeX-style-files">Basic BibTeX style files</a>)
<code>BSTINPUTS</code>;
suffix `<samp><span class="samp">.bst</span></samp>'.
<br><dt>`<samp><span class="samp">cmap</span></samp>'<dd><a name="index-g_t_002ecmap-609"></a><a name="index-CMAPFONTS-610"></a>(character map files)
<code>CMAPFONTS</code>;
suffix `<samp><span class="samp">.cmap</span></samp>'.
<br><dt>`<samp><span class="samp">cnf</span></samp>'<dd><a name="index-g_t_002ecnf-611"></a><a name="index-TEXMFCNF-612"></a>(Runtime configuration files, see <a href="#Config-files">Config files</a>)
<code>TEXMFCNF</code>;
suffix `<samp><span class="samp">.cnf</span></samp>'.
<br><dt>`<samp><span class="samp">cweb</span></samp>'<dd><a name="index-g_t_002ew-613"></a><a name="index-g_t_002eweb-614"></a><a name="index-CWEBINPUTS-615"></a>(CWEB input files)
<code>CWEBINPUTS</code>;
suffixes `<samp><span class="samp">.w</span></samp>', `<samp><span class="samp">.web</span></samp>';
additional suffix `<samp><span class="samp">.ch</span></samp>'.
<br><dt>`<samp><span class="samp">dvips config</span></samp>'<dd><a name="index-TEXCONFIG-616"></a><a name="index-config_002eps_0040r_007b_002c-search-path-for_007d-617"></a>(Dvips `<samp><span class="samp">config.*</span></samp>' files, such as <samp><span class="file">config.ps</span></samp>, see <a href="dvips.html#Config-files">Config files</a>)
<code>TEXCONFIG</code>.
<br><dt>`<samp><span class="samp">enc files</span></samp>'<dd><a name="index-g_t_002eenc-618"></a><a name="index-ENCFONTS-619"></a>(encoding vectors)
<code>ENCFONTS</code>;
suffix `<samp><span class="samp">.enc</span></samp>'.
<br><dt>`<samp><span class="samp">fmt</span></samp>'<dd><a name="index-g_t_002efmt-620"></a><a name="index-TEXFORMATS-621"></a><a name="index-TEXMFINI-622"></a>(TeX memory dump, see <a href="web2c.html#Memory-dumps">Memory dumps</a>)
<code>TEXFORMATS</code>, <code>TEXMFINI</code>;
suffix `<samp><span class="samp">.fmt</span></samp>'.
<br><dt>`<samp><span class="samp">gf</span></samp>'<dd><a name="index-gf-623"></a><a name="index-GFFONTS-624"></a><a name="index-GLYPHFONTS-625"></a><a name="index-TEXFONTS-626"></a>(generic font bitmap, see <a href="dvips.html#Glyph-files">Glyph files</a>)
<var>program</var><code>FONTS</code>, <code>GFFONTS</code>, <code>GLYPHFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">gf</span></samp>'.
<br><dt>`<samp><span class="samp">graphic/figure</span></samp>'<dd><a name="index-g_t_002eeps-627"></a><a name="index-g_t_002eepsi-628"></a><a name="index-TEXPICTS-629"></a><a name="index-TEXINPUTS-630"></a>(Encapsulated PostScript figures, see <a href="dvips.html#PostScript-figures">PostScript figures</a>)
<code>TEXPICTS</code>, <code>TEXINPUTS</code>;
additional suffixes: `<samp><span class="samp">.eps</span></samp>', `<samp><span class="samp">.epsi</span></samp>'.
<br><dt>`<samp><span class="samp">ist</span></samp>'<dd><a name="index-g_t_002eist-631"></a><a name="index-TEXINDEXSTYLE-632"></a><a name="index-INDEXSTYLE-633"></a>(makeindex style files)
<code>TEXINDEXSTYLE</code>, <code>INDEXSTYLE</code>;
suffix `<samp><span class="samp">.ist</span></samp>'.
<br><dt>`<samp><span class="samp">lig files</span></samp>'<dd><a name="index-g_t_002elig-634"></a><a name="index-LIGFONTS-635"></a>(ligature definition files)
<code>LIGFONTS</code>;
suffix `<samp><span class="samp">.lig</span></samp>'.
<br><dt>`<samp><span class="samp">ls-R</span></samp>'<dd><a name="index-ls_002dR-636"></a><a name="index-TEXMFDBS-637"></a>(Filename databases, see <a href="#Filename-database">Filename database</a>)
<code>TEXMFDBS</code>.
<br><dt>`<samp><span class="samp">map</span></samp>'<dd><a name="index-g_t_002emap-638"></a><a name="index-TEXFONTMAPS-639"></a>(Fontmaps, see <a href="#Fontmap">Fontmap</a>)
<code>TEXFONTMAPS</code>;
suffix `<samp><span class="samp">.map</span></samp>'.
<br><dt>`<samp><span class="samp">mem</span></samp>'<dd><a name="index-g_t_002emem-640"></a><a name="index-MPMEMS-641"></a><a name="index-TEXMFINI-642"></a>(MetaPost memory dump, see <a href="web2c.html#Memory-dumps">Memory dumps</a>)
<code>MPMEMS</code>, <code>TEXMFINI</code>;
suffix `<samp><span class="samp">.mem</span></samp>'.
<br><dt>`<samp><span class="samp">MetaPost support</span></samp>'<dd><a name="index-MPSUPPORT-643"></a>(MetaPost support files, used by DMP; see <a href="web2c.html#dmp-invocation">dmp invocation</a>)
<code>MPSUPPORT</code>.
<br><dt>`<samp><span class="samp">mf</span></samp>'<dd><a name="index-g_t_002emf-644"></a><a name="index-MFINPUTS-645"></a>(Metafont source, see <a href="web2c.html#mf-invocation">mf invocation</a>)
<code>MFINPUTS</code>;
suffix `<samp><span class="samp">.mf</span></samp>';
dynamic creation program: <code>mktexmf</code>.
<br><dt>`<samp><span class="samp">mfpool</span></samp>'<dd><a name="index-g_t_002epool-646"></a><a name="index-MFPOOL-647"></a>(Metafont program strings, see <a href="web2c.html#pooltype-invocation">pooltype invocation</a>)
<code>MFPOOL</code>, <code>TEXMFINI</code>;
suffix `<samp><span class="samp">.pool</span></samp>'.
<br><dt>`<samp><span class="samp">mft</span></samp>'<dd><a name="index-g_t_002emft-648"></a><a name="index-MFTINPUTS-649"></a>(<code>MFT</code> style file, see <a href="web2c.html#mft-invocation">mft invocation</a>)
<code>MFTINPUTS</code>;
suffix `<samp><span class="samp">.mft</span></samp>'.
<br><dt>`<samp><span class="samp">misc fonts</span></samp>'<dd><a name="index-MISCFONTS-650"></a>(font-related files that don't fit the other categories)
<code>MISCFONTS</code>
<br><dt>`<samp><span class="samp">mp</span></samp>'<dd><a name="index-g_t_002emp-651"></a><a name="index-MPINPUTS-652"></a>(MetaPost source, see <a href="web2c.html#mpost-invocation">mpost invocation</a>)
<code>MPINPUTS</code>;
suffix `<samp><span class="samp">.mp</span></samp>'.
<br><dt>`<samp><span class="samp">mppool</span></samp>'<dd><a name="index-g_t_002epool-653"></a><a name="index-MPPOOL-654"></a>(MetaPost program strings, see <a href="web2c.html#pooltype-invocation">pooltype invocation</a>)
<code>MPPOOL</code>, <code>TEXMFINI</code>;
suffix `<samp><span class="samp">.pool</span></samp>'.
<br><dt>`<samp><span class="samp">ocp</span></samp>'<dd><a name="index-g_t_002eocp-655"></a><a name="index-OCPINPUTS-656"></a>(Omega compiled process files)
<code>OCPINPUTS</code>; <br>
suffix `<samp><span class="samp">.ocp</span></samp>';
dynamic creation program: <code>MakeOmegaOCP</code>.
<br><dt>`<samp><span class="samp">ofm</span></samp>'<dd><a name="index-g_t_002eofm-657"></a><a name="index-OFMFONTS-658"></a>(Omega font metrics)
<code>OFMFONTS</code>, <code>TEXFONTS</code>; <br>
suffixes `<samp><span class="samp">.ofm</span></samp>', `<samp><span class="samp">.tfm</span></samp>';
dynamic creation program: <code>MakeOmegaOFM</code>.
<br><dt>`<samp><span class="samp">opentype fonts</span></samp>'<dd><a name="index-OPENTYPEFONTS-659"></a>(OpenType fonts)
<code>OPENTYPEFONTS</code>.
<br><dt>`<samp><span class="samp">opl</span></samp>'<dd><a name="index-g_t_002eopl-660"></a>(Omega property lists)
<code>OPLFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">.opl</span></samp>'.
<br><dt>`<samp><span class="samp">otp</span></samp>'<dd><a name="index-g_t_002eotp-661"></a><a name="index-OTPINPUTS-662"></a>(Omega translation process files)
<code>OTPINPUTS</code>;
suffix `<samp><span class="samp">.otp</span></samp>'.
<br><dt>`<samp><span class="samp">ovf</span></samp>'<dd><a name="index-g_t_002eovf-663"></a><a name="index-OVFFONTS-664"></a>(Omega virtual fonts)
<code>OVFFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">.ovf</span></samp>'.
<br><dt>`<samp><span class="samp">ovp</span></samp>'<dd><a name="index-g_t_002eovp-665"></a><a name="index-OVPFONTS-666"></a>(Omega virtual property lists)
<code>OVPFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">.ovp</span></samp>'.
<br><dt>`<samp><span class="samp">pdftex config</span></samp>'<dd><a name="index-PDFTEXCONFIG-667"></a>(PDFTeX-specific configuration files)
<code>PDFTEXCONFIG</code>.
<br><dt>`<samp><span class="samp">pk</span></samp>'<dd><a name="index-g_t_002epk-668"></a><a name="index-PKFONTS-669"></a><a name="index-TEXPKS-670"></a><a name="index-GLYPHFONTS-671"></a><a name="index-TEXFONTS-672"></a>(packed bitmap fonts, see <a href="dvips.html#Glyph-files">Glyph files</a>)
<var>PROGRAM</var><code>FONTS</code> (<var>program</var> being `<samp><span class="samp">XDVI</span></samp>', etc.),
<code>PKFONTS</code>, <code>TEXPKS</code>, <code>GLYPHFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">pk</span></samp>';
dynamic creation program: <code>mktexpk</code>.
<br><dt>`<samp><span class="samp">PostScript header</span></samp>'<dd><a name="index-g_t_002epro-673"></a><a name="index-TEXPSHEADERS-674"></a><a name="index-PSHEADERS-675"></a>(downloadable PostScript, see <a href="dvips.html#Header-files">Header files</a>)
<code>TEXPSHEADERS</code>, <code>PSHEADERS</code>;
additional suffix `<samp><span class="samp">.pro</span></samp>'.
<br><dt>`<samp><span class="samp">subfont definition files</span></samp>'<dd><a name="index-g_t_002esfd-676"></a><a name="index-SFDFONTS-677"></a>(subfont definition files)
<code>SFDFONTS</code>
suffix `<samp><span class="samp">.sfd</span></samp>'.
<br><dt>`<samp><span class="samp">tex</span></samp>'<dd><a name="index-g_t_002etex-678"></a><a name="index-TEXINPUTS-679"></a>(TeX source, see <a href="web2c.html#tex-invocation">tex invocation</a>)
<code>TEXINPUTS</code>;
suffix `<samp><span class="samp">.tex</span></samp>';
additional suffixes: none, because such a list cannot be complete;
dynamic creation program: <code>mktextex</code>.
<br><dt>`<samp><span class="samp">TeX system documentation</span></samp>'<dd><a name="index-doc-files-680"></a><a name="index-TEXDOCS-681"></a>(Documentation files for the TeX system)
<code>TEXDOCS</code>.
<br><dt>`<samp><span class="samp">TeX system sources</span></samp>'<dd><a name="index-source-files-682"></a><a name="index-TEXSOURCES-683"></a>(Source files for the TeX system)
<code>TEXSOURCES</code>.
<br><dt>`<samp><span class="samp">texmfscripts</span></samp>'<dd><a name="index-TEXMFSCRIPTS-684"></a>(Architecture-independent executables distributed in the texmf tree)
<code>TEXMFSCRIPTS</code>.
<br><dt>`<samp><span class="samp">texpool</span></samp>'<dd><a name="index-g_t_002epool-685"></a><a name="index-TEXPOOL-686"></a>(TeX program strings, see <a href="web2c.html#pooltype-invocation">pooltype invocation</a>)
<code>TEXPOOL</code>, <code>TEXMFINI</code>;
suffix `<samp><span class="samp">.pool</span></samp>'.
<br><dt>`<samp><span class="samp">tfm</span></samp>'<dd><a name="index-g_t_002etfm-687"></a><a name="index-TFMFONTS-688"></a><a name="index-TEXFONTS-689"></a>(TeX font metrics, see <a href="dvips.html#Metric-files">Metric files</a>)
<code>TFMFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">.tfm</span></samp>';
dynamic creation program: <code>mktextfm</code>.
<br><dt>`<samp><span class="samp">Troff fonts</span></samp>'<dd><a name="index-TRFONTS-690"></a>(Troff fonts, used by DMP; see <a href="web2c.html#DMP-invocation">DMP invocation</a>)
<code>TRFONTS</code>.
<br><dt>`<samp><span class="samp">truetype fonts</span></samp>'<dd><a name="index-g_t_002ettf-691"></a><a name="index-g_t_002ettc-692"></a><a name="index-TTFONTS-693"></a>(TrueType outline fonts) <code>TTFONTS</code>; suffixes `<samp><span class="samp">.ttf</span></samp>',
`<samp><span class="samp">.ttc</span></samp>'.
<br><dt>`<samp><span class="samp">type1 fonts</span></samp>'<dd><a name="index-g_t_002epfa-694"></a><a name="index-g_t_002epfb-695"></a><a name="index-T1FONTS-696"></a><a name="index-T1INPUTS-697"></a><a name="index-TEXPSHEADERS-698"></a><a name="index-DVIPSHEADERS-699"></a>(Type 1 PostScript outline fonts, see <a href="dvips.html#Glyph-files">Glyph files</a>)
<code>T1FONTS</code>, <code>T1INPUTS</code>, <code>TEXPSHEADERS</code>, <code>DVIPSHEADERS</code>;
suffixes `<samp><span class="samp">.pfa</span></samp>', `<samp><span class="samp">.pfb</span></samp>'.
<br><dt>`<samp><span class="samp">type42 fonts</span></samp>'<dd><a name="index-T42FONTS-700"></a>(Type 42 PostScript outline fonts) <code>T42FONTS</code>.
<br><dt>`<samp><span class="samp">vf</span></samp>'<dd><a name="index-g_t_002evf-701"></a><a name="index-VFFONTS-702"></a><a name="index-TEXFONTS-703"></a>(virtual fonts, see <a href="dvips.html#Virtual-fonts">Virtual fonts</a>)
<code>VFFONTS</code>, <code>TEXFONTS</code>;
suffix `<samp><span class="samp">.vf</span></samp>'.
<br><dt>`<samp><span class="samp">web</span></samp>'<dd><a name="index-g_t_002eweb-704"></a><a name="index-WEBINPUTS-705"></a>(WEB input files)
<code>WEBINPUTS</code>;
suffix `<samp><span class="samp">.web</span></samp>';
additional suffix `<samp><span class="samp">.ch</span></samp>'.
<br><dt>`<samp><span class="samp">web2c files</span></samp>'<dd><a name="index-WEB2C-706"></a>(files specific to the web2c implementation)
<code>WEB2C</code>.
</dl>
<p>There are two special cases, because the paths and environment variables
always depend on the name of the program: the variable name is
constructed by converting the program name to upper case, and then
appending `<samp><span class="samp">INPUTS</span></samp>'. Assuming the program is called `<samp><span class="samp">foo</span></samp>',
this gives us the following table.
<dl>
<dt>`<samp><span class="samp">other text files</span></samp>'<dd><a name="index-FOOINPUTS-707"></a>(text files used by `<samp><span class="samp">foo</span></samp>')
<code>FOOINPUTS</code>.
<br><dt>`<samp><span class="samp">other binary files</span></samp>'<dd><a name="index-FOOINPUTS-708"></a>(binary files used by `<samp><span class="samp">foo</span></samp>')
<code>FOOINPUTS</code>.
</dl>
<p>If an environment variable by these names are set, the corresponding
<samp><span class="file">texmf.cnf</span></samp> definition won't be looked at (unless, as usual, the
environment variable value has an extra `<samp><span class="samp">:</span></samp>'). See <a href="#Default-expansion">Default expansion</a>.
<p>For the font variables, the intent is that:
<ul>
<li><code>TEXFONTS</code> is the default for everything.
<li><code>GLYPHFONTS</code> is the default for bitmap (or, more precisely,
non-metric) files.
<li>Each font format has a variable of its own.
<li><a name="index-XDVIFONTS-709"></a><a name="index-DVIPSFONTS-710"></a>Each program has its own font override path as well; e.g.,
<code>DVIPSFONTS</code> for Dvipsk. Again, this is for bitmaps, not metrics.
</ul>
<div class="node">
<p><hr>
<a name="File-lookup"></a>
Next: <a rel="next" accesskey="n" href="#Glyph-lookup">Glyph lookup</a>,
Previous: <a rel="previous" accesskey="p" href="#Supported-file-formats">Supported file formats</a>,
Up: <a rel="up" accesskey="u" href="#TeX-support">TeX support</a>
</div>
<h3 class="section">4.2 File lookup</h3>
<p><a name="index-file-lookup-711"></a><a name="index-searching-for-files-712"></a><a name="index-g_t_0040TeX_007b_007d-file-lookup-713"></a>
This section describes how Kpathsea searches for most files (bitmap font
searches are the exception, as described in the next section).
<p>Here is the search strategy for a file <var>name</var>:
<ol type=1 start=1>
<li>If the file format defines default suffixes, and the suffix of
<var>name</var> name is not already a known suffix for that format, try the
name with each default appended, and use alternative names found in the
fontmaps if necessary. We postpone searching the disk as long as
possible. Example: given `<samp><span class="samp">foo.sty</span></samp>', look for `<samp><span class="samp">foo.sty.tex</span></samp>'
before `<samp><span class="samp">foo.sty</span></samp>'. This is unfortunate, but allows us to find
`<samp><span class="samp">foo.bar.tex</span></samp>' before `<samp><span class="samp">foo.bar</span></samp>' if both exist and we were given
`<samp><span class="samp">foo.bar</span></samp>'.
<li>Search for <var>name</var>, and if necessary for alternative names found in
the fontmaps. Again we avoid searching the disk if possible. Example:
given `<samp><span class="samp">foo</span></samp>', we look for `<samp><span class="samp">foo</span></samp>'.
<li>If the file format defines a program to invoke to create missing files,
run it (see <a href="#mktex-scripts">mktex scripts</a>).
</ol>
<p><a name="index-tex_002dfile_002ec-714"></a><a name="index-kpse_005ffind_005ffile-715"></a>This is implemented in the routine <code>kpse_find_file</code> in
<samp><span class="file">kpathsea/tex-file.c</span></samp>. You can watch it in action with the
debugging options (see <a href="#Debugging">Debugging</a>).
<div class="node">
<p><hr>
<a name="Glyph-lookup"></a>
Next: <a rel="next" accesskey="n" href="#Suppressing-warnings">Suppressing warnings</a>,
Previous: <a rel="previous" accesskey="p" href="#File-lookup">File lookup</a>,
Up: <a rel="up" accesskey="u" href="#TeX-support">TeX support</a>
</div>
<h3 class="section">4.3 Glyph lookup</h3>
<p><a name="index-glyph-lookup-716"></a><a name="index-searching-for-glyphs-717"></a><a name="index-g_t_0040TeX_007b_007d-glyph-lookup-718"></a>
This section describes how Kpathsea searches for a bitmap font in GF or
PK format (or either) given a font name (e.g., `<samp><span class="samp">cmr10</span></samp>') and a
resolution (e.g., 600).
<p>Here is an outline of the search strategy (details in the sections
below) for a file <var>name</var> at resolution <var>dpi</var>. The search stops
at the first successful lookup.
<ol type=1 start=1>
<li>Look for an existing file <var>name</var>.<var>dpi</var><var>format</var> in the
specified format(s).
<li>If <var>name</var> is an alias for a file <var>f</var> in the fontmap
file <samp><span class="file">texfonts.map</span></samp>, look for <var>f</var>.<var>dpi</var>.
<li>Run an external program (typically named `<samp><span class="samp">mktexpk</span></samp>') to
generate the font (see <a href="#mktex-scripts">mktex scripts</a>)
<li>Look for <var>fallback</var>.<var>dpi</var>, where <var>fallback</var> is some
last-resort font (typically `<samp><span class="samp">cmr10</span></samp>').
</ol>
<p><a name="index-tex_002dglyph_002ec-719"></a><a name="index-kpse_005ffind_005fglyph_005fformat-720"></a>This is implemented in <code>kpse_find_glyph_format</code> in
<samp><span class="file">kpathsea/tex-glyph.c</span></samp>.
<ul class="menu">
<li><a accesskey="1" href="#Basic-glyph-lookup">Basic glyph lookup</a>: Features common to all glyph lookups.
<li><a accesskey="2" href="#Fontmap">Fontmap</a>: Aliases for fonts.
<li><a accesskey="3" href="#Fallback-font">Fallback font</a>: Resolutions and fonts of last resort.
</ul>
<div class="node">
<p><hr>
<a name="Basic-glyph-lookup"></a>
Next: <a rel="next" accesskey="n" href="#Fontmap">Fontmap</a>,
Up: <a rel="up" accesskey="u" href="#Glyph-lookup">Glyph lookup</a>
</div>
<h4 class="subsection">4.3.1 Basic glyph lookup</h4>
<p><a name="index-basic-glyph-lookup-721"></a><a name="index-common-features-in-glyph-lookup-722"></a>
When Kpathsea looks for a bitmap font <var>name</var> at resolution <var>dpi</var>
in a format <var>format</var>, it first checks each directory in the search
path for a file `<samp><var>name</var><span class="samp">.</span><var>dpi</var><var>format</var></samp>'; for example,
`<samp><span class="samp">cmr10.600pk</span></samp>'. Kpathsea looks for a PK file first, then a GF file.
<p>If that fails, Kpathsea looks for
`<samp><span class="samp">dpi</span><var>dpi</var><span class="samp">/</span><var>name</var><span class="samp">.</span><var>format</var></samp>'; for example,
`<samp><span class="samp">dpi600/cmr10.pk</span></samp>'. This is how fonts are typically stored on
filesystems (such as DOS) that permit only three-character extensions.
<p><a name="index-tolerance-for-glyph-lookup-723"></a><a name="index-glyph-lookup-bitmap-tolerance-724"></a><a name="index-KPSE_005fBITMAP_005fTOLERANCE-725"></a>If that fails, Kpathsea looks for a font with a close-enough <var>dpi</var>.
“Close enough” is defined by the macro <code>KPSE_BITMAP_TOLERANCE</code> in
<samp><span class="file">kpathsea/tex-glyph.h</span></samp> to be <var>dpi</var><code> / 500 + 1</code>. This is
slightly more than the 0.2% minimum allowed by the DVI standard
(<a href="<var>CTAN:</var>/dviware/driv-standard/level-0"><var>CTAN:</var>/dviware/driv-standard/level-0</a>).
<div class="node">
<p><hr>
<a name="Fontmap"></a>
Next: <a rel="next" accesskey="n" href="#Fallback-font">Fallback font</a>,
Previous: <a rel="previous" accesskey="p" href="#Basic-glyph-lookup">Basic glyph lookup</a>,
Up: <a rel="up" accesskey="u" href="#Glyph-lookup">Glyph lookup</a>
</div>
<h4 class="subsection">4.3.2 Fontmap</h4>
<p><a name="index-fontmap-files-726"></a><a name="index-font-alias-files-727"></a><a name="index-aliases-for-fonts-728"></a>
<a name="index-texfonts_002emap-729"></a>If a bitmap font or metric file is not found with the original name (see
the previous section), Kpathsea looks through any <dfn>fontmap</dfn> files
for an <dfn>alias</dfn> for the original font name. These files are named
<samp><span class="file">texfonts.map</span></samp> and searched for along the <code>TEXFONTMAPS</code>
environment/config file variable. All <samp><span class="file">texfonts.map</span></samp> files that
are found are read; earlier definitions override later ones.
<p>This feature is intended to help in two respects:
<ol type=1 start=1>
<li><a name="index-fontnames_002c-arbitrary-length-730"></a>An alias name is limited in length only by available memory, not by your
filesystem. Therefore, if you want to ask for `<samp><span class="samp">Times-Roman</span></samp>'
instead of <samp><span class="file">ptmr</span></samp>, you can (you get `<samp><span class="samp">ptmr8r</span></samp>').
<li><a name="index-circle-fonts-731"></a><a name="index-lcircle10-732"></a>A few fonts have historically had multiple names: specifically,
LaTeX's “circle font” has variously been known as <samp><span class="file">circle10</span></samp>,
<samp><span class="file">lcircle10</span></samp>, and <samp><span class="file">lcirc10</span></samp>. Aliases can make all the names
equivalent, so that it no longer matters what the name of the installed
file is; TeX documents will find their favorite name.
</ol>
<p>The format of fontmap files is straightforward:
<a name="index-comments_002c-in-fontmap-files-733"></a>
<ul><li>Comments start with `<samp><span class="samp">%</span></samp>' and continue to the end of the line.
<a name="index-whitespace_002c-in-fontmap-files-734"></a><li>Blank lines are ignored.
<li>Each nonblank line is broken up into a series of <dfn>words</dfn>:
a sequence of non-whitespace characters.
<a name="index-include-_0040r_007bfontmap-directive_007d-735"></a><li>If the first word is `<samp><span class="samp">include</span></samp>', the second word is used as
a filename, and it is searched for and read.
<li>Otherwise, the first word on each line is the true filename;
<li>the second word is the alias;
<li>subsequent words are ignored.
</ul>
<p>If an alias has an extension, it matches only those files with that
extension; otherwise, it matches anything with the same root, regardless
of extension. For example, an alias `<samp><span class="samp">foo.tfm</span></samp>' matches only when
<samp><span class="file">foo.tfm</span></samp> is being searched for; but an alias `<samp><span class="samp">foo</span></samp>' matches
<samp><span class="file">foo.vf</span></samp>, <samp><span class="file">foo.600pk</span></samp>, etc.
<p>As an example, here is an excerpt from the <samp><span class="file">texfonts.map</span></samp> in the
Web2c distribution. It makes the circle fonts equivalent and includes
automatically generated maps for most PostScript fonts available from
various font suppliers.
<pre class="example"> circle10 lcircle10
circle10 lcirc10
lcircle10 circle10
lcircle10 lcirc10
lcirc10 circle10
lcirc10 lcircle10
...
include adobe.map
include apple.map
include bitstrea.map
...
</pre>
<p>Fontmaps are implemented in the file <samp><span class="file">kpathsea/fontmap.c</span></samp>.
The Fontname distribution has much more information on font naming
(see <a href="fontname.html#Introduction">Introduction</a>).
<div class="node">
<p><hr>
<a name="Fallback-font"></a>
Previous: <a rel="previous" accesskey="p" href="#Fontmap">Fontmap</a>,
Up: <a rel="up" accesskey="u" href="#Glyph-lookup">Glyph lookup</a>
</div>
<h4 class="subsection">4.3.3 Fallback font</h4>
<p><a name="index-fallback-font-736"></a><a name="index-fallback-resolutions-737"></a><a name="index-font-of-last-resort-738"></a><a name="index-resolutions_002c-last_002dresort-739"></a><a name="index-last_002dresort-font-740"></a>
<a name="index-DVIPSSIZES-741"></a><a name="index-XDVISIZES-742"></a><a name="index-DVILJSIZES-743"></a><a name="index-TEXSIZES-744"></a><a name="index-default_005ftexsizes-745"></a>If a bitmap font cannot be found or created at the requested size,
Kpathsea looks for the font at a set of <dfn>fallback resolutions</dfn>. You
specify these resolutions as a colon-separated list (like search paths).
Kpathsea looks first for a program-specific environment variable (e.g.,
<code>DVIPSSIZES</code> for Dvipsk), then the environment variable
<code>TEXSIZES</code>, then a default specified at compilation time (the Make
variable <code>default_texsizes</code>). You can set this list to be empty if
you prefer to find fonts at their stated size or not at all.
<p><a name="index-cmr10_0040r_007b_002c-as-fallback-font_007d-746"></a><a name="index-kpse_005ffallback_005ffont-747"></a>Finally, if the font cannot be found even at the fallback resolutions,
Kpathsea looks for a fallback font, typically <samp><span class="file">cmr10</span></samp>. Programs
must enable this feature by assigning to the global variable
<code>kpse_fallback_font</code> or calling <code>kpse_init_prog</code>
(see <a href="#Calling-sequence">Calling sequence</a>); the default is no fallback font.
<div class="node">
<p><hr>
<a name="Suppressing-warnings"></a>
Previous: <a rel="previous" accesskey="p" href="#Glyph-lookup">Glyph lookup</a>,
Up: <a rel="up" accesskey="u" href="#TeX-support">TeX support</a>
</div>
<h3 class="section">4.4 Suppressing warnings</h3>
<p><a name="index-warnings_002c-suppressing-748"></a><a name="index-suppressing-warnings-749"></a>
<a name="index-TEX_005fHUSH-750"></a>Kpathsea provides a way to suppress selected usually-harmless warnings;
this is useful at large sites where most users are not administrators,
and thus the warnings are merely a source of confusion, not a help. To
do this, you set the environment variable or configuration file value
<code>TEX_HUSH</code> to a colon-separated list of values. Here are the
possibilities:
<dl>
<dt>`<samp><span class="samp">all</span></samp>'<a name="index-all-751"></a><dd>Suppress everything possible.
<br><dt>`<samp><span class="samp">checksum</span></samp>'<a name="index-checksum-752"></a><dd><a name="index-mismatched-checksum-warnings-753"></a>Suppress mismatched font checksum warnings.
<br><dt>`<samp><span class="samp">lostchar</span></samp>'<a name="index-lostchar-754"></a><dd><a name="index-missing-character-warnings-755"></a>Suppress warnings when a character is missing from a font that a DVI or
VF file tries to typeset.
<br><dt>`<samp><span class="samp">none</span></samp>'<a name="index-none-756"></a><dd>Don't suppress any warnings.
<br><dt>`<samp><span class="samp">readable</span></samp>'<a name="index-readable-757"></a><dd><a name="index-unreadable-file-warnings-758"></a>Suppress warnings about attempts to access a file whose permissions
render it unreadable.
<br><dt>`<samp><span class="samp">special</span></samp>'<a name="index-special-759"></a><dd><a name="index-unknown-special-warnings-760"></a><a name="index-g_t_005cspecial_0040r_007b_002c-suppressing-warnings-about_007d-761"></a>Suppresses warnings about an unimplemented or unparsable
`<samp><span class="samp">\special</span></samp>' command.
</dl>
<p class="noindent"><samp><span class="file">tex-hush.c</span></samp> defines the function that checks the
variable value. Each driver implements its own checks where
appropriate.
<div class="node">
<p><hr>
<a name="Programming"></a>
Next: <a rel="next" accesskey="n" href="#Index">Index</a>,
Previous: <a rel="previous" accesskey="p" href="#TeX-support">TeX support</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="chapter">5 Programming</h2>
<p>This chapter is for programmers who wish to use Kpathsea.
See <a href="#Introduction">Introduction</a>, for the conditions under which you may do so.
<ul class="menu">
<li><a accesskey="1" href="#Programming-overview">Overview</a>: Introduction.
<li><a accesskey="2" href="#Calling-sequence">Calling sequence</a>: Specifics of what to call.
<li><a accesskey="3" href="#Program_002dspecific-files">Program-specific files</a>: How to handle these.
<li><a accesskey="4" href="#Programming-with-config-files">Config</a>: Getting info from texmf.cnf.
</ul>
<div class="node">
<p><hr>
<a name="Programming-overview"></a>
Next: <a rel="next" accesskey="n" href="#Calling-sequence">Calling sequence</a>,
Up: <a rel="up" accesskey="u" href="#Programming">Programming</a>
</div>
<h3 class="section">5.1 Programming overview</h3>
<p><a name="index-programming-overview-762"></a><a name="index-overview-of-programming-with-Kpathsea-763"></a>
Aside from this manual, your best source of information is the source to
the programs I've modified to use Kpathsea (see <a href="#Introduction">Introduction</a>). Of
those, Dviljk is probably the simplest, and hence a good place to start.
Xdvik adds VF support and the complication of X resources. Dvipsk adds
the complication of its own config files. Web2c is source code I also
maintain, so it uses Kpathsea rather straightforwardly, but is of course
complicated by the Web to C translation. Finally, Kpsewhich is a small
utility program whose sole purpose is to exercise the main
path-searching functionality.
<p><a name="index-pathsearch_002eh-764"></a><a name="index-tex_002dfile_002eh-765"></a><a name="index-tex_002dglyph_002eh-766"></a><a name="index-kpathsea_002eh-767"></a>Beyond these examples, the <samp><span class="file">.h</span></samp> files in the Kpathsea source
describe the interfaces and functionality (and of course the <samp><span class="file">.c</span></samp>
files define the actual routines, which are the ultimate documentation).
<samp><span class="file">pathsearch.h</span></samp> declares the basic searching routine.
<samp><span class="file">tex-file.h</span></samp> and <samp><span class="file">tex-glyph.h</span></samp> define the interfaces for
looking up particular kinds of files. In view of the way the headers
depend on each other, it is recommended to use <code>#include
<kpathsea/kpathsea.h></code>, which includes every Kpathsea header.
<p><a name="index-config_002eh-768"></a><a name="index-c_002dauto_002eh-769"></a>If you want to include only specific headers, you should still consider
including <samp><span class="file">kpathsea/config.h</span></samp> before including any other Kpathsea
header, as it provides symbols used in the other headers. Note that
<samp><span class="file">kpathsea/config.h</span></samp> includes <samp><span class="file">kpathsea/c-auto.h</span></samp>, which is
generated by Autoconf.
<p><a name="index-file-types_002c-registering-new-770"></a>The library provides no way for an external program to register new file
types: <samp><span class="file">tex-file.[ch]</span></samp> must be modified to do this. For example,
Kpathsea has support for looking up Dvips config files, even though no
program other than Dvips will likely ever want to do so. I felt this
was acceptable, since along with new file types should also come new
defaults in <samp><span class="file">texmf.cnf</span></samp> (and its descendant <samp><span class="file">paths.h</span></samp>), since
it's simplest for users if they can modify one configuration file for
all kinds of paths.
<p>Kpathsea does not parse any formats itself; it barely opens any files.
Its primary purpose is to return filenames. The GNU font utilities does
contain libraries to read TFM, GF, and PK files, as do the programs
above, of course.
<div class="node">
<p><hr>
<a name="Calling-sequence"></a>
Next: <a rel="next" accesskey="n" href="#Program_002dspecific-files">Program-specific files</a>,
Previous: <a rel="previous" accesskey="p" href="#Programming-overview">Programming overview</a>,
Up: <a rel="up" accesskey="u" href="#Programming">Programming</a>
</div>
<h3 class="section">5.2 Calling sequence</h3>
<p><a name="index-programming-with-Kpathsea-771"></a><a name="index-calling-sequence-772"></a>
The typical way to use Kpathsea in your program goes something like this:
<ol type=1 start=1>
<li><a name="index-kpse_005fset_005fprogram_005fname-773"></a><a name="index-argv_005b0_005d-774"></a>Call <code>kpse_set_program_name</code> with <code>argv[0]</code> as the first
argument; the second argument is a string or <code>NULL</code>. The second
argument is used by Kpathsea as the program name for the
<code>.</code><var>program</var> feature of config files (see <a href="#Config-files">Config files</a>).
If the second argument is <code>NULL</code>, the value of the first argument
is used. This function must be called before any other use of the
Kpathsea library.
<p><a name="index-program_005finvocation_005fname-775"></a><a name="index-program_005finvocation_005fshort_005fname-776"></a><a name="index-kpse_005fprogram_005fname-777"></a><a name="index-KPATHSEA_005fDEBUG-778"></a><a name="index-SELFAUTOLOC-779"></a><a name="index-SELFAUTODIR-780"></a><a name="index-SELFAUTOPARENT-781"></a><a name="index-error-message-macros-782"></a><a name="index-symlinks_002c-resolving-783"></a><a name="index-expanding-symlinks-784"></a>If necessary, <code>kpse_set_program_name</code> sets the global variables
<code>program_invocation_name</code> and <code>program_invocation_short_name</code>.
These variables are used in the error message macros defined in
<samp><span class="file">kpathsea/lib.h</span></samp>. It sets the global variable
<code>kpse_program_name</code> to the program name it uses. It also
initializes debugging options based on the environment variable
<code>KPATHSEA_DEBUG</code> (if that is set). Finally, it sets the variables
<code>SELFAUTOLOC</code>, <code>SELFAUTODIR</code> and <code>SELFAUTOPARENT</code> to the
location, parent and grandparent directory of the executable, removing
<samp><span class="file">.</span></samp> and <samp><span class="file">..</span></samp> path elements and resolving symbolic links.
These are used in the default configuration file to allow people to
invoke TeX from anywhere, specifically from a mounted CD-ROM. (You can
use `<samp><span class="samp">--expand-var=\$SELFAUTOLOC</span></samp>', etc., to see the values finds.)
<li><a name="index-kpse_005fset_005fprogname-785"></a><a name="index-argv_005b0_005d-786"></a>The <code>kpse_set_progname</code> is deprecated. A call to
<code>kpse_set_progname</code> with <code>argv[0]</code> is equivalent to a call of
<code>kpse_set_program_name</code> with first argument <code>argv[0]</code> and
second argument <code>NULL</code>. The function is deprecated because it
cannot ensure that the <code>.</code><var>program</var> feature of config files
will always work (see <a href="#Config-files">Config files</a>).
<li><a name="index-kpathsea_005fdebug-_0040r_007bvariable_007d-787"></a><a name="index-debugging-options_002c-in-Kpathsea_002dusing-program-788"></a>Set debugging options. See <a href="#Debugging">Debugging</a>. If your program doesn't have a
debugging option already, you can define one and set
<code>kpathsea_debug</code> to the number that the user supplies (as in Dviljk
and Web2c), or you can just omit this altogether (people can always set
<code>KPATHSEA_DEBUG</code>). If you do have runtime debugging already, you
need to merge Kpathsea's options with yours (as in Dvipsk and Xdvik).
<li><a name="index-client_005fpath-_0040r_007bin-_0040code_007bkpse_005fformat_005finfo_007d_007d-789"></a><a name="index-kpse_005fformat_005finfo-790"></a><a name="index-resident_002ec-791"></a><a name="index-config-files_002c-for-Kpathsea_002dusing-programs-792"></a>If your program has its own configuration files that can define search
paths, you should assign those paths to the <code>client_path</code> member in
the appropriate element of the <code>kpse_format_info</code> array. (This
array is indexed by file type; see <samp><span class="file">tex-file.h</span></samp>.) See
<samp><span class="file">resident.c</span></samp> in Dvipsk for an example.
<li><a name="index-kpse_005finit_005fprog-793"></a><a name="index-proginit_002eh-794"></a>Call <code>kpse_init_prog</code> (see <samp><span class="file">proginit.c</span></samp>). It's useful for the
DVI drivers, at least, but for other programs it may be simpler to
extract the parts of it that actually apply. This does not initialize
any paths, it just looks for (and sets) certain environment variables
and other random information. (A search path is always initialized at
the first call to find a file of that type; this eliminates much useless
work, e.g., initializing the BibTeX search paths in a DVI driver.)
<li><a name="index-kpse_005ffind_005f_002a-795"></a><a name="index-kpse_005ffind_005ffile-796"></a>The routine to actually find a file of type <var>format</var> is
<code>kpse_find_</code><var>format</var>, defined in <samp><span class="file">tex-file.h</span></samp>. These are
macros that expand to a call to <samp><span class="file">kpse_find_file</span></samp>. You can call,
say, <code>kpse_find_tfm</code> after doing only the first of the
initialization steps above—Kpathsea automatically reads the
<samp><span class="file">texmf.cnf</span></samp> generic config files, looks for environment variables,
and does expansions at the first lookup.
<li>To find PK and/or GF bitmap fonts, the routines are <code>kpse_find_pk</code>,
<code>kpse_find_gf</code> and <code>kpse_find_glyph</code>, defined in
<samp><span class="file">tex-glyph.h</span></samp>. These return a structure in addition to the
resultant filename, because fonts can be found in so many ways. See the
documentation in the source.
<li><a name="index-kpse_005fopen_005ffile-797"></a>To actually open a file, not just return a filename, call
<code>kpse_open_file</code>. This function takes the name to look up and a
Kpathsea file format as arguments, and returns the usual <code>FILE *</code>.
It always assumes the file must exist, and thus will search the disk if
necessary (unless the search path specified `<samp><span class="samp">!!</span></samp>', etc.). In other
words, if you are looking up a VF or some other file that need not
exist, don't use this.
</ol>
<p><a name="index-hash-table-routines-798"></a><a name="index-memory-allocation-routines-799"></a><a name="index-string-routines-800"></a><a name="index-reading-arbitrary_002dlength-lines-801"></a><a name="index-input-lines_002c-reading-802"></a><a name="index-lines_002c-reading-arbitrary_002dlength-803"></a>Kpathsea also provides many utility routines. Some are generic: hash
tables, memory allocation, string concatenation and copying, string
lists, reading input lines of arbitrary length, etc. Others are
filename-related: default path, tilde, and variable expansion,
<code>stat</code> calls, etc. (Perhaps someday I'll move the former to a
separate library.)
<p><a name="index-c_002d_002a_002eh-804"></a><a name="index-autoconf_0040r_007b_002c-recommended_007d-805"></a>The <samp><span class="file">c-*.h</span></samp> header files can also help your program adapt to many
different systems. You will almost certainly want to use Autoconf for
configuring your software if you use Kpathsea; I strongly recommend
using Autoconf regardless. It is available from
<a href="ftp://prep.ai.mit.edu/pub/gnu/">ftp://prep.ai.mit.edu/pub/gnu/</a>.
<div class="node">
<p><hr>
<a name="Program-specific-files"></a>
<a name="Program_002dspecific-files"></a>
Next: <a rel="next" accesskey="n" href="#Programming-with-config-files">Programming with config files</a>,
Previous: <a rel="previous" accesskey="p" href="#Calling-sequence">Calling sequence</a>,
Up: <a rel="up" accesskey="u" href="#Programming">Programming</a>
</div>
<h3 class="section">5.3 Program-specific files</h3>
<p>Many programs will need to find some configuration files. Kpathsea
contains some support to make it easy to place them in their own
directories. The Standard TeX directory structure (see <a href="tds.html#Top">Introduction</a>), specifies
that such files should go into a subdirectory named after the program,
like `<samp><span class="samp">texmf/ttf2pk</span></samp>'.
<p>Two special formats, `<samp><span class="samp">kpse_program_text_format</span></samp>' and
`<samp><span class="samp">kpse_program_binary_format</span></samp>' exist, which use
<code>.:$TEXMF/</code><var>program</var><code>//</code> as their compiled-in search path. To
override this default, you can use the variable
<var>PROGRAM</var><code>INPUTS</code> in the environment and/or `<samp><span class="samp">texmf.cnf</span></samp>'.
That is to say, the name of the variable is constructed by converting
the name of the program to upper case, and appending <code>INPUTS</code>.
<p>The only difference between these two formats is whether
<code>kpse_open_file</code> will open the files it finds in text or binary
mode.
<div class="node">
<p><hr>
<a name="Programming-with-config-files"></a>
Previous: <a rel="previous" accesskey="p" href="#Program_002dspecific-files">Program-specific files</a>,
Up: <a rel="up" accesskey="u" href="#Programming">Programming</a>
</div>
<h3 class="section">5.4 Programming with config files</h3>
<p><a name="index-programming-with-config-files-806"></a><a name="index-config-files_002c-programming-with-807"></a>
You can (and probably should) use the same <code>texmf.cnf</code>
configuration file that Kpathsea uses for your program. This helps
installers by keeping all configuration in one place.
<p><a name="index-kpse_005fvar_005fvalue-808"></a><a name="index-variable_002eh-809"></a><a name="index-shell_005fescape_0040r_007b_002c-example-for-code_007d-810"></a>To retrieve a value <var>var</var> from config files, the best way is to call
<code>kpse_var_value</code> on the string <var>var</var>. This will look
first for an environment variable <var>var</var>, then a config file value.
The result will be the value found or `<samp><span class="samp">NULL</span></samp>'. This function is
declared in <samp><span class="file">kpathsea/variable.h</span></samp>. For an example, see the
<code>shell_escape</code> code in <samp><span class="file">web2c/lib/texmfmp.c</span></samp>.
<p>The routine to do variable expansion in the context of a search path (as
opposed to simply retrieving a value) is <code>kpse_var_expand</code>, also
declared in <samp><span class="file">kpathsea/variable.h</span></samp>. It's generally only necessary
to set the search path structure components as explained in the previous
section, rather than using this yourself.
<p><a name="index-kpse_005fcnf_005fget-811"></a><a name="index-cnf_002eh-812"></a>If for some reason you want to retrieve a value <em>only</em> from a
config file, not automatically looking for a corresponding environment
variable, call <code>kpse_cnf_get</code> (declared in <samp><span class="file">kpathsea/cnf.h</span></samp>)
with the string <var>var</var>.
<p>No initialization calls are needed.
<div class="node">
<p><hr>
<a name="Index"></a>
Previous: <a rel="previous" accesskey="p" href="#Programming">Programming</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
</div>
<h2 class="unnumbered">Index</h2>
<ul class="index-cp" compact>
<li><a href="#index-g_t_0021_0021-_0040r_007bin-path-specifications_007d-559"><code>!! </code><span class="roman">in path specifications</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_0024-_0040r_007bexpansion_007d-506"><code>$ </code><span class="roman">expansion</span></a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-g_t_002d_002dcolor_003dtty-546"><code>--color=tty</code></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002d_002ddebug_003d_0040var_007bnum_007d-584"><code>--debug=</code><var>num</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002ddisable_002dstatic-111"><code>--disable-static</code></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_002d_002ddpi_003d_0040var_007bnum_007d-569"><code>--dpi=</code><var>num</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002denable-_0040r_007boptions_007d-107"><code>--enable </code><span class="roman">options</span></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_002d_002denable_002dmaintainer_002dmode-112"><code>--enable-maintainer-mode</code></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_002d_002denable_002dshared-140"><code>--enable-shared</code></a>: <a href="#Shared-library">Shared library</a></li>
<li><a href="#index-g_t_002d_002denable_002dshared-110"><code>--enable-shared</code></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_002d_002dengine_003d_0040var_007bname_007d-572"><code>--engine=</code><var>name</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dexpand_002dbraces_003d_0040var_007bstring_007d-586"><code>--expand-braces=</code><var>string</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002dexpand_002dpath_003d_0040var_007bstring_007d-588"><code>--expand-path=</code><var>string</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002dexpand_002dvar_003d_0040var_007bstring_007d-587"><code>--expand-var=</code><var>string</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002dformat_003d_0040var_007bname_007d-574"><code>--format=</code><var>name</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dhelp-591"><code>--help</code></a>: <a href="#Standard-options">Standard options</a></li>
<li><a href="#index-g_t_002d_002dinteractive-575"><code>--interactive</code></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dmode_003d_0040var_007bstring_007d-579"><code>--mode=</code><var>string</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dmust_002dexist-580"><code>--must-exist</code></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dpath_003d_0040var_007bstring_007d-581"><code>--path=</code><var>string</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dprogname_003d_0040var_007bname_007d-582"><code>--progname=</code><var>name</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dshow_002dpath_003d_0040var_007bname_007d-589"><code>--show-path=</code><var>name</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002dsrcdir_0040r_007b_002c-for-building-multiple-architectures_007d-130"><code>--srcdir</code><span class="roman">, for building multiple architectures</span></a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-g_t_002d_002dvar_002dvalue_003d_0040var_007bvariable_007d-585"><code>--var-value=</code><var>variable</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002dversion-592"><code>--version</code></a>: <a href="#Standard-options">Standard options</a></li>
<li><a href="#index-g_t_002d_002dwith-_0040r_007boptions_007d-106"><code>--with </code><span class="roman">options</span></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_002d_002dwith_002dmktextex_002ddefault-198"><code>--with-mktextex-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktexmf_002ddefault-195"><code>--without-mktexmf-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktexpk_002ddefault-196"><code>--without-mktexpk-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktextfm_002ddefault-197"><code>--without-mktextfm-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d1-_0040r_007bdebugging-value_007d-347"><code>-1 </code><span class="roman">debugging value</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-g_t_002dA-_0040r_007boption-to-_0040code_007bls_007d_007d-548"><code>-A </code><span class="roman">option to </span><code>ls</code></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002dBdynamic-439"><code>-Bdynamic</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002dBstatic-438"><code>-Bstatic</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002dD-_0040var_007bnum_007d-570"><code>-D </code><var>num</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002ddynamic-437"><code>-dynamic</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002dg_0040r_007b_002c-compiling-without_007d-136"><code>-g</code><span class="roman">, compiling without</span></a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-g_t_002dL-_0040r_007boption-to-_0040code_007bls_007d_007d-554"><code>-L </code><span class="roman">option to </span><code>ls</code></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002dmktex_003d_0040var_007bfiletype_007d-577"><code>-mktex=</code><var>filetype</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002dno_002dmktex_003d_0040var_007bfiletype_007d-578"><code>-no-mktex=</code><var>filetype</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002dO_0040r_007b_002c-compiling-with_007d-135"><code>-O</code><span class="roman">, compiling with</span></a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-g_t_002dstatic-436"><code>-static</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002e-_0040r_007bdirectories_002c-ignored_007d-551"><code>. </code><span class="roman">directories, ignored</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002e-_0040r_007bfiles_007d-550"><code>. </code><span class="roman">files</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002e2602gf-393"><code>.2602gf</code></a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-g_t_002eafm-599"><code>.afm</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ebase-601"><code>.base</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ebib-604"><code>.bib</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ebst-607"><code>.bst</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ecmap-609"><code>.cmap</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ecnf-611"><code>.cnf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eenc-618"><code>.enc</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eeps-627"><code>.eps</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eepsi-628"><code>.epsi</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002efmt-620"><code>.fmt</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eist-631"><code>.ist</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002elig-634"><code>.lig</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emap-638"><code>.map</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emem-640"><code>.mem</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emf-644"><code>.mf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emft-648"><code>.mft</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emp-651"><code>.mp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eocp-655"><code>.ocp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eofm-657"><code>.ofm</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eopl-660"><code>.opl</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eotp-661"><code>.otp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eovf-663"><code>.ovf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eovp-665"><code>.ovp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epfa-694"><code>.pfa</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epfb-695"><code>.pfb</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epk-668"><code>.pk</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epool-646"><code>.pool</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epro-673"><code>.pro</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002erhosts_0040r_007b_002c-writable-by-_0040TeX_007b_007d_007d-252"><code>.rhosts</code><span class="roman">, writable by TeX</span></a>: <a href="#Security">Security</a></li>
<li><a href="#index-g_t_002esfd-676"><code>.sfd</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002etex-678"><code>.tex</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002etex-_0040r_007bfile_002c-included-in-_0040file_007bls_002dR_007d_007d-552"><code>.tex </code><span class="roman">file, included in <samp>ls-R</samp></span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002etfm-687"><code>.tfm</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ettc-692"><code>.ttc</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ettf-691"><code>.ttf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002evf-701"><code>.vf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ew-613"><code>.w</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eweb-614"><code>.web</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002f-_0040r_007bmay-not-be-_002f_007d-451"><code>/ </code><span class="roman">may not be /</span></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-g_t_002f_0040r_007b_002c-trailing-in-home-directory_007d-521"><code>/</code><span class="roman">, trailing in home directory</span></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-g_t_002f_002f-528"><code>//</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-g_t_002fafs_002f_0040dots_007b_007d-_0040r_007b_002c-installing-into_007d-174"><code>/afs/... </code><span class="roman">, installing into</span></a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-g_t_002fetc_002fprofile-381"><code>/etc/profile</code></a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-g_t_002fetc_002fprofile-_0040r_007band-aliases_007d-547"><code>/etc/profile </code><span class="roman">and aliases</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002fvar_002ftmp_002ftexfonts-225"><code>/var/tmp/texfonts</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t2602gf-394"><code>2602gf</code></a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-g_t8_002e3-filenames_002c-using-207">8.3 filenames, using</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_003a-_0040r_007bmay-not-be-_003a_007d-450"><code>: </code><span class="roman">may not be :</span></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-g_t_003a_003a-_0040r_007bexpansion_007d-497"><code>:: </code><span class="roman">expansion</span></a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-g_t_0040_0040_0040var_007bvar_007d_0040_0040-substitutions-88">@<var>var</var>@ substitutions</a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-g_t_005c_0040r_007b_002c-line-continuation-in-_0040file_007btexmf_002ecnf_007d_007d-489"><code>\</code><span class="roman">, line continuation in <samp>texmf.cnf</samp></span></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-g_t_005copenin-461"><code>\openin</code></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-g_t_005cspecial_0040r_007b_002c-suppressing-warnings-about_007d-761"><code>\special</code><span class="roman">, suppressing warnings about</span></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-absolute-filenames-463">absolute filenames</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-ac_005finclude_0040r_007b_002c-Autoconf-extension_007d-87"><code>ac_include</code><span class="roman">, Autoconf extension</span></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-access-warnings-469">access warnings</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-Acorn-_0040TeX_007b_007d-implementations-297">Acorn TeX implementations</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-AFMFONTS-600"><code>AFMFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-AFS-172">AFS</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-AIX-4_002e1-_0040code_007bconfigure_007d-error-416">AIX 4.1 <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-AIX-shells-and-_0040code_007bconfigure_007d-97">AIX shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-aliases-for-fonts-728">aliases for fonts</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-aliases_002c-for-filenames-562">aliases, for filenames</a>: <a href="#Filename-aliases">Filename aliases</a></li>
<li><a href="#index-all-751"><code>all</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-alphabetical-order_002c-not-531">alphabetical order, not</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-Amiga-support-43">Amiga support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-Amiga-_0040TeX_007b_007d-implementations-296">Amiga TeX implementations</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-Andrew-File-System_002c-installing-with-173">Andrew File System, installing with</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-announcement-mailing-list-329">announcement mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-ANSI-C-407">ANSI C</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-append_002donly-directories-and-_0040code_007bmktexpk_007d-256">append-only directories and <code>mktexpk</code></a>: <a href="#Security">Security</a></li>
<li><a href="#index-appendonlydir-203"><code>appendonlydir</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-architecture_002d_0028in_0029dependent-files_002c-installing-only-168">architecture-(in)dependent files, installing only</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-architectures_002c-compiling-multiple-128">architectures, compiling multiple</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-arguments-to-_0040file_007bmktex_007d-247">arguments to <samp><span class="file">mktex</span></samp></a>: <a href="#mktex-script-arguments">mktex script arguments</a></li>
<li><a href="#index-argv_005b0_005d-774"><code>argv[0]</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-ash_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-98"><code>ash</code><span class="roman">, losing with </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-autoconf_0040r_007b_002c-recommended_007d-805"><code>autoconf</code><span class="roman">, recommended</span></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-automounter_002c-and-configuration-134">automounter, and configuration</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-automounter_002c-and-_0040file_007bls_002dR_007d-555">automounter, and <samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-auxiliary-tasks-583">auxiliary tasks</a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-Babel-165">Babel</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Babel-62">Babel</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-Bach_002c-Johann-Sebastian-504">Bach, Johann Sebastian</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-backbone-of-CTAN-278">backbone of CTAN</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-backslash_002dnewline-486">backslash-newline</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-bash_0040r_007b_002c-recommended-for-running-_0040code_007bconfigure_007d_007d-93"><code>bash</code><span class="roman">, recommended for running </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-basic-glyph-lookup-721">basic glyph lookup</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-Berry_002c-Karl-16">Berry, Karl</a>: <a href="#History">History</a></li>
<li><a href="#index-BIBINPUTS-605"><code>BIBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-binary-mode_002c-for-file-transfers-285">binary mode, for file transfers</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-blank-lines_002c-in-_0040file_007btexmf_002ecnf_007d-485">blank lines, in <samp><span class="file">texmf.cnf</span></samp></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-brace-expansion-524">brace expansion</a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-BSD-universe-160">BSD universe</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-bsh_0040r_007b_002c-ok-with-_0040code_007bconfigure_007d_007d-95"><code>bsh</code><span class="roman">, ok with </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-BSTINPUTS-608"><code>BSTINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-bug-address-309">bug address</a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-bug-checklist-311">bug checklist</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-bug-mailing-list-328">bug mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-bugs_002c-reporting-307">bugs, reporting</a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-c_002d_002a_002eh-804"><code>c-*.h</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-c_002dauto_002eh-769"><code>c-auto.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-c_002dauto_002ein-85"><code>c-auto.in</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-cache-of-fonts_002c-local-254">cache of fonts, local</a>: <a href="#Security">Security</a></li>
<li><a href="#index-calling-sequence-772">calling sequence</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-CC-113"><code>CC</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-cc-_0040r_007bwarnings_007d-443"><code>cc </code><span class="roman">warnings</span></a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-cc_0040r_007b_002c-compiling-with_007d-115"><code>cc</code><span class="roman">, compiling with</span></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-CD_002dROM-distributions-287">CD-ROM distributions</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-CFLAGS-116"><code>CFLAGS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-ChangeLog-_0040r_007bentry_007d-320"><code>ChangeLog </code><span class="roman">entry</span></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-checklist-for-bug-reports-310">checklist for bug reports</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-checksum-752"><code>checksum</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-circle-fonts-731">circle fonts</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-clean-_0040r_007bMake-target_007d-179"><code>clean </code><span class="roman">Make target</span></a>: <a href="#Cleaning-up">Cleaning up</a></li>
<li><a href="#index-client_005fpath-_0040r_007bin-_0040code_007bkpse_005fformat_005finfo_007d_007d-789"><code>client_path </code><span class="roman">in </span><code>kpse_format_info</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-CMAPFONTS-610"><code>CMAPFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-cmr10_0040r_007b_002c-as-fallback-font_007d-746"><code>cmr10</code><span class="roman">, as fallback font</span></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-cmr10_002evf-460"><code>cmr10.vf</code></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-cnf_002ec-494"><code>cnf.c</code></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-cnf_002eh-812"><code>cnf.h</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-code-sharing-141">code sharing</a>: <a href="#Shared-library">Shared library</a></li>
<li><a href="#index-color-printers_002c-configuring-36">color printers, configuring</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-comments_002c-in-fontmap-files-733">comments, in fontmap files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-comments_002c-in-_0040file_007btexmf_002ecnf_007d-484">comments, in <samp><span class="file">texmf.cnf</span></samp></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-comments_002c-making-5">comments, making</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-common-features-in-glyph-lookup-722">common features in glyph lookup</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-common-problems-376">common problems</a>: <a href="#Common-problems">Common problems</a></li>
<li><a href="#index-comp_002esys_002esun_002eadmin-_0040r_007bFAQ_007d-430"><code>comp.sys.sun.admin </code><span class="roman">FAQ</span></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-comp_002etext_002etex-339"><code>comp.text.tex</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-compilation-29">compilation</a>: <a href="#Installation">Installation</a></li>
<li><a href="#index-compilation-value_002c-source-for-path-479">compilation value, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-compiler-bugs-402">compiler bugs</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-compiler-bugs_002c-finding-406">compiler bugs, finding</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-compiler-options_002c-additional-150">compiler options, additional</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-compiler-options_002c-specifying-117">compiler options, specifying</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-compiler_002c-changing-157">compiler, changing</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-compiling-on-HP_002dUX-409">compiling on HP-UX</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-conditions-for-use-7">conditions for use</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-config-files-480">config files</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-config-files_002c-for-Kpathsea_002dusing-programs-792">config files, for Kpathsea-using programs</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-config-files_002c-programming-with-807">config files, programming with</a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-config_002eh-768"><code>config.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-config_002elog-314"><code>config.log</code></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-config_002eps_0040r_007b_002c-search-path-for_007d-617"><code>config.ps</code><span class="roman">, search path for</span></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-config_002estatus-316"><code>config.status</code></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-configuration-28">configuration</a>: <a href="#Installation">Installation</a></li>
<li><a href="#index-configuration-bugs-315">configuration bugs</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-configuration-compiler-options-119">configuration compiler options</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-configuration-file_002c-source-for-path-476">configuration file, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-configuration-files-as-shell-scripts_002e-493">configuration files as shell scripts.</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-configuration-of-_0040file_007bmktex_007d-scripts-191">configuration of <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-configuration-of-optional-features-108">configuration of optional features</a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-configure-_0040r_007berror-from-_0040code_007bsed_007d_007d-412"><code>configure </code><span class="roman">error from </span><code>sed</code></a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-g_t_0040code_007bconfigure_007d-options-105"><code>configure</code> options</a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_0040code_007bconfigure_007d-options-for-_0040file_007bmktex_007d-scripts-194"><code>configure</code> options for <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-configure_0040r_007b_002c-running_007d-84"><code>configure</code><span class="roman">, running</span></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-context-diff-318">context diff</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-continuation-character-487">continuation character</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-core-dumps_002c-reporting-324">core dumps, reporting</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-CPPFLAGS-118"><code>CPPFLAGS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-crashes_002c-reporting-323">crashes, reporting</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-CTAN_002c-defined-277">CTAN, defined</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-CTAN_002esites-280"><code>CTAN.sites</code></a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-custom-installation-40">custom installation</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-CWEBINPUTS-615"><code>CWEBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-database-search-452">database search</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-database_002c-for-filenames-541">database, for filenames</a>: <a href="#Filename-database">Filename database</a></li>
<li><a href="#index-database_002c-format-of-564">database, format of</a>: <a href="#Database-format">Database format</a></li>
<li><a href="#index-debug_002eh-344"><code>debug.h</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-debugger-322">debugger</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-debugging-340">debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-debugging-options_002c-in-Kpathsea_002dusing-program-788">debugging options, in Kpathsea-using program</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-debugging-output-348">debugging output</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-debugging-with-_0040samp_007b_002dg_007d_002c-disabling-138">debugging with `<samp><span class="samp">-g</span></samp>', disabling</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-DEC-shells-and-_0040code_007bconfigure_007d-102">DEC shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-default-expansion-502">default expansion</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-default-path-features-67">default path features</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-default-paths_002c-changing-75">default paths, changing</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-default-paths_002c-how-they_0027re-made-79">default paths, how they're made</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-default_005ftexsizes-745"><code>default_texsizes</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-DEFS-120"><code>DEFS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-depot-133"><code>depot</code></a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-device_002c-wrong-392">device, wrong</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-directories_002c-changing-default-installation-78">directories, changing default installation</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-directories_002c-making-append_002donly-204">directories, making append-only</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-directory-permissions-261">directory permissions</a>: <a href="#Security">Security</a></li>
<li><a href="#index-directory-structure_002c-for-_0040TeX_007b_007d-files-265">directory structure, for TeX files</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-disabling-_0040file_007bmktex_007d-scripts-193">disabling <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-disk-search-456">disk search</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-disk-searching_002c-avoiding-560">disk searching, avoiding</a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-disk-space_002c-needed-47">disk space, needed</a>: <a href="#Disk-space">Disk space</a></li>
<li><a href="#index-disk-usage_002c-reducing-371">disk usage, reducing</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-distclean-_0040r_007bMake-target_007d-177"><code>distclean </code><span class="roman">Make target</span></a>: <a href="#Cleaning-up">Cleaning up</a></li>
<li><a href="#index-distributions_002c-compiling-simultaneously-50">distributions, compiling simultaneously</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-distributions_002c-not-compiling-53">distributions, not compiling</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-distributions_002c-on-CD_002dROM-289">distributions, on CD-ROM</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-distributions_002c-via-ftp-276">distributions, via ftp</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-dlclose-422"><code>dlclose</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-dlopen-420"><code>dlopen</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-dlsym-421"><code>dlsym</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-dlsym_002ec-425"><code>dlsym.c</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-doc-files-680"><code>doc files</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-DOS-compatible-names-208">DOS compatible names</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-DOS-support-44">DOS support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-DOS-_0040TeX_007b_007d-implementations-300">DOS TeX implementations</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-dosnames-206"><code>dosnames</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-dot-files-549">dot files</a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-doubled-colons-498">doubled colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-dpi_0040var_007bnnn_007d-directories-209"><code>dpi</code><var>nnn</var><code> directories</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-DVI-drivers-56">DVI drivers</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-DVILJMAKEPK-242"><code>DVILJMAKEPK</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-DVILJSIZES-743"><code>DVILJSIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-DVIPSFONTS-710"><code>DVIPSFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-DVIPSHEADERS-699"><code>DVIPSHEADERS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-DVIPSMAKEPK-240"><code>DVIPSMAKEPK</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-DVIPSSIZES-741"><code>DVIPSSIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-dynamic-creation-of-files-187">dynamic creation of files</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-dynamic-linking-problems-with-OpenWin-libraries-426">dynamic linking problems with OpenWin libraries</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-EC-fonts_002c-and-dynamic-source-creation-189">EC fonts, and dynamic source creation</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-elt_002ddirs_002ec-538"><code>elt-dirs.c</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-email-CTAN-access-283">email CTAN access</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-enabling-_0040file_007bmktex_007d-scripts-192">enabling <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-ENCFONTS-619"><code>ENCFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-engine-name-573">engine name</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-environment-variable_002c-source-for-path-475">environment variable, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-environment-variables-for-_0040TeX_007b_007d-596">environment variables for TeX</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-environment-variables-in-paths-507">environment variables in paths</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-environment-variables_002c-old-382">environment variables, old</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-epoch_002c-seconds-since-373">epoch, seconds since</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-error-message-macros-782">error message macros</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-excessive-startup-time-385">excessive startup time</a>: <a href="#Slow-path-searching">Slow path searching</a></li>
<li><a href="#index-expand_002ec-526"><code>expand.c</code></a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-expanding-symlinks-784">expanding symlinks</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-expansion_002c-default-503">expansion, default</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-expansion_002c-path-element-462">expansion, path element</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-expansion_002c-search-path-496">expansion, search path</a>: <a href="#Path-expansion">Path expansion</a></li>
<li><a href="#index-expansion_002c-subdirectory-530">expansion, subdirectory</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-expansion_002c-tilde-517">expansion, tilde</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-expansion_002c-variable-509">expansion, variable</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-explicitly-relative-filenames-465">explicitly relative filenames</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-externally_002dbuilt-filename-database-542">externally-built filename database</a>: <a href="#Filename-database">Filename database</a></li>
<li><a href="#index-extra-colons-501">extra colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-extraclean-_0040r_007bMake-target_007d-181"><code>extraclean </code><span class="roman">Make target</span></a>: <a href="#Cleaning-up">Cleaning up</a></li>
<li><a href="#index-failed-_0040code_007bmktex_0040dots_007b_007d_007d-script-invocation-244">failed <code>mktex...</code> script invocation</a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-fallback-font-736">fallback font</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-fallback-resolutions-737">fallback resolutions</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-fallback-resolutions_002c-overriding-145">fallback resolutions, overriding</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-FAQ_002c-_0040t_007bcomp_002esys_002esun_002eadmin_007d-431">FAQ, <tt>comp.sys.sun.admin</tt></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-FAQ_002c-Kpathsea-378">FAQ, Kpathsea</a>: <a href="#Common-problems">Common problems</a></li>
<li><a href="#index-Farwell_002c-Matthew-534">Farwell, Matthew</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-features_002c-of-default-paths-68">features, of default paths</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-file-formats_002c-supported-595">file formats, supported</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-file-lookup-711">file lookup</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-file-permissions-259">file permissions</a>: <a href="#Security">Security</a></li>
<li><a href="#index-file-types_002c-registering-new-770">file types, registering new</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-filename-aliases-561">filename aliases</a>: <a href="#Filename-aliases">Filename aliases</a></li>
<li><a href="#index-filename-database-540">filename database</a>: <a href="#Filename-database">Filename database</a></li>
<li><a href="#index-filename-database-generation-182">filename database generation</a>: <a href="#Filename-database-generation">Filename database generation</a></li>
<li><a href="#index-filenames_002c-absolute-or-explicitly-relative-466">filenames, absolute or explicitly relative</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-files_002c-unable-to-find-380">files, unable to find</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-filesystem-search-455">filesystem search</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-floating-directories-454">floating directories</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-font-alias-files-727">font alias files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-font-generation-failures-389">font generation failures</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-font-of-last-resort-738">font of last resort</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-font-set_002c-infinite-186">font set, infinite</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-fontmap-files-726">fontmap files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-fontmaps-210"><code>fontmaps</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-fontname-212">fontname</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-fontnames_002c-arbitrary-length-730">fontnames, arbitrary length</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-fonts_002c-being-created-37">fonts, being created</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-FOOINPUTS-707"><code>FOOINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-fopen_0040r_007b_002c-redefined_007d-355"><code>fopen</code><span class="roman">, redefined</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-format-of-external-database-563">format of external database</a>: <a href="#Database-format">Database format</a></li>
<li><a href="#index-Free-Software-Foundation-291">Free Software Foundation</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-FreeBSD-_0040code_007bconfigure_007d-error-414">FreeBSD <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-FreeBSD-shells-and-_0040code_007bconfigure_007d-100">FreeBSD shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-FSF-Source-Code-CD_002dROM-292">FSF Source Code CD-ROM</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-ftp-retrieval-274">ftp retrieval</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-ftp_002etug_002eorg-273"><code>ftp.tug.org</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-fundamental-purpose-of-Kpathsea-2">fundamental purpose of Kpathsea</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-gcc_0040r_007b_002c-compiling-with_007d-114"><code>gcc</code><span class="roman">, compiling with</span></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-gdb_0040r_007b_002c-recommended_007d-326"><code>gdb</code><span class="roman">, recommended</span></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-generation-of-filename-database-183">generation of filename database</a>: <a href="#Filename-database-generation">Filename database generation</a></li>
<li><a href="#index-get_005fapplicationShellWidgetClass-429"><code>get_applicationShellWidgetClass</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-get_005fwmShellWidgetClass-428"><code>get_wmShellWidgetClass</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-gf-623"><code>gf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-GFFONTS-624"><code>GFFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-globally-writable-directories-255">globally writable directories</a>: <a href="#Security">Security</a></li>
<li><a href="#index-glyph-lookup-716">glyph lookup</a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-glyph-lookup-bitmap-tolerance-724">glyph lookup bitmap tolerance</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-GLYPHFONTS-625"><code>GLYPHFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-GNU-C-compiler-bugs-404">GNU C compiler bugs</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-GNU-General-Public-License-9">GNU General Public License</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-group_002dwritable-directories-257">group-writable directories</a>: <a href="#Security">Security</a></li>
<li><a href="#index-GSFTOPK_005fDEBUG-_0040r_007b_0028128_0029_007d-361"><code>GSFTOPK_DEBUG </code><span class="roman">(128)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-hash-table-buckets_002c-printing-366">hash table buckets, printing</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-hash-table-routines-798">hash table routines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-hash_005fsummary_005fonly-_0040r_007bvariable-for-debugging_007d-365"><code>hash_summary_only </code><span class="roman">variable for debugging</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-help_002c-mailing-list-for-general-_0040TeX_007b_007d-337">help, mailing list for general TeX</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-HIER-73"><code>HIER</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-history-of-Kpathsea-12">history of Kpathsea</a>: <a href="#History">History</a></li>
<li><a href="#index-home-directories-in-paths-515">home directories in paths</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-HOME_0040r_007b_002c-as-_007e-expansion_007d-518"><code>HOME</code><span class="roman">, as ~ expansion</span></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-HP_002dUX_002c-compiling-on-408">HP-UX, compiling on</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-identifiers_002c-characters-valid-in-490">identifiers, characters valid in</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-illegal-pointer-combination-warnings-442">illegal pointer combination warnings</a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-include-_0040r_007bfontmap-directive_007d-735"><code>include </code><span class="roman">fontmap directive</span></a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-INDEXSTYLE-633"><code>INDEXSTYLE</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-info_002dtex_0040_0040shsu_002eedu-338"><code>info-tex@shsu.edu</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-input-lines_002c-reading-802">input lines, reading</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-install_002ddata-_0040r_007bMake-target_007d-171"><code>install-data </code><span class="roman">Make target</span></a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-install_002dexec-_0040r_007bMake-target_007d-170"><code>install-exec </code><span class="roman">Make target</span></a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-installation-27">installation</a>: <a href="#Installation">Installation</a></li>
<li><a href="#index-installation-testing-249">installation testing</a>: <a href="#Installation-testing">Installation testing</a></li>
<li><a href="#index-installation_002c-architecture_002d_0028in_0029dependent-files-only-169">installation, architecture-(in)dependent files only</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-installation_002c-changing-default-directories-77">installation, changing default directories</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-installation_002c-customized-41">installation, customized</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-installation_002c-getting-executables-instead-of-33">installation, getting executables instead of</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-installation_002c-simple-31">installation, simple</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-installing-files-166">installing files</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-interactive-query-576">interactive query</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-interface_002c-not-frozen-4">interface, not frozen</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-introduction-1">introduction</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-g_t_0040samp_007bkdebug_003a_007d-364">`<samp><span class="samp">kdebug:</span></samp>'</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kdefault_002ec-505"><code>kdefault.c</code></a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-Knuth_002c-Donald-E_002e-13">Knuth, Donald E.</a>: <a href="#History">History</a></li>
<li><a href="#index-Knuth_002c-Donald-E_002e_002c-archive-of-programs-by-305">Knuth, Donald E., archive of programs by</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-Knuth_002c-Donald-E_002e_002c-original-author-286">Knuth, Donald E., original author</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-Korn-shell_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-96">Korn shell<span class="roman">, losing with </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-Kpathsea-config-file_002c-source-for-path-477">Kpathsea config file, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-Kpathsea-version-number-52">Kpathsea version number</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-kpathsea_002eh-767"><code>kpathsea.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-kpathsea_002fHIER-74"><code>kpathsea/HIER</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-kpathsea_002fREADME_002eCONFIGURE-91"><code>kpathsea/README.CONFIGURE</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-KPATHSEA_005fDEBUG-778"><code>KPATHSEA_DEBUG</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005fdebug-346"><code>kpathsea_debug</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPATHSEA_005fDEBUG-345"><code>KPATHSEA_DEBUG</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kpathsea_005fdebug-343"><code>kpathsea_debug</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kpathsea_005fdebug-_0040r_007bvariable_007d-787"><code>kpathsea_debug </code><span class="roman">variable</span></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-KPSE_005fBITMAP_005fTOLERANCE-725"><code>KPSE_BITMAP_TOLERANCE</code></a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-kpse_005fcnf_005fget-811"><code>kpse_cnf_get</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fEXPAND-_0040r_007b_002816_0029_007d-358"><code>KPSE_DEBUG_EXPAND </code><span class="roman">(16)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fFOPEN-_0040r_007b_00284_0029_007d-354"><code>KPSE_DEBUG_FOPEN </code><span class="roman">(4)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fHASH-_0040r_007b_00282_0029_007d-353"><code>KPSE_DEBUG_HASH </code><span class="roman">(2)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fPATHS-_0040r_007b_00288_0029_007d-356"><code>KPSE_DEBUG_PATHS </code><span class="roman">(8)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fSEARCH-_0040r_007b_002832_0029_007d-359"><code>KPSE_DEBUG_SEARCH </code><span class="roman">(32)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fSTAT-_0040r_007b_00281_0029_007d-352"><code>KPSE_DEBUG_STAT </code><span class="roman">(1)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fVARS-_0040r_007b_002864_0029_007d-360"><code>KPSE_DEBUG_VARS </code><span class="roman">(64)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-KPSE_005fDOT-_0040r_007bexpansion_007d-527"><code>KPSE_DOT </code><span class="roman">expansion</span></a>: <a href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a></li>
<li><a href="#index-kpse_005ffallback_005ffont-747"><code>kpse_fallback_font</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-kpse_005ffind_005f_002a-795"><code>kpse_find_*</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005ffind_005ffile-796"><code>kpse_find_file</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005ffind_005ffile-715"><code>kpse_find_file</code></a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-kpse_005ffind_005fglyph_005fformat-720"><code>kpse_find_glyph_format</code></a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-kpse_005fformat_005finfo-790"><code>kpse_format_info</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005fformat_005finfo_005ftype-357"><code>kpse_format_info_type</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kpse_005finit_005fprog-793"><code>kpse_init_prog</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005finit_005fprog_0040r_007b_002c-and-_0040code_007bMAKETEX_005fMODE_007d_007d-71"><code>kpse_init_prog</code><span class="roman">, and </span><code>MAKETEX_MODE</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-kpse_005fmake_005fspecs-235"><code>kpse_make_specs</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-kpse_005fopen_005ffile-797"><code>kpse_open_file</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005fprogram_005fname-777"><code>kpse_program_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005fset_005fprogname-785"><code>kpse_set_progname</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005fset_005fprogram_005fname-773"><code>kpse_set_program_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_005fvar_005fvalue-808"><code>kpse_var_value</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-kpsewhich-565"><code>kpsewhich</code></a>: <a href="#Invoking-kpsewhich">Invoking kpsewhich</a></li>
<li><a href="#index-Kpsewhich_002c-and-debugging-350">Kpsewhich, and debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-ksh_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-94"><code>ksh</code><span class="roman">, losing with </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-labrea_002estanford_002eedu-304"><code>labrea.stanford.edu</code></a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-LaserJet-drive-58">LaserJet drive</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-last_002dresort-font-740">last-resort font</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-La_0040TeX_007b_007d-help-mailing-list-334">LaTeX help mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-lcircle10-732"><code>lcircle10</code></a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-LDFLAGS-122"><code>LDFLAGS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-leading-colons-499">leading colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-leaf-directories-wrongly-guessed-384">leaf directories wrongly guessed</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-leaf-directory-trick-533">leaf directory trick</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-libdl_002ea-424"><code>libdl.a</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-libraries_002c-changing-158">libraries, changing</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-libraries_002c-specifying-additional-125">libraries, specifying additional</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-LIBS-124"><code>LIBS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-libucb_0040r_007b_002c-avoiding_007d-163"><code>libucb</code><span class="roman">, avoiding</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-license-for-using-the-library-8">license for using the library</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-LIGFONTS-635"><code>LIGFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-lines_002c-reading-arbitrary_002dlength-803">lines, reading arbitrary-length</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-Linux-File-System-Standard-227">Linux File System Standard</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Linux-shells-and-_0040code_007bconfigure_007d-101">Linux shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-Linux_002c-using-Web2c-293">Linux, using Web2c</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-lndir-_0040r_007bfor-building-symlink-trees_007d-131"><code>lndir </code><span class="roman">for building symlink trees</span></a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-loader-options-123">loader options</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-loader-options_002c-final-154">loader options, final</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-loader-options_002c-initial-152">loader options, initial</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-local-cache-of-fonts-253">local cache of fonts</a>: <a href="#Security">Security</a></li>
<li><a href="#index-log-file-367">log file</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-logging-successful-searches-368">logging successful searches</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-lost_002bfound-_0040r_007bdirectory_007d-471"><code>lost+found </code><span class="roman">directory</span></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-lostchar-754"><code>lostchar</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-ls_002dR-636"><code>ls-R</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-ls_002dR-_0040r_007band-AFS_007d-175"><code>ls-R </code><span class="roman">and AFS</span></a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-ls_002dR-_0040r_007bdatabase-file_007d-543"><code>ls-R </code><span class="roman">database file</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-ls_002dR_0040r_007b_002c-simplest-build_007d-545"><code>ls-R</code><span class="roman">, simplest build</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-Mach10-_0040code_007bconfigure_007d-error-415">Mach10 <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-Macintosh-_0040TeX_007b_007d-implementations-299">Macintosh TeX implementations</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-MacKenzie_002c-David-535">MacKenzie, David</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-MacKenzie_002c-David-22">MacKenzie, David</a>: <a href="#History">History</a></li>
<li><a href="#index-magic-characters-449">magic characters</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-mailing-lists-327">mailing lists</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-maintainer_002dclean-_0040r_007bMake-target_007d-180"><code>maintainer-clean </code><span class="roman">Make target</span></a>: <a href="#Cleaning-up">Cleaning up</a></li>
<li><a href="#index-Make-arguments_002c-additional-156">Make arguments, additional</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-make_0040r_007b_002c-running_007d-142"><code>make</code><span class="roman">, running</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Makefile_002ein-86"><code>Makefile.in</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-Makefiles_002c-empty-410">Makefiles, empty</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-MAKETEX_005fDEBUG-_0040r_007b_0028512_0029_007d-362"><code>MAKETEX_DEBUG </code><span class="roman">(512)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-MAKETEX_005fFINE_005fDEBUG-_0040r_007b_00281024_0029_007d-363"><code>MAKETEX_FINE_DEBUG </code><span class="roman">(1024)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-MAKETEX_005fMODE-69"><code>MAKETEX_MODE</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-memory-allocation-routines-799">memory allocation routines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-metafont-driver-files-214">metafont driver files</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Metafont-failures-401">Metafont failures</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-Metafont-installation-399">Metafont installation</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-Metafont-making-too_002dlarge-fonts-395">Metafont making too-large fonts</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-Metafont-using-the-wrong-device-391">Metafont using the wrong device</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-MFBASES-602"><code>MFBASES</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MFINPUTS-645"><code>MFINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MFPOOL-647"><code>MFPOOL</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MFTINPUTS-649"><code>MFTINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-mirrors_002c-FTP-281">mirrors, FTP</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-MISCFONTS-650"><code>MISCFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-mismatched-checksum-warnings-753">mismatched checksum warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-missfont_002elog-243"><code>missfont.log</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-MISSFONT_005fLOG-246"><code>MISSFONT_LOG</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-missing-character-warnings-755">missing character warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-g_t_0040file_007bmktex_007d-script-configuration-190"><samp><span class="file">mktex</span></samp> script configuration</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_0040file_007bmktex_007d-script-names-232"><samp><span class="file">mktex</span></samp> script names</a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-g_t_0040file_007bmktex_007d-scripts-184"><samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-mktex_002ecnf-199"><code>mktex.cnf</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-mktex_002eopt-201"><code>mktex.opt</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-mktexdir-205"><code>mktexdir</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-mktexmf-238"><code>mktexmf</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mktexpk-236"><code>mktexpk</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mktexpk-_0040r_007b_002c-initial-runs_007d-38"><code>mktexpk </code><span class="roman">, initial runs</span></a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-g_t_0040code_007bmktexpk_007d-can_0027t-guess-mode-390"><code>mktexpk</code> can't guess mode</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-mktextex-237"><code>mktextex</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mktextfm-239"><code>mktextfm</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mode-directory_002c-omitting-216">mode directory, omitting</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Morgan_002c-Tim-14">Morgan, Tim</a>: <a href="#History">History</a></li>
<li><a href="#index-mostlyclean-_0040r_007bMake-target_007d-178"><code>mostlyclean </code><span class="roman">Make target</span></a>: <a href="#Cleaning-up">Cleaning up</a></li>
<li><a href="#index-MPINPUTS-652"><code>MPINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MPMEMS-641"><code>MPMEMS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MPPOOL-654"><code>MPPOOL</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MPSUPPORT-643"><code>MPSUPPORT</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MT_005fFEATURES-202"><code>MT_FEATURES</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-multiple-architectures_002c-compiling-on-127">multiple architectures, compiling on</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-multiple-architectures_002c-directories-for-132">multiple architectures, directories for</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-multiple-architectures_002c-installing-on-167">multiple architectures, installing on</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-multiple-_0040TeX_007b_007d-hierarchies-525">multiple TeX hierarchies</a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-must-exist-458">must exist</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-names-for-_0040file_007bmktex_007d-scripts-233">names for <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-NetBSD-_0040code_007bconfigure_007d-error-413">NetBSD <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-NetBSD-shells-and-_0040code_007bconfigure_007d-99">NetBSD shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-Neumann_002c-Gustaf-25">Neumann, Gustaf</a>: <a href="#History">History</a></li>
<li><a href="#index-newsgroup-for-_0040TeX_007b_007d-336">newsgroup for TeX</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-NeXT-_0040code_007bsed_007d-error-417">NeXT <code>sed</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-NeXT_002c-lacking-X11-54">NeXT, lacking X11</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-NFS-and-_0040file_007bls_002dR_007d-556">NFS and <samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-NFS-CTAN-access-284">NFS CTAN access</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-nomfdrivers-213"><code>nomfdrivers</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-nomode-215"><code>nomode</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-non_002dEnglish-typesetting-63">non-English typesetting</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-non_002dUnix-operating-systems-42">non-Unix operating systems</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-none-756"><code>none</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-null-pointers_002c-dereferencing-325">null pointers, dereferencing</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-numeric-debugging-values-351">numeric debugging values</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-obtaining-_0040TeX_007b_007d-268">obtaining TeX</a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-obtaining-Web2c-by-ftp-275">obtaining Web2c by ftp</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-obtaining-Web2c-on-CD_002dROM-288">obtaining Web2c on CD-ROM</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-OCPINPUTS-656"><code>OCPINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-OFMFONTS-658"><code>OFMFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-online-Metafont-display_002c-spurious-397">online Metafont display, spurious</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-OPENTYPEFONTS-659"><code>OPENTYPEFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-OpenWin-libraries_002c-dynamic-linking-problems-427">OpenWin libraries, dynamic linking problems</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-optimization-caveat-403">optimization caveat</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-optimization_002c-enabling-137">optimization, enabling</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-options-for-debugging-342">options for debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-options-to-_0040code_007bconfigure_007d-109">options to <code>configure</code></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-OS_002f2-support-45">OS/2 support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-other-_0040TeX_007b_007d-distributions-294">other TeX distributions</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-OTPINPUTS-662"><code>OTPINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-overview-of-path-searching-447">overview of path searching</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-overview-of-programming-with-Kpathsea-763">overview of programming with Kpathsea</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-OVFFONTS-664"><code>OVFFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-OVPFONTS-666"><code>OVPFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-patches_002c-Sun-OpenWin-434">patches, Sun OpenWin</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-path-expansion-495">path expansion</a>: <a href="#Path-expansion">Path expansion</a></li>
<li><a href="#index-path-searching-444">path searching</a>: <a href="#Path-searching">Path searching</a></li>
<li><a href="#index-path-searching-options-568">path searching options</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-path-searching_002c-overview-446">path searching, overview</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-path-searching_002c-standalone-566">path searching, standalone</a>: <a href="#Invoking-kpsewhich">Invoking kpsewhich</a></li>
<li><a href="#index-path-sources-473">path sources</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-paths_002c-changing-default-76">paths, changing default</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-paths_002c-changing-default-65">paths, changing default</a>: <a href="#Changing-search-paths">Changing search paths</a></li>
<li><a href="#index-paths_002c-device-name-included-in-70">paths, device name included in</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-paths_002eh-83"><code>paths.h</code></a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-paths_002eh_0040r_007b_002c-creating_007d-144"><code>paths.h</code><span class="roman">, creating</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-pathsearch_002eh-764"><code>pathsearch.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-pc-_0040r_007bPascal-compiler_007d-20"><code>pc </code><span class="roman">Pascal compiler</span></a>: <a href="#History">History</a></li>
<li><a href="#index-PCL-driver-57">PCL driver</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-PDF-generation-59">PDF generation</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-PDFTEXCONFIG-667"><code>PDFTEXCONFIG</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-permission-denied-467">permission denied</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-permissions_002c-directory-262">permissions, directory</a>: <a href="#Security">Security</a></li>
<li><a href="#index-permissions_002c-file-260">permissions, file</a>: <a href="#Security">Security</a></li>
<li><a href="#index-PKFONTS-669"><code>PKFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-plain_002ebase-398"><code>plain.base</code></a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-pointer-combination-warnings-441">pointer combination warnings</a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-PostScript-driver-60">PostScript driver</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-PostScript-fonts_002c-additional-35">PostScript fonts, additional</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-precompiled-executables_002c-instead-of-installation-32">precompiled executables, instead of installation</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-precompiled-Unix-binaries-303">precompiled Unix binaries</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-preprocessor-options-121">preprocessor options</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-preprocessor-options_002c-additional-148">preprocessor options, additional</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-printer-configuration-files-34">printer configuration files</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-privacy_002c-semblance-of-375">privacy, semblance of</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-problems_002c-common-377">problems, common</a>: <a href="#Common-problems">Common problems</a></li>
<li><a href="#index-proginit_002ec-72"><code>proginit.c</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-proginit_002eh-794"><code>proginit.h</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-program_002dvarying-paths-598">program-varying paths</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-program_005finvocation_005fname-775"><code>program_invocation_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-program_005finvocation_005fshort_005fname-776"><code>program_invocation_short_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-programming-overview-762">programming overview</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-programming-with-config-files-806">programming with config files</a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-programming-with-Kpathsea-771">programming with Kpathsea</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-programs-using-the-library-3">programs using the library</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-proof-mode-396">proof mode</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-PSHEADERS-675"><code>PSHEADERS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-pxp-_0040r_007bPascal-preprocessor_007d-19"><code>pxp </code><span class="roman">Pascal preprocessor</span></a>: <a href="#History">History</a></li>
<li><a href="#index-quoting-variable-values-511">quoting variable values</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-readable-757"><code>readable</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-reading-arbitrary_002dlength-lines-801">reading arbitrary-length lines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-README_002eCONFIGURE-90"><code>README.CONFIGURE</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-README_002emirrors-279"><code>README.mirrors</code></a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-recording-successful-searches-369">recording successful searches</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-relative-filenames-464">relative filenames</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-relative-filenames-in-_0040file_007bls_002dR_007d-176">relative filenames in <samp><span class="file">ls-R</span></samp></a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-reporting-bugs-306">reporting bugs</a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-resident_002ec-791"><code>resident.c</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-resolution_002c-setting-571">resolution, setting</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-resolutions_002c-last_002dresort-739">resolutions, last-resort</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-retrieving-_0040TeX_007b_007d-269">retrieving TeX</a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-right_002dhand-side-of-variable-assignments-491">right-hand side of variable assignments</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-Rokicki_002c-Tom-15">Rokicki, Tom</a>: <a href="#History">History</a></li>
<li><a href="#index-g_t_0040t_007broot_007d-user-519"><tt>root</tt> user</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-runtime-configuration-files-482">runtime configuration files</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-runtime-debugging-341">runtime debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-Sauter-fonts_002c-and-dynamic-source-creation-188">Sauter fonts, and dynamic source creation</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-scripts-for-file-creation-185">scripts for file creation</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-search-path_002c-defined-448">search path, defined</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-search-paths_002c-changing-default-64">search paths, changing default</a>: <a href="#Changing-search-paths">Changing search paths</a></li>
<li><a href="#index-searching-for-files-712">searching for files</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-searching-for-glyphs-717">searching for glyphs</a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-searching-overview-445">searching overview</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-searching-the-database-453">searching the database</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-searching-the-disk-457">searching the disk</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-security-considerations-250">security considerations</a>: <a href="#Security">Security</a></li>
<li><a href="#index-sed-_0040r_007berror-from-_0040code_007bconfigure_007d_007d-411"><code>sed </code><span class="roman">error from </span><code>configure</code></a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-SELFAUTODIR-780">SELFAUTODIR</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-SELFAUTOLOC-779">SELFAUTOLOC</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-SELFAUTOPARENT-781">SELFAUTOPARENT</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-sending-patches-319">sending patches</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-setgid-scripts-258">setgid scripts</a>: <a href="#Security">Security</a></li>
<li><a href="#index-SFDFONTS-677"><code>SFDFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-sh5_0040r_007b_002c-ok-with-_0040code_007bconfigure_007d_007d-104"><code>sh5</code><span class="roman">, ok with </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-shar_0040r_007b_002c-recommended_007d-317">shar<span class="roman">, recommended</span></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-shared-library_002c-making-139">shared library, making</a>: <a href="#Shared-library">Shared library</a></li>
<li><a href="#index-shell-scripts-as-configuration-files-492">shell scripts as configuration files</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-shell-variables-512">shell variables</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-shell_005fescape_0040r_007b_002c-example-for-code_007d-810"><code>shell_escape</code><span class="roman">, example for code</span></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-shells-and-_0040code_007bconfigure_007d-92">shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-simple-installation-30">simple installation</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-site-overrides-for-_0040code_007bmktex_0040dots_007b_007d_007d-200">site overrides for <code>mktex...</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-size-of-distribution-archives-49">size of distribution archives</a>: <a href="#Disk-space">Disk space</a></li>
<li><a href="#index-skeleton-_0040TeX_007b_007d-directory-266">skeleton TeX directory</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-slow-startup-time-386">slow startup time</a>: <a href="#Slow-path-searching">Slow path searching</a></li>
<li><a href="#index-Solaris-BSD-compatibility_002c-not-162">Solaris BSD compatibility, not</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-source-files-682"><code>source files</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-sources-for-search-paths-474">sources for search paths</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-special-759"><code>special</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-st_005fnlink-536"><code>st_nlink</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-stack-trace-321">stack trace</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-standalone-path-searching-567">standalone path searching</a>: <a href="#Invoking-kpsewhich">Invoking kpsewhich</a></li>
<li><a href="#index-standard-error-and-debugging-output-349">standard error and debugging output</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-standard-options-590">standard options</a>: <a href="#Standard-options">Standard options</a></li>
<li><a href="#index-startup-time_002c-excessive-387">startup time, excessive</a>: <a href="#Slow-path-searching">Slow path searching</a></li>
<li><a href="#index-static-linking-435">static linking</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-static-linking-and-_0040code_007bdlsym_007d-419">static linking and <code>dlsym</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-string-routines-800">string routines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-strip-221"><code>strip</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-stripsupplier-217"><code>stripsupplier</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-striptypeface-219"><code>striptypeface</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-subdirectory-searching-529">subdirectory searching</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-suggestions_002c-making-6">suggestions, making</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-Sun-2-18">Sun 2</a>: <a href="#History">History</a></li>
<li><a href="#index-Sun-OpenWin-patches-433">Sun OpenWin patches</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-supplier-directory_002c-omitting-218">supplier directory, omitting</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-supported-file-formats-594">supported file formats</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-suppressing-warnings-749">suppressing warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-symbolic-link-trees_002c-for-multiple-architectures-129">symbolic link trees, for multiple architectures</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-symbolic-links-not-found-383">symbolic links not found</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-symbolic-links_002c-and-_0040file_007bls_002dR_007d-553">symbolic links, and <samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-symlinks_002c-resolving-783">symlinks, resolving</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-system-C-compiler-bugs-405">system C compiler bugs</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-system-dependencies-89">system dependencies</a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-system-V-universe-161">system V universe</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-T1FONTS-696"><code>T1FONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-T1INPUTS-697"><code>T1INPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-T42FONTS-700"><code>T42FONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TDS-267">TDS</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-testing_002c-post_002dinstallation-248">testing, post-installation</a>: <a href="#Installation-testing">Installation testing</a></li>
<li><a href="#index-tests_002c-simple-39">tests, simple</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-te_0040TeX_007b_007d-302">teTeX</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-directory-structure-264">TeX directory structure</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-distributions-besides-Web2c-295">TeX distributions besides Web2c</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-environment-variables-597">TeX environment variables</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-failures-400">TeX failures</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-file-lookup-713">TeX file lookup</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-glyph-lookup-718">TeX glyph lookup</a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-help-mailing-list-333">TeX help mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-hierarchy_002c-one-126">TeX hierarchy, one</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-Live-CD_002dROM-290">TeX Live CD-ROM</a>: <a href="#CD_002dROM-distribution">CD-ROM distribution</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-support-593">TeX support</a>: <a href="#TeX-support">TeX support</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-Users-Group-10">TeX Users Group</a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-tex_002darchive_0040_0040math_002eutah_002eedu-331"><code>tex-archive@math.utah.edu</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-tex_002dfile_002ec-714"><code>tex-file.c</code></a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-tex_002dfile_002eh-765"><code>tex-file.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-tex_002dglyph_002ec-719"><code>tex-glyph.c</code></a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-tex_002dglyph_002eh-766"><code>tex-glyph.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-tex_002dk_002drequest_0040_0040mail_002etug_002eorg-330"><code>tex-k-request@mail.tug.org</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-tex_002dk_0040_0040mail_002etug_002eorg-_0040r_007b_0028bug-address_0029_007d-308"><code>tex-k@mail.tug.org </code><span class="roman">(bug address)</span></a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-tex_002dmake_002ec-234"><code>tex-make.c</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-TEX_005fHUSH-750"><code>TEX_HUSH</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-TEX_005fHUSH-472"><code>TEX_HUSH</code></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-TEXBIB-606"><code>TEXBIB</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXCONFIG-616"><code>TEXCONFIG</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXDOCS-681"><code>TEXDOCS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXFONTMAPS-639"><code>TEXFONTMAPS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXFONTS-626"><code>TEXFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-texfonts_002emap-729"><code>texfonts.map</code></a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-TEXFORMATS-621"><code>TEXFORMATS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXINDEXSTYLE-632"><code>TEXINDEXSTYLE</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXINPUTS-630"><code>TEXINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMF-263"><code>TEXMF</code></a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-texmf_002ecnf_0040r_007b_002c-and-variable-expansion_007d-510"><code>texmf.cnf</code><span class="roman">, and variable expansion</span></a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-texmf_002ecnf_0040r_007b_002c-creating_007d-143"><code>texmf.cnf</code><span class="roman">, creating</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-texmf_002ecnf_0040r_007b_002c-definition-for_007d-481"><code>texmf.cnf</code><span class="roman">, definition for</span></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-texmf_002ecnf_0040r_007b_002c-generated_007d-82"><code>texmf.cnf</code><span class="roman">, generated</span></a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-texmf_002ecnf_0040r_007b_002c-source-for-path_007d-478"><code>texmf.cnf</code><span class="roman">, source for path</span></a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-texmf_002ein-81"><code>texmf.in</code></a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-texmf_002ein_0040r_007b_002c-editing_007d-66"><code>texmf.in</code><span class="roman">, editing</span></a>: <a href="#Changing-search-paths">Changing search paths</a></li>
<li><a href="#index-texmf_002esed-80"><code>texmf.sed</code></a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-TEXMFCNF-612"><code>TEXMFCNF</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFCNF-483"><code>TEXMFCNF</code></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-TEXMFDBS-637"><code>TEXMFDBS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFDBS-544"><code>TEXMFDBS</code></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-TEXMFINI-603"><code>TEXMFINI</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFLOG-372"><code>TEXMFLOG</code></a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-TEXMFOUTPUT-245"><code>TEXMFOUTPUT</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-TEXMFSCRIPTS-684"><code>TEXMFSCRIPTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFVAR-230"><code>TEXMFVAR</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-texmfvar-229"><code>texmfvar</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-TEXPICTS-629"><code>TEXPICTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXPKS-670"><code>TEXPKS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXPOOL-686"><code>TEXPOOL</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXPSHEADERS-674"><code>TEXPSHEADERS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXSIZES-744"><code>TEXSIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-TEXSOURCES-683"><code>TEXSOURCES</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TFMFONTS-688"><code>TFMFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-tilde-expansion-516">tilde expansion</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-tilde_002ec-522"><code>tilde.c</code></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-time-_0040r_007bsystem-call_007d-374"><code>time </code><span class="roman">system call</span></a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-tolerance-for-glyph-lookup-723">tolerance for glyph lookup</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-total-disk-space-48">total disk space</a>: <a href="#Disk-space">Disk space</a></li>
<li><a href="#index-trailing-_0040samp_007b_002f_007d-in-home-directory-520">trailing `<samp><span class="samp">/</span></samp>' in home directory</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-trailing-colons-500">trailing colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-TRFONTS-690"><code>TRFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-trick-for-detecting-leaf-directories-532">trick for detecting leaf directories</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-trojan-horse-attack-251">trojan horse attack</a>: <a href="#Security">Security</a></li>
<li><a href="#index-TTFONTS-693"><code>TTFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-tug_002eorg-271"><code>tug.org</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-tug_0040_0040tug_002eorg-11"><code>tug@tug.org</code></a>: <a href="#Introduction">Introduction</a></li>
<li><a href="#index-typeface-directory_002c-omitting-220">typeface directory, omitting</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-ucbinclude_0040r_007b_002c-avoiding_007d-164"><code>ucbinclude</code><span class="roman">, avoiding</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Ultrix-shells-and-_0040code_007bconfigure_007d-103">Ultrix shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-unable-to-find-files-379">unable to find files</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-unable-to-generate-fonts-388">unable to generate fonts</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-uname-313"><code>uname</code></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-universe_002c-BSD-vs_002e_0040_003a-system-V-159">universe, BSD vs. system V</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-UNIX_005fST_005fLINK-537"><code>UNIX_ST_LINK</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-unixtex_002eftp-270"><code>unixtex.ftp</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-unknown-special-warnings-760">unknown special warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-unreadable-file-warnings-758">unreadable file warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-unreadable-files-468">unreadable files</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-unusable-_0040file_007bls_002dR_007d-warning-558">unusable <samp><span class="file">ls-R</span></samp> warning</a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-usage-patterns_002c-finding-370">usage patterns, finding</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-USE_005fTEXMFVAR-231"><code>USE_TEXMFVAR</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-USE_005fVARTEXFONTS-228"><code>USE_VARTEXFONTS</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Usenet-_0040TeX_007b_007d-newsgroup-335">Usenet TeX newsgroup</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-varfonts-224"><code>varfonts</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-variable-expansion-508">variable expansion</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-variable_002ec-513"><code>variable.c</code></a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-variable_002eh-809"><code>variable.h</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-VARTEXFONTS-226"><code>VARTEXFONTS</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-VAX-11_002f750-17">VAX 11/750</a>: <a href="#History">History</a></li>
<li><a href="#index-version-number_002c-of-Kpathsea-51">version number, of Kpathsea</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-version-numbers_002c-determining-312">version numbers, determining</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-VF-files_002c-not-found-459">VF files, not found</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-VFFONTS-702"><code>VFFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-VMS-support-46">VMS support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-VMS-_0040TeX_007b_007d-implementations-298">VMS TeX implementations</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-Vojta_002c-Paul-21">Vojta, Paul</a>: <a href="#History">History</a></li>
<li><a href="#index-Walsh_002c-Norman-24">Walsh, Norman</a>: <a href="#History">History</a></li>
<li><a href="#index-warning-about-unusable-_0040file_007bls_002dR_007d-557">warning about unusable <samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-warnings_002c-file-access-470">warnings, file access</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-warnings_002c-pointer-combinations-440">warnings, pointer combinations</a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-warnings_002c-suppressing-748">warnings, suppressing</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-wcstombs-423"><code>wcstombs</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-WEB2C-706"><code>WEB2C</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-Weber_002c-Olaf-26">Weber, Olaf</a>: <a href="#History">History</a></li>
<li><a href="#index-WEBINPUTS-705"><code>WEBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-whitespace_002c-in-fontmap-files-734">whitespace, in fontmap files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-whitespace_002c-not-ignored-on-continuation-lines-488">whitespace, not ignored on continuation lines</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-Windows-_0040TeX_007b_007d-implementations-301">Windows TeX implementations</a>: <a href="#Other-TeX-packages">Other TeX packages</a></li>
<li><a href="#index-World-Wide-Web-CTAN-access-282">World Wide Web CTAN access</a>: <a href="#Electronic-distribution">Electronic distribution</a></li>
<li><a href="#index-www_002etug_002eorg-272"><code>www.tug.org</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-X11-previewer-61">X11 previewer</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-X11_002c-lacking-on-NeXT-55">X11, lacking on NeXT</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-XCFLAGS-149"><code>XCFLAGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XCPPFLAGS-146"><code>XCPPFLAGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XDEFS-147"><code>XDEFS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XDVIFONTS-709"><code>XDVIFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-XDVIMAKEPK-241"><code>XDVIMAKEPK</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-XDVISIZES-742"><code>XDVISIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-XLDFLAGS-151"><code>XLDFLAGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XLOADLIBES-153"><code>XLOADLIBES</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XMAKEARGS-155"><code>XMAKEARGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Xmu-_0040r_007blibrary-problems_007d-432"><code>Xmu </code><span class="roman">library problems</span></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-XtStrings-418"><code>XtStrings</code></a>: <a href="#XtStrings">XtStrings</a></li>
<li><a href="#index-zuhn_002c-david-23">zuhn, david</a>: <a href="#History">History</a></li>
<li><a href="#index-g_t_0040_007b-_0040r_007bexpansion_007d-523"><code>{ </code><span class="roman">expansion</span></a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-g_t_007e-_0040r_007bexpansion_007d-514"><code>~ </code><span class="roman">expansion</span></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
</ul>
<div class="contents">
<h2>Table of Contents</h2>
<ul>
<li><a name="toc_Top" href="#Top">Kpathsea library</a>
<li><a name="toc_Introduction" href="#Introduction">1 Introduction</a>
<ul>
<li><a href="#History">1.1 History</a>
</li></ul>
<li><a name="toc_Installation" href="#Installation">2 Installation</a>
<ul>
<li><a href="#Simple-installation">2.1 Simple installation</a>
<li><a href="#Custom-installation">2.2 Custom installation</a>
<ul>
<li><a href="#Disk-space">2.2.1 Disk space</a>
<li><a href="#Kpathsea-application-distributions">2.2.2 Kpathsea application distributions</a>
<li><a href="#Changing-search-paths">2.2.3 Changing search paths</a>
<ul>
<li><a href="#Default-path-features">2.2.3.1 Default path features</a>
<li><a href="#Default-path-generation">2.2.3.2 Default path generation</a>
</li></ul>
<li><a href="#Running-configure">2.2.4 Running <code>configure</code></a>
<ul>
<li><a href="#configure-shells">2.2.4.1 <code>configure</code> shells</a>
<li><a href="#configure-options">2.2.4.2 <code>configure</code> options</a>
<li><a href="#configure-environment">2.2.4.3 <code>configure</code> environment</a>
<li><a href="#configure-scenarios">2.2.4.4 <code>configure</code> scenarios</a>
<li><a href="#Shared-library">2.2.4.5 Shared library</a>
</li></ul>
<li><a href="#Running-make">2.2.5 Running <code>make</code></a>
<li><a href="#Installing-files">2.2.6 Installing files</a>
<li><a href="#Cleaning-up">2.2.7 Cleaning up</a>
<li><a href="#Filename-database-generation">2.2.8 Filename database generation</a>
<li><a href="#mktex-scripts">2.2.9 <samp><span class="file">mktex</span></samp> scripts</a>
<ul>
<li><a href="#mktex-configuration">2.2.9.1 <samp><span class="file">mktex</span></samp> configuration</a>
<li><a href="#mktex-script-names">2.2.9.2 <samp><span class="file">mktex</span></samp> script names</a>
<li><a href="#mktex-script-arguments">2.2.9.3 <samp><span class="file">mktex</span></samp> script arguments</a>
</li></ul>
<li><a href="#Installation-testing">2.2.10 Installation testing</a>
</li></ul>
<li><a href="#Security">2.3 Security</a>
<li><a href="#TeX-directory-structure">2.4 TeX directory structure</a>
<li><a href="#unixtex_002eftp">2.5 <samp><span class="file">unixtex.ftp</span></samp>: Obtaining TeX</a>
<ul>
<li><a href="#Electronic-distribution">2.5.1 Electronic distribution</a>
<li><a href="#CD_002dROM-distribution">2.5.2 CD-ROM distribution</a>
<li><a href="#Other-TeX-packages">2.5.3 Other TeX packages</a>
</li></ul>
<li><a href="#Reporting-bugs">2.6 Reporting bugs</a>
<ul>
<li><a href="#Bug-checklist">2.6.1 Bug checklist</a>
<li><a href="#Mailing-lists">2.6.2 Mailing lists</a>
<li><a href="#Debugging">2.6.3 Debugging</a>
<li><a href="#Logging">2.6.4 Logging</a>
<li><a href="#Common-problems">2.6.5 Common problems</a>
<ul>
<li><a href="#Unable-to-find-files">2.6.5.1 Unable to find files</a>
<li><a href="#Slow-path-searching">2.6.5.2 Slow path searching</a>
<li><a href="#Unable-to-generate-fonts">2.6.5.3 Unable to generate fonts</a>
<li><a href="#TeX-or-Metafont-failing">2.6.5.4 TeX or Metafont failing</a>
<li><a href="#Empty-Makefiles">2.6.5.5 Empty Makefiles</a>
<li><a href="#XtStrings">2.6.5.6 <code>XtStrings</code></a>
<li><a href="#dlopen">2.6.5.7 <code>dlopen</code></a>
<li><a href="#ShellWidgetClass">2.6.5.8 <code>ShellWidgetClass</code></a>
<li><a href="#Pointer-combination-warnings">2.6.5.9 Pointer combination warnings</a>
</li></ul>
</li></ul>
</li></ul>
<li><a name="toc_Path-searching" href="#Path-searching">3 Path searching</a>
<ul>
<li><a href="#Searching-overview">3.1 Searching overview</a>
<li><a href="#Path-sources">3.2 Path sources</a>
<ul>
<li><a href="#Config-files">3.2.1 Config files</a>
</li></ul>
<li><a href="#Path-expansion">3.3 Path expansion</a>
<ul>
<li><a href="#Default-expansion">3.3.1 Default expansion</a>
<li><a href="#Variable-expansion">3.3.2 Variable expansion</a>
<li><a href="#Tilde-expansion">3.3.3 Tilde expansion</a>
<li><a href="#Brace-expansion">3.3.4 Brace expansion</a>
<li><a href="#KPSE_005fDOT-expansion">3.3.5 <code>KPSE_DOT</code> expansion</a>
<li><a href="#Subdirectory-expansion">3.3.6 Subdirectory expansion</a>
</li></ul>
<li><a href="#Filename-database">3.4 Filename database (<code>ls-R</code>)</a>
<ul>
<li><a href="#ls_002dR">3.4.1 <samp><span class="file">ls-R</span></samp></a>
<li><a href="#Filename-aliases">3.4.2 Filename aliases</a>
<li><a href="#Database-format">3.4.3 Database format</a>
</li></ul>
<li><a href="#Invoking-kpsewhich">3.5 <code>kpsewhich</code>: Standalone path searching</a>
<ul>
<li><a href="#Path-searching-options">3.5.1 Path searching options</a>
<li><a href="#Auxiliary-tasks">3.5.2 Auxiliary tasks</a>
<li><a href="#Standard-options">3.5.3 Standard options</a>
</li></ul>
</li></ul>
<li><a name="toc_TeX-support" href="#TeX-support">4 TeX support</a>
<ul>
<li><a href="#Supported-file-formats">4.1 Supported file formats</a>
<li><a href="#File-lookup">4.2 File lookup</a>
<li><a href="#Glyph-lookup">4.3 Glyph lookup</a>
<ul>
<li><a href="#Basic-glyph-lookup">4.3.1 Basic glyph lookup</a>
<li><a href="#Fontmap">4.3.2 Fontmap</a>
<li><a href="#Fallback-font">4.3.3 Fallback font</a>
</li></ul>
<li><a href="#Suppressing-warnings">4.4 Suppressing warnings</a>
</li></ul>
<li><a name="toc_Programming" href="#Programming">5 Programming</a>
<ul>
<li><a href="#Programming-overview">5.1 Programming overview</a>
<li><a href="#Calling-sequence">5.2 Calling sequence</a>
<li><a href="#Program_002dspecific-files">5.3 Program-specific files</a>
<li><a href="#Programming-with-config-files">5.4 Programming with config files</a>
</li></ul>
<li><a name="toc_Index" href="#Index">Index</a>
</li></ul>
</div>
</body></html>
|