summaryrefslogtreecommitdiff
path: root/systems/doc/kpathsea/kpathsea.html
blob: 5413912732826156f13c1d71e988f086f780d8cb (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
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This file documents the Kpathsea library for path searching.

Copyright © 1996-2024 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. -->
<title>Kpathsea: A library for path searching</title>

<meta name="description" content="Kpathsea: A library for path searching">
<meta name="keywords" content="Kpathsea: A library for path searching">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="#Top" rel="start" title="Top">
<link href="#Index" rel="index" title="Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
<link href="http://tug.org/texinfohtml" rel="up" title="(dir)">
<link href="#Introduction" rel="next" title="Introduction">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
a.summary-letter-printindex {text-decoration: none}
div.example {margin-left: 3.2em}
span.r {font-family: initial; font-weight: normal; font-style: normal}
span:hover a.copiable-link {visibility: visible}
td.printindex-index-entry {vertical-align: top}
td.printindex-index-section {vertical-align: top; padding-left: 1em}
th.entries-header-printindex {text-align:left}
th.sections-header-printindex {text-align:left; padding-left: 1em}
ul.mark-bullet {list-style-type: disc}
ul.toc-numbered-mark {list-style: none}
-->
</style>


</head>

<body lang="en">











<div class="top-level-extent" id="Top">
<div class="nav-panel">
<p>
Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Up: <a href="http://tug.org/texinfohtml" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h1 class="top" id="Kpathsea-library"><span>Kpathsea library<a class="copiable-link" href="#Kpathsea-library"> &para;</a></span></h1>

<p>This manual documents the Kpathsea library for path searching.  It
corresponds to version 6.4.0, released in
January 2024.
</p>


<div class="element-contents" id="SEC_Contents">
<h2 class="contents-heading">Table of Contents</h2>

<div class="contents">

<ul class="toc-numbered-mark">
  <li><a id="toc-Introduction-1" href="#Introduction">1 Introduction</a>
  <ul class="toc-numbered-mark">
    <li><a id="toc-History-1" href="#History">1.1 History</a></li>
  </ul></li>
  <li><a id="toc-unixtex_002eftp_003a-Obtaining-TeX" href="#unixtex_002eftp">2 <samp class="file">unixtex.ftp</samp>: Obtaining TeX</a></li>
  <li><a id="toc-Security-1" href="#Security">3 Security</a>
  <ul class="toc-numbered-mark">
    <li><a id="toc-Global-font-cache-and-security-1" href="#Global-font-cache-and-security">3.1 Global font cache and security</a></li>
  </ul></li>
  <li><a id="toc-TeX-directory-structure-1" href="#TeX-directory-structure">4 TeX directory structure</a></li>
  <li><a id="toc-Path-searching-1" href="#Path-searching">5 Path searching</a>
  <ul class="toc-numbered-mark">
    <li><a id="toc-Searching-overview-1" href="#Searching-overview">5.1 Searching overview</a></li>
    <li><a id="toc-Path-sources-1" href="#Path-sources">5.2 Path sources</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-Config-files-1" href="#Config-files">5.2.1 Config files</a></li>
    </ul></li>
    <li><a id="toc-Path-expansion-1" href="#Path-expansion">5.3 Path expansion</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-Default-expansion-1" href="#Default-expansion">5.3.1 Default expansion</a></li>
      <li><a id="toc-Variable-expansion-1" href="#Variable-expansion">5.3.2 Variable expansion</a></li>
      <li><a id="toc-Tilde-expansion-1" href="#Tilde-expansion">5.3.3 Tilde expansion</a></li>
      <li><a id="toc-Brace-expansion-1" href="#Brace-expansion">5.3.4 Brace expansion</a></li>
      <li><a id="toc-KPSE_005fDOT-expansion-1" href="#KPSE_005fDOT-expansion">5.3.5 <code class="code">KPSE_DOT</code> expansion</a></li>
      <li><a id="toc-Subdirectory-expansion-1" href="#Subdirectory-expansion">5.3.6 Subdirectory expansion</a></li>
    </ul></li>
    <li><a id="toc-Casefolding-search-1" href="#Casefolding-search">5.4 Casefolding search</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-Casefolding-rationale-1" href="#Casefolding-rationale">5.4.1 Casefolding rationale</a></li>
      <li><a id="toc-Casefolding-examples-1" href="#Casefolding-examples">5.4.2 Casefolding examples</a></li>
    </ul></li>
    <li><a id="toc-Filename-database-_0028ls_002dR_0029" href="#Filename-database">5.5 Filename database (<code class="code">ls-R</code>)</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-ls_002dR-1" href="#ls_002dR">5.5.1 <samp class="file">ls-R</samp></a></li>
      <li><a id="toc-Filename-aliases-1" href="#Filename-aliases">5.5.2 Filename aliases</a></li>
      <li><a id="toc-Database-format-1" href="#Database-format">5.5.3 Database format</a></li>
    </ul></li>
    <li><a id="toc-kpsewhich_003a-Standalone-path-searching" href="#Invoking-kpsewhich">5.6 <code class="code">kpsewhich</code>: Standalone path searching</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-Path-searching-options-1" href="#Path-searching-options">5.6.1 Path searching options</a></li>
      <li><a id="toc-Specially_002drecognized-files-for-kpsewhich" href="#Specially_002drecognized-files">5.6.2 Specially-recognized files for <code class="command">kpsewhich</code></a></li>
      <li><a id="toc-Auxiliary-tasks-1" href="#Auxiliary-tasks">5.6.3 Auxiliary tasks</a></li>
      <li><a id="toc-Standard-options-1" href="#Standard-options">5.6.4 Standard options</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-TeX-support-1" href="#TeX-support">6 TeX support</a>
  <ul class="toc-numbered-mark">
    <li><a id="toc-Supported-file-formats-1" href="#Supported-file-formats">6.1 Supported file formats</a></li>
    <li><a id="toc-File-lookup-1" href="#File-lookup">6.2 File lookup</a></li>
    <li><a id="toc-Glyph-lookup-1" href="#Glyph-lookup">6.3 Glyph lookup</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-Basic-glyph-lookup-1" href="#Basic-glyph-lookup">6.3.1 Basic glyph lookup</a></li>
      <li><a id="toc-Fontmap-1" href="#Fontmap">6.3.2 Fontmap</a></li>
      <li><a id="toc-Fallback-font-1" href="#Fallback-font">6.3.3 Fallback font</a></li>
    </ul></li>
    <li><a id="toc-Suppressing-warnings-1" href="#Suppressing-warnings">6.4 Suppressing warnings</a></li>
    <li><a id="toc-mktex-scripts-1" href="#mktex-scripts">6.5 <samp class="file">mktex</samp> scripts</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-mktex-configuration-1" href="#mktex-configuration">6.5.1 <samp class="file">mktex</samp> configuration</a></li>
      <li><a id="toc-mktex-script-names-1" href="#mktex-script-names">6.5.2 <samp class="file">mktex</samp> script names</a></li>
      <li><a id="toc-mktex-script-arguments-1" href="#mktex-script-arguments">6.5.3 <samp class="file">mktex</samp> script arguments</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-Programming-1" href="#Programming">7 Programming</a>
  <ul class="toc-numbered-mark">
    <li><a id="toc-Programming-overview-1" href="#Programming-overview">7.1 Programming overview</a></li>
    <li><a id="toc-Calling-sequence-1" href="#Calling-sequence">7.2 Calling sequence</a></li>
    <li><a id="toc-Safe-filenames-1" href="#Safe-filenames">7.3 Safe filenames</a></li>
    <li><a id="toc-Program_002dspecific-files-1" href="#Program_002dspecific-files">7.4 Program-specific files</a></li>
    <li><a id="toc-Programming-with-config-files-1" href="#Programming-with-config-files">7.5 Programming with config files</a></li>
  </ul></li>
  <li><a id="toc-Reporting-bugs-1" href="#Reporting-bugs">8 Reporting bugs</a>
  <ul class="toc-numbered-mark">
    <li><a id="toc-Bug-checklist-1" href="#Bug-checklist">8.1 Bug checklist</a></li>
    <li><a id="toc-Mailing-lists-1" href="#Mailing-lists">8.2 Mailing lists</a></li>
    <li><a id="toc-Debugging-1" href="#Debugging">8.3 Debugging</a></li>
    <li><a id="toc-Logging-1" href="#Logging">8.4 Logging</a></li>
    <li><a id="toc-Common-problems-1" href="#Common-problems">8.5 Common problems</a>
    <ul class="toc-numbered-mark">
      <li><a id="toc-Unable-to-find-files-1" href="#Unable-to-find-files">8.5.1 Unable to find files</a></li>
      <li><a id="toc-Slow-path-searching-1" href="#Slow-path-searching">8.5.2 Slow path searching</a></li>
      <li><a id="toc-Unable-to-generate-fonts-1" href="#Unable-to-generate-fonts">8.5.3 Unable to generate fonts</a></li>
      <li><a id="toc-TeX-or-Metafont-failing-1" href="#TeX-or-Metafont-failing">8.5.4 TeX or Metafont failing</a></li>
    </ul></li>
  </ul></li>
  <li><a id="toc-Index-1" href="#Index" rel="index">Index</a></li>
</ul>
</div>
</div>
<hr>
<div class="chapter-level-extent" id="Introduction">
<div class="nav-panel">
<p>
Next: <a href="#unixtex_002eftp" accesskey="n" rel="next"><samp class="file">unixtex.ftp</samp>: Obtaining TeX</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Kpathsea library</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="Introduction-1"><span>1 Introduction<a class="copiable-link" href="#Introduction-1"> &para;</a></span></h2>

<a class="index-entry-id" id="index-introduction"></a>
<a class="index-entry-id" id="index-fundamental-purpose-of-Kpathsea"></a>

<p>This manual corresponds to version 6.4.0 of the Kpathsea
library, released in January 2024.
</p>
<p>The library&rsquo;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 class="index-entry-id" id="index-programs-using-the-library"></a>
<p>The following software, all of which is maintained in parallel, uses
this library:
</p>
<ul class="itemize mark-bullet">
<li>Dviljk (see the &lsquo;<samp class="samp">dvilj</samp>&rsquo; man page)
</li><li>Dvipsk (see <cite class="cite"><a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Top">Dvips: A DVI driver</a></cite>)
</li><li>GNU font utilities (see <cite class="cite"><a data-manual="fontu" href="fontu.html#Top">GNU font utilities</a></cite>)
</li><li>Web2c (see <cite class="cite"><a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Top">Web2c: A TeX implementation</a></cite>)
</li><li>Xdvik (see the &lsquo;<samp class="samp">xdvi</samp>&rsquo; man page)
</li></ul>

<p>Other software that we do not maintain also uses it.
</p>
<p>Kpathsea is now maintained as part of the TeX Live distribution
(<a class="url" href="https://tug.org/texlive">https://tug.org/texlive</a>), which includes several more
Kpathsea-using programs.  For information on configuration, building,
installing, and more, see <cite class="cite"><a data-manual="tlbuild" href="https://tug.org/texinfohtml/tlbuild.html#Top">Building TeX Live</a></cite>.
</p>
<a class="index-entry-id" id="index-interface_002c-not-frozen"></a>
<a class="index-entry-id" id="index-comments_002c-making"></a>
<a class="index-entry-id" id="index-suggestions_002c-making"></a>
<p>The library is still actively maintained.  If you have comments or
suggestions, please send along (see <a class="pxref" href="#Reporting-bugs">Reporting bugs</a>).
</p>
<a class="index-entry-id" id="index-conditions-for-use"></a>
<a class="index-entry-id" id="index-license-for-using-the-library"></a>
<a class="index-entry-id" id="index-GNU-General-Public-License"></a>
<p>The Kpathsea library is distributed under the GNU Library General
Public License (LGPL), version&nbsp;2.1 or (at your option) any later
version.  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 using the library,
although we hope you will.  See accompanying files for the text of the
GNU licenses, or <a class="url" href="https://gnu.org/licenses">https://gnu.org/licenses</a>.
</p>
<a class="index-entry-id" id="index-TeX-Users-Group"></a>
<p>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&rsquo;re already a member, thanks!).  TUG produces the periodical
<cite class="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 class="url" href="https://tug.org">https://tug.org</a> for information.
</p>


<ul class="mini-toc">
<li><a href="#History" accesskey="1">History</a></li>
</ul>
<hr>
<div class="section-level-extent" id="History">
<div class="nav-panel">
<p>
Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="History-1"><span>1.1 History<a class="copiable-link" href="#History-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-history-of-Kpathsea"></a>

<a class="index-entry-id" id="index-Knuth_002c-Donald-E_002e"></a>
<p>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 his book <cite class="cite">Digital
Typography</cite>, among other places.
</p>
<a class="index-entry-id" id="index-Morgan_002c-Tim"></a>
<a class="index-entry-id" id="index-Rokicki_002c-Tom"></a>
<a class="index-entry-id" id="index-Berry_002c-Karl"></a>
<a class="index-entry-id" id="index-VAX-11_002f750"></a>
<a class="index-entry-id" id="index-Sun-2"></a>
<a class="index-entry-id" id="index-pxp-Pascal-preprocessor"></a>
<a class="index-entry-id" id="index-pc-Pascal-compiler"></a>
<p>[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.  When I started, I was using
<code class="code">pxp</code> and <code class="code">pc</code> on VAX 11/750&rsquo;s and the hot new Sun 2
machines.)
</p>
<p>It must have been later in 1990 and 1991 that I started working on
<cite class="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&rsquo;t stand putting
everything in one big directory, and also couldn&rsquo;t stand having to
explicitly specify <samp class="file">cm</samp>, <samp class="file">pandora</samp>, &hellip; in a path.
</p>
<a class="index-entry-id" id="index-Vojta_002c-Paul"></a>
<p>In the first incarnation, I just hacked separately on each
program&mdash;that was the original subdirectory searching code in both
Xdvi and Dvips.  That is, I tried to go with the flow in each program,
rather than changing the program&rsquo;s calling sequences to conform to new
routines.
</p>
<p>Then, as bugs inevitably appeared, I found I was fixing the same thing
three times (Web2c and fontutils were already sharing code, since I
maintained both of those&mdash;there was no Dvipsk or Xdvik or Dviljk at
this point).  After a while, I finally started sharing source files.
They weren&rsquo;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&rsquo;t have symbolic links.  An awful experience.)
</p>
<a class="index-entry-id" id="index-MacKenzie_002c-David"></a>
<p>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 class="index-entry-id" id="index-zuhn_002c-david"></a>
<p>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&rsquo;t
remember exactly why I finally took the time to make it a separate
library; a conversation with david zuhn initiated it.  Just seemed
like it was time.
</p>
<a class="index-entry-id" id="index-Walsh_002c-Norman"></a>
<a class="index-entry-id" id="index-Neumann_002c-Gustaf"></a>
<p>Dviljk got started in March 1994 after I bought a Laserjet 4.  (Kpathsea
work got suspended while Norm Walsh and I, with Gustaf Neumann&rsquo;s help,
implemented a way for TeX to get at all those neat builtin LJ4 fonts
&hellip; such a treat to have something to typeset in besides Palatino!)
</p>
<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&rsquo;t completely obliterated Unix by then,
or that software patents haven&rsquo;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&rsquo;s another
story&hellip;)
</p>
<a class="index-entry-id" id="index-Weber_002c-Olaf"></a>
<p>[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.
</p>
<a class="index-entry-id" id="index-Hoekwater_002c-Taco"></a>
<a class="index-entry-id" id="index-Breitenlohner_002c-Peter"></a>
<p>[Karl writes again.]  Indeed, time goes on.  As of 2006 or so, Olaf&rsquo;s
available time for Kpathsea was reduced, and I started taking overall
care of it again, although I did not do any significant new
development.  In 2009, Taco Hoekwater implemented a major
rearrangement to make the library suitable for use within the MetaPost
library (see <a class="pxref" href="#Programming-overview">Programming overview</a>).  Also, for some years now,
Peter Breitenlohner has made many improvements to the infrastructure
and kept it up-to-date with respect to the overall TeX Live build,
where Kpathsea is now maintained.
</p>


<hr>
</div>
</div>
<div class="chapter-level-extent" id="unixtex_002eftp">
<div class="nav-panel">
<p>
Next: <a href="#Security" accesskey="n" rel="next">Security</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="unixtex_002eftp_003a-Obtaining-TeX"><span>2 <samp class="file">unixtex.ftp</samp>: Obtaining TeX<a class="copiable-link" href="#unixtex_002eftp_003a-Obtaining-TeX"> &para;</a></span></h2>

<a class="index-entry-id" id="index-obtaining-TeX"></a>
<a class="index-entry-id" id="index-retrieving-TeX"></a>

<a class="index-entry-id" id="index-unixtex_002eftp"></a>
<a class="index-entry-id" id="index-tug_002eorg"></a>
<a class="index-entry-id" id="index-www_002etug_002eorg"></a>
<a class="index-entry-id" id="index-ftp_002etug_002eorg"></a>
<p>This
is <a class="uref" href="ftp://tug.org/tex/unixtex.ftp">ftp://tug.org/tex/unixtex.ftp</a>, a.k.a.
<a class="uref" href="https://tug.org/unixtex.ftp">https://tug.org/unixtex.ftp</a>, last updated 29 February 2020.
Email <a class="email" href="mailto:tex-k@tug.org">tex-k@tug.org</a> with comments or questions.
</p>
<p>The principal free TeX distribution for Unix-like systems is TeX
Live, on the web at <a class="url" href="http://tug.org/texlive">http://tug.org/texlive</a>.  The pages there
describe many ways to acquire and/or build 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>
<p>Web2c, Kpathsea, Dvips, and Dviljk, among others, are no longer
released as a separate packages.  Their sources are now maintained as
part of TeX Live.
</p>
<a class="index-entry-id" id="index-ftp_002ecs_002estanford_002eedu"></a>
<a class="index-entry-id" id="index-tex_002eweb"></a>
<a class="index-entry-id" id="index-Knuth_002c-Donald-E_002e_002c-archive-of-programs-by"></a>
<p>The host <code class="t">ftp.cs.stanford.edu</code> is the original source for the files
for which Donald Knuth is directly responsible: <samp class="file">tex.web</samp>,
<samp class="file">plain.tex</samp>, etc. However, unless you want to undertake the
project of building your TeX system from scratch, it is more
reliable and less work to retrieve these files as part of a larger
package.
</p>
<p>In any case, the Stanford ftp site is not the canonical source for
anything except what was created as part of Knuth&rsquo;s original TeX,
so do not rely on any other files available there being up-to-date.
The best place to check for up-to-date files is CTAN (the
Comprehensive TeX Archive Network), <a class="url" href="https://ctan.org">https://ctan.org</a>.
</p>


<hr>
</div>
<div class="chapter-level-extent" id="Security">
<div class="nav-panel">
<p>
Next: <a href="#TeX-directory-structure" accesskey="n" rel="next">TeX directory structure</a>, Previous: <a href="#unixtex_002eftp" accesskey="p" rel="prev"><samp class="file">unixtex.ftp</samp>: Obtaining TeX</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="Security-1"><span>3 Security<a class="copiable-link" href="#Security-1"> &para;</a></span></h2>

<a class="index-entry-id" id="index-security-considerations"></a>

<p>None of the programs in the TeX system require any special system
privileges, so there&rsquo;s no first-level security concern of people gaining
illegitimate root access.
</p>
<p>Thus, the general goal of our security measures is to make an
untrusted TeX document safe to execute, in the sense of no document
being able to change the system or user configuration, or somehow
transmit information to an attacker.  Here are some of the steps that
have been taken to make the TeX system safe in this regard:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-trojan-horse-attack"></a>
<a class="index-entry-id" id="index-_002eprofile_002c-_0028un_0029writable-by-TeX"></a>
<a class="index-entry-id" id="index-_005copenout"></a>
A TeX document can write to arbitrary files via <code class="code">\openout</code>,
e.g., <samp class="file">~/.profile</samp>, and thus an unwitting user who runs TeX on
an untrusted 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 class="file">texmf.cnf</samp>.  See <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#tex-invocation">tex invocation</a> in <cite class="cite">Web2c</cite>.
MetaPost has the same issue.

</li><li><a class="index-entry-id" id="index-shell-commands_002c-security"></a>
Dvips, Xdvi, TeX, and others can execute shell commands.  By
default, only a handful of commands that are believed to be safe (to
the best of our ability to check) are allowed.  For the list, see the
<code class="code">shell_escape_commands</code> variable in <samp class="file">texmf.cnf</samp>
(see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Shell-escapes">Shell escapes</a> in <cite class="cite">Web2c</cite>).  For more information, e.g.,
to disable this completely, see the &lsquo;<samp class="samp">-R</samp>&rsquo; option in <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Option-details">Option
details</a> in <cite class="cite">Dvips</cite>, the xdvi man page, and <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#tex-invocation">tex
invocation</a> in <cite class="cite">Web2c</cite>, respectively.

</li><li><a class="index-entry-id" id="index-LuaTeX-and-security"></a>
<a class="index-entry-id" id="index-kpse-mode-of-LuaTeX"></a>
LuaTeX is a special case.  Since Lua is a general-purpose
programming language, it has all the usual functionality for writing
files, executing shell commands, and plenty more.  When LuaTeX is
used in its so-called &ldquo;kpse&rdquo; mode, as with LuaLaTeX, we have
nevertheless done our best to also make it safe to execute by default,
by disabling or restricting the various problematic Lua features.
See <a class="xref" href="#Safe-filenames">Safe filenames</a>, for a bit more about this.  (By the way, when
LuaTeX is run in non-kpse mode, as with ConTeXt MkIV, everything
is allowed; thus, untrusted documents should not be processed without
checking.)

</li><li><a class="index-entry-id" id="index-crashes-of-TeX-and-security"></a>
There are some well-known ways to crash TeX, using (deliberately
unchecked) arithmetic overflow and other nefarious constructs (some
are listed at <a class="url" href="https://tug.org/texmfbug/nobug.html">https://tug.org/texmfbug/nobug.html</a>.  While
disturbing, TeX has no special system access and so these crashes
don&rsquo;t present a security risk.

</li><li>One more issue is the desire for a globally writable font cache
directory; see the section below for this (<a class="ref" href="#Global-font-cache-and-security">Global font cache and security</a>).
</li></ul>


<ul class="mini-toc">
<li><a href="#Global-font-cache-and-security" accesskey="1">Global font cache and security</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Global-font-cache-and-security">
<div class="nav-panel">
<p>
Up: <a href="#Security" accesskey="u" rel="up">Security</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Global-font-cache-and-security-1"><span>3.1 Global font cache and security<a class="copiable-link" href="#Global-font-cache-and-security-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-local-cache-of-fonts"></a>
<a class="index-entry-id" id="index-cache-of-fonts_002c-local"></a>
<p>It&rsquo;s useful to make arbitrary fonts on user demand with <code class="code">mktexpk</code>
and friends.  Where do these files get installed?  By default, the
<code class="code">mktexpk</code> distributed with Kpathsea assumes a world-writable
<samp class="file">/var/tmp</samp> directory; this is a simple and convenient approach,
but it does not suit all situations, because it means that a local
cache of fonts is created on every user&rsquo;s system.
</p>
<a class="index-entry-id" id="index-globally-writable-directories"></a>
<p>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 class="code">VARTEXFONTS</code>
in <samp class="file">texmf.cnf</samp> to refer to some globally known directory.
See <a class="xref" href="#mktex-configuration"><samp class="file">mktex</samp> configuration</a>.
</p>
<a class="index-entry-id" id="index-append_002donly-directories-and-mktexpk"></a>
<p>The first restriction you can apply is to make newly-created directories
under <samp class="file">texmf</samp> be append-only with an option in <samp class="file">mktex.cnf</samp>.
See <a class="xref" href="#mktex-configuration"><samp class="file">mktex</samp> configuration</a>.
</p>
<a class="index-entry-id" id="index-group_002dwritable-directories"></a>
<a class="index-entry-id" id="index-setgid-scripts"></a>
<p>Another approach is to establish a group (or user) for TeX files,
make the <samp class="file">texmf</samp> tree writable only to that group (or user), and
make <code class="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&rsquo;re worried about the inevitable security holes in scripts, then you
could write a C wrapper to exec the script.)
</p>
<a class="index-entry-id" id="index-file-permissions"></a>
<a class="index-entry-id" id="index-permissions_002c-file"></a>
<p>The <samp class="file">mktex&hellip;</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 class="index-entry-id" id="index-directory-permissions"></a>
<a class="index-entry-id" id="index-permissions_002c-directory"></a>
<p>Any directories created by the <samp class="file">mktex&hellip;</samp> scripts have the
same permissions as their parent directory, unless the
<code class="code">appendonlydir</code> feature is used, in which case the sticky bit is
always set.
</p>
<p>Nowadays, with bitmap files rarely used, and with individual systems
being so much more powerful, this is less of an issue than it was in
the past. But the question still comes up occasionally.
</p>

<hr>
</div>
</div>
<div class="chapter-level-extent" id="TeX-directory-structure">
<div class="nav-panel">
<p>
Next: <a href="#Path-searching" accesskey="n" rel="next">Path searching</a>, Previous: <a href="#Security" accesskey="p" rel="prev">Security</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="TeX-directory-structure-1"><span>4 TeX directory structure<a class="copiable-link" href="#TeX-directory-structure-1"> &para;</a></span></h2>

<a class="index-entry-id" id="index-TEXMF"></a>
<a class="index-entry-id" id="index-TeX-directory-structure"></a>
<a class="index-entry-id" id="index-directory-structure_002c-for-TeX-files"></a>
<a class="index-entry-id" id="index-skeleton-TeX-directory"></a>
<a class="index-entry-id" id="index-TDS"></a>

<p>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 document is
available from <a class="url" href="https://gnu.org/prep/standards">https://gnu.org/prep/standards</a>.  The TDS
document is available from <a class="url" href="https://ctan.org/pkg/tds">https://ctan.org/pkg/tds</a>
(see <a class="pxref" href="#unixtex_002eftp"><samp class="file">unixtex.ftp</samp>: Obtaining TeX</a>).
</p>
<p>In short, here is a skeleton of the default directory structure,
extracted from the TDS document:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">prefix</var>/      <span class="r">installation root (<samp class="file">/usr/local</samp> by default)</span>
 bin/         <span class="r">executables</span>
 man/         <span class="r">man pages</span>
 include/     <span class="r">C header files</span>
 info/        <span class="r">GNU info files</span>
 lib/         <span class="r">libraries (<samp class="file">libkpathsea.*</samp>)</span>
 share/       <span class="r">architecture-independent files</span>
  texmf/      <span class="r">TDS root</span>
   bibtex/     <span class="r">BibTeX input files</span>
    bib/        <span class="r">BibTeX databases</span>
     base/       <span class="r">base distribution (e.g., &lsquo;<samp class="samp">xampl.bib</samp>&rsquo;)</span>
     misc/       <span class="r">single-file databases</span>
     <var class="var">pkg</var>/       <span class="r">name of a package</span>
    bst/        <span class="r">BibTeX style files</span>
     base/       <span class="r">base distribution (e.g., &lsquo;<samp class="samp">plain.bst</samp>&rsquo;, &lsquo;<samp class="samp">acm.bst</samp>&rsquo;)</span>
     misc/       <span class="r">single-file styles</span>
     <var class="var">pkg</var>/       <span class="r">name of a package</span>
   doc/         <span class="r">additional documentation</span>
   dvips/       <span class="r">&lsquo;<samp class="samp">.pro</samp>&rsquo;, &lsquo;<samp class="samp">.ps</samp>&rsquo;, &lsquo;<samp class="samp">psfonts.map</samp>&rsquo;</span>
   fonts/       <span class="r">font-related files</span>
    <var class="var">type</var>/         <span class="r">file type (e.g., &lsquo;<samp class="samp">tfm</samp>&rsquo;, &lsquo;<samp class="samp">pk</samp>&rsquo;)</span>
     <var class="var">mode</var>/          <span class="r">type of output device (types &lsquo;<samp class="samp">pk</samp>&rsquo; and &lsquo;<samp class="samp">gf</samp>&rsquo; only)</span>
      <var class="var">supplier</var>/       <span class="r">name of a font supplier (e.g., &lsquo;<samp class="samp">public</samp>&rsquo;)</span>
       <var class="var">typeface</var>/        <span class="r">name of a typeface (e.g., &lsquo;<samp class="samp">cm</samp>&rsquo;)</span>
        dpi<var class="var">nnn</var>/           <span class="r">font resolution (types &lsquo;<samp class="samp">pk</samp>&rsquo; and &lsquo;<samp class="samp">gf</samp>&rsquo; only)</span>
   metafont/    <span class="r">Metafont (non-font) input files</span>
    base/        <span class="r">base distribution (e.g., &lsquo;<samp class="samp">plain.mf</samp>&rsquo;)</span>
    misc/        <span class="r">single-file packages (e.g., &lsquo;<samp class="samp">modes.mf</samp>&rsquo;)</span>
    <var class="var">pkg</var>/           <span class="r">name of a package (e.g., &lsquo;<samp class="samp">mfpic</samp>&rsquo;)</span>
   metapost/    <span class="r">MetaPost input files</span>
    base/        <span class="r">base distribution (e.g., &lsquo;<samp class="samp">plain.mp</samp>&rsquo;)</span>
    misc/        <span class="r">single-file packages</span>
    <var class="var">pkg</var>/           <span class="r">name of a package</span>
    support/     <span class="r">support files for MetaPost-related utilities (e.g., &lsquo;<samp class="samp">trfonts.map</samp>&rsquo;)</span>
   mft/         <span class="r">&lsquo;<samp class="samp">MFT</samp>&rsquo; inputs (e.g., &lsquo;<samp class="samp">plain.mft</samp>&rsquo;)</span>
   tex/         <span class="r">TeX input files</span>
    <var class="var">format</var>/         <span class="r">name of a format (e.g., &lsquo;<samp class="samp">plain</samp>&rsquo;)</span>
     base/        <span class="r">base distribution for <var class="var">format</var> (e.g., &lsquo;<samp class="samp">plain.tex</samp>&rsquo;)</span>
     misc/        <span class="r">single-file packages (e.g., &lsquo;<samp class="samp">webmac.tex</samp>&rsquo;)</span>
     local/       <span class="r">local additions to or local configuration files for <var class="var">format</var></span>
     <var class="var">pkg</var>/           <span class="r">name of a package (e.g., &lsquo;<samp class="samp">graphics</samp>&rsquo;, &lsquo;<samp class="samp">mfnfss</samp>&rsquo;)</span>
    generic/     <span class="r">format-independent packages</span>
     hyphen/      <span class="r">hyphenation patterns (e.g., &lsquo;<samp class="samp">hyphen.tex</samp>&rsquo;)</span>
     images/      <span class="r">image input files (e.g., Encapsulated PostScript)</span>
     misc/        <span class="r">single-file format-independent packages (e.g., &lsquo;<samp class="samp">null.tex</samp>&rsquo;).</span>
     <var class="var">pkg</var>/           <span class="r">name of a package (e.g., &lsquo;<samp class="samp">babel</samp>&rsquo;)</span>
   web2c/        <span class="r">implementation-dependent files (<samp class="file">.pool</samp>, <samp class="file">.fmt</samp>, <samp class="file">texmf.cnf</samp>, etc.)</span>
</pre></div>

<p>Some concrete examples for most file types:
</p>
<div class="example">
<pre class="example-preformatted">/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>


<hr>
</div>
<div class="chapter-level-extent" id="Path-searching">
<div class="nav-panel">
<p>
Next: <a href="#TeX-support" accesskey="n" rel="next">TeX support</a>, Previous: <a href="#TeX-directory-structure" accesskey="p" rel="prev">TeX directory structure</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="Path-searching-1"><span>5 Path searching<a class="copiable-link" href="#Path-searching-1"> &para;</a></span></h2>

<a class="index-entry-id" id="index-path-searching"></a>

<p>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.
</p>
<a class="index-entry-id" id="index-translations_002c-of-path-searching-description"></a>
<p>This section, with minor differences, has been translated into several
other languages (Chinese, Spanish, Russian, Japanese, French, German,
&hellip;) as part of the TeX Live guide; see
<a class="url" href="https://tug.org/texlive/doc.html">https://tug.org/texlive/doc.html</a> for links.
</p>


<ul class="mini-toc">
<li><a href="#Searching-overview" accesskey="1">Searching overview</a></li>
<li><a href="#Path-sources" accesskey="2">Path sources</a></li>
<li><a href="#Path-expansion" accesskey="3">Path expansion</a></li>
<li><a href="#Casefolding-search" accesskey="4">Casefolding search</a></li>
<li><a href="#Filename-database" accesskey="5">Filename database (<code class="code">ls-R</code>)</a></li>
<li><a href="#Invoking-kpsewhich" accesskey="6"><code class="code">kpsewhich</code>: Standalone path searching</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Searching-overview">
<div class="nav-panel">
<p>
Next: <a href="#Path-sources" accesskey="n" rel="next">Path sources</a>, Up: <a href="#Path-searching" accesskey="u" rel="up">Path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Searching-overview-1"><span>5.1 Searching overview<a class="copiable-link" href="#Searching-overview-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-searching-overview"></a>
<a class="index-entry-id" id="index-path-searching_002c-overview"></a>
<a class="index-entry-id" id="index-overview-of-path-searching"></a>

<a class="index-entry-id" id="index-search-path_002c-defined"></a>
<p>A <em class="dfn">search path</em> is a colon-separated list of <em class="dfn">path elements</em>,
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 class="samp">foo</samp>&rsquo; along a path &lsquo;<samp class="samp">.:/dir</samp>&rsquo;, Kpathsea checks each element of
the path in turn: first <samp class="file">./foo</samp>, then <samp class="file">/dir/foo</samp>, returning
the first match (or possibly all matches).
</p>
<a class="index-entry-id" id="index-magic-characters"></a>
<a class="index-entry-id" id="index-_003a-may-not-be-_003a"></a>
<a class="index-entry-id" id="index-_002f-may-not-be-_002f"></a>
<p>The &ldquo;colon&rdquo; and &ldquo;slash&rdquo; mentioned here aren&rsquo;t necessarily &lsquo;<samp class="samp">:</samp>&rsquo;
and &lsquo;<samp class="samp">/</samp>&rsquo; on non-Unix systems.  Kpathsea tries to adapt to other
operating systems&rsquo; conventions.
</p>
<a class="index-entry-id" id="index-database-search"></a>
<a class="index-entry-id" id="index-searching-the-database"></a>
<p>To check a particular path element <var class="var">e</var>, Kpathsea first sees if a
prebuilt database (see <a class="pxref" href="#Filename-database">Filename database (<code class="code">ls-R</code>)</a>) applies to <var class="var">e</var>, i.e.,
if the database is in a directory that is a prefix of <var class="var">e</var>.  If so,
the path specification is matched against the contents of the database.
</p>
<a class="index-entry-id" id="index-floating-directories"></a>
<a class="index-entry-id" id="index-filesystem-search"></a>
<a class="index-entry-id" id="index-disk-search"></a>
<a class="index-entry-id" id="index-searching-the-disk"></a>
<p>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 class="samp">!!</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 class="index-entry-id" id="index-must-exist"></a>
<a class="index-entry-id" id="index-VF-files_002c-not-found"></a>
<a class="index-entry-id" id="index-cmr10_002evf"></a>
<a class="index-entry-id" id="index-_005copenin"></a>
<p>The &ldquo;file must exist&rdquo; condition comes into play with VF files and
input files read by the TeX &lsquo;<samp class="samp">\openin</samp>&rsquo; command.  These files
might very well not exist (consider <samp class="file">cmr10.vf</samp>), and so it would
be wrong to search the disk for them.  Therefore, if you fail to
update <samp class="file">ls-R</samp> when you install a new VF file, it will not be
found.
</p>
<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 (unless the search explicitly requested all matches).  This
avoids possibly-expensive processing of path specifications that are
never needed on a particular run.
</p>
<p>On Unix-like systems, if no match is found by any of the above, and
the path element allows checking the filesystem (per the above), a
final check is made for a case-insensitive match. Thus, looking for a
name like &lsquo;<samp class="samp">./FooBar.TeX</samp>&rsquo; will match a file &lsquo;<samp class="samp">./foobar.tex</samp>&rsquo;,
and vice versa.  This is not done on Windows.  See <a class="xref" href="#Casefolding-search">Casefolding search</a>.
</p>
<a class="index-entry-id" id="index-expansion_002c-path-element"></a>
<p>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&rsquo; home
directories, and recursive subdirectory searching.  Thus, we say that
Kpathsea <em class="dfn">expands</em> 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 class="index-entry-id" id="index-absolute-filenames"></a>
<a class="index-entry-id" id="index-relative-filenames"></a>
<a class="index-entry-id" id="index-explicitly-relative-filenames"></a>
<a class="index-entry-id" id="index-filenames_002c-absolute-or-explicitly-relative"></a>
<p>Exception to all of the above: If the filename being searched for is
absolute or explicitly relative, i.e., starts with &lsquo;<samp class="samp">/</samp>&rsquo; or &lsquo;<samp class="samp">./</samp>&rsquo;
or &lsquo;<samp class="samp">../</samp>&rsquo;, Kpathsea simply checks if that file exists, with a
fallback to a casefolding match if needed and enabled, as described above.
</p>
<a class="index-entry-id" id="index-permission-denied"></a>
<a class="index-entry-id" id="index-unreadable-files"></a>
<a class="index-entry-id" id="index-access-warnings"></a>
<a class="index-entry-id" id="index-warnings_002c-file-access"></a>
<a class="index-entry-id" id="index-lost_002bfound-directory"></a>
<a class="index-entry-id" id="index-TEX_005fHUSH"></a>
<p>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 class="file">lost+found</samp> directory).  If you prefer not to see
these warnings, include the value &lsquo;<samp class="samp">readable</samp>&rsquo; in the
<code class="code">TEX_HUSH</code> environment variable or config file value.
</p>
<p>This generic path searching algorithm is implemented in
<samp class="file">kpathsea/pathsearch.c</samp>.  It is employed by a higher-level
algorithm when searching for a file of a particular type (see <a class="pxref" href="#File-lookup">File lookup</a>, and <a class="ref" href="#Glyph-lookup">Glyph lookup</a>).
</p>

<hr>
</div>
<div class="section-level-extent" id="Path-sources">
<div class="nav-panel">
<p>
Next: <a href="#Path-expansion" accesskey="n" rel="next">Path expansion</a>, Previous: <a href="#Searching-overview" accesskey="p" rel="prev">Searching overview</a>, Up: <a href="#Path-searching" accesskey="u" rel="up">Path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Path-sources-1"><span>5.2 Path sources<a class="copiable-link" href="#Path-sources-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-path-sources"></a>
<a class="index-entry-id" id="index-sources-for-search-paths"></a>

<p>A search path or other configuration value can come from many sources.
In the order in which Kpathsea looks for them:
</p>
<ol class="enumerate">
<li> <a class="index-entry-id" id="index-_002d_002dcnf_002dline_002c-source-for-path"></a>
A command-line option such as <code class="code">--cnf-line</code>, available in
<samp class="file">kpsewhich</samp> and most TeX engines.  See <a class="xref" href="#Path-searching-options">Path searching options</a>. 

<a class="index-entry-id" id="index-environment-variable_002c-source-for-path"></a>
<p>A user-set environment variable, e.g., <code class="code">TEXINPUTS</code>.
Environment variables with an underscore and the program name appended
override; for example, <code class="code">TEXINPUTS_latex</code> overrides <code class="code">TEXINPUTS</code>
if the program being run is named &lsquo;<samp class="samp">latex</samp>&rsquo;.
</p>
</li><li> A program-specific configuration file, e.g., an &lsquo;<samp class="samp">S /a:/b</samp>&rsquo; line in
Dvips&rsquo; <samp class="file">config.ps</samp> (see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Config-files">Config files</a> in <cite class="cite">Dvips</cite>).

</li><li> <a class="index-entry-id" id="index-configuration-file_002c-source-for-path"></a>
<a class="index-entry-id" id="index-Kpathsea-config-file_002c-source-for-path"></a>
<a class="index-entry-id" id="index-texmf_002ecnf_002c-source-for-path"></a>
A line in a Kpathsea configuration file <samp class="file">texmf.cnf</samp>, e.g.,
&lsquo;<samp class="samp">TEXINPUTS=/c:/d</samp>&rsquo; (see below).

</li><li> <a class="index-entry-id" id="index-compilation-value_002c-source-for-path"></a>
The compile-time default (specified in <samp class="file">kpathsea/paths.h</samp>).
</li></ol>

<p>You can see each of these values for a given search path by using the
debugging options (see <a class="pxref" href="#Debugging">Debugging</a>).
</p>
<p>These sources may be combined via default expansion (see <a class="pxref" href="#Default-expansion">Default expansion</a>).
</p>


<ul class="mini-toc">
<li><a href="#Config-files" accesskey="1">Config files</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Config-files">
<div class="nav-panel">
<p>
Up: <a href="#Path-sources" accesskey="u" rel="up">Path sources</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Config-files-1"><span>5.2.1 Config files<a class="copiable-link" href="#Config-files-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-config-files"></a>
<a class="index-entry-id" id="index-texmf_002ecnf_002c-definition-for"></a>

<a class="index-entry-id" id="index-runtime-configuration-files"></a>
<a class="index-entry-id" id="index-TEXMFCNF"></a>
<p>As mentioned above, Kpathsea reads <em class="dfn">runtime configuration files</em>
named <samp class="file">texmf.cnf</samp> for search path and other definitions.  The
search path used to look for these configuration files is named
<code class="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 class="file">ls-R</samp> database is not used to search for
them.
</p>
<p>Kpathsea reads <em class="emph">all</em> <samp class="file">texmf.cnf</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 class="samp">.:$TEXMF</samp>&rsquo;, values from
<samp class="file">./texmf.cnf</samp> override those from <samp class="file">$TEXMF/texmf.cnf</samp>.
</p>
<a class="index-entry-id" id="index-KPATHSEA_005fWARNING"></a>
<a class="index-entry-id" id="index-warning_002c-about-missing-texmf_002ecnf"></a>
<a class="index-entry-id" id="index-texmf_002ecnf-missing_002c-warning-about"></a>
<p>If Kpathsea cannot find any <samp class="file">texmf.cnf</samp> file, it reports a
warning including all the directories it checked.  If you don&rsquo;t want
to see this warning, set the environment variable
<code class="env">KPATHSEA_WARNING</code> to the single character &lsquo;<samp class="samp">0</samp>&rsquo; (zero, not
oh).
</p>
<p>While (or instead of) reading this description, you may find it helpful
to look at the distributed <samp class="file">texmf.cnf</samp>, which uses or at least
mentions most features.  The format of <samp class="file">texmf.cnf</samp> files follows:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-comments_002c-in-texmf_002ecnf"></a>
Comments start with &lsquo;<samp class="samp">%</samp>&rsquo; or &lsquo;<samp class="samp">#</samp>&rsquo;, either at the beginning of a
line or preceded by whitespace, and continue to the end of the line.
That is, similar to most shells, a comment character in the &ldquo;middle&rdquo;
of a value does not start a comment.  Examples:

<div class="example">
<pre class="example-preformatted">% this is a comment
var = a%b  % but the value of var will be &quot;a%b&quot;
</pre></div>

</li><li><a class="index-entry-id" id="index-blank-lines_002c-in-texmf_002ecnf"></a>
Blank lines are ignored.

</li><li><a class="index-entry-id" id="index-backslash_002dnewline"></a>
<a class="index-entry-id" id="index-continuation-character"></a>
<a class="index-entry-id" id="index-whitespace_002c-not-ignored-on-continuation-lines"></a>
<a class="index-entry-id" id="index-_005c_002c-line-continuation-in-texmf_002ecnf"></a>
A &lsquo;<samp class="samp">\</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><li>Each remaining line will look like:

<div class="example">
<pre class="example-preformatted"><var class="var">variable</var> <span class="r">[</span>. <var class="var">progname</var><span class="r">]</span> <span class="r">[</span>=<span class="r">]</span> <var class="var">value</var>
</pre></div>

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

</li><li><a class="index-entry-id" id="index-_002eprogname-qualifier-in-texmf_002ecnf"></a>
If &lsquo;<samp class="samp">.<var class="var">progname</var></samp>&rsquo; is present (preceding spaces are
ignored), the definition only applies if the program that is running
is named (i.e., the last component of <code class="code">argv[0]</code> is)
<var class="var">progname</var> or <samp class="file"><var class="var">progname</var>.{exe,bat,cmd,...}</samp>.  Most
notably, this allows different flavors of TeX to have different
search paths.  The <var class="var">progname</var> value is used literally, without
variable or other expansions.

</li><li><a class="index-entry-id" id="index-right_002dhand-side-of-variable-assignments"></a>
Considered as strings, <var class="var">value</var> may contain any character.
However, in practice most <samp class="file">texmf.cnf</samp> values are related to path
expansion, and since various special characters are used in expansion,
such as braces and commas, they cannot be used in directory names.
  
<p>The &lsquo;<samp class="samp">$<var class="var">var</var>.<var class="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).
</p>
<a class="index-entry-id" id="index-_003b-translated-to-_003a-in-texmf_002ecnf"></a>
<p>A &lsquo;<samp class="samp">;</samp>&rsquo; in <var class="var">value</var> is translated to &lsquo;<samp class="samp">:</samp>&rsquo; if running under
Unix, in order to have a single <samp class="file">texmf.cnf</samp> that can support both
Unix and Windows systems. This translation happens with any value, not
just search paths, but fortunately in practice &lsquo;<samp class="samp">;</samp>&rsquo; is not needed
in other values.
</p>
</li><li>All definitions are read before anything is expanded, so you can
use variables before they are defined (like Make, unlike most other
programs).
</li></ul>

<p>Here is a configuration file fragment illustrating most of
these points:
</p>
<div class="example">
<pre class="example-preformatted">% 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></div>

<a class="index-entry-id" id="index-_003d-omitted-in-texmf_002ecnf-and-misparsing"></a>
<p>The combination of spaces being ignored before the <code class="code">.</code> of a
program name qualifer and the optional &lsquo;<samp class="samp">=</samp>&rsquo; for the assignment has
an unexpected consequence: if the value begins with a literal &lsquo;<samp class="samp">.</samp>&rsquo;
and the &lsquo;<samp class="samp">=</samp>&rsquo; is omitted, the intended value is interpreted as a
program name.  For example, a line <code class="code">var .;/some/path</code> is taken as
an empty value for <code class="code">var</code> running under the program named
&lsquo;<samp class="samp">;/some/path</samp>&rsquo;.  To diagnose this, Kpathsea warns if the program
name contains a path separator or other special character.  The
simplest way to avoid the problem is to use the <code class="code">=</code>.
</p>
<p>Exactly when a character will be considered special or act as itself
depends on the context in which it is used. The rules are inherent in
the multiple levels of interpretation of the configuration (parsing,
expansion, search, &hellip;) and so cannot be concisely stated,
unfortunately. There is no general escape mechanism; in particular,
&lsquo;<samp class="samp">\</samp>&rsquo; is not an &ldquo;escape character&rdquo; in <samp class="file">texmf.cnf</samp> files.
When it comes choosing directory names for installation, it is safest to
avoid them all.
</p>
<a class="index-entry-id" id="index-cnf_002ec"></a>
<p>The implementation of all this is in <samp class="file">kpathsea/cnf.c</samp>.
</p>

<hr>
</div>
</div>
<div class="section-level-extent" id="Path-expansion">
<div class="nav-panel">
<p>
Next: <a href="#Casefolding-search" accesskey="n" rel="next">Casefolding search</a>, Previous: <a href="#Path-sources" accesskey="p" rel="prev">Path sources</a>, Up: <a href="#Path-searching" accesskey="u" rel="up">Path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Path-expansion-1"><span>5.3 Path expansion<a class="copiable-link" href="#Path-expansion-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-path-expansion"></a>
<a class="index-entry-id" id="index-expansion_002c-search-path"></a>

<p>Kpathsea recognizes certain special characters and constructions in
search paths, similar to that in shells.  As a general example:
&lsquo;<samp class="samp">~$USER/{foo,bar}//baz</samp>&rsquo; expands to all subdirectories under
directories <samp class="file">foo</samp> and <samp class="file">bar</samp> in <code class="t">$USER</code>&rsquo;s home directory that
contain a directory or file <samp class="file">baz</samp>.
</p>
<p>These expansions are explained in the sections below.
</p>


<ul class="mini-toc">
<li><a href="#Default-expansion" accesskey="1">Default expansion</a></li>
<li><a href="#Variable-expansion" accesskey="2">Variable expansion</a></li>
<li><a href="#Tilde-expansion" accesskey="3">Tilde expansion</a></li>
<li><a href="#Brace-expansion" accesskey="4">Brace expansion</a></li>
<li><a href="#KPSE_005fDOT-expansion" accesskey="5"><code class="code">KPSE_DOT</code> expansion</a></li>
<li><a href="#Subdirectory-expansion" accesskey="6">Subdirectory expansion</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Default-expansion">
<div class="nav-panel">
<p>
Next: <a href="#Variable-expansion" accesskey="n" rel="next">Variable expansion</a>, Up: <a href="#Path-expansion" accesskey="u" rel="up">Path expansion</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Default-expansion-1"><span>5.3.1 Default expansion<a class="copiable-link" href="#Default-expansion-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-_003a_003a-expansion"></a>
<a class="index-entry-id" id="index-doubled-colons"></a>
<a class="index-entry-id" id="index-leading-colons"></a>
<a class="index-entry-id" id="index-trailing-colons"></a>
<a class="index-entry-id" id="index-extra-colons"></a>
<a class="index-entry-id" id="index-default-expansion"></a>
<a class="index-entry-id" id="index-expansion_002c-default"></a>

<p>If the highest-priority search path (see <a class="pxref" href="#Path-sources">Path sources</a>) contains an
<em class="dfn">extra colon</em> (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>
<p>For example, given an environment variable setting
</p>
<div class="example">
<pre class="example-preformatted">setenv TEXINPUTS /home/karl:
</pre></div>

<p>and a <code class="code">TEXINPUTS</code> value from <samp class="file">texmf.cnf</samp> of
</p>
<div class="example">
<pre class="example-preformatted">.:$TEXMF//tex
</pre></div>

<p>then the final value used for searching will be:
</p>
<div class="example">
<pre class="example-preformatted">/home/karl:.:$TEXMF//tex
</pre></div>

<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 class="samp">:</samp>&rsquo; ignored in the first case and expanded in the second:
</p>
<div class="example">
<pre class="example-preformatted">$ env TTFONTS=/tmp: kpsewhich --expand-path '$TTFONTS'
/tmp
$ env TTFONTS=/tmp: kpsewhich --show-path=.ttf
/tmp:.:/home/olaf/texmf/fonts/truetype//:...
</pre></div>

<p>Since Kpathsea looks for multiple configuration files, it would be
natural to expect that (for example) an extra colon in
<samp class="file">./texmf.cnf</samp> would expand to the path in <samp class="file">$TEXMF/texmf.cnf</samp>.
Or, with Dvips&rsquo; configuration files, that an extra colon in
<samp class="file">config.$PRINTER</samp> would expand to the path in <samp class="file">config.ps</samp>.
This doesn&rsquo;t happen.  It&rsquo;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 class="index-entry-id" id="index-Bach_002c-Johann-Sebastian"></a>
</p>
<p>Technicality: Since it would be useless to insert the default value in
more than one place, Kpathsea changes only one extra &lsquo;<samp class="samp">:</samp>&rsquo; and leaves
any others in place (they will eventually be ignored).  Kpathsea checks
first for a leading &lsquo;<samp class="samp">:</samp>&rsquo;, then a trailing &lsquo;<samp class="samp">:</samp>&rsquo;, then a doubled
&lsquo;<samp class="samp">:</samp>&rsquo;.
</p>
<a class="index-entry-id" id="index-kdefault_002ec"></a>
<p>You can trace this by debugging &ldquo;paths&rdquo; (see <a class="pxref" href="#Debugging">Debugging</a>).
Default expansion is implemented in the source file
<samp class="file">kpathsea/kdefault.c</samp>.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Variable-expansion">
<div class="nav-panel">
<p>
Next: <a href="#Tilde-expansion" accesskey="n" rel="next">Tilde expansion</a>, Previous: <a href="#Default-expansion" accesskey="p" rel="prev">Default expansion</a>, Up: <a href="#Path-expansion" accesskey="u" rel="up">Path expansion</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Variable-expansion-1"><span>5.3.2 Variable expansion<a class="copiable-link" href="#Variable-expansion-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-_0024-expansion"></a>
<a class="index-entry-id" id="index-environment-variables-in-paths"></a>
<a class="index-entry-id" id="index-variable-expansion"></a>
<a class="index-entry-id" id="index-expansion_002c-variable"></a>
<a class="index-entry-id" id="index-texmf_002ecnf_002c-and-variable-expansion"></a>

<p>&lsquo;<samp class="samp">$foo</samp>&rsquo; or &lsquo;<samp class="samp">${foo}</samp>&rsquo; in a path element is replaced by (1) the
value of an environment variable &lsquo;<samp class="samp">foo</samp>&rsquo; (if defined); (2) the value
of &lsquo;<samp class="samp">foo</samp>&rsquo; from <samp class="file">texmf.cnf</samp> (if defined); (3) the empty string.
</p>
<p>If the character after the &lsquo;<samp class="samp">$</samp>&rsquo; is alphanumeric or &lsquo;<samp class="samp">_</samp>&rsquo;, the
variable name consists of all consecutive such characters. If the
character after the &lsquo;<samp class="samp">$</samp>&rsquo; is a &lsquo;<samp class="samp">{</samp>&rsquo;, the variable name consists
of everything up to the next &lsquo;<samp class="samp">}</samp>&rsquo; (braces may not be nested around
variable names).  Otherwise, Kpathsea gives a warning and ignores the
&lsquo;<samp class="samp">$</samp>&rsquo; and its following character.
</p>
<a class="index-entry-id" id="index-quoting-variable-values"></a>
<a class="index-entry-id" id="index-shell-variables"></a>
<p>You must quote the <code class="t">$</code>&rsquo;s and braces as necessary for your shell.
<em class="emph">Shell</em> variable values cannot be seen by Kpathsea, i.e., ones
defined by <code class="code">set</code> in C shells and without <code class="code">export</code> in Bourne
shells.
</p>
<p>For example, given
</p><div class="example">
<pre class="example-preformatted">setenv tex /home/texmf
setenv TEXINPUTS .:$tex:${tex}prev
</pre></div>
<p>the final <code class="code">TEXINPUTS</code> path is the three directories:
</p><div class="example">
<pre class="example-preformatted">.:/home/texmf:/home/texmfprev
</pre></div>

<p>The &lsquo;<samp class="samp">.<var class="var">progname</var></samp>&rsquo; suffix on variables and
&lsquo;<samp class="samp">_<var class="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 class="pxref" href="#Path-sources">Path sources</a>).
</p>
<a class="index-entry-id" id="index-variable_002ec"></a>
<p>Variable expansion is implemented in the source file
<samp class="file">kpathsea/variable.c</samp>.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Tilde-expansion">
<div class="nav-panel">
<p>
Next: <a href="#Brace-expansion" accesskey="n" rel="next">Brace expansion</a>, Previous: <a href="#Variable-expansion" accesskey="p" rel="prev">Variable expansion</a>, Up: <a href="#Path-expansion" accesskey="u" rel="up">Path expansion</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Tilde-expansion-1"><span>5.3.3 Tilde expansion<a class="copiable-link" href="#Tilde-expansion-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-_007e-expansion"></a>
<a class="index-entry-id" id="index-home-directories-in-paths"></a>
<a class="index-entry-id" id="index-tilde-expansion"></a>
<a class="index-entry-id" id="index-expansion_002c-tilde"></a>

<a class="index-entry-id" id="index-HOME_002c-as-_007e-expansion"></a>
<a class="index-entry-id" id="index-USERPROFILE_002c-as-_007e-expansion"></a>
<p>A leading &lsquo;<samp class="samp">~</samp>&rsquo; in a path element is replaced by the value of the
environment variable <code class="code">HOME</code>, or <samp class="file">.</samp> if <code class="code">HOME</code> is not
set.  On Windows, the environment variable <code class="code">USERPROFILE</code> is
checked instead of <code class="code">HOME</code>.
</p>
<p>A leading &lsquo;<samp class="samp">~<var class="var">user</var></samp>&rsquo; in a path element is replaced by
<var class="var">user</var>&rsquo;s home directory from the system <samp class="file">passwd</samp> database.
</p>
<p>For example,
</p><div class="example">
<pre class="example-preformatted">setenv TEXINPUTS ~/mymacros:
</pre></div>

<p>will prepend a directory <samp class="file">mymacros</samp> in your home
directory to the default path.
</p>
<a class="index-entry-id" id="index-root-user"></a>
<a class="index-entry-id" id="index-trailing-_002f-in-home-directory"></a>
<a class="index-entry-id" id="index-_002f_002c-trailing-in-home-directory"></a>
<p>As a special case, if a home directory ends in &lsquo;<samp class="samp">/</samp>&rsquo;, the trailing
slash is dropped, to avoid inadvertently creating a &lsquo;<samp class="samp">//</samp>&rsquo; construct
in the path.  For example, if the home directory of the user &lsquo;<samp class="samp">root</samp>&rsquo;
is &lsquo;<samp class="samp">/</samp>&rsquo;, the path element &lsquo;<samp class="samp">~root/mymacros</samp>&rsquo; expands to just
&lsquo;<samp class="samp">/mymacros</samp>&rsquo;, not &lsquo;<samp class="samp">//mymacros</samp>&rsquo;.
</p>
<a class="index-entry-id" id="index-tilde_002ec"></a>
<p>Tilde expansion is implemented in the source file <samp class="file">kpathsea/tilde.c</samp>.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Brace-expansion">
<div class="nav-panel">
<p>
Next: <a href="#KPSE_005fDOT-expansion" accesskey="n" rel="next"><code class="code">KPSE_DOT</code> expansion</a>, Previous: <a href="#Tilde-expansion" accesskey="p" rel="prev">Tilde expansion</a>, Up: <a href="#Path-expansion" accesskey="u" rel="up">Path expansion</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Brace-expansion-1"><span>5.3.4 Brace expansion<a class="copiable-link" href="#Brace-expansion-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-_007b-expansion"></a>
<a class="index-entry-id" id="index-brace-expansion"></a>

<p>&lsquo;<samp class="samp">x{<var class="var">a</var>,<var class="var">b</var>}y</samp>&rsquo; expands to &lsquo;<samp class="samp">x<var class="var">a</var>y:x<var class="var">b</var>y</samp>&rsquo;.
For example:
</p>
<div class="example">
<pre class="example-preformatted">foo/{1,2}/baz
</pre></div>

<p>expands to &lsquo;<samp class="samp">foo/1/baz:foo/2/baz</samp>&rsquo;.  &lsquo;<samp class="samp">:</samp>&rsquo; is the path
separator on the current system; e.g., on a Windows system, it&rsquo;s &lsquo;<samp class="samp">;</samp>&rsquo;.
</p>
<p>Braces can be nested; for example, &lsquo;<samp class="samp">x{A,B{1,2}}y</samp>&rsquo; expands to
&lsquo;<samp class="samp">xAy:xB1y:xB2y</samp>&rsquo;.
</p>
<p>Multiple non-nested braces are expanded from right to left; for example,
&lsquo;<samp class="samp">x{A,B}{1,2}y</samp>&rsquo; expands to &lsquo;<samp class="samp">x{A,B}1y:x{A,B}2y</samp>&rsquo;, which
expands to &lsquo;<samp class="samp">xA1y:xB1y:xA2y:xB2y</samp>&rsquo;.
</p>
<a class="index-entry-id" id="index-multiple-TeX-hierarchies"></a>
<p>This feature can be used to implement multiple TeX hierarchies, by
assigning a brace list to <code class="code">$TEXMF</code>, as mentioned in
<samp class="file">texmf.in</samp>.
</p>
<p>You can also use the path separator instead of the comma.  The last
example could have been written &lsquo;<samp class="samp">x{A:B}{1:2}y</samp>&rsquo; (on Unix).
</p>

<a class="index-entry-id" id="index-expand_002ec"></a>
<p>Brace expansion is implemented in the source file
<samp class="file">kpathsea/expand.c</samp>.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="KPSE_005fDOT-expansion">
<div class="nav-panel">
<p>
Next: <a href="#Subdirectory-expansion" accesskey="n" rel="next">Subdirectory expansion</a>, Previous: <a href="#Brace-expansion" accesskey="p" rel="prev">Brace expansion</a>, Up: <a href="#Path-expansion" accesskey="u" rel="up">Path expansion</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="KPSE_005fDOT-expansion-1"><span>5.3.5 <code class="code">KPSE_DOT</code> expansion<a class="copiable-link" href="#KPSE_005fDOT-expansion-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-KPSE_005fDOT-expansion"></a>

<p>When <code class="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 class="samp">mktex&hellip;</samp>&rsquo; scripts <a class="ref" href="#mktex-scripts"><samp class="file">mktex</samp> scripts</a>, because these
change the working directory.  You should not ever define it yourself.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Subdirectory-expansion">
<div class="nav-panel">
<p>
Previous: <a href="#KPSE_005fDOT-expansion" accesskey="p" rel="prev"><code class="code">KPSE_DOT</code> expansion</a>, Up: <a href="#Path-expansion" accesskey="u" rel="up">Path expansion</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Subdirectory-expansion-1"><span>5.3.6 Subdirectory expansion<a class="copiable-link" href="#Subdirectory-expansion-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-_002f_002f"></a>
<a class="index-entry-id" id="index-subdirectory-searching"></a>
<a class="index-entry-id" id="index-expansion_002c-subdirectory"></a>

<a class="index-entry-id" id="index-alphabetical-order_002c-not"></a>
<p>Two or more consecutive slashes in a path element following a directory
<var class="var">d</var> is replaced by all subdirectories of <var class="var">d</var>: first those
subdirectories directly under <var class="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&rsquo;s &ldquo;directory order&rdquo;, and definitely not
alphabetical.)
</p>
<p>If you specify any filename components after the &lsquo;<samp class="samp">//</samp>&rsquo;, only
subdirectories which match those components are included.  For example,
&lsquo;<samp class="samp">/a//b</samp>&rsquo; would expand into directories <samp class="file">/a/1/b</samp>, <samp class="file">/a/2/b</samp>,
<samp class="file">/a/1/1/b</samp>, and so on, but not <samp class="file">/a/b/c</samp> or <samp class="file">/a/1</samp>.
</p>
<p>You can include multiple &lsquo;<samp class="samp">//</samp>&rsquo; constructs in the path.
</p>
<p>&lsquo;<samp class="samp">//</samp>&rsquo; at the beginning of a path is ignored; you didn&rsquo;t really want
to search every directory on the system, did you?
</p>
<a class="index-entry-id" id="index-trick-for-detecting-leaf-directories"></a>
<a class="index-entry-id" id="index-leaf-directory-trick"></a>
<a class="index-entry-id" id="index-Farwell_002c-Matthew"></a>
<a class="index-entry-id" id="index-MacKenzie_002c-David-1"></a>
<p>I should mention one related implementation trick, which I took from GNU
find.  Matthew Farwell suggested it, and David MacKenzie implemented it.
</p>
<a class="index-entry-id" id="index-st_005fnlink"></a>
<p>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 class="file">.</samp> and one for <samp class="file">..</samp>).
That is to say, the <code class="code">st_nlink</code> field in the &lsquo;<samp class="samp">stat</samp>&rsquo; structure
will be two.  Thus, we don&rsquo;t have to stat everything in the bottom-level
(leaf) directories&mdash;we can just check <code class="code">st_nlink</code>, notice it&rsquo;s two,
and do no more work.
</p>
<p>But if you have a directory that contains a single subdirectory and 500
regular files, <code class="code">st_nlink</code> will be 3, and Kpathsea has to stat every
one of those 501 entries.  Therein lies slowness.
</p>
<a class="index-entry-id" id="index-ST_005fNLINK_005fTRICK"></a>
<p>You can disable the trick by undefining <code class="code">ST_NLINK_TRICK</code> in
<samp class="file">kpathsea/config.h</samp>. (It is undefined by default except under Unix.)
</p>
<a class="index-entry-id" id="index-elt_002ddirs_002ec"></a>
<p>Unfortunately, in some cases files in leaf directories are
<code class="code">stat</code>&rsquo;d: if the path specification is, say,
&lsquo;<samp class="samp">$TEXMF/fonts//pk//</samp>&rsquo;, then files in a subdirectory
&lsquo;<samp class="samp">&hellip;/pk</samp>&rsquo;, even if it is a leaf, are checked. The reason
cannot be explained without reference to the implementation, so read
<samp class="file">kpathsea/elt-dirs.c</samp> (search for &lsquo;<samp class="samp">may descend</samp>&rsquo;) if you are
curious.  And if you find a way to solve the problem, please let me
know.
</p>
<a class="index-entry-id" id="index-elt_002ddirs_002ec-1"></a>
<p>Subdirectory expansion is implemented in the source file
<samp class="file">kpathsea/elt-dirs.c</samp>.
</p>

<hr>
</div>
</div>
<div class="section-level-extent" id="Casefolding-search">
<div class="nav-panel">
<p>
Next: <a href="#Filename-database" accesskey="n" rel="next">Filename database (<code class="code">ls-R</code>)</a>, Previous: <a href="#Path-expansion" accesskey="p" rel="prev">Path expansion</a>, Up: <a href="#Path-searching" accesskey="u" rel="up">Path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Casefolding-search-1"><span>5.4 Casefolding search<a class="copiable-link" href="#Casefolding-search-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-casefolding-search"></a>
<a class="index-entry-id" id="index-search_002c-case_002dinsensitive"></a>

<p>In Kpathsea version 6.3.0 (released with TeX Live 2018), a new
fallback search was implemented on Unix-like systems, including Macs:
for each path element in turn, if no match is found by the normal
search, and the path element allows for checking the filesystem, a
second check is made for a case-insensitive match.
</p>
<a class="index-entry-id" id="index-texmf_005fcasefold_005fsearch"></a>
<p>This is enabled at compile-time on Unix systems, and enabled at
runtime by setting the configuration variable
<code class="code">texmf_casefold_search</code>, to a true value, e.g., &lsquo;<samp class="samp">1</samp>&rsquo;; this is
done by default in TeX Live.
</p>

<ul class="mini-toc">
<li><a href="#Casefolding-rationale" accesskey="1">Casefolding rationale</a></li>
<li><a href="#Casefolding-examples" accesskey="2">Casefolding examples</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Casefolding-rationale">
<div class="nav-panel">
<p>
Next: <a href="#Casefolding-examples" accesskey="n" rel="next">Casefolding examples</a>, Up: <a href="#Casefolding-search" accesskey="u" rel="up">Casefolding search</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Casefolding-rationale-1"><span>5.4.1 Casefolding rationale<a class="copiable-link" href="#Casefolding-rationale-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-casefolding-fallback-rationale"></a>
<a class="index-entry-id" id="index-rationale-for-casefolding-fallback"></a>
<a class="index-entry-id" id="index-system_002ddependent-casefolding-behavior"></a>

<a class="index-entry-id" id="index-filesystem_002c-case_002d_0028in_0029sensitive"></a>
<a class="index-entry-id" id="index-Apple-filesystem_002c-case_002dinsensitive"></a>
<a class="index-entry-id" id="index-Mac-filesystem_002c-case_002dinsensitive"></a>
<p>The purpose of the fallback casefolding search is to ease moving
complex documents between case-insensitive (file)systems and
case-sensitive ones.  In particular, Apple decided to make the default
filesystem on Macs be case-insensitive some years ago, and this has
exacerbated a problem of people creating documents that use, say, an
image under the name <samp class="file">foo.jpg</samp>, while the actual file is named
<samp class="file">foo.JPG</samp> or <samp class="file">Foo.jpg</samp>. It works on the Mac but if the
document is transferred and run on a standard case-sensitive Unix
(file)system, the file can&rsquo;t be found, due only to differences in
case.
</p>
<p>This same problematic scenario has always existed on Windows, but for
whatever reason, it has become much more common since Apple also went
to a case-insensitive filesystem.  Hence the relatively late change
to the Kpathsea behavior.
</p>
<a class="index-entry-id" id="index-Windows-and-casefolding"></a>
<p>The fallback case-insensitive search is omitted at compile-time on
Windows, where (for practical purposes) all file names are
case-insensitive at the kernel level, and so the normal search will
already have definitively matched or not.  Therefore, search results
in unusual cases can be different on Windows and Unix&mdash;but this has
always been true.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Casefolding-examples">
<div class="nav-panel">
<p>
Previous: <a href="#Casefolding-rationale" accesskey="p" rel="prev">Casefolding rationale</a>, Up: <a href="#Casefolding-search" accesskey="u" rel="up">Casefolding search</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Casefolding-examples-1"><span>5.4.2 Casefolding examples<a class="copiable-link" href="#Casefolding-examples-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-casefolding-examples"></a>
<a class="index-entry-id" id="index-examples_002c-of-casefolding-searches"></a>

<p>The casefolding implementation prefers exact matches to casefolded
matches within a given path element, so as to retain most
compatibility.  Backward compatibility is not perfect, however, as a
casefolded match may be found in an earlier path element than an exact
match was previously found (see example #4 below).  Still, preferring
the match in the earlier element seemed potentially less confusing
than otherwise, and is in fact consistent with past behavior on
Windows.  Since case mismatches are rare to begin with, and name
collisions with respect only to case thus even more rare, the hope is
that it will not cause difficulties in practice.
</p>
<p>If it&rsquo;s desirable in a given situation to have the exact same search
behavior as previously, that can be accomplished by setting the
configuration variable <code class="code">texmf_casefold_search</code> to &lsquo;<samp class="samp">0</samp>&rsquo;
(see <a class="pxref" href="#Path-sources">Path sources</a>).
</p>
<p>Some examples to illustrate the new behavior follow.
</p>
<p>Example #1: suppose the file <samp class="file">./foobar.tex</samp> exists. Now,
searching for <samp class="file">./FooBar.TeX</samp> (or any other case variation) will
succeed, returning <samp class="file">./foobar.tex</samp>&mdash;the name as stored on disk.
In previous releases, or if <code class="code">texmf_casefold_search</code> is false, the
search would fail.
</p>
<p>Example #2: suppose we are using a case-sensitive (file)system, and
the search path is &lsquo;<samp class="samp">.:/somedir</samp>&rsquo;, and the files
<samp class="file">./foobar.tex</samp> and <samp class="file">/somedir/FooBar.TeX</samp> both exist.  Both
now and previously, searching for <samp class="file">foobar.tex</samp> returns
<samp class="file">./foobar.tex</samp>.  However, searching for <samp class="file">FooBar.TeX</samp> now
returns <samp class="file">./foobar.tex</samp> instead of <samp class="file">/somedir/FooBar.TeX</samp>;
this is the incompatibility mentioned above.  Also (as expected),
searching for <samp class="file">FOOBAR.TEX</samp> (or whatever variation) will now
return <samp class="file">./foobar.tex</samp>, whereas before it would fail.  Searching
for all (&lsquo;<samp class="samp">kpsewhich --all</samp>&rsquo;) <samp class="file">foobar.tex</samp> will return both
matches.
</p>
<p>Example #3: same as example #2, but on a case-insensitive
(file)system: both now and previously, searching for <samp class="file">FooBar.TeX</samp>
returns <samp class="file">./foobar.tex</samp>, since the system considers that a match.
The Kpathsea casefolding never comes into play.
</p>
<p>Example #4: if we have (on a case-sensitive system) both
<samp class="file">./foobar.tex</samp> and <samp class="file">./FOOBAR.TEX</samp>, searching with the exact
case returns that exact match, now and previously.  Searching for
<samp class="file">FooBar.tex</samp> will now return one or the other (chosen
arbitrarily), rather than failing.  Perhaps unexpectedly, searching
for all <samp class="file">foobar.tex</samp> or <samp class="file">FooBar.tex</samp> will also return only
one or the other, not both (see more below).
</p>
<p>Example #5: the font file <samp class="file">STIX-Regular.otf</samp> is included in
TeX Live in the system directory
<samp class="file">texmf-dist/fonts/opentype/public/stix</samp>.  Because Kpathsea never
searches the disk in the big system directory, the casefolding is not
done, and a search for &lsquo;<samp class="samp">stix-regular.otf</samp>&rsquo; will fail (on
case-sensitive systems), as it always has.
</p>
<a class="index-entry-id" id="index-_0021_0021-and-casefolding"></a>
<p>The caveat about not searching the disk amounts to saying that
casefolding does not happen in the trees specified with &lsquo;<samp class="samp">!!</samp>&rsquo;
(see <a class="pxref" href="#ls_002dR"><samp class="file">ls-R</samp></a>), that is, where only database (<samp class="file">ls-R</samp>) searching
is done.  In TeX Live, that is the &lsquo;<samp class="samp">texmf-local</samp>&rsquo; and
&lsquo;<samp class="samp">texmf-dist</samp>&rsquo; trees (also <code class="code">$TEXMFSYSCONFIG</code> and
<code class="code">$TEXMFSYSVAR</code>, but those are rarely noticed).  The rationale for
this is that in practice, case mangling happens with user-created
files, not with packages distributed as part of the TeX system.
</p>
<p>One more caveat: the purpose of <code class="code">kpsewhich</code> is to exercise the
path searching in Kpathsea as it is actually done.  Therefore, as
shown above, &lsquo;<samp class="samp">kpsewhich --all</samp>&rsquo; will not return all matches
regardless of case within a given path element.  If you want to find
all matches in all directories, <code class="code">find</code> is the best tool, although
the setup takes a couple steps:
</p>
<div class="example">
<pre class="example-preformatted">kpsewhich -show-path=tex &gt;/tmp/texpath      # search path specification
kpsewhich -expand-path=&quot;`cat /tmp/texpath`&quot; &gt;/tmp/texdirs  # all dirs
tr ':' '\n' &lt;/tmp/texdirs &gt;/tmp/texdirlist  # colons to newlines
find `cat /tmp/texdirlist` -iname somefile.tex -print &lt;/tmp/texdirlist
</pre></div>

<a class="index-entry-id" id="index-Findutils_002c-GNU-package"></a>
<a class="index-entry-id" id="index-_002diname_002c-find-predicate"></a>
<p>Sorry that it&rsquo;s annoyingly lengthy, but implementing this inside
Kpathsea would be a lot of error-prone trouble for something that is
only useful for debugging.  If your <code class="code">find</code> does not support
<code class="code">-iname</code>, you can get GNU Find from
<a class="url" href="https://gnu.org/software/findutils">https://gnu.org/software/findutils</a>.
</p>
<p>The casefolding search is implemented in the source file
<samp class="file">kpathsea/pathsearch.c</samp>.  Two implementation points:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-access-system-call"></a>
Kpathsea never tries to check if a given directory resides on a
case-insensitive filesystem, because there is no efficient and
portable way to do so.  All it does is try to see if a potential file
name is a readable normal file (with, usually, the <code class="code">access</code>
system call).

</li><li>Kpathsea does not do any case-insensitive matching of the directories
along the path.  It&rsquo;s not going to find <samp class="file">/Some/Random/file.tex</samp>
when looking for <samp class="file">/some/random/file.tex</samp>.  The casefolding only
happens with the elements of the leaf directory.

</li></ul>


<hr>
</div>
</div>
<div class="section-level-extent" id="Filename-database">
<div class="nav-panel">
<p>
Next: <a href="#Invoking-kpsewhich" accesskey="n" rel="next"><code class="code">kpsewhich</code>: Standalone path searching</a>, Previous: <a href="#Casefolding-search" accesskey="p" rel="prev">Casefolding search</a>, Up: <a href="#Path-searching" accesskey="u" rel="up">Path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Filename-database-_0028ls_002dR_0029"><span>5.5 Filename database (<code class="code">ls-R</code>)<a class="copiable-link" href="#Filename-database-_0028ls_002dR_0029"> &para;</a></span></h3>

<a class="index-entry-id" id="index-filename-database"></a>
<a class="index-entry-id" id="index-database_002c-for-filenames"></a>
<a class="index-entry-id" id="index-externally_002dbuilt-filename-database"></a>

<p>Kpathsea goes to some lengths to minimize disk accesses for searches
(see <a class="pxref" href="#Subdirectory-expansion">Subdirectory expansion</a>).  Nevertheless, in practice searching
every possible directory in typical TeX installations takes an
excessively long time.
</p>
<p>Therefore, Kpathsea can use an externally-built <em class="dfn">filename
database</em> file named <samp class="file">ls-R</samp> that maps files to directories, thus
avoiding the need to exhaustively search the disk.
</p>
<p>A second database file <samp class="file">aliases</samp> allows you to give additional
names to the files listed in <samp class="file">ls-R</samp>.
</p>
<p>The <samp class="file">ls-R</samp> and <samp class="file">aliases</samp> features are implemented in the
source file <samp class="file">kpathsea/db.c</samp>.
</p>


<ul class="mini-toc">
<li><a href="#ls_002dR" accesskey="1"><samp class="file">ls-R</samp></a></li>
<li><a href="#Filename-aliases" accesskey="2">Filename aliases</a></li>
<li><a href="#Database-format" accesskey="3">Database format</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="ls_002dR">
<div class="nav-panel">
<p>
Next: <a href="#Filename-aliases" accesskey="n" rel="next">Filename aliases</a>, Up: <a href="#Filename-database" accesskey="u" rel="up">Filename database (<code class="code">ls-R</code>)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="ls_002dR-1"><span>5.5.1 <samp class="file">ls-R</samp><a class="copiable-link" href="#ls_002dR-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-ls_002dR-database-file"></a>

<p>As mentioned above, you must name the main filename database
<samp class="file">ls-R</samp>.  You can put one at the root of each TeX installation
hierarchy you wish to search (<code class="code">$TEXMF</code> by default, which expands
to a braced list of several hierarchies in TeX Live). 
</p>
<a class="index-entry-id" id="index-TEXMFDBS"></a>
<a class="index-entry-id" id="index-_0021_0021-in-TEXMFDBS"></a>
<p>Kpathsea looks for <samp class="file">ls-R</samp> files along the <code class="code">TEXMFDBS</code>
path. It is best for this to contain all and only those hierarchies
from <code class="code">$TEXMF</code> which are specified with <code class="code">!!</code>&mdash;and also to
specify them with <code class="code">!!</code> in <code class="code">TEXMFDBS</code>. (See the end of this
section for more on <code class="code">!!</code>.)
</p>
<p>The recommended way to create and maintain &lsquo;<samp class="samp">ls-R</samp>&rsquo; is to run the
<code class="code">mktexlsr</code> script, which is installed in &lsquo;<samp class="samp">$(bindir)</samp>&rsquo;
(<samp class="file">/usr/local/bin</samp> by default).  That script goes to some trouble to
follow symbolic links as necessary, etc.  It&rsquo;s also invoked by the
distributed &lsquo;<samp class="samp">mktex&hellip;</samp>&rsquo; scripts.
</p>
<a class="index-entry-id" id="index-ls_002dR_002c-simplest-build"></a>
<p>At its simplest, though, you can build <samp class="file">ls-R</samp> with the command
</p><div class="example">
<pre class="example-preformatted">cd <var class="var">/your/texmf/root</var> &amp;&amp; ls -LAR ./ &gt;ls-R
</pre></div>

<a class="index-entry-id" id="index-_002d_002dcolor_003dtty"></a>
<a class="index-entry-id" id="index-_002fetc_002fprofile-and-aliases"></a>
<p>presuming your <code class="code">ls</code> produces the right output format (see the
section below).  GNU <code class="code">ls</code>, for example, outputs in this format.
Also presuming your <code class="code">ls</code> hasn&rsquo;t been aliased in a system file
(e.g., <samp class="file">/etc/profile</samp>) to something problematic, e.g., &lsquo;<samp class="samp">ls
--color=tty</samp>&rsquo;.  In that case, you will have to disable the alias before
generating <samp class="file">ls-R</samp>.  For the precise definition of the file format,
see <a class="ref" href="#Database-format">Database format</a>.
</p>
<p>Regardless of whether you use the supplied script or your own, you
will almost certainly want to invoke it via <code class="code">cron</code>, so when you
make changes in the installed files (say if you install a new LaTeX
package), <samp class="file">ls-R</samp> will be automatically updated.  However, for
those using TeX Live or system distributions, the package managers
should run <code class="code">mktexlsr</code> as needed.
</p>
<a class="index-entry-id" id="index-_002dA-option-to-ls"></a>
<a class="index-entry-id" id="index-dot-files"></a>
<a class="index-entry-id" id="index-_002e-files"></a>
<a class="index-entry-id" id="index-_002e-directories_002c-ignored"></a>
<a class="index-entry-id" id="index-_002etex-file_002c-included-in-ls_002dR"></a>
<p>The &lsquo;<samp class="samp">-A</samp>&rsquo; option to <code class="code">ls</code> includes files beginning with &lsquo;<samp class="samp">.</samp>&rsquo;
(except for <samp class="file">.</samp> and <samp class="file">..</samp>), such as the file <samp class="file">.tex</samp>
included with the LaTeX tools package.  (On the other hand,
<em class="emph">directories</em> whose names begin with &lsquo;<samp class="samp">.</samp>&rsquo; are always ignored.)
</p>
<a class="index-entry-id" id="index-symbolic-links_002c-and-ls_002dR"></a>
<a class="index-entry-id" id="index-_002dL-option-to-ls"></a>
<p>If your system does not support symbolic links, omit the &lsquo;<samp class="samp">-L</samp>&rsquo;.
</p>
<a class="index-entry-id" id="index-automounter_002c-and-ls_002dR"></a>
<a class="index-entry-id" id="index-NFS-and-ls_002dR"></a>
<p><code class="code">ls -LAR <var class="var">/your/texmf/root</var></code> will also work.  But using
&lsquo;<samp class="samp">./</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 class="index-entry-id" id="index-warning-about-unusable-ls_002dR"></a>
<a class="index-entry-id" id="index-unusable-ls_002dR-warning"></a>
<p>Kpathsea warns you if it finds an <samp class="file">ls-R</samp> file, but the file does
not contain any usable entries.  The usual culprit is running plain
&lsquo;<samp class="samp">ls -R</samp>&rsquo; instead of &lsquo;<samp class="samp">ls -LR ./</samp>&rsquo; or &lsquo;<samp class="samp">ls -R
<var class="var">/your/texmf/root</var></samp>&rsquo;.  Another possibility is some system directory
name starting with a &lsquo;<samp class="samp">.</samp>&rsquo; (perhaps if you are using AFS); Kpathsea
ignores everything under such directories.
</p>
<a class="index-entry-id" id="index-_0021_0021-in-path-specifications"></a>
<a class="index-entry-id" id="index-disk-searching_002c-avoiding"></a>
<p>If a particular path element begins with &lsquo;<samp class="samp">!!</samp>&rsquo;, <em class="emph">only</em> the
database will be searched for that element, never the disk; and if the
database does not exist, nothing at all will be searched.  In TeX
Live, most of the trees are specified with &lsquo;<samp class="samp">!!</samp>&rsquo;.
</p>
<p>For path elements that do not begin with &lsquo;<samp class="samp">!!</samp>&rsquo;, if the database
exists, it will be used, and the disk will not be searched.  However,
in this case, if the database does not exist, the disk will be
searched.  In TeX Live, the most notable case of this is the
<code class="code">TEXMFHOME</code> tree, to allow users to add and remove files from
their own tree without having to worry about <code class="code">ls-R</code>.
</p>
<p>(Aside: there are uncommon cases where a &lsquo;<samp class="samp">!!</samp>&rsquo; tree will be
searched on disk even if the <code class="code">ls-R</code> file exists; they are too
obscure to try to explain here.  See <samp class="file">pathsearch.c</samp> in the source
if you need to know.)
</p>
<p>To sum up: do not create an <code class="code">ls-R</code> file unless you also take care
to keep it up to date. Otherwise newly-installed files will not be
found.
</p>


<hr>
</div>
<div class="subsection-level-extent" id="Filename-aliases">
<div class="nav-panel">
<p>
Next: <a href="#Database-format" accesskey="n" rel="next">Database format</a>, Previous: <a href="#ls_002dR" accesskey="p" rel="prev"><samp class="file">ls-R</samp></a>, Up: <a href="#Filename-database" accesskey="u" rel="up">Filename database (<code class="code">ls-R</code>)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Filename-aliases-1"><span>5.5.2 Filename aliases<a class="copiable-link" href="#Filename-aliases-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-filename-aliases"></a>
<a class="index-entry-id" id="index-aliases_002c-for-filenames"></a>

<p>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 class="file">longtabl.sty</samp>.  But now it&rsquo;s being run on a Unix
system, and the file has its original name, <samp class="file">longtable.sty</samp>.  The
file won&rsquo;t be found.  You need to give the actual file
<samp class="file">longtable.sty</samp> an alias &lsquo;<samp class="samp">longtabl.sty</samp>&rsquo;.
</p>

<p>You can handle this by creating a file <samp class="file">aliases</samp> as a companion to
the <samp class="file">ls-R</samp> for the hierarchy containing the file in question.  (You
must have an <samp class="file">ls-R</samp> for the alias feature to work.)
</p>
<p>The format of <samp class="file">aliases</samp> is simple: two whitespace-separated words
per line; the first is the real name <samp class="file">longtable.sty</samp>, and second is
the alias (<samp class="file">longtabl.sty</samp>).  These must be base filenames, with no
directory components.  <samp class="file">longtable.sty</samp> must be in the sibling
<samp class="file">ls-R</samp>.
</p>
<p>Also, blank lines and lines starting with &lsquo;<samp class="samp">%</samp>&rsquo; or &lsquo;<samp class="samp">#</samp>&rsquo; are
ignored in <samp class="file">aliases</samp>, to allow for comments.
</p>
<p>If a real file <samp class="file">longtabl.sty</samp> exists, it is used regardless of any
aliases.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Database-format">
<div class="nav-panel">
<p>
Previous: <a href="#Filename-aliases" accesskey="p" rel="prev">Filename aliases</a>, Up: <a href="#Filename-database" accesskey="u" rel="up">Filename database (<code class="code">ls-R</code>)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Database-format-1"><span>5.5.3 Database format<a class="copiable-link" href="#Database-format-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-format-of-external-database"></a>
<a class="index-entry-id" id="index-database_002c-format-of"></a>

<p>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 class="code">ls</code>
programs given the &lsquo;<samp class="samp">-R</samp>&rsquo; option, as follows.
</p>
<ul class="itemize mark-bullet">
<li>Blank lines are ignored.

</li><li>If a line begins with &lsquo;<samp class="samp">/</samp>&rsquo; or &lsquo;<samp class="samp">./</samp>&rsquo; or &lsquo;<samp class="samp">../</samp>&rsquo; and ends with
a colon, it&rsquo;s the name of a directory.  (&lsquo;<samp class="samp">../</samp>&rsquo; lines aren&rsquo;t useful,
however, and should not be generated.)

</li><li>All other lines define entries in the most recently seen directory.
<code class="t">/</code>&rsquo;s in such lines will produce possibly-strange results.

</li><li>Files with no preceding directory line are ignored.
</li></ul>

<p>For example, here&rsquo;s the first few lines of <samp class="file">ls-R</samp> (which totals
about 30K bytes) on my system:
</p>
<div class="example">
<pre class="example-preformatted">bibtex
dvips
fonts
ls-R
metafont
metapost
tex
web2c

./bibtex:
bib
bst
doc

./bibtex/bib:
asi.bib
btxdoc.bib
...
</pre></div>


<hr>
</div>
</div>
<div class="section-level-extent" id="Invoking-kpsewhich">
<div class="nav-panel">
<p>
Previous: <a href="#Filename-database" accesskey="p" rel="prev">Filename database (<code class="code">ls-R</code>)</a>, Up: <a href="#Path-searching" accesskey="u" rel="up">Path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="kpsewhich_003a-Standalone-path-searching"><span>5.6 <code class="code">kpsewhich</code>: Standalone path searching<a class="copiable-link" href="#kpsewhich_003a-Standalone-path-searching"> &para;</a></span></h3>

<a class="index-entry-id" id="index-kpsewhich"></a>
<a class="index-entry-id" id="index-path-searching_002c-standalone"></a>
<a class="index-entry-id" id="index-standalone-path-searching"></a>

<p>The Kpsewhich program exercises the path searching functionality
independent of any particular application.  This can also be useful as a
sort of <code class="code">find</code> program to locate files in your TeX hierarchies,
perhaps in administrative scripts.  It is used heavily in the
distributed &lsquo;<samp class="samp">mktex&hellip;</samp>&rsquo; scripts.
</p>
<p>Synopsis:
</p>
<div class="example">
<pre class="example-preformatted">kpsewhich <var class="var">option</var>... <var class="var">filename</var>...
</pre></div>

<p>The options and filename(s) to look up can be intermixed.
Options can start with either &lsquo;<samp class="samp">-</samp>&rsquo; or &lsquo;<samp class="samp">--</samp>&rsquo;, and any unambiguous
abbreviation is accepted.
</p>


<ul class="mini-toc">
<li><a href="#Path-searching-options" accesskey="1">Path searching options</a></li>
<li><a href="#Specially_002drecognized-files" accesskey="2">Specially-recognized files for <code class="command">kpsewhich</code></a></li>
<li><a href="#Auxiliary-tasks" accesskey="3">Auxiliary tasks</a></li>
<li><a href="#Standard-options" accesskey="4">Standard options</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Path-searching-options">
<div class="nav-panel">
<p>
Next: <a href="#Specially_002drecognized-files" accesskey="n" rel="next">Specially-recognized files for <code class="command">kpsewhich</code></a>, Up: <a href="#Invoking-kpsewhich" accesskey="u" rel="up"><code class="code">kpsewhich</code>: Standalone path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Path-searching-options-1"><span>5.6.1 Path searching options<a class="copiable-link" href="#Path-searching-options-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-path-searching-options"></a>

<p>Kpsewhich looks up each non-option argument on the command line as a
filename, and returns the first file found.
</p>
<p>Various options alter the path searching behavior:
</p>
<dl class="table">
<dt><a class="index-entry-id" id="index-all-matches_002c-finding"></a>
<a id="index-_002d_002dall"></a><span>&lsquo;<samp class="samp">--all</samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dall"> &para;</a></span></dt>
<dd><p>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).  Exception: with the glyph formats (<code class="code">pk</code>, <code class="code">gf</code>),
this option has no effect and only the first match is returned.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002d_002dno_002dcasefold_002dsearch"></a>
<a id="index-_002d_002dcasefold_002dsearch"></a><span>&lsquo;<samp class="samp">--casefold-search</samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dcasefold_002dsearch"> &para;</a></span></dt>
<dt>&lsquo;<samp class="samp">--no-casefold-search</samp>&rsquo;</dt>
<dd><p>Explicitly enable or disable the fallback to a case-insensitive search
on Unix platforms (see <a class="pxref" href="#Casefolding-search">Casefolding search</a>); no effect on Windows.
The default is enabled, set in <code class="code">texmf.cnf</code>.  Disabling
(<code class="code">--no-casefold-search</code>) does not mean that searches magically
become case-sensitive when the underlying (file)system is
case-insensitive, it merely means that Kpathsea does not do any
casefolding itself.
</p>
</dd>
<dt><a id="index-_002d_002dcnf_002dline"></a><span>&lsquo;<samp class="samp">--cnf-line=<var class="var">str</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dcnf_002dline"> &para;</a></span></dt>
<dd><p>Parse <var class="var">str</var> as if it were a line in the <samp class="file">texmf.cnf</samp>
configuration file (see <a class="pxref" href="#Config-files">Config files</a>), overriding settings in the
actual configuration files, and also in the environment (see <a class="pxref" href="#Path-sources">Path sources</a>).  This is implemented by making any settings from <var class="var">str</var>
in the environment, overwriting any value already there.  Thus, an
extra colon in a &lsquo;<samp class="samp">--cnf-line</samp>&rsquo; value will refer to the value from
a configuration file, not a user-set environment variable.
</p>
<p>Furthermore, any variable set from <var class="var">str</var> will also be set with the
program name suffix.  For example, <code class="code">pdftex
--cnf-line=TEXINPUTS=/foo:</code> will set both <code class="code">TEXINPUTS</code> and
<code class="code">TEXINPUTS_pdftex</code> in the environment (and the value will be
<samp class="file">/foo</samp> followed by the setting from <samp class="file">texmf.cnf</samp>, ignoring
any user-set <code class="code">TEXINPUTS</code>).
</p>
<p>This behavior is desirable because, in practice, many variables in the
distributed <samp class="file">texmf.cnf</samp> are program-specific, and the intuitive
behavior is for values set on the command line with <code class="code">--cnf-line</code>
to override them.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002dD-num"></a>
<a class="index-entry-id" id="index-resolution_002c-setting"></a>
<a id="index-_002d_002ddpi_003dnum"></a><span>&lsquo;<samp class="samp">--dpi=<var class="var">num</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002ddpi_003dnum"> &para;</a></span></dt>
<dd><p>Set the resolution to <var class="var">num</var>; this only affects &lsquo;<samp class="samp">gf</samp>&rsquo; and
&lsquo;<samp class="samp">pk</samp>&rsquo; lookups.  &lsquo;<samp class="samp">-D</samp>&rsquo; is a synonym, for compatibility with
Dvips.  Default is 600.
</p>
</dd>
<dt><a class="index-entry-id" id="index-engine-name"></a>
<a id="index-_002d_002dengine_003dname"></a><span>&lsquo;<samp class="samp">--engine=<var class="var">name</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dengine_003dname"> &para;</a></span></dt>
<dd><p>Set the engine name to <var class="var">name</var>.  By default it is not set in
<code class="code">kpsewhich</code> (TeX engines set it to the appropriate string).
The engine name is used in some search paths to allow files with the
same name but used by different engines to coexist.
</p>
<p>In particular, since the memory dump files
(<samp class="file">.fmt</samp>/<samp class="file">.base</samp>/<samp class="file">.mem</samp>) are now stored in
subdirectories named for the engine (<samp class="file">tex</samp>, <samp class="file">pdftex</samp>,
<samp class="file">xetex</samp>, etc.), you must specify an engine name in order to find
them.  For example, <samp class="file">cont-en.fmt</samp> typically exists for both
<samp class="file">pdftex</samp> and <samp class="file">xetex</samp>.  With the default path settings, you
can use &lsquo;<samp class="samp">--engine=/</samp>&rsquo; to look for any dump file, regardless of
engine; if a dump file exists for more than one engine, it&rsquo;s
indeterminate which one is returned.  (The &lsquo;<samp class="samp">/</samp>&rsquo; ends up specifying
a normal recursive search along the path where the dumps are stored,
namely &lsquo;<samp class="samp">$TEXMF/web2c{/$engine,}</samp>&rsquo;.)
</p>
</dd>
<dt><a id="index-_002d_002dformat_003dname"></a><span>&lsquo;<samp class="samp">--format=<var class="var">name</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dformat_003dname"> &para;</a></span></dt>
<dd><p>Set the format for lookup to <var class="var">name</var>.  By default, the format is
guessed from the filename, with &lsquo;<samp class="samp">tex</samp>&rsquo; being used if nothing else
fits.  The recognized filename extensions (including any leading
&lsquo;<samp class="samp">.</samp>&rsquo;) are also allowable <var class="var">name</var>s.
</p>
<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 class="samp">--format=&quot;dvips config&quot;</samp>&rsquo;.  (The quotes are for the
sake of the shell.)
</p>
<p>Here&rsquo;s the current list of recognized names and the associated suffixes.
See <a class="xref" href="#Supported-file-formats">Supported file formats</a>, for more information on each of these.
</p>
<p>The strings in parentheses are abbreviations recognized only by
<code class="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.
</p>
<div class="example">
<pre class="example-preformatted">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 .dfont
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 .OTF
pdftex config (pdftexconfig):
lig files: .lig
texmfscripts:
lua: .lua .luatex .luc .luctex .texlua .texluc .tlu
font feature files: .fea
cid maps: .cid .cidmap
mlbib: .mlbib .bib
mlbst: .mlbst .bst
clua: .dll .so
ris: .ris
bltxml: .bltxml
</pre></div>

<p>This option and &lsquo;<samp class="samp">--path</samp>&rsquo; are mutually exclusive.
</p>
</dd>
<dt><a class="index-entry-id" id="index-interactive-query"></a>
<a id="index-_002d_002dinteractive"></a><span>&lsquo;<samp class="samp">--interactive</samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dinteractive"> &para;</a></span></dt>
<dd><p>After processing the command line, read additional filenames to look up
from standard input.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002d_002dno_002dmktex_003dfiletype"></a>
<a id="index-_002d_002dmktex_003dfiletype"></a><span>&lsquo;<samp class="samp">--mktex=<var class="var">filetype</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dmktex_003dfiletype"> &para;</a></span></dt>
<dt>&lsquo;<samp class="samp">--no-mktex=<var class="var">filetype</var></samp>&rsquo;</dt>
<dd><p>Turn on or off the &lsquo;<samp class="samp">mktex</samp>&rsquo; script associated with <var class="var">filetype</var>.
Usual values for <var class="var">filetype</var> are &lsquo;<samp class="samp">pk</samp>&rsquo;, &lsquo;<samp class="samp">mf</samp>&rsquo;, &lsquo;<samp class="samp">tex</samp>&rsquo;,
and &lsquo;<samp class="samp">tfm</samp>&rsquo;.  By default, all are off in Kpsewhich, even if they
are enabled for TeX.  This option implies setting
<code class="code">--must-exist</code>.  See <a class="xref" href="#mktex-scripts"><samp class="file">mktex</samp> scripts</a>.
</p>
</dd>
<dt><a id="index-_002d_002dmode_003dstring"></a><span>&lsquo;<samp class="samp">--mode=<var class="var">string</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dmode_003dstring"> &para;</a></span></dt>
<dd><p>Set the mode name to <var class="var">string</var>; this also only affects &lsquo;<samp class="samp">gf</samp>&rsquo; and
&lsquo;<samp class="samp">pk</samp>&rsquo; lookups.  No default: any mode will be found.  See <a class="xref" href="#mktex-script-arguments"><samp class="file">mktex</samp> script arguments</a>.
</p>
</dd>
<dt><a id="index-_002d_002dmust_002dexist"></a><span>&lsquo;<samp class="samp">--must-exist</samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dmust_002dexist"> &para;</a></span></dt>
<dd><p>Do everything possible to find the files, notably including searching
the disk and running the &lsquo;<samp class="samp">mktex</samp>&rsquo; scripts.  By default, only the
<samp class="file">ls-R</samp> database is checked, in the interest of efficiency.
</p>
</dd>
<dt><a id="index-_002d_002dpath_003dstring"></a><span>&lsquo;<samp class="samp">--path=<var class="var">string</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dpath_003dstring"> &para;</a></span></dt>
<dd><p>Search along the path <var class="var">string</var> (colon-separated as usual), instead
of guessing the search path from the filename.  &lsquo;<samp class="samp">//</samp>&rsquo; and all the
usual expansions are supported (see <a class="pxref" href="#Path-expansion">Path expansion</a>).  This option
and &lsquo;<samp class="samp">--format</samp>&rsquo; are mutually exclusive.  To output the complete
directory expansion of a path, instead of doing a one-shot lookup, see
&lsquo;<samp class="samp">--expand-path</samp>&rsquo; and &lsquo;<samp class="samp">--show-path</samp>&rsquo; in the following section.
</p>
</dd>
<dt><a id="index-_002d_002dprogname_003dname"></a><span>&lsquo;<samp class="samp">--progname=<var class="var">name</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dprogname_003dname"> &para;</a></span></dt>
<dd><p>Set the program name to <var class="var">name</var>; default is &lsquo;<samp class="samp">kpsewhich</samp>&rsquo;.  This
can affect the search paths via the &lsquo;<samp class="samp">.<var class="var">prognam</var></samp>&rsquo; feature in
configuration files (see <a class="pxref" href="#Config-files">Config files</a>).
</p>
</dd>
<dt><a id="index-_002d_002dsubdir_003dstring"></a><span>&lsquo;<samp class="samp">--subdir=<var class="var">string</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dsubdir_003dstring"> &para;</a></span></dt>
<dd><p>Report only those matches whose directory part <em class="emph">ends</em> with
<var class="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:
</p>
<div class="example">
<pre class="example-preformatted">kpsewhich foo.sty
&rArr; /some/where/foo.sty
/another/place/foo.sty
</pre></div>

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

kpsewhich --subdir=place foo.sty
&rArr; /another/place/foo.sty
</pre></div>

<p>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:
</p>
<div class="example">
<pre class="example-preformatted">kpsewhich --subdir=another foo.sty
&rArr;
</pre></div>

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

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

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

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

<p>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 class="file">foo.lua</samp> might exist within both
<samp class="file">texmf-dist/scripts/pkg1/</samp> and <samp class="file">texmf-dist/scripts/pkg2/</samp>.
By specifying, say, &lsquo;<samp class="samp">--subdir=/pkg1</samp>&rsquo;, you can be sure of getting
the one you are interested in.
</p>
<p>We only match at the end because a site might happen to install TeX
in <samp class="file">/some/coincidental/pkg1/path/</samp>, and we wouldn&rsquo;t want to match
<samp class="file">texmf-dist/scripts/pkg2/</samp> that when searching for &lsquo;<samp class="samp">/pkg1</samp>&rsquo;.
</p>
</dd>
</dl>


<hr>
</div>
<div class="subsection-level-extent" id="Specially_002drecognized-files">
<div class="nav-panel">
<p>
Next: <a href="#Auxiliary-tasks" accesskey="n" rel="next">Auxiliary tasks</a>, Previous: <a href="#Path-searching-options" accesskey="p" rel="prev">Path searching options</a>, Up: <a href="#Invoking-kpsewhich" accesskey="u" rel="up"><code class="code">kpsewhich</code>: Standalone path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Specially_002drecognized-files-for-kpsewhich"><span>5.6.2 Specially-recognized files for <code class="command">kpsewhich</code><a class="copiable-link" href="#Specially_002drecognized-files-for-kpsewhich"> &para;</a></span></h4>

<p><code class="command">kpsewhich</code> recognizes a few special filenames on the command
line and defaults to using the &lsquo;known&rsquo; file formats for them, merely
to save the time and trouble of specifying the format.  This is only a
feature of <code class="command">kpsewhich</code>; when using the Kpathsea library
itself, none of these special filenames are recognized, and it&rsquo;s still
up to the caller to specify the desired format.
</p>
<p>Here is the list of special filenames to <code class="command">kpsewhich</code>, along
with their corresponding format:
</p>
<dl class="table">
<dt><a id="index-config_002eps"></a><span><samp class="file">config.ps</samp><a class="copiable-link" href="#index-config_002eps"> &para;</a></span></dt>
<dd><p><code class="code">dvips config</code>
</p>
</dd>
<dt><a id="index-dvipdfmx_002ecfg"></a><span><samp class="file">dvipdfmx.cfg</samp><a class="copiable-link" href="#index-dvipdfmx_002ecfg"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">other text files</samp>&rsquo;
</p>
</dd>
<dt><a id="index-fmtutil_002ecnf"></a><span><samp class="file">fmtutil.cnf</samp><a class="copiable-link" href="#index-fmtutil_002ecnf"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">web2c files</samp>&rsquo;
</p>
</dd>
<dt><a id="index-glyphlist_002etxt"></a><span><samp class="file">glyphlist.txt</samp><a class="copiable-link" href="#index-glyphlist_002etxt"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">map</samp>&rsquo;
</p>
</dd>
<dt><a id="index-mktex_002ecnf"></a><span><samp class="file">mktex.cnf</samp><a class="copiable-link" href="#index-mktex_002ecnf"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">web2c files</samp>&rsquo;
</p>
</dd>
<dt><a id="index-pdfglyphlist_002etxt"></a><span><samp class="file">pdfglyphlist.txt</samp><a class="copiable-link" href="#index-pdfglyphlist_002etxt"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">map</samp>&rsquo;
</p>
</dd>
<dt><a class="index-entry-id" id="index-pdftexconfig_002etex"></a>
<a id="index-pdftex_002ecfg"></a><span><samp class="file">pdftex.cfg</samp><a class="copiable-link" href="#index-pdftex_002ecfg"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">pdftex config</samp>&rsquo; (although <samp class="file">pdftex.cfg</samp> is not used any more;
look for the file <samp class="file">pdftexconfig.tex</samp> instead.)
</p>
</dd>
<dt><a id="index-texmf_002ecnf"></a><span><samp class="file">texmf.cnf</samp><a class="copiable-link" href="#index-texmf_002ecnf"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">cnf</samp>&rsquo;
</p>
</dd>
<dt><a id="index-XDvi"></a><span><samp class="file">XDvi</samp><a class="copiable-link" href="#index-XDvi"> &para;</a></span></dt>
<dd><p>&lsquo;<samp class="samp">other text files</samp>&rsquo;
</p>
</dd>
</dl>

<p>A user-specified format will override the above defaults.
</p>
<a class="index-entry-id" id="index-tcfmgr_002emap"></a>
<p>Another reference for information about TeX&rsquo;s many special files is
<samp class="file">tcfmgr.map</samp>, found in <samp class="file">texmf/texconfig/tcfmgr.map</samp>, which
records various information about the above configuration files (among
others).
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Auxiliary-tasks">
<div class="nav-panel">
<p>
Next: <a href="#Standard-options" accesskey="n" rel="next">Standard options</a>, Previous: <a href="#Specially_002drecognized-files" accesskey="p" rel="prev">Specially-recognized files for <code class="command">kpsewhich</code></a>, Up: <a href="#Invoking-kpsewhich" accesskey="u" rel="up"><code class="code">kpsewhich</code>: Standalone path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Auxiliary-tasks-1"><span>5.6.3 Auxiliary tasks<a class="copiable-link" href="#Auxiliary-tasks-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-auxiliary-tasks"></a>

<p>Kpsewhich provides some features in addition to path lookup as such:
</p>
<dl class="table">
<dt><a id="index-_002d_002ddebug_003dnum"></a><span>&lsquo;<samp class="samp">--debug=<var class="var">num</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002ddebug_003dnum"> &para;</a></span></dt>
<dd><p>Set debugging options to <var class="var">num</var>.  See <a class="xref" href="#Debugging">Debugging</a>.
</p>
</dd>
<dt><a id="index-_002d_002dexpand_002dbraces_003dstring"></a><span>&lsquo;<samp class="samp">--expand-braces=<var class="var">string</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dexpand_002dbraces_003dstring"> &para;</a></span></dt>
<dd><p>Output variable, tilde, and brace expansion of <var class="var">string</var>, which is
assumed to be a single path element.  See <a class="xref" href="#Path-expansion">Path expansion</a>.
</p>
</dd>
<dt><a id="index-_002d_002dexpand_002dpath_003dstring"></a><span>&lsquo;<samp class="samp">--expand-path=<var class="var">string</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dexpand_002dpath_003dstring"> &para;</a></span></dt>
<dd><p>Output the complete expansion of <var class="var">string</var>, with each element
separated by the usual path separator on the current system (&lsquo;<samp class="samp">;</samp>&rsquo;
on Windows, &lsquo;<samp class="samp">:</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 class="samp">--show-path</samp>&rsquo;.
</p>
<p>Nonexistent directories are culled from the output:
</p>
<div class="example">
<pre class="example-preformatted">$ kpsewhich --expand-path '/tmp'
&rArr; /tmp
$ kpsewhich --expand-path '/nonesuch'
&rArr;
</pre></div>

<p>For one-shot uses of an arbitrary (not built in to Kpathsea) path, see
&lsquo;<samp class="samp">--path</samp>&rsquo; (see <a class="pxref" href="#Path-searching-options">Path searching options</a>).
</p>
</dd>
<dt><a id="index-_002d_002dexpand_002dvar_003dstring"></a><span>&lsquo;<samp class="samp">--expand-var=<var class="var">string</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dexpand_002dvar_003dstring"> &para;</a></span></dt>
<dd><p>Output the variable and tilde expansion of <var class="var">string</var>.  For example,
with the usual <samp class="file">texmf.cnf</samp>, &lsquo;<samp class="samp">kpsewhich
--expand-var='$TEXMF'</samp>&rsquo; returns the TeX system hierarchy root(s).
See <a class="xref" href="#Path-expansion">Path expansion</a>.  The specified <var class="var">string</var> can contain
anything, though, not just variable references.  This calls
<code class="code">kpse_var_expand</code> (see <a class="pxref" href="#Programming-with-config-files">Programming with config files</a>).
</p>
</dd>
<dt><a id="index-_002d_002dhelp_002dformats"></a><span>&lsquo;<samp class="samp">--help-formats</samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dhelp_002dformats"> &para;</a></span></dt>
<dd><p>Output information about each supported format (see <a class="pxref" href="#Supported-file-formats">Supported file formats</a>), including the names and abbreviations, variables
looked for, and the original path.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002d_002dsafe_002dextended_002dout_002dname_003dname"></a>
<a id="index-_002d_002dsafe_002dextended_002din_002dname_003dname"></a><span>&lsquo;<samp class="samp">--safe-extended-in-name=<var class="var">name</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dsafe_002dextended_002din_002dname_003dname"> &para;</a></span></dt>
<dt>&lsquo;<samp class="samp">--safe-extended-out-name=<var class="var">name</var></samp>&rsquo;</dt>
<dd><p>As with &lsquo;<samp class="samp">--safe-in-name</samp>&rsquo; and &lsquo;<samp class="samp">--safe-out-name</samp>&rsquo; (next item),
but also allow files under the variables <code class="code">TEXMFVAR</code> and
<code class="code">TEXMFSYSVAR</code> (see <a class="pxref" href="#Calling-sequence">Calling sequence</a>).
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002d_002dsafe_002dout_002dname_003dname"></a>
<a id="index-_002d_002dsafe_002din_002dname_003dname"></a><span>&lsquo;<samp class="samp">--safe-in-name=<var class="var">name</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dsafe_002din_002dname_003dname"> &para;</a></span></dt>
<dt>&lsquo;<samp class="samp">--safe-out-name=<var class="var">name</var></samp>&rsquo;</dt>
<dd><p>Exit successfully if <var class="var">name</var> is safe to open for reading or
writing, respectively, else unsuccessfully.  No errors are output.
These tests take account of the related Kpathsea configuration
settings (see <a class="pxref" href="#Calling-sequence">Calling sequence</a>).
</p>
</dd>
<dt><a id="index-_002d_002dshow_002dpath_003dname"></a><span>&lsquo;<samp class="samp">--show-path=<var class="var">name</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dshow_002dpath_003dname"> &para;</a></span></dt>
<dd><p>Show the path that would be used for file lookups of file type
<var class="var">name</var>.  Either a filename extension (&lsquo;<samp class="samp">pk</samp>&rsquo;, &lsquo;<samp class="samp">.vf</samp>&rsquo;, etc.)
or an integer can be used, just as with &lsquo;<samp class="samp">--format</samp>&rsquo;, described in
the previous section.
</p>
</dd>
<dt><a id="index-_002d_002dvar_002dbrace_002dvalue_003dvariable"></a><span>&lsquo;<samp class="samp">--var-brace-value=<var class="var">variable</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dvar_002dbrace_002dvalue_003dvariable"> &para;</a></span></dt>
<dd><p>Like &lsquo;<samp class="samp">--var-value</samp>&rsquo; (next), but also expands &lsquo;<samp class="samp">{...}</samp>&rsquo;
constructs.  (see <a class="pxref" href="#Brace-expansion">Brace expansion</a>).  Thus, the value is assumed to
possibly be several path elements, and &lsquo;<samp class="samp">~</samp>&rsquo; is expanded at the
beginning of each.  The path separator is changed to that of the
current system in the expansion.
</p>
<p>Example: &lsquo;<samp class="samp">FOO='.;~' kpsewhich --var-brace-value=FOO</samp>&rsquo; outputs (on
a Unix-ish system) &lsquo;<samp class="samp">.:/home/karl</samp>&rsquo;, supposing the latter is the
current user&rsquo;s home directory.  Note that the &lsquo;<samp class="samp">;</samp>&rsquo; in the source
value, as commonly used in <samp class="file">texmf.cnf</samp>, has changed to a
&lsquo;<samp class="samp">:</samp>&rsquo;, as the normal path separator on the current system.  On a
Windows-ish system, the &lsquo;<samp class="samp">;</samp>&rsquo; would remain.
</p>
</dd>
<dt><a id="index-_002d_002dvar_002dvalue_003dvariable"></a><span>&lsquo;<samp class="samp">--var-value=<var class="var">variable</var></samp>&rsquo;<a class="copiable-link" href="#index-_002d_002dvar_002dvalue_003dvariable"> &para;</a></span></dt>
<dd><p>Outputs the value of <var class="var">variable</var> (a simple identifier like
&lsquo;<samp class="samp">TEXMFDIST</samp>&rsquo;, with no &lsquo;<samp class="samp">$</samp>&rsquo; or other constructs), expanding
&lsquo;<samp class="samp">$</samp>&rsquo; (see <a class="pxref" href="#Variable-expansion">Variable expansion</a>) and &lsquo;<samp class="samp">~</samp>&rsquo; (see <a class="pxref" href="#Tilde-expansion">Tilde expansion</a>) constructs in the value.  &lsquo;<samp class="samp">~</samp>&rsquo; expansion happens at the
beginning of the overall value and at the beginning of a variable
expansion, but not arbitrarily within the string.  Braces are not expanded.
</p>
<p>Example: &lsquo;<samp class="samp">--var-value=texmf_casefold_search</samp>&rsquo; outputs (if the
default is not changed) &lsquo;<samp class="samp">1</samp>&rsquo;.
</p>
<p>Example to contrast with &lsquo;<samp class="samp">--var-brace-value</samp>&rsquo;: &lsquo;<samp class="samp">FOO='.;~'
kpsewhich --var-value=FOO</samp>&rsquo; outputs &lsquo;<samp class="samp">.;~</samp>&rsquo;, i.e., the same as the
input value, on all systems.
</p>
</dd>
</dl>


<hr>
</div>
<div class="subsection-level-extent" id="Standard-options">
<div class="nav-panel">
<p>
Previous: <a href="#Auxiliary-tasks" accesskey="p" rel="prev">Auxiliary tasks</a>, Up: <a href="#Invoking-kpsewhich" accesskey="u" rel="up"><code class="code">kpsewhich</code>: Standalone path searching</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Standard-options-1"><span>5.6.4 Standard options<a class="copiable-link" href="#Standard-options-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-standard-options"></a>

<p>Kpsewhich accepts the standard GNU options:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-_002d_002dhelp"></a>
&lsquo;<samp class="samp">--help</samp>&rsquo; prints a help message on standard output and exits
successfully.

</li><li><a class="index-entry-id" id="index-_002d_002dversion"></a>
&lsquo;<samp class="samp">--version</samp>&rsquo; prints the Kpathsea version number and exits successfully.
</li></ul>


<hr>
</div>
</div>
</div>
<div class="chapter-level-extent" id="TeX-support">
<div class="nav-panel">
<p>
Next: <a href="#Programming" accesskey="n" rel="next">Programming</a>, Previous: <a href="#Path-searching" accesskey="p" rel="prev">Path searching</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="TeX-support-1"><span>6 TeX support<a class="copiable-link" href="#TeX-support-1"> &para;</a></span></h2>

<a class="index-entry-id" id="index-TeX-support"></a>

<p>Although the basic features in Kpathsea can be used for any type of
path searching, it came about, as usual, 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>
<p>Therefore, Kpathsea provides some TeX-specific formats and
features.  Indeed, many of the purportedly generic path searching
features were provided because they seemed useful in that conTeXt
(font lookup, particularly).
</p>
<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 names of files, not their
contents&mdash;if a GF file is (mis)named <samp class="file">cmr10.600pk</samp>, it will be
found as a PK file.
</p>


<ul class="mini-toc">
<li><a href="#Supported-file-formats" accesskey="1">Supported file formats</a></li>
<li><a href="#File-lookup" accesskey="2">File lookup</a></li>
<li><a href="#Glyph-lookup" accesskey="3">Glyph lookup</a></li>
<li><a href="#Suppressing-warnings" accesskey="4">Suppressing warnings</a></li>
<li><a href="#mktex-scripts" accesskey="5"><samp class="file">mktex</samp> scripts</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Supported-file-formats">
<div class="nav-panel">
<p>
Next: <a href="#File-lookup" accesskey="n" rel="next">File lookup</a>, Up: <a href="#TeX-support" accesskey="u" rel="up">TeX support</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Supported-file-formats-1"><span>6.1 Supported file formats<a class="copiable-link" href="#Supported-file-formats-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-supported-file-formats"></a>
<a class="index-entry-id" id="index-file-formats_002c-supported"></a>

<a class="index-entry-id" id="index-environment-variables-for-TeX"></a>
<a class="index-entry-id" id="index-TeX-environment-variables"></a>

<p>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 class="index-entry-id" id="index-program_002dvarying-paths"></a>
<p>Since environment variables containing periods, such as
&lsquo;<samp class="samp">TEXINPUTS.latex</samp>&rsquo;, are not allowed on some systems, Kpathsea looks
for environment variables with an underscore, e.g.,
&lsquo;<samp class="samp">TEXINPUTS_latex</samp>&rsquo; (see <a class="pxref" href="#Config-files">Config files</a>).
</p>
<p>The following table lists the above information.  You can also get the
list by giving the &lsquo;<samp class="samp">--help-formats</samp>&rsquo; option to <code class="code">kpsewhich</code>
(see <a class="pxref" href="#Auxiliary-tasks">Auxiliary tasks</a>).
</p>
<dl class="table">
<dt><a class="index-entry-id" id="index-AFMFONTS"></a>
<a id="index-_002eafm"></a><span>&lsquo;<samp class="samp">afm</samp>&rsquo;<a class="copiable-link" href="#index-_002eafm"> &para;</a></span></dt>
<dd><p>(Adobe font metrics, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Metric-files">Metric files</a> in <cite class="cite">Dvips</cite>)
<code class="code">AFMFONTS</code>;
suffix &lsquo;<samp class="samp">.afm</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MFBASES"></a>
<a class="index-entry-id" id="index-TEXMFINI"></a>
<a id="index-_002ebase"></a><span>&lsquo;<samp class="samp">base</samp>&rsquo;<a class="copiable-link" href="#index-_002ebase"> &para;</a></span></dt>
<dd><p>(Metafont memory dump, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Memory-dumps">Memory dumps</a> in <cite class="cite">Web2c</cite>)
<code class="code">MFBASES</code>, <code class="code">TEXMFINI</code>;
suffix &lsquo;<samp class="samp">.base</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-BIBINPUTS"></a>
<a class="index-entry-id" id="index-TEXBIB"></a>
<a id="index-_002ebib"></a><span>&lsquo;<samp class="samp">bib</samp>&rsquo;<a class="copiable-link" href="#index-_002ebib"> &para;</a></span></dt>
<dd><p>(BibTeX bibliography source, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#bibtex-invocation">bibtex invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">BIBINPUTS</code>, <code class="code">TEXBIB</code>;
suffix &lsquo;<samp class="samp">.bib</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-BLTXMLINPUTS"></a>
<a id="index-_002ebltxml"></a><span>&lsquo;<samp class="samp">bltxml</samp>&rsquo;<a class="copiable-link" href="#index-_002ebltxml"> &para;</a></span></dt>
<dd><p>(BibLaTeXML bibliography files for Biber, <a class="url" href="https://ctan.org/pkg/biber">https://ctan.org/pkg/biber</a>)
<code class="code">BLTXMLINPUTS</code>
suffix &lsquo;<samp class="samp">.bltxml</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-BSTINPUTS"></a>
<a id="index-_002ebst"></a><span>&lsquo;<samp class="samp">bst</samp>&rsquo;<a class="copiable-link" href="#index-_002ebst"> &para;</a></span></dt>
<dd><p>(BibTeX style, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Basic-BibTeX-style-files">Basic BibTeX
style files</a> in <cite class="cite">Web2c</cite>)
<code class="code">BSTINPUTS</code>;
suffix &lsquo;<samp class="samp">.bst</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002eso"></a>
<a class="index-entry-id" id="index-CLUAINPUTS"></a>
<a id="index-_002edll"></a><span>&lsquo;<samp class="samp">clua</samp>&rsquo;<a class="copiable-link" href="#index-_002edll"> &para;</a></span></dt>
<dd><p>(dynamic libraries for Lua, <a class="url" href="https://ctan.org/pkg/luatex">https://ctan.org/pkg/luatex</a>)
<code class="code">CLUAINPUTS</code>
suffixes &lsquo;<samp class="samp">.dll</samp>&rsquo; and &lsquo;<samp class="samp">.so</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-CMAPFONTS"></a>
<a id="index-_002ecmap"></a><span>&lsquo;<samp class="samp">cmap</samp>&rsquo;<a class="copiable-link" href="#index-_002ecmap"> &para;</a></span></dt>
<dd><p>(character map files)
<code class="code">CMAPFONTS</code>;
suffix &lsquo;<samp class="samp">.cmap</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXMFCNF-1"></a>
<a id="index-_002ecnf"></a><span>&lsquo;<samp class="samp">cnf</samp>&rsquo;<a class="copiable-link" href="#index-_002ecnf"> &para;</a></span></dt>
<dd><p>(Runtime configuration files, see <a class="pxref" href="#Config-files">Config files</a>)
<code class="code">TEXMFCNF</code>;
suffix &lsquo;<samp class="samp">.cnf</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002eweb"></a>
<a class="index-entry-id" id="index-CWEBINPUTS"></a>
<a id="index-_002ew"></a><span>&lsquo;<samp class="samp">cweb</samp>&rsquo;<a class="copiable-link" href="#index-_002ew"> &para;</a></span></dt>
<dd><p>(CWEB input files)
<code class="code">CWEBINPUTS</code>;
suffixes &lsquo;<samp class="samp">.w</samp>&rsquo;, &lsquo;<samp class="samp">.web</samp>&rsquo;;
additional suffix &lsquo;<samp class="samp">.ch</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-config_002eps_002c-search-path-for"></a>
<a id="index-TEXCONFIG"></a><span>&lsquo;<samp class="samp">dvips config</samp>&rsquo;<a class="copiable-link" href="#index-TEXCONFIG"> &para;</a></span></dt>
<dd><p>(Dvips &lsquo;<samp class="samp">config.*</samp>&rsquo; files, such as <samp class="file">config.ps</samp>, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Config-files">Config
files</a> in <cite class="cite">Dvips</cite>)
<code class="code">TEXCONFIG</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-ENCFONTS"></a>
<a id="index-_002eenc"></a><span>&lsquo;<samp class="samp">enc files</samp>&rsquo;<a class="copiable-link" href="#index-_002eenc"> &para;</a></span></dt>
<dd><p>(encoding vectors)
<code class="code">ENCFONTS</code>;
suffix &lsquo;<samp class="samp">.enc</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXFORMATS"></a>
<a class="index-entry-id" id="index-TEXMFINI-1"></a>
<a id="index-_002efmt"></a><span>&lsquo;<samp class="samp">fmt</samp>&rsquo;<a class="copiable-link" href="#index-_002efmt"> &para;</a></span></dt>
<dd><p>(TeX memory dump, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Memory-dumps">Memory dumps</a> in <cite class="cite">Web2c</cite>)
<code class="code">TEXFORMATS</code>, <code class="code">TEXMFINI</code>;
suffix &lsquo;<samp class="samp">.fmt</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-FONTCIDMAPS"></a>
<a id="index-_002ecid"></a><span>&lsquo;<samp class="samp">font cid map</samp>&rsquo;<a class="copiable-link" href="#index-_002ecid"> &para;</a></span></dt>
<dd><p>(CJK mapping)
<code class="code">FONTCIDMAPS</code>
suffix &lsquo;<samp class="samp">.cid</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-FONTFEATURES"></a>
<a id="index-_002efea"></a><span>&lsquo;<samp class="samp">font feature files</samp>&rsquo;<a class="copiable-link" href="#index-_002efea"> &para;</a></span></dt>
<dd><p>(primarily for OpenType font features)
<code class="code">FONTFEATURES</code>
suffix &lsquo;<samp class="samp">.fea</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-GFFONTS"></a>
<a class="index-entry-id" id="index-GLYPHFONTS"></a>
<a class="index-entry-id" id="index-TEXFONTS"></a>
<a id="index-gf"></a><span>&lsquo;<samp class="samp">gf</samp>&rsquo;<a class="copiable-link" href="#index-gf"> &para;</a></span></dt>
<dd><p>(generic font bitmap, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Glyph-files">Glyph files</a> in <cite class="cite">Dvips</cite>)
<code class="code"><var class="var">program</var>FONTS</code>, <code class="code">GFFONTS</code>, <code class="code">GLYPHFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">gf</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002eepsi"></a>
<a class="index-entry-id" id="index-TEXPICTS"></a>
<a class="index-entry-id" id="index-TEXINPUTS"></a>
<a id="index-_002eeps"></a><span>&lsquo;<samp class="samp">graphic/figure</samp>&rsquo;<a class="copiable-link" href="#index-_002eeps"> &para;</a></span></dt>
<dd><p>(Encapsulated PostScript figures, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#PostScript-figures">PostScript figures</a> in <cite class="cite">Dvips</cite>)
<code class="code">TEXPICTS</code>, <code class="code">TEXINPUTS</code>;
additional suffixes: &lsquo;<samp class="samp">.eps</samp>&rsquo;, &lsquo;<samp class="samp">.epsi</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXINDEXSTYLE"></a>
<a class="index-entry-id" id="index-INDEXSTYLE"></a>
<a id="index-_002eist"></a><span>&lsquo;<samp class="samp">ist</samp>&rsquo;<a class="copiable-link" href="#index-_002eist"> &para;</a></span></dt>
<dd><p>(makeindex style files)
<code class="code">TEXINDEXSTYLE</code>, <code class="code">INDEXSTYLE</code>;
suffix &lsquo;<samp class="samp">.ist</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-LIGFONTS"></a>
<a id="index-_002elig"></a><span>&lsquo;<samp class="samp">lig files</samp>&rsquo;<a class="copiable-link" href="#index-_002elig"> &para;</a></span></dt>
<dd><p>(ligature definition files)
<code class="code">LIGFONTS</code>;
suffix &lsquo;<samp class="samp">.lig</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXMFDBS-1"></a>
<a id="index-ls_002dR"></a><span>&lsquo;<samp class="samp">ls-R</samp>&rsquo;<a class="copiable-link" href="#index-ls_002dR"> &para;</a></span></dt>
<dd><p>(Filename databases, see <a class="pxref" href="#Filename-database">Filename database (<code class="code">ls-R</code>)</a>)
<code class="code">TEXMFDBS</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002eluatex"></a>
<a class="index-entry-id" id="index-_002eluc"></a>
<a class="index-entry-id" id="index-_002eluctex"></a>
<a class="index-entry-id" id="index-_002etexlua"></a>
<a class="index-entry-id" id="index-_002etexluc"></a>
<a class="index-entry-id" id="index-_002etlu"></a>
<a class="index-entry-id" id="index-LUAINPUTS"></a>
<a id="index-_002elua"></a><span>&lsquo;<samp class="samp">lua</samp>&rsquo;<a class="copiable-link" href="#index-_002elua"> &para;</a></span></dt>
<dd><p>(Lua scripts, <a class="url" href="https://ctan.org/pkg/luatex">https://ctan.org/pkg/luatex</a>)
<code class="code">LUAINPUTS</code>
suffixes &lsquo;<samp class="samp">.lua</samp>&rsquo;, &lsquo;<samp class="samp">.luatex</samp>&rsquo;, &lsquo;<samp class="samp">.luc</samp>&rsquo;, &lsquo;<samp class="samp">.luctex</samp>&rsquo;,
&lsquo;<samp class="samp">.texlua</samp>&rsquo;, &lsquo;<samp class="samp">.texluc</samp>&rsquo;, &lsquo;<samp class="samp">.tlu</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXFONTMAPS"></a>
<a id="index-_002emap"></a><span>&lsquo;<samp class="samp">map</samp>&rsquo;<a class="copiable-link" href="#index-_002emap"> &para;</a></span></dt>
<dd><p>(Fontmaps, see <a class="pxref" href="#Fontmap">Fontmap</a>)
<code class="code">TEXFONTMAPS</code>;
suffix &lsquo;<samp class="samp">.map</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MPMEMS"></a>
<a class="index-entry-id" id="index-TEXMFINI-2"></a>
<a id="index-_002emem"></a><span>&lsquo;<samp class="samp">mem</samp>&rsquo;<a class="copiable-link" href="#index-_002emem"> &para;</a></span></dt>
<dd><p>(MetaPost memory dump, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Memory-dumps">Memory dumps</a> in <cite class="cite">Web2c</cite>)
<code class="code">MPMEMS</code>, <code class="code">TEXMFINI</code>;
suffix &lsquo;<samp class="samp">.mem</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-MPSUPPORT"></a><span>&lsquo;<samp class="samp"><span class="r">MetaPost support</span></samp>&rsquo;<a class="copiable-link" href="#index-MPSUPPORT"> &para;</a></span></dt>
<dd><p>(MetaPost support files, used by DMP; see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#dmp-invocation">dmp invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">MPSUPPORT</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MFINPUTS"></a>
<a id="index-_002emf"></a><span>&lsquo;<samp class="samp">mf</samp>&rsquo;<a class="copiable-link" href="#index-_002emf"> &para;</a></span></dt>
<dd><p>(Metafont source, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#mf-invocation">mf invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">MFINPUTS</code>;
suffix &lsquo;<samp class="samp">.mf</samp>&rsquo;;
dynamic creation program: <code class="code">mktexmf</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MFPOOL"></a>
<a id="index-_002epool"></a><span>&lsquo;<samp class="samp">mfpool</samp>&rsquo;<a class="copiable-link" href="#index-_002epool"> &para;</a></span></dt>
<dd><p>(Metafont program strings, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#pooltype-invocation">pooltype invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">MFPOOL</code>, <code class="code">TEXMFINI</code>;
suffix &lsquo;<samp class="samp">.pool</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MFTINPUTS"></a>
<a id="index-_002emft"></a><span>&lsquo;<samp class="samp">mft</samp>&rsquo;<a class="copiable-link" href="#index-_002emft"> &para;</a></span></dt>
<dd><p>(<code class="code">MFT</code> style file, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#mft-invocation">mft invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">MFTINPUTS</code>;
suffix &lsquo;<samp class="samp">.mft</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-MISCFONTS"></a><span>&lsquo;<samp class="samp">misc fonts</samp>&rsquo;<a class="copiable-link" href="#index-MISCFONTS"> &para;</a></span></dt>
<dd><p>(font-related files that don&rsquo;t fit the other categories)
<code class="code">MISCFONTS</code>
</p>
</dd>
<dt><a class="index-entry-id" id="index-MLBIBINPUTS"></a>
<a class="index-entry-id" id="index-BIBINPUTS-1"></a>
<a class="index-entry-id" id="index-TEXBIB-1"></a>
<a id="index-_002emlbib"></a><span>&lsquo;<samp class="samp">mlbib</samp>&rsquo;<a class="copiable-link" href="#index-_002emlbib"> &para;</a></span></dt>
<dd><p>(MlBibTeX bibliography source)
<code class="code">MLBIBINPUTS</code>, <code class="code">BIBINPUTS</code>, <code class="code">TEXBIB</code>;
suffixes &lsquo;<samp class="samp">.mlbib</samp>&rsquo;, &lsquo;<samp class="samp">.mlbib</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MLBSTINPUTS"></a>
<a class="index-entry-id" id="index-BSTINPUTS-1"></a>
<a id="index-_002emlbst"></a><span>&lsquo;<samp class="samp">mlbst</samp>&rsquo;<a class="copiable-link" href="#index-_002emlbst"> &para;</a></span></dt>
<dd><p>(MlBibTeX style)
<code class="code">MLBSTINPUTS</code>, <code class="code">BSTINPUTS</code>;
suffixes &lsquo;<samp class="samp">.mlbst</samp>&rsquo;, &lsquo;<samp class="samp">.bst</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MPINPUTS"></a>
<a id="index-_002emp"></a><span>&lsquo;<samp class="samp">mp</samp>&rsquo;<a class="copiable-link" href="#index-_002emp"> &para;</a></span></dt>
<dd><p>(MetaPost source, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#mpost-invocation">mpost invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">MPINPUTS</code>;
suffix &lsquo;<samp class="samp">.mp</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-MPPOOL"></a>
<a id="index-_002epool-1"></a><span>&lsquo;<samp class="samp">mppool</samp>&rsquo;<a class="copiable-link" href="#index-_002epool-1"> &para;</a></span></dt>
<dd><p>(MetaPost program strings, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#pooltype-invocation">pooltype invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">MPPOOL</code>, <code class="code">TEXMFINI</code>;
suffix &lsquo;<samp class="samp">.pool</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-OCPINPUTS"></a>
<a id="index-_002eocp"></a><span>&lsquo;<samp class="samp">ocp</samp>&rsquo;<a class="copiable-link" href="#index-_002eocp"> &para;</a></span></dt>
<dd><p>(Omega compiled process files)
<code class="code">OCPINPUTS</code>; <br>
suffix &lsquo;<samp class="samp">.ocp</samp>&rsquo;;
dynamic creation program: <code class="code">MakeOmegaOCP</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-OFMFONTS"></a>
<a id="index-_002eofm"></a><span>&lsquo;<samp class="samp">ofm</samp>&rsquo;<a class="copiable-link" href="#index-_002eofm"> &para;</a></span></dt>
<dd><p>(Omega font metrics)
<code class="code">OFMFONTS</code>, <code class="code">TEXFONTS</code>; <br>
suffixes &lsquo;<samp class="samp">.ofm</samp>&rsquo;, &lsquo;<samp class="samp">.tfm</samp>&rsquo;;
dynamic creation program: <code class="code">MakeOmegaOFM</code>.
</p>
</dd>
<dt><a id="index-OPENTYPEFONTS"></a><span>&lsquo;<samp class="samp">opentype fonts</samp>&rsquo;<a class="copiable-link" href="#index-OPENTYPEFONTS"> &para;</a></span></dt>
<dd><p>(OpenType fonts)
<code class="code">OPENTYPEFONTS</code>.
</p>
</dd>
<dt><a id="index-_002eopl"></a><span>&lsquo;<samp class="samp">opl</samp>&rsquo;<a class="copiable-link" href="#index-_002eopl"> &para;</a></span></dt>
<dd><p>(Omega property lists)
<code class="code">OPLFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">.opl</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-OTPINPUTS"></a>
<a id="index-_002eotp"></a><span>&lsquo;<samp class="samp">otp</samp>&rsquo;<a class="copiable-link" href="#index-_002eotp"> &para;</a></span></dt>
<dd><p>(Omega translation process files)
<code class="code">OTPINPUTS</code>;
suffix &lsquo;<samp class="samp">.otp</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-OVFFONTS"></a>
<a id="index-_002eovf"></a><span>&lsquo;<samp class="samp">ovf</samp>&rsquo;<a class="copiable-link" href="#index-_002eovf"> &para;</a></span></dt>
<dd><p>(Omega virtual fonts)
<code class="code">OVFFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">.ovf</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-OVPFONTS"></a>
<a id="index-_002eovp"></a><span>&lsquo;<samp class="samp">ovp</samp>&rsquo;<a class="copiable-link" href="#index-_002eovp"> &para;</a></span></dt>
<dd><p>(Omega virtual property lists)
<code class="code">OVPFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">.ovp</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-PDFTEXCONFIG"></a><span>&lsquo;<samp class="samp">pdftex config</samp>&rsquo;<a class="copiable-link" href="#index-PDFTEXCONFIG"> &para;</a></span></dt>
<dd><p>(PDFTeX-specific configuration files)
<code class="code">PDFTEXCONFIG</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-PKFONTS"></a>
<a class="index-entry-id" id="index-TEXPKS"></a>
<a class="index-entry-id" id="index-GLYPHFONTS-1"></a>
<a class="index-entry-id" id="index-TEXFONTS-1"></a>
<a id="index-_002epk"></a><span>&lsquo;<samp class="samp">pk</samp>&rsquo;<a class="copiable-link" href="#index-_002epk"> &para;</a></span></dt>
<dd><p>(packed bitmap fonts, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Glyph-files">Glyph files</a> in <cite class="cite">Dvips</cite>)
<code class="code"><var class="var">PROGRAM</var>FONTS</code> (<var class="var">program</var> being &lsquo;<samp class="samp">XDVI</samp>&rsquo;, etc.),
<code class="code">PKFONTS</code>, <code class="code">TEXPKS</code>, <code class="code">GLYPHFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">pk</samp>&rsquo;;
dynamic creation program: <code class="code">mktexpk</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXPSHEADERS"></a>
<a class="index-entry-id" id="index-PSHEADERS"></a>
<a id="index-_002epro"></a><span>&lsquo;<samp class="samp">PostScript header</samp>&rsquo;<a class="copiable-link" href="#index-_002epro"> &para;</a></span></dt>
<dd><p>(downloadable PostScript, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Header-files">Header files</a> in <cite class="cite">Dvips</cite>)
<code class="code">TEXPSHEADERS</code>, <code class="code">PSHEADERS</code>;
additional suffix &lsquo;<samp class="samp">.pro</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-RISINPUTS"></a>
<a id="index-_002eris"></a><span>&lsquo;<samp class="samp">ris</samp>&rsquo;<a class="copiable-link" href="#index-_002eris"> &para;</a></span></dt>
<dd><p>(RIS bibliography files, primarily for Biber, <a class="url" href="https://ctan.org/pkg/biber">https://ctan.org/pkg/biber</a>)
<code class="code">RISINPUTS</code>
suffix &lsquo;<samp class="samp">.ris</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-SFDFONTS"></a>
<a id="index-_002esfd"></a><span>&lsquo;<samp class="samp">subfont definition files</samp>&rsquo;<a class="copiable-link" href="#index-_002esfd"> &para;</a></span></dt>
<dd><p>(subfont definition files)
<code class="code">SFDFONTS</code>
suffix &lsquo;<samp class="samp">.sfd</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXINPUTS-1"></a>
<a id="index-_002etex"></a><span>&lsquo;<samp class="samp">tex</samp>&rsquo;<a class="copiable-link" href="#index-_002etex"> &para;</a></span></dt>
<dd><p>(TeX source, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#tex-invocation">tex invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">TEXINPUTS</code>;
suffix &lsquo;<samp class="samp">.tex</samp>&rsquo;;
additional suffixes: none, because such a list cannot be complete;
dynamic creation program: <code class="code">mktextex</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXDOCS"></a>
<a id="index-doc-files"></a><span>&lsquo;<samp class="samp">TeX system documentation</samp>&rsquo;<a class="copiable-link" href="#index-doc-files"> &para;</a></span></dt>
<dd><p>(Documentation files for the TeX system)
<code class="code">TEXDOCS</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXSOURCES"></a>
<a id="index-source-files"></a><span>&lsquo;<samp class="samp">TeX system sources</samp>&rsquo;<a class="copiable-link" href="#index-source-files"> &para;</a></span></dt>
<dd><p>(Source files for the TeX system)
<code class="code">TEXSOURCES</code>.
</p>
</dd>
<dt><a id="index-TEXMFSCRIPTS"></a><span>&lsquo;<samp class="samp">texmfscripts</samp>&rsquo;<a class="copiable-link" href="#index-TEXMFSCRIPTS"> &para;</a></span></dt>
<dd><p>(Architecture-independent executables distributed in the texmf trees)
<code class="code">TEXMFSCRIPTS</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TEXPOOL"></a>
<a id="index-_002epool-2"></a><span>&lsquo;<samp class="samp">texpool</samp>&rsquo;<a class="copiable-link" href="#index-_002epool-2"> &para;</a></span></dt>
<dd><p>(TeX program strings, see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#pooltype-invocation">pooltype invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">TEXPOOL</code>, <code class="code">TEXMFINI</code>;
suffix &lsquo;<samp class="samp">.pool</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-TFMFONTS"></a>
<a class="index-entry-id" id="index-TEXFONTS-2"></a>
<a id="index-_002etfm"></a><span>&lsquo;<samp class="samp">tfm</samp>&rsquo;<a class="copiable-link" href="#index-_002etfm"> &para;</a></span></dt>
<dd><p>(TeX font metrics, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Metric-files">Metric files</a> in <cite class="cite">Dvips</cite>)
<code class="code">TFMFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">.tfm</samp>&rsquo;;
dynamic creation program: <code class="code">mktextfm</code>.
</p>
</dd>
<dt><a id="index-TRFONTS"></a><span>&lsquo;<samp class="samp">Troff fonts</samp>&rsquo;<a class="copiable-link" href="#index-TRFONTS"> &para;</a></span></dt>
<dd><p>(Troff fonts, used by DMP; see <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#DMP-invocation">DMP invocation</a> in <cite class="cite">Web2c</cite>)
<code class="code">TRFONTS</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002ettc"></a>
<a class="index-entry-id" id="index-TTFONTS"></a>
<a id="index-_002ettf"></a><span>&lsquo;<samp class="samp">truetype fonts</samp>&rsquo;<a class="copiable-link" href="#index-_002ettf"> &para;</a></span></dt>
<dd><p>(TrueType outline fonts) <code class="code">TTFONTS</code>; suffixes &lsquo;<samp class="samp">.ttf</samp>&rsquo; and
&lsquo;<samp class="samp">.TTF</samp>&rsquo;, &lsquo;<samp class="samp">.ttc</samp>&rsquo; and &lsquo;<samp class="samp">.TTC</samp>&rsquo;, &lsquo;<samp class="samp">.dfont</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-_002epfb"></a>
<a class="index-entry-id" id="index-T1FONTS"></a>
<a class="index-entry-id" id="index-T1INPUTS"></a>
<a class="index-entry-id" id="index-TEXPSHEADERS-1"></a>
<a class="index-entry-id" id="index-DVIPSHEADERS"></a>
<a id="index-_002epfa"></a><span>&lsquo;<samp class="samp">type1 fonts</samp>&rsquo;<a class="copiable-link" href="#index-_002epfa"> &para;</a></span></dt>
<dd><p>(Type 1 PostScript outline fonts, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Glyph-files">Glyph files</a> in <cite class="cite">Dvips</cite>)
<code class="code">T1FONTS</code>, <code class="code">T1INPUTS</code>, <code class="code">TEXPSHEADERS</code>, <code class="code">DVIPSHEADERS</code>;
suffixes &lsquo;<samp class="samp">.pfa</samp>&rsquo;, &lsquo;<samp class="samp">.pfb</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-T42FONTS"></a><span>&lsquo;<samp class="samp">type42 fonts</samp>&rsquo;<a class="copiable-link" href="#index-T42FONTS"> &para;</a></span></dt>
<dd><p>(Type 42 PostScript outline fonts) <code class="code">T42FONTS</code>.
</p>
</dd>
<dt><a class="index-entry-id" id="index-VFFONTS"></a>
<a class="index-entry-id" id="index-TEXFONTS-3"></a>
<a id="index-_002evf"></a><span>&lsquo;<samp class="samp">vf</samp>&rsquo;<a class="copiable-link" href="#index-_002evf"> &para;</a></span></dt>
<dd><p>(virtual fonts, see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Virtual-fonts">Virtual fonts</a> in <cite class="cite">Dvips</cite>)
<code class="code">VFFONTS</code>, <code class="code">TEXFONTS</code>;
suffix &lsquo;<samp class="samp">.vf</samp>&rsquo;.
</p>
</dd>
<dt><a class="index-entry-id" id="index-WEBINPUTS"></a>
<a id="index-_002eweb-1"></a><span>&lsquo;<samp class="samp">web</samp>&rsquo;<a class="copiable-link" href="#index-_002eweb-1"> &para;</a></span></dt>
<dd><p>(WEB input files)
<code class="code">WEBINPUTS</code>;
suffix &lsquo;<samp class="samp">.web</samp>&rsquo;;
additional suffix &lsquo;<samp class="samp">.ch</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-WEB2C"></a><span>&lsquo;<samp class="samp">web2c files</samp>&rsquo;<a class="copiable-link" href="#index-WEB2C"> &para;</a></span></dt>
<dd><p>(files specific to the web2c implementation)
<code class="code">WEB2C</code>.
</p></dd>
</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 class="samp">INPUTS</samp>&rsquo;.  Assuming the program is called &lsquo;<samp class="samp">foo</samp>&rsquo;,
this gives us the following table.
</p>
<dl class="table">
<dt><a id="index-FOOINPUTS"></a><span>&lsquo;<samp class="samp">other text files</samp>&rsquo;<a class="copiable-link" href="#index-FOOINPUTS"> &para;</a></span></dt>
<dd><p>(text files used by &lsquo;<samp class="samp">foo</samp>&rsquo;)
<code class="code">FOOINPUTS</code>.
</p>
</dd>
<dt><a id="index-FOOINPUTS-1"></a><span>&lsquo;<samp class="samp">other binary files</samp>&rsquo;<a class="copiable-link" href="#index-FOOINPUTS-1"> &para;</a></span></dt>
<dd><p>(binary files used by &lsquo;<samp class="samp">foo</samp>&rsquo;)
<code class="code">FOOINPUTS</code>.
</p></dd>
</dl>

<p>If an environment variable by these names are set, the corresponding
<samp class="file">texmf.cnf</samp> definition won&rsquo;t be looked at (unless, as usual, the
environment variable value has an extra &lsquo;<samp class="samp">:</samp>&rsquo;).  See <a class="xref" href="#Default-expansion">Default expansion</a>.
</p>
<p>For the font variables, the intent is that:
</p><ul class="itemize mark-bullet">
<li><code class="code">TEXFONTS</code> is the default for everything.

</li><li><code class="code">GLYPHFONTS</code> is the default for bitmap (or, more precisely,
non-metric) files.

</li><li>Each font format has a variable of its own.

</li><li><a class="index-entry-id" id="index-XDVIFONTS"></a>
<a class="index-entry-id" id="index-DVIPSFONTS"></a>
Each program has its own font override path as well; e.g.,
<code class="code">DVIPSFONTS</code> for Dvipsk.  Again, this is for bitmaps, not metrics.

</li></ul>


<hr>
</div>
<div class="section-level-extent" id="File-lookup">
<div class="nav-panel">
<p>
Next: <a href="#Glyph-lookup" accesskey="n" rel="next">Glyph lookup</a>, Previous: <a href="#Supported-file-formats" accesskey="p" rel="prev">Supported file formats</a>, Up: <a href="#TeX-support" accesskey="u" rel="up">TeX support</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="File-lookup-1"><span>6.2 File lookup<a class="copiable-link" href="#File-lookup-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-file-lookup"></a>
<a class="index-entry-id" id="index-searching-for-files"></a>
<a class="index-entry-id" id="index-TeX-file-lookup"></a>

<p>This section describes how Kpathsea searches for most files (bitmap font
searches are the exception, as described in the next section).
</p>
<p>Here is the search strategy for a file <var class="var">name</var>:
</p>
<ol class="enumerate">
<li> If the file format defines default suffixes, and the suffix of
<var class="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 class="samp">foo.bar</samp>&rsquo;, look for
&lsquo;<samp class="samp">foo.bar.tex</samp>&rsquo;.

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

</li><li> If the file format defines a program to invoke to create missing files,
run it (see <a class="pxref" href="#mktex-scripts"><samp class="file">mktex</samp> scripts</a>).
</li></ol>

<a class="index-entry-id" id="index-extensions_002c-filename"></a>
<a class="index-entry-id" id="index-suffixes_002c-filename"></a>
<a class="index-entry-id" id="index-try_005fstd_005fextension_005ffirst"></a>
<p>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 class="file">try_std_extension_first</samp> configuration value.  The default set
in <samp class="file">texmf.cnf</samp> is true, since common suffixes are already
recognized: &lsquo;<samp class="samp">babel.sty</samp>&rsquo; will only look for &lsquo;<samp class="samp">babel.sty</samp>&rsquo;, not
&lsquo;<samp class="samp">babel.sty.tex</samp>&rsquo;, regardless of this setting.
</p>
<p>When the suffix is unknown (e.g., &lsquo;<samp class="samp">foo.bar</samp>&rsquo;), both names are
always tried; the difference is the order in which they are tried.
</p>
<p><samp class="file">try_std_extension_first</samp> only affects names being looked up
which *already* have an extension.  A name without an extension (e.g.,
&lsquo;<samp class="samp">tex story</samp>&rsquo;) will always have an extension added first.
</p>
<a class="index-entry-id" id="index-tex_002dfile_002ec"></a>
<a class="index-entry-id" id="index-kpathsea_005ffind_005ffile"></a>
<p>This algorithm is implemented in the function
<code class="code">kpathsea_find_file</code> in the source file
<samp class="file">kpathsea/tex-file.c</samp>.  You can watch it in action with the
debugging options (see <a class="pxref" href="#Debugging">Debugging</a>).
</p>

<hr>
</div>
<div class="section-level-extent" id="Glyph-lookup">
<div class="nav-panel">
<p>
Next: <a href="#Suppressing-warnings" accesskey="n" rel="next">Suppressing warnings</a>, Previous: <a href="#File-lookup" accesskey="p" rel="prev">File lookup</a>, Up: <a href="#TeX-support" accesskey="u" rel="up">TeX support</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Glyph-lookup-1"><span>6.3 Glyph lookup<a class="copiable-link" href="#Glyph-lookup-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-glyph-lookup"></a>
<a class="index-entry-id" id="index-searching-for-glyphs"></a>
<a class="index-entry-id" id="index-TeX-glyph-lookup"></a>

<p>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 class="samp">cmr10</samp>&rsquo;) and a
resolution (e.g., 600).
</p>
<p>Here is an outline of the search strategy (details in the sections
below) for a file <var class="var">name</var> at resolution <var class="var">dpi</var>.  The search stops
at the first successful lookup.
</p>
<ol class="enumerate">
<li> Look for an existing file <var class="var">name</var>.<var class="var">dpi</var><var class="var">format</var> in the
specified format(s).

</li><li> If <var class="var">name</var> is an alias for a file <var class="var">f</var> in the fontmap
file <samp class="file">texfonts.map</samp>, look for <var class="var">f</var>.<var class="var">dpi</var>.

</li><li> Run an external program (typically named &lsquo;<samp class="samp">mktexpk</samp>&rsquo;) to
generate the font (see <a class="pxref" href="#mktex-scripts"><samp class="file">mktex</samp> scripts</a>)

</li><li> Look for <var class="var">fallback</var>.<var class="var">dpi</var>, where <var class="var">fallback</var> is some
last-resort font (typically &lsquo;<samp class="samp">cmr10</samp>&rsquo;).
</li></ol>

<a class="index-entry-id" id="index-tex_002dglyph_002ec"></a>
<a class="index-entry-id" id="index-kpathsea_005ffind_005fglyph"></a>
<p>This is implemented in <code class="code">kpathsea_find_glyph</code> in
<samp class="file">kpathsea/tex-glyph.c</samp>.
</p>


<ul class="mini-toc">
<li><a href="#Basic-glyph-lookup" accesskey="1">Basic glyph lookup</a></li>
<li><a href="#Fontmap" accesskey="2">Fontmap</a></li>
<li><a href="#Fallback-font" accesskey="3">Fallback font</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Basic-glyph-lookup">
<div class="nav-panel">
<p>
Next: <a href="#Fontmap" accesskey="n" rel="next">Fontmap</a>, Up: <a href="#Glyph-lookup" accesskey="u" rel="up">Glyph lookup</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Basic-glyph-lookup-1"><span>6.3.1 Basic glyph lookup<a class="copiable-link" href="#Basic-glyph-lookup-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-basic-glyph-lookup"></a>
<a class="index-entry-id" id="index-common-features-in-glyph-lookup"></a>

<p>When Kpathsea looks for a bitmap font <var class="var">name</var> at resolution <var class="var">dpi</var>
in a format <var class="var">format</var>, it first checks each directory in the search
path for a file &lsquo;<samp class="samp"><var class="var">name</var>.<var class="var">dpi</var><var class="var">format</var></samp>&rsquo;; for example,
&lsquo;<samp class="samp">cmr10.600pk</samp>&rsquo;.  Kpathsea looks for a PK file first, then a GF file.
</p>
<p>If that fails, Kpathsea looks for
&lsquo;<samp class="samp">dpi<var class="var">dpi</var>/<var class="var">name</var>.<var class="var">format</var></samp>&rsquo;; for example,
&lsquo;<samp class="samp">dpi600/cmr10.pk</samp>&rsquo;. This is how fonts are typically stored on
filesystems (such as DOS) that permit only three-character extensions.
</p>
<a class="index-entry-id" id="index-tolerance-for-glyph-lookup"></a>
<a class="index-entry-id" id="index-glyph-lookup-bitmap-tolerance"></a>
<a class="index-entry-id" id="index-KPSE_005fBITMAP_005fTOLERANCE"></a>
<p>If that fails, Kpathsea looks for a font with a close-enough <var class="var">dpi</var>.
&ldquo;Close enough&rdquo; is defined by the macro <code class="code">KPSE_BITMAP_TOLERANCE</code> in
<samp class="file">kpathsea/tex-glyph.h</samp> to be <code class="code"><var class="var">dpi</var> / 500 + 1</code>.  This is
slightly more than the 0.2% minimum allowed by the DVI standard
(<a class="url" href="CTAN:/dviware/driv-standard/level-0">CTAN:/dviware/driv-standard/level-0</a>).
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Fontmap">
<div class="nav-panel">
<p>
Next: <a href="#Fallback-font" accesskey="n" rel="next">Fallback font</a>, Previous: <a href="#Basic-glyph-lookup" accesskey="p" rel="prev">Basic glyph lookup</a>, Up: <a href="#Glyph-lookup" accesskey="u" rel="up">Glyph lookup</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Fontmap-1"><span>6.3.2 Fontmap<a class="copiable-link" href="#Fontmap-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-fontmap-files"></a>
<a class="index-entry-id" id="index-font-alias-files"></a>
<a class="index-entry-id" id="index-aliases-for-fonts"></a>

<a class="index-entry-id" id="index-texfonts_002emap"></a>
<p>If a bitmap font or metric file is not found with the original name (see
the previous section), Kpathsea looks through any <em class="dfn">fontmap</em> files
for an <em class="dfn">alias</em> for the original font name.  These files are named
<samp class="file">texfonts.map</samp> and searched for along the <code class="code">TEXFONTMAPS</code>
environment/config file variable.  All <samp class="file">texfonts.map</samp> files that
are found are read; earlier definitions override later ones.
</p>
<p>This feature is intended to help in two respects:
</p>
<ol class="enumerate">
<li> <a class="index-entry-id" id="index-fontnames_002c-arbitrary-length"></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 class="samp">Times-Roman</samp>&rsquo;
instead of <samp class="file">ptmr</samp>, you can (you get &lsquo;<samp class="samp">ptmr8r</samp>&rsquo;).

</li><li> <a class="index-entry-id" id="index-circle-fonts"></a>
<a class="index-entry-id" id="index-lcircle10"></a>
A few fonts have historically had multiple names: specifically,
LaTeX&rsquo;s &ldquo;circle font&rdquo; has variously been known as <samp class="file">circle10</samp>,
<samp class="file">lcircle10</samp>, and <samp class="file">lcirc10</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.

</li></ol>

<p>The format of fontmap files:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-comments_002c-in-fontmap-files"></a>
Comments start with the last &lsquo;<samp class="samp">%</samp>&rsquo; on a line and continue to
the end of the line. (This provides for names that include a %,
ill-advised as that may be.)

</li><li><a class="index-entry-id" id="index-whitespace_002c-in-fontmap-files"></a>
Blank lines are ignored.

</li><li>Each nonblank line is broken up into a series of <em class="dfn">words</em>:
  a sequence of non-whitespace characters.

</li><li><a class="index-entry-id" id="index-include-fontmap-directive"></a>
If the first word is &lsquo;<samp class="samp">include</samp>&rsquo;, the second word is used as
  a filename, and it is searched for and read.

</li><li>Otherwise, the first word on each line is the true filename;

</li><li>the second word is the alias;

</li><li>subsequent words are ignored.
</li></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 class="samp">foo.tfm</samp>&rsquo; matches only when
<samp class="file">foo.tfm</samp> is being searched for; but an alias &lsquo;<samp class="samp">foo</samp>&rsquo; matches
<samp class="file">foo.vf</samp>, <samp class="file">foo.600pk</samp>, etc.
</p>
<p>As an example, here is an excerpt from the <samp class="file">texfonts.map</samp> in the
Web2c distribution.  It makes the old and new names of the LaTeX
circle fonts equivalent.
</p>
<div class="example">
<pre class="example-preformatted">circle10        lcircle10
circle10        lcirc10
lcircle10       circle10
lcircle10       lcirc10
lcirc10         circle10
lcirc10         lcircle10
...
</pre></div>

<p>Fontmaps are implemented in the file <samp class="file">kpathsea/fontmap.c</samp>.
The Fontname distribution has much more information on font naming
(see <cite class="cite"><a data-manual="fontname" href="fontname.html#Top">Filenames for TeX fonts</a></cite>).
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Fallback-font">
<div class="nav-panel">
<p>
Previous: <a href="#Fontmap" accesskey="p" rel="prev">Fontmap</a>, Up: <a href="#Glyph-lookup" accesskey="u" rel="up">Glyph lookup</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Fallback-font-1"><span>6.3.3 Fallback font<a class="copiable-link" href="#Fallback-font-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-fallback-font"></a>
<a class="index-entry-id" id="index-fallback-resolutions"></a>
<a class="index-entry-id" id="index-font-of-last-resort"></a>
<a class="index-entry-id" id="index-resolutions_002c-last_002dresort"></a>
<a class="index-entry-id" id="index-last_002dresort-font"></a>

<a class="index-entry-id" id="index-DVIPSSIZES"></a>
<a class="index-entry-id" id="index-XDVISIZES"></a>
<a class="index-entry-id" id="index-DVILJSIZES"></a>
<a class="index-entry-id" id="index-TEXSIZES"></a>
<a class="index-entry-id" id="index-default_005ftexsizes"></a>
<p>If a bitmap font cannot be found or created at the requested size,
Kpathsea looks for the font at a set of <em class="dfn">fallback resolutions</em>.  You
specify these resolutions as a colon-separated list (like search paths).
Kpathsea looks first for a program-specific environment variable (e.g.,
<code class="code">DVIPSSIZES</code> for Dvipsk), then the environment variable
<code class="code">TEXSIZES</code>, then a default specified at compilation time (the Make
variable <code class="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 class="index-entry-id" id="index-cmr10_002c-as-fallback-font"></a>
<a class="index-entry-id" id="index-kpathsea_005finit_005fprog"></a>
<p>Finally, if the font cannot be found even at the fallback resolutions,
Kpathsea looks for a fallback font, typically <samp class="file">cmr10</samp>.  Programs
must enable this feature by  calling <code class="code">kpathsea_init_prog</code>
(see <a class="pxref" href="#Calling-sequence">Calling sequence</a>); the default is no fallback font.
</p>

<hr>
</div>
</div>
<div class="section-level-extent" id="Suppressing-warnings">
<div class="nav-panel">
<p>
Next: <a href="#mktex-scripts" accesskey="n" rel="next"><samp class="file">mktex</samp> scripts</a>, Previous: <a href="#Glyph-lookup" accesskey="p" rel="prev">Glyph lookup</a>, Up: <a href="#TeX-support" accesskey="u" rel="up">TeX support</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Suppressing-warnings-1"><span>6.4 Suppressing warnings<a class="copiable-link" href="#Suppressing-warnings-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-warnings_002c-suppressing"></a>
<a class="index-entry-id" id="index-suppressing-warnings"></a>

<a class="index-entry-id" id="index-TEX_005fHUSH-1"></a>
<p>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 class="code">TEX_HUSH</code> to a colon-separated list of values.  Here are the
possibilities:
</p>
<dl class="vtable">
<dt><a id="index-all"></a><span>&lsquo;<samp class="samp">all</samp>&rsquo;<a class="copiable-link" href="#index-all"> &para;</a></span></dt>
<dd><p>Suppress everything possible.
</p>
</dd>
<dt><a id="index-checksum"></a><span>&lsquo;<samp class="samp">checksum</samp>&rsquo;<a class="copiable-link" href="#index-checksum"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-mismatched-checksum-warnings"></a>
<p>Suppress mismatched font checksum warnings.
</p>
</dd>
<dt><a id="index-lostchar"></a><span>&lsquo;<samp class="samp">lostchar</samp>&rsquo;<a class="copiable-link" href="#index-lostchar"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-missing-character-warnings"></a>
<p>Suppress warnings when a character is missing from a font that a DVI or
VF file tries to typeset.
</p>
</dd>
<dt><a id="index-none"></a><span>&lsquo;<samp class="samp">none</samp>&rsquo;<a class="copiable-link" href="#index-none"> &para;</a></span></dt>
<dd><p>Don&rsquo;t suppress any warnings.
</p>
</dd>
<dt><a id="index-readable"></a><span>&lsquo;<samp class="samp">readable</samp>&rsquo;<a class="copiable-link" href="#index-readable"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-unreadable-file-warnings"></a>
<p>Suppress warnings about attempts to access a file whose permissions
render it unreadable.
</p>
</dd>
<dt><a id="index-special"></a><span>&lsquo;<samp class="samp">special</samp>&rsquo;<a class="copiable-link" href="#index-special"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-unknown-special-warnings"></a>
<a class="index-entry-id" id="index-_005cspecial_002c-suppressing-warnings-about"></a>
<p>Suppresses warnings about an unimplemented or unparsable
&lsquo;<samp class="samp">\special</samp>&rsquo; command.
</p></dd>
</dl>

<p><samp class="file">tex-hush.c</samp> defines the function that checks the
variable value.  Each driver implements its own checks where
appropriate.
</p>

<hr>
</div>
<div class="section-level-extent" id="mktex-scripts">
<div class="nav-panel">
<p>
Previous: <a href="#Suppressing-warnings" accesskey="p" rel="prev">Suppressing warnings</a>, Up: <a href="#TeX-support" accesskey="u" rel="up">TeX support</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="mktex-scripts-1"><span>6.5 <samp class="file">mktex</samp> scripts<a class="copiable-link" href="#mktex-scripts-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-mktex-scripts"></a>
<a class="index-entry-id" id="index-scripts-for-file-creation"></a>

<a class="index-entry-id" id="index-font-set_002c-infinite"></a>
<a class="index-entry-id" id="index-dynamic-creation-of-files"></a>
<a class="index-entry-id" id="index-Sauter-fonts_002c-and-dynamic-source-creation"></a>
<a class="index-entry-id" id="index-EC-fonts_002c-and-dynamic-source-creation"></a>
<p>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 class="pxref" href="#mktex-configuration"><samp class="file">mktex</samp> configuration</a>).  These are collectively
known as <em class="dfn"><code class="code">mktex</code> scripts</em>, since most of them are named
<code class="code">mktex...</code>.
</p>
<p>For example, this is useful for fonts (bitmaps, TFM&rsquo;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>
<p>It is also useful for the TeX &lsquo;<samp class="samp">.fmt</samp>&rsquo; (and Metafont
&lsquo;<samp class="samp">.base</samp>&rsquo; and Metapost &lsquo;<samp class="samp">.mem</samp>&rsquo; files, see <a data-manual="Web2c" href="Web2c.html#Memory-dumps">Memory
dumps</a> in <cite class="cite">web2c</cite>), where pre-generating every format consumes a
lot of both time and space.
</p>
<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.
</p>


<ul class="mini-toc">
<li><a href="#mktex-configuration" accesskey="1"><samp class="file">mktex</samp> configuration</a></li>
<li><a href="#mktex-script-names" accesskey="2"><samp class="file">mktex</samp> script names</a></li>
<li><a href="#mktex-script-arguments" accesskey="3"><samp class="file">mktex</samp> script arguments</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="mktex-configuration">
<div class="nav-panel">
<p>
Next: <a href="#mktex-script-names" accesskey="n" rel="next"><samp class="file">mktex</samp> script names</a>, Up: <a href="#mktex-scripts" accesskey="u" rel="up"><samp class="file">mktex</samp> scripts</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="mktex-configuration-1"><span>6.5.1 <samp class="file">mktex</samp> configuration<a class="copiable-link" href="#mktex-configuration-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-mktex-script-configuration"></a>
<a class="index-entry-id" id="index-configuration-of-mktex-scripts"></a>
<a class="index-entry-id" id="index-enabling-mktex-scripts"></a>
<a class="index-entry-id" id="index-disabling-mktex-scripts"></a>

<p>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 class="code">configure</code> options specifying otherwise, everything
but <samp class="file">mktextex</samp> will be enabled by default.  The <code class="code">configure</code>
options to change the defaults are:
</p>
<a class="index-entry-id" id="index-configure-options-for-mktex-scripts"></a>
<a class="index-entry-id" id="index-_002d_002dwithout_002dmktexfmt_002ddefault"></a>
<a class="index-entry-id" id="index-_002d_002dwithout_002dmktexmf_002ddefault"></a>
<a class="index-entry-id" id="index-_002d_002dwithout_002dmktexocp_002ddefault"></a>
<a class="index-entry-id" id="index-_002d_002dwithout_002dmktexofm_002ddefault"></a>
<a class="index-entry-id" id="index-_002d_002dwithout_002dmktexpk_002ddefault"></a>
<a class="index-entry-id" id="index-_002d_002dwithout_002dmktextfm_002ddefault"></a>
<a class="index-entry-id" id="index-_002d_002dwith_002dmktextex_002ddefault"></a>
<div class="example">
<pre class="example-preformatted">--without-mktexfmt-default
--without-mktexmf-default
--without-mktexocp-default
--without-mktexofm-default
--without-mktexpk-default
--without-mktextfm-default
--with-mktextex-default
</pre></div>

<p>The <code class="code">configure</code> setting is overridden if the environment variable
or configuration file value named for the script is set; e.g.,
<samp class="file">MKTEXPK</samp> (see <a class="pxref" href="#mktex-script-arguments"><samp class="file">mktex</samp> script arguments</a>).
</p>
<a class="index-entry-id" id="index-fmtutils_002ecnf"></a>
<p><code class="code">mktexfmt</code> reads a file <samp class="file">fmtutil.cnf</samp>, typically located in
<samp class="file">texmf/web2c/</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 class="index-entry-id" id="index-mktex_002ecnf-1"></a>
<a class="index-entry-id" id="index-mktex_002eopt"></a>
<a class="index-entry-id" id="index-site-overrides-for-mktex_2026"></a>
<p>As distributed, all the scripts source a file
<samp class="file">texmf/web2c/mktex.cnf</samp> if it exists, so you can override various
defaults.  
See <samp class="file">mktex.opt</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 class="file">mktex.cnf</samp>
with the appropriate definitions (you do not need to create it if you
have nothing to put in it).  <samp class="file">mktex.cnf</samp> has no special syntax;
it&rsquo;s an arbitrary Bourne shell script.  The distribution contains a
sample <samp class="file">mktex.cnf</samp> for you to copy and modify as you please (it
is not installed anywhere).
</p>
<a class="index-entry-id" id="index-mktex_002eopt-1"></a>
<a class="index-entry-id" id="index-MT_005fFEATURES"></a>
<p>In addition, you can configure a number of features with the
<code class="code">MT_FEATURES</code> variable, which you can define:
</p>
<ul class="itemize mark-bullet">
<li>in <samp class="file">mktex.opt</samp>, as just mentioned;

</li><li>by editing the file <samp class="file">mktex.opt</samp>, either before &lsquo;<samp class="samp">make
install</samp>&rsquo; (in the source hierarchy) or after (in the installed
hierarchy);

</li><li>or in the environment.
</li></ul>

<p>If none of the options below are enabled, <code class="code">mktexpk</code>,
<code class="code">mktextfm</code>, and <code class="code">mktexmf</code> follow the following procedure to
decide where fonts should be installed.  Find the tree where the font&rsquo;s
sources are, and test the permissions of the &lsquo;<samp class="samp">fonts</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&rsquo;t writable, see whether
the tree is a system tree (named in <code class="code">SYSTEXMF</code>).  If so, the
<code class="code">VARTEXFONTS</code> tree is used.  In all other cases the working
directory is used.
</p>
<p>The &lsquo;<samp class="samp">appendonlydir</samp>&rsquo; option is enabled by default.
</p>
<dl class="vtable">
<dt><a id="index-appendonlydir"></a><span>&lsquo;<samp class="samp">appendonlydir</samp>&rsquo;<a class="copiable-link" href="#index-appendonlydir"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-directories_002c-making-append_002donly"></a>
<a class="index-entry-id" id="index-mktexdir"></a>
<p>Tell <code class="code">mktexdir</code> to create directories append-only, i.e., set
their sticky bit (see <a data-manual="coreutils" href="https://www.gnu.org/software/coreutils/manual/coreutils.html#Mode-Structure">Mode Structure</a> in <cite class="cite">GNU Core
Utilities</cite>).  This feature is silently ignored on non-Unix platforms
(e.g. Windows/NT and MS-DOS) which don&rsquo;t support similar functionality.
This feature is enabled by default.
</p>
</dd>
<dt><a id="index-dosnames"></a><span>&lsquo;<samp class="samp">dosnames</samp>&rsquo;<a class="copiable-link" href="#index-dosnames"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-8_002e3-filenames_002c-using"></a>
<a class="index-entry-id" id="index-DOS-compatible-names"></a>
<a class="index-entry-id" id="index-dpinnn-directories"></a>
<p>Use 8.3 names; e.g., <samp class="file">dpi600/cmr10.pk</samp> instead of
<samp class="file">cmr10.600pk</samp>.  Note that this feature only affects filenames that
would otherwise clash with other TeX-related filenames; <samp class="file">mktex</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&rsquo;t
related with TeX.  For example, <samp class="file">cmr10.600pk</samp> would clash with
<samp class="file">cmr10.600gf</samp> and is therefore changed when &lsquo;<samp class="samp">dosnames</samp>&rsquo; is in
effect, but <samp class="file">mf.pool</samp> and <samp class="file">mp.base</samp> don&rsquo;t clash with any
TeX-related files and are therefore unchanged.
</p>
<p>This feature is turned on by default on MS-DOS.  If you do not wish
&lsquo;<samp class="samp">dosnames</samp>&rsquo; to be set on an MS-DOS platform, you need to set the
<code class="code">MT_FEATURES</code> environment variable to a value that doesn&rsquo;t include
&lsquo;<samp class="samp">dosnames</samp>&rsquo;.  You can also change the default setting by editing
<samp class="file">mktex.opt</samp>, but only if you use the <samp class="file">mktex</samp> shell scripts;
the emulation programs don&rsquo;t consult <samp class="file">mktex.opt</samp>.
</p>
</dd>
<dt><a id="index-fontmaps-1"></a><span>&lsquo;<samp class="samp">fontmaps</samp>&rsquo;<a class="copiable-link" href="#index-fontmaps-1"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-fontmaps"></a>
<a class="index-entry-id" id="index-fontname"></a>
<p>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 data-manual="fontname" href="fontname.html#Top">Introduction</a> in <cite class="cite">Fontname</cite>).
</p>
</dd>
<dt><a id="index-nomfdrivers"></a><span>&lsquo;<samp class="samp">nomfdrivers</samp>&rsquo;<a class="copiable-link" href="#index-nomfdrivers"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-metafont-driver-files"></a>
<p>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.
</p>
</dd>
<dt><a id="index-nomode"></a><span>&lsquo;<samp class="samp">nomode</samp>&rsquo;<a class="copiable-link" href="#index-nomode"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-mode-directory_002c-omitting"></a>
<p>Omit the directory level for the mode name; this is fine as long as
you generate fonts for only one mode.
</p>
</dd>
<dt><a id="index-stripsupplier"></a><span>&lsquo;<samp class="samp">stripsupplier</samp>&rsquo;<a class="copiable-link" href="#index-stripsupplier"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-supplier-directory_002c-omitting"></a>
<p>Omit the font supplier name directory level.
</p>
</dd>
<dt><a id="index-striptypeface"></a><span>&lsquo;<samp class="samp">striptypeface</samp>&rsquo;<a class="copiable-link" href="#index-striptypeface"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-typeface-directory_002c-omitting"></a>
<p>Omit the font typeface name directory level.
</p>
</dd>
<dt><a id="index-strip"></a><span>&lsquo;<samp class="samp">strip</samp>&rsquo;<a class="copiable-link" href="#index-strip"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-supplier-directory_002c-omitting-1"></a>
<a class="index-entry-id" id="index-typeface-directory_002c-omitting-1"></a>
<p>Omit the font supplier and typeface name directory levels.  This feature
is deprecated in favour of &lsquo;<samp class="samp">stripsupplier</samp>&rsquo; and &lsquo;<samp class="samp">striptypeface</samp>&rsquo;.
</p>
</dd>
<dt><a id="index-varfonts"></a><span>&lsquo;<samp class="samp">varfonts</samp>&rsquo;<a class="copiable-link" href="#index-varfonts"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-_002fvar_002ftmp_002ftexfonts"></a>
<a class="index-entry-id" id="index-VARTEXFONTS"></a>
<a class="index-entry-id" id="index-Linux-File-System-Standard"></a>
<p>When this option is enabled, fonts that would otherwise be written in
system texmf tree go to the <code class="code">VARTEXFONTS</code> tree instead.  The
default value in <samp class="file">kpathsea/Makefile.in</samp> is
<samp class="file">/var/tmp/texfonts</samp>.  The <cite class="cite">Linux File System Standard</cite>
recommends <samp class="file">/var/tex/fonts</samp>.
</p>
<a class="index-entry-id" id="index-USE_005fVARTEXFONTS"></a>
<p>The &lsquo;<samp class="samp">varfonts</samp>&rsquo; setting in <code class="code">MT_FEATURES</code> is overridden by the
<code class="code">USE_VARTEXFONTS</code> environment variable: if set to &lsquo;<samp class="samp">1</samp>&rsquo;, the
feature is enabled, and if set to &lsquo;<samp class="samp">0</samp>&rsquo;, the feature is disabled.
</p>
</dd>
<dt><a id="index-texmfvar"></a><span>&lsquo;<samp class="samp">texmfvar</samp>&rsquo;<a class="copiable-link" href="#index-texmfvar"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-TEXMFVAR"></a>
<p>Force generated files that would go into a system tree (as defined by
<code class="code">SYSTEXMF</code>) into <code class="code">TEXMFVAR</code>. Starting with teTeX-3.0, the
variable <code class="code">TEXMFVAR</code> is always set.  The &lsquo;<samp class="samp">varfonts</samp>&rsquo; feature takes
precedence if also set.
</p>
<a class="index-entry-id" id="index-USE_005fTEXMFVAR"></a>
<p>The &lsquo;<samp class="samp">texmfvar</samp>&rsquo; setting in <code class="code">MT_FEATURES</code> is overridden by the
<code class="code">USE_TEXMFVAR</code> environment variable: if set to &lsquo;<samp class="samp">1</samp>&rsquo;, the
feature is enabled, and if set to &lsquo;<samp class="samp">0</samp>&rsquo;, the feature is disabled.
</p></dd>
</dl>


<hr>
</div>
<div class="subsection-level-extent" id="mktex-script-names">
<div class="nav-panel">
<p>
Next: <a href="#mktex-script-arguments" accesskey="n" rel="next"><samp class="file">mktex</samp> script arguments</a>, Previous: <a href="#mktex-configuration" accesskey="p" rel="prev"><samp class="file">mktex</samp> configuration</a>, Up: <a href="#mktex-scripts" accesskey="u" rel="up"><samp class="file">mktex</samp> scripts</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="mktex-script-names-1"><span>6.5.2 <samp class="file">mktex</samp> script names<a class="copiable-link" href="#mktex-script-names-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-mktex-script-names"></a>
<a class="index-entry-id" id="index-names-for-mktex-scripts"></a>

<p>The following table shows the default name of the script for each
of the file types which support runtime generation.
</p>
<dl class="table">
<dt><a class="index-entry-id" id="index-fmtutil"></a>
<a id="index-mktexfmt"></a><span><samp class="file">mktexfmt</samp><a class="copiable-link" href="#index-mktexfmt"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">.fmt</samp>&rsquo;, &lsquo;<samp class="samp">.base</samp>&rsquo;, &lsquo;<samp class="samp">.mem</samp>&rsquo;) TeX/Metafont/MetaPost
formats.  This script is also named <code class="command">fmtutil</code>, and reads
<samp class="file">fmtutil.cnf</samp> for configuration information.
</p>
</dd>
<dt><a id="index-mktexmf"></a><span><samp class="file">mktexmf</samp><a class="copiable-link" href="#index-mktexmf"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">.mf</samp>&rsquo;) Metafont input files.
</p>
</dd>
<dt><a id="index-mkocp"></a><span><samp class="file">mkocp</samp><a class="copiable-link" href="#index-mkocp"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">.ocp</samp>&rsquo;) Omega compiled process files.
</p>
</dd>
<dt><a id="index-mkofm"></a><span><samp class="file">mkofm</samp><a class="copiable-link" href="#index-mkofm"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">.ofm</samp>&rsquo;) Omega font metric files.
</p>
</dd>
<dt><a id="index-mktexpk"></a><span><samp class="file">mktexpk</samp><a class="copiable-link" href="#index-mktexpk"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">pk</samp>&rsquo;) Glyph fonts.
</p>
</dd>
<dt><a id="index-mktextex"></a><span><samp class="file">mktextex</samp><a class="copiable-link" href="#index-mktextex"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">.tex</samp>&rsquo;) TeX input files (disabled by default).
</p>
</dd>
<dt><a id="index-mktextfm"></a><span><samp class="file">mktextfm</samp><a class="copiable-link" href="#index-mktextfm"> &para;</a></span></dt>
<dd><p>(&lsquo;<samp class="samp">.tfm</samp>&rsquo;) TFM files.
</p></dd>
</dl>

<a class="index-entry-id" id="index-DVIPSMAKEPK"></a>
<a class="index-entry-id" id="index-XDVIMAKEPK"></a>
<a class="index-entry-id" id="index-DVILJMAKEPK"></a>
<p>These names can be overridden by an environment variable specific
to the program; for example, <code class="code">DVIPSMAKEPK</code> for Dvipsk.
</p>
<a class="index-entry-id" id="index-missfont_002elog"></a>
<a class="index-entry-id" id="index-failed-mktex_2026-script-invocation"></a>
<p>If a <code class="code">mktex&hellip;</code> script fails, the invocation is appended to a
file <samp class="file">missfont.log</samp> (by default) in the current directory.  After
fixing the problem, you can then execute the log file to create the
missing files.
</p>
<a class="index-entry-id" id="index-TEXMF_005fOUTPUT_005fDIRECTORY_002c-and-missfont_002elog"></a>
<a class="index-entry-id" id="index-TEXMFOUTPUT_002c-and-missfont_002elog"></a>
<p>If the environment variable <code class="code">TEXMF_OUTPUT_DIRECTORY</code> is set,
<samp class="file">missfont.log</samp> is first tried to be written there; if it&rsquo;s not
set, the current directory is tried first.  If that first write fails
and the environment variable or configuration file value
<code class="code">TEXMFOUTPUT</code> is set, we try to write <samp class="file">missfont.log</samp> there.
Otherwise nothing is written.
</p>
<a class="index-entry-id" id="index-MISSFONT_005fLOG"></a>
<p>The base filename &lsquo;<samp class="samp">missfont.log</samp>&rsquo; is overridden by the
<code class="code">MISSFONT_LOG</code> environment variable or configuration file value.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="mktex-script-arguments">
<div class="nav-panel">
<p>
Previous: <a href="#mktex-script-names" accesskey="p" rel="prev"><samp class="file">mktex</samp> script names</a>, Up: <a href="#mktex-scripts" accesskey="u" rel="up"><samp class="file">mktex</samp> scripts</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="mktex-script-arguments-1"><span>6.5.3 <samp class="file">mktex</samp> script arguments<a class="copiable-link" href="#mktex-script-arguments-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-arguments-to-mktex"></a>

<p>The first argument to a <samp class="file">mktex</samp> script is always the name
of the file to be created.
</p>
<p>In the default <samp class="file">mktexpk</samp> implementation, additional arguments may
also be passed:
</p>
<dl class="table">
<dt>&lsquo;<samp class="samp">--dpi <var class="var">num</var></samp>&rsquo;</dt>
<dd><p>Sets the resolution of the generated font to <var class="var">num</var>.
</p></dd>
<dt>&lsquo;<samp class="samp">--mfmode <var class="var">name</var></samp>&rsquo;</dt>
<dd><p>Sets the Metafont mode to <var class="var">name</var>.
</p></dd>
<dt>&lsquo;<samp class="samp">--bdpi <var class="var">num</var></samp>&rsquo;</dt>
<dd><p>Sets the &ldquo;base dpi&rdquo; for the font.  This must match the mode being
used.
</p></dd>
<dt>&lsquo;<samp class="samp">--mag <var class="var">string</var></samp>&rsquo;</dt>
<dd><p>A &ldquo;magstep&rdquo; string suitable for the Metafont <code class="code">mag</code> variable.
This must match the combination of <var class="var">bdpi</var> and <var class="var">dpi</var> being used.
</p></dd>
<dt>&lsquo;<samp class="samp">--destdir <var class="var">string</var></samp>&rsquo;</dt>
<dd><p>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.
</p></dd>
</dl>


<hr>
</div>
</div>
</div>
<div class="chapter-level-extent" id="Programming">
<div class="nav-panel">
<p>
Next: <a href="#Reporting-bugs" accesskey="n" rel="next">Reporting bugs</a>, Previous: <a href="#TeX-support" accesskey="p" rel="prev">TeX support</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="Programming-1"><span>7 Programming<a class="copiable-link" href="#Programming-1"> &para;</a></span></h2>

<p>This chapter is for programmers who wish to use Kpathsea.
See <a class="xref" href="#Introduction">Introduction</a>, for the conditions under which you may do so (in
short, it is released under LGPLv2.1 or later).
</p>


<ul class="mini-toc">
<li><a href="#Programming-overview" accesskey="1">Programming overview</a></li>
<li><a href="#Calling-sequence" accesskey="2">Calling sequence</a></li>
<li><a href="#Safe-filenames" accesskey="3">Safe filenames</a></li>
<li><a href="#Program_002dspecific-files" accesskey="4">Program-specific files</a></li>
<li><a href="#Programming-with-config-files" accesskey="5">Programming with config files</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Programming-overview">
<div class="nav-panel">
<p>
Next: <a href="#Calling-sequence" accesskey="n" rel="next">Calling sequence</a>, Up: <a href="#Programming" accesskey="u" rel="up">Programming</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Programming-overview-1"><span>7.1 Programming overview<a class="copiable-link" href="#Programming-overview-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-programming-overview"></a>
<a class="index-entry-id" id="index-overview-of-programming-with-Kpathsea"></a>

<p>Aside from this manual, your best source of information is the source
to the programs that use Kpathsea (see <a class="pxref" href="#Introduction">Introduction</a>).  First,
Kpsewhich is a small utility program whose sole purpose is to exercise
the main path-searching functionality.  Of the drivers, Dviljk is
probably the simplest full application program.  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.
</p>
<a class="index-entry-id" id="index-re_002dentrant-API"></a>
<a class="index-entry-id" id="index-API_002c-re_002dentrant"></a>
<p>When looking at these program sources, you should know that previous
versions of the library had a different programming interface; the
current interface supports re-entrancy.  Historically, the library
function names were prefixed with <code class="code">kpse_</code> instead of
<code class="code">kpathsea_</code>, and they did not need an instance variable as first
argument.  This change was made in 2009.  The old functions will never
disappear, and can reliably continue to be used when they suffice, as
they do for the programs above.  The main application using the
re-entrant API is the MetaPost library used by MetaPost and LuaTeX.
</p>
<a class="index-entry-id" id="index-pathsearch_002eh"></a>
<a class="index-entry-id" id="index-tex_002dfile_002eh"></a>
<a class="index-entry-id" id="index-tex_002dglyph_002eh"></a>
<a class="index-entry-id" id="index-kpathsea_002eh"></a>
<p>Beyond these examples, the <samp class="file">.h</samp> files in the Kpathsea source
describe the interfaces and functionality (and of course the <samp class="file">.c</samp>
files define the actual routines, which are the ultimate documentation).
<samp class="file">pathsearch.h</samp> declares the basic searching routine.
<samp class="file">tex-file.h</samp> and <samp class="file">tex-glyph.h</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 class="code">#include
&lt;kpathsea/kpathsea.h&gt;</code>, which includes every Kpathsea header.
</p>
<a class="index-entry-id" id="index-config_002eh"></a>
<a class="index-entry-id" id="index-c_002dauto_002eh"></a>
<p>If you want to include only specific headers, you should still
consider including <samp class="file">kpathsea/config.h</samp> before including any other
Kpathsea header, as it provides symbols used in the other headers;
<samp class="file">kpathsea/config.h</samp> includes <samp class="file">kpathsea/c-auto.h</samp>, which is
generated by Autoconf.
</p>
<a class="index-entry-id" id="index-file-types_002c-registering-new"></a>
<p>The library provides no way for an external program to register new file
types: <samp class="file">tex-file.[ch]</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 is likely to ever want to do so.  I felt this
was acceptable, since along with new file types should also come new
defaults in <samp class="file">texmf.cnf</samp> (and its descendant <samp class="file">paths.h</samp>), since
it&rsquo;s simplest for users if they can modify one configuration file for
all kinds of paths.
</p>
<p>Kpathsea does not parse any formats itself; it barely opens any files.
Its primary purpose is to return filenames.  The GNU font utilities
package contains libraries to read TFM, GF, and PK files, as do the
programs above, of course.
</p>

<hr>
</div>
<div class="section-level-extent" id="Calling-sequence">
<div class="nav-panel">
<p>
Next: <a href="#Safe-filenames" accesskey="n" rel="next">Safe filenames</a>, Previous: <a href="#Programming-overview" accesskey="p" rel="prev">Programming overview</a>, Up: <a href="#Programming" accesskey="u" rel="up">Programming</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Calling-sequence-1"><span>7.2 Calling sequence<a class="copiable-link" href="#Calling-sequence-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-programming-with-Kpathsea"></a>
<a class="index-entry-id" id="index-calling-sequence"></a>

<p>The typical way to use Kpathsea in your program goes something like this:
</p>
<ol class="enumerate">
<li> <a class="index-entry-id" id="index-kpathsea_005fnew"></a>
Call <code class="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 class="code">kpse</code> as a placeholder for
the name of this variable.

</li><li> <a class="index-entry-id" id="index-kpathsea_005fset_005fprogram_005fname"></a>
<a class="index-entry-id" id="index-argv_005b0_005d"></a>
Call <code class="code">kpathsea_set_program_name</code> with <code class="code">argv[0]</code> as the second
argument; the third argument is a string or <code class="code">NULL</code>.  The third
argument is used by Kpathsea as the program name for the
<code class="code">.<var class="var">program</var></code> feature of config files (see <a class="pxref" href="#Config-files">Config files</a>).
If the third argument is <code class="code">NULL</code>, the value of the second argument
is used.  This function must be called before any other use of the
Kpathsea library.

<a class="index-entry-id" id="index-kpse_002d_003einvocation_005fname"></a>
<a class="index-entry-id" id="index-kpse_002d_003einvocation_005fshort_005fname"></a>
<a class="index-entry-id" id="index-kpse_002d_003eprogram_005fname"></a>
<a class="index-entry-id" id="index-error-message-macros"></a>
<p><code class="code">kpathsea_set_program_name</code> always sets the variables
<code class="code">kpse-&gt;invocation_name</code> and <code class="code">kpse-&gt;invocation_short_name</code>.
These variables are used in the error message macros defined in
<samp class="file">kpathsea/lib.h</samp>.  It sets the variable
<code class="code">kpse-&gt;program_name</code> to the program name it uses.
</p>
<a class="index-entry-id" id="index-KPATHSEA_005fDEBUG"></a>
<p>It also initializes debugging options based on the environment
variable <code class="code">KPATHSEA_DEBUG</code> (if that is set).
</p>
<a class="index-entry-id" id="index-SELFAUTOLOC"></a>
<a class="index-entry-id" id="index-SELFAUTODIR"></a>
<a class="index-entry-id" id="index-SELFAUTOPARENT"></a>
<a class="index-entry-id" id="index-symlinks_002c-resolving"></a>
<a class="index-entry-id" id="index-expanding-symlinks"></a>
<p>Finally, it sets the environment variables <code class="code">SELFAUTOLOC</code>, <code class="code">SELFAUTODIR</code>
and <code class="code">SELFAUTOPARENT</code> to the location, parent and grandparent
directory of the executable, removing <samp class="file">.</samp> and <samp class="file">..</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 class="samp">kpsewhich --expand-var=\$SELFAUTOLOC</samp>&rsquo;, etc., to see the
values.
</p>
</li><li> <a class="index-entry-id" id="index-kpse_002d_003edebug-variable"></a>
<a class="index-entry-id" id="index-debugging-options_002c-in-Kpathsea_002dusing-program"></a>
Set debugging options. See <a class="xref" href="#Debugging">Debugging</a>.  If your program doesn&rsquo;t have
a debugging option already, you can define one and set
<code class="code">kpse-&gt;debug</code> to the number that the user supplies (as in Dviljk
and Web2c), or you can just omit this altogether (users can always set
the <code class="code">KPATHSEA_DEBUG</code> environment variable).  If you do have
runtime debugging already, you need to merge Kpathsea&rsquo;s options with
yours (as in Dvipsk and Xdvik).

</li><li> <a class="index-entry-id" id="index-client_005fpath-in-kpse_002d_003eformat_005finfo"></a>
<a class="index-entry-id" id="index-kpse_002d_003eformat_005finfo"></a>
<a class="index-entry-id" id="index-resident_002ec"></a>
<a class="index-entry-id" id="index-config-files_002c-for-Kpathsea_002dusing-programs"></a>
If your program has its own configuration files that can define search
paths, you should assign those paths to the <code class="code">client_path</code> member in
the appropriate element of the <code class="code">kpse-&gt;format_info</code> array.  (This
array is indexed by file type; see <samp class="file">tex-file.h</samp>.)  See
<samp class="file">resident.c</samp> in Dvipsk for an example.

</li><li> <a class="index-entry-id" id="index-kpathsea_005finit_005fprog-1"></a>
<a class="index-entry-id" id="index-proginit_002eh"></a>
Call <code class="code">kpathsea_init_prog</code> (see <samp class="file">proginit.c</samp>). It&rsquo;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.  Search paths are always
initialized at the first call to find a file of a given type, not
requiring an explicit initialization call; this eliminates much
useless work, e.g., initializing the BibTeX search paths in a DVI
driver.

</li><li> <a class="index-entry-id" id="index-kpathsea_005ffind_005ffile-1"></a>
The routine to actually find a file of type <var class="var">format</var> is
<samp class="file">kpathsea_find_file</samp>.  You can call
<code class="code">kpathsea_find_file</code> after doing only the first and second of the
initialization steps above&mdash;Kpathsea automatically reads the
<samp class="file">texmf.cnf</samp> generic config files, looks for environment variables,
and does expansions at the first lookup.

</li><li> <a class="index-entry-id" id="index-kpathsea_005ffind_005fglyph-1"></a>
To find PK and/or GF bitmap fonts, the routine
is <code class="code">kpathsea_find_glyph</code>, defined in
<samp class="file">tex-glyph.h</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><li> Before opening a file, especially for writing, you should check if the
filename is acceptable.  See the next section (see <a class="pxref" href="#Safe-filenames">Safe filenames</a>).

</li><li> <a class="index-entry-id" id="index-kpathsea_005fopen_005ffile"></a>
To actually open a file, not just return a filename, call
<code class="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 class="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 class="samp">!!</samp>&rsquo;, etc.).  In other
words, if you are looking up a VF or some other file that need not
exist, don&rsquo;t use this.

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

</li></ol>

<a class="index-entry-id" id="index-hash-table-routines"></a>
<a class="index-entry-id" id="index-memory-allocation-routines"></a>
<a class="index-entry-id" id="index-string-routines"></a>
<a class="index-entry-id" id="index-reading-arbitrary_002dlength-lines"></a>
<a class="index-entry-id" id="index-input-lines_002c-reading"></a>
<a class="index-entry-id" id="index-lines_002c-reading-arbitrary_002dlength"></a>
<p>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 class="code">stat</code> calls, etc.
</p>
<a class="index-entry-id" id="index-c_002d_002a_002eh"></a>
<a class="index-entry-id" id="index-autoconf_002c-recommended"></a>
<p>The <samp class="file">c-*.h</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 class="url" href="https://gnu.org/software">https://gnu.org/software</a>.
</p>

<hr>
</div>
<div class="section-level-extent" id="Safe-filenames">
<div class="nav-panel">
<p>
Next: <a href="#Program_002dspecific-files" accesskey="n" rel="next">Program-specific files</a>, Previous: <a href="#Calling-sequence" accesskey="p" rel="prev">Calling sequence</a>, Up: <a href="#Programming" accesskey="u" rel="up">Programming</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Safe-filenames-1"><span>7.3 Safe filenames<a class="copiable-link" href="#Safe-filenames-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-openout_005fany"></a>
<a class="anchor" id="openout_005fany"></a><a class="index-entry-id" id="index-trojan-horse"></a>
<p>See <a class="xref" href="#Security">Security</a>, for some general security considerations with the
TeX system.
</p>
<p>In the implementation, the main security feature to disallow writing
to potentially dangerous files is a configuration variable
<code class="code">openout_any</code>. It specifies one of three levels:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-unrestricted-mode_002c-for-output-files"></a>
When set to &lsquo;<samp class="samp">a</samp>&rsquo; (for &ldquo;any&rdquo;), no restrictions are imposed.

</li><li><a class="index-entry-id" id="index-restricted-mode_002c-for-output-files"></a>
When is set to &lsquo;<samp class="samp">r</samp>&rsquo; (for &ldquo;restricted&rdquo;), filenames beginning
with &lsquo;<samp class="samp">.</samp>&rsquo; are disallowed (except <samp class="file">.tex</samp>, because LaTeX
needs it).

</li><li><a class="index-entry-id" id="index-paranoid-mode_002c-for-output-files"></a>
When set to &lsquo;<samp class="samp">p</samp>&rsquo; (for &ldquo;paranoid&rdquo;), additional restrictions are
imposed.

<ol class="enumerate">
<li> <a class="index-entry-id" id="index-TEXMF_005fOUTPUT_005fDIRECTORY_002c-and-paranoid-output-files"></a>
<a class="index-entry-id" id="index-TEXMFOUTPUT_002c-and-paranoid-output-files"></a>
First, an absolute filename must refer to a file in (or in a
subdirectory of) either the <code class="code">TEXMF_OUTPUT_DIRECTORY</code> environment
variable or the <code class="code">TEXMFOUTPUT</code> environment variable or
configuration file setting.

</li><li> <a class="index-entry-id" id="index-TEXMFSYSVAR"></a>
<a class="index-entry-id" id="index-TEXMFVAR-1"></a>
<a class="index-entry-id" id="index-luaotfload"></a>
LuaTeX uses a so-called &ldquo;extended&rdquo; mode, in which the values of
<code class="code">TEXMFVAR</code> and <code class="code">TEXMFSYSVAR</code> are also checked for absolute
filenames.  This is done because, in practice, fundamental parts of
the LuaLaTeX system (notably <code class="code">luaotfload</code>) need a cache
directory, and historically the <code class="code">TEXMF[SYS]VAR</code> variables are
what has been used. We neither recommend nor expect any other programs
to need this.

</li><li> Finally, any attempt to go up a directory level is forbidden; that is,
paths may not contain a &lsquo;<samp class="samp">..</samp>&rsquo; component.

</li></ol>
</li></ul>

<p>The paranoid setting is the default. Any program intended to be safely
called from TeX should implement the same measures, one way or
another.  See <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#Shell-escapes">Shell escapes</a> in <cite class="cite">Web2c</cite>.
</p>
<p>Kpathsea does not resolve &lsquo;<samp class="samp">..</samp>&rsquo; components, or symbolic links, to
see if the final result is an acceptable directory; they are simply
forbidden.  That is, Kpathsea merely considers the value as a string,
not looking on the filesystem at all.  (However, if another program
wants to do such resolutions and check the result, that&rsquo;s ok.)
</p>
<p>For backwards compatibility, &lsquo;<samp class="samp">y</samp>&rsquo; and &lsquo;<samp class="samp">1</samp>&rsquo; are synonyms of
&lsquo;<samp class="samp">a</samp>&rsquo;, while &lsquo;<samp class="samp">n</samp>&rsquo; and &lsquo;<samp class="samp">0</samp>&rsquo; are synonyms for &lsquo;<samp class="samp">r</samp>&rsquo;.
</p>
<a class="index-entry-id" id="index-kpathsea_005fout_005fname_005fok"></a>
<p>The function <code class="code">kpathsea_out_name_ok</code>, with a filename as second
argument, returns <code class="code">true</code> if that filename is acceptable to be
opened for output or <code class="code">false</code> otherwise.  The Kpsewhich program
has an option (&lsquo;<samp class="samp">--safe-out-name</samp>&rsquo;) providing a command line
interface for the check.
</p>
<a class="index-entry-id" id="index-kpathsea_005fout_005fname_005fok_005fextended"></a>
<p>For LuaTeX&rsquo;s extended mode, the function is
<code class="code">kpathsea_out_name_ok_extended</code>, and the Kpsewhich option is
&lsquo;<samp class="samp">--safe-extended-out-name</samp>&rsquo;.
</p>
<a class="index-entry-id" id="index-kpathsea_005fin_005fname_005fok"></a>
<a class="index-entry-id" id="index-kpathsea_005fin_005fname_005fok_005fextended"></a>
<p>Similarly, the function <code class="code">kpathsea_in_name_ok</code> (resp.
<code class="code">_extended</code>, with a filename as second argument, returns
<code class="code">true</code> if that filename is acceptable to be opend for input or
<code class="code">false</code> otherwise, depending on the value of the configuration
variable <code class="code">openin_any</code>.  Unfortunately, for reading, &lsquo;<samp class="samp">a</samp>&rsquo; is
the default default; too many system directories and files get
involved to make &lsquo;<samp class="samp">r</samp>&rsquo; or &lsquo;<samp class="samp">p</samp>&rsquo; feasible.
</p>
<p>The functions above write a message to standard error if the usage is
forbidden (so every caller does not have to do so).  Each function has
a <code class="code">_silent</code> counterpart which does not write the message; this is
what Kpsewhich calls, since messages would be counterproductive in
that case. Thus:
</p>
<a class="index-entry-id" id="index-kpathsea_005fout_005fname_005fok_005fsilent"></a>
<a class="index-entry-id" id="index-kpathsea_005fout_005fname_005fok_005fsilent_005fextended"></a>
<a class="index-entry-id" id="index-kpathsea_005fin_005fname_005fok_005fsilent"></a>
<a class="index-entry-id" id="index-kpathsea_005fin_005fname_005fok_005fsilent_005fextended"></a>

<div class="example">
<pre class="example-preformatted">kpathsea_out_name_ok_silent
kpathsea_out_name_ok_silent_extended
kpathsea_in_name_ok_silent
kpathsea_in_name_ok_silent_extended
</pre></div>

<p>Furthermore, there are <code class="code">kpse_...</code> versions of all the above
functions (as usual), with the default library instance implicitly
passed as the first argument.  LuaTeX provides both <code class="code">kpse.*</code>
and <code class="code">kpathsea.*</code> bindings, so it&rsquo;s good to always have both.
</p>	
<p>Sorry for the combinatorial explosion, but we hope no further options
will ever be needed.  If so, we&rsquo;ll likely provide a more generic
interface as well as the above.
</p>

<hr>
</div>
<div class="section-level-extent" id="Program_002dspecific-files">
<div class="nav-panel">
<p>
Next: <a href="#Programming-with-config-files" accesskey="n" rel="next">Programming with config files</a>, Previous: <a href="#Safe-filenames" accesskey="p" rel="prev">Safe filenames</a>, Up: <a href="#Programming" accesskey="u" rel="up">Programming</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Program_002dspecific-files-1"><span>7.4 Program-specific files<a class="copiable-link" href="#Program_002dspecific-files-1"> &para;</a></span></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 data-manual="tds" href="tds.html#Top">Introduction</a> in <cite class="cite">A Directory Structure for TeX files</cite>), specifies
that such files should go into a subdirectory named after the program,
like &lsquo;<samp class="samp">texmf/ttf2pk</samp>&rsquo;.
</p>
<p>Two formats, &lsquo;<samp class="samp">kpse_program_text_format</samp>&rsquo; and
&lsquo;<samp class="samp">kpse_program_binary_format</samp>&rsquo;, use <code class="code">.:$TEXMF/<var class="var">program</var>//</code>
as their compiled-in search path.  To override this default, you can
use the variable <code class="code"><var class="var">PROGRAM</var>INPUTS</code> in the environment and/or
&lsquo;<samp class="samp">texmf.cnf</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 class="code">INPUTS</code>.
</p>
<p>The only difference between these two formats is whether
<code class="code">kpathsea_open_file</code> will open the files it finds in text or binary
mode.
</p>

<hr>
</div>
<div class="section-level-extent" id="Programming-with-config-files">
<div class="nav-panel">
<p>
Previous: <a href="#Program_002dspecific-files" accesskey="p" rel="prev">Program-specific files</a>, Up: <a href="#Programming" accesskey="u" rel="up">Programming</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Programming-with-config-files-1"><span>7.5 Programming with config files<a class="copiable-link" href="#Programming-with-config-files-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-programming-with-config-files"></a>
<a class="index-entry-id" id="index-config-files_002c-programming-with"></a>

<p>You can (and probably should) use the same <code class="code">texmf.cnf</code>
configuration file that Kpathsea uses for your program.  This helps
installers by keeping all configuration in one place.
</p>
<a class="index-entry-id" id="index-kpathsea_005fvar_005fvalue"></a>
<a class="index-entry-id" id="index-variable_002eh"></a>
<a class="index-entry-id" id="index-shell_005fescape_002c-example-for-code"></a>
<p>To retrieve a value for a configuration variable <var class="var">var</var>, the best
way is to call <code class="code">kpathsea_var_value</code> on the string
<code class="code"><var class="var">var</var></code>.  This will look first for an environment variable
<var class="var">var</var>, then a config file value.  The result will be the value
found or &lsquo;<samp class="samp">NULL</samp>&rsquo;.  This function is declared in
<samp class="file">kpathsea/variable.h</samp>.  For an example, see the
<code class="code">shell_escape</code> code in <samp class="file">web2c/lib/texmfmp.c</samp>.
</p>
<p>The routine to do full variable and tilde expansion of an arbitrary
string in the context of a search path (as opposed to simply
retrieving a value) is <code class="code">kpathsea_var_expand</code>, also declared in
<samp class="file">kpathsea/variable.h</samp>.  However, it&rsquo;s generally only necessary to
set the search path structure components as explained in the previous
section instead of using this directly.  Because of its usage with any
input string, undefined <code class="code">$FOO</code> constructs in the argument to
<code class="code">kpathsea_var_expand</code> are returned literally (<code class="code">&quot;$FOO&quot;</code>),
while undefined <code class="code">${FOO}</code> constructs are expanded to the empty
string.
</p>
<a class="index-entry-id" id="index-kpathsea_005fcnf_005fget"></a>
<a class="index-entry-id" id="index-cnf_002eh"></a>
<p>If for some reason you want to retrieve a value <em class="emph">only</em> from a
config file, not automatically looking for a corresponding environment
variable, call <code class="code">kpathsea_cnf_get</code> (declared in <samp class="file">kpathsea/cnf.h</samp>)
with the string <var class="var">var</var>.
</p>
<p>No initialization calls are needed.
</p>

<hr>
</div>
</div>
<div class="chapter-level-extent" id="Reporting-bugs">
<div class="nav-panel">
<p>
Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a href="#Programming" accesskey="p" rel="prev">Programming</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="chapter" id="Reporting-bugs-1"><span>8 Reporting bugs<a class="copiable-link" href="#Reporting-bugs-1"> &para;</a></span></h2>

<a class="index-entry-id" id="index-reporting-bugs"></a>
<a class="index-entry-id" id="index-bugs_002c-reporting"></a>

<a class="index-entry-id" id="index-tex_002dk_0040tug_002eorg-_0028bug-address_0029"></a>
<a class="index-entry-id" id="index-bug-address"></a>
<p>If you have problems or suggestions, please report them to
<a class="email" href="mailto:tex-k@tug.org">tex-k@tug.org</a> using the bug checklist below.
</p>
<p>Please report bugs in the documentation; not only factual errors or
inconsistent behavior, but unclear or incomplete explanations, typos,
wrong fonts, &hellip;
</p>


<ul class="mini-toc">
<li><a href="#Bug-checklist" accesskey="1">Bug checklist</a></li>
<li><a href="#Mailing-lists" accesskey="2">Mailing lists</a></li>
<li><a href="#Debugging" accesskey="3">Debugging</a></li>
<li><a href="#Logging" accesskey="4">Logging</a></li>
<li><a href="#Common-problems" accesskey="5">Common problems</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Bug-checklist">
<div class="nav-panel">
<p>
Next: <a href="#Mailing-lists" accesskey="n" rel="next">Mailing lists</a>, Up: <a href="#Reporting-bugs" accesskey="u" rel="up">Reporting bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Bug-checklist-1"><span>8.1 Bug checklist<a class="copiable-link" href="#Bug-checklist-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-checklist-for-bug-reports"></a>
<a class="index-entry-id" id="index-bug-checklist"></a>

<p>Before reporting a bug, please check below to be sure it isn&rsquo;t already
known (see <a class="pxref" href="#Common-problems">Common problems</a>).
</p>
<p>Bug reports should be sent via electronic mail to
<a class="email" href="mailto:tex-k@tug.org">tex-k@tug.org</a>.
</p>
<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:
</p>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-version-numbers_002c-determining"></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 class="samp">--version</samp>&rsquo;
to the program, and the latter by running &lsquo;<samp class="samp">kpsewhich --version</samp>&rsquo;.
The <samp class="file">NEWS</samp> and <samp class="file">ChangeLog</samp> files also contain the version
number.

</li><li><a class="index-entry-id" id="index-uname"></a>
The hardware, operating system (including version), compiler, and
<code class="code">make</code> program you are using (the output of <code class="code">uname -a</code> is a
start on the first two, though incomplete).

</li><li><a class="index-entry-id" id="index-config_002elog"></a>
Any options you gave to <code class="code">configure</code>.  This is recorded in the
<samp class="file">config.status</samp> files.

<a class="index-entry-id" id="index-configuration-bugs"></a>
<a class="index-entry-id" id="index-config_002estatus"></a>
<p>If you are reporting a bug in &lsquo;<samp class="samp">configure</samp>&rsquo; itself, it&rsquo;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 class="file">config.log</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 class="samp">configure</samp>&rsquo; bugs do not involve the
compiler; in that case, the only recourse is to inspect the
<code class="code">configure</code> shell script itself, or the Autoconf macros that
generated <code class="code">configure</code>.
</p>
</li><li>The log of all debugging output, if the bug is in path searching.  You
can get this by setting the environment variable <code class="code">KPATHSEA_DEBUG</code>
to &lsquo;<samp class="samp">-1</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><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 required, because that&rsquo;s the actual
program input.

</li><li><a class="index-entry-id" id="index-context-diff"></a>
<a class="index-entry-id" id="index-sending-patches"></a>
<a class="index-entry-id" id="index-ChangeLog-entry"></a>
If you are sending a patch (do so if you can!), please do so in the form
of a context diff (&lsquo;<samp class="samp">diff -c</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 class="file">ChangeLog</samp> entry.

</li><li><a class="index-entry-id" id="index-stack-trace"></a>
<a class="index-entry-id" id="index-debugger"></a>
<a class="index-entry-id" id="index-crashes_002c-reporting"></a>
<a class="index-entry-id" id="index-core-dumps_002c-reporting"></a>
<a class="index-entry-id" id="index-null-pointers_002c-dereferencing"></a>
<a class="index-entry-id" id="index-gdb_002c-recommended"></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 (<a class="url" href="https://gnu.org/software/gdb">https://gnu.org/software/gdb</a>).  If the
cause is apparent (a <code class="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 class="pxref" href="#TeX-or-Metafont-failing">TeX or
Metafont failing</a>).

</li><li>Any additional information that will be helpful in reproducing,
diagnosing, or fixing the bug.
</li></ul>


<hr>
</div>
<div class="section-level-extent" id="Mailing-lists">
<div class="nav-panel">
<p>
Next: <a href="#Debugging" accesskey="n" rel="next">Debugging</a>, Previous: <a href="#Bug-checklist" accesskey="p" rel="prev">Bug checklist</a>, Up: <a href="#Reporting-bugs" accesskey="u" rel="up">Reporting bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Mailing-lists-1"><span>8.2 Mailing lists<a class="copiable-link" href="#Mailing-lists-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-mailing-lists"></a>
<a class="index-entry-id" id="index-bug-mailing-list"></a>
<a class="index-entry-id" id="index-announcement-mailing-list"></a>

<a class="index-entry-id" id="index-tex_002dk_0040tug_002eorg"></a>
<p>Web2c and Kpathsea in general are discussed on the mailing list
<a class="email" href="mailto:tex-k@tug.org">tex-k@tug.org</a>.  You can subscribe and peruse the archives on
the web <a class="url" href="https://lists.tug.org/tex-k">https://lists.tug.org/tex-k</a>.
</p>
<p>You do not need to join to submit a report, nor will it affect whether
you get a response.  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>
<p>If you are looking for general TeX help, such as how to install a
full TeX system or how to use LaTeX, please see
<a class="url" href="https://tug.org/begin.html">https://tug.org/begin.html</a>.
</p>

<hr>
</div>
<div class="section-level-extent" id="Debugging">
<div class="nav-panel">
<p>
Next: <a href="#Logging" accesskey="n" rel="next">Logging</a>, Previous: <a href="#Mailing-lists" accesskey="p" rel="prev">Mailing lists</a>, Up: <a href="#Reporting-bugs" accesskey="u" rel="up">Reporting bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Debugging-1"><span>8.3 Debugging<a class="copiable-link" href="#Debugging-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-debugging"></a>
<a class="index-entry-id" id="index-runtime-debugging"></a>
<a class="index-entry-id" id="index-options-for-debugging"></a>

<a class="index-entry-id" id="index-kpse_002d_003edebug"></a>
<a class="index-entry-id" id="index-debug_002eh"></a>
<p>Kpathsea provides a number of runtime debugging options, detailed below
by their names and corresponding numeric values.  When the files you
expect aren&rsquo;t being found, the thing to do is enable these options and
examine the output.
</p>
<p>You can set these with some runtime argument (e.g., &lsquo;<samp class="samp">-d</samp>&rsquo;) to the
program; in that case, you should use the numeric values described in
the program&rsquo;s documentation (which, for Dvipsk and Xdvik, are different
than those below).  It&rsquo;s best to give the &lsquo;<samp class="samp">-d</samp>&rsquo; (or whatever) option
first, for maximal output.  Dvipsk and Xdvik have additional
program-specific debugging options as well.
</p>
<a class="index-entry-id" id="index-KPATHSEA_005fDEBUG-1"></a>
<a class="index-entry-id" id="index-kpse_002d_003edebug-1"></a>
<p>You can also set the environment variable <code class="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 class="code">kpse-&gt;debug</code>, also use the numbers
below.
</p>
<a class="index-entry-id" id="index-_002d1-debugging-value"></a>
<p>In any case, by far the simplest value to use is &lsquo;<samp class="samp">-1</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 class="index-entry-id" id="index-debugging-output"></a>
<a class="index-entry-id" id="index-standard-error-and-debugging-output"></a>
<p>Debugging output always goes to standard error, so you can redirect it
easily.  For example, in Bourne-compatible shells:
</p><div class="example">
<pre class="example-preformatted">dvips -d -1 ... 2&gt;/tmp/debug
</pre></div>

<a class="index-entry-id" id="index-Kpsewhich_002c-and-debugging"></a>
<p>It is sometimes helpful to run the standalone Kpsewhich utility
(see <a class="pxref" href="#Invoking-kpsewhich"><code class="code">kpsewhich</code>: Standalone path searching</a>), instead of the original program.
</p>
<a class="index-entry-id" id="index-numeric-debugging-values"></a>
<p>In any case, you cannot use the names below; you must always use
somebody&rsquo;s numbers.  (Sorry.)  To set more than one option, just sum
the corresponding numbers.
</p>
<dl class="vtable">
<dt><a id="index-KPSE_005fDEBUG_005fSTAT-_00281_0029"></a><span><code class="code">KPSE_DEBUG_STAT <span class="r">(1)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fSTAT-_00281_0029"> &para;</a></span></dt>
<dd><p>Report &lsquo;<samp class="samp">stat</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 class="pxref" href="#Slow-path-searching">Slow path searching</a>, and see <a class="pxref" href="#Subdirectory-expansion">Subdirectory expansion</a>). If you are using an up-to-date <samp class="file">ls-R</samp> database
(see <a class="pxref" href="#Filename-database">Filename database (<code class="code">ls-R</code>)</a>), this should produce no output unless a
nonexistent file that must exist is searched for.
</p>
</dd>
<dt><a id="index-KPSE_005fDEBUG_005fHASH-_00282_0029"></a><span><code class="code">KPSE_DEBUG_HASH <span class="r">(2)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fHASH-_00282_0029"> &para;</a></span></dt>
<dd><p>Report lookups in all hash tables: <samp class="file">ls-R</samp> and <samp class="file">aliases</samp>
(see <a class="pxref" href="#Filename-database">Filename database (<code class="code">ls-R</code>)</a>); font aliases (see <a class="pxref" href="#Fontmap">Fontmap</a>); and config
file values (see <a class="pxref" 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 class="file">ls-R</samp>.
</p>
</dd>
<dt><a id="index-KPSE_005fDEBUG_005fFOPEN-_00284_0029"></a><span><code class="code">KPSE_DEBUG_FOPEN <span class="r">(4)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fFOPEN-_00284_0029"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-fopen_002c-redefined"></a>
<p>Report file openings and closings. Especially useful when your system&rsquo;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 class="samp">fopen</samp>&rsquo; (&lsquo;<samp class="samp">fclose</samp>&rsquo;) to be &lsquo;<samp class="samp">kpse_fopen_trace</samp>&rsquo;
(&lsquo;<samp class="samp">kpse_fclose_trace</samp>&rsquo;).
</p>
</dd>
<dt><a id="index-KPSE_005fDEBUG_005fPATHS-_00288_0029"></a><span><code class="code">KPSE_DEBUG_PATHS <span class="r">(8)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fPATHS-_00288_0029"> &para;</a></span></dt>
<dd><a class="index-entry-id" id="index-kpse_005fformat_005finfo_005ftype"></a>
<p>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 class="file">texmf.cnf</samp>, <samp class="file">config.ps</samp>,
an environment variable, the compile-time default, etc.  This is the
contents of the <code class="code">kpse_format_info_type</code> structure defined in
<samp class="file">tex-file.h</samp>.
</p>
</dd>
<dt><a id="index-KPSE_005fDEBUG_005fEXPAND-_002816_0029"></a><span><code class="code">KPSE_DEBUG_EXPAND <span class="r">(16)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fEXPAND-_002816_0029"> &para;</a></span></dt>
<dd><p>Report the directory list corresponding to each path element Kpathsea
searches. This is only relevant when Kpathsea searches the disk, since
<samp class="file">ls-R</samp> searches don&rsquo;t look through directory lists in this way.
</p>
</dd>
<dt><a id="index-KPSE_005fDEBUG_005fSEARCH-_002832_0029"></a><span><code class="code">KPSE_DEBUG_SEARCH <span class="r">(32)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fSEARCH-_002832_0029"> &para;</a></span></dt>
<dd><p>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 class="file">cmr10.vf</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 class="file">texmf.cnf</samp> and <samp class="file">texfonts.map</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.
</p>
</dd>
<dt><a id="index-KPSE_005fDEBUG_005fVARS-_002864_0029"></a><span><code class="code">KPSE_DEBUG_VARS <span class="r">(64)</span></code><a class="copiable-link" href="#index-KPSE_005fDEBUG_005fVARS-_002864_0029"> &para;</a></span></dt>
<dd><p>Report the value of each variable Kpathsea looks up.  This is useful for
verifying that variables do indeed obtain their correct values.
</p>
</dd>
<dt><a id="index-GSFTOPK_005fDEBUG-_0028128_0029"></a><span><code class="code">GSFTOPK_DEBUG <span class="r">(128)</span></code><a class="copiable-link" href="#index-GSFTOPK_005fDEBUG-_0028128_0029"> &para;</a></span></dt>
<dd><p>Activates debugging printout specific to <code class="code">gsftopk</code> program.
</p>
</dd>
<dt><a id="index-MAKETEX_005fDEBUG-_0028512_0029"></a><span><code class="code">MAKETEX_DEBUG <span class="r">(512)</span></code><a class="copiable-link" href="#index-MAKETEX_005fDEBUG-_0028512_0029"> &para;</a></span></dt>
<dd><p>If you use the optional <code class="code">mktex</code> programs instead of the
traditional shell scripts, this will report the name of the site file
(<samp class="file">mktex.cnf</samp> by default) which is read, directories created by
<code class="code">mktexdir</code>, the full path of the <samp class="file">ls-R</samp> database built by
<code class="code">mktexlsr</code>, font map searches, <code class="code">MT_FEATURES</code> in effect,
parameters from <code class="code">mktexnam</code>, filenames added by
<code class="code">mktexupd</code>, and some subsidiary commands run by the programs.
</p>
</dd>
<dt><a id="index-MAKETEX_005fFINE_005fDEBUG-_00281024_0029"></a><span><code class="code">MAKETEX_FINE_DEBUG <span class="r">(1024)</span></code><a class="copiable-link" href="#index-MAKETEX_005fFINE_005fDEBUG-_00281024_0029"> &para;</a></span></dt>
<dd><p>When the optional <code class="code">mktex</code> programs are used, this will print
additional debugging info from functions internal to these programs.
</p></dd>
</dl>

<a class="index-entry-id" id="index-kdebug_003a"></a>
<a class="index-entry-id" id="index-hash_005fsummary_005fonly-variable-for-debugging"></a>
<a class="index-entry-id" id="index-hash-table-buckets_002c-printing"></a>
<p>Debugging output from Kpathsea is always written to standard error, and
begins with the string &lsquo;<samp class="samp">kdebug:</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 class="code">hash_summary_only</code>
variable in <samp class="file">kpathsea/db.c</samp>.)
</p>

<hr>
</div>
<div class="section-level-extent" id="Logging">
<div class="nav-panel">
<p>
Next: <a href="#Common-problems" accesskey="n" rel="next">Common problems</a>, Previous: <a href="#Debugging" accesskey="p" rel="prev">Debugging</a>, Up: <a href="#Reporting-bugs" accesskey="u" rel="up">Reporting bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Logging-1"><span>8.4 Logging<a class="copiable-link" href="#Logging-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-log-file"></a>

<a class="index-entry-id" id="index-logging-successful-searches"></a>
<a class="index-entry-id" id="index-recording-successful-searches"></a>
<a class="index-entry-id" id="index-usage-patterns_002c-finding"></a>
<a class="index-entry-id" id="index-disk-usage_002c-reducing"></a>
<p>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 class="index-entry-id" id="index-TEXMFLOG"></a>
<p>To do this, define the environment or config file variable
<code class="code">TEXMFLOG</code>.  The value is the name of the file to append the
information to.  The file is created if it doesn&rsquo;t exist, and appended
to if it does.
</p>
<a class="index-entry-id" id="index-epoch_002c-seconds-since"></a>
<a class="index-entry-id" id="index-time-system-call"></a>
<p>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 class="code">time</code> system
call).  The second word is the filename.
</p>
<p>For example, after <code class="code">setenv TEXMFLOG /tmp/log</code>, running Dvips on
<samp class="file">story.dvi</samp> appends the following lines:
</p>
<div class="example">
<pre class="example-preformatted">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></div>

<a class="index-entry-id" id="index-privacy_002c-semblance-of"></a>
<p>Only filenames that are absolute are recorded, to preserve
some semblance of privacy.
</p>
<p>In addition to this Kpathsea-specific logging, <code class="command">pdftex</code>
provides an option <samp class="option">-recorder</samp> to write the names of all files
accessed during a run to the file <samp class="file"><var class="var">basefile</var>.fls</samp>.
</p>
<p>Finally, most systems provide a general tool to output each system
call, thus including opening and closing files.  It might be named
<code class="command">strace</code>, <code class="command">truss</code>, <code class="command">struss</code>, or something
else.
</p>

<hr>
</div>
<div class="section-level-extent" id="Common-problems">
<div class="nav-panel">
<p>
Previous: <a href="#Logging" accesskey="p" rel="prev">Logging</a>, Up: <a href="#Reporting-bugs" accesskey="u" rel="up">Reporting bugs</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Common-problems-1"><span>8.5 Common problems<a class="copiable-link" href="#Common-problems-1"> &para;</a></span></h3>

<a class="index-entry-id" id="index-common-problems"></a>
<a class="index-entry-id" id="index-problems_002c-common"></a>
<a class="index-entry-id" id="index-FAQ_002c-Kpathsea"></a>

<p>Here are some common problems with configuration, compilation, linking,
execution, &hellip;
</p>

<ul class="mini-toc">
<li><a href="#Unable-to-find-files" accesskey="1">Unable to find files</a></li>
<li><a href="#Slow-path-searching" accesskey="2">Slow path searching</a></li>
<li><a href="#Unable-to-generate-fonts" accesskey="3">Unable to generate fonts</a></li>
<li><a href="#TeX-or-Metafont-failing" accesskey="4">TeX or Metafont failing</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Unable-to-find-files">
<div class="nav-panel">
<p>
Next: <a href="#Slow-path-searching" accesskey="n" rel="next">Slow path searching</a>, Up: <a href="#Common-problems" accesskey="u" rel="up">Common problems</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Unable-to-find-files-1"><span>8.5.1 Unable to find files<a class="copiable-link" href="#Unable-to-find-files-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-unable-to-find-files"></a>
<a class="index-entry-id" id="index-files_002c-unable-to-find"></a>

<p>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 class="xref" href="#Debugging">Debugging</a>.
</p>
<ul class="itemize mark-bullet">
<li>Perhaps you simply haven&rsquo;t installed all the necessary files; the basic
fonts and input files are distributed separately from the programs.
See <a class="xref" href="#unixtex_002eftp"><samp class="file">unixtex.ftp</samp>: Obtaining TeX</a>.

</li><li><a class="index-entry-id" id="index-_002fetc_002fprofile"></a>
<a class="index-entry-id" id="index-environment-variables_002c-old"></a>
You have (perhaps unknowingly) told Kpathsea to use search paths that
don&rsquo;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 class="file">texmf.cnf</samp> (see <a class="pxref" href="#Supported-file-formats">Supported file formats</a>).  System <samp class="file">/etc/profile</samp> or other files such may be the
culprit.

</li><li><a class="index-entry-id" id="index-symbolic-links-not-found"></a>
<a class="index-entry-id" id="index-leaf-directories-wrongly-guessed"></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 class="file">ls-R</samp>.

<p>Unfortunately, Kpathsea&rsquo;s subdirectory searching has an irremediable
deficiency: If a directory <var class="var">d</var> being searched for subdirectories
contains plain files and symbolic links to other directories, but no
true subdirectories, <var class="var">d</var> will be considered a leaf directory, i.e.,
the symbolic links will not be followed.  See <a class="xref" href="#Subdirectory-expansion">Subdirectory expansion</a>.
</p>
<p>You can work around this problem by creating an empty dummy subdirectory
in <var class="var">d</var>. Then <var class="var">d</var> will no longer be a leaf, and the symlinks will
be followed.
</p>
<p>The directory immediately followed by the &lsquo;<samp class="samp">//</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&rsquo;t want it to be.
</p>
</li><li>If the fonts (or whatever) don&rsquo;t already exist, <code class="code">mktexpk</code> (or
<code class="code">mktexmf</code> or <code class="code">mktextfm</code>) will try to create them.  If
these rather complicated shell scripts fail, you&rsquo;ll eventually get an
error message saying something like &lsquo;<samp class="samp">Can't find font
<var class="var">fontname</var></samp>&rsquo;. The best solution is to fix (or at least report) the
bug in <code class="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 class="pxref" href="#unixtex_002eftp"><samp class="file">unixtex.ftp</samp>: Obtaining TeX</a>).

</li><li>There is a bug in the library. See <a class="xref" href="#Reporting-bugs">Reporting bugs</a>.
</li></ul>


<hr>
</div>
<div class="subsection-level-extent" id="Slow-path-searching">
<div class="nav-panel">
<p>
Next: <a href="#Unable-to-generate-fonts" accesskey="n" rel="next">Unable to generate fonts</a>, Previous: <a href="#Unable-to-find-files" accesskey="p" rel="prev">Unable to find files</a>, Up: <a href="#Common-problems" accesskey="u" rel="up">Common problems</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Slow-path-searching-1"><span>8.5.2 Slow path searching<a class="copiable-link" href="#Slow-path-searching-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-excessive-startup-time"></a>
<a class="index-entry-id" id="index-slow-startup-time"></a>
<a class="index-entry-id" id="index-startup-time_002c-excessive"></a>

<p>If your program takes an excessively long time to find fonts or other
input files, but does eventually succeed, here are some possible culprits:
</p>
<ul class="itemize mark-bullet">
<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 class="file">ls-R</samp> file that lists all the files in your main TeX
hierarchy.  See <a class="xref" href="#Filename-database">Filename database (<code class="code">ls-R</code>)</a>.  Kpathsea always uses <samp class="file">ls-R</samp>
if it&rsquo;s present; there&rsquo;s no need to recompile or reconfigure any of the
programs.

</li><li>Your recursively-searched directories (e.g.,
<samp class="file">/usr/local/share/texmf/fonts//</samp>), contain a mixture of files and
directories. This prevents Kpathsea from using a useful optimization
(see <a class="pxref" href="#Subdirectory-expansion">Subdirectory expansion</a>).

<p>It is best to have only directories (and perhaps a <samp class="file">README</samp>) in the
upper levels of the directory structure, and it&rsquo;s very important to have
<em class="emph">only</em> files, and no subdirectories, in the leaf directories where
the dozens of TFM, PK, or whatever files reside.
</p></li></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 class="xref" href="#Debugging">Debugging</a>.
</p>

<hr>
</div>
<div class="subsection-level-extent" id="Unable-to-generate-fonts">
<div class="nav-panel">
<p>
Next: <a href="#TeX-or-Metafont-failing" accesskey="n" rel="next">TeX or Metafont failing</a>, Previous: <a href="#Slow-path-searching" accesskey="p" rel="prev">Slow path searching</a>, Up: <a href="#Common-problems" accesskey="u" rel="up">Common problems</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Unable-to-generate-fonts-1"><span>8.5.3 Unable to generate fonts<a class="copiable-link" href="#Unable-to-generate-fonts-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-unable-to-generate-fonts"></a>
<a class="index-entry-id" id="index-font-generation-failures"></a>

<p>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 class="index-entry-id" id="index-mktexpk-can_0027t-guess-mode"></a>
<p>If <code class="code">mktexpk</code> runs, but fails with this error:
</p><div class="example">
<pre class="example-preformatted">mktexpk: Can't guess mode for <var class="var">nnn</var> dpi devices.
mktexpk: Use a config file to specify the mode, or update me.
</pre></div>
<p>you need to ensure the resolution and mode match; just
specifying the resolution, as in <code class="code">-D 360</code>, is not enough.
</p>
<p>You can specify the mode name with the <code class="code">-mode</code> option on the
Dvips command line, or in a Dvips configuration file (see <a data-manual="dvips" href="https://tug.org/texinfohtml/dvips.html#Config-files">Config
files</a> in <cite class="cite">Dvips</cite>), such as <samp class="file">config.ps</samp> in your document
directory, <samp class="file">~/.dvipsrc</samp> in your home directory, or in a system
directory (again named <samp class="file">config.ps</samp>).  (Other drivers use other
files, naturally.)
</p>
<p>For example, if you need 360<span class="dmn">dpi</span> fonts, you could include this in
a configuration file:
</p><div class="example">
<pre class="example-preformatted">D 360
M lqmed
</pre></div>

<a class="index-entry-id" id="index-Metafont-using-the-wrong-device"></a>
<a class="index-entry-id" id="index-device_002c-wrong"></a>
<p>If Metafont runs, but generates fonts at the wrong resolution or for
the wrong device, most likely <code class="code">mktexpk</code>&rsquo;s built-in guess for the
mode is wrong, and you should override it as above.
</p>
<p>See <a class="url" href="https://ctan.org/pkg/modes">https://ctan.org/pkg/modes</a> for a list of resolutions and mode
names for most devices (additional submissions are welcome).
</p>
<a class="index-entry-id" id="index-_002e2602gf"></a>
<a class="index-entry-id" id="index-2602gf"></a>
<a class="index-entry-id" id="index-Metafont-making-too_002dlarge-fonts"></a>
<a class="index-entry-id" id="index-proof-mode"></a>
<a class="index-entry-id" id="index-online-Metafont-display_002c-spurious"></a>
<p>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&rsquo;t been made properly.  (It&rsquo;s using the default
<code class="code">proof</code> mode, instead of an actual device mode.)  To make a proper
<samp class="file">plain.base</samp>, assuming the local mode definitions are contained in
a file <samp class="file">modes.mf</samp>, run the following command (assuming Unix):
</p>
<div class="example">
<pre class="example-preformatted">inimf &quot;plain; input modes; dump&quot;
</pre></div>

<a class="index-entry-id" id="index-plain_002ebase"></a>
<p>Then copy the <samp class="file">plain.base</samp> file from the current directory to where
the base files are stored on your system
(<samp class="file">/usr/local/share/texmf/web2c</samp> by default), and make a link
(either hard or soft) from <samp class="file">plain.base</samp> to <samp class="file">mf.base</samp> in that
directory.
See <a data-manual="web2c" href="https://tug.org/texinfohtml/web2c.html#inimf-invocation">inimf invocation</a> in <cite class="cite">Web2c</cite>.
</p>
<a class="index-entry-id" id="index-Metafont-installation"></a>
<p>If <code class="code">mf</code> is a command not found at all by <code class="code">mktexpk</code>, then you
need to install Metafont (see <a class="pxref" href="#unixtex_002eftp"><samp class="file">unixtex.ftp</samp>: Obtaining TeX</a>).
</p>

<hr>
</div>
<div class="subsection-level-extent" id="TeX-or-Metafont-failing">
<div class="nav-panel">
<p>
Previous: <a href="#Unable-to-generate-fonts" accesskey="p" rel="prev">Unable to generate fonts</a>, Up: <a href="#Common-problems" accesskey="u" rel="up">Common problems</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="TeX-or-Metafont-failing-1"><span>8.5.4 TeX or Metafont failing<a class="copiable-link" href="#TeX-or-Metafont-failing-1"> &para;</a></span></h4>

<a class="index-entry-id" id="index-TeX-failures"></a>
<a class="index-entry-id" id="index-Metafont-failures"></a>
<a class="index-entry-id" id="index-compiler-bugs"></a>
<p>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>
<a class="index-entry-id" id="index-optimization-caveat"></a>
<p>For a workaround, if you enabled any optimization flags, it&rsquo;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&rsquo;s failing.
</p>
<a class="index-entry-id" id="index-GNU-C-compiler-bugs"></a>
<a class="index-entry-id" id="index-system-C-compiler-bugs"></a>
<p>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 data-manual="gcc" href="https://gcc.gnu.org/onlinedocs/gcc/Bugs.html#Bugs">Bugs</a> in <cite class="cite">Using and Porting GNU CC</cite>.
</p>
<a class="index-entry-id" id="index-compiler-bugs_002c-finding"></a>
<p>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&rsquo;s (or whatever program&rsquo;s) data structures.  Good luck.
</p>

<hr>
</div>
</div>
</div>
<div class="unnumbered-level-extent" id="Index">
<div class="nav-panel">
<p>
Previous: <a href="#Reporting-bugs" accesskey="p" rel="prev">Reporting bugs</a>, Up: <a href="#Top" accesskey="u" rel="up">Kpathsea library</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<h2 class="unnumbered" id="Index-1"><span>Index<a class="copiable-link" href="#Index-1"> &para;</a></span></h2>

<div class="printindex cp-printindex">
<table class="cp-letters-header-printindex"><tr><th>Jump to: &nbsp; </th><td><a class="summary-letter-printindex" href="#Index_cp_symbol-1"><b>-</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-2"><b>;</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-3"><b>:</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-4"><b>!</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-5"><b>.</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-6"><b>{</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-7"><b>/</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-8"><b>\</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-9"><b>=</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-10"><b>~</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-11"><b>$</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-12"><b>2</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-13"><b>8</b></a>
 &nbsp; 
<br>
<a class="summary-letter-printindex" href="#Index_cp_letter-A"><b>A</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-B"><b>B</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-C"><b>C</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-D"><b>D</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-E"><b>E</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-F"><b>F</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-G"><b>G</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-H"><b>H</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-I"><b>I</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-K"><b>K</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-L"><b>L</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-M"><b>M</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-N"><b>N</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-O"><b>O</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-P"><b>P</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-Q"><b>Q</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-R"><b>R</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-S"><b>S</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-T"><b>T</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-U"><b>U</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-V"><b>V</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-W"><b>W</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-X"><b>X</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-Z"><b>Z</b></a>
 &nbsp; 
</td></tr></table>
<table class="cp-entries-printindex" border="0">
<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-1">-</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dall"><code>--all</code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dcasefold_002dsearch"><code>--casefold-search</code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dcnf_002dline"><code>--cnf-line</code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dcnf_002dline_002c-source-for-path"><code>&lsquo;<samp class="samp">--cnf-line</samp>&rsquo;, source for path</code></a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dcolor_003dtty"><code>--color=tty</code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002ddebug_003dnum"><code>--debug=<var class="var">num</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002ddpi_003dnum"><code>--dpi=<var class="var">num</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dengine_003dname"><code>--engine=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dexpand_002dbraces_003dstring"><code>--expand-braces=<var class="var">string</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dexpand_002dpath_003dstring"><code>--expand-path=<var class="var">string</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dexpand_002dvar_003dstring"><code>--expand-var=<var class="var">string</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dformat_003dname"><code>--format=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dhelp"><code>--help</code></a></td><td class="printindex-index-section"><a href="#Standard-options">Standard options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dhelp_002dformats"><code>--help-formats</code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dinteractive"><code>--interactive</code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dmktex_003dfiletype"><code>--mktex=<var class="var">filetype</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dmode_003dstring"><code>--mode=<var class="var">string</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dmust_002dexist"><code>--must-exist</code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dno_002dcasefold_002dsearch"><code>--no-casefold-search</code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dno_002dmktex_003dfiletype"><code>--no-mktex=<var class="var">filetype</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dpath_003dstring"><code>--path=<var class="var">string</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dprogname_003dname"><code>--progname=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dsafe_002dextended_002din_002dname_003dname"><code>--safe-extended-in-name=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dsafe_002dextended_002dout_002dname_003dname"><code>--safe-extended-out-name=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dsafe_002din_002dname_003dname"><code>--safe-in-name=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dsafe_002dout_002dname_003dname"><code>--safe-out-name=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dshow_002dpath_003dname"><code>--show-path=<var class="var">name</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dsubdir_003dstring"><code>--subdir=<var class="var">string</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dvar_002dbrace_002dvalue_003dvariable"><code>--var-brace-value=<var class="var">variable</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dvar_002dvalue_003dvariable"><code>--var-value=<var class="var">variable</var></code></a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dversion"><code>--version</code></a></td><td class="printindex-index-section"><a href="#Standard-options">Standard options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwith_002dmktextex_002ddefault"><code>--with-mktextex-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwithout_002dmktexfmt_002ddefault"><code>--without-mktexfmt-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwithout_002dmktexmf_002ddefault"><code>--without-mktexmf-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwithout_002dmktexocp_002ddefault"><code>--without-mktexocp-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwithout_002dmktexofm_002ddefault"><code>--without-mktexofm-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwithout_002dmktexpk_002ddefault"><code>--without-mktexpk-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d_002dwithout_002dmktextfm_002ddefault"><code>--without-mktextfm-default</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002d1-debugging-value"><code>-1 <span class="r">debugging value</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002dA-option-to-ls"><code>-A <span class="r">option to <code class="code">ls</code></span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002dD-num"><code>-D <var class="var">num</var></code></a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002diname_002c-find-predicate"><code>-iname<span class="r">, find predicate</span></code></a></td><td class="printindex-index-section"><a href="#Casefolding-examples">Casefolding examples</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002dL-option-to-ls"><code>-L <span class="r">option to <code class="code">ls</code></span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-2">;</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_003b-translated-to-_003a-in-texmf_002ecnf"><code>; <span class="r">translated to &lsquo;<samp class="samp">:</samp>&rsquo; in <samp class="file">texmf.cnf</samp></span></code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-3">:</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_003a-may-not-be-_003a"><code>: <span class="r">may not be :</span></code></a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_003a_003a-expansion"><code>:: <span class="r">expansion</span></code></a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-4">!</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_0021_0021-and-casefolding"><code>!! <span class="r">and casefolding</span></code></a></td><td class="printindex-index-section"><a href="#Casefolding-examples">Casefolding examples</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_0021_0021-in-path-specifications"><code>!! <span class="r">in path specifications</span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_0021_0021-in-TEXMFDBS"><code>!! <span class="r">in <code class="code">TEXMFDBS</code></span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-5">.</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002e-directories_002c-ignored"><code>. <span class="r">directories, ignored</span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002e-files"><code>. <span class="r">files</span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002e2602gf"><code>.2602gf</code></a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eafm"><code>.afm</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ebase"><code>.base</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ebib"><code>.bib</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ebltxml"><code>.bltxml</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ebst"><code>.bst</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ecid"><code>.cid</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ecmap"><code>.cmap</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ecnf"><code>.cnf</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002edll"><code>.dll</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eenc"><code>.enc</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eeps"><code>.eps</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eepsi"><code>.epsi</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002efea"><code>.fea</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002efmt"><code>.fmt</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eist"><code>.ist</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002elig"><code>.lig</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002elua"><code>.lua</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eluatex"><code>.luatex</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eluc"><code>.luc</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eluctex"><code>.luctex</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emap"><code>.map</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emem"><code>.mem</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emf"><code>.mf</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emft"><code>.mft</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emlbib"><code>.mlbib</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emlbst"><code>.mlbst</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002emp"><code>.mp</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eocp"><code>.ocp</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eofm"><code>.ofm</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eopl"><code>.opl</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eotp"><code>.otp</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eovf"><code>.ovf</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eovp"><code>.ovp</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epfa"><code>.pfa</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epfb"><code>.pfb</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epk"><code>.pk</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epool"><code>.pool</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epool-1"><code>.pool</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epool-2"><code>.pool</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002epro"><code>.pro</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eprofile_002c-_0028un_0029writable-by-TeX"><code>.profile<span class="r">, (un)writable by TeX</span></code></a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eprogname-qualifier-in-texmf_002ecnf"><code>.<var class="var">progname</var> <span class="r">qualifier in <samp class="file">texmf.cnf</samp></span></code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eris"><code>.ris</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002esfd"><code>.sfd</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eso"><code>.so</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002etex"><code>.tex</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002etex-file_002c-included-in-ls_002dR"><code>.tex <span class="r">file, included in <samp class="file">ls-R</samp></span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002etexlua"><code>.texlua</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002etexluc"><code>.texluc</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002etfm"><code>.tfm</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002etlu"><code>.tlu</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ettc"><code>.ttc</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ettf"><code>.ttf</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002evf"><code>.vf</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002ew"><code>.w</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eweb"><code>.web</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002eweb-1"><code>.web</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-6">{</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_007b-expansion"><code>{ <span class="r">expansion</span></code></a></td><td class="printindex-index-section"><a href="#Brace-expansion">Brace expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-7">/</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002f-may-not-be-_002f"><code>/ <span class="r">may not be /</span></code></a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002f_002c-trailing-in-home-directory"><code>/<span class="r">, trailing in home directory</span></code></a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002f_002f"><code>//</code></a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002fetc_002fprofile"><code>/etc/profile</code></a></td><td class="printindex-index-section"><a href="#Unable-to-find-files">Unable to find files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002fetc_002fprofile-and-aliases"><code>/etc/profile <span class="r">and aliases</span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_002fvar_002ftmp_002ftexfonts"><code>/var/tmp/texfonts</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-8">\</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_005c_002c-line-continuation-in-texmf_002ecnf"><code>\<span class="r">, line continuation in <samp class="file">texmf.cnf</samp></span></code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_005copenin"><code>\openin</code></a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_005copenout"><code>\openout</code></a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_005cspecial_002c-suppressing-warnings-about"><code>\special<span class="r">, suppressing warnings about</span></code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-9">=</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_003d-omitted-in-texmf_002ecnf-and-misparsing"><code>= <span class="r">omitted in <samp class="file">texmf.cnf</samp> and misparsing</span></code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-10">~</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_007e-expansion"><code>~ <span class="r">expansion</span></code></a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-11">$</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-_0024-expansion"><code>$ <span class="r">expansion</span></code></a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-12">2</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-2602gf"><code>2602gf</code></a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_symbol-13">8</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-8_002e3-filenames_002c-using">8.3 filenames, using</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-A">A</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-absolute-filenames">absolute filenames</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-access-system-call"><code>access <span class="r">system call</span></code></a></td><td class="printindex-index-section"><a href="#Casefolding-examples">Casefolding examples</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-access-warnings">access warnings</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-AFMFONTS"><code>AFMFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-aliases-for-fonts">aliases for fonts</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-aliases_002c-for-filenames">aliases, for filenames</a></td><td class="printindex-index-section"><a href="#Filename-aliases">Filename aliases</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-all"><code>all</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-all-matches_002c-finding">all matches, finding</a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-alphabetical-order_002c-not">alphabetical order, not</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-announcement-mailing-list">announcement mailing list</a></td><td class="printindex-index-section"><a href="#Mailing-lists">Mailing lists</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-API_002c-re_002dentrant">API, re-entrant</a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-append_002donly-directories-and-mktexpk">append-only directories and <code class="code">mktexpk</code></a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-appendonlydir"><code>appendonlydir</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Apple-filesystem_002c-case_002dinsensitive">Apple filesystem, case-insensitive</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-arguments-to-mktex">arguments to <samp class="file">mktex</samp></a></td><td class="printindex-index-section"><a href="#mktex-script-arguments">mktex script arguments</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-argv_005b0_005d"><code>argv[0]</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-autoconf_002c-recommended"><code>autoconf<span class="r">, recommended</span></code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-automounter_002c-and-ls_002dR">automounter, and <samp class="file">ls-R</samp></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-auxiliary-tasks">auxiliary tasks</a></td><td class="printindex-index-section"><a href="#Auxiliary-tasks">Auxiliary tasks</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-B">B</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Bach_002c-Johann-Sebastian">Bach, Johann Sebastian</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-backslash_002dnewline">backslash-newline</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-basic-glyph-lookup">basic glyph lookup</a></td><td class="printindex-index-section"><a href="#Basic-glyph-lookup">Basic glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Berry_002c-Karl">Berry, Karl</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-BIBINPUTS"><code>BIBINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-BIBINPUTS-1"><code>BIBINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-blank-lines_002c-in-texmf_002ecnf">blank lines, in <samp class="file">texmf.cnf</samp></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-BLTXMLINPUTS"><code>BLTXMLINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-brace-expansion">brace expansion</a></td><td class="printindex-index-section"><a href="#Brace-expansion">Brace expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Breitenlohner_002c-Peter">Breitenlohner, Peter</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-BSTINPUTS"><code>BSTINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-BSTINPUTS-1"><code>BSTINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-bug-address">bug address</a></td><td class="printindex-index-section"><a href="#Reporting-bugs">Reporting bugs</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-bug-checklist">bug checklist</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-bug-mailing-list">bug mailing list</a></td><td class="printindex-index-section"><a href="#Mailing-lists">Mailing lists</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-bugs_002c-reporting">bugs, reporting</a></td><td class="printindex-index-section"><a href="#Reporting-bugs">Reporting bugs</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-C">C</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-c_002d_002a_002eh"><code>c-*.h</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-c_002dauto_002eh"><code>c-auto.h</code></a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-cache-of-fonts_002c-local">cache of fonts, local</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-calling-sequence">calling sequence</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-casefolding-examples">casefolding examples</a></td><td class="printindex-index-section"><a href="#Casefolding-examples">Casefolding examples</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-casefolding-fallback-rationale">casefolding fallback rationale</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-casefolding-search">casefolding search</a></td><td class="printindex-index-section"><a href="#Casefolding-search">Casefolding search</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ChangeLog-entry"><code>ChangeLog <span class="r">entry</span></code></a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-checklist-for-bug-reports">checklist for bug reports</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-checksum"><code>checksum</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-circle-fonts">circle fonts</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-client_005fpath-in-kpse_002d_003eformat_005finfo"><code>client_path <span class="r">in <code class="code">kpse-&gt;format_info</code></span></code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-CLUAINPUTS"><code>CLUAINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-CMAPFONTS"><code>CMAPFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-cmr10_002c-as-fallback-font"><code>cmr10<span class="r">, as fallback font</span></code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-cmr10_002evf"><code>cmr10.vf</code></a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-cnf_002ec"><code>cnf.c</code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-cnf_002eh"><code>cnf.h</code></a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-comments_002c-in-fontmap-files">comments, in fontmap files</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-comments_002c-in-texmf_002ecnf">comments, in <samp class="file">texmf.cnf</samp></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-comments_002c-making">comments, making</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-common-features-in-glyph-lookup">common features in glyph lookup</a></td><td class="printindex-index-section"><a href="#Basic-glyph-lookup">Basic glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-common-problems">common problems</a></td><td class="printindex-index-section"><a href="#Common-problems">Common problems</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-compilation-value_002c-source-for-path">compilation value, source for path</a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-compiler-bugs">compiler bugs</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-compiler-bugs_002c-finding">compiler bugs, finding</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-conditions-for-use">conditions for use</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config-files">config files</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config-files_002c-for-Kpathsea_002dusing-programs">config files, for Kpathsea-using programs</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config-files_002c-programming-with">config files, programming with</a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config_002eh"><code>config.h</code></a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config_002elog"><code>config.log</code></a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config_002eps"><code>config.ps</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config_002eps_002c-search-path-for"><code>config.ps<span class="r">, search path for</span></code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-config_002estatus"><code>config.status</code></a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-configuration-bugs">configuration bugs</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-configuration-file_002c-source-for-path">configuration file, source for path</a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-configuration-of-mktex-scripts">configuration of <samp class="file">mktex</samp> scripts</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-configure-options-for-mktex-scripts"><code class="code">configure</code> options for <samp class="file">mktex</samp> scripts</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-context-diff">context diff</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-continuation-character">continuation character</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-core-dumps_002c-reporting">core dumps, reporting</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-crashes-of-TeX-and-security">crashes of TeX and security</a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-crashes_002c-reporting">crashes, reporting</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-CWEBINPUTS"><code>CWEBINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-D">D</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-database-search">database search</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-database_002c-for-filenames">database, for filenames</a></td><td class="printindex-index-section"><a href="#Filename-database">Filename database</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-database_002c-format-of">database, format of</a></td><td class="printindex-index-section"><a href="#Database-format">Database format</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-debug_002eh"><code>debug.h</code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-debugger">debugger</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-debugging">debugging</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-debugging-options_002c-in-Kpathsea_002dusing-program">debugging options, in Kpathsea-using program</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-debugging-output">debugging output</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-default-expansion">default expansion</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-default_005ftexsizes"><code>default_texsizes</code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-device_002c-wrong">device, wrong</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-directories_002c-making-append_002donly">directories, making append-only</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-directory-permissions">directory permissions</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-directory-structure_002c-for-TeX-files">directory structure, for TeX files</a></td><td class="printindex-index-section"><a href="#TeX-directory-structure">TeX directory structure</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-disabling-mktex-scripts">disabling <samp class="file">mktex</samp> scripts</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-disk-search">disk search</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-disk-searching_002c-avoiding">disk searching, avoiding</a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-disk-usage_002c-reducing">disk usage, reducing</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-doc-files"><code>doc files</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DOS-compatible-names">DOS compatible names</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dosnames"><code>dosnames</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dot-files">dot files</a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-doubled-colons">doubled colons</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dpinnn-directories"><code>dpi<var class="var">nnn</var> directories</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DVILJMAKEPK"><code>DVILJMAKEPK</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DVILJSIZES"><code>DVILJSIZES</code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dvipdfmx_002ecfg"><code>dvipdfmx.cfg</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DVIPSFONTS"><code>DVIPSFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DVIPSHEADERS"><code>DVIPSHEADERS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DVIPSMAKEPK"><code>DVIPSMAKEPK</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-DVIPSSIZES"><code>DVIPSSIZES</code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dynamic-creation-of-files">dynamic creation of files</a></td><td class="printindex-index-section"><a href="#mktex-scripts">mktex scripts</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-E">E</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-EC-fonts_002c-and-dynamic-source-creation">EC fonts, and dynamic source creation</a></td><td class="printindex-index-section"><a href="#mktex-scripts">mktex scripts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-elt_002ddirs_002ec"><code>elt-dirs.c</code></a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-elt_002ddirs_002ec-1"><code>elt-dirs.c</code></a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-enabling-mktex-scripts">enabling <samp class="file">mktex</samp> scripts</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ENCFONTS"><code>ENCFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-engine-name">engine name</a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-environment-variable_002c-source-for-path">environment variable, source for path</a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-environment-variables-for-TeX">environment variables for TeX</a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-environment-variables-in-paths">environment variables in paths</a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-environment-variables_002c-old">environment variables, old</a></td><td class="printindex-index-section"><a href="#Unable-to-find-files">Unable to find files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-epoch_002c-seconds-since">epoch, seconds since</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-error-message-macros">error message macros</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-examples_002c-of-casefolding-searches">examples, of casefolding searches</a></td><td class="printindex-index-section"><a href="#Casefolding-examples">Casefolding examples</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-excessive-startup-time">excessive startup time</a></td><td class="printindex-index-section"><a href="#Slow-path-searching">Slow path searching</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expand_002ec"><code>expand.c</code></a></td><td class="printindex-index-section"><a href="#Brace-expansion">Brace expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expanding-symlinks">expanding symlinks</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expansion_002c-default">expansion, default</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expansion_002c-path-element">expansion, path element</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expansion_002c-search-path">expansion, search path</a></td><td class="printindex-index-section"><a href="#Path-expansion">Path expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expansion_002c-subdirectory">expansion, subdirectory</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expansion_002c-tilde">expansion, tilde</a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-expansion_002c-variable">expansion, variable</a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-explicitly-relative-filenames">explicitly relative filenames</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-extensions_002c-filename">extensions, filename</a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-externally_002dbuilt-filename-database">externally-built filename database</a></td><td class="printindex-index-section"><a href="#Filename-database">Filename database</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-extra-colons">extra colons</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-F">F</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-failed-mktex_2026-script-invocation">failed <code class="code">mktex&hellip;</code> script invocation</a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fallback-font">fallback font</a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fallback-resolutions">fallback resolutions</a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-FAQ_002c-Kpathsea">FAQ, Kpathsea</a></td><td class="printindex-index-section"><a href="#Common-problems">Common problems</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Farwell_002c-Matthew">Farwell, Matthew</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-file-formats_002c-supported">file formats, supported</a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-file-lookup">file lookup</a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-file-permissions">file permissions</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-file-types_002c-registering-new">file types, registering new</a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-filename-aliases">filename aliases</a></td><td class="printindex-index-section"><a href="#Filename-aliases">Filename aliases</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-filename-database">filename database</a></td><td class="printindex-index-section"><a href="#Filename-database">Filename database</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-filenames_002c-absolute-or-explicitly-relative">filenames, absolute or explicitly relative</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-files_002c-unable-to-find">files, unable to find</a></td><td class="printindex-index-section"><a href="#Unable-to-find-files">Unable to find files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-filesystem-search">filesystem search</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-filesystem_002c-case_002d_0028in_0029sensitive">filesystem, case-(in)sensitive</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Findutils_002c-GNU-package">Findutils, GNU package</a></td><td class="printindex-index-section"><a href="#Casefolding-examples">Casefolding examples</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-floating-directories">floating directories</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fmtutil"><code>fmtutil</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fmtutil_002ecnf"><code>fmtutil.cnf</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fmtutils_002ecnf"><code>fmtutils.cnf</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-font-alias-files">font alias files</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-font-generation-failures">font generation failures</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-font-of-last-resort">font of last resort</a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-font-set_002c-infinite">font set, infinite</a></td><td class="printindex-index-section"><a href="#mktex-scripts">mktex scripts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-FONTCIDMAPS"><code>FONTCIDMAPS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-FONTFEATURES"><code>FONTFEATURES</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fontmap-files">fontmap files</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fontmaps-1"><code>fontmaps</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fontmaps">fontmaps</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fontname">fontname</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fontnames_002c-arbitrary-length">fontnames, arbitrary length</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-FOOINPUTS"><code>FOOINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-FOOINPUTS-1"><code>FOOINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fopen_002c-redefined"><code>fopen<span class="r">, redefined</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-format-of-external-database">format of external database</a></td><td class="printindex-index-section"><a href="#Database-format">Database format</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ftp_002ecs_002estanford_002eedu"><code>ftp.cs.stanford.edu</code></a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ftp_002etug_002eorg"><code>ftp.tug.org</code></a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-fundamental-purpose-of-Kpathsea">fundamental purpose of Kpathsea</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-G">G</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-gdb_002c-recommended"><code>gdb<span class="r">, recommended</span></code></a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-gf"><code>gf</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-GFFONTS"><code>GFFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-globally-writable-directories">globally writable directories</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-glyph-lookup">glyph lookup</a></td><td class="printindex-index-section"><a href="#Glyph-lookup">Glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-glyph-lookup-bitmap-tolerance">glyph lookup bitmap tolerance</a></td><td class="printindex-index-section"><a href="#Basic-glyph-lookup">Basic glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-GLYPHFONTS"><code>GLYPHFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-GLYPHFONTS-1"><code>GLYPHFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-glyphlist_002etxt"><code>glyphlist.txt</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-GNU-C-compiler-bugs">GNU C compiler bugs</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-GNU-General-Public-License">GNU General Public License</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-group_002dwritable-directories">group-writable directories</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-GSFTOPK_005fDEBUG-_0028128_0029"><code>GSFTOPK_DEBUG <span class="r">(128)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-H">H</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-hash-table-buckets_002c-printing">hash table buckets, printing</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-hash-table-routines">hash table routines</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-hash_005fsummary_005fonly-variable-for-debugging"><code>hash_summary_only <span class="r">variable for debugging</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-history-of-Kpathsea">history of Kpathsea</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Hoekwater_002c-Taco">Hoekwater, Taco</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-home-directories-in-paths">home directories in paths</a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-HOME_002c-as-_007e-expansion"><code>HOME<span class="r">, as ~ expansion</span></code></a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-I">I</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-identifiers_002c-characters-valid-in">identifiers, characters valid in</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-include-fontmap-directive"><code>include <span class="r">fontmap directive</span></code></a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-INDEXSTYLE"><code>INDEXSTYLE</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-input-lines_002c-reading">input lines, reading</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-interactive-query">interactive query</a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-interface_002c-not-frozen">interface, not frozen</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-introduction">introduction</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-K">K</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kdebug_003a">&lsquo;<samp class="samp">kdebug:</samp>&rsquo;</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kdefault_002ec"><code>kdefault.c</code></a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Knuth_002c-Donald-E_002e">Knuth, Donald E.</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Knuth_002c-Donald-E_002e_002c-archive-of-programs-by">Knuth, Donald E., archive of programs by</a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Kpathsea-config-file_002c-source-for-path">Kpathsea config file, source for path</a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fcnf_005fget"><code>kpathsea_cnf_get</code></a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPATHSEA_005fDEBUG"><code>KPATHSEA_DEBUG</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPATHSEA_005fDEBUG-1"><code>KPATHSEA_DEBUG</code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005ffind_005ffile"><code>kpathsea_find_file</code></a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005ffind_005ffile-1"><code>kpathsea_find_file</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005ffind_005fglyph"><code>kpathsea_find_glyph</code></a></td><td class="printindex-index-section"><a href="#Glyph-lookup">Glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005ffind_005fglyph-1"><code>kpathsea_find_glyph</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005ffinish"><code>kpathsea_finish</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fin_005fname_005fok"><code>kpathsea_in_name_ok</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fin_005fname_005fok_005fextended"><code>kpathsea_in_name_ok_extended</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fin_005fname_005fok_005fsilent"><code>kpathsea_in_name_ok_silent</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fin_005fname_005fok_005fsilent_005fextended"><code>kpathsea_in_name_ok_silent_extended</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005finit_005fprog"><code>kpathsea_init_prog</code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005finit_005fprog-1"><code>kpathsea_init_prog</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fnew"><code>kpathsea_new</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fopen_005ffile"><code>kpathsea_open_file</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fout_005fname_005fok"><code>kpathsea_out_name_ok</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fout_005fname_005fok_005fextended"><code>kpathsea_out_name_ok_extended</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fout_005fname_005fok_005fsilent"><code>kpathsea_out_name_ok_silent</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fout_005fname_005fok_005fsilent_005fextended"><code>kpathsea_out_name_ok_silent_extended</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fset_005fprogram_005fname"><code>kpathsea_set_program_name</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_005fvar_005fvalue"><code>kpathsea_var_value</code></a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPATHSEA_005fWARNING"><code>KPATHSEA_WARNING</code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpathsea_002eh"><code>kpathsea.h</code></a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse-mode-of-LuaTeX">kpse mode of LuaTeX</a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fBITMAP_005fTOLERANCE"><code>KPSE_BITMAP_TOLERANCE</code></a></td><td class="printindex-index-section"><a href="#Basic-glyph-lookup">Basic glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fEXPAND-_002816_0029"><code>KPSE_DEBUG_EXPAND <span class="r">(16)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fFOPEN-_00284_0029"><code>KPSE_DEBUG_FOPEN <span class="r">(4)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fHASH-_00282_0029"><code>KPSE_DEBUG_HASH <span class="r">(2)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fPATHS-_00288_0029"><code>KPSE_DEBUG_PATHS <span class="r">(8)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fSEARCH-_002832_0029"><code>KPSE_DEBUG_SEARCH <span class="r">(32)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fSTAT-_00281_0029"><code>KPSE_DEBUG_STAT <span class="r">(1)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDEBUG_005fVARS-_002864_0029"><code>KPSE_DEBUG_VARS <span class="r">(64)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-KPSE_005fDOT-expansion"><code>KPSE_DOT <span class="r">expansion</span></code></a></td><td class="printindex-index-section"><a href="#KPSE_005fDOT-expansion">KPSE_DOT expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_005fformat_005finfo_005ftype"><code>kpse_format_info_type</code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003edebug"><code>kpse-&gt;debug</code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003edebug-1"><code>kpse-&gt;debug</code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003edebug-variable"><code>kpse-&gt;debug <span class="r">variable</span></code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003eformat_005finfo"><code>kpse-&gt;format_info</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003einvocation_005fname"><code>kpse-&gt;invocation_name</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003einvocation_005fshort_005fname"><code>kpse-&gt;invocation_short_name</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpse_002d_003eprogram_005fname"><code>kpse-&gt;program_name</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-kpsewhich"><code>kpsewhich</code></a></td><td class="printindex-index-section"><a href="#Invoking-kpsewhich">Invoking kpsewhich</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Kpsewhich_002c-and-debugging">Kpsewhich, and debugging</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-L">L</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-last_002dresort-font">last-resort font</a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-lcircle10"><code>lcircle10</code></a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-leading-colons">leading colons</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-leaf-directories-wrongly-guessed">leaf directories wrongly guessed</a></td><td class="printindex-index-section"><a href="#Unable-to-find-files">Unable to find files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-leaf-directory-trick">leaf directory trick</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-license-for-using-the-library">license for using the library</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-LIGFONTS"><code>LIGFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-lines_002c-reading-arbitrary_002dlength">lines, reading arbitrary-length</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Linux-File-System-Standard">Linux File System Standard</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-local-cache-of-fonts">local cache of fonts</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-log-file">log file</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-logging-successful-searches">logging successful searches</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-lost_002bfound-directory"><code>lost+found <span class="r">directory</span></code></a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-lostchar"><code>lostchar</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ls_002dR"><code>ls-R</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ls_002dR-database-file"><code>ls-R <span class="r">database file</span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ls_002dR_002c-simplest-build"><code>ls-R<span class="r">, simplest build</span></code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-LUAINPUTS"><code>LUAINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-luaotfload"><code>luaotfload</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-LuaTeX-and-security">LuaTeX and security</a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-M">M</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Mac-filesystem_002c-case_002dinsensitive">Mac filesystem, case-insensitive</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MacKenzie_002c-David">MacKenzie, David</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MacKenzie_002c-David-1">MacKenzie, David</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-magic-characters">magic characters</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mailing-lists">mailing lists</a></td><td class="printindex-index-section"><a href="#Mailing-lists">Mailing lists</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MAKETEX_005fDEBUG-_0028512_0029"><code>MAKETEX_DEBUG <span class="r">(512)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MAKETEX_005fFINE_005fDEBUG-_00281024_0029"><code>MAKETEX_FINE_DEBUG <span class="r">(1024)</span></code></a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-memory-allocation-routines">memory allocation routines</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-metafont-driver-files">metafont driver files</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Metafont-failures">Metafont failures</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Metafont-installation">Metafont installation</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Metafont-making-too_002dlarge-fonts">Metafont making too-large fonts</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Metafont-using-the-wrong-device">Metafont using the wrong device</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MFBASES"><code>MFBASES</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MFINPUTS"><code>MFINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MFPOOL"><code>MFPOOL</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MFTINPUTS"><code>MFTINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MISCFONTS"><code>MISCFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mismatched-checksum-warnings">mismatched checksum warnings</a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MISSFONT_005fLOG"><code>MISSFONT_LOG</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-missfont_002elog"><code>missfont.log</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-missing-character-warnings">missing character warnings</a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mkocp"><code>mkocp</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mkofm"><code>mkofm</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex-script-configuration"><samp class="file">mktex</samp> script configuration</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex-script-names"><samp class="file">mktex</samp> script names</a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex-scripts"><samp class="file">mktex</samp> scripts</a></td><td class="printindex-index-section"><a href="#mktex-scripts">mktex scripts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex_002ecnf"><code>mktex.cnf</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex_002ecnf-1"><code>mktex.cnf</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex_002eopt"><code>mktex.opt</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktex_002eopt-1"><code>mktex.opt</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktexdir"><code>mktexdir</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktexfmt"><code>mktexfmt</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktexmf"><code>mktexmf</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktexpk"><code>mktexpk</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktexpk-can_0027t-guess-mode"><code class="code">mktexpk</code> can&rsquo;t guess mode</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktextex"><code>mktextex</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mktextfm"><code>mktextfm</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MLBIBINPUTS"><code>MLBIBINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MLBSTINPUTS"><code>MLBSTINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-mode-directory_002c-omitting">mode directory, omitting</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Morgan_002c-Tim">Morgan, Tim</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MPINPUTS"><code>MPINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MPMEMS"><code>MPMEMS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MPPOOL"><code>MPPOOL</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MPSUPPORT"><code>MPSUPPORT</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-MT_005fFEATURES"><code>MT_FEATURES</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-multiple-TeX-hierarchies">multiple TeX hierarchies</a></td><td class="printindex-index-section"><a href="#Brace-expansion">Brace expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-must-exist">must exist</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-N">N</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-names-for-mktex-scripts">names for <samp class="file">mktex</samp> scripts</a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Neumann_002c-Gustaf">Neumann, Gustaf</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-NFS-and-ls_002dR">NFS and <samp class="file">ls-R</samp></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-nomfdrivers"><code>nomfdrivers</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-nomode"><code>nomode</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-none"><code>none</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-null-pointers_002c-dereferencing">null pointers, dereferencing</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-numeric-debugging-values">numeric debugging values</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-O">O</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-obtaining-TeX">obtaining TeX</a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-OCPINPUTS"><code>OCPINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-OFMFONTS"><code>OFMFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-online-Metafont-display_002c-spurious">online Metafont display, spurious</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-openout_005fany"><code>openout_any</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-OPENTYPEFONTS"><code>OPENTYPEFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-optimization-caveat">optimization caveat</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-options-for-debugging">options for debugging</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-OTPINPUTS"><code>OTPINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-overview-of-path-searching">overview of path searching</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-overview-of-programming-with-Kpathsea">overview of programming with Kpathsea</a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-OVFFONTS"><code>OVFFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-OVPFONTS"><code>OVPFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-P">P</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-paranoid-mode_002c-for-output-files">paranoid mode, for output files</a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-path-expansion">path expansion</a></td><td class="printindex-index-section"><a href="#Path-expansion">Path expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-path-searching">path searching</a></td><td class="printindex-index-section"><a href="#Path-searching">Path searching</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-path-searching-options">path searching options</a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-path-searching_002c-overview">path searching, overview</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-path-searching_002c-standalone">path searching, standalone</a></td><td class="printindex-index-section"><a href="#Invoking-kpsewhich">Invoking kpsewhich</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-path-sources">path sources</a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-pathsearch_002eh"><code>pathsearch.h</code></a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-pc-Pascal-compiler"><code>pc <span class="r">Pascal compiler</span></code></a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-pdfglyphlist_002etxt"><code>pdfglyphlist.txt</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-pdftex_002ecfg"><code>pdftex.cfg</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PDFTEXCONFIG"><code>PDFTEXCONFIG</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-pdftexconfig_002etex"><code>pdftexconfig.tex</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-permission-denied">permission denied</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-permissions_002c-directory">permissions, directory</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-permissions_002c-file">permissions, file</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PKFONTS"><code>PKFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-plain_002ebase"><code>plain.base</code></a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-privacy_002c-semblance-of">privacy, semblance of</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-problems_002c-common">problems, common</a></td><td class="printindex-index-section"><a href="#Common-problems">Common problems</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-proginit_002eh"><code>proginit.h</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-program_002dvarying-paths">program-varying paths</a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-programming-overview">programming overview</a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-programming-with-config-files">programming with config files</a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-programming-with-Kpathsea">programming with Kpathsea</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-programs-using-the-library">programs using the library</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-proof-mode">proof mode</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PSHEADERS"><code>PSHEADERS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-pxp-Pascal-preprocessor"><code>pxp <span class="r">Pascal preprocessor</span></code></a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-Q">Q</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-quoting-variable-values">quoting variable values</a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-R">R</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-rationale-for-casefolding-fallback">rationale for casefolding fallback</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-re_002dentrant-API">re-entrant API</a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-readable"><code>readable</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-reading-arbitrary_002dlength-lines">reading arbitrary-length lines</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-recording-successful-searches">recording successful searches</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-relative-filenames">relative filenames</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-reporting-bugs">reporting bugs</a></td><td class="printindex-index-section"><a href="#Reporting-bugs">Reporting bugs</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-resident_002ec"><code>resident.c</code></a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-resolution_002c-setting">resolution, setting</a></td><td class="printindex-index-section"><a href="#Path-searching-options">Path searching options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-resolutions_002c-last_002dresort">resolutions, last-resort</a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-restricted-mode_002c-for-output-files">restricted mode, for output files</a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-retrieving-TeX">retrieving TeX</a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-right_002dhand-side-of-variable-assignments">right-hand side of variable assignments</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-RISINPUTS"><code>RISINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Rokicki_002c-Tom">Rokicki, Tom</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-root-user"><code class="t">root</code> user</a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-runtime-configuration-files">runtime configuration files</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-runtime-debugging">runtime debugging</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-S">S</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Sauter-fonts_002c-and-dynamic-source-creation">Sauter fonts, and dynamic source creation</a></td><td class="printindex-index-section"><a href="#mktex-scripts">mktex scripts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-scripts-for-file-creation">scripts for file creation</a></td><td class="printindex-index-section"><a href="#mktex-scripts">mktex scripts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-search-path_002c-defined">search path, defined</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-search_002c-case_002dinsensitive">search, case-insensitive</a></td><td class="printindex-index-section"><a href="#Casefolding-search">Casefolding search</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-searching-for-files">searching for files</a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-searching-for-glyphs">searching for glyphs</a></td><td class="printindex-index-section"><a href="#Glyph-lookup">Glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-searching-overview">searching overview</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-searching-the-database">searching the database</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-searching-the-disk">searching the disk</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-security-considerations">security considerations</a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-SELFAUTODIR">SELFAUTODIR</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-SELFAUTOLOC">SELFAUTOLOC</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-SELFAUTOPARENT">SELFAUTOPARENT</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-sending-patches">sending patches</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-setgid-scripts">setgid scripts</a></td><td class="printindex-index-section"><a href="#Global-font-cache-and-security">Global font cache and security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-SFDFONTS"><code>SFDFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-shell-commands_002c-security">shell commands, security</a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-shell-variables">shell variables</a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-shell_005fescape_002c-example-for-code"><code>shell_escape<span class="r">, example for code</span></code></a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-site-overrides-for-mktex_2026">site overrides for <code class="code">mktex&hellip;</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-skeleton-TeX-directory">skeleton TeX directory</a></td><td class="printindex-index-section"><a href="#TeX-directory-structure">TeX directory structure</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-slow-startup-time">slow startup time</a></td><td class="printindex-index-section"><a href="#Slow-path-searching">Slow path searching</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-source-files"><code>source files</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-sources-for-search-paths">sources for search paths</a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-special"><code>special</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-st_005fnlink"><code>st_nlink</code></a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ST_005fNLINK_005fTRICK"><code>ST_NLINK_TRICK</code></a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-stack-trace">stack trace</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-standalone-path-searching">standalone path searching</a></td><td class="printindex-index-section"><a href="#Invoking-kpsewhich">Invoking kpsewhich</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-standard-error-and-debugging-output">standard error and debugging output</a></td><td class="printindex-index-section"><a href="#Debugging">Debugging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-standard-options">standard options</a></td><td class="printindex-index-section"><a href="#Standard-options">Standard options</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-startup-time_002c-excessive">startup time, excessive</a></td><td class="printindex-index-section"><a href="#Slow-path-searching">Slow path searching</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-string-routines">string routines</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-strip"><code>strip</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-stripsupplier"><code>stripsupplier</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-striptypeface"><code>striptypeface</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-subdirectory-searching">subdirectory searching</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-suffixes_002c-filename">suffixes, filename</a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-suggestions_002c-making">suggestions, making</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Sun-2">Sun 2</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-supplier-directory_002c-omitting">supplier directory, omitting</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-supplier-directory_002c-omitting-1">supplier directory, omitting</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-supported-file-formats">supported file formats</a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-suppressing-warnings">suppressing warnings</a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-symbolic-links-not-found">symbolic links not found</a></td><td class="printindex-index-section"><a href="#Unable-to-find-files">Unable to find files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-symbolic-links_002c-and-ls_002dR">symbolic links, and <samp class="file">ls-R</samp></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-symlinks_002c-resolving">symlinks, resolving</a></td><td class="printindex-index-section"><a href="#Calling-sequence">Calling sequence</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-system-C-compiler-bugs">system C compiler bugs</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-system_002ddependent-casefolding-behavior">system-dependent casefolding behavior</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-T">T</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-T1FONTS"><code>T1FONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-T1INPUTS"><code>T1INPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-T42FONTS"><code>T42FONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tcfmgr_002emap"><code>tcfmgr.map</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TDS">TDS</a></td><td class="printindex-index-section"><a href="#TeX-directory-structure">TeX directory structure</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-directory-structure">TeX directory structure</a></td><td class="printindex-index-section"><a href="#TeX-directory-structure">TeX directory structure</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-environment-variables">TeX environment variables</a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-failures">TeX failures</a></td><td class="printindex-index-section"><a href="#TeX-or-Metafont-failing">TeX or Metafont failing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-file-lookup">TeX file lookup</a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-glyph-lookup">TeX glyph lookup</a></td><td class="printindex-index-section"><a href="#Glyph-lookup">Glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-support">TeX support</a></td><td class="printindex-index-section"><a href="#TeX-support">TeX support</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TeX-Users-Group">TeX Users Group</a></td><td class="printindex-index-section"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEX_005fHUSH"><code>TEX_HUSH</code></a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEX_005fHUSH-1"><code>TEX_HUSH</code></a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002dfile_002ec"><code>tex-file.c</code></a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002dfile_002eh"><code>tex-file.h</code></a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002dglyph_002ec"><code>tex-glyph.c</code></a></td><td class="printindex-index-section"><a href="#Glyph-lookup">Glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002dglyph_002eh"><code>tex-glyph.h</code></a></td><td class="printindex-index-section"><a href="#Programming-overview">Programming overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002dk_0040tug_002eorg"><code>tex-k@tug.org</code></a></td><td class="printindex-index-section"><a href="#Mailing-lists">Mailing lists</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002dk_0040tug_002eorg-_0028bug-address_0029"><code>tex-k@tug.org <span class="r">(bug address)</span></code></a></td><td class="printindex-index-section"><a href="#Reporting-bugs">Reporting bugs</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tex_002eweb"><code>tex.web</code></a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXBIB"><code>TEXBIB</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXBIB-1"><code>TEXBIB</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXCONFIG"><code>TEXCONFIG</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXDOCS"><code>TEXDOCS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXFONTMAPS"><code>TEXFONTMAPS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXFONTS"><code>TEXFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXFONTS-1"><code>TEXFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXFONTS-2"><code>TEXFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXFONTS-3"><code>TEXFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texfonts_002emap"><code>texfonts.map</code></a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXFORMATS"><code>TEXFORMATS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXINDEXSTYLE"><code>TEXINDEXSTYLE</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXINPUTS"><code>TEXINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXINPUTS-1"><code>TEXINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMF"><code>TEXMF</code></a></td><td class="printindex-index-section"><a href="#TeX-directory-structure">TeX directory structure</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmf_005fcasefold_005fsearch"><code>texmf_casefold_search</code></a></td><td class="printindex-index-section"><a href="#Casefolding-search">Casefolding search</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMF_005fOUTPUT_005fDIRECTORY_002c-and-missfont_002elog"><code>TEXMF_OUTPUT_DIRECTORY<span class="r">, and <samp class="file">missfont.log</samp></span></code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMF_005fOUTPUT_005fDIRECTORY_002c-and-paranoid-output-files"><code>TEXMF_OUTPUT_DIRECTORY<span class="r">, and paranoid output files</span></code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmf_002ecnf"><code>texmf.cnf</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmf_002ecnf-missing_002c-warning-about"><samp class="file">texmf.cnf</samp> missing, warning about</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmf_002ecnf_002c-and-variable-expansion"><code>texmf.cnf<span class="r">, and variable expansion</span></code></a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmf_002ecnf_002c-definition-for"><code>texmf.cnf<span class="r">, definition for</span></code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmf_002ecnf_002c-source-for-path"><code>texmf.cnf<span class="r">, source for path</span></code></a></td><td class="printindex-index-section"><a href="#Path-sources">Path sources</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFCNF"><code>TEXMFCNF</code></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFCNF-1"><code>TEXMFCNF</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFDBS"><code>TEXMFDBS</code></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFDBS-1"><code>TEXMFDBS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFINI"><code>TEXMFINI</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFINI-1"><code>TEXMFINI</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFINI-2"><code>TEXMFINI</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFLOG"><code>TEXMFLOG</code></a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFOUTPUT_002c-and-missfont_002elog"><code>TEXMFOUTPUT<span class="r">, and <samp class="file">missfont.log</samp></span></code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFOUTPUT_002c-and-paranoid-output-files"><code>TEXMFOUTPUT<span class="r">, and paranoid output files</span></code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFSCRIPTS"><code>TEXMFSCRIPTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFSYSVAR"><code>TEXMFSYSVAR</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-texmfvar"><code>texmfvar</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFVAR"><code>TEXMFVAR</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXMFVAR-1"><code>TEXMFVAR</code></a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXPICTS"><code>TEXPICTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXPKS"><code>TEXPKS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXPOOL"><code>TEXPOOL</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXPSHEADERS"><code>TEXPSHEADERS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXPSHEADERS-1"><code>TEXPSHEADERS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXSIZES"><code>TEXSIZES</code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TEXSOURCES"><code>TEXSOURCES</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TFMFONTS"><code>TFMFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tilde-expansion">tilde expansion</a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tilde_002ec"><code>tilde.c</code></a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-time-system-call"><code>time <span class="r">system call</span></code></a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tolerance-for-glyph-lookup">tolerance for glyph lookup</a></td><td class="printindex-index-section"><a href="#Basic-glyph-lookup">Basic glyph lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-trailing-_002f-in-home-directory">trailing &lsquo;<samp class="samp">/</samp>&rsquo; in home directory</a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-trailing-colons">trailing colons</a></td><td class="printindex-index-section"><a href="#Default-expansion">Default expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-translations_002c-of-path-searching-description">translations, of path searching description</a></td><td class="printindex-index-section"><a href="#Path-searching">Path searching</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TRFONTS"><code>TRFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-trick-for-detecting-leaf-directories">trick for detecting leaf directories</a></td><td class="printindex-index-section"><a href="#Subdirectory-expansion">Subdirectory expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-trojan-horse">trojan horse</a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-trojan-horse-attack">trojan horse attack</a></td><td class="printindex-index-section"><a href="#Security">Security</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-try_005fstd_005fextension_005ffirst"><code>try_std_extension_first</code></a></td><td class="printindex-index-section"><a href="#File-lookup">File lookup</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-TTFONTS"><code>TTFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-tug_002eorg"><code>tug.org</code></a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-typeface-directory_002c-omitting">typeface directory, omitting</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-typeface-directory_002c-omitting-1">typeface directory, omitting</a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-U">U</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unable-to-find-files">unable to find files</a></td><td class="printindex-index-section"><a href="#Unable-to-find-files">Unable to find files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unable-to-generate-fonts">unable to generate fonts</a></td><td class="printindex-index-section"><a href="#Unable-to-generate-fonts">Unable to generate fonts</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-uname"><code>uname</code></a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unixtex_002eftp"><code>unixtex.ftp</code></a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unknown-special-warnings">unknown special warnings</a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unreadable-file-warnings">unreadable file warnings</a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unreadable-files">unreadable files</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unrestricted-mode_002c-for-output-files">unrestricted mode, for output files</a></td><td class="printindex-index-section"><a href="#Safe-filenames">Safe filenames</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-unusable-ls_002dR-warning">unusable <samp class="file">ls-R</samp> warning</a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-usage-patterns_002c-finding">usage patterns, finding</a></td><td class="printindex-index-section"><a href="#Logging">Logging</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-USE_005fTEXMFVAR"><code>USE_TEXMFVAR</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-USE_005fVARTEXFONTS"><code>USE_VARTEXFONTS</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-USERPROFILE_002c-as-_007e-expansion"><code>USERPROFILE<span class="r">, as ~ expansion</span></code></a></td><td class="printindex-index-section"><a href="#Tilde-expansion">Tilde expansion</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-V">V</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-varfonts"><code>varfonts</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-variable-expansion">variable expansion</a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-variable_002ec"><code>variable.c</code></a></td><td class="printindex-index-section"><a href="#Variable-expansion">Variable expansion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-variable_002eh"><code>variable.h</code></a></td><td class="printindex-index-section"><a href="#Programming-with-config-files">Programming with config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-VARTEXFONTS"><code>VARTEXFONTS</code></a></td><td class="printindex-index-section"><a href="#mktex-configuration">mktex configuration</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-VAX-11_002f750">VAX 11/750</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-version-numbers_002c-determining">version numbers, determining</a></td><td class="printindex-index-section"><a href="#Bug-checklist">Bug checklist</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-VF-files_002c-not-found">VF files, not found</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-VFFONTS"><code>VFFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Vojta_002c-Paul">Vojta, Paul</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-W">W</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Walsh_002c-Norman">Walsh, Norman</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-warning-about-unusable-ls_002dR">warning about unusable <samp class="file">ls-R</samp></a></td><td class="printindex-index-section"><a href="#ls_002dR">ls-R</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-warning_002c-about-missing-texmf_002ecnf">warning, about missing <samp class="file">texmf.cnf</samp></a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-warnings_002c-file-access">warnings, file access</a></td><td class="printindex-index-section"><a href="#Searching-overview">Searching overview</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-warnings_002c-suppressing">warnings, suppressing</a></td><td class="printindex-index-section"><a href="#Suppressing-warnings">Suppressing warnings</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-WEB2C"><code>WEB2C</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Weber_002c-Olaf">Weber, Olaf</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-WEBINPUTS"><code>WEBINPUTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-whitespace_002c-in-fontmap-files">whitespace, in fontmap files</a></td><td class="printindex-index-section"><a href="#Fontmap">Fontmap</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-whitespace_002c-not-ignored-on-continuation-lines">whitespace, not ignored on continuation lines</a></td><td class="printindex-index-section"><a href="#Config-files">Config files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Windows-and-casefolding">Windows and casefolding</a></td><td class="printindex-index-section"><a href="#Casefolding-rationale">Casefolding rationale</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-www_002etug_002eorg"><code>www.tug.org</code></a></td><td class="printindex-index-section"><a href="#unixtex_002eftp">unixtex.ftp</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-X">X</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-XDvi"><code>XDvi</code></a></td><td class="printindex-index-section"><a href="#Specially_002drecognized-files">Specially-recognized files</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-XDVIFONTS"><code>XDVIFONTS</code></a></td><td class="printindex-index-section"><a href="#Supported-file-formats">Supported file formats</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-XDVIMAKEPK"><code>XDVIMAKEPK</code></a></td><td class="printindex-index-section"><a href="#mktex-script-names">mktex script names</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-XDVISIZES"><code>XDVISIZES</code></a></td><td class="printindex-index-section"><a href="#Fallback-font">Fallback font</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Index_cp_letter-Z">Z</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-zuhn_002c-david">zuhn, david</a></td><td class="printindex-index-section"><a href="#History">History</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
</table>
<table class="cp-letters-footer-printindex"><tr><th>Jump to: &nbsp; </th><td><a class="summary-letter-printindex" href="#Index_cp_symbol-1"><b>-</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-2"><b>;</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-3"><b>:</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-4"><b>!</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-5"><b>.</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-6"><b>{</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-7"><b>/</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-8"><b>\</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-9"><b>=</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-10"><b>~</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-11"><b>$</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-12"><b>2</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_symbol-13"><b>8</b></a>
 &nbsp; 
<br>
<a class="summary-letter-printindex" href="#Index_cp_letter-A"><b>A</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-B"><b>B</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-C"><b>C</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-D"><b>D</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-E"><b>E</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-F"><b>F</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-G"><b>G</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-H"><b>H</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-I"><b>I</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-K"><b>K</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-L"><b>L</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-M"><b>M</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-N"><b>N</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-O"><b>O</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-P"><b>P</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-Q"><b>Q</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-R"><b>R</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-S"><b>S</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-T"><b>T</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-U"><b>U</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-V"><b>V</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-W"><b>W</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-X"><b>X</b></a>
 &nbsp; 
<a class="summary-letter-printindex" href="#Index_cp_letter-Z"><b>Z</b></a>
 &nbsp; 
</td></tr></table>
</div>

</div>
</div>



</body>
</html>