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
|
% \iffalse meta-comment
%
% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
% This file is part of the LaTeX base system.
% -------------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2008 or later.
%
% This file has the LPPL maintenance status "maintained".
%
% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.txt'. See also `legal.txt' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
%
% \fi
% Filename: fntguide.tex
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\documentclass{ltxguide}[1995/11/28]
\setcounter{totalnumber}{8}
\setcounter{topnumber}{8}
\usepackage[trace]{fewerfloatpages}
\usepackage{booktabs,varioref}
\title{\LaTeXe{} font selection}
\author{\copyright~Copyright 1995--2021, \LaTeX\ Project
Team.\thanks{Thanks to Arash Esbati for documenting the
newer NFSS features of 2020}\\
All rights reserved.}
\date{December 2021}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}
This document describes the new font selection features of the \LaTeX{}
Document Preparation System. It is intended for package writers who
want to write font-loading packages similar to |times| or |latexsym|.
This document is only a brief introduction to the new facilities and is
intended for package writers who are familiar with \TeX{} fonts and
\LaTeX{} packages. It is \emph{neither} a user-guide \emph{nor} a
reference manual for fonts in \LaTeXe.
\subsection{\LaTeXe~fonts}
The most important difference between \LaTeX~2.09 and \LaTeXe{} is the
way that fonts are selected. In \LaTeX~2.09, the Computer Modern fonts
were built into the \LaTeX~format, and so customizing \LaTeX{} to use
other fonts was a major effort.
In \LaTeXe, very few fonts are built into the format, and there are
commands to load new text and math fonts. Packages such as |times| or
|latexsym| allow authors to access these fonts. This document describes
how to write similar font-loading packages.
The \LaTeXe{} font selection system was first released as the `New Font
Selection Scheme' (NFSS) in 1989, and then in release~2 in 1993.
\LaTeXe{} includes NFSS release~2 as standard.
\subsection{Overview}
This document contains an overview of the new font commands of \LaTeX.
\begin{description}
\item[Section~\ref{Sec:text}] describes the commands for selecting fonts
in classes and packages. It lists the five \LaTeX{} font attributes,
and lists the commands for selecting fonts. It also describes how to
customize the author commands such as |\textrm| and |\textit| to suit
your document design.
\item[Section~\ref{Sec:math}] explains the commands for controlling
\LaTeX{} math fonts. It describes how to specify new math fonts and
new math symbols.
\item[Section~\ref{Sec:install}] explains how to install new fonts into
\LaTeX. It shows how \LaTeX{} font attributes are turned into \TeX{}
font names, and how to specify your own fonts using font definition
files.
\item[Section~\ref{Sec:encode}] discusses text font encodings. It
describes how to declare a new encoding and how to define commands,
such as |\AE| or |\"|, which have different definitions in different
encodings, depending on whether ligatures, etc.\ are available in the
encoding.
\item[Section~\ref{Sec:misc}] covers font miscellanea. It describes how
\LaTeX{} performs font substitution, how to customize fonts that are
preloaded in the \LaTeX{} format, and the naming conventions used in
\LaTeX{} font selection.
\end{description}
\subsection{Further information}
For a general introduction to \LaTeX, including the new features of
\LaTeXe, you should read \emph{\LaTeXbook}, Leslie Lamport, Addison
Wesley, 2nd~ed, 1994.
A more detailed description of the \LaTeX{} font selection scheme is to
be found in \emph{\LaTeXcomp}, 2nd~ed, by Mittelbach and Goossens,
Addison Wesley, 2004.
The \LaTeX{} font selection scheme is based on \TeX, which is described
by its developer in \emph{The \TeX book}, Donald E.~Knuth, Addison
Wesley, 1986, revised in 1991 to include the features of \TeX~3.
Sebastian Rahtz's |psnfss| software contains the software for using a
large number of Type~1 fonts (including the Adobe Laser Writer 35 and
the Monotype CD-ROM fonts) in \LaTeX. It should be available from the
same source as your copy of \LaTeX.
The |psnfss| software uses fonts generated by Alan Jeffrey's |fontinst|
software. This can convert fonts from Adobe Font Metric format into a
format readable by \LaTeX, including the generation of the font
definition files described in Section~\ref{Sec:install}. The |fontinst|
software should be available from the same source as your copy of
\LaTeX.
Whenever practical, \LaTeX{} uses the font naming scheme called
`fontname'; this was described in \emph{Filenames for fonts},%
\footnote{An up-to-date electronic version of this document can be found
on any CTAN server, in the directory \texttt{info/fontname}.}
\emph{TUGboat}~11(4),~1990.
The class-writer's guide \emph{\clsguide} describes the new \LaTeX{}
features for writers of document classes and packages and is kept in
|clsguide.tex|. Configuring \LaTeX{} is covered by the guide
\emph{\cfgguide} in \texttt{cfgguide.tex} whilst the philosophy behind
our policy on modifying \LaTeX{} is described in \emph{\modguide} in
\texttt{modguide.tex}.
The documented source code (from the files used to produce the kernel
format via |latex.ltx|) is now available as \emph{The \LaTeXe\ Sources}.
This very large document also includes an index of \LaTeX{} commands.
It can be typeset from the \LaTeX{} file |source2e.tex| in the |base|
directory; this uses the class file |ltxdoc.cls|.
For more information about \TeX{} and \LaTeX{}, please contact your
local \TeX{} Users Group, or the international \TeX{} Users Group.
Addresses and other details can be found at:
\begin{quote}\small\label{addrs}
\texttt{https://www.tug.org/lugs.html}
\end{quote}
\section{Text fonts}
\label{Sec:text}
This section describes the commands available to class and package
writers for specifying and selecting fonts.
\subsection{Text font attributes}
\label{sec:textfontattributes}
Every text font in \LaTeX{} has five \emph{attributes}:
\begin{description}
\item[encoding] This specifies the order that characters appear in the
font. The two most common text encodings used in \LaTeX{} are Knuth's
`\TeX{} text' encoding, and the `\TeX{} text extended' encoding
developed by the \TeX{} Users Group members during a \TeX{} Conference
at Cork in~1990 (hence its informal name `Cork encoding').
\item[family] The name for a collection of fonts, usually grouped under
a common name by the font foundry. For example, `Adobe Times', `ITC
Garamond', and Knuth's `Computer Modern Roman' are all font families.
\item[series] How heavy and/or expanded a font is. For example, `medium
weight', `narrow' and `bold extended' are all series.
\item[shape] The form of the letters within a font family. For example,
`italic', `oblique' and `upright' (sometimes called `roman') are all
font shapes.
\item[size] The design size of the font, for example `10pt'. If no
dimension is specified, `pt' is assumed.
\end{description}
The possible values for these attributes are given short acronyms by
\LaTeX. The most common values for the font encoding are:
\begin{center}
\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
|OT1| & \TeX{} text \\
|T1| & \TeX{} extended text \\
|OML| & \TeX{} math italic \\
|OMS| & \TeX{} math symbols \\
|OMX| & \TeX{} math large symbols \\
|U| & Unknown \\
|L<xx>| & A local encoding
\end{tabular}
\end{minipage}
\end{center}
The `local' encodings are intended for font encodings which are only
locally available, for example a font containing an organization's logo
in various sizes.
There are far too many font families to list them all, but some common
ones are:
\begin{center}
\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
|cmr| & Computer Modern Roman \\
|cmss| & Computer Modern Sans \\
|cmtt| & Computer Modern Typewriter \\
|cmm| & Computer Modern Math Italic \\
|cmsy| & Computer Modern Math Symbols \\
|cmex| & Computer Modern Math Extensions \\
|ptm| & Adobe Times \\
|phv| & Adobe Helvetica \\
|pcr| & Adobe Courier
\end{tabular}
\end{minipage}
\end{center}
\NEWdescription{2019/07/10}\label{page:seriesvalues}
The font series is denoting a combination of the weight (boldness) and
the width (amount of expansion). The standard supported for weights and
widths are:
\begin{center}
%\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
|ul| & Ultra Light \\
|el| & Extra Light \\
|l| & Light \\
|sl| & Semi Light \\
|m| & Medium (normal)\\
|sb| & Semi Bold \\
|b| & Bold \\
|eb| & Extra Bold \\
|ub| & Ultra Bold \\
\end{tabular}
\qquad
\begin{tabular}{rlr}
|uc| & Ultra Condensed & 50\% \\
|ec| & Extra Condensed & 62.5\% \\
|c| & Condensed & 75\% \\
|sc| & Semi Condensed & 87.5\% \\
|m| & Medium & 100\% \\
|sx| & Semi Expanded & 112.5\% \\
|x| & Expanded & 125\% \\
|ex| & Extra Expanded & 150\% \\
|ux| & Ultra Expanded & 200\% \\
\end{tabular}
\end{center}
These are concatenated to a single series value except that |m| is
dropped unless both weight and width are medium in which case a single
|m| is used.
Examples for series values are then:
\begin{center}
\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
|m| & Medium weight and width \\
|b| & Bold weight, medium width \\
|bx| & Bold extended \\
|sb| & Semi-bold, medium width\\
|sbx| & Semi-bold extended\\
|c| & Medium weight, condensed width
\end{tabular}
\end{minipage}
\end{center}
\NEWdescription{2019/07/10}
Note, that there are a large variety of names floating around like
``regular'', ``black'', ``demi-bold'', ``thin'', ``heavy'' and many
more. If at all possible they should be matched into the standard
naming scheme to allow for sensible default substitutions if necessary,
e.g., ``demi-bold'' is normally just another name for ``semi-bold'', so
should get |sb| assigned, etc.
\newpage
\NEWdescription{2020/02/02}
The most common values for the font shape are:
\begin{center}
\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
|n| & Normal (that is `upright' or `roman') \\
|it| & Italic \\
|sl| & Slanted (or `oblique') \\
|sc| & Caps and small caps \\
|scit| & Caps and small caps italic \\
|scsl| & Caps and small caps slanted \\
|sw| & Swash
\end{tabular}
\end{minipage}
\end{center}
A less common value for font shape is:
\begin{center}
\begin{minipage}{.7\linewidth}
\begin{tabular}{rl}
|ssc| & Spaced caps and small caps
\end{tabular}
\end{minipage}
\end{center}
and there is also |ui| for upright italic, i.e., an italic shape but
artifically turned upright. This is sometimes useful and available in
some fonts.
The font size is specified as a dimension, for example |10pt| or |1.5in|
or |3mm|; if no unit is specified, |pt| is assumed. These five
parameters specify every \LaTeX{} font, for example:
\begin{center}
\begin{tabular}{@{}r@{\,}l@{\,}c@{\,}c@{\,}cc@{}r@{}}
\multicolumn{5}{@{}c}{\emph{\LaTeX{} specification}}
& \emph{Font} & \emph{\TeX{} font name} \\
|OT1| & |cmr| & |m| & |n| & |10|
& Computer Modern Roman 10 point
& |cmr10| \\
|OT1| & |cmss| & |m| & |sl| & |1pc|
& Computer Modern Sans Oblique 1 pica
& |cmssi12| \\
|OML| & |cmm| & |m| & |it| & |10pt|
& Computer Modern Math Italic 10 point
& |cmmi10| \\
|T1| & |ptm| & |b| & |it| & |1in|
& Adobe Times Bold Italic 1 inch
& |ptmb8t at 1in|
\end{tabular}
\end{center}
These five parameters are displayed whenever \LaTeX{} gives an overfull
box warning, for example:
\begin{verbatim}
Overfull \hbox (3.80855pt too wide) in paragraph at lines 314--318
[]\OT1/cmr/m/n/10 Normally [] and [] will be iden-ti-cal,
\end{verbatim}
The author commands for fonts set the five attributes as shown in table~\vref{tab:attributes}.
\begin{table}[!tbp]
\centering
\begin{tabular}{@{}r@{\hspace{3pt}}c@{\hspace{1pt}}c@{}}
\toprule
\multicolumn{1}{c}{\emph{Author command}} & \emph{Attribute}
& \emph{Value in} |article| \emph{class} \\
\midrule
|\textnormal{..}| or |\normalfont| & family & |cmr| \\
& series & |m| \\
& shape & |n| \\ \midrule%[2pt]
|\textrm{..}| or |\rmfamily| & family & |cmr| \\
|\textsf{..}| or |\sffamily| & family & |cmss| \\
|\texttt{..}| or |\ttfamily| & family & |cmtt| \\
|\textmd{..}| or |\mdseries| & series & |m| \\
|\textbf{..}| or |\bfseries| & series & |bx| \\ \midrule%[2pt]
|\textit{..}| or |\itshape| & shape & |it| \\
|\textsl{..}| or |\slshape| & shape & |sl| \\
|\textsc{..}| or |\scshape| & shape & |sc| \\
|\textssc{..}| or |\sscshape| & shape & |ssc| \\
|\textsw{..}| or |\swshape| & shape & |sw| \\
|\textulc{..}| or |\ulcshape| & shape & |ulc| (virtual) $\to$ |n|, |it|, |sl| or |ssc| \\
|\textup{..}| or |\upshape| & shape & | up| (virtual) $\to$ |n| or |sc |\phantom{, , } \\\midrule%[2pt]
|\tiny| & size & |5pt| \\
|\scriptsize| & size & |7pt| \\
|\footnotesize| & size & |8pt| \\
|\small| & size & |9pt| \\
|\normalsize| & size & |10pt| \\
|\large| & size & |12pt| \\
|\Large| & size & |14.4pt| \\
|\LARGE| & size & |17.28pt| \\
|\huge| & size & |20.74pt| \\
|\Huge| & size & |24.88pt| \\
\bottomrule
\end{tabular}
\caption{Author font commands and their effects (article class)}\label{tab:attributes}
\end{table}
The values used by these commands are determined by the document class,
using the parameters defined in Section~\ref{Sec:text.param}.
Note that there are no author commands for selecting new encodings.
These should be provided by packages, such as the |fontenc| package.
This section does not explain how \LaTeX{} font specifications are
turned into \TeX{} font names. This is described in
Section~\ref{Sec:install}.
\newpage
\subsection{Selection commands}
The low-level commands used to select a text font are as follows.
\begin{decl}
|\fontencoding| \arg{encoding} \\
|\fontfamily| \arg{family} \qquad
|\fontseries| \arg{series} \qquad
|\fontshape| \arg{shape} \\
|\fontsize| \arg{size} \arg{baselineskip} \qquad
|\linespread| \arg{factor}
\end{decl}
\NEWdescription{1998/12/01}
Each of the commands starting with |\font...| sets one of the font
attributes; |\fontsize| also sets |\baselineskip|. The |\linespread|
command prepares to multiply the current (or newly defined)
|\baselineskip| with \m{factor} (e.g., spreads the lines apart for
values greater one).
The actual font in use is not altered by these commands, but the
current attributes are used to determine which font and baseline skip
to use after the next |\selectfont| command.
\begin{decl}
|\selectfont|
\end{decl}
Selects a text font, based on the current values of the font attributes.
\emph{Warning}: There \emph{must} be a |\selectfont| command immediately
after any settings of the font parameters by (some of) the six commands
above, before any following text. For example, it is legal to say:
\begin{verbatim}
\fontfamily{ptm}\fontseries{b}\selectfont Some text.
\end{verbatim}
but it is \emph{not} legal to say:
\begin{verbatim}
\fontfamily{ptm} Some \fontseries{b}\selectfont text.
\end{verbatim}
You may get unexpected results if you put text between a
|\font<parameter>| command (or |\linespread|) and a |\selectfont|.
\begin{decl}
|\usefont| \arg{encoding} \arg{family} \arg{series} \arg{shape}
\end{decl}
A short hand for the equivalent |\font...| commands followed by a call
to |\selectfont|.
\subsection{Internals}
The current values of the font attributes are held in internal macros.
\begin{decl}
|\f@encoding| \quad
|\f@family| \quad
|\f@series| \quad
|\f@shape| \quad
|\f@size| \quad
|\f@baselineskip| \\
|\tf@size| \quad
|\sf@size| \quad
|\ssf@size|
\end{decl}
These hold the current values of the encoding, the family, the series,
the shape, the size, the baseline skip, the main math size, the `script'
math size and the `scriptscript' math size. The last three are
accessible only within a formula; outside of math they may contain
arbitrary values.
For example, to set the size to 12 without changing the baseline skip:
\begin{verbatim}
\fontsize{12}{\f@baselineskip}
\end{verbatim}
However, you should \emph{never} alter the values of the internal
commands directly; they must only be modified using the low-level
commands like |\fontfamily|, |\fontseries|, etc. If you disobey this
warning you might produce code that loops.
\subsection{Parameters for author commands}
\label{Sec:text.param}
The parameter values set by author commands such as |\textrm| and
|\rmfamily|, etc.\ are not hard-wired into \LaTeX; instead these
commands use the values of a number of parameters set by the document
class and packages. For example, |\rmdefault| is the name of the
default family selected by |\textrm| and |\rmfamily|. Thus to set a
document in Adobe Times, Helvetica and Courier, the document designer
specifies:
\begin{verbatim}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}
\end{verbatim}
\begin{decl}
|\encodingdefault| \qquad
|\familydefault| \qquad
|\seriesdefault| \qquad
|\shapedefault|
\end{decl}
The encoding, family, series and shape of the main body font. By
default these are |OT1|, |\rmdefault|, |m| and |n|. Note that since the
default family is |\rmdefault|, this means that changing |\rmdefault|
will change the main body font of the document.
\begin{decl}
|\rmdefault| \qquad
|\sfdefault| \qquad
|\ttdefault|
\end{decl}
The families selected by |\textrm|, |\rmfamily|, |\textsf|, |\sffamily|,
|\texttt| and |\ttfamily|. By default these are |cmr|, |cmss| and
|cmtt|.
\begin{decl}
|\bfdefault| \qquad
|\mddefault|
\end{decl}
The series selected by |\textbf|, |\bfseries|, |\textmd| and
|\mdseries|. By default these are |bx| and |m|. These values are
suitable for the default families used. If other fonts are used as
standard document fonts (for example, certain PostScript fonts) it might
be necessary to adjust the value of |\bfdefault| to |b| since only a few
such families have a `bold extended' series. An alternative (taken for
the fonts provided by |psnfss|) is to define silent substitutions from
|bx| series to |b| series with special |\DeclareFontShape| declarations
and the |ssub| size function, see Section~\ref{sec:sizefunct}.
\begin{decl}
|\itdefault| \qquad
|\sldefault| \qquad
|\scdefault| \qquad
|\sscdefault| \qquad
|\swdefault| \\
|\ulcdefault| \qquad
|\updefault|
\end{decl}
\NEWfeature{2020/02/02}
The shapes selected by |\textit|, |\itshape|, |\textsl|, |\slshape|,
|\textsc|, |\scshape|, |\textssc|, |\sscshape|, |\textsw|, |\swshape|,
|\textulc|, |\ulcshape|, |\textup| and |\upshape|. By default these are
|it|, |sl|, |sc|, |ssc|, |sw|, |ulc| and |up|. Note that |ulc| and |up| are special here
because they are virtual shapes; they don't exist as real shape values. Instead they alter
the existing shape value based on rules, i.e., the result depends on context. The
respective macros |\textulc| or |\ulcshape| change small capitals back
to upper/lower case but will not change the font with respect to
italics, slanted or swash. |\upshape| or |\textup| in contrast will
switch italics or slanted back to upright but not alter the state of
upper/lower case, e.g., keep small capitals if present. Finally, the
command |\normalshape| is provided to reset the shape back to normal
which is a shorthand for |\upshape\ulcshape|.
Note that there are no parameters for the size commands. These should
be defined directly in class files, for example:
\begin{verbatim}
\renewcommand{\normalsize}{\fontsize{10}{12}\selectfont}
\end{verbatim}
More elaborate examples (setting additional parameters when the text
size is changed) can be found in |classes.dtx| the source documentation
for the classes |article|, |report|, and |book|.
\subsection{Special font declaration commands}
\begin{decl}
|\DeclareFixedFont| \arg{cmd} \arg{encoding} \arg{family} \arg{series}
\arg{shape} \arg{size}
\end{decl}
Declares command \m{cmd} to be a font switch which selects the font that
is specified by the attributes \m{encoding}, \m{family}, \m{series},
\m{shape}, and \m{size}.
The font is selected without any adjustments to baselineskip and other
surrounding conditions.
This example makes |{\picturechar .}| select a small dot very quickly:
\begin{verbatim}
\DeclareFixedFont{\picturechar}{OT1}{cmr}{m}{n}{5}
\end{verbatim}
\begin{decl}
|\DeclareTextFontCommand| \arg{cmd} \arg{font-switches}
\end{decl}
Declares command \m{cmd} to be a font command with one argument. The
current font attributes are locally modified by \m{font-switches} and
then the argument of \m{cmd} is typeset in the resulting new font.
Commands defined by |\DeclareTextFontCommand| automatically take care of
any necessary italic correction (on either side).
The following example shows how |\textrm| is defined by the kernel.
\begin{verbatim}
\DeclareTextFontCommand{\textrm}{\rmfamily}
\end{verbatim}
To define a command that always typeset its argument in the italic shape
of the main document font you could declare:
\begin{verbatim}
\DeclareTextFontCommand{\normalit}{\normalfont\itshape}
\end{verbatim}
This declaration can be used to change the meaning of a command; if
\m{cmd} is already defined, a log that it has been redefined is put in
the transcript file.
\begin{decl}
|\DeclareOldFontCommand| \arg{cmd} \arg{text-switch}
\arg{math-switch}
\end{decl}
Declares command \m{cmd} to be a font switch (i.e.~used with the
syntax |{<cmd>...}|) having the definition \m{text-switch}
when used in text and the definition \m{math-switch} when used in a
formula.
Math alphabet commands, like |\mathit|, when used within \m{math-switch}
should not have an argument. Their use in this argument causes their
semantics to change so that they here act as a font switch, as
required by the usage of the \m{cmd}.
This declaration is useful for setting up commands like |\rm| to behave
as they did in \LaTeX~2.09. We strongly urge you \emph{not} to misuse
this declaration to invent new font commands.
\newpage
The following example defines |\it| to produce the italic shape of the
main document font if used in text and to switch to the font that would
normally be produced by the math alphabet |\mathit| if used in a
formula.
\begin{verbatim}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\end{verbatim}
This declaration can be used to change the meaning of a command; if
\m{cmd} is already defined, a log that it has been redefined is put in
the transcript file.
\section{Math fonts}
\label{Sec:math}
This section describes the commands available to class and package
writers for specifying math fonts and math commands.
\subsection{Math font attributes}
The selection of fonts within math mode is quite different to that of
text fonts.
Some math fonts are selected explicitly by one-argument commands such as
|\mathsf{max}| or |\mathbf{vec}|; such fonts are called \emph{math
alphabets}. These math alphabet commands affect only the font used
for letters and symbols of type |\mathalpha| (see
Section~\ref{Sec:math.commands}); other symbols within the argument will
be left unchanged. The predefined math alphabets are:
\begin{center}
\begin{tabular}{ccc}
\emph{Alphabet} & \emph{Description} & \emph{Example} \\
|\mathnormal| & default & $abcXYZ$ \\
|\mathrm| & roman & $\mathrm{abcXYZ}$ \\
|\mathbf| & bold roman & $\mathbf{abcXYZ}$ \\
|\mathsf| & sans serif & $\mathsf{abcXYZ}$ \\
|\mathit| & text italic & $\mathit{abcXYZ}$ \\
|\mathtt| & typewriter & $\mathtt{abcXYZ}$ \\
|\mathcal| & calligraphic & $\mathcal{XYZ}$
\end{tabular}
\end{center}
Other math fonts are selected implicitly by \TeX{} for symbols, with
commands such as |\oplus| (producing $\oplus$) or with straight
characters like |>>| or |+|. Fonts containing such math symbols are
called \emph{math symbol fonts}. The predefined math symbol fonts are:
\begin{center}
\begin{tabular}{ccc}
\emph{Symbol font} & \emph{Description} & \emph{Example} \\
|operators| & symbols from |\mathrm| & $[\;+\;]$ \\
|letters| & symbols from |\mathnormal| & $<<\star>>$ \\
|symbols| & most \LaTeX{} symbols & $\leq*\geq$ \\
|largesymbols| & large symbols & $\sum\prod\int$
\end{tabular}
\end{center}
Some math fonts are both \emph{math alphabets} and \emph{math symbol
fonts}, for example |\mathrm| and |operators| are the same font, and
|\mathnormal| and |letters| are the same font.
Math fonts in \LaTeX{} have the same five attributes as text fonts:
encoding, family, series, shape and size. However, there are no
commands that allow the attributes to be individually changed. Instead,
the conversion from math fonts to these five attributes is controlled by
the \emph{math version}. For example, the |normal| math version maps:
\begin{center}
\begin{tabular}{rlc@{ }c@{ }c@{ }c}
\multicolumn{2}{c}{\emph{Math font}} &
\multicolumn{4}{c}{\emph{External font}} \\
\emph{Alphabets} & \emph{Symbol fonts} &
\multicolumn{4}{c}{\emph{Attributes}} \\
|\mathnormal| & |letters| & |OML| & |cmm| & |m| & |it| \\
|\mathrm| & |operators| & |OT1| & |cmr| & |m| & |n| \\
|\mathcal| & |symbols| & |OMS| & |cmsy| & |m| & |n| \\
& |largesymbols| & |OMX| & |cmex| & |m| & |n| \\
|\mathbf| & & |OT1| & |cmr| & |bx| & |n| \\
|\mathsf| & & |OT1| & |cmss| & |m| & |n| \\
|\mathit| & & |OT1| & |cmr| & |m| & |it| \\
|\mathtt| & & |OT1| & |cmtt| & |m| & |n|
\end{tabular}
\end{center}
The |bold| math version is similar except that it contains bold fonts.
The command |\boldmath| selects the |bold| math version.
Math versions can only be changed outside of math mode.
The two predefined math versions are:
\begin{center}
\begin{tabular}{rl}
|normal| & the default math version \\
|bold| & the bold math version
\end{tabular}
\end{center}
Packages may define new math alphabets, math symbol fonts, and math
versions. This section describes the commands for writing such
packages.
\subsection{Selection commands}
There are no commands for selecting symbol fonts. Instead, these are
selected indirectly through symbol commands like |\oplus|.
Section~\ref{Sec:math.commands} explains how to define symbol commands.
\begin{decl}
|\mathnormal{<math>}| \quad
|\mathcal{<math>}| \quad
|\mathbf{<math>}| \quad
|\mathit{<math>}| \\
|\mathrm{<math>}| \qquad
|\mathsf{<math>}| \qquad
|\mathtt{<math>}|
\end{decl}
Each math alphabet is a command which can only be used inside math mode.
For example, |$x + \mathsf{y} + \mathcal{Z}$| produces
$x + \mathsf{y} + \mathcal{Z}$.
\begin{decl}
|\mathversion{<version>}|
\end{decl}
This command selects a math version; it can only be used outside math
mode. For example, |\boldmath| is defined to be |\mathversion{bold}|.
\subsection{Declaring math versions}
\begin{decl}
|\DeclareMathVersion| \arg{version}
\end{decl}
Defines \m{version} to be a math version.
The newly declared version is initialized with the defaults for all
symbol fonts and math alphabets declared so far (see the commands
|\DeclareSymbolFont| and |\DeclareMathAlphabet|).
If used on an already existing version, an information message is
written to the transcript file and all previous |\SetSymbolFont| or
|\SetMathAlphabet| declarations for this version are overwritten by the
math alphabet and symbol font defaults, i.e.~one ends up with a virgin
math version.
Example:
\begin{verbatim}
\DeclareMathVersion{normal}
\end{verbatim}
\subsection{Declaring math alphabets}
\begin{decl}
|\DeclareMathAlphabet| \arg{math-alph} \arg{encoding} \arg{family}
\arg{series} \arg{shape}
\end{decl}
\NEWdescription{1997/12/01}
If this is the first declaration for \m{math-alph} then a new math
alphabet with this as its command name is created.
The arguments \m{encoding} \m{family} \m{series} \m{shape} are used to
set, or reset, the default values for this math alphabet in all math
versions; if required, these must be further reset later for a
particular math version by a |\SetMathAlphabet| command.
If \m{shape} is empty then this \m{math-alph} is declared to be invalid
in all versions, unless it is set by a later |\SetMathAlphabet| command
for a particular math version.
Checks that the command \m{math-alph} is either already a math alphabet
command or is undefined; and that \m{encoding} is a known encoding
scheme, i.e., has been previously declared.
In these examples, |\foo| is defined for all math versions but |\baz|,
by default, is defined nowhere.
\begin{verbatim}
\DeclareMathAlphabet{\foo}{OT1}{cmtt}{m}{n}
\DeclareMathAlphabet{\baz}{OT1}{}{}{}
\end{verbatim}
\begin{decl}
|\SetMathAlphabet| \arg{math-alph} \arg{version}\\
\null\hfill \arg{encoding} \arg{family} \arg{series} \arg{shape}
\end{decl}
Changes, or sets, the font for the math alphabet \m{math-alph} in math
version \m{version} to \m{encoding}\m{family}\m{series}\m{shape}.
Checks that \m{math-alph} has been declared as a math alphabet,
\m{version} is a known math version and \m{encoding} is a known encoding
scheme.
\newpage
This example defines |\baz| for the `normal' math version only:
\begin{verbatim}
\SetMathAlphabet{\baz}{normal}{OT1}{cmss}{m}{n}
\end{verbatim}
Note that this declaration is not used for all math alphabets:
Section~\ref{sec:symalph} describes |\DeclareSymbolFontAlphabet|, which
is used to set up math alphabets contained in fonts which have been
declared as symbol fonts.
\subsection{Declaring symbol fonts}
\label{sec:symalph}
\begin{decl}
|\DeclareSymbolFont| \arg{sym-font} \arg{encoding} \arg{family}
\arg{series} \arg{shape}
\end{decl}
\NEWdescription{1997/12/01}
If this is the first declaration for \m{sym-font} then a new symbol font
with this name is created (i.e.~this identifier is assigned to a new
\TeX{} math group).
The arguments \m{encoding} \m{family} \m{series} \m{shape} are used to
set, or reset. the default values for this symbol font in \emph{all}
math versions; if required, these must be further reset later for a
particular math version by a |\SetSymbolFont| command.
Checks that \m{encoding} is a declared encoding scheme.
For example, the following sets up the first four standard math symbol
fonts:
\begin{verbatim}
\DeclareSymbolFont{operators}{OT1}{cmr}{m}{n}
\DeclareSymbolFont{letters}{OML}{cmm}{m}{it}
\DeclareSymbolFont{symbols}{OMS}{cmsy}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
\end{verbatim}
\begin{decl}
|\SetSymbolFont| \arg{sym-font} \arg{version}\\
\null\hfill \arg{encoding} \arg{family} \arg{series} \arg{shape}
\end{decl}
Changes the symbol font \m{sym-font} for math version \m{version} to
\m{encoding} \m{family} \m{series} \m{shape}.
Checks that \m{sym-font} has been declared as a symbol font, \m{version}
is a known math version and \m{encoding} is a declared encoding scheme.
For example, the following come from the set up of the `bold' math
version:
\begin{verbatim}
\SetSymbolFont{operators}{bold}{OT1}{cmr}{bx}{n}
\SetSymbolFont{letters}{bold}{OML}{cmm}{b}{it}
\end{verbatim}
\begin{decl}
|\DeclareSymbolFontAlphabet| \arg{math-alph} \arg{sym-font}
\end{decl}
\NEWdescription{1997/12/01}
Allows the previously declared symbol font \m{sym-font} to be the math
alphabet with command \m{math-alph} in \emph{all} math versions.
Checks that the command \m{math-alph} is either already a math alphabet
command or is undefined; and that \m{sym-font} is a symbol font.
\newpage
Example:
\begin{verbatim}
\DeclareSymbolFontAlphabet{\mathrm}{operators}
\DeclareSymbolFontAlphabet{\mathcal}{symbols}
\end{verbatim}
This declaration should be used in preference to |\DeclareMathAlphabet|
and |\SetMathAlphabet| when a math alphabet is the same as a symbol
font; this is because it makes better use of the limited number (only
16) of \TeX's math groups.
\NEWdescription{1997/12/01}
Note that, whereas a \TeX{} math group is allocated to each symbol font
when it is first declared, a math alphabet uses a \TeX{} math group only
when its command is used within a math formula.
\subsection{Declaring math symbols}
\label{Sec:math.commands}
\begin{decl}
|\DeclareMathSymbol| \arg{symbol} \arg{type} \arg{sym-font}
\arg{slot}
\end{decl}
The \m{symbol} can be either a single character such as `|>>|', or a
macro name, such as |\sum|.
Defines the \m{symbol} to be a math symbol of type \m{type} in slot
\m{slot} of symbol font \m{sym-font}. The \m{type} can be given as a
number or as a command:
\begin{center}
\begin{tabular}{ccc}
\emph{Type} & \emph{Meaning} & \emph{Example} \\
|0| or |\mathord | & Ordinary & $\alpha$ \\
|1| or |\mathop | & Large operator & $\sum$ \\
|2| or |\mathbin | & Binary operation & $\times$ \\
|3| or |\mathrel | & Relation & $\leq$ \\
|4| or |\mathopen | & Opening & $\langle$ \\
|5| or |\mathclose| & Closing & $\rangle$ \\
|6| or |\mathpunct| & Punctuation & $;$ \\
|7| or |\mathalpha| & Alphabet character & $A$
\end{tabular}
\end{center}
Only symbols of type |\mathalpha| will be affected by math alphabet
commands: within the argument of a math alphabet command they will
produce the character in slot \m{slot} of that math alphabet's font.
Symbols of other types will always produce the same symbol (within one
math version).
|\DeclareMathSymbol| allows a macro \m{symbol} to be redefined only if
it was previously defined to be a math symbol. It also checks that the
\m{sym-font} is a declared symbol font.
Example:
\begin{verbatim}
\DeclareMathSymbol{\alpha}{0}{letters}{"0B}
\DeclareMathSymbol{\lessdot}{\mathbin}{AMSb}{"0C}
\DeclareMathSymbol{\alphld}{\mathalpha}{AMSb}{"0C}
\end{verbatim}
\newpage
\begin{decl}
|\DeclareMathDelimiter| \arg{cmd} \arg{type}
\arg{sym-font-1} \arg{slot-1}\\
\null\hfill \arg{sym-font-2} \arg{slot-2}
\end{decl}
Defines \m{cmd} to be a math delimiter where the small variant is in
slot \m{slot-1} of symbol font \m{sym-font-1} and the large variant is
in slot \m{slot-2} of symbol font \m{sym-font-2}. Both symbol fonts
must have been declared previously.
Checks that \m{sym-font-i} are both declared symbol fonts.
If \TeX{} is not looking for a delimiter, \m{cmd} is treated just as if
it had been defined with |\DeclareMathSymbol| using \m{type},
\m{sym-font-1} and \m{slot-1}. In other words, if a command is defined
as a delimiter then this automatically defines it as a math symbol.
\NEWdescription{1998/06/01}
In case \m{cmd} is a single character such as `|[|', the same syntax is
used. Previously the \arg{type} argument was not present (and thus the
corresponding math symbol declaration had to be provided separately).
Example:
\begin{verbatim}
\DeclareMathDelimiter{\langle}{\mathopen}{symbols}{"68}
{largesymbols}{"0A}
\DeclareMathDelimiter{(} {\mathopen}{operators}{"28}
{largesymbols}{"00}
\end{verbatim}
\begin{decl}
|\DeclareMathAccent| \arg{cmd} \arg{type} \arg{sym-font} \arg{slot}
\end{decl}
Defines \m{cmd} to act as a math accent.
The accent character comes from slot \m{slot} in \m{sym-font}. The
\m{type} can be either |\mathord| or |\mathalpha|; in the latter case
the accent character changes font when used in a math alphabet.
Example:
\begin{verbatim}
\DeclareMathAccent{\acute}{\mathalpha}{operators}{"13}
\DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
\end{verbatim}
\begin{decl}
|\DeclareMathRadical| \arg{cmd}
\arg{sym-font-1} \arg{slot-1}\\
\null\hfill \arg{sym-font-2} \arg{slot-2}
\end{decl}
Defines \m{cmd} to be a radical where the small variant is in slot
\m{slot-1} of symbol font \m{sym-font-1} and the large variant is in
slot \m{slot-2} of symbol font \m{sym-font-2}. Both symbol fonts must
have been declared previously.
Example (probably the only use for it!):
\begin{verbatim}
\DeclareMathRadical{\sqrt}{symbols}{"70}{largesymbols}{"70}
\end{verbatim}
\subsection{Declaring math sizes}
\begin{decl}
|\DeclareMathSizes| \arg{t-size} \arg{mt-size} \arg{s-size}
\arg{ss-size}
\end{decl}
Declares that \m{mt-size} is the (main) math text size, \m{s-size} is
the `script' size and \m{ss-size} the `scriptscript' size to be used in
math, when \m{t-size} is the current text size. For text sizes for which
no such declaration is given the `script' and `scriptscript' size will
be calculated and then fonts are loaded for the calculated sizes or the
best approximation (this may result in a warning message).
Normally, \m{t-size} and \m{mt-size} will be identical; however, if, for
example, PostScript text fonts are mixed with bit-map math fonts then
you may not have available a \m{mt-size} for every \m{t-size}.
Example:
\begin{verbatim}
\DeclareMathSizes{13.82}{14.4}{10}{7}
\end{verbatim}
\section{Font installation}
\label{Sec:install}
This section explains how \LaTeX's font attributes are turned into
\TeX{} font specifications.
\subsection{Font definition files}
\NEWdescription{1997/12/01}
The description of how \LaTeX{} font attributes are turned into \TeX{}
fonts is usually kept in a \emph{font definition file} (|.fd|). The
file for family \m{family} in encoding \m{ENC} must be called
|<enc><family>.fd|: for example, |ot1cmr.fd| for Computer Modern Roman
with encoding |OT1| or |t1ptm.fd| for Adobe Times with encoding |T1|.
Note that encoding names are converted to lowercase when used as part of
file names.
Whenever \LaTeX{} encounters an encoding/family combination that it does
not know (e.g.~if the document designer says
|\fontfamily{ptm}\selectfont|) then \LaTeX{} attempts to load the
appropriate |.fd| file. ``Not known'' means: there was no
|\DeclareFontFamily| declaration issued for this encoding/family
combination. If the |.fd| file could not be found, a warning is issued
and font substitutions are made.
The declarations in the font definition file are responsible for telling
\LaTeX{} how to load fonts for that encoding/family combination.
\subsection{Font definition file commands}
\emph{Note}: A font definition file should contain only commands from
this subsection.
Note that these commands can also be used outside a font definition
file: they can be put in package or class files, or even in the preamble
of a document.
\begin{decl}
|\ProvidesFile{<file-name>}[<release-info>]|
\end{decl}
The file should announce itself with a |\ProvidesFile| command, as
described in \emph{\clsguide}.
\newpage
For example:
\begin{verbatim}
\ProvidesFile{t1ptm.fd}[1994/06/01 Adobe Times font definitions]
\end{verbatim}
Spaces within the arguments specific to font definition files are
ignored to avoid surplus spaces in the document. If a real space is
necessary use |\space|.
\NEWdescription{2004/02/10}
However, note that this is only true if the declaration is made at top
level! If used within the definition of another command, within
|\AtBeginDocument|, option code or in similar places, then spaces within
the argument will remain and may result in incorrect table entries.
\begin{decl}
|\DeclareFontFamily| \arg{encoding} \arg{family} \arg{loading-settings}
\end{decl}
Declares a font family \m{family} to be available in encoding scheme
\m{encoding}.
The \m{loading-settings} are executed immediately after loading any font
with this encoding and family.
Checks that \m{encoding} was previously declared.
This example refers to the Computer Modern Typewriter font family in the
Cork encoding:
\begin{verbatim}
\DeclareFontFamily{T1}{cmtt}{\hyphenchar\font=-1}
\end{verbatim}
Each |.fd| file should contain exactly one |\DeclareFontFamily| command,
and it should be for the appropriate encoding/family combination.
\begin{decl}
|\DeclareFontShape| \arg{encoding} \arg{family} \arg{series}
\arg{shape}\\
\null\hfill \arg{loading-info} \arg{loading-settings}
\end{decl}
Declares a font shape combination; here \m{loading-info} contains the
information that combines sizes with external fonts. The syntax is
complex and is described in Section~\ref{sec:loadinfo} below.
The \m{loading-settings} are executed after loading any font with this
font shape. They are executed immediately after the `loading-settings'
which were declared by |\DeclareFontFamily| and so they can be used to
overwrite the settings made at the family level.
Checks that the combination \m{encoding}\m{family} was previously
declared via |\DeclareFontFamily|.
Example:
\begin{verbatim}
\DeclareFontShape{OT1}{cmr}{m}{sl}{%
<<5-8>> sub * cmr/m/n
<<8>> cmsl8
<<9>> cmsl9
<<10>> <<10.95>> cmsl10
<<12>> <<14.4>> <<17.28>> <<20.74>> <<24.88>> cmsl12
}{}
\end{verbatim}
The file can contain any number of |\DeclareFontShape| commands, which
should be for the appropriate \m{encoding} and \m{family}.
\NEWfeature{1996/06/01}
The font family declarations for the |OT1|-encoded fonts now all
contain:
\begin{verbatim}
\hyphenchar\font=`\-
\end{verbatim}
This enables the use of an alternative |\hyphenchar| in other encodings
whilst maintaining the correct value for all fonts.
\NEWfeature{2020/02/02} According to NFSS conventions the series value
should be a combination of weight and width abbreviated each with one or
two letters as described on page~\pageref{page:seriesvalues}. In
particular it should not contain an ``\texttt{m}'' unless it
consists of just one character. In the past incorrect values such as
``\texttt{cm}'' were simply accepted, but since this now leads to
problems with the extended mechanism, the correct syntax is now
enforced.
More exactly, if the series values is a member of a specific set of
values (\texttt{ulm}, \texttt{elm}, \texttt{lm}, \texttt{slm},
\texttt{mm}, \texttt{sbm}, \texttt{bm}, \texttt{ebm}, \texttt{ubm},
\texttt{muc}, \texttt{mec}, \texttt{mc}, \texttt{msc}, \texttt{msx},
\texttt{mx}, \texttt{mex} or \texttt{mux}) it is assumed to be in
incorrect NFSS notation and so a warning is given and a surplus
``\texttt{m}'' is dropped. Other values are not touched to allow for
the usage of values like ``\texttt{semibold}'' or ``\texttt{medium}'' as
used by the \texttt{autoinst} program.
\subsection{Font file loading information}
\label{sec:loadinfo}
The information which tells \LaTeX{} exactly which font (\texttt{.tfm})
files to load is contained in the \m{loading-info} part of a
|\DeclareFontShape| declaration. This part consists of one or more
\m{fontshape-decl}s, each of which has the following form:
\begin{center}
\begin{tabular}{r@{ $::=$ }l}
\m{fontshape-decl} & \m{size-infos} \m{font-info} \\
\m{size-infos} & \m{size-infos} \m{size-info} $\mid$
\m{size-info} \\
\m{size-info} & ``|<<|'' \m{number-or-range} ``|>>|'' \\
\m{font-info} & $[$ \m{size-function} ``|*|'' $]$
$[$ ``|[|'' \m{optarg} ``|]|'' $]$ \m{fontarg} \\
\end{tabular}
\end{center}
The \m{number-or-range} denotes the size or size-range for which this
entry applies.
If it contains a hyphen it is a range: lower bound on the left (if
missing, zero implied), upper bound on the right (if missing, $\infty$
implied). For ranges, the upper bound is \emph{not} included in the
range and the lower bound is.
Examples:
\begin{center}
\begin{tabular}{lll}
|<<10>>| & simple size & 10pt only \\
|<<-8>>| & range & all sizes less than 8pt \\
|<<8-14.4>>| & range & all sizes greater than or equal to 8pt \\
& & \ but less than 14.4pt \\
|<<14.4->>| & range & all sizes greater than or equal 14.4pt
\end{tabular}
\end{center}
If more than one \m{size-info} entry follows without any intervening
\m{font-info}, they all share the next \m{font-info}.
The \m{size-function}, if present, handles the use of \m{font-info}. If
not present, the `empty' \m{size-function} is assumed.
All the \m{size-info}s are inspected in the order in which they appear
in the font shape declaration. If a \m{size-info} matches the requested
size, its \m{size-function} is executed. If |\external@font| is
non-empty afterwards this process stops, otherwise the next
\m{size-info} is inspected. (See also |\DeclareSizeFunction|.)
If this process does not lead to a non-empty |\external@font|, \LaTeX{}
tries the nearest simple size. If the entry contains only ranges an
error is returned.
\subsection{Size functions}
\label{sec:sizefunct}
\LaTeX{} provides the following size functions, whose `inputs' are
\m{fontarg} and \m{optarg} (when present).
\begin{description}
\item[`' (empty)]
Load the external font \m{fontarg} at the user-requested size. If
\m{optarg} is present, it is used as the scale-factor.
\item[s]
Like the empty function but without terminal warnings, only
loggings.
\item[gen]
Generates the external font from \m{fontarg} followed by the
user-requested size, e.g.~|<<8>> <<9>> <<10>> gen * cmtt|
\item[sgen]
Like the `gen' function but without terminal warnings, only loggings.
\item[genb]
\NEWfeature{1995/12/01}
Generates the external font from \m{fontarg} followed by the
user-requested size, using the conventions of the `ec' fonts.
e.g.~|<<10.98>> genb * dctt| produces |dctt1098|.
\item[sgenb]
\NEWfeature{1995/12/01}
Like the `genb' function but without terminal warnings, only loggings.
\item[sub]
Tries to load a font from a different font shape declaration given by
\m{fontarg} in the form \m{family}|/|\m{series}|/|\m{shape}.
\item[ssub]
Silent variant of `sub', only loggings.
\item[alias]
\NEWfeature{2019/10/15}
Same as `ssub' but with a different logging message. Intended for
cases where the substitution is only done to change the name, e.g.,
going from \texttt{regular} series to the official name \texttt{m}. In
that case given a warning that some shape is not found is not correct.
\item[subf]
Like the empty function but issues a warning that it has to substitute
the external font \m{fontarg} because the desired font shape was not
available in the requested size.
\item[ssubf]
Silent variant of `subf', only loggings.
\item[fixed]
Load font \m{fontarg} as is, disregarding the user-requested size. If
present, \m{optarg} gives the ``at \ldots pt'' size to be used.
\item[sfixed]
Silent variant of `fixed', only loggings.
\end{description}
Examples for the use of most of the above size functions can be found in
the file |cmfonts.fdd|---the source for the standard |.fd| files
describing the Computer Modern fonts by Donald Knuth.
\begin{decl}
|\DeclareSizeFunction| \arg{name} \arg{code}
\end{decl}
Declares a size-function \m{name} for use in |\DeclareFontShape|
commands. The interface is still under development but there should be
no real need to a define new size functions.
The \m{code} is executed when the size or size-range in
|\DeclareFontShape| matches the user-requested size.
The arguments of the size-function are automatically parsed and placed
into |\mandatory@arg| and |\optional@arg| for use in \m{code}. Also
available, of course, is |\f@size|, which is the user-requested size.
To signal success \m{code} must define the command |\external@font| to
contain the external name and any scaling options (if present) for the
font to be loaded.
This example sets up the `empty' size function (simplified):
\begin{verbatim}
\DeclareSizeFunction{}
{\edef\external@font{\mandatory@arg\space at\f@size}
\end{verbatim}
\section{Encodings}
\label{Sec:encode}
This section explains how to declare and use new font encodings and how
to declare commands for use with particular encodings.
\subsection{The \textsf{fontenc} package}
Users can select new font encodings using the |fontenc| package. The
|fontenc| package has options for encodings; the last option becomes the
default encoding. For example, to use the |OT2| (Washington University
Cyrillic encoding) and |T1| encodings, with |T1| as the default, an
author types:
\begin{verbatim}
\usepackage[OT2,T1]{fontenc}
\end{verbatim}
\NEWdescription{1997/12/01}
For each font encoding \m{ENC} given as an option, this package loads
the \emph{encoding definition} (|<enc>enc.def|, with an all lower-case
name) file; it also sets |\encodingdefault| to be the last encoding in
the option list.
The declarations in the encoding definition file |<enc>enc.def| for
encoding \m{ENC} are responsible for declaring this encoding and telling
\LaTeX{} how to produce characters in this encoding; this file should
contain nothing else (see Section~\ref{Sec:encode.def}.
The standard \LaTeX{} format declares the |OT1| and |T1| text encodings
by inputting the files |ot1enc.def| and |t1enc.def|; it also sets up
various defaults which require that |OT1|-encoded fonts are available.
Other encoding set-ups might be added to the distribution at a later
stage.
Thus the example above loads the files |ot2enc.def| and |t1enc.def| and
sets |\encodingdefault| to |T1|.
\emph{Warning}: If you wish to use |T1|-encoded fonts other than the
`cmr' family then you may need to load the package (e.g.~\texttt{times})
that selects the fonts \emph{before} loading \texttt{fontenc} (this
prevents the system from attempting to load any |T1|-encoded fonts from
the `cmr' family).
\subsection{Encoding definition file commands}
\label{Sec:encode.def}
\emph{Note}: An encoding definition file should contain only commands
from this subsection.
\NEWdescription{2019/07/10}
As an exception it may also contain a |\DeclareFontsubstitution|
declaration (described in \ref{sec:encoding-defaults}) to specify how
font substitution for this encoding should be handled. In that case it
is important that the values used point to a font that is guaranteed to
be available on all \LaTeX{} installations.\footnote{If the font
encoding file is made available as part of a CTAN bundle, that could
be a font that is provided together with that bundle, but it should
not point to font which requires further installation steps and
therefore may or may not be installed.}
\NEWdescription{1997/12/01}
As with the font definition file commands, it is also possible (although
normally not necessary) to use these declarations directly within a
class or package file.
\emph{Warning}: Some aspects of the contents of font definition files
are still under development. Therefore, the current versions of the
files |ot1enc.def| and |t1enc.def| are temporary versions and should not
be used as models for producing further such files. For further
information you should read the documentation in |ltoutenc.dtx|.
\begin{decl}
|\ProvidesFile{<file-name>}[<release-info>]|
\end{decl}
The file should announce itself with a |\ProvidesFile| command,
described in \emph{\clsguide}. For example:
\begin{verbatim}
\ProvidesFile{ot2enc.def}
[1994/06/01 Washington University Cyrillic encoding]
\end{verbatim}
\begin{decl}
|\DeclareFontEncoding| \arg{encoding} \arg{text-settings}
\arg{math-settings}
\end{decl}
Declares a new encoding scheme \m{encoding}.
The \m{text-settings} are declarations which are executed every time
|\selectfont| changes the encoding to be \m{encoding}.
The \m{math-settings} are similar but are for math alphabets. They are
executed whenever a math alphabet with this encoding is called.
\NEWfeature{1998/12/01}
It also saves the value of \m{encoding} in the macro
|\LastDeclaredEncoding|.
Example:
\begin{verbatim}
\DeclareFontEncoding{OT1}{}{}
\end{verbatim}
Some author commands need to change their definition depending on which
encoding is currently in use. For example, in the |OT1| encoding, the
letter `\AE' is in slot |"1D|, whereas in the |T1| encoding it is in
slot |"C6|. So the definition of |\AE| has to change depending on
whether the current encoding is |OT1| or |T1|. The following commands
allow this to happen.
\begin{decl}
|\DeclareTextCommand| \arg{cmd} \arg{encoding}
\oarg{num} \oarg{default} \arg{definition}
\end{decl}
This command is like |\newcommand|, except that it defines a command
which is specific to one encoding. For example, the definition of |\k|
in the |T1| encoding is:
\begin{verbatim}
\DeclareTextCommand{\k}{T1}[1]
{\oalign{\null#1\crcr\hidewidth\char12}}
\end{verbatim}
|\DeclareTextCommand| takes the same optional arguments as
|\newcommand|.
The resulting command is robust, even if the code in \m{definition} is
fragile.
It does not produce an error if the command has already been defined but
logs the redefinition in the transcript file.
\begin{decl}[1994/12/01]
|\ProvideTextCommand| \arg{cmd} \arg{encoding}
\oarg{num} \oarg{default} \arg{definition}
\end{decl}
This command is the same as |\DeclareTextCommand|, except that if
\m{cmd} is already defined in encoding \m{encoding}, then the definition
is ignored.
\begin{decl}
|\DeclareTextSymbol| \arg{cmd} \arg{encoding} \arg{slot}
\end{decl}
This command defines a text symbol with slot \m{slot} in the encoding.
For example, the definition of |\ss| in the |OT1| encoding is:
\begin{verbatim}
\DeclareTextSymbol{\ss}{OT1}{25}
\end{verbatim}
It does not produce an error if the command has already
been defined but logs the redefinition in the transcript file.
\begin{decl}
|\DeclareTextAccent| \arg{cmd} \arg{encoding} \arg{slot}
\end{decl}
This command declares a text accent, with the accent taken from slot
\m{slot} in the encoding. For example, the definition of |\"| in the
|OT1| encoding is:
\begin{verbatim}
\DeclareTextAccent{\"}{OT1}{127}
\end{verbatim}
It does not produce an error if the command has already been defined but
logs the redefinition in the transcript file.
\begin{decl}
|\DeclareTextComposite| \arg{cmd} \arg{encoding} \arg{letter}
\arg{slot}
\end{decl}
This command declares that the composite letter formed from applying
\m{cmd} to \m{letter} is defined to be simply slot \m{slot} in the
encoding. The \m{letter} should be a single letter (such as |a|) or a
single command (such as |\i|).
For example, the definition of |\'{a}| in the |T1| encoding could be
declared like this:
\begin{verbatim}
\DeclareTextComposite{\'}{T1}{a}{225}
\end{verbatim}
The \m{cmd} will normally have been previously declared for this
encoding, either by using |\DeclareTextAccent|, or as a one-argument
|\DeclareTextCommand|.
\begin{decl}[1994/12/01]
|\DeclareTextCompositeCommand| \arg{cmd} \arg{encoding} \arg{letter}
\arg{definition}
\end{decl}
This is a more general form of |\DeclareTextComposite|, which allows for
an arbitrary \m{definition}, not just a \m{slot}. The main use for this
is to allow accents on |i| to act like accents on |\i|, for example:
\begin{verbatim}
\DeclareTextCompositeCommand{\'}{OT1}{i}{\'\i}
\end{verbatim}
It has the same restrictions as |\DeclareTextComposite|.
\begin{decl}[1998/12/01]
|\LastDeclaredEncoding|
\end{decl}
This holds the name of the last encoding declared via
|\DeclareFontEncoding| (this should also be the currently most efficient
encoding). It can be used in the \m{encoding} argument of the above
declarations in place of explicitly mentioning the encoding, e.g.
\begin{verbatim}
\DeclareFontEncoding{T1}{}{}
\DeclareTextAccent{\`}{\LastDeclaredEncoding}{0}
\DeclareTextAccent{\'}{\LastDeclaredEncoding}{1}
\end{verbatim}
This can be useful in cases where encoding files sharing common code
are generated from one source.
\subsection{Default definitions}
\NEWdescription{1997/12/01}
The declarations used in encoding definition files define
encoding-specific commands but they do not allow those commands to be
used without explicitly changing the encoding. For some commands, such
as symbols, this is not enough. For example, the~|OMS| encoding
contains the symbol~`\S', but we need to be able to use the command~|\S|
whatever the current encoding may be, without explicitly selecting the
encoding~|OMS|.
\NEWdescription{1997/12/01}
To allow this, \LaTeX{} has commands that declare default definitions
for commands; these defaults are used when the command is not defined in
the current encoding. For example, the default encoding for~|\S|
is~|OMS|, and so in an encoding (such as |OT1|) which does not
contain~|\S|, the~|OMS| encoding is selected in order to access this
glyph. But in an encoding (such as~|T1|) which does contain~|\S|, the
glyph in that encoding is used. The standard \LaTeXe{} format sets up
several such defaults using the following encodings: |OT1|,~|OMS|
and~|OML|.
\emph{Warning}: These commands should \emph{not} occur in encoding
definition files, since those files should declare only commands for use
when that encoding has been selected. They should instead be placed in
packages; they must, of course, always refer to encodings that are known
to be available.
\begin{decl}[1994/12/01]
|\DeclareTextCommandDefault| \arg{cmd} \arg{definition}
\end{decl}
This command allows an encoding-specific command to be given a default
definition. For example, the default definition for |\copyright| is
defined be a circled `c' with:
\begin{verbatim}
\DeclareTextCommandDefault{\copyright}{\textcircled{c}}
\end{verbatim}
\begin{decl}[1994/12/01]
|\DeclareTextAccentDefault| \arg{cmd} \arg{encoding} \\
|\DeclareTextSymbolDefault| \arg{cmd} \arg{encoding}
\end{decl}
These commands allow an encoding-specific command to be given a default
encoding. For example, the default encoding for |\"| and |\ae| is set
to be |OT1| by:
\begin{verbatim}
\DeclareTextAccentDefault{\"}{OT1}
\DeclareTextSymbolDefault{\ae}{OT1}
\end{verbatim}
Note that |\DeclareTextAccentDefault| can be used on any one-argument
encoding-specific command, not just those defined with
|\DeclareTextAccent|. Similarly, |\DeclareTextSymbolDefault| can be
used on any encoding-specific command with no arguments, not just those
defined with |\DeclareTextSymbol|.
For more examples of these definitions, see |ltoutenc.dtx|.
\begin{decl}[1994/12/01]
|\ProvideTextCommandDefault| \arg{cmd} \arg{definition}
\end{decl}
This command is the same as |\DeclareTextCommandDefault|, except that if
the command already has a default definition, then the definition is
ignored. This is useful to give `faked' definitions of symbols which
may be given `real' definitions by other packages. For example, a
package might give a fake definition of |\textonequarter| by saying:
\begin{verbatim}
\ProvideTextCommandDefault{\textonequarter}{$\m@th\frac14$}
\end{verbatim}
\subsection{Encoding defaults} \label{sec:encoding-defaults}
\begin{decl}
|\DeclareFontEncodingDefaults| \arg{text-settings} \arg{math-settings}
\end{decl}
Declares \m{text-settings} and \m{math-settings} for all encoding
schemes. These are executed before the encoding scheme dependent ones
are executed so that one can use the defaults for the major cases and
overwrite them if necessary using |\DeclareFontEncoding|.
If |\relax| is used as an argument, the current setting of this default
is left unchanged.
This example is used by amsfonts.sty for accent positioning; it changes
only the math settings:
\begin{verbatim}
\DeclareFontEncodingDefaults{\relax}{\def\accentclass@{7}}
\end{verbatim}
\begin{decl}
|\DeclareFontSubstitution| \arg{encoding} \arg{family} \arg{series}
\arg{shape}
\end{decl}
Declares the default values for font substitution which will be used
when a font with encoding \m{encoding} should be loaded but no font can
be found with the current attributes.
These substitutions are local to the encoding scheme because the
encoding scheme is never substituted! They are tried in the order
\m{shape} then \m{series} and finally \m{family}.
\NEWdescription{2019/07/10}
This declaration is normally done in an encoding definition file
(see~\ref{Sec:encode.def}), but can also be used in a class file or the
document preamble to alter the default for a specific encoding.
If no defaults are set up for an encoding, the values given by
|\DeclareErrorFont| are used.
The font specification for \m{encoding}\m{family}\m{series}\m{shape}
must have been defined by |\DeclareFontShape| before the
|\begin{document}| is reached.
Example:
\begin{verbatim}
\DeclareFontSubstitution{T1}{cmr}{m}{n}
\end{verbatim}
\subsection{Case changing}
\label{sec:case}
\begin{decl}
|\MakeUppercase| \arg{text} \\
|\MakeLowercase| \arg{text}
\end{decl}
\NEWfeature{1995/06/01}
\TeX{} provides the two primitives |\uppercase| and |\lowercase| for
changing the case of text. Unfortunately, these \TeX{} primitives do
not change the case of characters accessed by commands like |\ae| or
|\aa|. To overcome this problem, \LaTeX{} provides these two commands.
In the long run, we would like to use all-caps fonts rather than any
command like |\MakeUppercase| but this is not possible at the moment
because such fonts do not exist.
For further details, see \texttt{clsguide.tex}.
\NEWdescription{1999/04/23}
In order that upper/lower-casing will work reasonably well, and in order
to provide any correct hyphenation, \LaTeXe{} \emph{must} use,
throughout a document, the same fixed table for changing case. The
table used is designed for the font encoding |T1|; this works well with
the standard \TeX{} fonts for all Latin alphabets but will cause
problems when using other alphabets. As an experiment, it has now been
extended for use with some Cyrillic encodings.
\section{Miscellanea}
\label{Sec:misc}
This section covers the remaining font commands in \LaTeX{} and some
other issues.
\subsection{Font substitution}
\begin{decl}
|\DeclareErrorFont| \arg{encoding} \arg{family} \arg{series}
\arg{shape} \arg{size}
\end{decl}
Declares \m{encoding}\m{family}\m{series}\m{shape} to be the font shape
used in cases where the standard substitution mechanism fails
(i.e.~would loop). For the standard mechanism see the command
|\DeclareFontSubstitution| above.
The font specification for \m{encoding}\m{family}\m{series}\m{shape}
must have been defined by |\DeclareFontShape| before the
|\begin{document}| is reached.
Example:
\begin{verbatim}
\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
\end{verbatim}
\NEWdescription{2019/07/10}
This declaration is a system wide fallback and it should normally not be
changed, in particular it does not belong into font encoding definition
files but rather into the \LaTeX{} format. It is normally set up in
\texttt{fonttext.cfg}. Adjustments on a per encoding base should be made
through |\DeclareFontSubstitution| instead!
\begin{decl}
|\fontsubfuzz|
\end{decl}
This parameter is used to decide whether or not to produce a terminal
warning if a font size substitution takes place. If the difference
between the requested and the chosen size is less than |\fontsubfuzz|
the warning is only written to the transcript file. The default value is
|0.4pt|. This can be redefined with |\renewcommand|, for example:
\begin{verbatim}
\renewcommand{\fontsubfuzz}{0pt} % always warn
\end{verbatim}
\subsection{Preloading}
\begin{decl}
|\DeclarePreloadSizes| \arg{encoding} \arg{family} \arg{series}
\arg{shape}
\arg{size-list}
\end{decl}
Specifies the fonts that should be preloaded by the format. These
commands should be put in a |preload.cfg| file, which is read in when
the \LaTeX{} format is being built. Read |preload.dtx| for more
information on how to built such a configuration file.
Example:
\begin{verbatim}
\DeclarePreloadSizes{OT1}{cmr}{m}{sl}{10,10.95,12}
\end{verbatim}
\NEWdescription{2019/07/10}
Preloading is really an artifact of the days when loading fonts while
processing a document contributed substantially to the processing
time. These days it is usually best not to use this mechanism any more.
\subsection{Accented characters}
\NEWdescription{1996/06/01}
Accented characters in \LaTeX{} can be produced using commands such as
|\"a| etc. The precise effect of such commands depends on the font
encoding being used. When using a font encoding that contains the
accented characters as individual glyphs (such as the |T1| encoding, in
the case of |\"a|) words that contain such accented characters can be
automatically hyphenated. For font encodings that do not contain the
requested individual glyph (such as the |OT1| encoding) such a command
invokes typesetting instructions that produce the accented character as
a combination of character glyphs and diacritical marks in the font. In
most cases this involves a call to the \TeX{} primitive |\accent|.
Glyphs constructed as composites in this way inhibit hyphenation of the
current word; this is one reason why the |T1| encoding is preferable to
the original \TeX{} font encoding |OT1|.
It is important to understand that commands like |\"a| in \LaTeXe{}
represent just a name for a single glyph (in this case `umlaut a') and
contain no information about how to typeset that glyph---thus it does
\emph{not} mean `put two dots on top of the character a'. The decision
as to what typesetting routine to use will depend on the encoding of the
current font and so this decision is taken at the last minute. Indeed,
it is possible that the same input will be typeset in more than one way
in the same document; for example, text in section headings may also
appear in table of contents and in running heads; and each of these may
use a font with a different encoding.
For this reason the notation |\"a| is \emph{not} equivalent to:
\begin{verbatim}
\newcommand \chara {a} \"\chara
\end{verbatim}
In the latter case, \LaTeX{} does not expand the macro |\chara| but
simply compares the notation (the string |\"\chara|) to its list of
known composite notations in the current encoding; when it fails to find
|\"\chara| it does the best it can and invokes the typesetting
instructions that put the umlaut accent on top of the expansion of
|\chara|. Thus, even if the font actually contains `\"a' as an
individual glyph, it will not be used.
The low-level accent commands in \LaTeX{} are defined in such a way that
it is possible to combine a diacritical mark from one font with a glyph
from another font; for example, |\"\textparagraph| will produce
\"\textparagraph. The umlaut here is taken from the |OT1| encoded font
|cmr10| whilst the paragraph sign is from the |OMS| encoded font
|cmsy10|. (This example may be typographically silly but better ones
would involve font encodings like |OT2| (Cyrillic) that might not be
available at every site.)
There are, however, restrictions on the font-changing commands that will
work within the argument to such an accent command. These are
\TeX{}nical in the sense that they follow from the way that \TeX{}'s
|\accent| primitive works, allowing only a special class of commands
between the accent and the accented character.
The following are examples of commands that will not work correctly as
the accent will appear above a space: the font commands with text
arguments (|\textbf{...}| and friends); all the font size declarations
(|\fontsize| and |\Large|, etc.); |\usefont| and declarations that
depend on it, such as |\normalfont|; box commands (e.g.~|\mbox{...}|).
The lower-level font declarations that set the attributes family, series
and shape (such as |\fontshape{sl}\selectfont|) will produce correct
typesetting, as will the default declarations such as |\bfseries|.
\subsection{Naming conventions}
\begin{itemize}
\item
Math alphabet commands all start with |\math...|: examples are
|\mathbf|, |\mathcal|, etc.
\item
The text font changing commands with arguments all start with
|\text...|: e.g.~|\textbf| and |\textrm|. The exception to this is
|\emph|, since it occurs very commonly in author documents and so
deserves a shorter name.
\item
Names for encoding schemes are strings of up to three letters (all
upper case) plus digits.
The \LaTeX\ Project reserves the use of encodings starting with the
following letters: |T| (standard 256-long text encodings), |TS|
(symbols that are designed to extend a corresponding |T| encoding),
|X| (text encodings that do not conform to the strict requirements for
|T| encodings), |M| (standard 256-long math encodings), |S| (other
symbol encodings), |A| (other special applications), |OT| (standard
128-long text encodings) and |OM| (standard 128-long math encodings).
Please do not use the above starting letters for non-portable
encodings. If new standard encodings emerge then we shall add them in
a later release of \LaTeX.
Encoding schemes which are local to a site or a system should start
with |L|, experimental encodings intended for wide distribution will
start with |E|, whilst |U| is for Unknown or Unclassified encodings.
\item
\NEWdescription{2019/10/15}
Font family names should contain only upper and lower case letters and
hyphen characters. Where possible, these should conform to the
\emph{Filenames for fonts} font naming scheme of the scheme
implemented by \texttt{autoinst} with suffixes such as \texttt{-LF},
\texttt{-OsF}, etc.\ to indicate different figure styles.
\item
\NEWdescription{2019/10/15}
Font series names should contain up to four lower case letters. If at
all possible standard names as suggested in
Section~\ref{sec:textfontattributes} should be used. Font specific
names such as \texttt{regular} or \texttt{black}, etc.\ should be at
least aliased to a corresponding standard name.
\item
\NEWdescription{2019/10/15}
Font shapes should contain up to four letters lower case. Use the
names suggested in Section~\ref{sec:textfontattributes}.
\item
Names for symbol fonts are built from lower and upper case letters
with no restriction.
\end{itemize}
Whenever possible, you should use the series and shape names suggested
in \emph{\LaTeXcomp} since this will make it easier to combine new fonts
with existing fonts.
\NEWdescription{1994/12/01}
Where possible, text symbols should be named as |\text| followed by the
Adobe glyph name: for example |\textonequarter| or |\textsterling|.
Similarly, math symbols should be named as |\math| followed by the glyph
name, for example |\mathonequarter| or |\mathsterling|. Commands which
can be used in text or math can then be defined using |\ifmmode|, for
example:
\begin{verbatim}
\DeclareRobustCommand{\pounds}{%
\ifmmode \mathsterling \else \textsterling \fi
}
\end{verbatim}
Note that commands defined in this way must be robust, in case they
get put into a section title or other moving argument.
\subsection{The order of declaration}
\NEWdescription{2019/10/15}
\NFSS{} forces you to give all declarations in a specific order so that
it can check whether you have specified all necessary information. If
you declare objects in the wrong order, it will complain. Here are the
dependencies that you have to obey:
\begin{itemize}
\item
|\DeclareFontFamily| checks that the encoding scheme was previously
declared with |\DeclareFontEncoding|.
\item
|\DeclareFontShape| checks that the font family was declared to be
available in the requested encoding (|\DeclareFontFamily|).
\item
|\DeclareSymbolFont| checks that the encoding scheme is valid.
\item
|\SetSymbolFont| additionally ensures that the requested math version
was declared (|\DeclareMathVersion|) and that the requested symbol
font was declared (|\DeclareSymbolFont|).
\item
|\DeclareSymbolFontAlphabet| checks that the command name for the
alphabet identifier can be used and that the symbol font was declared.
\item
|\DeclareMathAlphabet| checks that the chosen command name can be used
and that the encoding scheme was declared.
\item
|\SetMathAlphabet| checks that the alphabet identifier was previously
declared with |\DeclareMathAlphabet| or |\DeclareSymbolFontAlphabet|
and that the math version and the encoding scheme are known.
\item
|\DeclareMathSymbol| makes sure that the command name can be used
(i.e., is undefined or was previously declared to be a math symbol)
and that the symbol font was previously declared.
\item
When the |\begin{document}| command is reached, \NFSS{} makes some
additional checks---for example, verifying that substitution
defaults for every encoding scheme point to known font shape group
declarations.
\end{itemize}
\subsection{Font series defaults per document family}
\NEWfeature{2020/02/02}
With additional weights and widths being available in many font families
nowadays, it is more likely that somebody will want to match, say, a
medium weight serif family with a semi-light sans serif family, or that
with one family one wants to use the bold-extended face when |\textbf|
is used, while with another it should be bold (not extended) or
semi-bold, etc. The default values can be altered using the
|\DeclareFontSeriesDefault| declaration in packages or document
preambles:
\begin{decl}
|\DeclareFontSeriesDefault| \oarg{meta family}
\arg{meta series} \arg{series value}
\end{decl}
This declaration takes three arguments:
\begin{description}
\item[Meta family interface:] Can be either |rm|, |sf| or |tt|. This is
optional and if not present the next two arguments apply to the
overall default.
\item[Meta series interface:] Can be |md| or |bf|.
\item[Series value:] This is the value that is going to be used when the
combination of \m{meta family} and \m{meta series} is requested.
\end{description}
For example,
\begin{verbatim}
\DeclareFontSeriesDefault[rm]{bf}{sb}
\end{verbatim}
would use |sb| (semi-bold) when |\rmfamily\bfseries| is requested in
document.
\subsection{Handling of nested emphasis}
\begin{decl}
|\DeclareEmphSequence| \arg{list of font declarations}
\end{decl}
\NEWfeature{2020/02/02}
This declaration takes a comma separated list of font declarations each
specifying how increasing levels of emphasis should be handled. For
example:
\begin{verbatim}
\DeclareEmphSequence{\itshape,%
\upshape\scshape,%
\itshape}
\end{verbatim}
uses italics for the first, small capitals for the second, and italic
small capitals for the third level. If there are more nesting levels
than provided, declarations stored in |\emreset| (by default
|\ulcshape\upshape|) are used for the next level and then the list
restarts.
\subsection{Providing font family substitutions}
\begin{decl}
|\DeclareFontFamilySubstitution| \arg{encoding}
\arg{family}
\arg{new-family}
\end{decl}
\NEWfeature{2020/02/02}
This declaration selects the font family \m{new-family} as replacement
for \m{family} in the font encoding \m{encoding}. For example,
\begin{verbatim}
\DeclareFontFamilySubstitution{LGR}
{Montserrat-LF}{IBMPlexSans-TLF}
\end{verbatim}
tells \LaTeX{} to substitute the sans serif font |Montserrat-LF| in the
Greek encoding |LGR| with |IBMPlexSans-TLF| once requested in a
document.
\section{Additional text symbols -- \textsf{textcomp}}
\NEWfeature{2020/02/02}
For a long time the interface to additional text symbols and the text
companion encoding |TS1| in general was the \textsf{textcomp} package.
All the symbols provided by the \textsf{textcomp} package are now
available in \LaTeX{} kernel. Furthermore, an intelligent substitution
mechanism has been implemented so that glyphs missing in some fonts are
automatically substituted with default glyphs that are sans serif if you
typeset in |\textsf| and monospaced if you typeset using |\texttt|. In
the past they were always taken from Computer Modern Roman if
substitution was necessary.
{\sffamily This is most noticeable with |\oldstylenums| which are now
taken from |TS1| so that you no longer get \legacyoldstylenums{1234}
but \oldstylenums{1234} when typesetting in sans serif fonts \ttfamily
and \oldstylenums{1234} when using typewriter fonts.}
\begin{decl}
|\legacyoldstylenums| \arg{nums}\\
|\UseLegacyTextSymbols|
\end{decl}
If there ever is a need to use the original (inferior) definition, then
that remains available as |\legacyoldstylenums|; and to fully revert to
the old behavior there is also |\UseLegacyTextSymbols|. The latter
declaration reverts |\oldstylenums| and also changes the footnote
symbols, such as |\textdagger|, |\textparagraph|, etc., to pick up their
glyphs from the math fonts instead of the current text font (this means
they always keep the same shape and do not nicely blend in with the text
font).
\newpage
The following tables show the macros available. The next commands are
`constructed' accents and are built via \TeX{} macros:
\begin{center}
\begin{tabular}[t]{@{}ll}
\verb*|\capitalcedilla A| & \capitalcedilla A \\
\verb*|\capitalogonek A| & \capitalogonek A \\
\end{tabular}
\quad
\begin{tabular}[t]{@{}ll}
\verb*|\textcircled a| & \textcircled a
\end{tabular}
\end{center}
These accents are available via font encoding. The numbers in third row
show the slot number:
\begin{center}
\begin{tabular}[t]{@{}p{0.32\linewidth}p{1em}p{2em}@{}}
\verb|\capitalgrave| & \capitalgrave{} & 0 \\
\verb|\capitalacute| & \capitalacute{} & 1 \\
\verb|\capitalcircumflex| & \capitalcircumflex{} & 2 \\
\verb|\capitaltilde| & \capitaltilde{} & 3 \\
\verb|\capitaldieresis| & \capitaldieresis{} & 4 \\
\verb|\capitalhungarumlaut| & \capitalhungarumlaut{} & 5 \\
\verb|\capitalring| & \capitalring{} & 6 \\
\verb|\capitalcaron| & \capitalcaron{} & 7
\end{tabular}
\quad
\begin{tabular}[t]{@{}p{0.32\linewidth}p{1em}p{2em}@{}}
\verb|\capitalbreve| & \capitalbreve{} & 8 \\
\verb|\capitalmacron| & \capitalmacron{} & 9 \\
\verb|\capitaldotaccent| & \capitaldotaccent{} & 10 \\
\verb|\t| & \t{} & 26 \\
\verb|\capitaltie| & \capitaltie{} & 27 \\
\verb|\newtie| & \newtie{} & 28 \\
\verb|\capitalnewtie| & \capitalnewtie{} & 29
\end{tabular}
\end{center}
Table~\vref{tab:textcomp}
contains the full list of commands to access the text symbols.
%
% Tables~\vrefrange{tab:ts1-subset-always}{tab:ts1-subset-9-disable}
% contain the commands to access the text symbols.
%
Again,
the numbers are the slots in the encoding.
\iftrue
\begin{table}[!tp]
\centering\footnotesize
\renewcommand\arraystretch{1.07}
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textcapitalcompwordmark| & \textcapitalcompwordmark & 23 \\
\verb|\textascendercompwordmark| & \textascendercompwordmark & 31 \\
\verb|\textquotestraightbase| & \textquotestraightbase & 13 \\
\verb|\textquotestraightdblbase| & \textquotestraightdblbase & 18 \\
\verb|\texttwelveudash| & \texttwelveudash & 21 \\
\verb|\textthreequartersemdash| & \textthreequartersemdash & 22 \\
\verb|\textleftarrow| & \textleftarrow & 24 \\
\verb|\textrightarrow| & \textrightarrow & 25 \\
\verb|\textblank| & \textblank & 32 \\
\verb|\textdollar| & \textdollar & 36 \\
\verb|\textquotesingle| & \textquotesingle & 39 \\
\verb|\textasteriskcentered| & \textasteriskcentered & 42 \\
\verb|\textdblhyphen| & \textdblhyphen & 45 \\
\verb|\textfractionsolidus| & \textfractionsolidus & 47 \\
\verb|\textzerooldstyle| & \textzerooldstyle & 48 \\
\verb|\textoneoldstyle| & \textoneoldstyle & 49 \\
\verb|\texttwooldstyle| & \texttwooldstyle & 50 \\
\verb|\textthreeoldstyle| & \textthreeoldstyle & 51 \\
\verb|\textfouroldstyle| & \textfouroldstyle & 52 \\
\verb|\textfiveoldstyle| & \textfiveoldstyle & 53 \\
\verb|\textsixoldstyle| & \textsixoldstyle & 54 \\
\verb|\textsevenoldstyle| & \textsevenoldstyle & 55 \\
\verb|\texteightoldstyle| & \texteightoldstyle & 56 \\
\verb|\textnineoldstyle| & \textnineoldstyle & 57 \\
\verb|\textlangle| & \textlangle & 60 \\
\verb|\textminus| & \textminus & 61 \\
\verb|\textrangle| & \textrangle & 62 \\
\verb|\textmho| & \textmho & 77 \\
\verb|\textbigcircle| & \textbigcircle & 79 \\
\verb|\textohm| & \textohm & 87 \\
\verb|\textlbrackdbl| & \textlbrackdbl & 91 \\
\verb|\textrbrackdbl| & \textrbrackdbl & 93 \\
\verb|\textuparrow| & \textuparrow & 94 \\
\verb|\textdownarrow| & \textdownarrow & 95 \\
\verb|\textasciigrave| & \textasciigrave & 96 \\
\verb|\textborn| & \textborn & 98 \\
\verb|\textdivorced| & \textdivorced & 99 \\
\verb|\textdied| & \textdied & 100 \\
\verb|\textleaf| & \textleaf & 108 \\
\verb|\textmarried| & \textmarried & 109 \\
\verb|\textmusicalnote| & \textmusicalnote & 110 \\
\verb|\texttildelow| & \texttildelow & 126 \\
\verb|\textdblhyphenchar| & \textdblhyphenchar & 127 \\
\verb|\textasciibreve| & \textasciibreve & 128 \\
\verb|\textasciicaron| & \textasciicaron & 129 \\
\verb|\textacutedbl| & \textacutedbl & 130 \\
\verb|\textgravedbl| & \textgravedbl & 131 \\
\verb|\textdagger| & \textdagger & 132 \\
\verb|\textdaggerdbl| & \textdaggerdbl & 133 \\
\verb|\textbardbl| & \textbardbl & 134 \\
\verb|\textperthousand| & \textperthousand & 135 \\
\verb|\textbullet| & \textbullet & 136 \\
\verb|\textcelsius| & \textcelsius & 137 \\
\verb|\textdollaroldstyle| & \textdollaroldstyle & 138 \\
\verb|\textcentoldstyle| & \textcentoldstyle & 139 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{lp{1.5em}l}
\toprule
\verb|\textflorin| & \textflorin & 140 \\
\verb|\textcolonmonetary| & \textcolonmonetary & 141 \\
\verb|\textwon| & \textwon & 142 \\
\verb|\textnaira| & \textnaira & 143 \\
\verb|\textguarani| & \textguarani & 144 \\
\verb|\textpeso| & \textpeso & 145 \\
\verb|\textlira| & \textlira & 146 \\
\verb|\textrecipe| & \textrecipe & 147 \\
\verb|\textinterrobang| & \textinterrobang & 148 \\
\verb|\textinterrobangdown| & \textinterrobangdown & 149 \\
\verb|\textdong| & \textdong & 150 \\
\verb|\texttrademark| & \texttrademark & 151 \\
\verb|\textpertenthousand| & \textpertenthousand & 152 \\
\verb|\textpilcrow| & \textpilcrow & 153 \\
\verb|\textbaht| & \textbaht & 154 \\
\verb|\textnumero| & \textnumero & 155 \\
\verb|\textdiscount| & \textdiscount & 156 \\
\verb|\textestimated| & \textestimated & 157 \\
\verb|\textopenbullet| & \textopenbullet & 158 \\
\verb|\textservicemark| & \textservicemark & 159 \\
\verb|\textlquill| & \textlquill & 160 \\
\verb|\textrquill| & \textrquill & 161 \\
\verb|\textcent| & \textcent & 162 \\
\verb|\textsterling| & \textsterling & 163 \\
\verb|\textcurrency| & \textcurrency & 164 \\
\verb|\textyen| & \textyen & 165 \\
\verb|\textbrokenbar| & \textbrokenbar & 166 \\
\verb|\textsection| & \textsection & 167 \\
\verb|\textasciidieresis| & \textasciidieresis & 168 \\
\verb|\textcopyright| & \textcopyright & 169 \\
\verb|\textordfeminine| & \textordfeminine & 170 \\
\verb|\textcopyleft| & \textcopyleft & 171 \\
\verb|\textlnot| & \textlnot & 172 \\
\verb|\textcircledP| & \textcircledP & 173 \\
\verb|\textregistered| & \textregistered & 174 \\
\verb|\textasciimacron| & \textasciimacron & 175 \\
\verb|\textdegree| & \textdegree & 176 \\
\verb|\textpm| & \textpm & 177 \\
\verb|\texttwosuperior| & \texttwosuperior & 178 \\
\verb|\textthreesuperior| & \textthreesuperior & 179 \\
\verb|\textasciiacute| & \textasciiacute & 180 \\
\verb|\textmu| & \textmu & 181 \\
\verb|\textparagraph| & \textparagraph & 182 \\
\verb|\textperiodcentered| & \textperiodcentered & 183 \\
\verb|\textreferencemark| & \textreferencemark & 184 \\
\verb|\textonesuperior| & \textonesuperior & 185 \\
\verb|\textordmasculine| & \textordmasculine & 186 \\
\verb|\textsurd| & \textsurd & 187 \\
\verb|\textonequarter| & \textonequarter & 188 \\
\verb|\textonehalf| & \textonehalf & 189 \\
\verb|\textthreequarters| & \textthreequarters & 190 \\
\verb|\texteuro| & \texteuro & 191 \\
\verb|\texttimes| & \texttimes & 214 \\
\verb|\textdiv| & \textdiv & 246 \\
\null \\
\bottomrule
\end{tabular}
\caption{Text symbols formerly from the \textsf{textcomp} package}
\label{tab:textcomp}
\end{table}
\fi
The |TS1| encoding contains a rich set of symbols which means that
several symbols are only available in a few \TeX{} fonts and some, such
as the capital accents, not available at all but developed as part of
the reference font implementation. In reality, many existing fonts
don't provide a full set of glyphs defined in |TS1| encoding and the
question arises: ``Which glyphs of the |TS1| encoding are implemented by
which font?''
\NEWfeature{2021/06/01}
Fonts can be ordered in sub-encodings with the |\DeclareEncodingSubset|
macro:
\begin{decl}
|\DeclareEncodingSubset| \arg{encoding}
\arg{font family}
\arg{subset number}
\end{decl}
The macro takes 3 mandatory arguments: An \m{encoding} for which a
subsetting is wanted (currently only |TS1|), the \m{font family} for
which we declare the subset and finally the \m{subset number} between
|0| (all of the encoding is supported) and |9| (many glyphs are
missing). Hence, it is assumed that some symbols are always available
by all fonts and each sub-encoding defines macros which become
unavailable (i.e., they are not provided in the sub-encoding with that
number and all sub-encodings with higher numbers.)
\begin{table}[tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textquotestraightbase| & \textquotestraightbase & 13 \\
\verb|\textquotestraightdblbase| & \textquotestraightdblbase & 18 \\
\verb|\textcapitalcompwordmark| & \textcapitalcompwordmark & 23 \\
\verb|\textascendercompwordmark| & \textascendercompwordmark & 31 \\
\verb|\textdollar| & \textdollar & 36 \\
\verb|\textquotesingle| & \textquotesingle & 39 \\
\verb|\textasteriskcentered| & \textasteriskcentered & 42 \\
\verb|\textdagger| & \textdagger & 132 \\
\verb|\textdaggerdbl| & \textdaggerdbl & 133 \\
\verb|\textperthousand| & \textperthousand & 135 \\
\verb|\textbullet| & \textbullet & 136 \\
\verb|\texttrademark| & \texttrademark & 151 \\
\verb|\textcent| & \textcent & 162 \\
\verb|\textsterling| & \textsterling & 163 \\
\verb|\textyen| & \textyen & 165 \\
\verb|\textbrokenbar| & \textbrokenbar & 166 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textsection| & \textsection & 167 \\
\verb|\textcopyright| & \textcopyright & 169 \\
\verb|\textordfeminine| & \textordfeminine & 170 \\
\verb|\textlnot| & \textlnot & 172 \\
\verb|\textregistered| & \textregistered & 174 \\
\verb|\textdegree| & \textdegree & 176 \\
\verb|\textpm| & \textpm & 177 \\
\verb|\textparagraph| & \textparagraph & 182 \\
\verb|\textperiodcentered| & \textperiodcentered & 183 \\
\verb|\textordmasculine| & \textordmasculine & 186 \\
\verb|\textonequarter| & \textonequarter & 188 \\
\verb|\textonehalf| & \textonehalf & 189 \\
\verb|\textthreequarters| & \textthreequarters & 190 \\
\verb|\texttimes| & \texttimes & 214 \\
\verb|\textdiv| & \textdiv & 246 \\
\null \\
\bottomrule
\end{tabular}
\caption{Symbols available in all \texttt{TS1} sub-encodings}
\label{tab:ts1-subset-always}
\end{table}
\begin{table}[!tbp]
\centering
\begin{tabular}[t]{@{}lll@{}}
\toprule
\verb*|\textcircled| & \textcircled{} & acc \\
\bottomrule
\end{tabular}
\caption{Symbol unavailable in \texttt{TS1} sub-encoding \texttt{1}
and higher}
\label{tab:ts1-subset-1-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\capitalcedilla| & \capitalcedilla{} & acc \\
\verb|\capitalogonek| & \capitalogonek{} & acc \\
\verb|\capitalgrave| & \capitalgrave{} & 0 \\
\verb|\capitalacute| & \capitalacute{} & 1 \\
\verb|\capitalcircumflex| & \capitalcircumflex{} & 2 \\
\verb|\capitaltilde| & \capitaltilde{} & 3 \\
\verb|\capitaldieresis| & \capitaldieresis{} & 4 \\
\verb|\capitalhungarumlaut| & \capitalhungarumlaut{} & 5 \\
\verb|\capitalring| & \capitalring{} & 6 \\
\verb|\capitalcaron| & \capitalcaron{} & 7 \\
\verb|\capitalbreve| & \capitalbreve{} & 8 \\
\verb|\capitalmacron| & \capitalmacron{} & 9 \\
\verb|\capitaldotaccent| & \capitaldotaccent{} & 10 \\
\verb|\capitaltie| & \capitaltie{} & 27 \\
\verb|\newtie| & \newtie{} & 28 \\
\verb|\capitalnewtie{}| & \capitalnewtie{} & 29 \\
\verb|\textdblhyphen| & \textdblhyphen & 45 \\
\verb|\textzerooldstyle| & \textzerooldstyle & 48 \\
\verb|\textoneoldstyle| & \textoneoldstyle & 49 \\
\verb|\texttwooldstyle| & \texttwooldstyle & 50 \\
\verb|\textthreeoldstyle| & \textthreeoldstyle & 51 \\
\verb|\textfouroldstyle| & \textfouroldstyle & 52 \\
\verb|\textfiveoldstyle| & \textfiveoldstyle & 53 \\
\verb|\textsixoldstyle| & \textsixoldstyle & 54 \\
\verb|\textsevenoldstyle| & \textsevenoldstyle & 55 \\
\verb|\texteightoldstyle| & \texteightoldstyle & 56 \\
\verb|\textnineoldstyle| & \textnineoldstyle & 57 \\
\verb|\textmho| & \textmho & 77 \\
\verb|\textbigcircle| & \textbigcircle & 79 \\
\verb|\textlbrackdbl| & \textlbrackdbl & 91 \\
\verb|\textrbrackdbl| & \textrbrackdbl & 93 \\
\verb|\textasciigrave| & \textasciigrave & 96 \\
\verb|\textborn| & \textborn & 98 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textdivorced| & \textdivorced & 99 \\
\verb|\textdied| & \textdied & 100 \\
\verb|\textleaf| & \textleaf & 108 \\
\verb|\textmarried| & \textmarried & 109 \\
\verb|\textmusicalnote| & \textmusicalnote & 110 \\
\verb|\texttildelow| & \texttildelow & 126 \\
\verb|\textdblhyphenchar| & \textdblhyphenchar & 127 \\
\verb|\textasciibreve| & \textasciibreve & 128 \\
\verb|\textasciicaron| & \textasciicaron & 129 \\
\verb|\textacutedbl| & \textacutedbl & 130 \\
\verb|\textgravedbl| & \textgravedbl & 131 \\
\verb|\textdollaroldstyle| & \textdollaroldstyle & 138 \\
\verb|\textcentoldstyle| & \textcentoldstyle & 139 \\
\verb|\textnaira| & \textnaira & 143 \\
\verb|\textguarani| & \textguarani & 144 \\
\verb|\textpeso| & \textpeso & 145 \\
\verb|\textrecipe| & \textrecipe & 147 \\
\verb|\textpertenthousand| & \textpertenthousand & 152 \\
\verb|\textpilcrow| & \textpilcrow & 153 \\
\verb|\textbaht| & \textbaht & 154 \\
\verb|\textdiscount| & \textdiscount & 156 \\
\verb|\textopenbullet| & \textopenbullet & 158 \\
\verb|\textservicemark| & \textservicemark & 159 \\
\verb|\textlquill| & \textlquill & 160 \\
\verb|\textrquill| & \textrquill & 161 \\
\verb|\textasciidieresis| & \textasciidieresis & 168 \\
\verb|\textcopyleft| & \textcopyleft & 171 \\
\verb|\textcircledP| & \textcircledP & 173 \\
\verb|\textasciimacron| & \textasciimacron & 175 \\
\verb|\textasciiacute| & \textasciiacute & 180 \\
\verb|\textreferencemark| & \textreferencemark & 184 \\
\verb|\textsurd| & \textsurd & 187 \\
\null \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{2}
and higher}
\label{tab:ts1-subset-2-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|textlangle| & \textlangle & 60 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textrangle| & \textrangle & 62 \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{3}
and higher}
\label{tab:ts1-subset-3-disable}
\end{table}
Thus, the symbols that are available in sub-encoding $x$ are the symbols
in table~\ref{tab:ts1-subset-always} (always available) and the symbols
that only become unavailable in sub-encodings $> x$. The tables
\vrefrange{tab:ts1-subset-1-disable}{tab:ts1-subset-9-disable} show the symbols that
become unavailable in the different sub-encodings. Again, the numbers
are the slots in the |TS1| encoding, |acc| indicates a `constructed'
accent.
\newpage
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textleftarrow| & \textleftarrow & 24 \\
\verb|\textrightarrow| & \textrightarrow & 25 \\
\verb|\textuparrow| & \textuparrow & 94 \\
\verb|\textdownarrow| & \textdownarrow & 95 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textcolonmonetary| & \textcolonmonetary & 141 \\
\verb|\textwon| & \textwon & 142 \\
\verb|\textlira| & \textlira & 146 \\
\verb|\textdong| & \textdong & 150 \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{4}
and higher}
\label{tab:ts1-subset-4-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textnumero| & \textnumero & 155 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textestimated| & \textestimated & 157 \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{5}
and higher}
\label{tab:ts1-subset-5-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textflorin| & \textflorin & 140 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textcurrency| & \textcurrency & 164 \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{6}
and higher}
\label{tab:ts1-subset-6-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textfractionsolidus| & \textfractionsolidus & 47 \\
\verb|\textminus| & \textminus & 61 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textohm| & \textohm & 87 \\
\verb|\textmu| & \textmu & 181 \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{7}
and higher}
\label{tab:ts1-subset-7-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textblank| & \textblank & 32 \\
\verb|\textinterrobang| & \textinterrobang & 148 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\textinterrobangdown| & \textinterrobangdown & 149 \\
\null \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{8}
and higher}
\label{tab:ts1-subset-8-disable}
\end{table}
\begin{table}[!tbp]
\centering\footnotesize
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\texttwelveudash| & \texttwelveudash & 21 \\
\verb|\textthreequartersemdash| & \textthreequartersemdash & 22 \\
\verb|\textbardbl| & \textbardbl & 134 \\
\verb|\textcelsius| & \textcelsius & 137 \\
\bottomrule
\end{tabular}\qquad
\begin{tabular}[t]{@{}lp{1.5em}l@{}}
\toprule
\verb|\texttwosuperior| & \texttwosuperior & 178 \\
\verb|\textthreesuperior| & \textthreesuperior & 179 \\
\verb|\textonesuperior| & \textonesuperior & 185 \\
\null \\
\bottomrule
\end{tabular}
\caption{Symbols unavailable in \texttt{TS1} sub-encoding \texttt{9}}
\label{tab:ts1-subset-9-disable}
\end{table}
As an example,
%\begin{verbatim}
\verb=\DeclareEncodingSubset{TS1}{foo}{5}=
%\end{verbatim}
indicates that the font family |foo| contains the always available
symbols (table~\vref{tab:ts1-subset-always}) and the ones disabled
in sub-encodings 6--9, i.e.,
tables~\vrefrange{tab:ts1-subset-6-disable}{tab:ts1-subset-9-disable}.
As these days many font families are set up to end in |-LF| (lining
figures), |-OsF| (oldstyle figures), etc. the declaration supports a
shortcut: if the \m{font family} name ends in |-*| then the star gets
replaced by these common ending, e.g.,
\begin{verbatim}
\DeclareEncodingSubset{TS1}{Alegreya-*}{2}
\end{verbatim}
is the same as writing
\begin{verbatim}
\DeclareEncodingSubset{TS1}{Alegreya-LF} {2}
\DeclareEncodingSubset{TS1}{Alegreya-OsF} {2}
\DeclareEncodingSubset{TS1}{Alegreya-TLF} {2}
\DeclareEncodingSubset{TS1}{Alegreya-TOsF}{2}
\end{verbatim}
If only some are needed then one can define them individually but in
many cases all four are wanted, hence the shortcut.
\section{If you need to know more \ldots}
\NEWdescription{1996/06/01}
The |tracefnt| package provides for tracing the actions concerned with
loading, substituting and using fonts. The package accepts the
following options:
\begin{description}
\item[errorshow] Write all information about font changes, etc.\ but
only to the transcript file unless an error occurs. This means that
information about font substitution will not be shown on the terminal.
\item[warningshow] Show all font warnings on the terminal. This setting
corresponds to the default behavior when this \texttt{tracefnt}
package is \emph{not} used!
\item[infoshow] Show all font warnings and all font info messages (that
are normally only written to the transcript file) also on the
terminal. This is the default when this \texttt{tracefnt} package is
loaded.
\item[debugshow] In addition to what is shown by \texttt{infoshow}, show
also changes of math fonts (as far as possible): beware, this option
can produce a large amount of output.
\item[loading] Show the names of external font files when they are
loaded. This option shows only `newly loaded' fonts, not those
already preloaded in the format or the class file before this
\texttt{tracefnt} package becomes active.
\item[pausing] Turn all font warnings into errors so that \LaTeX{} will
stop.
\end{description}
\emph{Warning}: The actions of this package can change the layout of a
document and even, in rare cases, produce clearly wrong output, so it
should not be used in the final formatting of `real documents'.
\begin{thebibliography}{1}
\bibitem{A-W:MG2004}
Frank Mittelbach and Michel Goossens.
\newblock {\em The {\LaTeX} Companion second edition}.
\newblock With Johannes Braams, David Carlisle, and Chris Rowley.
\newblock Addison-Wesley, Reading, Massachusetts, 2004.
\bibitem{tub:DKn89}
Donald~E. Knuth.
\newblock Typesetting concrete mathematics.
\newblock {\em {TUG}boat}, 10(1):31--36, April 1989.
\bibitem{A-W:LLa94}
Leslie Lamport.
\newblock {\em {\LaTeX:} A Document Preparation System}.
\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
\end{thebibliography}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% fill-column: 72
%%% End:
|