summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/make-tex-work/html/ch05.html
blob: ac0558358d6fb3a7a11fe1ae1b60af91df896e58 (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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator"
    content="HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org" />
    <meta http-equiv="Content-Type"
    content="text/html; charset=ISO-8859-1" />

    <title>Chapter&#160;5.&#160;Fonts</title>
    <link rel="stylesheet" href="mtw.css" type="text/css" />
    <meta name="generator"
    content="DocBook XSL Stylesheets V1.53.0" />
    <link rel="home" href="index.html" title="Making TeX Work" />
    <link rel="up" href="pt02.html"
    title="Part&#160;II.&#160;Elements of a Complex Document" />
    <link rel="previous" href="pt02.html"
    title="Part&#160;II.&#160;Elements of a Complex Document" />
    <link rel="next" href="ch06.html"
    title="Chapter&#160;6.&#160;Pictures and Figures" />
  </head>

  <body>
    <div class="navheader">
      <table border="0" cellpadding="0" cellspacing="0"
      width="100%" summary="Navigation table">
        <tr>
          <td align="left">&#160;<a title="Making TeX Work"
          href="index.html"><img src="figures/nav-home.png"
          alt="Home" border="0" /></a>&#160;<a
          title="Part&#160;II.&#160;Elements of a Complex Document"
          href="pt02.html"><img src="figures/nav-prev.png"
          alt="Prev" border="0" /></a>&#160;<a
          title="Part&#160;II.&#160;Elements of a Complex Document"
          href="pt02.html"><img src="figures/nav-up.png" alt="Up"
          border="0" /></a>&#160;<a
          title="Chapter&#160;6.&#160;Pictures and Figures"
          href="ch06.html"><img src="figures/nav-next.png"
          alt="Next" border="0" /></a></td>

          <td align="right"><i>Making TeX Work</i> Version 1.0.1
          <span class="alpha-version">(<a
          href="co01.html"><em>Alpha</em></a>)</span></td>
        </tr>
      </table>
    </div>

    <div class="chapter">
      <div class="titlepage">
        <div>
          <h2 class="title"><a id="chap.fonts"
          name="chap.fonts"></a>Chapter&#160;5.&#160;Fonts</h2>
        </div>

        <div>
          <p class="releaseinfo">$Revision: 1.1 $</p>
        </div>

        <div>
          <p class="pubdate">$Date: 2002/08/23 14:31:13 $</p>
        </div>
        <hr class="component-separator" />
      </div>

      <p>All of the common TeX macro packages use the Computer
      Modern fonts<a id="id2855980" class="indexterm"
      name="id2855980"></a><a id="id2855984" class="indexterm"
      name="id2855984"></a><a id="id2855991" class="indexterm"
      name="id2855991"></a><a id="id2877438" class="indexterm"
      name="id2877438"></a> by default. In fact, the Computer
      Modern fonts are so frequently used in TeX documents that
      some people believe they are <span
      class="emphasis"><em>the</em></span> TeX fonts and that no
      other options are available.</p>

      <p>This is not the case. In fact, using different fonts in
      TeX is quite easy. However, many interrelated font issues can
      be quite complicated, and it is possible to do things that
      make your documents print incorrectly (or make them
      unprintable).</p>

      <p>This chapter explores all of the issues related to fonts
      and how these issues are resolved by a combination of font
      files, TeX macros, DVI drivers, and careful planning. At a
      high level, it works like this:</p>

      <div class="orderedlist">
        <ol type="1">
          <li>
            <p>TeX macros select a font (by assigning
            \font\fontid=fonttfm). The macros may be very simple or
            quite complex (as is the case in LaTeX's New Font
            Selection Scheme).</p>
          </li>

          <li>
            <p>TeX loads the metric information from
            <tt>fonttfm.tfm</tt><a id="id2879938" class="indexterm"
            name="id2879938"></a>. Many implementations of TeX look
            for this file in the directories on the
            <tt>TEXFONTS</tt> path. TeX cannot process your
            document if it cannot find the <tt>TFM</tt> file<a
            id="id2879967" class="indexterm"
            name="id2879967"></a>.<sup>[<a id="id2879974"
            name="id2879974"
            href="#ftn.id2879974">53</a>]</sup></p>
          </li>

          <li>
            <p>TeX writes a <tt>DVI</tt> file<a id="id2880010"
            class="indexterm" name="id2880010"></a>. The
            <tt>DVI</tt> file contains the name of each font (the
            name of the <tt>TFM</tt> file) and the magnification
            used (magnification is discussed in the section
            &#8220;<a href="ch05.html#sec.issueofsize"
            title="What TeX Needs To Know">the section called
            &#8220;What TeX Needs To Know&#8221;</a>&#8221; later
            in this chapter).</p>
          </li>

          <li>
            <p>The DVI driver attempts to locate font files for
            each font used at each magnification. Depending on the
            DVI driver, fonts can come from many places. Many
            drivers consult a list of built-in fonts to see if the
            desired font resides in the printer. Some also consult
            a list of font substitutions. (This can be used to
            substitute existing fonts for fonts that you do not
            have, like Computer Modern Roman in place of Times
            Roman if you don't have Times Roman.)</p>

            <p>Assuming that the font is not built-in<a
            id="id2880077" class="indexterm" name="id2880077"></a>
            or replaced by substitution of a built-in font, the DVI
            driver looks for a font file. Most modern DVI drivers
            look for <tt>PK</tt> fonts, although some also look for
            <tt>GF</tt><a id="id2880109" class="indexterm"
            name="id2880109"></a> and <tt>PXL</tt> fonts<a
            id="id2880130" class="indexterm" name="id2880130"></a>
            as well.</p>

            <p>The exact location of these files varies. Some
            implementations look in the directories on the
            <tt>TEXFONTS</tt> path, others look in the
            <tt>TEXPKS</tt> or <tt>PKFONTS</tt> paths.</p>

            <p>A typical font directory on a unix system is
            <tt>/usr/local/lib/tex/fonts/pk</tt>. The files in this
            directory typically have names of the form
            <tt>tfmname.999pk</tt>; where <span
            class="emphasis"><em>tfmname</em></span> is the name of
            the font and <span class="emphasis"><em>999</em></span>
            is the resolution.</p>

            <p>On file systems which have short filenames (for
            example, MS-DOS) a typical font directory is <tt>\bs
            tex\bs fonts\bs 999dpi</tt> (or <tt>\bs tex\bs fonts\bs
            dpi999</tt>).<sup>[<a id="id2880211" name="id2880211"
            href="#ftn.id2880211">54</a>]</sup> The files are then
            simply <tt>tfmname.pk</tt>.</p>

            <p>Some DVI drivers employ automatic font generation to
            attempt to create the font if it cannot be found.</p>
          </li>

          <li>
            <p>The DVI driver produces output suitable for a
            particular device. This may include one or more forms
            of downloaded fonts as well as requests for built-in
            fonts that are assumed to exist.</p>
          </li>
        </ol>
      </div>

      <div class="note"
      style="margin-left: 0.5in; margin-right: 0.5in;">
        <h3 class="title">Note</h3>

        <p>TeX output isn't printable directly. TeX typesets a
        document in a device-independent fashion; it's the DVI
        driver that actually <span
        class="emphasis"><em>prints</em></span> the document. This
        is important because many of the font issues are really DVI
        driver issues more than TeX issues, and because the
        distinction between TeXing a document and printing a
        document is another layer of complexity that can be a
        source of difficulty.,</p>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a
            id="sec.issueofsize" name="sec.issueofsize"></a>What
            TeX Needs To Know</h2>
          </div>
        </div>

        <p>TeX needs remarkably little information about a font.
        Recall from Chapter&#160;<a href="ch01.html"
        title="Chapter&#160;1.&#160;The Big Picture">Chapter&#160;1</a>,
        <span class="emphasis"><em><a href="ch01.html"
        title="Chapter&#160;1.&#160;The Big Picture">Chapter&#160;1</a></em></span>,
        that TeX typesets each page using &#8220;boxes<a
        id="id2880323" class="indexterm" name="id2880323"></a> and
        glue<a id="id2880331" class="indexterm"
        name="id2880331"></a>.&#8221; In order to perform this
        function, TeX needs to know only the size of each character
        (its width, height, and depth)<a id="id2880343"
        class="indexterm" name="id2880343"></a><a id="id2880353"
        class="indexterm" name="id2880353"></a><a id="id2880362"
        class="indexterm" name="id2880362"></a><a id="id2880372"
        class="indexterm" name="id2880372"></a><a id="id2880382"
        class="indexterm" name="id2880382"></a><a id="id2880389"
        class="indexterm" name="id2880389"></a><a id="id2880397"
        class="indexterm" name="id2880397"></a>. In practice, TeX
        fonts contain a little bit more information than simply the
        size of each character. Generally, they contain ligature
        and kerning information as well.</p>

        <p><span class="emphasis"><em>Ligatures</em></span><a
        id="id2880416" class="indexterm" name="id2880416"></a> are
        a typographic convention for replacing some letter
        combinations with single symbols. In English, this is done
        solely to improve the appearance of the letter
        combinations. Figure&#160;<a href="ch05.html#fig.filig"
        title="Figure&#160;5.1.&#160;fi as two characters and as a ligature">
        Figure&#160;5.1</a> shows a common ligature in English,
        &#8220;fi.&#8221; Other common ligatures in English are
        &#8220;ff&#8221;, &#8220;fl&#8221;, and the combinations
        &#8220;ffi&#8221; and &#8220;ffl.&#8221; Other languages
        have different ligatures.</p>

        <div class="figure">
          <a id="fig.filig" name="fig.filig"></a>

          <p class="title">
          <b>Figure&#160;5.1.&#160;&#8220;fi&#8221; as two
          characters and as a ligature</b></p>

          <div class="mediaobject">
            <img src="fi-ligs.eps" />
          </div>
        </div>

        <p><span class="emphasis"><em>Kerning</em></span><a
        id="id2880500" class="indexterm" name="id2880500"></a> is
        the process of adding or removing small amounts of space
        between characters to improve the appearance of particular
        letter combinations. Although every character has a natural
        width, some combinations of characters give the illusion of
        too much or too little space. Figure&#160;<a
        href="ch05.html#fig.kerning"
        title="Figure&#160;5.2.&#160;We unkerned and kerned">Figure&#160;5.2</a>
        shows a common example in the word &#8220;We.&#8221;</p>

        <div class="figure">
          <a id="fig.kerning" name="fig.kerning"></a>

          <p class="title">
          <b>Figure&#160;5.2.&#160;&#8220;We&#8221; unkerned and
          kerned</b></p>

          <div class="mediaobject">
            <img src="we-we.eps" />
          </div>
        </div>

        <p>This is all the information that TeX needs, and it is
        all that is contained in the <tt>TFM</tt> files that TeX
        uses.<sup>[<a id="id2880575" name="id2880575"
        href="#ftn.id2880575">55</a>]</sup></p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2880659"
              name="id2880659"></a>Selecting a Font in TeX</h3>
            </div>
          </div>

          <p>TeX's macro language includes a \font primitive for
          loading a font<a id="id2880668" class="indexterm"
          name="id2880668"></a><a id="id2880678" class="indexterm"
          name="id2880678"></a><a id="id2880691" class="indexterm"
          name="id2880691"></a>. This primitive operation
          associates a control sequence<a id="id2880701"
          class="indexterm" name="id2880701"></a> with the metrics
          in a particular <tt>TFM</tt> file. For example, the
          following line associates the control sequence \tinyfont
          with the metrics in <tt>cmr5.tfm</tt> (the Computer
          Modern Roman 5pt font):</p>
<pre class="screen">
\font\tinyfont=cmr5
</pre>

          <div class="note"
          style="margin-left: 0.5in; margin-right: 0.5in;">
            <h3 class="title">Note</h3>

            <p>Remember, only letters can appear in a TeX control
            sequence. You cannot say \font\cmr5=cmr5 because \cmr5
            is not a valid control sequence.</p>
          </div>

          <p>The control sequence defined with \font can
          subsequently be used to change the current font. After
          the above command, \tinyfont in your document selects the
          Computer Modern Roman 5pt font as the current font.</p>

          <p>In practice, using the primitive operations to select
          fonts has a number of disadvantages. Later in this
          chapter, the worst of these disadvantages is described
          and a better alternative is offered. For simplicity, the
          primitive operations are used in most of the examples in
          this chapter.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2880773"
              name="id2880773"></a>Which Character Is Which?</h3>
            </div>
          </div>

          <p>How does TeX know which character<a id="id2880782"
          class="indexterm" name="id2880782"></a> to use when it
          reads a symbol from an input file? The answer is simple:
          TeX considers each font to be an array of characters. It
          uses the numeric ASCII<a id="id2880794" class="indexterm"
          name="id2880794"></a> code of each character to determine
          what element in the array to use.<sup>[<a id="id2880810"
          name="id2880810" href="#ftn.id2880810">56</a>]</sup> This
          is a reasonable and efficient scheme as long as the ASCII
          values of the characters in your input file are the same
          as the metric information that TeX is using.</p>

          <p>The section called &#8220;<a
          href="ch05.html#sec.fonts.encodingvec"
          title="Declaring a family">the section called
          &#8220;Declaring a family&#8221;</a>&#8221; in this
          chapter describes how the ordering of characters in a
          font is determined. It also discusses some of the
          problems that can arise when TeX and your printer have
          conflicting information about the arrangement of
          characters in the font. The &#8220;<a
          href="ch05.html#sec.fonts.virtualfonts"
          title="Virtual Fonts">the section called &#8220;Virtual
          Fonts&#8221;</a>&#8221; section describes the TeX
          mechanism for constructing fonts with different
          arrangements of characters.</p>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2880909"
            name="id2880909"></a>The Issue of Size</h2>
          </div>
        </div>

        <p>In the purest sense, selecting a font determines only
        what shape<a id="id2880917" class="indexterm"
        name="id2880917"></a><a id="id2880921" class="indexterm"
        name="id2880921"></a> each character will have; it does not
        determine the size<a id="id2880932" class="indexterm"
        name="id2880932"></a><a id="id2880939" class="indexterm"
        name="id2880939"></a> of the font. Unfortunately in
        practice, the issue of shape and size cannot be separated.
        The same shapes <span
        class="emphasis"><em>appear</em></span> to be different at
        different sizes. <span class="emphasis"><em>Optical
        scaling</em></span><a id="id2880960" class="indexterm"
        name="id2880960"></a><a id="id2880967" class="indexterm"
        name="id2880967"></a> uses different designs to make
        letters at different sizes appear to have the same shape.
        Conversly, linear scaling<a id="id2880980"
        class="indexterm" name="id2880980"></a><a id="id2880987"
        class="indexterm" name="id2880987"></a> produces characters
        with exactly the same shape at different sizes, although
        they appear slightly different.</p>

        <p>Because the size of an object affects the way that the
        human eye and the brain perceive its shape, a simple linear
        scaling of each character does not produce the most
        aesthetically pleasing results. To overcome this problem,
        TeX uses two different quantities to express the notion of
        size: design size and magnification.</p>

        <p><span class="emphasis"><em>Design size</em></span><a
        id="id2881047" class="indexterm" name="id2881047"></a>
        addresses the issue of perception: a font looks most like
        the way it was designed to appear when printed at or close
        to its design size. Furthermore, two fonts with different
        design sizes (say 8pt and 12pt) that are the same typeface
        should <span class="emphasis"><em>appear</em></span>
        identical when printed at 8pt and 12pt, respectively, even
        though the actual shapes may be slightly different. The
        design size of a font is intrinsic to the font itself and
        cannot be changed or influenced by TeX. It is important
        because it has a direct impact on the aesthetics of the
        typeset page.</p>

        <p><span class="emphasis"><em>Magnification</em></span><a
        id="id2881075" class="indexterm" name="id2881075"></a>
        addresses the notion of linear scaling. Changing
        magnifications changes the size of each character without
        altering its actual shape. Although, as noted above,
        changing its size may change its <span
        class="emphasis"><em>apparent</em></span> shape. In
        general, you should print fonts as close to their design
        size as possible---in other words, with a magnifcation as
        close to 1.0 as possible. Figure&#160;<a
        href="ch05.html#fig.Rs"
        title="Figure&#160;5.3.&#160;The Computer Modern Roman letter R at 150pt: (a) from a 5pt design; (b) from a 17pt design">
        Figure&#160;5.3</a> demonstrates how different characters
        may look when printed at very large magnifications.</p>

        <div class="figure">
          <a id="fig.Rs" name="fig.Rs"></a>

          <p class="title"><b>Figure&#160;5.3.&#160;The Computer
          Modern Roman letter &#8220;R&#8221; at 150pt: (a) from a
          5pt design; (b) from a 17pt design</b></p>

          <div class="mediaobject">
            <img src="two-rs.eps" />
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="sec.gettingtfms"
              name="sec.gettingtfms"></a>Expressing Design Size in
              TeX</h3>
            </div>
          </div>

          <p>The design size<a id="id2881175" class="indexterm"
          name="id2881175"></a> of a font is an integral part of
          the <tt>TFM</tt> file (because it is intrinsic to the
          font that the <tt>TFM</tt> file<a id="id2881207"
          class="indexterm" name="id2881207"></a> describes). In
          order to select a different design size, you must select
          a different <tt>TFM</tt> file. For example, the Computer
          Modern Roman font is usually distributed at eight design
          sizes: 5, 6, 7, 8, 9, 10, 12, and 17 points. Metrics for
          these sizes are stored in the <tt>TFM</tt> files
          <tt>cmr5.tfm</tt>, <tt>cmr6.tfm</tt>, <tt>cmr7.tfm</tt>,
          $&#8230;$, and <tt>cmr17.tfm</tt>.</p>

          <p>Every font that you select has a specific design size,
          even though you may elect to use the font at another
          size.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2881284"
              name="id2881284"></a>Expressing Magnification in
              TeX</h3>
            </div>
          </div>

          <p>Magnification<a id="id2881294" class="indexterm"
          name="id2881294"></a> can be expressed either implicitly
          or explicitly in TeX. Implicitly, magnification can be
          expressed by selecting a particular font <tt>at</tt> a
          particular size. For example, the following line defines
          the control sequence \big to be the Computer Modern Roman
          10pt font <tt>at</tt> a size of 12pt (an implicit
          magnification of 120\%):</p>
<pre class="screen">
\font\big=cmr10 at 12pt
</pre>

          <p>Explicit magnification is selected by requesting a
          font <tt>scaled</tt> to a particular extent. For example,
          the following line defines the control sequence \bigger
          to be the Computer Modern Roman 10pt font at a
          magnification of 144\% (in other words, at 14.4pt):</p>
<pre class="screen">
\font\bigger=cmr10 scaled 1440
</pre>

          <p>As you can see, TeX expects the <tt>scaled</tt>
          magnification to be ten times the percentage of
          magnification. The magnification that you request must be
          an integer (you can't say <tt>scaled 1440.4</tt>).
          Multiplying the magnification by 10 allows TeX to accept
          fractional percentages like 104.5\%.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2881380"
              name="id2881380"></a>Standard Magnifications</h3>
            </div>
          </div>

          <p>TeX provides seven standard magnifications. There are
          several good reasons to use these magnifications whenever
          possible. The most important is that most TeX systems can
          easily print fonts at these sizes. As described later in
          the section &#8220;<a href="ch08.html#sec.printing"
          title="Printing Fonts">the section called &#8220;Printing
          Fonts&#8221;</a>,&#8221; TeX's ability to select any font
          at any magnification does not guarantee that it can be
          printed at that size. By using standard sizes, you
          increase the likelihood that your document will be
          printable on your system and on other TeX systems (if
          portability is an issue). Using standard sizes will also
          give consistency to your documents. If you write many
          documents separately that may eventually be collected
          together (as a collection of short stories or a series of
          technical reports, for example), the internal consistency
          of sizes will make them appear more uniform. Finally, the
          standard sizes have aesthetic characteristics as well.
          Each size is 1.2 times the preceding size. The geometric
          relationship between the sizes is designed to make them
          appear pleasing when mixed together.</p>

          <p>The standard sizes can be selected with the \magstep
          control sequence. The standard sizes (or steps) are
          called <span class="emphasis"><em>magsteps</em></span> in
          TeX jargon. The natural size of a font is its \magstep0
          size. The \magstep1 size is 20\% larger. And \magstep2 is
          20\% larger than that (44\% larger than the original
          design), etc. To select the Computer Modern Roman 10pt
          font at its next largest standard size, use:</p>
<pre class="screen">
\font\larger=cmr10 scaled\magstep1
</pre>

          <p>For those occasions when you want a font that is only
          a little bit larger, TeX includes the control sequence
          \magstephalf which is halfway between \magstep0 and
          \magstep1.</p>

          <p>Most TeX formats that are based upon Plain TeX define
          seven magsteps: \magstep0, \magstephalf, and \magstep1
          through \magstep5.</p>

          <p>By using different design sizes and different standard
          magnifications, you gain access to a very wide range of
          sizes. For example, given the seven standard design sizes
          and seven standard magsteps, it is possible to print
          Computer Modern Roman at any of the following sizes (all
          sizes are in points):</p>

          <table class="simplelist" border="0"
          summary="Simple list">
            <tr>
              <td>5</td>

              <td>7.67</td>

              <td>9.6</td>

              <td>10.95</td>

              <td>13.15</td>

              <td>16.59</td>

              <td>19.91</td>

              <td>29.38</td>
            </tr>

            <tr>
              <td>5.48</td>

              <td>8</td>

              <td>9.86</td>

              <td>11.52</td>

              <td>13.82</td>

              <td>17</td>

              <td>20.4</td>

              <td>29.86</td>
            </tr>

            <tr>
              <td>6</td>

              <td>8.4</td>

              <td>10</td>

              <td>12</td>

              <td>14.4</td>

              <td>17.28</td>

              <td>20.74</td>

              <td>35.25</td>
            </tr>

            <tr>
              <td>6.57</td>

              <td>8.64</td>

              <td>10.08</td>

              <td>12.1</td>

              <td>14.52</td>

              <td>17.42</td>

              <td>22.39</td>

              <td>42.3</td>
            </tr>

            <tr>
              <td>7</td>

              <td>8.76</td>

              <td>10.37</td>

              <td>12.44</td>

              <td>14.93</td>

              <td>18.62</td>

              <td>24.48</td>

              <td>7.2</td>
            </tr>

            <tr>
              <td>9</td>

              <td>10.8</td>

              <td>12.96</td>

              <td>15.55</td>

              <td>18.66</td>

              <td>24.88</td>

              <td>&#160;</td>

              <td>&#160;</td>
            </tr>
          </table>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2881671"
              name="id2881671"></a>Where Do TFM Files Come
              From?</h3>
            </div>
          </div>

          <p>In order to use <span
          class="emphasis"><em>any</em></span> font in TeX, you
          must have a <tt>TFM</tt> file for it. How you can acquire
          <tt>TFM</tt> files<a id="id2881705" class="indexterm"
          name="id2881705"></a> for the fonts you use depends on
          the kinds of fonts and where they were developed. The
          following list offers suggestions for the most commonly
          used fonts:</p>

          <div class="variablelist">
            <dl>
              <dt><span class="term">PostScript fonts</span></dt>

              <dd>
                <p>Every vendor that supplies PostScript fonts<a
                id="id2881738" class="indexterm"
                name="id2881738"></a><a id="id2881748"
                class="indexterm" name="id2881748"></a> (either as
                font files or built-in to a printer or cartridge)
                should also supply Adobe Font Metric (<tt>AFM</tt>)
                files. <tt>AFM</tt> files provide complete metric
                information about the fonts.<sup>[<a id="id2881782"
                name="id2881782"
                href="#ftn.id2881782">57</a>]</sup> The
                <tt>AFM</tt> files can be converted into
                <tt>TFM</tt> files with the <b>afm2tfm</b> utility
                distributed with <b>dvips</b>.</p>
              </dd>

              <dt><span class="term">LaserJet built-in
              fonts</span></dt>

              <dd>
                <p>The complete metric information for LaserJet
                built-in fonts<a id="id2881868" class="indexterm"
                name="id2881868"></a> is supplied by
                Hewlett-Packard in &#8220;Tagged Font Metric&#8221;
                files. These are available directly from
                Hewlett-Packard (unfortunately, they are not
                distributed with the printers). The Tagged Font
                Metrics can be converted into TeX <tt>TFM</tt>
                files with <b>hptfm2pl</b>, a free utility written
                by, well, me, actually.</p>

                <p>A collection of <tt>TFM</tt> files for the
                standard built-in fonts on the LaserJet III and IV
                printers is available in the CTAN archives in
                <tt>/tex-archive/fonts/ljmetrics</tt>.</p>
              </dd>

              <dt><span class="term">LaserJet softfonts</span></dt>

              <dd>
                <p>Bitmapped LaserJet softfonts<a id="id2881950"
                class="indexterm" name="id2881950"></a> can be
                converted into TeX fonts with the <b>SFPtoPK</b><a
                id="id2881968" class="indexterm"
                name="id2881968"></a> utility. The resulting font
                includes both TeX <tt>PK</tt> and <tt>TFM</tt>
                files.</p>

                <p>Scalable LaserJet softfonts should be
                distributed with Hewlett-Packard Tagged Font Metric
                files. These can be converted into TeX <tt>TFM</tt>
                files with the free utility <b>hptfm2pl</b><a
                id="id2882018" class="indexterm"
                name="id2882018"></a>.</p>
              </dd>

              <dt><span class="term">TeX fonts
              (<span>MetaFont</span>)</span></dt>

              <dd>
                <p>The MetaFont<a id="id2882052" class="indexterm"
                name="id2882052"></a> program renders TeX
                <tt>MF</tt> files<a id="id2882076"
                class="indexterm" name="id2882076"></a> and
                produces a <tt>TFM</tt> file. Usually it produces a
                <tt>GF</tt> file<a id="id2882115" class="indexterm"
                name="id2882115"></a> as well, but the special mode
                <span class="emphasis"><em>tfmonly</em></span> can
                be used to create just the <tt>TFM</tt>
                file.<sup>[<a id="id2882138" name="id2882138"
                href="#ftn.id2882138">58</a>]</sup> MetaFont modes
                and other aspects of font creation with MetaFont
                are described in Chapter&#160;<a href="ch11.html"
                title="Chapter&#160;11.&#160;Introducing MetaFont">Chapter&#160;11</a>,
                <span class="emphasis"><em><a href="ch11.html"
                title="Chapter&#160;11.&#160;Introducing MetaFont">Chapter&#160;11</a></em></span>.</p>
              </dd>

              <dt><span class="term">TrueType fonts</span></dt>

              <dd>
                <p>Incomplete metrics are frequently<a
                id="id2882219" class="indexterm"
                name="id2882219"></a> distributed in the form of
                Windows' <tt>PFM</tt> files<a id="id2882240"
                class="indexterm" name="id2882240"></a>. Some
                commercial previewers for Windows can extract
                metric information and build a <tt>TFM</tt> file.
                However, at present, I do not know of any free
                utilities which can build TeX metrics from TrueType
                fonts.</p>
              </dd>
            </dl>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="sec.nfss2"
            name="sec.nfss2"></a>The New Font Selection Scheme</h2>
          </div>
        </div>

        <p>The New Font Selection Scheme<a id="id2882292"
        class="indexterm" name="id2882292"></a> is a method for
        selecting fonts in Plain TeX and LaTeX. It was introduced
        briefly in the section &#8220;<a
        href="ch04.html#macpack.sec.latexvslatexe"
        title="Installation: Making Format Files">the section
        called &#8220;Installation: Making Format
        Files&#8221;</a>&#8221; of Chapter&#160;<a href="ch04.html"
        title="Chapter&#160;4.&#160;Macro Packages">Chapter&#160;4</a>,
        <span class="emphasis"><em><a href="ch04.html"
        title="Chapter&#160;4.&#160;Macro Packages">Chapter&#160;4</a></em></span>.
        This section describes release two of the New Font
        Selection Scheme (known as the NFSS2)<a id="id2882340"
        class="indexterm" name="id2882340"></a> as it exists in the
        LaTeX2e format. Because version one<a id="id2882349"
        class="indexterm" name="id2882349"></a> is now obsolete, it
        is not described.</p>

        <p>The NFSS defines a method of font selection used in
        place of TeX's primitive \font command. The problem with
        font selection using \font is that it ties a control
        sequence to a particular font at a particular size, which
        has unpleasant consequences when more than one font is used
        in a document. Consider the definition \font\it=cmti10.
        This associates the control sequence \it with the italic
        Computer Modern font (at 10pt). After this definition, a
        sentence like:</p>
<pre class="screen">
This requires <span class="emphasis"><em>emphasis</em></span>.
</pre>

        <p>has the desired result, if Computer Modern Roman at 10pt
        is the font in use when \it is encountered:</p>
<pre class="screen">
\fontfamily{cmr}\selectfont
This requires <span class="emphasis"><em>emphasis</em></span>.
</pre>

        <p>If you are using some other font, perhaps in a chapter
        heading, you get:</p>
<pre class="screen">
\fontfamily{cmr}\fontseries{bx}\fontsize{14}{16pt}\selectfont
This requires {\fontfamily{cmr}\fontseries{m}\fontsize{10}{12pt}\selectfont
\it emphasis}.
</pre>

        <p>This is almost certainly not what you wanted. The NFSS
        overcomes this difficulty by describing each font with five
        independent parameters: encoding, family, series, shape,
        and size.</p>

        <div class="variablelist">
          <dl>
            <dt><span class="term">Font encoding</span></dt>

            <dd>
              <p>The encoding<a id="id2882449" class="indexterm"
              name="id2882449"></a> parameter identifies the
              encoding vector of the font. Encoding vectors play an
              important role in the selection of characters in a
              font. Encoding vectors are described more thoroughly
              later in this chapter. TeX Text, TeX Math Italic, and
              Adobe Standard are all <span
              class="emphasis"><em>encoding vectors</em></span><a
              id="id2882461" class="indexterm"
              name="id2882461"></a>.</p>
            </dd>

            <dt><span class="term">Font family</span></dt>

            <dd>
              <p>The family parameter describes the typeface of the
              font<a id="id2882492" class="indexterm"
              name="id2882492"></a>. Computer Modern, Times Roman,
              Helvetica, Galliard, and Gill Sans are all <span
              class="emphasis"><em>families</em></span>.</p>
            </dd>

            <dt><span class="term">Font series</span></dt>

            <dd>
              <p>Font series<a id="id2882523" class="indexterm"
              name="id2882523"></a> describes the joint notions of
              weight and width. Weight<a id="id2882533"
              class="indexterm" name="id2882533"></a> is a measure
              of how darkly each character is printed, and width<a
              id="id2882543" class="indexterm"
              name="id2882543"></a> is a measure of how wide or
              narrow the font is. Standard abbreviations for weight
              and width are shown in Table&#160;<a
              href="ch05.html#tab.fontshapeww"
              title="Table&#160;5.1.&#160;Standard Weight and Width Designations ">
              Table&#160;5.1</a>. Normal, bold-compressed,
              extrabold-ultraexpanded, and light-medium are all
              examples of font <span
              class="emphasis"><em>series</em></span>.</p>

              <div class="table">
                <a id="tab.fontshapeww" name="tab.fontshapeww"></a>

                <p class="title"><b>Table&#160;5.1.&#160;Standard
                Weight and Width Designations</b></p>

                <table
                summary="Standard Weight and Width Designations "
                border="1">
                  <colgroup>
                    <col align="left" />
                    <col align="left" />
                    <col align="left" />
                    <col align="left" />
                    <col align="left" />
                  </colgroup>

                  <thead>
                    <tr>
                      <th align="left">\rm\bf Abbr</th>

                      <th align="left">\bf Weight</th>

                      <th align="left">\rm\bf Abbr</th>

                      <th align="left">\bf Width</th>

                      <td class="auto-generated">&#160;</td>
                    </tr>
                  </thead>

                  <tbody>
                    <tr>
                      <td align="left">ul</td>

                      <td align="left">Ultra-light</td>

                      <td align="left">uc</td>

                      <td align="left">Ultra-condensed</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">el</td>

                      <td align="left">Extra-light</td>

                      <td align="left">ec</td>

                      <td align="left">Extra-condensed</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">l</td>

                      <td align="left">Light</td>

                      <td align="left">c</td>

                      <td align="left">Condensed</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">sl</td>

                      <td align="left">Semi-light</td>

                      <td align="left">sc</td>

                      <td align="left">Semi-condensed</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">m</td>

                      <td align="left">Medium (normal)</td>

                      <td align="left">m</td>

                      <td align="left">Medium</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">sb</td>

                      <td align="left">Semi-bold</td>

                      <td align="left">sx</td>

                      <td align="left">Semi-expanded</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">b</td>

                      <td align="left">Bold</td>

                      <td align="left">x</td>

                      <td align="left">Expanded</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">eb</td>

                      <td align="left">Extra-bold</td>

                      <td align="left">ex</td>

                      <td align="left">Extra-expanded</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>

                    <tr>
                      <td align="left">ub</td>

                      <td align="left">Ultra-bold</td>

                      <td align="left">ux</td>

                      <td align="left">Ultra-expanded</td>

                      <td class="auto-generated">&#160;</td>
                    </tr>
                  </tbody>
                </table>
              </div>

              <p>The general rule for combining weight and width to
              form a series abbreviation is to use the abbreviation
              for weight followed by the abbreviation for width,
              unless one is &#8220;medium,&#8221; in which case it
              is left out. Table&#160;<a
              href="ch05.html#tab.fontshapeex"
              title="Table&#160;5.2.&#160;Weight and Width Are Combined to Form Series ">
              Table&#160;5.2</a> shows how several weight/width
              combinations are used to form the series. The series
              designation for a light-medium font demonstrates that
              a single medium attribute is omitted. If both the
              width and weight are medium, use a single
              &#8220;m&#8221; for the series.</p>

              <div class="table">
                <a id="tab.fontshapeex" name="tab.fontshapeex"></a>

                <p class="title"><b>Table&#160;5.2.&#160;Weight and
                Width Are Combined to Form Series</b></p>

                <table
                summary="Weight and Width Are Combined to Form Series "
                 border="1">
                  <colgroup>
                    <col align="left" />
                    <col align="left" />
                  </colgroup>

                  <thead>
                    <tr>
                      <th align="left">\bf Weight and Width</th>

                      <th align="left">\bf Series</th>
                    </tr>
                  </thead>

                  <tbody>
                    <tr>
                      <td align="left">Bold extended</td>

                      <td align="left">bx</td>
                    </tr>

                    <tr>
                      <td align="left">Light medium</td>

                      <td align="left">l</td>
                    </tr>

                    <tr>
                      <td align="left">Medium extra-expanded</td>

                      <td align="left">ex</td>
                    </tr>

                    <tr>
                      <td align="left">Light extra-expanded</td>

                      <td align="left">lex</td>
                    </tr>

                    <tr>
                      <td align="left">Normal (medium, medium)</td>

                      <td align="left">m</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </dd>

            <dt><span class="term">Font shape</span></dt>

            <dd>
              <p>The shape<a id="id2883001" class="indexterm"
              name="id2883001"></a>, in conjunction with series,
              defines the appearance of the font. Shape generally
              refers to the style of the face. Bold, italic,
              slanted, and outline are all examples of font
              shape.</p>

              <p>The standard designations of font shape are shown
              in Table&#160;<a href="ch05.html#tab.fontshapeshape"
              title="Table&#160;5.3.&#160;Standard Abbreviations of Font Shape">
              Table&#160;5.3</a>.</p>

              <div class="table">
                <a id="tab.fontshapeshape"
                name="tab.fontshapeshape"></a>

                <p class="title"><b>Table&#160;5.3.&#160;Standard
                Abbreviations of Font Shape</b></p>

                <table
                summary="Standard Abbreviations of Font Shape"
                border="1">
                  <colgroup>
                    <col align="left" />
                    <col align="left" />
                  </colgroup>

                  <thead>
                    <tr>
                      <th align="left">\rm\bf Abbr.</th>

                      <th align="left">\bf Shape</th>
                    </tr>
                  </thead>

                  <tbody>
                    <tr>
                      <td align="left">n</td>

                      <td align="left">Normal</td>
                    </tr>

                    <tr>
                      <td align="left">it</td>

                      <td align="left">Italic</td>
                    </tr>

                    <tr>
                      <td align="left">sl</td>

                      <td align="left">Slanted</td>
                    </tr>

                    <tr>
                      <td align="left">sc</td>

                      <td align="left">Small caps</td>
                    </tr>

                    <tr>
                      <td align="left">u</td>

                      <td align="left">Upright italics</td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </dd>

            <dt><span class="term">Font size</span></dt>

            <dd>
              <p>Font size<a id="id2883162" class="indexterm"
              name="id2883162"></a> defines both the size of the
              characters and the spacing between lines of text in
              that size. The distinction between design size and
              magnification, discussed at length in the first part
              of this chapter, is hidden within the NFSS; you need
              only select the size you want.<sup>[<a id="id2883176"
              name="id2883176"
              href="#ftn.id2883176">59</a>]</sup></p>

              <p>The spacing between lines of text is described as
              the (vertical) distance between the baselines of two
              consecutive lines of type. It is usually about 20\%
              larger than the size of the font. For example, a 10pt
              font is usually printed with 12pts between the
              baselines of consecutive lines. The inter-line
              distance that looks best depends on the font and
              other design elements of the document. There really
              isn't a good rule for the value that looks best,
              which is why you have to specify it.</p>
            </dd>
          </dl>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="sec.fonts.defnfss2"
              name="sec.fonts.defnfss2"></a>Selecting Fonts with
              the New Font Selection Scheme</h3>
            </div>
          </div>

          <p>One of the most visible differences in the NFSS2 is
          that you are encouraged to change the way you select<a
          id="id2883229" class="indexterm" name="id2883229"></a>
          fonts. The NFSS2 defines nine control sequences<a
          id="id2883241" class="indexterm" name="id2883241"></a>
          for user-level font selection. They are shown in
          Table&#160;<a href="ch05.html#tab.nfss2.userlevel"
          title="Table&#160;5.4.&#160;User-level Font Selection Control Sequences in NFSS2 ">
          Table&#160;5.4</a>.</p>

          <div class="table">
            <a id="tab.nfss2.userlevel"
            name="tab.nfss2.userlevel"></a>

            <p class="title"><b>Table&#160;5.4.&#160;User-level
            Font Selection Control Sequences in NFSS2</b></p>

            <table
            summary="User-level Font Selection Control Sequences in NFSS2 "
             border="1">
              <colgroup>
                <col align="left" />
                <col align="left" />
              </colgroup>

              <thead>
                <tr>
                  <th align="left">\bf Control Sequence</th>

                  <th align="left">\bf Resulting Change</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td align="left">\textrm\verb|{}|</td>

                  <td align="left">Switch to roman family</td>
                </tr>

                <tr>
                  <td align="left">\textsf\verb|{}|</td>

                  <td align="left">Switch to sans-serif family</td>
                </tr>

                <tr>
                  <td align="left">\texttt\verb|{}|</td>

                  <td align="left">Switch to typewriter family</td>
                </tr>

                <tr>
                  <td align="left">\textbf\verb|{}|</td>

                  <td align="left">Switch to bold face
                  weight/width</td>
                </tr>

                <tr>
                  <td align="left">\textmedium\verb|{}|</td>

                  <td align="left">Switch to medium
                  weight/width</td>
                </tr>

                <tr>
                  <td align="left">\textit\verb|{}|</td>

                  <td align="left">Switch to italic shape</td>
                </tr>

                <tr>
                  <td align="left">\textsl\verb|{}|</td>

                  <td align="left">Switch to slanted shape</td>
                </tr>

                <tr>
                  <td align="left">\textsc\verb|{}|</td>

                  <td align="left">Switch to small-caps shape</td>
                </tr>

                <tr>
                  <td align="left">\emph\verb|{}|</td>

                  <td align="left">Switch to emphasized text</td>
                </tr>
              </tbody>
            </table>
          </div>

          <p>Instead of using \it, for example, to change to an
          italic font within a group, you should use the \textit
          command with the text as an argument. For example,
          instead of using:</p>
<pre class="screen">
This is some <span class="emphasis"><em>italic</em></span> text.
</pre>

          <p>you should use:</p>
<pre class="screen">
This is some <span class="emphasis"><em>italic</em></span> text.
</pre>

          <p>The advantage of the new scheme is that these macros
          are much more intelligent than the old ones. Notice that
          I did not specify italic correction () in the second
          case. This is because the \textit macro is able to
          determine if the correction is necessary, and if so,
          inserts it automatically.\ff{If you wish to suppress
          italic correction, use \cs{nocorr} at the end (or
          beginning) of the text.} The macros can also be
          nested.</p>

          <p>The NFSS2 allows you to use the old font selection
          macros, so existing documents will not be affected. If
          you want to set several paragraphs in a different font,
          you should continue to use the old selection macros
          because you cannot pass more than one paragraph of text
          to a macro.\ff[2]{It is possible to write macros that
          accept multiple paragraphs of text, but the NFSS2 font
          selection macros do not do so.}</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2883502"
                name="id2883502"></a>Low-level interface to
                NFSS</h4>
              </div>
            </div>

            <p>The user-level font selection commands are
            implemented in terms of six low-level commands. At this
            level, you must specify the encoding, family, series,
            shape, and size of the font in order to select it.
            There are six control sequences for selecting a font:
            one each for specifying the font parameters and one for
            actually switching to the new font. This strategy
            allows the parameters to be independent; any parameters
            that you do not explicitly change remain the same as
            the current font.</p>

            <p>These six control sequences are:</p>

            <div class="variablelist">
              <dl>
                <dt><span
                class="term">\fontencoding{<i><tt>enc</tt></i>}</span></dt>

                <dd>
                  <p>Selects the encoding scheme
                  \textit<tt>enc</tt><a id="id2883556"
                  class="indexterm" name="id2883556"></a>. The
                  encoding schemes officially supported by the
                  NFSS2 are shown in Table&#160;<a
                  href="ch05.html#tab.nfss2.encoding"
                  title="Table&#160;5.5.&#160;Encoding Schemes Supported by NFSS2">
                  Table&#160;5.5</a>.</p>

                  <div class="table">
                    <a id="tab.nfss2.encoding"
                    name="tab.nfss2.encoding"></a>

                    <p class="title">
                    <b>Table&#160;5.5.&#160;Encoding Schemes
                    Supported by NFSS2</b></p>

                    <table
                    summary="Encoding Schemes Supported by NFSS2"
                    border="1">
                      <colgroup>
                        <col align="left" />
                        <col align="left" />
                      </colgroup>

                      <thead>
                        <tr>
                          <th align="left">\bf Encoding</th>

                          <td class="auto-generated">&#160;</td>
                        </tr>
                      </thead>

                      <tbody>
                        <tr>
                          <td align="left">\bf Scheme</td>

                          <td align="left">\bf Encoding Name</td>
                        </tr>

                        <tr>
                          <td align="left">T1</td>

                          <td align="left">TeX text Cork
                          encoding</td>
                        </tr>

                        <tr>
                          <td align="left">OT1</td>

                          <td align="left">Old TeX text encoding
                          (the CMR encoding)</td>
                        </tr>

                        <tr>
                          <td align="left">OT2</td>

                          <td align="left">University of Washington
                          Cyrillic encoding</td>
                        </tr>

                        <tr>
                          <td align="left">OT3</td>

                          <td align="left">University of Washington
                          IPA encoding</td>
                        </tr>

                        <tr>
                          <td align="left">OML</td>

                          <td align="left">TeX math (italic)
                          letters</td>
                        </tr>

                        <tr>
                          <td align="left">OMS</td>

                          <td align="left">TeX math symbols</td>
                        </tr>

                        <tr>
                          <td align="left">OMX</td>

                          <td align="left">TeX math extended</td>
                        </tr>

                        <tr>
                          <td align="left">U</td>

                          <td align="left">Unknown encoding</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </dd>

                <dt><span
                class="term">\fontfamily{<i><tt>fam</tt></i>}</span></dt>

                <dd>
                  <p>Selects the family \textit<tt>fam</tt>.</p>
                </dd>

                <dt><span
                class="term">\fontseries{<i><tt>ser</tt></i>}</span></dt>

                <dd>
                  <p>Selects the series \textit<tt>ser</tt>.</p>
                </dd>

                <dt><span
                class="term">\fontshape{<i><tt>shp</tt></i>}</span></dt>

                <dd>
                  <p>Selects the shape \textit<tt>shp</tt>.</p>
                </dd>

                <dt><span
                class="term">\fontsize{<i><tt>ptsize</tt></i>}{<i><tt>
                bskip</tt></i>}</span></dt>

                <dd>
                  <p>Selects the font size \textit<tt>ptsize</tt>
                  with a distance of \textit<tt>bskip</tt> between
                  lines. Note that \textit<tt>ptsize</tt> is a
                  simple number, whereas \textit<tt>bskip</tt> is a
                  TeX distance and you must specify units after the
                  number. Under the NFSS2, \textit<tt>ptsize</tt>
                  specifies the <span
                  class="emphasis"><em>actual</em></span> size of
                  the font,\ff{Under the NFSS1, the
                  \textit{\texttt{ptsize}} was simply a label; the
                  actual font loaded was the nearest magstep.} but
                  the NFSS2 will attempt to find a closest match if
                  there is no exact match for the requested size. A
                  warning message is issued if the size does not
                  exist and a closest match has to be selected. You
                  can control the sensitivity of the warning with
                  the \fontsubfuzz parameter. It is initially set
                  to 0.4pt, meaning that any font within 0.4pt of
                  the requested size will be used without issuing a
                  warning.</p>
                </dd>

                <dt><span class="term">\selectfont</span></dt>

                <dd>
                  <p>Switches to the font described by the current
                  values of encoding, family, series, shape, and
                  size.</p>
                </dd>
              </dl>
            </div>

            <p>From this description, can you figure out how the
            control sequence <span
            class="emphasis"><em>could</em></span> be defined under
            the NFSS? See this footnote<sup>[<a id="id2855832"
            name="id2855832" href="#ftn.id2855832">60</a>]</sup>
            for the answer.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2855857"
              name="id2855857"></a>Defining Fonts with NFSS2</h3>
            </div>
          </div>

          <p>The standard Computer Modern fonts and most PostScript
          fonts can be selected by using the appropriate style
          files or inputting the appropriate macros. However, if
          you have nonstandard fonts or fonts for some other
          device, you can easily add them to the NFSS<a
          id="id2855870" class="indexterm"
          name="id2855870"></a>.</p>

          <p>The internal interface to the NFSS has been entirely
          redesigned. The new interface is much cleaner than the
          interface to the NFSS1, but similar in design.</p>

          <p>If you are not very familiar with TeX, what follows
          may be a bit confusing; treat this example as a sort of
          &#8220;cookbook recipe&#8221; and substitute the font you
          wish to define for the <tt>logo</tt> font (the
          <tt>logo</tt> font is the typeface used for the MetaFont
          logo).</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="sec.fonts.encodingvec"
                name="sec.fonts.encodingvec"></a>Declaring a
                family</h4>
              </div>
            </div>

            <p>In order to add a new typeface, you must declare a
            new font family<a id="id2855932" class="indexterm"
            name="id2855932"></a> with the control sequence
            \DeclareFontFamily. If you are only adding new sizes or
            shapes to an existing family, do not redeclare the
            family.</p>

            <p>The parameters to \DeclareFontFamily are the
            encoding, name, and loading options for the family.
            Loading options are any commands that should be
            executed every time this family is selected. For most
            fonts, there are no loading options.<sup>[<a
            id="id2855948" name="id2855948"
            href="#ftn.id2855948">61</a>]</sup></p>

            <p>The following declaration creates the <span
            class="emphasis"><em>logo</em></span> family with the
            old TeX encoding and no loading options:</p>
<pre class="screen">
\DeclareFontFamily{OT1}{logo}{}
</pre>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2884256"
                name="id2884256"></a>Declaring shapes</h4>
              </div>
            </div>

            <p>After a family has been created, you must specify
            what font shapes<a id="id2884266" class="indexterm"
            name="id2884266"></a> are available with
            \DeclareFontShape. To make the font usable, you must
            declare at least one font shape for each family.</p>

            <p>The general form of a call to \DeclareFontShape
            is:</p>
<pre class="screen">
\DeclareFontShape{<i><tt>enc</tt></i>}
   {<i><tt>fam</tt></i>}
   {<i><tt>series</tt></i>}
   {<i><tt>shape</tt></i>}
   {<i><tt>sizes</tt></i>}
   {<i><tt>loading options</tt></i>}
</pre>

            <p>The family <tt><i><tt>fam</tt></i></tt> (with the
            appropriate encoding <tt><i><tt>enc</tt></i></tt>) must
            already have been created with \DeclareFontFamily. The
            <tt><i><tt>series</tt></i></tt> and
            <tt><i><tt>shape</tt></i></tt> parameters identify the
            name of the series and shape. Table&#160;<a
            href="ch05.html#tab.fontshapeex"
            title="Table&#160;5.2.&#160;Weight and Width Are Combined to Form Series ">
            Table&#160;5.2</a> and Table&#160;<a
            href="ch05.html#tab.fontshapeshape"
            title="Table&#160;5.3.&#160;Standard Abbreviations of Font Shape">
            Table&#160;5.3</a> list some common series and shapes.
            The \textit<tt>sizes</tt> parameter is a list of <span
            class="emphasis"><em>font-shape
            declarations</em></span>, described below, and the
            \textit<tt>loading options</tt>, if specified, override
            the loading options for the font family.</p>

            <p>Each font-shape declaration indicates how the
            request for a font should be handled. The complete
            syntax for font-shape declarations is described in
            <span class="emphasis"><em>Interface Description of
            NFSS2</em></span>&#160;[<a
            href="bi01.html#nfss2interface">nfss2interface</a>].
            Here we look at three simple cases: substituting
            another font for the one requested, generating the name
            of the <tt>TFM</tt> file for the requested font, and
            identifying a particular <tt>TFM</tt> file for a size
            or range of sizes. Each of these techniques is used in
            the declaration of the medium, normal logo font in
            Example&#160;<a href="ch05.html#ex.logoshape"
            title="Example&#160;5.1.&#160;Font-shape Declaration with NFSS2">
            Example&#160;5.1</a>. There should be no extra spaces
            in the font size parameter. If you spread it over
            multiple lines in your input file, make sure that a
            comment character (\%) appears at the end of each
            line.</p>

            <div class="example">
              <a id="ex.logoshape" name="ex.logoshape"></a>

              <p class="title"><b>Example&#160;5.1.&#160;Font-shape
              Declaration with NFSS2</b></p>
<pre class="screen">
\DeclareFontShape{OT1}{logo}{m}{n}{
  &lt;-8&gt;sub * cmr/m/n
  &lt;8&gt;&lt;9&gt;&lt;10&gt;gen * logo
  &lt;10.95&gt;logo10 at 10.95pt
  &lt;12-&gt;logo10}{}
</pre>
            </div>

            <p>Each font-shape declaration begins with one or more
            size<a id="id2884513" class="indexterm"
            name="id2884513"></a> specifications in angle brackets.
            This indicates either a specific size
            (<tt>&lt;10&gt;</tt> for a 10pt font) or a range of
            sizes (<tt>&lt;8-9&gt;</tt> for any size larger than or
            equal to 8pt and less than 9pt, <tt>&lt;-8&gt;</tt> for
            all sizes less than 8pt, or <tt>&lt;10-&gt;</tt> for
            all sizes larger than or equal to 10pt).</p>

            <p>In Example&#160;<a href="ch05.html#ex.logoshape"
            title="Example&#160;5.1.&#160;Font-shape Declaration with NFSS2">
            Example&#160;5.1</a>, the first font-shape declaration
            indicates that font substitution should be performed
            for any request at a size smaller than 8pt. The string
            <tt>cmr/m/n</tt> indicates that medium, normal,
            Computer Modern Roman should be substituted in its
            place. In general, the substitution specifies the
            <tt><i><tt>family</tt></i>/<i><tt>shape</tt></i>/<i><tt>
            series</tt></i></tt> to be substituted.</p>

            <p>The second declaration indicates that the name of
            the external font for 8pt, 9pt and 10pt fonts should be
            generated from the string <tt>logo</tt> and the size
            (at 8pt, <tt>logo8</tt> will be used; at 9pt,
            <tt>logo9</tt>; and at 10pt, <tt>logo10</tt>).</p>

            <p>The third declaration demonstrates that the font
            specified (<tt>{logo10 at 10.95pt}</tt>) can be any
            valid TeX font selection command. After special
            declarations have been processed (substitution,
            generation, etc.), the remaining declaration text is
            passed to the TeX \font primitive.</p>

            <p>The last declaration specifies that <span
            class="emphasis"><em>any</em></span> size larger than
            12pt is valid. Any size larger than 12pt will use the
            font <tt>logo10</tt>, scaled appropriately. Automatic
            font generation, if it is being used, can take care of
            actually generating the font. Example&#160;<a
            href="ch05.html#ex.logoshape"
            title="Example&#160;5.1.&#160;Font-shape Declaration with NFSS2">
            Example&#160;5.1</a> was constructed to demonstrate
            several features of the font-shape declaration syntax.
            A simpler, more likely declaration for the medium
            normal logo font is shown in Example&#160;<a
            href="ch05.html#ex.logoshape2"
            title="Example&#160;5.2.&#160;Font-shape declaration with NFSS2 (simplified)">
            Example&#160;5.2</a>.</p>

            <div class="example">
              <a id="ex.logoshape2" name="ex.logoshape2"></a>

              <p class="title"><b>Example&#160;5.2.&#160;Font-shape
              declaration with NFSS2 (simplified)</b></p>
<pre class="screen">
\DeclareFontShape{OT1}{logo}{m}{n}{
  &lt;-8&gt;sub * cmr/m/n
  &lt;8-9&gt;logo8
  &lt;9-10&gt;logo9
  &lt;10-&gt;logo10}{}
</pre>
            </div>

            <p>The 8pt design could have been scaled down for sizes
            less than 8pt, but you should try to avoid large
            deviations from the design size. Because the design for
            my book does not require the logo font at sizes less
            than 8pt, substitution was the best choice.<sup>[<a
            id="id2884721" name="id2884721"
            href="#ftn.id2884721">62</a>]</sup></p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2884733"
              name="id2884733"></a>Storing Font Definitions</h3>
            </div>
          </div>

          <p>The NFSS will load your font definitions automatically
          if you store them<a id="id2884743" class="indexterm"
          name="id2884743"></a> in <tt>FD</tt> files<a
          id="id2884764" class="indexterm" name="id2884764"></a> in
          a directory where TeX looks for input files. Whenever an
          unknown encoding/family is requested, NFSS attempts to
          load the file <tt>encfamily.fd</tt>. For example, if the
          font declarations described in the preceding sections are
          stored in a file called <tt>OT1logo.fd</tt>, nothing
          special has do be done to use the logo family. The first
          time the logo family is selected, the definitions will be
          read from <tt>OT1logo.fd</tt>.</p>

          <p>If you are using LaTeX2e (or LaTeX with the NFSS),
          there must already be a large number of <tt>FD</tt> files
          on your system. For more information about building the
          LaTeX2e format (which includes the NFSS2), consult the
          section &#8220;<a href="ch04.html#sec.buildlatexe"
          title="Building the LaTeX2e format">the section called
          &#8220;Building the LaTeX2e format&#8221;</a>&#8221; in
          Chapter&#160;<a href="ch04.html"
          title="Chapter&#160;4.&#160;Macro Packages">Chapter&#160;4</a>,
          <span class="emphasis"><em><a href="ch04.html"
          title="Chapter&#160;4.&#160;Macro Packages">Chapter&#160;4</a></em></span>.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2884863"
              name="id2884863"></a>Changing the Defaults</h3>
            </div>
          </div>

          <p>Sometimes you want the fonts that you define to
          replace the standard Computer Modern fonts. This is
          easily accomplished. The NFSS defines control sequences<a
          id="id2884874" class="indexterm" name="id2884874"></a>
          which identify the default fonts. These control sequences
          are listed in Table&#160;<a
          href="ch05.html#tab.nfssdefaults"
          title="Table&#160;5.6.&#160;Default Fonts ">Table&#160;5.6</a>.</p>

          <div class="table">
            <a id="tab.nfssdefaults" name="tab.nfssdefaults"></a>

            <p class="title"><b>Table&#160;5.6.&#160;Default
            Fonts</b></p>

            <table summary="Default Fonts " border="1">
              <colgroup>
                <col align="left" />
                <col align="left" />
              </colgroup>

              <thead>
                <tr>
                  <th align="left">\bf Control Sequence</th>

                  <th align="left">\bf Font</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td align="left">\rmdefault</td>

                  <td align="left">The default normal (roman)
                  font</td>
                </tr>

                <tr>
                  <td align="left">\bfdefault</td>

                  <td align="left">The default boldface font</td>
                </tr>

                <tr>
                  <td align="left">\sfdefault</td>

                  <td align="left">The default sans-serif font</td>
                </tr>

                <tr>
                  <td align="left">\itdefault</td>

                  <td align="left">The default italic font</td>
                </tr>

                <tr>
                  <td align="left">\scdefault</td>

                  <td align="left">The default caps and small-caps
                  font.</td>
                </tr>

                <tr>
                  <td align="left">\defaultshape</td>

                  <td align="left">The default shape
                  (<tt>n</tt>)</td>
                </tr>

                <tr>
                  <td align="left">\defaultseries</td>

                  <td align="left">The default series
                  (<tt>m</tt>)</td>
                </tr>
              </tbody>
            </table>
          </div>

          <p>If you have defined a new font, perhaps
          <tt>garamond</tt> as I did for this book, you can make it
          the default normal font by changing \rmdefault. In LaTeX,
          the following command makes <tt>garamond</tt> the default
          normal font:</p>
<pre class="screen">
\renewcommand{\rmdefault}{garamond}
</pre>

          <p>In Plain TeX, it's written like this:</p>
<pre class="screen">
\def\rmdefault{garamond}
</pre>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2885098"
              name="id2885098"></a>NFSS Pitfalls</h3>
            </div>
          </div>

          <p>Defining your own fonts with the NFSS is
          straightforward, but it is not without its subtleties.
          There are several things going on behind the scenes that
          you must be aware of if you are going to define your own
          fonts.</p>

          <p>The first consideration is font substitution. When
          NFSS cannot find a font, it tries to substitute a
          different one. First, it tries to find the font you
          requested in the default shape, then in the default
          series, and finally, in the default family. You can
          change the defaults used by NFSS2 with the
          \DeclareFontSubstitution command:</p>
<pre class="screen">
\DeclareFontSubstitution{<span
class="emphasis"><em>encoding</em></span>}{<span
class="emphasis"><em>family</em></span>}{<span
class="emphasis"><em>series</em></span>}{<span
class="emphasis"><em>shape</em></span>}
</pre>

          <p>You must specify the defaults for each encoding you
          use because the encoding is never substituted.</p>

          <p>The next consideration is the use of mathematics<a
          id="id2885156" class="indexterm" name="id2885156"></a><a
          id="id2885166" class="indexterm" name="id2885166"></a>,
          which is typeset using an entirely different set of
          fonts. Even if you don't use any math in your document,
          the NFSS is prepared to function in math-mode at a
          moment's notice. In order to be prepared, it has to know
          what fonts to use. Ordinarily, mathematics is typeset
          using fonts at the same size as the current text font.
          This means that every time you change font sizes for
          text, NFSS changes font sizes for mathematics as
          well.</p>

          <p>By default, the NFSS defines math fonts<a
          id="id2885191" class="indexterm" name="id2885191"></a><a
          id="id2885198" class="indexterm" name="id2885198"></a>
          only at the following sizes: 5, 6, 7, 8, 9, 10, 11, 12,
          14, 17, 20, and 25pt. If you define a new font at a
          different size, 24pt for example, the first time you try
          to use that font, you will get several warning messages
          indicating that <tt>cmr/m/n/24</tt> (Computer Modern
          Roman), <tt>cmm/m/it/24</tt> (Computer Modern Math
          Italic), <tt>cmsy/m/n/24</tt> (Computer Modern Math
          Symbols), and <tt>lasy/m/n/24</tt> (LaTeX Symbols, if
          using LaTeX), are not available. This is very confusing
          because it won't appear that you have selected 24pt
          Computer Modern <span
          class="emphasis"><em>anywhere</em></span> in your
          document.</p>

          <p>There are two ways to solve this problem:<sup>[<a
          id="id2885254" name="id2885254"
          href="#ftn.id2885254">63</a>]</sup></p>

          <div class="itemizedlist">
            <ul type="disc">
              <li>
                <p>Redefine the required fonts at the sizes
                requested. This involves copying the definition of
                each of the fonts from NFSS <tt>FD</tt> files<a
                id="id2885284" class="indexterm"
                name="id2885284"></a> and adding new sizes.</p>
              </li>

              <li>
                <p>Tell NFSS to use existing math sizes for the new
                text sizes that you define. This option is
                reasonable only if you won't be using any math at
                the new sizes (or the sizes are so close that the
                mathematics doesn't appear disproportional). NFSS
                includes a macro called \DeclareMathSizes for this
                purpose. Insert it directly after the
                \DeclareFontShape command that declares the new
                font sizes. You must call \DeclareMathSizes once
                for each new size. For example, to use the 25pt
                math sizes with 24pt text, insert the following
                control sequence after you define the 24pt
                font:</p>
<pre class="screen">
\DeclareMathSizes{25}{24}{20}{17}
</pre>

                <p>The general form of a call to \DeclareMathSizes
                is:</p>
<pre class="screen">
\DeclareMathSizes{<span class="emphasis"><em>text-size</em></span>}
   <tt>{</tt><span
class="emphasis"><em>math-size</em></span><tt>}</tt>
   <tt>{</tt><span
class="emphasis"><em>script-size</em></span><tt>}</tt>
   <tt>{</tt><span
class="emphasis"><em>script-script-size</em></span><tt>}</tt>
</pre>

                <p>Where <span
                class="emphasis"><em><tt>math-size</tt></em></span>,
                <span
                class="emphasis"><em><tt>script-size</tt></em></span>,
                and <span
                class="emphasis"><em><tt>script-script-size</tt></em></span>
                are the normal (123), script ($x^{123}$), and
                script-script ($x^{y^{123}}$) math sizes for the
                specified <span
                class="emphasis"><em><tt>text-size</tt></em></span>.</p>
              </li>
            </ul>
          </div>

          <p>LaTeX sometimes resets the current font to the
          \rmdefault font. For example, it does this when a \ref is
          going to be printed. This means that the font you define
          as the \rmdefault font should be available in every size
          that you use. This may require redefining the Computer
          Modern Roman font, as described above, if you add a new
          size but leave Computer Modern as the default font.</p>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2885459"
            name="id2885459"></a>PostScript Fonts Under NFSS</h2>
          </div>
        </div>

        <p>PostScript fonts<a id="id2885469" class="indexterm"
        name="id2885469"></a><a id="id2885481" class="indexterm"
        name="id2885481"></a> and other scalable font technologies
        like TrueType differ from the way the
        &#8220;standard&#8221; TeX fonts work. They do not separate
        the notions of design size and magnification. Instead,
        PostScript fonts can be rendered at <span
        class="emphasis"><em>any</em></span> size from a single
        design. In daily use, the PostScript fonts under NFSS are
        indistinguishable from non-PostScript fonts. The NFSS
        distribution includes style files for accessing the 35
        standard PostScript fonts.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2885510"
              name="id2885510"></a>Adjustments to Scale</h3>
            </div>
          </div>

          <p><a id="id2885518" class="indexterm"
          name="id2885518"></a>Some combinations of PostScript
          fonts, particularly PostScript fonts with Computer Modern
          mathematics, look bad because there is a large
          discrepancy between the apparent sizes of the fonts. For
          example, as a consequence of design, 10pt Helvetica looks
          bigger than 10pt Computer Modern Math Italic. In order to
          correct this problem, you can specify a scaling factor
          when declaring PostScript fonts.<sup>[<a id="id2885536"
          name="id2885536" href="#ftn.id2885536">64</a>]</sup> The
          scaling factor is specified in square brackets at the
          beginning of the font-shape declaration in the
          \DeclareFontShape command.</p>

          <p>The easiest way to find an approximation of the
          correct scaling factor is to look at the <span
          class="emphasis"><em>x-height</em></span> of each
          font.<sup>[<a id="id2885557" name="id2885557"
          href="#ftn.id2885557">65</a>]</sup> The x-height is the
          height of a lowercase &#8220;x&#8221; in the font. The
          following macro will print the x-height of a font:</p>
<pre class="screen">
\def\showxheight#1{
  \font\fontfoo=#1 at 10pt
  \message{The x-height of #1 at 10pt is \the\fontdimen5\fontfoo}}
</pre>

          <p>The following TeX input will print the x-heights of
          Helvetica and Computer Modern Roman (assuming that your
          Helvetica font is called <tt>phvr</tt>):</p>
<pre class="screen">
\input showxheight
\showxheight{phvr}
\showxheight{cmr10}
\bye
</pre>

          <p>On my system, the x-height of Helvetica is 5.23pt and
          the x-height of Computer Modern Roman is 4.30554pt. The
          following font declaration makes Helvetica have the same
          apparent size as Computer Modern Roman:</p>
<pre class="screen">
\DeclareFontShape{OT1}{phv}{m}{n}{
  &lt;-&gt; [0.8232] phvr}{}
</pre>

          <p>Compare scaled Helvetica to unscaled Helvetica:</p>

          <p>FIXME: Unscaled Helvetica, Computer Modern Roman,
          Scaled Helvetica</p>

          <p>Unscaled Helvetica looks much larger than Computer
          Modern, but the scaled Helvetica appears a little too
          small. Experimentation is the only way to find the scale
          that looks best.</p>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2885640"
            name="id2885640"></a>When Things Go Wrong</h2>
          </div>
        </div>

        <p>A number of font-related problems can arise<a
        id="id2885650" class="indexterm" name="id2885650"></a>
        which either prevent you from formatting and printing your
        document or cause the output to differ from what you
        anticipated. The following sections describe many common
        problems and their solutions.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2885669"
              name="id2885669"></a>When TeX Complains</h3>
            </div>
          </div>

          <p>The first time an error can occur is when TeX is
          processing your document. Some of these errors prevent
          TeX from continuing while others are simply warnings.</p>

          <div class="variablelist">
            <dl>
              <dt><span class="term"><tt>! Font \myfont=xxxxx not
              loadable: Metric (TFM) file not
              found.</tt></span></dt>

              <dd>
                <p>This error indicates that TeX tried to process a
                \font control sequence which assigned the font
                <tt>xxxxx</tt> to the control sequence \myfont, but
                TeX could not find a <tt>TFM</tt> file for the font
                <tt>xxxxx</tt>. All the characters from the missing
                font will be blank in the resulting <tt>DVI</tt>
                file.</p>

                <p>You cannot process your document until this
                error is corrected, which is a matter of fixing the
                offending \font command if you are using the old
                font selection scheme.</p>

                <p>Under the NFSS2, this error occurs if you
                specify an invalid font in the command
                \DeclareFontShape. Examine the font that you were
                attempting to select and make sure that it
                exists.</p>
              </dd>

              <dt><span class="term"><tt>Warning Font/shape `x/y/z'
              undefined on input line
              <i><tt>n</tt></i></tt></span></dt>

              <dd>
                <p>This is a warning message from the NFSS. It
                indicates that you requested the font family
                <tt>x</tt>, series <tt>y</tt>, and shape
                <tt>z</tt>, but the requested font does not exist.
                This message is followed by another indicating
                which font NFSS chose to substitute in place of the
                one you requested. NFSS substitutes the closest
                possible font to the one you requested. It is
                usually an acceptable replacement.</p>

                <p>For example, if you are currently using Computer
                Modern Bold Extended and you select Computer Modern
                Typewriter, the NFSS will report that there is no
                bold-extended-typewriter font and that normal
                typewriter is being substituted in its place.</p>
              </dd>

              <dt><span class="term"><tt>! Font x/y/z/999 not
              found.</tt></span></dt>

              <dd>
                <p>This is a fatal error from the NFSS. It
                indicates that you selected font family <tt>x</tt>,
                series <tt>y</tt>, shape <tt>z</tt> at a size of
                999pts and that no such font exists. This error
                occurs when the size 999 is not defined in the
                \DeclareFontShape command for x/y/z.</p>
              </dd>

              <dt><span class="term"><tt>Missing character: There
              is no X in font foo!</tt></span></dt>

              <dd>
                <p>This is a warning message from TeX. Usually it
                occurs only in the log file. This error occurs when
                you attempt to access a character that does not
                exist in the current font. This can happen if you
                select the wrong font or if the selected font has a
                different encoding vector than anticipated. See the
                section &#8220;<a
                href="ch05.html#sec.fonts.encodingvec"
                title="Declaring a family">the section called
                &#8220;Declaring a family&#8221;</a>&#8221; in this
                chapter for more information.</p>
              </dd>
            </dl>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2885907"
              name="id2885907"></a>When the DVI Driver
              Complains</h3>
            </div>
          </div>

          <p>Getting TeX to successfully produce a <tt>DVI</tt>
          file<a id="id2885925" class="indexterm"
          name="id2885925"></a> is only half the battle. The next
          hurdle is getting a DVI driver to print it. Here are some
          of the things that can go wrong:</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2885937"
                name="id2885937"></a>Can't find PK file</h4>
              </div>
            </div>

            <p>When a DVI driver complains that it cannot find the
            appropriate <tt>PK</tt> file, there are several things
            that could be wrong.</p>

            <div class="itemizedlist">
              <ul type="disc">
                <li>
                  <p>The font is built into the printer.</p>

                  <p>If the DVI driver complains that it cannot
                  find the <tt>PK</tt> file for a built-in font,
                  you need to adjust the DVI driver's configuration
                  to indicate that the font is built-in. Exactly
                  how this is done depends on the DVI driver that
                  you are using. For example, if you are using
                  <b>dvips</b>, add an entry to the
                  <tt>psfonts.map</tt> file<a id="id2886005"
                  class="indexterm" name="id2886005"></a>. If you
                  are using emTeX, add an entry to the font
                  substitution file specified in the configuration
                  file. Consult the references for your particular
                  DVI driver for more information about using
                  built-in fonts.</p>
                </li>

                <li>
                  <p>The font does not exist on the printer you are
                  using.</p>

                  <p>This is the same problem as the error above
                  except that it cannot be fixed. For example, I
                  have <tt>TFM</tt> files for many PostScript fonts
                  at home because it helps me format bits of
                  documentation that I bring home from work without
                  error. However, if I try to print one of these
                  documents without first changing the fonts, the
                  DVI driver complains that it cannot find several
                  fonts. There is no way that I can correct this
                  because the missing fonts are built-in fonts for
                  a printer that I do not have at home. In this
                  case, font substitution by the DVI driver may
                  allow you to preview (and even print) the
                  document, but it won't look very good unless the
                  font metrics of the substituted font are very
                  close to the metrics for the original.</p>
                </li>

                <li>
                  <p>Uncommon size or font (no <tt>PK</tt>
                  file).</p>

                  <p>The Computer Modern family contains a number
                  of fonts that are very rarely used. If you don't
                  keep <tt>PK</tt> files for these fonts around all
                  the time and attempt to use one of them (or
                  attempt to use a common font at a very unusual
                  size), the DVI driver will not be able to find
                  the necessary <tt>PK</tt> file. You have to build
                  the <tt>PK</tt> file first. Consult
                  Chapter&#160;<a href="ch11.html"
                  title="Chapter&#160;11.&#160;Introducing MetaFont">
                  Chapter&#160;11</a> for more information about
                  building <tt>PK</tt> files with MetaFont. Also
                  consult the section called &#8220;<a
                  href="ch05.html#sec.autofont"
                  title="Automatic Font Generation by DVI Drivers">the
                  section called &#8220;Automatic Font Generation
                  by DVI Drivers&#8221;</a>&#8221; later in this
                  chapter.</p>
                </li>
              </ul>
            </div>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2886152"
                name="id2886152"></a>Accents don't work or the
                wrong characters are printed</h4>
              </div>
            </div>

            <p>This problem is usually caused by a bad encoding
            vector. See the section &#8220;<a
            href="ch05.html#sec.fonts.encodingvec"
            title="Declaring a family">the section called
            &#8220;Declaring a family&#8221;</a>&#8221; in this
            chapter for more information.</p>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2886177"
                name="id2886177"></a>Printer prints the right
                characters but the wrong font</h4>
              </div>
            </div>

            <p>This is usually an indication that you are trying to
            use a font that does not exist on the printer.
            PostScript printers, for example, substitute Courier
            for any font that does not exist.</p>

            <p>Another possibility is that you have configured your
            DVI driver incorrectly. I once told <b>dvips</b> to
            download Galliard when I used Garamond. It took me
            quite a while to find that error. Make sure that the
            printer contains the fonts that you think it does and
            make sure that you are mapping the TeX font names to
            the correct printer fonts.</p>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2886211"
            name="id2886211"></a>Encoding Vectors</h2>
          </div>
        </div>

        <p>An encoding vector<a id="id2886220" class="indexterm"
        name="id2886220"></a> describes the order and position of
        characters within a font. The purpose of this section is to
        help you understand the role that encoding vectors play in
        the translation of text from your input file to printed
        output.</p>

        <p>Encoding vectors cause a lot of confusion. Whenever the
        characters that you type in your input file are printed
        incorrectly (&#8220;<tt>flight</tt>&#8221; in your input
        file prints out as &#8220;ight&#8221;;
        &#8220;\oe{}vres&#8221; prints out as
        &#8220;\'uvres&#8221;; or &#8220;<tt>---</tt>&#8221; prints
        out as &#8220;-{}-{}-&#8221; instead of &#8220;---&#8221;),
        you've probably encountered some sort of encoding
        problem.</p>

        <p>The root of this problem is that the characters in your
        input file are really just numbers between 0 and
        255.<sup>[<a id="id2886286" name="id2886286"
        href="#ftn.id2886286">66</a>]</sup> The number 65 is
        usually a capital A, but there is nothing intrinsic to the
        value 65 to signify this. In order to display these byte
        values, they have to be translated into symbols.</p>

        <p>These problems arise because there are at least four
        different translations occurring between what you type and
        what appears on the printed (or previewed) page:</p>

        <div class="orderedlist">
          <ol type="1">
            <li>
              <p>You type some symbols on the keyboard, and they
              are displayed by your editor. The configuration of
              your system determines how these characters appear.
              Sometimes they are from the ISO Latin-1 symbol set,
              sometimes US ASCII, sometimes something else, and
              sometimes it is user configurable. If you confine
              yourself to pure ASCII, you're pretty safe, but
              that's not convenient for languages other than
              English. When you are typing documents in Spanish,
              it's very convenient to be able to type
              &#8220;\&#160;n&#8221; directly in your document.</p>
            </li>

            <li>
              <p>TeX reads your input file and translates it into
              an internal encoding (basically ASCII). (The reverse
              translation is performed before TeX prints any output
              to the terminal or the log file.) The translation
              tables used in this step are generally determined
              when the TeX program is compiled, but several modern
              TeXs allow you to modify these tables at runtime.</p>

              <p>TeX assumes that fonts use TeX's internal
              encoding. For example, on an IBM mainframe, which
              uses the EBCDIC character set<a id="id2886356"
              class="indexterm" name="id2886356"></a>, TeX
              translates a capital A (EBCDIC 193) into ASCII 65 and
              assumes that position 65 of the metric information
              for the current font contains the information
              (including ligature and kerning information) for a
              capital A.</p>
            </li>

            <li>
              <p>If you use control sequences to represent special
              characters (\oe for &#8220;\oe&#8221;, for example),
              the macro package you use is responsible for defining
              those control sequences so they produce the correct
              characters. If the macro package assumes that the
              &#8220;\oe&#8221; character appears at position 247
              of the current font, the output will not be correct
              in a font with a different encoding.</p>
            </li>

            <li>
              <p>The DVI driver reads TeX's <tt>DVI</tt> file and
              assumes that the encoding vector of each font used in
              the <tt>DVI</tt> file is the same as the encoding
              vector of the actual fonts in the output device. For
              <tt>PK</tt> fonts, this is probably true (since the
              DVI driver sends the font to the printer), but for
              fonts built into the printer, it is less likely to be
              true.</p>
            </li>
          </ol>
        </div>

        <p>You may think of a font as a collection of 1 to 256
        different symbols in a particular order. This is really a
        font plus a particular encoding vector. It is more accurate
        to think of a font as simply a collection of symbols (with
        no particular number or ordering). An encoding vector
        selects which symbols are used and in what order they
        appear. Typically, an encoding vector can contain only 256
        different symbols. It is important to note that changing an
        encoding vector of a font does not simply permute the order
        of the characters in the font, it can change which symbols
        are actually present as well.</p>

        <p>Encoding vectors are either implicit or explicit. Most
        fonts have an implicit encoding, but some (for example,
        Adobe Type&#160;1 fonts) contain an explicit, configurable
        encoding. TeX fonts have an implicit encoding. TeX actually
        uses several different encoding vectors (it uses more than
        one because it has both text or body fonts and several
        kinds of math and symbol fonts). The character set tables
        in Appendix&#160;<a href="apb.html"
        title="Appendix&#160;B.&#160;Font Samples">Appendix&#160;B</a>,
        <span class="emphasis"><em><a href="apb.html"
        title="Appendix&#160;B.&#160;Font Samples">Appendix&#160;B</a></em></span>,
        show the encoding of several different fonts.</p>

        <p>\font\mathit=cmmi10 Most macro packages assume that the
        TEX TEXT encoding is being used. For example, Plain TeX
        defines the control sequence \AE as an abbreviation for
        character number 29 in the current font. Even when control
        sequences aren't involved, problems can arise if the output
        font does not have the anticipated encoding. The byte-value
        34 in your input file is almost always the literal double
        quote character (<tt>"</tt>) and usually prints as a double
        quote (which is probably what your editor displays and
        probably what you expect). If the font encoding is
        something different, the result will not be what you
        expect. For example, if the current font has the TEX MATH
        ITALIC encoding, the result is
        &#8220;{\mathit\char34}&#8221;.</p>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a
            id="sec.fonts.virtualfonts"
            name="sec.fonts.virtualfonts"></a>Virtual Fonts</h2>
          </div>
        </div>

        <p>Virtual fonts<a id="id2886658" class="indexterm"
        name="id2886658"></a><a id="id2886666" class="indexterm"
        name="id2886666"></a> (stored in <tt>VF</tt> files<a
        id="id2886687" class="indexterm"
        name="id2886687"></a><sup>[<a id="id2886706"
        name="id2886706" href="#ftn.id2886706">67</a>]</sup>) are a
        relatively new addition to the TeX family. When TeX was
        originally defined in 1970, Knuth<a id="id2886736"
        class="indexterm" name="id2886736"></a> chose a character
        encoding that suited his purposes, and very little effort
        was made to parameterize the encoding. (In fact, any TeX
        macro writer can use <span
        class="emphasis"><em>any</em></span> encoding she wants,
        but no general mechanism for identifying the encoding
        exists.<sup>[<a id="id2886754" name="id2886754"
        href="#ftn.id2886754">68</a>]</sup>) Virtual fonts combat
        this problem by allowing the creator to define a virtual
        font in terms of (multiple) characters from one or more
        fonts.</p>

        <p>Virtual fonts are used most commonly to change the
        encoding vector of a font. This provides a convenient way
        of mapping different fonts into the required encoding so
        that they are easy to use in TeX. A virtual font consists
        of a <tt>VF</tt> file and a <tt>TFM</tt> file. TeX uses the
        <tt>TFM</tt> file as it would any other.</p>

        <p>Figure&#160;<a href="ch05.html#fig.vfdiagram"
        title="Figure&#160;5.4.&#160;How TeX uses a virtual font">Figure&#160;5.4</a>
        shows how a virtual font is used by the TeX system. In this
        case, a virtual font <tt>ctmr</tt> has been created
        combining characters from the fonts <tt>trr0n</tt>,
        <tt>trr6m</tt>, <tt>trr6j</tt>, and <tt>trr10j</tt>.</p>

        <div class="figure">
          <a id="fig.vfdiagram" name="fig.vfdiagram"></a>

          <p class="title"><b>Figure&#160;5.4.&#160;How TeX uses a
          virtual font</b></p>

          <div class="mediaobject">
            <img src="FIXME:" />
          </div>
        </div>

        <p>The document uses the font <tt>ctmr</tt>. TeX uses the
        font metric information in <tt>ctmr.tfm</tt> to compose the
        <tt>DVI</tt> file. The DVI driver, however, discovers a
        <tt>VF</tt> file named <tt>ctmr</tt>, so it uses the
        instructions in the virtual font to select characters from
        the four built-in fonts. This is a practical example. It
        shows how the HP LaserJet built-in fonts may be accessed
        with the standard TeX text encoding.</p>

        <p>In practice, virtual fonts suffer from one limitation: A
        virtual font can only permute the encoding vector; it
        cannot access characters that do not appear in the encoding
        vector of the &#8220;real&#8221; font. For example, an
        Adobe Type&#160;1 font might contain all of the characters
        that appear in the TeX text encoding, but many of them do
        not appear in the standard Adobe encoding vector. A virtual
        font alone cannot remap the characters into the TeX text
        encoding. The encoding vector of the font must also be
        changed. Several PostScript DVI drivers have this
        ability.</p>

        <p>Virtual fonts are binary files and are very difficult to
        edit. To make it possible to construct virtual fonts by
        hand, TeX includes standard utilities (<b>VFtoVP</b><a
        id="id2886971" class="indexterm" name="id2886971"></a> and
        <b>VPtoVF</b><a id="id2886985" class="indexterm"
        name="id2886985"></a>) for converting the binary
        <tt>VF</tt> format into a human-readable <tt>VPL</tt>
        format. The <tt>VPL</tt> files are text files that can be
        edited with a text editor.</p>

        <p>A complete description of how to create virtual fonts is
        beyond the scope of this book. If you are interested in
        experimenting with virtual fonts, I strongly recommend that
        you examine the <b>fontinst</b> package.<sup>[<a
        id="id2887038" name="id2887038"
        href="#ftn.id2887038">69</a>]</sup> <b>fontinst</b><a
        id="id2887070" class="indexterm" name="id2887070"></a>
        allows you to construct <tt>VPL</tt> files with TeX
        documents. This isn't as strange as it first sounds.
        Virtual font files have to include the metric information
        from <tt>TFM</tt> files for each font that they include.
        Because TeX can easily read this information, and the
        output is a plain text document anyway, TeX is a very
        capable, if somewhat slow, tool.</p>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a
            id="sec.autofont" name="sec.autofont"></a>Automatic
            Font Generation by DVI Drivers</h2>
          </div>
        </div>

        <p>Recent releases of many popular DVI drivers (\dvips<a
        id="id2887119" class="indexterm" name="id2887119"></a>,
        xdvi<a id="id2887132" class="indexterm"
        name="id2887132"></a>, \SeeTeX<a id="id2887140"
        class="indexterm" name="id2887140"></a>, and emTeX<a
        id="id2887151" class="indexterm" name="id2887151"></a>'s
        DVI drivers, to name a few) include the ability to generate
        missing fonts automatically<a id="id2887162"
        class="indexterm" name="id2887162"></a><a id="id2887174"
        class="indexterm" name="id2887174"></a>. Automatic font
        generation overcomes two problems simultaneously: it
        reduces disk space requirements, and it makes font
        generation easier. Most implementations of TeX are
        distributed with a complete set of Computer Modern fonts at
        seven or more magnifications. This can easily amount to
        several megabytes of disk space (even more if you are using
        other fonts, like the \AmS fonts<a id="id2887193"
        class="indexterm" name="id2887193"></a> from the American
        Mathematical Society<a id="id2887205" class="indexterm"
        name="id2887205"></a>). In practice, you probably use only
        a small subset of these fonts.</p>

        <p>One way to combat the disk-space problem is to delete
        all of the TeX fonts on your system and build just the ones
        you actually use. In the days before automatic font
        generation, this would have been quite unpleasant. The
        first time you discovered that you needed a font that you
        did not have, you would have to stop your DVI driver,
        figure out what size was missing, figure out how to get
        MetaFont to build the font that was missing at the
        appropriate resolution, run MetaFont, store the font in the
        right place, and return to your DVI driver. Moments later,
        you might discover that you had to do the whole process
        again for some other font.</p>

        <p>Using a driver that provides automatic font generation
        makes it nearly painless to delete fonts and let them be
        built automatically.<sup>[<a id="id2887238"
        name="id2887238" href="#ftn.id2887238">70</a>]</sup> The
        DVI driver determines the resolution required, runs
        MetaFont with the appropriate parameters, stores the font
        in the correct place, and continues processing the document
        uninterrupted.</p>

        <p>The down side of automatic font generation is that you
        must keep the MetaFont program around and make available
        the source files for the Computer Modern fonts (and any
        other MetaFont fonts that you use). If you do not already
        have these files on your hard disk, the potential disk
        space savings are somewhat reduced. (MetaFont is discussed
        fully in Chapter&#160;<a href="ch11.html"
        title="Chapter&#160;11.&#160;Introducing MetaFont">Chapter&#160;11</a>.)
        Moreover, automatic font generation can only build
        <tt>PK</tt> files<a id="id2887281" class="indexterm"
        name="id2887281"></a>; if <tt>TFM</tt> files are also
        missing, you will have to build those by hand before TeX
        can process your document.<sup>[<a id="id2887312"
        name="id2887312" href="#ftn.id2887312">71</a>]</sup></p>

        <p>Another benefit of automatic font generation is that it
        can be used to provide previewers, even non-PostScript
        previewers, with the ability to preview documents that use
        PostScript fonts, provided that you have the Printer Font
        ASCII (<tt>PFA</tt>)<a id="id2887344" class="indexterm"
        name="id2887344"></a> or Printer Font Binary
        (<tt>PFB</tt>)<a id="id2887363" class="indexterm"
        name="id2887363"></a> font sources and Adobe Font Metric
        (<tt>AFM</tt>)<a id="id2887382" class="indexterm"
        name="id2887382"></a> for your PostScript fonts.</p>

        <p>The following lines, added to the <tt>MakeTeXPK</tt><a
        id="id2887401" class="indexterm" name="id2887401"></a>
        script distributed with <b>dvips</b>, provide automatic
        font generation for PostScript fonts with <b>ps2pk</b><a
        id="id2887423" class="indexterm" name="id2887423"></a>.
        This is useful even on systems where PostScript printers
        are used for output, because previewers like <b>xdvi</b><a
        id="id2887438" class="indexterm" name="id2887438"></a> also
        use <b>MakeTeXPK</b> to build missing fonts.</p>
<pre class="screen">
# Look for a PostScript outline font...
if [ -r /usr/local/lib/tex/ps/outlines/$NAME.pfa ] 
then
  echo Building TeX font from PostScript outline
  # Hack.  If $6 is null, $DESTDIR =&gt; $6 ...
  PStoTeXfont $1 $2 $3 $4 $5 $6 $DESTDIR
  exit 0
else
  echo Building TeX font from MetaFont outline
fi
</pre>

        <p>In this example, PostScript fonts are stored in the
        <tt>/usr/local/lib/tex/ps/outlines</tt> directory. You
        should change this directory to something appropriate for
        your system. On a unix system, the <b>PStoTeXfont</b>
        script shown in Example&#160;<a
        href="ch05.html#ex.pstotexfont"
        title="Example&#160;5.3.&#160;The PStoTeXfont script">Example&#160;5.3</a>
        is appropriate.<sup>[<a id="id2887500" name="id2887500"
        href="#ftn.id2887500">72</a>]</sup> A <b>Perl</b> version
        of <b>MakeTeXPK</b> that handles both MetaFont and
        PostScript fonts is shown in Example&#160;<a
        href="apd.html#ex.maketexpk"
        title="Example&#160;D.1.&#160;MakeTeXPK.pl">Example&#160;D.1</a>
        in Appendix&#160;<a href="apd.html"
        title="Appendix&#160;D.&#160;Long Examples">Appendix&#160;D</a>,
        <span class="emphasis"><em><a href="apd.html"
        title="Appendix&#160;D.&#160;Long Examples">Appendix&#160;D</a></em></span>.</p>

        <div class="example">
          <a id="ex.pstotexfont" name="ex.pstotexfont"></a>

          <p class="title"><b>Example&#160;5.3.&#160;The
          PStoTeXfont script</b></p>
<pre class="screen">
#!/usr/local/bin/bash
#
#   This script file makes a new TeX font from a PS outline.  
#
#   Parameters are:
#
#   name dpi bdpi [mag mode destdir]
#
#   `name' is the name of the font, such as `ptmr'.  `dpi' 
#   is the resolution the font is needed at.  `bdpi' is 
#   the base resolution.
#
#   This script ignores the remaining parameters.  They are 
#   left here to document the fact that the caller may provide 
#   them.  They may be provided because the caller thinks 
#   MetaFont is going to do the work...
#
#   Of course, this needs to be set up for your site.
#
# TEMPDIR needs to be unique for each process because of the 
# possibility of simultaneous processes running this script.

TEMPDIR=/tmp/temp-tex-PS.$$
NAME=$1
DPI=$2
BDPI=$3

LOCALDIR=/usr/local/lib/mf/fonts
DESTDIR=$LOCALDIR/pk

BASENAME=$NAME.$DPI
PFADIR=/usr/local/lib/tex/ps/outlines

# Clean up on normal or abnormal exit
trap "cd /; rm -rf $TEMPDIR" 0 1 2 15

mkdir $TEMPDIR
cd $TEMPDIR

# We proceed by making a 10pt font at the resolution 
# requested...
echo Making ${DPI}dpi version of $NAME.
ps2pk -X$DPI -P10 -a$PFADIR/$NAME.afm      $PFADIR/$NAME.pfa ${BASENAME}pk

mv ${BASENAME}pk $DESTDIR

exit 0
</pre>
        </div>

        <p>A similar script for using automatic font generation
        under emTeX with <b>4DOS</b> is shown in Examples&#160;<a
        href="apd.html#ex.dvidxx"
        title="Example&#160;D.3.&#160;dvidxx.btm">Example&#160;D.3</a>
        and&#160;<a href="apd.html#ex.makepk"
        title="Example&#160;D.4.&#160;makepk.btm">Example&#160;D.4</a>
        in Appendix&#160;<a href="apd.html"
        title="Appendix&#160;D.&#160;Long Examples">Appendix&#160;D</a>.
        Several other options are available for performing
        automatic font generation on a number of platforms,
        including a <b>REXX</b> version for OS/2 and a compiled
        program called <b>MKTeXPK</b>.</p>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a
            id="sec.t1fonts" name="sec.t1fonts"></a>Math Fonts in
            TeX</h2>
          </div>
        </div>

        <p>Changing math fonts<a id="id2887679" class="indexterm"
        name="id2887679"></a><a id="id2887686" class="indexterm"
        name="id2887686"></a> is more difficult than changing text
        fonts. In addition to the large number of special symbols
        that must be available, TeX needs a lot more information to
        use the fonts because the characters are combined more
        frequently and in more complex ways. For example, the open
        brace character (\{) in math mode is
        &#8220;extensible;&#8221; this means that it can be as
        large as required. In order for TeX to construct a brace of
        arbitrary size, one of the math fonts (the math extensions
        font) contains four different characters that TeX combines
        to form the brace:</p>

        <p>FIXME: brace pieces</p>

        <p>Extensible recipes for characters like &#8220;\{&#8221;,
        &#8220;\}&#8221;, &#8220;(&#8221;, and &#8220;)&#8221; are
        examples of additional metric information that must be
        available in math fonts for TeX.</p>

        <p>In addition to the Computer Modern math fonts, there are
        really only three other choices at present: the \AmS
        fonts<a id="id2887745" class="indexterm"
        name="id2887745"></a> (MetaFont fonts freely distributed by
        the American Mathematical Society<a id="id2887758"
        class="indexterm" name="id2887758"></a> which extend but do
        not replace the Computer Modern math fonts), the Lucida
        Bright+New Math fonts<a id="id2887768" class="indexterm"
        name="id2887768"></a>, and the MathTime fonts<a
        id="id2887778" class="indexterm" name="id2887778"></a>.
        Lucida Bright and MathTime are both sets of commercial
        PostScript Type&#160;1 fonts.</p>
      </div>

      <div class="section">
        <div class="titlepage">
          <div>
            <h2 class="title" style="clear: both"><a id="id2887790"
            name="id2887790"></a>Concrete Examples</h2>
          </div>
        </div>

        <p>The following sections describe by example how you can
        use several different kinds of fonts in TeX. The tools
        described are generally free and generally available for
        multiple platforms. Where specific commercial tools are
        used, free alternatives are discussed.</p>

        <p>The specific tools I mention here are not the only tools
        available nor are they necessarily the best, although I
        hope I've found the best ones. If you have found a
        different and better solution, don't abandon it in favor of
        what I use here. But please do tell me about the method
        that you have found. With every passing day, more free
        software becomes available.</p>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2887816"
              name="id2887816"></a>MetaFont Fonts</h3>
            </div>
          </div>

          <p>Chapter&#160;<a href="ch11.html"
          title="Chapter&#160;11.&#160;Introducing MetaFont">Chapter&#160;11</a>
          describes how to use MetaFont to create fonts for TeX.<a
          id="id2887825" class="indexterm" name="id2887825"></a><a
          id="id2887847" class="indexterm" name="id2887847"></a> If
          you have MetaFont installed, you can easily create fonts
          that are usable in TeX.</p>

          <p>MetaFont reads <tt>MF</tt> files, which are plain text
          files that describe a font analogous to the way TeX reads
          <tt>TEX</tt> files that describe a document.</p>

          <p>Appendix&#160;<a href="apb.html"
          title="Appendix&#160;B.&#160;Font Samples">Appendix&#160;B</a>,
          <span class="emphasis"><em><a href="apb.html"
          title="Appendix&#160;B.&#160;Font Samples">Appendix&#160;B</a></em></span>,
          contains examples of many MetaFont fonts. Consult the
          &#8220;Definitive List of All Fonts Available for
          {MetaFont}&#8221;&#160;[<a
          href="bi01.html#lreq:metafonts">lreq:metafonts</a>] for
          an up-to-date list with availability information.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2887929"
              name="id2887929"></a>PostScript Type 1 Fonts</h3>
            </div>
          </div>

          <p>PostScript printers have many PostScript Type&#160;1<a
          id="id2887939" class="indexterm" name="id2887939"></a><a
          id="id2887949" class="indexterm" name="id2887949"></a>
          fonts built in. If you want to use built-in fonts, you
          only need the metric information for them and a
          PostScript DVI driver. The <b>dvips</b> driver is the
          most popular free DVI driver. Several commercial drivers
          are also available.</p>

          <p>The metric information should be available in the form
          of Adobe Font Metric (<tt>AFM</tt>) files<a
          id="id2887986" class="indexterm" name="id2887986"></a>
          from the printer vendor or directly from Adobe Systems<a
          id="id2888007" class="indexterm" name="id2888007"></a>,
          Inc. You need a program that will convert <tt>AFM</tt>
          files into <tt>TFM</tt> files<a id="id2888034"
          class="indexterm" name="id2888034"></a>. There are
          several free programs that will do this conversion (one
          is included with <b>dvips</b>), and your DVI driver may
          have included one. In general, if one came with your DVI
          driver, that is the one you should use.</p>

          <p>If you want to use PostScript Type&#160;1 fonts on
          non-PostScript devices, like most screen previewers, you
          need the &#8220;sources&#8221; for the fonts that you
          want to use. Many font vendors sell fonts in Adobe
          Type&#160;1 format. In addition, there are many
          Type&#160;1 fonts available on the Internet and on
          bulletin board systems.<sup>[<a id="id2888068"
          name="id2888068" href="#ftn.id2888068">73</a>]</sup></p>

          <p>Several companies have made complete, high-quality
          fonts available. They are:</p>

          <div class="table">
            <a id="id2888084" name="id2888084"></a>

            <p class="title"><b>Table&#160;5.7.&#160;</b></p>

            <table summary="" border="1">
              <colgroup>
                <col align="left" />
              </colgroup>

              <thead>
                <tr>
                  <th align="left">IBM Courier</th>

                  <th>URW Antiqua</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td align="left">Bitstream Courier</td>

                  <td>URW Grotesk Bold</td>
                </tr>

                <tr>
                  <td align="left">Bitstream Charter</td>

                  <td>Nimbus Roman No9</td>
                </tr>
              </tbody>
            </table>
          </div>

          <p>Check the license that accompanies these fonts to make
          sure that you can use them legally.</p>

          <p>PostScript Type&#160;1 font sources are available in
          Printer Font ASCII (<tt>PFA</tt>)<a id="id2888169"
          class="indexterm" name="id2888169"></a> and Printer Font
          Binary (<tt>PFB</tt>)<a id="id2888188" class="indexterm"
          name="id2888188"></a> formats.<sup>[<a id="id2888196"
          name="id2888196" href="#ftn.id2888196">74</a>]</sup> The
          <tt>PFB</tt> format is more compact, but less portable.
          unix systems usually use <tt>PFA</tt> files, while MS-DOS
          and OS/2 systems use <tt>PFB</tt> files. Several existing
          programs can convert <tt>PFB</tt> files into <tt>PFA</tt>
          files and vice-versa. For the remainder of this section,
          I will consistently refer to PostScript Type&#160;1
          source files as <tt>PFA</tt> files, although you can use
          <tt>PFB</tt> files instead if they are supported on your
          platform.</p>

          <p>In addition to the <tt>PFA</tt> files, you will also
          need metric information for the fonts. The metric
          information <span class="emphasis"><em>should</em></span>
          be available in <tt>AFM</tt> format. If you purchased
          fonts from a vendor and did not receive <tt>AFM</tt>
          files, you should complain. Fonts from free sources, like
          Internet archive sites and bulletin board systems
          sometimes include only Printer Font Metric
          (<tt>PFM</tt>)<a id="id2888341" class="indexterm"
          name="id2888341"></a> files. These are Microsoft Windows
          printer metric files, and they do not contain enough
          information to make a <tt>TFM</tt> file.</p>

          <p>It is possible to create a <tt>TFM</tt> file from the
          <tt>PFM</tt> file, but the metrics are not particularly
          good. To do this:</p>

          <div class="orderedlist">
            <ol type="1">
              <li>
                <p>Convert the <tt>PFM</tt> file into an incomplete
                <tt>AFM</tt> file with the <b>PFM2AFM</b><a
                id="id2888427" class="indexterm"
                name="id2888427"></a> utility.</p>
              </li>

              <li>
                <p>Use the <b>PS2PK</b><a id="id2888449"
                class="indexterm" name="id2888449"></a> program to
                make a <tt>PK</tt> file.</p>
              </li>

              <li>
                <p>Use <b>PKBBOX</b><a id="id2888481"
                class="indexterm" name="id2888481"></a> to create a
                more complete <tt>AFM</tt> file from the incomplete
                <tt>AFM</tt> file and the <tt>PK</tt> file.</p>
              </li>
            </ol>
          </div>

          <p>The <tt>AFM</tt> file manufactured in this way can be
          used to create a <tt>TFM</tt> file. The <tt>PK</tt> file
          can be used by any DVI driver that understands TeX
          <tt>PK</tt> fonts (almost all drivers have this
          ability).</p>

          <p>Creating <tt>PK</tt> files does require more disk
          space, but it has the advantage that you can print TeX
          documents which use PostScript Type&#160;1 fonts on
          non-PostScript devices. This includes fast,
          <tt>PK</tt>-based screen previewers like <b>xdvi</b> and
          emTeX's <b>dviscr</b> that do not understand
          PostScript.</p>

          <p>Programs like <b>dvipsone</b><a id="id2888617"
          class="indexterm" name="id2888617"></a> and
          <b>dviwindo</b><a id="id2888631" class="indexterm"
          name="id2888631"></a> which run under the Microsoft
          Windows environment can use PostScript fonts directly if
          Adobe Type Manager (ATM)<a id="id2888641"
          class="indexterm" name="id2888641"></a> is installed on
          the system. However, it is still necessary to construct
          the <tt>TFM</tt> files for TeX.</p>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2888662"
                name="id2888662"></a>{Using a new PostScript font
                in TeX (for PostScript printers)}</h4>
              </div>
            </div>

            <p>This section presents a step-by-step description of
            how to use a new PostScript font in TeX with a
            PostScript printer or previewer. In this situation, you
            have a PostScript printer, and you use <b>dvips</b> to
            print your documents. This method also allows you to
            preview your documents with <b>Ghostscript</b>.</p>

            <p>For either method, you must first obtain the
            PostScript sources for the font that you want to use.
            You <span class="emphasis"><em>must</em></span> have a
            <tt>PFA</tt> or <tt>PFB</tt> file and an <tt>AFM</tt>
            file. As a concrete example, I'll use the &#8220;Nimbus
            Roman 9L Regular&#8221; font. For this font, I obtain
            <tt>unmr.pfa</tt> and <tt>unmr.afm</tt>. These fonts
            are available from the CTAN archives in the directory
            <tt>fonts/urw</tt>.<sup>[<a id="id2888763"
            name="id2888763" href="#ftn.id2888763">75</a>]</sup> In
            order to use the font in TeX, you must create TeX font
            metrics for it using <b>afm2tfm</b><a id="id2888801"
            class="indexterm" name="id2888801"></a> (in particular,
            the version of <b>afm2tfm</b> that comes with
            <b>dvips</b>).</p>

            <p>First, however, we must decide what encoding vector
            to use. Frequently, the fonts you obtain use Adobe
            Standard Encoding. The problem with this encoding is
            that it isn't very complete; it leaves out a lot of
            standard TeX characters (like the ligatures
            &#8220;fi&#8221; and &#8220;fl&#8221; as well as many
            accented and international letters). Instead of using
            Adobe Standard Encoding<a id="id2888843"
            class="indexterm" name="id2888843"></a>, I recommend
            using the Cork Encoding<a id="id2888852"
            class="indexterm" name="id2888852"></a>. The Cork
            Encoding has several advantages; it is a superset of
            the original TeX text encoding; it is becoming a new
            standard for TeX; and it is supported by the NFSS2. Of
            course, the Cork Encoding is not suitable for all
            fonts; there's no reason to try to re-encode a symbol
            font into the Cork Encoding---that doesn't even make
            any sense.</p>

            <p>Luckily, using the Cork Encoding is no more
            difficult than using whatever encoding the distributed
            font contains. <b>afm2tfm</b> will do all the work. You
            only need to obtain the appropriate encoding file. In
            this case, the file is <tt>ec.enc</tt>, and it is
            distributed with both <b>dvips</b> and NFSS2. Use
            <b>afm2tfm</b> to generate the metrics:</p>
<pre class="screen">
\$ {\bf afm2tfm unmr.afm -v unmr.vpl -T ec.enc unmr0.tfm}
</pre>

            <p>This command reads <tt>unmr.afm</tt>, the original
            <tt>AFM</tt> file with an arbitrary encoding, and the
            encoding vector <tt>ec.enc</tt>. It creates the virtual
            font <tt>unmr.vpl</tt> and the <tt>TFM</tt> file
            <tt>unmr0.tfm</tt>.</p>

            <p>The relationship between these files is subtle. The
            <tt>AFM</tt> file contains metric information for all
            the possible glyphs<a id="id2888978" class="indexterm"
            name="id2888978"></a> in the font. The encoding file
            establishes the encoding vector---which particular
            characters occur in exactly what order. These two files
            are combined to produce character metric information
            for the specific encoding vector. This information is
            saved in the <tt>TFM</tt> file. This is a
            &#8220;raw&#8221; <tt>TFM</tt> file<a id="id2889015"
            class="indexterm" name="id2889015"></a>.<sup>[<a
            id="id2889026" name="id2889026"
            href="#ftn.id2889026">76</a>]</sup> It does not have
            any ligature or kerning information and <span
            class="emphasis"><em>may</em></span> have a different
            encoding from the virtual font (although, in this case
            it has the same encoding).</p>

            <p>The next step is to produce a virtual font from the
            <tt>VPL</tt> file<a id="id2889087" class="indexterm"
            name="id2889087"></a>:</p>
<pre class="screen">
\$ {\bf vptovf unmr.vpl unmr.vf unmr.tfm}
</pre>

            <p>This produces a virtual font file, <tt>unmr.vf</tt>,
            and an appropriate <tt>TFM</tt> file. This <tt>TFM</tt>
            file has ligature and kerning information for the
            characters in the font as well as the metrics for the
            individual glyphs.</p>

            <p>The names of the virtual font files and the related
            <tt>TFM</tt> files are entirely arbitrary. You can give
            them any names you wish. In the long run, you will
            benefit if you choose a naming scheme that allows you
            to determine which files are which simply by examining
            the names. If you have a lot of fonts, take a look at
            <span class="emphasis"><em>{Filenames for
            Fonts}</em></span>&#160;[<a
            href="bi01.html#tug:filenames-fonts">tug:filenames-fonts</a>].
            It is also available electronically from CTAN in the
            directory <tt>info/filename</tt>.</p>

            <p>Now you should install the <tt>VF</tt> and
            <tt>TFM</tt> files in the appropriate directories and
            proceed to use the <tt>unmr</tt> font. TeX will do the
            right thing because the <tt>TFM</tt> file contains the
            appropriate metric information, and the DVI driver will
            do the right thing because it has a virtual font which
            specifies how the characters should be mapped into the
            printer.</p>

            <p>Now that TeX is happy, we have the additional
            problem of making the PostScript printer happy. The
            easiest way to do this is to tell <b>dvips</b> to do it
            for us. The <tt>psfonts.map</tt> file used by
            <b>dvips</b> identifies which fonts are built into the
            printer and which fonts need to be downloaded.</p>

            <p>Each line in the <tt>psfonts.map</tt> file describes
            how a particular TeX font should be interpreted. The
            simplest lines identify the PostScript name of fonts
            built into the printer. For \linebreak</p>

            <p>example, the following line indicates that
            <b>dvips</b><a id="id2889279" class="indexterm"
            name="id2889279"></a> should use the PostScript font
            Times-Roman (which is assumed to be resident in the
            printer) everywhere that the <tt>DVI</tt> file uses the
            font <tt>rptmr</tt>:</p>
<pre class="screen">
rptmr Times-Roman
</pre>

            <p>To automatically download a PostScript font<a
            id="id2889318" class="indexterm" name="id2889318"></a>,
            add <tt>&lt;</tt><tt><i><tt>fontfile</tt></i></tt> to
            the corresponding line in the <tt>psfonts.map</tt>
            file. The following entry indicates that the PostScript
            font CharterBT-Roman should be used where
            <tt>rbchr</tt> is used in the document. In addition,
            <b>dvips</b> should download the font from the file
            <tt>/usr/local/lib/fonts/psfonts/bchr.pfa</tt> if it is
            used in the document.</p>
<pre class="screen">
rbchr CharterBT-Roman &lt;/usr/local/lib/fonts/psfonts/bchr.pfa
</pre>

            <p>Additional PostScript commands can be added to the
            entry to perform special effects. Some of these are
            described in the documentation for <b>dvips</b>. They
            require a knowledge of PostScript that is beyond the
            scope of this book.</p>

            <p>Adding the following line to <tt>psfonts.map</tt>
            will download and use the Nimbus URW font we installed
            above. (It is shown on two lines only because of the
            constraints of the page; you should enter it on one
            line):</p>
<pre class="screen">
unmr0 NimbusRomanNo9L-Regular &lt;unmr.pfa
      "ECEncoding ReEncodeFont" &lt;ec.enc
</pre>

            <p>This line identifies the font <tt>unmr0</tt> as the
            NimbusRomanNo9L-Regular PostScript font, re-encoded
            with the ECEncoding described in the file
            <tt>ec.enc</tt>. Because this font is not resident in
            the printer, you must also tell <b>dvips</b> to
            download the font from <tt>unmr.pfa</tt>. If you keep
            encoding files or PostScript fonts (<tt>PFB</tt> or
            <tt>PFA</tt> files) in nonstandard locations, you will
            have to specify the full path of <tt>ec.enc</tt> and/or
            <tt>unmr.pfa</tt>.</p>

            <p>Notice that you specify the <span
            class="emphasis"><em>raw</em></span> font in the
            <tt>psfonts.map</tt> file. TeX and <b>dvips</b> will
            use the virtual font to determine which character(s)
            from which raw font(s) should <span
            class="emphasis"><em>actually</em></span> be used to
            print your document. <b>afm2tfm</b> prints the line
            that should be added to the font map file when it is
            finished converting the font, so you don't always have
            to remember which is which.</p>

            <p>The <tt>psfonts.map</tt> file (and the encoding and
            font files) are typically stored in a system-default
            location. On unix systems, this is frequently
            <tt>/usr/local/lib/tex/ps</tt>. If you can't (or don't
            want) to change files in this directory, you can use
            your own font map file.</p>

            <p>When you run <b>dvips</b>, it loads a initialization
            file (typically <tt>~/.dvipsrc</tt>). If you put the
            following line in that file:</p>
<pre class="screen">
p +/home/jdoe/myfonts.map
</pre>

            <p>it extends the system-wide font map using the file
            <tt>/home/jdoe/myfonts.map</tt>, which has the same
            format as the <tt>psfonts.map</tt> file.</p>

            <p>If you use the <tt>&lt;font.pfa</tt> syntax in your
            font map file to download PostScript fonts, you may
            discover that <b>dvips</b> is producing very large
            output files (or takes a long time to print, if output
            is going directly to a printer). The reason is that
            <b>dvips</b> is downloading the font at the beginning
            of every document that uses it. If you have a few fonts
            that you use all the time, it may be faster and more
            convenient to download the fonts manually at the
            beginning of the day and then remove the
            <tt>&lt;font.pfa</tt> portion of the font mapping line
            (leave the encoding file, however). This will produce
            smaller output files because <b>dvips</b> will assume
            that the fonts are already downloaded. Of course, the
            trade-off is that your documents will not print
            correctly (because the appropriate fonts are not
            attached to the PostScript file) if you mail them to a
            colleague who doesn't download the same fonts you do,
            or if you forget to download the fonts again after
            someone power-cycles the printer.<sup>[<a
            id="id2889655" name="id2889655"
            href="#ftn.id2889655">77</a>]</sup></p>
          </div>

          <div class="section">
            <div class="titlepage">
              <div>
                <h4 class="title"><a id="id2889664"
                name="id2889664"></a>{Using a new PostScript font
                in TeX (for non-PostScript devices)}</h4>
              </div>
            </div>

            <p>Using PostScript fonts for screen previewing or
            printing on non-PostScript printers is a very different
            process from printing on PostScript devices. You still
            need the <tt>AFM</tt> and <tt>PFA</tt> files.</p>

            <p>This time you're going to create <tt>PK</tt> files
            with <b>ps2pk</b><a id="id2889716" class="indexterm"
            name="id2889716"></a>, so virtual fonts are less
            useful. In fact, you have to give the <tt>AFM</tt> file
            the correct encoding in order to get the right
            <tt>PK</tt> file, so we'll avoid virtual fonts
            altogether. Of course, if you need several different
            encodings (perhaps TeX Text, Cork, and Adobe Standard)
            for different documents, you'll be better off with one
            or two raw font files and several virtual fonts, but
            for the moment let's imagine that that is not the
            case.</p>

            <p>Example&#160;<a href="apd.html#ex.encafmpl"
            title="Example&#160;D.5.&#160;enc-afm.pl">Example&#160;D.5</a>
            in Appendix&#160;<a href="apd.html"
            title="Appendix&#160;D.&#160;Long Examples">Appendix&#160;D</a>,
            <span class="emphasis"><em><a href="apd.html"
            title="Appendix&#160;D.&#160;Long Examples">Appendix&#160;D</a></em></span>,
            is a Perl script that changes the encoding vector in an
            <tt>AFM</tt> file to reflect the encoding specified in
            an encoding file (like the ones used in the preceding
            section). This is an important step because
            <b>ps2pk</b> uses the encoding in the <tt>AFM</tt> file
            to determine which glyphs to render.<sup>[<a
            id="id2889816" name="id2889816"
            href="#ftn.id2889816">78</a>]</sup></p>

            <p>To install this script, save it in a file called
            <tt>enc-afm.pl</tt> and change the top of the script
            (the <tt>#!</tt> line) to reflect where Perl is
            installed on your system. Users of Perl on non-unix
            systems may have to work a little harder, or simply use
            the syntax <span class="emphasis"><em>{perl
            enc-afm.pl}</em></span> to run the script. unix users
            can create a symbolic link to <tt>enc-afm.pl</tt>
            called <tt>enc-afm</tt>, and mark it as executable.</p>

            <p>Using this script, transform <tt>unmr.afm</tt> into
            <tt>unmrX.afm</tt>:</p>
<pre class="screen">
\$ <span
class="bold"><b>enc-afm unmr.afm ec.enc &gt; unmrX.afm</b></span>
</pre>

            <p>Now the <tt>unmrX.afm</tt> file has the Cork
            encoding. We can use this file to create a <tt>TFM</tt>
            file for TeX:</p>
<pre class="screen">
\$ <span class="bold"><b>afm2tfm unmrX.afm unmr.tfm</b></span>
</pre>

            <p>This <tt>TFM</tt> file should be moved to the
            directory where you store <tt>TFM</tt> files for
            TeX.</p>

            <p>Unlike PostScript fonts on PostScript devices,
            different <tt>PK</tt> files must be created for each
            size required. As a concrete example, let's assume we
            want a 14pt font. The easiest way to create a 14pt font
            with <b>ps2pk</b> is to use the <span
            class="emphasis"><em>-P</em></span> parameter to
            specify the size. Unfortunately, this will cause some
            DVI drivers to complain because <span
            class="emphasis"><em>-P</em></span> sets the design
            size of the <tt>PK</tt> file, and it won't match the
            design size in the <tt>TFM</tt> file. A better solution
            is to determine the resolution you need with the
            following formula:</p>

            <p>$$\hbox{resolution} = {{\hbox{base resolution} *
            \hbox{point size}}\over{10}}$$</p>

            <p>The factor 10 is used because it is the nominal
            design size of PostScript fonts (at least, that's what
            <b>afm2tfm</b> uses). For example, if we are creating a
            14pt font for a 300dpi laser printer, the desired
            resolution is $300*14/10 = 420$. Now we can create the
            font:</p>
<pre class="screen">
\$ <span
class="bold"><b>ps2pk -X420 -aunmrX.afm unmr.pfa unmr.420pk</b></span>
</pre>

            <p>This command creates a 420dpi <tt>PK</tt> file using
            the <tt>AFM</tt> file <tt>unmrX.afm</tt>. The font
            source comes from <tt>unmr.pfa</tt>, and the resulting
            <tt>PK</tt> file is called <tt>unmr.pk</tt>. On MS-DOS
            systems, name the output <tt>PK</tt> file
            <tt>unmr.pk</tt> because <tt>unmr.420pk</tt> is not a
            valid filename. Move the resulting <tt>PK</tt> file to
            the appropriate directory. On unix systems, it is
            probably <tt>/usr/local/lib/tex/fonts/pk</tt>; while on
            MS-DOS and other systems, it is probably something like
            <tt>/texfonts/420dpi</tt>.</p>
          </div>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2890165"
              name="id2890165"></a>HP LaserJet Softfonts</h3>
            </div>
          </div>

          <p>Bitmapped HP LaserJet Softfonts<a id="id2890174"
          class="indexterm" name="id2890174"></a> can easily be
          converted into TeX <tt>PK</tt> files with the
          <b>SFPtoPK</b> utility. Then they can be used with almost
          any DVI driver.</p>

          <p>Scalable LaserJet Softfonts can be used by TeX if two
          conditions are met: metric information is available, and
          the DVI driver that you are using can access built-in
          printer fonts. Metric information for Scalable LaserJet
          Softfonts distributed by Hewlett-Packard come in the form
          of Tagged Font Metric files. Tagged Font Metric files
          have the extension <tt>TFM</tt>, but they should not be
          confused with TeX <tt>TFM</tt> files. The utility
          <b>hptfm2pl</b> converts Tagged Font Metric files into
          TeX <tt>PL</tt> files (<tt>PL</tt> is a human-readable
          text format of <tt>TFM</tt> files). <tt>PL</tt> files are
          transformed into <tt>TFM</tt> files by the standard TeX
          utility <b>PLtoTF</b>.</p>

          <p>To use Scalable LaserJet Softfonts, you must convert
          the metric information into TeX <tt>TFM</tt> files so
          that TeX can use the font, and then you must inform your
          DVI driver that the fonts are built into the printer.
          Before printing your document, download the Scalable
          LaserJet Softfont to your printer. The <b>sfload</b>
          utility that is part of Sfware can download Scalable
          LaserJet Fonts. Many other free and shareware font
          downloading programs exist, too.</p>
        </div>

        <div class="section">
          <div class="titlepage">
            <div>
              <h3 class="title"><a id="id2890329"
              name="id2890329"></a>TrueType Fonts</h3>
            </div>
          </div>

          <p>At present, TrueType fonts<a id="id2890338"
          class="indexterm" name="id2890338"></a> can be used only
          on systems that have built-in TrueType support (the
          Macintosh and MS-DOS computers running Microsoft Windows
          3.1 fall into this category). You must use DVI drivers
          that communicate with the printer through the system's
          printer interface.</p>
        </div>
      </div>

      <div class="footnotes">
        <br />
        <hr width="100" align="left" />

        <div class="footnote">
          <p><sup>[<a id="ftn.id2879974" name="ftn.id2879974"
          href="#id2879974">53</a>]</sup> {Some fonts may be
          preloaded in the format file. TeX does not need
          <tt>TFM</tt> files for those fonts since the metric
          information is already available.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2880211" name="ftn.id2880211"
          href="#id2880211">54</a>]</sup> {Older DVI drivers may
          still use <tt>PXL</tt> files. They are frequently stored
          in directories with names like <tt>pxl999</tt>.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2880575" name="ftn.id2880575"
          href="#id2880575">55</a>]</sup> {Actually, <tt>TFM</tt>
          files contain a little bit more information. The width of
          a space, the amount of stretch and shrink allowed between
          words, the amount of extra space allowed after a
          punctuation mark, and some specialized information used
          only in fonts for mathematics also appear in the
          <tt>TFM</tt> files<a id="id2880604" class="indexterm"
          name="id2880604"></a>. In principle, <tt>TFM</tt> files
          can contain even more information, although they rarely
          do. For a complete, detailed description of the
          information stored in a <tt>TFM</tt> file, consult
          Appendix F of <span class="emphasis"><em>The
          TeXbook</em></span>&#160;[<a
          href="bi01.html#kn:texbook">kn:texbook</a>] and <span
          class="emphasis"><em>{The TF To PL
          Processor}</em></span>&#160;[<a
          href="bi01.html#texware:tftopl">texware:tftopl</a>].}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2880810" name="ftn.id2880810"
          href="#id2880810">56</a>]</sup> {This is true even if
          your computer's natural character set is not ASCII. It is
          the responsibility of the implementor to map the
          computer's natural character set into ASCII.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2881782" name="ftn.id2881782"
          href="#id2881782">57</a>]</sup> {Actually, for math
          fonts, TeX requires several metrics that are not usually
          provided. <b>afm2tfm</b><a id="id2881795"
          class="indexterm" name="id2881795"></a> has options which
          allow you to specify these extra metrics when you convert
          the <tt>AFM</tt> file.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2882138" name="ftn.id2882138"
          href="#id2882138">58</a>]</sup> {If your MetaFont
          distribution does not include a <span
          class="emphasis"><em>tfmonly</em></span> mode, you can
          find one in the <tt>modes.mf</tt> file on CTAN. Consult
          Chapter&#160;<a href="ch11.html"
          title="Chapter&#160;11.&#160;Introducing MetaFont">Chapter&#160;11</a>,
          <span class="emphasis"><em><a href="ch11.html"
          title="Chapter&#160;11.&#160;Introducing MetaFont">Chapter&#160;11</a></em></span>,
          for more information.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2883176" name="ftn.id2883176"
          href="#id2883176">59</a>]</sup> {This doesn't mean that
          every size you want is available. See the section
          &#8220;<a href="ch05.html#sec.fonts.defnfss2"
          title="Selecting Fonts with the New Font Selection Scheme">
          the section called &#8220;Selecting Fonts with the New
          Font Selection Scheme&#8221;</a>&#8221; for information
          about defining font sizes in the NFSS.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2855832" name="ftn.id2855832"
          href="#id2855832">60</a>]</sup>
          &#8220;$\backslash$<tt>fontshape{it}</tt>$\backslash$<tt>selectfont</tt>&#8221;</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2855948" name="ftn.id2855948"
          href="#id2855948">61</a>]</sup> {One possible use of
          loading options is to inhibit hyphenation in fixed-width
          fonts intended for use in verbatim material. The loading
          options <tt>{\ hyphenchar\ font=-1}</tt> have this
          effect.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2884721" name="ftn.id2884721"
          href="#id2884721">62</a>]</sup> {The only reason that
          sizes less than 8pt need to be declared at all is that
          marginal notes (used for editorial comments while the
          book was in revision) were set in 5pt, and the logo font
          occasionally turned up in a marginal note.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2885254" name="ftn.id2885254"
          href="#id2885254">63</a>]</sup> {Under earlier versions
          of the NFSS, this problem actually resulted in an error
          rather than a warning. If you wish, you can simply ignore
          the warning; you no longer have to fix the problem.</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2885536" name="ftn.id2885536"
          href="#id2885536">64</a>]</sup> {Actually, you can
          declare a scaling factor in any font declaration,
          although it seems to make less sense for non-PostScript
          fonts.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2885557" name="ftn.id2885557"
          href="#id2885557">65</a>]</sup> {Usually, scaling fonts
          to the same x-height makes them look acceptable together,
          but depending on the particular fonts involved, a little
          more or a little less scaling may be required to achieve
          a pleasant balance.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2886286" name="ftn.id2886286"
          href="#id2886286">66</a>]</sup> {In some special versions
          of TeX, notably those for handling languages like
          Japanese, this may be extended to a much larger number,
          but the problem is the same.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2886706" name="ftn.id2886706"
          href="#id2886706">67</a>]</sup> {For a complete
          description, consult <span class="emphasis"><em>{The VP
          To VF Processor}</em></span>&#160;[<a
          href="bi01.html#texware:vptovf">texware:vptovf</a>] and
          <span class="emphasis"><em>{The VF to VP
          Processor}</em></span>&#160;[<a
          href="bi01.html#texware:vftovp">texware:vftovp</a>].}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2886754" name="ftn.id2886754"
          href="#id2886754">68</a>]</sup> {Version 2 of NFSS
          includes &#8220;encoding&#8221; as a parameter in font
          selection. In the long run, this will allow macro writers
          to hide many of these difficulties, dramatically reducing
          the burden currently placed on the user.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2887038" name="ftn.id2887038"
          href="#id2887038">69</a>]</sup> {You can retrieve the
          <b>fontinst</b> package from the CTAN archives in the
          directory <tt>fonts/utilities/fontinst</tt>.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2887238" name="ftn.id2887238"
          href="#id2887238">70</a>]</sup> {It's still a bit
          tedious, at least on slow machines, but now you can walk
          away and get a cup of coffee ;-). All the fonts will be
          built automatically.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2887312" name="ftn.id2887312"
          href="#id2887312">71</a>]</sup> {Recent versions of TeX
          derived from the \Web2C package can build <tt>TFM</tt>
          files automatically as well.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2887500" name="ftn.id2887500"
          href="#id2887500">72</a>]</sup> {OK, so not <span
          class="emphasis"><em>every</em></span> example in this
          book is in <b>Perl</b>.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2888068" name="ftn.id2888068"
          href="#id2888068">73</a>]</sup> {Before you use these
          &#8220;free&#8221; fonts, be aware that many are of
          questionable legality.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2888196" name="ftn.id2888196"
          href="#id2888196">74</a>]</sup> {PostScript fonts for the
          Macintosh are stored in <tt>PFB</tt> format (essentially)
          in the resource fork of the printer font file. The metric
          information is stored in the screen font, which also
          contains bitmaps for on-screen display.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2888763" name="ftn.id2888763"
          href="#id2888763">75</a>]</sup> {The Nimbus fonts
          actually come with <tt>TFM</tt> and <tt>VF</tt> files
          which makes some of the following steps redundant. But
          because most fonts <span
          class="emphasis"><em>don't</em></span> come with TeX
          metrics, the example is important.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2889026" name="ftn.id2889026"
          href="#id2889026">76</a>]</sup> {Raw <tt>TFM</tt> files
          used to be identified with an &#8220;r&#8221; prefix, but
          recently the trend has turned towards a &#8220;0&#8221;
          suffix. For a more complete discussion of font names,
          consult <span class="emphasis"><em>Filenames for
          Fonts</em></span>&#160;[<a
          href="bi01.html#tug:filenames-fonts">tug:filenames-fonts</a>].}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2889655" name="ftn.id2889655"
          href="#id2889655">77</a>]</sup> {Some spooling software
          will transparently handle these problems (by downloading
          fonts that you forget) if the fonts are available.}</p>
        </div>

        <div class="footnote">
          <p><sup>[<a id="ftn.id2889816" name="ftn.id2889816"
          href="#id2889816">78</a>]</sup> {This step isn't
          necessary when using a PostScript printers because the
          PostScript font always contains all the glyphs. The font
          created by <b>ps2pk</b> will only contain the characters
          in a single encoding.}</p>
        </div>
      </div>
    </div>

    <div class="navfooter">
      <table width="100%" summary="Navigation table">
        <tr>
          <td width="40%" align="left"><a
          title="Part&#160;II.&#160;Elements of a Complex Document"
          href="pt02.html"><img src="figures/nav-prev.png"
          alt="Prev" border="0" /></a>&#160;</td>

          <td width="20%" align="center"><a title="Making TeX Work"
          href="index.html"><img src="figures/nav-home.png"
          alt="Home" border="0" /></a></td>

          <td width="40%" align="right">&#160;<a
          title="Chapter&#160;6.&#160;Pictures and Figures"
          href="ch06.html"><img src="figures/nav-next.png"
          alt="Next" border="0" /></a></td>
        </tr>

        <tr>
          <td width="40%" align="left">Part&#160;II.&#160;Elements
          of a Complex Document&#160;</td>

          <td width="20%" align="center"><a
          title="Part&#160;II.&#160;Elements of a Complex Document"
          href="pt02.html"><img src="figures/nav-up.png" alt="Up"
          border="0" /></a></td>

          <td width="40%" align="right">
          &#160;Chapter&#160;6.&#160;Pictures and Figures</td>
        </tr>
      </table>
    </div>
  </body>
</html>