summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/kpathsea/kpathsea.html
blob: 075aa10f522f3c07d682c4d1e0c89c3b56ef4524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
<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.13">
<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, 2008, 2009, 2010 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 TeX Users Group.-->
<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="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>
<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="#Specially_002drecognized-files">3.5.2 Specially-recognized files for <samp><span class="command">kpsewhich</span></samp></a>
<li><a href="#Auxiliary-tasks">3.5.3 Auxiliary tasks</a>
<li><a href="#Standard-options">3.5.4 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>



<div class="node">
<a name="Top"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Introduction">Introduction</a>,
Up:&nbsp;<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 6.0.0,
released in July 2010.

<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">
<a name="Introduction"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Installation">Installation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<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 6.0.0 of the Kpathsea
library, released in July 2010.

   <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 &lsquo;<samp><span class="samp">dvilj</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">xdvi</span></samp>&rsquo; 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
accompanying files 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, thanks!).  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.  See <a href="http://tug.org">http://tug.org</a> for information.

<ul class="menu">
<li><a accesskey="1" href="#History">History</a>
</ul>

<div class="node">
<a name="History"></a>
<p><hr>
Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>

</div>

<h3 class="section">1.1 History</h3>

<p><a name="index-history-of-Kpathsea-11"></a>
<a name="index-Knuth_002c-Donald-E_002e-12"></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 &ldquo;Errors of
TeX&rdquo; paper by Don Knuth, published in <cite>Software&mdash;Practice and
Experience</cite> 19(7), July 1989.)

   <p><a name="index-Morgan_002c-Tim-13"></a><a name="index-Rokicki_002c-Tom-14"></a><a name="index-Berry_002c-Karl-15"></a><a name="index-VAX-11_002f750-16"></a><a name="index-Sun-2-17"></a><a name="index-pxp-_0040r_007bPascal-preprocessor_007d-18"></a><a name="index-pc-_0040r_007bPascal-compiler_007d-19"></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-20"></a>In the first incarnation, I just hacked separately on each
program&mdash;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&mdash;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-21"></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-22"></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-23"></a><a name="index-Neumann_002c-Gustaf-24"></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-25"></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">
<a name="Installation"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Path-searching">Path searching</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>

</div>

<h2 class="chapter">2 Installation</h2>

<p><a name="index-installation-26"></a><a name="index-configuration-27"></a><a name="index-compilation-28"></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">
<a name="Simple-installation"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Custom-installation">Custom installation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a>

</div>

<h3 class="section">2.1 Simple installation</h3>

<p><a name="index-simple-installation-29"></a><a name="index-installation_002c-simple-30"></a>
<a name="index-precompiled-executables_002c-instead-of-installation-31"></a><a name="index-installation_002c-getting-executables-instead-of-32"></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 &lsquo;<samp><span class="samp">sh configure</span></samp>&rsquo;.  (If you
have the GNU Bash shell installed, run &lsquo;<samp><span class="samp">bash configure</span></samp>&rsquo;.) 
See <a href="#Running-configure">Running configure</a>.

     <li>&lsquo;<samp><span class="samp">make</span></samp>&rsquo;. 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>&lsquo;<samp><span class="samp">make install</span></samp>&rsquo;. See <a href="#Installing-files">Installing files</a>.

     <li>&lsquo;<samp><span class="samp">make distclean</span></samp>&rsquo;. 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 &amp;&amp; <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-33"></a><a name="index-PostScript-fonts_002c-additional-34"></a><a name="index-color-printers_002c-configuring-35"></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-36"></a><a name="index-mktexpk-_0040r_007b_002c-initial-runs_007d-37"></a><a name="index-tests_002c-simple-38"></a>For some simple tests, try &lsquo;<samp><span class="samp">tex story \\bye</span></samp>&rsquo; and &lsquo;<samp><span class="samp">latex
sample2e</span></samp>&rsquo;.  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">
<a name="Custom-installation"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Security">Security</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Simple-installation">Simple installation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a>

</div>

<h3 class="section">2.2 Custom installation</h3>

