summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/microtype/microtype.dtx
blob: 698eec07723f1f94f58d220aa83824c5f7fed617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
%\iffalse meta-comment
% !Mode:: "TeX:DTX:UK"
% !smartQuote:: "English"
% !DTXversion:: "2.8"
% ------------------------------------------------------------------------
%                       The `microtype' package
%         Subliminal refinements towards typographical perfection
%           Copyright (c) 2004--2020 R Schlicht <w.m.l@gmx.net>
%
% This work 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:
% http://www.latex-project.org/lppl.txt, and version 1.3c or later is part
% of all distributions of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `author-maintained'.
%
% This work consists of the files microtype.dtx and microtype.ins and the
% derived files microtype.sty, microtype-pdftex.def, microtype-luatex.def,
% microtype-xetex.def, microtype.lua and letterspace.sty.
%
% Modified versions of the configuration files (*.cfg) may be distributed
% provided that: (1) the original copyright statement is not removed, and
% (2) the identification string is changed.
% ------------------------------------------------------------------------
%
%<package|letterspace>\NeedsTeXFormat{LaTeX2e}
%<*driver>
\ProvidesFile{\jobname.dtx}
%</driver>
%<package|letterspace>\ProvidesPackage
%<config|pdftex-def|luatex-def|xetex-def>\ProvidesFile
%<package>  {microtype}
%<letterspace>  {letterspace}
%<m-t>  {microtype.cfg}
%<pdftex-def>  {microtype-pdftex.def}
%<luatex-def>  {microtype-luatex.def}
%<xetex-def>  {microtype-xetex.def}
%<*package|letterspace|m-t|pdftex-def|luatex-def|xetex-def>
  [2020/12/07 v2.8
%<package>   Micro-typographical refinements
%<letterspace>   Robust letterspacing
%<m-t>   microtype main configuration file
%<pdftex-def|luatex-def|xetex-def>   Definitions specific to
%<pdftex-def>   pdftex
%<luatex-def>   luatex
%<xetex-def>   xetex
   (RS)]
%</package|letterspace|m-t|pdftex-def|luatex-def|xetex-def>
%<luafile>microtype        = microtype or {}
%<luafile>local microtype  = microtype
%<luafile>microtype.module = {
%<luafile>    name         = "microtype",
%<luafile>    version      = "2.8",
%<luafile>    date         = "2020/12/07",
%<luafile>    description  = "microtype module.",
%<luafile>    author       = "E. Roux, R. Schlicht and P. Gesang",
%<luafile>    copyright    = "E. Roux, R. Schlicht and P. Gesang",
%<luafile>    license      = "LPPL",
%<luafile>}
%<*config>
%<bch>  {mt-bch.cfg}[2007/03/03 v1.5 microtype config. file: Bitstream Charter (RS)]
%<blg>  {mt-blg.cfg}[2007/07/14 v1.0 microtype config. file: Bitstream Letter Gothic (RS)]
%<cmr>  {mt-cmr.cfg}[2013/05/19 v2.2 microtype config. file: Computer Modern Roman (RS)]
%<pad>  {mt-pad.cfg}[2005/11/07 v1.5 microtype config. file: Adobe Garamond (RS)]
%<pmn>  {mt-pmn.cfg}[2009/11/14 v1.3 microtype config. file: Adobe Minion (HH/KK)]
%<ppl>  {mt-ppl.cfg}[2005/11/16 v1.6 microtype config. file: Palatino (RS)]
%<ptm>  {mt-ptm.cfg}[2006/04/20 v1.7 microtype config. file: Times (RS)]
%<ugm>  {mt-ugm.cfg}[2006/01/26 v1.0 microtype config. file: URW Garamond (RS)]
%<msa>  {mt-msa.cfg}[2006/02/04 v1.1 microtype config. file: AMS symbols (a) (RS)]
%<msb>  {mt-msb.cfg}[2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS)]
%<euf>  {mt-euf.cfg}[2006/07/03 v1.1 microtype config. file: AMS Euler Fraktur (RS)]
%<eur>  {mt-eur.cfg}[2006/07/31 v1.1 microtype config. file: AMS Euler Roman (RS)]
%<eus>  {mt-eus.cfg}[2006/07/28 v1.2 microtype config. file: AMS Euler Script (RS)]
%<zpeu>  {mt-zpeu.cfg}[2006/05/04 v1.0 microtype config. file: Adobe Euro (RS)]
%<euroitc>  {mt-euroitc.cfg}[2006/05/04 v1.0 microtype config. file: ITC Euro (RS)]
%<mvs>  {mt-mvs.cfg}[2006/07/05 v1.1 microtype config. file: Marvosym Euro (RS)]
%</config>
%
%<*driver|docsty>
%<*driver>
\documentclass[10pt,a4paper]{ltxdoc}
\makeatletter
%</driver>
% Let's abolish CM! We use Charter and Letter Gothic
% (for the pre-built documentation on CTAN):
\usepackage[T1]{fontenc}
\usepackage[charter]{mathdesign}
 \def\rmdefault{bch} % not scaled
 \def\sfdefault{SourceSansPro-TLF}
 \def\SourceSansPro@scale{1.02}
 \def\ttdefault{blg}
 {\ttfamily\selectfont
  \DeclareFontShape{T1}{blg}{eb}{n}{<-> ssub * blg/b/n}{}}
\usepackage{textcomp}
\usepackage{iftex}
%<*!docsty>
\ifxetex\else
\usepackage[latin1]{\ifluatex lua\fi inputenc}
\fi
%</!docsty>
\GetFileInfo{\jobname.dtx}
\usepackage[expansion=false,kerning=true]{microtype}[\filedate]
 \DeclareMicrotypeSet*[protrusion]
      { doc }
      { encoding = {*, TS1, OMS},
        family   = {rm*, tt*},
        size     = {footnotesize, small, normalsize} }
 \SetProtrusion
      { encoding = OMS,
        family   = mdbch }
      { "68 = {400, },  % \langle
        "69 = { ,400} } % \rangle
 \DeclareMicrotypeSet*[kerning]
      { doc }
      { encoding = T1,
        family   = blg, % typewriter font and ...
        font     = * }  % French sample in section \ref{sub:kerning}
 \SetExtraKerning
      { encoding = T1,
        family   = blg }
      { _ = {100,100} } % underscores shouldn't touch
\ifxetex\else
 % disable ?` and !` ligatures (sample in section \ref{sec:disable-ligatures})
 \DisableLigatures[?,!]{encoding = *, family = rm* }
\fi
 % Fraktur sample in section \ref{sec:lettersp}
 \IfFileExists{t1mwr.fd}
   {\def\textfrak##1{{\fontfamily{mwr}\selectfont ##1}}
    \ifpdf
      \SetTracking[no ligatures={f,s,c}]{encoding=T1,family=mwr}{120}
    \fi}
   {\IfFileExists{yfonts.sty}
     {\usepackage{yfonts}
      \ifpdf
        \SetTracking[no ligatures={f,s,c}]{encoding=LY,family=yfrak}{120}
      \fi}
     {\def\textfrak{\rule{.5em}{1.5ex}\@gobble}}}
\ifpdftex\else
  \microtypesetup{kerning=false}
\fi
\tolerance=700
\ifpdf
  \ifluatex % microtype.dtx finally compiles with 0.35!
    \def\pdftexversion{200} % in TeX Live 2015, they let this to \luatexversion
    \let\pdfxform                    \saveboxresource
    \let\pdflastxform                \lastsavedboxresourceindex
    \protected\edef\pdfminorversion  {\pdfvariable minorversion}
    \protected\def\pdfobj            {\pdfextension obj }
    \protected\def\pdfcatalog        {\pdfextension catalog }
    \protected\def\pdfannot          {\pdfextension annot }
    \protected\def\pdfoutline        {\pdfextension outline }
    \protected\def\pdfmapline        {\pdfextension mapline }
    \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
    \protected\def\pdflastobj        {\numexpr\pdffeedback lastobj\relax}
  \fi
  \ifnum\pdftexversion<140 \else % pdftex 1.40, including textmatrix patch,
    \microtypesetup{expansion=alltext,step=1} % hence we can activate expansion ...
    \tolerance=300         % ... and make TeX almost as intolerant as it normally is
    \g@addto@macro\macrocode{\microtypesetup{expansion=false}}
    \pdfminorversion=5 % for the OCGs (default since TeX Live 2010)
  \fi
  % bonus material
  \InputIfFileExists{microtype-logo.dtx}\relax\relax
  \InputIfFileExists{microtype-lssample.dtx}\relax\relax
\else
  \ifluatex\else
    \let\lsstyle\relax
  \fi
\fi
\usepackage{booktabs}
\usepackage{array}
 \newcolumntype{L}[1]{p{#1}<{\raggedright}}
\usepackage{color}
 \definecolor{thered}    {rgb} {0.65,0.04,0.07}
 \definecolor{thegreen}  {rgb} {0.06,0.44,0.08}
 \definecolor{theblue}   {rgb} {0.02,0.04,0.48}
 \definecolor{sectioning}{gray}{0.44}
 \definecolor{thegrey}   {gray}{0.5}
 \definecolor{theframe}  {gray}{0.75}
 \definecolor{theshade}  {gray}{0.94}
\usepackage{graphicx}
% general layout
\frenchspacing
\DeclareRobustCommand\textoractual[2]{\ifpdf
  \pdfliteral direct{/Span<</ActualText(#2)>>BDC}#1\pdfliteral direct{EMC}%
  \else #1\fi}
\expandafter\newif\csname ifcmr\endcsname
\long\def\@tempa{cmr}
\ifx\rmdefault\@tempa
  \cmrtrue
  \def\PackageFont{\sffamily}
  \def\match{\textbullet}
  \usepackage{amssymb} % \varnothing
  \expandafter\let\expandafter\OrigTeX\csname TeX \endcsname
  \DeclareRobustCommand\TeX{\textoractual{\OrigTeX}{TeX}}
  \setlength\textheight{49\baselineskip}
\else
  \let\bfdefault\bfdefault@previous % undo mathdesign's \def\bdefault{b}
  \def\Module#1{{\color{theblue}\textoractual{$\langle$}{<}\textit{#1}\textoractual{$\rangle$}{>}}}
  \DeclareRobustCommand\TeX{\textoractual{T\kern-.1em\lower.4ex\hbox{E}\kern-.075emX\@}{TeX}}
  \DeclareRobustCommand\LaTeX{\textoractual{L\kern-.26em{\sbox\z@ T\vbox to\ht\z@{%
     \hbox{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont A}%
    \vss}}}{La}\kern-.075em\TeX}
  \def\PackageFont{\ttfamily}
  \def\match{{\large\raisebox{-.15em}{\textbullet}}}
  {\catcode`\`=\active % indiscernible from ' in Bitstream Letter Gothic
   \g@addto@macro\macro@code{\let`\textasciigrave}}
  \DeclareEncodingSubset{TS1}{blg}{1} % for \textasciigrave
  \linespread{1.07}\normalfont
  \setlength\textheight{48\baselineskip}
\fi
\addtolength\textheight{\topskip}
\setlength\topmargin{5pt}
% sections
%\def\@seccntformat#1{\setbox0\hbox to0pt{\hss\colorbox{theshade}{\space\color{sectioning}\csname the#1\endcsname\strut\space}\hskip\marginparsep}\ht0=0pt \dp0=0pt \box0}
\def\@seccntformat#1{\llap{\csname the#1\endcsname\hskip\marginparsep}}
\def\section{\@startsection {section}{1}{\z@}%
  {-3.5ex \@plus -1ex \@minus -.2ex}%
  {2.3ex \@plus.2ex}%
  {\normalfont\Large\ifcmr\fontseries{bx}\else\fontseries{eb}\fi\sffamily\color{sectioning}}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
  {-3.25ex\@plus -1ex \@minus -.2ex}%
  {1.5ex \@plus .2ex}%
  {\normalfont\large\ifcmr\fontseries{bx}\else\fontseries{eb}\fi\sffamily\color{sectioning}}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
  {-3.25ex\@plus -1ex \@minus -.2ex}%
  {1.5ex \@plus .2ex}%
  {\normalfont\normalsize\ifcmr\fontseries{bx}\else\fontseries{eb}\fi\sffamily\color{sectioning}}}
\def\paragraph{\@startsection{paragraph}{4}%
  {0pt}{8pt plus 2pt minus 1pt}{-1em}%
  {\normalfont\normalsize\itshape}}
% title
\def\@maketitle{%
  \newpage\null\vskip 2em
  \begin{center}\let\footnote\thanks\sffamily
    {\huge \@title\par}\vskip 1.5em
    {\large \parbox{.33\textwidth}{\centering\@author}%
            \parbox{.33\textwidth}{\centering\@date}}%
  \vskip2.5em\rule{\textwidth}{.4pt}%
  \end{center}\par\vskip1.5em}
\def\abstractname{}
% headers
\headheight=15pt
\def\ps@MTheadings{%
  \def\@oddhead{%
    \hbox to\textwidth{\vbox{\hbox to\textwidth{%
      \footnotesize\sffamily{\leftmark\rightmark\strut}\hfill\thepage\strut}%
      \hrule height 0.4pt width\textwidth \vskip-0.4pt
    }}\hss}
  \let\@oddfoot\@empty
  \let\@mkboth\markboth
  \def\sectionmark##1{\markboth{\textls*[70]{\MakeUppercase{##1}}}{}}
  \def\subsectionmark##1{\markright{\,: ##1}}}
\pagestyle{MTheadings}
% toc
\let\l@section@\l@section
\def\l@section{\vskip -1.25ex\l@section@}
\def\l@subsection{\vskip.35ex \penalty\@secpenalty \@dottedtocline{2}{1.5em}{2.7em}}
\def\l@subsubsection#1#2{%
  \leftskip 4.2em
  \rightskip 2em plus 2em
  \parindent 0pt
  {\let\numberline\@gobble{\small #1~[#2]}}}
\def\l@table{\@dottedtocline{1}{0pt}{1.5em}}
\def\@pnumwidth{1.7em}
\ifpdf
  \let\ORIGpdfoutline\pdfoutline
  \def\special@outlines{attr{/F 01}}
  \def\normaloutline {\protected@write\@outlinefile{}{\let\pdfoutline \ORIGpdfoutline}}
  \def\specialoutline{\protected@write\@outlinefile{}{\def\pdfoutline{\ORIGpdfoutline\special@outlines}}}
  \g@addto@macro\appendix{\specialoutline}
\fi
\def\defspecial@toc#1#2#3{\long\def#1{%
  \ifpdf\phantomsection\specialoutline\pdfbookmark[1]{#2}{#3}\normaloutline\fi
  \section*{#2}\@mkboth{\textls*[70]{\MakeUppercase{#2}}}{}%
  \@starttoc{#3}}}
\defspecial@toc\tableofcontents\contentsname{toc}
\defspecial@toc\listoftables\listtablename{lot}
% bibliography
\def\@cite#1#2{#1\if@tempswa, #2\fi}
\def\thebibliography#1{%
  \section{\refname}%
  \list{}{\leftmargin 0pt}%
  \sloppy
  \clubpenalty 4000
  \@clubpenalty \clubpenalty
  \widowpenalty 4000}
\def\@biblabel#1{}
% footnotes
\long\def\@makefntext#1{%
  \leftskip 0pt
  \parindent 0pt
  \everypar{\parindent 0pt}%
  \leavevmode\llap{\@thefnmark\hskip\marginparsep}#1}
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width \columnwidth
  \kern2.6\p@}
\skip\@mpfootins=4pt
% lists
\setlength\leftmargini{15pt}
\setlength\leftmarginii{12.5pt}
\setlength\leftmarginiii{10pt}
\def\@listi{\leftmargin \leftmargini
            \parsep 4.5pt plus 1pt minus 1pt
            \topsep 4.5pt plus 1pt minus 1pt
            \itemsep 0pt}
\let\@listI\@listi
\def\descriptionlabel#1{\hspace\labelsep\normalfont#1:}
\renewenvironment{itemize}
  {\ifnum \@itemdepth >\thr@@\@toodeep\else
    \advance\@itemdepth\@ne
    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
    \expandafter\list
      \csname\@itemitem\endcsname
      {\ifnum\@itemdepth=\@ne\leftmargin 0pt\fi
	      \def\makelabel##1{\hss\llap{\color{sectioning}##1}}}%
   \fi}
  {\endlist}
\newenvironment{enum}[1][0]
  {\list\labelenumi
    {\usecounter{enumi}\setcounter{enumi}{#1}\addtocounter{enumi}{-1}%
     \renewcommand\labelenumi{\texttt{\theenumi}:}%
     \leftmargin 30pt
     \itemindent-15pt
     \labelwidth 15pt
     \labelsep 0pt
     \def\makelabel##1{##1\hss}}}
  {\endlist}
\newenvironment{options}
  {\list{}
    {\leftmargin 0pt
     \labelwidth 0pt
     \labelsep 1em
     \itemindent \labelsep
     \lstset{belowskip=0pt}}}
  {\endlist}
% boxes (for some reason, mathdesign changes these values)
\setlength\fboxrule{0.4pt}
\setlength\fboxsep{3pt}
\setlength\arrayrulewidth{0.4pt}
% tables
\setlength\tabcolsep{2pt}
\newbox\mt@box
\newdimen\mt@unvdimen
\long\def\@makecaption#1#2{%
  \setbox\mt@box\vbox{\llap{\vbox{% \fboxsep = 4pt
          \vskip\dimexpr\floatsep-4pt+\fboxrule\relax
          \hsize\dimexpr\marginparwidth-\marginparsep-4pt-\fboxrule\relax
          \rightskip\dimexpr\marginparsep+4pt+\fboxrule\relax plus 2.5em
          \footnotesize \sffamily #1:\\[-\dimexpr\aboverulesep+\cmidrulewidth+3.5\fboxrule]
	  \textcolor{theframe}{\rlap{\vrule width \hsize height\fboxrule}}\\[.3\baselineskip] #2}}}
  \mt@unvdimen\dimexpr\ht\mt@box+\dp\mt@box\relax
  \unvbox\mt@box
  \vskip-\mt@unvdimen}
% index and change log
\IndexPrologue{\section{Index}%
  Numbers in upright shape refer to the page where the corresponding entry is described
  (bold face) resp. occurs. Numbers in italics refer to the code line
  where the corresponding entry is defined (underlined) resp. used.}
\GlossaryPrologue{\section{Change history}\label{sec:changes}\vspace*{-\multicolsep}}
 %\setcounter{finalcolumnbadness}{100}
 %\raggedcolumns
\setcounter{IndexColumns}{2}
\def\IndexMin{12\baselineskip}
\g@addto@macro\IndexParms{%
  \footnotesize
  \def\indexspace#1{%
    \end{multicols}
    \vspace*{-2\baselineskip}%
    \begin{multicols}{2}
      \ifpdf{\let\bfseries\empty\let\hfil\empty\phantomsection\pdfbookmark[2]{#1}{#1}}\fi
      \setbox0\hbox{\sffamily\hss#1}%
      \ifdim\wd0<1em \setbox0\hbox to 1em{\sffamily\hss#1\hss}\fi
      \llap{\color{thegrey}\box0\hskip\marginparsep}%
      \vspace*{-\baselineskip}%
      \IndexParms %\rightskip 15pt
      \let\item\@idxitem
      \raggedcolumns}}
\def\GlossaryParms{\IndexParms
  \let\indexspace\relax
  \def\@idxitem ##1##2\efill{%
    \end{multicols}
    \ifpdf \vspace{-3.25ex}%
      \pdfbookmark[2]{\if##1v\relax ##2
          (\csname MTversiondate##2\endcsname)\else ##2\fi}
        {subsection\zap@space ##2 \@empty}\fi
    \begin{multicols}{2}[%
        \subsubsection*{\if##1v\relax
        \llap{\mdseries\color{thegrey}\footnotesize
              \csname MTversiondate##2\endcsname\hskip\marginparsep}%
         Version ##2\else ##2\fi}][6\baselineskip]
      \GlossaryParms \rightskip 15pt plus 5pt
      \let\item\@idxitem
      \ignorespaces \makeatletter \scan@allowedfalse}%
  \def\subitem{\par\hangindent 15pt}%
  \def\subsubitem{\subitem\hspace*{7.5pt}}}
% macro code
\MacroTopsep=0pt
\MacrocodeTopsep=3pt
\setlength\MacroIndent{0pt}
\def\theCodelineNo{\reset@font\sffamily\color{thegrey}\scriptsize
  \textoractual{\arabic{CodelineNo}\ }{}}% don't copy line numbers
\def\MacroFont{\ttfamily\small}
\def\AltMacroFont{\ttfamily\footnotesize}
\def\PrintMacroName#1{\strut\MacroFont\string #1\hskip15pt}
\def\ImplementationSettings{%
  \linespread{1}%
  \hfuzz=10pt
  \def\MacroFont{\ttfamily\footnotesize}%
  \let\macro@font\MacroFont}
% additional bells ...
\def\Describe#1#2#3{\noindent\csname Describe#1\endcsname{#2}%
  \DescribeValues{#1}{#3}}
\def\DescribeOption{\leavevmode\@bsphack
  \begingroup\MakePrivateLetters\Describe@Option}
\def\Describe@Option#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeOption{#1}}%
  \SpecialOptionIndex{#1}\@esphack\ignorespaces}
\def\DescribePackage{\leavevmode\@bsphack
  \begingroup\MakePrivateLetters\Describe@Package}
\def\Describe@Package#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeOption{#1.sty}}%
  \CatIndex{#1}{package}\@esphack\ignorespaces}
\def\DescribeValues#1#2{%
  \let\@tempa\@empty \let\Option@default\@empty
  \@for\@tempb:=#2\do{%
    \csname Special#1Value\expandafter\endcsname\@tempb\@nil
    \expandafter\g@addto@macro\expandafter\@tempa
      \expandafter{\csname #1Sep\endcsname}%
    \expandafter\g@addto@macro\expandafter\@tempa
      \expandafter{\@tempb}}%
  \@ifnextchar[\PrintValues{\PrintValues[\Option@default]}}
\def\SpecialOptionValue#1#2\@nil{%
  \if#1:\def\@tempb{\Variable{#2}}\else %                      : = variable
  \if#1!\def\@tempb{#2}\def\Option@default{#2}\else %          ! = default
  \if#1*\def\@tempb{#2}\def\Option@default{\MaybeDefault{#2}}% * = default (maybe)
  \fi\fi\fi}
\def\SpecialMacroValue#1#2\@nil{%
  \if#1?\def\@tempb{\normalsize[\Variable{#2}]}%  % ? = optional
   \else\def\@tempb{\normalsize\{\Variable{#1#2}\}}\fi}
\let\SpecialEnvValue\SpecialMacroValue
\DeclareRobustCommand\langlechar{<} % for makeindex
\DeclareRobustCommand\ranglechar{>}
\def\Variable#1{%
  \textoractual{$\langle$}{\langlechar}%
    {\rmfamily\itshape\small#1}%
  \textoractual{$\rangle$}{\ranglechar}}
\let\m@a\meta \def\meta#1{\textoractual{\m@a{#1}}{\langlechar#1\ranglechar}}
\def\MaybeDefault#1{\textrm{*}\,#1}
\def\OptionSep{{\rmfamily, }} \def\MacroSep{\,} \def\EnvironmentSep{\,}
\def\PrintValues[#1]{{\MacroFont\expandafter\@gobble\@tempa\hfill #1}\\*[.25\baselineskip]}
\def\CatIndex#1#2{\index{#1\actualchar{\protect\ttfamily #1} (#2)\encapchar hyperpage}}
\def\CatIndeX#1#2#3{\index{#2\actualchar#1\ (#3)\encapchar hyperpage}}
\def\SpecialOptionIndex#1{\@bsphack
  \index{\quotechar/#1% sort options as `Symbols'
    \actualchar{\protect\ttfamily#1}\encapchar usage}%
  \CatIndex{#1}{option}\@esphack}
\def\SpecialUsageIndex#1{\@bsphack
  \index{\quotechar1% sort commands as `Numbers'
    \actualchar\string\verb
      \quotechar*\verbatimchar\string#1\verbatimchar\encapchar usage}%
  {\let\special@index\index\SpecialIndex@{#1}{\encapchar usage}}\@esphack}
\def\SpecialEnvIndex#1{\CatIndex{#1}{environment}}
%</driver|docsty>
% microtype's index style (microtype-gind.ist):
%<docist>actual '='
%<docist>quote '!'
%<docist>level '>'
%<docist>preamble  "\n \\begin{theindex} \n \\makeatletter\\scan@allowedfalse\n\\indexspace"
%<docist>postamble "\n\n \\end{theindex}\n"
%<docist>item_x1   "\\efill \n \\subitem "
%<docist>delim_0   "\\pfill "
%<docist>delim_1   "\\pfill "
%<docist>heading_prefix    "{\\bfseries\\hfil "
%<docist>heading_suffix    "\\hfil}\\nopagebreak\n"
%<docist>headings_flag      1
%<docist>symhead_positive  "Options"
%<docist>numhead_positive  "Commands"
%<*driver|docsty>
\def\PrintDescribeMacro#1{\strut\MacroFont\color{thegreen}\string #1}
\def\PrintDescribeEnv#1{\strut\MacroFont\bslash begin\{{\color{thegreen}#1}\}%
  \\*[.25\baselineskip]\strut\bslash end\{{\color{thegreen}#1}\}}
\def\PrintDescribeOption#1{\strut\MacroFont\color{thered}#1}
\def\Indexing{\let\special@index\codeline@wrindex}
\def\NoIndexing{\let\special@index\@gobble}
\def\GeneralChanges#1{\edef\generalname{\if*#1 General\else#1\fi}}% mind the space!
\DeclareRobustCommand\key[1]{\textcolor{thered}{\ttfamily#1}}
\DeclareRobustCommand\pkg[1]{{\PackageFont#1}\@bsphack\CatIndex{#1}{package}\@esphack}
\DeclareRobustCommand\opt[1]{{\ttfamily#1}\@bsphack\CatIndex{#1}{option}\@esphack}
\DeclareRobustCommand\file[1]{{\ttfamily#1}}
\def\RequiresSep{ \textbar\ }
\def\requires#1{\let\@tempa\@empty
  \@for\@tempb:=#1\do{%
    \g@addto@macro\@tempa\RequiresSep
    \expandafter\g@addto@macro\expandafter\@tempa\expandafter{\@tempb}}%
  \hfill{\setlength\fboxsep{2pt}%
    \fcolorbox{theframe}{white}{\mdseries\small\strut\color{sectioning}%
      \,\expandafter\@gobble\@tempa\,}}}
% ... and whistles
{\catcode`\"\active
 \gdef\verbatim#1
   {\catcode`\"\active \def"##1"{\colorbox{theshade}{%
      \textrm{Text lost! Please install the \pkg{listings} package.}}}%
    \@beginparpenalty\predisplaypenalty\@verbatim\MacroFont
    \frenchspacing\@vobeyspaces\expandafter\@xverbatim\@gobble}}
\IfFileExists{listings.sty}{
 \usepackage{listings}
 \lstset{
   gobble=1,columns=flexible,keepspaces,upquote,escapechar=",
   basicstyle=\MacroFont,
   keywords=[0]{\microtypesetup,\DeclareMicrotypeSet,\UseMicrotypeSet,
     \DeclareMicrotypeSetDefault,\SetProtrusion,\SetExpansion,\SetTracking,
     \SetExtraKerning,\SetExtraSpacing,\DisableLigatures,\DeclareCharacterInheritance,
     \DeclareMicrotypeVariants,\DeclareMicrotypeAlias,\DeclareMicrotypeBabelHook,
     \LoadMicrotypeFile,\microtypecontext,\textmicrotypecontext,
     \textls,\lsstyle,\lslig,\Microtype@Hook},
   keywordstyle=[0]\color{thegreen},
   keywords=[1]{protrusion,expansion,activate,DVIoutput,draft,final,verbose,
     config,factor,auto,stretch,shrink,step,selected,unit,tracking,kerning,
     spacing,letterspace,babel,context,
    %defersetup,copyfonts,enable,disable,% undocumented
     no ligatures,outer spacing,outer kerning}, % there are three \nobreakspace in this line
   keywordstyle=[1]\color{thered},
   comment=[l]\%,
   commentstyle=\color{thegrey}\itshape,
   alsoother={0123456789_},
   frame=single,backgroundcolor=\color{theshade},rulecolor=\color{theframe},
   framerule=\fboxrule,xleftmargin=3.4pt,xrightmargin=3.4pt,belowskip=\smallskipamount
 }
 \let\verbatim\relax
 \lstnewenvironment{verbatim}[1][]{\lstset{##1}}{}
 \ifpdf \IfFileExists{dummy-space.pfb}{%
   \pdfmapline{=dummy-space <dummy-space.pfb}
   \font\dummyspace=dummy-space
   \pdfglyphtounicode{space}{0020}
   \def\lst@outputspace{% copy spaces (from a font that really has a space at x20)
     \setbox0\hbox{ }\@tempdima\wd0
     \setbox0\hbox{\dummyspace\char"20}\advance\@tempdima-\wd0
     \unhbox0 \kern\@tempdima}
  }\relax \fi
}{
 \let\lstset\@gobble
}
\def\todo#1{\changes{zTo Do}{0000/00/00}{#1}%
  \marginpar{\rightskip2\marginparsep plus1em\hangindent1.5em\hangafter-2
    \smash{\rlap{\raisebox{-3.3ex}{\colorbox{thered}{\Large\color{white}!}}}}%
    \footnotesize\textcolor{thered}{#1}}}
\let\todo\@gobble
\newcommand\microtypesample[1]{\begin{quote}#1\end{quote}}
\let\emptypdfpageresources\relax
% fancy PDF document
\ifpdf
  \ifx\eTeXversion\@undefined \else % errors when not using etex (conflict with multicol)
    \ifnum\pdftexversion < 140      % no longer required with pdftex 1.40
      \usepackage{pdfcolmk}
  \fi\fi
  \usepackage[bookmarks,bookmarksopen,pdfdisplaydoctitle,
              colorlinks,linkcolor=theblue,citecolor=theblue,urlcolor=thered,
              hyperindex=false,hyperfootnotes=false]
             {hyperref}
  \PassOptionsToPackage{nodvi}{totpages} % remove annoying log output
  \usepackage{hyperxmp} % (hyperxmp loads totpages)
  \usepackage{attachfile}
  \usepackage{pdfpages}
  \hypersetup{
    pdftitle={The microtype package},
    pdfauthor={R Schlicht <w.m.l@gmx.net>},
    pdfsubject={Subliminal refinements towards typographical perfection},
    pdfkeywords={TeX, LaTeX, pdfTeX, LuaTeX, XeTeX, typography, micro-typography,
      character protrusion, margin kerning, optical alignment, font expansion,
      font scaling, hz, kerning, spacing, glue, letterspacing, tracking, ligatures},
    pdfcopyright={\textcopyright\ 2004--2020 R Schlicht\012%
      This work 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.\012%
      This work has the LPPL maintenance status `author-maintained'.},
    pdflicenseurl={http://www.latex-project.org/lppl/}
  }
  \pdfcatalog{/Lang(en-GB)}
  \ifnum\pdftexversion < 130 \else
    \IfFileExists{hypdestopt.sty}{\usepackage{hypdestopt}}\relax\fi
  \def\usage#1{\textbf{\hyperpage{#1}}}% for indexing of \DescribeMacro ...
  \def\changes@#1#2#3{% ... the changes ...
    \protected@edef\@tempa{\noexpand\glossary{#1\levelchar
      \ifx\saved@macroname\@empty \space\actualchar\generalname
      \else\expandafter\@gobble\saved@macroname\actualchar
        \string\verb\quotechar*\verbatimchar\saved@macroname\verbatimchar\fi
      :\levelchar #3\encapchar hyperpage}}%
    \@tempa\endgroup\@esphack}
  \def\theCodelineNo{% ... and everything else
    \reset@font\sffamily\color{thegrey}\scriptsize
    \@tempcnta\arabic{CodelineNo}\advance\@tempcnta by\@ne
    \hypertarget{L:\number\@tempcnta}
      {\textoractual{\arabic{CodelineNo}\ }{}}}% don't copy line numbers
  \def\main#1{\underline{\itshape\hyperlink{L:#1}{#1}}}
  \def\codeline#1{{\itshape\link@sanitize#1-\@nil{#1}}}
  \def\link@sanitize#1-#2\@nil{\link@@sanitize#1,\@nil}
  \def\link@@sanitize#1,#2\@nil{\hyperlink{L:#1}}
  \def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble
      \string#1\actualchar
      \string\verb\quotechar*\verbatimchar\string#1\verbatimchar
      \encapchar codeline}%
    \@esphack}
  \def\ctanurl#1{Available from \acronym{CTAN} at
                 \href{http://mirror.ctan.org/#1}{\nolinkurl{/#1}}}
  \def\ctanpkgurl#1{Available from \acronym{CTAN} at
                    \href{https://www.ctan.org/pkg/#1}{\nolinkurl{pkg/#1}}}
  \DeclareRobustCommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}}
  \def\mailtoRS{\href % some PDF viewers don't like spaces:
    {mailto:Robert\%20Schlicht\%3cw.m.l@gmx.net\%3e?subject=[microtype\%20\fileversion]}
    {\texttt{w.m.l@gmx.net}}}
  % the samples in the introduction, utilising nested optional content groups (aka. layers):
  \ifnum\pdftexversion<140 \else
    \def\mt@layer#1#2{\pdfliteral page{/OC/#1 BDC}#2\pdfliteral page{EMC}}
    \ifx\mt@objects\@undefined\let\mt@objects\@empty\fi
    \ifx\mt@order  \@undefined\let\mt@order  \@empty\fi
    \let\mt@resources\@empty
    \def\mt@register#1#2{%
      \immediate\pdfobj{<< /Type/OCG /Name(#1:#2) >>}
      \expandafter\xdef\csname mt@#1@#2\endcsname{\the\pdflastobj\space 0 R }
      \xdef\mt@objects  {\mt@objects        \csname mt@#1@#2\endcsname}
      \xdef\mt@order    {\mt@order          \csname mt@#1@#2\endcsname}
      \xdef\mt@resources{\mt@resources/#1#2 \csname mt@#1@#2\endcsname}}
    \xdef\mt@order{\mt@order[(Sample)}
     \mt@register{Protrusion}{true} \mt@register{Protrusion}{false}
     \mt@register{Expansion} {true} \mt@register{Expansion} {false}
     \mt@register{_compatibility}{}
    \xdef\mt@order{\mt@order]}
    \pdfcatalog{/OCProperties <<
                   /OCGs [\mt@objects]
                   /D << /Order [\mt@order]
                         /BaseState/OFF
                         /ON [\mt@Protrusion@false \mt@Expansion@false
                              \ifx\mtl@objects\@undefined\else\mtl@objects\fi] >> >> }
    \def\mt@place#1{%
      \vskip-\mt@unvdimen
      \setbox\mt@box\vbox{#1}%
      \mt@unvdimen\dimexpr\ht\mt@box+\dp\mt@box\relax
      \unvbox\mt@box}
    \def\mt@pseudo@marg#1{%
      \mt@place{\llap{\vbox{%
        \hsize\marginparwidth
        \rightskip \marginparsep plus 1em
        \leavevmode\itshape\footnotesize #1}}}}
    \def\mt@show@sample#1#2{%
      \mt@layer{Protrusion#1}{%
        \mt@layer{Expansion#2}{%
          \mt@place{\microtypesetup{protrusion=#1,expansion=#2}%
            \mt@sample@text\strut}}}}
    \def\mt@toggle@sample#1{%
      \pdfstartlink user{/Subtype/Link
        /BS << /Type/Border/W 1 /S/D /D[4 1] >>
        /H/O /C[0.65 0.04 0.07] /Contents(Click to Toggle #1!)
        %/OC << /Type/OCMD /VE[/Not \csname mt@_compatibility@\endcsname] >> % not honoured by older viewers anyway
        /A << /S/SetOCGState /State[/Toggle \csname mt@#1@true\endcsname
                                            \csname mt@#1@false\endcsname] >>}
      #1 \hfill\pdfendlink & \mt@layer{#1true}{\rlap{on}}\mt@layer{#1false}{off}}
    \renewcommand\microtypesample[1]{%
      \begingroup
      \leftskip 15pt \rightskip 15pt
      \parskip   4pt \parindent  0pt
      \vskip 8pt % = \topsep without vertical stretchability
      \long\def\mt@sample@text{#1}
      \mt@pseudo@marg{\color{theblue}%
        After you have read the text on the right, you can view the effect of
        the features it describes by clicking on the links:\strut\\
        \colorbox{theshade}{%
          \begin{tabular}{@{}>{\upshape}l@{\quad}l}
            \mt@toggle@sample{Protrusion}\\\addlinespace
            \mt@toggle@sample{Expansion}
          \end{tabular}}\\[0.3\baselineskip]
        Both features are enabled throughout this document.}
      \mt@show@sample{false}{false}
      \mt@show@sample{false}{true}
      \mt@show@sample{true} {false}
      \mt@layer{_compatibility}{%
        % for compatibility with older PDF viewers that don't support OCGs, we
        % add a layer that contains a white box, which will hide the underlying
        % layers for older viewers, and will be ignored by PDF 1.5 capable viewers.
        \mt@place{\rlap{\hskip-\marginparwidth \color{white}%
          \vrule width\dimexpr\hsize+\marginparwidth\relax height\mt@unvdimen}}
        \mt@pseudo@marg{\color{thered}%
          If you had a \acronym{PDF} viewer that understands
          \acronym{PDF}\,{\smaller1.5}, you could view the effect of the
          micro-typographic features by clicking on the links.\strut
          \\\vphantom{\colorbox{white}{\tabular l\\\addlinespace\\\endtabular}}%
          \\[0.3\baselineskip] Both features are enabled throughout this document.}}
      \mt@show@sample{true}{true}
      \vskip 4pt
      \endgroup
      \edef\x{\pdfpageresources{/Properties <<\mt@resources>>}}\x}
    \def\emptypdfpageresources{\pdfpageresources{}}
  \fi
\else
  \usepackage{url}
  \newcommand\hyperref[2][]{#2}
  \let\hyperpage\@firstofone
  \let\texorpdfstring\@firstoftwo
  \def\ctanurl{Available from \acronym{CTAN} at \url}
  \let\ctanpkgurl\ctanurl
  \let\nolinkurl\url
  \let\mailto\texttt
  \def\mailtoRS{\mailto{w.m.l@gmx.net}}
  \let\href\texttt
  \newcommand\textattachfile[3][]{#3 \textit{[File \file{#2} not attached,
        because \file{microtype.dtx} hasn't been compiled with \pdftex.]}}
\fi
\ifx\l@ukenglish\@undefined
  \hyphenation{let-ter-spac-ing let-ter-spaced let-ter-space}
\else
  \language=\l@ukenglish
\fi
\hyphenation{%An-dre-as Ber-nard Ha-rald Mi-cha-el Pe-ter Ste-phan Wolf-ram
             %Har-ders Hop-pe Jac-kow-ski Ku-char-czyk Mei-er Mu-the-si-us Zed-ler
             %Die-te-rich Sveinung Marcin RazorXsr
             Dyballa Maverick
             with-out
             Pa-la-ti-no}
\def\fallbacktext#1{{\centering\itshape[#1]\par}}
% abbreviations
\DeclareRobustCommand\thanhthe{Th\^e%
     \ifx\eTeXversion\undefined \llap{\raisebox{0.5ex}{\'{}}}%
     \else \llap{\raisebox{0.45ex}{\'{}\kern\dimexpr.05em-2\fontdimen1\font\relax}}%
     \fi}
\DeclareRobustCommand\thanh{H\`an \thanhthe{} Th\`anh}
\DeclareRobustCommand\pdftex{\texorpdfstring{pdf\kern.05em\TeX\CatIndeX{pdf\TeX}{pdftex}{engine}}{pdfTeX}}
\DeclareRobustCommand\luatex{\texorpdfstring{Lua\kern-.05em\TeX\CatIndeX{Lua\TeX}{luatex}{engine}}{LuaTeX}}
\DeclareRobustCommand\etex{\mbox{e-\kern-.075em\TeX}\CatIndeX{e-\TeX}{etex}{engine}}
\DeclareRobustCommand\nonetex{\rlap{\kern.05em/}\etex} % aka. \TeX
\def\@reflect#1{\ifdim\fontdimen1\font=0pt \reflectbox{#1}\else\rotatebox[origin=c]{180}{#1}\fi}
\DeclareRobustCommand\xe{\textoractual{\@reflect{X}\lower.4ex\hbox{\kern-.066em\@reflect{E}}}{Xe}}% also reflect the initial `X'? 
\DeclareRobustCommand\xetex{\xe\kern-.1em\TeX\CatIndeX{\xe\TeX}{xetex}{engine}}
\DeclareRobustCommand\texlive{\TeX~Live\CatIndeX{\TeX~Live}{TeXLive}{distribution}}
\DeclareRobustCommand\miktex{MiK\TeX\CatIndeX{MiK\TeX}{MiKTeX}{distribution}}
\def\microtype{{\PackageFont microtype}}
\def\letterspace{\pkg{letterspace}}
\def\fontdim{\cmd\fontdimen\,}
\def\eg{e.g.}
\def\ie{i.e.}
\def\EM#1{#1\kern.1emem}
\DeclareRobustCommand\smaller{\setbox\z@\hbox{\@tempcnta=\f@size
  \edef\x{\@tempcnta=\the\@tempcnta}\expandafter}\x
  \advance\@tempcnta-7  \ifcase\@tempcnta\tiny\or\scriptsize\or
    \footnotesize\or\small\or\or\normalsize\or\or\large\or\or\or\Large\fi}
\DeclareRobustCommand\acronym[1]{\texorpdfstring{{\smaller\textls[60]{#1}}}{#1}}
\let\less=<
{\catcode`\<=\active
 \AtBeginDocument{\catcode`\<=\active
   \def<#1>{\acronym{#1}}
   \def\contributor#1 <#2\at#3>{\@contributor{#1}{#2@#3}}}}
\DeclareRobustCommand\@contributor[2]{\textit{#1}}
%\DeclareRobustCommand\@contributor[2]{\href{mailto:#2}{\textit{#1}}}
%\DeclareRobustCommand\@contributor[2]{\textit{#1}%
%    \expandafter\index\expandafter{\@getlastname#1 \@nil\actualchar %\href{mailto:#2}{#1}
%          #1 (contributor)\encapchar hyperpage}}
%\def\@getlastname#1 #2\@nil{\ifx\@nil#2\@nil#1\else\@getlastname#2\@nil\fi}
%<*driver>
\CodelineIndex
\EnableCrossrefs
\RecordChanges
%\OnlyDescription
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
%</driver|docsty>
% \fi
%
% ^^A -------------------------------------------------------------------------
%\GeneralChanges*
%\changes{v1.0}{2004/09/11}{Initial version}
%\changes{v2.0}{2006/12/29}{new package \letterspace: a stripped-down version,
%                           containing the letterspacing commands only}
%\GeneralChanges{Documentation}
%\changes{v1.9b}{2006/01/13}{activate expansion in the distributed <PDF>}
%\changes{v2.2}{2007/04/01}{logo transparency and amusement}
% ^^A Adobe Reader 8.0 had serious bugs with transparency. Fixed in 8.1.
%
% \GetFileInfo{microtype.dtx}
% \title{\ifx\printlogo\undefined\else\printlogo\fi
%        \textls[40]{The \microtype\ package}\\[.3\baselineskip]\large
%        Subliminal refinements towards typographical perfection}
% \author{R Schlicht\\\mailtoRS}
% \date{\fileversion\\\filedate}
%
% \maketitle \thispagestyle{empty}
%
%\begin{abstract}
%\noindent
% The \microtype\ package provides a \LaTeX\ interface to the micro-typographic
% extensions that were introduced by \pdftex\ and have since also propagated to
% \luatex\ and \xetex: most prominently, character protrusion and font expansion,
% furthermore the adjustment of interword spacing and additional kerning, as
% well as hyphenatable letterspacing (tracking) and the possibility to disable
% all or selected ligatures.
% These features may be applied to customisable sets of fonts, and all
% micro-typographic aspects of the fonts can be configured in a straight-forward
% and flexible way. Settings for various fonts are provided.
%
% Note that character protrusion requires \pdftex\ (version~0.14f or later),
% \luatex, or \xetex\ (at least version~0.9997).
% Font expansion works with \pdftex\ (version~1.20 for automatic expansion)
% or \luatex.
% The package will by default enable protrusion and expansion if they can safely
% be assumed to work.
% Disabling ligatures requires \pdftex\ ($\geq$\,1.30) or \luatex, while the
% adjustment of interword spacing and of kerning only works with \pdftex\ ($\geq$\,1.40).
% Letterspacing is available with \pdftex\ ($\geq$\,1.40) or \luatex\ ($\geq$\,0.62).
%
% The alternative package \letterspace, which also works with plain \TeX,
% provides the user commands for letterspacing only, omitting support for all
% other extensions (see section~\ref{sec:lettersp}).
%
%\bigskip\noindent
% This package is copyright \textcopyright\ 2004\kern.09em--2020 R Schlicht.
% It may be distributed and/or modified under the conditions of the
% \IfFileExists{lppl.tex}{\hyperref[LPPL:LPPL]}{\href{http://www.latex-project.org/lppl/}}
%   {\LaTeX\ Project Public License},
% either version~1.3c of this license or (at your option) any later version.
% This work has the <LPPL> maintenance status `author-maintained'.
%\end{abstract}
%
%
%\newpage
%\emptypdfpageresources ^^A layers of the logo
%{\sffamily\def\familydefault{\sfdefault}\ifcmr\else\DeclareFontSeriesDefault[sf]{bf}{sb}\fi
% \tableofcontents
% \listoftables
%}
%
%
%\newpage
%\section{Micro-typography with \TeX}\label{sec:micro-type}
%
% Micro-typography is the art of enhancing the appearance and readability of a
% document while exhibiting a minimum degree of visual obtrusion. It is
% concerned with what happens between or at the margins of characters,
% words or lines.
% Whereas the macro-typographical aspects of a document (\ie, its layout) are
% clearly visible even to the untrained eye, micro-typographical refinements
% should ideally not even be recognisable. That is, you may think that a
% document looks beautiful, but you might not be able to tell exactly
% why: good micro-typographic practice tries to reduce all potential irritations
% that might disturb a reader.
%
% Some essential micro-typographical aspects are already taken care of by
% \TeX\ out of the box -- and in an outstanding manner -- namely, hyphenation
% and justification, as well as kerning and ligatures.
% Other aspects are in the user's scope of responsibilities, \eg, to specify
% the right amounts of spacing around punctuation characters, numbers, or
% quotation marks.
% On top of this, a number of long-standing micro-typographic techniques have
% been introduced to the \TeX\ world relatively recently with \pdftex, and
% have since also propagated to \luatex\ and \xetex.
% These features make them the tool of choice not only for the creation of
% electronic documents but also of works of outstanding time-honoured typography:
% most prominently, \textit{character protrusion} (also known as margin kerning)
% and \textit{font expansion}. Quoting \thanh, the author of \pdftex, who
% writes in his thesis:
%
%\changes{v1.9b}{2006/01/13}{add samples of micro-typographic features}
%\microtypesample{\small
% `Margin kerning is the adjustments of the characters at the margins of a
%  typeset text. A simplified employment of margin kerning is hanging
%  punctuation. Margin kerning is needed for optical alignment of the margins
%  of a typeset text, because mechanical justification of the margins makes
%  them look rather ragged. Some characters can make a line appear shorter to
%  the human eye than others. Shifting such characters by an appropriate
%  amount into the margins would greatly improve the appearance of a typeset
%  text.
%
%  Composing with font expansion is the method to use a wider or narrower
%  variant of a font to make interword spacing more even. A font in a loose
%  line can be substituted by a wider variant so the interword spaces are
%  stretched by a smaller amount. Similarly, a font in a tight line can be
%  replaced by a narrower variant to reduce the amount that the interword
%  spaces are shrunk by. There is certainly a potential danger of font
%  distortion when using such manipulations, thus they must be used with
%  extreme care. The potentiality to adjust a line width by font expansion can
%  be taken into consideration while a paragraph is being broken into lines,
%  in order to choose better breakpoints.' [\cite[p.~323]{ThanhThesis}]}
%
% Another micro-typographic technique, which has always been extremely
% difficult to achieve in \TeX, is robust and hyphenatable \emph{letterspacing
% (tracking)}.\footnote{^^A
%   The \cite{soul} package undertakes great efforts, but may still fail in
%   certain circumstances; even to systematically adjust the tracking of a
%   font throughout the document remains impossible.}
% Whereas letterspacing can easily be, and often is, abused when applying
% it to lowercase letters, readability may be increased by slightly
% letterspacing (small) capitals or by decreasing the tracking of very large
% uppercase type.
%
% Setting \emph{additional kerning} for individual characters is especially
% (but not only) useful for languages whose typographical tradition requires certain
% characters to be separated by a space. For example, it is customary in French
% typography to add a small space before question mark, exclamation mark and
% semi-colon, and a bigger space before the colon and the guillemets. Until
% now, this could only be achieved by making these characters active (as is done,
% for example, by the \pkg{babel} package), which may not always be a robust
% solution. In contrast to the standard kerning built into the fonts
% (which will of course apply as usual), this additional kerning relates to
% single characters, not to character pairs.
%
% \emph{Adjustment of interword spacing} is based upon the idea that in order
% to achieve a uniform greyness of the text, the space between words should
% also depend on the surrounding characters. For example, if a word ends with
% an `r', the following space should be a tiny bit smaller than that following,
% say, an `m'. You can think of this concept as an extension to \TeX's `space
% factors'. This feature may enhance the appearance of paragraphs even more.
% Emphasis in the last sentence is on the word `may': this extension is still
% highly experimental -- in particular, only ending characters will currently
% influence the interword space. Also, the settings shipped with \microtype\
% are but a first approximation, and I~would highly welcome corrections and
% improvements. I suggest reading the reasoning behind the settings in
% section~\ref{sub:conf-spacing}.
%
% The possibility, finally, to \emph{disable all or selected ligatures} is
% particularly useful for typewriter fonts.
%
%\emptypdfpageresources ^^A layers of the sample
%\bigskip\noindent
% The \microtype\ package provides an interface to all these micro-typographic
% extensions. All micro-typographic aspects may be customised to your taste and
% needs in a straight-forward and systematic manner. The next chapters present
% a survey of all options and customisation possibilities. Should the
% micro-typographic extension discussed in a section work only with certain
% \TeX\ engines, this requirement is marked inside a grey text box on the
% right.
%
%
%\section{Getting started}
%
% There is nothing surprising in loading this package:
%\begin{verbatim}[morekeywords={[1]{microtype}}]
%\usepackage{microtype}
%\end{verbatim}
% This will be sufficient in most cases, and if you are not interested in
% fine-tuning the micro-typographic appearance of your document (however
% unlikely this would seem, since using this package is proof of your interest
% in typographic issues), you may actually skip the rest of this document.
%^^A
% If this, on the other hand, does not satisfy you -- be it for theoretical or
% practical reasons -- this manual will guide you on the path to the desired
% results along the following milestones:
%
%\changes{v2.2}{2007/06/06}{add overview}
%\begin{itemize}
%  \item Enable the desired micro-typographic features, either via the
%        respective package option or with the \cs{microtypesetup} command
%        (section~\ref{sec:options}).
%  \item Select the fonts to which this feature should be applied by declaring
%        and activating `sets of fonts'. A number of sets are predefined, which may be
%        activated directly in the package options
%        (section~\ref{sec:font-sets}).
%  \item Fine-tune the micro-typographic settings of the fonts or sets of fonts
%        (section~\ref{sec:fine-tuning}).
%  \item If you're of the kind who always wants to march on, you will certainly
%        be interested in the possibility of context-sensitive setup
%        (section~\ref{sec:context}).
%  \item You are even countenanced to leave the path of typographic virtue and
%        steal some sheep (section~\ref{sec:lettersp}) or trespass in other ways
%        (section~\ref{sec:disable-ligatures}).
%  \item Should you encounter any obstacles, follow the hints and caveats
%        (section~\ref{sec:caveats}).
%\end{itemize}
%
%
%\section{Options}\label{sec:options}
%
% Like many other \LaTeX\ packages, the \microtype\ package accepts options in
% the well-known |key=value| syntax. In the following, you will find a
% description of all \key{keys} and their possible |values|
% (`|true|' may be omitted; multiple values, where allowed, must be enclosed in
% braces; the default value is shown on the right -- if preceded by an asterisk,
% this default only applies when running an up-to-date \pdftex\ in <PDF> mode).
%
%
%\subsection{Enabling the micro-typographic features}\label{sub:options-microtype}
%
%\Describe{Option}{protrusion}
%                 {*true,false,compatibility,nocompatibility,:font set name}
%\DescribeOption{expansion}
% These are the main options to control the level of micro-typographic
% refinement which the fonts in your document should gain. By default, the
% package is moderately greedy: character protrusion will always be enabled,
% font expansion will only be disabled when the fonts cannot be expanded
% automatically, that is, with \pdftex\ versions older than 1.20 or in <DVI>
% output mode (see section~\ref{sub:options-misc}), or with \xetex.
% In other words, \microtype\ will try to apply as much micro-typography as
% can safely be expected to work under the respective conditions (hence, it is
% usually not necessary to load the package with different options, \eg, for <PDF>
% resp. <DVI> mode).
%
% Protrusion and expansion may be enabled or disabled independently from each
% other by setting the respective key to |true| resp. |false|. The
% \opt{activate} option
%\DescribeOption{activate}
% is a shortcut for setting both options at the same time. Therefore, the
% following lines all have the same effect (when creating <PDF> files with a
% recent version of \pdftex):
%\begin{verbatim}
%\usepackage[protrusion=true,expansion]{microtype}
%\end{verbatim}
%\begin{verbatim}
%\usepackage[activate={true,nocompatibility}]{microtype}
%\end{verbatim}
%\begin{verbatim}
%\usepackage{microtype}
%\end{verbatim}
%\smallskip
% With activated font expansion and/or character protrusion, line breaks
% (and consequently, page breaks) may turn out differently. If this is not
% desired -- because you are re-typesetting a book whose pagination must not
% change -- you may pass the value |compatibility| to the \opt{protrusion}
% and/or \opt{expansion} options. Typographically, however, the results will be
% suboptimal, hence the default value is |nocompatibility|.
%
% Finally, you may also specify the name of a font set to which character
% protrusion and/or font expansion should be restricted. See
% section~\ref{sec:font-sets} for a detailed discussion. Specifying a font set
% for a feature implicitly activates this feature.
%
%\medskip
%\Describe{Option}{tracking}{true,!false,:font set name}
% This option will systematically change the tracking of the fonts specified in
% the active font set (by default, all small capitals).
% It is not available with \xetex\ (you may use the `|LetterSpace|'
% option of the \cite{fontspec} package instead).
% With \pdftex, it is only available in <PDF> mode.
%
%\medskip
%\Describe{Option}{kerning}{true,!false,:font set name}
%\DescribeOption{spacing}
% These features do not unconditionally improve the quality of the typeset text:
% the \opt{spacing} feature is still considered experimental, while the \opt{kerning}
% feature only makes sense in special cases.
% Therefore, neither feature is enabled by default. They are not available
% with \xetex\ or \luatex.
%
%\begin{table}\small
%\changes{v2.3a}{2008/02/25}{add table of available and enabled features}
%\caption{Availability of micro-typographic features}\label{tab:available-features}
%\catcode`\!=13 \def!{\textcolor{thegreen}{\hskip.9em $\bigstar$}}
%\catcode`\?=13 \def?{\textcolor{theblue} {\hskip 1em $\boxtimes$}}
%\catcode`\_=13 \def_{\textcolor{thered}  {\hskip 1em $\varnothing$}}
%\setlength\fboxsep{4pt}
%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax
%\fcolorbox{theframe}{white}{^^A
%\begin{minipage}{\textwidth}
%\def\arraystretch{1.2}
%\begin{tabular}{*3{@{}L{40pt}}*2{@{}L{43pt}}*4{@{}L{37pt}}@{}}
%      \multicolumn{3}{@{}l}{\footnotesize \TeX\ engine}
%    & \multicolumn{6}{@{}l}{\footnotesize Micro-typographic features}\\
%\cmidrule(r){1-3}\cmidrule{4-9}
%      \footnotesize Engine
%    & \footnotesize Version
%    & \footnotesize Output
%    & \footnotesize Protrusion
%    & \footnotesize Expansion
%    & \footnotesize (= auto)
%    & \footnotesize Kerning
%    & \footnotesize Spacing
%    & \footnotesize Tracking\\
%\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}
%\cmidrule(r){5-5}\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule{9-9}
% \pdftex
%    & $\less$ 0.14f & <DVI>/<PDF> & _ & _ & _ & _ & _ & _\\
%    & $\geq$  0.14f & <DVI>/<PDF> & ! & ? & _ & _ & _ & _\\
%    & $\geq$  1.20  & <DVI>       & ! & ? & _ & _ & _ & _\\
%    &               & <PDF>       & ! & ? & ! & _ & _ & _\\
%    & $\geq$  1.40  & <DVI>       & ! & ? & _ & ? & ? & _\\
%    &               & <PDF>       & ! & ? & ! & ? & ? & ?\\
%\cmidrule(r){1-3}
% \luatex ^^A we will have to re-model kerning and spacing with \luatex
%    & $\geq$  0.30  & <DVI>       & ! & ? & _ & _ & _ & _\\
%    &               & <PDF>       & ! & ? & ! & _ & _ & _\\
%    & $\geq$  0.62  & <DVI>       & ! & _ & \hskip1em\llap{(}\textcolor{theblue}{$\boxtimes$})\textsuperscript{\itshape a} & _ & _ & ?\\
%    &               & <PDF>       & ! & _ & ! & _ & _ & ?\\
%\cmidrule(r){1-3}
% \let\textoractual\@firstoftwo ^^A why?
% \xetex
%    & $\geq$ 0.9997 & <PDF>       & ! & _ & _ & _ & _ & _\\
%\bottomrule
%\end{tabular}^^A
%\vskip4pt\footnotesize
%\hskip-1em
% ! = enabled\quad
% ? = not enabled\quad
% _ = not available
%\hfill
% \textit{a}\quad by means of variable tracking\hskip1em
%\vskip4pt
%\end{minipage}^^A
%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox
%\end{table}
%
%\medskip\noindent
% Table~\ref{tab:available-features} presents an overview of which
% micro-typographic features are available and enabled by default for the
% relevant \TeX\ versions and output modes.
%
%\medskip\noindent
% Whether ligatures should be disabled cannot be controlled via a package option
% but by using the \cs{DisableLigatures} command, which is explained in
% section~\ref{sec:disable-ligatures}.
%
%
%\subsection[Character protrusion]
%           {Character protrusion \requires{\pdftex~0.14f,\luatex~0.30,\xetex~0.9997}}
%           \label{sub:options-protrusion}
%
%\Describe{Option}{factor}{:integer}[1000]
% Using this option, you can globally increase or decrease the amount by which
% the characters will be protruded. While a value of 1000 means that the full
% protrusion as specified in the configuration (see section~\ref{sub:protrusion})
% will be used, a value of 500 would result in halving all protrusion factors of
% the configuration. This might be useful if you are generally satisfied with
% the settings but prefer the margin kerning to be less or more visible
% (\eg, if you are so proud of being able to use this feature that you want
% everybody to see it, or -- to mention a motivation more in compliance with
% typographical correctness -- if you are using a large font that calls for
% more modest protrusion).
%
%\medskip
%\Describe{Option}{unit}{!character,:dimension}
% This option is described in section~\ref{sub:protrusion}, apropos the command
% \cs{SetProtrusion}. Use with care.
%
%
%\subsection[Font expansion]
%           {Font expansion \requires{\pdftex~0.14f,\luatex~0.30}}
%           \label{sub:options-expansion}
%
%\Describe{Option}{auto}{*true,false}
% Beginning with \pdftex\ version 1.20 (inherited by \luatex), the expanded
% instances of the fonts may be calculated automatically and at run-time instead
% of the user having to prepare them in advance. This option is true
% by default provided that you are using a \TeX\ engine with this capability
% and the output mode is <PDF>.\footnote{
% With \pdftex, automatic font expansion does not work with bitmap fonts.
% Therefore, if you are using the Computer Modern Roman fonts in <T1> encoding,
% you should either install the \pkg{cm-super} package or use the Latin Modern
% fonts (package \pkg{lmodern}).}
%\changes{v1.9}{2005/08/27}{add remark about Type\,1 fonts required for
%                           automatic font expansion}
% If \opt{auto} is set to false, the font instances for all expansion steps must exist
% (with files called \meta{font~name}\texttt{\textpm}\meta{expansion value},
% \eg, \file{cmr12+10}, as described in the \cite{pdftexman}).
%\iffalse ^^A no longer true (1.40?)
% If expanded instances of the fonts are available, they will be used
% regardless whether \opt{auto} is true or not.
%\fi
% With \luatex, expansion is always automatic.
%
% When generating <DVI> files, font expansion has to be enabled explicitly.
% With \pdftex, \emph{automatic} font expansion will not work because
% the postprocessing drivers (|dvips|, |dvipdfm|, etc.) resp. the <DVI> viewer
% are not able to generate the fonts on the fly.
%^^A\changes{v2.7}{2017/07/06}{add remark about automatic font expansion with \texttt{dvilualatex}}
%\changes{v2.8}{2020/02/09}{squash fake news about automatic font expansion with \texttt{dvilualatex}}^^A
% With \luatex, on the other hand, expansion in <DVI> mode is realised by
% modifying the inter-letter spacing (tracking) instead of the glyphs
% themselves, which may or may not be desired.
%
%\medskip
%\Describe{Option}{stretch}{:integer}[20]
%\DescribeOption{shrink}
% You may specify the stretchability and shrinkability of a font, \ie, the
% maximum amount that a font may be stretched or shrunk. The numbers will be
% divided by 1000, so that a stretch limit of 10 means that the font may be
% expanded by up to~1\%.
% The default stretch limit is 20. The shrink limit will by default be the
% same as the stretch limit.
%
%\medskip
%\Describe{Option}{step}{:integer}[\MaybeDefault{1}]
% Fonts are not expanded by arbitrary amounts but only by certain discrete
% steps within the expansion limits. With recent versions of \pdftex\ (1.40 or
% newer) or \luatex, this option is by default set to 1, in order to allow
% trying the maximum number of font instances, and hence to guarantee
% the best possible output.\footnote{
%   The downside with this default is that \pdftex\ may run out of memory with
%   huge documents; in this case, read about the error messages in the `Hints
%   and caveats' section~(\ref{sec:caveats}), or try with a larger \opt{step}.}
% Older \pdftex\ versions, however, had to include every font instance in the
% <PDF> file, which may increase the file size quite dramatically. Therefore,
% in case you are using a pre-1.40 \pdftex\ version, \opt{step} is by default
% set to one fifth of the smaller value of \opt{stretch} and \opt{shrink}.
%
%\medskip
%\Describe{Option}{selected}{true,!false}
% When applying font expansion, it is possible to restrict the expansion of some
% characters that are more sensitive to deformation than others (\eg, the `O',
% in contrast to the `I'). This is called \emph{selected expansion}, and its
% usage allows increasing the stretch and shrink limits (to, say, 30 instead
% of 20); however, the gain is limited since at the same time the average
% stretch variance will be decreased. Therefore, this option is by default
% set to |false|, so that all characters will be expanded by the same amount.
% See section~\ref{sub:expansion} for a more detailed discussion.
%
%
%\subsection[Tracking]
%           {Tracking \requires{\pdftex~1.40,\luatex~0.62}}
%           \label{sub:option-tracking}
%
%\Describe{Option}{letterspace}{:integer}[100]
% This option changes the default amount for tracking (see section~\ref{sub:tracking})
% resp. letterspacing (see section~\ref{sec:lettersp}). The amount is specified
% in thousandths of \EM{1}; admissible values are in the range of \textminus1000
% to +1000.
%
%
%\subsection{Miscellaneous options}\label{sub:options-misc}
%
%\changes{v2.0}{2006/11/28}{add remark about `\opt{draft}' option disabling \microtype\
%               (noted by \contributor Michalis Miatidis <miatidis\at informatik.rwth-aachen.de>)}
%                                                                    ^^A private mail, 2006/11/26
%\Describe{Option}{draft}{true,!false}
%\DescribeOption{final}
% If the \opt{draft} option is passed to the package, \emph{all
% micro-typographic extensions will be disabled}, which may lead to different
% line, and hence page, breaks. The \opt{draft} and \opt{final} options may
% also be inherited from the class options; of course, you can override them in
% the package options. E.g., if you are using the class option |draft| to
% show any overfull boxes, you should load \microtype\ with the |final|
% option.
%
%\medskip
%\Describe{Option}{verbose}{true,!false,errors,silent}
% Information on the settings used for each font will be written into the log
% file if you enable the \opt{verbose} option. When \microtype\ encounters a
% problem that is not fatal (\eg, an unknown character in the settings, or
% non-existent settings), it will by default only issue a warning and try to
% continue. Loading the package with |verbose=errors| will turn all warnings
% into errors, so that you can be sure that no problem will go unnoticed. If on
% the other hand you have investigated all warnings and decide to ignore them,
% you may silence \microtype\ with |verbose=silent|.
%
%\medskip
%\Describe{Option}{babel}{true,!false}
% Loading the package with the \opt{babel} option will adjust the typesetting
% according to the respective selected language. Read section~\ref{sec:context}
% for further information.
%
%\medskip
%\Describe{Option}{config}{:file name}[microtype]
% Various settings for this package will be loaded from a main configuration
% file, by default \file{microtype.cfg} (see section~\ref{sub:config-file}).
% You can have a different configuration file loaded instead by specifying its
% name \emph{without the extension}, \eg, |config=mycrotype|.
%
%\medskip
%\Describe{Option}{DVIoutput}{true,*false}
% \pdftex\ and \luatex\ are not only able to generate <PDF> output but can also
% spit out <DVI> files. In fact, all recent \TeX\ systems are using \pdftex\ as
% the default engine also for <DVI> output, and \luatex\ too can be called
% in <DVI> mode. However, since changing the output mode inside the document
% may have undesired effects, this option should be considered deprecated;
% instead, it is recommended to just call the respective program (|latex| resp.
% |dvilualatex|).
%\changes{v2.8}{2020/04/02}{declare \opt{DVIoutput} option deprecated}
% For \xetex, this option is not applicable.
%
%\iffalse
%\changes{v1.5}{2004/12/15}{add note about \opt{DVIoutput} option}
% The latter can be ordered with the option \opt{DVIoutput}, which will set
% \cmd\pdfoutput\ to zero.
% Note that this will confuse packages that depend on the value of
% \cmd\pdfoutput\ if they were loaded earlier, as they had been made believe
% that they were called to generate <PDF> output where they actually weren't.
% These packages are, among others: \pkg{graphics}, \pkg{color},
% \pkg{hyperref}, \pkg{pstricks} and, obviously, \pkg{ifpdf}. Either load these
% packages after \microtype\ or else issue the command |\pdfoutput=0| earlier
% -- in the latter case, the \opt{DVIoutput} option is redundant.
%\fi
%
%\iffalse ^^A ... waiting for bug reports before documenting yet another option ...
%\medskip
%\Describe{Option}{defersetup}{!true,false}
% Unlike in earlier versions, \microtype\ will since version 1.9a defer its
% setup until the end of the preamble. This has at least two advantages: the
% command \cs{microtypesetup} described below may be used to change package
% options later on, and it is no longer necessary to set the default fonts and
% encodings before loading \microtype. There is one possible problem: if a box
% is being constructed inside the preamble, \emph{and} this box contains a font
% that is not loaded before the box is being used in the document, then this
% font will not be set up. Should this extremely unlikely case occur, set
% |defersetup=false|. Then, however, the aforementioned restrictions apply.
%
%\medskip
%\Describe{Option}{copyfonts}{true,!false} ^^A and another one ...
% There are some restrictions as to what \pdftex\ can do with a font: Firstly,
% it cannot expand a single font with different parameters, secondly, it cannot
% apply different protrusion settings to one font within the same paragraph.
% Both restrictions, which only matter with a context-sensitive setup
% (cf.~section~\ref{sec:context}), can be circumvented with the \opt{copyfonts}
% option: when it is set to |true|, \microtype\ will use font copies to work
% on. This option will automatically be set to |true|, whenever protrusion or
% expansion settings with a |context| keyword are encountered. If these
% settings are loaded after the preamble, however, it is too late, and you
% should set the \opt{copyfonts} option manually.
% This only works with \pdftex\ 1.40.4 or later, or \luatex.
%\fi
%
%
%\subsection{Changing options later}\label{sub:options-cmd}
%
%\Describe{Macro}{\microtypesetup}{key\,|=|\,value list}
% Inside the preamble, this command accepts all package options described above
% (except for \key{config}).
% In the document body, this command may be used to change the general settings
% of the micro-typographic extensions. It then accepts all options from
% section~\ref{sub:options-microtype}: \key{expansion}, \key{protrusion} and
% \key{activate}, which in turn may receive the values |true|, |false|,
% |compatibility| or |nocompatibility|, and \key{tracking}, \key{kerning} and
% \key{spacing} with the admissible values |true| or |false|.
% Passing the name of a font set is not allowed.
% Using this command, you could for instance temporarily disable font expansion
% by saying:
%\begin{verbatim}
%\microtypesetup{expansion=false}
%\end{verbatim}
%
%
%\section{Selecting fonts for micro-typography}\label{sec:font-sets}
%
% By default, character protrusion will be applied to all text fonts used in
% the document, and a basic set of fonts will be subject to font
% expansion. You may want to customise which fonts should get the benefit of
% micro-typographic treatment. This can be achieved by declaring and activating
% `font sets'; these font sets are specified via font attributes that have to
% match.
%
%\medskip
%\Describe{Macro}{\DeclareMicrotypeSet}{?features,set name,set of fonts}
%\DescribeMacro{\DeclareMicrotypeSet*}
% This command declares a new set of fonts to which the micro-typographic
% extensions should be applied. The optional argument may contain a
% comma-separated list of features to which this set should be restricted.
% The starred version of the command declares \emph{and} activates the font
% set at the same time.
%
% \paragraph{The set of fonts} is specified by assigning values to the <NFSS>
% font attributes: encoding, family, series, shape and size (cf.~\cite{fntguide}).
% Let's start with an example. In the main configuration file \file{microtype.cfg},
% a font set called `|basictext|' is defined as follows:
%\begin{verbatim}
%\DeclareMicrotypeSet{basictext}
%   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,TU},
%     family   = {rm*,sf*},
%     series   = {md*},
%     size     = {normalsize,footnotesize,small,large}
%   }
%\end{verbatim}
% If you now call
%\begin{verbatim}[deletekeywords={[1]{protrusion}}]
%\UseMicrotypeSet[protrusion]{basictext}
%\end{verbatim}
% in the document's preamble, only fonts in the text encodings, roman or sans
% serif families, normal (or `medium') series, and in sizes called by
% \cmd\normalsize, \cmd\footnotesize, \cmd\small\ or \cmd\large, will be
% protruded. Math fonts, on the other hand, will not, since they are in another
% encoding. Neither will fonts in bold face, or huge fonts. Etc.
%
% If an attribute list is empty or missing -- like the `shape' attribute
% in the above example -- it does not constitute a restriction. In other
% words, this is equivalent to specifying \emph{all} possible values for that
% attribute.
% Therefore, the predefined set `|alltext|', which is declared as:
%\begin{verbatim}
%\DeclareMicrotypeSet{alltext}
%   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2,TU} }
%\end{verbatim}
% is far less restrictive. The only condition here is that the encoding must
% match.
%
% If a value is followed by an asterisk (like `|rm*|' and `|sf*|' in the first
% example), it does not designate an <NFSS> code, but will be translated into
% the document's |\|\meta{value}|default|, \eg, \cmd\rmdefault.\footnote{
%   These translations will take place \cmd\AtBeginDocument, which means that
%   changes to the defaults inside the preamble will also be taken into account.
%   Only in cases where you change font defaults \cmd\AtBeginDocument\ yourself,
%   you need to load \microtype\ after these changes.}
% A single asterisk means |\|\meta{attribute}|default|, \eg,
% \cmd\encodingdefault, respectively \cmd\normalsize\ for the size axis.
% Sizes may either be specified as a dimension (`|10|' or `|10pt|'), or as a
% size selection command \emph{without} the backslash. You may also specify
% ranges (\eg, `|small-Large|'); while the lower boundary is included in the
% range, the upper boundary is not. Thus, `|12-16|' would match 12\,pt,
% 13.5\,pt and 15.999\,pt, for example, but not 16\,pt. You are allowed to omit
% the lower or upper bound (`|-10|', `|large-|').
%
% Additionally to this declaration scheme, you can add single fonts to
% a set using the `|font|' key, which expects the concatenation of all font
% attributes, separated by forward slashes, \ie,
%`|font|\,|=|\,\meta{encoding}|/|\meta{family}|/|\meta{series}|/|\meta{shape}|/|\meta{size}'.
% This allows you to add fonts to the set that are otherwise disjunct from it.
% For instance, if you wanted to have the roman family in all sizes protruded,
% but only the normal sized, possibly italic, typewriter font (in contrast to,
% say, the small one), this is how you could declare the set:
%\begin{verbatim}[deletekeywords={[1]{protrusion}}]
%\DeclareMicrotypeSet[protrusion]
%   { myset }
%   { encoding = T1,
%     family   = rm*,
%     font     = {T1/tt*/m/n/*,
%                 T1/tt*/m/it/*} }
%\end{verbatim}
% As you can tell from the example, the asterisk notation is also permitted for
% the |font| key. A single asterisk is equivalent to `|*/*/*/*/*|', \ie, the
% normal font. Size selection commands are possible, too, however, ranges are
% not allowed.
%
%\newcounter{nrfontsets}
%\begin{table}\microtypesetup{protrusion=false}\small
%\caption{Predefined font sets}\label{tab:predefined-font-sets}
%\catcode`\!=13 \def!{\textcolor{thered}{$\varnothing$}}
%\catcode`\/=13 \def/#1/{\textcolor{thegreen}{#1}}
%\def<#1>{\textcolor{theblue}{\acronym{#1}}}
%\def\s#1{|#1|\stepcounter{nrfontsets}}
%\setlength\fboxsep{4pt}
%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax
%\fcolorbox{theframe}{white}{^^A
%\begin{minipage}{\textwidth}
%\def\arraystretch{1.2}
%\begin{tabular}{@{}L{65pt}L{80pt}*2{L{40pt}}L{43pt}L{67pt}@{}}
%      \footnotesize Set name
%    & \multicolumn{5}{l}{\footnotesize Font attributes}\\
%\cmidrule{2-6}
%    & \footnotesize Encoding
%    & \footnotesize Family
%    & \footnotesize Series
%    & \footnotesize Shape
%    & \footnotesize Size\\
%\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}
%\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule{6-6}
% \s{all}
%    & !
%    & !
%    & !
%    & !
%    & ! \\
%\cmidrule(r){1-1}
% \s{alltext}\linebreak(\s{allmath})
%    & Text encodings, <TS1>\linebreak (<OML>, <OMS>, <U>)
%    & !
%    & !
%    & !
%    & ! \\
%\cmidrule(r){1-1}
% \s{alltext-nott}\linebreak(\s{allmath-nott})
%    & Text encodings, <TS1>\linebreak (<OML>, <OMS>, <U>)
%    & /\cmd\rm|*|/,\linebreak/\cmd\sf|*|/
%    & !
%    & !
%    & ! \\
%\cmidrule(r){1-1}
% \s{basictext}\linebreak(\s{basicmath})
%    & Text encodings \linebreak (<OML>, <OMS>)
%    & /\cmd\rm|*|/,\linebreak/\cmd\sf|*|/
%    & /\cmd\md|*|/
%    & !
%    & /\cmd\normalsize/, /\cmd\footnotesize/, /\cmd\small/, /\cmd\large/\\
%\cmidrule(r){1-1}
% \s{smallcaps}
%    & Text encodings
%    & !
%    & !
%    & /\cmd\sc|*|/,/si/,/scit/
%    & ! \\
%\cmidrule(r){1-1}
% \s{footnotesize}
%    & Text encodings, <TS1>
%    & !
%    & !
%    & !
%    & |-|/\cmd\small/\\
%\cmidrule(r){1-1}
% \s{scriptsize}
%    & Text encodings, <TS1>
%    & !
%    & !
%    & !
%    & |-|/\cmd\footnotesize/\\
%\cmidrule(r){1-1}
% \s{normalfont}
%    & /\cmd\encoding|*|/
%    & /\cmd\family|*|/
%    & /\cmd\series|*|/
%    & /\cmd\shape|*|/
%    & /\cmd\normalsize/\\
%\bottomrule
%\end{tabular}
%\vskip4pt\footnotesize
% `Text encodings' = <OT1>, <T1>, <T2A>, <LY1>, <OT4>, <QX>, <T5>, <EU1>, <EU2>, <TU>
%\hfill
% `/\bslash\,\dots|*|/' = `/\bslash\,\dots|default|/'
%\vskip4pt
%\end{minipage}^^A
%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox
%\ifcase\c@nrfontsets\or\or\or\or\or\or\or\or\or\or\or
%   \def\@currentlabel{eleven}\or \def\@currentlabel{twelve}\else
%   \PackageError{\MT@MT}{I cannot count any further}{}\fi\label{nrfontsets}
%\end{table}
%
%\medskip\noindent
% Table~\ref{tab:predefined-font-sets} lists the \ref*{nrfontsets} predefined font sets.
% They may also be activated by passing their name to the feature options
% \opt{protrusion}, \opt{expansion}, \opt{tracking}, \opt{kerning} and
% \opt{spacing} when loading the package, for example:
%\begin{verbatim}
%\usepackage[protrusion=allmath,tracking=smallcaps]{microtype}
%\end{verbatim}
%
%\ifcmr\else\pagebreak\fi ^^A layout
%\medskip
%\Describe{Macro}{\UseMicrotypeSet}{?features,set name}
% This command activates a font set previously declared by \cs{DeclareMicrotypeSet}.
% Using the optional argument, you can limit the application of the set to one
% or more features. This command only has an effect if the feature was activated
% in the package options.
%
%\medskip
%\Describe{Macro}{\DeclareMicrotypeSetDefault}{?features,set name}
% If a feature is enabled but no font set has been chosen explicitly, the sets
% declared by this command will be activated. By default, the `|alltext|' font
% set will be activated for character protrusion and additional kerning, the
% `|alltext-nott|' set for font expansion and interword spacing, and the
% `|smallcaps|' set for tracking.
%
%\medskip\noindent
% These commands may only be used in the preamble or in the main configuration
% file. Their scope is global to the document. Only one set per feature may be
% activated.
%
%
%\section{Micro fine tuning}\label{sec:fine-tuning}
%
% Every character asks for a particular protrusion, kerning or spacing amount.
% It may also be desirable to restrict the maximum expansion of certain
% characters. Furthermore, since every font looks different, settings have to
% be specific to a font or set of fonts. This package offers flexible and
% straight-forward methods of customising these finer aspects of
% micro-typography.
%
% All fine-tuning commands follow basically the same syntax: they all take
% three arguments; the first one is optional and may contain additional
% options; in the second argument, you specify the set of fonts to which the
% settings should apply; the third argument contains the actual settings.
% Here, as in all configuration commands, all spaces are ignored.
%
% The set of fonts to which the settings should apply is declared using the
% same syntax of \meta{font axis}\,|=|\,\meta{value list} pairs as for the
% command \cs{DeclareMicrotypeSet} (see section~\ref{sec:font-sets}), with the
% only difference that values including asterisks (which, as you may recall,
% stand for the respective default) will be translated immediately
% instead of at the end of the preamble.
% To find the matching settings for a given font the package will try all
% combinations of font encoding, family, series, shape and size,
% with decreasing significance in this order. For instance, if settings exist for
% both the current family (say, |T1/cmr///|) and for italic fonts in the
% normal weight (|T1//m/it/|), the settings for the |cmr| family would apply.
%\changes{v1.7}{2005/03/23}{remove table of match order
%                           (now table~\ref{tab:match-order} on page~\pageref{tab:match-order})}
% The encoding must always match.
%\iffalse
%^^A TODO: When using native TrueType\slash OpenType fonts (with \xetex\ or \luatex, and
%^^A the \pkg{fontspec} package), you may additionally restrict the settings to
%^^A certain |features|.
%\fi
%
% The characters may be specified either as a single letter (|A|),
% as a text symbol command (\cmd\textquoteleft), or as a slot number (resp.
% Unicode number for \luatex\ or \xetex): three or more  digits for decimal
% notation, prefixed with~|"| for hexadecimal, with~|'| for octal numerals (\eg, the
% `fl' ligature in <T1> encoding:~|029|, |"1D|, |'35|).
% \mbox{8-bit} (and even <UTF-8>) characters may be entered directly or in
% \LaTeX's traditional \mbox{7-bit} notation: both |\"A| and \expandafter|\"A|
% are valid, provided the character is actually declared in both the input and
% the font encoding.
% With \luatex\ or \xetex, you may additionally specify a (font-specific)
% glyph name, prefixed with `|/|' (\eg, the `fl' ligature as |/f_l|).
% Note that you also have the possibility to declare lists
% of characters that should inherit settings (see section~\ref{sub:inherit}).
%
%\subsection[Character protrusion]
%           {Character protrusion \requires{\pdftex~0.14f,\luatex~0.30,\xetex~0.9997}}
%           \label{sub:protrusion}
%
%\Describe{Macro}{\SetProtrusion}{?options,set of fonts,protrusion settings}
% Using this command, you can set the protrusion factors for each character of a
% font or a set of fonts. A very incomplete example would be the following:
%\begin{verbatim}
%\SetProtrusion
%   { encoding = T1,
%     family   = cmr }
%   { A              = {50,50},
%     \textquoteleft = {700, } }
%\end{verbatim}
% which would result in the character `A' being protruded by 5\% of its width
% on both sides, and the left quote character by 70\% of its width into the
% left margin. This would apply to all font shapes, series and sizes of the
% <T1>~encoded Computer Modern Roman family.
%
%\paragraph{The protrusion settings}
% consist of \meta{character}\,|=|\,\meta{protrusion factors} pairs.
% The protrusion factors designate the amount that a character should be
% protruded into the left margin (first value) respectively into the right
% margin (second value). By default, the values are relative to the character
% widths, so that a value of 1000 means that the character should be shifted
% fully into the margin, while, for example, with a value of 50 it would be
% protruded by 5\% of its width. Negative values are admitted, as well as
% numbers larger than 1000 (but effectively not more than \EM{1} of the font).
% You may omit either number if the character should not be protruded on that
% side, but must not drop the separating comma.
%
%\paragraph{Options:}
%\begin{options}
%  \item[\key{name}] You may assign a name to the protrusion settings, so that you
%       are able to load it by another list.
%  \item[\key{load}] You can load another list (provided, you assigned
%       a name to it) before the current list will be loaded, so that the
%       fonts will inherit the values from the loaded list.
%      \par
%       In this way, the configuration may be simplified considerably. You can for
%       instance create a default list for a font; settings for other shapes
%       or series can then load these settings, and extend or overwrite them
%       (since the value that comes last will take precedence). Font settings
%       will be loaded recursively.
%       The following options will affect all loaded lists, in other words,
%       any options from the loaded lists will be ignored:\looseness=-1 ^^A layout
%\changes{v1.8}{2005/06/23}{add example for \texttt{factor} option}
%  \item[\key{factor}] This option can be used to influence all protrusion
%       factors of the list, overriding any global \opt{factor} setting (see
%       section~\ref{sub:options-protrusion}). For instance, if you want fonts
%       in larger sizes to be protruded less, you could load the normal lists,
%       just with a different factor applied to them:
%\begin{verbatim}
%\SetProtrusion
%   [ factor   = 700,
%     load     = cmr-T1 ]
%   { encoding = T1,
%     family   = cmr,
%     size     = large- }
%   { }
%\end{verbatim}
%  \item[\key{unit}] By default, the protrusion factors are relative to the
%       respective character's width. The |unit| option may be used to override
%       this and make \microtype\ regard all values in the list as thousandths
%       of the specified width. Issuing, for instance, `|unit=1em|' would have
%       the effect that a value of, say, 50 now results in the character being
%       protruded by 5\% of an em of the font (thus simulating the internal
%       measuring of \pdftex's \cmd\lpcode\ and \cmd\rpcode\ primitives).
%       The default behaviour can be restored with |unit=character|.\footnote{
%          The |unit| option can even be passed globally to the package (cf.
%          section~\ref{sub:options-protrusion}).
%          However, all provided settings are created under the assumption
%          that the values are relative to the character width. Therefore, you
%          should only change it if you are certain that the
%          default settings will not be used in your document.}
%  \item[\key{preset}] Presets the protrusion codes of all characters to the
%       specified values (|={|\meta{left}|,|\meta{right}|}|), possibly
%       scaled by a |factor|. A |unit| setting will only be taken into account
%       if it is not |=character|.
%  \item[\key{inputenc}] Selects an input encoding that should apply to this
%       list, regardless of what the document's input encoding is. You may
%       specify any encoding that can be loaded via the \pkg{inputenc} package,
%       \eg, |ansinew|, |koi8-r|, |utf8|.
%  \item[\key{context}] The scope of the list may be limited to a certain
%       context. For further details, see section~\ref{sec:context}.
%\end{options}
%
%
%\subsection[Font expansion]
%           {Font expansion \requires{\pdftex~0.14f,\luatex~0.30}}
%           \label{sub:expansion}
%
%\Describe{Macro}{\SetExpansion}{?options,set of fonts,expansion settings}
% By default, all characters of a font are allowed to be stretched or shrunk by
% the same amount. However, it is also possible to limit the expansion of
% certain characters if they are more sensitive to deformation. This is the
% purpose of the \cs{SetExpansion} command. Note that it will only have an
% effect if the package has been loaded with the \opt{selected} option (cf.
% section~\ref{sub:options-expansion}). Otherwise, the expansion settings will
% be ignored~-- unlike the options in the optional first argument, which will
% still be evaluated.
% If the \opt{selected} option has been set to true, and settings for a font
% don't exist, font expansion will not be applied to this font at all. Should
% the extraordinary situation arise that you want to employ selected expansion
% in general but for a particular font (set) all characters should be
% expanded or shrunk by the same amount, you would have to declare an empty
% list for these fonts.
%
%\paragraph{The expansion settings}
% consist of \meta{character}\,|=|\,\meta{expansion factor} pairs.
% You may specify one number for each character, which determines the amount
% that a character may be expanded. The numbers denominate thousandths of the
% full expansion.
% For example, if you set the expansion factor for the character `O' to 500,
% it will only be expanded or shrunk by one half of the amount that the rest
% of the characters will be expanded or shrunk.
% While the default value for character protrusion is~0~-- that is, if you
% didn't specify any characters, none would be protruded~-- the default value
% for expansion is 1000, which means that all characters would be expanded by
% the same amount.
%
%\paragraph{Options:}
%\begin{options}
%  \item[\key{name}, \key{load}, \key{preset}, \key{inputenc}, \key{context}]
%       Analogous to \cs{SetProtrusion}, the optional argument may be used to
%       assign a name to the list, to load another list, to preset all
%       expansion factors, to set the input encoding, or to determine the
%       context of the list (expansion contexts are only possible with \pdftex\
%       version 1.40.4 or newer).
%\changes{v1.8}{2005/04/12}{add example of how to get rid of a widow
%               (suggested by \contributor Adam Kucharczyk <adamk\at ijp-pan.krakow.pl>)}
%                                                          ^^A private mail, 2005/04/09
%  \item[\key{auto}, \key{stretch}, \key{shrink}, \key{step}]
%       These keys can be used to override the global settings from the package
%       options (see section~\ref{sub:options-expansion}). If you don't specify
%       either one of |stretch|, |shrink| and |step|, their respective global
%       value will be used (that is, no calculation will take place).
%
%       As a practical example, suppose you have a paragraph containing a widow
%       that could be avoided by shrinking the font a bit more.
%       In conjunction with the |context| option (see section~\ref{sec:context}
%       for further details), you could thus allow for more expansion in this
%       particular paragraph:
%\begin{verbatim}[gobble=2]
% \SetExpansion
%    [ context = sloppy,
%      stretch = 30,
%      shrink  = 60,
%      step    =  5  ]
%    { encoding = {OT1,T1,TS1} }
%    { }
% % ... END PREAMBLE
% {\microtypecontext{expansion=sloppy}%
%  This paragraph contains a `fussy' widow.}
%\end{verbatim}
%       This method of employing contexts to temporarily apply different
%       expansion parameters only works with \pdftex\ version 1.40.4 or later,^^A
%         \footnote{For older versions, a dirty trick is laid out in
%                   section~\ref{ssec:font-setup} on page~\pageref{exp-hack}.}
%       or with \luatex.
%       Also note that both \pdftex\ and \luatex\ prohibit the use of fonts with different expansion
%       limits or steps (even of different fonts) within one paragraph, hence
%       the |sloppy| context would have to be applied to complete paragraphs.
%  \item[\key{factor}]
%       This option provides a different method to alter expansion settings for
%       certain fonts, working around the restriction just mentioned. The
%       |factor| option influences the expansion factors of all characters (in
%       contrast to the overall stretchability) of the font. For instance, if
%       you want the italic shape to be expanded less, you could declare:
%\begin{verbatim}
%\SetExpansion
%   [ factor   = 500 ]
%   { encoding = *,
%     shape    = it }
%   { }
%\end{verbatim}
%       The |factor| option can only be used to \emph{decrease} the
%       stretchability of the characters, that is, it may only receive values
%       smaller than 1000. Also, it can only be used for single fonts or font
%       sets; setting it globally in the package options wouldn't make much
%       sense -- to this end, you use the package's \opt{stretch} and
%       \opt{shrink} options.
%\end{options}
%
%
%\subsection[Tracking]
%           {Tracking \requires{\pdftex~1.40,\luatex~0.62}}
%           \label{sub:tracking}
%
%\Describe{Macro}{\SetTracking}{?options,set of fonts,tracking amount}
% An important typographic technique -- which was missing in \TeX\ for a long
% time -- is the adjustment of tracking, \ie, the uniform addition or
% subtraction of letter space to/from all the characters in a font. For
% example, it is good typographic practice to slightly space out text set in
% all capitals or small capitals (as in this document). Legibility may also be
% improved by minimally increasing the tracking of smaller and decreasing that
% of larger type.\footnote{
%     With full-featured fonts like Computer Modern, this is usually not
%     necessary, though, since they come in optical sizes, and the tracking of
%     the small-capitals font is already adjusted.}
% The \cs{SetTracking} command allows specifying the tracking amount for
% different fonts or font sets. It will also be evaluated by the \cs{textls}
% command, which may be used for letterspacing shorter pieces of text (see
% section~\ref{sec:lettersp}).
%
%\paragraph{The tracking amount}
% is specified in thousandths of \EM{1} (or the given unit); negative values are
% allowed, too.
%
%\paragraph{Options:}
%\begin{options}
%  \item[\key{name}, \key{unit}, \key{context}]
%       These options serve the same functions as in the previous configuration
%       commands. The unit may be any dimension, default is \EM{1}.
%  \item[\key{spacing}]
%       When the inter-\emph{letter} spacing is altered, the inter-\emph{word}
%       spacing probably also needs to be adjusted. This option expects three
%       numbers for interword space, stretch and shrink respectively, which are
%       given in thousandths of \EM{1} (or of the current \texttt{unit}). If a
%       value is followed by an asterisk, it denotes thousandths of the
%       respective font dimension which will be added to it. For instance, with
%\begin{verbatim}
%\SetTracking[ spacing = {25*,166, } ]{ encoding = *, shape = sc }{ 25 }
%\end{verbatim}
%       the interword space will be increased by 2.5\%, the stretch amount will
%       be set to \EM{0.166}, while the shrink amount will be left untouched. If
%       you don't specify the \texttt{spacing} option, the interword space will
%       be scaled by the current letterspace amount (as in the above example),
%       while stretch and shrink will not be changed.
%  \item[\key{outer spacing}]
%       If an interword space immediately precedes or follows letterspaced text,
%       it will by default be equal to that within the text. With this option,
%       which accepts the same values as \texttt{spacing}, it may be adjusted
%       independently.
%  \item[\key{outer kerning}]
%       If, on the other hand, no interword space precedes or follows, you may
%       still want to slightly set off the first and last letter from adjoining
%       letters. This option expects the kerning amounts for left and right hand
%       side, separated by a comma, in thousandths of \EM{1} (or the current
%       \texttt{unit}). If a value is followed by an asterisk, it denotes
%       thousandths of the current letterspacing amount. A single asterisk means
%       `|500*|'; this is also the default, \ie, the sum of the outer kerns is
%       by default equal to the current letterspace amount. To remove kerning on
%       both sides, you would write `|outer kerning={0,0}|'.
%  \item[\key{no ligatures}]
%       By default, ligatures in letterspaced fonts will be
%       constructed as usual, which may be advisable when changing the
%       tracking by only a small amount. For larger letterspacing amounts, on
%       the other hand, the normal letter space within ligatures would have
%       displeasing \textls[150]{e\lslig{ff}ects}.
%       This key expects a comma-separated list of characters for which
%       ligatures should be disabled; only the character that begins a ligature
%       must be specified.
%       If the key is given without a value, \emph{all} ligatures of the font
%       will be disabled. With \pdftex, this is not recommended, however,
%       since it entails that kerning will be switched off, too. With \luatex,
%       there is no such limitation.
%       The default settings disable ligatures for the character `|f|' only,
%       \ie, `ff', `fi', ffi', etc.\footnote{
%         With \pdftex\ versions older than 1.40.4, \emph{all} ligatures, and
%         hence all kerning, will be disabled. It is therefore recommended to
%         use at least version 1.40.4.}
%       In exceptional situations, you can manually break up a ligature by
%       inserting `|{\kern0pt}|' resp. \pkg{babel}'s \verb="|=
%       shortcut, or protect it by enclosing it in \cs{lslig} (see
%       section~\ref{sec:lettersp}).
%\end{options}
%
%\ifx\lssample\undefined
% \fallbacktext{The original documentation\footnote{
%     \ctanurl{macros/latex/contrib/microtype/microtype.pdf}.}
%   includes an image illustrating all of these options.}
%\medskip\noindent
% As an
%\else
%\changes{v2.3}{2007/11/03}{add letterspacing illustration}
%\medskip\noindent
% Since a picture is worth a thousand words, probably even more if, in our
% case, it depicts a couple of letterspaced words, let's bring one to sum up
% these somewhat confusing options. Suppose you had the following settings
% (which are in no way recommended; they only serve illustrative purposes):
%\begin{verbatim}
%\SetTracking
%  [ no ligatures  = {"\anchorarrow{nolig}"f},
%    spacing       = {60"\anchorarrow{ispace}"0*,-1"\anchorarrow{istretch}"00*, "\anchorarrow{ishrink}"},
%    outer spacing = {4"\anchorarrow{ospace}"50,2"\anchorarrow{ostretch}"50,1"\anchorarrow{oshrink}"50},
%    outer kerning = {"\anchorarrow{okernbegin}"*,"\anchorarrow{okernend}"*} ]
%  { encoding = * }
%  { 1"\anchorarrow{lsamount}"60 }
%\end{verbatim}
% and then write:
%\begin{verbatim}
%Stop \textls{stealing sheep}!
%\end{verbatim}
% this would be the (typographically dubious) outcome:
%
% \lssample
%
%\noindent
% While the word `Stop' is not letterspaced, the space between the letters in
% the other two words is expanded by the \showarrow[tracking]{tracking~amount}{red}
% of \EM{160/1000}\,=\allowbreak\,\EM{0.16}.
% The \showarrow[ispace]{inner~space}{green} within the letterspaced text is
% increased by 60\%, while its \showarrow[istretch]{stretch}{green} amount is
% decreased by 10\% and the \showarrow[ishrink]{shrink}{green} amount is left
% untouched.
% The \showarrow[ospace]{outer~space}{green} (of \EM{0.45}) immediately before the
% piece of text may \showarrow[ostretch]{stretch}{green} by \EM{0.25} and
% \showarrow[oshrink]{shrink}{green} by \EM{0.15}.
% Note that there is no outer space after the text, since the exclamation mark
% immediately follows; instead, the default \showarrow[okern]{outer~kern}{red}
% of half the letterspace amount (\EM{0.08}) is added.
% Furthermore, one \showarrow{ligature}{grey} wasn't broken up, because we
% neglected to specify the `|s|' in the |no ligatures| key.
%
%\medskip\noindent
% As another, more realistic
%\fi
%                            example, suppose you want to space out all small
% capitals by \EM{50/1000}, fonts smaller than \cmd\small\ by \EM{0.02}, and to
% decrease the tracking of large type by \EM{0.02}. This could be achieved with
% the following settings:
%^^A there's a \nobreakspace ahead!
%\begin{verbatim}
%\usepackage[tracking=true]{microtype}
%\DeclareMicrotypeSet*[tracking]{my}
%   { encoding = *,
%     size     = {-small,Large-},
%     font     = */*/*/sc/* }
%\SetTracking[ no ligatures = f ]{ encoding = *, shape = sc}{ 50 }
%\SetTracking{ encoding = *, size = -small }{  20 }
%\SetTracking{ encoding = *, size = Large- }{ -20 }
%\end{verbatim}
%
%\medskip\noindent
% Letterspaced fonts for which settings don't exist will be spaced out by the
% default of \EM{0.1} (adjustable with the package option \opt{letterspace}, see
% section~\ref{sub:options-misc}). Suppose your editor wants you to shorten
% your 1000-pages chef-d'\oe uvre by a handful of pages, you could load
% \microtype\ with (fingers crossed):
%\begin{verbatim}
%\usepackage[tracking=alltext,letterspace=-40]{microtype}
%\end{verbatim}
%
%
%\subsection[Additional kerning]
%           {Additional kerning \requires{\pdftex~1.40}}
%           \label{sub:kerning}
%\todo{Rename to \cs{SetSidebearing}}
%\Describe{Macro}{\SetExtraKerning}{?options,set of fonts,kerning settings}
% With this command, you can fine tune the extra kerning. In contrast to
% standard kerning, which is always associated with a \emph{pair} of
% characters, and to tracking, which specifies the space between \emph{all}
% characters of a font, the extra kerning relates to single characters, that
% is, whenever a particular character appears in the text, the specified
% kerning will be inserted, regardless of which character precedes resp.
% follows it.
% (Put differently, this feature allows modifying the left or right
% \textit{sidebearings} of specific glyphs.)
%
%\emptypdfpageresources ^^A layers of letterspacing illustration
%
% It should not be neglected to mention a limitation of this feature:
% words \emph{immediately following} such a kern (not separated by a space)
% will not be hyphenated, unless you insert the breakpoints manually, \eg, for
% kerning after the apostrophe, `|l'apos\-trophe|'.
%\changes{v2.7}{2016/10/16}{mention that additional kerning does not work in math mode
%                            (discovered by `\contributor Daniel <@\at @>')}
%                           ^^A https://tex.stackexchange.com/questions/332695/microtype-kerning-in-math-mode-with-mathdesign-charter
% Furthermore, additional kerning will not be applied in math mode.
% These restrictions of \pdftex\ will hopefully be lifted some time.
%
%\paragraph{The kerning settings}
% are specified as pairs of \meta{character}\,|=|\,\meta{kerning values}, where
% the latter consist of two values: the kerning added before the character, and
% the kerning appended after the respective character. Once again, either value
% may be omitted, but not the separating comma.
%
%\paragraph{Options:}
%\begin{options}
%  \item[\key{name}, \key{load}, \key{factor}, \key{preset}, \key{inputenc}]
%       These options serve the same function as in the previous configuration
%       commands.
%  \item[\key{unit}] Admissible values are: |space|, |character| and a
%       \meta{dimension}. By default, the values denote thousandths of \EM{1}.
%  \item[\key{context}] When it comes to kerning settings, this option is
%       especially useful, since it allows applying settings depending on the
%       current language.
%      \par
%       For example, you can find the following settings, intended to be used
%       for documents written in French, in the main configuration file:
%\begin{verbatim}[deletekeywords={[1]{unit}}]
%\SetExtraKerning
%   [ name     = french-default,
%     context  = french,
%     unit     = space   ]
%   { encoding = {OT1,T1,LY1} }
%   {
%     :  = {1000,}, % = \fontdimen2
%     ;  = {500, }, % ~ \thinspace
%     !  = {500, },
%     ?  = {500, }
%   }
%\end{verbatim}
%\changes{v2.3}{2007/11/20}{add kerning sample}
%\ifluatex
% \fallbacktext{Since this document was compiled with |luatex| instead of
%   |pdftex|, it does not\\include the sample that the original documentation
%   features.}
%\else
%      \begin{microtypecontext}{kerning=french}
%       What is the result of these settings? If they are active, like in the
%       current paragraph, a thin space will be inserted in front of each
%       question mark, exclamation mark and semicolon; a normal space in front
%       of the colon. Read section~\ref{sec:context} to learn how to activate
%       these settings! This paragraph was input like this:
%      \end{microtypecontext}
%\begin{verbatim}[deletekeywords={[1]{context,activate}}]
%\begin{microtypecontext}{kerning=french}
% What is the result of these settings? If they are active, like in the
% current paragraph, a thin space will be inserted in front of each
% question mark, exclamation mark and semicolon; a normal space in front
% of the colon. Read section~\ref{sec:context} to learn how to activate
% these settings! This paragraph was input like this:
%\end{microtypecontext}
%\end{verbatim}
%\fi
%\end{options}
%
%
%\subsection[Interword spacing]
%           {Interword spacing \requires{\pdftex~1.40}}
%           \label{sub:spacing}
%
%\Describe{Macro}{\SetExtraSpacing}{?options,set of fonts,spacing settings}
% This command allows you to fine tune the interword spacing (also known as
% glue). A preliminary remark on what a `space' is may be in order: between two
% words, \TeX\ will insert a so called glue, which is characterised by three
% parameters -- the normal distance between two words, the maximum amount of
% space that may be added to it, and the maximum amount that may be subtracted.
% The latter two parameters come into effect whenever \TeX\ tries to break a
% paragraph into lines and does not succeed; it can then stretch or shrink the
% spaces between words. These three parameters are specific to each font.
%
% On top of these glue dimensions, \TeX\ has the concept of `space factors'.
% They may be used to increase the space after certain characters, most
% prominently the punctuation characters. \pdftex's additional spacing
% adjustment may be considered as an extension to space factors with much
% finer control: while space factors will influence all three parameters of
% interword space (or glue) by the same amount~-- the kerning, the maximum
% amount that the space may be stretched and the maximum amount that it may be
% shrunk~-- you may modify these parameters independently from one another.
% Furthermore, the values may be set differently for each font. And, probably
% most importantly, the parameters may not only be increased but also decreased.
% Note that when interword spacing adjustment is in effect, space factors are
% ignored.
%
%\paragraph{The spacing settings}
% are declared as pairs of \meta{character}\,|=|\,\meta{spacing factors}, where
% the latter consist of three numbers: first, the additional kern inserted
% after this character if it appears before an interword space, second, the
% additional stretch amount, and third, the additional shrink amount. All
% values may also be negative, in which case the dimensions will be decreased.
% Not all values have to be specified, but the settings must always contain the
% two separating commas.
%
%\paragraph{Options:}
%\begin{options}
%  \item[\key{name}, \key{load}, \key{factor}, \key{preset}, \key{inputenc}, \key{context}]
%       These options serve the same function as in the previous configuration
%       commands.
%  \item[\key{unit}] You can specify the unit by which the specified numbers are
%       measured. Possible values are: |character|, a \meta{dimension} and,
%       additionally, |space|. The latter will measure the values in thousandths
%       of the respective space dimension set by the font. By default, the unit
%       is measured by the space dimensions. For example, with the following
%       (nonsensical) settings:
%\begin{verbatim}
%\SetExtraSpacing
%   [ unit = space  ] % default
%   { font = */*/*/*/* }
%   {
%       .  = {1000,1000,1000},
%   }
%\end{verbatim}
%       the space inserted after a full stop would be doubled (technically
%       speaking: 2\,\texttimes\ \fontdim2), as would the maximum stretch and
%       shrink amounts of the interword space (\fontdim3 and~4). Conversely,
%       setting all three values to \textminus1000 would completely cancel a
%       space after the respective character.
%\end{options}
%
%
%\subsection{Character inheritance}\label{sub:inherit}
%
% \Describe{Macro}{\DeclareCharacterInheritance}
%                 {?features,set of fonts,inheritance lists}
% In most cases, accented characters should inherit the settings from the
% respective base character. For example, all of the characters \`A, \'A, \^A,
% \~A, \"A, \r{A} and \u{A} should probably be protruded by the same (absolute)
% amount as the character A. Using the command \cs{DeclareCharacterInheritance},
% you may declare such classes of characters, so that you then only have to set
% up the respective base character. With the optional argument, which may
% contain a comma-separated list of features, you can confine the scope of the
% list. Additionally, it accepts the \key{inputenc} key to set the input encoding
% for this list. The font set can be declared in the usual way. The inheritance
% lists are declared as pairs of \meta{base character}\,|=|\,\meta{list of
% inheriting characters}. Unless you are using a different encoding or a very
% peculiarly shaped font, there should be no need to change the default
% character inheritance settings.
%
% The situation is different with \luatex\ and \xetex, however: the default
% inheritance settings only contain those glyhps that can safely be assumed to
% exist in any font; but since OpenType fonts may contain many more glyphs for
% different scripts (languages), it is quite probable that font-specific
% settings are necessary, which should be specified in the font's configuration
% file (see next section).
%
%
%
%\subsection{Configuration files}\label{sub:config-file}
%
% The default configuration, consisting of inheritance settings, declarations
% of font sets and alias fonts, and generic protrusion, expansion, spacing and
% kerning settings, will be loaded from the file \file{microtype.cfg}. You may
% extend this file with custom settings (or load a different configuration file
% with the `\opt{config}' option, see section~\ref{sub:options-misc}).
%
% If you embark on creating new settings for a font family, you should
% put them into a separate file, whose name must be: `|mt-|\meta{font
% family}|.cfg|' (\eg, `\file{mt-cmr.cfg}'; any spaces in the font name should
% be removed, \eg, `\file{mt-MinionPro.cfg}'), and may contain all commands
% described in the current section~\ref{sec:fine-tuning}. These files will be
% loaded automatically if you are actually using the respective fonts.
% This package ships with configuration files for a number of font families.
% Table~\ref{tab:fonts} lists them all.
%
%\enlargethispage{\baselineskip} ^^A layout
%\begin{table}[t]\small
%\changes{v1.6a}{2005/02/02}{add table of fonts with tailored protrusion settings}
%\caption{Fonts with tailored protrusion settings}\label{tab:fonts}
%\setlength\fboxsep{4pt}
%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax
%\fcolorbox{theframe}{white}{^^A
%\begin{minipage}{\textwidth}
%\def\arraystretch{1.2}
%\long\def\@makefntext#1{%
%  \leftskip 1em
%  \parindent -1em
%  \everypar{\parindent -1em}%
%  \leavevmode\hbox to 1em{\@thefnmark\hss}#1}
%\let\footnoterule\relax
%\def\fnref#1{\textsuperscript{\itshape\ifpdf\ref*{#1}\else\ref{#1}\fi}}
%\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*3l@{}}
%       \footnotesize Font family (<NFSS> code)
%      & \multicolumn{2}{l}{\footnotesize Features}\\
%\cmidrule{2-3}
%      & \footnotesize Encodings [Scripts]
%      & \footnotesize Shapes\\
%\cmidrule{1-1}\cmidrule{2-2}\cmidrule{3-3}
% Generic
%      & <OT1>, <T1>, <T2A>, <LY1>, <QX>, (<TS1>)\footnote{Incomplete\label{fn:incmpl}}
%      & n, (it, sl, sc)\fnref{fn:incmpl} \\
% Computer Modern Roman (|cmr|)\footnote{Aliases: Latin Modern Roman (|lmr|),
%                                        \pkg{ae} (|aer|), \pkg{zefonts} (|zer|),
%                                        \pkg{eco} (|cmor|), \pkg{hfoldsty} (|hfor|)}
%      & <OT1>, <OT4>, <T1>, <T2A>, <T5>, <LY1>, <TS1>
%      & n, it, sl, sc \\
% Bitstream Charter (|bch|)\footnote{Aliases: \pkg{mathdesign}/Charter (|mdbch|),
%                                    MicroPress's \pkg{chmath} (|chr|), \pkg{XCharter}}
%      & <OT1>, <T1>, <T5>, <LY1>, <TS1>
%      & n, it, (sl)\footnote{Settings inherited from italic shape\label{fn:it-sl}}, sc \\
% Adobe Garamond (|pad|, |padx|, |padj|)
%      & <OT1>, <T1>, <LY1>, <TS1>
%      & n, it, (sl)\fnref{fn:it-sl}, sc \\
% <URW> Garamond (|ugm|)\footnote{Aliases: \pkg{mathdesign}/<URW> Garamond (|mdugm|), \pkg{garamondx} (|zgmx|, |zgmj|)}
%      & <OT1>, <T1>, <TS1>
%      & n, it\\
% Bitstream Letter Gothic (|blg|)\footnote{Alias: \pkg{ulgothic} (|ulg|)}
%      & <OT1>, <T1>, <TS1>
%      & n, it \\
% Adobe Minion (|pmnx|, |pmnj|)
%      & <OT1>, <T1>, <T2A>, <LY1>, <TS1>
%      & n, it, (sl)\fnref{fn:it-sl}, sc, si\\
% Palatino (|ppl|, |pplx|, |pplj|)\footnote{Aliases: \pkg{pxfonts} (|pxr|),
%                                           \pkg{qfonts}/QuasiPalatino, \TeX\ Gyre Pagella (|qpl|),
%                                           \pkg{newpx}, <FPL> Neu (|fp9x|, |fp9j|), \pkg{domitian}}
%      & <OT1>, <OT4>, <T1>, <LY1>, (<TS1>)\fnref{fn:incmpl}
%      & n, it, (sl)\fnref{fn:it-sl}, sc \\
% Times (|ptm|, |ptmx|, |ptmj|)\footnote{Aliases: \pkg{txfonts} (|txr|),
%                                        \pkg{qfonts}/QuasiTimes, \TeX\ Gyre Termes (|qtm|),
%                                        \pkg{newtx}, \pkg{tempora}, \pkg{step}, \pkg{stix}/\pkg{stix2}}
%      & <OT1>, <OT4>, <T1>, <LY1>, <QX>, (<TS1>)\fnref{fn:incmpl}
%      & n, it, (sl)\fnref{fn:it-sl}, sc \\
% Latin Modern Roman\footnote{Alias: New Computer Modern}
%      & <EU1>/<2>, <TU> [Latin, Greek]
%      & n, it, (sl)\fnref{fn:it-sl}\\
% Charis <SIL>
%      & <EU1>/<2>, <TU> [Latin, Cyrillic, Greek]
%      & n, it, sc\\
%\iffalse ^^A provided with the EB Garamond package
% <EB> Garamond
%      & <EU1>/<2>, <TU> [Latin, Cyrillic, Greek]
%      & n, it, sc, si\\
%\fi
% Palatino Linotype\footnote{Aliases: \TeX\ Gyre Pagella, Palatino <LT> Std, Palatino, Domitian}
%      & <EU1>/<2>, <TU> [Latin]
%      & n, it, sc\\
% Computer Modern math (|cmsy|, |cmm|)\footnote{Aliases: Latin Modern (|lmsy|, |lmm|)}
%      & <OML>/<OMS>
%      & n/it \\
% <AMS> symbols (|msa|, |msb|)
%      & <U>
%      & n\\
% Euler (|eur|, |eus|, |euf|)\footnote{Alias: \pkg{eulervm} (|zeur|, |zeus|)}
%      & <U>
%      & n\\
% Euro symbols (Adobe, <ITC>, \pkg{marvosym})
%      & <U>/<OT1>
%      & n, it \\
%\bottomrule
%\end{tabular*}^^A
%\end{minipage}^^A
%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox
%\end{table}
%
%\medskip
%\Describe{Macro}{\DeclareMicrotypeVariants}{list of suffixes}
%\DescribeMacro{\DeclareMicrotypeVariants*}
% On its search for a configuration file, the package will also try to remove
% from the font name a suffix of one or more letters that denotes a `variant'
% of the base font (cf. Karl Berry's \cite{fontname}). It is thus possible to
% put settings for, \eg, the fonts |padx|~(expert set), |padj| (oldstyle
% numerals) and |pad| (plain) into one and the same file \file{mt-pad.cfg}.
% This command expects a comma-separated list of variant suffixes. The starred
% version appends the suffix(es) to the existing list. The default declaration
% in \file{microtype.cfg} is:
%\begin{verbatim}
%\DeclareMicrotypeVariants{x,j,w,a,d,0,1}
%\end{verbatim}
%
%\medskip
%\Describe{Macro}{\DeclareMicrotypeAlias}{font name,alias font}
% This command may be used for fonts that are very similar, or actually the
% same (for instance if you did not stick to the Berry naming scheme when
% installing a font). An example would be the Latin Modern fonts, which are
% derived from Computer Modern, so that it is not necessary to create new
% settings for them -- you could say:
%\begin{verbatim}
%\DeclareMicrotypeAlias{lmr}{cmr}
%\end{verbatim}
% which would make the package, whenever it encounters the font |lmr| and does
% not find settings for it, also try the font |cmr|. In fact, you will find
% this very line, along with some others, in the default configuration file.
%
%\medskip
%\Describe{Macro}{\LoadMicrotypeFile}{font name}
% In rare cases, it might be necessary to load a font configuration file
% manually, for instance, from within another configuration file, or to be able
% to extend settings defined in a file that would otherwise not be loaded
% automatically, or would be loaded too late.\footnote{
%    Font package authors might also want to have a look at the hook
%    \cs{Microtype@Hook}, described in the implementation part,
%     section~\ref{sub:hook}.}
% This command will load the file `|mt-|\meta{font name}|.cfg|'.
%
%
%\section{Context-sensitive setup}\label{sec:context}
%
% The \microtype\ package also allows applying different micro-typographic
% settings to the fonts depending on the context in which they occur. This
% opens up the space for infinite possibilities of tweaking the document's
% appearance.
%  ^^A\footnote{
%  ^^A With \luatex, you have to load the fonts with the \cite{fontspec} option
%  ^^A `|Renderer=Basic|'.}  ^^A Otherwise, OpenType feature will be ignored (+smcp being one of them)
%
%\medskip
%\Describe{Macro}{\microtypecontext}{context assignments}
% This command may be used anywhere in the document (also in the preamble) to
% change the micro-typographic context in the current group. To each feature
% (\key{protrusion}, \key{expansion}, (or \key{activate} as a shortcut for both),
% \key{tracking}, \key{spacing} and \key{kerning}), one context may be assigned.
% Consequently, only settings with the corresponding `|context|' keyword will be applied.
%
%\medskip
%\Describe{Env}{microtypecontext}{context assignments}
% Like many \LaTeX\ commands, it is also available in the form of an environment.
%
%\medskip
%\Describe{Macro}{\textmicrotypecontext}{context assignments,general text}
% As another possibility, the command \cs{textmicrotypecontext} sets the
% context(s) for the text given in the second argument.
%
%\changes{v1.9c}{2006/01/25}{add example of how to increase protrusion of footnote markers
%                (suggested by \contributor Georg Verweyen <verweyen\at gmail.com>)}
%                                                     ^^A private mail, 2006/01/25
%\medskip\noindent
% Suppose you want the footnote markers in the text to be protruded by a larger
% amount. You could define settings for the numbers:
%\begin{verbatim}
%\SetProtrusion
%   [ context = footnote ]
%   { font    = */*/*/*/scriptsize } % adapt if necessary
%   { 1 = { ,650}, 2 = { ,400}, 3 = { ,400}, 4 = { ,400}, 5 = { ,400},
%     6 = { ,400}, 7 = { ,500}, 8 = { ,400}, 9 = { ,400}, 0 = { ,400} }
%\end{verbatim}
% and have the context changed in the footnote marker command. This command
% differs among the various classes; for the base classes, \eg, \pkg{article},
% it would be:
%\begin{verbatim}
%\newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont
%   \microtypecontext{protrusion=footnote}\@thefnmark}}}
%\renewcommand*\@footnotemark{%
%   \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
%   \new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax}
%\end{verbatim}
% For the \pkg{memoir} class, you would additionally have to disable
% auto-detection of multiple footnotes, which prevents protrusion:
%\begin{verbatim}
%\renewcommand*\@makefnmark{\hbox{\@textsuperscript{\normalfont
%   \microtypecontext{protrusion=footnote}\@thefnmark}}}
%\let\m@mmf@prepare\relax
%\let\m@mmf@check\relax
%\end{verbatim}
% ^^A For other classes, the command would have to be changed in a similar way.
%
%\medskip\noindent
% Another possibility would be to employ contexts for a language-dependent
% setup. For instance, if you are writing a text in French, you could add:
%\begin{verbatim}
%\microtypecontext{kerning=french}
%\end{verbatim}
% to the preamble. This would have the effect that kerning settings for the
% French context would be applied to the document. Should parts of the document
% be in English, you could write:
%\begin{verbatim}
%\textmicrotypecontext{kerning=}{English text!}
%\end{verbatim}
% to reset the context, so that the punctuation characters in these parts will
% not receive any extra kerning.
%
% Instead of adding these commands manually to your document, you may also load
% \microtype\ with the \opt{babel} option (see section~\ref{sub:options-misc}).
% The current language will then be automatically detected and the contexts set
% accordingly.
%
%\medskip
%\Describe{Macro}{\DeclareMicrotypeBabelHook}
%                {list of \pkg{babel} languages,context list}
% Naturally, \microtype\ does not know about the typographic specialties of
% every language. This command is a means of teaching it how to adjust the
% context when a particular language is selected. The main configuration file
% contains among others the following declaration:
%\begin{verbatim}
%\DeclareMicrotypeBabelHook
%   {french,francais,acadian,canadien}
%   {kerning=french, spacing=}
%\end{verbatim}
% Consequently, whenever you switch to the French language, the kerning context
% will be changed to `|french|' and the spacing context will be reset. This
% hook only has an effect if the package was loaded with the \opt{babel} option.
% Currently, \microtype\ supports French and Turkish kerning and English
% spacing (aka. \cmd\nonfrenchspacing). For unknown languages, all contexts
% will be reset.
%
%
%\section[Letterspacing revisited]
%        {Letterspacing revisited \requires{\pdftex~1.40,\luatex~0.62}}
%        \label{sec:lettersp}
%
%\Describe{Macro}{\textls}{?amount,general text}
% While the \opt{tracking} feature, described in section~\ref{sub:tracking},
% will apply to sets of fonts, you may also want to letterspace shorter pieces
% of text, regardless of the font in which they are typeset.\footnote{
%   Letterspacing should be used cautiously; in particular, letterspacing
%   lowercase text is held in abhorrence by honourable typographers. Unless
%   you know what you are doing, you should probably only letterspace
%   capitals or small capitals. Another just cause may be emphasis in texts
%   typeset in Fraktur fonts.}
% For such ad-hoc letterspacing, \microtype\ introduces two commands that can
% be used (independently of whether the |tracking| option is enabled) in the
% same way as \LaTeX's text commands: \cs{textls} -- which also works in math
% mode -- expects the text in the mandatory argument, while
%\DescribeMacro{\lsstyle}
% \cs{lsstyle} will switch on letterspacing for all subsequent fonts until the
% end of the current group.
%\DescribeMacro{\textls*}
% The starred version of \cs{textls} does not add any
% extra kerning before or after the text, which may be useful, \eg, for section
% titles. By default, each character will be spaced out by
% \EM{100/1000}\,=\,\EM{0.1}; this amount may be altered in the optional
% argument to \cs{textls}, using the \cs{SetTracking} command, or globally with
% the \opt{letterspace} package option, with decreasing significance in this
% order.
%
%\pagebreak ^^A layout
%\medskip
%\Describe{Macro}{\lslig}{ligature}
% Since the commands \cs{textls} and \cs{lsstyle} will also evaluate the
% `\texttt{no ligatures}' key for the respective font, you need not worry
% about protecting or breaking ligatures with most fonts. However, in certain
% situations, there may be a conflict of ligatures beginning with the same
% letter, where some of them should be inhibited, while others should not. When
% letterspacing text typeset in Fraktur fonts, for example, the ligatures `ch',
% `ck', `tz' and `sz'~(`\textfrak{sz}') should never be broken up; you also usually
% see the `st'~(`\textfrak{st}') ligature in letterspaced text. Furthermore, at
% least the \pkg{yfonts} package realises the short~s~(`\textfrak{s:}') as the
% ligature~`|s:|'. On the other hand, the `ct'~ligature and the other `long~s'
% ligatures often found in Fraktur fonts should be suppressed. There are two
% ways of solving this problem: either don't disable the `|s|' and/or `|c|'
% ligatures and break those that need to be broken up by inserting
% `|{\kern0pt}|' or \pkg{babel}'s \verb="|= shortcut; or disable them and
% protect those ligatures that need to be protected by enclosing them in the
% \cs{lslig} command. So, the following two solutions have the same result
% (namely, `\textls{\def\!#1{\textcolor{thegreen}{\lslig{#1}}}^^A
%                   \def\?#1{\textcolor{thered}{#1}}^^A
%  \textfrak{Au\!{s:}\?{si}\!{ch}t\!{s:}lo\?{si}gkeit}}',
%  with ligatures shown in green, inhibited ligatures in red).
%
%\begin{verbatim}[morekeywords={[0]{\kern}}]
%\SetTracking[no ligatures={f}]{encoding = LY, family = yfrak}{120}
%\textfrak{\lsstyle Aus:s{\kern0pt}ichts:los{\kern0pt}igkeit}
%\end{verbatim}
%\begin{verbatim}
%\SetTracking[no ligatures={f,s,c}]{encoding = LY, family = yfrak}{120}
%\textfrak{\lsstyle Au\lslig{s:}si\lslig{ch}t\lslig{s:}losigkeit}
%\end{verbatim}
%
%\bigskip\noindent
%\DescribePackage{letterspace}
% These three commands (plus the \opt{letterspace} option, described in
% section~\ref{sub:option-tracking}) are also available with the alternative
% \letterspace\ package, which is in fact a much stripped-down version of
% \microtype, omitting support for all the other extensions (and also omitting
% the possibilities of the \cs{SetTracking} command -- all `|f|' ligatures will
% be disabled, inner and outer spacing and outer kerning will be set to the
% default values described in section~\ref{sub:tracking}). If you prefer to
% forgo \microtype's specialties, you may load the \letterspace\ package
% instead. Both packages should not be used at the same time.
%
% In contrast to \microtype, which requires \LaTeX, the \letterspace\
% package also works with \pkg{eplain} or even only \pkg{miniltx}: for use with
% \pkg{eplain}, load the package with \cmd\usepackage\ inside the
% \cmd\beginpackages~\dots\ \cmd\endpackages\ environment; with \pkg{miniltx}
% (which does not support package options) simply \cmd\input\ \file{letterspace.sty}.
%
%
%\section[Disabling ligatures]
%        {Disabling ligatures \requires{\pdftex~1.30,\luatex~0.30}}
%        \label{sec:disable-ligatures}
%
%\Describe{Macro}{\DisableLigatures}{?characters,set of fonts}
% While completely disabling all ligatures of a font (which will also switch
% off kerning for this font), purposely \textit{lowers} the micro-typographic
% quality instead of raising it, it is especially useful for typewriter fonts,
% so that, \eg, in a <T1> encoded font, `|\texttt{--}|' will indeed be printed
% as `|--|', not as `\texttt{--}'. \cs{DisableLigatures} may be used to
% specify, in the usual way, a set of fonts for which ligatures should be
% disabled, for example, of the typewriter font in <T1> encoding:
%\begin{verbatim}
%\DisableLigatures{encoding = T1, family = tt* }
%\end{verbatim}
% It is also possible to disable selected ligatures only. The optional argument
% may contain a comma-separated list of characters for which the ligature
% mechanism should be inhibited:
%\begin{verbatim}
%\DisableLigatures[?,!]{encoding = T1} % "\ifx\tagcode\undefined\else ^^A
%           \normalfont\color{thegrey}inhibit ?` and !`, but not fi, --, >>, etc.\fi"
%\end{verbatim}
% Only the character that begins the ligature(s) should be specified. This
% command may only be used in the preamble, and only once.\footnote{
%   With \luatex, you have to load the fonts with the \cite{fontspec} option
%   `|Renderer=Basic|'.}
%   ^^A Otherwise, it won't work at all
%
%
%\section{Hints and caveats}\label{sec:caveats}
%
%\paragraph{Use settings that match your font.}
% Although the default settings should give reasonable results for most fonts,
% the particular font you happen to be using may have different character
% shapes that necessitate more or less protrusion. In particular,
% italic letter shapes may differ wildly in different fonts, hence I have
% decided against providing default protrusion settings for them.
% The file \file{test-microtype.tex} might be of some help when adjusting the
% protrusion settings for a font.
%
%\paragraph{Don't use too large a value for expansion.}
% Font expansion is a feature that is supposed to enhance the typographic
% quality of your document by producing a more uniform greyness of the text
% block (and potentially reducing the number of necessary hyphenations). When
% expanding or shrinking a font too much, the effect will be turned into the
% opposite. Expanding the fonts by more than 2\%, \ie, setting a \opt{stretch}
% limit of more than 20, should be justified by a typographically trained eye.
% If you are so lucky as to be in the possession of multiple instances of a
% Multiple Master font, you may set expansion limits to up to 4\%.
%
%\changes{v2.0}{2006/12/13}{qualify hint about web documents with regard to older \pdftex\ versions}
%\paragraph{Don't use font expansion for web documents (with older \pdftex\ versions).}
% With \pdftex\ versions older than 1.40, each expanded instance of the font
% will be embedded in the <PDF> file, hence the file size may increase by quite
% a large factor (depending on expansion limits and step). Therefore, courtesy
% and thriftiness of bandwidth command it not to enable font expansion when
% creating files to be distributed electronically. With \pdftex\ 1.40 and \luatex, which
% use a different technique of expansion, the increase of file size can be
% neglected.
%
%\changes{v2.2}{2007/07/06}{add hint about extra <TOC> leader dot
%                           (first discovered by \contributor Morten H\o gholm <morten.hoegholm\at latex-project.org>)}
%                                                                                       ^^A private mail, 2006/08/26
%\paragraph{You might want to disable protrusion in the Table of Contents.}
% In unfortunate situations, enabled protrusion might internally alter the line
% length in the <TOC> and similar lists in such a way that an excess leader dot
% will fit in. The solution is to temporarily disable protrusion for the <TOC>:
%\begin{verbatim}
%\microtypesetup{protrusion=false}
%\tableofcontents
%\microtypesetup{protrusion=true}
%\end{verbatim}
%
%\changes{v1.9}{2005/07/10}{add hint about \texttt{verbatim} environment}
%\todo{option to patch \texttt{verbatim}?} ^^A for Karl
%\paragraph{You might want to disable protrusion in \texttt{verbatim} environments.}
% As you know by now, \microtype\ will by default activate character protrusion
% for all fonts contained in the font set `|alltext|'. This also includes the
% typewriter font. Although it does make sense to protrude the typewriter font
% if it appears in running text (like, for example, in this manual), this is
% probably not desirable inside the |verbatim| environment. However,
% \microtype\ has no knowledge about the context that a font appears in but
% will solely decide by examining its attributes. Therefore, you have to take
% care of disabling protrusion in |verbatim| environments for yourself (that
% is, if you don't want to disable protrusion for the typewriter font
% altogether, by activating, say, the font set `|alltext-nott|').
% While the \cs{microtypesetup} command has of course been designed for cases
% like this, you may find it tiresome to repeat it every time if you are
% using the |verbatim| environment frequently. The following line (which requires
% the \pkg{etoolbox} package), added to the document's preamble, would serve the same purpose:
%\changes{v2.3e}{2009/07/21}{suggest to patch \cmd\@verbatim\ instead of \cmd\verbatim}
%\changes{v2.6}{2016/03/07}{suggest to use \pkg{etoolbox} to patch \cmd\verbatim}
%\begin{verbatim}
%\AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}}
%\end{verbatim}
% If you are using the \pkg{fancyvrb} or the \pkg{listings} package, this is
% not necessary, since their implementation of the corresponding environments
% will inhibit protrusion anyway.
%
%\changes{v1.9e}{2006/07/10}{add hint about unknown encodings}
%\paragraph{Settings for Greek/Thai/Armenian etc. encodings are not yet included.}
% The default sets of fonts for which the micro-typographic features will be
% enabled (see table~\ref{tab:predefined-font-sets}) only contain those
% encodings for which configurations exist. Therefore, if you are using any
% other encoding (\eg, <LGR>, <T2B>, etc.), \microtype\ will not apply to these
% fonts. You have to define and activate a new font set including the
% encoding(s) you are using (for details, see section~\ref{sec:font-sets}). For
% protrusion at least, you would also have to create settings for the fonts in
% question (see section~\ref{sub:protrusion}). It goes without saying that
% contributions for these encodings are more than welcome.
%
%\paragraph{Only employ kerning adjustment if it is customary in the language's
%typographic tradition.}
% In contrast to protrusion and expansion, additional kerning does not
% unconditionally improve the micro-typographical quality of your document. You
% should only switch it on if you are writing a document in a language whose
% typographic tradition warrants such kerning. If you are, for example, writing
% an English text, your readers would probably be rather confused by additional
% spaces before the punctuation characters.
%
%\changes{v2.3c}{2008/10/27}{add hint about \opt{spacing} being experimental}
%\paragraph{Adjustment of interword spacing is still experimental.}
% The implementation of this feature in \pdftex\ is not complete, and may not
% yield the positive effects on the typographical quality you might expect --
% in certain situations, there may even be undesired side effects,
%\changes{v2.5}{2011/11/27}{add hint about \opt{spacing} and \pkg{ragged2e}} ^^A (beta:09)
% in particular, when used together with the \pkg{ragged2e} package. Therefore,
% the \opt{spacing} option should not be chosen blindly; it is also recommended
% to experiment with the settings in order to understand the workings of this
% feature.
%
%\changes{v1.7}{2005/03/23}{add hint about compatibility}
%\paragraph{Compatibility and interaction with other packages:}
% The \microtype\ package is supposed to work happily together with all other
% \LaTeX\ packages (except for \pkg{pdfcprot}). However, life isn't perfect, so
% problems are to be expected. Currently, I am aware of the following issues:
%\begin{itemize}
%\changes{v2.7b}{2018/09/18}{update hint about non-7-bit characters
%                            (notified by \contributor Frank Mittelbach <frank.mittelbach\at latex-project.org>)}
%                            ^^A private mail, 2018/08/14
%  \item Even though all configuration files are still provided in legacy (7-bit)
%        format, using multi-byte (Unicode) characters in the settings should run
%        smoothly with an up-to-date \LaTeX\ system.
%        For older systems or documents in legacy encodings, in contrast, this requires
%        loading the \pkg{inputenc} package first.
%        Furthermore, when using multiple input encodings in a document, 8-bit characters in
%        the settings will only work reliably if you specify the |inputenc| key.
%\changes{v2.3a}{2008/02/25}{add hint about \pkg{babel} having to be loaded first}
%  \item When loading the package with the \opt{babel} option, you must load
%        the \pkg{babel} package before \microtype.
%\changes{v2.5}{2012/09/11}{add hint about \luatex\ compatibility}
%  \item Before this package was fully compatible with \luatex, the following
%        method of enabling expansion and protrusion with the \cite{fontspec}
%        package was most often found to be recommended:
%\begin{verbatim}[deletekeywords={[1]{expansion,protrusion}},belowskip=0pt]
%\newfontfeature{Microtype}{protrusion=default;expansion=default}
%\defaultfontfeatures{Microtype}
%\end{verbatim}
%        This code should \emph{not} be used with this package, as it will
%        basically override all of the settings made by \microtype\ -- despite
%        the naming, the above lines have nothing to do with this
%        package.\footnote{^^A
%             They make use of features provided by \cite{luaotfload} (via \cite{fontspec}).}
%\changes{v2.3c}{2008/11/11}{add hint about partial incompatibility with \pkg{CJK}}
%  \item With \pdftex, it is currently not possible to create character-specific settings for
%        Chinese\slash Japanese\slash Korean fonts. Therefore, the only
%        micro-typographic extension that can be made to work with
%        \pkg{CJK} fonts is (non-selected) font expansion.
%\changes{v2.6}{2015/11/03}{add hint about partial incompatibility with \pkg{xeCJK} and \pkg{luatexja}}
%  \item When used with the \pkg{xeCJK} package or the \pkg{luatexja} package,
%        text commands (\eg, |\'A|, |\textless|) in the configuration will not be understood.
%        You therefore have to ensure that \microtype\ will encounter none of them.
%        This requires, firstly, that the glyphs be specified only as single (possibly Unicode)
%        characters, as numbers, or as glyph names (cf. section~\ref{sec:fine-tuning});
%        and secondly, if you are using a font for which pre-defined settings do not exist,
%        that you create these settings yourself (because otherwise, the default settings
%        will be loaded, which do contain text commands). Furthermore, you should
%        load \microtype\ late.
%\end{itemize}
%
%\changes{v1.8}{2005/06/23}{add hint about error messages}
%\paragraph{Possible error messages and how to get rid of them (\textcolor{thegreen}{specs} may differ):}
%\begin{itemize}
%\lstset{deletekeywords={[1]{expansion,auto}},belowskip=-\smallskipamount,frame=none,
%        xleftmargin=0pt,backgroundcolor=,basicstyle=\MacroFont\footnotesize,
%        delim=[is][\itshape\color{thegreen}]{<}{>}}
%\changes{v1.9a}{2005/11/15}{add explanation for error message in <DVI> mode}
%  \item
%\begin{verbatim}
%! Font csnameendcsname=<cmr10+20 at 10.0pt> not loadable: Metric (TFM) file not found.
%\end{verbatim}
% This error message will occur if you are trying to employ font expansion
% while creating <DVI> output. Remember that \emph{automatic} font expansion
% only works when running \pdftex\ or \luatex\ in <PDF> mode. Although expansion is also
% possible in <DVI> mode with \pdftex, it requires that all instances of the expanded fonts
% exist on your \TeX\ system.
%
%\changes{v2.2}{2007/06/13}{add hint about error message with \pdftex\ 1.40}
%  \item
%\begin{verbatim}
%! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.
%\end{verbatim}
% Automatic font expansion has been improved in \pdftex\ 1.40, in that it now
% not only works with Type\,1 fonts but also with TrueType, OpenType and even
% non-embedded fonts. The above error message indicates either that you are
% trying to apply expansion to a bitmap~(|pk|) font, which is still not
% possible, or that the font isn't found at all, \eg, because of missing map
% entries.
%
%\changes{v2.0}{2006/12/13}{qualify hints about expansion error messages with
%                           regard to older \pdftex\ versions}
%  \item
%\begin{verbatim}
%Warning: pdflatex: font <ptmr8r> cannot be expanded (not an included Type1 font)
%\end{verbatim}
% and the <PDF> viewer complains about a missing font, \eg, Adobe Reader thusly:
%\begin{verbatim}[aboveskip=\smallskipamount]
%Could not find a font in the Resources dictionary - using Helvetica instead.
%\end{verbatim}
% With \pdftex\ versions older than 1.40, font expansion can only be applied if
% the font is actually embedded in the <PDF> file. If you get the above error
% message, your \TeX\ system is not set up to embed (or `download') the base
% PostScript fonts (\eg, Times, Helvetica, Courier). In most \TeX\
% distributions, this can be changed in the file \file{updmap.cfg} by setting
% |pdftexDownloadBase14| to |true|.
%
%\ifcmr\else\pagebreak\fi ^^A layout
%\changes{v1.9a}{2005/11/15}{add explanation for error message with non-Type\,1 fonts}
%  \item
%\begin{verbatim}
%Warning: pdflatex (file <ecrm1000+20>): Font <ecrm1000+20 at 1200> not found
%\end{verbatim}
% Furthermore, \pdftex\ versions older than 1.40 require Type\,1 fonts for
% automatic font expansion. When you receive a message like the above, you are
% probably trying to apply font expansion to a bitmap or TrueType font. With
% older \pdftex\ versions, this is only possible if you manually create
% expanded instances of the fonts.
%
%\changes{v2.0}{2006/11/05}{add hint about how to increase \texttt{font\textunderscore max}
%                            and \texttt{font\textunderscore mem\textunderscore size}}
%  \item
%\begin{verbatim}
%! Font <T1/cmr/m/n/10>=<ecrm1000 at 10.0pt> not loaded: Not enough room left.
%\end{verbatim}
% Memory parameter `|font_mem_size|' too small.
%  \item
%\begin{verbatim}
%! TeX capacity exceeded, sorry [maximum internal font number (font_max)=<2000>].
%\end{verbatim}
% Memory parameter `|font_max|' too small.
%  \item
%\begin{verbatim}
%! TeX capacity exceeded, sorry [PDF memory size (pdf_mem_size)=<65536>].
%\end{verbatim}
% Memory parameter `|pdf_mem_size|' too small (\pdftex\ versions older than 1.30).
%
% When applying micro-typographic enhancement to a large document with a lot of
% fonts, \pdftex\ may be running out of some kind of memory. It can be
% increased by setting the respective parameter to a larger value. For
% web2c-based systems, \eg, \texlive, change the settings in \file{texmf.cnf},
% for \miktex, in the file \file{miktex.ini} (2.4 or older) resp.
% \file{pdflatex.ini} (2.5 or newer).
%
%\changes{v2.0}{2007/01/05}{add hint about warning when tracking \emph{and}
%                           expansion is applied to a font}
%  \item
%\begin{verbatim}[deletekeywords={[1]{expansion}}]
%pdfTeX warning (font expansion): font should be expanded before its first use
%\end{verbatim}
% This warning will occur with \pdftex\ versions older than 1.40.4, if tracking
% \emph{and} expansion is applied to a font. It is harmless and can be ignored.
%\end{itemize}
%
%\changes{v2.5}{2012/07/17}{add hint about \texttt{dtx} source code}
% \paragraph{The source code of this document is freely available.}
% If you wonder how this document was created, just have a look at the source
% code in \file{microtype.dtx}, which is either already included in your \TeX\
% distribution, or else can be downloaded from
% \href{http://mirror.ctan.org/macros/latex/contrib/microtype/}
%      {\acronym{CTAN}}.
% For the source code of the logo on the title page and of the letterspacing
% sample from section~\ref{sub:tracking}, see the appendices~\ref{sec:title-logo}
% and \ref{sec:letterspace-ill}.
%\changes{v2.5a}{2013/05/23}{add notes on typesetting the documentation}
% If you want to re-typeset the documentation, read the comments at the end of
% \file{microtype.dtx}.
%
%
%\section{Contributions}
%
% I would be glad to include configuration files for more fonts. Preparing such
% configurations is quite a time-consuming task and requires a lot of patience.
% To alleviate this process, this package also includes a test file that can be
% used to check at least the protrusion settings (\file{test-microtype.tex}).
%^^A
% If you have created a configuration file for another font, or if you have any
% suggestions for enhancements in the default configuration files, I~would
% gratefully accept them: \mailtoRS.
%\iffalse\footnote{^^A ... OK, so nobody has any ...
%    Should you have lots of \pkg{pdfcprot} configuration files lying around,
%    I can also provide you with a \TeX\ conversion script. Just ask me.}
%\fi
%
%
%\section{Acknowledgments}
%
% This package would be pointless if
%  \contributor H\`an \thanhthe{} Th\`anh <thanh\at pdftex.org>
% hadn't created the \pdftex\ programme in the first place, which introduced
% the micro-typographic extensions and made them available to the \TeX\ world.
% Furthermore, I thank him for helping me to improve this package, and not
% least for promoting it in \cite{ThanhPracTeX}, \cite{ThanhEuroTeX07} and ^^A comma, to avoid the Three Ands Falls
% elsewhere. I also thank him and the rest of the \pdftex\ team, and more
% recently also the \luatex\ and \xetex\ teams, for refuting the idea that
% \TeX\ is dead, and for fixing the bugs I find.
%
%  \contributor Harald Harders <h.harders\at tu-bs.de>
% has contributed protrusion settings for Adobe Minion. I~would also like to
% thank him for a number of bug reports and suggestions he had to make.
%  \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>
% has suggested the possibility to specify ranges of font sizes, and
% resourcefully assisted in implementing this. He also came up with some good
% ideas for the management of complex configurations.
%  \contributor Ulrich Dirr <ud\at art-satz.de>
% has made numerous suggestion, especially concerning the new extensions of
% interword spacing adjustment and additional character kerning.
%  \contributor Georg Duffner <g.duffner\at gmail.com> has patiently tested
% \microtype\ under \xetex\ and \luatex\ with his beautiful OpenType font
% <EB>~Garamond\footnote{\ctanpkgurl{ebgaramond}, including configuration
%   files for \microtype.}.
% My thanks also go to
%  \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>
% for contributing settings for the <QX> encoding, as well as to
%  \contributor Karl Karlsson <karl-karlsson\at yandex.ru>
% for providing settings for the Cyrillic <T2A> encoding, and to
%  \contributor Hendrik Vogt <hendrik.vogt\at tu-dresden.de>,
% who made substantial improvements to the Computer Modern Roman italic settings.
% I thank
%  \contributor Loren~B. Davis <davislo\at eecs.oregonstate.edu>
% for providing protrusion settings for OpenType versions of Palatino Linotype.
% I am also very much indebted to
%  \contributor \'Elie Roux <elie.roux\at telecom-bretagne.eu>,
% who not only contributed the |lua| module in the first place, but also,
% together with
%  \contributor Philipp Gesang <philipp.gesang\at alumni.uni-heidelberg.de>,
% took care of updating it for the developments in \luatex\ land.
%
% I thank
%  \contributor Philipp Lehman <plehman\at gmx.net>
% for adding to his \pkg{csquotes} package the possibility to restore the
% original meanings of all activated characters, thus allowing for these
% characters to be used in the configuration files.
%  \contributor Peter Wilson <herries.press\at earthlink.net>
% kindly provided a hook in his \pkg{ledmac}/\pkg{ledpar} packages, so that
% critical editions can finally also benefit from character protrusion.
% Likewise,
%  \contributor Donald Arseneau <asnd\at triumf.ca>
% patched his \pkg{shapepar} package to accommodate protrusion.
%
% Additionally, the following people have reported bugs, made suggestions or
% helped otherwise (in chronological order, quotes indicate
%    \href{https://tex.stackexchange.com/users/}{TeX.SX} user names):\linebreak
%  \contributor Tom Kink          <kink\at hia.rwth-aachen.de>,
%  \contributor Herb Schulz       <herbs\at wideopenwest.com>,
%  \contributor Michael Hoppe     <mh\at michael-hoppe.de>,
%  \contributor Gary~L. Gray      <gray\at engr.psu.edu>,
%  \contributor Georg Verweyen    <verweyen\at gmail.com>,
%  \contributor Christoph Bier    <christoph.bier\at web.de>,
%  \contributor Peter Muthesius   <Pemu\at gmx.de>,
%  \contributor Bernard Gaulle    <gaulle\at idris.fr>, ^^A\,\textdagger,
%  \contributor Adam Kucharczyk   <adamk\at ijp-pan.krakow.pl>,
%  \contributor Mark Rossi        <mark.rossi\at de.bosch.com>,
%  \contributor Stephan Hennig    <stephanhennig\at arcor.de>,
%  \contributor Michael Zedler    <Michael.Zedler\at tum.de>,
%  \contributor Herbert Vo\ss{}   <Herbert.Voss\at gmx.net>,
%  \contributor Ralf Stubner      <ralf.stubner\at physik.uni-erlangen.de>,
%  \contributor Holger Uhr        <huhr\at uni-paderborn.de>,
%  \contributor Peter Dyballa     <Peter_Dyballa\at Web.DE>,
%  \contributor Morten H\o gholm  <morten.hoegholm\at latex-project.org>,
%  \contributor Steven Bath       <steven128\at iname.com>,
%  \contributor Daniel Flipo      <daniel.flipo\at univ-lille1.fr>,
%  \contributor Michalis Miatidis <miatidis\at informatik.rwth-aachen.de>,
%  \contributor Sven Naumann      <svenau\at gmx.net>,
%  \contributor Ross Hetherington <ross\at heth.eclipse.co.uk>,
%  \contributor Wiebke Petersen   <petersew\at uni-duesseldorf.de>,
%  \contributor Geoff Vallis      <gkv\at Princeton.EDU>,
%  \contributor Steven~E. Harris  <seh\at panix.com>,
%  \contributor Karl Berry        <karl\at freefriends.org>,
%  \contributor Peter Meier       <Peter.Meier998\at gmx.de>,
%  \contributor Nathan Rosenblum  <nater\at cs.wisc.edu>,
%  \contributor Wolfram Schaalo   <schaalo\at gmx.net>,
%  \contributor Vasile Gaburici   <vgaburici\at gmail.com>,
%  \contributor Sveinung Heggen   <sveinung.heggen\at orkla.no>,
%  \contributor Axel Berger       <Axel_Berger\at b.maus.de>,
%  \contributor Colin Rourke      <gt\at msp.warwick.ac.uk>,
%  \contributor Maverick Woo      <maverick\at cs.cmu.edu>,
%  \contributor Silas~S. Brown    <ssb22\at cam.ac.uk>,
%  \contributor Lars R\"onnb\"ack <lars.ronnback\at affecto.com>,
%  \contributor Christian Stark   <cstark\at gmx.de>,
%  \contributor Leo               <sdl.web\at gmail.com>,
%  \contributor Marcin Borkowski  <mbork\at atos.wmid.amu.edu.pl>,
%  \contributor hscm              <henkmetselaar\at gmail.com>,
%  \contributor George Gratzer    <gratzer\at me.com>,
%  \contributor Josep Maria Font  <jmfont\at ub.edu>,
%  \contributor Juan Acevedo      <juan.acevedo.juan\at gmail.com>,
%  \contributor Heiko Oberdiek    <heiko.oberdiek\at googlemail.com>,
%  \contributor Till~A. Heilmann  <till.heilmann\at unibas.ch>,
%  \contributor Rolf Dieterich    <rolf.dieterich\at gmx.de>,
%  \contributor Seamus Bradley    <@\at @>, ^^A https://tex.stackexchange.com/users/215/seamus
%  \contributor Meho~R            <meho.2005\at gmail.com>,
%  \contributor Steffen Hoffmann  <speraviro-delenda\at expires-2011-11-30.arcornews.de>,
%  \contributor Scott Pakin       <scott\at pakin.org>,
%  \contributor Ma\"ieul Rouquette <maieul\at maieul.net>,
%  \contributor Jonas Hogstrom    <hjb981\at gmail.com>,
%  \contributor Gabriel Kerneis   <gabriel\at kerneis.info>,
% `\contributor RazorXsr          <@\at @>', ^^A https://tex.stackexchange.com/users/17609/razorxsr
%  \contributor Sebastian Schubert <schubert.seb\at googlemail.com>,
% `\contributor Dave              <@\at @>', ^^A https://tex.stackexchange.com/users/15562/dave
%  \contributor Giuseppe Palma    <pippi.palma\at gmail.com>,
%  \contributor Stephan Stiller   <stephan.stiller\at gmail.com>,
%  \contributor Christopher Schramm <debian\at shakaweb.org>,
% `\contributor uli               <@\at @>',  ^^A https://tex.stackexchange.com/users/9391/uli
%  \contributor Sam Mason         <sam\at samason.me.uk>, ^^A https://tex.stackexchange.com/users/16433/sam-mason
% `\contributor kleenstar         <@\at @>', ^^A https://tex.stackexchange.com/users/56468/kleenstar
% `\contributor Henning           <@\at @>', ^^A https://tex.stackexchange.com/users/64603/henning
%  \contributor Ronnie Marksch    <Ronnie.Marksch\at yahoo.de>,
%  \contributor David Carlisle    <d.p.carlisle\at gmail.com>,
% `\contributor Max               <@\at @>', ^^A https://tex.stackexchange.com/users/16809/max
% `\contributor HcN               <@\at @>', ^^A https://tex.stackexchange.com/users/87090/hcn
%  \contributor Will Robertson    <will\at wspr.io>,
% `\contributor user11126         <@\at @>', ^^A https://tex.stackexchange.com/users/1000/user11126
%  \contributor Ulrike Fischer    <fischer\at troubleshooting-tex.de>,
% `\contributor Daniel            <@\at @>', ^^A https://tex.stackexchange.com/users/113787/daniel
% `\contributor ltcomdata         <@\at @>', ^^A https://tex.stackexchange.com/users/17061/ltcomdata
%  \contributor Reinhard Kotucha  <reinhard.kotucha\at web.de>,
% `\contributor jcr               <@\at @>', ^^A https://tex.stackexchange.com/users/56514/jcr
%  \contributor Nils Anders Danielsson <nad\at cse.gu.se>,
%  \contributor Paolo Ney         <@\at @>,  ^^A https://tex.stackexchange.com/users/29161/paulo-ney
%  \contributor Frank Mittelbach  <frank.mittelbach\at latex-project.org>,
%  \contributor Franz Wexler      <@\at @>,  ^^A https://tex.stackexchange.com/users/182307/franz-wexler
%  \contributor Moritz Wemheuer   <moritz.wemheuer\at gmail.com>,
% `\contributor Andy N            <@\at @>', ^^A https://tex.stackexchange.com/users/182462/andy-n
%  \contributor Phelype Oleinik   <phe.h.o1\at gmail.com>,
%  \contributor Falk Hanisch      <falk.hanisch\at tu-dresden.de>,
%  \contributor Markus Kohm       <komascript\at gmx.info>,
%  \contributor Paolo Polesana    <@\at @>,  ^^A https://tex.stackexchange.com/users/95083/paolo-polesana
%  \contributor Oliver Kopp       <koppdev\at gmail.com>,
%  \contributor Hironori Kitagawa <h_kitagawa2001\at yahoo.co.jp>,
% `\contributor d909              <@\at @>', ^^A https://tex.stackexchange.com/users/176404/d909
%  \contributor Daniel Benjamin Miller <dbmiller\at dbmiller.org>,
%  \contributor Md Ayquassar      <mdayq0\at lenta.ru>
% and
%  \contributor Marcel Kr\"uger   <tex\at 2krueger.de>.
%
%
%\iffalse
%\section{History of micro-typography} ^^A some time ...
% Both these features have been lacking a simple \LaTeX\ user interface for
% quite some time. Then, the \cite{pdfcprot} package was released, which
% allowed \LaTeX\ users to employ character protrusion without having to mess
% much with the internals.
%
% Font expansion, however, was still most difficult to utilise, since it
% required that the font metrics are available for all levels of expansion.
% Therefore, anybody who wanted to make use of this feature had to create
% multiple instances of the fonts in advance. Shell scripts to partly relieve
% the user from this burden were available~-- however, it remained a cumbersome
% task. Furthermore, all fonts were still being physically created, thus
% wasting compilation time and disk space.
%
% In the summer of 2004, \thanh\ implemented a feature that has proven as a
% major facilitation for \TeX\ and \LaTeX\ users: font expansion can now take
% place automatically. That is, \pdftex\ no longer needs the expanded font
% metrics but will calculate them at run-time and completely in memory.
%
% After this great leap in usability had been taken, the development did not
% stop. On the contrary, \pdftex\ was extended with even more features: version
% 1.30 introduced the possibility to \emph{disable all ligatures}, version 1.40
% a robust \emph{letterspacing} command, the possibility to specify
% \emph{additional character kerning}, and the \emph{adjustment of interword
% spacing}.
%\fi
%
%
%\begin{thebibliography}{}
% \bibitem[Th\`anh 2000]{ThanhThesis}
%   \thanh, `Micro-typographic extensions to the \TeX\ typesetting system',
%   \newblock Diss. Masaryk University Brno 2000,
%   \newblock in: \textit{TUGBoat}, vol.~21 (2000), no.~4, pp.~317--434.
%   \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb21-4/tb69thanh.pdf})
%
%\iffalse ^^A obsolete
% \bibitem[Th\`anh 2001]{ThanhTUG}
%   \thanh, `Margin Kerning and Font Expansion with \pdftex',
%   \newblock in: \textit{TUGBoat}, vol.~22 (2001), no.~3:
%             `Proceedings of the 2001 Annual Meeting', pp.~146--148.
%   \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb22-3/tb72thanh.pdf})
%\fi
%
% \bibitem[Th\`anh 2004]{ThanhPracTeX}
%   \thanh, `Micro-typographic extensions of \pdftex\ in practice',
%   \newblock in: \textit{TUGBoat}, vol.~25 (2004), no.~1:
%             `Proceedings of the Practical \TeX\ 2004 Conference', pp.~35--38.
%   \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb25-1/thanh.pdf})
%
%\iffalse
% \bibitem[Th\`anh 2005]{ThanhEuroTeX05}
%   \thanh, `Experiences with micro-typographic extensions of \pdftex\ in practice',
%   \newblock in: Euro\TeX\ 2005 Proceedings
%             ^^A 15th~Annual Meeting of the European \TeX\ Users,
%             ^^A March~7 -- March~11, 2005, Abbaye des Pr\'emontr\'es, Pont-\`a-Mousson,
%             [=~\textit{TUGBoat}, vol.~27 (2006), no.~0],
%             pp.~159--164.
%   \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb27-0/thanh.pdf})
%                  ^^A = \url{http://www.dante.de/dante/events/eurotex/papers/TUT07.pdf}
%\fi
%
% \bibitem[Th\`anh 2008]{ThanhEuroTeX07}
%   \thanh, `Font-specific issues in \pdftex',
%   \newblock in: \textit{TUGBoat}, vol.~29 (2008), no.~1:
%             `EuroBacho\TeX\ 2007 Proceedings', pp.~36--41.
%   \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb29-1/tb91thanh-fonts.pdf})
%
% \bibitem[\pdftex\ manual]{pdftexman}
%   \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder, Karl Berry,
%   \emph{The \pdftex\ user manual},
%   \newblock 2~March 2020.
%   \newblock (\ctanurl{systems/doc/pdftex/manual/pdftex-a.pdf})
%             ^^A latest version at \url{http://sarovar.org/projects/pdftex/}
%             ^^A or even \url{http://foundry.supelec.fr/scm/?group_id=23}
%
% \bibitem[Fontname]{fontname}
%   Karl Berry, \emph{Fontname: Filenames for \TeX\ fonts},
%   \newblock July 2009.
%   \newblock (\ctanurl{info/fontname/fontname.pdf})
%
% \bibitem[\LaTeXe\ font selection]{fntguide}
%   \LaTeX3 Project Team, \emph{\LaTeXe\ font selection},
%   \newblock July 2020.
%   \newblock (\ctanurl{macros/latex/base/fntguide.pdf})
%
% \bibitem[\pkg{fontspec}]{fontspec}
%   Will Robertson,
%    \emph{The \pkg{fontspec} package: Font selection for \xe\LaTeX\ and Lua\LaTeX},
%    \newblock 21~February 2020.
%    \newblock (\ctanpkgurl{fontspec})
%
% \bibitem[\pkg{luaotfload}]{luaotfload}
%   \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer, Marcel Kr\"uger,
%    \emph{The \pkg{luaotfload} package},
%    \newblock 2~September 2020.
%    \newblock (\ctanpkgurl{luaotfload})
%
% \bibitem[\pkg{pdfcprot}]{pdfcprot}
%   Carsten Schurig, Tobias Schlemmer, \emph{The \pkg{pdfcprot}|.sty| package},
%   \newblock 10 June 2005.
%   \newblock (\ctanpkgurl{pdfcprot})
%
% \bibitem[\pkg{soul}]{soul}
%   Melchior Franz, \emph{The \pkg{soul} package},
%   \newblock 17 November 2003.
%   \newblock (\ctanpkgurl{soul}).
%\changes{v2.3a}{2008/01/06}{mention \pkg{soulutf8}}
%   \newblock See also Heiko Oberdiek's extension of this package,
%             \pkg{soulutf8}, which adds Unicode support.
%   \newblock (\ctanpkgurl{soulutf8})
%
%\end{thebibliography}
%
%
%\section{Short history}
%\changes{v1.5}{2004/12/11}{add `Short history'}
%
% The comprehensive list of changes can be
% \expandafter\ifx\csname r@sec:changes\endcsname\relax
%     obtained by running `\texttt{makeindex \mbox{-s gglo.ist}
%                                  \mbox{-o microtype.gls} microtype.glo}'\else
%     found in appendix~\ref{sec:changes}\fi.
% The following is a list of all changes relevant in the user land; bug and
% compatibility fixes are swept under the rug. Numbers in brackets indicate
% the relevant section in this manual.
%
%\newenvironment{History}
%  {\list\labelitemi
%   {\leftmargin 0pt
%    \parsep 0pt
%    \def\refsection##1{[##1]}
%    \def\makelabel##1{\hss\llap{\color{sectioning}##1}}}}
%  {\endlist}
%\newcommand\Version[2]{
%  \VersionDate{#1}{#2}
%  \vskip\topsep
%  \pagebreak[2]
%  \item[\textsf{\bfseries\color{sectioning}#1}]\textsf{\bfseries\color{sectioning}(#2)}
%  \vskip\topsep
%  \nopagebreak}
%\newcommand\VersionDate[2]{^^A needed in the Change history
%  \global\expandafter\def\csname MTversiondate#1\endcsname{#2}}
%
%\begin{History}
%
%\Version{\expandafter\@gobble\fileversion}{\filedate}
%  \item New default font sets for expansion and spacing: `|alltext-nott|'
%        \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}}
%
%\VersionDate{2.7d}{2019/11/18}
%
%\VersionDate{2.7c}{2019/10/10}
%
%\VersionDate{2.7b}{2019/02/28}
%
%\VersionDate{2.7a}{2018/01/14}
%
%\Version{2.7}{2017/07/07}
%  \item Allow automatic expansion and letterspacing with \luatex\ in <DVI> mode
%        (aka. \texttt{dvilualatex})
%        \refsection{\ref{sub:options-microtype}, \ref{sub:options-expansion}, table~\ref{tab:available-features}}
%  \item Compatibility with \LaTeX\ 2017/01/01 (fix warnings)
%
%\VersionDate{2.6a}{2016/05/14}
%
%\Version{2.6}{2016/05/01}
%  \item Support for \luatex\ $\geq$ 0.85
%  \item Improvements for tracking/letterspacing with \luatex\
%        (|Renderer=Basic| no longer required)
%  \item New font sets: `|alltext-nott|', `|allmath-nott|'
%        \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}}
%
%\VersionDate{2.5a}{2013/05/23}
%
%\Version{2.5}{2013/03/13}
%  \item Support for the \cite{fontspec} package, viz.
%        for OpenType fonts with \luatex\ and \xetex
%  \item Support for protrusion with \xetex\ $\geq$ 0.9997
%  \item Support for tracking/letterspacing with \luatex\ $\geq$ 0.62
%  \item Allow context-sensitive setup with \luatex
%  \item Info if protrusion settings are generic
%  \item Protrusion settings for Latin Modern Roman (OpenType)
%  \item Protrusion settings for Charis SIL (OpenType)
%  \item Protrusion settings for Palatino Linotype (OpenType)
%
%\Version{2.4}{2010/01/10}
% ^^A \item |lua| functions moved to a dedicated file
%  \item Protrusion settings for <T2A> encoded Minion
%
%\Version{2.3e}{2009/11/09}
%  \item Support for the Cyrillic <T2A> encoding (protrusion, expansion, spacing)
%
%\Version{2.3d}{2009/03/27}
%  \item New default for expansion option `\opt{step}': 1, if \pdftex\ $\geq$ 1.40
%        \refsection{\ref{sub:options-expansion}}
%
%\Version{2.3c}{2008/11/11}
%  \item Support for \luatex\ enabled by default
%
%\VersionDate{2.3b}{2008/06/04}
%
%\VersionDate{2.3a}{2008/02/29}
%
%\Version{2.3}{2007/12/23}
%  \item New key `|outer kerning|' for \cs{SetTracking} to customise outer kerning
%        \refsection{\ref{sub:tracking}}
%  \item Adjust protrusion settings for tracking even if protrusion is not enabled
%  \item New option `\opt{verbose}|=silent|' to turn all warnings into mere messages
%        \refsection{\ref{sub:options-misc}}
%  \item The \letterspace\ package also works with \pkg{eplain} or \pkg{miniltx}
%        \refsection{\ref{sec:lettersp}}
%
%\Version{2.2}{2007/07/14}
%  \item Improvements to tracking/letterspacing: retain kerning (\pdftex\ $\geq$ 1.40.4);
%        automatically adjust protrusion settings
%  \item New key `|no ligatures|' for \cs{SetTracking} to disable selected or
%        all ligatures (\pdftex\ $\geq$ 1.40.4)
%        \refsection{\ref{sub:tracking}}
%  \item New keys `|spacing|' and `|outer spacing|' for \cs{SetTracking} to
%        customise interword spacing
%        \refsection{\ref{sub:tracking}}
%  \item Possibility to expand a font with different parameters (\pdftex\ $\geq$ 1.40.4)
%    ^^A ; new option `\opt{copyfonts}'
%        \refsection{\ref{sub:expansion}}
%  \item New optional argument for \cs{DisableLigatures} to disable selected ligatures
%        \refsection{\ref{sec:disable-ligatures}}
%  \item New command \cs{DeclareMicrotypeVariants} to specify variant suffixes
%        \refsection{\ref{sub:config-file}}
%  \item New command \cs{textmicrotypecontext} as a wrapper for \cs{microtypecontext}
%        \refsection{\ref{sec:context}}
%  \item Protrusion settings for Bitstream Letter Gothic
%^^A  \item Basic support for \luatex\ (if generated with the |lua| option)
%
%\Version{2.1}{2007/01/21}
%  \item New command \cs{lslig} to protect ligatures in letterspaced text
%        \refsection{\ref{sec:lettersp}}
%
%\Version{2.0}{2007/01/14}
%  \item Support for the new extensions of \pdftex\ $\geq$ 1.40:
%        tracking/letterspacing, additional kerning, and adjustment of
%        interword spacing (glue)
%        (new commands \cs{SetTracking}, \cs{SetExtraKerning}, \cs{SetExtraSpacing};
%         new options `\opt{tracking}', `\opt{kerning}', `\opt{spacing}')
%        \refsection{\ref{sub:tracking}, \ref{sub:kerning}, \ref{sub:spacing}}
%  \item New commands \cs{textls} and \cs{lsstyle} for letterspacing,
%        new option `\opt{letterspace}'
%        \refsection{\ref{sub:option-tracking}, \ref{sec:lettersp}}
%  \item New option `\opt{babel}' for automatic micro-typographic adjustment to
%        the selected language
%        \refsection{\ref{sub:options-misc}, \ref{sec:context}}
%  \item New font sets: `|smallcaps|', `|footnotesize|', `|scriptsize|'
%        \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}}
%  \item New package `\letterspace' providing the commands for robust and
%        hyphenatable letterspacing
%        \refsection{\ref{sec:lettersp}}
%
%\VersionDate{1.9f}{2006/09/09}
%
%\Version{1.9e}{2006/07/28}
%  \item New key `|inputenc|' to specify the lists' input encodings
%        \refsection{\ref{sec:fine-tuning}}
%  \item Protrusion settings for Euler math fonts
%
%\Version{1.9d}{2006/05/05}
%  \item Support for the Central European <QX> encoding
%        (protrusion, inheritance)
%  \item Protrusion settings for various Euro symbol fonts (Adobe, <ITC>, \pkg{marvosym})
%  \item Support for Unicode input in the configuration (\pkg{inputenc}/|utf8|)
%
%\Version{1.9c}{2006/02/02}
%  \item Protrusion settings for <URW> Garamond
%
%\VersionDate{1.9b}{2006/01/20}
%
%\Version{1.9a}{2005/12/05}
%  \item Defer setup until the end of the preamble
%   ^^A ; consequently, no need to
%   ^^A   change font defaults before loading \microtype, or to put it the other
%   ^^A   way round, \microtype\ may now be loaded at any time
%   ^^A ; new option `\opt{defersetup}'
%  \item Inside the preamble, \cs{microtypesetup} accepts all package options
%        \refsection{\ref{sub:options-cmd}}
%  \item Protrusion settings for <T5> encoded Charter
%
%\Version{1.9}{2005/10/28}
%  \item New command \cs{DisableLigatures} to disable ligatures
%        (\pdftex\ $\geq$ 1.30)
%        \refsection{\ref{sec:disable-ligatures}}
%  \item New command \cs{microtypecontext} to change the configuration context;
%        new key `|context|' for the configuration commands
%        \refsection{\ref{sec:context}}
%  \item New key `|font|' to add single fonts to the font sets
%        \refsection{\ref{sec:font-sets}}
%  \item New key `|preset|' to set all characters to the specified value before
%        loading the lists
%  \item Value `|relative|' renamed to `|character|' for `|unit|' keys
%  \item Support for the Polish <OT4> encoding (protrusion, expansion, inheritance)
%  \item Support for the Vietnamese <T5> encoding (protrusion, expansion, inheritance)
%^^A  \item `\opt{DVIoutput}' option will work with \texlive\ 2004
%
%\Version{1.8}{2005/06/23}
%^^A  \item If font substitution has occurred, the settings for the substitute will
%^^A        be used instead of those for the selected font
%  \item New command \cs{DeclareMicrotypeSetDefault} to declare the default font sets
%        \refsection{\ref{sec:font-sets}}
%  \item New option `\opt{config}' to load a different configuration file
%        \refsection{\ref{sub:options-misc}}
%  \item New option `\opt{unit}' to measure protrusion factors relative to a
%        dimension instead of the character width
%        \refsection{\ref{sub:protrusion}}
%  \item Renamed commands from \cs{..MicroType..} to \cs{..Microtype..}
%  \item Protrusion settings for <AMS> math fonts
%  \item Protrusion settings for Times in <LY1> encoding completed
%  \item The `|allmath|' font set also includes <U> encoding
%^^A  \item 8-bit characters in the configuration finally work as advertised,
%^^A        even if made active by the \pkg{csquotes} package
%  \item Support for protrusion with the \pkg{ledmac} package (\pdftex\ $\geq$ 1.30)
%
%\Version{1.7}{2005/03/23}
%  \item Possibility to specify ranges of font sizes in the set declarations
%        \refsection{\ref{sec:font-sets}, \ref{sec:fine-tuning}}
%^^A  \item Always take font size into account when trying to find protrusion resp.
%^^A        expansion settings for a given font
%^^A        \refsection{\ref{sec:fine-tuning}}
%  \item New command \cs{LoadMicrotypeFile} to load a configuration file manually
%        \refsection{\ref{sub:config-file}}
%  \item New command \cs{Microtype@Hook} for font package authors
%        \refsection{\ref{sub:hook}}
%  \item New option `\opt{verbose}|=errors|' to turn all warnings into errors
%^^A  \item Disable expansion inside \cmd\showhyphens
%  \item Warning when running in draft mode
%
%\VersionDate{1.6a}{2005/02/02}
%
%\Version{1.6}{2005/01/24}
%  \item New option `\opt{factor}' to influence protrusion resp. expansion of
%        all characters of a font or font set
%        \refsection{\ref{sub:options-protrusion}, \ref{sec:fine-tuning}}
%  \item When \pdftex\ is too old to expand fonts automatically, expansion
%        has to be enabled explicitly, automatic expansion will be disabled
%        \refsection{\ref{sub:options-microtype}}
%^^A  \item Protrusion settings of digits improved
%  \item Use \etex\ extensions, if available
%
%\Version{1.5}{2004/12/15}
%  \item When output mode is <DVI>, font expansion has to be enabled explicitly,
%        automatic expansion will be disabled
%        \refsection{\ref{sub:options-microtype}}
%  \item New option `\opt{selected}' to enable selected expansion,
%        default: |false|
%        \refsection{\ref{sub:options-expansion}, \ref{sub:expansion}}
%  \item New default for expansion option `\opt{step}': 4 (min(\opt{stretch},\opt{shrink})/5)
%        \refsection{\ref{sub:options-expansion}}
%  \item Protrusion settings for Bitstream Charter
%
%\VersionDate{1.4b}{2004/11/26}
%^^A\Version{1.4b}{2004/11/26}
%^^A  \item \cs{UseMicrotypeSet} requires the set to be declared
%^^A        \refsection{\ref{sec:font-sets}}
%
%\VersionDate{1.4a}{2004/11/17}
%
%\Version{1.4}{2004/11/12}
%  \item Set up fonts independently from \LaTeX\ font loading
%^^A        (therefore, no risk of overlooking fonts anymore, and the package may
%^^A        be loaded at any time)
%^^A  \item \cs{microtypesetup} now sets the correct level of protrusion
%^^A        \refsection{\ref{sub:options-cmd}}
%  \item New option: `\opt{final}'
%        \refsection{\ref{sub:options-misc}}
%
%\VersionDate{1.3}{2004/10/27}
%
%\Version{1.2}{2004/10/03}
%  \item New font sets: `|allmath|' and `|basicmath|'
%        \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}}
%  \item Protrusion settings for Computer Modern Roman math symbols
%  \item Protrusion settings for <TS1> encoding completed for Computer Modern
%        Roman and Adobe Garamond
%^^A  \item If an alias font name is specified, it will be used as an alternative,
%^^A        not as a replacement \refsection{\ref{sub:config-file}}
%
%\Version{1.1}{2004/09/21}
%  \item Protrusion settings for Adobe Minion
%  \item New command: \cs{DeclareCharacterInheritance}
%        \refsection{\ref{sub:inherit}}
%  \item Characters may also be specified as octal or hexadecimal numbers
%        \refsection{\ref{sec:fine-tuning}}
%^^A  \item Configuration file names in lowercase [\ref{sub:config-file}]
%
%\Version{1.0}{2004/09/11}
%  \item First <CTAN> release
%\end{History}
%
%
%\def\AppendixSettings{
%  \addtolength\textwidth{50pt}
%  \addtolength{\oddsidemargin}{-50pt}
%  \setlength{\columnwidth}{\textwidth}
%  \setlength{\hsize}{\textwidth}
%  \setlength{\linewidth}{\textwidth}
%  \footnotesize
%}
%
%\def\LPPLSettings{
%\changes{v1.9e}{2006/06/13}{include <LPPL>}
%  \let\LPPLicense\empty
%  \def\endLPPLicense{\endmulticols\endgroup}
%  \def\LPPLsection##1{\begin{multicols}{2}[\section{##1}][12\baselineskip]}
%  \def\LPPLsubsection##1{\end{multicols}\begin{multicols}{2}[\subsection*{##1}][6\baselineskip]}
%  \def\LPPLsubsubsection{\subsubsection*}
%  \let\LPPLparagraph\textit
%  \let\LPPLfile\file
%  \def\textsc##1{\acronym{\MakeUppercase{##1}}}
%  \lstset{gobble=2,basicstyle=\MacroFont\tiny,commentstyle=,aboveskip=\smallskipamount}
%  \let\oldmakeatletter\makeatletter
%  \long\def\makeatletter##1\makeatother{\let\makeatletter\oldmakeatletter}
%  \MakePercentComment
%}
%
%\StopEventually{
%  \GeneralChanges{Documentation}
%  \ifx\Finale\relax
%    \newpage
%    \appendix
%    \AppendixSettings
%  \fi
%  \PrintIndex
%  \InputIfFileExists{lppl.tex}\LPPLSettings\relax
%}
%
% \GeneralChanges*
%
% ^^A =========================================================================
%
% ^^A Heiko Oberdiek's fix from latexbugs (latex/3540):
%\begingroup
%  \def\x\begingroup#1\@nil{\endgroup
%    \def\DoNotIndex{\begingroup
%      \@tfor\@tempa:=\#\$\&\^\_\|\~\ \<\do{\expandafter\@makeother\@tempa}#1}}
%\expandafter\x\DoNotIndex\@nil
%\def\PercentIndex{}\def\LeftBraceIndex{}\def\RightBraceIndex{}
% ^^A also index new ifs:
%\def\@newif{newif}\newif\if@newif
%\def\macro@finish{\macro@namepart
%  \ifx\macro@namepart\@newif\@tempswatrue\else\@tempswafalse\fi
%  \ifnot@excluded
%    \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}\@tempa
%  \fi
%  \if@newif
%    \edef\@tempa{\noexpand\SpecialMainIndex
%       {\bslash\expandafter\@gobbletwo\macro@namepart true}}\@tempa
%    \edef\@tempa{\noexpand\SpecialMainIndex
%       {\bslash\expandafter\@gobbletwo\macro@namepart false}}\@tempa
%  \fi
%  \if@tempswa\@newiftrue\else\@newiffalse\fi
%}
%
%\DoNotIndex{\!,\",\',\(,\),\*,\+,\,,\-,\.,\/,\:,\;,\<,\=,\>,\?,\[,\\,\],\`,
%  \#,\$,\&,\^,\_,\|,\~,\ ,
%  \advance,\afterassignment,\aftergroup,\begingroup,\bgroup,\catcode,\char,
%  \chardef,\csname,\def,\divide,\edef,\egroup,\else,\endcsname,\endgroup,
%  \endinput,\escapechar,\everypar,\expandafter,\fi,\futurelet,\gdef,\global,
%  \hbadness,\hbox,\hsize,\hskip,\if,\ifcase,\ifcat,\ifdim,\iffalse,\ifhbox,
%  \ifhmode,\ifmmode,\ifnum,\iftrue,\ifx,\immediate,\input,\inputlineno,\jobname,
%  \kern,\lastkern,\lastskip,\let,\lowercase,\maxdimen,\meaning,\multiply,
%  \newlinechar,\noexpand,\number,\or,\parfillskip,\pretolerance,\relax,\setbox,
%  \showboxdepth,\string,\the,\tolerance,\unkern,\unskip,\uppercase,\vbox,\wd,
%  \write,\xdef}
%^^A\DoNotIndex{\font,\fontdimen,\nullfont,\sfcode,\spacefactor,\spaceskip,
%^^A  \xspaceskip}                                                           ^^A tex
%\DoNotIndex{\currentgrouplevel,\currentgrouptype,\detokenize,\dimexpr,
%  \eTeXversion,\ifcsname,\ifdefined,\numexpr}
%^^A\DoNotIndex{\fontcharwd,\iffontchar}                                     ^^A e-tex
%\DoNotIndex{\pdfannot,\pdfescapestring,\pdfmatch,\pdfoutput,\pdfstrcmp,
%  \pdftexrevision,\pdftexversion}
%^^A\DoNotIndex{\(ef,lp,rp,kn(ac,bc),(kn,sh,st)bs)code,\(left,right)marginkern,
%^^A  \tagcode,\letterspacefont,\pdfcopyfont,\pdffontexpand,\pdfnoligatures,
%^^A  \pdfprotrudechars,\pdfadjust(interwordglue,spacing),\pdf(ap,pre)pendkern,
%^^A  \pdftracingfonts}                                                      ^^A pdftex
%\DoNotIndex{\XeTeXversion,\XeTeXrevision,\strcmp}                           ^^A xetex
%^^A\DoNotIndex{\XeTeXcharglyph,\XeTeXfonttype,\XeTeXglyph,\XeTeXglyphindex,
%^^A  \XeTeXglyphname,\XeTeXlastfontchar,\XeTeXprotrudechars}
%\DoNotIndex{\directlua,\luatexversion}                                      ^^A luatex
%^^A\DoNotIndex{\adjustspacing,\copyfont,\expandglyphsinfont,
%^^A  \ignoreligaturesinfont,\outputmode,\protrudechars,\tracingfonts}
%\DoNotIndex{\eplain,\usepkg@pkg}                                            ^^A eplain
%\DoNotIndex{\@backslashchar,\@cclv,\@cclvi,\@classoptionslist,\@currext,
%  \@currname,\@defaultunits,\@empty,\@expandtwoargs,\@firstofone,\@firstoftwo,
%  \@gobble,\@gobbletwo,\@ifclassloaded,\@ifl@t@r,\@ifl@aded,\@ifpackagelater,
%  \@ifpackageloaded,\@ifstar,\@ifundefined,\@let@token,\@m,\@makeother,
%  \@minus,\@nameuse,\@ne,\@nil,\@nnil,\@onelevel@sanitize,\@onlypreamble,
%  \@percentchar,\@pkgextension,\@plus,\@ptionlist,\@removeelement,\@secondoftwo,
%  \@spaces,\@sptoken,\@tempa,\@tempb,\@tempc,\@tempcnta,\@tempcntb,\@tempdima,
%  \@typeset@protect,\@undefined,\@unprocessedoptions,\@unusedoptionlist,
%  \@xobeysp,\check@icr,\color@begingroup,\color@endgroup,\g@addto@macro,
%  \hmode@bgroup,\m@ne,\maybe@ic,\maybe@ic@,\nfss@text,\not@math@alphabet,
%  \on@line,\p@,\set@display@protect,\strip@prefix,\strip@pt,\tw@,\z@,\z@skip,
%  \zap@space,\active,\documentclass,\fmtversion,\leavevmode,\makeatletter,
%  \mbox,\newcommand,\newcount,\newdimen,\newif,\newskip,\newtoks,\nobreak,
%  \nonfrenchspacing,\normalsize,\renewcommand,\space,\AtBeginDocument,
%  \AtEndOfPackage,\CheckCommand,\CurrentOption,\DeclareRobustCommand,\IfFileExists,
%  \InputIfFileExists,\MessageBreak,\PackageError,\PackageInfo,\PackageWarning,
%  \RequirePackage,\@@enc@update,\cf@encoding,\f@encoding}
%^^A\DoNotIndex{\add@accent,\curr@fontshape,\define@newfont,\do@subst@correction,
%^^A  \every@math@size,\f@size,\font@name,\glb@currsize,\glb@settings,\normalfont,
%^^A  \pickup@font,\remove@tlig,\selectfont,\set@fontsize,\showhyphens}      ^^A latex
%\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision}    ^^A tex live 2004
%\DoNotIndex{\foreign@language,\languagename,\select@language,\shorthandoff} ^^A babel
%\DoNotIndex{\percentsign}                                                   ^^A babel/spanish,galician,mexican
%\DoNotIndex{\CJK@ifundefined,\CJK@plane,\CJK@temp,\CJK@addcmap}             ^^A CJK,CJKutf8
%\DoNotIndex{\@disablequotes}                                                ^^A csquotes
%\DoNotIndex{\pdfstringdefDisableCommands,\pdfstringdefWarn}                 ^^A hyperref
%\DoNotIndex{\ifpdf}                                                         ^^A ifpdf
%\DoNotIndex{\@inpenc@undefined@,\IeC,\inputencoding,\inputencodingname}     ^^A inputenc
%\DoNotIndex{\UTFviii@defined}                                               ^^A inputenc/utf8
%\DoNotIndex{\PrerenderUnicode,\unicode@charfilter}                          ^^A inputenc/utf8x
%\DoNotIndex{\define@key,\KV@@sp@def,\setkeys}                               ^^A keyval
%\DoNotIndex{\l@dunhbox@line}                                                ^^A ((r)e)ledmac,((r)e)ledpar
%\DoNotIndex{\lst@ProcessLetter}                                             ^^A listings
%\DoNotIndex{\RequireLuaModule}                                              ^^A luatexbase
%\DoNotIndex{\pdf@escapestring}                                              ^^A pdftexcmds
%\DoNotIndex{\py@macron}                                                     ^^A pinyin
%\DoNotIndex{\SOUL@,\SOUL@doword,\soulregister}                              ^^A soul
%\DoNotIndex{\tikz@expandcount}                                              ^^A tikz
%\DoNotIndex{\conditionally@traceoff}                                        ^^A trace
%\DoNotIndex{\@xspace,\@xspace@firsttrue}                                    ^^A xspace
%\DoNotIndex{\x,\MT@dinfo,\MT@dinfo@nl,\tracingmicrotype,\tracingmicrotypeinpdf,
%  \ifMT@inannot,\MT@inannottrue,\MT@inannotfalse,\MT@addto@annot,\MT@pdf@annot,
%  \MT@show@pdfannot,\iftracingmicrotypeinpdfall,\tracingmicrotypeinpdfalltrue,
%  \tracingmicrotypeinpdfallfalse,\DeclareMicroTypeSet,\DeclareMicroTypeAlias,
%  \UseMicroTypeSet,\LoadMicroTypeFile,\MicroType@Hook}                      ^^A microtype
%
% ^^A -------------------------------------------------------------------------
%
%\newpage
%\ImplementationSettings
%\ifpdf\hypersetup{bookmarksopen=false}\fi
%
%\section{Implementation}
%
% The \pkg{docstrip} modules in this file are:
% \begin{description}
%  \item[|driver|]  The documentation driver, only visible in the \file{dtx} file.
%  \item[|package|] The code for the \microtype\ package (\file{microtype.sty}).
%  \item[|pdftex-def|] Definitions specific to \pdftex\ (\file{microtype-pdftex.def}).
%  \item[|xetex-def|] Definitions specific to \xetex\ (\file{microtype-xetex.def}).
%  \item[|luatex-def|] Definitions specific to \luatex\ (\file{microtype-luatex.def}).
%  \item[|letterspace|] The code for the \letterspace\ package (\file{letterspace.sty}).
%   \begin{description}
%    \item[|plain|]  Code for \pkg{eplain}, \pkg{miniltx} (\letterspace\ only).
%   \end{description}
%  \item[|debug|]  Code for additional output in the log file.
%                 \\Used for -- surprise! -- debugging purposes.
%  \item[|luafile|] Lua functions (\file{microtype.lua}).
%  \item[|config|]  Surrounds all configuration modules.
%   \begin{description}
%    \item[|cfg-t|]  Surrounds (Latin) text configurations.
%     \begin{description}
%      \item[|m-t|]   The main configuration file (\file{microtype.cfg}).
%      \item[|bch|]   Settings for Bitstream Charter (\file{mt-bch.cfg}).
%      \item[|blg|]   Settings for Bitstream Letter Gothic (\file{mt-blg.cfg}).
%      \item[|cmr|]   Settings for Computer Modern Roman (\file{mt-cmr.cfg}).
%      \item[|pad|]   Settings for Adobe Garamond (\file{mt-pad.cfg}).
%      \item[|ppl|]   Settings for Palatino (\file{mt-ppl.cfg}).
%      \item[|ptm|]   Settings for Times (\file{mt-ptm.cfg}).
%      \item[|pmn|]   Settings for Adobe Minion (\file{mt-pmn.cfg}).
%                    \\Contributed by \contributor Harald Harders <h.harders\at tu-bs.de>.
%      \item[|ugm|]   Settings for <URW> Garamond (\file{mt-ugm.cfg}).
%     \end{description}
%    \item[|cfg-u|]  Surrounds non-text configurations (<U> encoding).
%     \begin{description}
%      \item[|msa|]   Settings for <AMS> `a' symbol font (\file{mt-msa.cfg}).
%      \item[|msb|]   Settings for <AMS> `b' symbol font (\file{mt-msb.cfg}).
%      \item[|euf|]   Settings for Euler Fraktur font (\file{mt-euf.cfg}).
%      \item[|eur|]   Settings for Euler Roman font (\file{mt-eur.cfg}).
%      \item[|eus|]   Settings for Euler Script font (\file{mt-eus.cfg}).
%     \end{description}
%    \item[|cfg-e|]  Surrounds Euro symbol configurations.
%     \begin{description}
%      \item[|zpeu|]  Settings for Adobe Euro symbol fonts (\file{mt-zpeu.cfg}).
%      \item[|euroitc|] Settings for <ITC> Euro symbol fonts (\file{mt-euroitc.cfg}).
%      \item[|mvs|]   Settings for \pkg{marvosym} Euro symbol (\file{mt-mvs.cfg}).
%     \end{description}
%   \end{description}
%  \item[|test|]    A helper file that may be used to create and test
%                    protrusion settings\\(\file{test-microtype.tex}).
% \end{description}
% And now for something completely different.
%
%    \begin{macrocode}
%<*package|letterspace>
%    \end{macrocode}
%
%\subsection{Preliminaries}
%
%\begin{macro}{\MT@MT}
% This is us.
%    \begin{macrocode}
\def\MT@MT
%<package>  {microtype}
%<letterspace>  {letterspace}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@fix@catcode}
%\changes{v1.3}{2004/10/27}{check some category codes (compatibility with \pkg{german})}
%\changes{v1.5}{2004/12/03}{reset catcode of `\texttt{\^}' (compatibility with \pkg{chemsym})}
%\changes{v2.3a}{2007/12/29}{fix catcodes earlier, and also for the \letterspace\ package}
% We have to make sure that the category codes of some characters are correct
% (the \pkg{german} package, for instance, makes |"| active). Probably overly
% cautious. Ceterum censeo: it should be forbidden for packages to change
% catcodes within the preamble.
%\begin{macro}{\MT@restore@catcodes}
% Polite as we are, we'll restore them afterwards.
%    \begin{macrocode}
\let\MT@restore@catcodes\@empty
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\def\MT@fix@catcode#1#2{%
  \edef\MT@restore@catcodes{%
    \MT@restore@catcodes
    \catcode#1=\the\catcode#1\relax
  }%
  \catcode#1=#2\relax
}
\MT@fix@catcode{17}{14}% ^^Q (comment)
\MT@fix@catcode{24} {9}% ^^X (ignore)
%<package>\MT@fix@catcode{33}{12}% !
%<package>\MT@fix@catcode{34}{12}% "
\MT@fix@catcode{36} {3}% $ (math shift)
\MT@fix@catcode{39}{12}% '
\MT@fix@catcode{42}{12}% *
\MT@fix@catcode{43}{12}% +
\MT@fix@catcode{44}{12}% ,
\MT@fix@catcode{45}{12}% -
\MT@fix@catcode{58}{12}% :
\MT@fix@catcode{60}{12}% <
\MT@fix@catcode{61}{12}% =
\MT@fix@catcode{62}{12}% >
%<package>\MT@fix@catcode{63}{12}% ?
\MT@fix@catcode{94} {7}% ^ (superscript)
\MT@fix@catcode{96}{12}% `
%<package>\MT@fix@catcode{124}{12}% |
%    \end{macrocode}
%\end{macro}
% These are all commands for the outside world. We define them here as blank
% commands, so that they won't generate an error if we are not running \pdftex.
%    \begin{macrocode}
%<*package>
\newcommand*\DeclareMicrotypeSet[3][]{}
\newcommand*\UseMicrotypeSet[2][]{}
\newcommand*\DeclareMicrotypeSetDefault[2][]{}
\newcommand*\SetProtrusion[3][]{}
\newcommand*\SetExpansion[3][]{}
\newcommand*\SetTracking[3][]{}
\newcommand*\SetExtraKerning[3][]{}
\newcommand*\SetExtraSpacing[3][]{}
\newcommand*\DisableLigatures[2][]{}
\newcommand*\DeclareCharacterInheritance[3][]{}
\newcommand*\DeclareMicrotypeVariants[1]{}
\newcommand*\DeclareMicrotypeAlias[2]{}
\newcommand*\LoadMicrotypeFile[1]{}
\newcommand*\DeclareMicrotypeBabelHook[2]{}
\newcommand*\microtypesetup[1]{}
\newcommand*\microtypecontext[1]{}
\newcommand*\textmicrotypecontext[2]{#2}
\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{%
%</package>
\newcommand*\lsstyle{}
\newcommand\textls[2][]{}
\def\textls#1#{}
\newcommand*\lslig[1]{#1}
%<*package>
}
%    \end{macrocode}
% These commands also have a starred version.
%    \begin{macrocode}
\def\DeclareMicrotypeSet#1#{\@gobbletwo}
\def\DeclareMicrotypeVariants#1#{\@gobble}
%    \end{macrocode}
% Set declarations are only allowed in the preamble (resp. the main
% configuration file). The configuration commands, on the other hand, must be
% allowed in the document, too, since they may be called inside font
% configuration files, which, in principle, may be loaded at any time.
%    \begin{macrocode}
\@onlypreamble\DeclareMicrotypeSet
\@onlypreamble\UseMicrotypeSet
\@onlypreamble\DeclareMicrotypeSetDefault
\@onlypreamble\DisableLigatures
\@onlypreamble\DeclareMicrotypeVariants
\@onlypreamble\DeclareMicrotypeBabelHook
%    \end{macrocode}
% Don't load \letterspace.
%    \begin{macrocode}
\expandafter\let\csname ver@letterspace.sty\endcsname\@empty
%    \end{macrocode}
%\begin{macro}{\MT@old@cmd}
% The old command names had one more hunch.
%\changes{v1.8}{2005/04/28}{renamed commands from \cs{..MicroType..} to \cs{..Microtype..}}
%    \begin{macrocode}
\def\MT@old@cmd#1#2{%
  \newcommand*#1{\MT@warning{%
    \string#1 is deprecated. Please use\MessageBreak
    \string#2 instead}%
    \let #1#2#2}}
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\MT@old@cmd\DeclareMicroTypeAlias\DeclareMicrotypeAlias
\MT@old@cmd\DeclareMicroTypeSet  \DeclareMicrotypeSet
\MT@old@cmd\UseMicroTypeSet      \UseMicrotypeSet
\MT@old@cmd\LoadMicroTypeFile    \LoadMicrotypeFile
%</package>
%    \end{macrocode}
%\begin{macro}{\MT@warning}
%\begin{macro}{\MT@warning@nl}
%\begin{macro}{\MT@info}
%\begin{macro}{\MT@info@nl}
%\begin{macro}{\MT@vinfo}
%\changes{v1.6}{2005/01/06}{new macro instead of \cs{ifMT@verbose}}
%\begin{macro}{\MT@error}
%\begin{macro}{\MT@warn@err}
%\changes{v1.7}{2005/03/16}{new macro: for \opt{verbose}\texttt{\quotechar=errors}}
% Communicate.
%    \begin{macrocode}
\def\MT@warning{\PackageWarning\MT@MT}
\def\MT@warning@nl#1{\MT@warning{#1\@gobble}}
%<*package>
\def\MT@info{\PackageInfo\MT@MT}
\def\MT@info@nl#1{\MT@info{#1\@gobble}}
\let\MT@vinfo\@gobble
\def\MT@error{\PackageError\MT@MT}
\def\MT@warn@err#1{\MT@error{#1}{%
  This error message appears because you loaded the `\MT@MT'\MessageBreak
  package with the option `verbose=errors'. Consult the documentation\MessageBreak
  in \MT@MT.pdf to find out what went wrong.}}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\subsubsection{Debugging}
%
%\begin{macro}{\tracingmicrotype}
%\begin{macro}{\MT@dinfo}
%\begin{macro}{\MT@dinfo@nl}
% Cases for \cs{tracingmicrotype}:
%\begin{enum}
%  \item almost none
%  \item + sets \& lists
%  \item + heirs
%  \item + slots
%  \item + factors
%\end{enum}
%    \begin{macrocode}
%<*debug>
\MT@warning@nl{This is the debug version}
\newcount\tracingmicrotype
\tracingmicrotype=2
\def\MT@info#1{\PackageInfo\MT@MT{#1}\MT@addto@annot{#1}}
\def\MT@info@nl#1{\PackageInfo\MT@MT{#1\@gobble}\MT@addto@annot{#1}}
\let\MT@vinfo\MT@info@nl
\def\MT@warning#1{\PackageWarning\MT@MT{#1}\MT@addto@annot{Warning: #1}}
\def\MT@warning@nl#1{\PackageWarning\MT@MT{#1\@gobble}\MT@addto@annot{Warning: #1}}
\def\MT@dinfo#1#2{\ifnum\tracingmicrotype<#1 \else\MT@info{#2}\fi}
\def\MT@dinfo@nl#1#2{\ifnum\tracingmicrotype<#1 \else\MT@info@nl{#2}\fi}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\tracingmicrotypeinpdf}
%\changes{v2.0}{2006/09/21}{new debug method: mark all fonts with <PDF> annotations}
% Another debug method: font switches can be marked in the <PDF> file with a
% small caret, an accompanying popup text box displaying all debug messages.
%
% Cases for \cs{tracingmicrotypeinpdf}:
%\begin{enum}[1]
%  \item show new fonts
%  \item + show known fonts
%\end{enum}
%    \begin{macrocode}
\newcount\tracingmicrotypeinpdf
%    \end{macrocode}
%\end{macro}
%\ifpdf\ifx\tracingmicrotypeinpdf\undefined
% \fallbacktext{If \file{microtype.sty} had been generated with the `|debug|'
%   option,\\this method would be demonstrated here.}
%\else
% Let's see how it works~\dots\ (if you don't see anything special on this page,
% your <PDF> viewer doesn't support annotations).
%\begin{verbatim}
%\tracingmicrotypeinpdf=2
%\end{verbatim}
%\tracingmicrotypeinpdf=2
%\fi\fi
%\begin{macro}{\MT@pdf@annot}
%\begin{macro}{\MT@addto@annot}
%\begin{macro}{\ifMT@inannot}
% During font setup, we save the text for the popup in \cs{MT@pdf@annot}.
% (This requires \pdftex\ $\geq$~1.30.)
% The \pkg{pdftexcmds} package provides \pdftex's utility commands in \luatex, too.
%\changes{v2.3d}{2009/02/27}{use \pkg{pdftexcmds} for debugging}
%    \begin{macrocode}
\RequirePackage{pdftexcmds}
\newif\ifMT@inannot \MT@inannottrue
\let\MT@pdf@annot\@empty
\def\MT@addto@annot#1{\ifnum\tracingmicrotypeinpdf>\z@ \ifMT@inannot
  {\def\MessageBreak{^^J\@spaces}%
   \MT@xadd\MT@pdf@annot{\pdf@escapestring{#1^^J}}}\fi\fi}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\iftracingmicrotypeinpdfall}
% With \cs{tracingmicrotypeinpdfallfalse}, the <PDF> output is (hopefully)
% identical, but some font switches will not be displayed; otherwise the output
% is affected, but \emph{all} font switches are visible. In the latter case, we
% also insert a small kern so that multiple font switches are discernable.
%    \begin{macrocode}
\newif\iftracingmicrotypeinpdfall
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@show@pdfannot}
% A red caret is shown for fonts which are actually set up by
% {\ifpdf\ifx\tracingmicrotypeinpdf\undefined\else\fontfamily{pzc}\itshape\fi\fi
%  Microtype},
% a green one marks fonts that we have already seen. The |/Caret| annotation
% requires a viewer for <PDF> version 1.5 (you could use |/Text| if you're
% using an older <PDF> viewer).
%    \begin{macrocode}
\def\MT@show@pdfannot#1{%
  \ifnum\tracingmicrotypeinpdf<#1 \else
    \iftracingmicrotypeinpdfall\leavevmode\fi
    \pdfannot height 4pt width 4pt depth 2pt {%
      /Subtype/Caret
      /T(\expandafter\string\font@name)
      \ifcase#1\or
      /Subj(New font)/C[1 0 0]
      \else
      /Subj(Known font)/C[0 1 0]
      \fi
      /Contents(\MT@pdf@annot)
    }%
    \iftracingmicrotypeinpdfall\kern1pt \fi
    \global\MT@inannotfalse
  \fi
}
%</debug>
%</package>
%    \end{macrocode}
%\end{macro}
%\ifpdf\ifx\tracingmicrotypeinpdf\undefined\else
% \tracingmicrotypeinpdf0
% \tracingmicrotype0
%\fi\fi
%
%\subsubsection{Requirements}
%
%\begin{macro}{\MT@plain}
% The \letterspace\ package works with:
%\begin{enum}
%\changes{v2.3}{2007/11/07}{\letterspace: support for \pkg{eplain}/\pkg{miniltx}}
%  \item \pkg{miniltx}
%  \item \pkg{eplain} ^^A tested with eplain v3.1, 2006/12/03; v3.2, 2007/11/26; v3.3, 2009/07/21
%  \item \LaTeX
%\end{enum}
% For plain usage, we have to copy some commands from \file{latex.ltx}.
%    \begin{macrocode}
%<*plain>
\def\MT@plain{2}
\ifx\documentclass\@undefined
  \def\MT@plain{1}
  \def\hmode@bgroup{\leavevmode\bgroup}
  \def\nfss@text#1{{\mbox{#1}}}
  \let\@typeset@protect\relax
  \ifx\eplain\@undefined
    \def\MT@plain{0}
    \def\PackageWarning#1#2{%
      \begingroup
        \newlinechar=10 %
        \def\MessageBreak{^^J(#1)\@spaces\@spaces\@spaces\@spaces}%
        \immediate\write16{^^JPackage #1 Warning: #2\on@line.^^J}%
      \endgroup
    }
    \def\on@line{ on input line \the\inputlineno}
    \def\@spaces{\space\space\space\space}
  \fi
\fi
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@requires@latex}
%\changes{v2.3b}{2008/05/26}{new macro}
% Better use groups than plain ifs.
%    \begin{macrocode}
\def\MT@requires@latex#1{%
  \ifnum\MT@plain<#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi
}
%</plain>
%    \end{macrocode}
%\end{macro}
%\changes{v2.2}{2007/05/01}{use catcode trickery for \etex\ test}
%^^A\changes{v2.3a}{2007/12/29}{removed} ^^A \MT@maybe@etex
%\changes{v2.8}{2020/05/26}{\letterspace\ works with \etex\ only}
% For definitions that depend on \etex\ features.
%    \begin{macrocode}
\ifcase 0%
  \ifx\eTeXversion\@undefined 1\else
    \ifx\eTeXversion\relax    1\else
      \ifcase\eTeXversion     1\fi
    \fi
  \fi
\else
  \catcode`\^^Q=9 \catcode`\^^X=14
\fi
%<letterspace>^^Q\MT@warning@nl{This package requires the etex extensions.
%<letterspace>^^Q               \MessageBreak Exiting}\MT@restore@catcodes\endinput
%<debug>\MT@dinfo@nl{0}{this is
%<debug>^^Q not
%<debug>  etex}
%    \end{macrocode}
%\changes{v2.5}{2010/05/05}{new files: \file{microtype-pdftex.def}, \file{microtype-xetex.def}, \file{microtype-luatex.def},
%                           containing engine-specific definitions}
% We check whether we are running \pdftex, \xetex, or \luatex, and
% load the appropriate definition file.
%\begin{macro}{\MT@clear@options}
% If we are using neither of these engines, we disable everything and exit.
%    \begin{macrocode}
\def\MT@clear@options{%
%<plain>  \MT@requires@latex1{%
  \AtEndOfPackage{\let\@unprocessedoptions\relax\MT@restore@catcodes}%
  \let\CurrentOption\@empty
%<package>  \let\MT@endinput\endinput
%<plain>  }\relax
}
%    \end{macrocode}
%\end{macro}
%\changes{v1.9}{2005/08/29}{compatibility with \texlive\ hack
%               (reported by \contributor Herbert Vo\ss{} <Herbert.Voss\at gmx.net>)}
%                                      ^^A MID: <deprh8$c69$00$1@news.t-online.com>
% A hack circumventing the \texlive\ 2004 hack which undefines the \pdftex\
% primitives in the format in order to hide the fact that \pdftex\ is being run
% from the user. This has been \emph{fixed} in \texlive\ 2005.
%    \begin{macrocode}
\ifx\normalpdftexversion\@undefined \else
  \let\pdftexversion \normalpdftexversion
  \let\pdftexrevision\normalpdftexrevision
  \let\pdfoutput     \normalpdfoutput
\fi
%    \end{macrocode}
%\begin{macro}{\MT@engine}
%\changes{v2.6}{2016/03/25}{fix test with \luatex\ 0.85}
%\begin{macro}{\MT@engine@tooold}
% Old packages might have let \cmd\pdftexversion\ to \cmd\relax.
%    \begin{macrocode}
\let\MT@engine\relax
%<letterspace>\def\MT@engine@tooold{0}
\ifx\pdftexversion\@undefined \else
  \ifx\pdftexversion\relax \else
    \def\MT@engine{pdf}
%<letterspace>    \let\MT@pdf@or@lua\@firstoftwo
%<letterspace>    \ifnum\pdftexversion > 139 \def\MT@engine@tooold{1}\fi
  \fi
\fi
\ifx\directlua\@undefined \else
  \ifx\directlua\relax \else
    \def\MT@engine{lua}
%    \end{macrocode}
% Since approx. \luatex\ 0.80, \cmd\pdftexversion\ is let to \cmd\luatexversion,
% so that we would be fooled to think that \pdftex\ is too old.
%    \begin{macrocode}
%<*letterspace>
    \let\MT@pdf@or@lua\@secondoftwo
    \ifnum\luatexversion < 62 \def\MT@engine@tooold{0}
    \else
      \def\MT@engine@tooold{1}
      \let\MT@lua\directlua
      \ifnum\luatexversion > 84
        \let\pdfoutput\outputmode
        \let\pdfprotrudechars\protrudechars
        \let\pdfadjustspacing\adjustspacing
      \fi
    \fi
%</letterspace>
  \fi
\fi
%<*package>
\ifx\MT@engine\relax
  \ifx\XeTeXversion\@undefined \else
    \ifx\XeTeXversion\relax \else
      \def\MT@engine{xe}
    \fi
  \fi
\fi
%</package>
%</package|letterspace>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@pdftex@no}
%\changes{v1.6a}{2005/02/02}{new macro}
% \pdftex's features for which we provide an interface here haven't always been
% available, and some specifics have changed over time. Therefore, we have to
% test which \pdftex\ we're using, if any. \cs{MT@pdftex@no} will be used
% throughout the package to respectively do the right thing.
%
% Currently, we have to distinguish seven cases for \pdftex:
%\begin{enum}
%  \item not running \pdftex
%  \item \pdftex\ ($\less$~0.14f)
%  \item + micro-typographic extensions (0.14f,g)
%  \item + protrusion relative to \EM{1} ($\geq$~0.14h)
%  \item + automatic font expansion;
%          protrusion no longer has to be set up first;
%          scale factor fixed to 1000;
%          default \cmd\efcode\,=\,1000 ($\geq$~1.20)
%\changes{v1.8}{2005/04/15}{case 5: \pdftex\ 1.30}
%  \item + \cmd{\(left,right)marginkern};
%          \cmd\pdfnoligatures;
%          \cmd\pdfstrcmp;
%          \cmd\pdfescapestring\ ($\geq$~1.30)
%\changes{v2.0}{2005/08/20}{case 6: \pdftex\ 1.40} ^^A (beta:1)
%  \item + adjustment of interword spacing;
%          extra kerning;
%          \cmd\letterspacefont;
%          \cmd\pdfmatch\footnote{This command was actually introduced
%           in 1.30, but failed on strings longer than 1023 bytes.};
%          \cmd\pdftracingfonts;
%          always \etex\
%          ($\geq$~1.40)
%\changes{v2.2}{2007/02/23}{case 7: \pdftex\ 1.40.4}
%  \item + \cmd\letterspacefont\ doesn't disable ligatures and kerns;
%          \cmd\pdfcopyfont\
%          ($\geq$~1.40.4)
%\end{enum}
%\changes{v1.1}{2004/09/13}{fix: version check
%               (reported by \contributor Harald Harders <h.harders\at tu-bs.de>)}
%                                                   ^^A private mail, 2004/09/13
%    \begin{macrocode}
%<*pdftex-def>
%<debug>\MT@dinfo@nl{0}{this is pdftex \the\pdftexversion(\pdftexrevision)}
\def\MT@pdftex@no{7}
\ifnum\pdftexversion = 140
  \ifnum\pdftexrevision < 4
    \def\MT@pdftex@no{6}
  \fi
\else
  \ifnum\pdftexversion < 140
    \def\MT@pdftex@no{5}
    \ifnum\pdftexversion < 130
      \def\MT@pdftex@no{4}
      \ifnum\pdftexversion < 120
        \def\MT@pdftex@no{3}
        \ifnum\pdftexversion = 14
          \ifnum \expandafter`\pdftexrevision < `h
            \def\MT@pdftex@no{2}
            \ifnum \expandafter`\pdftexrevision < `f
              \def\MT@pdftex@no{1}
            \fi
          \fi
        \else
          \ifnum\pdftexversion < 14
            \def\MT@pdftex@no{1}
          \fi
        \fi
      \fi
    \fi
  \fi
\fi
%<debug>\MT@dinfo@nl{0}{pdftex no.: \MT@pdftex@no}
%</pdftex-def>
%    \end{macrocode}
%\end{macro}
%\changes{v2.5}{2010/05/05}{protrusion with \xetex}
%\begin{macro}{\MT@xetex@no}
% \xetex\ supports character protrusion since version 0.9997.
%    \begin{macrocode}
%<*xetex-def>
%<debug>\MT@dinfo@nl{0}{this is xetex (\the\XeTeXversion\XeTeXrevision)}
\ifdim 0\XeTeXrevision pt < 0.9997pt
  \def\MT@xetex@no{1}
\else
  \def\MT@xetex@no{2}
\fi
%<debug>\MT@dinfo@nl{0}{xetex no.: \MT@xetex@no}
%</xetex-def>
%    \end{macrocode}
%\end{macro}
%\changes{v2.3c}{2008/09/09}{\luatex\ supported by default}
%\begin{macro}{\MT@luatex@no}
% Cases for \luatex\
% (\cmd\luatexversion\ ought to have been enabled by the format):
%\begin{enum}
% \item N/A
% \item \luatex\ ($\less$~0.36)
% \item + \cmd\directlua\ without state number ($\geq$~0.36)
% \item + \cmd\letterspacefont; non-automatic expansion doesn't work anymore,
%         and automatic expansion in <DVI> mode is realised by modifying the tracking,
%         not the glyphs\footnote{This may have been changed earlier, but I'm no longer able
%               to find out when (the last version that actually works for me is 0.40).}
%         ($\geq$~0.62)
% \item + almost all of the \pdftex\ primitives have been renamed ($\geq$~0.85)
% \item + default \cmd\efcode\,=\,1000;
%         \cmd\protrusionboundary\ [not yet supported] ($\geq$~0.90)
%\todo{interface for \cmd\protrusionboundary}
%\end{enum}
%\changes{v2.6}{2016/04/22}{update for \luatex\ 0.85 (renamed primitives)}
% Also, sometime between 1.0.4 and 1.0.7, the function |font.setexpansion|
% has been introduced, but we'll test this directly later.
%    \begin{macrocode}
%<*luatex-def>
%<debug>\MT@dinfo@nl0{this is luatex (\the\luatexversion)}
%    \end{macrocode}
%\begin{macro}{\MT@lua}
% Communicate with |lua|.
%\changes{v2.2}{2007/05/10}{(basic) support for \luatex}
% Beginning with \luatex\ 0.36, \cmd\directlua\ no longer requires a state
% number.
%\changes{v2.3d}{2009/03/25}{update for \luatex\ 0.36}
%    \begin{macrocode}
\let\MT@lua\directlua
\def\MT@luatex@no{5}
\ifnum\luatexversion<90
  \def\MT@luatex@no{4}
  \ifnum\luatexversion<85
    \def\MT@luatex@no{3}
    \ifnum\luatexversion<62
      \def\MT@luatex@no{2}
      \ifnum\luatexversion<36
        \def\MT@lua{\directlua0}
        \def\MT@luatex@no{1}
      \fi
    \fi
  \fi
\fi
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
%<debug>\MT@dinfo@nl{0}{luatex no.: \MT@luatex@no}
%</luatex-def>
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
%<*pdftex-def|xetex-def|letterspace>
\ifnum
%<pdftex-def|xetex-def>  \csname MT@\MT@engine tex@no\endcsname < 2
%<letterspace>  \MT@engine@tooold=\z@
  \MT@warning@nl{You
%<*letterspace>
    \ifx\MT@engine\relax
      don't seem to be using pdftex or luatex.\MessageBreak
      Try running `pdftex' or `luatex' instead of\MessageBreak
        `\ifx\XeTeXversion\@undefined\else xe\fi tex'%
    \else
%</letterspace>
      are using a \MT@engine tex version older than
%<pdftex-def>      0.14f%
%<xetex-def>      0.9997%
%<letterspace>        \MT@pdf@or@lua{1.40}{0.62}%
      .\MessageBreak
      `\MT@MT' does not work with this version.\MessageBreak
      Please install a newer version of \MT@engine tex%
%<letterspace>    \fi
      .\MessageBreak I will quit now}
  \MT@clear@options
\endinput\fi
%</pdftex-def|xetex-def|letterspace>
%    \end{macrocode}
% Still there? Then we can begin:
% We need the \pkg{keyval} package, including the `new' \cmd\KV@@sp@def\
% implementation.
%\changes{v2.1}{2007/01/15}{fix: \letterspace\ package forgot to load \pkg{keyval}}
%    \begin{macrocode}
%<*package|letterspace>
\RequirePackage{keyval}[1997/11/10]
%<*package>
%    \end{macrocode}
%\begin{macro}{\MT@toks}
% We need a token register.
%\changes{v1.9}{2005/09/28}{use instead of \cmd\toks@}
%    \begin{macrocode}
\newtoks\MT@toks
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\ifMT@if@}
% A scratch if.
%    \begin{macrocode}
\newif\ifMT@if@
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Declarations}
%
%\begin{macro}{\ifMT@protrusion}
%\begin{macro}{\ifMT@expansion}
%\begin{macro}{\ifMT@auto}
%\begin{macro}{\ifMT@selected}
%\begin{macro}{\ifMT@noligatures}
%\begin{macro}{\ifMT@draft}
%\begin{macro}{\ifMT@spacing}
%\begin{macro}{\ifMT@kerning}
%\begin{macro}{\ifMT@tracking}
%\begin{macro}{\ifMT@babel}
% These are the global switches~\dots
%    \begin{macrocode}
\newif\ifMT@protrusion
\newif\ifMT@expansion
\newif\ifMT@auto
\newif\ifMT@selected
\newif\ifMT@noligatures
\newif\ifMT@draft
\newif\ifMT@spacing
\newif\ifMT@kerning
\newif\ifMT@tracking
\newif\ifMT@babel
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
% [This line intentionally left blank.]
%\begin{macro}{\MT@pr@level}
%\begin{macro}{\MT@ex@level}
%\begin{macro}{\MT@pr@factor}
%\begin{macro}{\MT@ex@factor}
%\begin{macro}{\MT@sp@factor}
%\begin{macro}{\MT@kn@factor}
% \dots~and numbers.
%    \begin{macrocode}
\let\MT@pr@level\tw@
\let\MT@ex@level\tw@
\let\MT@pr@factor\@m
\let\MT@ex@factor\@m
\let\MT@sp@factor\@m
\let\MT@kn@factor\@m
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@pr@unit}
%\begin{macro}{\MT@sp@unit}
%\begin{macro}{\MT@kn@unit}
% Default unit for protrusion settings is character width, for spacing
% |space|, for kerning (and tracking) \EM{1}.
%    \begin{macrocode}
\let\MT@pr@unit\@empty
\let\MT@sp@unit\m@ne
\def\MT@kn@unit{1em}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@stretch}
%\begin{macro}{\MT@shrink}
%\begin{macro}{\MT@step}
% Expansion settings.
%    \begin{macrocode}
\let\MT@stretch\m@ne
\let\MT@shrink \m@ne
\let\MT@step   \m@ne
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@pr@min}
%\begin{macro}{\MT@pr@max}
%\begin{macro}{\MT@ex@min}
%\begin{macro}{\MT@ex@max}
%\begin{macro}{\MT@sp@min}
%\begin{macro}{\MT@sp@max}
%\begin{macro}{\MT@kn@min}
%\begin{macro}{\MT@kn@max}
%\begin{macro}{\MT@tr@min}
%\begin{macro}{\MT@tr@max}
% Minimum and maximum values allowed by \pdftex.
%    \begin{macrocode}
\def\MT@pr@min{-\@m}
\let\MT@pr@max\@m
\let\MT@ex@min\z@
\let\MT@ex@max\@m
\def\MT@sp@min{-\@m}
\let\MT@sp@max\@m
\def\MT@kn@min{-\@m}
\let\MT@kn@max\@m
%</package>
\def\MT@tr@min{-\@m}
\let\MT@tr@max\@m
%<*package>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@factor@default}
% Default factor.
%    \begin{macrocode}
\def\MT@factor@default{1000 }
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@stretch@default}
%\begin{macro}{\MT@shrink@default}
% Default values for expansion.
%    \begin{macrocode}
\def\MT@stretch@default{20 }
\def\MT@shrink@default{20 }
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@letterspace}
%\begin{macro}{\MT@letterspace@default}
% Default value for letterspacing (in thousandths of \EM{1}).
%    \begin{macrocode}
%</package>
\let\MT@letterspace\m@ne
\def\MT@letterspace@default{100}
%<*package>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifMT@document}
% Our private test whether we're still in the preamble.
%    \begin{macrocode}
\newif\ifMT@document
%</package>
%</package|letterspace>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Auxiliary macros}
%
%\begin{macro}{\MT@requires@pdftex}
%\begin{macro}{\MT@requires@luatex}
% For definitions that depend on a particular \pdftex\ resp. \luatex\ version.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def
%<pdftex-def>  \MT@requires@pdftex%
%<luatex-def>  \MT@requires@luatex%
  #1{\ifnum
%<pdftex-def>  \MT@pdftex@no
%<luatex-def>  \MT@luatex@no
    <#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}
%<luatex-def&debug>\MT@requires@luatex4{\MT@lua{tex.enableprimitives('pdf',{'tracingfonts'})}}\relax
%<pdftex-def&debug>\MT@requires@pdftex6{
%<debug>\pdftracingfonts=1
%<pdftex-def&debug>}\relax
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
% Some functions are loaded from a dedicated |lua| file. This avoids character
% escaping problems and incompatibilities between versions of \luatex.
%\changes{v2.5a}{2013/04/19}{use \pkg{luatexbase} instead of \pkg{luatextra}
%                            (contributed by \contributor \'Elie Roux <elie.roux\at telecom-bretagne.eu>)}
%                            ^^A MID: <516AAF6B.8040605@telecom-bretagne.eu>
% Unless running a recent \LaTeX,
%\changes{v2.7}{2017/02/08}{drop \pkg{luatexbase} with recent \LaTeX}
% we load the \pkg{luatexbase} package.
%    \begin{macrocode}
%<*luatex-def>
\@ifl@t@r\fmtversion{2016/01/01}\relax{\RequirePackage{luatexbase}}
%    \end{macrocode}
% We load \pkg{luaotfload}, because some of its functions are
% required in \file{microtype.lua}. This eliminates the need for the user to
% load \pkg{fontspec} before \microtype.
% There will hardly be any \luatex\ documents that don't load this package, anyway.
%\changes{v2.6}{2013/06/19}{load \pkg{luaotfload} with \luatex}
% Since 2017/01/01, it is already loaded in the format.
%    \begin{macrocode}
\@ifl@t@r\fmtversion{2017/01/01}\relax{\RequirePackage{luaotfload}}
\MT@lua{require("microtype")}
%</luatex-def>
%    \end{macrocode}
% Here it begins. The module was contributed by \'Elie Roux.
%\changes{v2.4}{2009/11/12}{new file \file{microtype.lua} containing the \texttt{lua} functions
%                           (contributed by \contributor \'Elie Roux <elie.roux\at telecom-bretagne.eu>)}
%\changes{v2.7b}{2019/02/28}{update lua function \texttt{microtype.info} after changes in \pkg{luaotfload}
%                            (reported by \contributor Moritz Wemheuer <moritz.wemheuer\at gmail.com> and
%                             \contributor Ulrike Fischer <news3\at nililand.de>)}
%                            ^^A private mail, 2019/02/19
%                            ^^A private mail, 2019/02/26
%\changes{v2.8}{2020/05/26}{fix for \pkg{luatexbase}}
%    \begin{macrocode}
%<*luafile>

function microtype.info(...)
  luatexbase.module_info("microtype",...)
end

local find       = string.find
local match      = string.match
local tex_write  = tex.write

local catpackage
if luatexbase.registernumber then
  catpackage = luatexbase.registernumber("catcodetable@atletter") -- LaTeX
else
  catpackage = luatexbase.catcodetables.CatcodeTableLaTeXAtLetter -- luatexbase
end
function microtype.sprint (...)
  tex.sprint(catpackage, ...)
end

%</luafile>
%    \end{macrocode}
% To be continued, but first back to primitives.
%\begin{macro}{\MT@glet}
%\changes{v1.9f}{2006/08/09}{new macro}
% Here's the forgotten one.
%    \begin{macrocode}
%<*package|letterspace>
\def\MT@glet{\global\let}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@exp@cs}
%\begin{macro}{\MT@exp@gcs}
%\changes{v2.3b}{2008/03/07}{new macro: reduce save stack size}
% Commands to create command sequences. Those that are going to be defined
% globally should be created inside a group so that the save stack won't
% explode.
%    \begin{macrocode}
\def\MT@exp@cs#1#2{\expandafter#1\csname#2\endcsname}
%<*package>
\def\MT@exp@gcs#1#2{\begingroup\expandafter\endgroup\expandafter#1\csname#2\endcsname}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\changes{v1.4b}{2004/11/21}{optimisation: use less \cmd\expandafter s and \cmd\csname s}
%\begin{macro}{\MT@def@n}
%\begin{macro}{\MT@gdef@n}
%\changes{v1.9f}{2006/08/09}{new macros: global variants}
% This is \cmd\@namedef\ and global.
%    \begin{macrocode}
\def\MT@def@n{\MT@exp@cs\def}
\def\MT@gdef@n{\MT@exp@gcs\gdef}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@edef@n}
%\begin{macro}{\MT@xdef@n}
% Its expanding versions.
%    \begin{macrocode}
%</package>
\def\MT@edef@n{\MT@exp@cs\edef}
%<*package>
\def\MT@xdef@n{\MT@exp@gcs\xdef}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@let@nc}
%\begin{macro}{\MT@glet@nc}
% \cmd\let\ a \cmd\csname\ sequence to a command.
%    \begin{macrocode}
\def\MT@let@nc{\MT@exp@cs\let}
\def\MT@glet@nc{\MT@exp@gcs\MT@glet}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@let@cn}
% \cmd\let\ a command to a \cmd\csname\ sequence.
%    \begin{macrocode}
%</package>
\def\MT@let@cn#1#2{\expandafter\let\expandafter#1\csname #2\endcsname}
%<*package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@let@nn}
%\begin{macro}{\MT@glet@nn}
% \cmd\let\ a \cmd\csname\ sequence to a \cmd\csname\ sequence.
%    \begin{macrocode}
\def\MT@let@nn{\MT@exp@cs\MT@let@cn}
\def\MT@glet@nn{\MT@exp@gcs{\global\expandafter\MT@let@cn}}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@@font}
% Remove trailing space from the font name.
%    \begin{macrocode}
\def\MT@@font{\expandafter\string\MT@font}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@exp@one@n}
% Expand the second token once and enclose it in braces.
%    \begin{macrocode}
%</package>
\def\MT@exp@one@n#1#2{\expandafter#1\expandafter{#2}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@exp@two@c}
% Expand the next two tokens after \meta{\#1} once.
%    \begin{macrocode}
\def\MT@exp@two@c#1{\expandafter\expandafter\expandafter#1\expandafter}
%<*package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@exp@two@n}
%\changes{v1.9}{2005/09/28}{new macros: less \cmd\expandafter s}
% Expand the next two tokens after \meta{\#1} once and enclose them in braces.
%    \begin{macrocode}
\def\MT@exp@two@n#1#2#3{%
  \expandafter\expandafter\expandafter
    #1\expandafter\expandafter\expandafter
      {\expandafter#2\expandafter}\expandafter{#3}}
%    \end{macrocode}
%\end{macro}
% You do not wonder why |\MT@exp@one@c| doesn't exist, do you?
%\changes{v1.6}{2005/01/19}{use \etex's \cs{ifcsname} and \cs{ifdefined} if defined}
%\begin{macro}{\MT@ifdefined@c@T}
%\changes{v1.9a}{2005/11/08}{new macros: true case only}
%\begin{macro}{\MT@ifdefined@c@TF}
%\begin{macro}{\MT@ifdefined@n@T}
%\begin{macro}{\MT@ifdefined@n@TF}
% Wrapper for testing whether command resp. \cmd\csname\ sequence is defined.
% If we are running \etex, we will use its primitives \cs{ifdefined} and
% \cs{ifcsname}, which decreases memory use substantially.
%    \begin{macrocode}
\def\MT@ifdefined@c@T#1{%
^^X  \ifdefined#1\expandafter\@firstofone\else\expandafter\@gobble\fi
^^Q  \ifx#1\@undefined\expandafter\@gobble\else\expandafter\@firstofone\fi
}
%</package>
\def\MT@ifdefined@c@TF#1{%
^^X  \ifdefined#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
%<package>^^Q  \ifx#1\@undefined
%<package>^^Q    \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi
}
\def\MT@ifdefined@n@T#1{%
^^X  \ifcsname#1\endcsname\expandafter\@firstofone\else\expandafter\@gobble\fi
%<package>^^Q  \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax
%<package>^^Q    \expandafter\@gobble\else\expandafter\@firstofone\fi
}
\def\MT@ifdefined@n@TF#1{%
^^X  \ifcsname#1\endcsname\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
%<package>^^Q  \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax
%<package>^^Q    \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi
}
%<*package>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@detokenize@n}
%\changes{v1.9d}{2006/03/08}{new macro: use \cmd\detokenize\ if available}
%\begin{macro}{\MT@detokenize@c}
%\changes{v1.9}{2005/08/17}{fix the \nonetex\ version}
%\changes{v2.3c}{2008/08/23}{fix: remove last space only
%                            (reported by \contributor Ulrich Dirr <ud\at mucschach.de>)}
%                                                         ^^A private mail, 2008/08/22
%\begin{macro}{\MT@rem@last@space}
% Translate a macro into a token list. With \etex, we can use \cmd\detokenize.
% We also need to remove the last trailing space; and only the last one --
% therefore the fiddling (and the \cmd\string\ isn't perfect, of course).
%    \begin{macrocode}
\def\MT@detokenize@n#1{%
^^X  \expandafter\MT@rem@last@space\detokenize{#1} \@nil
^^Q  \string#1%
}
\def\MT@detokenize@c#1{%
^^X  \MT@exp@one@n\MT@detokenize@n#1%
^^Q  \MT@exp@two@c\MT@rem@last@space\strip@prefix\meaning#1 \@nil
}
\def\MT@rem@last@space#1 #2{#1%
  \ifx\@nil#2\else \space
  \expandafter\MT@rem@last@space\expandafter#2\fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@ifempty}
% Test whether argument is empty.
%\changes{v1.1}{2004/09/15}{fix: use category code 12 for the percent character
%               (reported by \contributor Tom Kink <kink\at hia.rwth-aachen.de>)}
%                                      ^^A MID: <2qrkp9F134l6lU1@uni-berlin.de>
%    \begin{macrocode}
%</package>
\begingroup
\catcode`\%=12
\catcode`\&=14
\gdef\MT@ifempty#1{&
  \if %#1%&
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\endgroup
%<*package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ifint}
% Test whether argument is an integer, using an old trick by Mr. Arseneau,
%\changes{v1.9a}{2005/11/03}{use \cmd\pdfmatch\ if available}
% or the latest and greatest from \pdftex\
%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available}
% or \luatex\ (which also allows negative numbers, as required by the
% \opt{letterspace} option).
%    \begin{macrocode}
%</package>
%</package|letterspace>
%<pdftex-def>\MT@requires@pdftex6{
%<letterspace>\MT@pdf@or@lua{
%<*pdftex-def|letterspace>
\def\MT@ifint#1{%
  \ifcase\pdfmatch{^-*[0-9]+ *$}{#1}\relax
    \expandafter\@secondoftwo
  \else
    \expandafter\@firstoftwo
  \fi
}
}{
%</pdftex-def|letterspace>
%<*pdftex-def|xetex-def|letterspace>
\def\MT@ifint#1{%
  \if!\ifnum9<1#1!\else?\fi
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
%</pdftex-def|xetex-def|letterspace>
%<pdftex-def|letterspace>}
%<luatex-def>\def\MT@ifint#1{\csname\MT@lua{microtype.if_int([[#1]])}\endcsname}
%<*luafile>
local function if_int(s)
  if find(s,"^-*[0-9]+ *$") then
    tex_write("@firstoftwo")
  else
    tex_write("@secondoftwo")
  end
end
microtype.if_int = if_int

%</luafile>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ifdimen}
% Test whether argument is dimension (or number).
%\changes{v1.4b}{2004/11/22}{don't set \cs{MT@count} globally (save stack problem)}
%\changes{v1.7}{2005/03/15}{comparison with 1 to allow size smaller than 1
%               (suggested by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)}
%                                                            ^^A private mail, 2005/03/15
%\changes{v1.9b}{2006/01/05}{use \cmd\pdfmatch\ if available}
% (|nd| and |nc| are new Didot resp. Cicero, added in \pdftex\ 1.30; |px| is a pixel.)
%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available}
%\todo{fix \texttt{lua} expression}
%    \begin{macrocode}
%<*pdftex-def>
\MT@requires@pdftex6{
\def\MT@ifdimen#1{%
  \ifcase\pdfmatch{^([0-9]+([.,][0-9]+)?|[.,][0-9]+)%
                    (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px)? *$}{#1}\relax
    \expandafter\@secondoftwo
  \else
    \expandafter\@firstoftwo
  \fi
}
}{
%</pdftex-def>
%<*pdftex-def|xetex-def>
\def\MT@ifdimen#1{%
  \setbox\z@=\hbox{%
    \MT@count=1#1\relax
    \ifnum\MT@count=\@ne
      \aftergroup\@secondoftwo
    \else
      \aftergroup\@firstoftwo
    \fi
  }%
}
%</pdftex-def|xetex-def>
%<pdftex-def>}
%<luatex-def>\def\MT@ifdimen#1{\csname\MT@lua{microtype.if_dimen([[#1]])}\endcsname}
%<*luafile>
local function if_dimen(s)
  if (find(s, "^-*[0-9]+(%a*) *$") or
      find(s, "^-*[0-9]*[.,][0-9]+(%a*) *$")) then
    tex_write("@firstoftwo")
  else
    tex_write("@secondoftwo")
  end
end
microtype.if_dimen = if_dimen

%</luafile>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ifdim}
% Compare floating point numbers.
%    \begin{macrocode}
%<*package>
\def\MT@ifdim#1#2#3{%
  \ifdim #1\p@ #2 #3\p@
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
%</package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ifstreq}
% Test whether two strings (fully expanded) are equal.
%\changes{v1.9a}{2005/11/03}{use \cmd\pdfstrcmp\ if available}
%\changes{v2.2}{2007/03/07}{fix: \nonetex\ version shouldn't use \cmd\x\ and \cmd\y\
%                           (found by \contributor Wiebke Petersen <petersew\at uni-duesseldorf.de>)}
%                                               ^^A MID: <esmd6k$954$1@news1.rz.uni-duesseldorf.de>
%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available}
%\changes{v2.8}{2020/06/18}{use \xetex's \cmd\stringcmp}
%    \begin{macrocode}
%<*pdftex-def|xetex-def>
%<pdftex-def>\MT@requires@pdftex5{
\def\MT@ifstreq#1#2{%
%<pdftex-def>  \ifnum\pdfstrcmp{#1}{#2}=\z@
%<xetex-def>  \ifnum\strcmp{#1}{#2}=\z@
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
%</pdftex-def|xetex-def>
%<*pdftex-def>
}{
\def\MT@ifstreq#1#2{%
  \edef\MT@res@a{#1}%
  \edef\MT@res@b{#2}%
  \ifx\MT@res@a\MT@res@b
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
}
%</pdftex-def>
%<luatex-def>\def\MT@ifstreq#1#2{\csname\MT@lua{microtype.if_str_eq([[#1]],[[#2]])}\endcsname}
%<*luafile>
local function if_str_eq(s1, s2)
  if s1 == s2 then
    tex_write("@firstoftwo")
  else
    tex_write("@secondoftwo")
  end
end
microtype.if_str_eq = if_str_eq

%</luafile>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@xadd}
%\changes{v1.8}{2005/04/17}{simplified}
% Add item to a list.
%    \begin{macrocode}
%<*package>
\def\MT@xadd#1#2{%
  \ifx#1\relax
    \xdef#1{#2}%
  \else
    \xdef#1{#1#2}%
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@xaddb}
% Add item to the beginning.
%    \begin{macrocode}
\def\MT@xaddb#1#2{%
  \ifx#1\relax
    \xdef#1{#2}%
  \else
    \xdef#1{#2#1}%
  \fi
}
%</package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@map@clist@n}
%\changes{v1.8}{2005/04/17}{new macro: used instead of \cmd\@for}
%\changes{v1.9a}{2005/11/03}{following \LaTeX3}
%\begin{macro}{\MT@map@clist@c}
%\begin{macro}{\MT@map@clist@}
%\begin{macro}{\MT@clist@function}
%\begin{macro}{\MT@clist@break}
% Run \meta{\#2} on all elements of the comma list \meta{\#1}. This and the
% following is modelled after \LaTeX3 commands.
%    \begin{macrocode}
%<*package|letterspace>
\def\MT@map@clist@n#1#2{%
  \ifx\@empty#1\else
    \def\MT@clist@function##1{#2}%
    \MT@map@clist@#1,\@nil,\@nnil
  \fi
}
%    \end{macrocode}
%\todo{think \cs{@nil} should be defined as itself}
%    \begin{macrocode}
\def\MT@map@clist@c#1{\MT@exp@one@n\MT@map@clist@n#1}
\def\MT@map@clist@#1,{%
  \ifx\@nil#1%
    \expandafter\MT@clist@break
  \fi
  \MT@clist@function{#1}%
  \MT@map@clist@
}
\let\MT@clist@function\@gobble
\def\MT@clist@break#1\@nnil{}
%<*package>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@map@tlist@n}
%\changes{v1.8}{2005/04/16}{new macro: used instead of \cmd\@tfor}
%\begin{macro}{\MT@map@tlist@c}
%\begin{macro}{\MT@map@tlist@}
%\begin{macro}{\MT@tlist@break}
% Execute \meta{\#2} on all elements of the token list \meta{\#1}.
% \cs{MT@tlist@break} can be used to jump out of the loop.
%    \begin{macrocode}
\def\MT@map@tlist@n#1#2{\MT@map@tlist@#2#1\@nnil}
\def\MT@map@tlist@c#1#2{\expandafter\MT@map@tlist@\expandafter#2#1\@nnil}
\def\MT@map@tlist@#1#2{%
  \ifx\@nnil#2\else
    #1{#2}%
    \expandafter\MT@map@tlist@
    \expandafter#1%
  \fi
}
\def\MT@tlist@break#1\@nnil{\fi}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifMT@inlist@}
%\begin{macro}{\MT@in@clist}
% Test whether item \meta{\#1} is in comma list \meta{\#2}.
%^^A\changes{v1.4b}{2004/11/22}{fix: compare with \cmd\\ instead of \cmd\relax\
%^^A                (discovered by \contributor Herb Schulz <herbs\at wideopenwest.com>)}
%^^A                                    ^^A MID: <BDBFA967.C01F%herbs@wideopenwest.com>
% Using \cmd\pdfmatch\ would be slower.
%\changes{v1.9a}{2005/11/03}{fix}
%\changes{v2.3}{2007/11/14}{don't use \cmd\x\
%                           (reported by \contributor Peter Meier <Peter.Meier998\at gmx.de>)}
%                                                                ^^A private mail, 2007/11/12
%    \begin{macrocode}
\newif\ifMT@inlist@
\def\MT@in@clist#1#2{%
  \def\MT@res@a##1,#1,##2##3\@nnil{%
    \ifx##2\@empty
      \MT@inlist@false
    \else
      \MT@inlist@true
    \fi
  }%
  \expandafter\MT@res@a\expandafter,#2,#1,\@empty\@nnil
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@rem@from@clist}
% Remove item \meta{\#1} from comma list \meta{\#2}. This is basically
% \cmd\@removeelement\ from \file{ltcntrl.dtx}.
%\changes{v1.9}{2005/10/28}{new macro: remove an item from a comma list}
%\changes{v1.9a}{2005/11/03}{fix}
%\changes{v1.9e}{2006/07/26}{model after \cmd\@removeelement}
% Using \cmd\pdfmatch\ and \cmd\pdflastmatch\ here would be really slow!
%    \begin{macrocode}
\def\MT@rem@from@clist#1#2{%
  \def\MT@res@a##1,#1,##2\MT@res@a{##1,##2\MT@res@b}%
  \def\MT@res@b##1,\MT@res@b##2\MT@res@b{\ifx,##1\@empty\else##1\fi}%
  \xdef#2{\MT@exp@two@c\MT@res@b\MT@res@a\expandafter,#2,\MT@res@b,#1,\MT@res@a}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@in@tlist}
%\begin{macro}{\MT@in@tlist@}
% Test whether item is in token list. Since this isn't too elegant, I thought
% that at least here, \cmd\pdfmatch\ would be more efficient -- however, it
% turned out to be even slower than this solution.
%    \begin{macrocode}
\def\MT@in@tlist#1#2{%
  \MT@inlist@false
  \def\MT@res@a{#1}%
  \MT@map@tlist@c#2\MT@in@tlist@
}
\def\MT@in@tlist@#1{%
  \edef\MT@res@b{#1}%
  \ifx\MT@res@a\MT@res@b
    \MT@inlist@true
    \expandafter\MT@tlist@break
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@in@rlist}
%\changes{v1.8}{2005/04/20}{made recursive}
%\begin{macro}{\MT@in@rlist@}
%\begin{macro}{\MT@in@rlist@@}
%\begin{macro}{\MT@size@name}
% Test whether size \cs{MT@size} is in a list of ranges. Store the name of the
% list in \cs{MT@size@name}
%    \begin{macrocode}
\def\MT@in@rlist#1{%
  \MT@inlist@false
  \MT@map@tlist@c#1\MT@in@rlist@
}
\def\MT@in@rlist@#1{\expandafter\MT@in@rlist@@#1}
\def\MT@in@rlist@@#1#2#3{%
  \MT@ifdim{#2}=\m@ne{%
    \MT@ifdim{#1}=\MT@size
      \MT@inlist@true
      \relax
  }{%
    \MT@ifdim\MT@size<{#1}\relax{%
      \MT@ifdim\MT@size<{#2}%
        \MT@inlist@true
        \relax
    }%
  }%
  \ifMT@inlist@
    \def\MT@size@name{#3}%
    \expandafter\MT@tlist@break
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@loop}
%\changes{v1.2}{2004/09/23}{fix: new macro, used instead of \cmd\loop}
%\begin{macro}{\MT@iterate}
%\begin{macro}{\MT@repeat}
% This is the same as \LaTeX's \cmd\loop, which we mustn't use, since this
% could confuse an outer \cmd\loop\ in the document.
%    \begin{macrocode}
%</package>
\def\MT@loop#1\MT@repeat{%
  \def\MT@iterate{#1\relax\expandafter\MT@iterate\fi}%
  \MT@iterate \let\MT@iterate\relax
}
\let\MT@repeat\fi
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@while@num}
% Execute \meta{\#3} from \meta{\#1} up to (excluding) \meta{\#2} (much faster
% than \LaTeX's \cmd\@whilenum).
%    \begin{macrocode}
\def\MT@while@num#1#2#3{%
  \@tempcnta#1\relax
  \MT@loop #3%
    \advance\@tempcnta \@ne
    \ifnum\@tempcnta < #2\MT@repeat
}
%</package|letterspace>
%    \end{macrocode}
%\end{macro}
%\changes{v2.6a}{2016/05/03}{fixes for \letterspace\ package with \luatex}
%\begin{macro}{\MT@if@luaotf@font}
%\changes{v2.8}{2019/11/27}{use \texttt{lua} function}
% For fonts loaded by \pkg{luaotfload} we query the font's table.
%    \begin{macrocode}
%<letterspace>\MT@pdf@or@lua{\let\MT@if@luaotf@font\@secondoftwo}{
%<luatex-def|letterspace>\def\MT@if@luaotf@font{\csname\MT@lua{%
%<luatex-def>  microtype.if_luaotf_font()
%<*luafile|letterspace>
%<luafile>local function if_luaotf_font()
  local thefont = font.getfont(font.current())
  if thefont and ( thefont.format == "opentype" or thefont.format == "truetype" )
    then tex.write("@firstoftwo")
    else tex.write("@secondoftwo")
  end
%<luafile>end
%<luafile>microtype.if_luaotf_font = if_luaotf_font
%<luafile>
%</luafile|letterspace>
%<luatex-def|letterspace> }\endcsname
%<luatex-def|letterspace>}
%<letterspace>}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@do@font}
% Execute \meta{\#1} 256 times,
%    \begin{macrocode}
%<pdftex-def|letterspace>\def\MT@do@font{\MT@while@num\z@\@cclvi}
%    \end{macrocode}
% resp. for the whole font for \luatex, if it's a Unicode font.
%\changes{v2.5}{2010/08/14}{adapt for \luatex}
%\changes{v2.6}{2013/07/14}{speed up for \luatex}
%\changes{v2.6a}{2015/05/10}{fix \texttt{lua} function
%                            (reported by \contributor Herbert Vo\ss{} <Herbert.Voss\at FU-Berlin.DE>)}
%                             ^^A private mail, 2016/05/10
%\changes{v2.8}{2020/06/20}{simplify \texttt{lua} function}
%    \begin{macrocode}
%<*luatex-def>
\def\MT@do@font#1{%
  \MT@if@luaotf@font{%
    \def\MT@dofont@function{#1}%
    \MT@lua{microtype.do_font()}%
  }{\MT@while@num\z@\@cclvi{#1}}%
}
%</luatex-def>
%    \end{macrocode}
% This is the |lua| function, which is much faster than looping through all glyphs
% in \TeX. Legacy fonts (which this function should never work on) don't contain a |v.index| field.
%    \begin{macrocode}
%<*luafile>
local function do_font()
  local thefont = font.getfont(font.current())
  if thefont then
    for i,v in next,thefont.characters do
      if v.index == nil or v.index > 0 then
        microtype.sprint([[\@tempcnta=]]..i..[[\relax\MT@dofont@function]])
      end
    end
  end
end
microtype.do_font = do_font

%</luafile>
%    \end{macrocode}
% The \xetex\ variant (it's slow~\dots!).
%\changes{v2.5}{2010/05/18}{adapt for \xetex}
%\changes{v2.8}{2020/02/06}{fix for \xetex}
%    \begin{macrocode}
%<*xetex-def>
\def\MT@do@font#1{%
  \@tempcnta=\z@
  \MT@loop
    \iffontchar\MT@font\@tempcnta #1\fi
    \advance\@tempcnta\@ne
    \ifnum\@tempcnta < \XeTeXlastfontchar\MT@font \MT@repeat
}
%</xetex-def>
%<*package>
%    \end{macrocode}
%\end{macro}
%\changes{v1.4}{2004/11/12}{use one instead of five counters}
%\begin{macro}{\MT@count}
%\begin{macro}{\MT@increment}
% Increment macro \meta{\#1} by one. Saves using up too many counters.
%\changes{v1.7}{2005/03/07}{use \etex's \cmd\numexpr\ if available}
% The \etex\ way is slightly faster.
%    \begin{macrocode}
\newcount\MT@count
\def\MT@increment#1{%
^^X  \edef#1{\number\numexpr #1 + 1\relax}%
^^Q  \MT@count=#1\relax
^^Q  \advance\MT@count \@ne
^^Q  \edef#1{\number\MT@count}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@scale}
%\changes{v1.7}{2005/02/12}{new macro: use \etex's \cs{numexpr} if available}
%\changes{v1.8}{2005/03/30}{fix: remove spaces in \nonetex\ variant
%               (reported by \contributor Mark Rossi <mark.rossi\at de.bosch.com>)}
%                               ^^A MID: <d6uhag$qoi$1@ns2.fe.internet.bosch.com>
% Multiply and divide a counter. If we are using \etex, we will use its
% \cmd\numexpr\ primitive. This has the advantage that it is less likely to
% run into arithmetic overflow. The result of the division will be rounded
% instead of truncated. Therefore, we'll get a different (more accurate)
% result in about half of the cases.
%    \begin{macrocode}
\def\MT@scale#1#2#3{%
^^Q  \multiply #1 #2\relax
  \ifnum #3 = \z@
^^X    #1=\numexpr #1 * #2\relax
  \else
^^X    #1=\numexpr #1 * #2 / #3\relax
^^Q    \divide #1 #3\relax
  \fi
}
%    \end{macrocode}
%\end{macro}
%\changes{v1.7}{2005/03/07}{shorter command names}
%\begin{macro}{\MT@abbr@pr}
%\begin{macro}{\MT@abbr@ex}
%\begin{macro}{\MT@abbr@pr@c}
%\begin{macro}{\MT@abbr@ex@c}
%\begin{macro}{\MT@abbr@pr@inh}
%\begin{macro}{\MT@abbr@ex@inh}
%\begin{macro}{\MT@abbr@nl}
%\begin{macro}{\MT@abbr@sp}
%\begin{macro}{\MT@abbr@sp@c}
%\begin{macro}{\MT@abbr@sp@inh}
%\begin{macro}{\MT@abbr@kn}
%\begin{macro}{\MT@abbr@kn@c}
%\begin{macro}{\MT@abbr@kn@inh}
%\begin{macro}{\MT@abbr@tr}
%\begin{macro}{\MT@abbr@tr@c}
% Some abbreviations. Thus, we can have short command names but full-length
% log output.
%    \begin{macrocode}
\def\MT@abbr@pr{protrusion}
\def\MT@abbr@ex{expansion}
\def\MT@abbr@pr@c{protrusion codes}
\def\MT@abbr@ex@c{expansion codes}
\def\MT@abbr@pr@inh{protrusion inheritance}
\def\MT@abbr@ex@inh{expansion inheritance}
\def\MT@abbr@nl{noligatures}
\def\MT@abbr@sp{spacing}
\def\MT@abbr@sp@c{interword spacing codes}
\def\MT@abbr@sp@inh{interword spacing inheritance}
\def\MT@abbr@kn{kerning}
\def\MT@abbr@kn@c{kerning codes}
\def\MT@abbr@kn@inh{kerning inheritance}
\def\MT@abbr@tr{tracking}
\def\MT@abbr@tr@c{tracking amount}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@rbba@protrusion}
%\begin{macro}{\MT@rbba@expansion}
%\begin{macro}{\MT@rbba@spacing}
%\begin{macro}{\MT@rbba@kerning}
%\begin{macro}{\MT@rbba@tracking}
% These we also need the other way round.
%    \begin{macrocode}
\def\MT@rbba@protrusion{pr}
\def\MT@rbba@expansion{ex}
\def\MT@rbba@spacing{sp}
\def\MT@rbba@kerning{kn}
\def\MT@rbba@tracking{tr}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@features}
%\changes{v1.9b}{2006/01/17}{use throughout the package to adjust to beta-ness}
%\begin{macro}{\MT@features@long}
% We can work on these lists to save some guards in the \file{dtx} file.
%    \begin{macrocode}
\def\MT@features{pr,ex,sp,kn,tr}
\def\MT@features@long{protrusion,expansion,spacing,kerning,tracking}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@is@feature}
%\changes{v1.9a}{2005/11/03}{new macro: check for \pdftex\ feature}
% Whenever an optional argument accepts a list of features, we can use this
% command to check whether a feature exists in order to prevent a rather
% confusing `|Missing \endcsname inserted|' error message. The feature (long
% form) must be in \meta{\#1}, the type of list to ignore in \meta{\#2},
% then comes the action.
%    \begin{macrocode}
\def\MT@is@feature#1#2{%
  \MT@in@clist{#1}\MT@features@long
  \ifMT@inlist@
    \expandafter\@firstofone
  \else
    \MT@error{`#1' is not an available micro-typographic\MessageBreak
      feature. Ignoring #2}{Available features are: `\MT@features@long'.}%
    \expandafter\@gobble
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Compatibility}\label{sub:compatibility}
%
% For the record, the following \LaTeX\ kernel commands will be modified by
% \microtype:
%\begin{itemize}
%  \item \cmd\pickup@font
%  \item \cmd\do@subst@correction
%  \item \cmd\add@accent\ (all in section~\ref{sssec:impl.hook})
%  \item \cmd\showhyphens\ (in section~\ref{sssec:impl.options})
%\end{itemize}
%
% The \pkg{wordcount} package redefines the font-switching commands, which will
% break \microtype. Since \microtype\ doesn't have an effect on the number of
% words in the document anyway, we will simply disable ourselves.
%\changes{v2.2}{2007/02/11}{disable \microtype\ if \pkg{wordcount} is loaded
%                           (reported by \contributor Ross Hetherington <ross\at heth.eclipse.co.uk>)}
%                                         ^^A MID: <A9-dnaHX5LxN01LYnZ2dnUVZ8tqqnZ2d@eclipse.net.uk>
%    \begin{macrocode}
\@ifl@aded{tex}{wordcount}{%
  \MT@warning@nl{Detected the `wordcount' utility.\MessageBreak
    Disabling `\MT@MT', since it wouldn't work}%
  \MT@clear@options\endinput}\relax
%    \end{macrocode}
% The \pkg{minimal} class doesn't define any size commands other than
% \cmd\normalsize, which will result in lots of warnings. Therefore we
% issue a warning about the warnings.
%\changes{v2.7}{2016/05/18}{warning with \pkg{minimal} class}
%    \begin{macrocode}
\@ifclassloaded{minimal}{%
  \MT@warning@nl{Detected the `minimal' class.\MessageBreak
    Expect lots of warnings and some malfunctions.\MessageBreak
    You might want to use a proper class instead}%
}\relax
%    \end{macrocode}
%\begin{macro}{\MT@setup@}
%\changes{v1.9a}{2005/11/21}{defer setup until the end of the preamble}
%\changes{v1.9e}{2006/07/06}{empty \cs{MT@setup@} after use
%                            (compatibility with the \pkg{combine} class)}
%\changes{v2.3e}{2009/08/31}{make space-unaware
%                            (requested by \contributor Marcin Borkowski <mbork\at atos.wmid.amu.edu.pl>)}
%                               ^^A private mail, 2009/08/31
% The setup is deferred until the end of the preamble. This has a couple of
% advantages: \cs{microtypesetup} can be used to change options later on in the
% preamble, and fonts don't have to be set up before \microtype.
%    \begin{macrocode}
%</package>
%<*package|letterspace>
%<plain>\MT@requires@latex1{
\let\MT@setup@\@empty
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@addto@setup}
% We use our private hook to have better control over the timing.
% This will also work with \pkg{eplain}, but not with \pkg{miniltx} alone.
%    \begin{macrocode}
\def\MT@addto@setup{\g@addto@macro\MT@setup@}
%    \end{macrocode}
%\end{macro}
% Don't hesitate with \pkg{miniltx}.
%    \begin{macrocode}
%<plain>}{\let\MT@addto@setup\@firstofone}
%    \end{macrocode}
%\begin{macro}{\MT@with@package@T}
% We almost never do anything if a package is not loaded.
%    \begin{macrocode}
\def\MT@with@package@T#1{\@ifpackageloaded{#1}\@firstofone\@gobble}
%</package|letterspace>
%<*package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@with@babel@and@T}
%\changes{v2.2}{2007/05/25}{also inspect class options}
% \LaTeX's \cmd\@ifpackagewith\ ignores the class options.
%    \begin{macrocode}
\def\MT@with@babel@and@T#1{%
  \MT@ifdefined@n@T{opt@babel.\@pkgextension}{%
    \@expandtwoargs\MT@in@clist{#1}
      {\csname opt@babel.\@pkgextension\endcsname,\@classoptionslist}%
    \ifMT@inlist@\expandafter\@gobble\fi
  }\@gobble
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ledmac@setup}
% The \pkg{ledmac} package first saves each paragraph in a box, from which it
% then splits off the lines one by one. This will destroy character protrusion.
% (There aren't any problems with the \pkg{lineno} package, since it takes a
% different approach.)
%\iffalse
% We issue a warning, so that nobody can say they didn't know.
%\changes{v1.6}{2004/12/29}{warning when using the \pkg{ledmac} package}
% --- This is fixed in \pdftex\ 1.21a, so we no longer warn.
%\changes{v1.6a}{2005/02/02}{no warning when using the \pkg{ledmac} package}
% --- Actually, it was completely broken in 1.21a, but 1.21b provides a work-around.
%\fi
% ---~\dots~---
%\changes{v1.8}{2005/04/15}{character protrusion with \pkg{ledmac}}
% After much to and fro, the situation has finally settled and there is a fix.
% Beginning with \pdftex\ version 1.21b together with \file{ledpatch.sty} as of
% 2005/06/02 (v0.4), character protrusion will work at last.
%
% \contributor Peter Wilson <herries.press\at earthlink.net> was so kind to provide the \cmd\l@dunhbox@line\ hook in
% \pkg{ledmac} to allow for protrusion. \cmd\leftmarginkern\ and
% \cmd\rightmarginkern\ are new primitives of \pdftex\ 1.21b (aka. 1.30.0).
%\changes{v2.5}{2012/07/02}{fix to work with \xetex\
%                           (reported by \contributor Ma\"ieul Rouquette <maieul\at maieul.net>)}
%                           ^^A private mail, 2012/06/30
% They are also part of recent \xetex.
%\changes{v2.5a}{2013/03/25}{support for \pkg{eledmac}}
%\changes{v2.6}{2015/08/10}{support for \pkg{reledmac}}
% The successor packages \pkg{eledmac} and \pkg{reledmac} are also supported.
%    \begin{macrocode}
%</package>
%<pdftex-def>\MT@requires@pdftex5{
%<*pdftex-def|luatex-def|xetex-def>
  \def\MT@ledmac@setup{%
    \ifMT@protrusion
      \MT@ifdefined@c@TF\l@dunhbox@line{%
%    \end{macrocode}
%\begin{macro}{\MT@led@unhbox@line}
% Hook.
%\changes{v2.5a}{2013/03/27}{simplified}
%    \begin{macrocode}
        \MT@info@nl{Patching ((r)e)ledmac to enable character protrusion}%
        \let\MT@led@unhbox@line\l@dunhbox@line
        \renewcommand*{\l@dunhbox@line}[1]{%
          \ifhbox##1%
            \kern\leftmarginkern##1%
            \expandafter\MT@led@unhbox@line\expandafter##1\expandafter
            \kern\rightmarginkern##1%
          \fi
        }%
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
      }{%
        \MT@warning@nl{%
          Character protrusion in paragraphs with line\MessageBreak
          numbering will only work if you update ledmac,\MessageBreak
          or use one of its successors, eledmac or reledmac}%
      }%
    \fi
  }
%</pdftex-def|luatex-def|xetex-def>
%<*pdftex-def>
}{
  \def\MT@ledmac@setup{%
    \ifMT@protrusion
      \MT@warning@nl{%
        The pdftex version you are using does not allow\MessageBreak
        character protrusion in paragraphs with line\MessageBreak
        numbering by the `((r)e)ledmac' package.\MessageBreak
        Upgrade pdftex to version 1.30 or later}%
    \fi
  }
}
%</pdftex-def>
%    \end{macrocode}
%\end{macro}
% The \pkg{shapepar} package (v2.2) fixes this in a similar manner by itself,
% so we don't have to bother.
% ^^A missing protrusion with \pkg{shapepar} (reported by \contributor Giuseppe Palma <pippi.palma\at gmail.com>)}
% ^^A                                     ^^A private mail, 2013/03/22
% ^^A fixed in shapepar v2.2 (Mar 2013)
%\begin{macro}{\MT@restore@p@h}
% Restore meaning of \cmd\% and \cmd\#.
%    \begin{macrocode}
%<*package|letterspace>
%<*package>
\def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# }
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\ifMT@xunicode}
%\begin{macro}{\ifMT@fontspec}
% Two new conditionals for use with \xetex\ or \luatex.
%    \begin{macrocode}
\newif\ifMT@xunicode
\MT@with@package@T{xunicode}\MT@xunicodetrue
\newif\ifMT@fontspec
\MT@with@package@T{fontspec}\MT@fontspectrue
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@maybe@gobble@with@tikz}
%\begin{macro}{\MT@tikz@setup}
%\changes{v2.3e}{2009/11/02}{compatibility with \pkg{tikz} (first reported by
%                           \contributor Christian Stark <cstark\at gmx.de>)}       ^^A MID: <7d81lgF2ad3ckU1@mid.dfncis.de>, 2009/07/28
%^^A                  Also: \contributor Karl Karlsson <karl-karlsson\at yandex.ru> ^^A private mail, 2009/10/29
%^^A                        \contributor hscm <henkmetselaar\at gmail.com>          ^^A MID: <6a24e972-b1a7-4172-a5a0-d2707e016301@12g2000pri.googlegroups.com>, 2009/11/02
%\changes{v2.7}{2016/06/08}{compatibility with \pkg{tikz} (again)}
% If \cmd\tikz@expandcount\ is greater than zero, we're inside or at the end of
% a \pkg{tikz} node, where we don't want to adjust spacing after letterspacing,
% lest we disturb \pkg{tikz}. This is used in \cs{MT@afteraftergroup}, and we
% don't need it for \letterspace.
%    \begin{macrocode}
\let\MT@maybe@gobble@with@tikz\@firstofone
\def\MT@tikz@setup{%
  \def\MT@maybe@gobble@with@tikz{%
    \ifnum\tikz@expandcount>\z@
      \expandafter\@gobble
    \else
      \expandafter\@firstofone
    \fi}}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@setupfont@hook}
% This hook will be executed every time a font is set up (inside a group).
%
% In the preamble, we check for the packages each time a font is set up.
% Thus, it will work regardless when the packages are loaded.
%
% Even for packages that don't activate any characters in the preamble (like
% \pkg{babel} and \pkg{csquotes}), we have to check here, too, in case they were
% loaded before \microtype, and a font is loaded \cmd\AtBeginDocument, before
% \microtype.
% (This is no longer needed, since the complete setup is now deferred until the
% end of the preamble. However, it is still necessary for \opt{defersetup}|=false|.)
%    \begin{macrocode}
\def\MT@setupfont@hook{%
%    \end{macrocode}
%\iffalse
%\changes{v1.7}{2005/02/06}{compatibility with the \pkg{chemsym} package}
% The \pkg{chemsym} package redefines, among other commands, the Hungarian
% umlaut \cmd\H\ in a way that cannot be parsed by \microtype. As a work-around,
% we restore the usual definition of \cmd\H\ before setting up the font (which
% will be done inside a group).
%\changes{v1.8}{2005/03/24}{remove superfluous \pkg{chemsym} hook}
% --- Since version 1.7, this is no longer needed, since our character parsing
% is robust enough now.
%
%\changes{v1.7}{2005/03/10}{compatibility with the \pkg{statex} package}
% Same for \pkg{statex}.
%\changes{v1.8}{2005/03/24}{remove superfluous \pkg{statex} hook}
% --- No longer needed, either.
%\fi
%\changes{v1.8}{2005/03/30}{restore percent character if Spanish \pkg{babel} is loaded}
%\changes{v2.2}{2007/02/02}{restore percent character if Galician \pkg{babel} is loaded}
%\changes{v2.3a}{2008/01/29}{restore percent character if Mexican \pkg{babel} is loaded}
% Spanish (as well as Galician and Mexican) \pkg{babel} modify \cmd\%, storing
% the original meaning in \cmd\percentsign.
%    \begin{macrocode}
  \MT@if@false
  \MT@with@babel@and@T{spanish} \MT@if@true
  \MT@with@babel@and@T{galician}\MT@if@true
  \MT@with@babel@and@T{mexican} \MT@if@true
  \ifMT@if@\MT@ifdefined@c@T\percentsign{\let\%\percentsign}\fi
%    \end{macrocode}
%\changes{v1.8}{2005/04/22}{restore \pkg{csquotes}'s active characters}
% Using \cmd\@disablequotes, we can restore the original meaning of all
% characters made active by \pkg{csquotes}.
% (It would be doable for older versions, too, but we won't bother.)
%    \begin{macrocode}
  \MT@with@package@T{csquotes}{%
    \@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax}%
%    \end{macrocode}
% \pkg{hyperref} redefines \cmd\% and \cmd\# inside a \cmd\url. We restore
% the original meanings (which we can only hope are correct).
%\changes{v1.8}{2005/05/20}{restore \cmd\% and \cmd\# when \pkg{hyperref} is loaded}
% Same for \pkg{tex4ht}
%\changes{v1.9d}{2006/02/27}{restore \cmd\% and \cmd\# when \pkg{tex4ht} is loaded
%                            (reported by \contributor Peter Dyballa <Peter_Dyballa\at Web.DE>)}
%                                                                  ^^A private mail, 2006/02/26
% and \pkg{mathastext}.
%\changes{v2.5}{2011/07/29}{restore \cmd\% and \cmd\# when \pkg{mathastext} is loaded
%                           (found by \contributor Seamus Bradley <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/24248
%                           ^^A (beta:07)
%    \begin{macrocode}
  \MT@if@false
  \MT@with@package@T{hyperref}  \MT@if@true
  \MT@with@package@T{tex4ht}    \MT@if@true
  \MT@with@package@T{mathastext}\MT@if@true
  \ifMT@if@\MT@restore@p@h\fi
  \MT@with@package@T{tikz}\MT@tikz@setup
}
%    \end{macrocode}
%\end{macro}
% Check again at the end of the preamble.
%    \begin{macrocode}
%</package>
\MT@addto@setup{%
%<*package>
%    \end{macrocode}
%\changes{v1.4}{2004/11/04}{check for \pkg{pdfcprot}}
% Our competitor, the \pkg{pdfcprot} package, must not be tolerated!
%    \begin{macrocode}
  \MT@with@package@T{pdfcprot}{%
    \MT@error{Detected the `pdfcprot' package!\MessageBreak
              `\MT@MT' and `pdfcprot' may not be used together}{%
The `pdfcprot' package provides an interface to character protrusion.\MessageBreak
So does the `\MT@MT' package. Using both packages at the same\MessageBreak
time will almost certainly lead to undesired results. Have your choice!}%
  }%
  \MT@with@package@T  {ledmac}\MT@ledmac@setup
  \MT@with@package@T {eledmac}\MT@ledmac@setup
  \MT@with@package@T{reledmac}\MT@ledmac@setup
  \MT@with@package@T{xunicode}\MT@xunicodetrue
  \MT@with@package@T{fontspec}\MT@fontspectrue
%    \end{macrocode}
% We can clean up \cs{MT@setupfont@hook} now.
%\changes{v2.6}{2014/03/17}{redefine \cs{MT@setupfont@hook} globally
%                           for problem with \pkg{tikzposter}
%                           (reported by \contributor Sam Mason <sam\at samason.me.uk>)}
%                           ^^A https://tex.stackexchange.com/questions/165846/
%    \begin{macrocode}
  \MT@glet\MT@setupfont@hook\@empty
  \MT@if@false
  \MT@with@babel@and@T{spanish} \MT@if@true
  \MT@with@babel@and@T{galician}\MT@if@true
  \MT@with@babel@and@T{mexican} \MT@if@true
  \ifMT@if@
    \g@addto@macro\MT@setupfont@hook{%
      \MT@ifdefined@c@T\percentsign{\let\%\percentsign}}%
  \fi
  \MT@with@package@T{csquotes}{%
    \@ifpackagelater{csquotes}{2005/05/11}{%
      \g@addto@macro\MT@setupfont@hook\@disablequotes
    }{%
      \MT@warning@nl{%
        Should you receive warnings about unknown slot\MessageBreak
        numbers, try upgrading the `csquotes' package}%
    }%
  }%
%    \end{macrocode}
% We disable \microtype's additions inside \pkg{hyperref}'s \cmd\pdfstringdef,
% which redefines lots of commands.
%\changes{v1.9}{2005/09/10}{disable \microtype\ setup inside \pkg{hyperref}'s \cmd\pdfstringdef\
%               (reported by \contributor H\`an \thanhthe{} Th\`anh <hanthethanh\at gmail.com>)}
%                                                  ^^A private mail, 2005/09/10
%\changes{v2.3}{2007/11/11}{disable \cs{microtypecontext} in \pkg{hyperref}'s \cmd\pdfstringdef}
% \pkg{hyperref} doesn't work with plain \TeX, so in that case we don't bother.
%    \begin{macrocode}
  \MT@if@false
%</package>
%<plain>  \MT@requires@latex2{
  \MT@with@package@T{hyperref}{%
    \pdfstringdefDisableCommands{%
%<*package>
      \MT@ltx@pickupfont
      \let\textmicrotypecontext\@secondoftwo
      \let\microtypecontext\@gobble
%</package>
      \def\lsstyle{\pdfstringdefWarn\lsstyle}%
      \def\textls#1#{\pdfstringdefWarn\textls}%
    }%
%<package>    \MT@if@true
  }%
%<plain>  }\relax
%<*package>
  \MT@with@package@T{tex4ht}\MT@if@true
  \MT@with@package@T{mathastext}\MT@if@true
  \ifMT@if@\g@addto@macro\MT@setupfont@hook\MT@restore@p@h\fi
%    \end{macrocode}
%\changes{v1.9b}{2005/12/19}{compatibility with \pkg{listings}: sanitise more catcodes
%                            (reported by \contributor Holger Uhr <huhr\at uni-paderborn.de>)}
%                                               ^^A MID: <do4gvo$tv$1@news.uni-paderborn.de>
% The \pkg{listings} package makes numbers and letters active,
%    \begin{macrocode}
  \MT@with@package@T{listings}{%
    \g@addto@macro\MT@cfg@catcodes{%
      \MT@while@num{"30}{"3A}{\catcode\@tempcnta=12\relax}%
      \MT@while@num{"41}{"5B}{\catcode\@tempcnta=11\relax}%
      \MT@while@num{"61}{"7B}{\catcode\@tempcnta=11\relax}%
    }%
%    \end{macrocode}
% \dots~and the backslash (which would lead to problems in \cs{MT@get@slot}).
%\changes{v2.0}{2006/09/15}{compatibility with \pkg{listings}: set catcode of backslash to zero
%                           (reported by \contributor Steven Bath <steven128\at iname.com>)}
%                                                     ^^A private mail, 2006/09/15
%    \begin{macrocode}
    \g@addto@macro\MT@setupfont@hook{%
      \catcode`\\=\z@
%    \end{macrocode}
% Inside a listing, \cmd\space\ is redefined.
%\changes{v2.5}{2011/05/03}{restore \cmd\space\ inside \pkg{listings}
%                           (reported by \contributor Rolf Dieterich <rolf.dieterich\at gmx.de>)}
%                           ^^A private mail, 2011/04/30
%                           ^^A (beta:07)
%    \begin{macrocode}
      \def\space{ }%
%    \end{macrocode}
%\changes{v1.9b}{2005/12/23}{compatibility with the \texttt{extendedchar} option of
%                            the \pkg{listings} package}
% When loaded with the |extendedchar| option, \pkg{listings} will also redefine
% 8-bit active characters (\pkg{inputenc}). Luckily, this simple redefinition
% will make them expand to their original definition, so that they could be used
% in the configuration.
%    \begin{macrocode}
      \let\lst@ProcessLetter\@empty
    }%
  }%
%    \end{macrocode}
%\changes{v2.0}{2005/12/21}{compatibility with \pkg{soul}: register \cs{textls} and \cs{lsstyle}} ^^A (beta:3)
% Of course, using both \pkg{soul}'s and \microtype's letterspacing mechanisms
% at the same time doesn't make much sense. But \pkg{soul} can do more, \eg,
% underlining. The optional argument to \cs{textls} may not be used.
%\changes{v2.8}{2020/04/11}{compatibility with \pkg{soul}: patch for font change
%                           (reported by \contributor Md Ayquassar <mdayq0\at lenta.ru>)}
%                           ^^A https://github.com/latex3/babel/issues/53#issuecomment-598307655
% Also, we have to disable expansion within \pkg{soul}'s trial run.
%\changes{v2.3a}{2008/01/06}{fix test for \pkg{soul} under plain \TeX}
% Under plain \TeX, \pkg{soul} doesn't register itself the \LaTeX\ way, so
% we just test for its main command.
%    \begin{macrocode}
%</package>
  \ifx\SOUL@\@undefined\else
    \soulregister\lsstyle 0%
    \soulregister\textls  1%
    \ifx\XeTeXrevision\@undefined
      \let\MT@SOUL@doword\SOUL@doword
      \def\SOUL@doword{\pdfadjustspacing=\z@ \MT@SOUL@doword}%
    \fi
  \fi
%<*package>
  \MT@with@package@T{tikz}\MT@tikz@setup
%    \end{macrocode}
%\changes{v2.1}{2007/01/15}{compatibility with \pkg{pinyin}: disable \microtype\ in \cmd\py@macron\
%                           (reported by \contributor Sven Naumann <svenau\at gmx.net>)}
%                                                 ^^A MID: <87d55hxxdd.fsf@linux.site>
% Compatibility with the \pkg{pinyin} package (from \pkg{CJK}): disable
% \microtype\ in \cmd\py@macron, which loads a different font for the accent.
% In older versions of \pkg{pinyin} (pre-4.6.0),
%\changes{v2.3d}{2009/03/19}{fix \pkg{pinyin} compatibility check
%                            (reported by \contributor Silas~S. Brown <ssb22\at cam.ac.uk>)}
%                                                            ^^A private mail, 2009/03/19
% \cmd\py@macron\ had only one argument.
%    \begin{macrocode}
  \MT@with@package@T{pinyin}{%
    \let\MT@orig@py@macron\py@macron
    \@ifpackagelater{pinyin}{2005/08/11}{% 4.6.0
      \def\py@macron#1#2{%
        \MT@ltx@pickupfont
        \MT@orig@py@macron{#1}{#2}%
        \MT@MT@pickupfont}%
    }{%
      \def\py@macron#1{%
        \MT@ltx@pickupfont
        \MT@orig@py@macron{#1}%
        \MT@MT@pickupfont}%
    }%
  }%
%</package>
}
%</package|letterspace>
%    \end{macrocode}
%\changes{v1.6}{2005/01/19}{load a font if none is selected}
% We need a font (the \pkg{minimal} class doesn't load one).
%    \begin{macrocode}
%<package>\expandafter\ifx\the\font\nullfont\normalfont\fi
%    \end{macrocode}
%
%\subsection{Font setup}\label{ssec:font-setup}
%
%\begin{macro}{\MT@setupfont}
% Setting up a font entails checking for each feature whether it should be
% applied to the current font (\cs{MT@font}).
%    \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\def\MT@setupfont{%
%    \end{macrocode}
%\changes{v2.5}{2012/08/22}{select font with \pkg{fontspec} (found by \contributor Georg Duffner <g.duffner\at gmail.com>)}
%                           ^^A private mail, 2012/08/17
%\changes{v2.7b}{2018/02/21}{always select current font with \xetex\ and \luatex\ (reported by \contributor Paolo Ney <@\at @>,
%                            solution by \contributor Ulrike Fischer <news3\at nililand.de>)}
%                            ^^A (1) https://tex.stackexchange.com/questions/416310/problem-of-amsart-and-microtype-under-xelatex
%                            ^^A (2) private mail, 2018/02/20
% With \xetex\ and \luatex\ the font may not be actually loaded,
% hence we might see a wrong font (in \cs{MT@get@slot}).
% Therefore, we first load the current font.
%    \begin{macrocode}
%<xetex-def|luatex-def>  \MT@font
%    \end{macrocode}
% We might have to disable stuff when used together with adventurous
% packages.
%    \begin{macrocode}
  \MT@setupfont@hook}
%    \end{macrocode}
% This will use a copy of the font (allowing for expansion parameter variation
% and the use of more than one set of protrusion factors for a font within one
% paragraph).
%    \begin{macrocode}
%<pdftex-def>\MT@requires@pdftex7{
%<pdftex-def|luatex-def>\g@addto@macro\MT@setupfont\MT@copy@font
%<pdftex-def>}\relax
%    \end{macrocode}
% The font properties must be extracted from \cs{MT@font}, since the current
% value of \cmd\f@encoding\ and friends may be wrong!
%    \begin{macrocode}
\g@addto@macro\MT@setupfont{%
  \MT@exp@two@c\MT@split@name\string\MT@font/\@nil
%    \end{macrocode}
% Try to find a configuration file for the current font family.
%\changes{v1.2}{2004/09/29}{also search for alias font file}
%    \begin{macrocode}
  \MT@exp@one@n\MT@find@file\MT@family
  \ifx\MT@familyalias\@empty \else
    \MT@exp@one@n\MT@find@file\MT@familyalias\fi
%    \end{macrocode}
%\changes{v1.2}{2004/09/26}{fix: call \cmd\@@enc@update\ if necessary}
% We have to make sure that \cmd\cf@encoding\ expands to the correct value (for
% later, in \cs{MT@get@slot}), which isn't the case when \cmd\selectfont\
% chooses a new encoding (this would be done a second later in
% \cmd\selectfont, anyway -- three lines, to be exact).
% (I think, I do not need this anymore -- however, I'm too afraid to remove it.
% \dots\ Oops, I did it. Let's see whether anybody complains.)
%\changes{v2.2}{2007/04/15}{don't call \cmd\@@enc@update\ anymore}
%    \begin{macrocode}
% \ifx\f@encoding\cf@encoding\else\@@enc@update\fi
}
%    \end{macrocode}
% Tracking has to come first, since it means actually loading a different font.
%\changes{v2.2}{2007/04/15}{only add features that are available with the respective \pdftex}
%    \begin{macrocode}
%<pdftex-def>\MT@requires@pdftex6
%<luatex-def>\MT@requires@luatex3
%<pdftex-def|luatex-def>  {\g@addto@macro\MT@setupfont\MT@tracking}\relax
\g@addto@macro\MT@setupfont{%
  \MT@check@font
  \ifMT@inlist@
%<debug>\MT@show@pdfannot2%
  \else
    \MT@vinfo{Setting up font `\MT@@font'\on@line}%
    \MT@info@notracking
%    \end{macrocode}
% Now we can begin setting up the font for all features that the current
% \pdftex\ provides. The following commands are \cmd\let\ to \cmd\relax\ if the
% respective feature is disabled via package options.
%
% For versions older than 1.20, protrusion has to be set up first, beginning
% with 1.20, the order doesn't matter.
%    \begin{macrocode}
  \MT@protrusion
%<pdftex-def|luatex-def>  \MT@expansion
}
%    \end{macrocode}
% Interword spacing and kerning (\pdftex\ 1.40).
%    \begin{macrocode}
%<*pdftex-def>
\MT@requires@pdftex6{
\g@addto@macro\MT@setupfont{\MT@spacing\MT@kerning}
}\relax
%</pdftex-def>
%    \end{macrocode}
% Disable ligatures (\pdftex\ 1.30).
%    \begin{macrocode}
%<pdftex-def>\MT@requires@pdftex5{
%<pdftex-def|luatex-def>\g@addto@macro\MT@setupfont\MT@noligatures
%<pdftex-def>}\relax
\g@addto@macro\MT@setupfont{%
%    \end{macrocode}
% Debugging.
%    \begin{macrocode}
%<debug>\MT@show@pdfannot1%
%    \end{macrocode}
% Finally, register the font so that we don't set it up anew each time.
%    \begin{macrocode}
    \MT@register@font
  \fi
}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@copy@font}
%\changes{v2.2}{2007/07/03}{optionally work on copies of fonts}
%\begin{macro}{\MT@copy@font@}
% The new (1.40.4) \cmd\pdfcopyfont\ command allows expanding a font with
% different parameters, or to use more than one set of protrusion factors for a
% given font within one paragraph. It will be used when we find a context for
% \cs{SetProtrusion} or \cs{SetExpansion} in the preamble, or when the package
% has been loaded with the \opt{copyfonts} option.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\let\MT@copy@font\relax
%<pdftex-def>\MT@requires@pdftex7{
\def\MT@copy@font@{%
%    \end{macrocode}
%\begin{macro}{\MT@font@copy}
% For every new protrusion and expansion context, we create a new copy.
%\changes{v2.3b}{2008/04/15}{enable font copies also with protrusion contexts
%                            (reported by \contributor Nathan Rosenblum <nater\at cs.wisc.edu>)}
%                                                               ^^A private mail, 2008/04/14
%    \begin{macrocode}
  \xdef\MT@font@copy{\csname\MT@@font/\MT@pr@context/\MT@ex@context\endcsname}%
  \expandafter\ifx\MT@font@copy\relax
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@font@orig}
% \pdftex\ doesn't allow copying a font that has already been copied and
% expanded\slash letterspaced. Hence, we have to get the original.
%    \begin{macrocode}
    \edef\MT@font@orig{\csname\expandafter\string\font@name @orig\endcsname}%
    \expandafter\ifx\MT@font@orig\relax
      \MT@exp@two@c\MT@glet\MT@font@orig\font@name
    \else
      \MT@exp@two@c\let\font@name\MT@font@orig
    \fi
%<pdftex-def>    \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name
%    \end{macrocode}
%\end{macro}
% Even though \luatex\ also provides the primitive from \pdftex\ (even renamed to
% \cmd\copyfont, that is, `promoted' as per the \luatex\ manual), it is seriously
% crippled in that OpenType features will be lost. ^^A see https://mailman.ntg.nl/pipermail/ntg-context/2016/087541.html seqq.
%\changes{v2.7d}{2019/11/17}{in \luatex, don't use the \cmd\copyfont\ primitive, but load the font anew
%                            (reported by \contributor Paolo Polesana <@\at @> and
%                                         \contributor Oliver Kopp <koppdev\at gmail.com>)}
%                                          ^^A https://tex.stackexchange.com/questions/338942/cancellation-of-color-fontspec-font-settings-while-defining-microtype-context
%                                          ^^A https://tex.stackexchange.com/questions/419288/microtypecontext-with-lualatex
% Therefore, we do not copy the font but load it anew.
%    \begin{macrocode}
%<luatex-def>    \MT@exp@two@c\MT@lua@copyfont\meaning\font@name\@nil
%<debug>\MT@dinfo1{creating new copy: \MT@font@copy}%
%    \end{macrocode}
% Since it's a new font, we have to remove it from the context lists.
%    \begin{macrocode}
    \MT@map@clist@c\MT@active@features{%
      \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else
        \def\@tempa{##1}%
        \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@rem@from@list
      \fi
    }%
  \fi
  \MT@exp@two@c\let\MT@font\MT@font@copy
%    \end{macrocode}
% We only need the font identifier for letterspacing.
%    \begin{macrocode}
  \let\font@name\MT@font@copy
%    \end{macrocode}
% But we have to properly substitute the font after we're done.
%    \begin{macrocode}
  \aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@rem@from@list}
%    \begin{macrocode}
\def\MT@rem@from@list#1{%
  \MT@exp@cs\ifx{MT@\@tempa @#1font@list}\relax\else
    \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter
       \MT@font \csname MT@\@tempa @#1font@list\endcsname
  \fi
}
%<pdftex-def>}\relax
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@lua@copy@font}
% \meta{\#1} and \meta{\#2} are `|select|' and `|font|', respectively,
% \meta{\#3} is the font spec.
%    \begin{macrocode}
%<luatex-def>\def\MT@lua@copyfont #1 #2 #3\@nil{%
%<luatex-def>  \global\expandafter\font\MT@font@copy=#3\relax}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\ifpdf\phantomsection\fi\label{exp-hack}
%\paragraph{Here's the promised dirty trick}
% for users of older \pdftex\ versions, which works around the problem that the
% use of the same font with different expansion parameters is prohibited. If
% you do not want to create a clone of the font setup (this would require
% duplicating the \file{tfm}/\file{vf} files under a new name, and writing new
% \file{fd} files and \file{map} entries), you can load a minimally larger font
% for the paragraph in question. E.g., for a document typeset in 10\,pt:
%\begin{verbatim}[gobble=2,morekeywords={[0]{\expandpar}}]
% \SetExpansion
%    [ stretch = 30,
%      shrink  = 60,
%      step    =  5 ]
%    { encoding = *,
%      size = 10.001 }
%    { }
% \newcommand{\expandpar}[1]{{%
%    \fontsize{10.001}{\baselineskip}\selectfont #1\par}}
% % ...
% \expandpar{This paragraph contains an `unnecessary' widow.}
%\end{verbatim}
% Note that the \cmd\expandpar\ command can only be applied to complete
% paragraphs. If you are using Computer Modern Roman, you have to load the
% \pkg{fix-cm} package to be able to select fonts in arbitrary sizes. Finally,
% the reason I suggest to use a larger font, and not a smaller one, is to
% prevent a different design size being selected.
%
%\bigskip
%\begin{macro}{\MT@fix@fontdimen@six}
%\changes{v1.8}{2005/05/03}{new macro: test whether \fontdim6 is defined}
%\changes{v2.3e}{2009/08/31}{fix: gobbling settings with tracking failed
%                            (reported by \contributor Leo <sdl.web\at gmail.com>)}
%                                             ^^A MID: <m0vdk4g8t2.fsf@cam.ac.uk>
%\changes{v2.8}{2020/05/25}{try to fix zero \fontdim6}
%\begin{macro}{\MT@dimen@six}
% If \fontdim6 is zero, character protrusion, spacing, kerning and tracking
% won't work, and we could skip the settings (for example, the \pkg{dsfont}
% fonts don't specify this dimension; this is probably a bug -- the \pkg{fourier}
% and \pkg{newpx}/\pkg{newtx} packages have been fixed in the meantime).
% However, we can fix it ourselves -- only tracking still doesn't work (it seems
% that \cmd\letterspacefont\ uses the \fontdim6 from the original font).
% \xetex\ doesn't provide an equivalent to \cmd\pdffontsize, so we use the
% nominal size instead.
%    \begin{macrocode}
%<*pdftex-def|luatex-def|xetex-def>
\def\MT@fix@fontdimen@six{%
  \ifnum\fontdimen6\MT@font=\z@
    \fontdimen6\MT@font=%
%<pdftex-def>      \pdffontsize\MT@font
%<luatex-def>      \MT@requires@luatex4{\pdffeedback fontsize}{\pdffontsize}\MT@font
%<xetex-def>      \MT@size pt
    \MT@info{Fixing zero \string\fontdimen 6 for font `\MT@@font'\MessageBreak
             (new value: \the\fontdimen6\MT@font)}%
    \MT@glet@nc{\MT@@font-fake6}\@empty
  \fi
  \edef\MT@dimen@six{\number\fontdimen6\MT@font}%
}
%</pdftex-def|luatex-def|xetex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@split@name}
%\changes{v1.7}{2005/02/27}{don't define \cs{MT@encoding} \&c. \cmd\global ly}
%\changes{v2.0}{2006/12/19}{adjust to possible letterspacing}
%\begin{macro}{\MT@encoding}
%\begin{macro}{\MT@family}
%\begin{macro}{\MT@series}
%\begin{macro}{\MT@shape}
%\begin{macro}{\MT@size}
% Split up the font name (\meta{\#6} may be a protrusion\slash expansion
% context and/or a letterspacing amount). ^^A really?
% With \pkg{fontspec} we also need to remove its internal instance counter.
%    \begin{macrocode}
%<*package>
\def\MT@split@name#1/#2/#3/#4/#5/#6\@nil{%
  \def\MT@encoding{#1}%
  \ifMT@fontspec
    \edef\MT@family{\MT@scrubfeature#2()\relax}%
  \else
    \def\MT@family{#2}%
  \fi
  \def\MT@series  {#3}%
  \def\MT@shape   {#4}%
  \def\MT@size    {#5}%
  \MT@fix@fontdimen@six
%    \end{macrocode}
%\begin{macro}{\MT@familyalias}
% Alias family?
%\changes{v1.2}{2004/09/29}{define alias font name as an alternative, not
%                          as a replacement}
%    \begin{macrocode}
  \MT@ifdefined@n@TF{MT@\MT@family @alias}%
    {\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}%
    {\let\MT@familyalias\@empty}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@scrubfeature}
%\begin{macro}{\MT@scrubfeatures}
% Remove one resp. all feature counters (\pkg{fontspec}).
%\changes{v2.5}{2010/02/27}{compatibility with \pkg{fontspec}: remove its internal counter}
%    \begin{macrocode}
\def\MT@scrubfeature#1(#2)#3\relax{#1}
\def\MT@scrubfeatures#1(#2)#3\relax{%
  #1%
  \ifx\relax#3\relax\else
    \MT@scrubfeatures#3\relax
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifMT@do}
%\begin{macro}{\MT@feat}
%\begin{macro}{\MT@maybe@do}
% We check all features of the current font against the lists of the currently
% active font set, and set \cs{ifMT@do} accordingly.
%\changes{v1.2}{2004/09/29}{also check for alias font name}
%\changes{v1.9}{2005/09/28}{redone}
%    \begin{macrocode}
\newif\ifMT@do
\def\MT@maybe@do#1{%
%    \end{macrocode}
% (but only if the feature isn't globally set to false)
%    \begin{macrocode}
  \csname ifMT@\csname MT@abbr@#1\endcsname\endcsname
%    \end{macrocode}
% Begin with setting micro-typography to true for this font. The
% \cs{MT@checklist@...} tests will set it to false if the property is not in
% the list. The first non-empty list that does not contain a match will stop us
% (except for |font|).
%    \begin{macrocode}
    \MT@dotrue
    \edef\@tempa{\csname MT@#1@setname\endcsname}%
    \MT@map@clist@n{font,encoding,family,series,shape,size}{%
      \MT@ifdefined@n@TF{MT@checklist@##1}%
        {\csname MT@checklist@##1\endcsname}%
        {\MT@checklist@{##1}}%
      {#1}%
    }%
  \else
    \MT@dofalse
  \fi
  \ifMT@do
%    \end{macrocode}
% \cs{MT@feat} stores the current feature.
%    \begin{macrocode}
    \def\MT@feat{#1}%
    \csname MT@set@#1@codes\endcsname
  \else
    \MT@ifstreq{#1}{tr}%
      {\let\MT@info@notracking\MT@info@notracking@}%
      {\MT@vinfo{... No \@nameuse{MT@abbr@#1}}}%
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@info@notracking}
%\begin{macro}{\MT@info@notracking@}
%\changes{v2.7a}{2017/11/17}{defer `No tracking' message}
% To defer the message to after the font has actually been logged.
%    \begin{macrocode}
\let\MT@info@notracking\relax
\def\MT@info@notracking@{\MT@vinfo{... No tracking}}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@dinfo@list}
%    \begin{macrocode}
%<debug>\def\MT@dinfo@list#1#2#3{\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: #2
%<debug>  \ifx\\#3\\list empty\else `\@nameuse{MT@#2}' #3 list\fi}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@checklist@}
% The generic test (\meta{\#1} is the axis, \meta{\#2} the feature, \cmd\@tempa\
% contains the set name).
%    \begin{macrocode}
\def\MT@checklist@#1#2{%
%<!debug>  \MT@ifdefined@n@T
%<debug>  \MT@ifdefined@n@TF
      {MT@#2list@#1@\@tempa}{%
%    \end{macrocode}
% Begin a (neatly masqueraded) \cmd\expandafter\ orgy to test whether the font
% attribute is in the list.
%    \begin{macrocode}
    \expandafter\MT@exp@one@n\expandafter\MT@in@clist
      \csname MT@#1\expandafter\endcsname
      \csname MT@#2list@#1@\@tempa\endcsname
    \ifMT@inlist@
%<debug>\MT@dinfo@list{#2}{#1}{in}%
      \MT@dotrue
    \else
%<debug>\MT@dinfo@list{#2}{#1}{not in}%
      \MT@dofalse
      \expandafter\MT@clist@break
    \fi
  }%
%    \end{macrocode}
% If no limitations have been specified, \ie, the list for a font attribute
% has not been defined at all, the font should be set up.
%    \begin{macrocode}
%<debug>  {\MT@dinfo@list{#2}{#1}{}}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@checklist@family}
% Also test for the alias font, if the original font is not in the list.
%\changes{v1.4b}{2004/11/22}{fix: don't try alias family name if encoding failed}
%\changes{v1.9}{2005/07/12}{fix: add two missing \cmd\expandafter s}
%    \begin{macrocode}
\def\MT@checklist@family#1{%
%<!debug>  \MT@ifdefined@n@T
%<debug>  \MT@ifdefined@n@TF
      {MT@#1list@family@\@tempa}{%
    \MT@exp@two@n\MT@in@clist
        \MT@family{\csname MT@#1list@family@\@tempa\endcsname}%
    \ifMT@inlist@
%<debug>\MT@dinfo@list{#1}{family}{in}%
      \MT@dotrue
    \else
%<debug>\MT@dinfo@list{#1}{family}{not in}%
      \MT@dofalse
      \ifx\MT@familyalias\@empty \else
        \MT@exp@two@n\MT@in@clist
            \MT@familyalias{\csname MT@#1list@family@\@tempa\endcsname}%
        \ifMT@inlist@
%<debug>  \MT@dinfo@list{#1}{family alias}{in}%
          \MT@dotrue
%<debug>\else\MT@dinfo@list{#1}{family alias}{not in}%
        \fi
      \fi
    \fi
    \ifMT@do \else
      \expandafter\MT@clist@break
    \fi
  }%
%<debug>  {\MT@dinfo@list{#1}{family}{}}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@checklist@size}
% Test whether font size is in list of size ranges.
%    \begin{macrocode}
\def\MT@checklist@size#1{%
%<!debug>  \MT@ifdefined@n@T
%<debug>  \MT@ifdefined@n@TF
      {MT@#1list@size@\@tempa}{%
    \MT@exp@cs\MT@in@rlist{MT@#1list@size@\@tempa}%
    \ifMT@inlist@
%<debug>\MT@dinfo@list{#1}{size}{in}%
      \MT@dotrue
    \else
%<debug>\MT@dinfo@list{#1}{size}{not in}%
      \MT@dofalse
      \expandafter\MT@clist@break
    \fi
  }%
%<debug>  {\MT@dinfo@list{#1}{size}{}}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@checklist@font}
% If the font matches, we skip the rest of the test.
%    \begin{macrocode}
\def\MT@checklist@font#1{%
%<!debug>  \MT@ifdefined@n@T
%<debug>  \MT@ifdefined@n@TF
      {MT@#1list@font@\@tempa}{%
%    \end{macrocode}
% Since \cs{MT@font} may be appended with context and/or letterspacing specs,
% we construct the name from the font characteristics.
%\changes{v2.2}{2007/07/03}{fix: construct font name from characteristics}
%    \begin{macrocode}
    \edef\@tempb{\MT@encoding/\MT@family/\MT@series/\MT@shape/\MT@size}%
    \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter
      \@tempb \csname MT@#1list@font@\@tempa\endcsname
    \ifMT@inlist@
%<debug>\MT@dinfo@list{#1}{font}{in}%
      \expandafter\MT@clist@break
    \else
%<debug>\MT@dinfo@list{#1}{font}{not in}%
      \MT@dofalse
    \fi
  }%
%<debug>  {\MT@dinfo@list{#1}{font}{}}%
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Protrusion}
%
%\begin{macro}{\ifMT@nofamily}
% Info for settings that are not family-specific.
% (Warnings seem to be too irritating.) ^^A at least one thing I found out in the ridiculously long `beta' phase
% The switch is set in \cs{MT@next@listname}.
%\changes{v2.5}{2011/05/28}{info if settings are not family-specific
%                          (suggested by \contributor H\`an \thanhthe{} Th\`anh <thanh\at river-valley.org>)}
%                          ^^A private mail, 2010/09/07
%                          ^^A (beta:07)
%    \begin{macrocode}
\newif\ifMT@nofamily
%</package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@protrusion}
% Set up for protrusion?
%    \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\def\MT@protrusion{\MT@maybe@do{pr}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@pr@codes}
% This macro is called by \cs{MT@setupfont}, and does all the work for setting
% up a font for protrusion.
%\changes{v1.5}{2004/12/10}{adjust protrusion factors before setting the inheriting
%                           characters}
%\changes{v1.6}{2004/12/18}{introduce \texttt{factor} option}
%    \begin{macrocode}
\def\MT@set@pr@codes{%
  \MT@nofamilyfalse
%    \end{macrocode}
% Check whether and if, which list should be applied to the current font.
% If family-specific settings don't exist, we write it to the log
%\changes{v2.5}{2013/02/05}{make info about generic settings encoding-specific
%                           (reported by \contributor Sebastian Schubert <schubert.seb\at googlemail.com>)}
%                           ^^A private mail, 2013/01/24
% (for each encoding).
%    \begin{macrocode}
  \MT@if@list@exists{%
    \ifMT@nofamily
      \MT@ifdefined@n@TF{\MT@encoding-\MT@family-settings}\relax{%
        \MT@info@nl{Loading generic protrusion settings for font family\MessageBreak
                    `\MT@family' (encoding: \MT@encoding).\MessageBreak
                    For optimal results, create family-specific settings.\MessageBreak
                    See the microtype manual for details}%
        \MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty
      }%
    \fi
    \MT@get@opt
    \MT@reset@pr@codes
%    \end{macrocode}
% Get the name of the inheritance list and parse it.
%    \begin{macrocode}
    \MT@get@inh@list
%    \end{macrocode}
% Set an input encoding?
%    \begin{macrocode}
    \MT@set@inputenc{c}%
%    \end{macrocode}
% Load additional lists?
%    \begin{macrocode}
    \MT@load@list\MT@pr@c@name
    \MT@set@listname
%    \end{macrocode}
% Load the main list.
%    \begin{macrocode}
    \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}%
    \expandafter\MT@set@codes\@tempc,\relax,%
  }\MT@reset@pr@codes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@all@pr}
%\changes{v2.2}{2007/06/16}{(et al.) allow empty values}
% Set all protrusion codes of the font.
%\changes{v2.5}{2011/08/19}{fix: remove space
%                           (found by \contributor Meho~R <meho.2005\at gmail.com>)}
%                            ^^A MID: <b3c1627e-192f-4004-ab46-4ea86925e298@dc3g2000vbb.googlegroups.com>
%                            ^^A https://tex.stackexchange.com/questions/25036/microtype-package-v-2-5-beta-06-and-footnote-protrusion
%                            ^^A (beta:08)
%    \begin{macrocode}
\def\MT@set@all@pr#1#2{%
%<debug>\MT@dinfo@nl{3}{-- lp/rp: setting all to #1/#2}%
  \let\MT@temp\@empty
  \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1}}%
  \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\rpcode\MT@font\@tempcnta=#2}}%
  \MT@do@font\MT@temp
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@reset@pr@codes@}
%\begin{macro}{\MT@reset@pr@codes}
% All protrusion codes are zero for new fonts. However, if we have to reload
% the font due to different contexts, we have to reset them.
% This command will be changed by \cs{microtypecontext} if necessary.
%    \begin{macrocode}
\def\MT@reset@pr@codes@{\MT@set@all@pr\z@\z@}
\let\MT@reset@pr@codes\relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@the@pr@code}
%\begin{macro}{\MT@the@pr@code@tr}
%\changes{v2.2}{2007/04/05}{adjust protrusion of letterspaced fonts}
% If the font is letterspaced, we have to add half the letterspacing amount to
% the margin kerns. This will be activated in \cs{MT@set@tr@codes}.
%    \begin{macrocode}
\def\MT@the@pr@code{\@tempcntb}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex6
%<luatex-def>\MT@requires@luatex3
  {\def\MT@the@pr@code@tr{%
    \numexpr\@tempcntb+\MT@letterspace@/2\relax
  }
}\relax
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@set@codes}
%\changes{v2.3a}{2007/12/29}{generalised}
% Split up the values and set the codes.
%    \begin{macrocode}
\def\MT@set@codes#1,{%
  \ifx\relax#1\@empty\else
    \MT@split@codes #1==\relax
    \expandafter\MT@set@codes
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@split@codes}
%\changes{v1.1}{2004/09/13}{fix: allow zero and negative values}
%\changes{v1.8}{2005/05/25}{get character width once only}
% The \pkg{keyval} package would remove spaces here, which we needn't do since
% \cs{SetProtrusion} ignores spaces in the protrusion list anyway.
% \cs{MT@get@char@unit} may mean different things.
%    \begin{macrocode}
\def\MT@split@codes#1=#2=#3\relax{%
  \def\@tempa{#1}%
  \ifx\@tempa\@empty \else
    \MT@get@slot
%<pdftex-def|luatex-def>    \ifnum\MT@char > \m@ne
%<xetex-def>    \ifx\MT@char\@empty \else
      \MT@get@char@unit
      \csname MT@\MT@feat @split@val\endcsname#2\relax
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@pr@split@val}
%    \begin{macrocode}
\def\MT@pr@split@val#1,#2\relax{%
  \def\@tempb{#1}%
  \MT@ifempty\@tempb\relax{%
    \MT@scale@to@em
    \lpcode\MT@font\MT@char=\MT@the@pr@code
%<debug>\MT@dinfo@nl{4}{;;; lp (\MT@char): \number\lpcode\MT@font\MT@char\space: [#1]}%
  }%
  \def\@tempb{#2}%
  \MT@ifempty\@tempb\relax{%
    \MT@scale@to@em
    \rpcode\MT@font\MT@char=\MT@the@pr@code
%<debug>\MT@dinfo@nl{4}{;;; rp (\MT@char): \number\rpcode\MT@font\MT@char\space: [#2]}%
  }%
%    \end{macrocode}
% Now we can set the values for the inheriting characters. Their slot numbers
% are saved in the macro |\MT@inh@|\meta{list name}|@|\meta{slot number}|@|.
%    \begin{macrocode}
  \MT@ifdefined@c@T\MT@pr@inh@name{%
    \MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{%
      \MT@exp@cs\MT@map@tlist@c
        {MT@inh@\MT@pr@inh@name @\MT@char @}%
        \MT@set@pr@heirs
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@scale@to@em}
% Since \pdftex\ version 0.14h, we have to adjust the protrusion factors (\ie,
% convert numbers from thousandths of character width to thousandths of an em
% of the font). We have to do this \emph{before} setting the inheriting
% characters, so that the latter inherit the absolute value, not the relative
% one if they have a differing width (\eg, the `ff' ligature).
%\changes{v1.5}{2004/12/10}{don't use \cmd\lpcode\ and \cmd\rpcode\ for the
%                           calculation}
% Unlike \file{protcode.tex} and \pkg{pdfcprot}, we do not calculate with
% \cs{lpcode} resp. \cs{rpcode}, since this would disallow protrusion factors
% larger than the character width (since \cs{[lr]pcode}'s limit is 1000). Now,
% the maximum protrusion is \EM{1} of the font.
%
% The unit is in \cs{MT@count}, the desired factor in \cmd\@tempb, and the
% result will be returned in \cmd\@tempcntb.
%    \begin{macrocode}
%<pdftex-def>\MT@requires@pdftex3{
\def\MT@scale@to@em{%
  \@tempcntb=\MT@count\relax
%    \end{macrocode}
% For really huge fonts (100\,pt or so), an arithmetic overflow could occur
% with vanilla \TeX. Using \etex, this can't happen, since the intermediate
% value is 64\,bit, which could only be reached with a character width larger
% than \cs{maxdimen}.
%    \begin{macrocode}
  \MT@scale\@tempcntb \@tempb \MT@dimen@six
  \ifnum\@tempcntb=\z@ \else
    \MT@scale@factor
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@charwd}
% Get the width of the character. When using \etex, we can employ
% \cmd\fontcharwd\ instead of building scratch boxes.
%\changes{v1.6}{2005/01/19}{use \etex's \cmd\fontcharwd, if available}
%\changes{v1.8}{2005/05/25}{warning for missing (resp. zero-width) characters}
%    \begin{macrocode}
\def\MT@get@charwd{%
%<*pdftex-def>
^^X  \MT@count=\fontcharwd\MT@font\MT@char\relax
^^Q  \setbox\z@=\hbox{\MT@font \char\MT@char}%
^^Q  \MT@count=\wd\z@
%</pdftex-def>
%<luatex-def>  \MT@count=\fontcharwd\MT@font\MT@char\relax
%    \end{macrocode}
% \cs{MT@char} contains a slot number (legacy fonts), a Unicode number,
% or a glyph name (if \cs{MT@char@} is negative).
%    \begin{macrocode}
%<*xetex-def>
  \ifnum\MT@char@<\z@
    \setbox\z@=\hbox{\MT@font \XeTeXglyph-\MT@char@}%
    \MT@count=\wd\z@
  \else
    \MT@count=\fontcharwd\MT@font\MT@char@\relax
  \fi
%</xetex-def>
  \ifnum\MT@count=\z@ \MT@info@missing@char \fi
}
%    \end{macrocode}
%\changes{v2.2}{2007/04/05}{subtract letterspacing amount from width}
% For letterspaced fonts, we have to subtract the letterspacing amount from the
% characters' widths. The protrusion amounts will be adjusted in
% \cs{MT@set@pr@codes}.
% The letterspaced font is already loaded so that \EM{1} = \fontdim6.
%    \begin{macrocode}
%<*pdftex-def>
\MT@requires@pdftex6{
  \g@addto@macro\MT@get@charwd{%
    \MT@ifdefined@c@T\MT@letterspace@
      {\advance\MT@count -\dimexpr\MT@letterspace@ sp *\dimexpr 1em/1000\relax}%
  }
}\relax
}{
%    \end{macrocode}
%\end{macro}
% No adjustment with versions 0.14f and 0.14g.
%    \begin{macrocode}
\def\MT@scale@to@em{%
  \MT@count=\@tempb\relax
  \ifnum\MT@count=\z@ \else
    \MT@scale@factor
  \fi
}
%    \end{macrocode}
% We need this in \cs{MT@warn@code@too@large} (neutralised).
%    \begin{macrocode}
\def\MT@get@charwd{\MT@count=\MT@dimen@six}
}
%</pdftex-def>
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\begin{macro}{\MT@get@font@dimen}
% For the |space| unit.
%\changes{v1.9d}{2006/02/13}{warning for zero fontdimen}
%    \begin{macrocode}
%<*package>
\def\MT@get@font@dimen#1{%
  \ifnum\fontdimen#1\MT@font=\z@
    \MT@warning@nl{Font `\MT@@font' does not specify its\MessageBreak
      \@backslashchar fontdimen #1 (it's zero)!\MessageBreak
      You should use a different `unit' for \MT@curr@list@name}%
  \else
    \MT@count=\fontdimen#1\MT@font
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@info@missing@char}
%\changes{v1.9a}{2005/11/17}{info instead of warning
%                (after \contributor Michael Hoppe <mh\at michael-hoppe.de> reported that
%                 the `fl' ligature is missing in Palatino <SC>)}
%                 ^^A MID: <1h64d0x.16xsx9n1151dieN%mh@michael-hoppe.de>
% Info about missing characters, or characters with zero width.
%\changes{v2.5}{2010/11/11}{fix error message for \xetex\
%                           (reported by \contributor Juan Acevedo <juan.acevedo.juan\at gmail.com>)}
%                           ^^A <http://permalink.gmane.org/gmane.comp.tex.xetex/17202>
%                           ^^A (beta:05)
%\changes{v2.7b}{2018/02/20}{fix message for glyphs specified as names in \xetex\
%                            (reported by \contributor Paolo Ney <@\at @>)}
%                            ^^A https://tex.stackexchange.com/questions/416310/problem-of-amsart-and-microtype-under-xelatex
%    \begin{macrocode}
\def\MT@info@missing@char{%
  \MT@info@nl{Character `\the\MT@toks'
^^X   \ifnum\MT@char@<\z@ is missing\else
^^X     \iffontchar\MT@font\MT@char@
               has a width of 0pt
^^X      \else is missing\fi\fi
^^Q    \MessageBreak (it's probably missing)
    \MessageBreak in font `\MT@@font'.\MessageBreak
    Ignoring protrusion settings for this character}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@scale@factor}
%\changes{v1.5}{2004/12/10}{warning for factors outside limits}
%\changes{v1.9}{2005/09/28}{generalised}
% Furthermore, we might have to multiply with a factor.
%    \begin{macrocode}
\def\MT@scale@factor{%
  \ifnum\csname MT@\MT@feat @factor@\endcsname=\@m \else
    \expandafter\MT@scale\expandafter \@tempcntb
      \csname MT@\MT@feat @factor@\endcsname \@m
  \fi
  \ifnum\@tempcntb>\csname MT@\MT@feat @max\endcsname\relax
    \MT@exp@cs\MT@warn@code@too@large{MT@\MT@feat @max}%
  \else
    \ifnum\@tempcntb<\csname MT@\MT@feat @min\endcsname\relax
      \MT@exp@cs\MT@warn@code@too@large{MT@\MT@feat @min}%
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@code@too@large}
% Type out a warning if a chosen protrusion factor is too large after the
% conversion. As a special service, we also type out the maximum amount that
% may be specified in the configuration.
%\changes{v1.7}{2005/02/17}{new macro: type out maximum protrusion factor}
%\changes{v1.9b}{2006/01/03}{fix calculation with present factor}
%    \begin{macrocode}
\def\MT@warn@code@too@large#1{%
  \@tempcnta=#1\relax
  \ifnum\csname MT@\MT@feat @factor@\endcsname=\@m \else
    \expandafter\MT@scale\expandafter\@tempcnta\expandafter
      \@m \csname MT@\MT@feat @factor@\endcsname
  \fi
  \MT@scale\@tempcnta \MT@dimen@six \MT@count
  \MT@warning@nl{The \@nameuse{MT@abbr@\MT@feat} code \@tempb\space
    is too large for character\MessageBreak
    `\the\MT@toks' in \MT@curr@list@name.\MessageBreak
    Setting it to the maximum of \number\@tempcnta}%
  \@tempcntb=#1\relax
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@opt}
% The optional argument to the configuration commands (except for
% \cs{SetExpansion} and \cs{SetTracking}, which are being dealt with
% in \cs{MT@get@ex@opt} and \cs{MT@get@tr@opt}, resp.).
%    \begin{macrocode}
\def\MT@get@opt{%
  \MT@set@listname
%    \end{macrocode}
%\begin{macro}{\MT@pr@factor@}
%\begin{macro}{\MT@sp@factor@}
%\begin{macro}{\MT@kn@factor@}
% Apply a factor?
%    \begin{macrocode}
  \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}{%
    \MT@let@nn{MT@\MT@feat @factor@}
        {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}%
    \MT@vinfo{... : Multiplying \@nameuse{MT@abbr@\MT@feat} codes by
                    \number\csname MT@\MT@feat @factor@\endcsname/1000}%
  }{%
    \MT@let@nn{MT@\MT@feat @factor@}{MT@\MT@feat @factor}%
  }%
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@pr@unit@}
%\begin{macro}{\MT@sp@unit@}
%\begin{macro}{\MT@kn@unit@}
% The |unit| can only be evaluated here, since it might be font-specific.
% If it's \cmd\@empty, it's relative to character widths, if it's \textminus1,
% relative to space dimensions.
%    \begin{macrocode}
  \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{%
    \MT@let@nn{MT@\MT@feat @unit@}%
        {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}%
    \MT@exp@cs\ifx{MT@\MT@feat @unit@}\@empty
      \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} codes
                      relative to character widths}%
    \else
      \MT@exp@cs\ifx{MT@\MT@feat @unit@}\m@ne
        \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} codes
                        relative to width of space}%
      \fi
    \fi
  }{%
    \MT@let@nn{MT@\MT@feat @unit@}{MT@\MT@feat @unit}%
  }%
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@space@unit}
%\begin{macro}{\MT@get@char@unit}
% The codes are either relative to character widths, or to a fixed width.
% For spacing and kerning lists, they may also be relative to the width of
% the interword glue.
% Only the setting from the top list will be taken into account.
%    \begin{macrocode}
  \let\MT@get@char@unit\relax
  \let\MT@get@space@unit\@gobble
  \MT@exp@cs\ifx{MT@\MT@feat @unit@}\@empty
    \let\MT@get@char@unit\MT@get@charwd
  \else
    \MT@exp@cs\ifx{MT@\MT@feat @unit@}\m@ne
      \let\MT@get@space@unit\MT@get@font@dimen
    \else
      \MT@exp@cs\MT@get@unit{MT@\MT@feat @unit@}%
    \fi
  \fi
%    \end{macrocode}
%\end{macro}
%\end{macro}
% Preset all characters? If so, we surely don't need to reset, too.
%\changes{v1.9}{2005/10/08}{new key `\texttt{preset}' to set all characters to
%                           the specified value before loading the lists}
%\changes{v1.9d}{2006/02/13}{set list name before presetting}
%\changes{v1.9d}{2006/02/18}{optimise: don't reset when \texttt{preset} option is set}
%    \begin{macrocode}
  \MT@ifdefined@n@T{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{%
    \csname MT@preset@\MT@feat\endcsname
    \MT@let@nc{MT@reset@\MT@feat @codes}\relax
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@unit}
%\changes{v1.8}{2005/04/14}{new macro: get unit for codes}
%\begin{macro}{\MT@get@unit@}
% If |unit| contains an |em| or |ex|, we use the corresponding \cmd\fontdimen\
% to obtain the real size. Simply converting the em into points might give a
% wrong result, since the font probably isn't set up yet, so that these
% dimensions haven't been updated, either.
%    \begin{macrocode}
\def\MT@get@unit#1{%
  \expandafter\MT@get@unit@#1 e!\@nil
  \ifx\x\@empty\else\let#1\x\fi
  \@defaultunits\@tempdima#1 pt\relax\@nnil
  \ifdim\@tempdima=\z@
    \MT@warning@nl{%
      Cannot set \@nameuse{MT@abbr@\MT@feat} factors relative to zero\MessageBreak
      width. Setting factors of list `\@nameuse{MT@\MT@feat @c@name}'\MessageBreak
      relative to character widths instead}%
    \let#1\@empty
    \let\MT@get@char@unit\MT@get@charwd
  \else
    \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} factors relative
                    to \the\@tempdima}%
    \MT@count=\@tempdima\relax
  \fi
}
\def\MT@get@unit@#1e#2#3\@nil{%
  \ifx\\#3\\\let\x\@empty \else
    \if m#2%
      \edef\x{#1\fontdimen6\MT@font}%
    \else
      \if x#2%
        \edef\x{#1\fontdimen5\MT@font}%
      \fi
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@set@inputenc}
% The configurations may be under the regime of an input encoding.
%    \begin{macrocode}
\def\MT@set@inputenc#1{%
%    \end{macrocode}
%\begin{macro}{\MT@cat}
% We remember the current category (|c| or |inh|), in case of warnings later.
%    \begin{macrocode}
  \def\MT@cat{#1}%
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
  \edef\@tempa{MT@\MT@feat @#1@\csname MT@\MT@feat @#1@name\endcsname @inputenc}%
  \MT@ifdefined@n@T\@tempa\MT@set@inputenc@
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@inputenc@}
%\changes{v2.2}{2007/06/08}{only load \pkg{inputenc} files if necessary}
% More recent versions of \pkg{inputenc} remember the current encoding, so that
% we can test whether we really have to load the encoding file.
%    \begin{macrocode}
\MT@addto@setup{%
  \@ifpackageloaded{inputenc}{%
    \@ifpackagelater{inputenc}{2006/02/22}{%
      \def\MT@set@inputenc@{%
        \MT@ifstreq\inputencodingname{\csname\@tempa\endcsname}\relax
          \MT@load@inputenc
      }%
    }{%
      \let\MT@set@inputenc@\MT@load@inputenc
    }%
  }{%
    \def\MT@set@inputenc@{%
      \MT@warning@nl{Key `inputenc' used in \MT@curr@list@name, but the `inputenc'
          \MessageBreak package isn't loaded. Ignoring input encoding}%
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@load@inputenc}
% Set up normal catcodes, since, \eg, \pkg{listings} would otherwise want to
% actually typeset the \pkg{inputenc} file when it is being loaded inside a
% listing.
%\changes{v2.0}{2006/09/15}{sanitise catcodes before loading input encoding
%                            (problem with \pkg{listings})}
%    \begin{macrocode}
\def\MT@load@inputenc{%
  \MT@cfg@catcodes
%<debug>\MT@dinfo@nl{1}{loading input encoding: \@nameuse{\@tempa}}%
  \inputencoding{\@nameuse{\@tempa}}%
}
%</package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@pr@heirs}
% Set the inheriting characters.
%    \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\def\MT@set@pr@heirs#1{%
  \lpcode\MT@font #1=\lpcode\MT@font\MT@char\relax
  \rpcode\MT@font #1=\rpcode\MT@font\MT@char\relax
%<debug>\MT@dinfo@nl{2}{-- heir of \MT@char: #1}%
%<debug>\MT@dinfo@nl{4}{;;; lp/rp (#1): \number\lpcode\MT@font\MT@char\space/%
%<debug>                                \number\rpcode\MT@font\MT@char\space}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@preset@pr}
%\begin{macro}{\MT@preset@pr@}
% Preset characters. Presetting them relative to their widths is not allowed.
%    \begin{macrocode}
\def\MT@preset@pr{%
  \expandafter\expandafter\expandafter\MT@preset@pr@
    \csname MT@pr@c@\MT@pr@c@name @preset\endcsname\@nil
}
\def\MT@preset@pr@#1,#2\@nil{%
  \ifx\MT@pr@unit@\@empty
    \MT@warn@preset@towidth{pr}%
    \let\MT@preset@aux\MT@preset@aux@factor
  \else
    \def\MT@preset@aux{\MT@preset@aux@space2}%
  \fi
  \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}%
  \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}%
  \MT@set@all@pr\@tempa\@tempb
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@preset@aux}
%\begin{macro}{\MT@preset@aux@factor}
%\begin{macro}{\MT@preset@aux@space}
%\changes{v2.2}{2007/06/16}{generalised}
% Auxiliary macro for presetting. Store value \meta{\#1} in macro \meta{\#2}.
%    \begin{macrocode}
\def\MT@preset@aux@factor#1#2{%
  \@tempcntb=#1\relax
  \MT@scale@factor
  \edef#2{\number\@tempcntb}%
}
\def\MT@preset@aux@space#1#2#3{%
  \def\@tempb{#2}%
  \MT@get@space@unit#1%
  \MT@scale@to@em
  \edef#3{\number\@tempcntb}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@warn@preset@towidth}
%    \begin{macrocode}
\def\MT@warn@preset@towidth#1{%
  \MT@warning@nl{%
    Cannot preset characters relative to their widths\MessageBreak
    for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'. Presetting them%
    \MessageBreak relative to 1em instead}%
}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Expansion}
%
%\begin{macro}{\MT@expansion}
% Set up for expansion?
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@expansion{\MT@maybe@do{ex}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@ex@codes@s}
% Setting up font expansion is a bit different because of the \opt{selected} option.
% There are two versions of this macro.
%
% If \opt{selected}|=true|, we only apply font expansion to those fonts for which a
% list has been declared (\ie, like for protrusion).
%    \begin{macrocode}
\def\MT@set@ex@codes@s{%
  \MT@if@list@exists{%
    \MT@get@ex@opt
    \let\MT@get@char@unit\relax
    \MT@reset@ef@codes
    \MT@get@inh@list
    \MT@set@inputenc{c}%
    \MT@load@list\MT@ex@c@name
    \MT@set@listname
    \MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}%
    \expandafter\MT@set@codes\@tempc,\relax,%
    \MT@expandfont
  }\relax
}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\MT@set@ex@codes@n}
% If, on the other hand, all characters should be expanded by the same amount,
% we only take the first optional argument to \cs{SetExpansion} into account.
%\begin{macro}{\ifMT@nonselected}
% We need this boolean in \cs{MT@if@list@exists} so that no warning for missing
% lists will be issued.
%    \begin{macrocode}
%<package>\newif\ifMT@nonselected
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@set@ex@codes@n{%
  \MT@nonselectedtrue
  \MT@if@list@exists
    \MT@get@ex@opt
  {%
    \let\MT@stretch@  \MT@stretch
    \let\MT@shrink@   \MT@shrink
    \let\MT@step@     \MT@step
    \let\MT@auto@     \MT@auto
    \let\MT@ex@factor@\MT@ex@factor
  }%
  \MT@reset@ef@codes
  \MT@expandfont
  \MT@nonselectedfalse
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@ex@codes}
%\changes{v1.5}{2004/12/02}{allow non-selected font expansion}
%\changes{v1.6}{2004/12/26}{introduce \texttt{factor} option}
%\changes{v1.7}{2005/02/06}{two versions of this macro}
% Default is non-selected. It can be changed in the package options.
%    \begin{macrocode}
\let\MT@set@ex@codes\MT@set@ex@codes@n
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@expandfont}
% Expand the font. For some reason, older \luatex\ versions freeze if
% the |autoexpand| modifier is missing. Can't be bothered to find out why.
% For newer versions, we could also use the function |font.setexpansion|,
% or, in the future, \pkg{luaotfload}'s expansion font feature. ^^A https://github.com/latex3/luaotfload/commit/4907e23407c52437cca56966d11d3b4548bba585
%\iffalse
% In \luatex, we try to go the |lua| way, if the |font.setexpansion| function exists.
%\changes{v2.7d}{2019/11/17}{use \luatex\ function \texttt{font.}\penalty\exhyphenpenalty\texttt{setexpansion} if available}
%\fi
%    \begin{macrocode}
%<*luatex-def>
\MT@requires@luatex3{
\MT@requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
\ifnum\luatexversion<79
\def\MT@expandfont{%
  \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ autoexpand\relax
}
\else
\def\MT@expandfont{%
  \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@\relax
}
\fi
}{
%</luatex-def>
\def\MT@expandfont{%
  \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax
}
%<luatex-def>}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@all@ex}
%\begin{macro}{\MT@reset@ef@codes@}
% At first, all expansion factors for the characters will be set to 1000
% (respectively the |factor| of this font).
%    \begin{macrocode}
\def\MT@set@all@ex#1{%
%<debug>\MT@dinfo@nl{3}{-- ex: setting all to \number#1}%
  \MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}%
}
\def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@reset@ef@codes}
% However, this is only necessary for \pdftex\ versions prior to~1.20,
% or \luatex\ $\less$~0.90 (actually, I think, 0.87).
%\changes{v1.6a}{2005/01/30}{only reset \cmd\efcode s for older \pdftex\ versions}
%\changes{v2.7}{2017/02/13}{only reset \cmd\efcode s for older \luatex\ versions}
%    \begin{macrocode}
%<pdftex-def>\MT@requires@pdftex4
%<luatex-def>\MT@requires@luatex5
{
  \def\MT@reset@ef@codes{%
    \ifnum\MT@ex@factor@=\@m \else
      \MT@reset@ef@codes@
    \fi
  }
}{
  \let\MT@reset@ef@codes\MT@reset@ef@codes@
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ex@split@val}
% There's only one number per character.
%    \begin{macrocode}
\def\MT@ex@split@val#1\relax{%
  \@tempcntb=#1\relax
%    \end{macrocode}
% Take an optional factor into account.
%    \begin{macrocode}
  \ifnum\MT@ex@factor@=\@m \else
    \MT@scale\@tempcntb \MT@ex@factor@ \@m
  \fi
  \ifnum\@tempcntb > \MT@ex@max
    \MT@warn@ex@too@large\MT@ex@max
  \else
    \ifnum\@tempcntb < \MT@ex@min
      \MT@warn@ex@too@large\MT@ex@min
    \fi
  \fi
  \efcode\MT@font\MT@char=\@tempcntb
%<debug>\MT@dinfo@nl{4}{::: ef (\MT@char): \number\efcode\MT@font\MT@char: [#1]}%
%    \end{macrocode}
% Heirs, heirs, I love thy heirs.
%    \begin{macrocode}
  \MT@ifdefined@c@T\MT@ex@inh@name{%
    \MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{%
      \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@ex@inh@name @\MT@char @}\MT@set@ex@heirs
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@ex@too@large}
%    \begin{macrocode}
\def\MT@warn@ex@too@large#1{%
  \MT@warning@nl{Expansion factor \number\@tempcntb\space too large for
    character\MessageBreak `\the\MT@toks' in \MT@curr@list@name.\MessageBreak
    Setting it to the maximum of \number#1}%
  \@tempcntb=#1\relax
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@ex@opt}
%\changes{v1.9d}{2006/02/13}{fix: evaluate \texttt{preset}}
%\begin{macro}{\MT@ex@factor@}
%\begin{macro}{\MT@stretch@}
%\begin{macro}{\MT@shrink@}
%\begin{macro}{\MT@step@}
%\begin{macro}{\MT@auto@}
% Apply different values to this font?
%    \begin{macrocode}
\def\MT@get@ex@opt{%
  \MT@set@listname
  \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{%
    \MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}%
    \MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}%
  }{%
    \let\MT@ex@factor@\MT@ex@factor
  }%
  \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}%
  \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}%
  \MT@get@ex@opt@{step}   {Setting expansion step to \number\MT@step@}%
%<luatex-def>  \MT@requires@luatex3\relax{%
  \MT@get@ex@opt@{auto}{\MT@ifstreq{\MT@auto@}{autoexpand}{En}{Dis}abling automatic expansion}%
%<luatex-def>  }%
  \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{%
    \MT@preset@ex
    \let\MT@reset@ef@codes\relax
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@ex@opt@}
%    \begin{macrocode}
\def\MT@get@ex@opt@#1#2{%
  \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{%
    \MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}%
    \MT@vinfo{... : #2}%
  }{%
    \MT@let@nn{MT@#1@}{MT@#1}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@ex@heirs}
%    \begin{macrocode}
\def\MT@set@ex@heirs#1{%
  \efcode\MT@font#1=\efcode\MT@font\MT@char
%<debug>\MT@dinfo@nl{2}{-- heir of \MT@char: #1}%
%<debug>\MT@dinfo@nl{4}{::: ef (#1) \number\efcode\MT@font\MT@char}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@preset@ex}
%    \begin{macrocode}
\def\MT@preset@ex{%
  \@tempcntb=\csname MT@ex@c@\MT@ex@c@name @preset\endcsname\relax
  \MT@scale@factor
  \MT@set@all@ex\@tempcntb
}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Interword spacing (glue)}
%
%\begin{macro}{\MT@spacing}
% Adjustment of interword spacing? Only works with \pdftex.
%    \begin{macrocode}
%<*pdftex-def>
\MT@requires@pdftex6{
\def\MT@spacing{\MT@maybe@do{sp}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@sp@codes}
% This is all the same.
%    \begin{macrocode}
\def\MT@set@sp@codes{%
  \MT@if@list@exists{%
    \MT@get@opt
    \MT@reset@sp@codes
    \MT@get@inh@list
    \MT@set@inputenc{c}%
    \MT@load@list\MT@sp@c@name
    \MT@set@listname
    \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}%
    \expandafter\MT@set@codes\@tempc,\relax,%
  }\MT@reset@sp@codes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@sp@split@val}
% If |unit=space|, \cs{MT@get@space@unit} will be defined to fetch the
% corresponding fontdimen (2 for the first, 3 for the second and 4 for the
% third argument).
%    \begin{macrocode}
\def\MT@sp@split@val#1,#2,#3\relax{%
  \def\@tempb{#1}%
  \MT@ifempty\@tempb\relax{%
    \MT@get@space@unit2%
    \MT@scale@to@em
    \knbscode\MT@font\MT@char=\@tempcntb
%<debug>\MT@dinfo@nl{4}{;;; knbs (\MT@char): \number\knbscode\MT@font\MT@char: [#1]}%
  }%
  \def\@tempb{#2}%
  \MT@ifempty\@tempb\relax{%
    \MT@get@space@unit3%
    \MT@scale@to@em
    \stbscode\MT@font\MT@char=\@tempcntb
%<debug>\MT@dinfo@nl{4}{;;; stbs (\MT@char): \number\stbscode\MT@font\MT@char: [#2]}%
  }%
  \def\@tempb{#3}%
  \MT@ifempty\@tempb\relax{%
    \MT@get@space@unit4%
    \MT@scale@to@em
    \shbscode\MT@font\MT@char=\@tempcntb
%<debug>\MT@dinfo@nl{4}{;;; shbs (\MT@char): \number\shbscode\MT@font\MT@char: [#3]}%
  }%
  \MT@ifdefined@c@T\MT@sp@inh@name{%
    \MT@ifdefined@n@T{MT@inh@\MT@sp@inh@name @\MT@char @}{%
      \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@sp@inh@name @\MT@char @}\MT@set@sp@heirs
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@sp@heirs}
%    \begin{macrocode}
\def\MT@set@sp@heirs#1{%
  \knbscode\MT@font#1=\knbscode\MT@font\MT@char
  \stbscode\MT@font#1=\stbscode\MT@font\MT@char
  \shbscode\MT@font#1=\shbscode\MT@font\MT@char
%<debug>\MT@dinfo@nl{2}{-- heir of \MT@char: #1}%
%<debug>\MT@dinfo@nl{4}{;;; knbs/stbs/shbs (#1): \number\knbscode\MT@font\MT@char/%
%<debug>        \number\stbscode\MT@font\MT@char/\number\shbscode\MT@font\MT@char}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@all@sp}
%\begin{macro}{\MT@reset@sp@codes}
%\begin{macro}{\MT@reset@sp@codes@}
%    \begin{macrocode}
\def\MT@set@all@sp#1#2#3{%
%<debug>\MT@dinfo@nl{3}{-- knbs/stbs/shbs: setting all to #1/#2/#3}%
  \let\MT@temp\@empty
  \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbscode\MT@font\@tempcnta=#1\relax}}%
  \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\stbscode\MT@font\@tempcnta=#2\relax}}%
  \MT@ifempty{#3}\relax{\g@addto@macro\MT@temp{\shbscode\MT@font\@tempcnta=#3\relax}}%
  \MT@do@font\MT@temp
}
\def\MT@reset@sp@codes@{\MT@set@all@sp\z@\z@\z@}
\let\MT@reset@sp@codes\relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@preset@sp}
%\begin{macro}{\MT@preset@sp@}
%    \begin{macrocode}
\def\MT@preset@sp{%
  \expandafter\expandafter\expandafter\MT@preset@sp@
    \csname MT@sp@c@\MT@sp@c@name @preset\endcsname\@nil
}
\def\MT@preset@sp@#1,#2,#3\@nil{%
  \ifx\MT@sp@unit@\@empty
    \MT@warn@preset@towidth{sp}%
    \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@factor{#1}\@tempa}%
    \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@factor{#2}\@tempc}%
    \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@factor{#3}\@tempb}%
  \else
    \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@space2{#1}\@tempa}%
    \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@space3{#2}\@tempc}%
    \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@space4{#3}\@tempb}%
  \fi
  \MT@set@all@sp\@tempa\@tempc\@tempb
}
}\relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
%
%\subsubsection{Additional kerning}
%
%\begin{macro}{\MT@kerning}
% Again, only check for additional kerning for new versions of \pdftex.
%    \begin{macrocode}
\MT@requires@pdftex6{
\def\MT@kerning{\MT@maybe@do{kn}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@kn@codes}
% It's getting boring, I know.
%    \begin{macrocode}
\def\MT@set@kn@codes{%
  \MT@if@list@exists{%
    \MT@get@opt
    \MT@reset@kn@codes
    \MT@get@inh@list
    \MT@set@inputenc{c}%
    \MT@load@list\MT@kn@c@name
    \MT@set@listname
    \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}%
    \expandafter\MT@set@codes\@tempc,\relax,%
  }\MT@reset@kn@codes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@kn@split@val}
% Again, the unit may be measured in the space dimension; this time only
% \fontdim2.
%    \begin{macrocode}
\def\MT@kn@split@val#1,#2\relax{%
  \def\@tempb{#1}%
  \MT@ifempty\@tempb\relax{%
    \MT@get@space@unit2%
    \MT@scale@to@em
    \knbccode\MT@font\MT@char=\@tempcntb
%<debug>\MT@dinfo@nl{4}{;;; knbc (\MT@char): \number\knbccode\MT@font\MT@char: [#1]}%
  }%
  \def\@tempb{#2}%
  \MT@ifempty\@tempb\relax{%
    \MT@get@space@unit2%
    \MT@scale@to@em
    \knaccode\MT@font\MT@char=\@tempcntb
%<debug>\MT@dinfo@nl{4}{;;; knac (\MT@char): \number\knaccode\MT@font\MT@char: [#2]}%
  }%
  \MT@ifdefined@c@T\MT@kn@inh@name{%
    \MT@ifdefined@n@T{MT@inh@\MT@kn@inh@name @\MT@char @}{%
      \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@kn@inh@name @\MT@char @}\MT@set@kn@heirs
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@kn@heirs}
%    \begin{macrocode}
\def\MT@set@kn@heirs#1{%
  \knbccode\MT@font#1=\knbccode\MT@font\MT@char
  \knaccode\MT@font#1=\knaccode\MT@font\MT@char
%<debug>\MT@dinfo@nl{2}{-- heir of \MT@char: #1}%
%<debug>\MT@dinfo@nl{4}{;;; knbc (#1): \number\knbccode\MT@font\MT@char/%
%<debug>                               \number\knaccode\MT@font\MT@char}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@all@kn}
%\begin{macro}{\MT@reset@kn@codes}
%\begin{macro}{\MT@reset@kn@codes@}
%    \begin{macrocode}
\def\MT@set@all@kn#1#2{%
%<debug>\MT@dinfo@nl{3}{-- knac/knbc: setting all to #1/#2}%
  \let\MT@temp\@empty
  \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbccode\MT@font\@tempcnta=#1\relax}}%
  \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\knaccode\MT@font\@tempcnta=#2\relax}}%
  \MT@do@font\MT@temp
}
\def\MT@reset@kn@codes@{\MT@set@all@kn\z@\z@}
\let\MT@reset@kn@codes\relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@preset@kn}
%\begin{macro}{\MT@preset@kn@}
%    \begin{macrocode}
\def\MT@preset@kn{%
  \expandafter\expandafter\expandafter\MT@preset@kn@
    \csname MT@kn@c@\MT@kn@c@name @preset\endcsname\@nil
}
\def\MT@preset@kn@#1,#2\@nil{%
  \ifx\MT@kn@unit@\@empty
    \MT@warn@preset@towidth{kn}%
    \let\MT@preset@aux\MT@preset@aux@factor
  \else
    \def\MT@preset@aux{\MT@preset@aux@space2}%
  \fi
  \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}%
  \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}%
  \MT@set@all@kn\@tempa\@tempb
}
}\relax
%</pdftex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%
%\subsubsection{\lsstyle Tracking}
%
% This only works with \pdftex\ 1.40
%\changes{v2.5}{2010/09/17}{letterspacing with \luatex\ 0.62} ^^A (beta:03)
% or \luatex\ 0.62.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex6
%<luatex-def>\MT@requires@luatex3
{
%    \end{macrocode}
%\begin{macro}{\MT@tracking}
%\changes{v2.2}{2007/02/23}{remember fonts that shouldn't be letterspaced}
%\begin{macro}{\MT@tracking@}
%\changes{v2.2}{2007/06/16}{fix: tracking couldn't be re-enabled}
%\begin{macro}{\MT@tr@font@list}
% We only check whether a font should not be letterspaced at all, not whether
% we've already done that (because we have to do it again).
%    \begin{macrocode}
\let\MT@tr@font@list\@empty
\def\MT@tracking@{%
  \MT@exp@one@n\MT@in@clist\MT@font\MT@tr@font@list
  \ifMT@inlist@\else
    \MT@maybe@do{tr}%
    \ifMT@do\else
      \xdef\MT@tr@font@list{\MT@tr@font@list\MT@font,}%
    \fi
  \fi
}
%</pdftex-def|luatex-def>
%<pdftex-def|luatex-def|letterspace>\let\MT@tracking
%<pdftex-def|luatex-def>  \MT@tracking@
%<letterspace>  \relax
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@set@tr@codes}
% The tracking amount is determined by the optional argument to \cs{textls},
% settings from \cs{SetTracking}, or the global \opt{letterspace} option, in
% this order.
%
% Tracking won't work if the original font's \fontdim6 is zero, in which
% case we issue a warning (once for every font).
%    \begin{macrocode}
%<*pdftex-def|luatex-def|letterspace>
\def\MT@set@tr@codes{%
%<*pdftex-def|luatex-def>
  \MT@vinfo{Tracking font `\MT@@font'\on@line}%
  \MT@ifdefined@n@TF{\MT@@font-fake6}{%
    \expandafter\ifx\csname\MT@@font-fake6\endcsname\@empty
      \MT@warning@nl{%
        Font `\MT@@font' does not specify its\MessageBreak
        \@backslashchar fontdimen 6 (width of an `em')! Therefore,\MessageBreak
        \@nameuse{MT@abbr@\MT@feat} will not work with this font}%
      \MT@glet@nc{\MT@@font-fake6}\relax
    \fi
  }{%
  \MT@if@list@exists
    \MT@get@tr@opt
    \relax
%</pdftex-def|luatex-def>
  \MT@ifdefined@c@TF\MT@letterspace@\relax{\let\MT@letterspace@\MT@letterspace}%
  \ifnum\MT@letterspace@=\z@
%    \end{macrocode}
%\changes{v2.3d}{2009/03/05}{allow zero tracking}
% Zero tracking requires special treatment.
%    \begin{macrocode}
    \MT@set@tr@zero
  \else
%<pdftex-def|luatex-def>    \MT@vinfo{... Tracking by \number\MT@letterspace@}%
%    \end{macrocode}
% Letterspacing only works in <PDF> mode.
%    \begin{macrocode}
    \MT@warn@tracking@DVI
%    \end{macrocode}
%\begin{macro}{\MT@lsfont}
% The letterspaced font instances are saved in macros
% |\|\meta{font name}|/|\meta{letterspacing amount}|ls|.
%
%\changes{v2.2}{2007/03/07}{use \cmd\font@name, not \cs{MT@font}}
% In contrast to \cs{MT@font}, which may reflect the font characteristics more
% accurately (taking substitutions into account), \cmd\font@name\ is guaranteed
% to correspond to an actual font identifier.
%    \begin{macrocode}
    \xdef\MT@lsfont{\csname\expandafter\string\font@name
                           /\number\MT@letterspace@ ls\endcsname}%
    \expandafter\ifx\MT@lsfont\relax
%<debug>\MT@dinfo@nl{1}{... new letterspacing instance}%
%    \end{macrocode}
%\end{macro}
% In case of nested letterspacing with different amounts, we have to extract
% the base font again.
%    \begin{macrocode}
      \MT@get@ls@basefont
%    \end{macrocode}
%\changes{v2.6}{2013/07/15}{use \pkg{luaotfload}'s \texttt{kernfactor} feature if available}
% \pkg{luaotfload} provides the faux font feature |kernfactor|, which we will
% use when dealing with non-legacy fonts, as it is less problematic and faster
% than the \pdftex\ primitive \cmd\letterspacefont.
%    \begin{macrocode}
%<*luatex-def|letterspace>
      \MT@if@luaotf@font{%
%<luatex-def&debug>\MT@dinfo@nl{1}{... luaotf font: \MessageBreak
%<luatex-def&debug>         \expandafter\fontname\font@name}%
        \ifnum\MT@letterspace@<\z@\def\MT@minus{-}\else\let\MT@minus\@empty\fi
        \global\expandafter\font\MT@lsfont=%
          \expandafter\MT@exp@two@c\expandafter\MT@ls@fontspec@font
            \expandafter\fontname\expandafter\font@name\space \@nil
      }{%
%</luatex-def|letterspace>
%<luatex-def&debug>\MT@dinfo@nl{1}{... legacy font}%
      \global\expandafter\letterspacefont\MT@lsfont\font@name\MT@letterspace@
%<luatex-def|letterspace>      }%
%    \end{macrocode}
%\changes{v2.2}{2007/06/16}{possibility to customise interword spacing}
% Scale interword spacing (not configurable in \letterspace).
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
      \MT@ifdefined@c@TF\MT@tr@ispace
        {\let\@tempa\MT@tr@ispace}%
        {\edef\@tempa{\MT@letterspace@*,,}}%
      \MT@ifdefined@c@TF\MT@tr@ospace
        {\edef\@tempa{\@tempa,\MT@tr@ospace}}%
        {\edef\@tempa{\@tempa,,,}}%
      \expandafter\MT@tr@set@space\@tempa,%
%</pdftex-def|luatex-def>
%<*letterspace>
      % spacing = {<letterspace amount>*,,}
      \fontdimen2\MT@lsfont=\dimexpr\numexpr 1000+\MT@letterspace@\relax sp
                                            * \fontdimen2\MT@lsfont/1000\relax
%</letterspace>
%    \end{macrocode}
%\changes{v2.3}{2007/11/03}{possibility to customise outer kerning
%                           (suggested by \contributor Stephan Hennig <stephanhennig\at arcor.de>)}
%                            ^^A MID: <46aa1cbb$0$31620$9b4e6d93@newsspool3.arcor-online.net>
% Adjust outer kerning (\microtype\ only).
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
      \MT@ifdefined@c@TF\MT@tr@okern{\let\@tempa\MT@tr@okern}{\def\@tempa{*,*}}%
      \expandafter\MT@tr@set@okern\@tempa,%
%    \end{macrocode}
%\changes{v2.2}{2007/02/23}{disable ligatures in letterspaced fonts manually
%                           (due to change in \pdftex\ 1.40.4)}
% Disable ligatures (not configurable in \letterspace).
%    \begin{macrocode}
      \MT@ifdefined@c@T\MT@tr@ligatures\MT@tr@noligatures
%</pdftex-def|luatex-def>
%<*letterspace>
      % no ligatures = {f}
      \tagcode\MT@lsfont`f=\m@ne
%</letterspace>
%    \end{macrocode}
% Adjust protrusion values now, and maybe later (in \cs{MT@pr@split@val})
% (not for \luatex, though, where letterspacing does not interfere with protrusion).
%\changes{v2.3}{2007/07/27}{also adjust tracking if protrusion is not enabled,
%                           and even for \letterspace\
%                           (reported by \contributor Stephan Hennig <stephanhennig\at arcor.de>)}
%                               ^^A MID: <46a9c6c6$0$21005$9b4e6d93@newsspool1.arcor-online.net>
%\changes{v2.3b}{2008/05/12}{fix: protrusion adjustment only for new fonts
%                            (reported by \contributor Wolfram Schaalo <schaalo\at gmx.net>)}
%                                                              ^^A private mail, 2008/05/12
%    \begin{macrocode}
%<luatex-def|letterspace>      \MT@if@luaotf@font\relax{%
%<debug>\MT@dinfo@nl{2}{... compensating for tracking (\number\MT@letterspace@)}%
      \MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax
                  \rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}%
      \let\MT@the@pr@code\MT@the@pr@code@tr
%<luatex-def|letterspace>     }%
    \fi
%    \end{macrocode}
% Finally, let the letterspaced font propagate.
% With \luatex, we also need to load.
%\changes{v2.5a}{2013/05/15}{fix: load font for \pkg{fontspec}} ^^A for MT@get@slot
%    \begin{macrocode}
    \aftergroup\MT@set@lsfont
%<pdftex-def|luatex-def>    \let\MT@font\MT@lsfont
%<luatex-def>    \MT@if@luaotf@font\MT@font\relax
%    \end{macrocode}
%\begin{macro}{\MT@set@curr@ls}
%\begin{macro}{\MT@curr@ls}
% We need to remember the current letterspacing amount (for \cs{lslig}).
%    \begin{macrocode}
    \xdef\MT@set@curr@ls{\def\noexpand\MT@curr@ls{\MT@letterspace@}}%
    \aftergroup\MT@set@curr@ls
%    \end{macrocode}
%\end{macro}
%\end{macro}
% Adjust surrounding spacing and kerning.
%\begin{macro}{\MT@set@curr@os}
%\changes{v2.3}{2007/11/03}{adjusting spaces made more reliable}
% We get the current outer spacing and adjust it, then, after the end of the
% current outer group, set the current outer spacing, again, and adjust.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
    \MT@outer@space=\csname MT@outer@space\expandafter\string\font@name\endcsname\relax
    \xdef\MT@set@curr@os{\MT@outer@space=\the\MT@outer@space\relax}%
    \MT@tr@outer@l
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
% If \cs{MT@ls@adjust} is empty, it's the starred version of \cs{textls}.
% Use scaling to avoid a `Dimension too large'.
%    \begin{macrocode}
    \ifx\MT@ls@adjust\@empty
%<letterspace>      % \textls : outer kerning = {*,*} ; \textls* : outer kerning = {0,0}
      \MT@outer@kern=-\dimexpr\MT@letterspace@ sp * \fontdimen6\font@name/2000\relax
      \MT@ls@outer@k
%    \end{macrocode}
% Otherwise, get the current outer kerning and adjust it, for left and right
% side (\microtype\ only).
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
    \else
      \MT@outer@kern=\expandafter\expandafter\expandafter\@firstoftwo
                      \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax
      \ifdim\MT@outer@kern=\z@\else \MT@ls@outer@k \fi
      \MT@outer@kern=\expandafter\expandafter\expandafter\@secondoftwo
                      \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax
%</pdftex-def|luatex-def>
%<*letterspace>
      \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}%
      \MT@afteraftergroup{%
        \MT@set@curr@ok
        \noexpand\MT@ls@outer@k
      }%
%</letterspace>
    \fi
%<*pdftex-def|luatex-def>
%    \end{macrocode}
%\begin{macro}{\MT@set@curr@ok}
% Carry the outer kerning amount to outside the next group, then set outer
% spacing (which will set kerning, if no space follows).
%    \begin{macrocode}
    \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}%
%    \end{macrocode}
%\end{macro}
% Stuff to be done after the letterspace group. The \letterspace\ package
% only adjusts the kerning.
%    \begin{macrocode}
    \MT@afteraftergroup{%
      \MT@set@curr@os
      \MT@set@curr@ok
      \noexpand\MT@tr@outer@r
    }%
%</pdftex-def|luatex-def>
  \fi
%<pdftex-def|luatex-def>  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@afteraftergroup}
% This helper macro carries stuff outside of the current group to the end of
% the next group, but will then respect grouping, which is crucial for nested
% letterspacing. (Following an idea of Will Robertson.)^^A https://tex.stackexchange.com/a/56319
%\changes{v2.5a}{2013/05/15}{fix: get outer kerning and spacing of nested letterspacing right}
%    \begin{macrocode}
\def\MT@afteraftergroup#1{%
%<!letterspace>  \MT@maybe@gobble@with@tikz{%
    \MT@ifdefined@n@TF{MT@aftergroup@\number\currentgrouplevel}\relax{%
      \MT@exp@cs\xdef{MT@aftergroup@\number\currentgrouplevel}%
        {\MT@exp@cs\MT@glet{MT@aftergroup@\number\currentgrouplevel}\noexpand\@undefined#1}%
      \expandafter\aftergroup\expandafter\aftergroup\MT@exp@cs\aftergroup
        {MT@aftergroup@\number\currentgrouplevel}%
    }%
%<!letterspace>  }%
}
%</pdftex-def|luatex-def|letterspace>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ls@fontspec@colon}
%\begin{macro}{\MT@ls@fontspec@font}
%\changes{v2.6a}{2016/05/03}{fix for value of \textpm1000}
%\changes{v2.7}{2017/02/10}{fix for `\texttt{file:}\meta{font}' spec
%                            (reported by \contributor Reinhard Kotucha <reinhard.kotucha\at web.de>)}
%                            ^^A http://tug.org/pipermail/lualatex-dev/2017-February/001670.html
% Add the |kernfactor| feature to a font loaded by \pkg{fontspec}
% (we might have to add the colon ourselves).
%    \begin{macrocode}
%<*luatex-def|letterspace>
\def\MT@ls@fontspec@colon#1:#2:#3:#4\@nil{\ifx\\#3\\#1:#2\else#1:#2:#3\fi}
\def\MT@ls@fontspec@font#1 #2\@nil{%
  "\MT@ls@fontspec@colon#1:::\relax\@nil
    kernfactor=\MT@minus \ifnum\MT@letterspace@=1000 1\else 0.%
         \ifnum\MT@minus\MT@letterspace@<100 0\fi
         \ifnum\MT@minus\MT@letterspace@<10  0\fi
        \number\MT@minus\MT@letterspace@ \fi;"
  \ifx\\#2\\ at \f@size pt\else#2\fi\relax
}
%</luatex-def|letterspace>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@tr@opt}
% Various settings (only for the \microtype\ version).
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@get@tr@opt{%
  \MT@set@listname
  \let\MT@tr@factor@\@m
%    \end{macrocode}
%\begin{macro}{\MT@tr@unit@}
% Different unit (for |letterspace| and/or |(outer)spacing|)?
%\changes{v2.8}{2020/11/22}{fix: allow unit regardless whether letterspacing is set}
%    \begin{macrocode}
  \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{%
    \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}%
    \ifdim\MT@tr@unit@=1em
      \let\MT@tr@unit@\@undefined
    \else
      \MT@get@unit\MT@tr@unit@
    \fi
  }%
  \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{%
    \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}%
    \MT@ifdefined@c@T\MT@tr@unit@{%
      \let\@tempb\MT@letterspace
      \MT@scale@to@em
      \edef\MT@letterspace{\number\@tempcntb}%
    }%
  }%
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@ispace}
%\begin{macro}{\MT@tr@ospace}
% Adjust interword spacing.
%    \begin{macrocode}
  \MT@get@tr@opt@{spacing}     {ispace}%
  \MT@get@tr@opt@{outerspacing}{ospace}%
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@tr@okern}
% Adjust outer kerning.
%    \begin{macrocode}
  \MT@get@tr@opt@{outerkerning}{okern}%
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@ligatures}
% Which ligatures should we disable (empty means all, undefined none)?
%    \begin{macrocode}
  \MT@get@tr@opt@{noligatures} {ligatures}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@tr@opt@}
%    \begin{macrocode}
\def\MT@get@tr@opt@#1#2{%
  \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @#1}%
    {\MT@let@nn{MT@tr@#2}{MT@tr@c@\MT@tr@c@name @#1}}%
}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@lsfont}
% Redefine \cmd\font@name, which will be called a second later (in
% \cmd\selectfont).
%    \begin{macrocode}
%<*pdftex-def|luatex-def|letterspace>
%<plain>\MT@requires@latex2{
\def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\lsstyle}
%\changes{v2.0}{2005/09/21}{new command: letterspacing} ^^A (beta:1)
%\changes{v2.0}{2006/09/19}{fix: font switches don't pose a problem anymore} ^^A (beta:8)
%\changes{v2.0}{2006/09/21}{fix: letterspacing commands may be nested} ^^A (beta:8)
%\changes{v2.0}{2006/12/28}{totally redone, using the new \cmd\letterspacefont}
%\changes{v2.3d}{2008/11/16}{make invalid in math mode}
%\changes{v2.3d}{2009/01/07}{disable for \luatex}
% Disable the tests whether the font should be letterspaced, then trigger the
% setup.
% Only \cs{textls} can be used in math mode (\cs{lsstyle} may be used inside
% another text switch, of course).
%\changes{v2.5}{2012/11/14}{fix: ensure to set up math fonts (reported by \contributor RazorXsr <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/82686/settracking-in-the-math-environment
%\changes{v2.6}{2014/09/07}{fix: ensure to set up math fonts (reported by \contributor kleenstar <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/187655/microtype-gives-wrong-letterspacing-in-math-mode
% Still, we have to ensure that math fonts are set up again.
%\changes{v2.7}{2016/08/03}{fix: prevent infinite loop with \pkg{psnfss} and \pkg{exscale} packages
%                            (reported by \contributor user11126 <@\at @>,
%                             solution by \contributor Ulrike Fischer <fischer\at troubleshooting-tex.de>)}
%                           ^^A https://tex.stackexchange.com/questions/316231/microtype-and-exscale-crashing-in-texlive-2016#comment771828_316252
% Setting \cmd\glb@currsize\ globally to \cmd\@empty\ (our previous solution) could
% throw us into an infinite loop (\eg, with the \pkg{psnfss} packages,
% via \cmd\every@math@size), so we issue \cmd\glb@settings\ instead.
%\changes{v2.8}{2020/05/26}{fix: enforce math setup, again}
% However, in certain situations, we may still miss some math fonts, so
% let's try to also enforce it by emptying \cmd\glb@currsize, fingers crossed.
% The overhead seems small.
%    \begin{macrocode}
\DeclareRobustCommand\lsstyle{%
  \not@math@alphabet\lsstyle\textls
  \let\glb@currsize\@empty
%<pdftex-def|luatex-def>  \MT@maybe@gobble@with@tikz{\aftergroup\glb@settings}%
%<pdftex-def|luatex-def>  \def\MT@feat{tr}%
  \let\MT@tracking\MT@set@tr@codes
  \selectfont
}
%    \end{macrocode}
% Now the definitions for the \letterspace\ package with plain \TeX.
%    \begin{macrocode}
%<*plain>
}{
\def\MT@set@lsfont{\MT@lsfont}
\def\lsstyle{%
  \begingroup
  \escapechar\m@ne
  \xdef\font@name{\csname\expandafter\string\the\font\endcsname}%
  \MT@set@tr@codes
  \endgroup
}
\let\textls\@undefined
\let\lslig\@undefined
}
%</plain>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\lslig}
%\changes{v2.1}{2007/01/17}{new command: protect ligatures in letterspaced text}
%\changes{v2.2}{2007/02/25}{always defined}
%\changes{v2.3}{2007/11/03}{redone: extract outer kerns from current letterspacing
%                           amount}
% For Fraktur fonts, some ligatures shouldn't be broken up. This command will
% temporarily select the base font and insert the correct kerning.
%    \begin{macrocode}
\DeclareRobustCommand\lslig[1]{%
  {\MT@ifdefined@c@TF\MT@curr@ls{%
     \escapechar\m@ne
     \MT@get@ls@basefont
     \MT@outer@kern=\dimexpr\MT@curr@ls sp * \fontdimen6\font@name/2000\relax
     \kern\MT@outer@kern
     \font@name #1%
     \kern\MT@outer@kern
  }{#1}}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ls@basefont}
%\begin{macro}{\MT@get@ls@basefont}
%\changes{v2.1}{2007/01/19}{redone: use \cmd\pdfmatch\ to make it bullet-proof}
% \pdftex\ cannot letterspace fonts that already are letterspaced. Therefore,
% we have to save the base font in |\|\meta{font name}|@base|.
%
%\changes{v2.2}{2007/02/18}{fix again: remember base font in a macro}
% The previous solution (checking the macro's meaning with \cmd\pdfmatch),
% where we were loading the base font via the \cmd\font\ primitive again,
% would destroy all previously set up micro-typographic features of the font.
%    \begin{macrocode}
\def\MT@get@ls@basefont{%
  \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}%
  \expandafter\ifx\MT@ls@basefont\relax
    \MT@exp@two@c\MT@glet\MT@ls@basefont\font@name
  \else
%<debug>\MT@dinfo@nl{1}{... fixing base font}%
    \MT@exp@two@c\let\font@name\MT@ls@basefont
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@set@lsbasefont}
%\begin{macro}{\MT@set@tr@zero}
%\changes{v2.3d}{2009/03/05}{fix: allow switching off tracking
%                            (reported by \contributor Ulrich Dirr <ud\at mucschach.de>)}
%                                                          ^^A private mail, 2009/02/22
% If tracking is switched off in the middle of the document, or if \cs{textls}
% is called with a zero letterspacing amount, we have to retrieve the base font
% and select it.
%    \begin{macrocode}
\def\MT@set@lsbasefont{\MT@exp@two@c\let\font@name\MT@ls@basefont}
\def\MT@set@tr@zero{%
%<debug>\MT@dinfo@nl{1}{... zero tracking}%
  \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}%
  \expandafter\ifx\MT@ls@basefont\relax \else
%<debug>\MT@dinfo@nl{1}{... fixing base font}%
    \aftergroup\MT@set@lsbasefont
  \fi
}
%</pdftex-def|luatex-def|letterspace>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@tr@noligatures}
% \pdftex\ 1.40.0--1.40.3 disabled all ligatures in letterspaced fonts.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex7{
  \def\MT@tr@noligatures{%
    \ifx\MT@tr@ligatures\@empty
      \MT@noligatures@\MT@lsfont\@undefined
    \else
      \MT@noligatures@\MT@lsfont\MT@tr@ligatures
    \fi
  }
%<*pdftex-def>
}{
  \def\MT@tr@noligatures{%
    \MT@warning@nl{%
      Disabling selected ligatures is only possible since\MessageBreak
      pdftex 1.40.4. Disabling all ligatures instead}%
    \MT@glet\MT@tr@noligatures\relax
  }
}
%</pdftex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@outer@space}
% A new skip for outer spacing.
%    \begin{macrocode}
\newskip\MT@outer@space
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@set@space}
% Adjust interword spacing (\fontdim2,3,4) for inner and outer space.
% For inner spacing, the font dimensions will be adjusted, the settings for
% outer spacing will be remembered in a macro.
%\todo{don't add stretch components if \pkg{ragged2e} is active?} ^^A reported by \contributor Leo ? <sdl.web\at gmail.com>, MID: <wqlfwxsuo6h.fsf@pip.srcf.ucam.org>
%^^A or in fact, shouldn't we test whether \spaceskip<>0pt ?
%    \begin{macrocode}
\def\MT@tr@set@space#1,#2,#3,#4,#5,#6,{%
%<debug>\MT@dinfo@nl2{... orig. space: \the\fontdimen2\MT@lsfont,
%<debug>    \the\fontdimen3\MT@lsfont, \the\fontdimen4\MT@lsfont
%<debug>    \MessageBreak... (#1,#2,#3) (#4,#5,#6)}%
  \let\MT@temp\@empty
  \MT@tr@set@space@{#1}{#4}{2}\@empty
  \MT@tr@set@space@{#2}{#5}{3}\@plus
  \MT@tr@set@space@{#3}{#6}{4}\@minus
  \MT@glet@nc{MT@outer@space\expandafter\string\font@name}\MT@temp
%<debug>\MT@dinfo@nl2{... inner space: \the\fontdimen2\MT@lsfont,
%<debug>    \the\fontdimen3\MT@lsfont, \the\fontdimen4\MT@lsfont}%
%<debug>\MT@dinfo@nl2{... outer space: \MT@temp}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@set@space@}
% If settings for outer spacing \meta{\#2} don't exist, they will be inherited
% from the inner spacing settings \meta{\#1}.
%\changes{v2.8}{2020/11/24}{simplified}
%    \begin{macrocode}
\def\MT@tr@set@space@#1#2#3#4{%
  \MT@ifempty{#2}{%
    \MT@ifempty{#1}\relax{%
      \MT@tr@set@space@@{#1}{#3}{1000}%
      \fontdimen#3\MT@lsfont=\@tempdima
    }%
    \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}%
  }{%
    \MT@tr@set@space@@{#2}{#3}{2000}%
    \edef\MT@temp{\MT@temp#4\the\@tempdima}%
    \MT@ifempty{#1}\relax{%
      \MT@tr@set@space@@{#1}{#3}{1000}%
      \fontdimen#3\MT@lsfont=\@tempdima
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@set@space@@}
% If the value is followed by an asterisk, the fontdimen will be scaled by the
% respective amount, otherwise the value denotes the desired dimension in the
% respective unit.
%    \begin{macrocode}
\def\MT@tr@set@space@@#1#2#3{%
  \MT@test@ast#1*\@nil{%
    \MT@ifdefined@c@TF\MT@tr@unit@
      {\edef\@tempb{#1}\MT@scale@to@em}
      {\@tempcntb=#1\relax}%
    \@tempdima=\dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax
%    \end{macrocode}
% For \fontdim2, we also have to subtract the kerning that letterspacing adds
% to each side of the characters (only half if it's for outer spacing).
%    \begin{macrocode}
    \ifnum#2=\tw@
      \advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax
    \fi
  }{%
    \MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax
    \@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax
  }%
%<debug>\MT@dinfo@nl3{... : font dimen #2 (#1): \the\@tempdima}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@outer@l}
% Recall the last skip (must really be an interword space, not just a marker,
%\changes{v2.3}{2007/10/23}{only change pre outer space if it contains shrink}
% nor a `hard' space, \ie, one that doesn't contain stretch or shrink parts).
%\changes{v2.3b}{2008/05/12}{fix: only in horizontal mode}
%    \begin{macrocode}
\def\MT@tr@outer@l{%
  \ifhmode
    \ifdim\lastskip>5sp
      \edef\x{\the\lastskip minus 0pt}%
      \setbox\z@\hbox{\MT@outer@space=\x}%
      \ifdim\wd\z@>\z@
%<debug>\MT@dinfo2{[[[ adjusting pre space: \the\MT@outer@space}%
        \unskip \hskip\MT@outer@space\relax
%    \end{macrocode}
% Disable left outer kerning.
%    \begin{macrocode}
        \let\MT@ls@outer@k\relax
      \else
%    \end{macrocode}
%\changes{v2.3b}{2008/05/18}{make \cmd\spaceskip-aware (\pkg{ragged2e})}
% The \pkg{ragged2e} package sets \cmd\spaceskip\ without glue.
%    \begin{macrocode}
        \ifdim\lastskip=%
            \ifnum\spacefactor<2000
              \spaceskip
            \else
              \ifdim\xspaceskip=\z@
                \dimexpr\spaceskip+\fontdimen7\font@name\relax
              \else
                \xspaceskip
              \fi
            \fi
%<debug>\MT@dinfo2{[[[ adjusting pre space (skip): \the\MT@outer@space}%
          \unskip \hskip\MT@outer@space\relax
          \let\MT@ls@outer@k\relax
        \fi
      \fi
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@outer@next}
%\begin{macro}{\MT@tr@outer@r}
% \microtype\ also adjusts spacing.
% The following is borrowed from \pkg{soul}. I've added the cases for italic
% correction, since tracking may also be triggered by text commands (\eg,
% \cmd\textsc).
%    \begin{macrocode}
\def\MT@tr@outer@r{%
  \futurelet\MT@tr@outer@next\MT@tr@outer@r@
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@if@outer@next}
% We avoid using \cs{ifx} tests, in case \cs{MT@tr@outer@next} is \cmd\let\ to
% \cs{fi} etc.
%\changes{v2.5}{2012/02/20}{fix: conflict with \pkg{amsmath}
%                           (reported by \contributor Scott Pakin <scott\at pakin.org>)}
%                            ^^A private mail, 2012/02/09
%                            ^^A (beta:09)
%    \begin{macrocode}
\def\MT@if@outer@next#1{%
  \ifx\MT@tr@outer@next#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@outer@r@}
%    \begin{macrocode}
\def\MT@tr@outer@r@{%
  \def\MT@temp*{}%
%    \end{macrocode}
% Don't adjust in math mode.
%\changes{v2.3d}{2008/11/16}{fix: don't adjust in math mode
%                            (reported by \contributor Christoph Bier <christoph.bier\at web.de>)}
%                                                   ^^A MID: <6oapk7F2lvo6U1@mid.individual.net>
% There was a tricky bug when \cs{textls} was the last command in a
% \cmd\mathchoice\ group.
%    \begin{macrocode}
  \ifmmode \else
%    \end{macrocode}
% A similar bug occurred when adjustment would happen inside a discretionary
% group, which we prevent here.
%\changes{v2.3d}{2009/02/08}{fix: don't adjust inside discretionary
%                            (reported by \contributor Maverick Woo <maverick\at cs.cmu.edu>)}
%                                                  ^^A private mail, 2009/02/07
% This only works with \etex\ (which we know is available).
%\changes{v2.3b}{2008/05/18}{additional test for horizontal mode}
%    \begin{macrocode}
    \ifnum\currentgrouptype=10 \else
      \def\MT@temp*##1{\ifhmode\hskip\MT@outer@space
%<debug>\MT@dinfo2{]]] adjusting post space (1): \the\MT@outer@space}%
        \fi}%
      \expandafter\ifcat\expandafter\noexpand\csname MT@tr@outer@next\endcsname\egroup
%    \end{macrocode}
%\changes{v2.3c}{2008/09/18}{additional test for horizontal mode
%                            (reported by \contributor Sveinung Heggen <sveinung.heggen\at orkla.no>)}
%                                                                       ^^A private mail, 2008/09/18
%    \begin{macrocode}
        \ifhmode\unkern\fi\egroup
        \MT@set@curr@ok \MT@set@curr@os
        \def\MT@temp*{\afterassignment\MT@tr@outer@r\let\MT@temp=}%
      \else
%    \end{macrocode}
% If the next token is \cmd\maybe@ic\ (from an enclosing text command), we
% gobble it, read the next one, feed it to \cmd\maybe@ic@\ (via
% \cs{MT@tr@outer@icr}) and then call ourselves again.
%\changes{v2.3d}{2009/02/25}{don't use \cmd\x\
%                            (reported by \contributor Ulrich Dirr <ud\at mucschach.de>)}
%                                 ^^A private mail, 2009/02/22
%\changes{v2.3e}{2009/05/29}{fix: set current kerning and spacing again
%                            (found by \contributor Lars R\"onnb\"ack <lars.ronnback\at affecto.com>)}
%                                 ^^A <http://code.google.com/p/tufte-latex/issues/detail?id=25>
%    \begin{macrocode}
        \MT@if@outer@next\maybe@ic{%
          \MT@set@curr@ok \MT@set@curr@os
          \def\MT@temp*{\afterassignment\MT@tr@outer@icr\let\MT@temp=}%
        }{%
%    \end{macrocode}
% If the next token is \cmd\check@icr\ (from an inner text command), we insert
% ourselves just before it. This will then call \cmd\maybe@ic\ again the next
% round (which however will always insert an italic correction, since it
% doesn't read beyond our group).
%    \begin{macrocode}
          \MT@if@outer@next\check@icr{%
            \def\MT@temp*{\aftergroup\MT@tr@outer@r\check@icr\let\MT@temp=}%
          }{%
            \MT@if@outer@next\@sptoken{%
              \def\MT@temp* {\ifhmode\hskip\MT@outer@space
%<debug>\MT@dinfo2{]]] adjusting post space (2): \the\MT@outer@space}%
                \fi}%
            }{%
              \MT@if@outer@next~{%
                \def\MT@temp*~{\nobreak\hskip\MT@outer@space
%<debug>\MT@dinfo2{]]] adjusting post space (3): \the\MT@outer@space}%
                  }%
              }{%
                \MT@if@outer@next\ \relax{%
                  \MT@if@outer@next\space\relax{%
                    \MT@if@outer@next\@xobeysp\relax{%
%    \end{macrocode}
% \pkg{xspace} requires special treatment.
%    \begin{macrocode}
                      \MT@if@outer@next\xspace{%
                        \def\MT@temp*\xspace{\MT@xspace}%
                      }{%
%    \end{macrocode}
% If there's no outer spacing, there may be outer kerning.
%    \begin{macrocode}
                        \def\MT@temp*{\ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k
%<debug>\MT@dinfo2{--- adjusting post kern: \the\MT@outer@kern}%
                          \fi}%
                        \MT@let@nc{MT@tr@outer@next}\relax
      }}}}}}}}\fi
  \fi\fi
  \MT@temp*%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@tr@outer@icr}
%\begin{macro}{\MT@tr@outer@icr@}
% Helper macros for the italic correction mess.
%    \begin{macrocode}
\def\MT@tr@outer@icr{\afterassignment\MT@tr@outer@icr@\MT@tr@outer@r}
\def\MT@tr@outer@icr@{%
  \let\@let@token= \MT@tr@outer@next
  \maybe@ic@
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@xspace}
%\changes{v2.5a}{2013/05/15}{fix \texttt{outer spacing} problem with \pkg{xspace}
%                            (reported by \contributor Dave <@\at @>)}
%                            ^^A https://tex.stackexchange.com/questions/59655
%\changes{v2.6}{2014/11/22}{fix \texttt{outer spacing} problem with (not only) \pkg{algorithm}
%                           (reported by \contributor Henning <@\at @>
%                            and \contributor Ronnie Marksch <Ronnie.Marksch\at yahoo.de>)}
%                            ^^A https://tex.stackexchange.com/questions/213164
%                            ^^A MID: <mk1sqc$jve$1@speranza.aioe.org>
%\begin{macro}{\MT@xspace@}
% If the group is followed by \cmd\xspace, we first feed \cmd\xspace\ with the
% next token, then check whether it has inserted a space.
% \cmd\@let@token\ might be something evil, so it should be encapsulated here.
%    \begin{macrocode}
\def\MT@xspace{\futurelet\@let@token\MT@xspace@}
\def\MT@xspace@{\@xspace@firsttrue\@xspace
  \ifdim\lastskip>5sp
    \unskip \hskip\MT@outer@space
  \else
    \ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
% For older \pdftex\ versions and \luatex, throw an error.
%    \begin{macrocode}
}{
  \DeclareRobustCommand\lsstyle{%
    \MT@error{Letterspacing only works with \MT@engine tex version
%<pdftex-def>      1.40%
%<luatex-def>      0.62%
      \MessageBreak or newer}
      {Upgrade \MT@engine tex, or try the `soul' package instead.}%
    \MT@glet\lsstyle\relax
  }
}
%    \end{macrocode}
% And for \xetex, too.
%    \begin{macrocode}
%</pdftex-def|luatex-def>
%<*xetex-def>
\DeclareRobustCommand\lsstyle{%
  \MT@error{Letterspacing currently doesn't work with xetex}
           {Run pdftex or luatex, or use the `soul' package instead.}%
  \MT@glet\lsstyle\relax
}
%</xetex-def>
%    \end{macrocode}
%\begin{macro}{\textls}
%\changes{v2.0}{2005/09/21}{new command: letterspacing} ^^A (beta:1)
%\changes{v2.0}{2006/12/28}{starred version: remove spaces around text}
%\changes{v2.1}{2007/01/19}{fix: use \cmd\hmode@bgroup}
%\changes{v2.3d}{2008/11/16}{make math mode aware}
%\begin{macro}{\MT@ls@adjust@}
% This command may be used like the other text commands.
% The starred version removes kerning on the sides.
% The optional argument changes the letterspacing factor.
%    \begin{macrocode}
%<*package|letterspace>
\DeclareRobustCommand\textls{%
  \@ifstar{\let\MT@ls@adjust@\MT@ls@adjust@empty\MT@textls}%
          {\let\MT@ls@adjust@\MT@ls@adjust@relax\MT@textls}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@textls}
%\begin{macro}{\MT@letterspace@}
% This is now almost \LaTeX's \cmd\DeclareTextFontCommand, with the difference
% that we adjust the outer spacing and kerning also for \cs{lsstyle}, while
% \LaTeX's text \emph{switches} don't bother about italic correction.
%    \begin{macrocode}
\newcommand\MT@textls[2][]{%
  \ifmmode
    \nfss@text{\MT@ls@set@ls{#1}\lsstyle#2}%
  \else
    \hmode@bgroup
      \MT@ls@set@ls{#1}%
      \lsstyle #2%
      \expandafter
    \egroup
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@ls@adjust}
%\begin{macro}{\MT@ls@adjust@empty}
%\begin{macro}{\MT@ls@adjust@relax}
%\begin{macro}{\MT@ls@set@ls}
% Set current letterspacing amount and outer kerning. This has to be done inside
% the same group as the letterspacing command.
%\changes{v2.5}{2010/12/02}{allow formulas in optional argument to \cs{textls}
%                           (fix by \contributor Heiko Oberdiek <heiko.oberdiek\at googlemail.com>)}
%                            ^^A private mail, 2010/12/02
%                            ^^A (beta:05)
%    \begin{macrocode}
\def\MT@ls@adjust@empty{\let\MT@ls@adjust\@empty}
\def\MT@ls@adjust@relax{\let\MT@ls@adjust\relax}
\def\MT@ls@set@ls#1{%
  \MT@ifempty{#1}%
    {\let\MT@letterspace@\@undefined}%
    {\KV@@sp@def\MT@letterspace@{#1}%
     \edef\MT@letterspace@{\number\MT@letterspace@}%
     \MT@ls@too@large\MT@letterspace@}%
  \MT@ls@adjust@
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@ls@too@large}
% Test whether letterspacing amount is too large.
%    \begin{macrocode}
\def\MT@ls@too@large#1{%
  \ifnum#1>\MT@tr@max
    \MT@warning{Maximum for option `letterspace' is \number\MT@tr@max}%
    \let#1\MT@tr@max
  \else
    \ifnum#1<\MT@tr@min
      \MT@warning{Minimum for option `letterspace' is \number\MT@tr@min}%
      \let#1\MT@tr@min
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@outer@kern}
%\begin{macro}{\MT@tr@set@okern}
%\changes{v2.3d}{2008/12/19}{allow empty value for \texttt{outer kerning}}
% This dimen is used for the starred version of \cs{textls}, for \cs{lslig}
% and for adjusted outer kerning.
%    \begin{macrocode}
\newdimen\MT@outer@kern
%</package|letterspace>
%<*pdftex-def|luatex-def>
\def\MT@tr@set@okern#1,#2,{%
  \let\MT@temp\@empty
  \MT@ifempty{#1}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#1}}%
  \MT@ifempty{#2}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#2}}%
  \MT@glet@nc{MT@outer@kern\expandafter\string\font@name}\MT@temp
%<debug>\MT@dinfo@nl2{... outer kerning: (#1,#2)
%<debug>              = \@nameuse{MT@outer@kern\expandafter\string\font@name}}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@tr@set@okern@}
%    \begin{macrocode}
\def\MT@tr@set@okern@#1{%
  \MT@test@ast#1*\@nil{%
    \MT@ifdefined@c@TF\MT@tr@unit@
      {\edef\@tempb{#1}\MT@scale@to@em}
      {\@tempcntb=#1\relax}%
    \@tempdima=\dimexpr \@tempcntb sp * \MT@dimen@six/1000\relax
  }{%
    \MT@ifempty\@tempa{\let\@tempa\@m}\relax
    \@tempdima=\dimexpr \numexpr\@tempa*\MT@letterspace@/1000\relax sp
                      * \fontdimen6\MT@lsfont/2000\relax
  }%
  \advance\@tempdima -\dimexpr \MT@letterspace@ sp
                             * \fontdimen6\MT@lsfont/2000\relax
  \edef\MT@temp{\MT@temp{\the\@tempdima}}%
}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@ls@outer@k}
% Adjust outer kerning. We additionally add a marker (|\kern3sp\kern-3sp|)
% for cases of nested letterspacing without anything actually printed. ^^A eg. \LaTeX!
%\changes{v2.5a}{2013/05/15}{add marker for tightly nested letterspacing}
%    \begin{macrocode}
%<*pdftex-def|luatex-def|letterspace>
\def\MT@ls@outer@k{%
  \ifhmode
    \ifdim\lastkern=-3sp \unkern
      \ifdim\lastkern=3sp \kern-3sp
        \expandafter\expandafter\expandafter\@gobble
      \else \unkern
        \expandafter\expandafter\expandafter\@firstofone
      \fi
    \else
      \expandafter\@firstofone
    \fi
    {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
  \fi
}
%</pdftex-def|luatex-def|letterspace>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Disabling ligatures}
%
%\begin{macro}{\MT@noligatures}
% The possibility to disable ligatures is a new features of \pdftex\ 1.30, and
% also works with \luatex.
%\changes{v2.3}{2007/10/23}{fix: set evaluation didn't work (bug introduced in v2.2)}
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex5{
\def\MT@noligatures{%
  \MT@dotrue
  \let\@tempa\MT@nl@setname
  \MT@map@clist@n{font,encoding,family,series,shape,size}{%
    \MT@ifdefined@n@TF{MT@checklist@##1}%
      {\csname MT@checklist@##1\endcsname}%
      {\MT@checklist@{##1}}%
    {nl}%
  }%
  \ifMT@do
    \MT@noligatures@\MT@font\MT@nl@ligatures
  \fi
}
%    \end{macrocode}
%\begin{macro}{\MT@noligatures@}
% This is also used by \cs{MT@set@tr@codes}.
%    \begin{macrocode}
%<luatex-def>\MT@requires@luatex4{\let\pdfnoligatures\ignoreligaturesinfont}\relax
\def\MT@noligatures@#1#2{%
  \MT@ifdefined@c@TF#2{%
%    \end{macrocode}
% Early MiK\TeX\ versions (before 2.5.2579) didn't know \cmd\tagcode.
%    \begin{macrocode}
    \MT@ifdefined@c@TF\tagcode{%
%    \end{macrocode}
% No `|inputenc|' key.
%\changes{v2.3b}{2008/03/27}{fix: warning messages for unknown slots}
%    \begin{macrocode}
      \let\MT@warn@maybe@inputenc\@empty
      \def\MT@curr@list@name{\@backslashchar DisableLigatures}%
      \MT@map@clist@c#2{%
        \KV@@sp@def\@tempa{##1}\MT@get@slot
        \ifnum\MT@char>\m@ne
          \tagcode#1\MT@char=\m@ne
%    \end{macrocode}
% With \luatex, we additionally register the ligatures that should be inhibited
% in a table (used by the \pkg{luaotfload} function |keepligature|).
%\changes{v2.6}{2016/04/20}{use \pkg{luaotfload} function to keep\slash inhibit ligatures}
%    \begin{macrocode}
%<luatex-def>          \MT@if@luaotf@font
%<luatex-def>             {\MT@lua{microtype.noligatures([[#1]],[[\MT@char]])}}\relax
        \fi
      }%
      \MT@vinfo{... Disabling ligatures for characters: #2}%
    }{%
      \pdfnoligatures#1%
      \MT@warning{Cannot disable selected ligatures (pdftex doesn't\MessageBreak
          know \@backslashchar tagcode). Disabling all ligatures of\MessageBreak
          the font instead}%
    }%
  }{%
    \pdfnoligatures#1%
%<luatex-def>    \MT@if@luaotf@font
%<luatex-def>        {\MT@lua{microtype.noligatures([[#1]],"_all_")}}\relax
    \MT@vinfo{... Disabling all ligatures}%
  }%
}
%<pdftex-def>}\relax
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
% For each potential ligature, \pkg{luaotfload} will call the
% |keepligature| function, which expects the first node of the ligature,
% to check whether they should be kept or inhibited.
% Here's our concoction of this function. The table |microtype.ligs| will
% be populated in \cmd\MT@noligatures@.
%\changes{v2.7c}{2019/03/08}{turn warning into info when overwriting the \texttt{keepligature} function
%                            (reported by \contributor Andy N <@\at @>)}
%                            ^^A https://tex.stackexchange.com/questions/478344/
%    \begin{macrocode}
%<*luafile>
microtype.ligs = microtype.ligs or { }

local function noligatures(fontcs,liga)
  local fontcs = match(fontcs,"([^ ]+)")
  microtype.ligs[fontcs] = microtype.ligs[fontcs] or { }
  table.insert(microtype.ligs[fontcs],liga)
end
microtype.noligatures = noligatures

local function keepligature(c)
  local nodedirect = node.direct
  local getfield   = nodedirect.getfield
  local getfont    = nodedirect.getfont
  local f,ch
  if type(c) == "userdata" then -- in older luaotfload versions, c was a node
    f  = c.font
    ch = c.components.char
  else                          -- since 2.6, c is a (direct node) number
    f  = getfont(c)
    ch = getfield(getfield(c,"components"),"char")
  end
--  if ch then -- should always be true
  local ligs = microtype.ligs[match(tex.fontidentifier(f),"\\([^ ]+)")]
  if ligs then
    for _,lig in pairs(ligs) do
      if lig == "_all_" or tonumber(lig) == ch then
        return false
      end
    end
  end
  return true
--  end
end

if luaotfload and luaotfload.letterspace then
  if luaotfload.letterspace.keepligature then
    microtype.info("overwriting function `keepligature'")
  end
  luaotfload.letterspace.keepligature = keepligature
end

%</luafile>
%    \end{macrocode}
%
%\subsubsection{Loading the configuration}
%
%\begin{macro}{\MT@load@list}
% Recurse through the lists to be loaded.
%\changes{v1.3}{2004/10/27}{check whether list exists}
%\todo{load more than one list}
%    \begin{macrocode}
%<*package>
\def\MT@load@list#1{%
  \edef\@tempa{#1}%
  \MT@let@cn\@tempb{MT@\MT@feat @c@\@tempa @load}%
  \MT@ifstreq\@tempa\@tempb{%
    \MT@error{\@nameuse{MT@abbr@\MT@feat} list `\@tempa' cannot load itself}{}%
  }{%
    \ifx\@tempb\relax \else
      \MT@ifdefined@n@TF{MT@\MT@feat @c@\@tempb}{%
        \MT@vinfo{... : First loading \@nameuse{MT@abbr@\MT@feat} list `\@tempb'}%
        \begingroup
          \MT@load@list\@tempb
        \endgroup
        \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list
          \noexpand\MessageBreak`\@tempb'}%
        \MT@let@cn\@tempc{MT@\MT@feat @c@\@tempb}%
        \expandafter\MT@set@codes\@tempc,\relax,%
      }{%
        \MT@error{\@nameuse{MT@abbr@\MT@feat} list `\@tempb' undefined.\MessageBreak
                    Cannot load it from list `\@tempa'}{}%
      }%
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\changes{v1.1}{2004/09/13}{configuration file names in lowercase
%               (suggested by \contributor Harald Harders <h.harders\at tu-bs.de>)}
%                                                    ^^A private mail, 2004/09/13
%\begin{macro}{\MT@find@file}
%\changes{v1.1}{2004/09/14}{fix: also check whether the file for the base
%                           font family has already been loaded}
% Micro-typographic settings may be written into a file |mt-|\meta{font family}|.cfg|.
%\changes{v1.8}{2005/04/16}{no longer wrap names in commands}
%\begin{macro}{\MT@file@list}
% We must also record whether we've already loaded the file.
%    \begin{macrocode}
\let\MT@file@list\@empty
\def\MT@find@file#1{%
%    \end{macrocode}
%\end{macro}
% Check for existence of the file only once.
%    \begin{macrocode}
  \MT@in@clist{#1}\MT@file@list
  \ifMT@inlist@ \else
%    \end{macrocode}
% Don't forget that because reading the files takes place inside a group, all
% commands that may be used there have to be defined globally.
%    \begin{macrocode}
    \MT@begin@catcodes
      \let\MT@begin@catcodes\relax
      \let\MT@end@catcodes\relax
      \InputIfFileExists{mt-#1.cfg}{%
        \edef\MT@curr@file{mt-#1.cfg}%
        \MT@vinfo{... Loading configuration file \MT@curr@file}%
        \MT@xadd\MT@file@list{#1,}%
      }{%
        \MT@get@basefamily#1\@empty\@empty\@empty\@nil
        \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list
        \ifMT@inlist@
          \MT@xadd\MT@file@list{#1,}%
        \else
          \InputIfFileExists{mt-\@tempa.cfg}{%
            \edef\MT@curr@file{mt-\@tempa.cfg}%
            \MT@vinfo{... Loading configuration file \MT@curr@file}%
            \MT@xadd\MT@file@list{\@tempa,#1,}%
          }{%
            \MT@vinfo{... No configuration file mt-#1.cfg}%
            \MT@xadd\MT@file@list{#1,}%
          }%
        \fi
      }%
    \endgroup
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@cfg@catcodes}
% We have to make sure that all characters have the correct category code.
% Especially, new lines and spaces should be ignored, since files might be
% loaded in the middle of the document. This is basically \cmd\nfss@catcodes\
% (from the \LaTeX\ kernel). I've added:
%\changes{v1.4a}{2004/11/16}{fix: reset some more catcodes when reading files
%                (reported by \contributor Michael Hoppe <mh\at michael-hoppe.de>)}
%                                 ^^A MID: <p06002000bdbff1f93eb7@[192.168.0.34]>
% |&| (in |tabular|s), |!|, |?|, |;|,
%\changes{v1.7}{2005/02/06}{reset catcode of `\texttt{:}'
%                           (compatibility with \pkg{french}* packages)}
% |:| (|french|), |,|, |$|, |_|, |~|,
%\changes{v1.5}{2004/11/28}{reset catcode of `\texttt{\quotechar=}'
%                           (compatibility with Turkish \pkg{babel})}
% and |=| (Turkish \pkg{babel}).
%
%\changes{v1.8}{2005/03/29}{reset catcodes of the remaining <ASCII> characters}
% OK, now all printable characters up to 127 are `other'. We hope that letters
% are always letters and numbers other. (\pkg{listings} makes them active, see
% section~\ref{sub:compatibility}.)
%
% We leave |^| at catcode 7, so that stuff like `|^^ff|' remains possible.
%    \begin{macrocode}
\def\MT@cfg@catcodes{%
  \makeatletter
  \catcode`\^7%
  \catcode`\ 9%
  \catcode`\^^I9%
  \catcode`\^^M9%
  \catcode`\\\z@
  \catcode`\{\@ne
  \catcode`\}\tw@
  \catcode`\#6%
  \catcode`\%14%
  \MT@map@tlist@n
    {\!\"\$\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\[\]\_\`\|\~}%
    \@makeother
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@begin@catcodes}
% This will be used before reading the files as well as in all configuration
% commands, so that catcodes are also harmless when these commands are used
% outside the configuration files.
%\changes{v1.7}{2005/02/17}{also use inside configuration commands}
%\changes{v2.3}{2007/11/20}{fix: don't disable \cmd\KV@@sp@def}
%    \begin{macrocode}
\def\MT@begin@catcodes{%
  \begingroup
  \MT@cfg@catcodes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@end@catcodes}
% End group if outside configuration file (otherwise relax).
%    \begin{macrocode}
\let\MT@end@catcodes\endgroup
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@basefamily}
% The family name might have a suffix
%\changes{v1.1}{2004/09/14}{only remove suffixes `\texttt{x}' or `\texttt{j}'}
% \eg, for expert set (|x|), old style numbers (|j|)
%\changes{v1.2}{2004/09/26}{also remove `w' (swash capitals)}
% swash capitals (|w|) etc. We mustn't simply remove the last letter, as this
% would make for instance |cms| out of |cmss| \textit{and} |cmsy| (OK, |cmex|
% will still become |cme|~\dots).
%\changes{v1.4b}{2004/11/25}{fix: failed for font names of the form \texttt{abczz}
%                (reported by \contributor Georg Verweyen <Georg.Verweyen\at WEB.DE>)}
%                                                 ^^A MID: <41A64DC7.7040404@web.de>
%\changes{v2.2}{2007/02/04}{redone, working on font names and suffixes of arbitrary length}
%
% We only work on the font name if it is longer than three characters.
%    \begin{macrocode}
\def\MT@get@basefamily#1#2#3#4\@nil{%
  \ifx\@empty#4%
    \def\@tempa{#1#2#3}%
  \else
    \let\@tempa\@empty
    \edef\@tempb{#1#2#3#4}%
    \expandafter\MT@get@basefamily@\@tempb\@nil
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@basefamily@}
% This will only remove one suffix (the longest match), so that
% \emph{combinations} of suffixes would have be to added manually (\eg,
% |\DeclareMicrotypeVariants*{aw}|). But otherwise, something like `|padx|'
% would be truncated to `|p|'.
%    \begin{macrocode}
\def\MT@get@basefamily@#1#2\@nil{%
  \edef\@tempa{\@tempa#1}%
  \ifx\\#2\\\expandafter\@gobble\else\expandafter\@firstofone\fi
  {\MT@in@tlist{#2}\MT@variants
   \ifMT@inlist@\else\MT@get@basefamily@#2\@nil\fi}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@listname}
%\begin{macro}{\MT@get@listname}
%\begin{macro}{\MT@get@listname@}
% Try all combinations of font family, series, shape and size to get a list for
% the current font.
%\changes{v1.1}{2004/09/15}{don't check for empty attributes list}
%\changes{v1.2}{2004/09/30}{alternatively check for alias font name}
%\changes{v1.7}{2005/03/15}{use \cmd\@tfor\
%               (\contributor Andreas B\"uhmann <andreas.buehmann\at web.de>'s idea)}
%                                                      ^^A private mail, 2005/03/12
%\changes{v1.8}{2005/04/16}{made recursive}
%    \begin{macrocode}
\def\MT@get@listname#1{%
%<debug>\MT@dinfo@nl{1}{trying to find \@nameuse{MT@abbr@#1} list for font `\MT@@font'}%
  \let\MT@listname\@undefined
  \def\@tempb{#1}%
  \MT@map@tlist@c\MT@try@order\MT@get@listname@
}
\def\MT@get@listname@#1{%
  \expandafter\MT@next@listname#1%
  \ifx\MT@listname\@undefined \else
    \expandafter\MT@tlist@break
  \fi
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@try@order}
%\changes{v1.7}{2005/03/11}{fix: also check for //\meta{series}/\meta{shape}//
%               (reported by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)}
%                                                           ^^A private mail, 2005/03/10
%\changes{v1.7}{2005/03/11}{always check for size, too
%               (suggested by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)}
%                                                           ^^A private mail, 2005/03/10
%
%\begin{table}\small
%\caption{Order for matching font attributes}\label{tab:match-order}
%\catcode`\!=13 \let!\match
%\setlength\fboxsep{4pt}
%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax
%\fcolorbox{theframe}{white}{^^A
%\begin{minipage}{\textwidth}
%\def\arraystretch{1.2}
%\begin{tabular}{@{}L{38pt}*{16}{p{19.5pt}<{\centering}@{}}}
%          & 1.& 2.& 3.& 4.& 5.& 6.& 7.& 8.& 9.&10.&11.&12.&13.&14.&15.&16.\\
%\cmidrule(r){2-2}  \cmidrule(r){3-3}  \cmidrule(r){4-4}  \cmidrule(r){5-5}
%\cmidrule(r){6-6}  \cmidrule(r){7-7}  \cmidrule(r){8-8}  \cmidrule(r){9-9}
%\cmidrule(r){10-10}\cmidrule(r){11-11}\cmidrule(r){12-12}\cmidrule(r){13-13}
%\cmidrule(r){14-14}\cmidrule(r){15-15}\cmidrule(r){16-16}\cmidrule   {17-17}
% Encoding & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! \\
% Family   & ! & ! & ! & ! & ! & ! & ! & ! & - & - & - & - & - & - & - & - \\
% Series   & ! & ! & ! & ! & - & - & - & - & ! & ! & ! & ! & - & - & - & - \\
% Shape    & ! & ! & - & - & ! & ! & - & - & ! & ! & - & - & ! & ! & - & - \\
% Size     & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - \\
%\end{tabular}
%\end{minipage}^^A
%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox
%\end{table}
%
% Beginning with version 1.7, we always check for the font size. Since the
% matching order has become more logical now, it can be described in words, so
% that we don't need table~\ref{tab:match-order} in the documentation part any
% longer and can cast it off here.
%    \begin{macrocode}
\def\MT@try@order{%
  {1111}{1110}{1101}{1100}{1011}{1010}{1001}{1000}%
  {0111}{0110}{0101}{0100}{0011}{0010}{0001}{0000}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@next@listname}
% The current context is added to the font attributes. That is, the context must
% match.
%    \begin{macrocode}
\def\MT@next@listname#1#2#3#4{%
  \ifnum#1=\z@\MT@nofamilytrue\fi
  \edef\@tempa{\MT@encoding
/\ifnum#1=\@ne \MT@family  \fi
/\ifnum#2=\@ne \MT@series  \fi
/\ifnum#3=\@ne \MT@shape   \fi
/\ifnum#4=\@ne *\fi
               \MT@context}%
%<debug>\MT@dinfo@nl{1}{trying \@tempa}%
  \MT@ifdefined@n@TF{MT@\@tempb @\@tempa}{%
    \MT@next@listname@#4%
  }{%
%    \end{macrocode}
% Also try with an alias family.
%    \begin{macrocode}
    \ifnum#1=\@ne
      \ifx\MT@familyalias\@empty \else
        \edef\@tempa{\MT@encoding
                    /\MT@familyalias
      /\ifnum#2=\@ne \MT@series\fi
      /\ifnum#3=\@ne \MT@shape\fi
      /\ifnum#4=\@ne *\fi
                     \MT@context}%
%<debug>\MT@dinfo@nl{1}{(alias) \@tempa}%
        \MT@ifdefined@n@T{MT@\@tempb @\@tempa}{%
          \MT@next@listname@#4%
        }%
      \fi
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@next@listname@}
% If size is to be evaluated, do that, otherwise use the current list.
%    \begin{macrocode}
\def\MT@next@listname@#1{%
  \ifnum#1=\@ne
    \MT@exp@cs\MT@in@rlist{MT@\@tempb @\@tempa @sizes}%
    \ifMT@inlist@
      \let\MT@listname\MT@size@name
    \fi
  \else
    \MT@let@cn\MT@listname{MT@\@tempb @\@tempa}%
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@if@list@exists}
%\changes{v1.7}{2005/02/06}{don't define \cs{MT@\#1@c@name} \cmd\global ly,
%                           here and elsewhere}
%\begin{macro}{\MT@context}
%    \begin{macrocode}
\def\MT@if@list@exists{%
  \MT@let@cn\MT@context{MT@\MT@feat @context}%
  \MT@ifstreq{@}\MT@context{\let\MT@context\@empty}\relax
  \MT@get@listname{\MT@feat @c}%
  \MT@ifdefined@c@TF\MT@listname{%
    \MT@edef@n{MT@\MT@feat @c@name}{\MT@listname}%
    \ifMT@nonselected
      \MT@vinfo{... Applying non-selected expansion (list `\MT@listname')}%
    \else
      \MT@vinfo{... Loading \@nameuse{MT@abbr@\MT@feat} list `\MT@listname'}%
    \fi
    \@firstoftwo
  }{%
%    \end{macrocode}
% Since the name cannot be \cmd\@empty, this is a sound proof that no matching
% list exists.
%    \begin{macrocode}
    \MT@let@nc{MT@\MT@feat @c@name}\@empty
%    \end{macrocode}
% Don't warn if \opt{selected}|=false|.
%    \begin{macrocode}
    \ifMT@nonselected
      \MT@vinfo{... Applying non-selected expansion (no list)}%
    \else
%    \end{macrocode}
% Tracking doesn't require a list, either.
%    \begin{macrocode}
      \MT@ifstreq\MT@feat{tr}\relax{%
        \MT@warning{I cannot find a \@nameuse{MT@abbr@\MT@feat} list
          for font\MessageBreak`\MT@@font'%
            \ifx\MT@context\@empty\else\space(context: `\MT@context')\fi.
          Switching off\MessageBreak\@nameuse{MT@abbr@\MT@feat} for this font}%
      }%
    \fi
    \@secondoftwo
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@inh@list}
%\changes{v1.6}{2004/12/18}{correct message if \opt{selected} is false}
%\begin{macro}{\MT@context}
% The inheritance lists are global (no context).
%    \begin{macrocode}
\def\MT@get@inh@list{%
  \let\MT@context\@empty
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
  \MT@get@listname{\MT@feat @inh}%
  \MT@ifdefined@c@TF\MT@listname{%
    \MT@edef@n{MT@\MT@feat @inh@name}{\MT@listname}%
%<debug>\MT@dinfo@nl{1}{... Using \@nameuse{MT@abbr@\MT@feat} inheritance list
%<debug>                `\MT@listname'}%
    \MT@let@cn\@tempc{MT@\MT@feat @inh@\MT@listname}%
%    \end{macrocode}
% If the list is \cmd\@empty, it has already been parsed.
%\changes{v1.2}{2004/09/26}{fix: set inheritance list \cmd\global ly to \cmd\@empty}
%    \begin{macrocode}
    \ifx\@tempc\@empty \else
%<debug>\MT@dinfo@nl{1}{parsing inheritance list ...}%
%    \end{macrocode}
% The group is only required in case an input encoding is given.
%\changes{v1.9f}{2006/08/03}{fix: input encoding must be set after the inheritance
%                            list has been parsed}
%    \begin{macrocode}
      \begingroup
      \edef\MT@curr@list@name{inheritance list\noexpand\MessageBreak`\MT@listname'}%
      \MT@set@inputenc{inh}%
      \expandafter\MT@inh@do\@tempc,\relax,%
      \MT@glet@nc{MT@\MT@feat @inh@\MT@listname}\@empty
      \endgroup
    \fi
  }{%
    \MT@let@nc{MT@\MT@feat @inh@name}\@undefined
  }%
}
%    \end{macrocode}
%\end{macro}
%
% \subsubsection{Translating characters into slots}
%
%\changes{v1.4}{2004/11/04}{don't use scratch registers in global definitions}
% Get the slot number of the character in the current encoding.
%
%\begin{macro}{\MT@get@slot}
%^^A\changes{v1.2}{2004/09/26}{fix: group must also include \cs{MT@get@composite}}
%\changes{v1.4b}{2004/11/22}{don't define \cs{MT@char} globally (save stack problem)}
%\changes{v1.6a}{2005/01/30}{completely redone, hopefully more robust
%                (compatible with \pkg{frenchpro}; problem reported by
%                 \contributor Bernard Gaulle <gaulle\at idris.fr>)}
%                                     ^^A private mail, 2005/01/28
%\changes{v1.7}{2005/03/21}{remove backslash hack}
% There are lots of possibilities how a character may be specified in the
% configuration files, which makes translating them into slot numbers quite
% expensive. Also, we want to have this as robust as possible, so that the user
% does not have to solve a sphinx's riddle if anything goes wrong.
%
%\begin{macro}{\MT@char}
%\begin{macro}{\MT@char@}
% The character is in \cs{@tempa}, we want its slot number in \cs{MT@char}.
%    \begin{macrocode}
\def\MT@get@slot{%
  \escapechar`\\
  \let\MT@char@\m@ne
  \MT@noresttrue
%    \end{macrocode}
%\end{macro}
%\end{macro}
% Save unexpanded string in case we need to issue a warning message.
%    \begin{macrocode}
  \MT@toks=\expandafter{\@tempa}%
%    \end{macrocode}
%\changes{v1.8}{2005/03/30}{fix: expand active characters}
%\changes{v2.7a}{2018/01/12}{expand active characters earlier}
%  \item It might be an active character, \ie, an 8-bit character defined by
%        \pkg{inputenc}. If so, we will expand it here to its <LICR> form.
%    \begin{macrocode}
  \MT@exp@two@c\MT@is@active\string\@tempa\@nil
%    \end{macrocode}
% Now, let's walk through (hopefully) all possible cases.
%\begin{itemize}
%  \item It's a letter, a character or a number.
%    \begin{macrocode}
  \expandafter\MT@is@letter\@tempa\relax\relax
  \ifnum\MT@char@ < \z@
%    \end{macrocode}
%  \item OK, so it must be a macro. We do not allow random commands but only
%        those defined in \LaTeX's idiosyncratic font encoding scheme:
%
%        If |\|\meta{encoding}|\|\meta{command} (that's \emph{one} command) is
%        defined, we try to extract the slot number.
%\changes{v1.7}{2005/02/27}{test whether \cs{}\meta{encoding}\cs{}\meta{...} is defined}
%\changes{v1.8}{2005/04/04}{test whether \cs{}\meta{encoding}\cs{}\meta{...} is defined
%                           made more robust}
%
%        We must be cautious not to stumble over accented characters consisting
%        of two commands, like \cmd\`\cmd\i\ or \cmd\U\cmd\CYRI, hence,
%        \cmd\string\ wouldn't be safe enough.
%    \begin{macrocode}
    \MT@ifdefined@n@TF{\MT@encoding\MT@detokenize@c\@tempa}%
      \MT@is@symbol
%    \end{macrocode}
%  \item Now, we'll catch the rest, which hopefully is an accented character
%        (\eg~|\"a|).
%    \begin{macrocode}
      {\expandafter\MT@is@composite\@tempa\relax\relax}%
    \ifnum\MT@char@ < \z@
%    \end{macrocode}
%  \item It could also be a \cmd\chardef ed command (\eg, the percent character).
%        This seems the least likely case, so it's last.
%\changes{v1.7}{2005/03/20}{test for \cmd\chardef ed commands}
%    \begin{macrocode}
      \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter
          \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax
    \fi
  \fi
%    \end{macrocode}
%\end{itemize}
%    \begin{macrocode}
  \let\MT@char\MT@char@
  \MT@get@slot@
  \escapechar\m@ne
}
%</package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@slot@}
%\changes{v2.5}{2010/05/18}{adapt for \xetex}
%    \begin{macrocode}
%<*pdftex-def|luatex-def|xetex-def>
\def\MT@get@slot@{%
%    \end{macrocode}
% If it's a legacy (\ie, <TFM>) font, proceed as usual.
%    \begin{macrocode}
%<xetex-def>  \ifnum\XeTeXfonttype\MT@font=\z@
  \ifnum\MT@char > \m@ne
%    \end{macrocode}
% In \luatex, it may also be a glyph name, prefixed with `|/|'.
%\changes{v2.5}{2012/08/14}{adapt for \luatex\ (requested by \contributor Georg Duffner <g.duffner\at gmail.com>)}
%                           ^^A private mail, 2012/07/17
%                           ^^A (beta:10)
%    \begin{macrocode}
%<*luatex-def>
    \ifnum\MT@char=47\relax
      \ifMT@norest \else
        \@tempcnta=\MT@lua{
           local glyph = microtype.name_to_slot([[\expandafter\@gobble\@tempa]],true)
           if glyph then tex.write(glyph)
           else tex.write(-1)
           end
        }\relax
        \ifnum\@tempcnta<\z@
          \MT@warn@unknown
          \let\MT@char\m@ne
        \else
          \edef\MT@char{\the\@tempcnta}%
%<debug>\MT@dinfo@nl{3}{> `\the\MT@toks' is a glyph name (\the\@tempcnta)}%
        \fi
      \fi
    \else
%</luatex-def>
%    \end{macrocode}
% If the user has specified something like `|fi|', or wanted to define a number
% but forgot to use three digits, we'll have something left of the string. In
% this case, we issue a warning and forget the complete string.
%\changes{v2.6}{2016/04/23}{fix: could fail with \xetex\
%                           (reported by \contributor Christopher Schramm <debian\at shakaweb.org>)}
%                           ^^A http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725395#15
%    \begin{macrocode}
    \ifMT@norest \else
      \MT@warn@rest
%<pdftex-def|luatex-def>      \let\MT@char\m@ne
%<xetex-def>      \let\MT@char\@empty
    \fi
%<luatex-def>    \fi
  \else
    \MT@warn@unknown
%<xetex-def>    \let\MT@char\@empty
  \fi
%<*xetex-def>
  \else
%    \end{macrocode}
% There are more possibilities for \xetex:
% It may also be a glyph name (prefixed with~`|/|'). We indicate this to
% \cs{MT@get@charwd} by reversing the sign of \cs{MT@char@}.
%    \begin{macrocode}
    \ifnum\MT@char=47\relax
      \ifMT@norest \edef\MT@char{U47}%
      \else
        \@tempcnta=\XeTeXglyphindex"\expandafter\@gobble\@tempa"\relax
        \ifnum\@tempcnta=\z@
          \MT@warn@unknown
          \let\MT@char\@empty
        \else
          \edef\MT@char{\@tempa\space}%
          \edef\MT@char@{-\the\@tempcnta}%
%<debug>\MT@dinfo@nl{3}{> `\the\MT@toks' is a glyph name (\the\@tempcnta)}%
        \fi
      \fi
    \else
      \ifnum\MT@char > \m@ne
        \ifMT@norest
%    \end{macrocode}
% Or, it's a Unicode number, which we mustn't translate into a glyph number,
% since the latter is font-specific.
%    \begin{macrocode}
          \@tempcnta=\XeTeXcharglyph\MT@char\relax
          \ifnum\@tempcnta=\z@
            \MT@info@missing@char
            \let\MT@char\@empty
          \else
%<debug>\MT@dinfo@nl{3}{> (glyph number: \the\@tempcnta,
%<debug>                   glyph name:   \XeTeXglyphname\MT@font\@tempcnta)}%
            \edef\MT@char{U\MT@char}%
          \fi
        \else
          \MT@warn@rest
          \let\MT@char\@empty
        \fi
      \else
        \MT@warn@unknown
        \let\MT@char\@empty
      \fi
    \fi
  \fi
%</xetex-def>
}
%</pdftex-def|luatex-def|xetex-def>
%    \end{macrocode}
% This is the lua function to translate glyph name into slot number.
% Beginning with v2.2, \pkg{luaotfload} provides this function in an <API>, which
% we use if available, but (for now, at least) keep the old code for backward
% compatibility.
%\changes{v2.5a}{2013/04/19}{adapt to \pkg{luaotfload} v2.2
%                            (contributed by \contributor \'Elie Roux <elie.roux\at telecom-bretagne.eu>)}
%                            ^^A MID: <516AAF6B.8040605@telecom-bretagne.eu>
%    \begin{macrocode}
%<*luafile>
if luaotfload and luaotfload.aux and luaotfload.aux.slot_of_name then
  local slot_of_name = luaotfload.aux.slot_of_name
  microtype.name_to_slot = function(name, unsafe)
    return slot_of_name(font.current(), name, unsafe)
  end
else
  -- we dig into internal structure (should be avoided)
  local function name_to_slot(name, unsafe)
    if fonts then
      local unicodes
      if fonts.ids then       -- legacy luaotfload
        local tfmdata = fonts.ids[font.current()]
        if not tfmdata then return end
        unicodes = tfmdata.shared.otfdata.luatex.unicodes
      else                    -- new location
        local tfmdata = fonts.hashes.identifiers[font.current()]
        if not tfmdata then return end
        unicodes = tfmdata.resources.unicodes
      end
      local unicode = unicodes[name]
      if unicode then -- does the 'or' branch actually exist?
        return type(unicode) == "number" and unicode or unicode[1]
      end
    end
  end
  microtype.name_to_slot = name_to_slot
end

%</luafile>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@letter}
% Input is a letter, a character or a number.
%\changes{v1.8}{2005/04/04}{warning for non-<ASCII> characters}
%\changes{v1.9}{2005/10/22}{using \cmd\catcode\ should be more efficient than
%                           inspecting the \cmd\meaning}
%\begin{macro}{\MT@max@char}
%\begin{macro}{\MT@max@slot}
% Warning if resulting character or slot number is too large.
%    \begin{macrocode}
%<*pdftex-def|luatex-def|xetex-def>
\def\MT@max@char
%<pdftex-def>  {127 }
%<luatex-def|xetex-def>  {1114111 }
\def\MT@max@slot
%<pdftex-def>  {255 }
%<luatex-def|xetex-def>  {1114111 }
%</pdftex-def|luatex-def|xetex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\ifMT@norest}
% Test whether all of the string has been used up.
%    \begin{macrocode}
%<*package>
\newif\ifMT@norest
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\def\MT@is@letter#1#2\relax{%
  \ifcat a\noexpand#1\relax
    \edef\MT@char@{\number`#1}%
    \ifx\\#2\\%
%<debug>\MT@dinfo@nl{3}{> `\the\MT@toks' is a letter (\MT@char@)}%
    \else
      \MT@norestfalse
    \fi
  \else
    \ifcat !\noexpand#1\relax
      \edef\MT@char@{\number`#1}%
%<debug>\MT@dinfo@nl{3}{> `\the\MT@toks' is a character (\MT@char@)}%
      \ifx\\#2\\%
        \ifnum\MT@char@ > \MT@max@char \MT@warn@ascii \fi
      \else
        \MT@norestfalse
        \expandafter\MT@is@number#1#2\relax\relax
      \fi
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@number}
% Numbers may be specified as a three-digit decimal number (|029|),
%\changes{v1.1}{2004/09/13}{numbers may also be specified in hexadecimal or octal
%               (suggested by \contributor Harald Harders <h.harders\at tu-bs.de>)}
%                                                    ^^A private mail, 2004/09/13
% as a hexadecimal number (prefixed with~|"|: |"1D|) or as a octal number
% (prefixed with~|'|: |'35|). They must consist of at least three characters
% (including the prefix), that is, |"F| is not permitted.
%    \begin{macrocode}
\def\MT@is@number#1#2#3\relax{%
  \ifx\relax#3\relax \else
    \ifx\relax#2\relax \else
      \MT@noresttrue
      \if#1"\relax
        \def\x{\uppercase{\edef\MT@char@{\number#1#2#3}}}\x
%<debug>\MT@dinfo@nl{3}{> ... a hexadecimal number: \MT@char@}%
      \else
        \if#1'\relax
          \def\MT@char@{\number#1#2#3}%
%<debug>\MT@dinfo@nl{3}{> ... an octal number: \MT@char@}%
        \else
          \MT@ifint{#1#2#3}{%
            \def\MT@char@{\number#1#2#3}%
%<debug>\MT@dinfo@nl{3}{> ... a decimal number: \MT@char@}%
          }\MT@norestfalse
        \fi
      \fi
      \ifnum\MT@char@ > \MT@max@slot
        \MT@warn@number@too@large{\noexpand#1\noexpand#2\noexpand#3}%
        \let\MT@char@\m@ne
      \fi
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@active}
%\changes{v1.8}{2005/03/30}{new macro: translate \pkg{inputenc}-defined characters}
% Expand an active character. (This was completely broken in v1.7, and only
% worked by chance before.)
%\changes{v1.9}{2005/09/08}{redone: use \cmd\set@display@protect}
% We \cmd\set@display@protect\ to translate, \eg, \expandafter|\"A| into |\"A|,
% that is to whatever it is defined in the \pkg{inputenc} encoding file.
%
%\iffalse
% Previous solution, slightly more robust (but doesn't understand Unicode):
%\begin{verbatim}
%\def\MT@is@active#1#2\@nil{%
%   \ifx\\#2\\%
%      \ifnum\catcode`#1 = \active
%         \toks@=\expandafter\expandafter\expandafter{\@tempa}%
%         \expandafter\MT@active@inpenc\the\toks@\relax\relax
%         \edef\@tempa{\the\toks@}%
%         \edef\x{\MT@toks={\the\MT@toks\space(= \the\toks@)}}\x
%      \fi
%   \fi
%}
%\def\MT@active@inpenc#1#2#3\relax{%
%   \ifx#1\IeC
%      \def\IeC##1{\toks@={##1}}%
%      \the\toks@
%      \expandafter\MT@active@inpenc\the\toks@\relax\relax
%   \fi
%   \ifx#1\@tabacckludge
%      \def\@tabacckludge##1##2{%
%         \toks@=\expandafter{\csname\string##1\endcsname#3}}%
%      \the\toks@
%   \fi
%   \ifx#1\@inpenc@undefined@
%      \def\@inpenc@undefined@##1{%
%         \edef\x{\toks@={%
%            undefined^^J(\MT@MT)\@spaces\@spaces\@spaces\@spaces
%            in input encoding ``##1''}}\x}%
%      \the\toks@
%   \fi
%}
%\end{verbatim}
%\fi
%
% Unfortunately, the (older) \pkg{inputenc} definitions prefer the
% protected\slash generic variants (\eg, \cmd\copyright\ instead of
% \cmd\textcopyright), which our parser won't be able to understand.
% (I'm fed up now, so you have to complain if you really, really want to be able
% to write `\expandafter|\textcopyright|' instead of \cmd\textcopyright, thus
% rendering your configuration files unportable.)
%
% Unicode characters (\pkg{inputenc}/|utf8|,|utf8x|) are also supported.
%\changes{v1.9d}{2006/03/06}{support for Unicode (\pkg{inputenc}\slash\texttt{utf8})}
%\changes{v2.3}{2007/11/11}{support for extended Unicode (\pkg{inputenc}\slash\texttt{utf8x} resp. \pkg{ucs}) -- experimental}
%
%\iffalse ^^A obsolete because of `inputenc' key
% We presume that only one input encoding is being used throughout the entire
% document. We could of course save the input encoding together with the list,
% but this would entail a couple of problems: (1)~the overhead of resetting the
% input encoding every time, (2)~the problem (or rather, impossibility) to
% decide which input encoding should be chosen -- the one active when the list
% was declared or the one active when the font is selected, and (3)~the
% improbability of multiple input encodings being used at all.
%\fi
%    \begin{macrocode}
\def\MT@is@active#1#2\@nil{%
  \ifnum\catcode`#1 = \active
    \begingroup
      \set@display@protect
      \let\IeC\@firstofone
      \let\@inpenc@undefined@\MT@undefined@char
%    \end{macrocode}
% Unicode handling has changed again with \LaTeX\ 2019/10/01.
%\changes{v2.7c}{2019/10/10}{compatibility with \LaTeX\ 2019/10/01} ^^A https://github.com/latex3/latex2e/commit/2edd9339ed9a710d45b435ba91545240d0cc9528#diff-d138747c4604d436824f8cb7cedd7d46
%    \begin{macrocode}
      \let\UTF@two@octets@noexpand\@empty
      \let\UTF@three@octets@noexpand\@empty
      \let\UTF@four@octets@noexpand\@empty
%    \end{macrocode}
% We refrain from checking whether there is a sufficient number of octets.
%    \begin{macrocode}
      \def\UTFviii@defined##1{\ifx ##1\relax
        \MT@undefined@char{utf8}\else\expandafter ##1\fi}%
%    \end{macrocode}
% For \pkg{ucs} (utf8x). Let's call it experimental~\dots
%    \begin{macrocode}
      \MT@ifdefined@c@T\PrerenderUnicode
        {\PrerenderUnicode{\@tempa}\let\unicode@charfilter\@firstofone}%
%    \end{macrocode}
% The \cmd\expandafter\ hocus-pocus should please \pkg{newunicodechar}.
%\changes{v2.7a}{2017/11/25}{compatibility with \pkg{newunicodechar}
%                            (reported by \contributor Nils Anders Danielsson <nad\at cse.gu.se>)}
%                            ^^A private mail, 2017/09/05
%    \begin{macrocode}
      \edef\x{\endgroup
        \def\noexpand\@tempa{\expandafter\expandafter\expandafter\@empty\@tempa}%
%    \end{macrocode}
% Append what we think the translation is to the token register we use for the
% log.
%    \begin{macrocode}
        \MT@toks={\the\MT@toks\space(=
                  \expandafter\expandafter\expandafter\@empty\@tempa)}%
      }%
    \x
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@undefined@char}
% For characters not defined in the current input encoding.
%    \begin{macrocode}
\def\MT@undefined@char#1{undefined in input encoding ``#1''}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@symbol}
% The symbol commands might expand to funny stuff, depending on context.
% Instead of simply expanding |\|\meta{command}, we construct the command
% |\|\meta{encoding}|\|\meta{command} and see whether its meaning is
% \cmd\char|"|\meta{hex number}, which is the case for everything that has
% been defined with \cs{DeclareTextSymbol} in the encoding definition files.
%\changes{v2.0}{2006/09/15}{made even more robust}
%    \begin{macrocode}
\def\MT@is@symbol{%
  \expandafter\def\expandafter\MT@char\expandafter
      {\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}%
  \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter
      \meaning\expandafter\MT@char\MT@charstring\relax\relax\relax
  \ifnum\MT@char@ < \z@
%    \end{macrocode}
%\changes{v2.7c}{2019/08/13}{take care of \cs{remove@tlig}}
% For <TU> encoding, the commands \cmd\textquotesingle, \cmd\textasciigrave\
% and \cmd\textquotedbl\ are defined by means of the auxiliary macro
% \cmd\remove@tlig, which we take care of here.
%    \begin{macrocode}
    \expandafter\expandafter\expandafter\MT@is@tlig\MT@char\relax\relax
    \ifnum\MT@char@ < \z@
%    \end{macrocode}
%\changes{v2.2}{2007/03/07}{expand once more (for \pkg{frenchpro})}
% Finally, if it hasn't been defined by \cs{DeclareTextSymbol}, it could be a letter
% (\eg, \cmd\i, when using \pkg{frenchpro}). ^^A as noted by Bernard Gaulle
%                                              ^^A private mail, 2005/01/28
%    \begin{macrocode}
      \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@char}
%\begin{macro}{\MT@charstring}
% A helper macro that inspects the \cmd\meaning\ of its argument.
%    \begin{macrocode}
\begingroup
  \catcode`\/=\z@
%    \end{macrocode}
%\SpecialEscapechar{\/}
%    \begin{macrocode}
  /MT@map@tlist@n{/\CHARLEX}/@makeother
  /lowercase{%
    /def/x{/endgroup
      /def/MT@charstring{\CHAR"}%
      /def/MT@is@char##1\CHAR"##2##3##4/relax{%
        /ifx/relax##4/relax
          /ifMT@xunicode
            /expandafter/MT@is@charx/MT@strip@prefix##1>/relax\CHAR "%
              /relax/relax/relax/relax/relax
          /fi
        /else
          /ifx/relax##1/relax
            /if##3\/relax
              /edef/MT@char@{/number"##2}%
              /MT@ifstreq/MT@charstring{##3##4}/relax/MT@norestfalse
            /else
              /edef/MT@char@{/number"##2##3}%
              /MT@ifstreq/MT@charstring{##4}/relax
                {/MT@is@xchar##2##3|##4\CHAR"/relax}%
            /fi
%<debug>    /MT@dinfo@nl{3}{> `/the/MT@toks' is a \char (/MT@char@)}%
          /fi
        /fi
      }%
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@is@xchar}
%\changes{v2.6}{2016/04/23}{update for \pkg{fontspec}'s <TU> encoding}
% With \pkg{fontspec}'s <TU> encoding, glyph numbers may be up to four digits.
%\SpecialEscapechar{\/}
%    \begin{macrocode}
      /def/MT@is@xchar##1|##2\CHAR"##3##4/relax{%
        /MT@ifstreq/MT@charstring{##3##4}%
          {/edef/MT@char@{/number"##1##2}}/MT@norestfalse
      }%
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@charxstring}
%\begin{macro}{\MT@strip@prefix}
%\begin{macro}{\MT@is@charx}
% For \pkg{xunicode}, which doesn't \cmd\countdef, but rather \cmd\def s the chars.
%\changes{v2.5}{2010/02/27}{compatibility with \pkg{xunicode}}
%\SpecialEscapechar{\/}
%    \begin{macrocode}
      /def/MT@charxstring{\CHAR "}%
      /def/MT@strip@prefix##1>##2/relax{##2}%
      /def/MT@is@charx##1\CHAR "##2##3##4##5##6/relax{%
        /ifx/relax##1/relax
          /ifx/relax##6/relax/else
            /edef/MT@char@{/number"##2##3##4##5}%
            /MT@ifstreq{\RELAX >\CHAR "}{##6}/relax/MT@norestfalse
%<debug>    /MT@dinfo@nl{3}{> `/the/MT@toks' is a xunicode \char (/MT@char@)}%
          /fi
        /fi
      }%
    }%
  }
/x
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@is@tlig}
% This might have to change again with the next \LaTeX\ release, ^^A see https://github.com/latex3/latex2e/issues/165
% \dots\ or so I feared, but it still seems to be fine.
%    \begin{macrocode}
\def\MT@is@tlig#1#2{%
  \ifx#1\remove@tlig
%<debug>    \MT@dinfo@nl{3}{> `\the\MT@toks' (removing remove@tlig)}%
    \MT@is@number #2\relax\relax
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@composite}
% Here, we are dealing with accented characters, specified as two tokens.
%\changes{v1.7}{2005/03/10}{new macro: construct command for composite character;
%                           no uncontrolled expansion}
%\changes{v2.2}{2007/06/08}{more robust: expand exactly once}
%    \begin{macrocode}
\def\MT@is@composite#1#2\relax{%
  \ifx\\#2\\\else
%    \end{macrocode}
% Again, we construct a control sequence, this time of the form:
% |\\|\meta{encoding}\allowbreak|\|\meta{accent}|-|\meta{character}, \eg,
% |\\T1\"-a|, which we then expand once to see if it is a letter (if it has
% been defined by \cs{DeclareTextComposite}). This should be robust, finally,
% especially, since we also \cmd\detokenize\ the input instead of only
% \cmd\string ifying it. Thus, we will die gracefully even on wrong Unicode
% input without |utf8|.
%    \begin{macrocode}
    \expandafter\def\expandafter\MT@char\expandafter{\csname\expandafter
                    \string\csname\MT@encoding\endcsname
                    \MT@detokenize@n{#1}-\MT@detokenize@n{#2}\endcsname}%
%    \end{macrocode}
% In 2017, \LaTeX\ introduced a new way of declaring accented
% Unicode commands (\cs{DeclareUnicodeComposite}), which we take care of here
% (\cs{UnicodeEncodingName} has been introduced at the same time):
%\changes{v2.7}{2017/04/29}{compatibility with \LaTeX\ 2017/01/01 (\cs{DeclareUnicodeComposite})
%                            (reported by \contributor Ulrike Fischer <news3\at nililand.de> and
%                             `\contributor jcr <@\at @>')}
%                             ^^A (1) private mail, 2017/04/25
%                             ^^A (2) https://tex.stackexchange.com/questions/373594/
%    \begin{macrocode}
    \ifx\UnicodeEncodingName\@undefined\else
      \expandafter\expandafter\expandafter
        \MT@is@uni@comp\MT@char\iffontchar\else\fi\relax
    \fi
    \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax
%    \end{macrocode}
% Again, \pkg{xunicode}.
%    \begin{macrocode}
    \ifnum\MT@char@ < \z@
      \ifMT@xunicode
        \edef\MT@char{\MT@exp@two@c\MT@strip@prefix\meaning\MT@char>\relax}%
        \expandafter\MT@exp@two@c\expandafter\MT@is@charx\expandafter
            \MT@char\MT@charxstring\relax\relax\relax\relax\relax
      \fi
    \fi
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@is@uni@comp}
% Helper for \cs{DeclareUnicodeComposite}.
%    \begin{macrocode}
\def\MT@is@uni@comp#1\iffontchar#2\else#3\fi\relax{%
  \ifx\\#2\\\else\edef\MT@char{\iffontchar#2\fi}\fi
}
%    \end{macrocode}
%\end{macro}
% [What about math? Well, for a moment the following looked like a solution, with
% \cs{mt@is@mathchar} defined accordingly, analogous to \cs{MT@is@char} above,
% to pick up the last two tokens (the \cmd\meaning\ of a \cmd\mathchardef'ed
% command expands to its hexadecimal notation):
%\begin{verbatim}
%\def\MT@is@mathchar#1{%
%  \if\relax\noexpand#1% it's a macro
%    \let\x#1%
%  \else % it's a character
%    \mathchardef\x=\mathcode`#1\relax
%  \fi
%  \expandafter\MT@exp@two@c\expandafter\mt@is@mathchar\expandafter
%    \meaning\expandafter\x\mt@mathcharstring\relax\relax\relax
%}
%\end{verbatim}
% However, the problem is that \cmd\mathcode s and \cmd\mathchardef s have
% global scope. Therefore, if they are changed by a package that loads
% different math fonts, there is no guarantee whatsoever that things will still
% be correct (\eg, the minus in |cmsy| when the \pkg{euler} package is loaded).
% So, no way to go, unfortunately.]
%
% Some warning messages, for performance reasons separated here.
%\begin{macro}{\MT@curr@list@name}
%\changes{v1.8}{2005/06/08}{new macro: current list type and name}
%\changes{v1.9f}{2006/08/03}{fix: \cs{MessageBreak} must not be expanded}
%\begin{macro}{\MT@set@listname}
% The type and name of the current list, defined at various places.
%    \begin{macrocode}
\def\MT@set@listname{%
  \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\noexpand\MessageBreak
    `\@nameuse{MT@\MT@feat @c@name}'}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@warn@ascii}
% For `other' characters \textgreater\ 127, we issue a warning (\pkg{inputenc}
% probably hasn't been loaded), since correspondence with the slot numbers
% would be purely coincidental.
%    \begin{macrocode}
\def\MT@warn@ascii{%
  \MT@warning@nl{Character `\the\MT@toks' (= \MT@char@)
    is outside of ASCII range.\MessageBreak
    You must load the `inputenc' package before using\MessageBreak
    8-bit characters in \MT@curr@list@name}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@number@too@large}
% Number too large.
%    \begin{macrocode}
\def\MT@warn@number@too@large#1{%
  \MT@warning@nl{%
    Number #1 in encoding `\MT@encoding' too large!\MessageBreak
    Ignoring it in \MT@curr@list@name}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@rest}
% Not all of the string has been parsed.
%    \begin{macrocode}
\def\MT@warn@rest{%
  \MT@warning@nl{%
    Unknown slot number of character\MessageBreak`\the\MT@toks'%
    \MT@warn@maybe@inputenc\MessageBreak
    in font encoding `\MT@encoding'.\MessageBreak
    Make sure it's a single character\MessageBreak
    (or a number) in \MT@curr@list@name}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@unknown}
% No idea what went wrong.
%    \begin{macrocode}
\def\MT@warn@unknown{%
  \MT@warning@nl{%
    Unknown slot number of character\MessageBreak`\the\MT@toks'%
    \MT@warn@maybe@inputenc\MessageBreak
    in font encoding `\MT@encoding' in \MT@curr@list@name}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@maybe@inputenc}
% In case an input encoding had been requested.
%    \begin{macrocode}
\def\MT@warn@maybe@inputenc{%
  \MT@ifdefined@n@T
     {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}%
    { (input encoding `\@nameuse
     {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}')}%
}
%    \end{macrocode}
%\end{macro}
\def\MT@warn@unknown@once#1{%
  \def\MT@warn@unknown{%
    \MT@warning@nl{One or more slots in the configuration are unknown.\MessageBreak
                   Make sure that no text commands are used.\MessageBreak
                   See the documentation for details (the note\MessageBreak
                   on `#1' in section 9: `Hints and caveats')}%
    \MT@glet\MT@warn@unknown\relax}%
}
%
%\subsubsection{Hook into \LaTeX's font selection}\label{sssec:impl.hook}
%
% We append \cs{MT@setupfont} to \cmd\pickup@font, which is called by \LaTeX\
% every time a font is selected. We then check whether we've already seen this
% font, and if not, set it up for micro-typography.
% This ensures that we will catch all fonts, and that we will not set up fonts
% more than once. The whole package really hangs on this command.
%
% In contrast to the \pkg{pdfcprot} package, it is not necessary to declare in
% advance which fonts should benefit from micro-typographic treatment. Also,
% only those fonts that are actually being used will be set up.
%
% For my reference:
%\begin{itemize}
%  \item \cmd\pickup@font\ is called by \cmd\selectfont, \cmd\wrong@fontshape,
%     or \\ \cmd\getanddefine@fonts\ (for math).
%  \item \cmd\pickup@font\ calls \cmd\define@newfont.
%  \item \cmd\define@newfont\ may call (inside a group!)
%  \begin{itemize}
%     \item \cmd\wrong@fontshape, which in turn will call \cmd\pickup@font,
%        and thus \\ \cmd\define@newfont\ again, or
%     \item \cmd\extract@font.
%  \end{itemize}
%  \item \cmd\get@external@font\ is called by \cmd\extract@font, by itself,
%        and by the substitution macros.
%\end{itemize}
%
%\iffalse
%\changes{v1.2}{2004/10/02}{check for packages that might load fonts}
%\changes{v1.4}{2004/11/04}{no need to check for packages that might load fonts anymore}
%\fi
%\changes{v1.4}{2004/11/04}{use \cmd\pickup@font\ instead of \cmd\define@newfont\
%                           as the hook for \cs{MT@setupfont}}
% Up to version 1.3 of this package, we were using \cmd\define@newfont\ as the
% hook, which is only called for \emph{new} fonts, and therefore seemed the
% natural choice. However, this meant that we had to take special care to catch
% all fonts: we additionally had to set up the default font, the error font (if
% it wasn't the default font), we had to check for some packages that might
% have been loaded before \microtype\ and were loading fonts, \eg,
% \pkg{jurabib}, \pkg{ledmac}, \pkg{pifont} (loaded by \pkg{hyperref}),
% \pkg{tipa}, and probably many more. Furthermore, we had to include a hack for
% the \pkg{IEEEtran} class which loads all fonts in the class file itself (to
% fine tune inter-word spacing), and the \pkg{memoir} class, too. To cut this
% short: it seemed to get out of hand, and I decided that it would be better to
% use \cmd\pickup@font\ and decide for ourselves whether we've already seen
% that font. I hope the overhead isn't too large.
%\changes{v1.8}{2005/05/15}{if font substitution has occurred, set up the
%                           substitute font, not the selected one}
%\changes{v1.9}{2005/10/03}{allow context-specific font setup}
%\begin{macro}{\MT@font@list}
%\begin{macro}{\MT@font}
% We use a comma separated list.
%    \begin{macrocode}
\let\MT@font@list\@empty
\let\MT@font\@empty
%    \end{macrocode}
%\end{macro}
%\end{macro}
% All this is done at the beginning of the document.
% It doesn't work for plain, of course, which doesn't have \cmd\pickup@font.
%    \begin{macrocode}
%</package>
%<*package|letterspace>
%<plain>\MT@requires@latex2{
\MT@addto@setup{%
%    \end{macrocode}
%\begin{macro}{\MT@orig@pickupfont}
% The \pkg{luatexja} package redefines \cmd\char, which will upset our parsing
% of text symbols and commands; instead of fixing this, we won't bother,
% at least for the moment, but simply issue a warning and disable all
% further warnings. The fix is left to the user by not specifying any text
% commands but only (Unicode) letters.
%\changes{v2.6}{2015/12/05}{(in)compatibility with \pkg{luatexja}: disable unknown slots warnings
%                          (reported by \contributor Max <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/272102/luatexja-with-microtype-generates-lots-of-warnings
% The \pkg{xeCJK} package, or rather its \pkg{xunicode-addon}, also modifies the way
% text symbols are defined (like \pkg{luatexja} but in a different way).
% Again, we only issue a warning.
%\changes{v2.6}{2015/11/03}{(in)compatibility with \pkg{xeCJK}: disable unknown slots warnings
%                           (reported by \contributor HcN <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/275653/warning-using-microtype-and-excjk-packages
%    \begin{macrocode}
%<package>  \MT@with@package@T{luatexja}{\MT@warn@unknown@once{luatexja}}%
%<package>  \MT@with@package@T{xeCJK}   {\MT@warn@unknown@once{xeCJK}}%
%    \end{macrocode}
%\changes{v2.1}{2007/01/15}{compatibility with \pkg{CJK}: also check for its definition}
%\changes{v2.3b}{2008/05/26}{compatibility with \pkg{CJKutf8}: also check for its definition}
% \microtype\ also works with \pkg{CJK} in the sense that nothing will break
% when both packages are used at the same time. However, since \pkg{CJK} has
% its own way of encoding, it is currently not possible to create
% character-specific settings. That is, the only feature available with
% \pkg{CJK} fonts is (non-selected) expansion.
% (Tracking doesn't really work for other reasons.)
%\todo{fix tracking with \pkg{CJK}, if worth the trouble}^^A
% Like us, \pkg{CJK} redefines \cmd\pickup@font.
%    \begin{macrocode}
  \@ifpackageloaded{CJK}{%
%    \end{macrocode}
%\changes{v2.6}{2013/06/06}{compatibility with \pkg{xeCJK}: pretend that \pkg{CJK} wasn't loaded}
% The \pkg{xeCJK} package in turn pretends that \pkg{CJK} was loaded, but does not
% change the definition of \cmd\pickup@font.
% With \pkg{xeCJK}, protrusion should be possible also for C/J/K characters;
% I haven't tried it, though.
%^^A also, \XeTeXinterchartoks probably interferes ...
%    \begin{macrocode}
    \@ifpackageloaded{xeCJK}{\@firstofone}{%
      \@ifpackagelater{CJK}{2006/10/17}% 4.7.0
        {\def\MT@orig@pickupfont{\CJK@ifundefined\CJK@plane}}%
        {\def\MT@orig@pickupfont{\@ifundefined{CJK@plane}}}%
      \g@addto@macro\MT@orig@pickupfont
        {{\expandafter\ifx\font@name\relax\define@newfont\fi}}%
%    \end{macrocode}
% \pkg{CJKutf8} redefines \cmd\pickup@font\ once more (recent versions, in
% <PDF> mode, as determined by \pkg{ifpdf}, which \pkg{CJKutf8} loads).
%    \begin{macrocode}
      \@ifpackageloaded{CJKutf8}%
        {\@ifpackagelater{CJKutf8}{2008/05/22}% 4.8.0
          {\ifpdf\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}%
          {\@firstoftwo}}%
        {\@firstoftwo}%
      {\g@addto@macro\MT@orig@pickupfont{%
        {\expandafter\ifx\csname\curr@fontshape/\f@size/\CJK@plane\endcsname\relax
           \define@newfont\else\xdef\font@name{%
             \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}%
      {\g@addto@macro\MT@orig@pickupfont{%
        {\expandafter\ifx\csname \curr@fontshape/\f@size/\CJK@plane\endcsname\relax
           \define@newfont\def\CJK@temp{v}%
           \ifx\CJK@temp\CJK@plane
             \expandafter\ifx\csname CJK@cmap@\f@family\CJK@plane\endcsname\relax
             \else\csname CJK@cmap@\f@family\CJK@plane\endcsname\fi
           \else \CJK@addcmap\CJK@plane \fi
         \else\xdef\font@name{%
           \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}%
      \@gobble
    }%
  }{\@firstofone}%
%    \end{macrocode}
% This is the normal \LaTeX\ definition.
%    \begin{macrocode}
  {\def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi}}%
%    \end{macrocode}
% Check whether \cmd\pickup@font\ is defined as expected.
% The warning issued by \cmd{\CheckCommand*} would be a bit too generic.
%    \begin{macrocode}
  \ifx\pickup@font\MT@orig@pickupfont \else
    \MT@warning@nl{%
      Command \string\pickup@font\space is not defined as expected.%
      \MessageBreak Patching it anyway. Some things may break%
%<*package>
     .\MessageBreak Double-check whether micro-typography is indeed%
      \MessageBreak applied to the document.%
      \MessageBreak (Hint: Turn on `verbose' mode)%
%</package>
    }%
  \fi
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\pickup@font}
% Then we append our stuff. Everything is done inside a group.
%\changes{v2.2}{2007/04/15}{\letterspace: setup inside group}
%    \begin{macrocode}
  \g@addto@macro\pickup@font{\begingroup}%
%    \end{macrocode}
% If the \pkg{trace} package is loaded, we turn off tracing of \microtype's
% setup, which is extremely noisy.
%\changes{v1.9e}{2006/05/25}{no tracing with \pkg{trace} package}
%    \begin{macrocode}
  \MT@with@package@T{trace}{\g@addto@macro\pickup@font{\conditionally@traceoff}}%
  \g@addto@macro\pickup@font{%
      \escapechar\m@ne
%<*package>
%<debug>      \global\MT@inannottrue
%<debug>      \MT@glet\MT@pdf@annot\@empty
%<debug>      \MT@addto@annot{(line \number\inputlineno)}%
%    \end{macrocode}
% If \cs{MT@font} is empty, no substitution has taken place, hence
% \cmd\font@name\ is correct. Otherwise, if they are different,
% \cmd\font@name\ does not describe the font actually used. This test will
% catch first order substitutions, like |bx| to |b|, but it will still fail if
% the substituting font is itself substituted.
%    \begin{macrocode}
      \MT@let@cn\MT@font{MT@subst@\expandafter\string\font@name}%
      \ifx\MT@font\relax
        \let\MT@font\font@name
      \else
        \ifx\MT@font\font@name \else
%<debug>  \MT@addto@annot{= substituted with \MT@@font}%
          \MT@register@subst@font
        \fi
      \fi
      \MT@setupfont
%</package>
%<letterspace>      \MT@tracking
    \endgroup
  }%
%<*package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@pickupfont}
%\begin{macro}{\MT@MT@pickupfont}
%\begin{macro}{\MT@ltx@pickupfont}
% Remember the patched command, because we may have to disable
% ourselves in certain situations.
%    \begin{macrocode}
  \let\MT@pickupfont\pickup@font
  \def\MT@MT@pickupfont {\let\pickup@font\MT@pickupfont}%
  \def\MT@ltx@pickupfont{\let\pickup@font\MT@orig@pickupfont}%
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\do@subst@correction}
% Additionally, we hook into \cmd\do@subst@correction, which is called if
% a substitution has taken place, to record the name of the ersatz font.
% Unfortunately, this will only work for one-level substitutions.
%\changes{v2.3}{2007/08/05}{remember substitute font for all times
%                           (reported by \contributor Stephan Hennig <stephanhennig\at arcor.de>)}
%                               ^^A MID: <46ab4fbb$0$31632$9b4e6d93@newsspool3.arcor-online.net>
% We have to remember the substitute for the rest of the document, not just for
% the first time it is called, since we need it every time a font is
% letterspaced.
%    \begin{macrocode}
  \g@addto@macro\do@subst@correction
    {\edef\MT@font{\csname\curr@fontshape/\f@size\endcsname}%
     \MT@glet@nc{MT@subst@\expandafter\string\font@name}\MT@font}%
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\add@accent}
%\changes{v1.8}{2005/06/14}{fix: disable micro-typographic setup inside \cmd\add@accent\
%               (reported by \contributor Stephan Hennig <stephanhennig\at arcor.de>)}
%                    ^^A MID: <42adb0e3$0$27784$9b4e6d93@newsread2.arcor-online.net>
%\begin{macro}{\MT@orig@add@accent}
% Inside \cmd\add@accent, we have to disable \microtype's setup, since the
% grouping in the patched \cmd\pickup@font\ would break the accent if
% different fonts are used for the base character and the accent. Fortunately,
% \LaTeX\ takes care that the fonts used for the \cmd\accent\ are already set
% up, so that we cannot be overlooking them.
%    \begin{macrocode}
  \let\MT@orig@add@accent\add@accent
  \def\add@accent#1#2{%
    \MT@ltx@pickupfont
    \MT@orig@add@accent{#1}{#2}%
    \MT@MT@pickupfont
  }%
%</package>
}
%<plain>}\relax
%<*package>
%    \end{macrocode}
%\end{macro}
%\end{macro}
% Consequently (if all goes well), we are the last ones to change these
% commands, therefore there is no need to check whether our definition has
% survived.
%\changes{v1.6}{2004/12/29}{test whether \cmd\pickup@font\ has changed}
%\changes{v1.9a}{2005/11/21}{remove superfluous test whether \cmd\pickup@font\ has changed}
%
%\begin{macro}{\MT@check@font}
% Check whether we've already seen the current font.
%    \begin{macrocode}
\def\MT@check@font{\MT@exp@one@n\MT@in@clist\MT@font\MT@font@list}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@register@font}
% Register the current font.
%    \begin{macrocode}
\def\MT@register@font{\xdef\MT@font@list{\MT@font@list\MT@font,}}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@register@subst@font}
% Register the substituted font
%\changes{v2.5}{2010/08/23}{only register substituted font if it isn't registered already
%                           (reported by \contributor George Gratzer <gratzer\at me.com>
%                            and \contributor Josep Maria Font <jmfont\at ub.edu>)}
%                             ^^A 1. <http://permalink.gmane.org/gmane.comp.tex.macosx/38293>
%                             ^^A 2. <http://permalink.gmane.org/gmane.comp.tex.macosx/38303>
%                             ^^A (beta:02)
% (only if it isn't registered already).
%\changes{v2.7d}{2019/10/28}{remove substitute font from list
%                            (reported by \contributor Markus Kohm <komascript\at gmx.info>)}
%                             ^^A private mail, 2019/01/16
%                             ^^A https://tex.stackexchange.com/q/470311
% Additionally, we have to remove the substitute font from the list of fonts,
% so that we set it up again.
%    \begin{macrocode}
\def\MT@register@subst@font{%
  \MT@exp@one@n\MT@in@clist\font@name\MT@font@list
  \ifMT@inlist@\else
    \xdef\MT@font@list{\MT@font@list\font@name,}%
    \expandafter\MT@rem@from@clist\MT@font\MT@font@list
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Context-sensitive setup}
%
% Here are the variants for context-sensitive setup.
%\begin{macro}{\MT@active@features}
% The activated features are stored in this command.
%    \begin{macrocode}
\let\MT@active@features\@empty
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@font@cx}
% Every feature has its own list of fonts that have already been dealt with. If
% the font needn't be set up for a feature, we temporarily disable the
% corresponding setup command.
%\changes{v1.9a}{2005/11/14}{optimise context-sensitive setup}
% This should be more efficient than book-keeping the fonts in lists associated
% with the combination of contexts, as we've done it before.
%    \begin{macrocode}
\def\MT@check@font@cx{%
  \MT@if@true
  \MT@map@clist@c\MT@active@features{%
    \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\MT@font
      \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
    \ifMT@inlist@
      \MT@let@nc{MT@\@nameuse{MT@abbr@##1}}\relax
    \else
      \MT@if@false
    \fi
  }%
  \ifMT@if@ \MT@inlist@true \else \MT@inlist@false \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@register@subst@font@cx}
% Add the substituted font to each feature list and possibly remove substitute font.
%\todo{remove from other lists?}
%\changes{v2.5}{2010/08/23}{only register if it isn't registered already} ^^A (beta:02)
%\changes{v2.7d}{2019/10/28}{remove substitute font from lists}
%    \begin{macrocode}
\def\MT@register@subst@font@cx{%
  \MT@map@clist@c\MT@active@features{%
    \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\font@name
      \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
    \ifMT@inlist@ \else
      \MT@exp@cs\MT@xadd
        {MT@##1@\csname MT@##1@context\endcsname font@list}%
        {\font@name,}%
      \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter\MT@font
         \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@register@font@cx}
% For each feature, add the current font to the list, unless we didn't set it
% up.
%    \begin{macrocode}
\def\MT@register@font@cx{%
  \MT@map@clist@c\MT@active@features{%
    \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else
      \MT@exp@cs\MT@xadd
        {MT@##1@\csname MT@##1@context\endcsname font@list}%
        {\MT@font,}%
      \def\@tempa{##1}%
      \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@maybe@rem@from@list
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@maybe@rem@from@list}
% Recurse through all context font lists of the document and remove the font,
% unless it's the current context.
%    \begin{macrocode}
\def\MT@maybe@rem@from@list#1{%
  \MT@ifstreq{\@tempa/#1}{\@tempa/\csname MT@\@tempa @context\endcsname}\relax{%
    \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter
       \MT@font \csname MT@\@tempa @#1font@list\endcsname
  }%
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\microtypecontext}
%\changes{v1.9}{2005/10/03}{new command: change setup context in the document}
%\changes{v2.3}{2007/08/05}{made robust (reported by \contributor Stephan Hennig <stephanhennig\at arcor.de>)}
%                                           ^^A MID: <46ab4fbb$0$31632$9b4e6d93@newsspool3.arcor-online.net>
%\changes{v2.6}{2014/03/26}{allow \texttt{activate} shortcut (reported by \contributor Karl Berry <karl\at freefriends.org>)}
%                                           ^^A private mail, 2014/03/21
%\changes{v2.8}{2019/11/25}{fix \texttt{activate} shortcut}
%\changes{v2.8}{2019/12/12}{ignore spaces}
%\begin{macro}{\MT@microtypecontext}
% The user may change the context, so that different setups are possible. This
% is especially useful for multi-lingual documents.
%
% Inside the preamble, this command shouldn't actually do anything but remember itself for
% later.
%    \begin{macrocode}
\def\microtypecontext{\MT@begin@catcodes\MT@microtypecontext}
\def\MT@microtypecontext#1{\MT@end@catcodes\MT@addto@setup{\microtypecontext{#1}}}
\MT@addto@setup{%
  \DeclareRobustCommand\microtypecontext{%
    \MT@begin@catcodes
    \MT@microtypecontext
  }%
  \def\MT@microtypecontext#1{%
    \MT@end@catcodes
    \MT@setup@contexts
    \let\MT@reset@context\relax
%    \end{macrocode}
% We need to ensure that math fonts are set up anew.
%\changes{v2.5}{2012/11/13}{fix: ensure to set up math fonts (reported by \contributor RazorXsr <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/82556/pdftex-font-expansion-error-setexpansion-in-microtype-package
%    \begin{macrocode}
    \MT@glet\glb@currsize\@empty
    \setkeys{MTC}{#1}%
    \selectfont
    \MT@reset@context
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\textmicrotypecontext}
%\changes{v2.2}{2007/07/03}{new command: wrapper around \cs{microtypecontext}}
%\changes{v2.8}{2019/12/12}{ignore spaces}
%\begin{macro}{\MT@textmicrotypecontext}
%\begin{macro}{\MT@text@microtypecontext}
% This is just a wrapper around \cs{microtypecontext}.
%    \begin{macrocode}
\DeclareRobustCommand\textmicrotypecontext{\MT@begin@catcodes\MT@textmicrotypecontext}
\def\MT@textmicrotypecontext#1{\MT@end@catcodes\MT@text@microtypecontext{#1}}
\def\MT@text@microtypecontext#1#2{{\microtypecontext{#1}#2}}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@reset@context}
%\changes{v1.9f}{2006/08/03}{only reset context if it has actually been changed}
%\begin{macro}{\MT@reset@context@}
% We have to reset the font at the end of the group, provided there actually was
% a change.
%    \begin{macrocode}
\def\MT@reset@context@{%
  \MT@vinfo{<<< Resetting contexts\on@line
%<debug>  \MessageBreak= \MT@pr@context/\MT@ex@context
%<debug>                /\MT@tr@context/\MT@kn@context/\MT@sp@context
  }%
  \selectfont
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@setup@contexts}
% The first time \cs{microtypecontext} is called, we initialise the context
% lists and redefine the commands used in \cmd\pickup@font.
%    \begin{macrocode}
\def\MT@setup@contexts{%
  \MT@map@clist@c\MT@active@features
    {\MT@glet@nc{MT@##1@@font@list}\MT@font@list}%
  \MT@glet\MT@check@font\MT@check@font@cx
  \MT@glet\MT@register@font\MT@register@font@cx
  \MT@glet\MT@register@subst@font\MT@register@subst@font@cx
  \MT@glet\MT@setup@contexts\relax
}
%    \end{macrocode}
%\end{macro}
% Define context keys.
%    \begin{macrocode}
\MT@map@clist@c\MT@features@long{%
  \define@key{MTC}{#1}[]{%
    \edef\@tempb{\@nameuse{MT@rbba@#1}}%
    \MT@exp@one@n\MT@in@clist\@tempb\MT@active@features
    \ifMT@inlist@
%    \end{macrocode}
% Using an empty context is only asking for trouble, therefore we choose the
% `|@|' instead (hoping for the \LaTeX\ users' natural awe of this character).
%    \begin{macrocode}
      \MT@ifempty{##1}{\def\MT@val{@}}{\def\MT@val{##1}}%
      \MT@exp@cs\ifx{MT@\@tempb @context}\MT@val
%<debug>\MT@dinfo{1}{>>> no change of #1 context: `\MT@val'}%
      \else
        \MT@vinfo{>>> Changing #1 context to `\MT@val'\MessageBreak\on@line
%<debug>          \space(previous: `\@nameuse{MT@\@tempb @context}')%
                 }%
        \def\MT@reset@context{\aftergroup\MT@reset@context@}%
%    \end{macrocode}
% The next time we see the font, we have to reset \emph{all} factors.
%^^A TODO: only for pdftex? or why at all?
%    \begin{macrocode}
        \MT@glet@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}%
%    \end{macrocode}
% We must also keep track of all contexts in the document.
%    \begin{macrocode}
        \expandafter\MT@exp@one@n\expandafter\MT@in@tlist\expandafter
          \MT@val \csname MT@\@tempb @doc@contexts\endcsname
        \ifMT@inlist@ \else
          \MT@exp@cs\MT@xadd{MT@\@tempb @doc@contexts}{{\MT@val}}%
%<debug>  \MT@dinfo{1}{||| added #1 context: \@nameuse{MT@\@tempb @doc@contexts}}%
        \fi
        \MT@edef@n{MT@\@tempb @context}{\MT@val}%
      \fi
    \fi
  }%
}
%    \end{macrocode}
% We also allow the |activate| shortcut.
%    \begin{macrocode}
\define@key{MTC}{activate}[]{%
  \setkeys{MTC}{protrusion={#1}}%
  \setkeys{MTC}{expansion={#1}}%
}
%    \end{macrocode}
%\begin{macro}{\MT@pr@context}
%\begin{macro}{\MT@ex@context}
%\begin{macro}{\MT@tr@context}
%\begin{macro}{\MT@sp@context}
%\begin{macro}{\MT@kn@context}
%\begin{macro}{\MT@pr@doc@contexts}
%\begin{macro}{\MT@ex@doc@contexts}
%\begin{macro}{\MT@tr@doc@contexts}
%\begin{macro}{\MT@sp@doc@contexts}
%\begin{macro}{\MT@kn@doc@contexts}
%\begin{macro}{\MT@extra@context}
% Initialise the contexts.
%    \begin{macrocode}
\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{%
  \MT@def@n{MT@#1@context}{@}%
  \MT@def@n{MT@#1@doc@contexts}{{@}}%
}
\let\MT@extra@context\@empty
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\subsection{Configuration}
%
%\subsubsection{Font sets}
%\todo{allow for \texttt{load}ing and extending another set; or using more than one set?}
%
%\begin{macro}{\DeclareMicrotypeSet}
%^^A \changes{v1.1}{2004/09/15}{remove spaces around first argument}
%\changes{v2.6}{2013/08/05}{ignore spaces}
%\begin{macro}{\DeclareMicrotypeSet*}
% Calling this macro will create a comma list for every font attribute of the
% form: |\MT|\meta{feature}|list@|\meta{attribute}|@|\meta{set name}. If the
% optional argument is empty, lists for all available features will be created.
%
% The third argument must be a list of |key=value| pairs. If a font attribute
% is not specified, we define the corresponding list to \cmd\relax, so that it
% does not constitute a constraint.
%    \begin{macrocode}
\def\DeclareMicrotypeSet{%
  \MT@begin@catcodes
  \@ifstar
    \MT@DeclareSetAndUseIt
    \MT@DeclareSet
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@DeclareSet}
%    \begin{macrocode}
\newcommand\MT@DeclareSet[3][]{%
  \MT@ifempty{#1}{%
    \MT@map@clist@c\MT@features{{\MT@declare@sets{##1}{#2}{#3}}}%
  }{%
    \MT@map@clist@n{#1}{{%
      \MT@ifempty{##1}\relax{%
        \MT@is@feature{##1}{set declaration `#2'}{%
          \MT@exp@one@n\MT@declare@sets
            {\csname MT@rbba@##1\endcsname}{#2}{#3}%
        }%
      }%
    }}%
  }%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@DeclareSetAndUseIt}
%    \begin{macrocode}
\newcommand\MT@DeclareSetAndUseIt[3][]{%
  \MT@DeclareSet[#1]{#2}{#3}%
  \UseMicrotypeSet[#1]{#2}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@curr@set@name}
% We need to remember the name of the set currently being declared.
%    \begin{macrocode}
\let\MT@curr@set@name\@empty
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@declare@sets}
% Define the current set name and parse the keys.
%\changes{v1.1}{2004/09/20}{remove spaces around set name}
%\changes{v1.8}{2005/05/15}{warning when redefining a set}
%\changes{v2.0}{2006/10/16}{fix: empty size list when redefining set}
%\changes{v2.6}{2016/04/20}{fix: undefine lists for redefining}
%\todo{share one set between features}
%    \begin{macrocode}
\def\MT@declare@sets#1#2#3{%
  \def\MT@curr@set@name{#2}%
  \MT@ifdefined@n@T{MT@#1@set@@\MT@curr@set@name}{%
    \MT@warning{Redefining \@nameuse{MT@abbr@#1} set `\MT@curr@set@name'}%
    \MT@map@clist@n{font,encoding,family,series,shape,size}{%
      \MT@glet@nc{MT@#1list@##1@\MT@curr@set@name}\@undefined
    }%
  }%
  \MT@glet@nc{MT@#1@set@@\MT@curr@set@name}\@empty
%<debug>\MT@dinfo{1}{declaring \@nameuse{MT@abbr@#1} set `\MT@curr@set@name'}%
  \setkeys{MT@#1@set}{#3}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@define@set@key@}
% \meta{\#1} = font axis, \meta{\#2} = feature.
%\changes{v1.8}{2005/04/16}{use comma lists instead of token lists}
%\changes{v1.9a}{2005/11/21}{don't expand variables immediately
%                (requested by \contributor Georg Verweyen <verweyen\at gmail.com>)}
%                   ^^A MID: <437a522d$0$7419$9b4e6d93@newsread4.arcor-online.net>
%    \begin{macrocode}
\def\MT@define@set@key@#1#2{%
  \define@key{MT@#2@set}{#1}[]{%
    \MT@glet@nc{MT@#2list@#1@\MT@curr@set@name}\@empty
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \MT@get@highlevel{#1}%
%    \end{macrocode}
% We do not add the expanded value to the list~\dots
%    \begin{macrocode}
      \MT@exp@two@n\g@addto@macro
        {\csname MT@#2list@#1@\MT@curr@set@name\expandafter\endcsname}%
        {\MT@val,}%
    }%
%    \end{macrocode}
% \dots~but keep in mind that the list has to be expanded at the end of the
% preamble.
%    \begin{macrocode}
    \expandafter\g@addto@macro\expandafter\MT@font@sets
      \csname MT@#2list@#1@\MT@curr@set@name\endcsname
%<debug>\MT@dinfo@nl{1}{-- #1: \@nameuse{MT@#2list@#1@\MT@curr@set@name}}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@highlevel}
% Saying, for instance, `|family=rm*|' or `|shape=bf*|' will expand to
% \cmd\rmdefault\ resp. \cmd\bfdefault.
%    \begin{macrocode}
\def\MT@get@highlevel#1{%
  \expandafter\MT@test@ast\MT@val*\@nil\relax{%
%    \end{macrocode}
% And `|family = *|' will become \cmd\familydefault.
%    \begin{macrocode}
    \MT@ifempty\@tempa{\def\@tempa{#1}}\relax
%    \end{macrocode}
% Test whether the command is actually defined.
%\changes{v2.7a}{2017/11/17}{test whether \cs{\dots default} is defined}
%    \begin{macrocode}
    \MT@ifdefined@n@TF{\@tempa default}%
      {\edef\MT@val{\expandafter\noexpand\csname \@tempa default\endcsname}}%
      {\MT@warning{`\@backslashchar\@tempa default' is not a defined command.\MessageBreak
                   Ignoring `#1 = {\@tempa*}' in font set\MessageBreak`\MT@curr@set@name'}%
       \let\MT@val\@empty}%
%    \end{macrocode}
% In contrast to earlier versions, these values will not be expanded immediately,
% but at the end of the preamble.
%\changes{v1.2}{2004/09/26}{check whether defaults have changed}
%\changes{v1.5}{2004/12/02}{don't test defaults if called after begin document}
%\changes{v1.9a}{2005/11/21}{no longer check whether defaults have changed}
%    \begin{macrocode}
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@test@ast}
% It the last character is an asterisk, execute the second argument, otherwise
% the first one.
%\changes{v1.7}{2005/03/10}{make it simpler}
%    \begin{macrocode}
\def\MT@test@ast#1*#2\@nil{%
  \def\@tempa{#1}%
  \MT@ifempty{#2}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@font@sets}
%\begin{macro}{\MT@fix@font@set}
% Fully expand the font specification and fix catcodes for all font sets. Also
% remove \pkg{fontspec}'s counters.
%    \begin{macrocode}
\let\MT@font@sets\@empty
\def\MT@fix@font@set#1{%
  \MT@ifdefined@c@T{#1}{%
    \xdef#1{#1}%
    \ifMT@fontspec
      \xdef#1{\expandafter\MT@scrubfeatures#1()\relax}%
    \fi
    \global\@onelevel@sanitize#1%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@define@set@key@size}
% |size| requires special treatment.
%    \begin{macrocode}
\def\MT@define@set@key@size#1{%
  \define@key{MT@#1@set}{size}[]{%
    \MT@map@clist@n{##1}{%
      \def\MT@val{####1}%
      \expandafter\MT@get@range\MT@val--\@nil
      \ifx\MT@val\relax \else
        \MT@exp@cs\MT@xadd
          {MT@#1list@size@\MT@curr@set@name}%
          {{{\MT@lower}{\MT@upper}\relax}}%
      \fi
    }%
%<debug>\MT@dinfo@nl{1}{-- size: \@nameuse{MT@#1list@size@\MT@curr@set@name}}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\changes{v1.7}{2005/03/11}{allow specification of size ranges
%               (suggested by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)}
%                                                            ^^A private mail, 2005/03/10
% Font sizes may also be specified as ranges. This has been requested by Andreas
% B\"uhmann, who has also offered valuable help in implementing this. Now, it
% is for instance possible to set up different lists for fonts with optical
% sizes. (The \pkg{MinionPro} project does this for the OpenType version
% of Adobe's Minion. (\ctanpkgurl{minionpro}))
%
%\begin{macro}{\MT@get@range}
%\begin{macro}{\MT@upper}
%\begin{macro}{\MT@lower}
% Ranges will be stored as triplets of |{|\meta{lower bound}|}|\allowbreak
% |{|\meta{upper bound}|}|\allowbreak|{|\meta{list name}|}|.
% For simple sizes, the upper boundary is \textminus1.
%    \begin{macrocode}
\def\MT@get@range#1-#2-#3\@nil{%
  \MT@ifempty{#1}{%
    \MT@ifempty{#2}{%
      \let\MT@val\relax
    }{%
      \def\MT@lower{0}%
      \def\MT@val{#2}%
      \MT@get@size
      \edef\MT@upper{\MT@val}%
    }%
  }{%
    \def\MT@val{#1}%
    \MT@get@size
    \ifx\MT@val\relax \else
      \edef\MT@lower{\MT@val}%
      \MT@ifempty{#2}{%
        \MT@ifempty{#3}%
          {\def\MT@upper{-1}}%
%    \end{macrocode}
% 2048\,pt is \TeX's maximum font size.
%    \begin{macrocode}
          {\def\MT@upper{2048}}%
      }{%
        \def\MT@val{#2}%
        \MT@get@size
        \ifx\MT@val\relax \else
          \MT@ifdim\MT@lower>\MT@val{%
            \MT@error{%
              Invalid size range (\MT@lower\space > \MT@val) in font set
              `\MT@curr@set@name'.\MessageBreak Swapping sizes}{}%
            \edef\MT@upper{\MT@lower}%
            \edef\MT@lower{\MT@val}%
          }{%
            \edef\MT@upper{\MT@val}%
          }%
          \MT@ifdim\MT@lower=\MT@upper
            {\def\MT@upper{-1}}%
            \relax
        \fi
      }%
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@size}
% Translate a size selection command and normalise it.
%    \begin{macrocode}
\def\MT@get@size{%
%    \end{macrocode}
% A single star would mean \cs{sizedefault}, which doesn't exist, so we define
% it to be \cmd\normalsize.
%    \begin{macrocode}
  \if*\MT@val\relax
    \def\@tempa{\normalsize}%
  \else
    \MT@let@cn\@tempa{\MT@val}%
  \fi
  \ifx\@tempa\relax \else
%    \end{macrocode}
% The \pkg{relsize} solution of parsing \cmd\@setfontsize\ does not work with the
% <AMS> classes, among others. I hope my hijacking doesn't do any harm.
%\changes{v1.2}{2004/09/26}{hijack \cmd\set@fontsize\ instead of \cmd\@setfontsize}
% We redefine \cmd\set@fontsize\ instead of \cmd\@setfontsize\ because some classes
% might define the size selection commands by simply using \cmd\fontsize\
% (\eg, the \pkg{a0poster} class).
%\changes{v2.3b}{2008/03/07}{grouping}
%    \begin{macrocode}
    \begingroup
      \def\set@fontsize##1##2##3##4\@nil{\endgroup\def\MT@val{##2}}%
      \@tempa\@nil
  \fi
%    \end{macrocode}
% Test whether we finally got a number or dimension so that we can strip the
% `|pt|' (\cmd\@defaultunits\ and \cmd\strip@pt\ are kernel macros).
%\changes{v1.2}{2004/09/27}{additional magic to catch some errors}
%    \begin{macrocode}
  \MT@ifdimen\MT@val{%
    \@defaultunits\@tempdima\MT@val pt\relax\@nnil
    \edef\MT@val{\strip@pt\@tempdima}%
  }{%
    \MT@warning{Could not parse font size `\MT@val'\MessageBreak
                in font set `\MT@curr@set@name'}%
    \let\MT@val\relax
  }%
}
%    \end{macrocode}
%\end{macro}
%\changes{v1.9}{2005/07/13}{\cs{DeclareMicrotypeSet}: new key: \texttt{font}}
%\begin{macro}{\MT@define@set@key@font}
%\changes{v2.3}{2007/11/20}{\texttt{font}: single asterisk means normal font}
%    \begin{macrocode}
\def\MT@define@set@key@font#1{%
  \define@key{MT@#1@set}{font}[]{%
    \MT@glet@nc{MT@#1list@font@\MT@curr@set@name}\@empty
    \MT@map@clist@n{##1}{%
      \def\MT@val{####1}%
      \MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax
      \expandafter\MT@get@font\MT@val/////\@nil
      \MT@exp@two@n\g@addto@macro
        {\csname MT@#1list@font@\MT@curr@set@name\expandafter\endcsname}%
        {\MT@val,}%
    }%
    \expandafter\g@addto@macro\expandafter\MT@font@sets
      \csname MT@#1list@font@\MT@curr@set@name\endcsname
%<debug>\MT@dinfo@nl{1}{-- font: \@nameuse{MT@#1list@font@\MT@curr@set@name}}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@font}
% Translate any asterisks.
%    \begin{macrocode}
\def\MT@get@font#1/#2/#3/#4/#5/#6\@nil{%
  \MT@get@font@{#1}{#2}{#3}{#4}{#5}{0}%
  \ifx\MT@val\relax\def\MT@val{0}\fi
  \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val}%
  \let\MT@val\@tempb
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@font@}
% Helper macro, also used by \cs{MT@get@font@and@size}.
%    \begin{macrocode}
\def\MT@get@font@#1#2#3#4#5#6{%
  \let\@tempb\@empty
  \def\MT@temp{#1/#2/#3/#4/#5}%
  \MT@get@axis{encoding}{#1}%
  \MT@get@axis{family}  {#2}%
  \MT@get@axis{series}  {#3}%
  \MT@get@axis{shape}   {#4}%
  \ifnum#6>\z@\edef\@tempb{\@tempb*}\fi
  \MT@ifempty{#5}{%
    \MT@warn@axis@empty{size}{\string\normalsize}%
    \def\MT@val{*}%
  }{%
    \def\MT@val{#5}%
  }%
  \MT@get@size
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@axis}
%    \begin{macrocode}
\def\MT@get@axis#1#2{%
  \def\MT@val{#2}%
  \MT@get@highlevel{#1}%
  \MT@ifempty\MT@val{%
    \MT@warn@axis@empty{#1}{\csname #1default\endcsname}%
    \expandafter\def\expandafter\MT@val\expandafter{\csname #1default\endcsname}%
  }\relax
  \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val/}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@warn@axis@empty}
%    \begin{macrocode}
\def\MT@warn@axis@empty#1#2{%
  \MT@warning{#1 axis is empty in font specification\MessageBreak
    `\MT@temp'. Using `#2' instead}%
}
%    \end{macrocode}
%\end{macro}
% We can finally assemble all pieces to define \cs{DeclareMicrotypeSet}'s
% keys.
% They are also used for \cs{DisableLigatures}.
%    \begin{macrocode}
\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{%
  \MT@define@set@key@{encoding}{#1}%
  \MT@define@set@key@{family}  {#1}%
  \MT@define@set@key@{series}  {#1}%
  \MT@define@set@key@{shape}   {#1}%
  \MT@define@set@key@size      {#1}%
  \MT@define@set@key@font      {#1}%
}
%    \end{macrocode}
%\begin{macro}{\UseMicrotypeSet}
% To use a particular set we simply redefine |MT@|\meta{feature}|@setname|.
% If the optional argument is empty, set names for all features will be
% redefined.
%^^A \changes{v1.1}{2004/09/20}{remove spaces around first argument}
%\changes{v2.6}{2013/08/05}{ignore spaces}
%    \begin{macrocode}
\def\UseMicrotypeSet{%
  \MT@begin@catcodes
  \MT@UseMicrotypeSet
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@UseMicrotypeSet}
%    \begin{macrocode}
\newcommand*\MT@UseMicrotypeSet[2][]{%
  \MT@ifempty{#1}{%
    \MT@map@clist@c\MT@features{{\MT@use@set{##1}{#2}}}%
  }{%
    \MT@map@clist@n{#1}{{%
      \MT@ifempty{##1}\relax{%
        \MT@is@feature{##1}{activation of set `#2'}{%
          \MT@exp@one@n\MT@use@set
            {\csname MT@rbba@##1\endcsname}{#2}%
        }%
      }%
    }}%
  }%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@pr@setname}
%\begin{macro}{\MT@ex@setname}
%\begin{macro}{\MT@tr@setname}
%\begin{macro}{\MT@sp@setname}
%\begin{macro}{\MT@kn@setname}
%\begin{macro}{\MT@use@set}
% Only use sets that have been declared.
%\changes{v1.1}{2004/09/20}{remove spaces around set name}
%\changes{v1.4b}{2004/11/25}{don't use undeclared font sets}
%\changes{v1.6}{2005/01/19}{retain current set if new set is undeclared}
%\changes{v1.8}{2005/05/15}{fix: remove braces in first line}
%    \begin{macrocode}
\def\MT@use@set#1#2{%
  \MT@ifdefined@n@TF{MT@#1@set@@#2}{%
    \MT@xdef@n{MT@#1@setname}{#2}%
  }{%
    \MT@ifdefined@n@TF{MT@#1@setname}\relax{%
      \MT@xdef@n{MT@#1@setname}{\@nameuse{MT@default@#1@set}}%
    }%
    \MT@error{%
      The \@nameuse{MT@abbr@#1} set `#2' is undeclared.\MessageBreak
      Using set `\@nameuse{MT@#1@setname}' instead}{}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\DeclareMicrotypeSetDefault}
%\changes{v1.8}{2005/05/15}{new command: set default font set}
%\changes{v2.6}{2013/08/05}{ignore spaces}
% This command can be used in the main configuration file to declare the
% default font set, in case no set is specified in the package options.
%    \begin{macrocode}
\def\DeclareMicrotypeSetDefault{%
  \MT@begin@catcodes
  \MT@DeclareMicrotypeSetDefault
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@DeclareMicrotypeSetDefault}
%    \begin{macrocode}
\newcommand*\MT@DeclareMicrotypeSetDefault[2][]{%
  \MT@ifempty{#1}{%
    \MT@map@clist@c\MT@features{{\MT@set@default@set{##1}{#2}}}%
  }{%
    \MT@map@clist@n{#1}{{%
      \MT@ifempty{##1}\relax{%
        \MT@is@feature{##1}{declaration of default set `#2'}{%
          \MT@exp@one@n\MT@set@default@set
            {\csname MT@rbba@##1\endcsname}{#2}%
        }%
      }%
    }}%
  }%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@default@pr@set}
%\begin{macro}{\MT@default@ex@set}
%\begin{macro}{\MT@default@tr@set}
%\begin{macro}{\MT@default@sp@set}
%\begin{macro}{\MT@default@kn@set}
%\begin{macro}{\MT@set@default@set}
%    \begin{macrocode}
\def\MT@set@default@set#1#2{%
  \MT@ifdefined@n@TF{MT@#1@set@@#2}{%
%<debug>\MT@dinfo{1}{declaring default \@nameuse{MT@abbr@#1} set `#2'}%
    \MT@xdef@n{MT@default@#1@set}{#2}%
  }{%
    \MT@error{%
      The \@nameuse{MT@abbr@#1} set `#2' is not declared.\MessageBreak
      Cannot make it the default set. Using set\MessageBreak `all' instead}{}%
    \MT@xdef@n{MT@default@#1@set}{all}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%
%\subsubsection{Variants and aliases}
%
%\begin{macro}{\DeclareMicrotypeVariants}
%\changes{v2.2}{2007/02/04}{new command}
%\changes{v2.6}{2013/08/05}{ignore spaces}
%\begin{macro}{\MT@variants}
% Specify suffixes for variants (see \file{fontname/variants.map}).
% The starred version appends to the list.
%    \begin{macrocode}
\let\MT@variants\@empty
\def\DeclareMicrotypeVariants{%
  \MT@begin@catcodes
  \@ifstar
    \MT@DeclareVariants
    {\let\MT@variants\@empty\MT@DeclareVariants}%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@DeclareVariants}
%    \begin{macrocode}
\def\MT@DeclareVariants#1{%
  \MT@map@clist@n{#1}{%
    \def\@tempa{##1}%
    \@onelevel@sanitize\@tempa
    \xdef\MT@variants{\MT@variants{\@tempa}}%
  }%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\DeclareMicrotypeAlias}
% This can be used to set an alias name for a font, so that the file and the
% settings for the aliased font will be loaded.
%\changes{v1.5}{2004/12/03}{remove spaces around arguments}
%\changes{v1.8}{2005/05/09}{warning when overriding an alias font}
%\changes{v2.5}{2010/05/17}{ignore spaces}
%    \begin{macrocode}
\def\DeclareMicrotypeAlias{%
  \MT@begin@catcodes
  \MT@DeclareMicrotypeAlias
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@DeclareMicrotypeAlias}
%    \begin{macrocode}
\newcommand*\MT@DeclareMicrotypeAlias[2]{%
  \def\@tempb{#2}%
  \@onelevel@sanitize\@tempb
  \MT@ifdefined@n@T{MT@#1@alias}{%
    \MT@warning{Alias font family `\@tempb' will override
      alias `\@nameuse{MT@#1@alias}'\MessageBreak
      for font family `#1'}}%
  \MT@xdef@n{MT@#1@alias}{\@tempb}%
%    \end{macrocode}
% If we encounter this command while a font is being set up, we also set the
% alias for the current font so that if \cs{DeclareMicrotypeAlias} has been
% issued inside a configuration file, the configuration file for the alias font
% will be loaded, too.
%\changes{v1.7}{2005/03/23}{may also be used inside configuration files}
%    \begin{macrocode}
  \MT@ifdefined@c@T\MT@family{%
%<debug>\MT@dinfo{1}{Activating alias font `\@tempb' for `\MT@family'}%
    \MT@glet\MT@familyalias\@tempb
  }%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\LoadMicrotypeFile}
%\changes{v1.7}{2005/03/22}{new command (suggested by
%               \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)}
%                                              ^^A private mail, 2005/03/21
%\changes{v2.5}{2010/05/13}{remove all spaces in font name}
% May be used to load a configuration file manually.
%    \begin{macrocode}
\def\LoadMicrotypeFile#1{%
  \edef\@tempa{\zap@space#1 \@empty}%
  \@onelevel@sanitize\@tempa
  \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list
  \ifMT@inlist@
    \MT@vinfo{... Configuration file mt-\@tempa.cfg already loaded}%
  \else
    \MT@xadd\MT@file@list{\@tempa,}%
    \MT@begin@catcodes
    \InputIfFileExists{mt-\@tempa.cfg}{%
      \edef\MT@curr@file{mt-\@tempa.cfg}%
      \MT@vinfo{... Loading configuration file \MT@curr@file}%
    }{%
      \MT@warning{Configuration file mt-\@tempa.cfg\MessageBreak
                  does not exist}%
    }%
    \MT@end@catcodes
  \fi
}
%</package>
%</package|letterspace>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Disabling ligatures}
%
%\begin{macro}{\DisableLigatures}
%\changes{v1.9}{2005/07/11}{new command: disable ligatures (requires \pdftex\ 1.30)}
%\changes{v2.2}{2007/01/22}{new optional argument: disable selected ligatures only}
%\begin{macro}{\MT@DisableLigatures}
%\begin{macro}{\MT@nl@setname}
%\begin{macro}{\MT@nl@ligatures}
% This is really simple now: we can re-use the set definitions of
% \cs{DeclareMicrotypeSet}; there can only be one set, which we'll call
% `|no ligatures|'.
%
% The optional argument may be used to disable selected ligatures only.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex5{
\def\DisableLigatures{%
  \MT@begin@catcodes
  \MT@DisableLigatures
}
\newcommand*\MT@DisableLigatures[2][]{%
  \MT@ifempty{#1}\relax{\gdef\MT@nl@ligatures{#1}}%
  \xdef\MT@active@features{\MT@active@features,nl}%
  \global\MT@noligaturestrue
  \MT@declare@sets{nl}{no ligatures}{#2}%
  \gdef\MT@nl@setname{no ligatures}%
  \MT@end@catcodes
}
%<pdftex-def>}{
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
% If \pdftex\ is too old, we throw an error.
%    \begin{macrocode}
%<*pdftex-def|xetex-def>
\renewcommand*\DisableLigatures[2][]{%
  \MT@error{Disabling ligatures of a font is only possible\MessageBreak
    with pdftex version 1.30 or newer.\MessageBreak
    Ignoring \string\DisableLigatures}{%
%<pdftex-def>    Upgrade
%<xetex-def>    Use
    pdftex.}%
}
%<pdftex-def>}
%</pdftex-def|xetex-def>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Interaction with \pkg{babel}}
%
%\begin{macro}{\DeclareMicrotypeBabelHook}
% Declare the context that should be loaded when a \pkg{babel} language
% is selected. The command will not check whether a previous declaration will
% be overwritten.
%\changes{v2.0}{2005/10/04}{new command: interaction with \pkg{babel}} ^^A (beta:1)
%    \begin{macrocode}
%<*package>
\def\DeclareMicrotypeBabelHook#1#2{%
  \MT@map@clist@n{#1}{%
    \KV@@sp@def\@tempa{##1}%
    \MT@gdef@n{MT@babel@\@tempa}{#2}%
  }%
}
%</package>
%    \end{macrocode}
%\end{macro}
%
%
%\subsubsection{Fine tuning}
%
% The commands \cs{SetExpansion} and \cs{SetProtrusion} provide an interface for
% setting the character protrusion resp. expansion factors for a set of fonts.
%
%\begin{macro}{\SetProtrusion}
%\changes{v1.9}{2005/07/13}{(et al.) new key: \texttt{font}}
%\changes{v1.9d}{2006/02/23}{(et al.) split keys of optional and mandatory argument}
%\changes{v1.9d}{2006/02/23}{(et al.) optimise: unify keys for mandatory argument}
%\changes{v1.9e}{2006/07/26}{(et al.) new key: \texttt{inputenc}}
%\changes{v1.9f}{2006/08/10}{(et al.) set catcodes before parsing optional argument}
% This macro accepts three arguments: [options,] set of font attributes and
% list of character protrusion factors.
%
% A new macro called |\MT@pr@c@|\meta{name} will be defined to be \meta{\#3}
% (\ie, the list of characters, not expanded).
%    \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\def\SetProtrusion{%
  \MT@begin@catcodes
  \MT@SetProtrusion
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@SetProtrusion}
%\begin{macro}{\MT@pr@c@name}
%\begin{macro}{\MT@extra@context}
%\begin{macro}{\MT@permutelist}
% We want the catcodes to be correct even if this is called in the preamble.
%    \begin{macrocode}
\newcommand*\MT@SetProtrusion[3][]{%
  \let\MT@extra@context\@empty
%    \end{macrocode}
% Parse the optional first argument. We first have to know the name before we
% can deal with the extra options.
%    \begin{macrocode}
  \MT@set@named@keys{MT@pr@c}{#1}%
%<debug>\MT@dinfo{1}{creating protrusion list `\MT@pr@c@name'}%
  \def\MT@permutelist{pr@c}%
  \setkeys{MT@cfg}{#2}%
%    \end{macrocode}
% We have parsed the second argument, and can now define macros for all
% permutations of the font attributes to point to |\MT@pr@c@|\meta{name},~\dots
%    \begin{macrocode}
  \MT@permute
%    \end{macrocode}
% \dots~which we can now define to be \meta{\#3}.
% Here, as elsewhere, we have to make the definitions global, since they will
% occur inside a group.
%    \begin{macrocode}
  \MT@gdef@n{MT@pr@c@\MT@pr@c@name}{#3}%
  \MT@end@catcodes
}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\SetExpansion}
%\changes{v1.4}{2004/11/10}{fix: specifying extra options does no
%                           longer require to give a \texttt{name}, too}
%\changes{v1.9e}{2006/07/26}{new key: \texttt{inputenc}}
% \cs{SetExpansion} only differs in that it allows some extra options
% (|stretch|, |shrink|, |step|, |auto|).
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\SetExpansion{%
  \MT@begin@catcodes
  \MT@SetExpansion
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@SetExpansion}
%\begin{macro}{\MT@ex@c@name}
%\begin{macro}{\MT@extra@context}
%\begin{macro}{\MT@permutelist}
%    \begin{macrocode}
\newcommand*\MT@SetExpansion[3][]{%
  \let\MT@extra@context\@empty
  \MT@set@named@keys{MT@ex@c}{#1}%
  \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @factor}{%
    \ifnum\csname MT@ex@c@\MT@ex@c@name @factor\endcsname > \@m
      \MT@warning@nl{Expansion factor \number\@nameuse{MT@ex@c@\MT@ex@c@name @factor}
        too large in list\MessageBreak `\MT@ex@c@name'. Setting it to the
        maximum of 1000}%
      \MT@glet@nc{MT@ex@c@\MT@ex@c@name @factor}\@m
    \fi
  }%
%<debug>\MT@dinfo{1}{creating expansion list `\MT@ex@c@name'}%
  \def\MT@permutelist{ex@c}%
  \setkeys{MT@cfg}{#2}%
  \MT@permute
  \MT@gdef@n{MT@ex@c@\MT@ex@c@name}{#3}%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\SetTracking}
%\changes{v2.0}{2006/12/28}{new command: tracking}
%\changes{v2.2}{2007/02/23}{third argument may be empty}
%\changes{v2.2}{2007/02/23}{new key `\texttt{no ligatures}' to disable
%                           ligatures of letterspaced fonts}
%\changes{v2.2}{2007/06/16}{new keys `\texttt{spacing}' and `\texttt{outer spacing}'
%                           to adjust interword spacing
%                           (suggested by \contributor Steven~E. Harris <seh\at panix.com>)}
%                                                             ^^A private mail, 2007/06/15
%    \begin{macrocode}
\def\SetTracking{%
  \MT@begin@catcodes
  \MT@SetTracking
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@SetTracking}
% Third argument may be empty.
%\changes{v2.3}{2007/11/20}{sanity check for value}
%    \begin{macrocode}
\newcommand*\MT@SetTracking[3][]{%
  \let\MT@extra@context\@empty
  \MT@set@named@keys{MT@tr@c}{#1}%
%<debug>\MT@dinfo{1}{creating tracking list `\MT@tr@c@name'}%
  \def\MT@permutelist{tr@c}%
  \setkeys{MT@cfg}{#2}%
  \MT@permute
  \KV@@sp@def\@tempa{#3}%
  \MT@ifempty\@tempa\relax{%
    \MT@ifint\@tempa
      {\MT@xdef@n{MT@tr@c@\MT@tr@c@name}{\@tempa}}%
      {\MT@warning{Value `\@tempa' is not a number in\MessageBreak
                   tracking set `\MT@curr@set@name'}}}%
  \MT@end@catcodes
}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\SetExtraSpacing}
%\changes{v2.0}{2005/09/28}{new command: adjustment of interword spacing} ^^A (beta:1)
%    \begin{macrocode}
%<*pdftex-def>
\def\SetExtraSpacing{%
  \MT@begin@catcodes
  \MT@SetExtraSpacing
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@SetExtraSpacing}
%\begin{macro}{\MT@sp@c@name}
%\begin{macro}{\MT@extra@context}
%\begin{macro}{\MT@permutelist}
%    \begin{macrocode}
\newcommand*\MT@SetExtraSpacing[3][]{%
  \let\MT@extra@context\@empty
  \MT@set@named@keys{MT@sp@c}{#1}%
%<debug>\MT@dinfo{1}{creating spacing list `\MT@sp@c@name'}%
  \def\MT@permutelist{sp@c}%
  \setkeys{MT@cfg}{#2}%
  \MT@permute
  \MT@gdef@n{MT@sp@c@\MT@sp@c@name}{#3}%
  \MT@end@catcodes
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\SetExtraKerning}
%\changes{v2.0}{2005/09/28}{new command: additional kerning} ^^A (beta:1)
%    \begin{macrocode}
\def\SetExtraKerning{%
  \MT@begin@catcodes
  \MT@SetExtraKerning
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@SetExtraKerning}
%\begin{macro}{\MT@kn@c@name}
%\begin{macro}{\MT@extra@context}
%\begin{macro}{\MT@permutelist}
%    \begin{macrocode}
\newcommand*\MT@SetExtraKerning[3][]{%
  \let\MT@extra@context\@empty
  \MT@set@named@keys{MT@kn@c}{#1}%
%<debug>\MT@dinfo{1}{creating kerning list `\MT@kn@c@name'}%
  \def\MT@permutelist{kn@c}%
  \setkeys{MT@cfg}{#2}%
  \MT@permute
  \MT@gdef@n{MT@kn@c@\MT@kn@c@name}{#3}%
  \MT@end@catcodes
}
%</pdftex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@set@named@keys}
%\changes{v1.9f}{2006/08/10}{new macro: set name first, simplify parsing of
%                            optional argument}
%\begin{macro}{\MT@options}
% We first set the name (if specified), then remove it from the list, and set
% the remaining keys.
%    \begin{macrocode}
%<*package>
\def\MT@set@named@keys#1#2{%
  \def\x##1name=##2,##3\@nil{%
    \setkeys{#1}{name=##2}%
    \gdef\MT@options{##1##3}%
    \MT@rem@from@clist{name=}\MT@options
  }%
  \x#2,name=,\@nil
  \@expandtwoargs\setkeys{#1}\MT@options
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@define@code@key}
% Define the keys for the configuration lists (which are setting the codes, in
% \pdftex\ speak).
%    \begin{macrocode}
\def\MT@define@code@key#1#2{%
  \define@key{MT@#2}{#1}[]{%
    \@tempcnta=\@ne
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
%    \end{macrocode}
% Here, too, we allow for something like `|bf*|'. It will be expanded
% immediately.
%    \begin{macrocode}
      \MT@get@highlevel{#1}%
      \MT@edef@n{MT@temp#1\the\@tempcnta}{\MT@val}%
      \advance\@tempcnta \@ne
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@define@code@key@family}
%\changes{v2.5}{2011/02/07}{compatibility with \pkg{fontspec}: remove its internal counter
%                           (reported by \contributor Till~A. Heilmann <till.heilmann\at unibas.ch>)}
%                           ^^A <http://permalink.gmane.org/gmane.comp.tex.lualatex.devel/668>
%                           ^^A (beta:06)
% Remove \pkg{fontspec}'s internal feature counter.
%    \begin{macrocode}
\def\MT@define@code@key@family#1{%
  \define@key{MT@#1}{family}[]{%
    \@tempcnta=\@ne
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \MT@get@highlevel{family}%
      \ifMT@fontspec
        \edef\x{\edef\noexpand\MT@val{\noexpand\MT@scrubfeature\MT@val()\relax}}\x
      \fi
      \MT@edef@n{MT@tempfamily\the\@tempcnta}{\MT@val}%
      \advance\@tempcnta \@ne
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@define@code@key@size}
%\changes{v1.9c}{2006/01/25}{fix: embrace \cs{MT@tempsize} in \cmd\csname\
%                            (bug introduced in v1.9b)}
% \cs{MT@tempsize} must be in a \cmd\csname, so that it is at least
% \cmd\relax, not undefined.
%    \begin{macrocode}
\def\MT@define@code@key@size#1{%
  \define@key{MT@#1}{size}[]{%
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \expandafter\MT@get@range\MT@val--\@nil
      \ifx\MT@val\relax \else
        \MT@exp@cs\MT@xadd{MT@tempsize}%
           {{{\MT@lower}{\MT@upper}{\MT@curr@set@name}}}%
      \fi
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@define@code@key@font}
%\changes{v1.9c}{2006/01/25}{fix: context was ignored}
%\changes{v2.5}{2011/09/04}{scrub \pkg{fontspec} feature count
%                           (found by \contributor Meho~R <meho.2005\at gmail.com>)}
%                            ^^A MID: <e16242e2-49cf-47bf-9ab4-66f81ced4c7a@glegroupsg2000goo.googlegroups.com>
%                            ^^A (beta:08)
%    \begin{macrocode}
\def\MT@define@code@key@font#1{%
  \define@key{MT@#1}{font}[]{%
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax
      \expandafter\MT@get@font@and@size\MT@val/////\@nil
      \ifMT@fontspec
        \edef\@tempb{\expandafter\MT@scrubfeatures\@tempb()\relax}%
      \fi
      \MT@xdef@n{MT@\MT@permutelist @\@tempb\MT@extra@context}%
        {\csname MT@\MT@permutelist @name\endcsname}%
%<debug>\MT@dinfo@nl{1}{initialising: use list for font \@tempb=\MT@val
%<debug>                \ifx\MT@extra@context\@empty\else\MessageBreak
%<debug>                  (context: \MT@extra@context)\fi}%
      \MT@exp@cs\MT@xaddb
        {MT@\MT@permutelist @\@tempb\MT@extra@context @sizes}%
        {{{\MT@val}{\m@ne}{\MT@curr@set@name}}}%
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@get@font@and@size}
% Translate any asterisks and split off the size.
%    \begin{macrocode}
\def\MT@get@font@and@size#1/#2/#3/#4/#5/#6\@nil{%
  \MT@get@font@{#1}{#2}{#3}{#4}{#5}{1}%
}
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\MT@define@code@key{encoding}{cfg}
\MT@define@code@key@family   {cfg}
\MT@define@code@key{series}  {cfg}
\MT@define@code@key{shape}   {cfg}
\MT@define@code@key@size     {cfg}
\MT@define@code@key@font     {cfg}
%    \end{macrocode}
%\begin{macro}{\MT@define@opt@key}
%    \begin{macrocode}
\def\MT@define@opt@key#1#2{%
  \define@key{MT@#1@c}{#2}[]{\MT@ifempty{##1}\relax{%
    \MT@xdef@n{MT@#1@c@\MT@curr@set@name @#2}{##1}}}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@listname@count}
% The options in the optional first argument.
%    \begin{macrocode}
\newcount\MT@listname@count
\MT@map@clist@c\MT@features{%
%    \end{macrocode}
%\end{macro}
%\changes{v1.9a}{2005/11/21}{`\meta{file name}\texttt{/}\meta{line number}' as default list name}
% Use file name and line number as the list name if the user didn't bother
% to invent one -- also check whether the name already exists (in case more
% than one unnamed list is loaded in the same line, for example
% \cmd\AtBeginDocument).
%\changes{v2.5}{2011/02/26}{fix: check whether `\meta{file}\texttt{/}\meta{line}' list name already exists
%                           (reported by \contributor Till~A. Heilmann <till.heilmann\at unibas.ch>)}
%                           ^^A private mail, 2011/02/25
%                           ^^A (beta:07)
%\changes{v1.3}{2004/10/27}{fix: specifying \texttt{load} option does no
%                           longer require to give a \texttt{name}, too}
%\changes{v2.2}{2007/01/28}{simplify key declarations}
%    \begin{macrocode}
  \define@key{MT@#1@c}{name}[]{%
    \MT@ifempty{##1}{%
      \MT@ifdefined@n@TF{MT@#1@c@\MT@curr@file/\the\inputlineno}{%
        \global\advance\MT@listname@count\@ne
        \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno
                                 (\number\MT@listname@count)}%
      }{%
        \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}%
      }%
    }{%
      \MT@edef@n{MT@#1@c@name}{##1}%
      \MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{%
        \MT@warning{Redefining \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'}%
      }%
    }%
    \MT@let@cn\MT@curr@set@name{MT@#1@c@name}%
  }%
  \MT@define@opt@key{#1}{load}%
  \MT@define@opt@key{#1}{factor}%
  \MT@define@opt@key{#1}{preset}%
  \MT@define@opt@key{#1}{inputenc}%
%    \end{macrocode}
% Only one context is allowed. This might change in the future.
%    \begin{macrocode}
  \define@key{MT@#1@c}{context}[]{\MT@ifempty{##1}\relax{\def\MT@extra@context{##1}}}%
}
%</package>
%    \end{macrocode}
% Automatically enable font copying if we find a protrusion or expansion context.
% After the preamble, check whether font copying is enabled.
% For older \pdftex\ versions, disallow.
%\changes{v2.5}{2010/02/27}{allow contexts for \luatex}
% It also works with \luatex\ 0.30 or newer.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex7{
  \define@key{MT@ex@c}{context}[]{%
    \MT@ifempty{#1}\relax{%
      \MT@glet\MT@copy@font\MT@copy@font@
      \def\MT@extra@context{#1}%
    }%
  }
  \MT@addto@setup{%
    \define@key{MT@ex@c}{context}[]{%
      \ifx\MT@copy@font\MT@copy@font@
        \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}%
      \else
        \MT@error{\MT@MT\space isn't set up for expansion contexts.\MessageBreak
           Ignoring `context' key\on@line}%
          {Either move the settings inside the preamble,\MessageBreak
           or load the package with the `copyfonts' option.}%
      \fi
    }%
  }
%    \end{macrocode}
% Protrusion contexts \emph{might} also work without copying the font, so we
% don't issue an error but only a warning. The problem is that \pdftex\ only
% allows one set of protrusion factors for a given font within one paragraph
% (those that are in effect at the end of the paragraph will be in effect for
% the whole paragraph). When different fonts are loaded -- like in the example
% with the footnote markers -- we don't need to copy the fonts.
%    \begin{macrocode}
  \define@key{MT@pr@c}{context}[]{%
    \MT@ifempty{#1}\relax{%
      \MT@glet\MT@copy@font\MT@copy@font@
      \def\MT@extra@context{#1}%
    }%
  }
  \MT@addto@setup{%
    \define@key{MT@pr@c}{context}[]{%
      \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}%
      \ifx\MT@copy@font\MT@copy@font@\else
        \MT@warning@nl{If protrusion contexts don't work as expected,
          \MessageBreak load the package with the `copyfonts' option}%
      \fi
    }%
  }
%</pdftex-def|luatex-def>
%<*pdftex-def>
}{
  \define@key{MT@ex@c}{context}[]{%
    \MT@error{Expansion contexts only work with pdftex 1.40.4\MessageBreak
        or later. Ignoring `context' key\on@line}%
      {Upgrade pdftex.}%
  }
%</pdftex-def>
%<*pdftex-def|xetex-def>
  \define@key{MT@pr@c}{context}[]{%
    \MT@error{Protrusion contexts only work with pdftex
%<pdftex-def>        1.40.4\MessageBreak or later.
%<xetex-def>        \MessageBreak or luatex.
        Ignoring `context' key\on@line}%
%<pdftex-def>      {Upgrade pdftex.}%
%<xetex-def>      {Use pdftex or luatex.}%
  }
%</pdftex-def|xetex-def>
%<pdftex-def>}
%    \end{macrocode}
%\begin{macro}{\MT@warn@nodim}
%    \begin{macrocode}
%<*package>
\def\MT@warn@nodim#1{%
  \MT@warning{`\@tempa' is not a dimension.\MessageBreak
              Ignoring it and setting values relative to\MessageBreak #1}%
}
%</package>
%    \end{macrocode}
%\end{macro}
%\changes{v1.8}{2005/04/14}{\cs{SetProtrusion}: new key: \texttt{unit}}
%\changes{v1.9}{2005/09/28}{\cs{SetProtrusion}: value `\texttt{relative}' renamed
%                           to `\texttt{character}' for key \texttt{unit}}
%\changes{v2.0}{2006/09/30}{option `\opt{unit}', \cs{SetProtrusion}:
%                           deprecate value `\texttt{relative}' completely}
%\todo{new key for unit: \texttt{dimen} (for \texttt{kerning}, especially)}
% Protrusion codes may be relative to character width, or to any dimension.
%    \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\define@key{MT@pr@c}{unit}[character]{%
  \MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@empty
  \def\@tempa{#1}%
  \MT@ifstreq\@tempa{character}\relax{%
%    \end{macrocode}
% Test whether it's a dimension, but do not translate it into its final
% form here, since it may be font-specific.
%    \begin{macrocode}
    \MT@ifdimen\@tempa
      {\MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@tempa}%
      {\MT@warn@nodim{character widths}}%
  }%
}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
% Tracking may only be relative to a dimension.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\define@key{MT@tr@c}{unit}[1em]{%
  \MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@empty
  \def\@tempa{#1}%
  \MT@ifdimen\@tempa
    {\MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@tempa}%
    {\MT@warn@nodim{1em}%
     \MT@gdef@n{MT@tr@c@\MT@curr@set@name @unit}{1em}}%
}
%</pdftex-def|luatex-def>
%    \end{macrocode}
% Spacing and kerning codes may additionally be relative to space dimensions.
%    \begin{macrocode}
%<*pdftex-def>
\MT@map@clist@n{sp,kn}{%
  \define@key{MT@#1@c}{unit}[space]{%
    \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@empty
    \def\@tempa{##1}%
    \MT@ifstreq\@tempa{character}\relax{%
      \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\m@ne
      \MT@ifstreq\@tempa{space}\relax{%
        \MT@ifdimen\@tempa
          {\MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@tempa}%
          {\MT@warn@nodim{width of space}}%
      }%
    }%
  }%
}
%</pdftex-def>
%    \end{macrocode}
% The first argument to \cs{SetExpansion} accepts some more options.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\MT@map@clist@n{stretch,shrink,step}{%
  \define@key{MT@ex@c}{#1}[]{%
    \MT@ifempty{##1}\relax{%
      \MT@ifint{##1}{%
%    \end{macrocode}
% A space terminates the number.
%    \begin{macrocode}
        \MT@gdef@n{MT@ex@c@\MT@curr@set@name @#1}{##1 }%
      }{%
        \MT@warning{%
          Value `##1' for option `#1' is not a number.\MessageBreak
          Ignoring it}%
      }%
    }%
  }%
}
\define@key{MT@ex@c}{auto}[true]{%
  \def\@tempa{#1}%
  \csname if\@tempa\endcsname
%    \end{macrocode}
% Don't use |autoexpand| for \pdftex\ version older than 1.20.
%\changes{v1.7}{2005/03/07}{fix: remove space after \texttt{autoexpand}}
%\changes{v1.7}{2005/03/07}{disallow automatic expansion if \pdftex\ too old}
%\changes{v2.7a}{2017/08/08}{disallow non-automatic expansion with \luatex}
%    \begin{macrocode}
%<pdftex-def>    \MT@requires@pdftex4%
%<luatex-def>    \MT@requires@luatex3\relax
      {\MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}}%
%<pdftex-def>      {\MT@warning{pdftex too old for automatic font expansion}}%
  \else
%<pdftex-def>    \MT@requires@pdftex4%
%<*luatex-def>
    \MT@requires@luatex3{%
      \MT@warning{Non-automatic font expansion doesn't work with\MessageBreak
                  luatex}}%
%</luatex-def>
      {\MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty}%
%<pdftex-def>      \relax
  \fi
}
%    \end{macrocode}
% Tracking: Interword spacing and outer kerning.
% The variant with space just in case \cs{SetTracking} is called inside an
% argument (\eg, to \cmd\IfFileExists).
%    \begin{macrocode}
\MT@define@opt@key{tr}{spacing}
\MT@define@opt@key{tr}{outerspacing}
\MT@define@opt@key{tr}{outerkerning}
%    \end{macrocode}
% Which ligatures should be disabled?
%    \begin{macrocode}
\define@key{MT@tr@c}{noligatures}[]%
  {\MT@xdef@n{MT@tr@c@\MT@curr@set@name @noligatures}{#1}}
\define@key{MT@tr@c}{outer spacing}[]{\setkeys{MT@tr@c}{outerspacing={#1}}}
\define@key{MT@tr@c}{outer kerning}[]{\setkeys{MT@tr@c}{outerkerning={#1}}}
\define@key{MT@tr@c}{no ligatures}[]{\setkeys{MT@tr@c}{noligatures={#1}}}
%</pdftex-def|luatex-def>
%    \end{macrocode}
%
%\subsubsection{Character inheritance}
%
%\begin{macro}{\DeclareCharacterInheritance}
%\changes{v1.1}{2004/09/15}{new command: possibility to specify character inheritance}
%^^A\changes{v1.2}{2004/09/29}{check whether only one encoding specified}
%\changes{v1.9d}{2006/02/09}{fix: empty context}
%\changes{v1.9e}{2006/07/26}{new key `\texttt{inputenc}' to set the input encoding}
%\changes{v2.5}{2010/05/18}{allow more than one encoding}
% This macro may be used in the configuration files to declare characters that
% should inherit protrusion resp. expansion values from other characters. Thus,
% there is no need to define all accented characters (\eg, |\`a|, |\'a|,
% |\^a|, |\~a|, |\"a|, |\r{a}|, |\k{a}|, |\u{a}|), which will make the
% configuration files look much nicer and easier to maintain. If a single
% character of an inheritance list should have a different value, one can
% simply override it.
%\begin{macro}{\MT@inh@feat}
% The optional argument may be used to restrict the list to some features,
%\begin{macro}{\MT@extra@inputenc}
% and to specify an input encoding.
%    \begin{macrocode}
%<*package>
\renewcommand*\DeclareCharacterInheritance[1][]{%
  \let\MT@extra@context\@empty
  \let\MT@extra@inputenc\@undefined
  \let\MT@inh@feat\@empty
  \setkeys{MT@inh@}{#1}%
  \MT@begin@catcodes
  \MT@set@inh@list
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@set@inh@list}
% Safe category codes.
%    \begin{macrocode}
\def\MT@set@inh@list#1#2{%
  \MT@ifempty\MT@inh@feat{%
    \MT@map@clist@c\MT@features{{\MT@declare@char@inh{##1}{#1}{#2}}}%
  }{%
    \MT@map@clist@c\MT@inh@feat{{%
      \KV@@sp@def\@tempa{##1}%
      \MT@ifempty\@tempa\relax{%
        \MT@exp@one@n\MT@declare@char@inh
          {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}%
      }%
    }}%
  }%
  \MT@end@catcodes
}
%    \end{macrocode}
%\changes{v1.9f}{2006/08/09}{fix: forgotten comma in the features list}
%\end{macro}
% The keys for the optional argument.
%    \begin{macrocode}
\MT@map@clist@c\MT@features@long{%
  \define@key{MT@inh@}{#1}[]{\edef\MT@inh@feat{\MT@inh@feat#1,}}}
\define@key{MT@inh@}{inputenc}{\def\MT@extra@inputenc{#1}}
%    \end{macrocode}
%\begin{macro}{\MT@declare@char@inh}
%\todo{share one list between features}
% The lists cannot be given a name by the user.
%    \begin{macrocode}
\def\MT@declare@char@inh#1#2#3{%
  \MT@edef@n{MT@#1@inh@name}%
    {\MT@curr@file/\the\inputlineno (\@nameuse{MT@abbr@#1})}%
  \MT@let@cn\MT@curr@set@name{MT@#1@inh@name}%
  \MT@ifdefined@c@T\MT@extra@inputenc{%
    \MT@xdef@n{MT@#1@inh@\MT@curr@set@name @inputenc}{\MT@extra@inputenc}}%
%<debug>\MT@dinfo{1}{creating inheritance list `\@nameuse{MT@#1@inh@name}'}%
  \MT@gdef@n{MT@#1@inh@\csname MT@#1@inh@name\endcsname}{#3}%
  \def\MT@permutelist{#1@inh}%
  \setkeys{MT@inh}{#2}%
  \MT@permute
}
%    \end{macrocode}
%\end{macro}
% Parse the second argument. \cs{DeclareCharacterInheritance} may also be set
% up for various combinations.
% We can reuse the key setup from the configuration lists
% (|\Set...|).
%    \begin{macrocode}
\MT@define@code@key{encoding}{inh}
\MT@define@code@key@family   {inh}
\MT@define@code@key{series}  {inh}
\MT@define@code@key{shape}   {inh}
\MT@define@code@key@size     {inh}
\MT@define@code@key@font     {inh}
%    \end{macrocode}
%\begin{macro}{\MT@inh@do}
% Now parse the third argument, the inheritance lists. We define the commands
% |\MT@inh@|\meta{name}|@|\meta{slot}|@|, containing the inheriting characters.
% They will also be translated to slot numbers here, to save some time. The
% following will be executed only once, namely the first time this inheritance
% list is encountered (in |\MT@set@|\meta{feature}|@codes|).
%    \begin{macrocode}
\def\MT@inh@do#1,{%
  \ifx\relax#1\@empty \else
    \MT@inh@split #1==\relax
    \expandafter\MT@inh@do
  \fi
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@inh@split}
% Only gather the inheriting characters here. Their codes will actually be set
% in |\MT@set@|\meta{feature}|@codes|.
%    \begin{macrocode}
%</package>
%<*pdftex-def|xetex-def|luatex-def>
\def\MT@inh@split#1=#2=#3\relax{%
  \def\@tempa{#1}%
  \ifx\@tempa\@empty \else
    \MT@get@slot
%<pdftex-def|luatex-def>    \ifnum\MT@char > \m@ne
%<xetex-def>    \ifx\MT@char\@empty\else
      \let\MT@val\MT@char
      \MT@map@clist@n{#2}{%
        \def\@tempa{##1}%
        \ifx\@tempa\@empty \else
          \MT@get@slot
%<pdftex-def|luatex-def>          \ifnum\MT@char > \m@ne
%<xetex-def>          \ifx\MT@char\@empty\else
            \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}%
          \fi
        \fi
      }%
%<debug>\MT@dinfo@nl{2}{children of #1 (\MT@val):
%<debug>                \@nameuse{MT@inh@\MT@listname @\MT@val @}}%
    \fi
  \fi
}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Permutation}
%
%\begin{macro}{\MT@permute}
%\changes{v1.1}{2004/09/15}{don't use sets for empty encoding}
%\begin{macro}{\MT@permute@}
%\begin{macro}{\MT@permute@@}
%\begin{macro}{\MT@permute@@@}
%\begin{macro}{\MT@permute@@@@}
% Calling \cs{MT@permute} will define commands for all permutations
% of the specified font attributes of the form
% |\MT@|\meta{list type}|@/|\allowbreak
%       \meta{encoding}|/|\allowbreak
%       \meta{family}|/|\allowbreak
%       \meta{series}|/|\allowbreak
%       \meta{shape}|/|\allowbreak
%       \meta{\textbar*}
% to be the expansion of |\MT@|\meta{list type}|@name|, \ie, the name of the
% currently defined list. Size ranges are held in a separate macro called
% |\MT@|\meta{list type}|@/|\allowbreak\meta{font axes}|@sizes|, which in turn
% contains the respective \meta{list name}s attached to the ranges.
%    \begin{macrocode}
%<*package>
\def\MT@permute{%
  \let\MT@cnt@encoding\@ne
  \MT@permute@
%    \end{macrocode}
% Undefine commands for the next round.
%    \begin{macrocode}
  \MT@map@tlist@n{{encoding}{family}{series}{shape}}\MT@permute@reset
  \MT@glet\MT@tempsize\@undefined
}
\def\MT@permute@{%
  \let\MT@cnt@family\@ne
  \MT@permute@@
  \MT@increment\MT@cnt@encoding
  \MT@ifdefined@n@T{MT@tempencoding\MT@cnt@encoding}%
    \MT@permute@
}
\def\MT@permute@@{%
  \let\MT@cnt@series\@ne
  \MT@permute@@@
  \MT@increment\MT@cnt@family
  \MT@ifdefined@n@T{MT@tempfamily\MT@cnt@family}%
    \MT@permute@@
}
\def\MT@permute@@@{%
  \let\MT@cnt@shape\@ne
  \MT@permute@@@@
  \MT@increment\MT@cnt@series
  \MT@ifdefined@n@T{MT@tempseries\MT@cnt@series}%
    \MT@permute@@@
}
\def\MT@permute@@@@{%
  \MT@permute@@@@@
  \MT@increment\MT@cnt@shape
  \MT@ifdefined@n@T{MT@tempshape\MT@cnt@shape}%
    \MT@permute@@@@
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@permute@@@@@}
%\changes{v1.9a}{2005/12/05}{don't define permutations for unused encodings}
% In order to save some memory, we can ignore unused encodings (inside the
% document).
%    \begin{macrocode}
\def\MT@permute@@@@@{%
  \MT@permute@define{encoding}%
  \ifMT@document
    \ifx\MT@tempencoding\@empty \else
      \MT@ifdefined@n@TF{T@\MT@tempencoding}\relax
        {\expandafter\expandafter\expandafter\@gobble}%
    \fi
  \fi
  \MT@permute@@@@@@
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@permute@@@@@@}
%    \begin{macrocode}
\def\MT@permute@@@@@@{%
  \MT@permute@define{family}%
  \MT@permute@define{series}%
  \MT@permute@define{shape}%
  \edef\@tempa{\MT@tempencoding
              /\MT@tempfamily
              /\MT@tempseries
              /\MT@tempshape
              /\MT@ifdefined@c@T\MT@tempsize *}%
%    \end{macrocode}
%\changes{v1.2}{2004/09/29}{more sanity checks for \cs{SetProtrusion} and
%                          \cs{SetExpansion}}
% Some sanity checks: an encoding must be specified (unless nothing else is).
%    \begin{macrocode}
  \MT@ifstreq\@tempa{////}\relax{%
    \ifx\MT@tempencoding\@empty
      \MT@warning{%
        You have to specify an encoding for\MessageBreak
        \@nameuse{MT@abbr@\MT@permutelist} list
        `\@nameuse{MT@\MT@permutelist @name}'.\MessageBreak
        Ignoring it}%
    \else
      \MT@ifdefined@c@TF\MT@tempsize{%
%    \end{macrocode}
% Add the list of ranges to the beginning of the current combination, after
% checking for conflicts.
%\changes{v1.8}{2005/04/20}{add ranges to the beginning of the lists}
%    \begin{macrocode}
        \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{%
          \MT@map@tlist@c\MT@tempsize\MT@check@rlist
        }%
        \MT@exp@cs\MT@xaddb
          {MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}%
          \MT@tempsize
%<debug>\MT@dinfo@nl{1}{initialising: use list for font \@tempa,\MessageBreak
%<debug>         sizes: \csname MT@\MT@permutelist @\@tempa\MT@extra@context
%<debug>                        @sizes\endcsname}%
      }{%
%    \end{macrocode}
% Only one list can apply to a given combination.
%\changes{v2.7}{2017/07/07}{don't warn for override if conflicting list is loaded}
% But we don't warn if the overridden list is to be loaded by the current one.
%    \begin{macrocode}
        \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context}{%
          \MT@ifstreq{\csname MT@\MT@permutelist @\@tempa\MT@extra@context\endcsname}%
             {\csname MT@\MT@permutelist @\csname MT@\MT@permutelist @name\endcsname @load\endcsname}%
              \relax{%
            \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list
              `\@nameuse{MT@\MT@permutelist @name}' will\MessageBreak override
              list `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}'
              for \MessageBreak font `\@tempa'}%
          }%
        }%
%<debug>\MT@dinfo@nl{1}{initialising: use list for font \@tempa
%<debug>                \ifx\MT@extra@context\@empty\else\MessageBreak
%<debug>                  (context: \MT@extra@context)\fi}%
      }%
      \MT@xdef@n{MT@\MT@permutelist @\@tempa\MT@extra@context}%
          {\csname MT@\MT@permutelist @name\endcsname}%
    \fi
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@permute@define}
% Define the commands.
%    \begin{macrocode}
\def\MT@permute@define#1{%
  \@tempcnta=\csname MT@cnt@#1\endcsname\relax
  \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}%
    {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\the\@tempcnta\endcsname}}%
    {\MT@let@nc{MT@temp#1}\@empty}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@permute@reset}
% Reset the commands.
%    \begin{macrocode}
\def\MT@permute@reset#1{%
  \@tempcnta=\@ne
  \MT@loop
    \MT@let@nc{MT@temp#1\the\@tempcnta}\@undefined
    \advance\@tempcnta\@ne
    \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}%
      \iftrue
      \iffalse
  \MT@repeat
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@rlist}
%\changes{v1.8}{2005/04/20}{made recursive}
% For every new range item in \cs{MT@tempsize}, check whether it overlaps with
% ranges in the existing list.
%    \begin{macrocode}
\def\MT@check@rlist#1{\expandafter\MT@check@rlist@ #1}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@rlist@}
% Define the current new range and~\dots
%    \begin{macrocode}
\def\MT@check@rlist@#1#2#3{%
  \def\@tempb{#1}%
  \def\@tempc{#2}%
  \MT@if@false
  \MT@exp@cs\MT@map@tlist@c
    {MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}%
    \MT@check@range
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@range}
% \dots~recurse through the list of existing ranges.
%    \begin{macrocode}
\def\MT@check@range#1{\expandafter\MT@check@range@ #1}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@range@}
% \cmd\@tempb\ and \cmd\@tempc\ are lower resp. upper bound of the new range,
% \meta{\#1} and \meta{\#2} those of the existing range. \meta{\#3} is the list name.
%\changes{v2.7}{2017/07/07}{don't warn for override if conflicting list is loaded}
%    \begin{macrocode}
\def\MT@check@range@#1#2#3{%
  \MT@ifdim{#2}=\m@ne{%
    \MT@ifdim\@tempc=\m@ne{%
%    \end{macrocode}
%\begin{itemize}
%  \item Both items are simple sizes.
%    \begin{macrocode}
      \MT@ifdim\@tempb={#1}\MT@if@true\relax
    }{%
%    \end{macrocode}
%  \item Item in list is a simple size, new item is a range.
%    \begin{macrocode}
      \MT@ifdim\@tempb>{#1}\relax{%
        \MT@ifdim\@tempc>{#1}{%
          \MT@if@true
          \edef\@tempb{#1 (with range: \@tempb\space to \@tempc)}%
        }\relax
      }%
    }%
  }{%
    \MT@ifdim\@tempc=\m@ne{%
%    \end{macrocode}
%  \item Item in list is a range, new item is a simple size.
%    \begin{macrocode}
      \MT@ifdim\@tempb<{#2}{%
        \MT@ifdim\@tempb<{#1}\relax\MT@if@true
      }\relax
    }{%
%    \end{macrocode}
%  \item Both items are ranges.
%    \begin{macrocode}
      \MT@ifdim\@tempb<{#2}{%
        \MT@ifdim\@tempc>{#1}{%
          \MT@if@true
          \edef\@tempb{#1 to #2 (with range: \@tempb\space to \@tempc)}%
        }\relax
      }\relax
    }%
  }%
  \ifMT@if@
    \MT@ifstreq{#3}%
        {\csname MT@\MT@permutelist @\csname MT@\MT@permutelist @name\endcsname @load\endcsname}%
        \relax{%
      \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list
        `\@nameuse{MT@\MT@permutelist @name}' will override\MessageBreak
        list `#3' for font \@tempa,\MessageBreak size \@tempb}%
    }%
%    \end{macrocode}
% If we've already found a conflict with this item, we can skip the rest of the
% list.
%    \begin{macrocode}
    \expandafter\MT@tlist@break
  \fi
}
%    \end{macrocode}
%\end{itemize}
%\end{macro}
%
%\subsection{Package options}
%
%\subsubsection{Declaring the options}
%
%\begin{macro}{\ifMT@opt@expansion}
%\begin{macro}{\ifMT@opt@auto}
%\begin{macro}{\ifMT@opt@DVI}
% Keep track of whether the user explicitly set these options.
%    \begin{macrocode}
\newif\ifMT@opt@expansion
\newif\ifMT@opt@auto
\newif\ifMT@opt@DVI
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@optwarn@admissible}
% Some warnings.
%    \begin{macrocode}
\def\MT@optwarn@admissible#1#2{%
  \MT@warning@nl{`#1' is not an admissible value for option\MessageBreak
                 `#2'. Assuming `false'}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@optwarn@nan}
%    \begin{macrocode}
%</package>
%<*package|letterspace>
%<plain>\MT@requires@latex1{
\def\MT@optwarn@nan#1#2{%
  \MT@warning@nl{Value `#1' for option `#2' is not a\MessageBreak number.
                 Using default value of \number\@nameuse{MT@#2@default}}%
}
%<plain>}\relax
%</package|letterspace>
%<*package>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@opt@def@set}
%    \begin{macrocode}
\def\MT@opt@def@set#1{%
  \MT@ifdefined@n@TF{MT@\@tempb @set@@\MT@val}{%
    \MT@xdef@n{MT@\@tempb @setname}{\MT@val}%
  }{%
    \MT@xdef@n{MT@\@tempb @setname}{\@nameuse{MT@default@\@tempb @set}}%
    \MT@warning@nl{The #1 set `\MT@val' is undeclared.\MessageBreak
                   Using set `\@nameuse{MT@\@tempb @setname}' instead}%
  }%
}
%    \end{macrocode}
%\end{macro}
% \opt{expansion} and \opt{protrusion} may be |true|, |false|, |compatibility|,
% |nocompatibility| and/or a \meta{set name}.
%\changes{v1.9}{2005/10/06}{fix: use \texttt{true} as the default value}
%    \begin{macrocode}
\MT@map@clist@n{protrusion,expansion}{%
  \define@key{MT}{#1}[true]{%
    \csname MT@opt@#1true\endcsname
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \MT@ifempty\MT@val\relax{%
        \csname MT@#1true\endcsname
        \edef\@tempb{\csname MT@rbba@#1\endcsname}%
        \MT@ifstreq\MT@val{true}\relax
        {%
          \MT@ifstreq\MT@val{false}{%
            \csname MT@#1false\endcsname
          }{%
            \MT@ifstreq\MT@val{compatibility}{%
              \MT@let@nc{MT@\@tempb @level}\@ne
            }{%
              \MT@ifstreq\MT@val{nocompatibility}{%
                \MT@let@nc{MT@\@tempb @level}\tw@
              }{%
%    \end{macrocode}
% If everything failed, it should be a set name.
%    \begin{macrocode}
                \MT@opt@def@set{#1}%
              }%
            }%
          }%
        }%
      }%
    }%
  }%
}
%    \end{macrocode}
% \opt{activate} is a shortcut for \opt{protrusion} and \opt{expansion}.
%\changes{v1.9e}{2006/07/18}{fix: default value for \opt{activate}: \texttt{true}}
%\todo{add \opt{spacing} to \opt{activate}, when the feature has stabilised in \pdftex?} ^^A probably won't happen ...
%    \begin{macrocode}
\define@key{MT}{activate}[true]{%
   \setkeys{MT}{protrusion={#1}}%
   \setkeys{MT}{expansion={#1}}%
}
%    \end{macrocode}
% \opt{spacing}, \opt{kerning} and \opt{tracking} do not have a compatibility level.
%    \begin{macrocode}
\MT@map@clist@n{spacing,kerning,tracking}{%
  \define@key{MT}{#1}[true]{%
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \MT@ifempty\MT@val\relax{%
        \csname MT@#1true\endcsname
        \MT@ifstreq\MT@val{true}\relax
        {%
          \MT@ifstreq\MT@val{false}{%
            \csname MT@#1false\endcsname
          }{%
            \edef\@tempb{\csname MT@rbba@#1\endcsname}%
            \MT@opt@def@set{#1}%
          }%
        }%
      }%
    }%
  }%
}
%    \end{macrocode}
%\changes{v1.5}{2004/12/02}{new option: \opt{selected}, by default false
%               (suggested by \contributor H\`an \thanhthe{} Th\`anh <hanthethanh\at gmx.net>)}
%                                               ^^A private mail, 2004/11/30
%\changes{v2.0}{2005/10/04}{new option: \opt{babel}, by default false
%               (language-dependent setup suggested by \contributor Ulrich Dirr <ud\at art-satz.de>)}
%                                               ^^A private mail, 2005/08/27
%                                               ^^A (beta:1)
%\begin{macro}{\MT@def@bool@opt}
% The |true|/|false| options:
% \opt{draft}, \opt{final} (may be inherited from the class options),
% \opt{auto},
% \opt{selected},
% \opt{babel},
% \opt{DVIoutput},
% \opt{defersetup},
% \opt{copyfonts}.
%    \begin{macrocode}
\def\MT@def@bool@opt#1#2{%
  \define@key{MT}{#1}[true]{%
    \def\@tempa{##1}%
    \MT@ifstreq\@tempa{true}\relax{%
      \MT@ifstreq\@tempa{false}\relax{%
        \MT@optwarn@admissible{##1}{#1}%
        \def\@tempa{false}%
      }%
    }%
    #2%
  }%
}
%    \end{macrocode}
%\end{macro}
% Boolean options that only set the switch.
%    \begin{macrocode}
\MT@map@clist@n{draft,selected,babel}{%
  \MT@def@bool@opt{#1}{\csname MT@#1\@tempa\endcsname}}
\MT@def@bool@opt{auto}{\csname MT@auto\@tempa\endcsname \MT@opt@autotrue}
%    \end{macrocode}
% The \opt{DVIoutput} option will change \cmd\pdfoutput\ immediately to minimise
% the risk of confusing other packages.
%\changes{v2.5}{2010/09/17}{disable `\opt{DVIoutput}' option for \xetex} ^^A (beta:03)
%    \begin{macrocode}
%</package>
%<*pdftex-def|luatex-def|xetex-def>
%<luatex-def>\MT@requires@luatex4{\let\pdfoutput\outputmode}\relax
\MT@def@bool@opt{DVIoutput}{%
  \csname if\@tempa\endcsname
%<*pdftex-def|luatex-def>
    \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi
    \pdfoutput\z@
  \else
    \ifnum\pdfoutput<\@ne \MT@opt@DVItrue \fi
    \pdfoutput\@ne
%</pdftex-def|luatex-def>
%<xetex-def>    \MT@warning@nl{Ignoring `DVIoutput' option}%
  \fi
}
%</pdftex-def|luatex-def|xetex-def>
%    \end{macrocode}
%\changes{v1.9a}{2005/11/21}{new option: \opt{defersetup}, by default true}
% Setting the \opt{defersetup} option to false will restore the old behaviour,
% where the setup took place at the time when the package was loaded. This is
% \emph{undocumented}, since I would like to learn about the cases where this is
% necessary.
%
% The only problem with the new deferred setup I can think of is when a box
% is being constructed inside the preamble and this box contains a font that is
% not loaded before the box is being used.
%    \begin{macrocode}
%<*package>
\MT@def@bool@opt{defersetup}{%
  \csname if\@tempa\endcsname \else
    \AtEndOfPackage{%
      \MT@setup@
      \let\MT@setup@\@empty
      \let\MT@addto@setup\@firstofone
    }%
  \fi
}
%</package>
%    \end{macrocode}
% \opt{copyfonts} will copy all fonts before setting them up. This allows
% protrusion and expansion with different parameters.
%\changes{v2.2}{2007/07/03}{new option: \opt{copyfonts}}
% This options is also \emph{undocumented} in the hope that we can always find
% out automatically whether it's required.
% It also works with \luatex\ 0.30 or newer.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex7{
  \MT@def@bool@opt{copyfonts}{%
    \csname if\@tempa\endcsname
      \MT@glet\MT@copy@font\MT@copy@font@
    \else
      \MT@glet\MT@copy@font\relax
    \fi
  }
%<pdftex-def>}{
%</pdftex-def|luatex-def>
%<*pdftex-def|xetex-def>
  \MT@def@bool@opt{copyfonts}{%
    \csname if\@tempa\endcsname
      \MT@error
%<pdftex-def>        {The pdftex version you are using is too old\MessageBreak
%<pdftex-def>        to use the `copyfonts' option}{Upgrade pdftex.}%
%<xetex-def>        {The `copyfonts' option does not work with xetex}
%<xetex-def>        {Use pdftex or luatex instead.}%
    \fi
  }
%<pdftex-def>}
%</pdftex-def|xetex-def>
%    \end{macrocode}
% \opt{final} is the opposite to \opt{draft}.
%\changes{v1.4a}{2004/11/16}{new option: \opt{final}}
%    \begin{macrocode}
%<*package>
\MT@def@bool@opt{final}{%
  \csname if\@tempa\endcsname
    \MT@draftfalse
  \else
    \MT@drafttrue
  \fi
}
%    \end{macrocode}
% For \opt{verbose} output, we redefine \cs{MT@vinfo}.
%\changes{v2.3}{2007/11/05}{turned some warnings into errors}
%    \begin{macrocode}
\define@key{MT}{verbose}[true]{%
  \let\MT@vinfo\MT@info@nl
  \def\@tempa{#1}%
  \MT@ifstreq\@tempa{true}\relax{%
%    \end{macrocode}
%\changes{v1.7}{2005/03/16}{new value for \opt{verbose} option: \texttt{errors}}
% Take problems seriously.
%    \begin{macrocode}
    \MT@ifstreq\@tempa{errors}{%
      \let\MT@warning   \MT@warn@err
      \let\MT@warning@nl\MT@warn@err
    }{%
      \let\MT@vinfo\@gobble
%    \end{macrocode}
%\changes{v2.3}{2007/11/05}{new value for \opt{verbose} option: \texttt{silent}
%                           (suggested by \contributor Karl Berry <karl\at freefriends.org>)}
%                                                              ^^A private mail, 2007/11/05
% Cast warnings to the winds.
%    \begin{macrocode}
      \MT@ifstreq\@tempa{silent}{%
        \let\MT@warning   \MT@info
        \let\MT@warning@nl\MT@info@nl
      }{%
        \MT@ifstreq\@tempa{false}\relax{\MT@optwarn@admissible{#1}{verbose}}%
      }%
    }%
  }%
}
%</package>
%    \end{macrocode}
%\changes{v1.5}{2004/12/02}{defaults: \opt{step}: 4
%               (suggested by \contributor H\`an \thanhthe{} Th\`anh <hanthethanh\at gmx.net>)}
%                                               ^^A private mail, 2004/11/30
%\changes{v1.6}{2004/12/18}{new option: \opt{factor}, by default 1000}
%\changes{v2.0}{2005/09/21}{new option: \opt{letterspace}, by default 100} ^^A (beta:1)
%^^A\changes{v2.0}{2007/01/05}{option `\texttt{letterspacing}' renamed to `\opt{letterspace}'}
% Options with numerical keys:
%   \opt{factor},
%   \opt{stretch},
%   \opt{shrink},
%   \opt{step},
%   \opt{letterspace}.
%    \begin{macrocode}
%<*package|letterspace>
%<plain>\MT@requires@latex1{
\MT@map@clist@n{%
%<package>    stretch,shrink,step,%
    letterspace}{%
  \define@key{MT}{#1}[\csname MT@#1@default\endcsname]{%
    \def\@tempa{##1 }%
%    \end{macrocode}
% No nonsense in \cs{MT@factor} et al.?
%\changes{v1.6}{2005/01/06}{test whether numeric options receive a number}
% A space terminates the number.
%    \begin{macrocode}
    \MT@ifint\@tempa
      {\MT@edef@n{MT@#1}{\@tempa}}%
      {\MT@optwarn@nan{##1}{#1}}%
  }%
}
%<plain>}\relax
%</package|letterspace>
%    \end{macrocode}
% \opt{factor} will define the protrusion factor only.
%    \begin{macrocode}
%<*package>
\define@key{MT}{factor}[\MT@factor@default]{%
  \def\@tempa{#1 }%
  \MT@ifint\@tempa
    {\edef\MT@pr@factor{\@tempa}}
    {\MT@optwarn@nan{#1}{factor}}%
}
%    \end{macrocode}
% Unit for protrusion codes.
%\changes{v1.8}{2005/04/14}{new option: \opt{unit}, by default \texttt{character}}
%\changes{v1.9}{2005/09/28}{option \opt{unit}: rename value \texttt{relative} to \texttt{character}}
%    \begin{macrocode}
\define@key{MT}{unit}[character]{%
  \def\@tempa{#1}%
  \MT@ifstreq\@tempa{character}\relax{%
    \MT@ifdimen\@tempa
      {\let\MT@pr@unit\@tempa}%
      {\MT@warning@nl{`\@tempa' is not a dimension.\MessageBreak
              Ignoring it and setting values relative to\MessageBreak
              character widths}}%
  }%
}
%    \end{macrocode}
%
%\subsubsection{Loading the definition file}
%
%\begin{macro}{\MT@endinput}
% Abort if no capable engine found.
%    \begin{macrocode}
\let\MT@endinput\relax
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\ifx\MT@engine\relax
  \MT@warning@nl{You don't seem to be using pdftex, luatex or xetex.\MessageBreak
    `\MT@MT' only works with these engines.\MessageBreak
    I will quit now}
  \MT@clear@options
\else
%    \end{macrocode}
% Otherwise load the engine-specific code (as strewn across this file).
%    \begin{macrocode}
  \input{microtype-\MT@engine tex.def}
\fi
\MT@endinput
%    \end{macrocode}
%
% \subsubsection{Reading the configuration file}
%
% The package should just work if called without any options. Therefore,
% expansion will be switched off by default if output is <DVI>, since it isn't
% likely that expanded fonts are available. (This grows more important as
% modern \TeX\ systems have switched to the \pdftex\ engine even for <DVI>
% output, so that the user might not even be aware of the fact that she's
% running \pdftex.)
%    \begin{macrocode}
\MT@protrusiontrue
%</package>
%<*pdftex-def|luatex-def>
\ifnum\pdfoutput<\@ne \else
%    \end{macrocode}
% Also, we only enable expansion by default if \pdftex\ can expand the fonts
% automatically.
%\changes{v1.6}{2004/12/23}{defaults: turn off expansion for old \pdftex\ versions}
%    \begin{macrocode}
%<pdftex-def>  \MT@requires@pdftex4{
    \MT@expansiontrue
%<pdftex-def>    \MT@autotrue
%<pdftex-def>  }\relax
\fi
%<luatex-def>\MT@autotrue
%</pdftex-def|luatex-def>
%    \end{macrocode}
% The main configuration file will be loaded before processing the package
% options.
%\changes{v1.8}{2005/05/15}{new option: \opt{config} to load a different main
%                           configuration file}
%\begin{macro}{\MT@config@file}
%\begin{macro}{\MT@get@config}
% However, the \opt{config} option must of course be evaluated beforehand.
% We also have to define a no-op for the regular option processing later.
%    \begin{macrocode}
%<*package>
\define@key{MT}{config}[]{\relax}
\def\MT@get@config#1config=#2,#3\@nil{%
  \MT@ifempty{#2}%
    {\def\MT@config@file{\MT@MT.cfg}}%
    {\def\MT@config@file{#2.cfg}}%
}
\expandafter\expandafter\expandafter\MT@get@config
  \csname opt@\@currname.\@currext\endcsname,config=,\@nil
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\changes{v1.4b}{2004/11/25}{fix: set catcodes before reading global configuration file
%                (reported by \contributor Christoph Bier <christoph.bier\at web.de>)}
%                                           ^^A MID: <30k2tqF30v483U1@uni-berlin.de>
% Load the file.
%    \begin{macrocode}
\IfFileExists{\MT@config@file}{%
  \MT@info@nl{Loading configuration file \MT@config@file}%
  \MT@begin@catcodes
    \let\MT@begin@catcodes\relax
    \let\MT@end@catcodes\relax
    \let\MT@curr@file\MT@config@file
    \input{\MT@config@file}%
  \endgroup
}{\MT@warning@nl{%
    Could not find configuration file `\MT@config@file'!\MessageBreak
    This will almost certainly cause undesired results.\MessageBreak
    Please fix your installation}%
}
%    \end{macrocode}
%\begin{macro}{\MT@check@active@set}
% We have to make sure that font sets are active. If the user didn't activate
% any, we use those sets declared by \cs{DeclareMicrotypeSetDefault} (this
% is done at the end of the preamble).
%    \begin{macrocode}
\def\MT@check@active@set#1{%
  \MT@ifdefined@n@TF{MT@#1@setname}{%
    \MT@info@nl{Using \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}'}%
  }{%
    \MT@ifdefined@n@TF{MT@default@#1@set}{%
      \MT@glet@nn{MT@#1@setname}{MT@default@#1@set}%
      \MT@info@nl{Using default \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}'}%
    }{%
%    \end{macrocode}
% If no default font set has been declared in the main configuration file,
% we use the (empty, non-existent) set `|@|',
%\changes{v2.3d}{2008/11/24}{warning for missing default sets}
% and issue a warning.
%    \begin{macrocode}
      \MT@gdef@n{MT@#1@setname}{@}%
      \MT@warning@nl{No \@nameuse{MT@abbr@#1} set chosen, no default set declared.
                     \MessageBreak Using empty set}%
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Hook for other packages}\label{sub:hook}
%
% {\let\special@index\index\SpecialIndex@{\Microtype@Hook}{\encapchar usage}}
%\begin{macro}{\Microtype@Hook}
%\changes{v1.7}{2005/03/22}{new command for font package authors}
% This hook may be used by font package authors, \eg, to declare alias fonts. If
% it is defined, it will be executed here, \ie, after the main configuration
% file has been loaded, and before the package options are evaluated.
%
% This hook was needed in versions prior to 1.9a to overcome the situation that
% (1)~the \microtype\ package should be loaded after all font defaults have
% been set up (hence, using \cmd\@ifpackageloaded\ in the font package was not
% viable), and (2)~checking \cmd\AtBeginDocument\ could be too late, since
% fonts might already have been loaded, and consequently set up, in the
% preamble. With the new deferred setup, one could live without this command,
% however, it remains here since it's simpler than testing whether the package
% was loaded both in the preamble as well as at the beginning of the document
% (which is what one would have to do).
%
% Package authors should check whether the command is already defined so that
% existing definitions by other packages aren't overwritten. Example:
%\begin{verbatim}
%\def\MinionPro@MT@Hook{\DeclareMicrotypeAlias{MinionPro-LF}{MinionPro}}
%\@ifpackageloaded{microtype}
%  \MinionPro@MT@Hook
%  {\@ifundefined{Microtype@Hook}
%    {\let\Microtype@Hook\MinionPro@MT@Hook}
%    {\g@addto@macro\Microtype@Hook{\MinionPro@MT@Hook}}}
%\end{verbatim}
% \cs{MicroType@Hook} with a capital |T| (which only existed in version 1.7) is
% provided for compatibility reasons. At some point in the future, it will no
% longer be available, hence it should not be used.
%    \begin{macrocode}
\MT@ifdefined@c@T\MicroType@Hook{\MT@warning{%
  Command \string\MicroType@Hook\space is deprecated.\MessageBreak
      Use \string\Microtype@Hook\space instead}\MicroType@Hook}
\MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook
%    \end{macrocode}
%\end{macro}
%
%\subsubsection{Changing options later}
%
%\begin{macro}{\microtypesetup}
%\changes{v1.4}{2004/11/04}{fix: set the correct levels, and remember them;
%                           warning when enabling an option disabled in package options}
%\changes{v1.7}{2005/02/17}{fix: warning also when setting to \texttt{(no)compatibility}}
%\changes{v1.9a}{2005/11/21}{inside the preamble, accepts all package options}
%\changes{v2.3d}{2009/03/05}{select font after setup}
%\begin{macro}{\MT@define@optionX}
% Inside the preamble, \cs{microtypesetup} accepts the same options as the
% package (unless \opt{defersetup}|=false|).
% In the document body, it accepts the options:
% |protrusion|, |expansion|, |activate|, |tracking|, |spacing| and |kerning|.
% Specifying font sets is not allowed.
%    \begin{macrocode}
\def\microtypesetup{\setkeys{MT}}
\MT@addto@setup{\def\microtypesetup#1{\setkeys{MTX}{#1}\selectfont}}
%</package>
%<*pdftex-def|luatex-def|xetex-def>
\def\MT@define@optionX#1#2{%
  \define@key{MTX}{#1}[true]{%
    \edef\@tempb{\csname MT@rbba@#1\endcsname}%
    \MT@map@clist@n{##1}{%
      \KV@@sp@def\MT@val{####1}%
      \MT@ifempty\MT@val\relax{%
        \@tempcnta=\m@ne
        \MT@ifstreq\MT@val{true}{%
%    \end{macrocode}
% Enabling micro-typography in the middle of the document is not allowed if it
% has been disabled in the package options since fonts might already have been
% loaded and hence wouldn't be set up.
%    \begin{macrocode}
          \MT@checksetup{#1}{%
            \@tempcnta=\csname MT@\@tempb @level\endcsname
            \MT@vinfo{Enabling #1
                    (level \number\csname MT@\@tempb @level\endcsname)\on@line}%
          }%
        }{%
          \MT@ifstreq\MT@val{false}{%
            \@tempcnta=\z@
            \MT@vinfo{Disabling #1\on@line}%
          }{%
            \MT@ifstreq\MT@val{compatibility}{%
              \MT@checksetup{#1}{%
                \@tempcnta=\@ne
                \MT@let@nc{MT@\@tempb @level}\@ne
                \MT@vinfo{Setting #1 to level 1\on@line}%
              }%
            }{%
              \MT@ifstreq\MT@val{nocompatibility}{%
                \MT@checksetup{#1}{%
                  \@tempcnta=\tw@
                  \MT@let@nc{MT@\@tempb @level}\tw@
                  \MT@vinfo{Setting #1 to level 2\on@line}%
                }%
              }{\MT@error{Value `\MT@val' for key `#1' not recognised}
                         {Use any of `true', `false', `compatibility' or
                          `nocompatibility'.}%
              }%
            }%
          }%
        }%
        \ifnum\@tempcnta>\m@ne
          #2\@tempcnta\relax
        \fi
      }%
    }%
  }%
}
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@checksetup}
% Test whether the feature wasn't disabled in the package options.
%    \begin{macrocode}
\def\MT@checksetup#1{%
  \csname ifMT@#1\endcsname
    \expandafter\@firstofone
  \else
    \MT@error{You cannot enable #1 if it was disabled\MessageBreak
              in the package options}{Load microtype with #1 enabled.}%
    \expandafter\@gobble
  \fi
}
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\MT@define@optionX{protrusion}\MT@protrudechars
%</pdftex-def|luatex-def|xetex-def>
%<*pdftex-def|luatex-def>
\MT@define@optionX{expansion}\MT@adjustspacing
%    \end{macrocode}
%\begin{macro}{\MT@protrudechars}
%\begin{macro}{\MT@adjustspacing}
%    \begin{macrocode}
%<*luatex-def>
\MT@requires@luatex4{
  \let\pdfprotrudechars\protrudechars
  \let\pdfadjustspacing\adjustspacing
}\relax
%</luatex-def>
\let\MT@protrudechars\pdfprotrudechars
\let\MT@adjustspacing\pdfadjustspacing
%</pdftex-def|luatex-def>
%<*xetex-def>
\let\MT@protrudechars\XeTeXprotrudechars
\define@key{MTX}{expansion}[true]{\MT@warning{Ignoring expansion setup}}
%</xetex-def>
%    \end{macrocode}
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@define@optionX@}
% The same for |tracking|, |spacing| and |kerning|, which do not have a
% |compatibility| level.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex6{
%<luatex-def>\MT@requires@luatex3{
  \def\MT@define@optionX@#1#2{%
    \define@key{MTX}{#1}[true]{%
      \MT@map@clist@n{##1}{%
        \KV@@sp@def\MT@val{####1}%
        \MT@ifempty\MT@val\relax{%
          \@tempcnta=\m@ne
          \MT@ifstreq\MT@val{true}{%
            \MT@checksetup{#1}{%
              \@tempcnta=\@ne
              \MT@vinfo{Enabling #1\on@line}%
            }%
          }{%
            \MT@ifstreq\MT@val{false}{%
              \@tempcnta=\z@
              \MT@vinfo{Disabling #1\on@line}%
            }{\MT@error{Value `\MT@val' for key `#1' not recognised}
                       {Use either `true' or `false'}%
            }%
          }%
          \ifnum\@tempcnta>\m@ne
            #2\relax
          \fi
        }%
      }%
    }%
  }
%    \end{macrocode}
%\end{macro}
% We cannot simply let \cs{MT@tracking} relax, since this may select the already
% letterspaced font instance.
%    \begin{macrocode}
  \MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@ \let\MT@tracking\MT@set@tr@zero
                                \else \let\MT@tracking\MT@tracking@ \fi}
%<pdftex-def>  \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta}
%<pdftex-def>  \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta
%<pdftex-def>                               \pdfappendkern\@tempcnta}
}{
%</pdftex-def|luatex-def>
%<*pdftex-def|luatex-def|xetex-def>
%    \end{macrocode}
% Disable for older \pdftex\ versions and for \xetex\ and \luatex.
%    \begin{macrocode}
\define@key{MTX}{tracking}[true]{\MT@warning{Ignoring tracking setup}}
%<luatex-def>}
\define@key{MTX}{kerning}[true]{\MT@warning{Ignoring kerning setup}}
\define@key{MTX}{spacing}[true]{\MT@warning{Ignoring spacing setup}}
%<pdftex-def>}
\define@key{MTX}{activate}[true]{%
  \setkeys{MTX}{protrusion={#1}}%
%<pdftex-def|luatex-def>  \setkeys{MTX}{expansion={#1}}%
}
%</pdftex-def|luatex-def|xetex-def>
%    \end{macrocode}
%\begin{macro}{\MT@saved@setupfont}
% Disable everything -- may be used as a temporary work-around in case
% setting up fonts doesn't work under certain circumstances, but only until
% that specific problem is fixed. This is \emph{undocumented}, as it completely
% deprives us of the possibility to act -- we're blind and paralysed.
%    \begin{macrocode}
%<*package>
\let\MT@saved@setupfont\MT@setupfont
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\define@key{MTX}{disable}[]{%
  \MT@info{Inactivate `\MT@MT' package}%
  \let\MT@setupfont\relax
}
\define@key{MTX}{enable}[]{%
  \MT@info{Reactivate `\MT@MT' package}%
  \let\MT@setupfont\MT@saved@setupfont
}
%</package>
%    \end{macrocode}
%
%\subsubsection{Processing the options}\label{sssec:impl.options}
%
%\begin{macro}{\MT@ProcessOptionsWithKV}
% Parse options.
%    \begin{macrocode}
%<*package|letterspace>
%<plain>\MT@requires@latex1{
\def\MT@ProcessOptionsWithKV#1{%
  \let\@tempc\relax
  \let\MT@temp\@empty
%<plain>  \MT@requires@latex2{
    \MT@map@clist@c\@classoptionslist{%
      \def\CurrentOption{##1}%
      \MT@ifdefined@n@T{KV@#1@\expandafter\MT@getkey\CurrentOption=\@nil}{%
        \edef\MT@temp{\MT@temp,\CurrentOption,}%
        \@expandtwoargs\@removeelement\CurrentOption
          \@unusedoptionlist\@unusedoptionlist
      }%
    }%
    \edef\MT@temp{\noexpand\setkeys{#1}%
                    {\MT@temp\@ptionlist{\@currname.\@currext}}}%
%    \end{macrocode}
% \pkg{eplain} can handle package options.
%    \begin{macrocode}
%<*plain>
  }{\edef\MT@temp{\noexpand\setkeys{#1}%
                    {\csname usepkg@options@\usepkg@pkg\endcsname}}}
%</plain>
  \MT@temp
  \MT@clear@options
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@getkey}
% For |key=val| in class options.
%\changes{v2.3a}{2008/02/09}{fix: \texttt{key\quotechar=val} in class options list}
%    \begin{macrocode}
\def\MT@getkey#1=#2\@nil{#1}
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
\MT@ProcessOptionsWithKV{MT}
%<plain>}\relax
%</package|letterspace>
%<*package>
%    \end{macrocode}
% Now we can take the appropriate actions. We also tell the log file which
% options the user has chosen (in case it's interested).
%    \begin{macrocode}
\MT@addto@setup{%
\ifMT@draft
%    \end{macrocode}
% We disable most of what we've just defined in the \arabic{CodelineNo} lines
% above if we are running in draft mode.
%\changes{v1.7}{2005/02/06}{warning when running in draft mode}
%    \begin{macrocode}
  \MT@warning@nl{`draft' option active.\MessageBreak
                 Disabling all micro-typographic extensions.\MessageBreak
                 This might lead to different line and page breaks}%
  \let\MT@setupfont\relax
  \renewcommand*\LoadMicrotypeFile[1]{}%
  \renewcommand*\microtypesetup[1]{}%
  \renewcommand*\microtypecontext[1]{}%
  \renewcommand*\lsstyle{}%
\else
  \MT@setup@PDF
  \MT@setup@copies
%    \end{macrocode}
% Fix the font sets.
%    \begin{macrocode}
  \MT@map@tlist@c\MT@font@sets\MT@fix@font@set
  \MT@setup@protrusion
  \MT@setup@expansion
  \MT@setup@tracking
  \MT@setup@warntracking
  \MT@setup@spacing
  \MT@setup@kerning
  \MT@setup@noligatures
}
%</package>
%    \end{macrocode}
%\begin{macro}{\MT@setup@PDF}
% \pdftex\ can create <DVI> output, too. However, both the <DVI> viewer and
% |dvips| need to find actual fonts. Therefore, expansion will only work if the
% fonts for different degrees of expansion are readily available.
%
%\changes{v1.4b}{2004/11/19}{new message if \cmd\pdfoutput\ is changed}
% Some packages depend on the value of \cmd\pdfoutput\ and will get confused if
% it is changed after they have been loaded. These packages are, among others:
% \pkg{color}, \pkg{graphics}, \pkg{hyperref}, \pkg{crop}, \pkg{contour},
% \pkg{pstricks} and, as a matter of course, \pkg{ifpdf}. Instead of testing
% for each package (that's not our job), we only say that it was \microtype\
% that changed it. This must be sufficient!
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@setup@PDF{%
  \MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output%
              \ifMT@opt@DVI\space (changed by \MT@MT)\fi}%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@copies}
% Working on font copies?
%    \begin{macrocode}
\def\MT@setup@copies{%
  \ifx\MT@copy@font\relax\else \MT@info@nl{Using font copies for contexts}\fi
}
%</pdftex-def|luatex-def>
%<*xetex-def>
\let\MT@setup@PDF\relax
\let\MT@setup@copies\relax
%</xetex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@protrusion}
% Protrusion.
%    \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\def\MT@setup@protrusion{%
  \ifMT@protrusion
    \edef\MT@active@features{\MT@active@features,pr}%
    \MT@protrudechars\MT@pr@level
    \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)%
      \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak
        factor: \number\MT@pr@factor\fi
      \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi}%
    \MT@check@active@set{pr}%
  \else
    \let\MT@protrusion\relax
    \MT@info@nl{No character protrusion}%
  \fi
}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@expansion}
% For <DVI> output, the user must have explicitly passed the \opt{expansion}
% option to the package.
%\changes{v1.5}{2004/12/02}{defaults: turn off expansion for <DVI> output}
% Under \luatex, expansion works quite differently: the glyphs will be
% positioned as if they were transformed, without actually being transformed.
% Since this could still be considered a viable option, we don't disable
% the feature completely, but issue a warning.
%\changes{v2.8}{2020/02/09}{warning when expanding in <DVI> mode with \luatex\
%                           (reported by \contributor d909 <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/531413/dvipdfmx-and-dvips-do-not-expand-fonts-properly-with-lualatex-in-dvi-mode
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@setup@expansion{%
  \ifnum\pdfoutput<\@ne
    \ifMT@opt@expansion
%<*luatex-def>
      \ifMT@expansion
        \MT@requires@luatex3{%
          \MT@warning@nl{Font expansion doesn't work properly with luatex in\MessageBreak
             DVI mode: the glyphs won't be actually transformed,\MessageBreak
             but will only be shifted. You might want to use\MessageBreak
             pdflatex instead. I'll continue anyway ..}%
          %\MT@expansionfalse
        }\relax
      \fi
%</luatex-def>
    \else
      \MT@expansionfalse
    \fi
  \fi
  \ifMT@expansion
%    \end{macrocode}
% Set up the values for font expansion: if \opt{stretch} has not been specified, we
% take the default value of 20.
%    \begin{macrocode}
    \ifnum\MT@stretch=\m@ne
      \let\MT@stretch\MT@stretch@default
    \fi
%    \end{macrocode}
% If \opt{shrink} has not been specified, it will inherit the value from \opt{stretch}.
%    \begin{macrocode}
    \ifnum\MT@shrink=\m@ne
      \let\MT@shrink\MT@stretch
    \fi
%    \end{macrocode}
%\changes{v2.3d}{2008/11/19}{default \texttt{step}: 1 for \pdftex\ versions $\geq$ 1.40}
% If \opt{step} has not been specified, we will just set it to 1 for recent
% \pdftex\ versions. My tests did not show much difference neither in
% compilation time (within the margin of error) nor in file size (less than
% 1\% difference for \file{microtype.pdf} with |step=1| compared to |step=5|).
%\changes{v1.5}{2004/12/02}{defaults: calculate \opt{step} as
%                           min(\texttt{stretch},\texttt{shrink})/5}
% With older versions, we set it to min(\opt{stretch},\opt{shrink})/5,
% rounded off, minimum value 1.
%\changes{v1.9}{2005/07/08}{warning if user requested zero \opt{step}}
%    \begin{macrocode}
    \ifnum\MT@step=\m@ne
%<pdftex-def>    \MT@requires@pdftex6{%
      \def\MT@step{1 }%
%<*pdftex-def>
    }{%
      \ifnum\MT@stretch>\MT@shrink
        \ifnum\MT@shrink=\z@
          \@tempcnta=\MT@stretch
        \else
          \@tempcnta=\MT@shrink
        \fi
      \else
        \ifnum\MT@stretch=\z@
          \@tempcnta=\MT@shrink
        \else
          \@tempcnta=\MT@stretch
        \fi
      \fi
      \divide\@tempcnta 5\relax
      \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi
      \edef\MT@step{\number\@tempcnta\space}%
    }%
%</pdftex-def>
    \fi
    \ifnum\MT@step=\z@
      \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak
          Setting it to one}%
      \def\MT@step{1 }%
    \fi
%    \end{macrocode}
%\begin{macro}{\MT@auto}
% Automatic expansion of the font? This new feature of \pdftex\ 1.20 makes the
% \textit{\fontfamily{pzc}\selectfont hz}~programme really usable.
% It must be either `|autoexpand|' or empty (or `|1000|' for older versions of
% \pdftex).
%\changes{v2.7a}{2017/07/18}{with \luatex, non-automatic font expansion is no longer possible
%                            (as confirmed by \contributor Hans Hagen <pragma\at wxs.nl>)}
%                             ^^A http://tug.org/pipermail/luatex/2017-July/006579.html and following
% With \luatex, we just leave it empty, as there's actually no difference --
% non-automatic font expansion doesn't work anymore.
%\changes{v2.7a}{2017/11/01}{remove `\texttt{autoexpand}' for \luatex\ 1.0.6
%                            (reported by \contributor Ulrike Fischer <news3\at nililand.de>)}
%                            ^^A private mail, 2017/10/29
% In \luatex\ 1.0.6, the `|autoexpand|' option seems to have been removed altogether
% and would trigger a warning.
%    \begin{macrocode}
    \let\MT@auto\@empty
    \ifMT@auto
%    \end{macrocode}
%\end{macro}
% We turn off automatic expansion if output mode is <DVI>.
%\changes{v1.5}{2004/12/02}{disable automatic expansion for <DVI> output}
%\changes{v2.7}{2017/07/02}{don't disable automatic expansion for <DVI> output with \luatex}
%    \begin{macrocode}
%<*pdftex-def>
      \MT@requires@pdftex4{%
        \ifnum\pdfoutput<\@ne
          \ifMT@opt@auto
            \MT@error{%
              Automatic font expansion only works for PDF output.\MessageBreak
              However, you are creating a DVI file}
             {If you have created expanded fonts instances, remove `auto' from%
              \MessageBreak the package options. Otherwise, you have to switch
              off expansion\MessageBreak completely.}%
          \fi
          \MT@autofalse
        \else
          \def\MT@auto{autoexpand}%
        \fi
%    \end{macrocode}
% Also, if \pdftex\ is too old.
%\changes{v1.1}{2004/09/13}{issue an error instead of a warning, when \pdftex\
%                            version is too old for \texttt{autoexpand}}
%\changes{v1.6}{2004/12/23}{disable automatic expansion for old \pdftex\ versions}
%    \begin{macrocode}
      }{%
        \MT@error{%
          The pdftex version you are using is too old for\MessageBreak
          automatic font expansion}%
         {If you have created expanded fonts instances, remove `auto' from\MessageBreak
          the package options. Otherwise, you have to switch off expansion\MessageBreak
          completely, or upgrade pdftex to version 1.20 or newer.}%
        \MT@autofalse
        \def\MT@auto{1000 }%
      }%
%</pdftex-def>
%<luatex-def>      \MT@requires@luatex3\relax{\def\MT@auto{autoexpand}}%
    \else
%<*pdftex-def>
%    \end{macrocode}
% No automatic expansion.
%    \begin{macrocode}
      \MT@requires@pdftex4\relax{%
        \def\MT@auto{1000 }%
      }%
%</pdftex-def>
%<*luatex-def>
      \MT@requires@luatex3{%
        \ifMT@opt@auto
          \MT@error{Non-automatic font expansion does not work with\MessageBreak
                    luatex}{Remove `auto=false' from the package options, or use pdftex.}%
          \MT@autotrue
        \fi
      }\relax
%</luatex-def>
    \fi
%    \end{macrocode}
% Choose the appropriate macro for selected expansion.
%    \begin{macrocode}
    \ifMT@selected
      \let\MT@set@ex@codes\MT@set@ex@codes@s
    \else
      \let\MT@set@ex@codes\MT@set@ex@codes@n
    \fi
%    \end{macrocode}
% Filter out |stretch=0,shrink=0|, since it would result in a \pdftex\ error.
%\changes{v1.9}{2005/07/08}{disable expansion if both \opt{step} and \opt{shrink} are zero}
%    \begin{macrocode}
    \ifnum\MT@stretch=\z@
      \ifnum\MT@shrink=\z@
        \MT@warning@nl{%
          Both the stretch and shrink limit are set to zero.\MessageBreak
          Disabling font expansion}%
        \MT@expansionfalse
      \fi
    \fi
  \fi
  \ifMT@expansion
    \edef\MT@active@features{\MT@active@features,ex}%
    \MT@adjustspacing\MT@ex@level
    \MT@info@nl{\ifMT@auto A\else Non-a\fi utomatic font expansion enabled
                (level \number\MT@ex@level),\MessageBreak
                stretch: \number\MT@stretch, shrink: \number\MT@shrink,
                step: \number\MT@step, \ifMT@selected\else non-\fi selected}%
%    \end{macrocode}
%\changes{v2.2}{2007/01/28}{warning if \opt{stretch} or \opt{shrink} aren't multiples of \opt{step}}
%\begin{macro}{\MT@check@step}
% Check whether \opt{stretch} and \opt{shrink} are multiples of \opt{step}.
%    \begin{macrocode}
    \def\MT@check@step##1{%
      \@tempcnta=\csname MT@##1\endcsname
      \divide\@tempcnta \MT@step
      \multiply\@tempcnta \MT@step
      \ifnum\@tempcnta=\csname MT@##1\endcsname\else
        \MT@warning@nl{The ##1 amount is not a multiple of step.\MessageBreak
                       The effective maximum ##1 is \the\@tempcnta\space
                       (step \number\MT@step)}%
      \fi
    }%
    \MT@check@step{stretch}%
    \MT@check@step{shrink}%
    \MT@check@active@set{ex}%
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\showhyphens}
%\changes{v1.7}{2005/03/02}{modify \cmd\showhyphens}
% Inside \cmd\showhyphens, font expansion should be disabled.
% (Since 2017/01/10, the \LaTeX\ format contains a different version
% for \xetex, but since expansion doesn't work with \xetex, we don't
% have to bother.)
%\changes{v2.7c}{2019/10/02}{compatibility with \LaTeX\ 2019/10/01
%                            (reported by \contributor Phelype Oleinik <phe.h.o1\at gmail.com>
%                             and \contributor Falk Hanisch <falk.hanisch\at tu-dresden.de>)}
%                            ^^A private mail, 2019/09/26
%                            ^^A private mail, 2019/10/08
% Since 2019/10/01, the command is robust.
%    \begin{macrocode}
    \MT@ifdefined@n@TF{showhyphens }{%
      \def\MT@temp##1##2{%
        \expandafter\CheckCommand\csname showhyphens \endcsname[1]{##1}%
        \DeclareRobustCommand\showhyphens[1]{##2}}%
    }{%
      \def\MT@temp##1##2{%
        \CheckCommand*\showhyphens[1]{##1}%
        \gdef\showhyphens####1{##2}}%
    }%
    \MT@temp
       {\setbox0\vbox{\color@begingroup
        \everypar{}\parfillskip\z@skip
        \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne
        \hbadness\z@\showboxdepth\z@\ ##1\color@endgroup}}
       {\setbox0\vbox{\color@begingroup\pdfadjustspacing\z@
        \everypar{}\parfillskip\z@skip
        \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne
        \hbadness\z@\showboxdepth\z@\ ##1\color@endgroup}}%
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
  \else
    \let\MT@expansion\relax
    \MT@info@nl{No font expansion}%
  \fi
}
%</pdftex-def|luatex-def>
%<*xetex-def>
\def\MT@setup@expansion{%
  \ifMT@expansion
    \ifMT@opt@expansion
      \MT@error{Font expansion does not work with xetex}
               {Use pdftex or luatex instead.}%
    \fi
  \fi
}
%</xetex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@tracking}
% Tracking, spacing and kerning.
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
%<pdftex-def>\MT@requires@pdftex6{%
%<luatex-def>\MT@requires@luatex3{%
  \def\MT@setup@tracking{%
    \ifMT@tracking
      \edef\MT@active@features{\MT@active@features,tr}%
      \MT@info@nl{Tracking enabled}%
      \MT@check@active@set{tr}%
%    \end{macrocode}
% Enable protrusion for compensation at the line edges.
%\changes{v2.3}{2007/07/27}{enable protrusion when tracking is enabled}
%    \begin{macrocode}
      \ifMT@protrusion\else\MT@protrudechars\@ne\fi
    \else
      \let\MT@tracking\relax
      \MT@info@nl{No adjustment of tracking}%
    \fi
  }
%</pdftex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@spacing}
%    \begin{macrocode}
%<*pdftex-def>
  \def\MT@setup@spacing{%
    \ifMT@spacing
      \edef\MT@active@features{\MT@active@features,sp}%
      \pdfadjustinterwordglue\@ne
      \MT@info@nl{Adjustment of interword spacing enabled}%
%    \end{macrocode}
%\changes{v2.5}{2011/11/29}{warning with \pkg{ragged2e}
%                           (reported by \contributor Steffen Hoffmann <speraviro-delenda\at expires-2011-11-30.arcornews.de>)}
%                            ^^A MID: <dctt-20353621.20111126$90.sph@virsperans.my-fqdn.de>
%                            ^^A (beta:09)
% The \pkg{ragged2e} package sets interword spaces to a fixed value without glue.
% \microtype's modifications can therefore have undesired effects. Therefore,
% we issue a warning.
%    \begin{macrocode}
      \MT@with@package@T{ragged2e}{%
        \MT@warning@nl{You are using the `ragged2e' package.\MessageBreak
          Adjustment of interword spacing may lead to\MessageBreak
          undesired results when used with `ragged2e'.\MessageBreak
          In this case, disable the `spacing' option}%
      }%
      \MT@check@active@set{sp}%
    \else
      \let\MT@spacing\relax
      \MT@info@nl{No adjustment of interword spacing}%
    \fi
  }
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@spacing@check}
% Warning if \cmd\nonfrenchspacing\ is active, since space factors will be
% ignored with \cmd\pdfadjustinterwordglue\,|>|\,0. Why 1500? Because some
% packages redefine \cmd\frenchspacing.\footnote{
%   Cf. the \texttt{c.t.t.} thread `\cmd\frenchspacing\ with <AMS> packages
%   and babel', started by Philipp Lehman on 16~August 2005,
%   <MID>:~\nolinkurl{ddtbaj$rob$1@online.de}}
%    \begin{macrocode}
  \def\MT@setup@spacing@check{%
    \ifMT@spacing
      \ifMT@babel \else
        \ifnum\sfcode`\. > 1500
          \MT@ifstreq\MT@sp@context{nonfrench}\relax{%
            \MT@warning@nl{%
              \string\nonfrenchspacing\space is active. Adjustment of\MessageBreak
              interword spacing will disable it. You might want\MessageBreak
              to add `\@backslashchar\MT@MT context{spacing=nonfrench}'\MessageBreak
              to your preamble}%
          }%
        \fi
      \fi
    \fi
  }
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@kerning}
%    \begin{macrocode}
  \def\MT@setup@kerning{%
    \ifMT@kerning
      \edef\MT@active@features{\MT@active@features,kn}%
      \pdfprependkern\@ne
      \pdfappendkern\@ne
      \MT@info@nl{Adjustment of character kerning enabled}%
      \MT@check@active@set{kn}%
    \else
      \let\MT@kerning\relax
      \MT@info@nl{No adjustment of character kerning}%
    \fi
  }
%</pdftex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@error@doesnt@work}
% If \pdftex\ is too old, we disable tracking, spacing and kerning,
%\changes{v2.3a}{2008/02/16}{error messages if \pdftex\ is too old for extensions}
% and throw an error message.
% We also switch the features off for \luatex\ and \xetex.
%    \begin{macrocode}
%<pdftex-def|luatex-def>}{
%<*luatex-def>
  \def\MT@setup@tracking{%
    \ifMT@tracking
      \MT@error{The tracking feature only works with luatex 0.62\MessageBreak
        or newer. Switching it off}{Upgrade luatex.}%
      \MT@trackingfalse
      \MT@let@nc{MT@tracking}\relax
    \else
      \MT@info@nl{No adjustment of tracking (luatex too old)}%
    \fi
  }
}
%</luatex-def>
%<*pdftex-def|xetex-def|luatex-def>
  \def\MT@error@doesnt@work#1{%
    \csname ifMT@#1\endcsname
      \MT@error{The #1 feature only works with pdftex 1.40\MessageBreak
        or newer. Switching it off}
%<pdftex-def>        {Upgrade pdftex.}%
%<luatex-def|xetex-def>        {Use pdftex instead.}%
      \csname MT@#1false\endcsname
      \MT@let@nc{MT@#1}\relax
    \else
      \MT@info@nl{No adjustment of #1%
%<pdftex-def>      \space(pdftex too old)%
      }%
    \fi
  }
%<pdftex-def|xetex-def>  \def\MT@setup@tracking{\MT@error@doesnt@work{tracking}}
  \def\MT@setup@kerning {\MT@error@doesnt@work{kerning}}
  \def\MT@setup@spacing {\MT@error@doesnt@work{spacing}}
%<pdftex-def>}
%</pdftex-def|xetex-def|luatex-def>
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@warntracking}
%    \begin{macrocode}
%<letterspace>\MT@addto@setup
%<pdftex-def|luatex-def>\def\MT@setup@warntracking
%    \end{macrocode}
%\begin{macro}{\MT@warn@tracking@DVI}
%\changes{v2.2}{2007/02/11}{warning when letterspacing in <DVI> mode}
%\changes{v2.7}{2017/07/06}{don't warn for letterspacing in <DVI> mode with \luatex}
% With \pdftex, we issue a warning, when letterspacing in <DVI> mode, since it will probably
% not work. We also switch on protrusion if it isn't already, to compensate for
% the letterspacing kerns.
%    \begin{macrocode}
%<*pdftex-def|luatex-def|letterspace>
{%
%<*pdftex-def|letterspace>
  \ifnum\pdfoutput<\@ne
    \def\MT@warn@tracking@DVI{%
%<letterspace>      \MT@pdf@or@lua{%
      \MT@warning@nl{%
          You are using tracking/letterspacing in DVI mode.\MessageBreak
          This will probably not work, unless the post-\MessageBreak
          processing program (dvips, dvipdfm(x), ...) is\MessageBreak
          able to create the virtual fonts on the fly}%
%<letterspace>      }\relax
      \MT@glet\MT@warn@tracking@DVI\relax
    }%
  \else
%</pdftex-def|letterspace>
    \def\MT@warn@tracking@DVI{%
      \ifnum\pdfprotrudechars<\@ne \global\pdfprotrudechars\@ne \fi
      \MT@glet\MT@warn@tracking@DVI\relax
    }%
%<pdftex-def|letterspace>  \fi
%    \end{macrocode}
%\end{macro}
%    \begin{macrocode}
  \ifnum\MT@letterspace=\m@ne
    \let\MT@letterspace\MT@letterspace@default
  \else
    \MT@ls@too@large\MT@letterspace
  \fi
}
%</pdftex-def|luatex-def|letterspace>
%<xetex-def>\let\MT@setup@warntracking\relax
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@setup@noligatures}
% \cs{DisableLigatures} is only admissible in the preamble, therefore we can
% now disable the corresponding macro, if it was never called.
%\changes{v2.0}{2006/12/14}{maybe disable \cs{MT@noligatures} after the preamble}
%    \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@setup@noligatures{%
%<pdftex-def>  \MT@requires@pdftex5{%
    \ifMT@noligatures \else
      \let\MT@noligatures\relax
    \fi
%<pdftex-def>  }\relax
}
%</pdftex-def|luatex-def>
%<xetex-def>\let\MT@setup@noligatures\relax
%    \end{macrocode}
%\end{macro}
% Remove the leading comma in \cs{MT@active@features}, and set the
% document switch to true.
%    \begin{macrocode}
%<*package>
\MT@addto@setup{%
  \ifx\MT@active@features\@empty \else
    \edef\MT@active@features{\expandafter\@gobble\MT@active@features}%
  \fi
  \MT@documenttrue
}
%    \end{macrocode}
%\begin{macro}{\MT@set@babel@context}
% Interaction with \pkg{babel}.
%    \begin{macrocode}
\def\MT@set@babel@context#1{%
  \MT@ifdefined@n@TF{MT@babel@#1}{%
    \MT@vinfo{*** Changing to language context `#1'\MessageBreak\on@line}%
    \expandafter\MT@exp@one@n\expandafter\microtypecontext
      \csname MT@babel@#1\endcsname
  }{%
    \microtypecontext{protrusion=,expansion=,spacing=,kerning=}%
  }%
}
%    \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@shorthandoff}
% Active characters can only be switched off if \pkg{babel} isn't loaded after
% \microtype.
%    \begin{macrocode}
\@ifpackageloaded{babel}{
  \def\MT@shorthandoff#1#2{%
    \MT@info@nl{Switching off #1 babel's active characters (#2)}%
    \shorthandoff{#2}}
}{
  \def\MT@shorthandoff#1#2{%
    \MT@error{You must load `babel' before `\MT@MT'}
             {Otherwise, `\MT@MT' cannot switch off #1 babel's\MessageBreak
              active characters.}}
}
%    \end{macrocode}
%\end{macro}
% We patch the language switching commands to enable language-dependent setup.
%    \begin{macrocode}
\MT@addto@setup{%
  \ifMT@babel
    \@ifpackageloaded{babel}{%
      \MT@info@nl{Redefining babel's language switching commands}%
      \let\MT@orig@select@language\select@language
      \def\select@language#1{%
        \MT@orig@select@language{#1}%
        \MT@set@babel@context{#1}%
      }%
      \let\MT@orig@foreign@language\foreign@language
      \def\foreign@language#1{%
        \MT@orig@foreign@language{#1}%
        \MT@set@babel@context{#1}%
      }%
      \ifMT@kerning
%    \end{macrocode}
%\todo{make switching off of \pkg{babel}'s shorthands configurable}
% Disable French \pkg{babel}'s active characters.
%\changes{v2.0}{2006/10/10}{option `\opt{babel}': fix: switch off French
%                           \pkg{babel}'s shorthands properly
%                           (reported by \contributor Daniel Flipo <daniel.flipo\at univ-lille1.fr>)}
%                                                      ^^A private mail, 2006/10/09
%                                                      ^^A (beta:8)
%    \begin{macrocode}
        \MT@if@false
        \MT@with@babel@and@T{french}  \MT@if@true
        \MT@with@babel@and@T{frenchb} \MT@if@true
        \MT@with@babel@and@T{francais}\MT@if@true
        \MT@with@babel@and@T{canadien}\MT@if@true
        \MT@with@babel@and@T{acadian} \MT@if@true
        \ifMT@if@\MT@shorthandoff{French}{:;!?}\fi
%    \end{macrocode}
% Disable Turkish \pkg{babel}'s active characters.
%\changes{v2.0}{2006/10/10}{option `\opt{babel}': switch off Turkish \pkg{babel}'s shorthands} ^^A (beta:8)
%\changes{v2.3}{2007/10/03}{fix: really switch off Turkish shorthands}
%    \begin{macrocode}
        \MT@if@false
        \MT@with@babel@and@T{turkish} \MT@if@true
        \ifMT@if@\MT@shorthandoff{Turkish}{:!=}\fi
      \fi
%    \end{macrocode}
% In case \pkg{babel} was loaded before \microtype:
%    \begin{macrocode}
      \MT@set@babel@context\languagename
    }{%
      \MT@warning@nl{You did not load the babel package.\MessageBreak
        The `babel' option won't have any effect}%
    }%
  \fi
}
%    \end{macrocode}
% Now we close the \cs{fi} from \cs{ifMT@draft}.
%    \begin{macrocode}
\MT@addto@setup{\fi
%    \end{macrocode}
% Set up the current font, most likely the normal font. This has to come after
% all of the setup (including anything from the preamble) has been dealt with.
%    \begin{macrocode}
  \selectfont}
%    \end{macrocode}
%\begin{macro}{\MT@curr@file}
% This is the current file (hopefully with the correct extension).
%    \begin{macrocode}
\edef\MT@curr@file{\jobname.tex}
%</package>
%    \end{macrocode}
%\end{macro}
% Finally, execute the setup macro at the end of the preamble, and empty it
% (the \pkg{combine} class calls it repeatedly).
%\changes{v2.3d}{2009/02/05}{move setup to the very end
%                            (for \contributor Colin Rourke <gt\at msp.warwick.ac.uk>)}
%                                                       ^^A private mail, 2009/02/03
%    \begin{macrocode}
%<*package|letterspace>
%<plain>\MT@requires@latex1{
\AtBeginDocument{\MT@setup@ \MT@glet\MT@setup@\@empty}
%<plain>}\relax
%</package|letterspace>
%    \end{macrocode}
% Must come at the very, very end.
%    \begin{macrocode}
%<package>\MT@ifdefined@c@T\MT@setup@spacing@check
%<package>  {\AtBeginDocument{\MT@setup@spacing@check}}
%    \end{macrocode}
% Restore catcodes.
%    \begin{macrocode}
%<package|letterspace>\MT@restore@catcodes
%    \end{macrocode}
% That was that.
%
% ^^A -------------------------------------------------------------------------
%\NoIndexing  ^^A from now on, don't bother indexing
%
%\newpage
%
%\section{Configuration files}
%\changes{v1.6}{2005/01/24}{restructure \file{dtx} file}
%
% Let's now write the font configuration files.
%    \begin{macrocode}
%<*config>

%    \end{macrocode}
%\subsection{Font sets}
%\GeneralChanges{Font sets}
%
% We first declare some sets in the main configuration file.
%
%    \begin{macrocode}
%<*m-t>
%%% -----------------------------------------------------------------------
%%% FONT SETS

\DeclareMicrotypeSet{all}
   { }

%    \end{macrocode}
%\changes{v1.2}{2004/10/02}{new: \texttt{allmath} and \texttt{basicmath}}
%\changes{v1.8}{2005/05/25}{add <U> encoding to \texttt{allmath}}
%\changes{v1.9}{2005/08/17}{add <OT4> encoding to text sets}
%\changes{v1.9}{2005/08/17}{add <T5> encoding to text sets}
%\changes{v1.9d}{2006/04/20}{add <QX> encoding to text sets}
%\changes{v2.3e}{2009/10/28}{add <T2A> encoding}
%\changes{v2.5}{2010/05/13}{add <EU1> and <EU2> encodings}
%\changes{v2.6}{2016/04/22}{add <TU> encoding
%                           (notified by \contributor Will Robertson <will\at wspr.io>)}
%                           ^^A semi-private mail, 2016/01/28
%    \begin{macrocode}
\DeclareMicrotypeSet{allmath}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,TU,TS1,OML,OMS,U} }

\DeclareMicrotypeSet{alltext}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2,TU} }

%    \end{macrocode}
%\changes{v2.6}{2014/04/07}{new: \texttt{allmath-nott} and \texttt{alltext-nott}
%                           (reqested by \contributor Karl Berry <karl\at freefriends.org>)}
%                           ^^A private mail, 2014/03/21
%    \begin{macrocode}
\DeclareMicrotypeSet{allmath-nott}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,TU,TS1,OML,OMS,U},
     family   = {rm*,sf*}
   }

\DeclareMicrotypeSet{alltext-nott}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2,TU},
     family   = {rm*,sf*}
   }

%    \end{macrocode}
%\changes{v1.9d}{2006/02/22}{\texttt{md*} instead of \texttt{m} series in basic sets}
%    \begin{macrocode}
\DeclareMicrotypeSet{basicmath}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,TU,OML,OMS},
     family   = {rm*,sf*},
     series   = {md*},
     size     = {normalsize,footnotesize,small,large}
   }

\DeclareMicrotypeSet{basictext}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,EU1,EU2,TU},
     family   = {rm*,sf*},
     series   = {md*},
     size     = {normalsize,footnotesize,small,large}
   }

%    \end{macrocode}
%\changes{v2.0}{2006/12/28}{new: \texttt{smallcaps}}
%\changes{v2.3e}{2009/06/01}{\texttt{sc*} instead of \texttt{sc} in \texttt{smallcaps} set}
%\changes{v2.6}{2014/02/18}{add \texttt{si} and \texttt{scit} to \texttt{smallcaps} set
%                           (reported by \contributor uli <@\at @>)}
%                           ^^A https://tex.stackexchange.com/questions/157397
%    \begin{macrocode}
\DeclareMicrotypeSet{smallcaps}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2,TU},
     shape    = {sc*,si,scit}
   }

%    \end{macrocode}
%\changes{v2.0}{2006/12/21}{new: \texttt{footnotesize} and \texttt{scriptsize}}
%    \begin{macrocode}
\DeclareMicrotypeSet{footnotesize}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2,TU},
     size     = {-small}
   }

\DeclareMicrotypeSet{scriptsize}
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,EU1,EU2,TU},
     size     = {-footnotesize}
   }

\DeclareMicrotypeSet{normalfont}
   { font = */*/*/*/* }

%    \end{macrocode}
% The default sets.
%\changes{v2.2}{2007/04/15}{default set for tracking: \texttt{smallcaps}}
%\changes{v2.8}{2019/12/04}{default set for expansion: \texttt{alltext-nott}}
%\changes{v2.8}{2019/12/04}{default set for spacing: \texttt{alltext-nott}}
%    \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% DEFAULT SETS

\DeclareMicrotypeSetDefault[protrusion]{alltext}
\DeclareMicrotypeSetDefault[expansion] {alltext-nott}
\DeclareMicrotypeSetDefault[spacing]   {alltext-nott}
\DeclareMicrotypeSetDefault[kerning]   {alltext}
\DeclareMicrotypeSetDefault[tracking]  {smallcaps}

%    \end{macrocode}
%
%\subsection{Font variants and aliases}
%\GeneralChanges{Font aliases}
%
% These are the variants I happen to be using (expert encoding, oldstyle
% numerals, swashes, alternative, display, inferior and superior numerals):
%    \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% FONT VARIANTS AND ALIASES

\DeclareMicrotypeVariants{x,j,w,a,d,0,1}
%    \end{macrocode}
% Other candidates: |2|~(proportional digits), |e|~(engraved), |f|~(Fraktur),
% |g|~(small text), |h|~(shadow), |l|~(outline), |n|~(informal),
% |p|~(ornaments), |r|~(roman), |s|~(sans serif), |t|~(typewriter).
% I've omitted them since they seem hardly be used and/or they are actually
% more than just a variant, \ie, they shouldn't share a file.
%
%\bigskip\noindent
% Fonts that are `the same':
% The \pkg{fontspec} package will set |lmr| as the default font, whose
% declarations for <EU1>/<EU2>/<TU> encoding are in \file{mt-LatinModernRoman.cfg}.
%\changes{v2.5}{2012/08/23}{declare Latin Modern Roman (OpenType version) as alias of \texttt{lmr}
%                           when \pkg{fontspec} is loaded}
% Since 2016/12/03, the default encoding with \xetex\ and \luatex\ in the
% \LaTeX\ format is <TU>, even if \pkg{fontspec} is not loaded.
%\changes{v2.7}{2017/01/27}{declare Latin Modern Roman as alias of \texttt{lmr}
%                            with new \LaTeX\ format
%                            (reported by \contributor Ulrike Fischer <news3\at nililand.de>)}
%                            ^^A private mail, 2017/01/25
%    \begin{macrocode}

\MT@if@false
\ifx\UnicodeEncodingName\@undefined\else
  \MT@ifstreq{\encodingdefault}{\UnicodeEncodingName}\MT@if@true\relax
\fi
\ifMT@fontspec\MT@if@true\fi
\ifMT@if@
%% -- Computer/Latin Modern Roman
\DeclareMicrotypeAlias{lmr}{Latin Modern Roman}
  \else
\DeclareMicrotypeAlias{lmr}{cmr}           % lmodern
\fi
%    \end{macrocode}
% The Latin Modern fonts, the virtual fonts from the
% \pkg{ae} and \pkg{zefonts}, and the \pkg{eco} and \pkg{hfoldsty} packages
% (oldstyle numerals) all inherit the (basic) settings from Computer Modern
% Roman. Some of them are in part overwritten later.
%\changes{v1.2}{2004/10/03}{declare \texttt{cmor} as an alias of \texttt{cmr}}
%\changes{v1.3}{2004/10/22}{declare \texttt{aer}, \texttt{zer} and \texttt{hfor}
%                           as aliases of \texttt{cmr}}
% We mustn't forget the Latin Modern math fonts.
%\changes{v2.5}{2012/07/17}{declare \texttt{lmsy} and \texttt{lmm} as aliases
%                           of \texttt{cmsy} resp. \texttt{cmm}
%                           (reported by \contributor Jonas Hogstrom <hjb981\at gmail.com>)}
%                           ^^A https://tex.stackexchange.com/questions/63558/how-to-get-microtype-to-work-with-mathematical-minus-sign-and-package-lmodern
%    \begin{macrocode}
\DeclareMicrotypeAlias{lmsy}{cmsy}         %   "
\DeclareMicrotypeAlias{lmm} {cmm}          %   "
\DeclareMicrotypeAlias{aer} {cmr}          % ae
\DeclareMicrotypeAlias{zer} {cmr}          % zefonts
\DeclareMicrotypeAlias{cmor}{cmr}          % eco
\DeclareMicrotypeAlias{hfor}{cmr}          % hfoldsty
%    \end{macrocode}
% Another, new Computer Modern extension.
%\changes{v2.8}{2019/11/22}{declare New Computer Modern as an alias of Latin Modern Roman}
%    \begin{macrocode}
\DeclareMicrotypeAlias{New Computer Modern}{Latin Modern Roman}
%    \end{macrocode}
% The packages \pkg{pxfonts} and \pkg{txfonts} fonts inherit Palatino and Times
% settings respectively,
%\changes{v1.8}{2005/04/19}{declare \texttt{pxr} and \texttt{txr}
%                           as aliases of \texttt{ppl} resp. \texttt{ptm}}
% also the \TeX\ Gyre fonts Pagella and Termes (formerly: \pkg{qfonts}).
%\changes{v1.9}{2005/08/16}{declare \texttt{qpl} and \texttt{qtm} (\pkg{qfonts}, \TeX\ Gyre)
%                           as aliases of \texttt{ppl} resp. \texttt{ptm}}
%    \begin{macrocode}
%% -- Palatino
\DeclareMicrotypeAlias{pxr} {ppl}          % pxfonts
\DeclareMicrotypeAlias{qpl} {ppl}          % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino)
%    \end{macrocode}
% The `<FPL> Neu' fonts, a `re-implementation' of Palatino.
%\changes{v2.2}{2007/05/27}{declare \texttt{fp9x}, \texttt{fp9j} (<FPL> Neu) as aliases of \texttt{ppl[xj]}}
%    \begin{macrocode}
\DeclareMicrotypeAlias{fp9x}{pplx}         % FPL Neu
\DeclareMicrotypeAlias{fp9j}{pplj}         %    "
%    \end{macrocode}
% The \pkg{newpx} package, a replacement for \pkg{pxfonts}.
%\changes{v2.7}{2017/03/13}{declare aliases for \pkg{newpx}}
%    \begin{macrocode}
\DeclareMicrotypeAlias{zpllf}{pplx}        % newpxtext
\DeclareMicrotypeAlias{zplosf}{pplj}       %    "
\DeclareMicrotypeAlias{zpltlf}{pplx}       %    "
\DeclareMicrotypeAlias{zpltosf}{pplj}      %    "
%    \end{macrocode}
% The \pkg{domitian} package.
%\changes{v2.8}{2020/03/07}{declare aliases for \pkg{step} and \pkg{domitian}
%                           (notified by \contributor Daniel Benjamin Miller <dbmiller\at dbmiller.org>)}
%                           ^^A private mail, 2020/02/27
%    \begin{macrocode}
\DeclareMicrotypeAlias{Domitian-TLF} {pplx}% domitian
\DeclareMicrotypeAlias{Domitian-TOsF}{pplj}%    "
%    \end{macrocode}
% The OpenType versions:
%
%\changes{v2.5}{2012/03/29}{declare TeX Gyre Pagella, Asana Math, Palatino <LT> Std, and Palatino
%                           as aliases of Palatino Linotype (OpenType version)}
%    \begin{macrocode}
\DeclareMicrotypeAlias{Domitian}        {Palatino Linotype}
\DeclareMicrotypeAlias{TeX Gyre Pagella}{Palatino Linotype}
\DeclareMicrotypeAlias{Palatino LT Std} {Palatino Linotype}
\DeclareMicrotypeAlias{Palatino}        {Palatino Linotype}
\DeclareMicrotypeAlias{Asana Math}      {Palatino Linotype}
%% -- Times New Roman
\DeclareMicrotypeAlias{txr}{ptm}           % txfonts
%    \end{macrocode}
% The \pkg{newtx} package, a replacement for \pkg{txfonts}.
%\changes{v2.7}{2017/02/25}{declare aliases for \pkg{newtx}}
%    \begin{macrocode}
\DeclareMicrotypeAlias{ntxlf}{ptmx}        % newtxtext
\DeclareMicrotypeAlias{ntxosf}{ptmj}       %    "
\DeclareMicrotypeAlias{ntxtlf}{ptmx}       %    "
\DeclareMicrotypeAlias{ntxtosf}{ptmj}      %    "
%    \end{macrocode}
% The \pkg{tempora} package.
%\changes{v2.7}{2017/02/25}{declare aliases for \pkg{tempora}}
%    \begin{macrocode}
\DeclareMicrotypeAlias{Tempora-TLF}{ptmx}  % tempora
\DeclareMicrotypeAlias{Tempora-TOsF}{ptmj} %    "
\DeclareMicrotypeAlias{qtm}{ptm}           % TeX Gyre Termes (formerly: qfonts/QuasiTimes)
%    \end{macrocode}
% The \pkg{step} package.
%    \begin{macrocode}
\DeclareMicrotypeAlias{STEP-TLF}{ptmx}     % step
\DeclareMicrotypeAlias{STEP-TOsF}{ptmj}    %   "
%    \end{macrocode}
% The \pkg{stix} and \pkg{stix2} packages (the latter has departed a bit from being
% a Times clone, but still seems close enough).
%\changes{v2.8}{2020/05/31}{declare aliases for \pkg{stix} and \pkg{stix2} fonts}
%    \begin{macrocode}
\DeclareMicrotypeAlias{stix} {ptm}         % stix
\DeclareMicrotypeAlias{stix2}{ptm}         % stix2
%    \end{macrocode}
%\todo{check Times variants}
% More Times variants, to be checked: |pns|, |mns| (TimesNewRomanPS); |mnt|
% (Times\-NewRomanMT, TimesNRSevenMT), |mtm| (TimesSmallTextMT); |pte|
% (TimesEuropa); |ptt| (TimesTen); TimesEighteen; TimesModernEF.
%
% MicroPress's Charter version (\pkg{chmath}).
%\changes{v2.2}{2007/06/08}{declare \texttt{chr} (\pkg{chmath}) as an alias of \texttt{bch}
%                           (reported by \contributor Geoff Vallis <gkv\at Princeton.EDU>)}
%                                                            ^^A private mail, 2007/06/07
%    \begin{macrocode}
%% -- Charter
\DeclareMicrotypeAlias{chr}{bch}           % CH Math
%    \end{macrocode}
%\changes{v2.7}{2017/03/13}{declare aliases for \pkg{XCharter}}
% The \pkg{XCharter} package extends the Charter fonts.
%    \begin{macrocode}
\DeclareMicrotypeAlias{XCharter-TLF} {bch} % XCharter
\DeclareMicrotypeAlias{XCharter-TOsF}{bch} %    "
%    \end{macrocode}
% The \pkg{mathdesign} package provides math fonts matching Bitstream Charter
%\changes{v1.9a}{2005/10/31}{declare \texttt{mdbch} (\pkg{mathdesign})
%                            as an alias of \texttt{bch}}
% and <URW> Garamond.
%    \begin{macrocode}
\DeclareMicrotypeAlias{mdbch}{bch}         % mathdesign/Charter
%% -- Garamond
\DeclareMicrotypeAlias{mdugm}{ugm}         % mathdesign/URW Garamond
%    \end{macrocode}
% The \pkg{garamondx} package, an extension of <URW> Garamond, providing
% small caps and oldstyle figures.
%\changes{v2.5}{2013/02/20}{declare \texttt{zgmx} etc. (\pkg{garamondx})
%                           as aliases of \texttt{ugm}}
%    \begin{macrocode}
\DeclareMicrotypeAlias{zgmx}{ugm}          % garamondx
\DeclareMicrotypeAlias{zgmj}{ugm}          %    "
\DeclareMicrotypeAlias{zgmI}{ugm}          %    "
\DeclareMicrotypeAlias{zgmq}{ugm}          %    "
%% --
%    \end{macrocode}
% <URW> Letter Gothic is similar enough to Bitstream Letter Gothic to share the
% configuration.
%    \begin{macrocode}
\DeclareMicrotypeAlias{ulg}{blg}           % URW LetterGothic -> Bitstream LetterGothic12Pitch
%    \end{macrocode}
% The \pkg{eulervm} package virtually extends the Euler fonts.
%\changes{v1.9e}{2006/07/28}{declare \texttt{zeur} and \texttt{zeus} (\pkg{eulervm})
%                            as aliases of \texttt{eur} resp. \texttt{eus} (\pkg{euler})}
%    \begin{macrocode}
\DeclareMicrotypeAlias{zeur}{eur}          % Euler VM
\DeclareMicrotypeAlias{zeus}{eus}          %    "
%    \end{macrocode}
% Euro symbol fonts, to save some files.
%    \begin{macrocode}
\DeclareMicrotypeAlias{zpeus}   {zpeu}     % Adobe Euro sans -> serif
\DeclareMicrotypeAlias{eurosans}{zpeu}     % Adobe Euro sans -> serif
\DeclareMicrotypeAlias{euroitcs}{euroitc}  % ITC Euro sans -> serif

%    \end{macrocode}
%
%\subsection{Interaction with \pkg{babel}}
%
% Contexts that are to be set when switching to a language.
%    \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% INTERACTION WITH THE `babel' PACKAGE

\DeclareMicrotypeBabelHook
   {english,UKenglish,british,USenglish,american}
   {kerning=, spacing=nonfrench}

\DeclareMicrotypeBabelHook
   {french,francais,acadian,canadien}
   {kerning=french, spacing=}

\DeclareMicrotypeBabelHook
   {turkish}
   {kerning=turkish, spacing=}

%    \end{macrocode}
%\GeneralChanges*
%
% \subsection{Note on admissible characters}
%
% All printable <ASCII> characters are allowed in the settings, with the
% following exceptions (on the left hand side, the replacements on the right):
%
%\begin{tabbing}
%  |\|\quad\=:\quad\=\cmd\textbackslash   \\
%  |{|     \>:\>     \cmd\textbraceleft   \\
%  |}|     \>:\>     \cmd\textbraceright  \\
%  |^|     \>:\>     \cmd\textasciicircum \\
%  |%|     \>:\>     \cmd\%               \\
%  |#|     \>:\>     \cmd\#
%\end{tabbing}
%
%\noindent
% Comma and equal sign must be guarded with braces (`|{,}|', `|{=}|') to keep
% \pkg{keyval} happy.
%
% Character commands are allowed as far as they have been defined in the proper
% \LaTeX\ way, that is, when they have been assigned a slot in the font
% encoding with \cmd\DeclareTextSymbol\ or \cmd\DeclareTextComposite.
% Characters defined via \cmd\chardef\ are also possible.
%
% Ligatures and \cmd\mathchardef'ed symbols have to be specified numerically.
% Of course, numerical identification is possible in any other case, too.
%
%\changes{v1.1}{2004/09/14}{remove 8-bit characters from the configuration files
%               (suggested by \contributor Harald Harders <h.harders\at tu-bs.de>)}
%                                                    ^^A private mail, 2004/09/13
% 8-bit characters are also admissible, provided they have been declared in the
% input encoding file. They should, however, only be used in private
% configuration files, where the proper input encoding is guaranteed, or else in
% combination with the `|inputenc|' key.
%
% With \xetex\ or \luatex, in contrast, it is advisable to use the proper
% Unicode characters, or the font-specific glyph names prefixed with `|/|'
% (cf. section \ref{sec:OpenType}).
%
%\subsection{Character inheritance}
%\GeneralChanges{Inheritance}
%
% First the lists of inheriting characters. We only declare those characters
% that are the same on \emph{both} sides, \ie, not \OE\ for O.
%    \begin{macrocode}
%</m-t>
%<*m-t|zpeu|mvs>
%%% -----------------------------------------------------------------------
%%% CHARACTER INHERITANCE

%</m-t|zpeu|mvs>
%<*m-t>
%    \end{macrocode}
%
%\subsubsection{<OT1>}
% Glyphs that should possibly inherit settings on one side only:
% |012|~(`fi' ligature), |013|~(`fl'), |014|~(`ffi'), |015|~(`ffl'),
% \AE, \ae, \OE, \oe.
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = OT1 }
   { f = {011}, % ff
     i = {\i},
     j = {\j},
     O = {\O},
     o = {\o}
   }

%    \end{macrocode}
%
%\subsubsection{<T1>}
% Candidates here: |028|~(`fi'), |029|~(`fl'), |030|~(`ffi'), |031|~(`ffl'),
% |156| (`\IJ'~ligature, since \LaTeX\ 2005/12/01 accessible as |\IJ|),
% |188|~(`\ij', |\ij|), \AE, \ae, \OE, \oe.
%\changes{v1.5}{2004/12/11}{remove \cmd\ss\ from <T1> list, add \cmd\DJ}
%\changes{v1.8}{2005/04/26}{remove \cmd\DJ\ from <T1> list (it's the same as \cmd\DH)}
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = T1 }
   { A = {\`A,\'A,\^A,\~A,\"A,\r A,\k A,\u A},
     a = {\`a,\'a,\^a,\~a,\"a,\r a,\k a,\u a},
     C = {\'C,\c C,\v C},
     c = {\'c,\c c,\v c},
     D = {\v D,\DH},
     d = {\v d,\dj},
     E = {\`E,\'E,\^E,\"E,\k E,\v E},
     e = {\`e,\'e,\^e,\"e,\k e,\v e},
     f = {027}, % ff
     G = {\u G},
     g = {\u g},
     I = {\`I,\'I,\^I,\"I,\.I},
     i = {\`i,\'i,\^i,\"i,\i},
     j = {\j},
     L = {\L,\'L,\v L},
     l = {\l,\'l,\v l},
     N = {\'N,\~N,\v N},
     n = {\'n,\~n,\v n},
     O = {\O,\`O,\'O,\^O,\~O,\"O,\H O},
     o = {\o,\`o,\'o,\^o,\~o,\"o,\H o},
     R = {\'R,\v R},
     r = {\'r,\v r},
     S = {\'S,\c S,\v S,\SS},
     s = {\'s,\c s,\v s},
     T = {\c T,\v T},
     t = {\c t,\v t},
     U = {\`U,\'U,\^U,\"U,\H U,\r U},
     u = {\`u,\'u,\^u,\"u,\H u,\r u},
     Y = {\'Y,\"Y},
     y = {\'y,\"y},
     Z = {\'Z,\.Z,\v Z},
     z = {\'z,\.z,\v z}
%    \end{macrocode}
%\changes{v2.2}{2007/02/04}{remove `\texttt{-}' $\rightarrow$ `\texttt{127}'}
% The `soft hyphen' often has reduced right side bearing so that it may already
% be protruded, hence no inheritance.
%    \begin{macrocode}
%    - = {127},
   }

%    \end{macrocode}
%
%\subsubsection{<LY1>}
% More characters: |008|~(`fl'), |012|~(`fi'), |014|~(`ffi'), |015|~(`ffl'),
% \AE, \ae, \OE, \oe.
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = LY1 }
   { A = {\`A,\'A,\^A,\~A,\"A,\r A},
     a = {\`a,\'a,\^a,\~a,\"a,\r a},
     C = {\c C},
     c = {\c c},
     D = {\DH},
     E = {\`E,\'E,\^E,\"E},
     e = {\`e,\'e,\^e,\"e},
     f = {011}, % ff
     I = {\`I,\'I,\^I,\"I},
     i = {\`i,\'i,\^i,\"i,\i},
     L = {\L},
     l = {\l},
     N = {\~N},
     n = {\~n},
     O = {\`O,\'O,\^O,\~O,\"O,\O},
     o = {\`o,\'o,\^o,\~o,\"o,\o},
     S = {\v S},
     s = {\v s},
     U = {\`U,\'U,\^U,\"U},
     u = {\`u,\'u,\^u,\"u},
     Y = {\'Y,\"Y},
     y = {\'y,\"y},
     Z = {\v Z},
     z = {\v z}
   }

%    \end{macrocode}
%
%\subsubsection{<OT4>}
%\changes{v1.9}{2005/08/16}{add list for <OT4>}
%\changes{v2.7b}{2019/02/28}{add textquotedblleft ligature to <OT4>
%                (reported by \contributor Franz Wexler <@\at @>)}
%                ^^A https://tex.stackexchange.com/questions/476648/
% The Polish <OT1> extension. More interesting characters here:
% |009|~(`fk'), |012|~(`fi'), |013|~(`fl'), |014|~(`ffi'), |015|~(`ffl'),
% \AE, \ae, \OE, \oe.
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = OT4 }
   { A = {\k A},
     a = {\k a},
     C = {\'C},
     c = {\'c},
     E = {\k E},
     e = {\k e},
     f = {011}, % ff
     i = {\i},
     j = {\j},
     L = {\L},
     l = {\l},
     N = {\'N},
     n = {\'n},
     O = {\O,\'O},
     o = {\o,\'o},
     S = {\'S},
     s = {\'s},
     Z = {\'Z,\.Z},
     z = {\'z,\.z},
     \textquotedblleft = "FF
   }

%    \end{macrocode}
%
%\subsubsection{<QX>}
%\changes{v1.9d}{2006/04/20}{add list for <QX> encoding (contributed by
%                            \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>)}
%                                                     ^^A private mail, 2006/04/19
% The Central European <QX> encoding.\footnote{
%   Contributed by \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>.}
% Ligatures: |009|~(`fk'), |012|~(`fi'), |013|~(`fl'), |014|~(`ffi'),
% |015|~(`ffl'), \AE, \ae, \OE, \oe.
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = QX }
   { A = {\`A,\'A,\^A,\~A,\"A,\k A,\AA},
     a = {\`a,\'a,\^a,\~a,\"a,\k a,\aa},
     C = {\'C,\c C},
     c = {\'c,\c c},
     D = {\DH},
     E = {\`E,\'E,\^E,\"E,\k E},
     e = {\`e,\'e,\^e,\"e,\k e},
     f = {011}, % ff
     I = {\`I,\'I,\^I,\"I,\k I},
     i = {\`i,\'i,\^i,\"i,\k i,\i},
     j = {\j},
     L = {\L},
     l = {\l},
     N = {\'N,\~N},
     n = {\'n,\~n},
     O = {\O,\`O,\'O,\^O,\~O,\"O},
     o = {\o,\`o,\'o,\^o,\~o,\"o},
%    \end{macrocode}
%\changes{v2.3c}{2008/09/01}{add \cmd\textcommabelow[\texttt{STst}] to <QX> encoding
%                            (reported by \contributor Vasile Gaburici <vgaburici\at gmail.com>)}
%                                          ^^A private mail, 2008/09/01, and
%                                          ^^A http://tug.org/pipermail/tex-live/2008-September/017385.html
% The Romanian \cmd\textcommabelow\ accents are actually replacements for the
% \cmd\c\ variants, which had previously (and erroneously\footnote{
%   Cf. \url{http://tug.org/pipermail/tex-live/2008-August/017204.html}})
% been included in <QX> encoding. They are still kept for backwards
% compatibility.
%\iffalse
% If \cmd\textcommabelow\ is undefined, it will be silently ignored.
% This is due to a quirk in \cs{\MT@map@clist@}.
%\todo{fix \cs{\MT@map@clist@}?}
%\fi
%    \begin{macrocode}
     S = {\'S,\c S,\textcommabelow S,\v S},
     s = {\'s,\c s,\textcommabelow s,\v s},
     T = {\c T,\textcommabelow T},
     t = {\c t,\textcommabelow t},
     U = {\`U,\'U,\^U,\"U,\k U},
     u = {\`u,\'u,\^u,\"u,\k u},
     Y = {\'Y,\"Y},
     y = {\'y,\"y},
     Z = {\'Z,\.Z,\v Z},
     z = {\'z,\.z,\v z},
     . = \textellipsis
   }

%    \end{macrocode}
%
%\subsubsection{<T5>}
%\changes{v1.9}{2005/08/17}{add list for <T5> (requested by
%                           \contributor H\`an \thanhthe{} Th\`anh <hanthethanh\at gmail.com>)}
%                                                ^^A private email, 2005/08/16
% The Vietnamese encoding <T5>. It is so crowded with accented and double-accented
% characters that there is no room for any ligatures.
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = T5 }
   { A = {\`A,\'A,\~A,\h A,\d A,\^A,\u A,
          \`\Acircumflex,\'\Acircumflex,\~\Acircumflex,\h\Acircumflex,\d\Acircumflex,
          \`\Abreve,\'\Abreve,\~\Abreve,\h\Abreve,\d\Abreve},
     a = {\`a,\'a,\~a,\h a,\d a,\^a,\u a,
          \`\acircumflex,\'\acircumflex,\~\acircumflex,\h\acircumflex,\d\acircumflex,
          \`\abreve,\'\abreve,\~\abreve,\h\abreve,\d\abreve},
     D = {\DJ},
     d = {\dj},
     E = {\`E,\'E,\~E,\h E,\d E,\^E,
          \`\Ecircumflex,\'\Ecircumflex,\~\Ecircumflex,\h\Ecircumflex,\d\Ecircumflex},
     e = {\`e,\'e,\~e,\h e,\d e,\^e,
          \`\ecircumflex,\'\ecircumflex,\~\ecircumflex,\h\ecircumflex,\d\ecircumflex},
     I = {\`I,\'I,\~I,\h I,\d I},
     i = {\`i,\'i,\~i,\h i,\d i,\i},
     O = {\`O,\'O,\~O,\h O,\d O,\^O,\horn O,
          \`\Ocircumflex,\'\Ocircumflex,\~\Ocircumflex,\h\Ocircumflex,\d\Ocircumflex,
          \`\Ohorn,\'\Ohorn,\~\Ohorn,\h\Ohorn,\d\Ohorn},
     o = {\`o,\'o,\~o,\h o,\d o,\^o,\horn o,
          \`\ocircumflex,\'\ocircumflex,\~\ocircumflex,\h\ocircumflex,\d\ocircumflex,
          \`\ohorn,\'\ohorn,\~\ohorn,\h\ohorn,\d\ohorn},
     U = {\`U,\'U,\~U,\h U,\d U,\horn U,
          \`\Uhorn,\'\Uhorn,\~\Uhorn,\h\Uhorn,\d\Uhorn},
     u = {\`u,\'u,\~u,\h u,\d u,\horn u,
          \`\uhorn,\'\uhorn,\~\uhorn,\h\uhorn,\d\uhorn},
     Y = {\`Y,\'Y,\~Y,\h Y,\d Y},
     y = {\`y,\'y,\~y,\h y,\d y}
   }

%    \end{macrocode}
%\subsubsection{<EU1>, <EU2>, <TU>}
%\changes{v2.5}{2010/11/05}{add rudimentary list for <EU1> and <EU2>} ^^A (beta:03)
%\changes{v2.6}{2016/04/22}{add <TU> encoding}
% The <EU1> (\xetex), <EU2> (\luatex), and, since \pkg{fontspec} version 2.5,
% <TU> encodings are not well-defined in the sense that they don't
% contain a fixed number of glyphs, all of which must be present.
% OpenType fonts may contain thousands of glyphs, but we only define those
% that should be present in every font (basically <T1>). This inheritance list
% should be overridden by font-specific ones.
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = {EU1,EU2,TU} }
   { A = {\`A,\'A,\^A,\~A,\"A,\r A,\k A,\u A},
     a = {\`a,\'a,\^a,\~a,\"a,\r a,\k a,\u a},
     C = {\'C,\c C,\v C},
     c = {\'c,\c c,\v c},
     D = {\v D,\DH},
     d = {\v d,\dj},
     E = {\`E,\'E,\^E,\"E,\k E,\v E},
     e = {\`e,\'e,\^e,\"e,\k e,\v e},
%     f = {/f_f}, % sometimes /f_f, sometimes /ff
     G = {\u G},
     g = {\u g},
     I = {\`I,\'I,\^I,\"I,\.I},
     i = {\`i,\'i,\^i,\"i,\i},
%     j = {\j},
     L = {\L,\'L,\v L},
     l = {\l,\'l,\v l},
     N = {\'N,\~N,\v N},
     n = {\'n,\~n,\v n},
     O = {\O,\`O,\'O,\^O,\~O,\"O,\H O},
     o = {\o,\`o,\'o,\^o,\~o,\"o,\H o},
     R = {\'R,\v R},
     r = {\'r,\v r},
     S = {\'S,\c S,\v S}, % \SS
     s = {\'s,\c s,\v s},
     T = {\c T,\v T},
     t = {\c t,\v t},
     U = {\`U,\'U,\^U,\"U,\H U,\r U},
     u = {\`u,\'u,\^u,\"u,\H u,\r u},
     Y = {\'Y,\"Y},
     y = {\'y,\"y},
     Z = {\'Z,\.Z,\v Z},
     z = {\'z,\.z,\v z}
   }

%</m-t>
%    \end{macrocode}
%
%\subsubsection{Euro symbols}
% Make Euro symbols settings simpler.
%    \begin{macrocode}
%<*zpeu>
\DeclareCharacterInheritance
   { encoding = U,
     family   = {zpeu,zpeus,eurosans} }
   { E = 128 }

%</zpeu>
%<*mvs>
%    \end{macrocode}
% Since 2006/05/11 (that is, one week after I've added these settings, after the
% package had been dormant for six years!), \pkg{marvosym}'s encoding is
% (correctly) <U> instead of <OT1>.
%\changes{v1.9e}{2006/07/05}{adapt to \pkg{marvosym}'s changed encoding}
%    \begin{macrocode}
\DeclareCharacterInheritance
   { encoding = {OT1,U},
     family   = mvs }
   { 164 = {099,100,101} } % \EURhv,\EURcr,\EURtm

%</mvs>
%    \end{macrocode}
%
%\subsection{Tracking}
%\GeneralChanges{Tracking}
%
%\changes{v2.2}{2007/02/23}{add ligatures that are to be disabled}
%\changes{v2.5}{2011/09/07}{add <EU2> encoding to default list} ^^A (beta:09)
%\changes{v2.6}{2016/04/22}{add <TU> encoding to default list}
% By default, we only disable the `f*' ligatures, for those fonts that have
% any. Thus, ligatures and especially kerning for all other characters will be
% retained.
%    \begin{macrocode}
%<*m-t>
%%% -----------------------------------------------------------------------
%%% TRACKING/LETTERSPACING

\SetTracking
  [ name         = default,
    no ligatures = {f} ]
  { encoding     = {OT1,T1,T2A,LY1,OT4,QX,EU2,TU} }
  { }

%    \end{macrocode}
%
%\subsection{Font expansion}
%\GeneralChanges{Expansion}
%
% These are \thanh's original expansion settings. They are used for all fonts
% (until somebody shows mercy and creates font-specific settings).
%    \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% EXPANSION

\SetExpansion
   [ name     = default      ]
   { encoding = {OT1,OT4,QX,T1,LY1} }
   {
     A = 500,     a = 700,
   \AE = 500,   \ae = 700,
     B = 700,     b = 700,
     C = 700,     c = 700,
     D = 500,     d = 700,
     E = 700,     e = 700,
     F = 700,
     G = 500,     g = 700,
     H = 700,     h = 700,
     K = 700,     k = 700,
     M = 700,     m = 700,
     N = 700,     n = 700,
     O = 500,     o = 700,
   \OE = 500,   \oe = 700,
     P = 700,     p = 700,
     Q = 500,     q = 700,
     R = 700,
     S = 700,     s = 700,
     U = 700,     u = 700,
     W = 700,     w = 700,
     Z = 700,     z = 700,
     2 = 700,
     3 = 700,
     6 = 700,
     8 = 700,
     9 = 700
   }

%    \end{macrocode}
% Settings for Cyrillic <T2A> encoding.\footnote{Contributed by
%                                           \contributor Karl Karlsson <karl-karlsson\at yandex.ru>.}
%\changes{v2.3e}{2009/10/28}{settings for <T2A> encoding
%                            (contributed by \contributor Karl Karlsson <karl-karlsson\at yandex.ru>)}
%    \begin{macrocode}
\SetExpansion
   [ name     = T2A ]
   { encoding = T2A }
   {
     A = 500,     a = 700,
     B = 700,     b = 700,
     C = 700,     c = 700,
     D = 500,     d = 700,
     E = 700,     e = 700,
     F = 700,
     G = 500,     g = 700,
     H = 700,     h = 700,
     K = 700,     k = 700,
     M = 700,     m = 700,
     N = 700,     n = 700,
     O = 500,     o = 700,
     P = 700,     p = 700,
     Q = 500,     q = 700,
     R = 700,
     S = 700,     s = 700,
     U = 700,     u = 700,
     W = 700,     w = 700,
     Z = 700,     z = 700,
     2 = 700,
     3 = 700,
     6 = 700,
     8 = 700,
     9 = 700,
     \CYRA = 500,     \cyra = 700,
     \CYRB = 700,     \cyrb = 700,
     \CYRV = 700,     \cyrv = 700,
     \CYRG = 700,     \cyrg = 700,
     \CYRD = 700,     \cyrd = 700,
     \CYRE = 700,     \cyre = 700,
     \CYRZH = 700,    \cyrzh = 700,
     \CYRZ = 700,     \cyrz = 700,
     \CYRI = 700,     \cyri = 700,
     \CYRISHRT = 700, \cyrishrt = 700,
     \CYRK = 700,     \cyrk = 700,
     \CYRL = 700,     \cyrl = 700,
     \CYRM = 700,     \cyrm = 700,
     \CYRN = 700,     \cyrn = 700,
     \CYRO = 500,     \cyro = 700,
     \CYRP = 700,     \cyrp = 700,
     \CYRR = 700,     \cyrr = 700,
     \CYRS = 700,     \cyrs = 700,
     \CYRT = 700,     \cyrt = 700,
     \CYRU = 700,     \cyru = 700,
     \CYRF = 700,     \cyrf = 700,
     \CYRH = 700,     \cyrh = 700,
     \CYRC = 700,     \cyrc = 700,
     \CYRCH = 700,    \cyrch = 700,
     \CYRSH = 700,    \cyrsh = 700,
     \CYRSHCH = 700,  \cyrshch = 700,
     \CYRHRDSN = 700, \cyrhrdsn = 700,
     \CYRERY = 700,   \cyrery = 700,
     \CYRSFTSN = 700, \cyrsftsn = 700,
     \CYREREV = 700,  \cyrerev = 700,
     \CYRYU = 700,    \cyryu = 700,
     \CYRYA = 700,    \cyrya = 700
   }

%    \end{macrocode}
% <T5> encoding does not contain \cmd\AE, \cmd\ae, \cmd\OE\ and \cmd\oe.
%    \begin{macrocode}
\SetExpansion
   [ name     = T5 ]
   { encoding = T5 }
   {
     A = 500,     a = 700,
     B = 700,     b = 700,
     C = 700,     c = 700,
     D = 500,     d = 700,
     E = 700,     e = 700,
     F = 700,
     G = 500,     g = 700,
     H = 700,     h = 700,
     K = 700,     k = 700,
     M = 700,     m = 700,
     N = 700,     n = 700,
     O = 500,     o = 700,
     P = 700,     p = 700,
     Q = 500,     q = 700,
     R = 700,
     S = 700,     s = 700,
     U = 700,     u = 700,
     W = 700,     w = 700,
     Z = 700,     z = 700,
     2 = 700,
     3 = 700,
     6 = 700,
     8 = 700,
     9 = 700
   }

%</m-t>
%    \end{macrocode}
%
%\subsection{Character protrusion}
%\GeneralChanges{Protrusion}
%
%\changes{v1.1}{2004/09/14}{add factors for some more characters}
%\changes{v1.4b}{2004/11/19}{harmonise dashes in upshape and italic
%                            (\texttt{cmr}, \texttt{pad}, \texttt{ppl})}
%\changes{v1.9}{2005/08/16}{settings for <OT4> encoding (Computer Modern Roman,
%                           Palatino, Times)}
%\changes{v1.9}{2005/08/17}{settings for <T5> encoded Computer Modern Roman}
%\changes{v1.9a}{2005/12/02}{settings for <T5> encoded Charter}
%
%    \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% PROTRUSION

%    \end{macrocode}
% For future historians, \thanh's original settings (from \file{protcode.tex},
% converted to \microtype\ notation).
%\begin{verbatim}
%\SetProtrusion
%   [ name     = thanh ]
%   { encoding = OT1 }
%   {
%     A = {50,50},
%     F = {  ,50},
%     J = {50,  },
%     K = {  ,50},
%     L = {  ,50},
%     T = {50,50},
%     V = {50,50},
%     W = {50,50},
%     X = {50,50},
%     Y = {50,50},
%     k = {  ,50},
%     r = {  ,50},
%     t = {  ,50},
%     v = {50,50},
%     w = {50,50},
%     x = {50,50},
%     y = {50,50},
%     . = { ,700},    {,}= { ,700},
%     : = { ,500},     ; = { ,500},
%     ! = { ,200},     ? = { ,200},
%     ( = {50,  },     ) = {  ,50},
%     - = { ,700},
%     \textendash        = { ,300},     \textemdash        = { ,200},
%     \textquoteleft     = {700, },     \textquoteright    = { ,700},
%     \textquotedblleft  = {500, },     \textquotedblright = { ,500}
%   }
%\end{verbatim}
%
%\subsubsection{Normal}
%
% The default settings always use the most moderate value.
%
%    \begin{macrocode}
%<*cfg-t>
\SetProtrusion
%<m-t>   [ name     = default ]
%    \end{macrocode}
% We also create configuration files for the fonts
%\begin{itemize}
%  \item Bitstream Charter (<NFSS> code |bch|)
%\changes{v1.5}{2004/11/28}{settings for Bitstream Charter}
%    \begin{macrocode}
%<bch>   [ name     = bch-default ]
%    \end{macrocode}
%  \item Bitstream Letter Gothic (|blg|)
%\changes{v2.2}{2007/03/03}{settings for Bitstream Letter Gothic}
%    \begin{macrocode}
%<blg>   [ name     = blg-default ]
%    \end{macrocode}
%  \item Computer Modern Roman (|cmr|)
%    \begin{macrocode}
%<cmr>   [ name     = cmr-default ]
%    \end{macrocode}
%  \item Adobe Garamond (|pad|, |padx|, |padj|)
%    \begin{macrocode}
%<pad>   [ name     = pad-default ]
%    \end{macrocode}
%  \item Minion\footnote{Contributed by \contributor Harald Harders <h.harders\at tu-bs.de>
%                        and \contributor Karl Karlsson <karl-karlsson\at yandex.ru>.}
%        (|pmnx|, |pmnj|)
%\changes{v1.1}{2004/09/14}{settings for Adobe Minion (contributed by
%                           \contributor Harald Harders <h.harders\at tu-bs.de>)}
%                                                  ^^A private mail, 2004/09/14
%    \begin{macrocode}
%<pmn>   [ name     = pmnj-default ]
%    \end{macrocode}
%  \item Palatino (|ppl|, |pplx|, |pplj|)
%    \begin{macrocode}
%<ppl>   [ name     = ppl-default ]
%    \end{macrocode}
%  \item Times (|ptm|, |ptmx|, |ptmj|)
%    \begin{macrocode}
%<ptm>   [ name     = ptm-default ]
%    \end{macrocode}
%  \item <URW> Garamond (|ugm|)
%\changes{v1.9c}{2006/01/26}{settings for <URW> Garamond}
%\end{itemize}
%    \begin{macrocode}
%<ugm>   [ name     = ugm-default ]
%<m-t|cmr|pmn>   { }
%<bch|blg|pad|ugm>   { encoding = OT1,
%<ppl|ptm>   { encoding = {OT1,OT4},
%<bch>     family   = bch }
%<blg>     family   = blg }
%<pad>     family   = {pad,padx,padj} }
%<ppl>     family   = {ppl,pplx,pplj} }
%<ptm>     family   = {ptm,ptmx,ptmj} }
%<ugm>     family   = ugm }
   {
%<m-t|bch|blg|cmr|pad|pmn|ppl|ptm>     A = {50,50},
%<ugm>     A = {50,100},
%<pad|ptm>   \AE = {50,  },
%<ugm>   \AE = {150,50},
%<ugm>     B = {  ,50},
%<bch|pad|pmn|ugm>     C = {50,  },
%<bch|pad|pmn>     D = {  ,50},
%<ugm>     D = {  ,70},
%<ugm>     E = {  ,50},
%<m-t|bch|cmr|pad|pmn|ptm>     F = {  ,50},
%<ugm>     F = {  ,70},
%<bch|pad|pmn>     G = {50,  },
%<ugm>     G = {50,50},
%<blg>     I = {150,150},
%<m-t|cmr|pad|pmn|ppl|ptm|ugm>     J = {50,  },
%<bch|blg>     J = {100,  },
%<!blg>     K = {  ,50},
%<blg>     K = {50,  },
%<m-t|bch|cmr|pad|pmn|ppl>     L = {  ,50},
%<blg>     L = {  ,150},
%<ptm>     L = {  ,80},
%<ugm>     L = {  ,120},
%<bch|pad|pmn|ugm>     O = {50,50},
%<pad>   \OE = {50,  },
%<ugm>   \OE = {50,50},
%<blg>     P = {  ,100},
%<ugm>     P = {  ,50},
%<bch|pad|pmn>     Q = {50,70},
%<ugm>     Q = {50,50},
%<bch>     R = {  ,50},
%<ugm>     R = {  ,70},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     T = {50,50},
%<blg>     T = {100,100},
%<ugm>     T = {70,70},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     V = {50,50},
%<blg|ugm>     V = {70,70},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     W = {50,50},
%<ugm>     W = {70,70},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     X = {50,50},
%<ugm>     X = {50,70},
%<m-t|bch|cmr|pad|pmn|ppl>     Y = {50,50},
%<blg|ptm|ugm>     Y = {80,80},
%<ugm>     Z = {50,50},
%<blg>     f = {150,100},
%<blg>     i = {150,150},
%<blg>     j = {100,100},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     k = {  ,50},
%<ugm>     k = {  ,70},
%<blg>     l = {150,150},
%<pmn>     l = {  ,-50},
%<pad|ppl>     p = {50,50},
%<ugm>     p = {  ,50},
%<pad|ppl>     q = {50,  },
%<!blg>     r = {  ,50},
%<blg>     r = {100, 80},
%<cmr|pad|pmn>     t = {  ,70},
%<bch>     t = {  ,50},
%<blg>     t = {150, 80},
%<ugm>     t = {  ,100},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     v = {50,50},
%<blg>     v = {100,100},
%<ugm>     v = {50,70},
%<m-t|bch|cmr|pad|pmn|ppl|ptm>     w = {50,50},
%<ugm>     w = {50,70},
%<!blg>     x = {50,50},
%<blg>     x = {100,100},
%<m-t|bch|pad|pmn>     y = {  ,50},
%<blg>     y = { 50,100},
%<cmr|ppl|ptm>     y = {50,70},
%<ugm>     y = {  ,70},
%    \end{macrocode}
%\changes{v1.6}{2005/01/11}{improve settings for numbers
%               (pointed out by \contributor Peter Muthesius <newsname\at gmx.de>)}
%                                       ^^A MID: <34b1h7F48s44tU1@individual.net>
%    \begin{macrocode}
%<cmr>     0 = {  ,50},
%<m-t>     1 = {50,50},
%<bch|blg|pad|ptm|ugm>     1 = {150,150},
%<cmr>     1 = {100,200},
%<pmn>     1 = {  ,50},
%<ppl>     1 = {100,100},
%<bch|cmr|pad|ugm>     2 = {50,50},
%<blg>     2 = {  ,100},
%<bch|pmn>     3 = {50,  },
%<cmr|pad|ugm>     3 = {50,50},
%<blg>     3 = {100,  },
%<m-t|pad>     4 = {50,50},
%<bch>     4 = {100,50},
%<blg>     4 = {100,  },
%<cmr|ugm>     4 = {70,70},
%<pmn>     4 = {50,  },
%<ptm>     4 = {70,  },
%<cmr>     5 = {  ,50},
%<pad>     5 = {50,50},
%<bch>     6 = {50,  },
%<cmr>     6 = {  ,50},
%<pad>     6 = {50,50},
%<m-t>     7 = {50,50},
%<bch|pad|pmn|ugm>     7 = {50,80},
%<blg>     7 = {100,100},
%<cmr|ptm>     7 = {50,100},
%<ppl>     7 = {  ,50},
%<cmr>     8 = {  ,50},
%<bch|pad>     9 = {50,50},
%<cmr>     9 = {  ,50},
%<m-t|cmr|pad|pmn|ppl|ptm|ugm>     . = { ,700},
%<bch>     . = { ,600},
%<blg>     . = {400,500},
%<!blg>    {,}= { ,500},
%<blg>    {,}= {300,400},
%<m-t|cmr|pad|pmn|ppl|ptm|ugm>     : = { ,500},
%<bch>     : = { ,400},
%<blg>     : = {300,400},
%<m-t|bch|pad|pmn|ptm>     ; = { ,300},
%<blg>     ; = {200,300},
%<cmr|ppl>     ; = { ,500},
%<ugm>     ; = { ,400},
%<!blg>     ! = { ,100},
%<blg>     ! = {200,200},
%<m-t|pad|pmn|ptm>     ? = { ,100},
%<bch|cmr|ppl|ugm>     ? = { ,200},
%<blg>     ? = {150,150},
%<pmn>     " = {300,300},
%<m-t|bch|cmr|pad|pmn|ppl>     @ = {50,50},
%<ptm>     @ = {100,100},
%<m-t|bch|blg|cmr|pad|pmn|ppl|ptm>     ~ = {200,250},
%<ugm>     ~ = {300,350},
%<pad|ppl|ptm>     & = {50,100},
%<ugm>     & = {  ,100},
%<m-t|cmr|pad|pmn>    \% = {50,50},
%<bch>    \% = {  ,50},
%<ppl|ptm>    \% = {100,100},
%<ugm>    \% = {50,100},
%<blg>    \# = {100,100},
%<m-t|ppl|ptm|ugm>     * = {200,200},
%<bch|pmn>     * = {200,300},
%<blg>     * = {150,200},
%<cmr|pad>     * = {300,300},
%<m-t|cmr|ppl|ptm>     + = {250,250},
%<bch>     + = {150,250},
%<pad>     + = {300,300},
%<blg|pmn>     + = {150,200},
%<ugm>     + = {250,300},
%<blg|ugm>    {=}= {200,200},
%<m-t|pad|pmn|ptm>     ( = {100,   },    ) = {   ,200},
%<bch|ugm>     ( = {200,   },    ) = {   ,200},
%<cmr|blg>     ( = {300,   },    ) = {   ,300},
%<ppl>     ( = {100,   },    ) = {   ,300},
%<bch|pmn>     [ = {100,   },    ] = {   ,100},
%<blg>     [ = {300,100},    ] = {   ,300},
%    \end{macrocode}
%\changes{v1.7}{2005/03/15}{fix: remove \textbackslash\ from <OT1>,
%                           add \cmd\textbackslash\ to <T1> encoding}
%    \begin{macrocode}
%<m-t|pad|pmn|ptm>     / = {100,200},
%<bch>     / = { ,200},
%<blg>     / = {300,300},
%<cmr|ppl>     / = {200,300},
%<ugm>     / = {100,300},
%<m-t|ptm>     - = {500,500},
%<bch|cmr|ppl>     - = {400,500},
%<blg>     - = {300,400},
%<pad>     - = {300,500},
%<pmn>     - = {200,400},
%<ugm>     - = {500,600},
%<blg>     < = {200,100},    > = {100,200},
%<blg>     _ = {150,250},
%<blg>     | = {250,250},
%<m-t|pmn>     \textendash       = {200,200},   \textemdash        = {150,150},
%<bch>     \textendash       = {200,300},   \textemdash        = {150,250},
%<cmr>     \textendash       = {400,300},   \textemdash        = {300,200},
%<pad|ppl|ptm>     \textendash       = {300,300},   \textemdash        = {200,200},
%<ugm>     \textendash       = {250,300},   \textemdash        = {250,250},
%    \end{macrocode}
% Why settings for left \emph{and} right quotes? Because in some languages they
% might be used like that (see the \pkg{csquotes} package for examples).
%    \begin{macrocode}
%<m-t|bch|pmn>     \textquoteleft    = {300,400},   \textquoteright    = {300,400},
%<blg>     \textquoteleft     = {400,600},   \textquoteright    = {400,600},
%<cmr>     \textquoteleft    = {500,700},   \textquoteright    = {500,600},
%<pad|ppl>     \textquoteleft    = {500,700},   \textquoteright    = {500,700},
%<ptm>     \textquoteleft    = {500,500},   \textquoteright    = {300,500},
%<ugm>     \textquoteleft    = {300,600},   \textquoteright    = {300,600},
%<m-t|bch|pmn>     \textquotedblleft = {300,300},   \textquotedblright = {300,300}
%<blg>     \textquotedblright = {300,400}
%<cmr>     \textquotedblleft = {500,300},   \textquotedblright = {200,600}
%<pad|ppl|ptm>     \textquotedblleft = {300,400},   \textquotedblright = {300,400}
%<ugm>     \textquotedblleft = {400,400},   \textquotedblright = {400,400}
   }

%    \end{macrocode}
% Greek uppercase letters are in <OT1> encoding only.
%\changes{v1.9}{2005/07/10}{fix: remove uppercase Greek letters from <T1> encoded <CMR>}
%    \begin{macrocode}
%<*m-t|cmr|pmn>
\SetProtrusion
%<m-t>   [ name     = OT1-default,
%<cmr>   [ name     = cmr-OT1,
%<pmn>   [ name     = pmnj-OT1,
%<m-t>     load     = default ]
%<cmr>     load     = cmr-default ]
%<pmn>     load     = pmnj-default ]
%<m-t>   { encoding = OT1 }
%<cmr>   { encoding = {OT1,OT4},
%<pmn>   { encoding = OT1,
%<cmr>     family   = cmr  }
%<pmn>     family   = pmnj }
   {
%<m-t|cmr>     \AE = {50,   },
%<pmn>     \OE = {50,  }
%<*cmr>
     "00 = {   ,150}, % \Gamma
     "01 = {100,100}, % \Delta
     "02 = { 50, 50}, % \Theta
     "03 = {100,100}, % \Lambda
     "06 = { 50, 50}, % \Sigma
     "07 = {100,100}, % \Upsilon
     "08 = { 50, 50}, % \Phi
     "09 = { 50, 50}  % \Psi
%    \end{macrocode}
% Remaining slots can be found in the source file.
%\iffalse ^^A ... namely, here:
%    "04 = {   ,   }, % \Xi
%    "05 = {   ,   }, % \Pi
%    "0A = {   ,   }, % \Omega
%\fi
%    \begin{macrocode}
%</cmr>
   }

%</m-t|cmr|pmn>
%    \end{macrocode}
% <T1> and <LY1> encodings contain some more characters. The default list
% will be loaded first.
%\changes{v1.9a}{2005/11/07}{fix: remove `\texttt{\_}' from <OT1> encoding}
% For \xetex\ (<EU1>) and \luatex\ (<EU2>) we simply use the <T1> list as
% default (for now).
%\changes{v2.5}{2010/11/05}{add default lists for <EU1> and <EU2>} ^^A (beta:03)
%\changes{v2.6}{2016/04/22}{add <TU> encoding to lists}
%    \begin{macrocode}
\SetProtrusion
%<m-t>   [ name     = T1-default,
%<bch>   [ name     = bch-T1,
%<blg>   [ name     = blg-T1,
%<cmr>   [ name     = cmr-T1,
%<pad>   [ name     = pad-T1,
%<pmn>   [ name     = pmnj-T1,
%<ppl>   [ name     = ppl-T1,
%<ptm>   [ name     = ptm-T1,
%<ugm>   [ name     = ugm-T1,
%<m-t>     load     = default     ]
%<bch>     load     = bch-default ]
%<blg>     load     = blg-default ]
%<cmr>     load     = cmr-default ]
%<pad>     load     = pad-default ]
%<pmn>     load     = pmnj-default ]
%<ppl>     load     = ppl-default ]
%<ptm>     load     = ptm-default ]
%<ugm>     load     = ugm-default ]
%<m-t>   { encoding = {T1,LY1,EU1,EU2,TU} }
%<bch|cmr|pad|pmn|ppl>   { encoding = {T1,LY1},
%<blg|ptm|ugm>   { encoding = {T1},
%<bch>     family   = bch }
%<blg>     family   = blg }
%<cmr>     family   = cmr }
%<pad>     family   = {pad,padx,padj} }
%<pmn>     family   = pmnj }
%<ppl>     family   = {ppl,pplx,pplj} }
%<ptm>     family   = {ptm,ptmx,ptmj} }
%<ugm>     family   = ugm }
   {
%<m-t|cmr>     \AE = {50,  },
%<bch|pmn>     \OE = {50,  },
%<pmn>     \TH = {  ,50},
%<blg>     \v L = {   ,250},
%<blg>     \v d = {   ,250},
%<blg>     \v l = {   ,250},
%<blg>     \v t = {   ,250},
%<blg>     127 =  {300,400},
%<blg>     156 =  {100,   }, % IJ
%<blg>     188 =  { 80, 80}, % ij
%<m-t|bch|pad|pmn|ppl|ptm>       _ = {100,100},
%<cmr>       _ = {200,200},
%<ugm>       _ = {100,200},
%<m-t|pad|pmn|ptm>     \textbackslash    = {100,200},
%<bch>     \textbackslash    = {150,200},
%<blg>     \textbackslash    = {250,300},
%<cmr|ppl>     \textbackslash    = {200,300},
%<ugm>     \textbackslash    = {100,300},
%<ugm>     \textbar          = {200,200},
%<blg>     \textendash       = {300,300},   \textemdash        = {150,150},
%<blg>     \textquotedbl     = {300,400},   \textquotedblleft  = {300,400},
%<cmr>     \textquotedbl     = {300,300},   \textquotedblleft  = {200,600},
%    \end{macrocode}
%\changes{v1.4}{2004/10/30}{tweak quote characters for \texttt{cmr}
%                           variants (<OT1>, <T1>, \texttt{lmr})}
% The <EC> fonts do something weird: they insert an implicit kern between quote
% and boundary character. Therefore, we must override the settings from <OT1>.
%    \begin{macrocode}
%<m-t|cmr|pad|ppl|ptm|ugm>     \quotesinglbase   = {400,400},   \quotedblbase      = {400,400},
%<blg>     \quotesinglbase   = {400,400},   \quotedblbase      = {300,400},
%<bch|pmn>     \quotesinglbase   = {400,400},   \quotedblbase      = {300,300},
%<m-t|bch|pmn>     \guilsinglleft    = {400,300},   \guilsinglright    = {300,400},
%<blg>     \guilsinglleft    = {300,500},   \guilsinglright    = {300,500},
%<cmr|pad|ppl|ptm>     \guilsinglleft    = {400,400},   \guilsinglright    = {300,500},
%<ugm>     \guilsinglleft    = {400,400},   \guilsinglright    = {300,600},
%<m-t>     \guillemotleft    = {200,200},   \guillemotright    = {200,200},
%<cmr>     \guillemotleft    = {300,200},   \guillemotright    = {100,400},
%<bch|pmn>     \guillemotleft    = {200,200},   \guillemotright    = {150,300},
%<blg|pad|ppl|ptm>     \guillemotleft    = {300,300},   \guillemotright    = {200,400},
%<ugm>     \guillemotleft    = {300,400},   \guillemotright    = {300,400},
%<m-t|bch|cmr|pad|pmn|ppl|ugm>     \textexclamdown   = {100,   },   \textquestiondown  = {100,   },
%<blg>     \textexclamdown   = {200,   },   \textquestiondown  = {100,   },
%<ptm>     \textexclamdown   = {200,   },   \textquestiondown  = {200,   },
%<m-t|cmr|pad|ppl|ptm|ugm>     \textbraceleft    = {400,200},   \textbraceright    = {200,400},
%<bch|blg|pmn>     \textbraceleft    = {200,   },   \textbraceright    = {   ,300},
%<m-t|bch|cmr|pad|ppl|ptm|ugm>     \textless         = {200,100},   \textgreater       = {100,200}
%<pmn>     \textless         = {100,   },   \textgreater       = {   ,100},
%<pmn>     \textvisiblespace = {100,100} % not in LY1
%    \end{macrocode}
%\iffalse
%   \dh = {  ,  },
%   \th = {  ,  },
%   \NG = {  ,  },
%   \ng = {  ,  },
%   \textasciicircum = {  ,  },
%   \textsterling = {  ,  }, % also in TS1
%   \textsection = {  ,  }, % also in TS1
%\fi
%    \begin{macrocode}
   }

%    \end{macrocode}
% The \pkg{lmodern} fonts used to restore the original settings from <OT1>
% fonts. Now, they require even other settings, though.
%\changes{v2.3a}{2008/02/19}{adjust <LMR> quotation marks again}
%    \begin{macrocode}
%<*cmr>
\SetProtrusion
   [ name     = lmr-T1,
     load     = cmr-T1   ]
   { encoding = {T1,LY1},
     family   = lmr      }
   {
     \textquotedblleft  = {300,400},  \textquotedblright = {300,400}
   }

%</cmr>
%    \end{macrocode}
% Settings for the <T2A> encoding (generic, Computer Modern Roman, and Minion).\footnote{Contributed by
%                            \contributor Karl Karlsson <karl-karlsson\at yandex.ru>.}
%\changes{v2.3e}{2009/10/28}{settings for <T2A> encoding (contributed by
%                            \contributor Karl Karlsson <karl-karlsson\at yandex.ru>)}
%                                                       ^^A private mail, 2009/10/21
%\changes{v2.4}{2009/11/15}{settings for <T2A> encoded Minion (contributed by
%                           \contributor Karl Karlsson <karl-karlsson\at yandex.ru>)}
%                                                       ^^A private mail, 2009/11/14
%    \begin{macrocode}
%<*m-t|cmr|pmn>
\SetProtrusion
%<m-t>   [ name     = T2A-default,
%<cmr>   [ name     = cmr-T2A,
%<pmn>   [ name     = pmnj-T2A,
%<m-t>     load     = default     ]
%<cmr>     load     = cmr-default ]
%<pmn>     load     = pmnj-default ]
   { encoding = T2A,
%<m-t>   }
%<cmr>     family   = cmr }
%<pmn>     family   = pmnj }
   {
     \CYRA = {50,50},
     \CYRG = {  ,50},
     \CYRK = {  ,50},
     \CYRT = {50,50},
     \CYRH = {50,50},
     \CYRU = {50,50},
%<pmn>     \CYRS = {50,  },
%<pmn>     \CYRO = {50,50},
     \cyrk = {  ,50},
     \cyrg = {  ,50},
     \cyrh = {50,50},
%<m-t|pmn>     \cyru = {50,50},
%<cmr>     \cyru = {50,70},
%<m-t>        _  = {100,100},
%<cmr>        _  = {200,200},
%<m-t>     \textbackslash    = {100,200},   \quotedblbase      = {400,400},
%<cmr>     \textbackslash    = {200,300},   \quotedblbase      = {400,400},
%<pmn>     \textbackslash    = {100,200},   \quotedblbase      = {300,300},
%<cmr>     \textquotedbl     = {300,300},   \textquotedblleft  = {200,600},
%<m-t>     \guillemotleft    = {200,200},   \guillemotright    = {200,200},
%<cmr>     \guillemotleft    = {300,200},   \guillemotright    = {100,400},
%<pmn>     \guillemotleft    = {200,200},   \guillemotright    = {150,300},
%<m-t|cmr>     \textbraceleft    = {400,200},   \textbraceright    = {200,400},
%<pmn>     \textbraceleft    = {200,   },   \textbraceright    = {   ,300},
%<m-t|cmr>     \textless         = {200,100},   \textgreater       = {100,200}
%<pmn>     \textless         = {100,   },   \textgreater       = {   ,100}
   }

%</m-t|cmr|pmn>
%    \end{macrocode}
% Settings for the <QX> encoding (generic and Times).\footnote{Contributed by
%                            \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>.}
%\changes{v1.9d}{2006/04/20}{settings for <QX> encoding (contributed by
%                            \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>)}
%                                                     ^^A private mail, 2006/04/19
% It also includes some glyphs otherwise in <TS1>.
%    \begin{macrocode}
%<*m-t|ptm>
\SetProtrusion
%<m-t>   [ name     = QX-default,
%<ptm>   [ name     = ptm-QX,
%<m-t>     load     = default ]
%<ptm>     load     = ptm-default ]
%<m-t>   { encoding = QX }
%<ptm>   { encoding = QX,
%<ptm>     family   = {ptm,ptmx,ptmj} }
   {
     \AE = {50,  },
%<ptm>      *  = {200,200},
     {=} = {100,100},
     \textunderscore   = {100,100},
     \textbackslash    = {100,200},
     \quotedblbase     = {400,400},
%<m-t>     \guillemotleft    = {200,200},   \guillemotright    = {200,200},
%<ptm>     \guillemotleft    = {300,300},   \guillemotright    = {200,400},
     \textexclamdown   = {100,   },   \textquestiondown  = {100,   },
%<m-t>     \textbraceleft    = {400,200},   \textbraceright    = {200,400},
%<ptm>     \textbraceleft    = {200,200},   \textbraceright    = {200,300},
     \textless         = {200,100},   \textgreater       = {100,200},
     \textminus        = {200,200},   \textdegree        = {300,300},
%<m-t>     \copyright        = {100,100},   \textregistered    = {100,100}
%<ptm>     \copyright        = {100,150},   \textregistered    = {100,150},
%<ptm>     \textxgeq         = {   ,100},   \textxleq          = {100,   },
%<ptm>     \textalpha        = {   , 50},   \textDelta         = { 70, 70},
%<ptm>     \textpi           = { 50, 80},   \textSigma         = {   , 70},
%<ptm>     \textmu           = {   , 80},   \texteuro          = { 50, 50},
%<ptm>     \textellipsis     = {150,200},   \textasciitilde    = { 80, 80},
%<ptm>     \textapprox       = { 50, 50},   \textinfty         = {100,100},
%<ptm>     \textdagger       = {150,150},   \textdaggerdbl     = {100,100},
%<ptm>     \textdiv          = { 50,150},   \textsection       = { 80, 80},
%<ptm>     \texttimes        = {100,150},   \textpm            = { 50, 80},
%<ptm>     \textbullet       = {150,150},   \textperiodcentered = {300,300},
%<ptm>     \textquotesingle  = {500,500},   \textquotedbl      = {300,300},
%<ptm>     \textperthousand  = {    ,50}
   }

%</m-t|ptm>
%    \end{macrocode}
% <T5> is based on <OT1>; it shares some but not all extra characters of <T1>.
% All accented characters are already taken care of by the inheritance list.
%    \begin{macrocode}
%<*cmr|bch>
\SetProtrusion
%<cmr>   [ name     = cmr-T5,
%<cmr>     load     = cmr-default ]
%<bch>   [ name     = bch-T5,
%<bch>     load     = bch-default ]
   { encoding = T5,
%<cmr>     family   = cmr }
%<bch>     family   = bch }
   {
%<bch>     _ = {100,100},
%<bch>     \textbackslash    = {150,200},
%<cmr>     \textbackslash    = {200,300},
%<cmr>     \textquotedblleft = {200,600},
%<cmr>     \textquotedbl     = {300,300},
%<bch>     \quotesinglbase   = {400,400},   \quotedblbase      = {300,300},
%<cmr>     \quotesinglbase   = {400,400},   \quotedblbase      = {400,400},
%<bch>     \guilsinglleft    = {400,300},   \guilsinglright    = {300,400},
%<cmr>     \guilsinglleft    = {400,400},   \guilsinglright    = {300,500},
%<bch>     \guillemotleft    = {200,200},   \guillemotright    = {150,300},
%<cmr>     \guillemotleft    = {300,200},   \guillemotright    = {100,400},
%<bch>     \textbraceleft    = {200,   },   \textbraceright    = {   ,300},
%<cmr>     \textbraceleft    = {400,200},   \textbraceright    = {200,400},
     \textless         = {200,100},   \textgreater       = {100,200}
   }

%</cmr|bch>
%    \end{macrocode}
% Minion with lining numbers.
%    \begin{macrocode}
%<*pmn>
\SetProtrusion
   [ name     = pmnx-OT1,
     load     = pmnj-default ]
   { encoding = OT1,
     family   = pmnx }
   {
     1 = {230,180}
   }

\SetProtrusion
   [ name     = pmnx-T1,
     load     = pmnj-T1  ]
   { encoding = {T1,LY1},
     family   = pmnx     }
   {
     1 = {230,180}
   }

\SetProtrusion
   [ name     = pmnx-T2A,
     load     = pmnj-T2A  ]
   { encoding = {T2A},
     family   = pmnx     }
   {
     1 = {230,180}
   }

%</pmn>
%    \end{macrocode}
% Times is the default font for <LY1>, therefore we provide settings for the
% additional characters in this encoding, too.
%\changes{v1.8}{2005/04/26}{add <LY1> characters for Times}
%    \begin{macrocode}
%<*ptm>
 \SetProtrusion
   [ name     = ptm-LY1,
     load     = ptm-T1 ]
   { encoding = LY1,
     family   = {ptm,ptmx,ptmj} }
   {
     _                         = {100,100},
     \texttrademark            = {100,100},
     \textregistered           = {100,100},
     \textcopyright            = {100,100},
     \textdegree               = {300,300},
     \textminus                = {200,200},
     \textellipsis             = {150,200},
%    \texteuro                 = {   ,   }, % ?
     \textcent                 = {100,100},
     \textquotesingle          = {500,500},
     \textflorin               = { 50, 70},
     \textdagger               = {150,150},
     \textdaggerdbl            = {100,100},
     \textperthousand          = {   , 50},
     \textbullet               = {150,150},
     \textonesuperior          = {100,100},
     \texttwosuperior          = { 50, 50},
     \textthreesuperior        = { 50, 50},
     \textperiodcentered       = {300,300},
     \textplusminus            = { 50, 80},
     \textmultiply             = {100,100},
     \textdivide               = { 50,150}
%    \end{macrocode}
% Remaining slots in the source file.
%\iffalse
%    \textbrokenbar            = {   ,   },
%    \textyen                  = {   ,   },
%    \textfractionsolidus      = {   ,   },
%    \textordfeminine          = {   ,   },
%    \textordmasculine         = {   ,   },
%    \textmu                   = {   ,   },
%    \textparagraph            = {   ,   },
%    \textonequarter           = {   ,   },
%    \textonehalf              = {   ,   },
%    \textthreequarters        = {   ,   },
%\fi
%    \begin{macrocode}
   }

%</ptm>
%    \end{macrocode}
%
%\subsubsection{Italics}
%
%\changes{v1.4b}{2004/11/22}{slanted like italics}
%\changes{v1.6}{2004/12/26}{add italic uppercase Greek letters}
%
% To find default settings for italic is difficult, since the character shapes
% and their behaviour at the beginning or end of line may be wildly different
% for different fonts. In the generic settings we therefore omit the letters,
% and only set up the punctuation characters.
%
% The italic glyphs of Computer Modern Roman feature a lot of side bearing,
% therefore almost all of them have to protrude.\footnote{Settings
%                            contributed by \contributor Hendrik Vogt <hendrik.vogt\at tu-dresden.de>.}
%\changes{v2.5}{2011/04/09}{improvements to Computer Modern Roman italics
%                           (contributed by \contributor Hendrik Vogt <hendrik.vogt\at tu-dresden.de>)}
%                           ^^A private mail, 2011/02/24
%                           ^^A (beta:07)
%
%    \begin{macrocode}
\SetProtrusion
%<m-t>   [ name     = OT1-it   ]
%<bch>   [ name     = bch-it   ]
%<blg>   [ name     = blg-it,
%<blg>     load     = blg-default ]
%<cmr>   [ name     = cmr-it   ]
%<pad>   [ name     = pad-it   ]
%<pmn>   [ name     = pmnj-it  ]
%<ppl>   [ name     = ppl-it   ]
%<ptm>   [ name     = ptm-it   ]
%<ugm>   [ name     = ugm-it   ]
%<m-t|bch|blg|pad|ugm>   { encoding = OT1,
%<ppl|ptm>   { encoding = {OT1,OT4},
%<bch>     family   = bch,
%<blg>     family   = blg,
%<pad>     family   = {pad,padx,padj},
%<ppl>     family   = {ppl,pplx,pplj},
%<ptm>     family   = {ptm,ptmx,ptmj},
%<ugm>     family   = ugm,
%<m-t|bch|pad|ppl|ptm>     shape    = {it,sl}  }
%<blg|ugm>     shape    = it  }
%<cmr|pmn>   { }
   {
%<cmr>     A = {100,100},
%<ptm>     A = {100,50},
%<pad|pmn>     A = {50,  },
%<ugm>     A = {  ,150},
%<ppl>     A = {50,50},
%<ptm>   \AE = {100,  },
%<pad|ppl>   \AE = {50,  },
%<cmr>     B = {83,-40},
%<pad|ppl|ptm>     B = {50,  },
%<pmn>     B = {20,-50},
%<bch|ppl|ptm|ugm>     C = {50,  },
%<cmr>     C = {165,-75},
%<pad>     C = {100, },
%<pmn>     C = {50,-50},
%<cmr>     D = {75, -28},
%<pad|ppl|ptm>     D = {50,50},
%<pmn>     D = {20,  },
%<cmr>     E = {80,-55},
%<pad|ppl|ptm>     E = {50,  },
%<pmn>     E = {20,-50},
%<cmr>     F = {85,-80},
%<pad|ptm>     F = {100, },
%<pmn>     F = {10,  },
%<ppl>     F = {50,  },
%<bch|ppl|ptm|ugm>     G = {50,  },
%<cmr>     G = {153,-15},
%<pad>     G = {100, },
%<pmn>     G = {50,-50},
%<cmr>     H = {73,-60},
%<pad|ppl|ptm>     H = {50,  },
%<cmr>     I = {140,-120},
%<pad|ptm>     I = {50,  },
%<pmn>     I = {20,-50},
%<cmr>     J = {135,-80},
%<pad>     J = {50,  },
%<pmn>     J = {20,  },
%<ptm>     J = {100, },
%<cmr>     K = {70,-30},
%<pad|ppl|ptm>     K = {50,  },
%<pmn>     K = {20,  },
%<cmr>     L = {87, 40},
%<pad|ppl|ptm>     L = {50,  },
%<pmn>     L = {20,50},
%<ugm>     L = {  ,100},
%<cmr>     M = {67,-45},
%<pmn>     M = {  ,-30},
%<ptm>     M = {50,  },
%<cmr>     N = {75,-55},
%<pmn>     N = {  ,-30},
%<ptm>     N = {50,  },
%<bch|pmn|ppl|ptm>     O = {50,  },
%<cmr>     O = {150,-30},
%<pad>     O = {100, },
%<ugm>     O = {70,50},
%<ppl|ptm>   \OE = {50,  },
%<pad>   \OE = {100, },
%<cmr>     P = {82,-50},
%<pad|ppl|ptm>     P = {50,  },
%<pmn>     P = {20,-50},
%<bch|pmn|ppl|ptm>     Q = {50,  },
%<cmr>     Q = {150,-30},
%<pad>     Q = {100, },
%<ugm>     Q = {70,50},
%<cmr>     R = {75, 15},
%<pad|ppl|ptm>     R = {50,  },
%<pmn>     R = {20,  },
%<bch|pad|ppl|ptm>     S = {50,  },
%<cmr>     S = {90,-65},
%<pmn>     S = {20,-30},
%<bch|pad|ppl|ptm>     $ = {50,  },
%<cmr>     $ = {100,-20},
%<pmn>     $ = {20,-30},
%<bch|pmn|ugm>     T = {70,  },
%<cmr>     T = {220,-85},
%<pad|ppl|ptm>     T = {100, },
%<cmr>     U = {230,-55},
%<pad|ppl|ptm>     U = {50,  },
%<pmn>     U = {50,-50},
%<cmr>     V = {260,-60},
%<pad|pmn|ugm>     V = {100, },
%<ppl|ptm>     V = {100,50},
%<cmr>     W = {185,-55},
%<pad|pmn|ugm>     W = {100, },
%<ppl>     W = {50,  },
%<ptm>     W = {100,50},
%<cmr>     X = {70,-30},
%<ppl|ptm>     X = {50,  },
%<cmr>     Y = {250,-60},
%<pmn>     Y = {50,  },
%<ppl>     Y = {100,50},
%<ptm>     Y = {100, },
%<cmr>     Z = {90,-60},
%<pmn>     Z = {  ,-50},
%<cmr>     a = {150,-10},
%<cmr>     b = {170,   },
%<cmr>     c = {173,-10},
%<cmr>     d = {150,-55},
%<pmn>     d = {  ,-50},
%<cmr>     e = {180, },
%<cmr>     f = {  ,-250},
%<pad|pmn>     f = { ,-100},
%<cmr>     g = {150,-10},
%<cmr>     h = {100, },
%<cmr>     i = {210, },
%<pmn>     i = {  ,-30},
%<cmr>     j = {  ,-40},
%<pmn>     j = {  ,-30},
%<cmr>     k = {110,-50},
%<cmr>     l = {240,-110},
%<pmn>     l = {  ,-100},
%<cmr>     m = {80, },
%<cmr>     n = {115, },
%<bch>     o = {50,50},
%<cmr>     o = {155, },
%<bch>     p = {  ,50},
%<pmn>     p = {-50,  },
%<bch>     q = {50,  },
%<cmr>     q = {170,-40},
%<cmr>     r = {155,-40},
%<pmn>     r = {  ,50},
%<cmr>     s = {130, },
%<bch>     t = {  ,50},
%<cmr>     t = {230,-10},
%<cmr>     u = {120, },
%<cmr>     v = {140,-25},
%<pmn|ugm>     v = {50,  },
%<bch>     w = {  ,50},
%<cmr>     w = {98,-20},
%<pmn|ugm>     w = {50,  },
%<cmr>     x = {65,-40},
%<bch>     y = {  ,50},
%<cmr>     y = {130,-20},
%<cmr>     z = {110,-80},
%<cmr>     0 = {170,-85},
%<bch|ptm>     1 = {150,100},
%<cmr>     1 = {230,110},
%<pad>     1 = {150, },
%<pmn>     1 = {50,  },
%<ppl>     1 = {100, },
%<ugm>     1 = {150,150},
%<cmr>     2 = {130,-70},
%<pad|ppl|ptm>     2 = {50,  },
%<pmn>     2 = {-50,  },
%<bch>     3 = {50,  },
%<cmr>     3 = {140,-70},
%<pmn>     3 = {-100, },
%<ptm>     3 = {100,50},
%<bch>     4 = {100, },
%<cmr>     4 = {130,80},
%<pad>     4 = {150, },
%<ppl|ptm>     4 = {50,  },
%<cmr>     5 = {160, },
%<ptm>     5 = {50,  },
%<bch>     6 = {50,  },
%<cmr>     6 = {175,-30},
%<bch|pad|ptm>     7 = {100, },
%<cmr>     7 = {250,-150},
%<pmn>     7 = {20,  },
%<ppl>     7 = {50,  },
%<cmr>     8 = {130,-40},
%<cmr>     9 = {155,-80},
%<m-t|cmr|pad|pmn|ppl>     . = { ,500},
%<blg>     . = {400,600},
%<bch|ptm|ugm>     . = { ,700},
%<blg>    {,}= {300,500},
%<m-t|pad|pmn|ppl>    {,}= { ,500},
%<cmr>    {,}= { ,450},
%<bch|ugm>    {,}= { ,600},
%<ptm>    {,}= { ,700},
%<m-t|cmr|pad|ppl>     : = { ,300},
%<bch|ugm>     : = { ,400},
%<pmn>     : = { ,200},
%<ptm>     : = { ,500},
%<m-t|cmr|pad|ppl>     ; = { ,300},
%<bch|ugm>     ; = { ,400},
%<pmn>     ; = { ,200},
%<ptm>     ; = { ,500},
%<ptm>     ! = { ,100},
%<bch>     ? = { ,200},
%<ptm>     ? = { ,100},
%<ppl>     ? = { ,300},
%<pmn>     " = {400,200},
%<m-t|pad|pmn|ppl|ptm>     & = {50,50},
%<bch>     & = {  ,80},
%<cmr>     & = {130,30},
%<ugm>     & = {50,100},
%<m-t|pad|pmn>    \% = {100, },
%<cmr>    \% = {180,50},
%<bch>    \% = {50,50},
%<ppl|ptm>    \% = {100,100},
%<ugm>    \% = {100,50},
%<m-t|pmn|ppl>     * = {200,200},
%<bch>     * = {300,200},
%<cmr>     * = {380,20},
%<pad>     * = {500,100},
%<ptm|ugm>     * = {400,200},
%<m-t|pmn|ppl>     + = {150,200},
%<cmr>     + = {180,200},
%<bch|ugm>     + = {250,250},
%<pad|ptm>     + = {250,200},
%<m-t|pad|pmn|ppl>     @ = {50,50},
%<bch>     @ = {80,50},
%<cmr>     @ = {180,10},
%<ptm>     @ = {150,150},
%<m-t|bch|ugm>     ~ = {150,150},
%<cmr|pad|pmn|ppl|ptm>     ~ = {200,150},
%<ugm>    {=}= {200,200},
%<m-t|bch|pad|pmn|ppl|ptm|ugm>     ( = {200, },    ) = {  ,200},
%<cmr>     ( = {300, },    ) = {  ,70},
%<m-t|pad|ppl|ptm|ugm>     / = {100,200},
%<cmr>     / = {100,100},
%<bch>     / = {  ,150},
%<pmn>     / = {100,150},
%<m-t>     - = {300,300},
%<bch|pad>     - = {300,400},
%<pmn>     - = {200,300},
%<cmr>     - = {500,300},
%<ppl>     - = {300,500},
%<ptm>     - = {500,500},
%<ugm>     - = {400,700},
%<blg>     _ = {0,300},
%<m-t|pmn>     \textendash       = {200,200},   \textemdash        = {150,150},
%<bch>     \textendash       = {200,300},   \textemdash        = {150,200},
%<cmr>     \textendash       = {500,300},   \textemdash        = {400,170},
%<pad|ppl|ptm|ugm>     \textendash       = {300,300},   \textemdash        = {200,200},
%<m-t|bch|pmn|ugm>     \textquoteleft    = {400,200},   \textquoteright    = {400,200},
%<blg>     \textquoteleft     = {400,400},    \textquoteright    = {400,400},
%<cmr>     \textquoteleft    = {800,200},   \textquoteright    = {800,-20},
%<pad>     \textquoteleft    = {800,200},   \textquoteright    = {800,200},
%<ppl>     \textquoteleft    = {700,400},   \textquoteright    = {700,400},
%<ptm>     \textquoteleft    = {800,500},   \textquoteright    = {800,500},
%<m-t|bch|pmn>     \textquotedblleft = {400,200},   \textquotedblright = {400,200}
%<blg>     \textquotedblright = {300,300}
%<cmr>     \textquotedblleft = {540,100},   \textquotedblright = {500,100}
%<pad>     \textquotedblleft = {700,200},   \textquotedblright = {700,200}
%<ppl>     \textquotedblleft = {500,300},   \textquotedblright = {500,300}
%<ptm>     \textquotedblleft = {700,400},   \textquotedblright = {700,400}
%<ugm>     \textquotedblleft = {600,200},   \textquotedblright = {600,200}
   }

%<*cmr|pmn>
\SetProtrusion
%<cmr>   [ name     = cmr-it-OT1,
%<pmn>   [ name     = pmnj-it-OT1,
%<cmr>     load     = cmr-it   ]
%<pmn>     load     = pmnj-it  ]
%<cmr>   { encoding = {OT1,OT4},
%<pmn>   { encoding = OT1,
%<cmr>     family   = cmr,
%<pmn>     family   = pmnj,
%<cmr>     shape    = it       }
%<pmn>     shape    = {it,sl}  }
   {
%<cmr>     \AE = {100,   },
%<pmn>     \AE = {  ,-50},
%<cmr>     \OE = {100,   },
%<pmn>     \OE = {50,   }
%<*cmr>
     "00 = {200,150}, % \Gamma
     "01 = {150,100}, % \Delta
     "02 = {150, 50}, % \Theta
     "03 = {150, 50}, % \Lambda
     "04 = {100,100}, % \Xi
     "05 = {100,100}, % \Pi
     "06 = {100, 50}, % \Sigma
     "07 = {200,150}, % \Upsilon
     "08 = {150, 50}, % \Phi
     "09 = {150,100}, % \Psi
     "0A = { 50, 50}  % \Omega
%</cmr>
   }

%</cmr|pmn>
\SetProtrusion
%<m-t>   [ name     = T1-it-default,
%<bch>   [ name     = bch-it-T1,
%<blg>   [ name     = blg-it-T1,
%<cmr>   [ name     = cmr-it-T1,
%<pad>   [ name     = pad-it-T1,
%<pmn>   [ name     = pmnj-it-T1,
%<ppl>   [ name     = ppl-it-T1,
%<ptm>   [ name     = ptm-it-T1,
%<ugm>   [ name     = ugm-it-T1,
%<m-t>     load     = OT1-it   ]
%<bch>     load     = bch-it   ]
%<blg>     load     = blg-T1   ]
%<cmr>     load     = cmr-it   ]
%<pmn>     load     = pmnj-it  ]
%<pad>     load     = pad-it   ]
%<ppl>     load     = ppl-it   ]
%<ptm>     load     = ptm-it   ]
%<ugm>     load     = ugm-it   ]
%<m-t|bch|cmr|pad|pmn|ppl>   { encoding = {T1,LY1},
%<blg|ptm|ugm>   { encoding = T1,
%<bch>     family   = bch,
%<blg>     family   = blg,
%<cmr>     family   = cmr,
%<pmn>     family   = pmnj,
%<pad>     family   = {pad,padx,padj},
%<ppl>     family   = {ppl,pplx,pplj},
%<ptm>     family   = {ptm,ptmx,ptmj},
%<ugm>     family   = ugm,
%<m-t|bch|pad|pmn|ppl|ptm>     shape    = {it,sl}  }
%<blg|cmr|ugm>     shape    = it       }
   {
%<m-t|bch|pmn>     _ = {  ,100},
%<blg>     _ = {0,300},
%<cmr|ugm>     _ = {100,200},
%<pad|ppl|ptm>     _ = {100,100},
%<blg>     . = {400,600},
%<blg>    {,}= {300,500},
%<cmr>     \AE = {100,   },
%<pmn>     \AE = {  ,-50},
%<bch|pmn>     \OE = { 50,   },
%<cmr>     \OE = {100,   },
%<pmn>     031 = { ,-100}, % ffl
%<cmr|ptm>     156 = {100, },  % IJ
%<pad>     156 = {50,  },  % IJ
%<pmn>     156 = {20,  },  % IJ
%<pmn>     188 = {  ,-30}, % ij
%<pmn>   \v t = { ,100},
%<m-t|pad|ppl|ptm>     \textbackslash    = {100,200},
%<cmr|ugm>     \textbackslash    = {300,300},
%<bch>     \textbackslash    = {150,150},
%<pmn>     \textbackslash    = {100,150},
%<ugm>     \textbar          = {200,200},
%<cmr>     \textquotedblleft = {500,300},
%<blg>    \textquoteleft     = {400,400},    \textquoteright    = {400,400},
%<blg>    \textquotedbl      = {300,300},    \textquotedblleft  = {300,300},
%<blg>    \textquotedblright = {300,300},    \quotedblbase      = {200,600},
%<m-t|ptm>     \quotesinglbase   = {300,700},   \quotedblbase      = {400,500},
%<cmr>     \quotesinglbase   = {300,700},   \quotedblbase      = {200,600},
%<bch|pmn>     \quotesinglbase   = {200,500},   \quotedblbase      = {150,500},
%<pad|ppl>     \quotesinglbase   = {500,500},   \quotedblbase      = {400,400},
%<ugm>     \quotesinglbase   = {300,700},   \quotedblbase      = {300,500},
%<m-t|ppl|ptm>     \guilsinglleft    = {400,400},   \guilsinglright    = {300,500},
%<bch|pmn>     \guilsinglleft    = {300,400},   \guilsinglright    = {200,500},
%<cmr>     \guilsinglleft    = {500,300},   \guilsinglright    = {400,400},
%<pad>     \guilsinglleft    = {500,400},   \guilsinglright    = {300,500},
%<ugm>     \guilsinglleft    = {400,400},   \guilsinglright    = {300,600},
%<m-t|ppl>     \guillemotleft    = {300,300},   \guillemotright    = {300,300},
%<bch|pmn>     \guillemotleft    = {200,300},   \guillemotright    = {150,400},
%<cmr>     \guillemotleft    = {400,100},   \guillemotright    = {200,300},
%<pad>     \guillemotleft    = {300,300},   \guillemotright    = {200,400},
%<ptm>     \guillemotleft    = {300,400},   \guillemotright    = {200,400},
%<ugm>     \guillemotleft    = {300,400},   \guillemotright    = {300,400},
%<m-t|pad|ppl|ugm>     \textexclamdown   = {100,   },   \textquestiondown  = {200,   },
%<cmr|ptm>     \textexclamdown   = {200,   },   \textquestiondown  = {200,   },
%<pmn>     \textexclamdown   = {-50,   },   \textquestiondown  = {-50,   },
%<m-t|ppl|ugm>     \textbraceleft    = {200,100},   \textbraceright    = {200,200},
%<bch|pmn>     \textbraceleft    = {200,   },   \textbraceright    = {   ,200},
%<cmr|pad|ptm>     \textbraceleft    = {400,100},   \textbraceright    = {200,200},
%<bch|pmn>     \textless         = {100,   },   \textgreater       = {   ,100},
%<cmr|pad|ppl|ptm>     \textless         = {300,100},   \textgreater       = {200,100}
%<pmn>     \textvisiblespace = {100,100}
  }

%<*m-t|cmr|pmn>
\SetProtrusion
%<m-t>   [ name     = T2A-it-default,
%<cmr>   [ name     = cmr-it-T2A,
%<pmn>   [ name     = pmnj-it-T2A,
%<m-t>     load     = OT1-it   ]
%<cmr>     load     = cmr-it   ]
%<pmn>     load     = pmnj-it  ]
   { encoding = T2A,
%<cmr>     family   = cmr,
%<pmn>     family   = pmnj,
%<m-t|pmn>     shape    = {it,sl}  }
%<cmr>     shape    = it       }
   {
%<cmr>     \CYRA = {100,50},
%<pmn>     \CYRA = {50,  },
%<cmr>     \CYRB = {50,  },
%<cmr>     \CYRV = {50,  },
%<pmn>     \CYRV = {20,-50},
%<cmr>     \CYRG = {100, },
%<pmn>     \CYRG = {10,  },
%<cmr>     \CYRD = {50,  },
%<cmr>     \CYRE = {50,  },
%<pmn>     \CYRE = {20,-50},
%<cmr>     \CYRZH = {50,  },
%<cmr>     \CYRZ = {50,  },
%<pmn>     \CYRZ = {20,-50},
%<cmr>     \CYRI = {50,  },
%<pmn>     \CYRI = {  ,-30},
%<cmr>     \CYRISHRT = {50,  },
%<cmr>     \CYRK = {50,  },
%<pmn>     \CYRK = {20,  },
%<cmr>     \CYRL = {50,  },
%<cmr>     \CYRM = {50,  },
%<pmn>     \CYRM = {  ,-30},
%<cmr>     \CYRN = {50,  },
%<cmr>     \CYRO = {100, },
%<pmn>     \CYRO = {50,  },
%<cmr>     \CYRP = {50,  },
%<cmr>     \CYRR = {50,  },
%<pmn>     \CYRR = {20,-50},
%<cmr>     \CYRS = {100, },
%<pmn>     \CYRS = {50,  },
%<cmr>     \CYRT = {100, },
%<pmn>     \CYRT = {70,  },
%<cmr>     \CYRU = {100, },
%<pmn>     \CYRU = {50,  },
%<cmr>     \CYRF = {100, },
%<cmr>     \CYRH = {50,  },
%<cmr>     \CYRC = {50,  },
%<cmr>     \CYRCH = {100, },
%<cmr>     \CYRSH = {50,  },
%<cmr>     \CYRSHCH = {50,  },
%<cmr>     \CYRHRDSN = {100, },
%<cmr>     \CYRERY = {50,  },
%<cmr>     \CYRSFTSN = {50,  },
%<cmr>     \CYREREV = {50,  },
%<cmr>     \CYRYU = {50,  },
%<cmr>     \CYRYA = {50,  },
%<pmn>     \CYRYA = {  ,20},
%<pmn>     \cyrr = {-50,  },
%<m-t|pmn>      _ = {  ,100},
%<cmr>      _ = {100,200},
%<pmn>      031 = { ,-100}, % ffl
%<pmn>     \v t = { ,100},
%<m-t>     \textbackslash    = {100,200},   \quotedblbase      = {400,500},
%<cmr>     \textbackslash    = {300,300},   \quotedblbase      = {200,600},
%<pmn>     \textbackslash    = {100,150},   \quotedblbase      = {150,500},
%<m-t>     \guillemotleft    = {300,300},   \guillemotright    = {300,300},
%<cmr>     \guillemotleft    = {400,100},   \guillemotright    = {200,300},
%<pmn>     \guillemotleft    = {200,300},   \guillemotright    = {150,400},
%<m-t>     \textbraceleft    = {200,100},   \textbraceright    = {200,200},
%<cmr>     \textbraceleft    = {400,100},   \textbraceright    = {200,200},
%<pmn>     \textbraceleft    = {200,   },   \textbraceright    = {   ,200},
%<cmr>     \textquotedblleft = {500,300},
%<cmr>     \textless         = {300,100},   \textgreater       = {200,100}
%<pmn>     \textless         = {100,   },   \textgreater       = {   ,100}
  }

%</m-t|cmr|pmn>
%<*m-t|ptm>
\SetProtrusion
%<m-t>   [ name     = QX-it-default,
%<ptm>   [ name     = ptm-it-QX,
%<m-t>     load     = OT1-it ]
%<ptm>     load     = ptm-it ]
   { encoding = {QX},
%<ptm>     family   = {ptm,ptmx,ptmj},
     shape    = {it,sl}  }
   {
%<ptm>     009 = {  , 50}, % fk
     {=} = {100,100},
%<m-t>     \textunderscore   = {100,100},
%<ptm>     \textunderscore   = {100,150},
     \textbackslash    = {100,200},
     \quotedblbase     = {300,400},
%<m-t>     \guillemotleft    = {300,300},   \guillemotright    = {300,300},
%<ptm>     \guillemotleft    = {200,400},   \guillemotright    = {200,400},
     \textexclamdown   = {200,   },   \textquestiondown  = {200,   },
     \textbraceleft    = {200,100},   \textbraceright    = {200,200},
     \textless         = {100,100},   \textgreater       = {100,100},
     \textminus        = {200,200},   \textdegree        = {300,150},
%<m-t>     \copyright        = {100,100},   \textregistered    = {100,100}
%<ptm>     \textregistered   = {100,150},   \copyright         = {100,150},
%<ptm>     \textDelta        = { 70,   },   \textdelta         = {   , 50},
%<ptm>     \textpi           = { 50, 80},   \textmu            = {   , 80},
%<ptm>     \texteuro         = {200,   },   \textellipsis      = {100,200},
%<ptm>     \textquoteleft    = {500,400},   \textquoteright    = {500,400},
%<ptm>     \textquotedblleft = {500,300},   \textquotedblright = {400,400},
%<ptm>     \textapprox       = { 50, 50},   \textinfty         = {100,100},
%<ptm>     \textdagger       = {150,150},   \textdaggerdbl     = {100,100},
%<ptm>     \textdiv          = {150,150},   \textasciitilde    = { 80, 80},
%<ptm>     \texttimes        = {100,150},   \textpm            = { 50, 80},
%<ptm>     \textbullet       = {300,100},   \textperiodcentered = {300,300},
%<ptm>     \textquotesingle  = {500,500},   \textquotedbl      = {300,300},
%<ptm>     \textperthousand  = {    ,50}
   }

%</m-t|ptm>
%<*cmr|bch>
\SetProtrusion
%<cmr>   [ name = cmr-it-T5,
%<cmr>     load = cmr-it ]
%<bch>   [ name = bch-it-T5,
%<bch>     load = bch-it ]
   { encoding = T5,
%<bch>     family   = bch,
%<cmr>     family   = cmr,
     shape    = it }
   {
%<bch>      _ = {  ,100},
%<cmr>      _ = {100,200},
%<bch>     \textbackslash    = {150,150},
%<cmr>     \textbackslash    = {300,300},
%<bch>     \quotesinglbase   = {200,500},   \quotedblbase      = {150,500},
%<cmr>     \quotesinglbase   = {300,700},   \quotedblbase      = {200,600},
%<bch>     \guilsinglleft    = {300,400},   \guilsinglright    = {200,500},
%<cmr>     \guilsinglleft    = {500,300},   \guilsinglright    = {400,400},
%<bch>     \guillemotleft    = {200,300},   \guillemotright    = {150,400},
%<cmr>     \guillemotleft    = {400,100},   \guillemotright    = {200,300},
%<bch>     \textbraceleft    = {200,   },   \textbraceright    = {   ,200},
%<cmr>     \textbraceleft    = {400,100},   \textbraceright    = {200,200},
%<bch>     \textless         = {100,   },   \textgreater       = {   ,100}
%<cmr>     \textless         = {300,100},   \textgreater       = {200,100}
  }

%</cmr|bch>
%    \end{macrocode}
%\changes{v1.8}{2005/06/01}{verified settings for slanted Computer Modern Roman}
% Slanted is very similar to italic.
%    \begin{macrocode}
%<*cmr>
\SetProtrusion
   [ name     = cmr-sl,
     load     = cmr-it-OT1 ]
   { encoding = {OT1,OT4},
     family   = cmr,
     shape    = sl  }
   {
      L = {  ,50},
      f = { ,-50},
      - = {300, },
     \textendash = {400,  },  \textemdash = {300,  }
   }

\SetProtrusion
   [ name     = cmr-sl-T1,
     load     = cmr-it-T1 ]
   { encoding = {T1,LY1},
     family   = cmr,
     shape    = sl  }
   {
      L = {  ,50},
      f = { ,-50},
      - = {300, },
     \textendash = {400,  },  \textemdash = {300,  }
   }

\SetProtrusion
   [ name     = cmr-sl-T2A,
     load     = cmr-it-T2A ]
   { encoding = T2A,
     family   = cmr,
     shape    = sl  }
   {
      L = {  ,50},
      f = { ,-50},
      - = {300, },
     \textendash = {400,  },  \textemdash = {300,  }
   }

\SetProtrusion
   [ name     = cmr-sl-T5,
     load     = cmr-it-T5 ]
   { encoding = T5,
     family   = cmr,
     shape    = sl  }
   {
      L = {  ,50},
      f = { ,-50},
      - = {300, },
     \textendash = {400,  },  \textemdash = {300,  }
   }

\SetProtrusion
   [ name     = lmr-it-T1,
     load     = cmr-it-T1 ]
   { encoding = {T1,LY1},
     family   = lmr,
     shape    = {it,sl} }
   {
     \textquotedblleft  = { ,200},  \textquotedblright = { ,200},
     \quotesinglbase    = { ,400},  \quotedblbase      = { ,500}
   }

%    \end{macrocode}
% Oldstyle numerals are slightly different.
%    \begin{macrocode}
\SetProtrusion
   [ name = cmr(oldstyle)-it,
     load = cmr-it-T1 ]
   { encoding = T1,
     family   = {hfor,cmor},
     shape    = {it,sl}  }
   {
     1 = {250, 50},
     2 = {150,-100},
     3 = {100,-50},
     4 = {150,150},
     6 = {200,   },
     7 = {200, 50},
     8 = {150,-50},
     9 = {100, 50}
   }

%</cmr>
%<*pmn>
\SetProtrusion
   [ name     = pmnx-it,
     load     = pmnj-it ]
   { encoding = OT1,
     family   = pmnx,
     shape    = {it,sl} }
   {
     1 = {100,150}
   }

\SetProtrusion
   [ name     = pmnx-it-T1,
     load     = pmnj-it-T1 ]
   { encoding = {T1,LY1},
     family   = pmnx,
     shape    = {it,sl} }
   {
     1 = {100,150}
   }

\SetProtrusion
   [ name     = pmnx-it-T2A,
     load     = pmnj-it-T2A ]
   { encoding = {T2A},
     family   = pmnx,
     shape    = {it,sl} }
   {
     1 = {100,150}
   }

%</pmn>
%<*ptm>
\SetProtrusion
   [ name     = ptm-it-LY1,
     load     = ptm-it-T1   ]
   { encoding = {LY1},
     family   = {ptm,ptmx,ptmj},
     shape    = {it,sl}  }
   {
     _                         = {100,100},
     \texttrademark            = {100,100},
     \textregistered           = {100,100},
     \textcopyright            = {100,100},
     \textdegree               = {300,100},
     \textminus                = {200,200},
     \textellipsis             = {100,200},
%    \texteuro                 = {   ,   }, % ?
     \textcent                 = {100,100},
     \textquotesingle          = {500,   },
     \textflorin               = {100, 70},
     \textdagger               = {150,150},
     \textdaggerdbl            = {100,100},
     \textbullet               = {150,150},
     \textonesuperior          = {150,100},
     \texttwosuperior          = {150, 50},
     \textthreesuperior        = {150, 50},
     \textparagraph            = {100,   },
     \textperiodcentered       = {500,300},
     \textonequarter           = { 50,   },
     \textonehalf              = { 50,   },
     \textplusminus            = {100,100},
     \textmultiply             = {150,150},
     \textdivide               = {150,150}
   }

%</ptm>
%    \end{macrocode}
%
%\subsubsection{Small caps}
%
% Small caps should inherit the values from their big brothers. Since values are
% relative to character width, we don't need to adjust them any further (but
% we have to reset some characters).
%    \begin{macrocode}
%<*!(blg|ugm)>
\SetProtrusion
%<m-t>   [ name     = OT1-sc,
%<bch>   [ name     = bch-sc,
%<cmr>   [ name     = cmr-sc-OT1,
%<pad>   [ name     = pad-sc,
%<pmn>   [ name     = pmnj-sc,
%<ppl>   [ name     = ppl-sc,
%<ptm>   [ name     = ptm-sc,
%<m-t>     load     = default ]
%<bch>     load     = bch-default ]
%<cmr>     load     = cmr-OT1 ]
%<pad>     load     = pad-default ]
%<pmn>     load     = pmnj-default ]
%<ppl>     load     = ppl-default ]
%<ptm>     load     = ptm-default ]
%<m-t|bch|pad|pmn>   { encoding = OT1,
%<cmr|ppl|ptm>   { encoding = {OT1,OT4},
%<bch>     family   = bch,
%<cmr>     family   = cmr,
%<pad>     family   = {pad,padx,padj},
%<pmn>     family   = pmnj,
%<ppl>     family   = {ppl,pplx,pplj},
%<ptm>     family   = {ptm,ptmx,ptmj},
     shape    = sc }
   {
     a = {50,50},
%<cmr|pad|ppl|ptm>   \ae = {50,  },
%<bch|pmn>     c = {50,  },
%<bch|pad|pmn>     d = {  ,50},
%<m-t|bch|cmr|pad|pmn|ptm>     f = {  ,50},
%<bch|pad|pmn>     g = {50,  },
%<m-t|cmr|pad|pmn|ppl|ptm>     j = {50,  },
%<bch>     j = {100,  },
%<m-t|bch|cmr|pad|pmn|ppl>     l = {  ,50},
%<ptm>     l = {  ,80},
%<m-t|bch|cmr|pad|pmn|ppl>   013 = {  ,50}, % fl
%<ptm>   013 = {  ,80}, % fl
%<bch|pad|pmn>     o = {50,50},
%<pad|pmn>   \oe = {50,  },
%<ppl>     p = { 0, 0},
%<bch|pad|pmn>     q = {50,70},
%<ppl>     q = { 0,  },
%<m-t|cmr|pad|pmn|ppl|ptm>     r = {  , 0},
     t = {50,50},
%<m-t|bch|cmr|pad|pmn|ppl>     y = {50,50}
%<ptm>     y = {80,80}
   }

\SetProtrusion
%<m-t>   [ name     = T1-sc,
%<bch>   [ name     = bch-sc-T1,
%<cmr>   [ name     = cmr-sc-T1,
%<pad>   [ name     = pad-sc-T1,
%<pmn>   [ name     = pmnj-sc-T1,
%<ppl>   [ name     = ppl-sc-T1,
%<ptm>   [ name     = ptm-sc-T1,
%<m-t>     load     = T1-default ]
%<bch>     load     = bch-T1     ]
%<cmr>     load     = cmr-T1     ]
%<pad>     load     = pad-T1     ]
%<pmn>     load     = pmnj-T1    ]
%<ppl>     load     = ppl-T1     ]
%<ptm>     load     = ptm-T1     ]
   { encoding = {T1,LY1},
%<bch>     family   = bch,
%<cmr>     family   = cmr,
%<pad>     family   = {pad,padx,padj},
%<pmn>     family   = pmnj,
%<ppl>     family   = {ppl,pplx,pplj},
%<ptm>     family   = {ptm,ptmx,ptmj},
     shape    = sc }
   {
     a = {50,50},
%<cmr|pad|ppl|ptm>   \ae = {50,  },
%<bch|pmn>     c = {50,  },
%<bch|pad|pmn>     d = {  ,50},
%<m-t|bch|cmr|pad|pmn|ptm>     f = {  ,50},
%<bch|pad|pmn>     g = {50,  },
%<m-t|cmr|pad|pmn|ppl|ptm>     j = {50,  },
%<bch>     j = {100,  },
%<m-t|bch|cmr|pad|pmn|ppl>     l = {  ,50},
%<ptm>     l = {  ,80},
%<m-t|bch|cmr|pad|pmn|ppl>   029 = {  ,50}, % fl
%<ptm>   029 = {  ,80}, % fl
%<bch|pad|pmn>     o = {50,50},
%<bch|pad|pmn>   \oe = {50,  },
%<ppl>     p = { 0, 0},
%<bch|pad|pmn>     q = {50,70},
%<ppl>     q = { 0,  },
%<m-t|cmr|pad|pmn|ppl|ptm>     r = {  , 0},
     t = {50,50},
%<m-t|bch|cmr|pad|pmn|ppl>     y = {50,50}
%<ptm>     y = {80,80}
   }

%</!(blg|ugm)>
%<*m-t|cmr>
\SetProtrusion
%<m-t>   [ name     = T2A-sc,
%<cmr>   [ name     = cmr-sc-T2A,
%<m-t>     load     = T2A-default ]
%<cmr>     load     = cmr-T2A     ]
   { encoding = T2A,
%<cmr>     family   = cmr,
     shape    = sc }
   {
     \cyra = {50,50},
     \cyrg = {  ,50},
     \cyrt = {50,50},
     \cyry = {  ,50}
   }

%</m-t|cmr>
%<*m-t>
\SetProtrusion
   [ name     = QX-sc,
     load     = QX-default ]
   { encoding = QX,
     shape    = sc  }
   {
     a = {50,50},
     f = {  ,50},
     j = {50,  },
     l = {  ,50},
   013 = {  ,50}, % fl
     r = {  , 0},
     t = {50,50},
     y = {50,50}
   }

%</m-t>
%<*cmr|bch>
\SetProtrusion
%<bch>   [ name     = bch-sc-T5,
%<bch>     load     = bch-T5 ]
%<cmr>   [ name     = cmr-sc-T5,
%<cmr>     load     = cmr-T5 ]
   { encoding = T5,
%<bch>     family   = bch,
%<cmr>     family   = cmr,
     shape    = sc }
   {
     a = {50,50},
%<bch>     c = {50,  },
%<bch>     d = {  ,50},
     f = {  ,50},
%<bch>     g = {50,  },
%<bch>     j = {100, },
%<cmr>     j = {50,  },
     l = {  ,50},
%<bch>     o = {50,50},
%<bch>     q = { 0,  },
%<cmr>     r = {  , 0},
     t = {50,50},
     y = {50,50}
   }

%</cmr|bch>
%<*pmn>
\SetProtrusion
   [ name     = pmnx-sc,
     load     = pmnj-sc ]
   { encoding = OT1,
     family   = pmnx,
     shape    = sc }
   {
     1 = {230,180}
   }

\SetProtrusion
   [ name     = pmnx-sc-T1,
     load     = pmnj-sc-T1 ]
   { encoding = {T1,LY1},
     family   = pmnx,
     shape    = sc }
   {
     1 = {230,180}
   }

%    \end{macrocode}
%
%\subsubsection{Italic small caps}
% Minion provides real small caps in italics.
% The \pkg{slantsc} package calls them |scit|, Philipp Lehman's
% \pkg{fontinstallationguide} suggests |si|.
%    \begin{macrocode}
\SetProtrusion
   [ name     = pmnj-scit,
     load     = pmnj-it   ]
   { encoding = OT1,
     family   = pmnj,
     shape    = {scit,si} }
   {
     a = {50,  },
   \ae = {  ,-50},
     b = {20,-50},
     c = {50,-50},
     d = {20, 0},
     e = {20,-50},
     f = {10, 0},
   012 = {10,-50}, % fi
   013 = {10,-50}, % fl
   014 = {10,-50}, % ffi
   015 = {10,-50}, % ffl
     g = {50,-50},
     i = {20,-50},
     j = {20, 0},
     k = {20,  },
     l = {20,50},
     m = {  ,-30},
     n = {  ,-30},
     o = {50,  },
   \oe = {50,-50},
     p = {20,-50},
     q = {50,  },
     r = {20, 0},
     s = {20,-30},
     t = {70,  },
     u = {50,-50},
     v = {100,  },
     w = {100,  },
     y = {50,  },
     z = {  ,-50}
   }

\SetProtrusion
   [ name     = pmnj-scit-T1,
     load     = pmnj-it-T1   ]
   { encoding = {T1,LY1},
     family   = pmnj,
     shape    = {scit,si}    }
   {
     a = {50,  },
   \ae = {  ,-50},
     b = {20,-50},
     c = {50,-50},
     d = {20, 0},
     e = {20,-50},
     f = {10, 0},
   028 = {10,-50}, % fi
   029 = {10,-50}, % fl
   030 = {10,-50}, % ffi
   031 = {10,-50}, % ffl
     g = {50,-50},
     i = {20,-50},
   188 = {20, 0},  % ij
     j = {20, 0},
     k = {20,  },
     l = {20,50},
     m = {  ,-30},
     n = {  ,-30},
     o = {50,  },
   \oe = {50,-50},
     p = {20,-50},
     q = {50,  },
     r = {20, 0},
     s = {20,-30},
     t = {70,  },
     u = {50,-50},
     v = {100,  },
     w = {100,  },
     y = {50,  },
     z = {  ,-50}
   }

\SetProtrusion
   [ name     = pmnx-scit,
     load     = pmnj-scit ]
   { encoding = OT1,
     family   = pmnx,
     shape    = {scit,si} }
   {
     1 = {100,150}
   }

\SetProtrusion
   [ name     = pmnx-scit-T1,
     load     = pmnj-scit-T1 ]
   { encoding = {T1,LY1},
     family   = pmnx,
     shape    = {scit,si}    }
   {
     1 = {100,150}
   }

%</pmn>
%    \end{macrocode}
%
%\subsubsection{Text companion}
%
% Finally the <TS1> encoding.
% Still quite incomplete for Times and especially Palatino. Anybody?
%\changes{v1.2}{2004/09/28}{add settings for Computer Modern Roman and
%                           Adobe Garamond in <TS1> encoding}
%    \begin{macrocode}
\SetProtrusion
%<m-t>   [ name     = textcomp ]
%<bch>   [ name     = bch-textcomp ]
%<blg>   [ name     = blg-textcomp ]
%<cmr>   [ name     = cmr-textcomp ]
%<pad>   [ name     = pad-textcomp ]
%<pmn>   [ name     = pmn-textcomp ]
%<ppl>   [ name     = ppl-textcomp ]
%<ptm>   [ name     = ptm-textcomp ]
%<ugm>   [ name     = ugm-textcomp ]
%<m-t>   { encoding = TS1      }
%<!m-t>   { encoding = TS1,
%<bch>     family   = bch }
%<blg>     family   = blg }
%<cmr>     family   = cmr }
%<pad>     family   = {pad,padx,padj} }
%<pmn>     family   = {pmnx,pmnj} }
%<ppl>     family   = {ppl,pplx,pplj} }
%<ptm>     family   = {ptm,ptmx,ptmj} }
%<ugm>     family   = ugm }
   {
%<blg>     \textquotestraightbase    = {400,500},
%<cmr>     \textquotestraightbase    = {300,300},
%<pad|pmn>     \textquotestraightbase    = {400,400},
%<blg>     \textquotestraightdblbase = {300,400},
%<cmr|pmn>     \textquotestraightdblbase = {300,300},
%<pad>     \textquotestraightdblbase = {400,400},
%<bch|cmr|pad|pmn|ugm>     \texttwelveudash          = {200,200},
%<bch|cmr|pad|pmn>     \textthreequartersemdash  = {150,150},
%<ugm>     \textthreequartersemdash  = {200,200},
%<blg>     \textquotesingle          = {500,600},
%<cmr|pmn>     \textquotesingle          = {300,400},
%<pad>     \textquotesingle          = {400,500},
%<ptm>     \textquotesingle          = {500,500},
%<ugm>     \textquotesingle          = {300,500},
%<bch|cmr|pmn>     \textasteriskcentered     = {200,300},
%<blg>     \textasteriskcentered     = {150,200},
%<pad>     \textasteriskcentered     = {300,300},
%<ugm>     \textasteriskcentered     = {100,200},
%<pmn>     \textfractionsolidus      = {-200,-200},
%<cmr>     \textoneoldstyle          = {100,100},
%<pmn>     \textoneoldstyle          = {   , 50},
%<cmr>     \textthreeoldstyle        = {   , 50},
%<pad|pmn>     \textthreeoldstyle        = { 50,   },
%<cmr>     \textfouroldstyle         = { 50, 50},
%<pad|pmn>     \textfouroldstyle         = { 50,   },
%<cmr|pad|pmn>     \textsevenoldstyle        = { 50, 80},
%<cmr>     \textlangle               = {400,   },
%<cmr>     \textrangle               = {   ,400},
%<m-t|bch|pmn|ptm>     \textminus                = {200,200},
%<cmr|pad|ppl>     \textminus                = {300,300},
%<blg|ugm>     \textminus                = {250,300},
%<bch|pad|pmn>     \textlbrackdbl            = {100,   },
%<blg>     \textlbrackdbl            = {200,   },
%<bch|pad|pmn>     \textrbrackdbl            = {   ,100},
%<blg>     \textrbrackdbl            = {   ,200},
%<pmn>     \textasciigrave           = {200,500},
%<bch|blg|cmr|pad|pmn>     \texttildelow             = {200,250},
%<pmn>     \textasciibreve           = {300,400},
%<pmn>     \textasciicaron           = {300,400},
%<pmn>     \textacutedbl             = {200,300},
%<pmn>     \textgravedbl             = {150,300},
%<bch|pmn|ugm>     \textdagger               = { 80, 80},
%<blg>     \textdagger               = {200,200},
%<cmr|pad>     \textdagger               = {100,100},
%<ptm>     \textdagger               = {150,150},
%<blg>     \textdaggerdbl            = {150,150},
%<cmr|pad|pmn>     \textdaggerdbl            = { 80, 80},
%<ptm>     \textdaggerdbl            = {100,100},
%<bch>     \textbardbl               = {100,100},
%<blg|ugm>     \textbardbl               = {150,150},
%<bch>     \textbullet               = {200,200},
%<blg>     \textbullet               = {400,500},
%<cmr|pad|pmn>     \textbullet               = {   ,100},
%<ptm>     \textbullet               = {150,150},
%<ugm>     \textbullet               = { 50,100},
%<bch|cmr|pmn>     \textcelsius              = { 50,   },
%<pad>     \textcelsius              = { 80,   },
%<bch>     \textflorin               = { 50, 50},
%<blg>     \textflorin               = {100,100},
%<pad|ugm>     \textflorin               = {   ,100},
%<pmn>     \textflorin               = { 50,100},
%<ptm>     \textflorin               = { 50, 70},
%<cmr>     \textcolonmonetary        = {   , 50},
%<pad|pmn>     \textcolonmonetary        = { 50,   },
%<pmn>     \textinterrobang          = {   ,100},
%<pmn>     \textinterrobangdown      = {100,   },
%<m-t|pad|ptm>     \texttrademark            = {100,100},
%<bch>     \texttrademark            = {150,150},
%<blg|cmr|ppl>     \texttrademark            = {200,200},
%<pmn>     \texttrademark            = { 50, 50},
%<ugm>     \texttrademark            = {100,150},
%<bch|ugm>     \textcent                 = { 50,   },
%<ptm>     \textcent                 = {100,100},
%<bch>     \textsterling             = { 50,   },
%<ugm>     \textsterling             = {   , 50},
%<bch>     \textbrokenbar            = {200,200},
%<blg>     \textbrokenbar            = {250,250},
%<ugm>     \textbrokenbar            = {200,300},
%<pmn>     \textasciidieresis        = {300,400},
%<m-t|bch|cmr|pad|ptm|ugm>     \textcopyright            = {100,100},
%<pmn>     \textcopyright            = {100,150},
%<ppl>     \textcopyright            = {200,200},
%<bch|cmr|ugm>     \textordfeminine          = {100,200},
%<pad|pmn>     \textordfeminine          = {200,200},
%<bch|cmr|pad|pmn|ugm>     \textlnot                 = {200,   },
%<blg>     \textlnot                 = {200,100},
%<m-t|bch|cmr|pad|ptm|ugm>     \textregistered           = {100,100},
%<pmn>     \textregistered           = { 50,150},
%<ppl>     \textregistered           = {200,200},
%<pmn>     \textasciimacron          = {150,200},
%<m-t|ppl|ptm>     \textdegree               = {300,300},
%<bch>     \textdegree               = {150,200},
%<blg|ugm>     \textdegree               = {200,200},
%<cmr|pad>     \textdegree               = {400,400},
%<pmn>     \textdegree               = {150,400},
%<bch|cmr|pad|pmn|ugm>     \textpm                   = {150,200},
%<blg>     \textpm                   = {100,100},
%<ptm>     \textpm                   = { 50, 80},
%<bch|blg|ugm>     \texttwosuperior          = {100,200},
%<cmr>     \texttwosuperior          = { 50,100},
%<pad|pmn>     \texttwosuperior          = {200,200},
%<ptm>     \texttwosuperior          = { 50, 50},
%<bch|blg|ugm>     \textthreesuperior        = {100,200},
%<cmr>     \textthreesuperior        = { 50,100},
%<pad|pmn>     \textthreesuperior        = {200,200},
%<ptm>     \textthreesuperior        = { 50, 50},
%<pmn>     \textasciiacute           = {300,400},
%<bch|ugm>     \textmu                   = {   ,100},
%<bch|pad|pmn>     \textparagraph            = {   ,100},
%<bch|cmr|pad|pmn>     \textperiodcentered       = {300,400},
%<blg>     \textperiodcentered       = {400,500},
%<ptm>     \textperiodcentered       = {300,300},
%<ugm>     \textperiodcentered       = {200,500},
%<bch|blg|ugm>     \textonesuperior          = {200,300},
%<cmr|pad|pmn>     \textonesuperior          = {200,200},
%<ptm>     \textonesuperior          = {100,100},
%<bch|pad|pmn|ugm>     \textordmasculine         = {200,200},
%<blg|cmr>     \textordmasculine         = {100,200},
%<bch|cmr|pmn>     \texteuro                 = {100,   },
%<pad>     \texteuro                 = { 50,100},
%<bch>     \texttimes                = {200,200},
%<blg|ptm>     \texttimes                = {100,100},
%<cmr>     \texttimes                = {150,250},
%<pad>     \texttimes                = {100,150},
%<pmn>     \texttimes                = { 70,100},
%<ugm>     \texttimes                = {200,300},
%<bch|pad|pmn>     \textdiv                  = {150,200}
%<blg>     \textdiv                  = {100,100}
%<cmr>     \textdiv                  = {150,250}
%<ptm>     \textdiv                  = { 50,100},
%<ugm>     \textdiv                  = {200,300},
%<ptm>     \textperthousand          = {    ,50}
%<ugm>     \textsection              = {   ,100},
%<ugm>     \textonehalf              = { 50,100},
%<ugm>     \textonequarter           = { 50,100},
%<ugm>     \textthreequarters        = { 50,100},
%<ugm>     \textsurd                 = {   ,100}
%    \end{macrocode}
% Remaining slots in the source file.
%\iffalse
%    \textyen                     = {  ,  },
%    \texttwooldstyle             = {  ,  },
%    \textfiveoldstyle            = {  ,  },
%    \textsixoldstyle             = {  ,  },
%    \texteightoldstyle           = {  ,  },
%    \textnineoldstyle            = {  ,  },
%    \textleftarrow               = {  ,  },
%    \textrightarrow              = {  ,  },
%    \textblank                   = {  ,  },
%    \textdollar                  = {  ,  },
%    \textdblhyphen               = {  ,  },
%    \textdblhyphenchar           = {  ,  },
%    \textohm                     = {  ,  },
%    \textmho                     = {  ,  },
%    \textbigcircle               = {  ,  },
%    \textuparrow                 = {  ,  },
%    \textdownarrow               = {  ,  },
%    \textborn                    = {  ,  },
%    \textdied                    = {  ,  },
%    \textmarried                 = {  ,  },
%    \textdivorced                = {  ,  },
%    \textleaf                    = {  ,  },
%    \textmusicalnote             = {  ,  },
%    \textdollaroldstyle          = {  ,  },
%    \textcentoldstyle            = {  ,  },
%    \textwon                     = {  ,  },
%    \textnaira                   = {  ,  },
%    \textguarani                 = {  ,  },
%    \textpeso                    = {  ,  },
%    \textlira                    = {  ,  },
%    \textrecipe                  = {  ,  },
%    \textdong                    = {  ,  },
%    \textpertenthousand          = {  ,  },
%    \textpilcrow                 = {  ,  },
%    \textbaht                    = {  ,  },
%    \textnumero                  = {  ,  },
%    \textdiscount                = {  ,  },
%    \textestimated               = {  ,  },
%    \textopenbullet              = {  ,  },
%    \textservicemark             = {  ,  },
%    \textlquill                  = {  ,  },
%    \textrquill                  = {  ,  },
%    \textcopyleft                = {  ,  },
%    \textcircledP                = {  ,  },
%    \textreferencemark           = {  ,  },
%\fi
%    \begin{macrocode}
   }

%<*cmr|pad|pmn|ugm>
\SetProtrusion
%<cmr>   [ name     = cmr-textcomp-it ]
%<pad>   [ name     = pad-textcomp-it ]
%<pmn>   [ name     = pmn-textcomp-it ]
%<ugm>   [ name     = ugm-textcomp-it ]
   { encoding = TS1,
%<cmr>     family   = cmr,
%<pad>     family   = {pad,padx,padj},
%<pmn>     family   = {pmnx,pmnj},
%<ugm>     family   = ugm,
%<!ugm>     shape    = {it,sl} }
%<ugm>     shape    = it }
   {
%<cmr>     \textquotestraightbase    = {300,600},
%<pad|pmn>     \textquotestraightbase    = {400,400},
%<cmr>     \textquotestraightdblbase = {300,600},
%<pad>     \textquotestraightdblbase = {300,400},
%<pmn>     \textquotestraightdblbase = {300,300},
     \texttwelveudash          = {200,200},
%<cmr|pad|pmn>     \textthreequartersemdash  = {150,150},
%<ugm>     \textthreequartersemdash  = {200,200},
%<cmr>     \textquotesingle          = {600,300},
%<pad>     \textquotesingle          = {800,100},
%<pmn>     \textquotesingle          = {300,200},
%<ugm>     \textquotesingle          = {500,500},
%<cmr>     \textasteriskcentered     = {300,200},
%<pad>     \textasteriskcentered     = {500,100},
%<pmn>     \textasteriskcentered     = {200,300},
%<ugm>     \textasteriskcentered     = {300,150},
%<pmn>     \textfractionsolidus      = {-200,-200},
%<cmr>     \textoneoldstyle          = {100, 50},
%<pad>     \textoneoldstyle          = {100,   },
%<pmn>     \textoneoldstyle          = { 50,   },
%<pad>     \texttwooldstyle          = { 50,   },
%<pmn>     \texttwooldstyle          = {-50,   },
%<cmr>     \textthreeoldstyle        = {100, 50},
%<pmn>     \textthreeoldstyle        = {-100,  },
%<cmr>     \textfouroldstyle         = { 50, 50},
%<pad>     \textfouroldstyle         = { 50,100},
%<cmr>     \textsevenoldstyle        = { 50, 80},
%<pad>     \textsevenoldstyle        = { 50,   },
%<pmn>     \textsevenoldstyle        = { 20,   },
%<cmr>     \textlangle               = {400,   },
%<cmr>     \textrangle               = {   ,400},
%<cmr|pad>     \textminus                = {300,300},
%<pmn>     \textminus                = {200,200},
%<ugm>     \textminus                = {250,300},
%<pad|pmn>     \textlbrackdbl            = {100,   },
%<pad|pmn>     \textrbrackdbl            = {   ,100},
%<pmn>     \textasciigrave           = {300,300},
%<cmr|pad|pmn>     \texttildelow             = {200,250},
%<pmn>     \textasciibreve           = {300,300},
%<pmn>     \textasciicaron           = {300,300},
%<pmn>     \textacutedbl             = {200,300},
%<pmn>     \textgravedbl             = {150,300},
%<cmr>     \textdagger               = {100,100},
%<pad>     \textdagger               = {200,100},
%<pmn>     \textdagger               = { 80, 50},
%<ugm>     \textdagger               = { 80, 80},
%<cmr|pad>     \textdaggerdbl            = { 80, 80},
%<pmn>     \textdaggerdbl            = { 80, 50},
%<ugm>     \textbardbl               = {150,150},
%<cmr>     \textbullet               = {200,100},
%<pad>     \textbullet               = {300,   },
%<pmn>     \textbullet               = { 30, 70},
%<ugm>     \textbullet               = { 50,100},
%<cmr>     \textcelsius              = {100,   },
%<pad>     \textcelsius              = {200,   },
%<pmn>     \textcelsius              = { 50,-50},
%<pad>     \textflorin               = {100,   },
%<pmn>     \textflorin               = { 50,100},
%<ugm>     \textflorin               = {   ,100},
%<cmr>     \textcolonmonetary        = {150,   },
%<pad>     \textcolonmonetary        = {100,   },
%<pmn>     \textcolonmonetary        = { 50,-50},
%<cmr|pad>     \texttrademark            = {200,   },
%<pmn>     \texttrademark            = { 50,100},
%<ugm>     \texttrademark            = {150, 50},
%<ugm>     \textcent                 = { 50,   },
%<ugm>     \textsterling             = {   , 50},
%<ugm>     \textbrokenbar            = {200,300},
%<pmn>     \textasciidieresis        = {300,200},
%<cmr>     \textcopyright            = {100,   },
%<pad>     \textcopyright            = {200,100},
%<pmn>     \textcopyright            = {100,150},
%<ugm>     \textcopyright            = {300,   },
%<cmr>     \textordfeminine          = {100,100},
%<pmn>     \textordfeminine          = {200,200},
%<ugm>     \textordfeminine          = {100,200},
%<cmr|pad>     \textlnot                 = {300,   },
%<pmn|ugm>     \textlnot                 = {200,   },
%<cmr>     \textregistered           = {100,   },
%<pad>     \textregistered           = {200,100},
%<pmn>     \textregistered           = { 50,150},
%<ugm>     \textregistered           = {300,   },
%<pmn>     \textasciimacron          = {150,200},
%<cmr|pad>     \textdegree               = {500,100},
%<pmn>     \textdegree               = {150,150},
%<ugm>     \textdegree               = {300,200},
%<cmr>     \textpm                   = {150,100},
%<pad>     \textpm                   = {200,150},
%<pmn|ugm>     \textpm                   = {150,200},
%<cmr>     \textonesuperior          = {400,   },
%<pad>     \textonesuperior          = {300,100},
%<pmn>     \textonesuperior          = {200,100},
%<ugm>     \textonesuperior          = {300,300},
%<cmr>     \texttwosuperior          = {400,   },
%<pad>     \texttwosuperior          = {300,   },
%<pmn>     \texttwosuperior          = {200,100},
%<ugm>     \texttwosuperior          = {300,200},
%<cmr>     \textthreesuperior        = {400,   },
%<pad>     \textthreesuperior        = {300,   },
%<pmn>     \textthreesuperior        = {200,100},
%<ugm>     \textthreesuperior        = {300,200},
%<ugm>     \textmu                   = {   ,100},
%<pmn>     \textasciiacute           = {300,200},
%<cmr>     \textparagraph            = {200,   },
%<pmn>     \textparagraph            = {   ,100},
%<cmr>     \textperiodcentered       = {500,500},
%<pad|pmn|ugm>     \textperiodcentered       = {300,400},
%<cmr>     \textordmasculine         = {100,100},
%<pmn>     \textordmasculine         = {200,200},
%<ugm>     \textordmasculine         = {300,200},
%<cmr>     \texteuro                 = {200,   },
%<pad>     \texteuro                 = {100,   },
%<pmn>     \texteuro                 = {100,-50},
%<cmr>     \texttimes                = {200,200},
%<pad>     \texttimes                = {200,100},
%<pmn>     \texttimes                = { 70,100},
%<ugm>     \texttimes                = {200,300},
%<cmr|pad>     \textdiv                  = {200,200}
%<pmn>     \textdiv                  = {150,200}
%<ugm>     \textdiv                  = {200,300},
%<ugm>     \textsection              = {   ,200},
%<ugm>     \textonehalf              = { 50,100},
%<ugm>     \textonequarter           = { 50,100},
%<ugm>     \textthreequarters        = { 50,100},
%<ugm>     \textsurd                 = {   ,100}
   }

%</cmr|pad|pmn|ugm>
%    \end{macrocode}
%
%\subsubsection{Computer Modern math}
%
% Now to the math symbols for Computer Modern Roman. Definitions have been
% extracted from \file{fontmath.ltx}.
%\changes{v1.2}{2004/10/02}{add settings for Computer Modern Roman math symbols}
% I did not spend too much time fiddling with these settings, so they can surely
% be improved.
%
% The math font `|operators|' (also used for the \cmd\mathrm\ and
% \cmd\mathbf\ alphabets) is |OT1/cmr|, which we've already set up above.
% It's declared as:
%\begin{verbatim}
%\DeclareSymbolFont{operators}  {OT1}{cmr}{m} {n}
%\SetSymbolFont{operators}{bold}{OT1}{cmr}{bx}{n}
%\end{verbatim}
%
% \cmd\mathit\ (|OT1/cmr/m/it|) is also already set up.
%
% There are (for the moment) no settings for \cmd\mathsf\ and \cmd\mathtt.
%
% Math font `|letters|' (also used as \cmd\mathnormal) is declared as:
%\begin{verbatim}
%\DeclareSymbolFont{letters}    {OML}{cmm}{m}{it}
%\SetSymbolFont{letters}  {bold}{OML}{cmm}{b}{it}
%\end{verbatim}
%\changes{v1.6}{2004/12/26}{tune <CMR> math letters (<OML> encoding)}
%    \begin{macrocode}
%<*cmr>
\SetProtrusion
   [ name     = cmr-math-letters ]
   { encoding = OML,
     family   = cmm,
     series   = {m,b},
     shape    = it    }
   {
       A = {100, 50}, % \mathnormal
       B = { 50,   },
       C = { 50,   },
       D = { 50, 50},
       E = { 50,   },
       F = {100, 50},
       G = { 50, 50},
       H = { 50, 50},
       I = { 50, 50},
       J = {150, 50},
       K = { 50,100},
       L = { 50, 50},
       M = { 50,   },
       N = { 50,   },
       O = { 50,   },
       P = { 50,   },
       Q = { 50, 50},
       R = { 50,   },
       S = { 50,   },
       T = { 50,100},
       U = { 50, 50},
       V = {100,100},
       W = { 50,100},
       X = { 50,100},
       Y = {100,100},
       f = {100,100},
       h = {   ,100},
       i = {   , 50},
       j = {   , 50},
       k = {   , 50},
       r = {   , 50},
       v = {   , 50},
       w = {   , 50},
       x = {   , 50},
     "0B = { 50,100}, % \alpha
     "0C = { 50, 50}, % \beta
     "0D = {200,150}, % \gamma
     "0E = { 50, 50}, % \delta
     "0F = { 50, 50}, % \epsilon
     "10 = { 50,150}, % \zeta
     "12 = { 50,   }, % \theta
     "13 = {   ,100}, % \iota
     "14 = {   ,100}, % \kappa
     "15 = {100, 50}, % \lambda
     "16 = {   , 50}, % \mu
     "17 = {   , 50}, % \nu
     "18 = {   , 50}, % \xi
     "19 = { 50,100}, % \pi
     "1A = { 50, 50}, % \rho
     "1B = {   ,150}, % \sigma
     "1C = { 50,150}, % \tau
     "1D = { 50, 50}, % \upsilon
     "1F = { 50,100}, % \chi
     "20 = { 50, 50}, % \psi
     "21 = {   , 50}, % \omega
     "22 = {   , 50}, % \varepsilon
     "23 = {   , 50}, % \vartheta
     "24 = {   , 50}, % \varpi
     "25 = {100,   }, % \varrho
     "26 = {100,100}, % \varsigma
     "27 = { 50, 50}, % \varphi
     "28 = {100,100}, % \leftharpoonup
     "29 = {100,100}, % \leftharpoondown
     "2A = {100,100}, % \rightharpoonup
     "2B = {100,100}, % \rightharpoondown
     "2C = {300,200}, % \lhook
     "2D = {200,300}, % \rhook
     "2E = {   ,100}, % \triangleright
     "2F = {100,   }, % \triangleleft
     "3A = {   ,500}, % ., \ldotp
     "3B = {   ,500}, % ,
     "3C = {200,100}, % <
     "3D = {300,400}, % /
     "3E = {100,200}, % >
     "3F = {200,200}, % \star
     "5B = {   ,100}, % \flat
     "5E = {200,200}, % \smile
     "5F = {200,200}, % \frown
     "7C = {100,   }, % \jmath
     "7D = {   ,100}  % \wp
%    \end{macrocode}
% Remaining slots in the source file.
%\iffalse
%    "11 = {   ,   }, % \eta
%    "1E = {   ,   }, % \phi
%    "40 = {   ,   }, % \partial
%    "5C = {   ,   }, % \natural
%    "5D = {   ,   }, % \sharp
%    "60 = {   ,   }, % \ell
%    "7B = {   ,   }, % \imath
%\fi
%    \begin{macrocode}
   }

%    \end{macrocode}
% Math font `|symbols|' (also used for the \cmd\mathcal\ alphabet) is declared
% as:
%\begin{verbatim}
%\DeclareSymbolFont{symbols}    {OMS}{cmsy}{m}{n}
%\SetSymbolFont{symbols}  {bold}{OMS}{cmsy}{b}{n}
%\end{verbatim}
%    \begin{macrocode}
\SetProtrusion
   [ name     = cmr-math-symbols ]
   { encoding = OMS,
     family   = cmsy,
     series   = {m,b},
     shape    = n  }
   {
       A = {150, 50}, % \mathcal
       C = {   ,100},
       D = {   , 50},
       F = { 50,150},
       I = {   ,100},
       J = {100,150},
       K = {   ,100},
       L = {100,   },
       M = { 50, 50},
       N = { 50,100},
       P = {   , 50},
       Q = { 50,   },
       R = {   , 50},
       T = { 50,150},
       V = { 50, 50},
       W = {   , 50},
       X = {100,100},
       Y = {100,   },
       Z = {100,150},
     "00 = {300,300}, % -
     "01 = {   ,700}, % \cdot, \cdotp
     "02 = {150,250}, % \times
     "03 = {150,250}, % *, \ast
     "04 = {200,300}, % \div
     "05 = {150,250}, % \diamond
     "06 = {200,200}, % \pm
     "07 = {200,200}, % \mp
     "08 = {100,100}, % \oplus
     "09 = {100,100}, % \ominus
     "0A = {100,100}, % \otimes
     "0B = {100,100}, % \oslash
     "0C = {100,100}, % \odot
     "0D = {100,100}, % \bigcirc
     "0E = {100,100}, % \circ
     "0F = {100,100}, % \bullet
     "10 = {100,100}, % \asymp
     "11 = {100,100}, % \equiv
     "12 = {200,100}, % \subseteq
     "13 = {100,200}, % \supseteq
     "14 = {200,100}, % \leq
     "15 = {100,200}, % \geq
     "16 = {200,100}, % \preceq
     "17 = {100,200}, % \succeq
     "18 = {200,200}, % \sim
     "19 = {150,150}, % \approx
     "1A = {200,100}, % \subset
     "1B = {100,200}, % \supset
     "1C = {200,100}, % \ll
     "1D = {100,200}, % \gg
     "1E = {300,100}, % \prec
     "1F = {100,300}, % \succ
     "20 = {100,200}, % \leftarrow
     "21 = {200,100}, % \rightarrow
     "22 = {100,100}, % \uparrow
     "23 = {100,100}, % \downarrow
     "24 = {100,100}, % \leftrightarrow
     "25 = {100,100}, % \nearrow
     "26 = {100,100}, % \searrow
     "27 = {100,100}, % \simeq
     "28 = {100,100}, % \Leftarrow
     "29 = {100,100}, % \Rightarrow
     "2A = {100,100}, % \Uparrow
     "2B = {100,100}, % \Downarrow
     "2C = {100,100}, % \Leftrightarrow
     "2D = {100,100}, % \nwarrow
     "2E = {100,100}, % \swarrow
     "2F = {   ,100}, % \propto
     "30 = {   ,400}, % \prime
     "31 = {100,100}, % \infty
     "32 = {150,100}, % \in
     "33 = {100,150}, % \ni
     "34 = {100,100}, % \triangle, \bigtriangleup
     "35 = {100,100}, % \bigtriangledown
     "38 = {   ,100}, % \forall
     "39 = {100,   }, % \exists
     "3A = {200,   }, % \neg
     "3E = {200,200}, % \top
     "3F = {200,200}, % \bot, \perp
     "5E = {100,200}, % \wedge
     "5F = {100,200}, % \vee
     "60 = {   ,300}, % \vdash
     "61 = {300,   }, % \dashv
     "62 = {100,100}, % \lfloor
     "63 = {100,100}, % \rfloor
     "64 = {100,100}, % \lceil
     "65 = {100,100}, % \rceil
     "66 = {150,   }, % \lbrace
     "67 = {   ,150}, % \rbrace
     "68 = {400,   }, % \langle
     "69 = {   ,400}, % \rangle
     "6C = {100,100}, % \updownarrow
     "6D = {100,100}, % \Updownarrow
     "6E = {100,300}, % \, \backslash, \setminus
     "72 = {100,100}, % \nabla
     "79 = {200,200}, % \dagger
     "7A = {100,100}, % \ddagger
     "7B = {100,   }, % \mathparagraph
     "7C = {100,100}, % \clubsuit
     "7D = {100,100}, % \diamondsuit
     "7E = {100,100}, % \heartsuit
     "7F = {100,100}  % \spadesuit
%    \end{macrocode}
% Remaining slots in the source file.
%\iffalse
%    "36 = {   ,   }, % \not
%    "37 = {   ,   }, % \mapstochar
%    "3B = {   ,   }, % \emptyset
%    "3C = {   ,   }, % \Re
%    "3D = {   ,   }, % \Im
%    "40 = {   ,   }, % \aleph
%    "5B = {   ,   }, % \cup
%    "5C = {   ,   }, % \cap
%    "5D = {   ,   }, % \uplus
%    "6A = {   ,   }, % \arrowvert, \mid, \vert, |
%    "6B = {   ,   }, % \Arrowvert, \parallel, \Vert
%    "6F = {   ,   }, % \wr
%    "70 = {   ,   }, % \sqrtsign
%    "71 = {   ,   }, % \amalg
%    "73 = {   ,   }, % \smallint
%    "74 = {   ,   }, % \sqcup
%    "75 = {   ,   }, % \sqcap
%    "76 = {   ,   }, % \sqsubseteq
%    "77 = {   ,   }, % \sqsupseteq
%    "78 = {   ,   }, % \mathsection
%\fi
%    \begin{macrocode}
   }

%    \end{macrocode}
% We don't bother about `|largesymbols|', since it will only be used in display
% math, where protrusion doesn't work anyway. It's declared as:
%\begin{verbatim}
%\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
%\end{verbatim}
%\iffalse
%\SetProtrusion
%   [ name     = cmr-math-largesymbols ]
%   { encoding = OMX,
%     family   = cmex }
%   {
%     "00 % (
%     "01 % )
%     "02 % [
%     "03 % ]
%     "04 % \lfloor
%     "05 % \rfloor
%     "06 % \lceil
%     "07 % \rceil
%     "08 % \lbrace
%     "09 % \rbrace
%     "0A % <, \langle
%     "0B % >, \rangle
%     "0C % \vert, |
%     "0D % \Vert
%     "0E % /
%     "0F % \backslash
%     "3A % \lgroup
%     "3B % \rgroup
%     "3C % \arrowvert
%     "3D % \Arrowvert
%     "3E % \bracevert
%     "3F % \updownarrow
%     "40 % \lmoustache
%     "41 % \rmoustache
%     "46 % \bigsqcup
%     "48 % \ointop
%     "4A % \bigodot
%     "4C % \bigoplus
%     "4E % \bigotimes
%     "50 % \sum
%     "51 % \prod
%     "52 % \intop
%     "53 % \bigcup
%     "54 % \bigcap
%     "55 % \biguplus
%     "56 % \bigwedge
%     "57 % \bigvee
%     "60 % \coprod
%     "70 % \sqrtsign
%     "77 % \Updownarrow
%     "78 % \uparrow
%     "79 % \downarrow
%     "7A % \braceld, \lmoustache
%     "7B % \bracerd, \rmoustache
%     "7C % \bracelu
%     "7D % \braceru
%     "7E % \Uparrow
%     "7F % \Downarrow
%  }
%\fi
%    \begin{macrocode}
%</cmr>
%</cfg-t>
%    \end{macrocode}
%
% \subsubsection{<AMS> symbols}
%
% Settings for the <AMS> math fonts (\pkg{amssymb}).
%\changes{v1.8}{2005/06/01}{settings for <AMS> math fonts}
%\changes{v1.9d}{2006/02/04}{tweak <AMS> settings}
%    \begin{macrocode}
%<*cfg-u>
%    \end{macrocode}
% Symbol font `a'.
%    \begin{macrocode}
%<*msa>
\SetProtrusion
   [ name     = AMS-a ]
   { encoding = U,
     family   = msa  }
   {
     "05  =  {150,250},  % \centerdot
     "06  =  {100,100},  % \lozenge
     "07  =  { 50, 50},  % \blacklozenge
     "08  =  { 50, 50},  % \circlearrowright
     "09  =  { 50, 50},  % \circlearrowleft
     "0A  =  {100,100},  % \rightleftharpoons
     "0B  =  {100,100},  % \leftrightharpoons
     "0D  =  {-50,200},  % \Vdash
     "0E  =  {-50,200},  % \Vvdash
     "0F  =  {-70,150},  % \vDash
     "10  =  {100,150},  % \twoheadrightarrow
     "11  =  {100,150},  % \twoheadleftarrow
     "12  =  { 50,100},  % \leftleftarrows
     "13  =  { 50, 80},  % \rightrightarrows
     "14  =  {120,120},  % \upuparrows
     "15  =  {120,120},  % \downdownarrows
     "16  =  {200,200},  % \upharpoonright
     "17  =  {200,200},  % \downharpoonright
     "18  =  {200,200},  % \upharpoonleft
     "19  =  {200,200},  % \downharpoonleft
     "1A  =  { 80,100},  % \rightarrowtail
     "1B  =  { 80,100},  % \leftarrowtail
     "1C  =  { 50, 50},  % \leftrightarrows
     "1D  =  { 50, 50},  % \rightleftarrows
     "1E  =  {250,   },  % \Lsh
     "1F  =  {   ,250},  % \Rsh
     "20  =  {100,100},  % \rightsquigarrow
     "21  =  {100,100},  % \leftrightsquigarrow
     "22  =  {100, 50},  % \looparrowleft
     "23  =  { 50,100},  % \looparrowright
     "24  =  { 50, 80},  % \circeq
     "25  =  {   ,100},  % \succsim
     "26  =  {   ,100},  % \gtrsim
     "27  =  {   ,100},  % \gtrapprox
     "28  =  {150, 50},  % \multimap
     "2B  =  {100,150},  % \doteqdot
     "2C  =  {100,150},  % \triangleq
     "2D  =  {100, 50},  % \precsim
     "2E  =  {100, 50},  % \lesssim
     "2F  =  { 50, 50},  % \lessapprox
     "30  =  {100, 50},  % \eqslantless
     "31  =  { 50, 50},  % \eqslantgtr
     "32  =  {100, 50},  % \curlyeqprec
     "33  =  { 50,100},  % \curlyeqsucc
     "34  =  {100, 50},  % \preccurlyeq
     "36  =  { 50,   },  % \leqslant
     "38  =  {   , 50},  % \backprime
     "39  =  {250,250},  % \dabar@ : the dash bar in \dash(left,right)arrow
     "3C  =  { 50,100},  % \succcurlyeq
     "3E  =  {   , 50},  % \geqslant
     "40  =  {   , 50},  % \sqsubset
     "41  =  { 50,   },  % \sqsupset
     "42  =  {   ,150},  % \vartriangleright, \rhd
     "43  =  {150,   },  % \vartriangleleft, \lhd
     "44  =  {   ,100},  % \trianglerighteq, \unrhd
     "45  =  {100,   },  % \trianglelefteq, \unlhd
     "46  =  {100,100},  % \bigstar
     "48  =  { 50, 50},  % \blacktriangledown
     "49  =  {   ,100},  % \blacktriangleright
     "4A  =  {100,   },  % \blacktriangleleft
     "4B  =  {   ,150},  % \dashrightarrow (the arrow)
     "4C  =  {150,   },  % \dashleftarrow
     "4D  =  { 50, 50},  % \vartriangle
     "4E  =  { 50, 50},  % \blacktriangle
     "4F  =  { 50, 50},  % \triangledown
     "50  =  { 50, 50},  % \eqcirc
     "56  =  {   ,150},  % \Rrightarrow
     "57  =  {150,   },  % \Lleftarrow
     "58  =  {100,300},  % \checkmark
     "5C  =  { 50, 50},  % \angle
     "5D  =  { 50, 50},  % \measuredangle
     "5E  =  { 50, 50},  % \sphericalangle
     "5F  =  {   , 50},  % \varpropto
     "60  =  {100,100},  % \smallsmile
     "61  =  {100,100},  % \smallfrown
     "62  =  { 50,   },  % \Subset
     "63  =  {   , 50},  % \Supset
     "66  =  {150,150},  % \curlywedge
     "67  =  {150,150},  % \curlyvee
     "68  =  { 50,150},  % \leftthreetimes
     "69  =  {100, 50},  % \rightthreetimes
     "6C  =  { 50, 50},  % \bumpeq
     "6D  =  { 50, 50},  % \Bumpeq
     "6E  =  {100,   },  % \lll
     "6F  =  {   ,100},  % \ggg
     "70  =  { 50,100},  % \ulcorner
     "71  =  {100, 50},  % \urcorner
     "75  =  {150,200},  % \dotplus
     "76  =  { 50,100},  % \backsim
     "78  =  { 50,100},  % \llcorner
     "79  =  {100, 50},  % \lrcorner
     "7C  =  {100,100},  % \intercal
     "7D  =  { 50, 50},  % \circledcirc
     "7E  =  { 50, 50},  % \circledast
     "7F  =  { 50, 50}   % \circleddash
%    \end{macrocode}
% Remaining slots in the source file.
%\iffalse
%    "00  =  {   ,   },  % \boxdot
%    "01  =  {   ,   },  % \boxplus
%    "02  =  {   ,   },  % \boxtimes
%    "03  =  {   ,   },  % \square
%    "04  =  {   ,   },  % \blacksquare
%    "0C  =  {   ,   },  % \boxminus
%    "29  =  {   ,   },  % \therefore
%    "2A  =  {   ,   },  % \because
%    "35  =  {   ,   },  % \leqq
%    "37  =  {   ,   },  % \lessgtr
%    "3A  =  {   ,   },  % \risingdotseq
%    "3B  =  {   ,   },  % \fallingdotseq
%    "3D  =  {   ,   },  % \geqq
%    "3F  =  {   ,   },  % \gtrless
%    "47  =  {   ,   },  % \between
%    "51  =  {   ,   },  % \lesseqgtr
%    "52  =  {   ,   },  % \gtreqless
%    "53  =  {   ,   },  % \lesseqqgtr
%    "54  =  {   ,   },  % \gtreqqless
%    "55  =  {   ,   },  % \yen
%    "59  =  {   ,   },  % \veebar
%    "5A  =  {   ,   },  % \barwedge
%    "5B  =  {   ,   },  % \doublebarwedge
%    "64  =  {   ,   },  % \Cup
%    "65  =  {   ,   },  % \Cap
%    "6A  =  {   ,   },  % \subseteqq
%    "6B  =  {   ,   },  % \supseteqq
%    "72  =  {   ,   },  % \circledR
%    "73  =  {   ,   },  % \circledS
%    "74  =  {   ,   },  % \pitchfork
%    "77  =  {   ,   },  % \backsimeq
%    "7A  =  {   ,   },  % \maltese
%    "7B  =  {   ,   },  % \complement
%\fi
%    \begin{macrocode}
   }

%</msa>
%    \end{macrocode}
% Symbol font `b'.
%    \begin{macrocode}
%<*msb>
\SetProtrusion
   [ name     = AMS-b ]
   { encoding = U,
     family   = msb  }
   {
       A  =  { 50, 50},  % \mathbb
       C  =  { 50, 50},
       G  =  {   , 50},
       L  =  {   , 50},
       P  =  {   , 50},
       R  =  {   , 50},
       T  =  {   , 50},
       V  =  { 50, 50},
       X  =  { 50, 50},
       Y  =  { 50, 50},
     "00  =  { 50, 50},  % \lvertneqq
     "01  =  { 50, 50},  % \gvertneqq
     "02  =  { 50, 50},  % \nleq
     "03  =  { 50, 50},  % \ngeq
     "04  =  {100, 50},  % \nless
     "05  =  { 50,150},  % \ngtr
     "06  =  {100, 50},  % \nprec
     "07  =  { 50,150},  % \nsucc
     "08  =  { 50, 50},  % \lneqq
     "09  =  { 50, 50},  % \gneqq
     "0A  =  {100,100},  % \nleqslant
     "0B  =  {100,100},  % \ngeqslant
     "0C  =  {100, 50},  % \lneq
     "0D  =  { 50,100},  % \gneq
     "0E  =  {100, 50},  % \npreceq
     "0F  =  { 50,100},  % \nsucceq
     "10  =  { 50,   },  % \precnsim
     "11  =  { 50, 50},  % \succnsim
     "12  =  { 50, 50},  % \lnsim
     "13  =  { 50, 50},  % \gnsim
     "14  =  { 50, 50},  % \nleqq
     "15  =  { 50, 50},  % \ngeqq
     "16  =  { 50, 50},  % \precneqq
     "17  =  { 50, 50},  % \succneqq
     "18  =  { 50, 50},  % \precnapprox
     "19  =  { 50, 50},  % \succnapprox
     "1A  =  { 50, 50},  % \lnapprox
     "1B  =  { 50, 50},  % \gnapprox
     "1C  =  {150,200},  % \nsim
     "1D  =  { 50, 50},  % \ncong
     "1E  =  {100,150},  % \diagup
     "1F  =  {100,150},  % \diagdown
     "20  =  {100, 50},  % \varsubsetneq
     "21  =  { 50,100},  % \varsupsetneq
     "22  =  {100, 50},  % \nsubseteqq
     "23  =  { 50,100},  % \nsupseteqq
     "24  =  {100, 50},  % \subsetneqq
     "25  =  { 50,100},  % \supsetneqq
     "26  =  {100, 50},  % \varsubsetneqq
     "27  =  { 50,100},  % \varsupsetneqq
     "28  =  {100, 50},  % \subsetneq
     "29  =  { 50,100},  % \supsetneq
     "2A  =  {100, 50},  % \nsubseteq
     "2B  =  { 50,100},  % \nsupseteq
     "2C  =  { 50,100},  % \nparallel
     "2D  =  {100,150},  % \nmid
     "2E  =  {150,150},  % \nshortmid
     "2F  =  {100,100},  % \nshortparallel
     "30  =  {   ,150},  % \nvdash
     "31  =  {   ,150},  % \nVdash
     "32  =  {   ,100},  % \nvDash
     "33  =  {   ,100},  % \nVDash
     "34  =  {   ,100},  % \ntrianglerighteq
     "35  =  {100,   },  % \ntrianglelefteq
     "36  =  {100,   },  % \ntriangleleft
     "37  =  {   ,100},  % \ntriangleright
     "38  =  {100,200},  % \nleftarrow
     "39  =  {100,200},  % \nrightarrow
     "3A  =  {100,100},  % \nLeftarrow
     "3B  =  { 50,100},  % \nRightarrow
     "3C  =  {100,100},  % \nLeftrightarrow
     "3D  =  {100,200},  % \nleftrightarrow
     "3E  =  { 50, 50},  % \divideontimes
     "3F  =  { 50, 50},  % \varnothing
     "60  =  {200,   },  % \Finv
     "61  =  {   , 50},  % \Game
     "68  =  {100,100},  % \eqsim
     "69  =  { 50,   },  % \beth
     "6A  =  { 50,   },  % \gimel
     "6B  =  {150,   },  % \daleth
     "6C  =  {200,   },  % \lessdot
     "6D  =  {   ,200},  % \gtrdot
     "6E  =  {100,200},  % \ltimes
     "6F  =  {150,100},  % \rtimes
     "70  =  { 50,100},  % \shortmid
     "71  =  { 50, 50},  % \shortparallel
     "72  =  {200,300},  % \smallsetminus
     "73  =  {100,200},  % \thicksim
     "74  =  { 50,100},  % \thickapprox
     "75  =  { 50, 50},  % \approxeq
     "76  =  { 50,100},  % \succapprox
     "77  =  { 50, 50},  % \precapprox
     "78  =  {100,100},  % \curvearrowleft
     "79  =  { 50,150},  % \curvearrowright
     "7A  =  { 50,200},  % \digamma
     "7B  =  {100, 50},  % \varkappa
     "7F  =  {200,   }   % \backepsilon
%    \end{macrocode}
% Remaining slots in the source file.
%\iffalse
%    "40  =  {   ,   },  % \nexists
%    "66  =  {   ,   },  % \mho
%    "67  =  {   ,   },  % \eth
%    "7C  =  {   ,   },  % \Bbbk
%    "7D  =  {   ,   },  % \hslash
%    "7E  =  {   ,   },  % \hbar
%\fi
%    \begin{macrocode}
   }

%</msb>
%    \end{macrocode}
% \subsubsection{Euler}
%
% Euler Roman font (package \pkg{euler}).
%\changes{v1.9e}{2006/07/28}{settings for Euler Roman font}
%    \begin{macrocode}
%<*eur>
\SetProtrusion
   [ name     = euler ]
   { encoding = U,
     family   = eur  }
   {
     "01  =  {100,100},
     "03  =  {100,150},
     "06  =  {   ,100},
     "07  =  {100,150},
     "08  =  {100,100},
     "0A  =  {100,100},
     "0B  =  {   , 50},
     "0C  =  {   ,100},
     "0D  =  {100,100},
     "0E  =  {   ,100},
     "0F  =  {100,100},
     "10  =  {100,100},
     "13  =  {   ,100},
     "14  =  {   ,100},
     "15  =  {   , 50},
     "16  =  {   , 50},
     "17  =  { 50,100},
     "18  =  { 50,100},
     "1A  =  {   , 50},
     "1B  =  {   , 50},
     "1C  =  { 50,100},
     "1D  =  { 50,100},
     "1E  =  { 50,100},
     "1F  =  { 50,100},
     "20  =  {   , 50},
     "21  =  {   , 50},
     "22  =  { 50,100},
     "24  =  {   , 50},
     "27  =  { 50,100},
       1  =  {100,100},
       7  =  { 50,100},
     "3A  =  {300,500},
     "3B  =  {200,400},
     "3C  =  {200,100},
     "3D  =  {200,200},
     "3E  =  {100,200},
       A  =  {   ,100},
       D  =  {   , 50},
       J  =  { 50,   },
       K  =  {   , 50},
       L  =  {   , 50},
       Q  =  {   , 50},
       T  =  { 50,   },
       X  =  { 50, 50},
       Y  =  { 50,   },
       h  =  {   , 50},
       k  =  {   , 50}
   }

%    \end{macrocode}
% Extended by the \pkg{eulervm} package.
%\changes{v1.9f}{2006/07/31}{fix: \texttt{euler-vm} did not load \texttt{euler} settings}
%    \begin{macrocode}
\SetProtrusion
   [ name     = euler-vm,
     load     = euler ]
   { encoding = U,
     family   = zeur  }
   {
     "28  =  {100,200},
     "29  =  {100,200},
     "2A  =  {100,150},
     "2B  =  {100,150},
     "2C  =  {200,300},
     "2D  =  {200,300},
     "2E  =  {   ,100},
     "2F  =  {100,   },
     "3F  =  {150,150},
     "5B  =  {   ,100},
     "5E  =  {100,100},
     "5F  =  {100,100},
     "80  =  {   , 50},
     "81  =  {200,250},
     "82  =  {100,200}
   }

%</eur>
%    \end{macrocode}
% Euler Script font (\pkg{eucal}).
%    \begin{macrocode}
%<*eus>
\SetProtrusion
   [ name     = euscript ]
   { encoding = U,
     family   = eus  }
   {
       A  =  {100,100},
       B  =  { 50,100},
       C  =  { 50, 50},
       D  =  { 50,100},
       E  =  { 50,100},
       F  =  { 50,   },
       G  =  { 50,   },
       H  =  {   ,100},
       K  =  {   , 50},
       L  =  {   ,150},
       M  =  {   , 50},
       N  =  {   , 50},
       O  =  { 50, 50},
       P  =  { 50, 50},
       T  =  {   ,100},
       U  =  {   , 50},
       V  =  { 50, 50},
       W  =  { 50, 50},
       X  =  { 50, 50},
       Y  =  { 50,   },
       Z  =  { 50,100},
     "00  =  {250,250},
     "18  =  {200,200},
     "3A  =  {200,150},
     "40  =  {   ,100},
     "5E  =  {100,100},
     "5F  =  {100,100},
     "66  =  { 50,   },
     "67  =  {   , 50},
     "6E  =  {200,200}
   }

\SetProtrusion
   [ name     = euscript-vm,
     load     = euscript ]
   { encoding = U,
     family   = zeus  }
   {
     "01  =  {600,600},
     "02  =  {200,200},
     "03  =  {200,200},
     "04  =  {200,200},
     "05  =  {150,150},
     "06  =  {200,200},
     "07  =  {200,200},
     "08  =  {100,100},
     "09  =  {100,100},
     "0A  =  {100,100},
     "0B  =  {100,100},
     "0C  =  {100,100},
     "0D  =  {100,100},
     "0E  =  {150,150},
     "0F  =  {100,100},
     "10  =  {150,150},
     "11  =  {100,100},
     "12  =  {150,100},
     "13  =  {100,150},
     "14  =  {150,100},
     "15  =  {100,150},
     "16  =  {200,100},
     "17  =  {100,200},
     "19  =  {150,150},
     "1A  =  {150,100},
     "1B  =  {100,150},
     "1C  =  {100,100},
     "1D  =  {100,100},
     "1E  =  {250,100},
     "1F  =  {100,250},
     "20  =  {150,200},
     "21  =  {150,200},
     "22  =  {150,150},
     "23  =  {150,150},
     "24  =  {100,200},
     "25  =  {150,150},
     "26  =  {150,150},
     "27  =  {100,100},
     "28  =  {100,100},
     "29  =  {100,150},
     "2A  =  {100,100},
     "2B  =  {100,100},
     "2C  =  {100,100},
     "2D  =  {150,150},
     "2E  =  {150,150},
     "2F  =  {100,100},
     "30  =  {100,100},
     "31  =  {100,100},
     "32  =  {100,100},
     "33  =  {100,100},
     "34  =  {100,100},
     "35  =  {100,100},
     "3E  =  {150,150},
     "3F  =  {150,150},
     "60  =  {   ,200},
     "61  =  {200,   },
     "62  =  {100,100},
     "63  =  {100,100},
     "64  =  {100,100},
     "65  =  {100,100},
     "68  =  {300,   },
     "69  =  {   ,300},
     "6C  =  {100,100},
     "6D  =  {100,100},
     "6F  =  {100,100},
     "72  =  {100,100},
     "73  =  {200,100},
     "76  =  {   ,100},
     "77  =  {100,   },
     "78  =  { 50, 50},
     "79  =  {100,100},
     "7A  =  {100,100},
     "7D  =  {150,150},
     "7E  =  {100,100},
     "A8  =  {100,100},
     "A9  =  {100,100},
     "AB  =  {200,200},
     "BA  =  {   ,200},
     "BB  =  {   ,200},
     "BD  =  {200,200},
     "DE  =  {200,200}
   }

%</eus>
%    \end{macrocode}
% Euler Fraktur font (\pkg{eufrak}).
%\changes{v1.9e}{2006/07/28}{complete settings for Euler Fraktur and Script fonts}
%    \begin{macrocode}
%<*euf>
\SetProtrusion
   [ name     = mathfrak ]
   { encoding = U,
     family   = euf  }
   {
       A  =  {   , 50},
       B  =  {   , 50},
       C  =  { 50, 50},
       D  =  {   , 80},
       E  =  { 50,   },
       G  =  {   , 50},
       L  =  {   , 80},
       O  =  {   , 50},
       T  =  {   , 80},
       X  =  { 80, 50},
       Z  =  { 80, 50},
       b  =  {   , 50},
       c  =  {   , 50},
       k  =  {   , 50},
       p  =  {   , 50},
       q  =  { 50,   },
       v  =  {   , 50},
       w  =  {   , 50},
       x  =  {   , 50},
       1  =  {100,100},
       2  =  { 80, 80},
       3  =  { 80, 50},
       4  =  { 80, 50},
       7  =  { 50, 50},
     "12  =  {500,500},
     "13  =  {500,500},
       !  =  {   ,200},
       '  =  {200,300},
       (  =  {200,   },
       )  =  {   ,200},
       *  =  {200,200},
       +  =  {200,250},
       -  =  {200,200},
      {,} =  {300,300},
       .  =  {400,400},
      {=} =  {200,200},
       :  =  {   ,200},
       ;  =  {   ,200},
       ]  =  {   ,200}
   }

%</euf>
%</cfg-u>
%    \end{macrocode}
%\subsubsection{Euro symbols}
%\changes{v1.9d}{2006/05/04}{settings for Euro symbols (Adobe, <ITC>, \pkg{marvosym})}
%\changes{v1.9e}{2006/07/05}{fix: forgotten comma in \file{mt-mvs.cfg};
%                            adapt to \pkg{marvosym}'s changed encoding}
% Settings for various Euro symbols (Adobe Euro fonts (packages \pkg{eurosans},
% \pkg{europs}), <ITC> Euro fonts (package \pkg{euroitc}) and \pkg{marvosym}\footnote{
%   Of course, there are many more symbols in this font. Feel free to contribute
%   protrusion settings!}).
%    \begin{macrocode}
%<*cfg-e>
\SetProtrusion
%<zpeu|euroitc>   { encoding = U,
%<mvs>   { encoding = {OT1,U},
%<zpeu>     family   = zpeu }
%<euroitc>     family   = {euroitc,euroitcs} }
%<mvs>     family   = mvs }
   {
%<zpeu>     E = {50, }
%<euroitc>     E = {100,50}
%<mvs>     164 = {50,50},   % \EUR
%<mvs>     068 = {50,-100}  % \EURdig
   }

%<*zpeu|euroitc>
\SetProtrusion
   { encoding = U,
%<zpeu>     family   = zpeu,
%<euroitc>     family   = {euroitc,euroitcs},
     shape    = it* }
   {
%<zpeu>     E = {100,-50}
%<euroitc>     E = {100,}
   }

%</zpeu|euroitc>
%<*zpeu>
\SetProtrusion
   { encoding = U,
     family   = {zpeus,eurosans} }
   {
     E = {100,50}
   }

\SetProtrusion
   { encoding = U,
     family   = {zpeus,eurosans},
     shape    = it* }
   {
     E = {200, }
   }

%</zpeu>
%</cfg-e>
%    \end{macrocode}
%
%\subsection{Interword spacing}\label{sub:conf-spacing}
%\GeneralChanges{Spacing}
%
% Default unit is space.
%
%    \begin{macrocode}
%<*m-t|cmr>
%%% -----------------------------------------------------------------------
%%% INTERWORD SPACING

%</m-t|cmr>
%<*m-t>
\SetExtraSpacing
   [ name = default ]
   { encoding = {OT1,T1,LY1,OT4,QX,T5} }
   {
%    \end{macrocode}
% These settings are only a first approximation. The following reasoning is from
% a mail from \contributor Ulrich Dirr <ud\at art-satz.de>^^A private mail, 2005/06/14
%\ifpdf\IfFileExists{justification.png}{^^A
% , who also provided the sample in figure~\ref{fig:example-spacing}^^A
%\changes{v2.2}{2007/04/05}{add sample}^^A
%   \begin{figure}
%     \caption{^^A
%       Example of interword spacing (from: M.~Siemoneit, \emph{Typographisches Gestalten}, Frankfurt/M. 1989).
%         ^^A Manfred Siemoneit, Typographisches Gestalten.
%         ^^A   Regeln und Tips f\"ur die richtige Gestaltung von Drucksachen,
%         ^^A   Frankfurt/M.: Polygraph Verlag, 1989
%       The numbers indicate the preference for shrinking the interword space.}
%     \label{fig:example-spacing}
%     \includegraphics[width=.66\textwidth]{justification.png}
%   \end{figure}^^A
%}\relax\fi.
% I~do not claim to have coped with the task.
%\todo{fix settings}
%
%\begin{quote}
% `The idea is -- analog to the tables for expansion and protrusion -- to
% have tables for optical reduction\slash expansion of spaces in dependence of the
% actual character so that the distance between words is optically equal.
%
% When reducing distances the (weighting) order is:
%\begin{itemize}
%  \item after commas
%    \begin{macrocode}
     {,} = { ,-500,500},
%    \end{macrocode}
%  \item in front of capitals which have optical more room on their left
%        side, \eg, `A', `J', `T', `V', `W', and `Y'
%        [this is not yet possible -- RS]
%  \item in front of capitals which have circle/oval shapes on their left
%        side, \eg, `C', `G', `O', and `Q'
%        [ditto -- RS]
%  \item after `r' (because of the bigger optical room on the righthand side)
%    \begin{macrocode}
      r  = { ,-300,300},
%    \end{macrocode}
%  \item\relax [before or] after lowercase characters with ascenders
%    \begin{macrocode}
      b  = { ,-200,200},
      d  = { ,-200,200},
      f  = { ,-200,200},
      h  = { ,-200,200},
      k  = { ,-200,200},
      l  = { ,-200,200},
      t  = { ,-200,200},
%    \end{macrocode}
%  \item\relax [before or] after lowercase characters with x-height plus descender
%        with additional optical space, \eg, `v', or `w'
%    \begin{macrocode}
      c  = { ,-100,100},
      p  = { ,-100,100},
      v  = { ,-100,100},
      w  = { ,-100,100},
      z  = { ,-100,100},
      x  = { ,-100,100},
      y  = { ,-100,100},
%    \end{macrocode}
%  \item\relax [before or] after lowercase characters with x-height plus descender
%        without additional optical space
%    \begin{macrocode}
      i  = { , 50, -50},
      m  = { , 50, -50},
      n  = { , 50, -50},
      u  = { , 50, -50},
%    \end{macrocode}
%  \item after colon and semicolon
%    \begin{macrocode}
      :  = { ,200,-200},
      ;  = { ,200,-200},
%    \end{macrocode}
%  \item after punctuation which ends a sentence, \eg, period, exclamation
%        mark, question mark
%    \begin{macrocode}
      .  = { ,250,-250},
      !  = { ,250,-250},
      ?  = { ,250,-250}
%    \end{macrocode}
%\end{itemize}
% The order has to be reversed when enlarging is needed.'
%\end{quote}
%    \begin{macrocode}
   }

%</m-t>
%    \end{macrocode}
% Questions are:
%\begin{itemize}
%  \item Is the result really better?
%  \item Is it overdone? (Try with a |factor| \textless\ 1000.)
%  \item Should the first parameter also be used? (Probably.)
%  \item What about quotation marks, parentheses etc.?
%\end{itemize}
%
% Furthermore, there seems to be a \pdftex\ bug with spacing in combination
% with a non-zero \cmd\spaceskip\
% (reported by \contributor Axel Berger <Axel_Berger\at b.maus.de>):
%  ^^A dctt, `myheadings, markboth', 2008/10/06, MID: <200810062134.a58193@b.maus.de>
%\todo{report \pdftex\ bug}
%\begin{verbatim}
%\parfillskip0pt
%\rightskip0pt plus 1em
%\spaceskip\fontdimen2\font
% test test\par
%\pdfadjustinterwordglue2
%\stbscode\font`t=-50
% test test
%\bye
%\end{verbatim}
% Some more characters in <T2A>.\footnote{Contributed by
%                     \contributor Karl Karlsson <karl-karlsson\at yandex.ru>.}
%\changes{v2.3e}{2009/10/28}{settings for <T2A> encoding (contributed by
%                            \contributor Karl Karlsson <karl-karlsson\at yandex.ru>)}
%                                                       ^^A private mail, 2009/10/21
%    \begin{macrocode}
%<*cmr>
\SetExtraSpacing
   [ name     = T2A,
     load     = default ]
   { encoding = T2A,
     family   = cmr }
   {
      \cyrg  = { ,-300,300},
      \cyrb  = { ,-200,200},
      \cyrk  = { ,-200,200},
      \cyrs  = { ,-100,100},
      \cyrr  = { ,-100,100},
      \cyrh  = { ,-100,100},
      \cyru  = { ,-100,100},
      \cyrt  = { , 50, -50},
      \cyrp  = { , 50, -50},
      \cyri  = { , 50, -50},
      \cyrishrt  = { , 50, -50},
   }

%    \end{macrocode}
%
% \subsubsection{Nonfrenchspacing}
% The following settings simulate \cmd\nonfrenchspacing\ (since space factors
% will be ignored when spacing adjustment is in effect). They may be used for
% English contexts.
%
% From the \TeX book:
%\begin{quote}
%                                                                   `If the
% space factor $f$ is different from 1000, the interword glue is computed as
% follows:  Take the normal space glue for the current font, and add the
% extra space if $f\ge2000$.
%  [\,\dots]
% Then the stretch component is multiplied by $f/1000$, while the shrink
% component is multiplied by $1000/f$.'
%\end{quote}
% The `extra space' (\fontdim7) for Computer Modern Roman is a third of
% \fontdim2, \ie, 333.
%    \begin{macrocode}
\SetExtraSpacing
   [ name     = nonfrench-cmr,
     load     = default,
     context  = nonfrench ]
   { encoding = {OT1,T1,LY1,OT4,QX,T5},
     family   = cmr }
   {
%    \end{macrocode}
% \file{latex.ltx} has:
%\begin{verbatim}[morekeywords={[1]{\nonfrenchspacing}}]
%\def\nonfrenchspacing{
%  \sfcode`\. 3000
%  \sfcode`\? 3000
%  \sfcode`\! 3000
%\end{verbatim}
%    \begin{macrocode}
     . = {333,2000,-667},
     ? = {333,2000,-667},
     ! = {333,2000,-667},
%    \end{macrocode}
%\begin{verbatim}
%  \sfcode`\: 2000
%\end{verbatim}
%    \begin{macrocode}
     : = {333,1000,-500},
%    \end{macrocode}
%\begin{verbatim}
%  \sfcode`\; 1500
%\end{verbatim}
%    \begin{macrocode}
     ; = {   , 500,-333},
%    \end{macrocode}
%\begin{verbatim}
%  \sfcode`\, 1250
%\end{verbatim}
%    \begin{macrocode}
    {,}= {   , 250,-200}
%    \end{macrocode}
%\begin{verbatim}
%}
%\end{verbatim}
%    \begin{macrocode}
   }

%</cmr>
%    \end{macrocode}
% \pkg{fontinst}, however, which is also used to create the \pkg{psnfss} font
% metrics, sets \fontdim7 to 240 by default. Therefore, the fallback settings
% use this value for the first component.
%    \begin{macrocode}
%<*m-t>
\SetExtraSpacing
   [ name     = nonfrench-default,
     load     = default,
     context  = nonfrench ]
   { encoding = {OT1,T1,LY1,OT4,QX,T5} }
   {
     . = {240,2000,-667},
     ? = {240,2000,-667},
     ! = {240,2000,-667},
     : = {240,1000,-500},
     ; = {   , 500,-333},
    {,}= {   , 250,-200}
   }

%    \end{macrocode}
%
% \subsection{Additional kerning}
%\GeneralChanges{Kerning}
%
% Default unit is \EM{1}.
%
%    \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% ADDITIONAL KERNING

%    \end{macrocode}
% A dummy list to be loaded when no context is active.
%    \begin{macrocode}
\SetExtraKerning
   [ name = empty ]
   { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1} }
   { }

%    \end{macrocode}
%
%\subsubsection{French}
%
% The ratio of \fontdim2 to \fontdim6 varies for different fonts, so that
% either the kerning of the colon (which should be a space, \ie, \fontdim2) or
% that of the other punctuation characters (\TeX's \cmd\thinspace, \ie, one
% sixth of \fontdim6) may be inaccurate, depending on which |unit| we choose
% (|space| or |1em|). For Times, for example, a thin space would be 665. I
% don't know whether French typography really wants a thin space, or rather (as
% it happens to turn out with <CMR>) half a space.
% (Wikipedia\footnote{\url{http://fr.wikipedia.org/wiki/Espace_typographique}, 5 July 2007.}
% claims it should be a quarter of an em, which seems too much to me; then
% again, it also says that this \emph{was} a thin space in French typography.)
%    \begin{macrocode}
\SetExtraKerning
   [ name     = french-default,
     context  = french,
     unit     = space   ]
   { encoding = {OT1,T1,LY1} }
   {
     :  = {1000,}, % = \fontdimen2
     ;  = {500, }, % ~ \thinspace
     !  = {500, },
     ?  = {500, }
   }

%    \end{macrocode}
% These settings have the disadvantage that a word following a left guillemet
% will not be hyphenated. This might be fixed in \pdftex.
%    \begin{macrocode}
\SetExtraKerning
   [ name     = french-guillemets,
     context  = french-guillemets,
     load     = french-default,
     unit     = space   ]
   { encoding = {T1,LY1} }
   {
    \guillemotleft  = { ,800}, % = 0.8\fontdimen2
    \guillemotright = {800, }
   }

\SetExtraKerning
   [ name     = french-guillemets-OT1,
     context  = french-guillemets,
     load     = french-default,
     unit     = space   ]
   { encoding = OT1     }
   { }

%    \end{macrocode}
%
%\subsubsection{Turkish}
%
%    \begin{macrocode}
\SetExtraKerning
   [ name     = turkish,
     context  = turkish ]
   { encoding = {OT1,T1,LY1} }
   {
     :  = {167, }, % = \thinspace
     !  = {167, },
    {=} = {167, }
   }

%</m-t>
%</config>
%    \end{macrocode}
%^^A\changes{v2.0}{2006/12/28}{remove \texttt{letterspacing} settings}
%
%\ifpdf
%\GeneralChanges{Documentation}
%^^A The OpenType configuration files are outsourced to an external file,
%^^A since they are typeset with \luatex.
%
%\newwrite          \utftmp
%\immediate\openout \utftmp=microtype-utf.tmp
%\immediate\write   \utftmp{\string\setcounter{section}{\the\c@section}}
%\immediate\write   \utftmp{\string\setcounter{CodelineNo}{\the\c@CodelineNo}}
%\immediate\write   \utftmp{\string\setcounter{page}{\the\c@page}}
%\immediate\write   \utftmp{\string\setcounter{footnote}{\the\c@footnote}}
%\immediate\closeout\utftmp
%
%\InputIfFileExists{microtype.tmp}\relax{\def\utfsectioni{1}\def\utfsectionii{1}}
%
%\IfFileExists{microtype-utf.pdf}
%   {\includepdf[pages=-,
%                addtotoc={1,section,1,OpenType configuration files,sec:OpenType,
%                          \utfsectioni,subsection,2,Character inheritance,sub:OT-inheritance,
%                          \utfsectionii,subsection,2,Character protrusion,sub:OT-protrusion}]
%               {microtype-utf.pdf}}
%   {\section{OpenType configuration settings}
%       To view the OpenType configuration settings, first typeset
%       \file{microtype-utf.dtx} with \luatex.}
%
%\GeneralChanges*
%\else
% \fallbacktext{The original documentation\footnote{
%     \ctanurl{macros/latex/contrib/microtype/microtype.pdf}.}
%   also includes the OpenType configuration files.}
%\fi
%
%\section{Auxiliary file for micro fine tuning}
%
% This file can be used to test protrusion and expansion settings.
%    \begin{macrocode}
%<*test>
\documentclass{article}

%% Here you can specify the font you want to test, using
%% the commands \fontfamily, \fontseries and \fontshape.
%% Make sure to end all lines with a comment character!
\newcommand*\TestFont{%
  \fontfamily{ppl}%
%%  \fontseries{b}%
%%  \fontshape{it}% sc, sl
}

\usepackage{ifthen}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[verbose,expansion=alltext,stretch=50]{microtype}

\pagestyle{empty}
\setlength{\parindent}{0pt}
\newcommand*\crulefill{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill}
\newcommand*\testprotrusion[2][]{%
  \ifthenelse{\equal{#1}{r}}{}{#2}%
  lorem ipsum dolor sit amet,
    \ifthenelse{\equal{#1}{r}}{\crulefill}{\leftarrowfill} #2
    \ifthenelse{\equal{#1}{l}}{\crulefill}{\rightarrowfill}
  you know the rest%
  \ifthenelse{\equal{#1}{l}}{}{#2}%
  \linebreak
  {\fontencoding{\encodingdefault}%
  \fontseries{\seriesdefault}%
  \fontshape{\shapedefault}%
  \selectfont
  Here is the beginning of a line, \dotfill and here is its end}\linebreak
}
\newcommand*\showTestFont{\expandafter\stripprefix\meaning\TestFont}
\def\stripprefix#1>{}
\newcount\charcount
\begin{document}

\microtypesetup{expansion=false}

{\centering The font in this document is called by:\\
 \texttt{\showTestFont}\par}\bigskip

\TestFont\selectfont
 This line intentionally left empty\linebreak
%% A -- Z
\charcount=65
\loop
  \testprotrusion{\char\charcount}
  \advance\charcount 1
  \ifnum\charcount < 91 \repeat
%% a -- z
\charcount=97
\loop
  \testprotrusion{\char\charcount}
  \advance\charcount 1
  \ifnum\charcount < 123 \repeat
%% 0 -- 9
\charcount=48
\loop
  \testprotrusion{\char\charcount}
  \advance\charcount 1
  \ifnum\charcount < 58 \repeat
%%
 \testprotrusion[r]{,}
 \testprotrusion[r]{.}
 \testprotrusion[r]{;}
 \testprotrusion[r]{:}
 \testprotrusion[r]{?}
 \testprotrusion[r]{!}
 \testprotrusion[l]{\textexclamdown}
 \testprotrusion[l]{\textquestiondown}
 \testprotrusion[r]{)}
 \testprotrusion[l]{(}
 \testprotrusion{/}
 \testprotrusion{\char`\\}
 \testprotrusion{-}
 \testprotrusion{\textendash}
 \testprotrusion{\textemdash}
 \testprotrusion{\textquoteleft}
 \testprotrusion{\textquoteright}
 \testprotrusion{\textquotedblleft}
 \testprotrusion{\textquotedblright}
 \testprotrusion{\quotesinglbase}
 \testprotrusion{\quotedblbase}
 \testprotrusion{\guilsinglleft}
 \testprotrusion{\guilsinglright}
 \testprotrusion{\guillemotleft}
 \testprotrusion{\guillemotright}

\newpage
The following displays the current font stretched by 5\%,
normal, and shrunk by 5\%:

\bigskip
\newlength{\MTln}
\newcommand*\teststring
  {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789}
\settowidth{\MTln}{\teststring}
\microtypesetup{expansion=true}

\parbox{1.05\MTln}{\teststring\linebreak\\
                   \teststring}\par\bigskip
\parbox{0.95\MTln}{\teststring}

\end{document}
%</test>
%    \end{macrocode}
% Needless to say that things may always be improved. For suggestions, mail to
% \mailtoRS.
%
% ^^A -------------------------------------------------------------------------
%
% \newpage
% \appendix
% \AppendixSettings
% \GeneralChanges{Documentation}
%
%\changes{v2.5}{2013/02/23}{include \file{microtype-logo.dtx} and \file{microtype-lssample.dtx}}
% \InputIfFileExists{microtype-logo.dtx}\relax\relax
% \InputIfFileExists{microtype-lssample.dtx}\relax\relax
%
% \PrintChanges
%
% ^^A -------------------------------------------------------------------------
%\makeatother
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
% \CheckSum{10748}
%
% \Finale
%
\endinput
%
% -----------------------------------------------------------------------------

 *** Typesetting the documentation ***

  The documentation of this package (microtype.pdf) can be found on CTAN,
  if it isn't already installed in your TeX system, so there should be no
  need to re-typeset it.
  If you still want to do this, there are some requirements to consider
  and some steps to follow:

#  (1) In microtype.ins, uncomment the lines:
%\generate{\makefile{microtype-gind.ist}{docist}}
#      and
%\generate{\makefile{microtype-doc.sty}{docsty}}
#  (2) Install the package by running:
pdflatex microtype.ins
#  (3) Extract microtype-lssample.dtx and microtype-logo.dtx from
#      microtype.pdf (ie., from the file you are about to recreate ...).
#      This can be done, eg., with Adobe Reader or with the pdftk tool.
#  (4) Run
pdflatex microtype.dtx
pdflatex microtype.dtx
#      [ The following fonts are required:
#        - Bitstream Charter
#        - Bitstream LetterGothic
#        - Adobe Source Sans Pro
#        - Adobe Wittenberger Fraktur MT (alternatively yfrak)
#        - Adobe Zapf Chancery (alternatively URW Zapf Chancery)
#        - Adobe Kepler MM (for microtype-logo.dtx, input by microtype.dtx)
#        - Adobe Caslon (for microtype-lssample.dtx, input by microtype.dtx) ]
#  (5) Run
makeindex -s microtype-gind.ist microtype
#  (6) Run
makeindex -s gglo.ist -o microtype.gls microtype.glo microtype-utf.glo
#  (7) Run
lualatex microtype-utf.dtx
#      [ The following fonts are required:
#        - Bitstream Charter (Type 1)
#        - Bitstream LetterGothic (Type 1)
#        - Adobe Source Sans Pro (Type 1)
#        - Latin Modern Roman (OpenType)
#        - Charis SIL (OpenType)
#        - TeX Gyre Pagella (OpenType) ]
#  (8) Run
pdflatex microtype.dtx
#  (9) Run
makeindex -s microtype-gind.ist microtype
# (10) Run
makeindex -s gglo.ist -o microtype.gls microtype.glo microtype-utf.glo
# (11) Run
pdflatex microtype.dtx
#
# That's it, although I still may have forgotten some things ...
%
% -- RS
% -----------------------------------------------------------------------------
%
% vim: ts=2:sw=2:et:
%