<p><a name="index-custom-installation-39"></a><a name="index-installation_002c-customized-40"></a>
Most sites need to modify the default installation procedure in some
way, perhaps merely changing the prefix from &lsquo;<samp><span class="samp">/usr/local</span></samp>&rsquo;, 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-41"></a><a name="index-Amiga-support-42"></a><a name="index-DOS-support-43"></a><a name="index-OS_002f2-support-44"></a><a name="index-VMS-support-45"></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">
<a name="Disk-space"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Kpathsea-application-distributions">Kpathsea application distributions</a>,
Up:&nbsp;<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-46"></a><a name="index-total-disk-space-47"></a><a name="index-size-of-distribution-archives-48"></a>Here is a table showing the disk space needed for each distribution
(described in the next section).  The `(totals)' line reflects the
&lsquo;<samp><span class="samp">texk</span></samp>&rsquo; source distribution and &lsquo;<samp><span class="samp">texklib</span></samp>&rsquo;; 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">
<a name="Kpathsea-application-distributions"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Changing-search-paths">Changing search paths</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Disk-space">Disk space</a>,
Up:&nbsp;<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-49"></a><a name="index-version-number_002c-of-Kpathsea-50"></a><a name="index-Kpathsea-version-number-51"></a>
<a name="index-distributions_002c-not-compiling-52"></a><a name="index-NeXT_002c-lacking-X11-53"></a><a name="index-X11_002c-lacking-on-NeXT-54"></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
&lsquo;<samp><span class="samp">xdvik</span></samp>&rsquo; (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-55"></a>
     <dl>
<dt><samp><span class="file">dviljk.tar.gz</span></samp><dd><a name="index-PCL-driver-56"></a><a name="index-LaserJet-drive-57"></a>DVI to PCL, for LaserJet printers.

     <br><dt><samp><span class="file">dvipsk.tar.gz</span></samp><dd><a name="index-PDF-generation-58"></a><a name="index-PostScript-driver-59"></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-60"></a>DVI previewing under the X window system.

   </dl>

   <p><a name="index-Babel-61"></a><a name="index-non_002dEnglish-typesetting-62"></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">
<a name="Changing-search-paths"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Running-configure">Running configure</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Kpathsea-application-distributions">Kpathsea application distributions</a>,
Up:&nbsp;<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-63"></a><a name="index-paths_002c-changing-default-64"></a><a name="index-texmf_002ein_0040r_007b_002c-editing_007d-65"></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">
<a name="Default-path-features"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Default-path-generation">Default path generation</a>,
Up:&nbsp;<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-66"></a><a name="index-features_002c-of-default-paths-67"></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-68"></a><a name="index-paths_002c-device-name-included-in-69"></a>By default, the bitmap font paths end with &lsquo;<samp><span class="samp">/$MAKETEX_MODE</span></samp>&rsquo;, thus
including the device name (usually a Metafont mode name such as
&lsquo;<samp><span class="samp">ljfour</span></samp>&rsquo;).  This distinguishes two different devices with the same
resolution&mdash;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-70"></a><a name="index-proginit_002ec-71"></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 &lsquo;<samp><span class="samp">$MAKETEX_MODE</span></samp>&rsquo;.

   <p>See <a href="#mktex-script-arguments">mktex script arguments</a>, for how this interacts with <code>mktexpk</code>.

   <p><a name="index-TDS-72"></a><a name="index-g_t_0040TeX_007b_007d-directory-structure-73"></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.

<div class="node">
<a name="Default-path-generation"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Default-path-features">Default path features</a>,
Up:&nbsp;<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-74"></a><a name="index-paths_002c-changing-default-75"></a><a name="index-installation_002c-changing-default-directories-76"></a><a name="index-directories_002c-changing-default-installation-77"></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-78"></a>To summarize the chain of events that go into defining the default paths:

     <ol type=1 start=1>
<li>&lsquo;<samp><span class="samp">configure</span></samp>&rsquo; 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-79"></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-80"></a><a name="index-texmf_002ecnf_0040r_007b_002c-generated_007d-81"></a><samp><span class="file">texmf.sed</span></samp> (together with a little extra magic&mdash;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-82"></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">
<a name="Running-configure"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Running-make">Running make</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Changing-search-paths">Changing search paths</a>,
Up:&nbsp;<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-83"></a><a name="index-c_002dauto_002ein-84"></a><a name="index-Makefile_002ein-85"></a><a name="index-ac_005finclude_0040r_007b_002c-Autoconf-extension_007d-86"></a><a name="index-g_t_0040_0040_0040var_007bvar_007d_0040_0040-substitutions-87"></a><a name="index-system-dependencies-88"></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 &lsquo;<samp><span class="samp">@</span><var>var</var><span class="samp">@</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">ac_include</span></samp>&rsquo; substitutions).

   <p><a name="index-README_002eCONFIGURE-89"></a><a name="index-kpathsea_002fREADME_002eCONFIGURE-90"></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 &lsquo;<samp><span class="samp">--disable-mktexpk</span></samp>&rsquo;. 
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">
<a name="configure-shells"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#configure-options">configure options</a>,
Up:&nbsp;<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-91"></a><a name="index-bash_0040r_007b_002c-recommended-for-running-_0040code_007bconfigure_007d_007d-92"></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-93"></a><a name="index-bsh_0040r_007b_002c-ok-with-_0040code_007bconfigure_007d_007d-94"></a><a name="index-Korn-shell_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-95"></a><a name="index-AIX-shells-and-_0040code_007bconfigure_007d-96"></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-97"></a><a name="index-NetBSD-shells-and-_0040code_007bconfigure_007d-98"></a><a name="index-FreeBSD-shells-and-_0040code_007bconfigure_007d-99"></a><a name="index-Linux-shells-and-_0040code_007bconfigure_007d-100"></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-101"></a><a name="index-Ultrix-shells-and-_0040code_007bconfigure_007d-102"></a><a name="index-sh5_0040r_007b_002c-ok-with-_0040code_007bconfigure_007d_007d-103"></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">
<a name="configure-options"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#configure-environment">configure environment</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#configure-shells">configure shells</a>,
Up:&nbsp;<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-104"></a>
For a complete list of all <code>configure</code> options, run &lsquo;<samp><span class="samp">configure
--help</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">--help</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">--prefix</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">--datadir</span></samp>&rsquo;, and the like; see <a href="#configure-scenarios">configure scenarios</a>.

   <p><a name="index-g_t_002d_002dwith-_0040r_007boptions_007d-105"></a><a name="index-g_t_002d_002denable-_0040r_007boptions_007d-106"></a><a name="index-configuration-of-optional-features-107"></a><a name="index-options-to-_0040code_007bconfigure_007d-108"></a>This section gives pointers to descriptions of the &lsquo;<samp><span class="samp">--with</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">--enable</span></samp>&rsquo; options to <code>configure</code> that Kpathsea-using programs
accept.

     <dl>
<dt>&lsquo;<samp><span class="samp">--without-mktexmf-default</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--without-mktexpk-default</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--without-mktextfm-default</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--with-mktextex-default</span></samp>&rsquo;<dd>Enable or disable the dynamic generation programs.  See <a href="#mktex-configuration">mktex configuration</a>.

     <br><dt>&lsquo;<samp><span class="samp">--enable-shared</span></samp>&rsquo;<dd><a name="index-g_t_002d_002denable_002dshared-109"></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>&lsquo;<samp><span class="samp">--disable-static</span></samp>&rsquo;<dd><a name="index-g_t_002d_002ddisable_002dstatic-110"></a>Build only the shared library.   Implies &lsquo;<samp><span class="samp">--enable-shared</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">--enable-maintainer-mode</span></samp>&rsquo;<dd><a name="index-g_t_002d_002denable_002dmaintainer_002dmode-111"></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">
<a name="configure-environment"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#configure-scenarios">configure scenarios</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#configure-options">configure options</a>,
Up:&nbsp;<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>&lsquo;<samp><span class="samp">CC</span></samp>&rsquo;<a name="index-CC-112"></a><dd><a name="index-gcc_0040r_007b_002c-compiling-with_007d-113"></a><a name="index-cc_0040r_007b_002c-compiling-with_007d-114"></a>The compiler to use: default is <code>gcc</code> if it's installed, otherwise
<code>cc</code>.

     <br><dt>&lsquo;<samp><span class="samp">CFLAGS</span></samp>&rsquo;<a name="index-CFLAGS-115"></a><dd><a name="index-compiler-options_002c-specifying-116"></a>Options to give the compiler: default is &lsquo;<samp><span class="samp">-g -O2</span></samp>&rsquo; for <code>gcc</code>,
&lsquo;<samp><span class="samp">-g</span></samp>&rsquo; 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>&lsquo;<samp><span class="samp">CPPFLAGS</span></samp>&rsquo;<a name="index-CPPFLAGS-117"></a><dd><a name="index-configuration-compiler-options-118"></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
&lsquo;<samp><span class="samp">-I/usr/local/include/wwwhatever</span></samp>&rsquo; if you have the libwww library
installed for hyper-xdvik (see <samp><span class="file">xdvik/INSTALL</span></samp>).

     <br><dt>&lsquo;<samp><span class="samp">DEFS</span></samp>&rsquo;<a name="index-DEFS-119"></a><dd><a name="index-preprocessor-options-120"></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>&lsquo;<samp><span class="samp">LDFLAGS</span></samp>&rsquo;<a name="index-LDFLAGS-121"></a><dd><a name="index-loader-options-122"></a>Additional options to give to the loader.  <code>LDFLAGS</code> comes before
any other linker options.

     <br><dt>&lsquo;<samp><span class="samp">LIBS</span></samp>&rsquo;<a name="index-LIBS-123"></a><dd><a name="index-libraries_002c-specifying-additional-124"></a>Additional libraries to link with. 
</dl>

<div class="node">
<a name="configure-scenarios"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Shared-library">Shared library</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#configure-environment">configure environment</a>,
Up:&nbsp;<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-125"></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-126"></a><a name="index-architectures_002c-compiling-multiple-127"></a><a name="index-symbolic-link-trees_002c-for-multiple-architectures-128"></a><a name="index-g_t_002d_002dsrcdir_0040r_007b_002c-for-building-multiple-architectures_007d-129"></a><a name="index-lndir-_0040r_007bfor-building-symlink-trees_007d-130"></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 &lsquo;<samp><span class="samp">--srcdir</span></samp>&rsquo; option:
     <pre class="example">          configure --srcdir=<var>srcdir</var>
</pre>
     <li><a name="index-multiple-architectures_002c-directories-for-131"></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-132"></a><a name="index-automounter_002c-and-configuration-133"></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-134"></a><a name="index-g_t_002dg_0040r_007b_002c-compiling-without_007d-135"></a><a name="index-optimization_002c-enabling-136"></a><a name="index-debugging-with-_0040samp_007b_002dg_007d_002c-disabling-137"></a>To compile with optimization (to compile without debugging, remove the
&lsquo;<samp><span class="samp">-g</span></samp>&rsquo;):
     <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">
<a name="Shared-library"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#configure-scenarios">configure scenarios</a>,
Up:&nbsp;<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-138"></a>
<a name="index-g_t_002d_002denable_002dshared-139"></a>You can compile Kpathsea as a shared library on a few systems, by
specifying the option &lsquo;<samp><span class="samp">--enable-shared</span></samp>&rsquo; when you run
&lsquo;<samp><span class="samp">configure</span></samp>&rsquo;.

   <p><a name="index-code-sharing-140"></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
&lsquo;<samp><span class="samp">-R${prefix}/lib</span></samp>&rsquo;, on IRIX or Linux, use
&lsquo;<samp><span class="samp">-rpath${prefix}/lib</span></samp>&rsquo;.  (Unfortunately, making this happen by
default is very difficult, because of interactions with an existing
installed shared library.)

<div class="node">
<a name="Running-make"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Installing-files">Installing files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Running-configure">Running configure</a>,
Up:&nbsp;<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-141"></a>
<a name="index-texmf_002ecnf_0040r_007b_002c-creating_007d-142"></a><a name="index-paths_002eh_0040r_007b_002c-creating_007d-143"></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 &lsquo;<samp><span class="samp">plain</span></samp>&rsquo; and &lsquo;<samp><span class="samp">latex</span></samp>&rsquo; TeX formats.

   <p><a name="index-fallback-resolutions_002c-overriding-144"></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, &lsquo;<samp><span class="samp">make default_texsizes=600</span></samp>&rsquo; 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>&lsquo;<samp><span class="samp">XCPPFLAGS</span></samp>&rsquo;<a name="index-XCPPFLAGS-145"></a><dt>&lsquo;<samp><span class="samp">XDEFS</span></samp>&rsquo;<a name="index-XDEFS-146"></a><dd><a name="index-preprocessor-options_002c-additional-147"></a>Preprocessor options.

     <br><dt>&lsquo;<samp><span class="samp">XCFLAGS</span></samp>&rsquo;<a name="index-XCFLAGS-148"></a><dd><a name="index-compiler-options_002c-additional-149"></a>Compiler options.

     <br><dt>&lsquo;<samp><span class="samp">XLDFLAGS</span></samp>&rsquo;<a name="index-XLDFLAGS-150"></a><dd><a name="index-loader-options_002c-initial-151"></a>Loader options (included at beginning of link commands).

     <br><dt>&lsquo;<samp><span class="samp">XLOADLIBES</span></samp>&rsquo;<a name="index-XLOADLIBES-152"></a><dd><a name="index-loader-options_002c-final-153"></a>More loader options (included at end of link commands).

     <br><dt>&lsquo;<samp><span class="samp">XMAKEARGS</span></samp>&rsquo;<a name="index-XMAKEARGS-154"></a><dd><a name="index-Make-arguments_002c-additional-155"></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: &lsquo;<samp><span class="samp">make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"</span></samp>&rsquo;. 
</dl>

   <p><a name="index-compiler_002c-changing-156"></a><a name="index-libraries_002c-changing-157"></a>It's generally a bad idea to use a different compiler (&lsquo;<samp><span class="samp">CC</span></samp>&rsquo;) 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-158"></a><a name="index-BSD-universe-159"></a><a name="index-system-V-universe-160"></a><a name="index-Solaris-BSD-compatibility_002c-not-161"></a><a name="index-libucb_0040r_007b_002c-avoiding_007d-162"></a><a name="index-ucbinclude_0040r_007b_002c-avoiding_007d-163"></a>Adding compiler options to change the &ldquo;universe&rdquo; 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-164"></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">
<a name="Installing-files"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Cleaning-up">Cleaning up</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Running-make">Running make</a>,
Up:&nbsp;<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-165"></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
&lsquo;<samp><span class="samp">$(infodir)</span></samp>&rsquo; 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-166"></a><a name="index-architecture_002d_0028in_0029dependent-files_002c-installing-only-167"></a><a name="index-installation_002c-architecture_002d_0028in_0029dependent-files-only-168"></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-169"></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
&ldquo;executables&rdquo;.

     <li><a name="index-install_002ddata-_0040r_007bMake-target_007d-170"></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-171"></a><a name="index-Andrew-File-System_002c-installing-with-172"></a><a name="index-g_t_002fafs_002f_0040dots_007b_007d-_0040r_007b_002c-installing-into_007d-173"></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 &lsquo;<samp><span class="samp">prefix</span></samp>&rsquo; 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-174"></a><a name="index-relative-filenames-in-_0040file_007bls_002dR_007d-175"></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">
<a name="Cleaning-up"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Filename-database-generation">Filename database generation</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installing-files">Installing files</a>,
Up:&nbsp;<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-176"></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-177"></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-178"></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-179"></a><code>make maintainer-clean</code> to remove everything that the Makefiles can
rebuild.  This is more than &lsquo;<samp><span class="samp">distclean</span></samp>&rsquo; 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-180"></a><code>make extraclean</code> to remove other junk, e.g., core files, log
files, patch rejects.  This is independent of the other &lsquo;<samp><span class="samp">clean</span></samp>&rsquo;
targets. 
</ul>

<div class="node">
<a name="Filename-database-generation"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#mktex-scripts">mktex scripts</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Cleaning-up">Cleaning up</a>,
Up:&nbsp;<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-181"></a><a name="index-generation-of-filename-database-182"></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> &amp;&amp; <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">
<a name="mktex-scripts"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Installation-testing">Installation testing</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Filename-database-generation">Filename database generation</a>,
Up:&nbsp;<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-183"></a><a name="index-scripts-for-file-creation-184"></a>
<a name="index-font-set_002c-infinite-185"></a><a name="index-dynamic-creation-of-files-186"></a><a name="index-Sauter-fonts_002c-and-dynamic-source-creation-187"></a><a name="index-EC-fonts_002c-and-dynamic-source-creation-188"></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>).  These are collectively
known as <code>mktex</code><dfn> scripts</dfn>, since most of them are named
<code>mktex...</code>.

   <p>For example, this is 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. 
Building all fonts in advance is therefore impractical, if not
impossible.

   <p>It is also useful for the TeX &lsquo;<samp><span class="samp">.fmt</span></samp>&rsquo; (and Metafont
&lsquo;<samp><span class="samp">.base</span></samp>&rsquo; and Metapost &lsquo;<samp><span class="samp">.mem</span></samp>&rsquo; files, see <a href="Web2c.html#Memory-dumps">Memory dumps</a>), where pre-generating every format consumes a
lot of both time and space.

   <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">config</a>
<li><a accesskey="2" href="#mktex-script-names">names</a>
<li><a accesskey="3" href="#mktex-script-arguments">args</a>
</ul>

<div class="node">
<a name="mktex-configuration"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#mktex-script-names">mktex script names</a>,
Up:&nbsp;<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-189"></a><a name="index-configuration-of-_0040file_007bmktex_007d-scripts-190"></a><a name="index-enabling-_0040file_007bmktex_007d-scripts-191"></a><a name="index-disabling-_0040file_007bmktex_007d-scripts-192"></a>
The list of file types and program names that can run an external
program to create missing files is listed in the next section.  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-193"></a><a name="index-g_t_002d_002dwithout_002dmktexfmt_002ddefault-194"></a><a name="index-g_t_002d_002dwithout_002dmktexmf_002ddefault-195"></a><a name="index-g_t_002d_002dwithout_002dmktexocp_002ddefault-196"></a><a name="index-g_t_002d_002dwithout_002dmktexofm_002ddefault-197"></a><a name="index-g_t_002d_002dwithout_002dmktexpk_002ddefault-198"></a><a name="index-g_t_002d_002dwithout_002dmktextfm_002ddefault-199"></a><a name="index-g_t_002d_002dwith_002dmktextex_002ddefault-200"></a>
<pre class="example">     --without-mktexfmt-default
     --without-mktexmf-default
     --without-mktexocp-default
     --without-mktexofm-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-fmtutils_002ecnf-201"></a><code>mktexfmt</code> reads a file <samp><span class="file">fmtutil.cnf</span></samp>, typically located in
<samp><span class="file">texmf/web2c/</span></samp> to glean its configuration information.  The rest
of the files and features in this section are primarily intended for
the font generation scripts.

   <p><a name="index-mktex_002ecnf-202"></a><a name="index-mktex_002eopt-203"></a><a name="index-site-overrides-for-_0040code_007bmktex_0040dots_007b_007d_007d-204"></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-205"></a><a name="index-MT_005fFEATURES-206"></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 &lsquo;<samp><span class="samp">make
install</span></samp>&rsquo; (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 &lsquo;<samp><span class="samp">fonts</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">appendonlydir</span></samp>&rsquo; option is enabled by default.

     <dl>
<dt>&lsquo;<samp><span class="samp">appendonlydir</span></samp>&rsquo;<a name="index-appendonlydir-207"></a><dd><a name="index-directories_002c-making-append_002donly-208"></a><a name="index-mktexdir-209"></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>&lsquo;<samp><span class="samp">dosnames</span></samp>&rsquo;<a name="index-dosnames-210"></a><dd><a name="index-g_t8_002e3-filenames_002c-using-211"></a><a name="index-DOS-compatible-names-212"></a><a name="index-dpi_0040var_007bnnn_007d-directories-213"></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 &lsquo;<samp><span class="samp">dosnames</span></samp>&rsquo; 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
&lsquo;<samp><span class="samp">dosnames</span></samp>&rsquo; 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
&lsquo;<samp><span class="samp">dosnames</span></samp>&rsquo;.  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>&lsquo;<samp><span class="samp">fontmaps</span></samp>&rsquo;<a name="index-fontmaps-214"></a><dd><a name="index-fontmaps-215"></a><a name="index-fontname-216"></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>&lsquo;<samp><span class="samp">nomfdrivers</span></samp>&rsquo;<a name="index-nomfdrivers-217"></a><dd><a name="index-metafont-driver-files-218"></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>&lsquo;<samp><span class="samp">nomode</span></samp>&rsquo;<a name="index-nomode-219"></a><dd><a name="index-mode-directory_002c-omitting-220"></a>Omit the directory level for the mode name; this is fine as long as
you generate fonts for only one mode.

     <br><dt>&lsquo;<samp><span class="samp">stripsupplier</span></samp>&rsquo;<a name="index-stripsupplier-221"></a><dd><a name="index-supplier-directory_002c-omitting-222"></a>Omit the font supplier name directory level.

     <br><dt>&lsquo;<samp><span class="samp">striptypeface</span></samp>&rsquo;<a name="index-striptypeface-223"></a><dd><a name="index-typeface-directory_002c-omitting-224"></a>Omit the font typeface name directory level.

     <br><dt>&lsquo;<samp><span class="samp">strip</span></samp>&rsquo;<a name="index-strip-225"></a><dd><a name="index-supplier-directory_002c-omitting-226"></a><a name="index-typeface-directory_002c-omitting-227"></a>Omit the font supplier and typeface name directory levels.  This feature
is deprecated in favour of &lsquo;<samp><span class="samp">stripsupplier</span></samp>&rsquo; and &lsquo;<samp><span class="samp">striptypeface</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">varfonts</span></samp>&rsquo;<a name="index-varfonts-228"></a><dd><a name="index-g_t_002fvar_002ftmp_002ftexfonts-229"></a><a name="index-VARTEXFONTS-230"></a><a name="index-Linux-File-System-Standard-231"></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-232"></a>The &lsquo;<samp><span class="samp">varfonts</span></samp>&rsquo; setting in <code>MT_FEATURES</code> is overridden by the
<code>USE_VARTEXFONTS</code> environment variable: if set to &lsquo;<samp><span class="samp">1</span></samp>&rsquo;, the
feature is enabled, and if set to &lsquo;<samp><span class="samp">0</span></samp>&rsquo;, the feature is disabled.

     <br><dt>&lsquo;<samp><span class="samp">texmfvar</span></samp>&rsquo;<a name="index-texmfvar-233"></a><dd><a name="index-TEXMFVAR-234"></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 &lsquo;<samp><span class="samp">varfonts</span></samp>&rsquo; feature takes
precedence if also set.

     <p><a name="index-USE_005fTEXMFVAR-235"></a>The &lsquo;<samp><span class="samp">texmfvar</span></samp>&rsquo; setting in <code>MT_FEATURES</code> is overridden by the
<code>USE_TEXMFVAR</code> environment variable: if set to &lsquo;<samp><span class="samp">1</span></samp>&rsquo;, the
feature is enabled, and if set to &lsquo;<samp><span class="samp">0</span></samp>&rsquo;, the feature is disabled. 
</dl>

<div class="node">
<a name="mktex-script-names"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#mktex-script-arguments">mktex script arguments</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#mktex-configuration">mktex configuration</a>,
Up:&nbsp;<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-236"></a><a name="index-names-for-_0040file_007bmktex_007d-scripts-237"></a>
The following table shows the default name of the script for each
of the file types which support runtime generation.

     <dl>
<dt><samp><span class="file">mktexfmt</span></samp><dd><a name="index-mktexfmt-238"></a><a name="index-fmtutil-239"></a>(&lsquo;<samp><span class="samp">.fmt</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.base</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.mem</span></samp>&rsquo;) TeX/Metafont/MetaPost
formats.  This script is also named <samp><span class="command">fmtutil</span></samp>, and reads
<samp><span class="file">fmtutil.cnf</span></samp> for configuration information.

     <br><dt><samp><span class="file">mktexmf</span></samp><dd><a name="index-mktexmf-240"></a>(&lsquo;<samp><span class="samp">.mf</span></samp>&rsquo;) Metafont input files.

     <br><dt><samp><span class="file">mkocp</span></samp><dd><a name="index-mkocp-241"></a>(&lsquo;<samp><span class="samp">.ocp</span></samp>&rsquo;) Omega compiled process files.

     <br><dt><samp><span class="file">mkofm</span></samp><dd><a name="index-mkofm-242"></a>(&lsquo;<samp><span class="samp">.ofm</span></samp>&rsquo;) Omega font metric files.

     <br><dt><samp><span class="file">mktexpk</span></samp><dd><a name="index-mktexpk-243"></a>(&lsquo;<samp><span class="samp">pk</span></samp>&rsquo;) Glyph fonts.

     <br><dt><samp><span class="file">mktextex</span></samp><dd><a name="index-mktextex-244"></a>(&lsquo;<samp><span class="samp">.tex</span></samp>&rsquo;) TeX input files (disabled by default).

     <br><dt><samp><span class="file">mktextfm</span></samp><dd><a name="index-mktextfm-245"></a>(&lsquo;<samp><span class="samp">.tfm</span></samp>&rsquo;) TFM files. 
</dl>

   <p><a name="index-DVIPSMAKEPK-246"></a><a name="index-XDVIMAKEPK-247"></a><a name="index-DVILJMAKEPK-248"></a>These names can be overridden by an environment variable specific
to the program&mdash;for example, <code>DVIPSMAKEPK</code> for Dvipsk.

<!-- next two paragraphs are repeated in dvips.texi -->
   <p><a name="index-missfont_002elog-249"></a><a name="index-failed-_0040code_007bmktex_0040dots_007b_007d_007d-script-invocation-250"></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-251"></a><a name="index-MISSFONT_005fLOG-252"></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 &lsquo;<samp><span class="samp">missfont.log</span></samp>&rsquo; is
overridden by the <code>MISSFONT_LOG</code> environment variable or
configuration file value.

<div class="node">
<a name="mktex-script-arguments"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#mktex-script-names">mktex script names</a>,
Up:&nbsp;<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-253"></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>&lsquo;<samp><span class="samp">--dpi </span><var>num</var></samp>&rsquo;<dd>Sets the resolution of the generated font to <var>num</var>. 
<br><dt>&lsquo;<samp><span class="samp">--mfmode </span><var>name</var></samp>&rsquo;<dd>Sets the Metafont mode to <var>name</var>. 
<br><dt>&lsquo;<samp><span class="samp">--bdpi </span><var>num</var></samp>&rsquo;<dd>Sets the the &ldquo;base dpi&rdquo; for the font.  This must match the mode being
used. 
<br><dt>&lsquo;<samp><span class="samp">--mag </span><var>string</var></samp>&rsquo;<dd>A &ldquo;magstep&rdquo; 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>&lsquo;<samp><span class="samp">--destdir </span><var>string</var></samp>&rsquo;<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>

<div class="node">
<a name="Installation-testing"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#mktex-scripts">mktex scripts</a>,
Up:&nbsp;<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-254"></a><a name="index-installation-testing-255"></a>
Besides the tests listed in <a href="#Simple-installation">Simple installation</a>, you can try
running &lsquo;<samp><span class="samp">make check</span></samp>&rsquo;.  This includes the torture tests (trip, trap,
and mptrap) that come with Web2c (see <a href="web2c.html#Triptrap">Triptrap</a>).

<div class="node">
<a name="Security"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#TeX-directory-structure">TeX directory structure</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Custom-installation">Custom installation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a>

</div>

<h3 class="section">2.3 Security</h3>

<p><a name="index-security-considerations-256"></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-257"></a><a name="index-g_t_002erhosts_0040r_007b_002c-writable-by-_0040TeX_007b_007d_007d-258"></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 &lsquo;<samp><span class="samp">-R</span></samp>&rsquo; 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-259"></a><a name="index-cache-of-fonts_002c-local-260"></a>Another security issue arises because it's very useful&mdash;almost
necessary&mdash;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-261"></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-262"></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-263"></a><a name="index-setgid-scripts-264"></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-265"></a><a name="index-permissions_002c-file-266"></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-267"></a><a name="index-permissions_002c-directory-268"></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">
<a name="TeX-directory-structure"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#unixtex_002eftp">unixtex.ftp</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Security">Security</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a>

</div>

<h3 class="section">2.4 TeX directory structure</h3>

<p><a name="index-TEXMF-269"></a><a name="index-g_t_0040TeX_007b_007d-directory-structure-270"></a><a name="index-directory-structure_002c-for-_0040TeX_007b_007d-files-271"></a><a name="index-skeleton-_0040TeX_007b_007d-directory-272"></a><a name="index-TDS-273"></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>&mdash;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 (</span><samp><span class="file">/usr/local</span></samp><span class="roman"> 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 (</span><samp><span class="file">libkpathsea.*</span></samp><span class="roman">)</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., &lsquo;</span><samp><span class="samp">xampl.bib</span></samp><span class="roman">&rsquo;)</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., &lsquo;</span><samp><span class="samp">plain.bst</span></samp><span class="roman">&rsquo;, &lsquo;</span><samp><span class="samp">acm.bst</span></samp><span class="roman">&rsquo;)</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">&lsquo;</span><samp><span class="samp">.pro</span></samp><span class="roman">&rsquo;, &lsquo;</span><samp><span class="samp">.ps</span></samp><span class="roman">&rsquo;, &lsquo;</span><samp><span class="samp">psfonts.map</span></samp><span class="roman">&rsquo;</span>
        fonts/       <span class="roman">font-related files</span>
         <var>type</var>/         <span class="roman">file type (e.g., &lsquo;</span><samp><span class="samp">tfm</span></samp><span class="roman">&rsquo;, &lsquo;</span><samp><span class="samp">pk</span></samp><span class="roman">&rsquo;)</span>
          <var>mode</var>/          <span class="roman">type of output device (types &lsquo;</span><samp><span class="samp">pk</span></samp><span class="roman">&rsquo; and &lsquo;</span><samp><span class="samp">gf</span></samp><span class="roman">&rsquo; only)</span>
           <var>supplier</var>/       <span class="roman">name of a font supplier (e.g., &lsquo;</span><samp><span class="samp">public</span></samp><span class="roman">&rsquo;)</span>
            <var>typeface</var>/        <span class="roman">name of a typeface (e.g., &lsquo;</span><samp><span class="samp">cm</span></samp><span class="roman">&rsquo;)</span>
             dpi<var>nnn</var>/           <span class="roman">font resolution (types &lsquo;</span><samp><span class="samp">pk</span></samp><span class="roman">&rsquo; and &lsquo;</span><samp><span class="samp">gf</span></samp><span class="roman">&rsquo; only)</span>
        metafont/    <span class="roman">Metafont (non-font) input files</span>
         base/        <span class="roman">base distribution (e.g., &lsquo;</span><samp><span class="samp">plain.mf</span></samp><span class="roman">&rsquo;)</span>
         misc/        <span class="roman">single-file packages (e.g., &lsquo;</span><samp><span class="samp">modes.mf</span></samp><span class="roman">&rsquo;)</span>
         <var>pkg</var>/           <span class="roman">name of a package (e.g., &lsquo;</span><samp><span class="samp">mfpic</span></samp><span class="roman">&rsquo;)</span>
        metapost/    <span class="roman">MetaPost input files</span>
         base/        <span class="roman">base distribution (e.g., &lsquo;</span><samp><span class="samp">plain.mp</span></samp><span class="roman">&rsquo;)</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., &lsquo;</span><samp><span class="samp">trfonts.map</span></samp><span class="roman">&rsquo;)</span>
        mft/         <span class="roman">&lsquo;</span><samp><span class="samp">MFT</span></samp><span class="roman">&rsquo; inputs (e.g., &lsquo;</span><samp><span class="samp">plain.mft</span></samp><span class="roman">&rsquo;)</span>
        tex/         <span class="roman">TeX input files</span>
         <var>format</var>/         <span class="roman">name of a format (e.g., &lsquo;</span><samp><span class="samp">plain</span></samp><span class="roman">&rsquo;)</span>
          base/        <span class="roman">base distribution for </span><var>format</var><span class="roman"> (e.g., &lsquo;</span><samp><span class="samp">plain.tex</span></samp><span class="roman">&rsquo;)</span>
          misc/        <span class="roman">single-file packages (e.g., &lsquo;</span><samp><span class="samp">webmac.tex</span></samp><span class="roman">&rsquo;)</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., &lsquo;</span><samp><span class="samp">graphics</span></samp><span class="roman">&rsquo;, &lsquo;</span><samp><span class="samp">mfnfss</span></samp><span class="roman">&rsquo;)</span>
         generic/     <span class="roman">format-independent packages</span>
          hyphen/      <span class="roman">hyphenation patterns (e.g., &lsquo;</span><samp><span class="samp">hyphen.tex</span></samp><span class="roman">&rsquo;)</span>
          images/      <span class="roman">image input files (e.g., Encapsulated PostScript)</span>
          misc/        <span class="roman">single-file format-independent packages (e.g., &lsquo;</span><samp><span class="samp">null.tex</span></samp><span class="roman">&rsquo;).</span>
          <var>pkg</var>/           <span class="roman">name of a package (e.g., &lsquo;</span><samp><span class="samp">babel</span></samp><span class="roman">&rsquo;)</span>
        web2c/        <span class="roman">implementation-dependent files (</span><samp><span class="file">.pool</span></samp><span class="roman">, </span><samp><span class="file">.fmt</span></samp><span class="roman">, </span><samp><span class="file">texmf.cnf</span></samp><span class="roman">, 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">
<a name="unixtex.ftp"></a>
<a name="unixtex_002eftp"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Reporting-bugs">Reporting bugs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#TeX-directory-structure">TeX directory structure</a>,
Up:&nbsp;<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-274"></a><a name="index-retrieving-_0040TeX_007b_007d-275"></a>
<a name="index-unixtex_002eftp-276"></a><a name="index-tug_002eorg-277"></a><a name="index-www_002etug_002eorg-278"></a><a name="index-ftp_002etug_002eorg-279"></a>This
is <a href="ftp://ftp.tug.org/tex/unixtex.ftp">ftp://ftp.tug.org/tex/unixtex.ftp</a>, last updated 13 June
2010.  Also available as <a href="http://www.tug.org/unixtex.ftp">http://www.tug.org/unixtex.ftp</a>.  Email
<a href="mailto:tex-k@tug.org">tex-k@tug.org</a> with comments or questions.

   <p>The principal free TeX distribution for Unix-like systems is TeX
Live, on the web at <a href="http://tug.org/texlive">http://tug.org/texlive</a>.  The pages there
describe many ways to acquire TeX, over the Internet or on physical
media, both the sources and precompiled binaries for many systems,
either standalone or as part of various operating system
distributions.

   <p>Web2C, Kpathsea, Dvips, and Dviljk are no longer released as a
separate packages.  Their sources are now maintained as part of TeX
Live.

   <p><a name="index-ftp_002ecs_002estanford_002eedu-280"></a><a name="index-tex_002eweb-281"></a><a name="index-Knuth_002c-Donald-E_002e_002c-archive-of-programs-by-282"></a>The host <tt>ftp.cs.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 a larger package. In any case, that ftp site is
not the canonical source for anything except what was created as part
of Stanford TeX project, so do not rely on the other files available
there being up-to-date.

<div class="node">
<a name="Reporting-bugs"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#unixtex_002eftp">unixtex.ftp</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a>

</div>

<h3 class="section">2.6 Reporting bugs</h3>

<p><a name="index-reporting-bugs-283"></a><a name="index-bugs_002c-reporting-284"></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_0040tug_002eorg-_0040r_007b_0028bug-address_0029_007d-285"></a><a name="index-bug-address-286"></a>If you have problems or suggestions, please report them to
<a href="mailto:tex-k@tug.org">tex-k@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">
<a name="Bug-checklist"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Mailing-lists">Mailing lists</a>,
Up:&nbsp;<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-287"></a><a name="index-bug-checklist-288"></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@tug.org">tex-k@tug.org</a>.

   <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-289"></a>The version number(s) of the program(s) involved, and of Kpathsea
itself.  You can get the former by giving a sole option &lsquo;<samp><span class="samp">--version</span></samp>&rsquo;
to the program, and the latter by running &lsquo;<samp><span class="samp">kpsewhich --version</span></samp>&rsquo;. 
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-290"></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-291"></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-292"></a><a name="index-config_002estatus-293"></a>If you are reporting a bug in &lsquo;<samp><span class="samp">configure</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">configure</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">-1</span></samp>&rsquo; before running the program.  Please look at the log
yourself to make sure the behavior is really a bug before reporting it;
perhaps &ldquo;old&rdquo; 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)&mdash;TeX source files are
helpful, but the DVI file is necessary, because that's the actual
program input.

     <li><a name="index-context-diff-294"></a><a name="index-sending-patches-295"></a><a name="index-ChangeLog-_0040r_007bentry_007d-296"></a>If you are sending a patch (do so if you can!), please do so in the form
of a context diff (&lsquo;<samp><span class="samp">diff -c</span></samp>&rsquo;) 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-297"></a><a name="index-debugger-298"></a><a name="index-crashes_002c-reporting-299"></a><a name="index-core-dumps_002c-reporting-300"></a><a name="index-null-pointers_002c-dereferencing-301"></a><a name="index-gdb_0040r_007b_002c-recommended_007d-302"></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">
<a name="Mailing-lists"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Debugging">Debugging</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Bug-checklist">Bug checklist</a>,
Up:&nbsp;<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-303"></a><a name="index-bug-mailing-list-304"></a><a name="index-announcement-mailing-list-305"></a>
Web2c and Kpathsea in general are discussed on the mailing list
<a href="mailto:tex-k@tug.org">tex-k@tug.org</a>. 
<a name="index-tex_002dk_002drequest_0040_0040tug_002eorg-306"></a>To join, email <a href="mailto:tex-k-request@tug.org">tex-k-request@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 &lsquo;<samp><span class="samp">tex-k-request</span></samp>&rsquo;).  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-g_t_0040TeX_007b_007d-help-mailing-list-307"></a><a name="index-La_0040TeX_007b_007d-help-mailing-list-308"></a><a name="index-Usenet-_0040TeX_007b_007d-newsgroup-309"></a><a name="index-newsgroup-for-_0040TeX_007b_007d-310"></a><a name="index-help_002c-mailing-list-for-general-_0040TeX_007b_007d-311"></a><a name="index-info_002dtex_0040_0040shsu_002eedu-312"></a><a name="index-comp_002etext_002etex-313"></a>If you are looking for general TeX help, such as how to use
LaTeX, please use the mailing list <a href="mailto:texhax@tug.org">texhax@tug.org</a> mailing
list (<a href="http://lists.tug.org/texhax">http://lists.tug.org/texhax</a>) which is gatewayed to the
&lsquo;<samp><span class="samp">comp.text.tex</span></samp>&rsquo; Usenet newsgroup (or post to the newsgroup; the
gateway is bidirectional).

<div class="node">
<a name="Debugging"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Logging">Logging</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Mailing-lists">Mailing lists</a>,
Up:&nbsp;<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-314"></a><a name="index-runtime-debugging-315"></a><a name="index-options-for-debugging-316"></a>
<a name="index-kpse_002d_003edebug-317"></a><a name="index-debug_002eh-318"></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., &lsquo;<samp><span class="samp">-d</span></samp>&rsquo;) 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 &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; (or whatever) option
first, for maximal output.  Dvipsk and Xdvik have additional
program-specific debugging options as well.

   <p><a name="index-KPATHSEA_005fDEBUG-319"></a><a name="index-kpse_002d_003edebug-320"></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 instance variable <code>kpse-&gt;debug</code>, also use the numbers
below.

   <p><a name="index-g_t_002d1-_0040r_007bdebugging-value_007d-321"></a>In any case, by far the simplest value to use is &lsquo;<samp><span class="samp">-1</span></samp>&rsquo;, 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-322"></a><a name="index-standard-error-and-debugging-output-323"></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&gt;/tmp/debug
</pre>
   <p><a name="index-Kpsewhich_002c-and-debugging-324"></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-325"></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-326"></a><dd>Report &lsquo;<samp><span class="samp">stat</span></samp>&rsquo;(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-327"></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-328"></a><dd><a name="index-fopen_0040r_007b_002c-redefined_007d-329"></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 &lsquo;<samp><span class="samp">fopen</span></samp>&rsquo; (&lsquo;<samp><span class="samp">fclose</span></samp>&rsquo;) to be &lsquo;<samp><span class="samp">kpse_fopen_trace</span></samp>&rsquo;
(&lsquo;<samp><span class="samp">kpse_fclose_trace</span></samp>&rsquo;).

     <br><dt><code>KPSE_DEBUG_PATHS </code><span class="roman">(8)</span><a name="index-KPSE_005fDEBUG_005fPATHS-_0040r_007b_00288_0029_007d-330"></a><dd><a name="index-kpse_005fformat_005finfo_005ftype-331"></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&mdash;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-332"></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-333"></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-334"></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-335"></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-336"></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-337"></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-338"></a><a name="index-hash_005fsummary_005fonly-_0040r_007bvariable-for-debugging_007d-339"></a><a name="index-hash-table-buckets_002c-printing-340"></a>Debugging output from Kpathsea is always written to standard error, and
begins with the string &lsquo;<samp><span class="samp">kdebug:</span></samp>&rsquo;. (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">
<a name="Logging"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Common-problems">Common problems</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Debugging">Debugging</a>,
Up:&nbsp;<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-341"></a>
<a name="index-logging-successful-searches-342"></a><a name="index-recording-successful-searches-343"></a><a name="index-usage-patterns_002c-finding-344"></a><a name="index-disk-usage_002c-reducing-345"></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-346"></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-347"></a><a name="index-time-_0040r_007bsystem-call_007d-348"></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 &ldquo;the epoch&rdquo;, 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-349"></a>Only filenames that are absolute are recorded, to preserve
some semblance of privacy.

   <p>In addition to this Kpathsea-specific logging, <samp><span class="command">pdftex</span></samp>
provides an option <samp><span class="option">-recorder</span></samp> to write the names of all files
accessed during a run to the file <samp><var>basefile</var><span class="file">.fls</span></samp>.

   <p>Finally, most systems provide a general tool to output each system
call, thus including opening and closing files.  It might be named
<samp><span class="command">strace</span></samp>, <samp><span class="command">truss</span></samp>, <samp><span class="command">struss</span></samp>, or something
else.

<div class="node">
<a name="Common-problems"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Logging">Logging</a>,
Up:&nbsp;<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-350"></a><a name="index-problems_002c-common-351"></a><a name="index-FAQ_002c-Kpathsea-352"></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">
<a name="Unable-to-find-files"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Slow-path-searching">Slow path searching</a>,
Up:&nbsp;<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-353"></a><a name="index-files_002c-unable-to-find-354"></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-355"></a><a name="index-environment-variables_002c-old-356"></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-357"></a><a name="index-leaf-directories-wrongly-guessed-358"></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 &lsquo;<samp><span class="samp">//</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">Can't find font
</span><var>fontname</var></samp>&rsquo;. 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">
<a name="Slow-path-searching"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Unable-to-generate-fonts">Unable to generate fonts</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Unable-to-find-files">Unable to find files</a>,
Up:&nbsp;<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-359"></a><a name="index-slow-startup-time-360"></a><a name="index-startup-time_002c-excessive-361"></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">
<a name="Unable-to-generate-fonts"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Slow-path-searching">Slow path searching</a>,
Up:&nbsp;<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-362"></a><a name="index-font-generation-failures-363"></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-364"></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-365"></a><a name="index-device_002c-wrong-366"></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-367"></a><a name="index-g_t2602gf-368"></a><a name="index-Metafont-making-too_002dlarge-fonts-369"></a><a name="index-proof-mode-370"></a><a name="index-online-Metafont-display_002c-spurious-371"></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-372"></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-373"></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">
<a name="TeX-or-Metafont-failing"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Empty-Makefiles">Empty Makefiles</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Unable-to-generate-fonts">Unable to generate fonts</a>,
Up:&nbsp;<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-374"></a><a name="index-Metafont-failures-375"></a><a name="index-compiler-bugs-376"></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-377"></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-378"></a><a name="index-system-C-compiler-bugs-379"></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-380"></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-381"></a><a name="index-HP_002dUX_002c-compiling-on-382"></a><a name="index-compiling-on-HP_002dUX-383"></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
machines when the native compiler is used, unless the &lsquo;<samp><span class="samp">+u</span></samp>&rsquo; compiler
switch was specified.  Using GCC will work on this platform as well.

<div class="node">
<a name="Empty-Makefiles"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#XtStrings">XtStrings</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#TeX-or-Metafont-failing">TeX or Metafont failing</a>,
Up:&nbsp;<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-384"></a><a name="index-sed-_0040r_007berror-from-_0040code_007bconfigure_007d_007d-385"></a><a name="index-configure-_0040r_007berror-from-_0040code_007bsed_007d_007d-386"></a><a name="index-NetBSD-_0040code_007bconfigure_007d-error-387"></a><a name="index-FreeBSD-_0040code_007bconfigure_007d-error-388"></a><a name="index-Mach10-_0040code_007bconfigure_007d-error-389"></a><a name="index-AIX-4_002e1-_0040code_007bconfigure_007d-error-390"></a><a name="index-NeXT-_0040code_007bsed_007d-error-391"></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">
<a name="XtStrings"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#dlopen">dlopen</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Empty-Makefiles">Empty Makefiles</a>,
Up:&nbsp;<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-392"></a>You may find that linking X programs results in an error from the linker
that &lsquo;<samp><span class="samp">XtStrings</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">configure</span></samp>&rsquo; was unable to guess the proper
directories from your installation.  You can use the <code>configure</code>
options &lsquo;<samp><span class="samp">--x-includes=</span><var>path</var></samp>&rsquo; and
&lsquo;<samp><span class="samp">--x-libraries=</span><var>path</var></samp>&rsquo; to explicitly specify them.

<div class="node">
<a name="dlopen"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#ShellWidgetClass">ShellWidgetClass</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#XtStrings">XtStrings</a>,
Up:&nbsp;<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-393"></a><a name="index-dlopen-394"></a><a name="index-dlsym-395"></a><a name="index-dlclose-396"></a><a name="index-wcstombs-397"></a><a name="index-libdl_002ea-398"></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 &lsquo;<samp><span class="samp">dlsym</span></samp>&rsquo; interface defined
in <samp><span class="file">libdl.so</span></samp>.  Unfortunately, the SunOS 4.1 distribution does not
include a static &lsquo;<samp><span class="samp">libdl.a</span></samp>&rsquo; 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-399"></a>These are contained in the <samp><span class="file">dlsym.c</span></samp> file in the MIT X
distribution.

<div class="node">
<a name="ShellWidgetClass"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Pointer-combination-warnings">Pointer combination warnings</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#dlopen">dlopen</a>,
Up:&nbsp;<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-400"></a><a name="index-OpenWin-libraries_002c-dynamic-linking-problems-401"></a><a name="index-get_005fwmShellWidgetClass-402"></a><a name="index-get_005fapplicationShellWidgetClass-403"></a>
<a name="index-comp_002esys_002esun_002eadmin-_0040r_007bFAQ_007d-404"></a><a name="index-FAQ_002c-_0040t_007bcomp_002esys_002esun_002eadmin_007d-405"></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-406"></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 &lsquo;<samp><span class="samp">ftp.x.org</span></samp>&rsquo; 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-407"></a><a name="index-patches_002c-Sun-OpenWin-408"></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-409"></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-410"></a><a name="index-g_t_002ddynamic-411"></a>
<pre class="example">     -static -lXmu -dynamic
</pre>
   <p><a name="index-g_t_002dBstatic-412"></a><a name="index-g_t_002dBdynamic-413"></a>If you are using the Sun compiler, use &lsquo;<samp><span class="samp">-Bstatic</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-Bdynamic</span></samp>&rsquo;.

<div class="node">
<a name="Pointer-combination-warnings"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ShellWidgetClass">ShellWidgetClass</a>,
Up:&nbsp;<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-414"></a><a name="index-pointer-combination-warnings-415"></a><a name="index-illegal-pointer-combination-warnings-416"></a><a name="index-cc-_0040r_007bwarnings_007d-417"></a>When compiling with old C compilers, you may get some warnings about
&ldquo;illegal pointer combinations&rdquo;.  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">
<a name="Path-searching"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#TeX-support">TeX support</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installation">Installation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>

</div>

<h2 class="chapter">3 Path searching</h2>

<p><a name="index-path-searching-418"></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">
<a name="Searching-overview"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Path-sources">Path sources</a>,
Up:&nbsp;<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-419"></a><a name="index-path-searching_002c-overview-420"></a><a name="index-overview-of-path-searching-421"></a>
<a name="index-search-path_002c-defined-422"></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
&lsquo;<samp><span class="samp">foo</span></samp>&rsquo; along a path &lsquo;<samp><span class="samp">.:/dir</span></samp>&rsquo;, 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-423"></a><a name="index-g_t_003a-_0040r_007bmay-not-be-_003a_007d-424"></a><a name="index-g_t_002f-_0040r_007bmay-not-be-_002f_007d-425"></a>The &ldquo;colon&rdquo; and &ldquo;slash&rdquo; mentioned here aren't necessarily &lsquo;<samp><span class="samp">:</span></samp>&rsquo;
and &lsquo;<samp><span class="samp">/</span></samp>&rsquo; on non-Unix systems.  Kpathsea tries to adapt to other
operating systems' conventions.

   <p><a name="index-database-search-426"></a><a name="index-searching-the-database-427"></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-428"></a><a name="index-filesystem-search-429"></a><a name="index-disk-search-430"></a><a name="index-searching-the-disk-431"></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 &lsquo;<samp><span class="samp">!!</span></samp>&rsquo; 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-432"></a><a name="index-VF-files_002c-not-found-433"></a><a name="index-cmr10_002evf-434"></a><a name="index-g_t_005copenin-435"></a>The &ldquo;file must exist&rdquo; condition comes into play with VF files and
input files read by the TeX &lsquo;<samp><span class="samp">\openin</span></samp>&rsquo; command.  These files
might very well 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 not 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-436"></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-437"></a><a name="index-relative-filenames-438"></a><a name="index-explicitly-relative-filenames-439"></a><a name="index-filenames_002c-absolute-or-explicitly-relative-440"></a>Exception to all of the above: If the filename being searched for is
absolute or explicitly relative, i.e., starts with &lsquo;<samp><span class="samp">/</span></samp>&rsquo; or &lsquo;<samp><span class="samp">./</span></samp>&rsquo;
or &lsquo;<samp><span class="samp">../</span></samp>&rsquo;, Kpathsea simply checks if that file exists.

   <p><a name="index-permission-denied-441"></a><a name="index-unreadable-files-442"></a><a name="index-access-warnings-443"></a><a name="index-warnings_002c-file-access-444"></a><a name="index-lost_002bfound-_0040r_007bdirectory_007d-445"></a><a name="index-TEX_005fHUSH-446"></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 any read permission (for
example, a <samp><span class="file">lost+found</span></samp> directory).  If you prefer not to see
these warnings, include the value &lsquo;<samp><span class="samp">readable</span></samp>&rsquo; 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">
<a name="Path-sources"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Path-expansion">Path expansion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Searching-overview">Searching overview</a>,
Up:&nbsp;<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-447"></a><a name="index-sources-for-search-paths-448"></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-449"></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 &lsquo;<samp><span class="samp">latex</span></samp>&rsquo;.

     <li>A program-specific configuration file, e.g., an &lsquo;<samp><span class="samp">S /a:/b</span></samp>&rsquo; 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-450"></a><a name="index-Kpathsea-config-file_002c-source-for-path-451"></a><a name="index-texmf_002ecnf_0040r_007b_002c-source-for-path_007d-452"></a>A line in a Kpathsea configuration file <samp><span class="file">texmf.cnf</span></samp>, e.g.,
&lsquo;<samp><span class="samp">TEXINPUTS=/c:/d</span></samp>&rsquo; (see below).

     <li><a name="index-compilation-value_002c-source-for-path-453"></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">
<a name="Config-files"></a>
<p><hr>
Up:&nbsp;<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-454"></a><a name="index-texmf_002ecnf_0040r_007b_002c-definition-for_007d-455"></a>
<a name="index-runtime-configuration-files-456"></a><a name="index-TEXMFCNF-457"></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 &lsquo;<samp><span class="samp">.:$TEXMF</span></samp>&rsquo;, values from
<samp><span class="file">./texmf.cnf</span></samp> override those from <samp><span class="file">$TEXMF/texmf.cnf</span></samp>.

   <p><a name="index-KPATHSEA_005fWARNING-458"></a><a name="index-warning_002c-about-missing-_0040file_007btexmf_002ecnf_007d-459"></a><a name="index-g_t_0040file_007btexmf_002ecnf_007d-missing_002c-warning-about-460"></a>If Kpathsea cannot find any <samp><span class="file">texmf.cnf</span></samp> file, it reports a
warning including all the directories it checked.  If you don't want
to see this warning, set the environment variable
<samp><span class="env">KPATHSEA_WARNING</span></samp> to the single character &lsquo;<samp><span class="samp">0</span></samp>&rsquo; (zero, not
oh).

   <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-461"></a>Comments start with &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and continue to the end of the line.

     <li><a name="index-blank-lines_002c-in-_0040file_007btexmf_002ecnf_007d-462"></a>Blank lines are ignored.

     <li><a name="index-backslash_002dnewline-463"></a><a name="index-continuation-character-464"></a><a name="index-whitespace_002c-not-ignored-on-continuation-lines-465"></a><a name="index-g_t_005c_0040r_007b_002c-line-continuation-in-_0040file_007btexmf_002ecnf_007d_007d-466"></a>A &lsquo;<samp><span class="samp">\</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">=</span></samp>&rsquo; and surrounding whitespace is optional.

     <li><a name="index-identifiers_002c-characters-valid-in-467"></a>The <var>variable</var> name may contain any character other than whitespace,
&lsquo;<samp><span class="samp">=</span></samp>&rsquo;, or &lsquo;<samp><span class="samp">.</span></samp>&rsquo;, but sticking to &lsquo;<samp><span class="samp">A-Za-z_</span></samp>&rsquo; is safest.

     <li>If &lsquo;<samp><span class="samp">.</span><var>progname</var></samp>&rsquo; 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-468"></a><var>value</var> may contain any characters except &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and &lsquo;<samp><span class="samp">@</span></samp>&rsquo;. 
(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 &lsquo;<samp><span class="samp">$</span><var>var</var><span class="samp">.</span><var>prog</var></samp>&rsquo;
feature is not available on the right-hand side; instead, you must use
an additional variable (see below for example).  A &lsquo;<samp><span class="samp">;</span></samp>&rsquo; in
<var>value</var> is translated to &lsquo;<samp><span class="samp">:</span></samp>&rsquo; 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-469"></a><a name="index-configuration-files-as-shell-scripts_002e-470"></a>Although this format has obvious similarities to Bourne shell
scripts&mdash;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-471"></a>The implementation of all this is in <samp><span class="file">kpathsea/cnf.c</span></samp>.

<div class="node">
<a name="Path-expansion"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Filename-database">Filename database</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Path-sources">Path sources</a>,
Up:&nbsp;<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-472"></a><a name="index-expansion_002c-search-path-473"></a>
Kpathsea recognizes certain special characters and constructions in
search paths, similar to that in shells.  As a general example:
&lsquo;<samp><span class="samp">~$USER/{foo,bar}//baz</span></samp>&rsquo; 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">
<a name="Default-expansion"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Variable-expansion">Variable expansion</a>,
Up:&nbsp;<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-474"></a><a name="index-doubled-colons-475"></a><a name="index-leading-colons-476"></a><a name="index-trailing-colons-477"></a><a name="index-extra-colons-478"></a><a name="index-default-expansion-479"></a><a name="index-expansion_002c-default-480"></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 &ldquo;formats&rdquo; (search
paths), and not directly on environment variables.  Example, showing
the trailing &lsquo;<samp><span class="samp">:</span></samp>&rsquo; 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-481"></a>
Technicality: Since it would be useless to insert the default value in
more than one place, Kpathsea changes only one extra &lsquo;<samp><span class="samp">:</span></samp>&rsquo; and leaves
any others in place (they will eventually be ignored).  Kpathsea checks
first for a leading &lsquo;<samp><span class="samp">:</span></samp>&rsquo;, then a trailing &lsquo;<samp><span class="samp">:</span></samp>&rsquo;, then a doubled
&lsquo;<samp><span class="samp">:</span></samp>&rsquo;.

   <p><a name="index-kdefault_002ec-482"></a>You can trace this by debugging &ldquo;paths&rdquo; (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">
<a name="Variable-expansion"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Tilde-expansion">Tilde expansion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Default-expansion">Default expansion</a>,
Up:&nbsp;<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-483"></a><a name="index-environment-variables-in-paths-484"></a><a name="index-variable-expansion-485"></a><a name="index-expansion_002c-variable-486"></a><a name="index-texmf_002ecnf_0040r_007b_002c-and-variable-expansion_007d-487"></a>
&lsquo;<samp><span class="samp">$foo</span></samp>&rsquo; or &lsquo;<samp><span class="samp">${foo}</span></samp>&rsquo; in a path element is replaced by (1) the
value of an environment variable &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; (if defined); (2) the value
of &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; from <samp><span class="file">texmf.cnf</span></samp> (if defined); (3) the empty string.

   <p>If the character after the &lsquo;<samp><span class="samp">$</span></samp>&rsquo; is alphanumeric or &lsquo;<samp><span class="samp">_</span></samp>&rsquo;, the
variable name consists of all consecutive such characters. If the
character after the &lsquo;<samp><span class="samp">$</span></samp>&rsquo; is a &lsquo;<samp><span class="samp">{</span></samp>&rsquo;, the variable name consists
of everything up to the next &lsquo;<samp><span class="samp">}</span></samp>&rsquo; (braces may not be nested around
variable names).  Otherwise, Kpathsea gives a warning and ignores the
&lsquo;<samp><span class="samp">$</span></samp>&rsquo; and its following character.

   <p><a name="index-quoting-variable-values-488"></a><a name="index-shell-variables-489"></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 &lsquo;<samp><span class="samp">.</span><var>progname</var></samp>&rsquo; suffix on variables and
&lsquo;<samp><span class="samp">_</span><var>progname</var></samp>&rsquo; 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-490"></a>Variable expansion is implemented in the source file
<samp><span class="file">kpathsea/variable.c</span></samp>.

<div class="node">
<a name="Tilde-expansion"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Brace-expansion">Brace expansion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Variable-expansion">Variable expansion</a>,
Up:&nbsp;<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-491"></a><a name="index-home-directories-in-paths-492"></a><a name="index-tilde-expansion-493"></a><a name="index-expansion_002c-tilde-494"></a>
<a name="index-HOME_0040r_007b_002c-as-_007e-expansion_007d-495"></a><a name="index-USERPROFILE_0040r_007b_002c-as-_007e-expansion_007d-496"></a>A leading &lsquo;<samp><span class="samp">~</span></samp>&rsquo; 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.  On Windows, the environment variable <code>USERPROFILE</code> is
checked instead of <code>HOME</code>.

   <p>A leading &lsquo;<samp><span class="samp">~</span><var>user</var></samp>&rsquo; 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-497"></a><a name="index-trailing-_0040samp_007b_002f_007d-in-home-directory-498"></a><a name="index-g_t_002f_0040r_007b_002c-trailing-in-home-directory_007d-499"></a>As a special case, if a home directory ends in &lsquo;<samp><span class="samp">/</span></samp>&rsquo;, the trailing
slash is dropped, to avoid inadvertently creating a &lsquo;<samp><span class="samp">//</span></samp>&rsquo; construct
in the path.  For example, if the home directory of the user &lsquo;<samp><span class="samp">root</span></samp>&rsquo;
is &lsquo;<samp><span class="samp">/</span></samp>&rsquo;, the path element &lsquo;<samp><span class="samp">~root/mymacros</span></samp>&rsquo; expands to just
&lsquo;<samp><span class="samp">/mymacros</span></samp>&rsquo;, not &lsquo;<samp><span class="samp">//mymacros</span></samp>&rsquo;.

   <p><a name="index-tilde_002ec-500"></a>Tilde expansion is implemented in the source file <samp><span class="file">kpathsea/tilde.c</span></samp>.

<div class="node">
<a name="Brace-expansion"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Tilde-expansion">Tilde expansion</a>,
Up:&nbsp;<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-501"></a><a name="index-brace-expansion-502"></a>
&lsquo;<samp><span class="samp">x{</span><var>a</var><span class="samp">,</span><var>b</var><span class="samp">}y</span></samp>&rsquo; expands to &lsquo;<samp><span class="samp">x</span><var>a</var><span class="samp">y:x</span><var>b</var><span class="samp">y</span></samp>&rsquo;. 
For example:

<pre class="example">     foo/{1,2}/baz
</pre>
   <p class="noindent">expands to &lsquo;<samp><span class="samp">foo/1/baz:foo/2/baz</span></samp>&rsquo;.  &lsquo;<samp><span class="samp">:</span></samp>&rsquo; is the path
separator on the current system; e.g., on a DOS system, it's &lsquo;<samp><span class="samp">;</span></samp>&rsquo;.

   <p>Braces can be nested; for example, &lsquo;<samp><span class="samp">x{A,B{1,2}}y</span></samp>&rsquo; expands to
&lsquo;<samp><span class="samp">xAy:xB1y:xB2y</span></samp>&rsquo;.

   <p>Multiple non-nested braces are expanded from right to left; for example,
&lsquo;<samp><span class="samp">x{A,B}{1,2}y</span></samp>&rsquo; expands to &lsquo;<samp><span class="samp">x{A,B}1y:x{A,B}2y</span></samp>&rsquo;, which
expands to &lsquo;<samp><span class="samp">xA1y:xB1y:xA2y:xB2y</span></samp>&rsquo;.

   <p><a name="index-multiple-_0040TeX_007b_007d-hierarchies-503"></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 &lsquo;<samp><span class="samp">x{A:B}{1:2}y</span></samp>&rsquo;.

   <p><a name="index-expand_002ec-504"></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">
<a name="KPSE_DOT-expansion"></a>
<a name="KPSE_005fDOT-expansion"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Subdirectory-expansion">Subdirectory expansion</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Brace-expansion">Brace expansion</a>,
Up:&nbsp;<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-505"></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
&lsquo;<samp><span class="samp">mktex...</span></samp>&rsquo; scripts <a href="#mktex-scripts">mktex scripts</a>, because these
change the working directory.  You should not ever define it yourself.

<div class="node">
<a name="Subdirectory-expansion"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a>,
Up:&nbsp;<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-506"></a><a name="index-subdirectory-searching-507"></a><a name="index-expansion_002c-subdirectory-508"></a>
<a name="index-alphabetical-order_002c-not-509"></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 &ldquo;directory order&rdquo;, and definitely not
alphabetical.)

   <p>If you specify any filename components after the &lsquo;<samp><span class="samp">//</span></samp>&rsquo;, only
subdirectories which match those components are included.  For example,
&lsquo;<samp><span class="samp">/a//b</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">//</span></samp>&rsquo; constructs in the path.

   <p>&lsquo;<samp><span class="samp">//</span></samp>&rsquo; 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-510"></a><a name="index-leaf-directory-trick-511"></a><a name="index-Farwell_002c-Matthew-512"></a><a name="index-MacKenzie_002c-David-513"></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-514"></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 &lsquo;<samp><span class="samp">stat</span></samp>&rsquo; structure
will be two.  Thus, we don't have to stat everything in the bottom-level
(leaf) directories&mdash;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-ST_005fNLINK_005fTRICK-515"></a>You can disable the trick by undefining <code>ST_NLINK_TRICK</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-516"></a>Unfortunately, in some cases files in leaf directories are
<code>stat</code>'d: if the path specification is, say,
&lsquo;<samp><span class="samp">$TEXMF/fonts//pk//</span></samp>&rsquo;, then files in a subdirectory
&lsquo;<samp><span class="samp">.../pk</span></samp>&rsquo;, 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 &lsquo;<samp><span class="samp">may descend</span></samp>&rsquo;) 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-517"></a>Subdirectory expansion is implemented in the source file
<samp><span class="file">kpathsea/elt-dirs.c</span></samp>.

<div class="node">
<a name="Filename-database"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Invoking-kpsewhich">Invoking kpsewhich</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Path-expansion">Path expansion</a>,
Up:&nbsp;<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-518"></a><a name="index-database_002c-for-filenames-519"></a><a name="index-externally_002dbuilt-filename-database-520"></a>
Kpathsea goes to some lengths to minimize disk accesses for searches
(see <a href="#Subdirectory-expansion">Subdirectory expansion</a>).  Nevertheless, in practice searching
each possible directory in typical TeX installations takes an
excessively long time.

   <p>Therefore, Kpathsea can use an externally-built <dfn>filename
database</dfn> 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 &ldquo;8.3&rdquo; 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">
<a name="ls-R"></a>
<a name="ls_002dR"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Filename-aliases">Filename aliases</a>,
Up:&nbsp;<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-521"></a><a name="index-TEXMFDBS-522"></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 &lsquo;<samp><span class="samp">ls-R</span></samp>&rsquo; is to run the
<code>mktexlsr</code> script, which is installed in &lsquo;<samp><span class="samp">$(bindir)</span></samp>&rsquo;
(<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 &lsquo;<samp><span class="samp">mktex...</span></samp>&rsquo; scripts.

   <p><a name="index-ls_002dR_0040r_007b_002c-simplest-build_007d-523"></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> &amp;&amp; ls -LAR ./ &gt;ls-R
</pre>
   <p class="noindent"><a name="index-g_t_002d_002dcolor_003dtty-524"></a><a name="index-g_t_002fetc_002fprofile-_0040r_007band-aliases_007d-525"></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., &lsquo;<samp><span class="samp">ls
--color=tty</span></samp>&rsquo;.  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-526"></a><a name="index-dot-files-527"></a><a name="index-g_t_002e-_0040r_007bfiles_007d-528"></a><a name="index-g_t_002e-_0040r_007bdirectories_002c-ignored_007d-529"></a><a name="index-g_t_002etex-_0040r_007bfile_002c-included-in-_0040file_007bls_002dR_007d_007d-530"></a>The &lsquo;<samp><span class="samp">-A</span></samp>&rsquo; option to <code>ls</code> includes files beginning with &lsquo;<samp><span class="samp">.</span></samp>&rsquo;
(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 &lsquo;<samp><span class="samp">.</span></samp>&rsquo; are always ignored.)

   <p><a name="index-symbolic-links_002c-and-_0040file_007bls_002dR_007d-531"></a><a name="index-g_t_002dL-_0040r_007boption-to-_0040code_007bls_007d_007d-532"></a>If your system does not support symbolic links, omit the &lsquo;<samp><span class="samp">-L</span></samp>&rsquo;.

   <p><a name="index-automounter_002c-and-_0040file_007bls_002dR_007d-533"></a><a name="index-NFS-and-_0040file_007bls_002dR_007d-534"></a><code>ls -LAR </code><var>/your/texmf/root</var> will also work.  But using
&lsquo;<samp><span class="samp">./</span></samp>&rsquo; 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-535"></a><a name="index-unusable-_0040file_007bls_002dR_007d-warning-536"></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
&lsquo;<samp><span class="samp">ls -R</span></samp>&rsquo; instead of &lsquo;<samp><span class="samp">ls -LR ./</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ls -R
</span><var>/your/texmf/root</var></samp>&rsquo;.  Another possibility is some system directory
name starting with a &lsquo;<samp><span class="samp">.</span></samp>&rsquo; (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-537"></a><a name="index-disk-searching_002c-avoiding-538"></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 &lsquo;<samp><span class="samp">!!</span></samp>&rsquo;,
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 (&ldquo;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?&rdquo;), it
is not in any of the default search paths.

<div class="node">
<a name="Filename-aliases"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Database-format">Database format</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ls_002dR">ls-R</a>,
Up:&nbsp;<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-539"></a><a name="index-aliases_002c-for-filenames-540"></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 &lsquo;<samp><span class="samp">longtabl.sty</span></samp>&rsquo;.

<!-- 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 &lsquo;<samp><span class="samp">%</span></samp>&rsquo; or &lsquo;<samp><span class="samp">#</span></samp>&rsquo; 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">
<a name="Database-format"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Filename-aliases">Filename aliases</a>,
Up:&nbsp;<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-541"></a><a name="index-database_002c-format-of-542"></a>
The &ldquo;database&rdquo; 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 &lsquo;<samp><span class="samp">-R</span></samp>&rsquo; option, as follows.

     <ul>
<li>Blank lines are ignored.

     <li>If a line begins with &lsquo;<samp><span class="samp">/</span></samp>&rsquo; or &lsquo;<samp><span class="samp">./</span></samp>&rsquo; or &lsquo;<samp><span class="samp">../</span></samp>&rsquo; and ends with
a colon, it's the name of a directory.  (&lsquo;<samp><span class="samp">../</span></samp>&rsquo; 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">
<a name="Invoking-kpsewhich"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Filename-database">Filename database</a>,
Up:&nbsp;<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-543"></a><a name="index-path-searching_002c-standalone-544"></a><a name="index-standalone-path-searching-545"></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 &lsquo;<samp><span class="samp">mktex...</span></samp>&rsquo; 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 &lsquo;<samp><span class="samp">-</span></samp>&rsquo; or &lsquo;<samp><span class="samp">--</span></samp>&rsquo;, 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="#Specially_002drecognized-files">Specially-recognized files</a>:   Default formats for texmf.cnf, etc. 
<li><a accesskey="3" href="#Auxiliary-tasks">Auxiliary tasks</a>:              Path and variable expansion. 
<li><a accesskey="4" href="#Standard-options">Standard options</a>:             --help and --version. 
</ul>

<div class="node">
<a name="Path-searching-options"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Specially_002drecognized-files">Specially-recognized files</a>,
Up:&nbsp;<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-546"></a>
Kpsewhich looks up each non-option argument on the command line as a
filename, and returns the first file found.

   <p>Various options alter the path searching behavior:

     <dl>
<dt>&lsquo;<samp><span class="samp">--all</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dall-547"></a><a name="index-all-matches_002c-finding-548"></a>Report all matches found, one per line.  By default, if there is more
than one match, just one will be reported (chosen effectively at random).

     <br><dt>&lsquo;<samp><span class="samp">--dpi=</span><var>num</var></samp>&rsquo;<dd><a name="index-g_t_002d_002ddpi_003d_0040var_007bnum_007d-549"></a><a name="index-g_t_002dD-_0040var_007bnum_007d-550"></a><a name="index-resolution_002c-setting-551"></a>Set the resolution to <var>num</var>; this only affects &lsquo;<samp><span class="samp">gf</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">pk</span></samp>&rsquo; lookups.  &lsquo;<samp><span class="samp">-D</span></samp>&rsquo; is a synonym, for compatibility with
Dvips.  Default is 600.

     <br><dt>&lsquo;<samp><span class="samp">--engine=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dengine_003d_0040var_007bname_007d-552"></a><a name="index-engine-name-553"></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.

     <p>In particular, since the memory dump files
(<samp><span class="file">.fmt</span></samp>/<samp><span class="file">.base</span></samp>/<samp><span class="file">.mem</span></samp>) are now stored in
subdirectories named for the engine (<samp><span class="file">tex</span></samp>, <samp><span class="file">pdftex</span></samp>,
<samp><span class="file">xetex</span></samp>, etc.), you must specify an engine name in order to find
them.  For example, <samp><span class="file">cont-en.fmt</span></samp> typically exists for both
<samp><span class="file">pdftex</span></samp> and <samp><span class="file">xetex</span></samp>.  With the default path settings, you
can use &lsquo;<samp><span class="samp">--engine=/</span></samp>&rsquo; to look for any dump file, regardless of
engine; if a dump file exists for more than one engine, it's
indeterminate which one is returned.  (The &lsquo;<samp><span class="samp">/</span></samp>&rsquo; ends up specifying
a normal recursive search along the path where the dumps are stored,
namely &lsquo;<samp><span class="samp">$TEXMF/web2c{/$engine,}</span></samp>&rsquo;.)

     <br><dt>&lsquo;<samp><span class="samp">--format=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dformat_003d_0040var_007bname_007d-554"></a>Set the format for lookup to <var>name</var>.  By default, the format is
guessed from the filename, with &lsquo;<samp><span class="samp">tex</span></samp>&rsquo; being used if nothing else
fits.  The recognized filename extensions (including any leading
&lsquo;<samp><span class="samp">.</span></samp>&rsquo;) 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 &lsquo;<samp><span class="samp">--format="dvips config"</span></samp>&rsquo;.  (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.

     <p>The strings in parentheses are abbreviations recognized only by
<code>kpsewhich</code> (not the underlying library calls).  They are
provided when it would otherwise require an argument containing a
space to specify the format, to simplify quoting of calls from shells.

     <pre class="example">          gf: gf
          pk: pk
          bitmap font (bitmapfont):
          tfm: .tfm
          afm: .afm
          base: .base
          bib: .bib
          bst: .bst
          cnf: .cnf
          ls-R: ls-R ls-r
          fmt: .fmt
          map: .map
          mem: .mem
          mf: .mf
          mfpool: .pool
          mft: .mft
          mp: .mp
          mppool: .pool
          MetaPost support (mpsupport):
          ocp: .ocp
          ofm: .ofm .tfm
          opl: .opl  .pl
          otp: .otp
          ovf: .ovf .vf
          ovp: .ovp  .vpl
          graphic/figure:  .eps .epsi
          tex: .tex  .sty .cls .fd .aux .bbl .def .clo .ldf
          TeX system documentation (doc):
          texpool: .pool
          TeX system sources (source):  .dtx .ins
          PostScript header:  .pro
          Troff fonts (trofffont):
          type1 fonts: .pfa .pfb
          vf: .vf
          dvips config (dvipsconfig):
          ist: .ist
          truetype fonts: .ttf .ttc .TTF .TTC
          type42 fonts: .t42 .T42
          web2c files (web2c):
          other text files (othertext):
          other binary files (otherbin):
          misc fonts (miscfont):
          web: .web  .ch
          cweb: .w .web  .ch
          enc files: .enc
          cmap files (cmap):
          subfont definition files: .sfd
          opentype fonts: .otf
          pdftex config (pdftexconfig):
          lig files: .lig
          texmfscripts:
          lua: .luc .luctex .texluc .lua .luatex .texlua
          font feature files: .fea
          cid maps: .cid .cidmap
          mlbib: .mlbib .bib
          mlbst: .mlbst .bst
          clua: .dll .so
</pre>
     <p>This option and &lsquo;<samp><span class="samp">--path</span></samp>&rsquo; are mutually exclusive.

     <br><dt>&lsquo;<samp><span class="samp">--interactive</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dinteractive-555"></a><a name="index-interactive-query-556"></a>After processing the command line, read additional filenames to look up
from standard input.

     <br><dt>&lsquo;<samp><span class="samp">--mktex=</span><var>filetype</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--no-mktex=</span><var>filetype</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dmktex_003d_0040var_007bfiletype_007d-557"></a><a name="index-g_t_002d_002dno_002dmktex_003d_0040var_007bfiletype_007d-558"></a>Turn on or off the &lsquo;<samp><span class="samp">mktex</span></samp>&rsquo; script associated with <var>filetype</var>. 
Usual values for <var>filetype</var> are &lsquo;<samp><span class="samp">pk</span></samp>&rsquo;, &lsquo;<samp><span class="samp">mf</span></samp>&rsquo;, &lsquo;<samp><span class="samp">tex</span></samp>&rsquo;,
and &lsquo;<samp><span class="samp">tfm</span></samp>&rsquo;.  By default, all are off in Kpsewhich, even if they
are enabled for TeX.  This option implies setting
<code>--must-exist</code>.  See <a href="#mktex-scripts">mktex scripts</a>.

     <br><dt>&lsquo;<samp><span class="samp">--mode=</span><var>string</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dmode_003d_0040var_007bstring_007d-559"></a>Set the mode name to <var>string</var>; this also only affects &lsquo;<samp><span class="samp">gf</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">pk</span></samp>&rsquo; lookups.  No default: any mode will be found.  See <a href="#mktex-script-arguments">mktex script arguments</a>.

     <br><dt>&lsquo;<samp><span class="samp">--must-exist</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dmust_002dexist-560"></a>Do everything possible to find the files, notably including searching
the disk and running the &lsquo;<samp><span class="samp">mktex</span></samp>&rsquo; scripts.  By default, only the
<samp><span class="file">ls-R</span></samp> database is checked, in the interest of efficiency.

     <br><dt>&lsquo;<samp><span class="samp">--path=</span><var>string</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dpath_003d_0040var_007bstring_007d-561"></a>Search along the path <var>string</var> (colon-separated as usual), instead
of guessing the search path from the filename.  &lsquo;<samp><span class="samp">//</span></samp>&rsquo; and all the
usual expansions are supported (see <a href="#Path-expansion">Path expansion</a>).  This option
and &lsquo;<samp><span class="samp">--format</span></samp>&rsquo; are mutually exclusive.  To output the complete
directory expansion of a path, instead of doing a one-shot lookup, see
&lsquo;<samp><span class="samp">--expand-path</span></samp>&rsquo; and &lsquo;<samp><span class="samp">--show-path</span></samp>&rsquo; in the following section.

     <br><dt>&lsquo;<samp><span class="samp">--progname=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dprogname_003d_0040var_007bname_007d-562"></a>Set the program name to <var>name</var>; default is &lsquo;<samp><span class="samp">kpsewhich</span></samp>&rsquo;.  This
can affect the search paths via the &lsquo;<samp><span class="samp">.</span><var>prognam</var></samp>&rsquo; feature in
configuration files (see <a href="#Config-files">Config files</a>).

     <br><dt>&lsquo;<samp><span class="samp">--safe-in-name=</span><var>name</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--safe-out-name=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dsafe_002din_002dname_003d_0040var_007bname_007d-563"></a><a name="index-g_t_002d_002dsafe_002dout_002dname_003d_0040var_007bname_007d-564"></a>Exit successfully if <var>name</var> is safe to open for reading or
writing, respectively, else unsuccessfully.  No output is written. 
These tests take account of the related Kpathsea configuration
settings (see <a href="#Calling-sequence">Calling sequence</a>).

     <br><dt>&lsquo;<samp><span class="samp">--subdir=</span><var>string</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dsubdir_003d_0040var_007bstring_007d-565"></a>Report only those matches whose directory part <em>ends</em> with
<var>string</var> (compared literally, except case is ignored on a
case-insensitive operating system).  For example, suppose there are
two matches for a given name:

     <pre class="example">          kpsewhich foo.sty
          &rArr; /some/where/foo.sty
          /another/place/foo.sty
</pre>
     <p class="noindent">Then we can narrow the result to what we are interested in with
<samp><span class="option">--subdir</span></samp>:

     <pre class="example">          kpsewhich --subdir=where foo.sty
          &rArr; /some/where/foo.sty
          
          kpsewhich --subdir=place foo.sty
          &rArr; /another/place/foo.sty
</pre>
     <p class="noindent">The string to match must be at the end of the directory part of the
match, and it is taken literally, with no pattern matching:

     <pre class="example">          kpsewhich --subdir=another foo.sty
          &rArr;
</pre>
     <p class="noindent">The string to match may cross directory components:

     <pre class="example">          kpsewhich --subdir=some/where foo.sty
          &rArr; /some/where/foo.sty
</pre>
     <p class="noindent"><samp><span class="option">--subdir</span></samp> implies <samp><span class="option">--all</span></samp>; if there is more than one
match, they will all be reported (in our example, both &lsquo;<samp><span class="samp">where</span></samp>&rsquo;
and &lsquo;<samp><span class="samp">place</span></samp>&rsquo; end in &lsquo;<samp><span class="samp">e</span></samp>&rsquo;):

     <pre class="example">          kpsewhich --subdir=e
          &rArr; /some/where/foo.sty
          /another/place/foo.sty
</pre>
     <p class="noindent">Because of the above rules, the presence of a leading &lsquo;<samp><span class="samp">/</span></samp>&rsquo; is
important, since it &ldquo;anchors&rdquo; the match to a full component name:

     <pre class="example">          kpsewhich --subdir=/lace foo.sty
          &rArr;
</pre>
     <p class="noindent">However, a trailing &lsquo;<samp><span class="samp">/</span></samp>&rsquo; is immaterial (and ignored), since the
match always takes place at the end of the directory part:

     <pre class="example">          kpsewhich --subdir=lace/ foo.sty
          &rArr; /another/place/foo.sty
</pre>
     <p class="noindent">The purpose of these rules is to make it convenient to find results
only within a particular area of the tree.  For instance, a given
script named <samp><span class="file">foo.lua</span></samp> might exist within both
<samp><span class="file">texmf-dist/scripts/pkg1/</span></samp> and <samp><span class="file">texmf-dist/scripts/pkg2/</span></samp>. 
By specifying, say, &lsquo;<samp><span class="samp">--subdir=/pkg1</span></samp>&rsquo;, you can be sure of getting
the one you are interested in.

     <p>We only match at the end because a site might happen to install TeX
in <samp><span class="file">/some/coincidental/pkg1/path/</span></samp>, and we wouldn't want to match
<samp><span class="file">texmf-dist/scripts/pkg2/</span></samp> that when searching for &lsquo;<samp><span class="samp">/pkg1</span></samp>&rsquo;.

   </dl>

<div class="node">
<a name="Specially-recognized-files"></a>
<a name="Specially_002drecognized-files"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Auxiliary-tasks">Auxiliary tasks</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Path-searching-options">Path searching options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Invoking-kpsewhich">Invoking kpsewhich</a>

</div>

<h4 class="subsection">3.5.2 Specially-recognized files for <samp><span class="command">kpsewhich</span></samp></h4>

<p><samp><span class="command">kpsewhich</span></samp> recognizes a few special filenames on the command
line and defaults to using the `known' file formats for them, merely
to save the time and trouble of specifying the format.  This is only a
feature of <samp><span class="command">kpsewhich</span></samp>; when using the Kpathsea library
itself, none of these special filenames are recognized, and it's still
up to the caller to specify the desired format.

   <p>Here is the list of special filenames to <samp><span class="command">kpsewhich</span></samp>, along
with their corresponding format:

     
<a name="index-config_002eps-566"></a>
<dl><dt><samp><span class="file">config.ps</span></samp><dd><code>dvips config</code>

     <p><a name="index-dvipdfmx_002ecfg-567"></a><br><dt><samp><span class="file">dvipdfmx.cfg</span></samp><dd>&lsquo;<samp><span class="samp">other text files</span></samp>&rsquo;

     <p><a name="index-fmtutil_002ecnf-568"></a><br><dt><samp><span class="file">fmtutil.cnf</span></samp><dd>&lsquo;<samp><span class="samp">web2c files</span></samp>&rsquo;

     <p><a name="index-glyphlist_002etxt-569"></a><br><dt><samp><span class="file">glyphlist.txt</span></samp><dd>&lsquo;<samp><span class="samp">map</span></samp>&rsquo;

     <p><a name="index-mktex_002ecnf-570"></a><br><dt><samp><span class="file">mktex.cnf</span></samp><dd>&lsquo;<samp><span class="samp">web2c files</span></samp>&rsquo;

     <p><a name="index-pdfglyphlist_002etxt-571"></a><br><dt><samp><span class="file">pdfglyphlist.txt</span></samp><dd>&lsquo;<samp><span class="samp">map</span></samp>&rsquo;

     <p><a name="index-pdftex_002ecfg-572"></a><a name="index-pdftexconfig_002etex-573"></a><br><dt><samp><span class="file">pdftex.cfg</span></samp><dd>&lsquo;<samp><span class="samp">pdftex config</span></samp>&rsquo; (although <samp><span class="file">pdftex.cfg</span></samp> is not used any more;
look for the file <samp><span class="file">pdftexconfig.tex</span></samp> instead.)

     <p><a name="index-texmf_002ecnf-574"></a><br><dt><samp><span class="file">texmf.cnf</span></samp><dd>&lsquo;<samp><span class="samp">cnf</span></samp>&rsquo;

     <p><a name="index-XDvi-575"></a><br><dt><samp><span class="file">XDvi</span></samp><dd>&lsquo;<samp><span class="samp">other text files</span></samp>&rsquo;

   </dl>

   <p>A user-specified format will override the above defaults.

   <p><a name="index-tcfmgr_002emap-576"></a>Another useful configuration file in this regard is <samp><span class="file">tcfmgr.map</span></samp>,
found in <samp><span class="file">texmf/texconfig/tcfmgr.map</span></samp>, which records various
information about the above configuration files (among others).

<div class="node">
<a name="Auxiliary-tasks"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Standard-options">Standard options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Specially_002drecognized-files">Specially-recognized files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Invoking-kpsewhich">Invoking kpsewhich</a>

</div>

<h4 class="subsection">3.5.3 Auxiliary tasks</h4>

<p><a name="index-auxiliary-tasks-577"></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-578"></a>&lsquo;<samp><span class="samp">--debug=</span><var>num</var></samp>&rsquo; 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-579"></a>&lsquo;<samp><span class="samp">--var-value=</span><var>variable</var></samp>&rsquo; outputs the value of <var>variable</var>,
expanding &lsquo;<samp><span class="samp">$</span></samp>&rsquo; (see <a href="#Variable-expansion">Variable expansion</a> and &lsquo;<samp><span class="samp">~</span></samp>&rsquo; (see <a href="#Tilde-expansion">Tilde expansion</a>) constructs, but not performing other expansions.

     <li><a name="index-g_t_002d_002dexpand_002dbraces_003d_0040var_007bstring_007d-580"></a>&lsquo;<samp><span class="samp">--expand-braces=</span><var>string</var></samp>&rsquo; 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-581"></a>&lsquo;<samp><span class="samp">--expand-var=</span><var>string</var></samp>&rsquo; outputs the variable and tilde
expansion of <var>string</var>.  For example, the &lsquo;<samp><span class="samp">mktex...</span></samp>&rsquo;
scripts run &lsquo;<samp><span class="samp">kpsewhich --expand-var='$TEXMF'</span></samp>&rsquo; 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-582"></a>&lsquo;<samp><span class="samp">--expand-path=</span><var>string</var></samp>&rsquo; outputs the complete expansion of
<var>string</var>, with each element separated by the usual path separator
on the current system (&lsquo;<samp><span class="samp">;</span></samp>&rsquo; on Windows, &lsquo;<samp><span class="samp">:</span></samp>&rsquo; otherwise). 
This may be useful to construct a custom search path for a format not
otherwise supported.  To retrieve the search path for a format that is
already supported, see &lsquo;<samp><span class="samp">--show-path</span></samp>&rsquo;, next.

     <p>Nonexistent directories are culled from the output:

     <pre class="example">          $ kpsewhich --expand-path '/tmp'
          &rArr; /tmp
          $ kpsewhich --expand-path '/nonesuch'
          &rArr;
</pre>
     <p>For one-shot uses of an arbitrary (not built in to Kpathsea) path, see
&lsquo;<samp><span class="samp">--path</span></samp>&rsquo; in the previous section.

     <li><a name="index-g_t_002d_002dshow_002dpath_003d_0040var_007bname_007d-583"></a>&lsquo;<samp><span class="samp">--show-path=</span><var>name</var></samp>&rsquo; shows the path that would be used for file
lookups of file type <var>name</var>.  Either a filename extension
(&lsquo;<samp><span class="samp">pk</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.vf</span></samp>&rsquo;, etc.) or an integer can be used, just as with
&lsquo;<samp><span class="samp">--format</span></samp>&rsquo;, described in the previous section.

   </ul>

<div class="node">
<a name="Standard-options"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Auxiliary-tasks">Auxiliary tasks</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Invoking-kpsewhich">Invoking kpsewhich</a>

</div>

<h4 class="subsection">3.5.4 Standard options</h4>

<p><a name="index-standard-options-584"></a>
Kpsewhich accepts the standard GNU options:

     <ul>
<li><a name="index-g_t_002d_002dhelp-585"></a>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo; prints a help message on standard output and exits
successfully.

     <li><a name="index-g_t_002d_002dversion-586"></a>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo; prints the Kpathsea version number and exits successfully. 
</ul>

<div class="node">
<a name="TeX-support"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Programming">Programming</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Path-searching">Path searching</a>,
Up:&nbsp;<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-587"></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&mdash;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">
<a name="Supported-file-formats"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#File-lookup">File lookup</a>,
Up:&nbsp;<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-588"></a><a name="index-file-formats_002c-supported-589"></a>
<a name="index-environment-variables-for-_0040TeX_007b_007d-590"></a><a name="index-g_t_0040TeX_007b_007d-environment-variables-591"></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-592"></a>Since environment variables containing periods, such as
&lsquo;<samp><span class="samp">TEXINPUTS.latex</span></samp>&rsquo;, are not allowed on some systems, Kpathsea looks
for environment variables with an underscore, e.g.,
&lsquo;<samp><span class="samp">TEXINPUTS_latex</span></samp>&rsquo; (see <a href="#Config-files">Config files</a>).

   <p>The following table lists the above information.

     <dl>
<dt>&lsquo;<samp><span class="samp">afm</span></samp>&rsquo;<dd><a name="index-g_t_002eafm-593"></a><a name="index-AFMFONTS-594"></a>(Adobe font metrics, see <a href="dvips.html#Metric-files">Metric files</a>)
<code>AFMFONTS</code>;
suffix &lsquo;<samp><span class="samp">.afm</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">base</span></samp>&rsquo;<dd><a name="index-g_t_002ebase-595"></a><a name="index-MFBASES-596"></a><a name="index-TEXMFINI-597"></a>(Metafont memory dump, see <a href="web2c.html#Memory-dumps">Memory dumps</a>)
<code>MFBASES</code>, <code>TEXMFINI</code>;
suffix &lsquo;<samp><span class="samp">.base</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">bib</span></samp>&rsquo;<dd><a name="index-g_t_002ebib-598"></a><a name="index-BIBINPUTS-599"></a><a name="index-TEXBIB-600"></a>(BibTeX bibliography source, see <a href="web2c.html#bibtex-invocation">bibtex invocation</a>)
<code>BIBINPUTS</code>, <code>TEXBIB</code>;
suffix &lsquo;<samp><span class="samp">.bib</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">bst</span></samp>&rsquo;<dd><a name="index-g_t_002ebst-601"></a><a name="index-BSTINPUTS-602"></a>(BibTeX style, see <a href="web2c.html#Basic-BibTeX-style-files">Basic BibTeX style files</a>)
<code>BSTINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.bst</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">cmap</span></samp>&rsquo;<dd><a name="index-g_t_002ecmap-603"></a><a name="index-CMAPFONTS-604"></a>(character map files)
<code>CMAPFONTS</code>;
suffix &lsquo;<samp><span class="samp">.cmap</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">cnf</span></samp>&rsquo;<dd><a name="index-g_t_002ecnf-605"></a><a name="index-TEXMFCNF-606"></a>(Runtime configuration files, see <a href="#Config-files">Config files</a>)
<code>TEXMFCNF</code>;
suffix &lsquo;<samp><span class="samp">.cnf</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">cweb</span></samp>&rsquo;<dd><a name="index-g_t_002ew-607"></a><a name="index-g_t_002eweb-608"></a><a name="index-CWEBINPUTS-609"></a>(CWEB input files)
<code>CWEBINPUTS</code>;
suffixes &lsquo;<samp><span class="samp">.w</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.web</span></samp>&rsquo;;
additional suffix &lsquo;<samp><span class="samp">.ch</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">dvips config</span></samp>&rsquo;<dd><a name="index-TEXCONFIG-610"></a><a name="index-config_002eps_0040r_007b_002c-search-path-for_007d-611"></a>(Dvips &lsquo;<samp><span class="samp">config.*</span></samp>&rsquo; 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>&lsquo;<samp><span class="samp">enc files</span></samp>&rsquo;<dd><a name="index-g_t_002eenc-612"></a><a name="index-ENCFONTS-613"></a>(encoding vectors)
<code>ENCFONTS</code>;
suffix &lsquo;<samp><span class="samp">.enc</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">fmt</span></samp>&rsquo;<dd><a name="index-g_t_002efmt-614"></a><a name="index-TEXFORMATS-615"></a><a name="index-TEXMFINI-616"></a>(TeX memory dump, see <a href="web2c.html#Memory-dumps">Memory dumps</a>)
<code>TEXFORMATS</code>, <code>TEXMFINI</code>;
suffix &lsquo;<samp><span class="samp">.fmt</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">font cid map</span></samp>&rsquo;<dd><a name="index-g_t_002ecid-617"></a><a name="index-FONTCIDMAPS-618"></a>(CJK mapping)
<code>FONTCIDMAPS</code>
suffix &lsquo;<samp><span class="samp">.cid</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">font feature files</span></samp>&rsquo;<dd><a name="index-g_t_002efea-619"></a><a name="index-FONTFEATURES-620"></a>(primarily for OpenType font features)
<code>FONTFEATURES</code>
suffix &lsquo;<samp><span class="samp">.fea</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">gf</span></samp>&rsquo;<dd><a name="index-gf-621"></a><a name="index-GFFONTS-622"></a><a name="index-GLYPHFONTS-623"></a><a name="index-TEXFONTS-624"></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 &lsquo;<samp><span class="samp">gf</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">graphic/figure</span></samp>&rsquo;<dd><a name="index-g_t_002eeps-625"></a><a name="index-g_t_002eepsi-626"></a><a name="index-TEXPICTS-627"></a><a name="index-TEXINPUTS-628"></a>(Encapsulated PostScript figures, see <a href="dvips.html#PostScript-figures">PostScript figures</a>)
<code>TEXPICTS</code>, <code>TEXINPUTS</code>;
additional suffixes: &lsquo;<samp><span class="samp">.eps</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.epsi</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">ist</span></samp>&rsquo;<dd><a name="index-g_t_002eist-629"></a><a name="index-TEXINDEXSTYLE-630"></a><a name="index-INDEXSTYLE-631"></a>(makeindex style files)
<code>TEXINDEXSTYLE</code>, <code>INDEXSTYLE</code>;
suffix &lsquo;<samp><span class="samp">.ist</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">lig files</span></samp>&rsquo;<dd><a name="index-g_t_002elig-632"></a><a name="index-LIGFONTS-633"></a>(ligature definition files)
<code>LIGFONTS</code>;
suffix &lsquo;<samp><span class="samp">.lig</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">ls-R</span></samp>&rsquo;<dd><a name="index-ls_002dR-634"></a><a name="index-TEXMFDBS-635"></a>(Filename databases, see <a href="#Filename-database">Filename database</a>)
<code>TEXMFDBS</code>.

     <br><dt>&lsquo;<samp><span class="samp">map</span></samp>&rsquo;<dd><a name="index-g_t_002emap-636"></a><a name="index-TEXFONTMAPS-637"></a>(Fontmaps, see <a href="#Fontmap">Fontmap</a>)
<code>TEXFONTMAPS</code>;
suffix &lsquo;<samp><span class="samp">.map</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">mem</span></samp>&rsquo;<dd><a name="index-g_t_002emem-638"></a><a name="index-MPMEMS-639"></a><a name="index-TEXMFINI-640"></a>(MetaPost memory dump, see <a href="web2c.html#Memory-dumps">Memory dumps</a>)
<code>MPMEMS</code>, <code>TEXMFINI</code>;
suffix &lsquo;<samp><span class="samp">.mem</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">MetaPost support</span></samp>&rsquo;<dd><a name="index-MPSUPPORT-641"></a>(MetaPost support files, used by DMP; see <a href="web2c.html#dmp-invocation">dmp invocation</a>)
<code>MPSUPPORT</code>.

     <br><dt>&lsquo;<samp><span class="samp">mf</span></samp>&rsquo;<dd><a name="index-g_t_002emf-642"></a><a name="index-MFINPUTS-643"></a>(Metafont source, see <a href="web2c.html#mf-invocation">mf invocation</a>)
<code>MFINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.mf</span></samp>&rsquo;;
dynamic creation program: <code>mktexmf</code>.

     <br><dt>&lsquo;<samp><span class="samp">mfpool</span></samp>&rsquo;<dd><a name="index-g_t_002epool-644"></a><a name="index-MFPOOL-645"></a>(Metafont program strings, see <a href="web2c.html#pooltype-invocation">pooltype invocation</a>)
<code>MFPOOL</code>, <code>TEXMFINI</code>;
suffix &lsquo;<samp><span class="samp">.pool</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">mft</span></samp>&rsquo;<dd><a name="index-g_t_002emft-646"></a><a name="index-MFTINPUTS-647"></a>(<code>MFT</code> style file, see <a href="web2c.html#mft-invocation">mft invocation</a>)
<code>MFTINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.mft</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">misc fonts</span></samp>&rsquo;<dd><a name="index-MISCFONTS-648"></a>(font-related files that don't fit the other categories)
<code>MISCFONTS</code>

     <br><dt>&lsquo;<samp><span class="samp">mlbib</span></samp>&rsquo;<dd><a name="index-g_t_002emlbib-649"></a><a name="index-MLBIBINPUTS-650"></a><a name="index-BIBINPUTS-651"></a><a name="index-TEXBIB-652"></a>(MlBibTeX bibliography source)
<code>MLBIBINPUTS</code>, <code>BIBINPUTS</code>, <code>TEXBIB</code>;
suffixes &lsquo;<samp><span class="samp">.mlbib</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.mlbib</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">mlbst</span></samp>&rsquo;<dd><a name="index-g_t_002emlbst-653"></a><a name="index-MLBSTINPUTS-654"></a><a name="index-BSTINPUTS-655"></a>(MlBibTeX style)
<code>MLBSTINPUTS</code>, <code>BSTINPUTS</code>;
suffixes &lsquo;<samp><span class="samp">.mlbst</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.bst</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">mp</span></samp>&rsquo;<dd><a name="index-g_t_002emp-656"></a><a name="index-MPINPUTS-657"></a>(MetaPost source, see <a href="web2c.html#mpost-invocation">mpost invocation</a>)
<code>MPINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.mp</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">mppool</span></samp>&rsquo;<dd><a name="index-g_t_002epool-658"></a><a name="index-MPPOOL-659"></a>(MetaPost program strings, see <a href="web2c.html#pooltype-invocation">pooltype invocation</a>)
<code>MPPOOL</code>, <code>TEXMFINI</code>;
suffix &lsquo;<samp><span class="samp">.pool</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">ocp</span></samp>&rsquo;<dd><a name="index-g_t_002eocp-660"></a><a name="index-OCPINPUTS-661"></a>(Omega compiled process files)
<code>OCPINPUTS</code>; <br>
suffix &lsquo;<samp><span class="samp">.ocp</span></samp>&rsquo;;
dynamic creation program: <code>MakeOmegaOCP</code>.

     <br><dt>&lsquo;<samp><span class="samp">ofm</span></samp>&rsquo;<dd><a name="index-g_t_002eofm-662"></a><a name="index-OFMFONTS-663"></a>(Omega font metrics)
<code>OFMFONTS</code>, <code>TEXFONTS</code>; <br>
suffixes &lsquo;<samp><span class="samp">.ofm</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.tfm</span></samp>&rsquo;;
dynamic creation program: <code>MakeOmegaOFM</code>.

     <br><dt>&lsquo;<samp><span class="samp">opentype fonts</span></samp>&rsquo;<dd><a name="index-OPENTYPEFONTS-664"></a>(OpenType fonts)
<code>OPENTYPEFONTS</code>.

     <br><dt>&lsquo;<samp><span class="samp">opl</span></samp>&rsquo;<dd><a name="index-g_t_002eopl-665"></a>(Omega property lists)
<code>OPLFONTS</code>, <code>TEXFONTS</code>;
suffix &lsquo;<samp><span class="samp">.opl</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">otp</span></samp>&rsquo;<dd><a name="index-g_t_002eotp-666"></a><a name="index-OTPINPUTS-667"></a>(Omega translation process files)
<code>OTPINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.otp</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">ovf</span></samp>&rsquo;<dd><a name="index-g_t_002eovf-668"></a><a name="index-OVFFONTS-669"></a>(Omega virtual fonts)
<code>OVFFONTS</code>, <code>TEXFONTS</code>;
suffix &lsquo;<samp><span class="samp">.ovf</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">ovp</span></samp>&rsquo;<dd><a name="index-g_t_002eovp-670"></a><a name="index-OVPFONTS-671"></a>(Omega virtual property lists)
<code>OVPFONTS</code>, <code>TEXFONTS</code>;
suffix &lsquo;<samp><span class="samp">.ovp</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">pdftex config</span></samp>&rsquo;<dd><a name="index-PDFTEXCONFIG-672"></a>(PDFTeX-specific configuration files)
<code>PDFTEXCONFIG</code>.

     <br><dt>&lsquo;<samp><span class="samp">pk</span></samp>&rsquo;<dd><a name="index-g_t_002epk-673"></a><a name="index-PKFONTS-674"></a><a name="index-TEXPKS-675"></a><a name="index-GLYPHFONTS-676"></a><a name="index-TEXFONTS-677"></a>(packed bitmap fonts, see <a href="dvips.html#Glyph-files">Glyph files</a>)
<var>PROGRAM</var><code>FONTS</code> (<var>program</var> being &lsquo;<samp><span class="samp">XDVI</span></samp>&rsquo;, etc.),
<code>PKFONTS</code>, <code>TEXPKS</code>, <code>GLYPHFONTS</code>, <code>TEXFONTS</code>;
suffix &lsquo;<samp><span class="samp">pk</span></samp>&rsquo;;
dynamic creation program: <code>mktexpk</code>.

     <br><dt>&lsquo;<samp><span class="samp">PostScript header</span></samp>&rsquo;<dd><a name="index-g_t_002epro-678"></a><a name="index-TEXPSHEADERS-679"></a><a name="index-PSHEADERS-680"></a>(downloadable PostScript, see <a href="dvips.html#Header-files">Header files</a>)
<code>TEXPSHEADERS</code>, <code>PSHEADERS</code>;
additional suffix &lsquo;<samp><span class="samp">.pro</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">subfont definition files</span></samp>&rsquo;<dd><a name="index-g_t_002esfd-681"></a><a name="index-SFDFONTS-682"></a>(subfont definition files)
<code>SFDFONTS</code>
suffix &lsquo;<samp><span class="samp">.sfd</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">tex</span></samp>&rsquo;<dd><a name="index-g_t_002etex-683"></a><a name="index-TEXINPUTS-684"></a>(TeX source, see <a href="web2c.html#tex-invocation">tex invocation</a>)
<code>TEXINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.tex</span></samp>&rsquo;;
additional suffixes: none, because such a list cannot be complete;
dynamic creation program: <code>mktextex</code>.

     <br><dt>&lsquo;<samp><span class="samp">TeX system documentation</span></samp>&rsquo;<dd><a name="index-doc-files-685"></a><a name="index-TEXDOCS-686"></a>(Documentation files for the TeX system)
<code>TEXDOCS</code>.

     <br><dt>&lsquo;<samp><span class="samp">TeX system sources</span></samp>&rsquo;<dd><a name="index-source-files-687"></a><a name="index-TEXSOURCES-688"></a>(Source files for the TeX system)
<code>TEXSOURCES</code>.

     <br><dt>&lsquo;<samp><span class="samp">texmfscripts</span></samp>&rsquo;<dd><a name="index-TEXMFSCRIPTS-689"></a>(Architecture-independent executables distributed in the texmf trees)
<code>TEXMFSCRIPTS</code>.

     <br><dt>&lsquo;<samp><span class="samp">texpool</span></samp>&rsquo;<dd><a name="index-g_t_002epool-690"></a><a name="index-TEXPOOL-691"></a>(TeX program strings, see <a href="web2c.html#pooltype-invocation">pooltype invocation</a>)
<code>TEXPOOL</code>, <code>TEXMFINI</code>;
suffix &lsquo;<samp><span class="samp">.pool</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">tfm</span></samp>&rsquo;<dd><a name="index-g_t_002etfm-692"></a><a name="index-TFMFONTS-693"></a><a name="index-TEXFONTS-694"></a>(TeX font metrics, see <a href="dvips.html#Metric-files">Metric files</a>)
<code>TFMFONTS</code>, <code>TEXFONTS</code>;
suffix &lsquo;<samp><span class="samp">.tfm</span></samp>&rsquo;;
dynamic creation program: <code>mktextfm</code>.

     <br><dt>&lsquo;<samp><span class="samp">Troff fonts</span></samp>&rsquo;<dd><a name="index-TRFONTS-695"></a>(Troff fonts, used by DMP; see <a href="web2c.html#DMP-invocation">DMP invocation</a>)
<code>TRFONTS</code>.

     <br><dt>&lsquo;<samp><span class="samp">truetype fonts</span></samp>&rsquo;<dd><a name="index-g_t_002ettf-696"></a><a name="index-g_t_002ettc-697"></a><a name="index-TTFONTS-698"></a>(TrueType outline fonts) <code>TTFONTS</code>; suffixes &lsquo;<samp><span class="samp">.ttf</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">.ttc</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">type1 fonts</span></samp>&rsquo;<dd><a name="index-g_t_002epfa-699"></a><a name="index-g_t_002epfb-700"></a><a name="index-T1FONTS-701"></a><a name="index-T1INPUTS-702"></a><a name="index-TEXPSHEADERS-703"></a><a name="index-DVIPSHEADERS-704"></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 &lsquo;<samp><span class="samp">.pfa</span></samp>&rsquo;, &lsquo;<samp><span class="samp">.pfb</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">type42 fonts</span></samp>&rsquo;<dd><a name="index-T42FONTS-705"></a>(Type 42 PostScript outline fonts) <code>T42FONTS</code>.

     <br><dt>&lsquo;<samp><span class="samp">vf</span></samp>&rsquo;<dd><a name="index-g_t_002evf-706"></a><a name="index-VFFONTS-707"></a><a name="index-TEXFONTS-708"></a>(virtual fonts, see <a href="dvips.html#Virtual-fonts">Virtual fonts</a>)
<code>VFFONTS</code>, <code>TEXFONTS</code>;
suffix &lsquo;<samp><span class="samp">.vf</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">web</span></samp>&rsquo;<dd><a name="index-g_t_002eweb-709"></a><a name="index-WEBINPUTS-710"></a>(WEB input files)
<code>WEBINPUTS</code>;
suffix &lsquo;<samp><span class="samp">.web</span></samp>&rsquo;;
additional suffix &lsquo;<samp><span class="samp">.ch</span></samp>&rsquo;.

     <br><dt>&lsquo;<samp><span class="samp">web2c files</span></samp>&rsquo;<dd><a name="index-WEB2C-711"></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 &lsquo;<samp><span class="samp">INPUTS</span></samp>&rsquo;.  Assuming the program is called &lsquo;<samp><span class="samp">foo</span></samp>&rsquo;,
this gives us the following table.

     <dl>
<dt>&lsquo;<samp><span class="samp">other text files</span></samp>&rsquo;<dd><a name="index-FOOINPUTS-712"></a>(text files used by &lsquo;<samp><span class="samp">foo</span></samp>&rsquo;)
<code>FOOINPUTS</code>.

     <br><dt>&lsquo;<samp><span class="samp">other binary files</span></samp>&rsquo;<dd><a name="index-FOOINPUTS-713"></a>(binary files used by &lsquo;<samp><span class="samp">foo</span></samp>&rsquo;)
<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 &lsquo;<samp><span class="samp">:</span></samp>&rsquo;).  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-714"></a><a name="index-DVIPSFONTS-715"></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">
<a name="File-lookup"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Glyph-lookup">Glyph lookup</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Supported-file-formats">Supported file formats</a>,
Up:&nbsp;<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-716"></a><a name="index-searching-for-files-717"></a><a name="index-g_t_0040TeX_007b_007d-file-lookup-718"></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.  Example: given &lsquo;<samp><span class="samp">foo.bar</span></samp>&rsquo;, look for
&lsquo;<samp><span class="samp">foo.bar.tex</span></samp>&rsquo;.

     <li>Search for <var>name</var>, and if necessary for alternative names found in
the fontmaps.  Example: given &lsquo;<samp><span class="samp">foo.bar</span></samp>&rsquo;, we also look for
&lsquo;<samp><span class="samp">foo.bar</span></samp>&rsquo;.

     <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-extensions_002c-filename-719"></a><a name="index-suffixes_002c-filename-720"></a><a name="index-try_005fstd_005fextension_005ffirst-721"></a>The order in which we search for &ldquo;suffixed&rdquo; name (item&nbsp;1) or
the &ldquo;as-is&rdquo; name (item&nbsp;2) is controlled by the
<samp><span class="file">try_std_extension_first</span></samp> configuration value.  The default set
in <samp><span class="file">texmf.cnf</span></samp> is true, since common suffixes are already
recognized: &lsquo;<samp><span class="samp">babel.sty</span></samp>&rsquo; will only look for &lsquo;<samp><span class="samp">babel.sty</span></samp>&rsquo;, not
&lsquo;<samp><span class="samp">babel.sty.tex</span></samp>&rsquo;, regardless of this setting.

   <p>When the suffix is unknown (e.g., &lsquo;<samp><span class="samp">foo.bar</span></samp>&rsquo;), both names are
always tried; the difference is the order in which they are tried.

   <p><samp><span class="file">try_std_extension_first</span></samp> only affects names being looked up
which *already* have an extension.  A name without an extension (e.g.,
&lsquo;<samp><span class="samp">tex story</span></samp>&rsquo;) will always have an extension added first.

   <p><a name="index-tex_002dfile_002ec-722"></a><a name="index-kpathsea_005ffind_005ffile-723"></a>This algorithm is implemented in the function
<code>kpathsea_find_file</code> in the source file
<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">
<a name="Glyph-lookup"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Suppressing-warnings">Suppressing warnings</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#File-lookup">File lookup</a>,
Up:&nbsp;<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-724"></a><a name="index-searching-for-glyphs-725"></a><a name="index-g_t_0040TeX_007b_007d-glyph-lookup-726"></a>
This section describes how Kpathsea searches for a bitmap font in GF or
PK format (or either) given a font name (e.g., &lsquo;<samp><span class="samp">cmr10</span></samp>&rsquo;) 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 &lsquo;<samp><span class="samp">mktexpk</span></samp>&rsquo;) 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 &lsquo;<samp><span class="samp">cmr10</span></samp>&rsquo;).
        </ol>

   <p><a name="index-tex_002dglyph_002ec-727"></a><a name="index-kpathsea_005ffind_005fglyph-728"></a>This is implemented in <code>kpathsea_find_glyph</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">
<a name="Basic-glyph-lookup"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Fontmap">Fontmap</a>,
Up:&nbsp;<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-729"></a><a name="index-common-features-in-glyph-lookup-730"></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 &lsquo;<samp><var>name</var><span class="samp">.</span><var>dpi</var><var>format</var></samp>&rsquo;; for example,
&lsquo;<samp><span class="samp">cmr10.600pk</span></samp>&rsquo;.  Kpathsea looks for a PK file first, then a GF file.

   <p>If that fails, Kpathsea looks for
&lsquo;<samp><span class="samp">dpi</span><var>dpi</var><span class="samp">/</span><var>name</var><span class="samp">.</span><var>format</var></samp>&rsquo;; for example,
&lsquo;<samp><span class="samp">dpi600/cmr10.pk</span></samp>&rsquo;. 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-731"></a><a name="index-glyph-lookup-bitmap-tolerance-732"></a><a name="index-KPSE_005fBITMAP_005fTOLERANCE-733"></a>If that fails, Kpathsea looks for a font with a close-enough <var>dpi</var>. 
&ldquo;Close enough&rdquo; 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">
<a name="Fontmap"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Fallback-font">Fallback font</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Basic-glyph-lookup">Basic glyph lookup</a>,
Up:&nbsp;<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-734"></a><a name="index-font-alias-files-735"></a><a name="index-aliases-for-fonts-736"></a>
<a name="index-texfonts_002emap-737"></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-738"></a>An alias name is limited in length only by available memory, not by your
filesystem.  Therefore, if you want to ask for &lsquo;<samp><span class="samp">Times-Roman</span></samp>&rsquo;
instead of <samp><span class="file">ptmr</span></samp>, you can (you get &lsquo;<samp><span class="samp">ptmr8r</span></samp>&rsquo;).

     <li><a name="index-circle-fonts-739"></a><a name="index-lcircle10-740"></a>A few fonts have historically had multiple names: specifically,
LaTeX's &ldquo;circle font&rdquo; 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-741"></a>
<ul><li>Comments start with &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and continue to the end of the line. 
<a name="index-whitespace_002c-in-fontmap-files-742"></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-743"></a><li>If the first word is &lsquo;<samp><span class="samp">include</span></samp>&rsquo;, 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 &lsquo;<samp><span class="samp">foo.tfm</span></samp>&rsquo; matches only when
<samp><span class="file">foo.tfm</span></samp> is being searched for; but an alias &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; 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">
<a name="Fallback-font"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Fontmap">Fontmap</a>,
Up:&nbsp;<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-744"></a><a name="index-fallback-resolutions-745"></a><a name="index-font-of-last-resort-746"></a><a name="index-resolutions_002c-last_002dresort-747"></a><a name="index-last_002dresort-font-748"></a>
<a name="index-DVIPSSIZES-749"></a><a name="index-XDVISIZES-750"></a><a name="index-DVILJSIZES-751"></a><a name="index-TEXSIZES-752"></a><a name="index-default_005ftexsizes-753"></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-754"></a><a name="index-kpathsea_005finit_005fprog-755"></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  calling <code>kpathsea_init_prog</code>
(see <a href="#Calling-sequence">Calling sequence</a>); the default is no fallback font.

<div class="node">
<a name="Suppressing-warnings"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Glyph-lookup">Glyph lookup</a>,
Up:&nbsp;<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-756"></a><a name="index-suppressing-warnings-757"></a>
<a name="index-TEX_005fHUSH-758"></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>&lsquo;<samp><span class="samp">all</span></samp>&rsquo;<a name="index-all-759"></a><dd>Suppress everything possible.

     <br><dt>&lsquo;<samp><span class="samp">checksum</span></samp>&rsquo;<a name="index-checksum-760"></a><dd><a name="index-mismatched-checksum-warnings-761"></a>Suppress mismatched font checksum warnings.

     <br><dt>&lsquo;<samp><span class="samp">lostchar</span></samp>&rsquo;<a name="index-lostchar-762"></a><dd><a name="index-missing-character-warnings-763"></a>Suppress warnings when a character is missing from a font that a DVI or
VF file tries to typeset.

     <br><dt>&lsquo;<samp><span class="samp">none</span></samp>&rsquo;<a name="index-none-764"></a><dd>Don't suppress any warnings.

     <br><dt>&lsquo;<samp><span class="samp">readable</span></samp>&rsquo;<a name="index-readable-765"></a><dd><a name="index-unreadable-file-warnings-766"></a>Suppress warnings about attempts to access a file whose permissions
render it unreadable.

     <br><dt>&lsquo;<samp><span class="samp">special</span></samp>&rsquo;<a name="index-special-767"></a><dd><a name="index-unknown-special-warnings-768"></a><a name="index-g_t_005cspecial_0040r_007b_002c-suppressing-warnings-about_007d-769"></a>Suppresses warnings about an unimplemented or unparsable
&lsquo;<samp><span class="samp">\special</span></samp>&rsquo; 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">
<a name="Programming"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Index">Index</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#TeX-support">TeX support</a>,
Up:&nbsp;<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">
<a name="Programming-overview"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Calling-sequence">Calling sequence</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Programming">Programming</a>

</div>

<h3 class="section">5.1 Programming overview</h3>

<p><a name="index-programming-overview-770"></a><a name="index-overview-of-programming-with-Kpathsea-771"></a>
Aside from this manual, your best source of information is the source
to the programs that 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-re_002dentrant-API-772"></a><a name="index-API_002c-re_002dentrant-773"></a>When looking at these program sources, you should know that previous
versions of the library had a different programming interface, to
support re-entrancy.  In that interface the library function names
were prefixed with <code>kpse_</code> instead of <code>kpathsea_</code>, and they
did not need an instance variable as first argument.  This change was
made in 2009.  Some of the programs mentioned above may still be using
the previous interface.

   <p><a name="index-pathsearch_002eh-774"></a><a name="index-tex_002dfile_002eh-775"></a><a name="index-tex_002dglyph_002eh-776"></a><a name="index-kpathsea_002eh-777"></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
&lt;kpathsea/kpathsea.h&gt;</code>, which includes every Kpathsea header.

   <p><a name="index-config_002eh-778"></a><a name="index-c_002dauto_002eh-779"></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-780"></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">
<a name="Calling-sequence"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Program_002dspecific-files">Program-specific files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programming-overview">Programming overview</a>,
Up:&nbsp;<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-781"></a><a name="index-calling-sequence-782"></a>
The typical way to use Kpathsea in your program goes something like this:

     <ol type=1 start=1>

     <li><a name="index-kpathsea_005fnew-783"></a>Call <code>kpathsea_new</code> to create a new library instance. This variable
must be passed as the first argument to all the following library functions. 
The rest of this manual will be using <code>kpse</code> as a placeholder for
the name of this variable.

     <li><a name="index-kpathsea_005fset_005fprogram_005fname-784"></a><a name="index-argv_005b0_005d-785"></a>Call <code>kpathsea_set_program_name</code> with <code>argv[0]</code> as the second
argument; the third argument is a string or <code>NULL</code>.  The third
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 third argument is <code>NULL</code>, the value of the second argument
is used.  This function must be called before any other use of the
Kpathsea library.

     <p><a name="index-kpse_002d_003einvocation_005fname-786"></a><a name="index-kpse_002d_003einvocation_005fshort_005fname-787"></a><a name="index-kpse_002d_003eprogram_005fname-788"></a><a name="index-error-message-macros-789"></a><code>kpathsea_set_program_name</code> always sets the variables
<code>kpse-&gt;invocation_name</code> and <code>kpse-&gt;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 variable
<code>kpse-&gt;program_name</code> to the program name it uses.

     <p><a name="index-KPATHSEA_005fDEBUG-790"></a>It also initializes debugging options based on the environment
variable <code>KPATHSEA_DEBUG</code> (if that is set).

     <p><a name="index-SELFAUTOLOC-791"></a><a name="index-SELFAUTODIR-792"></a><a name="index-SELFAUTOPARENT-793"></a><a name="index-symlinks_002c-resolving-794"></a><a name="index-expanding-symlinks-795"></a>Finally, it sets the environment 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.  You
can use &lsquo;<samp><span class="samp">kpsewhich --expand-var=\$SELFAUTOLOC</span></samp>&rsquo;, etc., to see the
values.

     <li><a name="index-kpse_002d_003edebug-_0040r_007bvariable_007d-796"></a><a name="index-debugging-options_002c-in-Kpathsea_002dusing-program-797"></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>kpse-&gt;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_002d_003eformat_005finfo_007d_007d-798"></a><a name="index-kpse_002d_003eformat_005finfo-799"></a><a name="index-resident_002ec-800"></a><a name="index-config-files_002c-for-Kpathsea_002dusing-programs-801"></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-&gt;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-kpathsea_005finit_005fprog-802"></a><a name="index-proginit_002eh-803"></a>Call <code>kpathsea_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-kpathsea_005ffind_005ffile-804"></a>The routine to actually find a file of type <var>format</var> is
<samp><span class="file">kpathsea_find_file</span></samp>.  You can call
<code>kpathsea_find_file</code> after doing only the first and second of the
initialization steps above&mdash;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 routine
is <code>kpathsea_find_glyph</code>, defined in
<samp><span class="file">tex-glyph.h</span></samp>. This returns 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-kpathsea_005fopen_005ffile-805"></a>To actually open a file, not just return a filename, call
<code>kpathsea_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 &lsquo;<samp><span class="samp">!!</span></samp>&rsquo;, etc.).  In other
words, if you are looking up a VF or some other file that need not
exist, don't use this.

     <li><a name="index-kpathsea_005fout_005fname_005fok-806"></a>TeX can write output files, via the <code>\openout</code> primitive; this opens
a security hole vulnerable to Trojan horse attack: an unwitting user could
run a TeX program that overwrites, say, <samp><span class="file">~/.rhosts</span></samp>.  Analogous
security holes exist for many other programs.  To alleviate this, there is a
configuration variable <code>openout_any</code>, which selects one of three levels
of security.  When it is set to &lsquo;<samp><span class="samp">a</span></samp>&rsquo; (for &ldquo;any&rdquo;), no restrictions are
imposed.  When it is set to &lsquo;<samp><span class="samp">r</span></samp>&rsquo; (for &ldquo;restricted&rdquo;), filenames
beginning with &lsquo;<samp><span class="samp">.</span></samp>&rsquo; are disallowed (except <samp><span class="file">.tex</span></samp> because LaTeX
needs it).  When it is set to &lsquo;<samp><span class="samp">p</span></samp>&rsquo; (for &ldquo;paranoid&rdquo;) additional
restrictions are imposed: an absolute filename must refer to a file in (a
subdirectory) of <code>TEXMFOUTPUT</code>, and any attempt to go up a directory
level is forbidden (that is, paths may not contain a &lsquo;<samp><span class="samp">..</span></samp>&rsquo; component). 
The paranoid setting is the default.  (For backwards compatibility, &lsquo;<samp><span class="samp">y</span></samp>&rsquo;
and &lsquo;<samp><span class="samp">1</span></samp>&rsquo; are synonyms of &lsquo;<samp><span class="samp">a</span></samp>&rsquo;, while &lsquo;<samp><span class="samp">n</span></samp>&rsquo; and &lsquo;<samp><span class="samp">0</span></samp>&rsquo; are
synonyms for &lsquo;<samp><span class="samp">r</span></samp>&rsquo;.) The function <code>kpathsea_out_name_ok</code>, with a
filename as second argument, returns <code>true</code> if that filename is
acceptable to be opend for output or <code>false</code> otherwise.

     <li><a name="index-kpathsea_005fin_005fname_005fok-807"></a>Similarly, the function <code>kpathsea_in_name_ok</code>, with a filename as
second argument, returns <code>true</code> if that filename is acceptable to be
opend for input or <code>false</code> otherwise, depending on the value of the
configuration variable <code>openin_any</code> (with &lsquo;<samp><span class="samp">a</span></samp>&rsquo; as default).

     <li><a name="index-kpathsea_005ffinish-808"></a>To close the kpathsea library instance you are using, call
<code>kpathsea_finish</code>.  This function closes any open log files and
frees the memory used by the instance.

        </ol>

   <p><a name="index-hash-table-routines-809"></a><a name="index-memory-allocation-routines-810"></a><a name="index-string-routines-811"></a><a name="index-reading-arbitrary_002dlength-lines-812"></a><a name="index-input-lines_002c-reading-813"></a><a name="index-lines_002c-reading-arbitrary_002dlength-814"></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-815"></a><a name="index-autoconf_0040r_007b_002c-recommended_007d-816"></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 and
probably Automake for configuring and building your software if you use
Kpathsea; I strongly recommend using Autoconf and Automake regardless. 
They are available from <a href="ftp://ftp.gnu.og/pub/gnu/">ftp://ftp.gnu.og/pub/gnu/</a>.

<div class="node">
<a name="Program-specific-files"></a>
<a name="Program_002dspecific-files"></a>
<p><hr>
Next:&nbsp;<a rel="next" accesskey="n" href="#Programming-with-config-files">Programming with config files</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Calling-sequence">Calling sequence</a>,
Up:&nbsp;<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 &lsquo;<samp><span class="samp">texmf/ttf2pk</span></samp>&rsquo;.

   <p>Two formats, &lsquo;<samp><span class="samp">kpse_program_text_format</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">kpse_program_binary_format</span></samp>&rsquo;, 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
&lsquo;<samp><span class="samp">texmf.cnf</span></samp>&rsquo;.  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>kpathsea_open_file</code> will open the files it finds in text or binary
mode.

<div class="node">
<a name="Programming-with-config-files"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Program_002dspecific-files">Program-specific files</a>,
Up:&nbsp;<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-817"></a><a name="index-config-files_002c-programming-with-818"></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-kpathsae_005fvar_005fvalue-819"></a><a name="index-variable_002eh-820"></a><a name="index-shell_005fescape_0040r_007b_002c-example-for-code_007d-821"></a>To retrieve a value <var>var</var> from config files, the best way is to call
<code>kpathsea_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 &lsquo;<samp><span class="samp">NULL</span></samp>&rsquo;.  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>kpathsea_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-kpathsea_005fcnf_005fget-822"></a><a name="index-cnf_002eh-823"></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>kpathsea_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">
<a name="Index"></a>
<p><hr>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programming">Programming</a>,
Up:&nbsp;<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-537"><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-483"><code>$ </code><span class="roman">expansion</span></a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-g_t_002d_002dall-547"><code>--all</code></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dcolor_003dtty-524"><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-578"><code>--debug=</code><var>num</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002ddisable_002dstatic-110"><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-549"><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-106"><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-111"><code>--enable-maintainer-mode</code></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-g_t_002d_002denable_002dshared-139"><code>--enable-shared</code></a>: <a href="#Shared-library">Shared library</a></li>
<li><a href="#index-g_t_002d_002denable_002dshared-109"><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-552"><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-580"><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-582"><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-581"><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-554"><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-585"><code>--help</code></a>: <a href="#Standard-options">Standard options</a></li>
<li><a href="#index-g_t_002d_002dinteractive-555"><code>--interactive</code></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dmktex_003d_0040var_007bfiletype_007d-557"><code>--mktex=</code><var>filetype</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dmode_003d_0040var_007bstring_007d-559"><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-560"><code>--must-exist</code></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dno_002dmktex_003d_0040var_007bfiletype_007d-558"><code>--no-mktex=</code><var>filetype</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dpath_003d_0040var_007bstring_007d-561"><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-562"><code>--progname=</code><var>name</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dsafe_002din_002dname_003d_0040var_007bname_007d-563"><code>--safe-in-name=</code><var>name</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dsafe_002dout_002dname_003d_0040var_007bname_007d-564"><code>--safe-out-name=</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-583"><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-129"><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_002dsubdir_003d_0040var_007bstring_007d-565"><code>--subdir=</code><var>string</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002d_002dvar_002dvalue_003d_0040var_007bvariable_007d-579"><code>--var-value=</code><var>variable</var></a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-g_t_002d_002dversion-586"><code>--version</code></a>: <a href="#Standard-options">Standard options</a></li>
<li><a href="#index-g_t_002d_002dwith-_0040r_007boptions_007d-105"><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-200"><code>--with-mktextex-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktexfmt_002ddefault-194"><code>--without-mktexfmt-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_002dmktexocp_002ddefault-196"><code>--without-mktexocp-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktexofm_002ddefault-197"><code>--without-mktexofm-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktexpk_002ddefault-198"><code>--without-mktexpk-default</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t_002d_002dwithout_002dmktextfm_002ddefault-199"><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-321"><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-526"><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-413"><code>-Bdynamic</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002dBstatic-412"><code>-Bstatic</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002dD-_0040var_007bnum_007d-550"><code>-D </code><var>num</var></a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-g_t_002ddynamic-411"><code>-dynamic</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002dg_0040r_007b_002c-compiling-without_007d-135"><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-532"><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_002dO_0040r_007b_002c-compiling-with_007d-134"><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-410"><code>-static</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-g_t_002e-_0040r_007bdirectories_002c-ignored_007d-529"><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-528"><code>. </code><span class="roman">files</span></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002e2602gf-367"><code>.2602gf</code></a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-g_t_002eafm-593"><code>.afm</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ebase-595"><code>.base</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ebib-598"><code>.bib</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ebst-601"><code>.bst</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ecid-617"><code>.cid</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ecmap-603"><code>.cmap</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ecnf-605"><code>.cnf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eenc-612"><code>.enc</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eeps-625"><code>.eps</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eepsi-626"><code>.epsi</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002efea-619"><code>.fea</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002efmt-614"><code>.fmt</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eist-629"><code>.ist</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002elig-632"><code>.lig</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emap-636"><code>.map</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emem-638"><code>.mem</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emf-642"><code>.mf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emft-646"><code>.mft</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emlbib-649"><code>.mlbib</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emlbst-653"><code>.mlbst</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002emp-656"><code>.mp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eocp-660"><code>.ocp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eofm-662"><code>.ofm</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eopl-665"><code>.opl</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eotp-666"><code>.otp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eovf-668"><code>.ovf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eovp-670"><code>.ovp</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epfa-699"><code>.pfa</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epfb-700"><code>.pfb</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epk-673"><code>.pk</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epool-644"><code>.pool</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002epro-678"><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-258"><code>.rhosts</code><span class="roman">, writable by TeX</span></a>: <a href="#Security">Security</a></li>
<li><a href="#index-g_t_002esfd-681"><code>.sfd</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002etex-683"><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-530"><code>.tex </code><span class="roman">file, included in </span><samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-g_t_002etfm-692"><code>.tfm</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ettc-697"><code>.ttc</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ettf-696"><code>.ttf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002evf-706"><code>.vf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002ew-607"><code>.w</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_002eweb-608"><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-425"><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-499"><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-506"><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-173"><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-355"><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-525"><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-229"><code>/var/tmp/texfonts</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-g_t2602gf-368"><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-211">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-424"><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-474"><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-87">@<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-466"><code>\</code><span class="roman">, line continuation in </span><samp><span class="file">texmf.cnf</span></samp></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-g_t_005copenin-435"><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-769"><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-437">absolute filenames</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-ac_005finclude_0040r_007b_002c-Autoconf-extension_007d-86"><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-443">access warnings</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-AFMFONTS-594"><code>AFMFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-AFS-171">AFS</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-AIX-4_002e1-_0040code_007bconfigure_007d-error-390">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-96">AIX shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-aliases-for-fonts-736">aliases for fonts</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-aliases_002c-for-filenames-540">aliases, for filenames</a>: <a href="#Filename-aliases">Filename aliases</a></li>
<li><a href="#index-all-759"><code>all</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-all-matches_002c-finding-548">all matches, finding</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-alphabetical-order_002c-not-509">alphabetical order, not</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-Amiga-support-42">Amiga support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-Andrew-File-System_002c-installing-with-172">Andrew File System, installing with</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-announcement-mailing-list-305">announcement mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-ANSI-C-381">ANSI C</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-API_002c-re_002dentrant-773">API, re-entrant</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-append_002donly-directories-and-_0040code_007bmktexpk_007d-262">append-only directories and <code>mktexpk</code></a>: <a href="#Security">Security</a></li>
<li><a href="#index-appendonlydir-207"><code>appendonlydir</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-architecture_002d_0028in_0029dependent-files_002c-installing-only-167">architecture-(in)dependent files, installing only</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-architectures_002c-compiling-multiple-127">architectures, compiling multiple</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-arguments-to-_0040file_007bmktex_007d-253">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-785"><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-97"><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-816"><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-133">automounter, and configuration</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-automounter_002c-and-_0040file_007bls_002dR_007d-533">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-577">auxiliary tasks</a>: <a href="#Auxiliary-tasks">Auxiliary tasks</a></li>
<li><a href="#index-Babel-164">Babel</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Babel-61">Babel</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-Bach_002c-Johann-Sebastian-481">Bach, Johann Sebastian</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-backslash_002dnewline-463">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-92"><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-729">basic glyph lookup</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-Berry_002c-Karl-15">Berry, Karl</a>: <a href="#History">History</a></li>
<li><a href="#index-BIBINPUTS-599"><code>BIBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-blank-lines_002c-in-_0040file_007btexmf_002ecnf_007d-462">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-502">brace expansion</a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-BSD-universe-159">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-94"><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-602"><code>BSTINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-bug-address-286">bug address</a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-bug-checklist-288">bug checklist</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-bug-mailing-list-304">bug mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-bugs_002c-reporting-284">bugs, reporting</a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-c_002d_002a_002eh-815"><code>c-*.h</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-c_002dauto_002eh-779"><code>c-auto.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-c_002dauto_002ein-84"><code>c-auto.in</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-cache-of-fonts_002c-local-260">cache of fonts, local</a>: <a href="#Security">Security</a></li>
<li><a href="#index-calling-sequence-782">calling sequence</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-CC-112"><code>CC</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-cc-_0040r_007bwarnings_007d-417"><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-114"><code>cc</code><span class="roman">, compiling with</span></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-CFLAGS-115"><code>CFLAGS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-ChangeLog-_0040r_007bentry_007d-296"><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-287">checklist for bug reports</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-checksum-760"><code>checksum</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-circle-fonts-739">circle fonts</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-clean-_0040r_007bMake-target_007d-178"><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_002d_003eformat_005finfo_007d_007d-798"><code>client_path </code><span class="roman">in </span><code>kpse-&gt;format_info</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-CMAPFONTS-604"><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-754"><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-434"><code>cmr10.vf</code></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-cnf_002ec-471"><code>cnf.c</code></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-cnf_002eh-823"><code>cnf.h</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-code-sharing-140">code sharing</a>: <a href="#Shared-library">Shared library</a></li>
<li><a href="#index-color-printers_002c-configuring-35">color printers, configuring</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-comments_002c-in-fontmap-files-741">comments, in fontmap files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-comments_002c-in-_0040file_007btexmf_002ecnf_007d-461">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-730">common features in glyph lookup</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-common-problems-350">common problems</a>: <a href="#Common-problems">Common problems</a></li>
<li><a href="#index-comp_002esys_002esun_002eadmin-_0040r_007bFAQ_007d-404"><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-313"><code>comp.text.tex</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-compilation-28">compilation</a>: <a href="#Installation">Installation</a></li>
<li><a href="#index-compilation-value_002c-source-for-path-453">compilation value, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-compiler-bugs-376">compiler bugs</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-compiler-bugs_002c-finding-380">compiler bugs, finding</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-compiler-options_002c-additional-149">compiler options, additional</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-compiler-options_002c-specifying-116">compiler options, specifying</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-compiler_002c-changing-156">compiler, changing</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-compiling-on-HP_002dUX-383">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-454">config files</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-config-files_002c-for-Kpathsea_002dusing-programs-801">config files, for Kpathsea-using programs</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-config-files_002c-programming-with-818">config files, programming with</a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-config_002eh-778"><code>config.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-config_002elog-291"><code>config.log</code></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-config_002eps-566"><code>config.ps</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-config_002eps_0040r_007b_002c-search-path-for_007d-611"><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-293"><code>config.status</code></a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-configuration-27">configuration</a>: <a href="#Installation">Installation</a></li>
<li><a href="#index-configuration-bugs-292">configuration bugs</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-configuration-compiler-options-118">configuration compiler options</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-configuration-file_002c-source-for-path-450">configuration file, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-configuration-files-as-shell-scripts_002e-470">configuration files as shell scripts.</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-configuration-of-_0040file_007bmktex_007d-scripts-190">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-107">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-386"><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-104"><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-193"><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-83"><code>configure</code><span class="roman">, running</span></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-context-diff-294">context diff</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-continuation-character-464">continuation character</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-core-dumps_002c-reporting-300">core dumps, reporting</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-CPPFLAGS-117"><code>CPPFLAGS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-crashes_002c-reporting-299">crashes, reporting</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-custom-installation-39">custom installation</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-CWEBINPUTS-609"><code>CWEBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-database-search-426">database search</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-database_002c-for-filenames-519">database, for filenames</a>: <a href="#Filename-database">Filename database</a></li>
<li><a href="#index-database_002c-format-of-542">database, format of</a>: <a href="#Database-format">Database format</a></li>
<li><a href="#index-debug_002eh-318"><code>debug.h</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-debugger-298">debugger</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-debugging-314">debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-debugging-options_002c-in-Kpathsea_002dusing-program-797">debugging options, in Kpathsea-using program</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-debugging-output-322">debugging output</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-debugging-with-_0040samp_007b_002dg_007d_002c-disabling-137">debugging with &lsquo;<samp><span class="samp">-g</span></samp>&rsquo;, disabling</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-DEC-shells-and-_0040code_007bconfigure_007d-101">DEC shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-default-expansion-479">default expansion</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-default-path-features-66">default path features</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-default-paths_002c-changing-74">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-78">default paths, how they're made</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-default_005ftexsizes-753"><code>default_texsizes</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-DEFS-119"><code>DEFS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-depot-132"><code>depot</code></a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-device_002c-wrong-366">device, wrong</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-directories_002c-changing-default-installation-77">directories, changing default installation</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-directories_002c-making-append_002donly-208">directories, making append-only</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-directory-permissions-267">directory permissions</a>: <a href="#Security">Security</a></li>
<li><a href="#index-directory-structure_002c-for-_0040TeX_007b_007d-files-271">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-192">disabling <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-disk-search-430">disk search</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-disk-searching_002c-avoiding-538">disk searching, avoiding</a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-disk-space_002c-needed-46">disk space, needed</a>: <a href="#Disk-space">Disk space</a></li>
<li><a href="#index-disk-usage_002c-reducing-345">disk usage, reducing</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-distclean-_0040r_007bMake-target_007d-176"><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-49">distributions, compiling simultaneously</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-distributions_002c-not-compiling-52">distributions, not compiling</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-dlclose-396"><code>dlclose</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-dlopen-394"><code>dlopen</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-dlsym-395"><code>dlsym</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-dlsym_002ec-399"><code>dlsym.c</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-doc-files-685"><code>doc files</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-DOS-compatible-names-212">DOS compatible names</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-DOS-support-43">DOS support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-dosnames-210"><code>dosnames</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-dot-files-527">dot files</a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-doubled-colons-475">doubled colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-dpi_0040var_007bnnn_007d-directories-213"><code>dpi</code><var>nnn</var><code> directories</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-DVI-drivers-55">DVI drivers</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-DVILJMAKEPK-248"><code>DVILJMAKEPK</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-DVILJSIZES-751"><code>DVILJSIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-dvipdfmx_002ecfg-567"><code>dvipdfmx.cfg</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-DVIPSFONTS-715"><code>DVIPSFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-DVIPSHEADERS-704"><code>DVIPSHEADERS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-DVIPSMAKEPK-246"><code>DVIPSMAKEPK</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-DVIPSSIZES-749"><code>DVIPSSIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-dynamic-creation-of-files-186">dynamic creation of files</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-dynamic-linking-problems-with-OpenWin-libraries-400">dynamic linking problems with OpenWin libraries</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-EC-fonts_002c-and-dynamic-source-creation-188">EC fonts, and dynamic source creation</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-elt_002ddirs_002ec-516"><code>elt-dirs.c</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-enabling-_0040file_007bmktex_007d-scripts-191">enabling <samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-ENCFONTS-613"><code>ENCFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-engine-name-553">engine name</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-environment-variable_002c-source-for-path-449">environment variable, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-environment-variables-for-_0040TeX_007b_007d-590">environment variables for TeX</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-environment-variables-in-paths-484">environment variables in paths</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-environment-variables_002c-old-356">environment variables, old</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-epoch_002c-seconds-since-347">epoch, seconds since</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-error-message-macros-789">error message macros</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-excessive-startup-time-359">excessive startup time</a>: <a href="#Slow-path-searching">Slow path searching</a></li>
<li><a href="#index-expand_002ec-504"><code>expand.c</code></a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-expanding-symlinks-795">expanding symlinks</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-expansion_002c-default-480">expansion, default</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-expansion_002c-path-element-436">expansion, path element</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-expansion_002c-search-path-473">expansion, search path</a>: <a href="#Path-expansion">Path expansion</a></li>
<li><a href="#index-expansion_002c-subdirectory-508">expansion, subdirectory</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-expansion_002c-tilde-494">expansion, tilde</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-expansion_002c-variable-486">expansion, variable</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-explicitly-relative-filenames-439">explicitly relative filenames</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-extensions_002c-filename-719">extensions, filename</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-externally_002dbuilt-filename-database-520">externally-built filename database</a>: <a href="#Filename-database">Filename database</a></li>
<li><a href="#index-extra-colons-478">extra colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-extraclean-_0040r_007bMake-target_007d-180"><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-250">failed <code>mktex...</code> script invocation</a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-fallback-font-744">fallback font</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-fallback-resolutions-745">fallback resolutions</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-fallback-resolutions_002c-overriding-144">fallback resolutions, overriding</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-FAQ_002c-_0040t_007bcomp_002esys_002esun_002eadmin_007d-405">FAQ, <tt>comp.sys.sun.admin</tt></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-FAQ_002c-Kpathsea-352">FAQ, Kpathsea</a>: <a href="#Common-problems">Common problems</a></li>
<li><a href="#index-Farwell_002c-Matthew-512">Farwell, Matthew</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-features_002c-of-default-paths-67">features, of default paths</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-file-formats_002c-supported-589">file formats, supported</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-file-lookup-716">file lookup</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-file-permissions-265">file permissions</a>: <a href="#Security">Security</a></li>
<li><a href="#index-file-types_002c-registering-new-780">file types, registering new</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-filename-aliases-539">filename aliases</a>: <a href="#Filename-aliases">Filename aliases</a></li>
<li><a href="#index-filename-database-518">filename database</a>: <a href="#Filename-database">Filename database</a></li>
<li><a href="#index-filename-database-generation-181">filename database generation</a>: <a href="#Filename-database-generation">Filename database generation</a></li>
<li><a href="#index-filenames_002c-absolute-or-explicitly-relative-440">filenames, absolute or explicitly relative</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-files_002c-unable-to-find-354">files, unable to find</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-filesystem-search-429">filesystem search</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-floating-directories-428">floating directories</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-fmtutil-239"><code>fmtutil</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-fmtutil_002ecnf-568"><code>fmtutil.cnf</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-fmtutils_002ecnf-201"><code>fmtutils.cnf</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-font-alias-files-735">font alias files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-font-generation-failures-363">font generation failures</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-font-of-last-resort-746">font of last resort</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-font-set_002c-infinite-185">font set, infinite</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-FONTCIDMAPS-618"><code>FONTCIDMAPS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-FONTFEATURES-620"><code>FONTFEATURES</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-fontmap-files-734">fontmap files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-fontmaps-214"><code>fontmaps</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-fontname-216">fontname</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-fontnames_002c-arbitrary-length-738">fontnames, arbitrary length</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-fonts_002c-being-created-36">fonts, being created</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-FOOINPUTS-712"><code>FOOINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-fopen_0040r_007b_002c-redefined_007d-329"><code>fopen</code><span class="roman">, redefined</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-format-of-external-database-541">format of external database</a>: <a href="#Database-format">Database format</a></li>
<li><a href="#index-FreeBSD-_0040code_007bconfigure_007d-error-388">FreeBSD <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-FreeBSD-shells-and-_0040code_007bconfigure_007d-99">FreeBSD shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-ftp_002ecs_002estanford_002eedu-280"><code>ftp.cs.stanford.edu</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-ftp_002etug_002eorg-279"><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-113"><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-302"><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-182">generation of filename database</a>: <a href="#Filename-database-generation">Filename database generation</a></li>
<li><a href="#index-get_005fapplicationShellWidgetClass-403"><code>get_applicationShellWidgetClass</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-get_005fwmShellWidgetClass-402"><code>get_wmShellWidgetClass</code></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-gf-621"><code>gf</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-GFFONTS-622"><code>GFFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-globally-writable-directories-261">globally writable directories</a>: <a href="#Security">Security</a></li>
<li><a href="#index-glyph-lookup-724">glyph lookup</a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-glyph-lookup-bitmap-tolerance-732">glyph lookup bitmap tolerance</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-GLYPHFONTS-623"><code>GLYPHFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-glyphlist_002etxt-569"><code>glyphlist.txt</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-GNU-C-compiler-bugs-378">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-263">group-writable directories</a>: <a href="#Security">Security</a></li>
<li><a href="#index-GSFTOPK_005fDEBUG-_0040r_007b_0028128_0029_007d-335"><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-340">hash table buckets, printing</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-hash-table-routines-809">hash table routines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-hash_005fsummary_005fonly-_0040r_007bvariable-for-debugging_007d-339"><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-311">help, mailing list for general TeX</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-history-of-Kpathsea-11">history of Kpathsea</a>: <a href="#History">History</a></li>
<li><a href="#index-home-directories-in-paths-492">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-495"><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-382">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-467">identifiers, characters valid in</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-illegal-pointer-combination-warnings-416">illegal pointer combination warnings</a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-include-_0040r_007bfontmap-directive_007d-743"><code>include </code><span class="roman">fontmap directive</span></a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-INDEXSTYLE-631"><code>INDEXSTYLE</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-info_002dtex_0040_0040shsu_002eedu-312"><code>info-tex@shsu.edu</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-input-lines_002c-reading-813">input lines, reading</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-install_002ddata-_0040r_007bMake-target_007d-170"><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-169"><code>install-exec </code><span class="roman">Make target</span></a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-installation-26">installation</a>: <a href="#Installation">Installation</a></li>
<li><a href="#index-installation-testing-255">installation testing</a>: <a href="#Installation-testing">Installation testing</a></li>
<li><a href="#index-installation_002c-architecture_002d_0028in_0029dependent-files-only-168">installation, architecture-(in)dependent files only</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-installation_002c-changing-default-directories-76">installation, changing default directories</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-installation_002c-customized-40">installation, customized</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-installation_002c-getting-executables-instead-of-32">installation, getting executables instead of</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-installation_002c-simple-30">installation, simple</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-installing-files-165">installing files</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-interactive-query-556">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-338">&lsquo;<samp><span class="samp">kdebug:</span></samp>&rsquo;</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kdefault_002ec-482"><code>kdefault.c</code></a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-Knuth_002c-Donald-E_002e-12">Knuth, Donald E.</a>: <a href="#History">History</a></li>
<li><a href="#index-Knuth_002c-Donald-E_002e_002c-archive-of-programs-by-282">Knuth, Donald E., archive of programs by</a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-Korn-shell_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-95">Korn shell<span class="roman">, losing with </span><code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-kpathsae_005fvar_005fvalue-819"><code>kpathsae_var_value</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-Kpathsea-config-file_002c-source-for-path-451">Kpathsea config file, source for path</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-Kpathsea-version-number-51">Kpathsea version number</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-kpathsea_002eh-777"><code>kpathsea.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-kpathsea_002fREADME_002eCONFIGURE-90"><code>kpathsea/README.CONFIGURE</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-kpathsea_005fcnf_005fget-822"><code>kpathsea_cnf_get</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-KPATHSEA_005fDEBUG-790"><code>KPATHSEA_DEBUG</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-KPATHSEA_005fDEBUG-319"><code>KPATHSEA_DEBUG</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kpathsea_005ffind_005ffile-804"><code>kpathsea_find_file</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005ffind_005ffile-723"><code>kpathsea_find_file</code></a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-kpathsea_005ffind_005fglyph-728"><code>kpathsea_find_glyph</code></a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-kpathsea_005ffinish-808"><code>kpathsea_finish</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005fin_005fname_005fok-807"><code>kpathsea_in_name_ok</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005finit_005fprog-802"><code>kpathsea_init_prog</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005finit_005fprog-755"><code>kpathsea_init_prog</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-kpathsea_005fnew-783"><code>kpathsea_new</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005fopen_005ffile-805"><code>kpathsea_open_file</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005fout_005fname_005fok-806"><code>kpathsea_out_name_ok</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpathsea_005fset_005fprogram_005fname-784"><code>kpathsea_set_program_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-KPATHSEA_005fWARNING-458"><code>KPATHSEA_WARNING</code></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-kpse_002d_003edebug-317"><code>kpse-&gt;debug</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kpse_002d_003edebug-_0040r_007bvariable_007d-796"><code>kpse-&gt;debug </code><span class="roman">variable</span></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_002d_003eformat_005finfo-799"><code>kpse-&gt;format_info</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_002d_003einvocation_005fname-786"><code>kpse-&gt;invocation_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_002d_003einvocation_005fshort_005fname-787"><code>kpse-&gt;invocation_short_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-kpse_002d_003eprogram_005fname-788"><code>kpse-&gt;program_name</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-KPSE_005fBITMAP_005fTOLERANCE-733"><code>KPSE_BITMAP_TOLERANCE</code></a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-KPSE_005fDEBUG_005fEXPAND-_0040r_007b_002816_0029_007d-332"><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-328"><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-327"><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-330"><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-333"><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-326"><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-334"><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-505"><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_005fformat_005finfo_005ftype-331"><code>kpse_format_info_type</code></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-kpse_005finit_005fprog_0040r_007b_002c-and-_0040code_007bMAKETEX_005fMODE_007d_007d-70"><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-kpsewhich-543"><code>kpsewhich</code></a>: <a href="#Invoking-kpsewhich">Invoking kpsewhich</a></li>
<li><a href="#index-Kpsewhich_002c-and-debugging-324">Kpsewhich, and debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-ksh_0040r_007b_002c-losing-with-_0040code_007bconfigure_007d_007d-93"><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-LaserJet-drive-57">LaserJet drive</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-last_002dresort-font-748">last-resort font</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-La_0040TeX_007b_007d-help-mailing-list-308">LaTeX help mailing list</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-lcircle10-740"><code>lcircle10</code></a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-LDFLAGS-121"><code>LDFLAGS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-leading-colons-476">leading colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-leaf-directories-wrongly-guessed-358">leaf directories wrongly guessed</a>: <a href="#Unable-to-find-files">Unable to find files</a></li>
<li><a href="#index-leaf-directory-trick-511">leaf directory trick</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-libdl_002ea-398"><code>libdl.a</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-libraries_002c-changing-157">libraries, changing</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-libraries_002c-specifying-additional-124">libraries, specifying additional</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-LIBS-123"><code>LIBS</code></a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-libucb_0040r_007b_002c-avoiding_007d-162"><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-633"><code>LIGFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-lines_002c-reading-arbitrary_002dlength-814">lines, reading arbitrary-length</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-Linux-File-System-Standard-231">Linux File System Standard</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Linux-shells-and-_0040code_007bconfigure_007d-100">Linux shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-lndir-_0040r_007bfor-building-symlink-trees_007d-130"><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-122">loader options</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-loader-options_002c-final-153">loader options, final</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-loader-options_002c-initial-151">loader options, initial</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-local-cache-of-fonts-259">local cache of fonts</a>: <a href="#Security">Security</a></li>
<li><a href="#index-log-file-341">log file</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-logging-successful-searches-342">logging successful searches</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-lost_002bfound-_0040r_007bdirectory_007d-445"><code>lost+found </code><span class="roman">directory</span></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-lostchar-762"><code>lostchar</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-ls_002dR-634"><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-174"><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-521"><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-523"><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-389">Mach10 <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-MacKenzie_002c-David-513">MacKenzie, David</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-MacKenzie_002c-David-21">MacKenzie, David</a>: <a href="#History">History</a></li>
<li><a href="#index-magic-characters-423">magic characters</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-mailing-lists-303">mailing lists</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-maintainer_002dclean-_0040r_007bMake-target_007d-179"><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-155">Make arguments, additional</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-make_0040r_007b_002c-running_007d-141"><code>make</code><span class="roman">, running</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Makefile_002ein-85"><code>Makefile.in</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-Makefiles_002c-empty-384">Makefiles, empty</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-MAKETEX_005fDEBUG-_0040r_007b_0028512_0029_007d-336"><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-337"><code>MAKETEX_FINE_DEBUG </code><span class="roman">(1024)</span></a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-MAKETEX_005fMODE-68"><code>MAKETEX_MODE</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-memory-allocation-routines-810">memory allocation routines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-metafont-driver-files-218">metafont driver files</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Metafont-failures-375">Metafont failures</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-Metafont-installation-373">Metafont installation</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-Metafont-making-too_002dlarge-fonts-369">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-365">Metafont using the wrong device</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-MFBASES-596"><code>MFBASES</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MFINPUTS-643"><code>MFINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MFPOOL-645"><code>MFPOOL</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MFTINPUTS-647"><code>MFTINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MISCFONTS-648"><code>MISCFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-mismatched-checksum-warnings-761">mismatched checksum warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-missfont_002elog-249"><code>missfont.log</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-MISSFONT_005fLOG-252"><code>MISSFONT_LOG</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-missing-character-warnings-763">missing character warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-mkocp-241"><code>mkocp</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mkofm-242"><code>mkofm</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-g_t_0040file_007bmktex_007d-script-configuration-189"><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-236"><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-183"><samp><span class="file">mktex</span></samp> scripts</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-mktex_002ecnf-570"><code>mktex.cnf</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-mktex_002ecnf-202"><code>mktex.cnf</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-mktex_002eopt-203"><code>mktex.opt</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-mktexdir-209"><code>mktexdir</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-mktexfmt-238"><code>mktexfmt</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mktexmf-240"><code>mktexmf</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mktexpk-243"><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-37"><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-364"><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-244"><code>mktextex</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-mktextfm-245"><code>mktextfm</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-MLBIBINPUTS-650"><code>MLBIBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MLBSTINPUTS-654"><code>MLBSTINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-mode-directory_002c-omitting-220">mode directory, omitting</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Morgan_002c-Tim-13">Morgan, Tim</a>: <a href="#History">History</a></li>
<li><a href="#index-mostlyclean-_0040r_007bMake-target_007d-177"><code>mostlyclean </code><span class="roman">Make target</span></a>: <a href="#Cleaning-up">Cleaning up</a></li>
<li><a href="#index-MPINPUTS-657"><code>MPINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MPMEMS-639"><code>MPMEMS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MPPOOL-659"><code>MPPOOL</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MPSUPPORT-641"><code>MPSUPPORT</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-MT_005fFEATURES-206"><code>MT_FEATURES</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-multiple-architectures_002c-compiling-on-126">multiple architectures, compiling on</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-multiple-architectures_002c-directories-for-131">multiple architectures, directories for</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-multiple-architectures_002c-installing-on-166">multiple architectures, installing on</a>: <a href="#Installing-files">Installing files</a></li>
<li><a href="#index-multiple-_0040TeX_007b_007d-hierarchies-503">multiple TeX hierarchies</a>: <a href="#Brace-expansion">Brace expansion</a></li>
<li><a href="#index-must-exist-432">must exist</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-names-for-_0040file_007bmktex_007d-scripts-237">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-387">NetBSD <code>configure</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-NetBSD-shells-and-_0040code_007bconfigure_007d-98">NetBSD shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-Neumann_002c-Gustaf-24">Neumann, Gustaf</a>: <a href="#History">History</a></li>
<li><a href="#index-newsgroup-for-_0040TeX_007b_007d-310">newsgroup for TeX</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-NeXT-_0040code_007bsed_007d-error-391">NeXT <code>sed</code> error</a>: <a href="#Empty-Makefiles">Empty Makefiles</a></li>
<li><a href="#index-NeXT_002c-lacking-X11-53">NeXT, lacking X11</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-NFS-and-_0040file_007bls_002dR_007d-534">NFS and <samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-nomfdrivers-217"><code>nomfdrivers</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-nomode-219"><code>nomode</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-non_002dEnglish-typesetting-62">non-English typesetting</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-non_002dUnix-operating-systems-41">non-Unix operating systems</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-none-764"><code>none</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-null-pointers_002c-dereferencing-301">null pointers, dereferencing</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-numeric-debugging-values-325">numeric debugging values</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-obtaining-_0040TeX_007b_007d-274">obtaining TeX</a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-OCPINPUTS-661"><code>OCPINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-OFMFONTS-663"><code>OFMFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-online-Metafont-display_002c-spurious-371">online Metafont display, spurious</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-OPENTYPEFONTS-664"><code>OPENTYPEFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-OpenWin-libraries_002c-dynamic-linking-problems-401">OpenWin libraries, dynamic linking problems</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-optimization-caveat-377">optimization caveat</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-optimization_002c-enabling-136">optimization, enabling</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-options-for-debugging-316">options for debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-options-to-_0040code_007bconfigure_007d-108">options to <code>configure</code></a>: <a href="#configure-options">configure options</a></li>
<li><a href="#index-OS_002f2-support-44">OS/2 support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-OTPINPUTS-667"><code>OTPINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-overview-of-path-searching-421">overview of path searching</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-overview-of-programming-with-Kpathsea-771">overview of programming with Kpathsea</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-OVFFONTS-669"><code>OVFFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-OVPFONTS-671"><code>OVPFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-patches_002c-Sun-OpenWin-408">patches, Sun OpenWin</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-path-expansion-472">path expansion</a>: <a href="#Path-expansion">Path expansion</a></li>
<li><a href="#index-path-searching-418">path searching</a>: <a href="#Path-searching">Path searching</a></li>
<li><a href="#index-path-searching-options-546">path searching options</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-path-searching_002c-overview-420">path searching, overview</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-path-searching_002c-standalone-544">path searching, standalone</a>: <a href="#Invoking-kpsewhich">Invoking kpsewhich</a></li>
<li><a href="#index-path-sources-447">path sources</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-paths_002c-changing-default-75">paths, changing default</a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-paths_002c-changing-default-64">paths, changing default</a>: <a href="#Changing-search-paths">Changing search paths</a></li>
<li><a href="#index-paths_002c-device-name-included-in-69">paths, device name included in</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-paths_002eh-82"><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-143"><code>paths.h</code><span class="roman">, creating</span></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-pathsearch_002eh-774"><code>pathsearch.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-pc-_0040r_007bPascal-compiler_007d-19"><code>pc </code><span class="roman">Pascal compiler</span></a>: <a href="#History">History</a></li>
<li><a href="#index-PCL-driver-56">PCL driver</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-PDF-generation-58">PDF generation</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-pdfglyphlist_002etxt-571"><code>pdfglyphlist.txt</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-pdftex_002ecfg-572"><code>pdftex.cfg</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-PDFTEXCONFIG-672"><code>PDFTEXCONFIG</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-pdftexconfig_002etex-573"><code>pdftexconfig.tex</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-permission-denied-441">permission denied</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-permissions_002c-directory-268">permissions, directory</a>: <a href="#Security">Security</a></li>
<li><a href="#index-permissions_002c-file-266">permissions, file</a>: <a href="#Security">Security</a></li>
<li><a href="#index-PKFONTS-674"><code>PKFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-plain_002ebase-372"><code>plain.base</code></a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-pointer-combination-warnings-415">pointer combination warnings</a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-PostScript-driver-59">PostScript driver</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-PostScript-fonts_002c-additional-34">PostScript fonts, additional</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-precompiled-executables_002c-instead-of-installation-31">precompiled executables, instead of installation</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-preprocessor-options-120">preprocessor options</a>: <a href="#configure-environment">configure environment</a></li>
<li><a href="#index-preprocessor-options_002c-additional-147">preprocessor options, additional</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-printer-configuration-files-33">printer configuration files</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-privacy_002c-semblance-of-349">privacy, semblance of</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-problems_002c-common-351">problems, common</a>: <a href="#Common-problems">Common problems</a></li>
<li><a href="#index-proginit_002ec-71"><code>proginit.c</code></a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-proginit_002eh-803"><code>proginit.h</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-program_002dvarying-paths-592">program-varying paths</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-programming-overview-770">programming overview</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-programming-with-config-files-817">programming with config files</a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-programming-with-Kpathsea-781">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-370">proof mode</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-PSHEADERS-680"><code>PSHEADERS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-pxp-_0040r_007bPascal-preprocessor_007d-18"><code>pxp </code><span class="roman">Pascal preprocessor</span></a>: <a href="#History">History</a></li>
<li><a href="#index-quoting-variable-values-488">quoting variable values</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-re_002dentrant-API-772">re-entrant API</a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-readable-765"><code>readable</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-reading-arbitrary_002dlength-lines-812">reading arbitrary-length lines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-README_002eCONFIGURE-89"><code>README.CONFIGURE</code></a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-recording-successful-searches-343">recording successful searches</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-relative-filenames-438">relative filenames</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-relative-filenames-in-_0040file_007bls_002dR_007d-175">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-283">reporting bugs</a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-resident_002ec-800"><code>resident.c</code></a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-resolution_002c-setting-551">resolution, setting</a>: <a href="#Path-searching-options">Path searching options</a></li>
<li><a href="#index-resolutions_002c-last_002dresort-747">resolutions, last-resort</a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-retrieving-_0040TeX_007b_007d-275">retrieving TeX</a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-right_002dhand-side-of-variable-assignments-468">right-hand side of variable assignments</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-Rokicki_002c-Tom-14">Rokicki, Tom</a>: <a href="#History">History</a></li>
<li><a href="#index-g_t_0040t_007broot_007d-user-497"><tt>root</tt> user</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-runtime-configuration-files-456">runtime configuration files</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-runtime-debugging-315">runtime debugging</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-Sauter-fonts_002c-and-dynamic-source-creation-187">Sauter fonts, and dynamic source creation</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-scripts-for-file-creation-184">scripts for file creation</a>: <a href="#mktex-scripts">mktex scripts</a></li>
<li><a href="#index-search-path_002c-defined-422">search path, defined</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-search-paths_002c-changing-default-63">search paths, changing default</a>: <a href="#Changing-search-paths">Changing search paths</a></li>
<li><a href="#index-searching-for-files-717">searching for files</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-searching-for-glyphs-725">searching for glyphs</a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-searching-overview-419">searching overview</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-searching-the-database-427">searching the database</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-searching-the-disk-431">searching the disk</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-security-considerations-256">security considerations</a>: <a href="#Security">Security</a></li>
<li><a href="#index-sed-_0040r_007berror-from-_0040code_007bconfigure_007d_007d-385"><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-792">SELFAUTODIR</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-SELFAUTOLOC-791">SELFAUTOLOC</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-SELFAUTOPARENT-793">SELFAUTOPARENT</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-sending-patches-295">sending patches</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-setgid-scripts-264">setgid scripts</a>: <a href="#Security">Security</a></li>
<li><a href="#index-SFDFONTS-682"><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-103"><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-shared-library_002c-making-138">shared library, making</a>: <a href="#Shared-library">Shared library</a></li>
<li><a href="#index-shell-scripts-as-configuration-files-469">shell scripts as configuration files</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-shell-variables-489">shell variables</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-shell_005fescape_0040r_007b_002c-example-for-code_007d-821"><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-91">shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-simple-installation-29">simple installation</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-site-overrides-for-_0040code_007bmktex_0040dots_007b_007d_007d-204">site overrides for <code>mktex...</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-size-of-distribution-archives-48">size of distribution archives</a>: <a href="#Disk-space">Disk space</a></li>
<li><a href="#index-skeleton-_0040TeX_007b_007d-directory-272">skeleton TeX directory</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-slow-startup-time-360">slow startup time</a>: <a href="#Slow-path-searching">Slow path searching</a></li>
<li><a href="#index-Solaris-BSD-compatibility_002c-not-161">Solaris BSD compatibility, not</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-source-files-687"><code>source files</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-sources-for-search-paths-448">sources for search paths</a>: <a href="#Path-sources">Path sources</a></li>
<li><a href="#index-special-767"><code>special</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-st_005fnlink-514"><code>st_nlink</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-ST_005fNLINK_005fTRICK-515"><code>ST_NLINK_TRICK</code></a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-stack-trace-297">stack trace</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-standalone-path-searching-545">standalone path searching</a>: <a href="#Invoking-kpsewhich">Invoking kpsewhich</a></li>
<li><a href="#index-standard-error-and-debugging-output-323">standard error and debugging output</a>: <a href="#Debugging">Debugging</a></li>
<li><a href="#index-standard-options-584">standard options</a>: <a href="#Standard-options">Standard options</a></li>
<li><a href="#index-startup-time_002c-excessive-361">startup time, excessive</a>: <a href="#Slow-path-searching">Slow path searching</a></li>
<li><a href="#index-static-linking-409">static linking</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-static-linking-and-_0040code_007bdlsym_007d-393">static linking and <code>dlsym</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-string-routines-811">string routines</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-strip-225"><code>strip</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-stripsupplier-221"><code>stripsupplier</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-striptypeface-223"><code>striptypeface</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-subdirectory-searching-507">subdirectory searching</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-suffixes_002c-filename-720">suffixes, filename</a>: <a href="#File-lookup">File lookup</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-17">Sun 2</a>: <a href="#History">History</a></li>
<li><a href="#index-Sun-OpenWin-patches-407">Sun OpenWin patches</a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-supplier-directory_002c-omitting-222">supplier directory, omitting</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-supported-file-formats-588">supported file formats</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-suppressing-warnings-757">suppressing warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-symbolic-link-trees_002c-for-multiple-architectures-128">symbolic link trees, for multiple architectures</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-symbolic-links-not-found-357">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-531">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-794">symlinks, resolving</a>: <a href="#Calling-sequence">Calling sequence</a></li>
<li><a href="#index-system-C-compiler-bugs-379">system C compiler bugs</a>: <a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></li>
<li><a href="#index-system-dependencies-88">system dependencies</a>: <a href="#Running-configure">Running configure</a></li>
<li><a href="#index-system-V-universe-160">system V universe</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-T1FONTS-701"><code>T1FONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-T1INPUTS-702"><code>T1INPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-T42FONTS-705"><code>T42FONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-tcfmgr_002emap-576"><code>tcfmgr.map</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-TDS-273">TDS</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-TDS-72">TDS</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-testing_002c-post_002dinstallation-254">testing, post-installation</a>: <a href="#Installation-testing">Installation testing</a></li>
<li><a href="#index-tests_002c-simple-38">tests, simple</a>: <a href="#Simple-installation">Simple installation</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-directory-structure-270">TeX directory structure</a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-directory-structure-73">TeX directory structure</a>: <a href="#Default-path-features">Default path features</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-environment-variables-591">TeX environment variables</a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-failures-374">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-718">TeX file lookup</a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-glyph-lookup-726">TeX glyph lookup</a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-help-mailing-list-307">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-125">TeX hierarchy, one</a>: <a href="#configure-scenarios">configure scenarios</a></li>
<li><a href="#index-g_t_0040TeX_007b_007d-support-587">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_002dfile_002ec-722"><code>tex-file.c</code></a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-tex_002dfile_002eh-775"><code>tex-file.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-tex_002dglyph_002ec-727"><code>tex-glyph.c</code></a>: <a href="#Glyph-lookup">Glyph lookup</a></li>
<li><a href="#index-tex_002dglyph_002eh-776"><code>tex-glyph.h</code></a>: <a href="#Programming-overview">Programming overview</a></li>
<li><a href="#index-tex_002dk_002drequest_0040_0040tug_002eorg-306"><code>tex-k-request@tug.org</code></a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-tex_002dk_0040_0040tug_002eorg-_0040r_007b_0028bug-address_0029_007d-285"><code>tex-k@tug.org </code><span class="roman">(bug address)</span></a>: <a href="#Reporting-bugs">Reporting bugs</a></li>
<li><a href="#index-tex_002eweb-281"><code>tex.web</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-TEX_005fHUSH-758"><code>TEX_HUSH</code></a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-TEX_005fHUSH-446"><code>TEX_HUSH</code></a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-TEXBIB-600"><code>TEXBIB</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXCONFIG-610"><code>TEXCONFIG</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXDOCS-686"><code>TEXDOCS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXFONTMAPS-637"><code>TEXFONTMAPS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXFONTS-624"><code>TEXFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-texfonts_002emap-737"><code>texfonts.map</code></a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-TEXFORMATS-615"><code>TEXFORMATS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXINDEXSTYLE-630"><code>TEXINDEXSTYLE</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXINPUTS-628"><code>TEXINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMF-269"><code>TEXMF</code></a>: <a href="#TeX-directory-structure">TeX directory structure</a></li>
<li><a href="#index-texmf_002ecnf-574"><code>texmf.cnf</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-g_t_0040file_007btexmf_002ecnf_007d-missing_002c-warning-about-460"><samp><span class="file">texmf.cnf</span></samp> missing, warning about</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-texmf_002ecnf_0040r_007b_002c-and-variable-expansion_007d-487"><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-142"><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-455"><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-81"><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-452"><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-80"><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-65"><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-79"><code>texmf.sed</code></a>: <a href="#Default-path-generation">Default path generation</a></li>
<li><a href="#index-TEXMFCNF-606"><code>TEXMFCNF</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFCNF-457"><code>TEXMFCNF</code></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-TEXMFDBS-635"><code>TEXMFDBS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFDBS-522"><code>TEXMFDBS</code></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-TEXMFINI-597"><code>TEXMFINI</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFLOG-346"><code>TEXMFLOG</code></a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-TEXMFOUTPUT-251"><code>TEXMFOUTPUT</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-TEXMFSCRIPTS-689"><code>TEXMFSCRIPTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXMFVAR-234"><code>TEXMFVAR</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-texmfvar-233"><code>texmfvar</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-TEXPICTS-627"><code>TEXPICTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXPKS-675"><code>TEXPKS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXPOOL-691"><code>TEXPOOL</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXPSHEADERS-679"><code>TEXPSHEADERS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TEXSIZES-752"><code>TEXSIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-TEXSOURCES-688"><code>TEXSOURCES</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-TFMFONTS-693"><code>TFMFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-tilde-expansion-493">tilde expansion</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-tilde_002ec-500"><code>tilde.c</code></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-time-_0040r_007bsystem-call_007d-348"><code>time </code><span class="roman">system call</span></a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-tolerance-for-glyph-lookup-731">tolerance for glyph lookup</a>: <a href="#Basic-glyph-lookup">Basic glyph lookup</a></li>
<li><a href="#index-total-disk-space-47">total disk space</a>: <a href="#Disk-space">Disk space</a></li>
<li><a href="#index-trailing-_0040samp_007b_002f_007d-in-home-directory-498">trailing &lsquo;<samp><span class="samp">/</span></samp>&rsquo; in home directory</a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-trailing-colons-477">trailing colons</a>: <a href="#Default-expansion">Default expansion</a></li>
<li><a href="#index-TRFONTS-695"><code>TRFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-trick-for-detecting-leaf-directories-510">trick for detecting leaf directories</a>: <a href="#Subdirectory-expansion">Subdirectory expansion</a></li>
<li><a href="#index-trojan-horse-attack-257">trojan horse attack</a>: <a href="#Security">Security</a></li>
<li><a href="#index-try_005fstd_005fextension_005ffirst-721"><code>try_std_extension_first</code></a>: <a href="#File-lookup">File lookup</a></li>
<li><a href="#index-TTFONTS-698"><code>TTFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-tug_002eorg-277"><code>tug.org</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-typeface-directory_002c-omitting-224">typeface directory, omitting</a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-ucbinclude_0040r_007b_002c-avoiding_007d-163"><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-102">Ultrix shells and <code>configure</code></a>: <a href="#configure-shells">configure shells</a></li>
<li><a href="#index-unable-to-find-files-353">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-362">unable to generate fonts</a>: <a href="#Unable-to-generate-fonts">Unable to generate fonts</a></li>
<li><a href="#index-uname-290"><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-158">universe, BSD vs. system V</a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-unixtex_002eftp-276"><code>unixtex.ftp</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-unknown-special-warnings-768">unknown special warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-unreadable-file-warnings-766">unreadable file warnings</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-unreadable-files-442">unreadable files</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-unusable-_0040file_007bls_002dR_007d-warning-536">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-344">usage patterns, finding</a>: <a href="#Logging">Logging</a></li>
<li><a href="#index-USE_005fTEXMFVAR-235"><code>USE_TEXMFVAR</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-USE_005fVARTEXFONTS-232"><code>USE_VARTEXFONTS</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-Usenet-_0040TeX_007b_007d-newsgroup-309">Usenet TeX newsgroup</a>: <a href="#Mailing-lists">Mailing lists</a></li>
<li><a href="#index-USERPROFILE_0040r_007b_002c-as-_007e-expansion_007d-496"><code>USERPROFILE</code><span class="roman">, as ~ expansion</span></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
<li><a href="#index-varfonts-228"><code>varfonts</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-variable-expansion-485">variable expansion</a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-variable_002ec-490"><code>variable.c</code></a>: <a href="#Variable-expansion">Variable expansion</a></li>
<li><a href="#index-variable_002eh-820"><code>variable.h</code></a>: <a href="#Programming-with-config-files">Programming with config files</a></li>
<li><a href="#index-VARTEXFONTS-230"><code>VARTEXFONTS</code></a>: <a href="#mktex-configuration">mktex configuration</a></li>
<li><a href="#index-VAX-11_002f750-16">VAX 11/750</a>: <a href="#History">History</a></li>
<li><a href="#index-version-number_002c-of-Kpathsea-50">version number, of Kpathsea</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-version-numbers_002c-determining-289">version numbers, determining</a>: <a href="#Bug-checklist">Bug checklist</a></li>
<li><a href="#index-VF-files_002c-not-found-433">VF files, not found</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-VFFONTS-707"><code>VFFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-VMS-support-45">VMS support</a>: <a href="#Custom-installation">Custom installation</a></li>
<li><a href="#index-Vojta_002c-Paul-20">Vojta, Paul</a>: <a href="#History">History</a></li>
<li><a href="#index-Walsh_002c-Norman-23">Walsh, Norman</a>: <a href="#History">History</a></li>
<li><a href="#index-warning-about-unusable-_0040file_007bls_002dR_007d-535">warning about unusable <samp><span class="file">ls-R</span></samp></a>: <a href="#ls_002dR">ls-R</a></li>
<li><a href="#index-warning_002c-about-missing-_0040file_007btexmf_002ecnf_007d-459">warning, about missing <samp><span class="file">texmf.cnf</span></samp></a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-warnings_002c-file-access-444">warnings, file access</a>: <a href="#Searching-overview">Searching overview</a></li>
<li><a href="#index-warnings_002c-pointer-combinations-414">warnings, pointer combinations</a>: <a href="#Pointer-combination-warnings">Pointer combination warnings</a></li>
<li><a href="#index-warnings_002c-suppressing-756">warnings, suppressing</a>: <a href="#Suppressing-warnings">Suppressing warnings</a></li>
<li><a href="#index-wcstombs-397"><code>wcstombs</code></a>: <a href="#dlopen">dlopen</a></li>
<li><a href="#index-WEB2C-711"><code>WEB2C</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-Weber_002c-Olaf-25">Weber, Olaf</a>: <a href="#History">History</a></li>
<li><a href="#index-WEBINPUTS-710"><code>WEBINPUTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-whitespace_002c-in-fontmap-files-742">whitespace, in fontmap files</a>: <a href="#Fontmap">Fontmap</a></li>
<li><a href="#index-whitespace_002c-not-ignored-on-continuation-lines-465">whitespace, not ignored on continuation lines</a>: <a href="#Config-files">Config files</a></li>
<li><a href="#index-www_002etug_002eorg-278"><code>www.tug.org</code></a>: <a href="#unixtex_002eftp">unixtex.ftp</a></li>
<li><a href="#index-X11-previewer-60">X11 previewer</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-X11_002c-lacking-on-NeXT-54">X11, lacking on NeXT</a>: <a href="#Kpathsea-application-distributions">Kpathsea application distributions</a></li>
<li><a href="#index-XCFLAGS-148"><code>XCFLAGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XCPPFLAGS-145"><code>XCPPFLAGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XDEFS-146"><code>XDEFS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XDvi-575"><code>XDvi</code></a>: <a href="#Specially_002drecognized-files">Specially-recognized files</a></li>
<li><a href="#index-XDVIFONTS-714"><code>XDVIFONTS</code></a>: <a href="#Supported-file-formats">Supported file formats</a></li>
<li><a href="#index-XDVIMAKEPK-247"><code>XDVIMAKEPK</code></a>: <a href="#mktex-script-names">mktex script names</a></li>
<li><a href="#index-XDVISIZES-750"><code>XDVISIZES</code></a>: <a href="#Fallback-font">Fallback font</a></li>
<li><a href="#index-XLDFLAGS-150"><code>XLDFLAGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XLOADLIBES-152"><code>XLOADLIBES</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-XMAKEARGS-154"><code>XMAKEARGS</code></a>: <a href="#Running-make">Running make</a></li>
<li><a href="#index-Xmu-_0040r_007blibrary-problems_007d-406"><code>Xmu </code><span class="roman">library problems</span></a>: <a href="#ShellWidgetClass">ShellWidgetClass</a></li>
<li><a href="#index-XtStrings-392"><code>XtStrings</code></a>: <a href="#XtStrings">XtStrings</a></li>
<li><a href="#index-zuhn_002c-david-22">zuhn, david</a>: <a href="#History">History</a></li>
<li><a href="#index-g_t_0040_007b-_0040r_007bexpansion_007d-501"><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-491"><code>~ </code><span class="roman">expansion</span></a>: <a href="#Tilde-expansion">Tilde expansion</a></li>
   </ul></body></html>