summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
blob: 556ededf48d143e11674d39ad07ce8aa61be88d9 (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
% \iffalse meta-comment
% vim: textwidth=75
%<*internal>
\iffalse
%</internal>
%<*readme>
|
--------:| ----------------------------------------------------------------
nameauth:| Name authority mechanism for consistency in text and index
  Author:| Charles P. Schaum
  E-mail:| charles dot schaum at comcast dot net
 License:| Released under the LaTeX Project Public License 1.3c or later
     See:| http://www.latex-project.org/lppl.txt


Short description:

The nameauth package automates the correct formatting and indexing of names
for professional writing. This aids the use of a name authority and the
editing process without needing to retype name references.

Files		 Distribution

README       This file
nameauth.pdf Documentation
examples.tex Some longer example macros from the documentation

Makefile     Automates building with GNU make 3.81
nameauth.dtx Documented LaTeX file containing both code and documentation

Manual Installation

Download the package from

www.ctan.org/tex-archive/macros/latex/contrib/nameauth

Unpack nameauth.zip in an appropriate directory.

Note that the instructions below assume that you are using a kind of
Unix, BSD, Linux, Mac, or Cygwin under Microsoft Windows. If you have
a different operating environment, you will need to modify these
instructions to your own needs. Please be aware that this package is
designed to be stored in a UTF-8 encoded text file and built in a
Unicode-capable environment.

If you have a make utility compatible with GNU make you can type

	make inst

to install the package into your $TEXMFHOME tree or

	make install

to install the package into your $TEXMFLOCAL tree for all users.

Manually, you can generate the package files. First you generate the
installer driver, README, and style files, with a preliminary PDF:

	pdflatex -shell-escape -recorder -interaction=batchmode nameauth.dtx

Next you generate the PDF with a table of contents and all cross-references
validated, so that the index entries will not move:

	pdflatex --recorder --interaction=nonstopmode nameauth.dtx
	
The next commands generate the glossary/index and final pdf file
	
	makeindex -q -s gglo.ist -o nameauth.gls nameauth.glo
	makeindex -q -s gind.ist -o nameauth.ind nameauth.idx
	pdflatex --recorder --interaction=nonstopmode nameauth.dtx
	pdflatex --recorder --interaction=nonstopmode nameauth.dtx

Normally you create the following manual installation directories for user:

	$TEXMFHOME/source/latex/nameauth		dtx file
	$TEXMFHOME/tex/latex/nameauth			sty file
	$TEXMFHOME/doc/latex/nameauth			pdf file, README, examples.tex
		
and you create the following manual installation directories for local site:

	$TEXMFLOCAL/source/latex/nameauth		dtx file
	$TEXMFLOCAL/tex/latex/nameauth			sty file
	$TEXMFLOCAL/doc/latex/nameauth			pdf file, README, examples.tex

The above environment variables often are /usr/local/texlive/texmf-local and
~/texmf.

The make process normally renames the README.txt file created from the dtx file
to just README by using mv (move/rename utility in the *nix userland). Windows
distributions of TeX and LaTeX often keep the txt file as well.

Run mktexlsr with the appropriate level of permissions to complete the install.

Testing notes:

This package and documentation work and build with latex, lualatex, pdflatex,
and xelatex. It can be used with makeindex/texindy.

For testing, the make file permits one to change the typesetting engine
on the command line. The default is to build the package and documentation
with pdflatex. See the make file for details.

License

This material is subject to the LaTeX Project Public License:
http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html

Happy TeXing!
%</readme>
%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse
\preamble

--------:| ----------------------------------------------------------------
nameauth:| Name authority mechanism for consistency in text and index
  Author:| Charles P. Schaum
  E-mail:| charles dot schaum at comcast dot net
 License:| Released under the LaTeX Project Public License 1.3c or later
     See:| http://www.latex-project.org/lppl.txt

\endpreamble
\postamble

Copyright (C) 2017 by Charles P. Schaum <charles dot schaum at comcast dot net>

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License (LPPL), either
version 1.3c of this license or (at your option) any later
version.  The latest version of this license is in the file:

http://www.latex-project.org/lppl.txt

This work is "maintained" (as per LPPL maintenance status) by
Charles P. Schaum.

This work consists of the files nameauth.dtx, examples.tex, and a Makefile.
Running "make" generates the derived files README, nameauth.pdf and
nameauth.sty. Running "make inst" installs the files in the user's TeX tree.
Running "make install" installs the files in the local TeX tree.

\endpostamble

\usedir{tex/latex/nameauth}
\generate{
  \file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
%</install>
%<install>\endbatchfile
%<*internal>
\usedir{source/latex/nameauth}
\generate{
  \file{\jobname.ins}{\from{\jobname.dtx}{install}}
}
\nopreamble\nopostamble
\usedir{doc/latex/nameauth}
\generate{
  \file{README.txt}{\from{\jobname.dtx}{readme}}
}
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{nameauth.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{nameauth}
%<*package>
    [2017/03/22 3.2 Name authority mechanism for consistency in text and index]
%</package>
%<*driver>
\documentclass[11pt]{ltxdoc}
\usepackage[textwidth=137mm,textheight=237mm,right=25mm,marginparwidth=40mm,nohead]{geometry}
\usepackage{ifxetex}
\usepackage{ifluatex}
\usepackage{ifpdf}
\ifdefined\Umathchar
  \usepackage{fontspec}
  \usepackage{polyglossia}
  \setdefaultlanguage{american}
  \setotherlanguage{german}
  \newcommand\de[1]{\textgerman{#1}}
\else
  \usepackage[utf8]{inputenc}
  \usepackage[TS1,T1]{fontenc}
  \usepackage{newunicodechar}
  \usepackage{lmodern}
  \DeclareTextSymbolDefault{\textlongs}{TS1}
  \DeclareTextSymbol{\textlongs}{TS1}{115}
  \newunicodechar{ſ}{\textlongs}
  \usepackage[ngerman,american]{babel}
  \newcommand\de[1]{\foreignlanguage{ngerman}{#1}}
\fi
\usepackage{\jobname}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{makeidx}
\usepackage{manfnt}
\usepackage[toc]{multitoc}
\usepackage{setspace}
\ifxetex\usepackage{tikz}\else\ifpdf\usepackage{tikz}\fi\fi
\usepackage{xcolor}
\colorlet{naviolet}{violet!80!black}
\colorlet{nagreen}{green!40!black}
\colorlet{naolive}{olive!90!black}
\colorlet{naorange}{orange!50!black}
\colorlet{nared}{red!60!black}
\usepackage[numbered]{hypdoc}
\makeatletter
\newcommand\NO{\@ifstar%
{\textcolor{nared}{\large\strut {\hbox to 2.5em{\hfil\S\textsf{No}\hfil}}}}{\textcolor{nared}{\large\strut {\hbox to 2.5em{\hfil\textsf{No}\hfil}}}}}
\newcommand\YES{\@ifstar%
{\textcolor{nagreen}{\large\strut\bfseries \fbox{\hbox to 2.1em{\hfil*\textsf{Yes}\hfil}}}}{\textcolor{nagreen}{\large\strut\bfseries \fbox{\hbox to 2.1em{\hfil\textsf{Yes}\hfil}}}}}
\makeatother
\setlist{rightmargin=\leftmargin,itemsep=0pt}
\frenchspacing
\DisableCrossrefs
\CodelineIndex
\RecordChanges
\begin{nameauth}
  \< Cath & Catherine \noexpand\AltCaps{d}e'
          & \noexpand\textSC{Medici} & >
  \< Aeth & & Æthelred, II & >
  \< Unraed & & Æthelred, II & Unrædig >
  \< Anth & Susan B. & Anthony & >
  \< Aris & & Aristotle & >
  \< Attil & & Attila, the Hun & >
  \< Cicero & M.T. & Cicero & >
  \< Confucius & & Confucius & >
  \< Mencius & & \noexpand\textSC{Mencius} & >
  \< Dagb & & Dagobert & I >
  \< Dem & & Demetrius, I & >
  \< deSmet & Pierre-Jean &
              \noexpand\Fbox{\noexpand\AltCaps{d}e Smet} & >
  \< Einstein & Albert & Einstein & >
  \< Eliz & & Elizabeth, I & >
  \< Fukuyama & & \textUC{Fukuyama}, Takeshi & >
  \< Harnack & Adolf & Harnack & >
  \< Henry & & Henry & VIII >
  \< JayR & John David & Rockefeller, IV & Jay >
  \< Adams & John & \noexpand\textSC{Adams} & >
  \< JRIII & John David & \textSC{Rockefeller},\textSC{III} & >
  \< JRIV & John David & Rockefeller, IV & >
  \< JWG & J.W. von & Goethe & >
  \< KempMed & & Thomas, à~Kempis & >
  \< KempAlt & & Thomas & à~Kempis >
  \< KempW & Thomas & à~Kempis & >
  \< Konoe & Fumimaro & Konoe & >
  \< CSL & Clive Staples & Lewis & C.S. >
  \< Lewis & Clive Staples & Lewis & >
  \< Luth & Martin & \noexpand\textSC{Luther} & >
  \< Miyaz & & Miyazaki, Hayao & >
  \< MSens & & Miyazaki, Hayao & Sensei >
  \< OFukuyama & & \textUC{Fukuyama} & Takeshi >
  \< Pat & George S. & Patton, Jr. & >
  \< HAR & & Harun, \noexpand\textSC%
             {\noexpand\AltCaps{a}l-Rashid} & >
  \< SDJR & Sammy & \noexpand\textSC{Davis},
                    \noexpand\textSC{Jr}. & >
  \< Soto & Hernando & de Soto & >
  \< Striet & John & Strie\-tel\-meier & >
  \< Strieti & John & \de{Strietelmeier} & >
  \< VBuren & Martin & Van Buren & >
  \< Sun & & Sun, Yat-sen & >
  \< Wash & George & Washington & >
  \< Washs & George & Washington's & >
  \< White & E.\,B. & White & >
  \< Yamt & & Yamamoto, Isoroku & >
  \< Yosh & & Yoshida & Shigeru >
\end{nameauth}
\ExcludeName[George]{Washington's}
\PretagName{Demetrius, I}{Demetrius 1}
\PretagName{Elizabeth, I}{Elizabeth 1}
\PretagName{Friedrich, I}{Friedrich 1}
\PretagName[Catherine \noexpand\AltCaps{d}e']
           {\noexpand\textSC{Medici}}{Medici, Catherine de}
\PretagName[E.\,B.]{White}{White, E. B.}
\PretagName[Martin]{\noexpand\textSC{Luther}}{Luther, Martin}
\PretagName[Greta]{\textSC{Garbo}}{Garbo, Greta}
\PretagName[Heinrich Wilhelm]{\textSC{Rühmann}}{Ruehmann, Heinrich Wilhelm}
\PretagName[Heinz]{\textSC{Rühmann}}{Ruehmann, Heinz}
\PretagName[Jan]{Łukasiewicz}{Lukasiewicz, Jan}
\PretagName[John David]{\textSC{Rockefeller},\textSC{III}}
           {Rockefeller, John David 3}
\PretagName[John David]{Rockefeller, IV}{Rockefeller, John David 4}
\PretagName[John]{\noexpand\textSC{Adams}}{Adams, John}
\PretagName[John]{Strie\-tel\-meier}{Strietelmeier, John}
\PretagName[John]{\de{Strietelmeier}}{Strietelmeier, John}
\PretagName[Pierre-Jean]%
           {\noexpand\Fbox{\noexpand\AltCaps{d}e Smet}}%
           {de Smet, Pierre-Jean}
\PretagName[Sammy]
           {\noexpand\textSC{Davis}, \noexpand\textSC{Jr}.}
           {Davis, Sammy, Jr.}
\PretagName{\textUC{Tokugawa}, Ieyasu}{Tokugawa Ieyasu}
\PretagName{Bo\"ethius}{Boethius}
\PretagName[Ada]{\textIT{Lovelace}}{Lovelace, Ada}
\PretagName[Charles]{\textBF{Babbage}}{Babbage, Charles}
\PretagName{\noexpand\textSC{Meng}, Ke}{Meng Ke}
\PretagName{\noexpand\textSC{Mencius}}{Mencius}
\PretagName{\textUC{Fukuyama}, Takeshi}{Fukuyama, T}
\PretagName{Harun, \noexpand\textSC%
           {\noexpand\AltCaps{a}l-Rashid}}{Harun al-Rashid}
\PretagName{Æthelred, II}{Aethelred 2}
\PretagName{Atatürk}{Ataturk}
\PretagName{Thomas, à~Kempis}{Thomas a Kempis}
\PretagName{Vlad, Ţepeş}{Vlad Tepes}
\PretagName[Frenec]{Molnár}{Molnar, Frenec}
\PretagName[Wm.]{\noexpand\textSC{Shakespeare}}{Shakespeare, William}
\TagName[e.e.]{cummings}{|hyperpage}
\TagName[Martin]{Van Buren}{, pres.|hyperpage}
\TagName[Frenec]{Molnár}{\dag|hyperpage}
\TagName[Martin]{\noexpand\textSC{Luther}}{|hyperpage}
\TagName{\textUC{Tokugawa}, Ieyasu}{|hyperpage}
\TagName[Ada]{\textIT{Lovelace}}{|hyperpage}
\TagName[Charles]{\textBF{Babbage}}{|hyperpage}
\TagName{Bo\"ethius}{|hyperpage}
\TagName[Susan B.]{Anthony}{|hyperpage}
\TagName[Adolf]{Harnack}{|hyperpage}
\TagName[Albert]{Einstein}{|hyperpage}
\TagName[Bob]{Hope}{|hyperpage}
\TagName[Catherine \noexpand\AltCaps{d}e']{\noexpand\textSC{Medici}}{|hyperpage}
\TagName[Charles]{du Fresne}{|hyperpage}
\TagName[Charlie]{Chaplin}{|hyperpage}
\TagName[Chesley B.]{Sullenberger, III}{|hyperpage}
\TagName[Clive Staples]{Lewis}{|hyperpage}
\TagName[Dan]{Luecking}{|hyperpage}
\TagName[E.\,B.]{White}{|hyperpage}
\TagName[Enrico]{Gregorio}{|hyperpage}
\TagName{Friedrich, I}{ Barbarossa, emperor|hyperpage}
\TagName[Fumimaro]{Konoe}{\dag, PM|hyperpage}
\TagName[George S.]{Patton, Jr.}{|hyperpage}
\TagName[George]{Eliot}{|hyperpage}
\TagName[George]{Washington}{, pres.|hyperpage}
\TagName[Greta]{\textSC{Garbo}}{|hyperpage}
\TagName[Heiko]{Oberdiek}{|hyperpage}
\TagName[Heinz]{\textSC{Rühmann}}{|hyperpage}
\TagName[Hernando]{de Soto}{|hyperpage}
\TagName[J.E.]{Carter, Jr.}{, pres.|hyperpage}
\TagName[J.W. von]{Goethe}{|hyperpage}
\TagName[Jan]{Łukasiewicz}{|hyperpage}
\TagName[Jesse]{Ventura}{|hyperpage}
\TagName[John David]{\textSC{Rockefeller},\textSC{III}}{|hyperpage}
\TagName[John David]{Rockefeller, IV}{|hyperpage}
\TagName[John Maynard]{Keynes}{|hyperpage}
\TagName[John]{\noexpand\textSC{Adams}}{, pres.|hyperpage}
\TagName[John]{Smith}{*|hyperpage}
\TagName[John]{Strie\-tel\-meier}{|hyperpage}
\TagName[John]{\de{Strietelmeier}}{|hyperpage}
\TagName[Lafcadio]{Hearn}{|hyperpage}
\TagName[Louis]{Gossett, Jr.}{|hyperpage}
\TagName[M.T.]{Cicero}{|hyperpage}
\TagName[Marc van]{Dongen}{|hyperpage}
\TagName[Mark]{Twain}{|hyperpage}
\TagName[Martin Luther]{King, Jr.}{|hyperpage}
\TagName[Mike]{Tyson}{|hyperpage}
\TagName[Mustafa]{Kemal}{|hyperpage}
\TagName[Nicolas]{Malebranche}{|hyperpage}
\TagName[Oskar]{Hammerstein, II}{|hyperpage}
\TagName[Philipp]{Stephani}{|hyperpage}
\TagName[Pierre-Jean]{\noexpand\Fbox{\noexpand\AltCaps{d}e Smet}}{|hyperpage}
\TagName[Robert]{Schlicht}{|hyperpage}
\TagName[Rudolph]{Carnap}{|hyperpage}
\TagName[R.]{Snel van Royen}{|hyperpage}
\TagName[Sammy]{\noexpand\textSC{Davis}, \noexpand\textSC{Jr}.}{|hyperpage}
\TagName[Schuyler]{Colfax}{, v.p.|hyperpage}
\TagName[The Amazing]{Kreskin}{|hyperpage}
\TagName[Ulysses S.]{Grant}{, pres.|hyperpage}
\TagName[Uwe]{Lueck}{|hyperpage}
\TagName[W.E.B.]{Du Bois}{|hyperpage}
\TagName[W.]{Snel van Royen}{|hyperpage}
\TagName[Yoko]{Kanno}{\dag|hyperpage}
\TagName{\noexpand\textSC{Mencius}}{|hyperpage}
\TagName{\textUC{Fukuyama}, Takeshi}{|hyperpage}
\TagName{Æthelred, II}{, king|hyperpage}
\TagName{Arai, Akino}{|hyperpage}
\TagName{Aristotle}{|hyperpage}
\TagName{Attila, the Hun}{|hyperpage}
\TagName{Bernard, of Clairvaux}{|hyperpage}
\TagName{Boris, the Animal}{*|hyperpage}
\TagName{Chiang}[Kai-shek]{\ddag, pres.|hyperpage}
\TagName{Confucius}{|hyperpage}
\TagName{Dagobert}[I]{\ddag, king|hyperpage}
\TagName{Demetrius, I}{ Soter, king|hyperpage}
\TagName{Elizabeth, I}{, queen|hyperpage}
\TagName{Gregory, I}{, pope|hyperpage}
\TagName{Harun, \noexpand\textSC{\noexpand\AltCaps{a}l-Rashid}}{|hyperpage}
\TagName{Henry}[VIII]{\ddag, king|hyperpage}
\TagName{Ishida}[Yoko]{\ddag|hyperpage}
\TagName{John, Eriugena}{|hyperpage}
\TagName{Lao-tzu}{|hyperpage}
\TagName{Leo, I}{, pope|hyperpage}
\TagName{Louis, XIV}{, king|hyperpage}
\TagName{Maimonides}{|hyperpage}
\TagName{Miyazaki, Hayao}{|hyperpage}
\TagName{Rambam}{|hyperpage}
\TagName{Sun, Yat-sen}{, pres.|hyperpage}
\TagName{Thomas, à~Kempis}{|hyperpage}
\TagName{Thomas, Aquinas}{|hyperpage}
\TagName{Vlad II, Dracul}{|hyperpage}
\TagName{Vlad III, Dracula}{|hyperpage}
\TagName{Voltaire}{|hyperpage}
\TagName{William, I}{|hyperpage}
\TagName{Yamamoto, Isoroku}{|hyperpage}
\TagName{Yohko}{|hyperpage}
\TagName{Yoshida}[Shigeru]{\ddag, PM|hyperpage}
\TagName[Wm.]{\noexpand\textSC{Shakespeare}}{|hyperpage}
\NameAddInfo{Friedrich, I}{Barbarossa}
\IndexActual{=}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{3502}
%
% \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         \~}
%
% \changes{0.7}{2011/12/26}{Initial release}
% \changes{2.0}{2015/11/11}{Use dtxgen template; prevent malformed input}
% \changes{2.5}{2016/04/06}{No default formatting}
% \changes{2.6}{2016/09/19}{Fix older syntax}
% \changes{3.1}{2017/01/13}{Fix logic, arg tests}
% \changes{3.2}{2017/03/22}{Use \cmd{\MakeUppercase} instead of \cmd{\uppercase}}
% \GetFileInfo{\jobname.dtx}
% \DoNotIndex{\@empty, \@gobble, \@period, \@token, \trim@spaces, \zap@space}
% \DoNotIndex{\begingroup, \bfseries, \bgroup, \csdef, \csgdef, \csname, \csundef, \DeclareOption, \def, \detokenize, \edef, \egroup, \else, \endcsname, \endgroup, \endinput, \ExecuteOptions, \expandafter, \fi, \futurelet, \global, \hbox, \if, \ifcsname, \ifx, \ignorespaces, \index, \itshape, \leavevmode, \let, \newcommand, \newcommandx, \newenvironment, \newif, \nobreakspace, \PackageError, \PackageWarning, \ProcessOptions, \relax, \renewcommand, \RequirePackage, \scshape, \space, \textbackslash, \uppercase}
%
% \newif\ifDoTikZ
% \newif\ifNoTag
%
% \ifxetex\DoTikZtrue\else\ifpdf\DoTikZtrue\fi\fi
% \renewcommand*\FrontNamesFormat[1]{\color{nagreen}\sffamily #1}
% \renewcommand*\FrontNameHook[1]{\color{naolive}\sffamily #1}
% \renewcommand*\NamesFormat[1]{\color{naviolet}\sffamily #1}
% \renewcommand*\MainNameHook[1]{\color{naorange}\sffamily #1}
%
% \title{\textsf{nameauth} --- Name authority mechanism\\ for consistency in text and
% index\thanks{This file describes version \fileversion, last revised \filedate.}}
% \author{Charles P. Schaum\thanks{E-mail: charles dot schaum at comcast dot net}}
% \date{Released \filedate}
%
% \maketitle
%
% \begin{abstract}
% \noindent The \textsf{nameauth} package automates the correct formatting and indexing of names for professional writing. This aids the use of a \textbf{name authority} and the editing process without needing to retype name references.
% \end{abstract}
%
% {\small\tableofcontents}
% \setlength{\parskip}{0.1\baselineskip plus .05\baselineskip minus .05\baselineskip}
%
% \section{Quick Start}
% \subsection{Introduction}
% \begin{center}\large\bfseries Disclaimer\end{center}
% \noindent This manual uses names of living and dead historical figures because users refer to real people. At no time do I intend any disrespect or statement of bias for or against any particular person, culture, or tradition. All names herein (as I know them) are used only for teaching purposes, and I strive to respect those names.
%
% \begin{center}\large\bfseries Denotative Signs\end{center}
% \noindent In the index, fictional names have an asterisk (*). In this manual, ``non-native'' Eastern names are shown with a dagger (\dag). Names that use the older non-Western syntax are shown with a double dagger (\ddag). These signs are not added by the package macros and will not appear in users' works unless they add them.
%
% \begin{center}\large\bfseries Design\end{center}
% \noindent When publications use hundreds of names, it takes time and money to manage and check them. This package handles much of that work in order to save time and money. One can implement a name authority, a master list of related names and variants.
% \begin{itemize}\small
% \item \textbf{Automate} name forms to aid professional writing. 
% \begin{itemize}
%   \item Move blocks of text and see the names reformat themselves.
%   \item Default to long name references first, then shorter ones.
%   \item Use name variants only in the body text, not the index.
% \end{itemize}
% \item Permit \textbf{complex name formatting}. Default is English typography.
% \item More\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} \textbf{cross-cultural naming conventions} are possible. A basic form of  ``Continental'' formatting has been integrated into the package instead of being a user add-on (Sections~\ref{sec:accents}, \ref{sec:altformat}, \ref{sec:IndexSort}, and~\ref{sec:Hooksc}).
% \item \textbf{Automatic sort keys and tags} aid indexing.
% \item One can \textbf{automate information retrieval} about names.
% \item Indexing generally conforms to the standard in Nancy C. Mulvany, \emph{Indexing Books} (Chicago: University of Chicago Press, 1994). All references [\hypertarget{Mulvany}{Mulvany}] refer to this edition. This was thought suitable for most disciplines.
% \item Notable\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} changes correspond to package version numbers in the margin.
% \item The\marginpar{\small\raggedleft\dbend} ``dangerous bend'' is used throughout this manual to show where caution is needed to sort out some technical points.
% \item Please see Section~\ref{sec:notes} for technical notes regarding general questions about package design, this manual, and the package building and release process.
% \end{itemize}
%
% \begin{center}\large\bfseries Thanks\end{center}
% \noindent Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani}, \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, and \Name[Robert]{Schlicht} for their assistance in the early versions of this package. Thanks also to users for valuable feedback.
% \clearpage
%
% \subsection{Basic Concepts}
% \label{sec:start}
%
% Name forms are ambiguous apart from historical and cultural contexts. This package uses that ambiguity to encode names in order to avoid changing the order in which one enters names in one's native culture. In this manual we refer to three general classes of names, shown below. It is helpful to become familiarized with this terminology. Other naming systems can be adapted to these general categories with some caveats, \emph{e.g.}, Icelandic, Hungarian, etc.
%
% For teaching purposes, we highlight names using sans-serif and use color to show first and subsequent uses of names (see also Sections~\ref{sec:formatting} and~\ref{sec:tweaks}).
%
% Professional writing calls for the full form of a person's name when first used, with shorter forms used thereafter. The name parts that define each class are shown in black, with optional elements in red.\footnote{Compare [\hyperlink{Mulvany}{Mulvany}, 152--82] and the \emph{Chicago Manual of Style}. That approach is adapted to \LaTeX\ and its way of handling optional arguments.}
%
% \begin{enumerate}[noitemsep]\large
% \item Western name: \Wash\\[1ex]
% \ifDoTikZ\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(space){\qquad\qquad\qquad}; &
%    \node(arg1){\strut\textbf{Forename(s)}}; &
%    \node(arg2){\strut\textbf{Surname(s)}}; &
%    \node(arg3){\strut\color{nared}\textbf{Sobriquet, etc.}};\\
%  };
%  \node [matrix,column sep=1em] (descriptors) at (1,-2)
%  {
%    \node[align=left](a1)
%    {
%      Personal name(s):\\
%      \small\textit{baptismal name}\\
%      \small\textit{Christian name}\\
%      \small\textit{first and middle}\\\quad\textit{names}\\
%      \small\textit{praenomen}
%    }; &
%    \node[align=left](a2)
%    {
%      Family designator:\\
%      \small\textit{father's family}\\
%      \small\textit{mother's family}\\
%      \small\textit{ancestor}\\
%      \small\textit{occupation}\\
%      \small\textit{place of origin}\\
%      \small\textit{territory}\\
%      \small\textit{nomen/cognomen}\\
%      \small\textit{patronym}
%    }; &
%    \node[align=left](a3)
%    {
%      Sobriquet / title:\\
%      \small\textit{Sr., Jr., III\dots}\\
%      \small\textit{notable feature}\\
%      \small\textit{notable attribute}\\
%      \small\textit{place of origin}\\
%      \small\textit{territory}\\
%      \small\textit{agnomen}
%    }; \\
%  };
%  \begin{scope}[every path/.style=line]
%    \path (arg1) -- (a1);
%    \path (arg2) -- (a2);
%    \path (arg3) -- (a3);
%  \end{scope}
% \end{tikzpicture}\else\vfill\fi
% \item Eastern name: \Sun\\[1ex]
% \ifDoTikZ\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(spacei){\qquad\qquad\qquad}; &
%    \node(arg1){\strut\textbf{Family name}}; &
%    \node(spaceii){\qquad}; &
%    \node(arg2){\strut\textbf{Given name}};\\
%  };
%  \node [matrix,column sep=1cm] (descriptors) at (2,-0.5)
%  {
%    \node[align=left](a1)
%    {
%      Family\\ designator
%    }; &
%    \node[align=left](a2)
%    {
%      Multiple names are rare, but multi-\\character names do exist.
%    };\\
%  };
%  \begin{scope}[every path/.style=line]
%    \path (arg1) -- (a1);
%    \path (arg2) -- (a2);
%  \end{scope}
% \end{tikzpicture}\else\vfill\fi
% \item Ancient name: \Eliz\\[1ex]
% \ifDoTikZ\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(spacei){\qquad\qquad\qquad}; &
%    \node(arg1){\strut\color{black}\textbf{Given name}}; &
%    \node(spaceii){\qquad}; &
%    \node(arg2){\strut\color{nared}\textbf{Sobriquet, etc.}};\\
%  };
%  \node [matrix,column sep=2.2cm] (descriptors) at (1.5,-1.7)
%  {
%    \node[align=left](a1)
%    {
%      Personal\\ name
%    }; &
%    \node[align=left](a2)
%    {
%      Sobriquet / title:\\
%      \small\textit{senior, junior, III\dots}\\
%      \small\textit{notable feature}\\
%      \small\textit{notable attribute}\\
%      \small\textit{place of origin}\\
%      \small\textit{territory}\\
%      \small\textit{patronym}
%    }; \\
%  };
%  \begin{scope}[every path/.style=line]
%    \path (arg1) -- (a1);
%    \path (arg2) -- (a2);
%  \end{scope}
% \end{tikzpicture}\else\vfill\fi
% \end{enumerate}
% \ForgetName[George]{Washington}\ForgetName{Sun, Yat-sen}\ForgetName{Elizabeth, I}
% \clearpage
%
% Based on the classes of names, the \textsf{nameauth} macros halt with an error in the following cases:
% \begin{itemize}\small
% \item The required name argument \meta{SNN} expands to the empty string.
% \item The required argument \meta{SNN, Affix} expands to \meta{empty}, \meta{Affix}.
% \item No shorthand is present for a name in the simplified interface (Section~\ref{sec:simplestart}).
% \end{itemize}
%
% \subsection{Traditional Interface}
%
% For all categories, the fields that define each category are shown in black, with optional elements in red.\medskip
%
% \noindent{\bfseries Western Names}
% \ifDoTikZ
% \begin{center}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=2.5cm] (advice) at (0.5,1.5)
%   {
%     \node[align=center](opt){\small Add to force full name.}; &
%     \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[|\,|]| follows.}; \\
%   };
%   \node [matrix] (macro) at (0.2,0)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\bfseries\oarg{FNN}}; &
%     \node(arg2){\bfseries\bfseries\marg{SNN\color{nared}, Affix}}; &
%     \node(arg3){\bfseries\oarg{\color{nared}Alternate names}}; &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \node [matrix,column sep=1em] (descriptors) at (0,-1.5)
%   {
%     \node[align=center](a1)
%     {
%       \small Forename(s)
%     }; & & &
%     \node[align=center](a2)
%     {
%       \small Surname(s)
%     }; & & & & &
%     \node[align=center](a3)
%     {
%       \small Used only in text
%     }; \\
%   };
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%     \path (arg2) -- (a2);
%     \path (arg3) -- (a3);
%   \end{scope}
% \end{tikzpicture}
% \end{center}\vspace{-2ex}
% \else\vfill\fi
% \textbf{Examples:}\medskip
%
% \noindent One always must include all fields for consistent index entries.\medskip
%
% {\setstretch{1.1}\noindent|\Name [George]{Washington}|\dotfill\Name[George]{Washington}\\
% |\Name*[George]{Washington}|\dotfill\Name*[George]{Washington}\\
% |\Name [George]{Washington}|\dotfill\Name[George]{Washington}\\
% |\FName[George]{Washington}|\dotfill\FName[George]{Washington}\\
% |\Name [George S.]{Patton, Jr.}|\dotfill\Name[George S.]{Patton, Jr.}\\
% |\Name*[George S.]{Patton, Jr.}|\dotfill\Name*[George S.]{Patton, Jr.}\\
% |\Name [George S.]{Patton, Jr.}|\dotfill\Name[George S.]{Patton, Jr.}\\
% |\FName[George S.]{Patton, Jr.}|\dotfill\FName[George S.]{Patton, Jr.}}\medskip
%
% \noindent\meta{Alternate names} with Western forms require the \meta{FNN} argument to have a name in it.  \meta{Alternate names} print only in the text. \meta{FNN} prints in the text and index. For alternate surnames see Section~\ref{sec:DuBois}.\medskip
%
% {\setstretch{1.1}\noindent|\Name [Clive Staples]{Lewis}|\dotfill\Name[Clive Staples]{Lewis}\\
% |\Name*[Clive Staples]{Lewis}[C.S.]|\dotfill\Name*[Clive Staples]{Lewis}[C.S.]\\
% |\Name [Clive Staples]{Lewis}|\dotfill\Name[Clive Staples]{Lewis}\\
% |\Name [Clive Staples]{Lewis}[C.S.]|\dotfill\Name[Clive Staples]{Lewis}[C.S.]\\
% |\Name*[Clive Staples]{Lewis}[Jack]|\dotfill\Name*[Clive Staples]{Lewis}[Jack]\\
% |\FName[Clive Staples]{Lewis}[Jack]|\dotfill\FName[Clive Staples]{Lewis}[Jack]}\medskip
%
% \noindent Both affixes and alternate names can vary in the text. Western names require a comma to delimit affixes; see Sections~\ref{sec:obsolete} and~\ref{sec:Affix}. Using alternate names does not trigger an explicit first use. That is intentional.\medskip
%
% {\setstretch{1.1}\noindent|\Name [John David]{Rockefeller, IV}|\dotfill\Name[John David]{Rockefeller, IV}\\
% |\Name*[John David]{Rockefeller, IV}[Jay]|\dotfill\Name*[John David]{Rockefeller, IV}[Jay]\\
% |\DropAffix\Name*[John David]{Rockefeller, IV}[Jay]|\dotfill\DropAffix\Name*[John David]{Rockefeller, IV}[Jay]}
% |\Name [John David]{Rockefeller, IV}[Jay]|\dotfill\Name[John David]{Rockefeller, IV}[Jay]\\
% \clearpage
%
% \noindent{\bfseries ``Non-Native'' Eastern Names in the Text, Western Index Entry}
% \ifDoTikZ
% \begin{center}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=1.5cm] (advice) at (0.5,1.5)
%   {
%     \node[align=center](opt){\small Add to force full name.}; &
%     \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[|\,|]| follows.}; \\
%   };
%   \node [matrix] (macro) at (0,0)
%   {
%     \node(cmd){\bfseries\cmd{\RevName} \cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\oarg{FNN}}; &
%     \node(arg2){\bfseries\marg{SNN}}; &
%     \node(arg3){\bfseries\oarg{\color{nared}Alternate names}}; &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \node [matrix,column sep=1em] (descriptors) at (0.7,-1.5)
%   {
%     \node[align=center](a1)
%     {
%       \small Given name
%     }; & & &
%     \node[align=center](a2)
%     {
%       \small Family name
%     }; & & &
%     \node[align=center](a3)
%     {
%       \small Used only in text
%     }; \\
%   };
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%     \path (arg2) -- (a2);
%     \path (arg3) -- (a3);
%   \end{scope}
% \end{tikzpicture}
% \end{center}\vspace{-2ex}
% \else\vfill\fi
% \textbf{Examples:}\medskip
%
% \noindent These are encoded using Western name forms without affixes. The reversing macros (Section~\ref{sec:Eastern}) cause them to display in Eastern order in the body text. [\hyperlink{Mulvany}{Mulvany}, 166] shows Hungarian names compatible with this category. Index entries are formatted as: \meta{SNN}, \meta{FNN}. We show these names with a dagger (\dag).\medskip
%
% {\noindent\setstretch{1.1}|\Name[Fumimaro]{Konoe}|\dotfill\Name[Fumimaro]{Konoe}\dag\\
% |\Name*[Fumimaro]{Konoe}[Prime Minister]|\dotfill\Name*[Fumimaro]{Konoe}[Prime Minister]\dag\\
% |\RevName\Name*[Fumimaro]{Konoe}|\dotfill\RevName\Name*[Fumimaro]{Konoe}\dag\\
% |\RevName\Name[Frenec]{Molnár}|\dotfill\RevName\Name[Frenec]{Molnár}\dag}\medskip
%
% \noindent This ``non-native'' form of Eastern names excludes both comma-delimited suffixes and the older non-Western syntax (Sections~\ref{sec:obsolete}). This form \emph{will not share} control sequences and index entries with the non-Western forms described below.\bigskip
%
% \noindent{\bfseries ``Native'' Eastern Names in the Text, Eastern Index Entry}
% \ifDoTikZ
% \begin{center}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=1cm] (advice) at (0.5,1.3)
%   {
%     \node(opt){\small Add to force full name.}; &
%     \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[|\,|]| follows.}; \\
%   };
%   \node [matrix] (macro) at (0,0)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\marg{SNN, FNN}}; &
%     \node(arg2){\bfseries\oarg{\color{nared}Alternate names}}; &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \node [matrix,column sep=1em] (descriptors) at (0.3,-1.3)
%   {
%     \node[align=center](a1)
%     {
%       \small Family name
%     }; &
%     \node[align=center](a2)
%     {
%       \small Given name
%     }; & &
%     \node[align=center](a3)
%     {
%       \small Used only in text
%     }; \\
%   };
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%     \path (arg1) -- (a2);
%     \path (arg2) -- (a3);
%   \end{scope}
% \end{tikzpicture}
% \end{center}\vspace{-2ex}
% \else\vfill\fi
% \textbf{Examples:}\medskip
%
% \noindent The main feature of non-Western forms in \textsf{nameauth} is the comma-delimited suffix. Eastern names have the family name in \meta{SNN} where ancient names have the personal name, but that root name remains the required argument.
%
%These names always take the form \meta{SNN FNN} in the index. See Section~\ref{sec:Eastern}. In this manual we refer to the ``native'' Eastern form below:\medskip
%
% {\noindent\setstretch{1.1}|\Name{Yamamoto, Isoroku}|\dotfill\Name{Yamamoto, Isoroku}\\
% |\Name{Yamamoto, Isoroku}|\dotfill\Name{Yamamoto, Isoroku}\\
% |\RevName\Name*{Yamamoto, Isoroku}|\dotfill\RevName\Name*{Yamamoto, Isoroku}\\
% |\RevName\Name*{Yamamoto, Isoroku}[Admiral]|\dotfill\RevName\Name*{Yamamoto, Isoroku}[Admiral]}\medskip
%
% \noindent Non-Western\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut\break\small\dbend} forms also can have alternate names, except for mononyms (for which alternate names make no sense). Alternate names do not work with the older syntax for non-Western names (see Section~\ref{sec:obsolete}).
% \clearpage
%
% \noindent{\bfseries Ancient Names}
% \ifDoTikZ
% \begin{center}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=0.9em] (advice) at (0.6,1.4)
%   {
%     \node[align=center](opt){\small Add to force full name.}; &
%     \node[align=center](a1){\small Name(s)}; &
%     \node[text width=3.3cm,align=left](grp){\small Add only if text in brackets |[|\,|]| follows.}; \\
%   };
%   \node [matrix] (macro) at (0,0)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\marg{SNN\color{nared}, Affix}};  &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%   \end{scope}
% \end{tikzpicture}
% \end{center}\vspace{-2ex}
% \else\vspace{20ex}\fi
% \textbf{Examples:}\medskip
%
% \noindent These forms are meant for royalty and ancient figures. They have one or more personal names that may or may not have suffixes.\medskip
%
% {\noindent\setstretch{1.1}|\Name{Aristotle}|\dotfill\Name{Aristotle}\\
% |\Name{Aristotle}|\dotfill\Name{Aristotle}\\
% |\Name{Elizabeth, I}|\dotfill\Name{Elizabeth, I}\\
% |\Name{Elizabeth, I}|\dotfill\Name{Elizabeth, I}}
%
% \subsection{Simplified Interface}
% \label{sec:simplestart}%
%
% \DescribeEnv{nameauth}
% The |nameauth| environment replaces \cmd{\Name}, \cmd{\Name*}, and \cmd{\FName} with shorthands. Using |nameauth| in the preamble is not required, but it helps prevent undefined control sequences. We set some names up below. Comments (shown in red) are added for explanation; they are not part of the environment itself.
% \begin{quote}\small\setstretch{1.1}
% {\color{nared}|%   Field 1  Field 2      Field 3          Field 4|}\\
% |\begin{nameauth}|\\[0.2ex]
% |  \< Wash  & George     & Washington      &       > |{\color{nared}|%|\hfill\emph{Western}}\\
% |  \< Soto  & Hernando   & de Soto         &       > |{\color{nared}|%|\hfill\emph{Western}}\\
% |  \< Pat   & George S.  & Patton, Jr.     &       > |{\color{nared}|%|\hfill\emph{W+affix}}\\
% |  \< JRIV  & John David & Rockefeller, IV &       > |{\color{nared}|%|\hfill\emph{W+affix}}\\
% |  \< Lewis & Clive Staples & Lewis        &       > |{\color{nared}|%|\hfill\emph{Western}}\\
% |  \< Aris  &            & Aristotle       &       > |{\color{nared}|%|\hfill\emph{Ancient}}\\
% |  \< Aeth  &            & Æthelred, II    &       > |{\color{nared}|%|\hfill\emph{Ancient}}\\
% |  \< Eliz  &            & Elizabeth, I    &       > |{\color{nared}|%|\hfill\emph{Ancient}}\\
% |  \< Attil &            & Attila, the Hun &       > |{\color{nared}|%|\hfill\emph{Ancient}}\\
% |  \< Konoe & Fumimaro   & Konoe           &       > |{\color{nared}|%|\hfill\emph{W\,as\,East.}}\\
% |  \< Miyaz &            & Miyazaki, Hayao &       > |{\color{nared}|%|\hfill\emph{Eastern}}\\
% |  \< Yamt  &            & Yamamoto, Isoroku &     > |{\color{nared}|%|\hfill\emph{Eastern}}\\
% |\end{nameauth}|
% \end{quote}
%
% \begin{itemize}\small
% \item Field 1 contains text that will be turned into three control sequences. For example, \texttt{Wash} generates \cmd{\Wash} (like \cmd{\Name}): \ForgetThis\Wash, \cmd{\LWash} (L for Long; like \cmd{\Name*}): \LWash, and \cmd{\SWash} (S for Short; like \cmd{\FName}): \SWash.
% \item Fields~2 and~3 hold the name arguments.
% \item Field 4 usually remains empty. It handles the older non-Western syntax (Section~\ref{sec:obsolete}) and permanent alternate names (next page).
% \item In this context, ``|\<|'' is an escape character and a control sequence. If you forget it or just use |<| without the backslash, you will get errors.
% \item There \emph{must} be four argument fields (three ampersands) per line. Leaving out an ampersand will cause an error.
% \item Extra spaces in each |&|-delimited field are stripped, as is also the case in the traditional interface (Section~\ref{sec:tolerance}).
% \item Put trailing braces |{|\,|}| or something else after the shorthands to prevent subsequent text in brackets |[|\,|]| from becoming an optional argument.
% \end{itemize}
%
% \noindent\textbf{So, why use it?}\medskip
%
% \noindent The simplified interface can save work. Instead of the traditional interface macros on the left, one uses the simplified macros on the right:\\[1ex]
% {\small\setstretch{1.1}
% |\Name [George]{Washington}|\dotfill\cmd{\Wash}: \ForgetThis\Wash\\
% |\Name*[George]{Washington}|\dotfill\cmd{\LWash}: \LWash\\
% |\Name [George]{Washington}|\dotfill\cmd{\Wash}: \Wash\hphantom{ \SWash}\\
% |\FName[George]{Washington}|\dotfill\cmd{\SWash}: \SWash\hphantom{ \Wash}\\[1ex]
% |\IndexName[George]{Washington}|\dotfill\cmd{\JustIndex}\cmd{\Wash} \JustIndex\Wash\hphantom{:\LWash}\\[1ex]
% |\ForgetName[George]{Washington}%|\\
% |\Name[George]{Washington}|\dotfill\cmd{\ForgetThis}\cmd{\Wash}: \ForgetThis\Wash\\[1ex]
% |\SubvertName[George]{Washington}%|\\
% |\Name[George]{Washington}|\dotfill\cmd{\SubvertThis}\cmd{\Wash}: \SubvertThis\Wash\hphantom{ \SWash}}\medskip
%
% \noindent\textbf{Examples:}\medskip
%
% \noindent Below, ``non-native'' Eastern name forms are shown with a dagger (\dag). Please see Section~\ref{sec:Eastern} to avoid pitfalls with Eastern names and reversing macros. We reset some ``first uses'' of names from before (Section~\ref{sec:tweaks}).
%
% \begin{center}\footnotesize\setstretch{1.1}
% \begin{tabular}{@{}ll@{}}
% \textsc{Western:}                  & \textsc{Ancient\,/\,Mononym} \\
% |\Wash | \dotfill \ForgetThis\Wash & |\Aris| \dotfill \ForgetThis\Aris \\
% |\LWash| \dotfill \LWash           & |\Aris| \dotfill \Aris \\
% |\Wash | \dotfill \Wash            & \\
% |\SWash| \dotfill \SWash           & \textsc{Medieval/Royal:} \\
% |\RevComma\LWash| \dotfill \RevComma\LWash & |\Eliz | \dotfill \ForgetThis\Eliz  \\
%                                    & |\Eliz | \dotfill \Eliz  \\
% \textsc{Particles:} \hfill (Section~\ref{sec:standards}) & |\LEliz[the First]| \dotfill \LEliz[the First] \\
% |\Soto| \dotfill \ForgetThis\Soto  & |\Attil| \dotfill \ForgetThis\Attil \\
% |\Soto| \dotfill \Soto             & |\Attil| \dotfill \Attil\\
% |\CapThis\Soto| \dotfill \CapThis\Soto &  \\
%                                    & \textsc{``Non-native'' Eastern:} \\
% \textsc{Affixes:} \hfill (Section~\ref{sec:Affix}) & |\Konoe | \dotfill \ForgetThis\Konoe\dag \\
% |\Pat | \dotfill \ForgetThis\Pat   & |\LKonoe| \dotfill \LKonoe\dag \\
% |\LPat| \dotfill \LPat             & |\LKonoe[Minister]| \dotfill \LKonoe[Minister]\dag \\
% |\DropAffix\LPat| \dotfill \DropAffix\LPat & |\Konoe | \dotfill \Konoe\dag \\
% |\Pat | \dotfill \Pat              & |\SKonoe| \dotfill \SKonoe\dag \\
% |\SPat| \dotfill \SPat             & |\CapName\RevName\LKonoe| \dotfill \CapName\RevName\LKonoe\dag \\
%                                    & |\CapName\Konoe| \dotfill \CapName\Konoe\dag \\
% \textsc{Nicknames:} \hfill (Section~\ref{sec:Fname}) &  \\
% |\JRIV  | \dotfill \ForgetThis\JRIV & \textsc{``Native'' Eastern:} \\
% |\DropAffix\LJRIV[Jay]| \dotfill \DropAffix\LJRIV[Jay] & |\CapName\Yamt| \dotfill \ForgetThis\CapName\Yamt \\
% |\SJRIV[Jay]| \dotfill \SJRIV[Jay] & |\CapName\LYamt| \dotfill \CapName\LYamt \\
% |\Lewis| \dotfill \ForgetThis\Lewis & |\CapName\Yamt| \dotfill \CapName\Yamt \\
% |\LLewis[Jack]| \dotfill \LLewis[Jack] & |\RevName\LYamt| \dotfill \RevName\LYamt \\
% |\SLewis[Jack]| \dotfill \SLewis[Jack] & |\RevName\LYamt[Admiral] | \dotfill \RevName\LYamt[Admiral] \\
% |\LCSL| \dotfill \LCSL             & |\SYamt| \dotfill \SYamt \\
% |\SCSL | \dotfill \SCSL            & |\ForceFN\SYamt| \dotfill \ForceFN\SYamt \\
% \end{tabular}
% \end{center}
% \ExcludeName{Attila, the Hun}
%
% \noindent\textbf{Some Devils in the Details:}\medskip
%
% \noindent English keeps the prefix with the surname in the text and the index, while German keeps particles separate: 
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\[0.2ex]
% |  \< JWG    & J.W. von & Goethe    & > |{\color{nared}|%|\hfill\emph{Western; German}}\\
% |  \< VBuren & Martin   & Van Buren & > |{\color{nared}|%|\hfill\emph{Western; English}}\\
% |\end{nameauth}|
% \end{quote}
%
% \VBuren\ is ``Van Buren, Martin'' in the index. \cmd{\JWG} prints \JWG\ and \JWG, with ``Goethe, J.W. von'' in the index. You get a quasi-Anglicized \LJWG[von] with |\LJWG[von]|. Either |\CapThis\LJWG[Von]| or |\LJWG[Von]| produce \CapThis\LJWG[von]; see Section~\ref{sec:standards}. Additionally, [\hyperlink{Mulvany}{Mulvany}, 152--82] and the \emph{Chicago Manual of Style} offer helpful guidance.\ForgetName[J.W. von]{Goethe}
%
% Normally you would use something like |\LLewis[C.S.]| to get \LLewis[C.S.] instead of \LLewis. You can make that permanent, where \SCSL\ always prints in the text, yet the index always shows ``Lewis, Clive Staples. Some permanent alternate names are shown below:
%
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\[0.2ex]
% |  \< JayR & John David & Rockefeller, IV & Jay     > |{\color{nared}|%|\hfill\emph{Western}}\\
% |  \< CSL  & Clive Staples & Lewis        & C.S.    > |{\color{nared}|%|\hfill\emph{Western}}\\
% |  \< Unraed & & Æthelred, II             & Unrædig > |{\color{nared}|%|\hfill\emph{Ancient}}\\
% |  \< MSens  & & Miyazaki, Hayao          & Sensei  > |{\color{nared}|%|\hfill\emph{Eastern}}\\
% |\end{nameauth}|
% \end{quote}
%
% With the names above you get \ForgetThis\JayR, \ForgetThis\CSL, \ForgetThis\Unraed, and \ForgetThis\MSens\ instead of those from the previous page: \LJRIV, \LLewis, \LAeth, and \LMiyaz.\footnote{One could use \cmd{\AKA} to create a cross-reference \AKA[John David]{Rockefeller, IV}[Jay]{Rockefeller}. See Sections~\ref{sec:IndexXref} and~\ref{sec:AKA}.} They all have the same respective index entries and first/subsequent uses, which is why we forced the formatting in the names above. Also |\LLewis[Jack]| prints \LLewis[Jack] while |\LCSL[Jack]| prints \LCSL[Jack]. Section~\ref{sec:Fname} explains why. 
%
% The simplified\marginpar{\small\raggedleft\dbend} interface can tempt one into completely equating a name with its shortcut. Here we show that to be false. |\ForgetThis\CSL| prints \ForgetThis\CSL. Then |\Lewis| prints \Lewis. Likewise, |\ForgetThis\Lewis| prints \ForgetThis\Lewis. Then |\CSL| prints \CSL. The name itself is the pattern that governs everything. Internally, that detokenized pattern is |CliveStaples!Lewis|. Non-western names have patterns like |Elizabeth,I| and |Yamamoto,Isoroku|. Mononyms are their own pattern: |Aristotle|.
%
% For the same reasons,\marginpar{\small\raggedleft\dbend} when index tagging or pre-tagging names, the \meta{Alternate names} field has no effect on index tags. \cmd{\JRIV} and \cmd{\JayR} need only one tag, as do \cmd{\Lewis} and \cmd{\CSL}:
% \begin{quote}\small\setstretch{1.1}
% |\TagName[John David]{Rockefeller, IV}{|\meta{something}|}|\\
% |\TagName[Clive Staples]{Lewis}{|\meta{something}|}|
% \end{quote}
%
% Sections~\ref{sec:standards},\marginpar{\small\raggedleft\dbend} \ref{sec:accents}, and~\ref{sec:IndexSort} deal with the pitfalls of accents and capitalization, as well as why you should use \cmd{\PretagName} when dealing with names that contain control sequences or active Unicode characters.
% \clearpage
%
% \subsection{Older Syntax}
% \label{sec:obsolete}
%
% An older syntax for non-Western names remains for backward compatibility with early versions of \textsf{nameauth}. The older syntax prevents the use of alternate names, limits the use of \cmd{\AKA} (Section~\ref{sec:AKA}) and excludes comma-delimited suffixes. Otherwise it works seamlessly with the new syntax.
%
% The big change is, instead of using a comma-delimited affix, this form uses the final optional argument for personal names and affixes. When \textsf{nameauth} was young, this seemed the intuitive approach to take. Now it only remains so that older documents still work today.
% \begin{quote}\small\setstretch{1.1}
% |\Name{Henry}[VIII] |{\color{nared}|               %|\hfill\emph{royal name}}\\
% |\Name{Chiang}[Kai-shek] |{\color{nared}|          %|\hfill\emph{Eastern name}}\\
% |\begin{nameauth}|\\
% |  \< Dagb & & Dagobert & I > |{\color{nared}|     %|\hfill\emph{royal name}}\\
% |  \< Yosh & & Yoshida & Shigeru > |{\color{nared}|%|\hfill\emph{Eastern name}}\\
% |\end{nameauth}|
% \end{quote}
% Since the \meta{FNN} fields are empty, the final field becomes either \meta{affix} or \meta{FNN} and will appear in the index. We show these names with a double dagger (\ddag):
%
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{ll}\toprule
% |\Name{Henry}[VIII]| & \Name{Henry}[VIII]\ddag\\
% |\Name{Henry}[VIII]| & \Name{Henry}[VIII]\ddag\\
% |\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\ddag\\
% |\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\ddag\\\midrule
% |\Dagb| & \Dagb\ddag\\
% |\Dagb| & \Dagb\ddag\\
% |\CapName\Yosh| & \CapName\Yosh\ddag\\
% |\CapName\RevName\LYosh| & \CapName\RevName\LYosh\ddag\\\bottomrule
% \end{tabular}
% \end{center}
%
% \noindent|\Name{Henry}[VIII]|\marginpar{\large\raggedleft\textsf{\bfseries 2.6}\strut\break\small\raggedleft\dbend} (older syntax) will share name occurrences, tags, and index entries with |\Name{Henry, VIII}| (new syntax), as we see below. We recommend using the newer syntax unless otherwise needed.
% \begin{quote}\small\setstretch{1.1}
% \NameAddInfo{Henry}[VIII]{ (\emph{Defensor Fidei})}|\NameAddInfo{Henry}[VIII]{ (\emph{Defensor Fidei})} |{\color{nared}|% older|}\\
% \texttt{\dots} |\Name*{Henry, VIII}\NameQueryInfo{Henry, VIII} |{\,\color{nared}| % new|}\\[0.5ex]
% \Name*{Henry, VIII}\NameQueryInfo{Henry, VIII}
% \end{quote}
%
% Presently\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut\break\small\raggedleft\dbend} |\Name*{Henry, VIII}[Tudor]| prints ``\Name*{Henry, VIII}[Tudor]'' in the body text and ``Henry VIII'' in the index. Before version 3.0 it would have produced ``Henry VIII Tudor'' in the text and in the index. \textbf{The older behavior was discouraged. It is obsolete and not supported.} See also Sections~\ref{sec:indextag} and~\ref{sec:tagtext}.
% \clearpage
%
% \subsection{Reference Tables}
% \label{sec:RefTables}
%
% \begin{center}\large\bfseries Getting Things Done\end{center}
% Here we link from general tasks to relevant sections. The end of each section listed in the table has a return link to this section.
% \begin{center}
% \begin{tabular}{p{0.5\textwidth}l@{ }r}
% \bfseries I want to\dots & \bfseries Topic & \bfseries Section \\\toprule
% implement standard scholarly names & \cmd{\Name} & \ref{sec:Naming}\\\midrule
% refer to forenames and affixes & \cmd{\FName} & \ref{sec:Fname}\\
% & forcing references & \ref{sec:tweaks}\\\midrule
% use surnames with inflected or alternate & indexing control & \ref{sec:indexctrl}\\
% forms without creating unwanted index & forcing references & \ref{sec:tweaks}\\
% entries & alternate spellings & \ref{sec:DuBois}\\\midrule
% use affixes in names & comma delimiter & \ref{sec:Affix}\\\midrule
% use ``native'' Eastern name forms & comma delimiter & \ref{sec:Affix}\\
% & Eastern names & \ref{sec:Eastern}\\\midrule
% use reversing and all caps for all Eastern name forms in body text only & Eastern names & \ref{sec:Eastern}\\\midrule
% use discretionary caps in body text only & particles & \ref{sec:standards}\\\midrule
% use discretionary caps in text and index & advanced hooks & \ref{sec:Hooksc}\\\midrule
% handle non-English names and & particles & \ref{sec:standards}\\
% Continental formatting & accents & \ref{sec:accents}\\
% & non-English format & \ref{sec:altformat}\\
% & indexing control & \ref{sec:indexctrl}\\
% & index sorting & \ref{sec:IndexSort}\\
% & advanced hooks & \ref{sec:Hooksc}\\\midrule
% not have affixes be present by default & index tags & \ref{sec:indextag}\\
% in long name forms & text tags & \ref{sec:tagtext}\\\midrule
% manage index cross-references & cross-references & \ref{sec:IndexXref}\\
% & alternate names & \ref{sec:AKA}\\\midrule
% format variant name forms & formatting & \ref{sec:formatting}\\
% & indexing control & \ref{sec:indexctrl}\\
% & forcing references & \ref{sec:tweaks}\\
% & alternate spellings & \ref{sec:DuBois}\\\midrule
% use \textsf{nameauth} with beamer overlays  & formatting & \ref{sec:formatting}\\
% or design a game book & index tags & \ref{sec:indextag}\\
% or design a history book & text tags & \ref{sec:tagtext}\\
% or use many dynamic name elements & name tests & \ref{sec:tests}\\
% or force name elements to be constant & forcing references & \ref{sec:tweaks}\\
% & life dates & \ref{sec:Hooksb}\\
% & advanced hooks & \ref{sec:Hooksc}\\\bottomrule
% \end{tabular}
% \end{center}
% \clearpage
%
% \begin{center}\large\bfseries Form and Format Overview\end{center}
% Below we see how the naming macros generate output. First uses of a name are full references and call first-use formatting hooks. Subsequent uses can be longer or shorter, calling their own hooks unless \cmd{\ForceName} changes that (Section~\ref{sec:formatting}). Section~\ref{sec:tweaks} also has more information on how to change things. For changes to \cmd{\AKA} and friends, the \texttt{alwaysformat} option may be needed (Section~\ref{sec:AKA}).\bigskip
%
% \noindent{\large\strut\cmd{\Name} or Unmodified Shorthand}\\
% {\small%
%\begin{tabular}{lcccc}\toprule[1pt]
%   \bfseries First Reference & \bfseries Full & \bfseries Short & \parbox{3.1cm}{\footnotesize\ttfamily\textbackslash NamesFormat\\ \textbackslash FrontNamesFormat\smallskip} & \parbox{2.5cm}{\footnotesize\ttfamily\textbackslash MainNameHook\\ \textbackslash FrontNameHook\smallskip}\\
%   & \YES & \NO & \YES & \NO\\\midrule
%   \bfseries Subsequent Ref. & & & \S Cf. \cmd{\ForceName}\\
%   {}*Western Surname & \NO & \YES* & \NO* & \YES\\\midrule
%   {}*Eastern Surname & \NO & \YES* & \NO* & \YES\\\midrule
%   {}*Ancient Name    & \NO & \YES* & \NO* & \YES\\\bottomrule[1pt]
%  \end{tabular}}\\\bigskip
%
% \noindent{\large\strut\cmd{\Name*} or L-modifier + Shorthand}\\
% {\small%
% \begin{tabular}{lcccc}\toprule[1pt]
% \hphantom{*Western Forename} & \bfseries Full & \bfseries Short & \parbox{3.1cm}{\footnotesize\ttfamily\textbackslash NamesFormat \textbackslash FrontNamesFormat\smallskip} & \parbox{2.5cm}{\footnotesize\ttfamily\textbackslash MainNameHook \textbackslash FrontNameHook\smallskip}\\
% \bfseries First Reference & \YES & \NO & \YES & \NO\\\midrule
%                         & & & \S Cf. \cmd{\ForceName}\\
% \bfseries Subsequent Ref.& \YES & \NO & \NO* & \YES\\\bottomrule[1pt]
% \end{tabular}}\\\bigskip
%
% \noindent{\large\strut\cmd{\FName} or S-modifier + Shorthand}\\
% {\small%
%\begin{tabular}{lcccc}\toprule[1pt]
%   \bfseries First Reference & \bfseries Full & \bfseries Short & \parbox{3.1cm}{\footnotesize\ttfamily\textbackslash NamesFormat \textbackslash FrontNamesFormat\smallskip} & \parbox{2.5cm}{\footnotesize\ttfamily\textbackslash MainNameHook \textbackslash FrontNameHook\smallskip}\\
%   & \YES & \NO & \YES & \NO\\\midrule
%   \bfseries Subsequent Ref. & & & \S Cf. \cmd{\ForceName}\\
%   {}*Western Forename & \NO & \YES* & \NO* & \YES\\\midrule
%   {}*Eastern Surname  & \NO & \YES* & \NO* & \YES\\\midrule
%   {}*Ancient Name     & \NO & \YES* & \NO* & \YES\\\bottomrule[1pt]
%  \end{tabular}}\\\bigskip
%
% \noindent{\large\strut\cmd{\ForceFN}\cmd{\FName} or \cmd{\ForceFN} S-modifier + Shorthand}\\
% {\small%
%\begin{tabular}{lcccc}\toprule[1pt]
%   \bfseries First Reference & \bfseries Full & \bfseries Short & \parbox{3.1cm}{\footnotesize\ttfamily\textbackslash NamesFormat \textbackslash FrontNamesFormat\smallskip} & \parbox{2.5cm}{\footnotesize\ttfamily\textbackslash MainNameHook \textbackslash FrontNameHook\smallskip}\\
%   & \YES & \NO & \YES & \NO\\\midrule
%   \bfseries Subsequent Ref. & & & \S Cf. \cmd{\ForceName}\\
%   {}*Western Forename & \NO & \YES* & \NO* & \YES\\\midrule
%   {}*Eastern Forename & \NO & \YES* & \NO* & \YES\\\midrule
%   {}*Ancient Affix    & \NO & \YES* & \NO* & \YES\\\bottomrule[1pt]
%  \end{tabular}}\\\bigskip
% \clearpage
%
% \begin{center}\bfseries Selected Macro Patterns:\end{center}
%
% \begin{center}\small\setstretch{1.05}
% \begin{tabular}{lrccl}\toprule
% \meta{prefix macros} & \cmd{\Name} & \meta{optional *} & \meta{arguments} \\
% \meta{prefix macros} & \cmd{\FName} & \meta{optional *} & \meta{arguments} \\
% \meta{prefix macros} & \cmd{\AKA} & \meta{optional *} & \meta{target args} & \meta{xref args}\\
% \cmd{\SeeAlso} & \cmd{\IndexName} & & \meta{arguments} \\
% \cmd{\SeeAlso} & \cmd{\IndexRef} & & \meta{arguments} & \meta{target}\\\midrule
% & \cmd{\ExcludeName} & & \meta{arguments} \\
% & \cmd{\IncludeName} & \meta{optional *} & \meta{arguments} \\
% & \cmd{\PretagName} & & \meta{arguments} & \meta{sort key} \\
% & \cmd{\TagName} & & \meta{arguments} & \meta{tag} \\
% & \cmd{\UntagName} & & \meta{arguments} \\
% & \cmd{\NameAddInfo} & & \meta{arguments} & \meta{tag} \\
% & \cmd{\NameQueryInfo} & & \meta{arguments} \\
% & \cmd{\NameClearInfo} & & \meta{arguments} & \\
% & \cmd{\IfMainName} & & \meta{arguments} & \marg{y}\marg{n}\\
% & \cmd{\IfFrontName} & & \meta{arguments} & \marg{y}\marg{n}\\
% & \cmd{\IfAKA} & & \meta{arguments} & \marg{y}\marg{n}\\
% & \cmd{\ForgetName} & & \meta{arguments} \\
% & \cmd{\SubvertName} & & \meta{arguments} \\\bottomrule
% \end{tabular}
% \end{center}
%
% \begin{center}\bfseries Prefix Macros (One-Time Effect):\end{center}
% \hfil They stack: \cmd{\CapThis}\cmd{\SubvertThis}\cmd{\SkipIndex}\cmd{\Name[foo]\{bar\}}: \CapThis\SubvertThis\SkipIndex\Name[foo]{bar}
% \begin{center}\small\setstretch{1.05}
% \begin{tabular}{rp{0.72\textwidth}}\toprule
% \cmd{\CapThis} & Capitalize first letter of all name components in body text.\footnotemark[3]\\
% \cmd{\CapName} & Cap entire \meta{SNN} in body text. Works also with \cmd{\CapThis}.\\\midrule
% \cmd{\RevName} & Reverse name order in body text (e.g., for Eastern names).\\\midrule
% \cmd{\RevComma} & Reverse Western names to \meta{SNN}, \meta{FNN}.\footnotemark[4]\\
% \cmd{\ShowComma} & Add comma between \meta{SNN} and \meta{Affix}.\\
% \cmd{\NoComma} & No comma between \meta{SNN} and \meta{Affix}. Excludes \cmd{\ShowComma}.\\\midrule
% \cmd{\ForceFN} & \texttt{Force} Eastern \texttt{F}ore\texttt{N}ame or ancient \texttt{F}i\texttt{N}al affix.\footnotemark[5]\\
% \cmd{\DropAffix} & Drop name affix of Western name (in long name reference).\footnotemark[6]\\
% \cmd{\KeepAffix} & Insert non-breaking space between \meta{SNN} and \meta{Affix}.\footnotemark[7]\\
% \cmd{\KeepName} & Insert non-breaking space between all syntactic name elements.\\\midrule
% \cmd{\ForceName} & Have a subsequent name use call first-use formatting hooks.\\\midrule
% \cmd{\ForgetThis} & Next naming macro prints a first use. Excludes \cmd{\SubvertThis}.\\
% \cmd{\SubvertThis} & The next naming macro prints a subsequent use.\\\midrule
% \cmd{\SeeAlso} & The next cross-reference macro creates a \emph{see also} reference.\footnotemark[8]\\
% \cmd{\SkipIndex} & The next naming macro does not create index entries.\\
% \cmd{\JustIndex} & The next \cmd{\Name} or \cmd{\FName} acts just like a call to \cmd{\IndexName}. Ignored and reset by \cmd{\AKA} and \cmd{\PName}.\\\bottomrule
% \end{tabular}
% \end{center}
% \footnotetext[3]{\cmd{\AccentCapThis} is a fall-back for when the \textsf{nameauth} package is used where system architecture or file encoding might cause errors with the automatic Unicode detection under NFSS.}
% \footnotetext[4]{Has no effect on non-Western name forms.}
% \footnotetext[5]{Only affects non-Western name forms.}
% \footnotetext[6]{Only affects Western name forms.}
% \footnotetext[7]{Used best with Western and ancient name forms.}
% \footnotetext[8]{Works only with \cmd{\IndexRef}, \cmd{\AKA}, \cmd{\PName} and their respective starred variants.}
% \addtocounter{footnote}{6}
% \clearpage
%
% \section{Detailed Usage}
% \subsection{Package Options}
% \label{sec:options}
%
% One includes the \textsf{nameauth} package thus:
% \begin{quote}\small
% |\usepackage[|\meta{$option_1$}|,|\meta{$option_2$}|,|\dots|]{nameauth}|
% \end{quote}
% The options have no required order. Still, we discuss them from the general to the specific, as the headings below indicate. In the listings below, {\bfseries implicit default options are boldface and need not be invoked by the user.} {\color{nared}Non-default options are in red and must be invoked explicitly.}
%
% \begin{center}\large\bfseries Choosing Features\end{center}
%
% \noindent{\bfseries Enable Package Warnings}\\[1ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \leavevmode\color{nared}\quad\texttt{verbose} & \leavevmode\color{nared}Show warnings about index cross-references.\\
% \end{tabular}}\\[1ex]
% The default\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} suppresses package warnings from the indexing macros. Warnings from the \texttt{nameauth} environment are not suppressed.\bigskip
%
% \noindent{\bfseries Choose Formatting}\\[1ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \bfseries\quad\texttt{mainmatter} & \bfseries Start with ``main-matter names'' and formatting hooks (see also page~\pageref{page:PostProcess}).\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{frontmatter} & \leavevmode\color{nared}Start with ``front-matter names'' and hooks.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{alwaysformat} & \leavevmode\color{nared}Use only respective ``first use'' formatting hooks.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{formatAKA} & \leavevmode\color{nared}Format the first use of a name with \cmd{\AKA} like the first use of a name with \cmd{\Name}.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{oldAKA} & \leavevmode\color{nared}Force \cmd{\AKA*} to act like it did before v.3.0.\\
% \end{tabular}}\\[1ex]
% The \texttt{mainmatter} option and the \texttt{frontmatter} option enable two different systems of name use and formatting. They are mutually exclusive. \cmd{\NamesActive} starts the main matter system when \texttt{frontmatter} is used. See Section~\ref{sec:formatting}.
%
% The \texttt{alwaysformat} option forces ``first use'' hooks globally in both naming systems. Its use is limited in current versions of \textsf{nameauth}.
%
% The\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} \texttt{formatAKA} option permits \cmd{\AKA} to use the ``first use'' formatting hooks. This enables \cmd{\ForceName} to trigger those hooks at will (Section~\ref{sec:AKA}). Otherwise \cmd{\AKA} uses ``subsequent use'' hooks.
%
% Using the\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} \texttt{oldAKA} option forces \cmd{\AKA*} always to print a ``forename'' field in the text, as it did in versions 2.6 and older. Otherwise the current behavior of \cmd{\AKA*} prints in the same fashion as \cmd{\FName} (see Sections~\ref{sec:Fname} and~\ref{sec:AKA}).\bigskip
%
% \noindent{\bfseries Enable/Disable Indexing}\\[1ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{index} & \bfseries Create index entries in place with names.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{noindex} & \leavevmode\color{nared}Suppress indexing of names.\\
% \end{tabular}}\\[1ex]
% These apply only to the \textsf{nameauth} package macros. The default \texttt{index} option enables name indexing right away. The \texttt{noindex} option disables the indexing of names until \cmd{\IndexActive} enables it. \textbf{Caution:}\marginpar{\small\raggedleft\dbend} using \texttt{noindex} and \cmd{\IndexInactive} prevents index tags until you call \cmd{\IndexActive}, as explained also in Section~\ref{sec:indexctrl}.
% \clearpage
%
% \noindent{\bfseries Enable/Disable Index Sorting}\\[1ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{pretag} & \bfseries Create sort keys used with \texttt{makeindex}.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{nopretag} & \leavevmode\color{nared}Do not create sort keys. \\
% \end{tabular}}\\[1ex]
% The default allows \cmd{\PretagName} to create sort keys used with NFSS or \texttt{makeindex} and its analogues. The \texttt{nopretag} option disables the sorting mechanism, e.g., if a different sorting method is used with \texttt{xindy}. See Section~\ref{sec:IndexSort}.
%
% \begin{center}\large\bfseries Affect the Syntax of Names\end{center}
% {\bfseries Show/Hide Affix Commas}\\[2ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{nocomma} & \bfseries Suppress commas between surnames and affixes, following the \emph{Chicago Manual of Style} and other conventions.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{comma} & \leavevmode\color{nared}Retain commas between surnames and affixes.\\
% \end{tabular}}\\[1ex]
% If you use \emph{modern standards}, choose the default \texttt{nocomma} option to get, \emph{e.g.}, \Name[J.E.]{Carter, Jr.}[James Earl]. If you need to adopt \emph{older standards} that use commas between surnames and affixes, you have two choices:
% \begin{enumerate}
% \item The \texttt{comma} option globally produces, \emph{e.g.}, \ShowComma\Name*[J.E.]{Carter, Jr.}[James Earl].
% \item Section~\ref{sec:Affix} shows how one can use \cmd{\ShowComma} with the \texttt{nocomma} option and \cmd{\NoComma} with the \texttt{comma} option to get per-name results.
% \end{enumerate}\medskip
%
% \noindent{\bfseries Capitalize Entire Surnames}\\[2ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{normalcaps} & \bfseries Do not perform any special capitalization.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{allcaps} & \leavevmode\color{nared}Capitalize entire surnames, such as romanized Eastern names.\\
% \end{tabular}}\\[1ex]
% This only capitalizes names printed in the body text. English standards usually do not propagate typographic changes into the index.
%
% Still,\marginpar{\small\raggedleft\dbend} you can use this package with non-English conventions (just not via these options). You can add, \emph{e.g.}, uppercase or small caps in surnames, formatting them also in the index. See also Sections~\ref{sec:altformat} and~\ref{sec:Hooksc}. The simplified interface aids the embedding of control sequences in names. Section~\ref{sec:Eastern} deals with capitalization on a section-level and per-name basis.\bigskip
%
% \noindent{\bfseries Reverse Name Order}\\[2ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{notreversed} & \bfseries Print names in the order specified by \cmd{\Name} and the other macros.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{allreversed} & \leavevmode\color{nared}Print all name forms in ``smart'' reverse order.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{allrevcomma} & \leavevmode\color{nared}Print all names in ``Surname, Forenames'' order, meant for Western names.\\
% \end{tabular}}\\[1ex]
% These three options are mutually exclusive. Section~\ref{sec:Eastern} speaks more about reversing. The \texttt{allreversed} option, \cmd{\ReverseActive}, and \cmd{\RevName} work with all names and override \texttt{allrevcomma} and its macros.
%
% So-called ``last-comma-first'' lists of names via \texttt{allrevcomma} and the reversing macros \cmd{\ReverseCommaActive} and \cmd{\RevComma} (Section~\ref{sec:LastFirst}) are \emph{not} the same as the \texttt{comma} option. They only affect Western names.
% \clearpage
%
% \phantomsection\label{page:PostProcess}
% \begin{center}\large\bfseries Typographic Post-Processing\end{center}
% \noindent{\bfseries Formatting Attributes}\\[2ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{noformat} & \bfseries Do not define a default format.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{smallcaps} & \leavevmode\color{nared}First use of a main-matter name in small caps.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{italic} & \leavevmode\color{nared}First use of a main-matter name in italic.\\[0.5ex]
% \leavevmode\color{nared}\quad\texttt{boldface} & \leavevmode\color{nared}First use of a main-matter name in boldface.\\
% \end{tabular}}\\
%
% Current\marginpar{\large\raggedleft\textsf{\bfseries 2.5}\strut} versions assign no default formatting to names. Most users have preferred the \texttt{noformat} option as the default and then design their own hooks as needed.\footnote{For those that want the old default option from the early days of this package, one can recover that behavior with the \texttt{smallcaps} option.}
% The options above are ``quick'' solutions based on English typography.
%
% What\marginpar{\large\raggedleft\textsf{\bfseries 2.4}\strut} was ``typographic formatting'' has become a generalized concept of ``post-processing'' via hook macros.\footnote{This package was designed with type hierarchies in mind, although it has become more flexible. See Robert Bringhurst, \emph{The Elements of Typographic Style}, version 3.2 (Point Roberts, Washington: Hartley \& Marks, 2008), 53--60. I drew some inspiration from the typography in Bernhard Lohse, \emph{Luthers Theologie} (G\"ottingen: Vandenhoeck \& Ruprecht, 1995) and the five-volume series by Jaroslav J. Pelikan Jr., The Christian Tradition: A History of the Development of Doctrine (Chicago: Chicago UP, 1971--89). Each volume in the series has its own title.}
% Post-processing does not affect the index. Sections \ref{sec:formatting}, \ref{sec:Hooksa}, \ref{sec:Hooksb}, and~\ref{sec:Hooksc} explain these hooks in greater detail:
% \begin{itemize}
% \item \cmd{\NamesFormat} formats first uses of main-matter names.
% \item \cmd{\MainNameHook} formats subsequent uses of main-matter names.
% \item \cmd{\FrontNamesFormat} formats first uses of front-matter names.
% \item \cmd{\FrontNameHook} formats subsequent uses of front-matter names.
% \end{itemize}
%
% Changes\marginpar{\small\raggedleft\cmd{\global}} to the formatting hooks apply within the scope where they are made. Use \cmd{\global} explicitly to alter that. \cmd{\NamesFormat} originally was the only hook, so any oddity in the naming of these hooks results from the need for backward compatibility with old versions.
%
% \begin{center}\large\bfseries Alternate or Continental Formatting\end{center}
% \noindent{\bfseries Alternate Syntactic Formatting}\\[2ex]
% {\begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \leavevmode\color{nared}\quad\texttt{altformat} & \leavevmode\color{nared}Make available the alternate formatting framework from the start of the document. Activate formatting by default.\\
% \end{tabular}}\\
%
% A built-in\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut\break\small\dbend} framework provides an alternate formatting mechanism that can be used for ``Continental'' formatting that one sees in German, French, and so on. Continental standards format surnames only, both in the text and in the index. Section~\ref{sec:altformat} introduces the topic, while Section~\ref{sec:Hooksc} goes into greater detail. The previous methods the produced Continental formatting still ought to work. The error protection that prevents \cmd{\CapThis} from breaking alternately formatted names is available by using this option or other macros in Section~\ref{sec:altformat}.
% \clearpage
%
% \subsection{Naming Macros}
%
% Although the formatting hooks do nothing by default, we use them here for teaching purposes. We also force first and subsequent uses as needed. See also Sections~\ref{sec:formatting} and~\ref{sec:tweaks}, which explain the concept in detail.
%
% \subsubsection{\texttt{\textbackslash Name} and \texttt{\textbackslash Name*}}
% \label{sec:Naming}
%
% \DescribeMacro{\Name}
% \DescribeMacro{\Name*}
% \cmd{\Name} displays and indexes names. It always prints the required ``surname'' field. \cmd{\Name} prints the full name at the first occurrence, then a partial form thereafter. \cmd{\Name*} always prints the full name. These macros generate index entries before and after a name in the body text in case of a page break. The general syntax is:
% \begin{quote}\small\setstretch{1.1}
% \cmd{\Name}| |\oarg{FNN}\marg{SNN|,| opt. FNN/Affix}\oarg{Alternate names}\\
% \cmd{\Name}|*|\oarg{FNN}\marg{SNN|,| opt. FNN/Affix}\oarg{Alternate names}
% \end{quote}
% In\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} the body text, not the index, the \meta{Alternate names} field replaces the \meta{FNN} field or the \meta{opt. FNN/Affix} field if they exist. If neither of the latter exist, then the older non-Western syntax is used (Section~\ref{sec:obsolete}).
%
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\
% |  \< Einstein & Albert & Einstein & >|\\
% |  \< Cicero & M.T. & Cicero & >|\\
% |  \< Confucius & & Confucius & >|\\
% |  \< Miyaz & & Miyazaki, Hayao & >|\\
% |  \< Eliz & & Elizabeth, I & >|\\
% |\end{nameauth}|
% \end{quote}
%
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{ll}\toprule
% |\Name [Albert]{Einstein}| or |\Einstein| & \Name [Albert]{Einstein}\\
% |\Name*[Albert]{Einstein}| or |\LEinstein| & \LEinstein\\
% |\Name [Albert]{Einstein}| or |\Einstein| & \Einstein\\\midrule
% |\Name [M.T.]{Cicero}| or |\Cicero| & \Name [M.T.]{Cicero}\\
% |\Name*[M.T.]{Cicero}[Marcus Tullius]| & \Name*[M.T.]{Cicero}[Marcus Tullius]\\
% |\Name [M.T.]{Cicero}| or |\Cicero| & \Cicero\\\midrule
% |\Name {Confucius}| or |\Confucius| & \Confucius\\\midrule
% |\Name {Miyazaki, Hayao}| or |\Miyaz| & \ForgetThis\Name {Miyazaki, Hayao}\\
% |\Name*{Miyazaki, Hayao}[Sensei]| & \Name*{Miyazaki, Hayao}[Sensei]\\
% |\Name {Miyazaki, Hayao}| or |\Miyaz| & \Name {Miyazaki, Hayao}\\\midrule
% |\Name {Elizabeth, I}| or |\Eliz| & \ForgetThis\Eliz\\
% |\Name*{Elizabeth, I}| or |\LEliz| & \Name*{Elizabeth, I}\\
% |\Name {Elizabeth, I}| or |\Eliz| & \Name {Elizabeth, I}\\\bottomrule
% \end{tabular}
% \end{center}
%
% When using the simplified interface, the preferred way to get alternate names is |\LCicero[Marcus Tullius]| and |\LMiyaz[Sensei]|: \LCicero[Marcus Tullius] and \LMiyaz[Sensei]. The next section explains why that is so.
%
% Note also that the alternate forename goes away in subsequent short name references. |\Name[M.T.]{Cicero}[Marcus Tullius]| shows up as just \Name [M.T.]{Cicero}[Marcus Tullius] in that case. By default, subsequent name references are surnames only.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsubsection{Forenames: \texttt{\textbackslash FName}}
% \label{sec:Fname}
%
% \DescribeMacro{\FName}
% \DescribeMacro{\FName*}
% \cmd{\FName} and its synonym \cmd{\FName*} print personal names only in subsequent name uses. They print full names for first uses. The two macros are the same in case you edit \cmd{\Name*} by adding an \texttt{F} to get a first reference. They print a full name, not a short name, when a name is used for the first time. The syntax is:
% \begin{quote}\small
% \cmd{\FName}\oarg{FNN}\marg{SNN|,| opt. FNN/Affix}\oarg{Alternate names}
% \end{quote}
% \DescribeMacro{\ForceFN}
% These\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut}
% macros work with both Eastern and Western names, but to get an Eastern personal name, one must precede these macros with \cmd{\ForceFN}.\footnote{Otherwise you would get poor results with some royal and ancient names.}
% See also Section~\ref{sec:tweaks} on how to vary some of the forms below. The standard results for subsequent name uses below are:
%
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{ll}\toprule
% |\FName[Albert]{Einstein}| or |\SEinstein| & \SEinstein\\\midrule
% |\FName[M.T.]{Cicero}[Marcus Tullius]| \\
% or |\SCicero[Marcus Tullius]| & \SCicero[Marcus Tullius]\\\midrule
% |\FName{Confucius}|  or |\SConfucius |& \FName{Confucius}\\\midrule
% |\FName{Miyazaki, Hayao}| or |\SMiyaz| & \FName{Miyazaki, Hayao}\\\midrule
% |\ForceFN\FName{Miyazaki, Hayao}|\\
% or |\ForceFN\SMiyaz| & \ForceFN\FName{Miyazaki, Hayao}\\\midrule
% |\ForceFN\FName{Miyazaki, Hayao}[Sensei]|\\
% or |\ForceFN\SMiyaz[Sensei]| & \ForceFN\FName{Miyazaki, Hayao}[Sensei]\\\midrule
% |\FName{Elizabeth, I}| or |\SEliz| & \SEliz\\\midrule
% |\ForceFN\FName{Elizabeth, I}| & \ForceFN\FName{Elizabeth, I}\\\midrule
% |\ForceFN\SEliz[the First]| & \ForceFN\SEliz[the First]\\\bottomrule
% \end{tabular}
% \end{center}
%
% The \meta{Alternate names} argument always replaces the forenames in the text. Sometimes this is a good thing, and sometimes it is not:
% \begin{nameauth}%
% \< Ches & Chesley B. & Sullenberger, III & >
% \< Sully & Chesley B. & Sullenberger, III & Sully >
% \end{nameauth}%
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\
% |  \< Lewis & Clive Staples & Lewis & >|\\
% |  \< CSL & Clive Staples & Lewis & C.S. >|\\
% |  \< Ches & Chesley B. & Sullenberger, III & >|\\
% |  \< Sully & Chesley B. & Sullenberger, III & Sully >|\\
% |\end{nameauth}|
% \end{quote}
%
% For example, if a book section refers always to \LCSL, but another section introduces him as \LLewis, one can use both \cmd{\CSL} and \cmd{\Lewis}. \cmd{\Lewis} and \cmd{\CSL} share common first and subsequent uses because they both point to the same \meta{FNN} (Clive Staples) and \meta{SNN} (Lewis).
%
% The drawback lies in remembering that \cmd{\Ches} gives us \Ches, while \cmd{\LSully} produces \LSully. Likewise, \cmd{\SCSL[Jack]} produces \SCSL[Jack]. The final field in the \texttt{nameauth} environment populates the \meta{Alternate Names} argument, making \texttt{[Jack]} normal text.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsection{Language Issues}
% Here we engage topics that relate to specific aspects of grammar and cultural standards. The \textsf{nameauth} package is designed with a keen awareness of cross-cultural use and tries to implement such aspects in a smooth fashion.
%
% \subsubsection{Affixes Need Commas}
% \label{sec:Affix}
%
% Comma-delimited affixes are shown below. For Western names, they separate a surname and an affix. For non-Western names, they separate either a surname and a forename or a name and an affix. \emph{Always use a comma as an affix delimiter}, even when commas are not printed. Spaces between the comma and affix are ignored. See also Section~\ref{sec:tolerance}.
%
% \begin{center}\small\ForgetName{Sun, Yat-sen}\setstretch{1.1}
% \begin{tabular}{ll}\toprule
% |\Name[Oskar]{Hammerstein, II}| & \KeepAffix\Name[Oskar]{Hammerstein, II}\\
% |\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\\midrule
% |\Name{Louis, XIV}| & \KeepAffix\Name{Louis, XIV}\\
% |\Name{Louis, XIV}| & \Name{Louis, XIV}\\\midrule
% |\Name{Sun, Yat-sen}| & \KeepAffix\Name{Sun, Yat-sen}\\
% |\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\\bottomrule
% \end{tabular}
% \end{center}
%
% Western\marginpar{\small\raggedleft\dbend} names with suffixes must use the comma-delimited syntax. Using the older non-Western syntax |\Name[Oskar]{Hammerstein}[II]| produces \SkipIndex\Name[Oskar]{Hammerstein}[II]  (index entry skipped). Also, one must use comma-delimited suffixes with the cross-reference target of \cmd{\AKA} (Section~\ref{sec:AKA}).\medskip
%
% \DescribeMacro{\KeepAffix}
% In the text only, \cmd{\KeepAffix} turns the space between \meta{SNN} and \meta{Affix} into a non-breaking space. This holds for a Western surname and affix, an ancient name and affix, and a native Eastern family name and personal name.\medskip
%
% \DescribeMacro{\KeepName}
% In the text only,\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} \cmd{\KeepName} turns all spaces between name components \meta{FNN}, \meta{SNN}, \meta{Affix}, and \meta{Alternate name(s)} into non-breaking spaces. You get no bad breaks with |\KeepName\LJWG[von]| \KeepName\LJWG[von].
%
% \cmd{\KeepAffix} and \cmd{\KeepName} affect all \textsf{nameauth} macros that print names in the text. Spaces between multiple names within each name component (think Spanish surnames and French or German forenames) are not affected.\medskip
%
% \DescribeMacro{\DropAffix}
% Preceding\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} the naming macros with \cmd{\DropAffix} will suppress an affix in a Western name. |\DropAffix\Name*[Oskar]{Hammerstein, II}| produces ``\DropAffix\Name*[Oskar]{Hammerstein, II}.'' This does not affect non-Western names.\medskip
%
% \DescribeMacro{\ShowComma}
% \DescribeMacro{\NoComma}
% \cmd{\ShowComma} forces a comma between a Western name and its affix. It works like the \texttt{comma} option on a per-name basis, and only in the body text. \cmd{\NoComma}\marginpar{\large\raggedleft\textsf{\bfseries 2.6}\strut} works like the \texttt{nocomma} option in the body text on a per-name basis.
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{@{}ll@{}}\toprule
% |\ShowComma\Name*[Louis]{Gossett, Jr.}| & \ShowComma\Name*[Louis]{Gossett, Jr.}\\
% |\NoComma\Name*[Louis]{Gossett, Jr.}| & \NoComma\Name*[Louis]{Gossett, Jr.}\\
% |\RevComma\ShowComma\Name*[Louis]{Gossett, Jr.}| & \RevComma\ShowComma\Name*[Louis]{Gossett, Jr.}\\
% |\RevComma\NoComma\Name*[Louis]{Gossett, Jr.}| & \RevComma\NoComma\Name*[Louis]{Gossett, Jr.}\\\bottomrule
% \end{tabular}
% \end{center}
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsubsection{Eastern Names}
% \label{sec:Eastern}
%
% The\marginpar{\small\raggedleft non-native} \textsf{nameauth} package offers ``non-native'' and ``native'' ways to handle romanized Eastern names. The ``non-native'' form is entered as a Western name and it is indexed as such. \cmd{\RevName} reverses its order in the body text:
% \begin{quote}\small
%   \cmd{\RevName}\cmd{\Name*}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% The index entry of this name form looks like \meta{SNN}, \meta{FNN} (including the comma). This type of entry is a Western form. Pick this form also when using Hungarian names. Apologies for needing to enter Hungarian names in reverse, as in |\RevName\Name*[Frenec]{Molnár}| \RevName\Name*[Frenec]{Molnár}\dag.\medskip
%
% In\marginpar{\small\raggedleft native} contrast, there are two general forms of syntax for ``native'' Eastern name forms, which are indexed as such and appear in Eastern name order in the body text. Apologies for using quasi-Western \meta{SNN} and \meta{FNN} nomenclature for Eastern names. The new syntax permits alternate names; the old does not:
% \begin{quote}\small\setstretch{1.1}
% \cmd{\Name}\marg{SNN, FNN}\oarg{Alternate names}\hfill (new syntax)\\
% \cmd{\Name}\marg{SNN}\oarg{FNN}\hfill (older syntax)
% \end{quote}
% The index entry of this name form looks like \meta{SNN} \meta{FNN} (no comma). This type of entry bears similarity with ancient and medieval forms. Pick native Eastern names when you want to use Eastern forms in the index.\medskip
%
% \DescribeMacro{\ReverseActive}
% \DescribeMacro{\ReverseInactive}
% \DescribeMacro{\RevName}
% In addition to the class options for reversing and capitalization (Section~\ref{sec:options}), \cmd{\ReverseActive} and \cmd{\ReverseInactive} reverse name order for blocks of text and \cmd{\RevName} does that once per name. These macros only affect names in the text. They work also with \cmd{\AKA} and its derivatives.
%
% The reverse output mechanism affects full names only. Nevertheless, it does not force full names. Results vary, based on the type of Eastern name forms being used. Non-native forms are shown by a dagger (\dag):
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{rll}\toprule
%  & \emph{unchanged} & |\RevName|\\\midrule
% |\LKonoe| & \LKonoe\dag & \RevName\LKonoe\dag\\
% |\LKonoe[Prime Minister]| & \LKonoe[Prime Minister]\dag & \meta{not appropriate}\\
% |\Konoe| & \Konoe\dag & \RevName\Konoe\dag\\
% |\SKonoe| & \SKonoe\dag & \RevName\SKonoe\dag\\\midrule
% |\LYamt| & \LYamt & \RevName\LYamt\\
% |\LYamt[Admiral]| & \meta{not appropriate} & \RevName\LYamt[Admiral]\\
% |\Yamt| & \Yamt & \RevName\Yamt\\
% |\SYamt| & \SYamt & \RevName\SYamt\\
% |\ForceFN\SYamt| & \ForceFN\SYamt & \ForceFN\RevName\SYamt\\\bottomrule
% \end{tabular}
% \end{center}
%
% Creating\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} ``last-comma-first'' listings by surname (Section~\ref{sec:LastFirst}) only makes sense with Western names and maybe non-native Eastern names, but not with native Eastern names or ancient forms. That is why native Eastern forms and ancient forms are unaffected by the comma form of reversing.\medskip
%
% Please\marginpar{\small\raggedleft\cmd{\global}} note that \cmd{\ReverseActive} and \cmd{\ReverseInactive} can be used explicitly as a pair. They also can be used singly within an explicit scope, where the effects cease after leaving that scope. Use \cmd{\global} to force a global effect.
% \clearpage
%
% \DescribeMacro{\AllCapsActive}
% \DescribeMacro{\AllCapsInactive}
% \DescribeMacro{\CapName}
% Using \cmd{\AllCapsActive} \cmd{\AllCapsInactive} for blocks of text and \cmd{\CapName} for specific names, the \textsf{nameauth} package allows one to capitalize \meta{SNN} in the body text only. These macros also work with \cmd{\AKA} and friends. For caps in the text and index see Sections~\ref{sec:altformat} and~\ref{sec:Hooksc}.
%
% Below, non-native Eastern forms (first Western, then reversed) are marked with a dagger ({\dag}). All other names are in native Eastern, then Western order. Older-syntax forms have a double dagger(\ddag):
%
% \begin{center}\small\setstretch{1.1}\AllCapsActive
% \begin{tabular}{lll}\toprule
%  & |\CapName| only & |\CapName\RevName|\\\midrule
% |\Name*[Yoko]{Kanno}| & \CapName\Name*[Yoko]{Kanno}\dag & \CapName\RevName\Name*[Yoko]{Kanno}\dag\\
% |\Name*{Arai, Akino}| & \Name*{Arai, Akino} & \RevName\Name*{Arai, Akino}\\
% |\Name*{Ishida}[Yoko]| & \CapName\Name*{Ishida}[Yoko]\ddag & \CapName\RevName\Name*{Ishida}[Yoko]\ddag\\
% |\Name*{Yohko}| & \Name*{Yohko} & \RevName\Name*{Yohko}\\\bottomrule
% \end{tabular}\AllCapsInactive
% \end{center}\smallskip
%
%
% Both\marginpar{\small\raggedleft\cmd{\global}} \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} have the same local restrictions as the other state-changing macros. Use \cmd{\global} to force a global effect.
%
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsubsection{Initials}
%
% Omit spaces between initials if possible; see also Bringhurst's \emph{Elements of Typographic Style}. If your publisher wants spaces between initials, try putting thin spaces |\,| between them. Use \cmd{\PretagName} to get the correct index sorting:\bigskip
%
% \leavevmode\begin{minipage}[c]{0.55\textwidth}\footnotesize\setstretch{1.1}
% |\PretagName[E.\,B.]{White}{White, E. B.}|\\
% |\begin{nameauth}|\\
% |  \< White & E.\,B. & White & >|\\
% |\end{nameauth}|
% \end{minipage}
% \begin{minipage}[c]{0.35\textwidth}\footnotesize
% \def\sep{\vrule width0.5pt\kern-0.5pt}%
% \normalsize\begin{tabular}{@{}ll@{}}\hline
% & \hspace{0.48pt}\hphantom{E.}\sep\,\sep\hphantom{B.}\sep\hphantom{\ }\sep\hphantom{White}\\
% \cmd{\White} & \hspace{0.48pt}\White\\
% & \hspace{0.48pt}\hphantom{E.}\sep\,\sep\hphantom{B.}\sep\hphantom{\ }\sep\hphantom{White}\\\hline
% & \sffamily\hphantom{E.}\sep\ \sep\hphantom{B.}\sep\ \sep\hphantom{White}\\
% Normal text:\hfill & \sffamily E. B. White\\
% & \sffamily\hphantom{E.}\sep\ \sep\hphantom{B.}\sep\ \sep\hphantom{White}\\\hline
% \end{tabular}
% \end{minipage}
%
% \subsubsection{Hyphenation}
%
% In English, some names come from other cultures. These names, like \SkipIndex\Name[John]{Strietelmeier} (|\Name[John]{Strietelmeier}|, index entry skipped) can break badly. One solution consistently uses optional hyphens, while another uses either \textsf{babel} or \textsf{polyglossia}. If using both solutions with a name, suppress unwanted index entries.
% \begin{quote}\small\setstretch{1.1}
% |\newcommand\de[1]{\foreignlanguage{ngerman}{#1}}|\\
% |% or polyglossia: \newcommand\de[1]{\textgerman{#1}}|\\
% |\begin{nameauth}|\\
% |  \< Striet & John & Strie\-tel\-meier & >|\\
% |  \< Strieti & John & \de{Strietelmeier} & >|\\
% |\end{nameauth}|\\
% |\PretagName[John]{Strie\-tel\-meier}{Strietelmeier, John}|\\
% |\PretagName[John]{\de{Strietelmeier}}{Strietelmeier, John}|
% \end{quote}
% In English, some names come from other cultures. These names, like \SkipIndex\Striet, (\cmd{\Striet}, index entry skipped) could break badly unless handled correctly. In English, some names come from other cultures. These names, like \Strieti, (\cmd{\Strieti}) could break badly if not handled correctly.
%
% \subsubsection{Listing by Surname}
% \label{sec:LastFirst}
%
% \DescribeMacro{\ReverseCommaActive}
% \DescribeMacro{\ReverseCommaInactive}
% \DescribeMacro{\RevComma}
% The macros \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}\ let us reorder long Western names (via \cmd{\Name*} and the like). The first two are broad toggles, while the third works on a per-name basis.
%
% These macros\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} do not affect ``native'' Eastern and ancient name forms. Also, see below how long uses are not always first uses:
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{lll}\toprule
% \ForgetThis\VBuren & \RevComma\LVBuren & OK\\
% \ForgetThis\Name[Oskar]{Hammerstein, II} & \RevComma\Name*[Oskar]{Hammerstein, II} & OK\\
% \ForgetThis\Aeth & \RevComma\LAeth & no change\\
% \ForgetThis\Name{Chiang}[Kai-shek] & \RevComma\Name*{Chiang}[Kai-shek] & no change\\
% \ForceName\Name{Confucius} & \RevComma\Name{Confucius} & no change\\\bottomrule
% \end{tabular}
% \end{center}
%
% Since\marginpar{\large\raggedleft\textsf{\bfseries 3.0}} reversing with commas does not change ``native'' Eastern and ancient names, we see its effects on ``non-native'' Eastern names:
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{rl}\toprule
% |\ForgetThis\Konoe| & \ForgetThis\Konoe\dag\\
% |\RevName\LKonoe| & \RevName\LKonoe\dag\\
% |\RevComma\LKonoe| & \RevComma\LKonoe\dag\\\bottomrule
% \end{tabular}
% \end{center}
%
% Both\marginpar{\small\raggedleft\cmd{\global}} \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} have the same local restrictions as the other state-changing macros unless you use \cmd{\global}.
%
% \subsubsection{Particles}
% \label{sec:standards}
%
% According to [\hyperlink{Mulvany}{Mulvany}, 165f.] and the \emph{Chicago Manual of Style}, English names with the particles \emph{de}, \emph{de\ la}, \emph{d'}, \emph{von}, \emph{van}, and \emph{ten} generally keep them with the last name, using varied capitalization. \emph{Le}, \emph{La}, and \emph{L'} always are capitalized unless preceded by \emph{de}. To Anglicize \JWG[Johann Wolfgang von] in the text as \LJWG[von], but indexed under ``Goethe, J.W. von,'' we use |\LJWG[von]|. |\Name[Catherine de']{Medici}| should be indexed as ``Medici, Catherine de'\,'' instead of modern ``De~Medici.'' See also Sections~\ref{sec:indexctrl} and especially~\ref{sec:DuBois} for name variants.\AltFormatActive\JustIndex\Cath\AltFormatInactive
%
% We\marginpar{\small\raggedleft non-breaking\break spaces} recommend inserting |~| or \cmd{\nobreakspace} between particles and names to prevent bad breaks.\footnote{With v.3.0, \cmd{\CapThis} does not eat the space between a single-letter particle and a name.}
% Some particles look very similar. For example, \emph{L'} and \emph{d'} are two separate glyphs each. \emph{Ľ} and \emph{ď} are one Unicode glyph each.\medskip
%
% \DescribeMacro{\CapThis}
% In English and modern Romance languages, \emph{e.g.}, \ForgetThis\Soto\ shows that these particles go in the \meta{SNN} field of \cmd{\Name}: \Soto. When the particle appears at the beginning of a sentence, one must capitalize it:
% \begin{quote}\small\setstretch{1.1}
% |\CapThis\Soto\ was a famous Spanish explorer in North America.|\\[1ex]
% \CapThis\Soto\ was a famous Spanish explorer in North America.
% \end{quote}
%
% \cmd{\CapThis},\marginpar{\large\raggedleft\textsf{\bfseries 3.2}\strut} rather, the capitalizing mechanism that it triggers, has undergone a significant overhaul in recent versions of \textsf{nameauth}. Earlier versions tried to take a few ``shortcuts'' that appeared to work. Problems arose with specific cases where capitalization did not work. We have addressed those problems, most of which involved macro expansion.
%
% Now, \cmd{\CapThis} should work as expected with all of the Unicode characters available in the T1 encoding. Section~\ref{sec:Unicode} has a list, yet see also the table on pages 455--63 in \emph{The Latex Companion}. For a broader set of Unicode characters, consider using \texttt{xelatex} and \texttt{lualatex}.
%
% Without going into the gory details, it became clear that:
% \begin{enumerate}
% \item There must be one ``regular'' test for a leading active Unicode character and a separate test when that occurs in a comma-delimited suffix.
% \item We cannot use the suffix designed for printing and for testing if we even have a suffix. The test requires a ``raw'' form of the suffix.
% \item The token list test for active Unicode characters can be its own component shared by the two test forms above.
% \item One should do one of the two tests, then pick one of two capitalization methods. Keeping everything separate will help the expansion work properly in every case.
% \item Every name component is modified. The idea is that you decide to use \cmd{\CapThis} in a short name form when the leading element needs to be capitalized. Chances are, you will not need a full name reference with suffix, etc. By capping every element, you have access to caps on demand using any form of short name reference. 
% \end{enumerate}
%
% \cmd{\CapThis} will not cause errors if one uses the \texttt{altformat} option and the provided macros for Continental surname formats because that option entirely bypasses the normal in-text capitalization mechanism. \cmd{\CapThis} still triggers the alternate capping macros, but the mechanism is different and far more manual. Otherwise \cmd{\CapThis} could cause errors in some cases where control sequences in the macro arguments conflict with the capitalization process. See Section~\ref{sec:altformat}.
%
% For another example, we suppose that you want to mention poet \Name[e.e.]{cummings}. You might be in a situation where an editor wants: ``\SkipIndex\SubvertThis\CapThis\Name[e.e.]{cummings'} motif of the goat-footed balloon man has underlying sexual motifs that nevertheless have a childish facade.'' We got that form using:
% \begin{quote}\small
% |\SkipIndex\SubvertThis\CapThis\Name[e.e.]{cummings'}|
% \end{quote}
%
% A long-name reference to \CapThis\Name*[e.e.]{cummings} really does not work, nor is it meant to. \cmd{\CapThis} is not meant for general situations. Using \cmd{\CapName} replaces both the original \meta{SNN} and the \meta{SNN} created by \cmd{\CapThis}. Again, this usage is situation-dependent.
%
% Names are beautiful, yet ambiguous creatures whose forms change greatly, depending on one's needs and circumstances. This package allows for such variation, yet it provides consistent in the index. We do try to minimize the amount of typing, allowing for automatic reformatting if one moves blocks of text around. We hope that this approach is useful.\medskip
%
% \DescribeMacro{\AccentCapThis}
% If the source files\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} for the \textsf{nameauth} package have Unicode encoding and run on a Unicode-compliant system, \cmd{\AccentCapThis} is not necessary. See also page~\pageref{page:CapSystem}. If the text encoding of the source files is changed or there are system encoding issues, \cmd{\AccentCapThis} might be needed with NFSS when the first name character is an active Unicode character. See also Section \ref{sec:Unicode}.
% \clearpage
%
% Medieval\marginpar{\small\raggedleft Medieval name\break issues} names present some interesting difficulties, often based on the expected standards of the context in which they are used:
% \begin{quote}\small\setstretch{1.1}
% |\PretagName{Thomas, à~Kempis}{Thomas a Kempis}|\hfill\emph{medieval}\\
% |\PretagName[Thomas]{à~Kempis}{Thomas a Kempis}|\hfill\emph{Western}\\
% |\begin{nameauth}|\\[0.2ex]
% |  \< KempMed & & Thomas,   à~Kempis & >|\hfill\emph{medieval, new syntax}\\
% |  \< KempAlt & & Thomas  & à~Kempis   >|\hfill\emph{medieval, older syntax}\\
% |  \< KempW     & Thomas  & à~Kempis & >|\hfill\emph{Western}\\
% |\end{nameauth}|
% \end{quote}
% The medieval forms\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} are \KempMed\ and \KempMed, indexed as ``Thomas à~Kempis.'' The suffixed place name ``\ForceFN\SKempMed'' (Latin for \emph{von Kempen}) is used by some as a surname and achieved by using |\ForceFN\SKempMed|. \CapThis\ForceFN\SKempMed\ can start a sentence via |\CapThis\ForceFN\SKempMed|. The old syntax works just as well: \CapThis\ForceFN\SKempAlt\ occurs via |\CapThis\ForceFN\SKempAlt|.
%
% Western forms\marginpar{\small\raggedleft\dbend} like |\KempW|: \SkipIndex\KempW\ are different from  medieval forms and create different index entries. |\CapThis\KempW| gives ``\SkipIndex\CapThis\KempW'' in the text and ``à~Kempis, Thomas'' in the index, which we suppress here.\footnote{Name variants result from work flow constraints, name authorities, and publisher styles. This package works with that, over against this author's plea for cultural sensitivity.}
% The publisher's way of handling names may differ from the standard way. This package allows for such variations.\footnote{Yet some publishers have problems with some name forms. An example of a true error is the index entry ``Yat-sen, Sun'' (as if Sun were a forename) in Immanuel Geiss, \emph{Personen: Die biographische Dimension der Weltgeschichte}, Geschichte Griffbereit vol. 2 (Munich: Wissen Media Verlag, 2002), 720. Still, the six-volume set is a helpful reference work.}
% Developing a good rapport with the publisher and the editor will help you apply this package to the company's style.
%
% Using \cmd{\CapThis} with forms like |\`a~Kempis| will work (\SkipIndex\CapThis\SubvertThis\ForceFN\ForceName\FName{Thomas, \`a~Kempis}) in all situations where one uses the preamble snippet in Section~\ref{sec:engines}.\footnote{This little example is among one of the longest uses of prefix macros in this manual: \cmd{\SkipIndex}\cmd{\CapThis}\cmd{\SubvertThis}\cmd{\ForceFN}\cmd{\ForceName}\cmd{\FName\{Thomas, \textbackslash`a~Kempis\}}.}
%
% \begingroup
% \makeatletter\renewcommand*\NamesFormat[1]{\begingroup\ignorespaces%
% \protected@edef\temp{\endgroup{\color{naviolet}\sffamily #1 %\ignorespaces
% \noexpand\NameQueryInfo[\unexpanded\expandafter{\the\@nameauth@toksa}]
% {\unexpanded\expandafter{\the\@nameauth@toksb}}
% [\unexpanded\expandafter{\the\@nameauth@toksc}]}}\temp}\makeatother%
% Non-English\marginpar{\small\raggedleft\dbend} contexts do not necessarily bind particles to surnames. One can use the alternate names field or ``text tags'' and ``index tags.'' See also Sections~\ref{sec:indextag}, \ref{sec:tagtext}, and~\ref{sec:Hooksb}. The macros below allow us to show \Name{Friedrich, I}, \Name*{Friedrich, I}, and \Name{Friedrich, I} via |\Name{Friedrich, I}|:
% \begin{quote}\footnotesize\setstretch{1.1}
% |\NameAddInfo{Friedrich, I}{Barbarossa}|\\
% |\PretagName{Friedrich, I}{Friedrich 1}|\\
% |\TagName{Friedrich, I}{ Barbarossa, emperor|\texttt{\textbar}|hyperpage}|\\[1ex]
% |\makeatletter\renewcommand*\NamesFormat[1]{\begingroup%|\\
% |\protected@edef\temp{\endgroup{\color{naviolet}\sffamily #1 %|\\
% |\noexpand\NameQueryInfo[\unexpanded\expandafter{\the\@nameauth@toksa}]|\\
% |{\unexpanded\expandafter{\the\@nameauth@toksb}}|\\
% |[\unexpanded\expandafter{\the\@nameauth@toksc}]}}\temp}\makeatother|
% \end{quote}
% \endgroup
%
% {\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsubsection{Accented Names}
% \label{sec:accents}
%
% For names that contain accented characters, using \texttt{xelatex} or \texttt{lualatex} with \texttt{xindy} (\texttt{texindy}) is recommended. See also Section~\ref{sec:engines}.
%
% In NFSS,\marginpar{\small\raggedleft\dbend} many Unicode characters are active. Especially with \texttt{makeindex}, use \cmd{\PretagName} to sort all names with active characters (Sections~\ref{sec:IndexSort} and~\ref{sec:Unicode}).
% \ForgetName{Æthelred, II}
% These active characters differ from explicit control sequences that one might type. We suppress unwanted index entries below among the names that truly are different, yet look the same.
% \begin{itemize}\small
% \item |\Name{Æthelred, II}|  creates \Name{Æthelred, II} and \Name{Æthelred, II}. Now we have a different name: |\Name{\AE thelred, II}| \SkipIndex\Name{\AE thelred, II} (a ``first reference'').
% \item |\Name{Bo\"ethius}| \Name{Bo\"ethius} is not the same as |\Name{Boëthius}| \SkipIndex\Name{Boëthius}. Both differ from |\Name{\textsf{Boëthius}}| \SkipIndex\Name{\textsf{Boëthius}}.
% \end{itemize}
%
% See Section~\ref{sec:Unicode} on how to add additional Unicode glyphs to the default set under NFSS, \textsf{inputenc}, and \textsf{fontenc}.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsection{Formatting}
%
% \subsubsection{Spaces \& Full Stops}
% \label{sec:tolerance}
%
% The \textsf{nameauth} package is forgiving with spaces; extra spaces usually do not create unique names, as we see below:
%
% \begin{center}\small\setstretch{1.1}\ForgetName[Martin Luther]{King, Jr.}
% \begin{tabular}{ll}\toprule
% \textit{Macro Example} & \textit{Resulting Text}\\\midrule
% |\Name*[Martin Luther]{King,Jr.}| & \Name*[Martin Luther]{King,Jr.}\\
% \cmd{\Name*}\texttt{[\textvisiblespace\textvisiblespace Martin\textvisiblespace\textvisiblespace Luther\textvisiblespace\textvisiblespace]\{\textvisiblespace\textvisiblespace King,\textvisiblespace\textvisiblespace Jr.\textvisiblespace\textvisiblespace\}} & \Name*[  Martin  Luther  ]{  King,  Jr.  }\\\bottomrule
% \end{tabular}
% \end{center}
%
% In Western names, affixes like ``Jr.'' (junior), ``Sr.'' (senior), ``d.\,J.'' (\textit{der J\"ungere}), and ``d.\,\"A.'' (\textit{der \"Altere}) can collide with the full stop in a sentence and produce two of them. \cmd{\Name}, \cmd{\FName}, and \cmd{\AKA} detect this in the printed form of a name and gobble the subsequent full stop as needed:
%
% \begin{center}\footnotesize\setstretch{1.1}\ForgetName[Martin Luther]{King, Jr.}
% \begin{tabular}{rcl}\toprule
% \textit{Macro Example\hfill} & \textit{Result} & \textit{Resulting Text}\\\midrule
% |\Name [Martin Luther]{King, Jr.}.| & gobbled & \Name [Martin Luther]{King, Jr.}.\\
% |\Name [Martin Luther]{King, Jr.}.| & stayed & \Name [Martin Luther]{King, Jr.}.\\
% |\Name*[Martin Luther]{King, Jr.}.| & gobbled & \Name*[Martin Luther]{King, Jr.}.\\
% |\DropAffix\Name*[Martin Luther]{King, Jr.}.| & stayed & \DropAffix\Name*[Martin Luther]{King, Jr.}.\\
% |\FName[Martin Luther]{King, Jr.}[M.L.]|. & gobbled & \FName[Martin Luther]{King, Jr.}[M.L.]\\\bottomrule
% \end{tabular}
% \end{center}
% Grouping tokens inhibit gobbling: |{\Name*[Martin Luther]{King, Jr.}}.|
% This produces ``{\Name*[Martin Luther]{King, Jr.}}.'' We see two periods. Enclosing |{Jr.}| within braces or making the whole suffix a macro argument also prevents gobbling. Leave the final period outside the macro or group, for example:
%\begin{quote}
%\indent{\small|\Name[Martin Luther]{\textSC{King}, \textSC{Jr}.}|}
% \end{quote}
% Compare Sections~\ref{sec:altformat} and~\ref{sec:Hooksc}.
%
% \subsubsection{Formatting in the Text}
% \label{sec:formatting}
%
% There are two kinds of formatting at work that interact with each other:
% \begin{enumerate}\small
% \item \textbf{Syntactic Formatting:} Displayed name elements, reversing, and caps normally occur only in the body text, not the index.
% \item \textbf{Name Post-Processing:} Hook macros apply formatting to the printed form of a name, which normally does not affect the name form.
% \end{enumerate}
%
% \DescribeMacro{\NamesFormat}
% \DescribeMacro{\FrontNamesFormat}
% \DescribeMacro{\MainNameHook}
% \DescribeMacro{\FrontNameHook}
% Independent\marginpar{\large\raggedleft\textsf{\bfseries 2.5}\strut}
% ``main-matter'' and ``front-matter'' systems format first and subsequent name uses. The main-matter system uses \cmd{\NamesFormat} to post-process first occurrences of names and \cmd{\MainNameHook} for subsequent uses. The front-matter system uses \cmd{\FrontNamesFormat} for first occurrences and \cmd{\FrontNameHook} for subsequent uses. The \texttt{alwaysformat} option causes only \cmd{\NamesFormat} and \cmd{\FrontNamesFormat} to be used. Section~\ref{sec:tweaks} show how the name reference systems are independent of other data sets in \textsf{nameauth}.\medskip
%
% \DescribeMacro{\NamesActive}
% \DescribeMacro{\NamesInactive}
% \cmd{\NamesInactive} and the \texttt{frontmatter} option make names use the front matter system. \cmd{\NamesActive} switches names to the main matter system.\medskip
%
% Please\marginpar{\small\raggedleft\cmd{\global}} note that these two macros can be used explicitly as a pair. They also can be used singly within an explicit scope, where the effects cease after leaving that scope. Use \cmd{\global} to force a global effect.\medskip
%
% These two systems differ only with respect to first and subsequent name uses. We show this here by using different colors. At the start of this manual, we set up the following after defining our custom colors:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*\FrontNamesFormat[1]{\color{nagreen}\sffamily #1}|\\
% |\renewcommand*\FrontNameHook[1]{\color{naolive}\sffamily #1}|\\
% |\renewcommand*\NamesFormat[1]{\color{naviolet}\sffamily #1}|\\
% |\renewcommand*\MainNameHook[1]{\color{naorange}\sffamily #1}|
% \end{quote}
% The two systems are meant to be used in distinct parts of the document, such as front matter and main matter or text and footnotes. The look awkward when used in the same block of text.
%
% \begin{quote}\small\setstretch{1.1}
% We switch to the ``front matter'' system:\\
% \cmd{\NamesInactive}\NamesInactive\\[0.4ex]
% \begin{tabular}{@{}ll}
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
% \end{tabular}\\
%
% Then we switch back to ``main matter'' system:\\
% \cmd{\NamesActive}\NamesActive\\[0.4ex]
% \begin{tabular}{@{}ll}
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
% \end{tabular}
% \end{quote}
%
% \DescribeMacro{\ForceName}
% Use this prefix macro\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} to force ``first use'' formatting for the next \cmd{\Name}, etc. This will not force a full name reference. One must use the \texttt{formatAKA} option when using this with \cmd{\AKA}, etc. We show this macro in Sections~\ref{sec:tweaks},  \ref{sec:AKA}, and~\ref{sec:Hooksb}.
% \clearpage
%
% Below\marginpar{\small\raggedleft \texttt{alwaysformat}} we simulate the \texttt{alwaysformat} option by manipulating the package internals. Using first-use hooks will not force full name references.
% \makeatletter\@nameauth@AlwaysFormattrue\makeatother%
% \ForgetName[M.T.]{Cicero}\ForgetName{Elizabeth, I}%
% \begin{itemize}
% \item\NamesInactive Using \texttt{alwaysformat} in the front matter will produce: \Name[Albert]{Einstein}, then  \Name[Albert]{Einstein}; \Name{Confucius}, then \Name{Confucius}.
% \item \global\NamesActive Using \texttt{alwaysformat} in the main matter will produce: \Name[M.T.]{Cicero}[Marcus Tullius], then \Name[M.T.]{Cicero}[Marcus Tullius]; \Name{Elizabeth, I}, then \Name{Elizabeth, I}.
% \end{itemize}
% \makeatletter\@nameauth@AlwaysFormatfalse\makeatother
%
% Basic formatting changes can take either the font switch forms or the font command forms. The following are equivalent:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*\NamesFormat{\bfseries}|\\
% |\renewcommand*\FrontNamesFormat{\textbf}|
% \end{quote}
% The hooks are called in a way that lets them either have one argument or none and keeps changes local via: \cmd{\bgroup}\meta{Hook}|{#1}|\cmd{\egroup}\medskip
%
% \makeatletter\ignorespaces%
% \let\@oldfntext\@makefntext\ignorespaces%
% \long\def\@makefntext#1{\renewcommand*\NamesFormat{\color{naviolet}\scshape}\@oldfntext{#1}}\ignorespaces%
% \makeatother\ignorespaces%
% The\marginpar{\small\raggedleft applied to\break footnotes\break\dbend} previous examples illustrate the independent systems or ``species'' of names. Use different ``species'' in different parts of your document. When we do not do this, for example, names in the body text like \Name[John Maynard]{Keynes} affect names in the footnotes.\footnote{You get \Name[John Maynard]{Keynes} from \cmd{\Name}\texttt{[John Maynard]\{Keynes\}} instead of \ForgetThis\Name[John Maynard]{Keynes}.}
% In this case, \cmd{\MainNameHook} is called instead of \cmd{\NamesFormat} because the name already occurred in the text.
% \begin{quote}\small\setstretch{1.1}
% |\makeatletter|{\color{nared}\hfill|% text affects footnotes|}\\
% |\let\@oldfntext\@makefntext|{\color{nared}\hfill|% restore this later|}\\
% |\long\def\@makefntext#1{%|{\color{nared}\hfill|% new format; same name system|}\\
% |  \renewcommand*\NamesFormat{\color{naviolet}\scshape}%|\\
% |  \@oldfntext{#1}}|\\
% |\makeatother|
% \end{quote}
%
% \makeatletter\ignorespaces%
% \long\def\@makefntext#1{\renewcommand*\FrontNamesFormat{\color{nagreen}\scshape}\NamesInactive\@oldfntext{#1}\NamesActive}\ignorespaces%
% \makeatother\ignorespaces%
% The front-matter system keeps names in the footnotes independent of those in the body text.\footnote{We have the expected \Name[John Maynard]{Keynes}, then \Name[John Maynard]{Keynes}.}
% You can synchronize the two naming systems if needed; see Section~\ref{sec:tweaks}. Using the front-matter system looks like:
% \begin{quote}\small\setstretch{1.1}
% |\makeatletter|{\color{nared}\hfill|% text does not affect footnotes|}\\
% |\long\def\@makefntext#1{%|{\color{nared}\hfill|% new format; different name system|}\\
% |  \renewcommand*\FrontNamesFormat{\color{nagreen}\scshape}%|\\
% |  \NamesInactive\@oldfntext{#1}\NamesActive%|\\
% |}\makeatother|
% \end{quote}
% \makeatletter\let\@makefntext\@oldfntext\makeatother%
% Now we change footnotes back to normal, for example:
% \begin{quote}\small\setstretch{1.1}
% |\makeatletter|\\
% |\let\@makefntext\@oldfntext|\\
% |\makeatother|
% \end{quote}
% {\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsubsection{Alternate Format}
% \label{sec:altformat}
% \begingroup\AltFormatActive
%
% \begin{center}\bfseries Basic Features\end{center}
% Name post-processing in the formatting hooks (Section~\ref{sec:formatting}) only affects the text. Continental formatting occurs in both the text and in the index. Therefore you need to use control sequences in the naming macro arguments.
%
%Section~\ref{sec:accents} showed us that changing a control sequence will change a name, even if one cannot see the difference. Those changes must be consistent in the index to avoid spurious entries. Here is how we address that.
%
% We use \cmd{\AltFormatActive}\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} at the start of this section to enable alternate formatting and switch it ``on.'' We begin with basic examples that do not change. We then move to advanced features that allow change in the text.
%
% If made the \meta{SNN} argument of a name macro,\marginpar{\small\raggedleft how to break stuff\break\dbend} |\textsc{a Name, Problem}| will cause an error due to using commas as suffix delimiters. We fix that by using: |\textsc{a Name}, \textsc{Problem}|.
%
% \cmd{\CapThis} still can break |\textsc{a Name}, \textsc{Problem}| under the normal formatting regime. Alternate formatting prevents this by suppressing the normal effects of \cmd{\CapThis}.
%
% Previous methods to get Continental formatting still should work. Simply use the \texttt{altformat} option or \cmd{\AltFormatActive} to add protection against \cmd{\CapThis}.\medskip
%
% \DescribeMacro{\AltFormatActive}
% Both the \texttt{altformat} option and \cmd{\AltFormatActive} globally enable alternate formatting and switch the formatting macros ``on.'' It will change the effects of \cmd{\AltFormatActive*}. It causes \cmd{\CapThis} only to work via \cmd{\AltCaps}.\medskip
%
% \DescribeMacro{\AltFormatActive*}
% When one wants to enable alternate formatting but keep the formatting macros in the ``off'' state, use the starred form \cmd{\AltFormatActive*}. It can change the effects of both the \texttt{altformat} option and \cmd{\AltFormatActive}. It causes \cmd{\CapThis} only to work via \cmd{\AltCaps}.\medskip
%
% \DescribeMacro{\AltFormatInactive}
% When one needs to switch alternate formatting ``off'' and deactivate its mechanism, use \cmd{\AltFormatInactive} to revert globally to standard formatting and the normal function of \cmd{\CapThis}.
% \begin{center}\small
% \begin{tabular}{lcc}\toprule
%                          & Enabled & Switched ``On''\\\midrule
% \cmd{\AltFormatActive}   & \YES    & \YES\\
% \cmd{\AltFormatActive*}  & \YES    & \NO\\
% \cmd{\AltFormatInactive} & \NO     & \NO\\\bottomrule
% \end{tabular}
% \end{center}
%
% \DescribeMacro{\textSC}
% \DescribeMacro{\textIT}
% \DescribeMacro{\textBF}
% \DescribeMacro{\textUC}
% Continental formatting can be as simple as using the short macro \cmd{\textSC}. Three other macros also implement alternate formatting. These macros make changes only when alternate formatting is active. We sort the index entry and demonstrate the formatting activated by \cmd{\AltFormatActive}.
% \begin{quote}\small\setstretch{1.1}
% |\PretagName[Greta]{\textSC{Garbo}}{Garbo, Greta}|\\
% |\PretagName[Ada]{\textIT{Lovelace}}{Lovelace, Ada}|\\
% |\PretagName[Charles]{\textBF{Babbage}}{Babbage, Charles}|\\
% |\PretagName{\textUC{Tokugawa}, Ieyasu}{Tokugawa Ieyasu}|
% \end{quote}
% \clearpage
% \begin{quote}\small\setstretch{1.1}
% |\Name[Greta]{\textSC{Garbo}}|\dotfill \Name[Greta]{\textSC{Garbo}}; \Name[Greta]{\textSC{Garbo}}\\
% |\Name[Ada]{\textIT{Lovelace}}|\dotfill \Name[Ada]{\textIT{Lovelace}}; \Name[Ada]{\textIT{Lovelace}}\\
% |\Name[Charles]{\textBF{Babbage}}|\dotfill \Name[Charles]{\textBF{Babbage}}; \Name[Charles]{\textBF{Babbage}}\\
% |\Name{\textUC{Tokugawa}, Ieyasu}|\dotfill \Name{\textUC{Tokugawa}, Ieyasu}; \Name{\textUC{Tokugawa}, Ieyasu}
% \end{quote}
%
% Formatting\marginpar{\small\raggedleft\dbend} also occurs in the index using this method. Any time that a naming macro writes to the index, the flags that control these formatting macros must be in the same state, or else you will get spurious index entries.
%
% A comma\marginpar{\small\raggedleft comma karma} delimiter splits the mandatory macro argument into a root and an affix. To avoid errors,  format the name and suffix separately. The example below gives us \JRIII, then \JRIII.
% \begin{quote}\footnotesize\setstretch{1.1}
% |\PretagName[John David]{\textSC{Rockefeller},\textSC{III}}%|\\
% |  {Rockefeller, John David 3}|\\
% |\begin{nameauth}|\\
% |    \< JRIII & John David & \textSC{Rockefeller},\textSC{III} & >|\\
% |\end{nameauth}|
% \end{quote}
%
% For non-Western names, the new syntax and the older syntax produce the same control sequence that identifies names. Again we are careful to avoid putting the comma delimiter within a container macro. 
% \begin{quote}\small\setstretch{1.1}
% |\PretagName{\textUC{Fukuyama}}[Takeshi]{Fukuyama Takeshi}|\\
% |\begin{nameauth}|\\
% |  \< Fukuyama  & & \textUC{Fukuyama}, Takeshi &         >|\\
% |  \< OFukuyama & & \textUC{Fukuyama}          & Takeshi >|\\
% |\end{nameauth}|
% \end{quote}
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{rl}\toprule
% |\Fukuyama| & \Fukuyama\\
% |\OFukuyama| & \OFukuyama\\
% |\LOFukuyama| & \LOFukuyama\\
% |\Fukuyama| & \Fukuyama\\\bottomrule
% \end{tabular}
% \end{center}
%
% Only the new syntax allows one to use alternate names in the text. For example, |\LFukuyama[Sensei]| \LFukuyama[Sensei] wrote \emph{Nihon Fukuin R\=uteru Ky\=okai Shi} in 1954, after studying in the US in the 1930s. The old syntax |\LOFukuyama[Sensei]|, which we avoid, yields \LOFukuyama[Sensei].
%
% \begin{center}\bfseries Advanced Features\end{center}
% A more complex version of alternate formatting allows us to make format changes in the text while keeping format consistent in the index. We use \cmd{\textSC}, \cmd{\textIT}, \cmd{\textBF}, and \cmd{\textUC} with \cmd{\noexpand} and special triggering macros. Using \cmd{\noexpand} is crucial because we do not want to have the macros expand at the wrong time, giving us the wrong results. Thus:
% \begin{quote}\small\setstretch{1.1}
% |\Name[Martin]{\textSC{Luther}}|\hfill \emph{basic}\\
% |\Name[Martin]{\noexpand\textSC{Luther}}|\hfill \emph{advanced}
% \end{quote}
%
% \renewcommand*\MainNameHook{\color{naorange}\sffamily\AltOff}
% Remember |\textsc{a Name}, \textsc{Problem}|? With a little work adding the alternate formatting macros and \cmd{\noexpand} we get:
% \begin{quote}\footnotesize\setstretch{1.1}
% |\noexpand\textSC{\noexpand\AltCaps{a}| |Name},| |\noexpand\textSC{Problem}}|
% \end{quote}
% With an additional change to the formatting hooks, whenever alternate formatting is active, the naming macros will avoid \SkipIndex\Name{\noexpand\textSC{\noexpand\AltCaps{a} Name}, \noexpand\textSC{Problem}}. \SkipIndex\CapThis\Name*{\noexpand\textSC{\noexpand\AltCaps{a} Name}, \noexpand\textSC{Problem}} will not occur even with \cmd{\CapThis} and \SkipIndex\Name{\noexpand\textSC{\noexpand\AltCaps{a} Name}, \noexpand\textSC{Problem}} will work just fine. We suppressed the index entries that would have been created here.
%
%The macros below work together for advanced alternate formatting.
% \begin{enumerate}\small
% \item The macro\DescribeMacro{\AltOff}\ \cmd{\AltOff} does nothing except when called in a formatting hook, where it ``switches off'' alternate formatting. When that happens, \cmd{\textSC}, \cmd{\textBF}, \cmd{\textIT}, and \cmd{\textUC} do nothing. This macro works with the \texttt{altformat} option and when \cmd{\AltFormatActive} has been called.
%
% \item The macro\DescribeMacro{\AltOn}\ \cmd{\AltOon} does nothing except when called in a formatting hook, where it ``switches on'' alternate formatting. When that happens, \cmd{\textSC}, \cmd{\textBF}, \cmd{\textIT}, and \cmd{\textUC} perform their changes. This macro works when \cmd{\AltFormatActive*} has been called.
%
% \item Using \cmd{\noexpand} is the golden key (\emph{clavis aurea}) that lets us expand formatting changes only when desired. It enables this kind of formatting hook, which we must implement:
% \begin{quote}\small
% |\renewcommand*\MainNameHook{\AltOff}|
% \end{quote}
% \item Since\DescribeMacro{\AltCaps}\ the normal effects of \cmd{\CapThis} are disabled  \cmd{\AltCaps} provides an alternate means to this end. It capitalizes its argument in braces |{| |}| when it is used in a macro hook and triggered by \cmd{\CapThis}.
% \end{enumerate}
%
% Since we used \cmd{\AltFormatActive} in this section it has triggered formatting by default. We only need to change \cmd{\MainNameHook} and \cmd{\FrontNameHook} because we want to have formatting in first uses but suppress it in subsequent uses. Below we match the style of this manual with the redesign of the formatting hooks and we include a sample text:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*\MainNameHook[1]%|\\
% |  {\color{naorange}\sffamily\AltOff}|\medskip
%
% With the 500th anniversary of the Reformation in 2017, studies should focus both on the life of \Luth\ and on the social, religious, and political factors of the time that influenced \Luth.
% \end{quote}
%
% We show alternate formatting and capitalization in the text, here being mindful of how medieval Italian differs from modern Italian:
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\
% |  \< Cath & Catherine \noexpand\AltCaps{d}e'|\\
% |          & \noexpand\textSC{Medici} & >|\\
% |\end{nameauth}|\medskip
%
%This gives us \Cath\ and \Cath. To get either \ForceName\CapThis\LCath[\noexpand\AltCaps{d}e'] or \CapThis\LCath[\noexpand\AltCaps{d}e'], use |\CapThis\LCath[\noexpand\AltCaps{d}e']|.
% \end{quote}
%
% Sections~\ref{sec:formatting} and~\ref{sec:Hooksc} have more on these topics. We resume normal formatting with \cmd{\AltFormatInactive}. We do not use alternately-formatted names in the normal regime in order to prevent spurious index entries.
% \AltFormatInactive\endgroup
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsection{Indexing Macros}
%
% Current\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} versions of \textsf{nameauth} offer greater flexibility with indexing but still implement some error protection. We cover the indexing macros here because the later macros in this manual build on many of their concepts. Some aspects of indexing go beyond the scope of this package.\footnote{For example, search for ``memoir babel index'' at \url{http://tex.stackexchange.com}.}
%
% \subsubsection{Indexing Control}
% \label{sec:indexctrl}
%
% \DescribeMacro{\IndexActive}
% \DescribeMacro{\IndexInactive}
% Using the \texttt{noindex} option deactivates the indexing function of this package until \cmd{\IndexActive} occurs. Another macro, \cmd{\IndexInactive}, will deactivate indexing again. These can be used throughout the document. \cmd{\ExcludeName} and \cmd{\IncludeName} do not deactivate indexing, but they leverage the cross-referencing system to prevent page entries.\medskip
%
% Please\marginpar{\small\raggedleft\cmd{\global}} note that these two macros can be used explicitly as a pair. They also can be used singly within an explicit scope, where the effects cease after leaving that scope. Use \cmd{\global} to force a global effect.
%
% \begin{center}\bfseries \cmd{\IndexInactive} suppresses index sorting and tagging macros.\end{center}
%
% \DescribeMacro{\SkipIndex}
% The prefix\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} macro \cmd{\SkipIndex} will suppress indexing for just one instance of a naming or cross-referencing macro. It will not alter name forms or formatting. For example, |\SkipIndex\Name[Monty]{Python}| produces \SkipIndex\Name[Monty]{Python} in the text with no index entry. The same thing again yields \SkipIndex\Name[Monty]{Python}. Both \cmd{\IndexName} and \cmd{\IndexRef} ignore \cmd{\SkipIndex} and allow its effect, with other prefix macros, to ``pass through'' to the next naming macro.\medskip
%
% \DescribeMacro{\JustIndex}
% This prefix macro makes \cmd{\Name} and \cmd{\Fname} act just like a call to \cmd{\IndexName} one time only. That means, like \cmd{\IndexName}, the effects of all the other prefix macros will ``pass through'' to the next naming macro. Both \cmd{\AKA} and \cmd{\PName} ignore and reset the flag controlled by this macro.
%
% All the changes\marginpar{\small\raggedleft\dbend} made by the prefix macros pass through |\JustIndex\|\meta{$name_1$} to the next instance of \cmd{\Name}, etc., |\|\meta{$name_2$}. This is exactly as if you called \cmd{\IndexName}. This makes |\JustIndex\|\meta{$name_1$}|\SkipIndex\|\meta{$name_2$} equivalent to |\SkipIndex\JustIndex\|\meta{$name_1$}|\|\meta{$name_2$}.\medskip
%
% Now we use tricks from Sections~\ref{sec:IndexName}, \ref{sec:IndexXref} and~\ref{sec:tweaks} to modify name forms, formatting, and indexing. Instead of using \cmd{\SkipIndex}, \cmd{\IndexInactive}, and \cmd{\IndexActive}, here we let the name exclusion mechanism protect a name:
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\
% |  \< Washs & George & Washington's & >|\\
% |\end{nameauth}|\\
% |\ExcludeName[George]{Washington's}|
% \end{quote}
% |\Washs| and |\Washs| produce \Washs\ and \Washs, but no index entries. Use |\JustIndex\Wash|\JustIndex\Wash\ as needed. Remember that one only needs this trick when using something other than default formatting. Otherwise just put an inflected ending after the name macro.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsubsection{Index Entries}
% \label{sec:IndexName}
%
% \DescribeMacro{\IndexName}
% The naming macros (\cmd{\Name}, etc.) use this macro to create index entries. You can use it too. It prints nothing in the body text. The syntax is:
% \begin{quote}\small
% \cmd{\IndexName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \cmd{\IndexName} complies with the new syntax, where a suffixed pair in \meta{SNN} is a name/affix pair that can be ancient or Eastern. If \meta{FNN} are present, it ignores \meta{Alternate names} for Western and native Eastern name forms. If \meta{FNN} are absent, \cmd{\IndexName} sees \meta{Alternate names} as an affix or Eastern forename using the older syntax.
%
% If used after \cmd{\IndexInactive} this macro does nothing until \cmd{\IndexActive} appears. It will not create index entries for cross-references made by \cmd{\IndexRef} and \cmd{\AKA}. It will not index names excluded by \cmd{\ExcludeName}. This provides a basic level of error protection for professional indexing.
%
% The indexing mechanism in the \textsf{nameauth} package follows [\hyperlink{Mulvany}{Mulvany}, 152--82] and the \emph{Chicago Manual of Style} regarding Western name affixes. Thus \LChes\ becomes ``Sullenberger, Chesley B., III'' in the index.
%
% To show what gets into the index entries, consider the following example, much of which gets set up only once in the document.
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\
% |  \< Dem     &          & Demetrius, I    & >|\\
% |  \< Harnack & Adolf    & Harnack         & >|\\
% |  \< JWG     & J.W. von & Goethe          & >|\\
% |  \< Miyaz   &          & Miyazaki, Hayao & >|\\
% |\end{nameauth}|
% \end{quote}
% \begingroup\NameAddInfo{Demetrius, I}{Soter}
% \makeatletter\renewcommand*\NamesFormat[1]{\begingroup\ignorespaces%
% \protected@edef\temp{\endgroup{\color{naviolet}\sffamily #1 %\ignorespaces
% \noexpand\NameQueryInfo[\unexpanded\expandafter{\the\@nameauth@toksa}]
% {\unexpanded\expandafter{\the\@nameauth@toksb}}
% [\unexpanded\expandafter{\the\@nameauth@toksc}]}}\temp}\makeatother%
% We add a text tag as a sobriquet and use the hook from Section~\ref{sec:standards}:
% \begin{quote}\footnotesize\setstretch{1.1}
% |\NameAddInfo{Demetrius, I}{Soter}|\\[1ex]
% |\makeatletter\renewcommand*\NamesFormat[1]{\begingroup%|\\
% |\protected@edef\temp{\endgroup{\color{naviolet}\sffamily #1 %|\\
% |\noexpand\NameQueryInfo[\unexpanded\expandafter{\the\@nameauth@toksa}]|\\
% |{\unexpanded\expandafter{\the\@nameauth@toksb}}|\\
% |[\unexpanded\expandafter{\the\@nameauth@toksc}]}}\temp}\makeatother|
% \end{quote}
% We also add an index tag: |\TagName{Demetrius, I}{ Soter, king}| and a sort tag: |\PretagName{Demetrius, I}{Demetrius 1}|.
% \begin{center}\footnotesize\setstretch{1.1}
% \begin{tabular}{lll}\toprule
% Text & Source & Index\\\midrule
% \LDem & \cmd{\LDem} & Demetrius I Soter, king\\
% \LDem & \cmd{\LDem} & Demetrius I Soter, king\\
% \LHarnack[Adolf von] & \cmd{\LHarnack[Adolf von]} & Harnack, Adolf\\
% \LHarnack & \cmd{\LHarnack} & Harnack, Adolf\\
% \LJWG[Joh. Wolfg. v.] & \cmd{\LJWG[Joh. Wolfg. v.]} & Goethe, J.W. von\\
% \LJWG & \cmd{\LJWG} & Goethe, J.W. von\\
% \LMiyaz & \cmd{\LMiyaz} & Miyazaki Hayao\\
% \LMiyaz[Sensei] & \cmd{\LMiyaz[Sensei]} & Miyazaki Hayao\\
% \end{tabular}
% \end{center}
% Everything in the \meta{FNN} and \meta{SNN} arguments, including the \meta{Affix}, gets in the index. When the final optional argument is interpreted as an alternate name, it does not become part of the index entry. Text tags never get in the index, but index tags always get in the index.
% \endgroup
% \clearpage
%
% \subsubsection{Index Cross-References}
% \label{sec:IndexXref}
%
% \DescribeMacro{\IndexRef}
% The\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} cross-referencing macros (\cmd{\AKA}, etc.) use this macro. Also available to users, \cmd{\IndexRef} creates a \emph{see} reference by default from the name defined by its first three arguments to whatever one puts in the final argument. Section~\ref{sec:tweaks} show how cross-references are independent of other data sets. The syntax is:
% \begin{quote}\small
% \cmd{\IndexRef}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{reference target}
% \end{quote}
%
% The name used for the cross-reference is parsed like \cmd{\IndexName}. The final argument is neither parsed nor checked to see if a corresponding main entry exists. For example, to cross-reference ``Sun King'' with \Name*{Louis, XIV} use: \cmd{\IndexRef}\texttt{\{Sun King\}\{Louis XIV\}}\IndexRef{Sun King}{Louis XIV}. To format that reference in the text, use \cmd{\AKA} (Section~\ref{sec:AKA}).
%
% \begin{center}\bfseries Please see page~\pageref{page:manualxref} regarding complex cross-references.\end{center}
%
% \DescribeMacro{\SeeAlso}
% One\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} can precede \cmd{\IndexRef}, \cmd{\AKA}, or \cmd{\PName} with \cmd{\SeeAlso} to produce a \emph{see also} reference for a name that has appeared already in the index.\footnote{When the \texttt{verbose} option is selected, \cmd{\IndexRef} warns that a name once used as a page number entry is now being used as a cross-reference. It also warns when one attempts to redefine or alter an established cross-reference.}
% However, this should be used with caution, as the following points indicate:
% \begin{itemize}\small
% \item If on page 10 there is |\SeeAlso\IndexRef{Bar}{Foo}|, one \emph{cannot} have index page entries for ``Bar'' thereafter. A \emph{see also} reference comes after page references.
% \item If on page 10 there is |\SeeAlso\IndexRef{Bar}{Foo}|, one \emph{can} have index page entries for ``Foo'' thereafter because it is the target of ``Bar.''
% \item If on page 10 there is |\Name{Bar}| and on page 12 |\IndexRef{Bar}{Foo}|, that will not work because \emph{see} references cannot contain page references.
% \item Suggestion: Group references together: |\IndexRef{Bar}{Baz; Foo}|.\\ Avoid |\IndexRef{Bar}{Baz} \IndexRef{Bar}{Foo}|.\footnote{Professional indexers often use programs like \texttt{Cindex} that enforce a rigorous, standard methodology and syntax. The \textsf{nameauth} package likewise tries to follow suit.}
% \end{itemize}
%
% \cmd{\IndexRef} causes an index tag with the format \meta{some text}\verb+|+\meta{some macro} to be reduced to \meta{some text} in the cross-reference. This allows cross-references to work with any index macro, e.g. \texttt{\textbar hyperpage}, used by \cmd{\TagName} (Section~\ref{sec:indextag}).\medskip
%
% \DescribeMacro{\ExcludeName}
% This\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} macro prevents a name from being used as either an index entry or as an index cross-reference. It ignores extant cross-references. The syntax is:
% \begin{quote}\small
% \cmd{\ExcludeName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% After |\ExcludeName[Kris]{Kringle}|\ExcludeName[Kris]{Kringle}, you can use |\Name[Kris]{Kringle}| to get \Name[Kris]{Kringle} and \Name[Kris]{Kringle}. After |\ExcludeName[Santa]{Claus}|\ExcludeName[Santa]{Claus} you can use |\AKA[Kris]{Kringle}[Santa]{Claus}| \AKA[Kris]{Kringle}[Santa]{Claus}. No index entries are created.
%
% This can be used to prevent references in the index after you are done with a name. Unlike \cmd{\IndexInactive} and \cmd{\IndexActive} this macro does not suspend the indexing system, but only works on a per-name basis.
% \clearpage
%
% \DescribeMacro{\IncludeName}
% \DescribeMacro{\IncludeName*}
% Feel\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} like breaking the indexing rules set by \textsf{nameauth}? Some might want to do things differently. These macros have the same syntax as \cmd{\ExcludeName}:
% \begin{quote}\small
% \cmd{\IncludeName\ }\oarg{FNN}\marg{SNN}\oarg{Alternate names}\\
% \cmd{\IncludeName*}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% The unstarred form of \cmd{\IncludeName} only removes an exclusion created by \cmd{\ExcludeName}. The starred form of \cmd{\IncludeName} completely unprotects a cross-reference and allows it to have a page entry like a name.
%
% For example, we used |\ExcludeName{Attila, the Hun}| after his appearance in Section~\ref{sec:simplestart}. Using \cmd{\IfAKA\{Attila, the Hun\}} (Section~\ref{sec:tests}) tells us that, ``\IfAKA{Attila, the Hun}{Attila is a cross-reference}{Attila is a name}{Attila is excluded}.''
% Now if we |\IncludeName{Attila, the Hun}|\IncludeName{Attila, the Hun}, a reference to |\LAttil| will create a name and an index entry on this page: \LAttil. \cmd{\IfAKA} now tells us that ``\IfAKA{Attila, the Hun}{Attila is a cross-reference}{Attila is a name}{Attila is excluded}.''
%
% Cross-references get more protection. \cmd{\IfAKA[Jay]\{Rockefeller\}} (a reference in a footnote from Section~\ref{sec:simplestart}) tells us that ``\IfAKA[Jay]{Rockefeller}{Jay is a cross-reference}{Jay is a name}{Jay is excluded}.'' Using |\IncludeName[Jay]{Rockefeller}|\IncludeName[Jay]{Rockefeller} changes nothing: we still get ``\IfAKA[Jay]{Rockefeller}{Jay is a cross-reference}{Jay is a name}{Jay is excluded}.'' |\IncludeName*[Jay]{Rockefeller}|\IncludeName*[Jay]{Rockefeller} results in ``\IfAKA[Jay]{Rockefeller}{Jay is a cross-reference}{Jay is a name}{Jay is excluded},'' removing all protection of that cross-reference.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsubsection{Index Sorting}
% \label{sec:IndexSort}
%
% The general practice for sorting with \texttt{makeindex -s} involves creating your own |.ist| file (pages 659--65 in \emph{The Latex Companion}). Otherwise the following form works with both \texttt{makeindex} and \texttt{texindy}: |\index{|\meta{sort key}|@|\meta{actual}|}|
%
% \begin{center}\bfseries Basic Sorting (for Makeindex and More)\end{center}
%
% \DescribeMacro{\PretagName}
% \noindent The \marginpar{\large\raggedleft\textsf{\bfseries 2.0}\strut}
% \textsf{nameauth} package integrates this sort of index sorting automatically by using a ``pretag.'' Section~\ref{sec:tweaks} show how sorting tags are independent of other data sets in \textsf{nameauth}. The syntax is:
% \begin{quote}\small
% \cmd{\PretagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
%
% \cmd{\PretagName} creates a sort key terminated with the ``actual'' character, which is |@| by default. Do not include the ``actual'' character in the ``pretag.''
% For example:
% \begin{quote}\small\setstretch{1.1}
% |\PretagName[Jan]{Łukasiewicz}{Lukasiewicz, Jan}|\\
% |\PretagName{Æthelred, II}{Aethelred 2}|
% \end{quote}
%
% One need only ``pretag'' names once in the preamble. Every time that one refers to \Name*[Jan]{Łukasiewicz} or \Name*{Æthelred, II}, the proper index entry will be tagged and sorted automatically.
%
% Additionally, one can include sub-entry delimiters when sorting, so \meta{Some Name} can be sorted as a sub-entry of ``MyCategory'' by the following:
% \begin{quote}\small
% |\PretagName[Some]{Name}{MyCategory!Name, Some}|
% \end{quote}
%
% One also can ``pretag'' a cross-reference created with \cmd{\IndexRef}, \cmd{\AKA}, and so on. See also Sections~\ref{sec:IndexXref} and~\ref{sec:AKA}.
% \clearpage
%
% Although the \cmd{\PretagName} macro might look similar to the the other tagging macros, its use is quite different:
% \begin{itemize}\small
% \item You can ``pretag'' any name and any cross-reference.
% \item You can ``tag'' and ``untag'' only names, not cross-references.
% \item There is no command to undo a ``pretag.''
% \end{itemize}
%
% \DescribeMacro{\IndexActual}
% If you need to change the ``actual'' character, such as with \texttt{gind.ist}, you would put |\IndexActual{=}| in the preamble before any use of \cmd{\PretagName}.
%
% \begin{center}\bfseries Extra Spaces and Sorting\end{center}
%
% \noindent Under\marginpar{\small\raggedleft\dbend} NFSS, active Unicode characters expand to add one or two spaces after control sequences. See \cmd{\indexentry} and \cmd{\item} entries in your \texttt{idx} and \texttt{ind} files. For example, \texttt{ä} becomes \texttt{\cmd{\IeC\textvisiblespace}\{\cmd{\"a}\}} (one added space) and \texttt{Æ} becomes \texttt{\cmd{\IeC\textvisiblespace}\{\cmd{\AE\textvisiblespace}\}} (two added spaces).
%
% Section~\ref{sec:Unicode} shows how this is related to the number of times the active character must be expanded. The character \texttt{Æ} must expand twice, through both \cmd{\IeC} and \cmd{\T1}, while \texttt{ä} expands only once through \cmd{\IeC} to a letter. The character \texttt{ß} (\emph{scharfes Ess, Esszett}) below expands twice.
%
% Both \texttt{xelatex} and \texttt{lualatex} (using \textsf{fontspec}) avoid these issues by handling the characters natively. Thus we have the following:
% \begin{center}\small
% \begin{tabular}{l@{\,}l@{\,}c@{\,}l}
% NFSS: & |\index{Fußball}| & $\rightarrow$ & \cmd{\indexentry}\ignorespaces%
% \texttt{\{Fu\cmd{\IeC\textvisiblespace}\{\cmd{\ss\textvisiblespace}\}ball\}\{}\ignorespaces%
% \meta{page}\texttt{\}}\\
% fontspec: & |\index{Fußball}| & $\rightarrow$ & \cmd{\indexentry}\texttt{\{Fußball\}\{}\meta{page}\texttt{\}}\\
% cseq: & |\index{Fu\ss ball}| & $\rightarrow$ & \cmd{\indexentry}\texttt{\{Fu\cmd{\ss\textvisiblespace}ball\}\{}\meta{page}\texttt{\}}\\
% \end{tabular}
% \end{center}
%
% A macro with the general form below, similar to \cmd{\IndexName}, will add two spaces after \emph{other} control sequences that are expanded multiple times. Those spaces only affect index sorting, not appearance. Remember this when using and modifying manual index entries with \textsf{nameauth}:
% \begin{quote}\small\setstretch{1.1}
% |\newcommand\IndexExample[1]{%|\\
% \hbox{}\qquad|\protected@edef\argument{#1}\index{\argument}}|
%
% |\IndexExample{\textsc{football}}| $\rightarrow$\\ \hbox{}\qquad\ignorespaces%
% \cmd{\indexentry}\ignorespaces%
% \texttt{\{\cmd{\textsc\textvisiblespace\textvisiblespace}\ignorespaces%
% \{football\}\}\{}\meta{page}\texttt{\}}
%
% |\index{\textsc{football}}| $\rightarrow$\\ \hbox{}\qquad\ignorespaces%
% \cmd{\indexentry}\ignorespaces%
% \texttt{\{\cmd{\textsc}\ignorespaces%
% \{football\}\}\{}\meta{page}\texttt{\}}
% \end{quote}
%
% These are not the only instances of macros inserting extra spaces. If something is off in the index, the best advice is to look at the \texttt{idx} or \texttt{ind} files. You can use the \textsf{verbatim} package to look at the \texttt{ind} file within your job itself:
% \begin{quote}\small
% |\usepackage{verbatim}|\\
% |\newif\ifdebug|\\[1ex]
% |\ifdebug|\\
% |  \verbatiminput{\jobname.ind}|\\
% |\fi|
% \end{quote}
% {\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsubsection{Index Tags}
% \label{sec:indextag}
%
% \DescribeMacro{\TagName}
% This macro creates an index tag that will be appended to all index entries for a corresponding \cmd{\Name} from when it is invoked until the end of the document or a corresponding \cmd{\UntagName}. Both \cmd{\TagName} and \cmd{\UntagName} handle their arguments like \cmd{\IndexName}. If global tags are desired, tag names in the preamble.
% \begin{quote}\small
% \cmd{\TagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
%
% Index tags are not ``pretags.'' Section~\ref{sec:tweaks} show how index tags are independent of other data sets in \textsf{nameauth}. To help sort that out, we look at what parts of the argument of \cmd{\index} get affected by these commands:
%
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{r@{\,\vrule width0.5pt\,}c@{\,\vrule width0.5pt\,}c@{\,\vrule width0.5pt\,}l}
% & \cmd{\PretagName} & \\
% |\index{| & |Aethelred 2@| & |Æthelred II| & |, king}|\\
% & & & \cmd{\TagName} and \cmd{\UntagName}\\
% \end{tabular}
% \end{center}
%
% All the tagging commands are keyed to the name arguments. \cmd{\PretagName} generates the leading sort key while \cmd{\TagName} and \cmd{\UntagName} affect the trailing content of the index entry.
%
% Tags created by \cmd{\TagName} can be helpful in the indexes of history texts, as can other package features. \cmd{\TagName} causes the \textsf{nameauth} indexing macros to append ``\texttt{,\textvisiblespace pope}'' to the index entries for the popes below:
% \begin{quote}\small\setstretch{1.1}
% |\TagName{Leo, I}{, pope}|\\
% |\TagName{Gregory, I}{, pope}| \\[1ex]
% |\Name{Leo, I} was known as \AKA{Leo, I}{Leo, the Great}.|\\
% |\Name{Gregory, I} was known as \Name{Gregory, I}|\\
% |``\ForceFN\AKA*{Gregory, I}{Gregory}[the Great].''|\\[1ex]
% \Name{Leo, I} was known as \AKA{Leo, I}{Leo, the Great}.\\
% \Name{Gregory, I} was known as \Name{Gregory, I}
% ``\ForceFN\AKA*{Gregory, I}{Gregory}[the Great].''
% \end{quote}
%
% We see both the old syntax and the new syntax used above. \cmd{\TagName} works with all name types, but not with cross-references from \cmd{\IndexRef}, etc. Tags are literal text that can be daggers, asterisks, and so on. For example, all fictional names in the index of this manual are tagged with an asterisk. One must add any desired spacing to the start of the tag. Tagging aids scholarly indexing and can include life/regnal dates and other information.
%
% You\marginpar{\small\raggedleft\dbend} can use the \marg{tag} field of \cmd{\TagName} to add specials to index entries for names. Every name in this manual is tagged with at least \texttt{\textbar hyperpage} to allow hyperlinks in the index with \textsf{ltxdoc} and \textsf{hypdoc}. You may have to use \cmd{\string}\texttt{\textbar hyperpage} where a vertical bar is active, as in \textsf{ltxdoc}.
%
% For example, |\newcommand\orphan[2]{#1}| allows one to use \texttt{\textbar orphan\{}\meta{text}|}| in an index tag to replace the page number with \meta{text}. The \texttt{idx} file will contain |\indexentry{|\meta{name}\texttt{\textbar}|orphan{|\meta{text}|}}{|\meta{page}|}|. The \texttt{ind} file will have something like |\item |\meta{name}|, \orphan{|\meta{text}|}{|\meta{page}|}|, depending on the index style.
% \clearpage
%
% \DescribeMacro{\UntagName}
% \cmd{\TagName} will replace one tag with another tag, but it does not remove a tag from a name. That is the role of \cmd{\UntagName}. The syntax is:
% \begin{quote}\small
% \cmd{\UntagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
%  By using \cmd{\TagName} and \cmd{\UntagName}, one can disambiguate different people with the same name. For example, using macros from Section~\ref{sec:tweaks}:
%
% \begin{quote}\small\setstretch{1.1}
% {\footnotesize\ttfamily This refers to |\Name[John]{Smith}.\\|\\
% Now we have a new |\TagName[John]{Smith}{ (second)}%|\\
% |  \ForgetThis\Name[John]{Smith}.\\|\\
% Now we have a third |\TagName[John]{Smith}{ (third)}%|\\
% |  \ForgetThis\Name[John]{Smith}.\\|\\
% Then back to the first |\UntagName[John]{Smith}\Name*[John]{Smith}|.}
%
% This refers to \Name[John]{Smith}.\\
% Now we have a new \TagName[John]{Smith}{* (second)\ignorespaces%
%   \string|hyperpage}\ForgetThis\Name[John]{Smith}.\\
% Now we have a third \TagName[John]{Smith}{* (third)\ignorespaces%
%   \string|hyperpage}\ForgetThis\Name[John]{Smith}.\\
% Then back to the first \TagName[John]{Smith}{*\string|hyperpage}\Name*[John]{Smith}.
% \end{quote}
%
% The tweaking macros (Section~\ref{sec:tweaks}) make it seem like you are dealing with three people who have the same name. The index tags will group together those entries that have the same tag.\footnote{Since this document, unlike the example above, puts an asterisk by all fictional names in the index, it puts an asterisk at the beginning of the tags above and does not \cmd{\UntagName} \Name*[John]{Smith}, but re-tags him with an asterisk again. We also used \cmd{\string}\texttt{\textbar hyperpage} in all the index tags. The information is not shown above for the sake of simplicity and pedagogy.}
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsection{``Text Tags''}
% \label{sec:tagtext}
%
% Section~\ref{sec:indextag} deals with similar tagging features in the index. ``Text tags'' are not printed automatically with every name managed by \textsf{nameauth}. Section~\ref{sec:tweaks} show how text tags are independent of other data sets. Section~\ref{sec:Hooksb} offers additional examples on using these macros.
%
% Several major uses include optional sobriquets, life dates, regnal dates, footnotes, biographical vignettes, margin paragraphs, and so on.\medskip
%
% \DescribeMacro{\NameAddInfo}
% Text tags are independent of any other name conditionals, similar to index tags. This \cmd{\long} macro's syntax is:
% \begin{quote}\small
% \cmd{\NameAddInfo}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
%
% For example, |\NameAddInfo[George]{Washington}{(1732--99)}|\NameAddInfo[George]{Washington}{(1732--99)} will associate the text ``\NameQueryInfo[George]{Washington}'' with the name ``\LWash.'' Note, however, that the tag does not print automatically with the name. The tag exists as the value to which a control sequence based on \SkipIndex\Washs\ name expands. Such a tag always must expand in the index to have consistent entries. In the text that is not required, so we do that explicitly with \cmd{\NameQueryInfo}.
% \clearpage
%
% \DescribeMacro{\NameQueryInfo}
% To retrieve the information in a text tag, one uses the name as a key to the corresponding information in the data set:
% \begin{quote}\small
% \cmd{\NameQueryInfo}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% \NameAddInfo[Ulysses S.]{Grant}{(president 1869--77)}%
% \NameAddInfo[Schuyler]{Colfax}{\footnote{Seventeenth vice-president of the US during the first term (1869--73) of \Name[Ulysses S.]{Grant}~\NameQueryInfo[Ulysses S.]{Grant}.}}%
% Thus, |``\NameQueryInfo[George]{Washington}''| expands to ``\NameQueryInfo[George]{Washington}''. As with index tags, one can put a space at the start of a tag\,---\,or not. In text tags one might use asterisks, daggers, and even footnotes, such as one for \Name[Schuyler]{Colfax}.\NameQueryInfo[Schuyler]{Colfax} We can include a ``text tag'' within another one, thus building complex relations. Keeping this in mind, we look at the source for the footnote:
%
% \begin{quote}\small\setstretch{1.1}
% |\NameAddInfo[Ulysses S.]{Grant}{(president 1869--77)}%|\\
% |\NameAddInfo[Schuyler]{Colfax}%|\\
% |{\footnote{Seventeenth vice-president of the US during%|\\
% |the first term (1869--73) of \Name[Ulysses S.]{Grant}~%|\\
% |\NameQueryInfo[Ulysses S.]{Grant}.}}|\\
% \texttt{\dots}\\
% |\Name[Schuyler]{Colfax}.\NameQueryInfo[Schuyler]{Colfax}|
% \end{quote}
%
% Please remember that text tags which query each other or themselves would cause a stack overflow unless you prevented that.\medskip
%
% \DescribeMacro{\NameClearInfo}
% \cmd{\NameAddInfo} will replace one text tag with another text tag, but it does not delete a text tag. That is the role of \cmd{\NameClearInfo}. The syntax is:
% \begin{quote}\small
% \cmd{\NameClearInfo}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% |\NameClearInfo[George]{Washington}|\NameClearInfo[George]{Washington} will cause the next attempt at making a query, |\NameQueryInfo[George]{Washington}|, to produce nothing\NameQueryInfo[George]{Washington}.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsection{Name Decisions}
% \subsubsection{Testing Decisions}
% \label{sec:tests}
%
% The macros in this section permit conditional text that depends on the presence or absence of a name. These macros use \cmd{\If}\textbf{\dots} because they differ from regular |\if| expressions. The following macros affect conditional branching: \cmd{\Name}, \cmd{\Name*}, \cmd{\FName}, \cmd{\PName}, \cmd{\AKA}, \cmd{\AKA*}, \cmd{\ForgetName}, \cmd{\SubvertName}, \cmd{\ExcludeName}, \cmd{\IncludeName}, and \cmd{\IncludeName*}.
%
% If one uses these macros inside other macros or passes control sequences to them, the expansion of control sequences can create false results (see \emph{The \TeX book}, 212--15). To get around those problems, consider using the following:
% \begin{itemize}\small
% \item Use token registers to retrieve the arguments.
% \item Regulate expansion with \cmd{\expandafter}, \cmd{\noexpand}, etc.
% \item That affects accented characters in \texttt{pdflatex}/NFSS.
% \end{itemize}
%
% See Sections~\ref{sec:Hooksb} and~\ref{sec:Hooksc} for related ideas about tokens and expansion. Using the \textsf{trace} package, \cmd{\show}, or \cmd{\meaning} can help you.
% \clearpage
%
% \DescribeMacro{\IfMainName}
% If you want to produce output or perform a task based on whether a ``main body'' name exists, use \cmd{\IfMainName}, whose syntax is:
% \begin{quote}\small
% \cmd{\IfMainName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{yes}\marg{no}
% \end{quote}
% This is a long macro via \cmd{\newcommandx}, so you can have paragraph breaks in the \meta{yes} and \meta{no} paths. A ``main body'' name is capable of being formatted by this package, \emph{i.e.}, one created by the naming macros when the \texttt{mainmatter} option is used or after \cmd{\NamesActive}. It is distinguished from those names that occur in the front matter and those that have been used as cross-references.
%
% For example, we get ``\IfMainName[Bob]{Hope}{I met Bob}{I have not met Bob}'' because we have yet to invoke the name |\Name[Bob]{Hope}|. We will create a manual index entry here.\IndexName[Bob]{Hope}
% \begin{quote}\small
% |\IfMainName[Bob]{Hope}{I met Bob}{I have not met Bob}|
% \end{quote}%
% Please note that this test is not affected by the use of \cmd{\IndexName}. Since we have encountered \ForgetThis\Name*{Elizabeth, I}, we get ``\IfMainName{Elizabeth, I}{I met Bess}{I have not met Bess}'' with a similar example:
% \begin{quote}\small\setstretch{1.1}
% |\IfMainName{Elizabeth, I}{I met Bess}%|\\
% |  {I have not met Bess}|
% \end{quote}
%
% \DescribeMacro{\IfFrontName}
% If you want to produce output or perform a task based on whether a ``front matter'' name exists, use \cmd{\IfFrontName}, whose syntax is:
% \begin{quote}\small
% \cmd{\IfFrontName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{yes}\marg{no}
% \end{quote}
% This macro works the same as \cmd{\IfMainName}. A ``front matter'' name is created by the naming macros when the \texttt{frontmatter} option is used or after \cmd{\NamesInactive}. It is distinguished from those names that occur in the main matter and those that have been used as cross-references.
%
% \phantomsection\label{page:Carnap}For example, based on Section~\ref{sec:formatting}, we see that ``\ignorespaces
% \IfFrontName[Rudolph]{Carnap}%
% {\IfMainName[Rudolph]{Carnap}%
%   {\Name[Rudolph]{Carnap} is both}%
%   {\Name[Rudolph]{Carnap} is only non-formatted}}%
% {\IfMainName[Rudolph]{Carnap}%
%   {\Name[Rudolph]{Carnap} is only formatted}%
%   {\Name[Rudolph]{Carnap} is not mentioned}}'' a formatted and unformatted name with the following test:
% \begin{quote}\small\setstretch{1.1}
% |\IfFrontName[Rudolph]{Carnap}%|\\
% |{\IfMainName[Rudolph]{Carnap}%|\\
% |  {\Name[Rudolph]{Carnap} is both}%|\\
% |  {\Name[Rudolph]{Carnap} is only non-formatted}}%|\\
% |{\IfMainName[Rudolph]{Carnap}%|\\
% |  {\Name[Rudolph]{Carnap} is only formatted}%|\\
% |  {\Name[Rudolph]{Carnap} is not mentioned}}|
% \end{quote}%
% Please refer to Sections~\ref{sec:tweaks} and~\ref{sec:LocalNames} to understand the scope and operation of main- and front-matter names.
% \vfil
% \begin{center}\large \emph{This space intentionally left blank.}\end{center}
% \clearpage
%
% \DescribeMacro{\IfAKA}
% If you want to produce output or perform a task based on whether a cross-reference name exists, use \cmd{\IfAKA}, whose syntax is:
% \begin{quote}\small
% \cmd{\IfAKA}\oarg{FNN}\marg{SNN}\oarg{Alt. names}\marg{y}\marg{n}\marg{excluded}
% \end{quote}
% This macro works similarly to \cmd{\IfMainName}, although it has an additional \meta{excluded} branch in order to detect those names excluded from indexing by \cmd{\ExcludeName} (Section~\ref{sec:IndexXref}).
%
% A cross-reference name is created by \cmd{\IndexRef}, \cmd{\AKA}, and \cmd{\AKA*}. The following example illustrates how we use this macro:
% \begin{enumerate}
% \item In the text we refer to \Name[Jesse]{Ventura}, |\Name[Jesse]{Ventura}|.
% \item We establish his lesser-known legal name as an alias: ``\AKA[Jesse]{Ventura}[James]{Janos},'' |\AKA[Jesse]{Ventura}[James]{Janos}|.
%
% \item We construct the following test:
% \begin{quote}\small\setstretch{1.1}
% |\IfAKA[James]{Janos}%|\\
% |  {\Name[Jesse]{Ventura} has an alias}%|\\
% |  {\Name[Jesse]{Ventura} has no alias}%|\\
% |  {\Name[Jesse]{Ventura} is excluded}|
% \end{quote}
% \item This gives us ``\IfAKA[James]{Janos}{\Name[Jesse]{Ventura} has an alias}{\Name[Jesse]{Ventura} has no alias}{\Name[Jesse]{Ventura} is excluded}.''
% \end{enumerate}
% If you are confident that you will not be dealing with names generated by \cmd{\ExcludeName} then you can just leave the \meta{excluded} branch as |{}.|
%
%  A similar use of |\IfAKA{Confucius}| tells us that ``\IfAKA{Confucius}{\Name{Confucius} is an alias}{\Name{Confucius} is not an alias}{}.'' Yet we should test that completely:
% \begin{quote}\small\setstretch{1.1}
% |\IfAKA[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
% |{|\meta{true; it is a pseudonym}|}%|\\
% |{%|\\
% |  \IfFrontName[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
% |    {\IfMainName[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
% |      {|\meta{both}|}%|\\
% |      {|\meta{front}|}%|\\
% |    }%|\\
% |    {\IfMainName[|\meta{FNN}|]{|\meta{SNN}|}[|\meta{alt. names}|]%|\\
% |      {|\meta{main}|}%|\\
% |      {|\meta{does not exist}|}%|\\
% |    }%|\\
% |}%|\\
% |{|\meta{excluded}|}|
% \end{quote}
% Here we test for a name used with \cmd{\ExcludeName} (Section~\ref{sec:IndexXref}) to get the result, ``\ExcludeName{Grinch}\IfAKA{Grinch}{\Name{Grinch} is an alias}{\Name{Grinch} is not an alias}{\Name{Grinch} is excluded}'':
% \begin{quote}\small\setstretch{1.1}
% |\ExcludeName{Grinch}%|\\
% |\IfAKA{Grinch}%|\\
% |  {\Name{Grinch} is an alias}%|\\
% |  {\Name{Grinch} is not an alias}%|\\
% |  {\Name{Grinch} is excluded}|
% \end{quote}
%
% By using the text tag macros with the conditional macros, one can display information associated with a name based on  whether or the name has occurred. Below we disable indexing with \cmd{\IndexInactive}:
% \begin{quote}\small\IndexInactive
% \begin{verbatim}
%\NameAddInfo{Sam}
%{\IfMainName{Freddy}%
%    {\SkipIndex\Name{Freddy's} sidekick}%
%    {a young gardener helping his granddad}}
%
%There is \Name{Sam}. He is \NameQueryInfo{Sam}.
%Then \Name{Sam} met \Name{Freddy}, who lives with his uncle.
%Now he is \NameQueryInfo{Sam} on a quest to save the realm.
% \end{verbatim}\vspace{-1ex}
% \NameAddInfo{Sam}{\IfMainName{Freddy}{\SkipIndex\Name{Freddy's} sidekick}{a young gardener helping his granddad}}
% There is \Name{Sam}. He is \NameQueryInfo{Sam}.\\
% Then \Name{Sam} met \Name{Freddy}, who lives with his uncle.\\
% Now he is \NameQueryInfo{Sam} on a quest to save the realm.
% \end{quote}
% We use \cmd{\SkipIndex} to prevent the name ``\SkipIndex\Name{Freddy's}'' from making an index entry of its own. See Section~\ref{sec:indexctrl}. Take care to avoid a stack overflow by not allowing conditional text to call tags recursively ``down the rabbit hole.''
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsubsection{Changing Decisions}
% \label{sec:tweaks}
%
% The following summary of macros that can change (not just read) different data sets will help us put this section into better perspective:
%
% \begin{center}\small
% \begin{tabular}{@{}lc@{}c@{}c@{}c@{}c@{}}\toprule[1pt]
%   Macro & \footnotesize Names & \footnotesize Xrefs & \footnotesize Sort & \footnotesize Index & \footnotesize Text\\
%   & & & Tag & Tag & Tag\\\midrule
%   \cmd{\Name} \cmd{\Name*} \cmd{\FName} & \YES & \NO & \NO & \NO & \NO\\\midrule
%   \cmd{\ForgetName} \cmd{\SubvertName} & \YES & \NO & \NO & \NO & \NO\\\midrule
%   \cmd{\PName} \cmd{\PName*} & \YES & \YES & \NO & \NO & \NO\\\midrule
%   \cmd{\AKA} \cmd{\AKA*} \cmd{\IndexRef} & \NO & \YES & \NO & \NO & \NO\\\midrule
%   \cmd{\ExcludeName} & \NO & \YES & \NO & \NO & \NO\\\midrule
%   \cmd{\IncludeName} \cmd{\IncludeName*} & \NO & \YES & \NO & \NO & \NO\\\midrule
%   \cmd{\PretagName} & \NO & \NO & \YES & \NO & \NO\\\midrule
%   \cmd{\TagName} \cmd{\UntagName} & \NO & \NO & \NO & \YES & \NO\\\midrule
%   \cmd{\NameAddInfo} \cmd{\NameClearInfo} & \NO & \NO & \NO & \NO & \YES\\\midrule
% \end{tabular}
% \end{center}
%
% The macros in this section force either a first or subsequent use, helpful especially with overlays in the \textsf{beamer} class. They do not affect \cmd{\AKA} and \cmd{\PName}. They always are global with respect to \LaTeX\ scoping rules.
%
% ``Forgetting'' a name not only changes its format, but also its displayed form and its status with decision macros. Sometimes you want all the changes (\textsf{beamer} overlays) and sometimes not (use \cmd{\Name*}, \cmd{\ForceName}, etc.).
% \begin{center}\small
% \begin{tabular}{lccc}\toprule
% \bfseries           & \bfseries Name Length & \bfseries Format Hooks & \bfseries Decision\footnotemark[22]\\\midrule
% \bfseries First Use & Always long & First & False\\
% \bfseries Subsequent Use & Long or short & Subsequent & True\\\bottomrule
% \end{tabular}
% \end{center}
% \footnotetext[22]{Decision outcome prior to the name being used.}
% \addtocounter{footnote}{1}
%
% \DescribeMacro{\ForgetName}
% This macro takes the same arguments as \cmd{\Name}. It ignores alternate names if \meta{FNN} are present. It ``forgets'' a name, forcing a ``first use'' The syntax is:
% \begin{quote}\small
% \cmd{\ForgetName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \DescribeMacro{\ForgetThis}
% This mode switch\marginpar{\large\raggedleft\textsf{\bfseries 3.1}} causes the next instance of a naming macro or shorthand to call \cmd{\ForgetName} internally. After knowing |\Einstein| ``\Einstein'' we forget him and again have a first reference: |\ForgetThis\Einstein| ``\ForgetThis\Einstein.''\medskip
%
% \DescribeMacro{\SubvertName}
% This macro is the opposing analogue of the macros that we saw above. It ``subverts'' a name, forcing a ``subsequent use.'' The syntax is:
% \begin{quote}\small
% \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \DescribeMacro{\SubvertThis}
% This mode switch\marginpar{\large\raggedleft\textsf{\bfseries 3.1}} causes the next instance of a naming macro or shorthand to call \cmd{\SubvertName} internally. \cmd{\ForgetThis} takes precedence over \cmd{\SubvertThis}.
% \begin{quote}\small\setstretch{1.1}
% \begin{tabular}{@{}lll}
% |\SubvertThis\LAnth| & \SubvertThis\LAnth & \emph{force subseq. use, force long}\\
% |\ForceName\SAnth| & \ForceName\SAnth & \emph{subseq. use, force first format}\\
% |\ForgetThis\SAnth| & \ForgetThis\SAnth & \emph{force first use and format}\\
% |\SAnth| & \SAnth & \emph{subsequent use, short}\\
% \end{tabular}
% \end{quote}
% We met \cmd{\ForceName} back in Section~\ref{sec:formatting}. Here we use it with a subsequent name use to format it as a first use. We will meet \cmd{\ForceName} again in Section~\ref{sec:AKA}.\medskip
%
% By default,\marginpar{\small\raggedleft Naming system\break scope} these macros affect a name form in both front matter and main matter naming systems. The example on page~\pageref{page:Carnap} above gave us the answer, ``\IfFrontName[Rudolph]{Carnap}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is both}{\Name[Rudolph]{Carnap} is only non-formatted}}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is only formatted}{\Name[Rudolph]{Carnap} is not mentioned}}.'' After we use \ForgetName[Rudolph]{Carnap}|\ForgetName[Rudolph]{Carnap}| we get the result:
% ``\IfFrontName[Rudolph]{Carnap}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is both}{\Name[Rudolph]{Carnap} is only non-formatted}}{\IfMainName[Rudolph]{Carnap}{\Name[Rudolph]{Carnap} is only formatted}{\Name[Rudolph]{Carnap} is not mentioned}}.'' Both front- and main-matter names were forgotten and now we have a first-use situation.
%
% This default ``name scope'' behavior helps synchronize formatted and unformatted types of names. For example, one could use \cmd{\ForgetName} and \cmd{\SubvertName} in the footnote examples from Section~\ref{sec:formatting} to synchronize uses of names between formatting systems. This manual uses that approach at need.\medskip
%
% \DescribeMacro{\LocalNames}
% \DescribeMacro{\GlobalNames}
% If this default behavior is not desired, \cmd{\LocalNames} restricts the macros above to the current naming system. After \cmd{\LocalNames}, if you are in a ``front matter'' section (the \texttt{frontmatter} option or \cmd{\NamesInactive}) the macros above will affect only names in that section. The same is true if you are in a ``main matter'' section via the \texttt{mainmatter} option or \cmd{\NamesActive}. \cmd{\GlobalNames} restores the default behavior. Remember that this is respective to formatting systems, not document scope! Section~\ref{sec:LocalNames} goes into greater detail on system-level scoping.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsection{Name Variant Macros}
% \label{sec:AKA}
%
% The\marginpar{\large\raggedleft\textsf{\bfseries 3.0}} macros in this section are specialized and have a somewhat different syntax than others in this manual. Macros like \cmd{\IndexRef} permit one to avoid the macros here completely. Yet here they are, if needed.\medskip
%
% \DescribeMacro{\AKA}
% \DescribeMacro{\AKA*}
% \cmd{\AKA} (meaning \textit{also known as}) handles the full-name mention of pseudonyms, stage names, \emph{noms de plume}, and so on. The syntax for \cmd{\AKA} is:
% \begin{quote}\small\setstretch{1.1}
% \cmd{\AKA\ }\oarg{FNN}\marg{SNN}\oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names}\\
% \cmd{\AKA*}\oarg{FNN}\marg{SNN}\oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names}
% \end{quote}
% Both macros create a cross-reference in the index from the \meta{Alt. FNN}, \meta{Alt. SNN}, and \meta{Alt. names} fields to a target defined by \meta{FNN} and \meta{SNN}, regardless of whether that name exists.
% \textbf{The order of the name and cross-reference in \cmd{\AKA} is opposite that of \cmd{\IndexRef}.}\footnote{That ordering is due to the collision between \textbf{\meta{Alt\textsubscript{1}}} and \textbf{\meta{FNN\textsubscript{2}}} in a hypothetical \cmd{\AKA}\oarg{FNN\textsubscript{1}}\marg{SNN\textsubscript{1}}\ignorespaces%
% \textbf{\oarg{Alt\textsubscript{1}}\oarg{FNN\textsubscript{2}}}\ignorespaces%
% \marg{SNN\textsubscript{2}}\oarg{Alt\textsubscript{2}} By only allowing \meta{FNN\textsubscript{1}} and \meta{SNN\textsubscript{1}} for the target name, we can let the other fields permit an unrestricted cross-reference.}
%See also Section~\ref{sec:indextag}.
%
% \cmd{\AKA} only prints whatever form of name in the text that you manually specify. It is designed for the occasional mention of alternate names. See page~\pageref{page:manualxref} for alternate solutions. \cmd{\SeeAlso} works with \cmd{\AKA}, \cmd{\AKA*}, and \cmd{\PName}.
%
% \cmd{\AKA} prints the \meta{Alt. FNN} and \meta{Alt. SNN} fields in the body text. If the \meta{Alt. names} field is present, \cmd{\AKA} swaps it with the \meta{Alt. FNN} field in the text. The caps and reversing macros work with \cmd{\AKA}.
%
% \cmd{\AKA*}\marginpar{\large\raggedleft\textsf{\bfseries 3.0}} prints short name references like \cmd{\FName}, meaning that \cmd{\ForceFN} works with it in the same manner. For the older behavior of \cmd{\AKA*} use the \texttt{oldAKA} option or always precede \cmd{\AKA*} with \cmd{\ForceFN}.
%
% \begin{center}\bfseries General Tips\end{center}
% \begin{itemize}\small
% \item \oarg{FNN}\marg{SNN} is the target. \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} is the cross-reference to the target. Neither create page references.
% \item The older non-Western syntax cannot be used with \oarg{FNN}\marg{SNN}. It can be used with \marg{Alt. SNN}\oarg{Alt. names}, but we discourage that.
% \item Only the \meta{SNN} and \meta{Alt. SNN} fields use comma-delimited suffixes.
% \item One cannot create an index tag for a cross-reference, but one can sort that reference with \cmd{\PretagName}.
% \item \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} in \cmd{\AKA} correspond to the name fields in \cmd{\PretagName}.
% \item \DropAffix\Name*[J.E.]{Carter, Jr.}[Jimmy] is not a cross-reference when it takes a form like:\\\hbox{}\qquad |\DropAffix\Name*[J.E.]{Carter, Jr.}[Jimmy]|.
% \item \AKA[J.E.]{Carter, Jr.}[Jimmy]{Carter} is a cross-reference when it takes a form like:\\\hbox{}\qquad |\AKA[J.E.]{Carter, Jr.}[Jimmy]{Carter}|.
% \item To index stage names:\\\hbox{}\qquad |\Name[The Amazing]{Kreskin}|\dotfill \Name[The Amazing]{Kreskin}\\\hbox{}\qquad|\AKA[The| |Amazing]{Kreskin}| |[Joseph]{Kresge}|\dotfill \AKA[The Amazing]{Kreskin}[Joseph]{Kresge}
% \item To keep stage names out of the index (index entries suppressed):{\IndexInactive\\\hbox{}\qquad |\Name[J.]{Kreskin}[The| |Amazing]|\dotfill \Name[J.]{Kreskin}[The Amazing]\\\hbox{}\qquad |\AKA[J.]{Kreskin}[Joseph]{Kresge}|\dotfill \AKA[J.]{Kreskin}[Joseph]{Kresge}}
% \end{itemize}
%
% \begin{center}\bfseries Examples\end{center}
% We make cross-references to \Name[Bob]{Hope}, where all of the forms below create the cross-reference ``Hope, Leslie Townes \emph{see} Hope, Bob'':
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{p{0.6\textwidth}l}\toprule
% \footnotesize|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
% \footnotesize|\RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
% \footnotesize|\AKA[Bob]{Hope}[Leslie Townes]{Hope}%| |  [\ignorespaces]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[\ignorespaces]\\
% \footnotesize|\AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\
% \footnotesize|\AKA*[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}\\
% \footnotesize|\AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester]| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester]\\\bottomrule
% \end{tabular}
% \end{center}
%
% Next we see what happens with references to \KeepAffix\Name*{Louis, XIV}, \Name{Lao-tzu}, and  \KeepAffix\Name*{Gregory, I}, as well as \Name[Lafcadio]{Hearn} and \Name[Charles]{du Fresne}:
% \begin{center}\small\setstretch{1.1}
% \begin{tabular}{p{0.6\textwidth}l}\toprule
% |\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
% |\AKA*{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\\midrule
% |\AKA{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\
% |\AKA*{Lao-tzu}{Li, Er}| & \AKA*{Lao-tzu}{Li, Er}\\\midrule
% |\AKA[Charles]{du Fresne}{du Cange}| & \AKA[Charles]{du Fresne}{du Cange}\\
% |\CapThis\AKA[Charles]{du Fresne}{du Cange}| & \CapThis\AKA[Charles]{du Fresne}{du Cange}\\\midrule
% \footnotesize|\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}| & \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}\\
% \footnotesize|\RevName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}| & \RevName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}\\\midrule
% \footnotesize|\AKA{Gregory, I}{Gregory}[the Great]| & \AKA{Gregory, I}{Gregory}[the Great]\\
% \footnotesize|\AKA*{Gregory, I}{Gregory}[the Great]| & \AKA*{Gregory, I}{Gregory}[the Great]\\
% \footnotesize|\ForceFN\AKA*{Gregory, I}{Gregory}[the Great]| & \ForceFN\AKA*{Gregory, I}{Gregory}[the Great]\\\bottomrule
% \end{tabular}
% \end{center}
%
% \begin{center}\bfseries Formatting Alternate Names: General\end{center}
% \cmd{\AKA}\marginpar{\small\raggedleft\texttt{formatAKA}\break\dbend} and its derivatives use the subsequent-use formatting hooks \cmd{\MainNamesHook} and \cmd{\FrontNamesHook}. This was designed originally to keep cross-references from looking like main names by accident when they were intriduced in the body text. In order to be freed of those constraints, use the \texttt{formatAKA} package option. Note the caveats that come therewith.
%
% We show \texttt{formatAKA} used with |\AKA{Elizabeth, I}[Good Queen]{Bess}|. The colors indicate which formatting hooks are being used.\ignorespaces%
% \begin{quote}\small\setstretch{1.1}
% \makeatletter\@nameauth@AKAFormattrue\makeatother
% \NamesInactive \textbf{Front Matter:} \ForgetThis\LEliz\ was known as ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% Again we mention Queen \Eliz, ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% \cmd{\ForceName}: \ForceName\AKA{Elizabeth, I}[Good Queen]{Bess}.\\[1ex]
% \NamesActive \textbf{Main Matter:} \ForgetThis\LEliz\ was known as ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% Again we mention Queen \Eliz, ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% \cmd{\ForceName}: \ForceName\AKA{Elizabeth, I}[Good Queen]{Bess}.
% \end{quote}
% Section~\ref{sec:tweaks} also shows how cross-references are independent of other data sets in \textsf{nameauth}. Cross-references do not respect the two namng systems. The first time that the cross-reference appears, we see that \texttt{formatAKA} permits the first-use hooks. Thereafter, it uses the subsequent-use hooks. When we switched to the main matter, the cross-reference \AKA{Elizabeth, I}[Good Queen]{Bess} did not switch to a first use until we used \cmd{\ForceName}. Now we compare the \texttt{alwaysformat} option:
%
% \begin{quote}\small\setstretch{1.1}
% \makeatletter\@nameauth@AlwaysFormattrue\makeatother
% \NamesInactive \textbf{Front Matter:} \ForgetThis\LEliz\ was known as ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% Again we mention Queen \Eliz, ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% \cmd{\ForceName}: \ForceName\AKA{Elizabeth, I}[Good Queen]{Bess}.\\[1ex]
% \NamesActive \textbf{Main Matter:} \ForgetThis\LEliz\ was known as ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% Again we mention Queen \Eliz, ``\AKA{Elizabeth, I}[Good Queen]{Bess}.''\\
% \cmd{\ForceName}: \ForceName\AKA{Elizabeth, I}[Good Queen]{Bess}.
% \end{quote}
%
% With \texttt{alwaysformat}, all the names in the document use only the first-use hooks, never the subsequent-use hooks. This option tends to get little use in the newer versions of \textsf{nameauth}. It was more useful in early versions when \cmd{\NamesFormat} was the only formatting hook.
%
% \begin{center}\bfseries Formatting Alternate Names: Continental\end{center}
% \noindent The following annotated example shows the simple Continental form that we introduced in Section~\ref{sec:altformat}. We initiate the alternate formatting framework with \cmd{\AltFormatActive} and take care not to use the names below outside of it.\AltFormatActive
% \begin{enumerate}
% \item Tag the names for proper sorting.\\[4pt]
% |\PretagName[Heinz]{\textSC{Rühmann}}{Ruehmann, Heinz}%|\\
% |\PretagName[Heinrich Wilhelm]{\textSC{Rühmann}}%|\\
% |  {Ruehmann, Heinrich Wilhelm}%|
% \item ``\Name*[Heinz]{\textSC{Rühmann}}'' is the main name, but we do not start with that. We begin with \cmd{\AKA*} in order to use his legal name as an alias for his more popular stage name. \cmd{\AKA*} prints ``\AKA*[Heinz]{\textSC{Rühmann}}[Heinrich Wilhelm]{\textSC{Rühmann}}'' in the body text and sets up the index cross-reference ``\textsc{Rühmann}, Heinrich Wilhelm \emph{see} \textsc{Rühmann}, Heinz.''\\[4pt]
% |\AKA*[Heinz]{\textSC{Rühmann}}%|\\
% |  [Heinrich Wilhelm]{\textSC{Rühmann}} %|
% \item \cmd{\SubvertThis} makes \cmd{\FName} print \SubvertThis``\FName[Heinz]{\textSC{Rühmann}}.''\\[4pt]
% |\SubvertThis``\FName[Heinz]{\textSC{Rühmann}}'' %|
% \item \cmd{\Name} prints ``\Name[Heinz]{\textSC{Rühmann}}.'' The small caps are syntactic, not typographic, because they are part of the argument to \cmd{\Name} itself.\\[4pt]
% |\Name[Heinz]{\textSC{Rühmann}}| |(7| |March| |1902\,--\,3%|\\
% |October 1994)| |was| |a| |German| |actor| |in| |over| |100| |films.|
% \end{enumerate}
% The resulting text is:
% \begin{quote}\small
% \AKA*[Heinz]{\textSC{Rühmann}}[Heinrich Wilhelm]{\textSC{Rühmann}} \ignorespaces%
% \SubvertThis``\FName[Heinz]{\textSC{Rühmann}}'' \ignorespaces%
% \Name[Heinz]{\textSC{Rühmann}} (7 March 1902\,--\,3 October \ignorespaces%
% 1994) was a German actor in over 100 films.
% \end{quote}
% Of course, this example is but one among a number of solutions. The point is to find a solution that best fits one's needs. We now resume normal formatting with \cmd{\AltFormatInactive}.
% \AltFormatInactive
% \clearpage
%
% \phantomsection\label{page:manualxref}
% \begin{center}\bfseries Advanced Cross-Referencing\end{center}
% \noindent \cmd{\AKA}\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} will not create multiple cross-references. Handle the special case where one moniker applies to multiple people with \cmd{\IndexRef}, \emph{e.g.}, ``Snellius'' for both \Name[W.]{Snel van Royen}[Willebrord] and his son \Name[R.]{Snel van Royen}[Rudolph]:\footnote{We shorten the index entries via \cmd{\Name}\texttt{[W.]\{Snel van Royen\}[Willebrord]}, and for his son, \cmd{\Name}\texttt{[R.]\{Snel van Royen\}[Rudolph]}.}
% \begin{quote}\small
% |\IndexRef{Snellius}{Snel| |van| |Royen,| |R.;| |Snel| |van| |Royen,| |W.}|
% \IndexRef{Snellius}{Snel van Royen, R.; Snel van Royen, W.}
% \end{quote}
%
% \cmd{\AKA} and \cmd{\AKA*} never create never page entries. When the alternate name needs to be indexed with page numbers and \emph{see also} references, do the following:
% \begin{itemize}\small
% \item Refer to the person intended, \emph{e.g.}:\\ \hbox{}\qquad\Name{Maimonides} (\AKA{Maimonides}{Moses ben-Maimon}):\\ \hbox{}\qquad|\Name{Maimonides}| |(\AKA{Maimonides}{Moses| |ben-Maimon})|
% \item We now have a main name with a page entry, as well as a ``\emph{see} reference'' name. If we fail to refer to the main name, we would have a cross-reference to an entry that does not exist.
% \item Before creating a \emph{see also} cross-reference, one must refer to the alternate name so that all the page entries precede the cross-reference, \emph{e.g.}:\\ \hbox{}\qquad\Name{Rambam}\qquad|\Name{Rambam}|
% \item For\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} whatever name you use for the \emph{see also} reference, put the cross-reference after all of the page references. For example, you could put both of these macros at the end of the document:\footnote{Different standards exist for punctuating index entries and cross-references. Check with your publisher, style guide, docs for \textsf{xindy} and \textsf{makeindex}, and \url{http://tex.stackexchange.com}.}\\\hbox{}\qquad|\SeeAlso\IndexRef{Maimonides}{Rambam}|\\\hbox{}\qquad|\SeeAlso\IndexRef{Rambam}{Maimonides}|
% \item You could let the last reference to either name be handled by \cmd{\SeeAlso}\cmd{\AKA}, but that could be more confusing and prone to error.
% \end{itemize}
% \SeeAlso\IndexRef{Maimonides}{Rambam}%
% \SeeAlso\IndexRef{Rambam}{Maimonides}%
%
% Using \cmd{\PretagName} (Section~\ref{sec:IndexSort}) helps to avoid the need for manual index entries, as the following example shows:
%
% \begin{quote}\small\setstretch{1.1}
% {\ttfamily%
% |\PretagName{\textit{Doctor| |angelicus}}{Doctor| |angelicus}|\\
% |Perhaps| |the| |greatest| |medieval| |theologian was %|\\
% |\Name{Thomas,| |Aquinas}, also known as %|\\
% |\AKA{Thomas, Aquinas}{\textit{Doctor angelicus}}|.}
%
% \PretagName{\textit{Doctor angelicus}}{Doctor Angelicus}
% Perhaps the greatest medieval theologian was
% \Name{Thomas, Aquinas}, also known as %
% \AKA{Thomas, Aquinas}{\textit{Doctor angelicus}}.
% \end{quote}
% We use the medieval form: |\Name{Thomas, Aquinas}| because ``Aquinas'' is not a surname, even though many people, including scholars, use it as such. Section~\ref{sec:standards} talks about how one can use |\ForceFN\FName{Thomas, Aquinas}| to refer to \ForceFN\FName{Thomas, Aquinas}. Using |\ForceFN\Name{Thomas, Aquinas}| will produce \ForceFN\Name{Thomas, Aquinas}. That helps prevent unwanted side effects with Eastern names.
% \clearpage
%
% \DescribeMacro{\PName}
% \DescribeMacro{\PName*}
% These macros were meant for Western names and developed in the early versions of \textsf{nameauth}. They no longer fit well with the package. They print a main name followed by a cross-reference in parentheses, the syntax being:
% \begin{quote}\small
% \cmd{\PName}\oarg{FNN}\marg{SNN}\oarg{other FNN}\marg{other SNN}\oarg{other alt.}
% \end{quote}
%
% Apart from \cmd{\SkipIndex}, prefix macros only work on the name given by \meta{FNN} and \meta{SNN}, not on the latter cross-reference. \cmd{\SkipIndex} keeps both names out of the index. Below we see the only name types that this macro can handle:
% \begin{quote}\footnotesize\setstretch{1.1}
% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
% \hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}[Sam]|\hfill \PName*[Mark]{Twain}[Samuel L.]{Clemens}[Sam]\\[1ex]
% |\PName{Voltaire}[François-Marie]{Arouet}|\hfill \PName{Voltaire}[François-Marie]{Arouet}\\
% \hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}\\[1ex]
% |\PretagName{\textit{Doctor mellifluus}}{Doctor mellifluus}|\\
% |\PName{Bernard, of Clairvaux}{\textit{Doctor mellifluus}}|\\
% \PretagName{\textit{Doctor mellifluus}}{Doctor mellifluus}
% \hbox{}\hfill \PName{Bernard, of Clairvaux}{\textit{Doctor mellifluus}}\\
% \hbox{}\hfill \PName{Bernard, of Clairvaux}{\textit{Doctor mellifluus}}
% \end{quote}
%
% Like \cmd{\AKA}, \cmd{\PName} cannot use the older syntax \marg{SNN}\oarg{FNN} for the main name, but it can do so for the alternate name.
%
% |\PName{William,| |I}{William,| |the Conqueror}| gives \PName{William, I}{William, the Conqueror} and \PName{William, I}{William, the Conqueror}.\footnote{The form \texttt{\textbackslash PName\{William, I\}\{William\}[the Conqueror]} works, but we discourage it. Also choose forms like \texttt{\textbackslash PName\{Lao-tzu\}\{Li, Er\}} instead of \texttt{\textbackslash PName\{Lao-tzu\}\{Li\}[Er]}. Avoiding the older syntax with \cmd{\AKA} and \cmd{\PName} avoids error.}
% If you use \cmd{\PName*}, again you will get the long reference \PName*{William, I}{William}[the Conqueror].
%
% |\PName*{William, I}[William]{the Conqueror}| puts \SkipIndex``\PName*{William, I}[William]{the Conqueror}'' in the body text, but its index entry will be ``the Conqueror, William \emph{see} William I.'' This is a result of mixing medieval and Western forms. We suppressed the index entry with \cmd{\SkipIndex}.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsection{Longer Examples}
%
% \subsubsection{Variant Names}
% \label{sec:DuBois}
% This section\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} demonstrates how \textsf{nameauth} helps one manage a name authority. Handling name variants has become easier than before. We start with some simple cases and move on to complex ones:
%
% \newcommand*\Iron{\SubvertThis\Name*[Mike]{Tyson}[Iron Mike]}
% \begin{itemize}\small
% \item Where |Iron Mike| occurs in the text, include |\IndexName[Mike]{Tyson}|.
% \item |\SubvertThis\FName[Mike]{Tyson}[Iron Mike]| always prints \SubvertThis\FName[Mike]{Tyson}[Iron Mike] indexed as ``Tyson, Mike''. That form uses the subsequent-use formatting hooks. |\ForceName\SubvertThis\FName[Mike]{Tyson}[Iron Mike]| prints \ForceName\SubvertThis\FName[Mike]{Tyson}[Iron Mike] with the first-use hooks.
% \item The form \cmd{\Iron} \SubvertThis\Name*[Mike]{Tyson}[Iron Mike] can be set up with:\\[1ex]
% |\newcommand*\Iron{\SubvertThis\Name*[Mike]{Tyson}[Iron Mike]}|\\[1ex]
% In \textsf{nameauth} it makes little sense to ``force'' the subsequent use because it is the common use. First uses are rare. That is why we set up the subsequent use with \cmd{\SubvertThis} and create a first use when needed with \cmd{\ForceName}. |\ForceName\Iron| prints \ForceName\Iron, again indexed as ``Tyson, Mike''.
% \item Use |\IndexRef{Iron Mike}{Tyson, Mike}| to create a \emph{see} cross-reference from ``Iron Mike'' to ``Tyson, Mike'' in the index. Be sure to have an occurrence of |\Name[Mike]{Tyson}| in the text.
% \item Use |``\AKA[Mike]{Tyson}{Iron Mike}''| to create ``\AKA[Mike]{Tyson}{Iron Mike}'' in the text and a cross-reference to ``Tyson, Mike'' in the index. Be sure to have an occurrence of |\Name[Mike]{Tyson}| in the text.
% \end{itemize}
%
% When you want alternate names that can change form and format independently, do the following:
% \begin{nameauth}
% \< DuBois    & W.E.B. & Du Bois       & >
% \< AltDuBois & W.E.B. & Du\empty Bois & >
% \end{nameauth}
% \begin{enumerate}\small
% \item We start by deciding that the canonical name form we wish to use is ``W.E.B. Du Bois.'' We want to manage the alternate form ``W.E.B. DuBois'' as if it were an occurrence of the canonical name. We set up the name authority:\\
% |\begin{nameauth}|\\
% |  \< DuBois    & W.E.B. & Du Bois       & >|\\
% |  \< AltDuBois & W.E.B. & Du\empty Bois & >|\\
% |\end{nameauth}|
%
% \item This name gives us an extra level of difficulty because the two variants differ only in terms of spaces. They share the same internal representation in the \textsf{nameauth} macros: |W.E.B.!DuBois|. We fix this ambiguity by inserting a non-printing control sequence in the alternate form, such as |{Du\empty Bois}|. That prevents ``{Du\empty Bois}'' from breaking at the end of a line or page. A discretionary hyphen would allow the name to break.\footnote{Ignoring spaces in names is good because it aids fault tolerance, thereby decreasing spurious index entries. Here we have a special case where this behavior is not useful.}
%
% \item Instead of using \cmd{\SkipIndex}\cmd{\AltDuBois} every time we wanted to avoid making an index entry, we create a cross-reference in the index from the alternate name to the canonical name:\\
% |  \IndexRef[W.E.B.]{Du\empty Bois}{Du Bois, W.E.B.}|
%
% \IndexRef[W.E.B.]{Du\empty Bois}{Du Bois, W.E.B.}From this point onward, no page entry for \AltDuBois\ will occur in the index unless manipulated by \cmd{\IncludeName*}. The canonical \DuBois\ functions as a different name and is not affected.
% \end{enumerate}
%
% Indexing\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} both name forms would be trivial. One can use both forms at need to generate page references in the index. After all of the page references are done, one can create cross-references with \cmd{\SeeAlso}\cmd{\IndexRef}.
%
% Indexing\marginpar{\large\raggedleft\textsf{\bfseries 3.1}\strut} with the canonical name form \DuBois\ whenever we see \AltDuBois\ is slightly more complicated:
%
% \begin{itemize}\small
% \item We no longer wrap each name automatically with two index entries, so we would need to keep track of page breaks and this alternate name.
% \item We could use |\JustIndex\DuBois\AltDuBois| to get \JustIndex\DuBois\AltDuBois.
% \item We could create macros based on that:\\
% |\global\newcommand*\OtherDuBois{\JustIndex\DuBois\AltDuBois}|\\
% |\global\newcommand*\LOtherDuBois{\JustIndex\DuBois\LAltDuBois}|\\
% |\global\newcommand*\SOtherDuBois{\JustIndex\DuBois\SAltDuBois}|
% \end{itemize}
% \global\newcommand*\OtherDuBois{\JustIndex\DuBois\AltDuBois\JustIndex\DuBois}
% \global\newcommand*\LOtherDuBois{\JustIndex\DuBois\LAltDuBois\JustIndex\DuBois}
% \global\newcommand*\SOtherDuBois{\JustIndex\DuBois\SAltDuBois}
%
% With |\ForgetThis\OtherDuBois| we get \ForgetThis\OtherDuBois\ and \OtherDuBois\ thereafter. |\LOtherDuBois| gives us \LOtherDuBois, while with |\SOtherDuBois| we get \SOtherDuBois. The extra full stop at the end of the sentence was gobbled. We used \cmd{\global} to ensure that, regardless of scope, our macros work.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
%
% \subsubsection{\texttt{\textbackslash LocalNames}}
% \label{sec:LocalNames}
%
% As mentioned previously in Section~\ref{sec:tweaks}, both \cmd{\ForgetName} and \cmd{\SubvertName} usually affect both main-matter and front-matter names. This default behavior can be quite helpful. Nevertheless, there are cases where it is undesirable. This section shows \cmd{\Localnames} and \cmd{\Globalnames} in action, limiting the behavior of the ``tweaking macros'' to either the main or front matter.
%
% We begin by defining a macro that will report to us whether a name exists in the main matter, front matter, both, or none:
% \def\CheckChuck{\IfFrontName[Charlie]{Chaplin}%
%   {\IfMainName[Charlie]{Chaplin}{both}{front}}%
%   {\IfMainName[Charlie]{Chaplin}{main}{none}}}%
% \begin{quote}\small\setstretch{1.1}
% |\def\CheckChuck{%\IfFrontName[Charlie]{Chaplin}%|\\
% |  {\IfMainName[Charlie]{Chaplin}{both}{front}}%|\\
% |  {\IfMainName[Charlie]{Chaplin}{main}{none}}}%|
% \end{quote}
% Next we create a formatted name in the ``main matter'':
% \begin{quote}\small\setstretch{1.1}
% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\qquad\qquad\qquad\hbox{}\\
% |\CheckChuck|\hfill\CheckChuck\qquad\qquad\qquad\hbox{}
% \end{quote}
% Now we switch to ``front-matter'' text and create a name. To ignore any local scoping we use \cmd{\global}\cmd{\NamesInactive}:
% \begin{quote}\small\setstretch{1.1}
% |\global\NamesInactive|\global\NamesInactive\\
% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\qquad\qquad\qquad\hbox{}\\
% |\CheckChuck|\hfill\CheckChuck\qquad\qquad\qquad\hbox{}
% \end{quote}
% We now have two names. They look and behave the same, but are two different ``species'' with independent first and subsequent uses. We use \cmd{\Localnames} to make \cmd{\ForgetName} and \cmd{\SubvertName} work with only the front-matter species. Then we ``forget'' the front-matter name:
% \begin{quote}\small\setstretch{1.1}
% |\LocalNames|\LocalNames\\
% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
% |\CheckChuck|\hfill\CheckChuck\qquad\qquad\qquad\hbox{}
% \end{quote}
% Next we ``subvert'' the front-matter name to ``remember'' it again and switch to the main section, again using \cmd{\global} to ignore scoping. Now \cmd{\ForgetName} and \cmd{\SubvertName} are working with the main-matter species.
% \begin{quote}\small\setstretch{1.1}
% |\SubvertName[Charlie]{Chaplin}|\SubvertName[Charlie]{Chaplin}\\
% |\global\NamesActive|\global\NamesActive\\
% |\CheckChuck|\hfill\CheckChuck\qquad\qquad\qquad\hbox{}
% \end{quote}
%  We forget the main-matter name and additionally reset the default behavior so that \cmd{\ForgetName} and \cmd{\SubvertName} work with both species:
% \begin{quote}\small\setstretch{1.1}
% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
% |\GlobalNames|\GlobalNames\\
% |\CheckChuck|\hfill\CheckChuck\qquad\qquad\qquad\hbox{}
% \end{quote}
% Finally, we forget everything. Even though we are in a main-matter section, the front-matter control sequence goes away:
% \begin{quote}\small\setstretch{1.1}
% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
% |\CheckChuck|\hfill\CheckChuck\qquad\qquad\qquad\hbox{}
% \end{quote}
% \clearpage
%
% \subsubsection{Unicode + \textsf{inputenc}}
% \label{sec:Unicode}
%
% The following subset of active Unicode characters are available ``out of the box'' using NFSS, \textsf{inputenc}, and \textsf{fontenc}:
%
% \begin{center}\setstretch{1.1}
% \begin{tabular}{lll}\toprule
% À Á Â Ã Ä Å Æ & Ç È É Ê Ë & Ì Í Î Ï Ð Ñ \\
% Ò Ó Ô Õ Ö Ø & Ù Ú Û Ü Ý & Þ ß \\
% à á â ã ä å æ & ç è é ê ë & ì í î ï ð ñ \\
% ò ó ô õ ö ø & ù ú û ü ý & þ ÿ \\
% Ă ă Ą ą Ć ć Č č & Ď ď Đ đ Ę ę Ě ě & Ğ ğ İ ı \\
% IJ ij Ľ ľ Ł ł & Ń ń Ň ň Œ œ & Ŕ ŕ Ř ř \\
% Ś Ş ş Š š Ţ ţ Ť ť & Ů ů Ű ű & Ź ź Ż ż Ž ž \\\bottomrule
% \end{tabular}
% \end{center}
%
% Some\marginpar{\small\raggedleft\dbend} of these characters expand differently, which can affect index sorting. For example, \texttt{ä} becomes \texttt{\cmd{\IeC\textvisiblespace}\{\cmd{\"a}\}} and \texttt{Æ} becomes \texttt{\cmd{\IeC\textvisiblespace}\{\cmd{\AE\textvisiblespace}\}}. Additional accents and glyphs can be used with Unicode input, NFSS, \textsf{inputenc}, and \textsf{fontenc} when using fonts with TS1 glyphs, \emph{e.g.}, |\usepackage{lmodern}| (per the table on pages 455--63 in \emph{The Latex Companion}). The following example lets you type, ``In Congreſs, July 4, 1776.''
% \begin{quote}\small\setstretch{1.1}
% |\usepackage{newunicodechar}|\\
% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
% |\newunicodechar{ſ}{\textlongs}|
% \end{quote}
%
% Using\marginpar{\small\raggedleft\dbend} |\newunicodechar{ā}{\=a}| allows |\Name{Ghazāli}| to show \SkipIndex\Name{Ghaz\=ali}, but control sequences like |\=a| fail when using \texttt{makeindex} and \texttt{gind.ist}. For example, the \textsf{ltxdoc} class, with \texttt{gind.ist}, turns the default ``actual'' character |@| into |=|. Using |\index{Gh{\=a}zali}| halts execution. Understandably, using |\index{Gh\=azali}| gives an ``azali'' entry sorted under ``Gh'' (thanks \Name[Dan]{Luecking}). This issue is not specific to \textsf{nameauth}.
%
% Such\marginpar{\small\raggedleft\dbend} issues with \texttt{gind.ist} are not the only concerns one must have about NFSS, \textsf{inputenc}, and \textsf{fontenc} when using Unicode. Although the manner in which glyphs are handled is quite powerful, it also is fragile. Any \TeX\ macro that partitions its argument without using delimiters can break Unicode under NFSS. Consider the following examples with |\def\foo#1#2#3\relax{<#1#2><#3>}|:
% \begin{center}\setstretch{1.1}
% \def\foo#1#2#3\relax{<#1#2><#3>}
% \begin{tabular}{lll}\toprule
% Argument & Macro & Result\\\midrule
% |abc| & |\foo abc\relax| & \foo abc\relax\\
% |{æ}bc| & |\foo {æ}bc\relax| & \foo {æ}bc\relax\\
% |\ae bc| & |\foo \ae bc\relax| & \foo \ae bc\relax\\\bottomrule
% \end{tabular}
% \end{center}
%
% The arguments in the last example always put |c| in |#3|, with the first two glyphs in |#1#2.| Now here is where things get tricky:
% \begin{center}\setstretch{1.1}
% \begin{tabular}{llll}\toprule
% Argument & Macro & Engine & Result\\\midrule
% |æbc| & |\foo æbc\relax| & \texttt{xelatex} & <æb><c>\\
% |æbc| & |\foo æbc\relax| & \texttt{lualatex} & <æb><c>\\
% |æbc| & |\foo æbc\relax| & \texttt{pdflatex} & <æ><bc>\\\bottomrule
% \end{tabular}
% \end{center}
%
% In both \texttt{xelatex} and \texttt{lualatex} you get the same results as the previous table, where |c| is in |#3| and the first two glyphs are in |#1#2.| However, using \texttt{latex} or \texttt{pdflatex} with \textsf{inputenc} and \textsf{fontenc} causes |æ| by itself to use |#1#2|.
%
% Without digging into the details of font encoding and NFSS, we can say in simple terms that |æ| is ``two arguments wide.'' Any macro where this |#1#2| pair gets split into |#1| and |#2| will produce either \texttt{Unicode char \dots not set up for LaTeX} or \texttt{Argument of \textbackslash UTFviii@two@octets has an extra \}}. Again, this is not just specific to \textsf{nameauth}.
%
% \cmd{\CapThis}\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut\break\small\dbend} avoids these pitfalls by checking if the leading token of the argument to be capitalized is equivalent to the leading token of an active Unicode character. We chose \texttt{ß} as the test character somewhat at random. Page~\pageref{page:CapSystem} shows the test. Essentially, the following two expressions are equal under NFSS:
% \begin{quote}\small\setstretch{1.1}
% \cmd{\@car}\meta{$test_1$}\cmd{\@nil}, where \meta{$test_1$} expands to \cmd{\IeC} \marg{$test_1$}\\
% \cmd{\@car}\meta{$test_2$}\cmd{\@nil}, where \meta{$test_2$} expands to \cmd{\IeC} \marg{$test_2$}
% \end{quote}
%
% If \meta{$test_2$} expands to the letter \meta{$test_2$}, then it will fail the test for equality. ``Active'' characters expand to ``two-argument wide'' values under NFSS, as the table below shows via defining a macro to be a character, then printing its \cmd{\meaning} in the cell:
% \begin{center}\footnotesize\setstretch{1.1}\makeatletter
% \begin{tabular}{lll}\toprule
% |\def\a|\marg{L} & |\protected@edef\a|\marg{L} & |\protected\edef\a|\marg{L}\\
% A \def\a{A}\meaning\a & A \protected@edef\a{A}\meaning\a & A \protected\edef\a{A}\meaning\a\\
% À \def\a{À}\meaning\a & À \protected@edef\a{À}\meaning\a & À \protected\edef\a{À}\meaning\a\\
% ß \def\a{ß}\meaning\a & ß \protected@edef\a{ß}\meaning\a & ß \protected\edef\a{ß}\meaning\a\\\bottomrule
% \end{tabular}
% \end{center}
% The number of spaces inserted in the index file depends on the number of expansions that occur for a given active character.
%
% This\marginpar{\small\raggedleft\dbend} method of testing for active characters and resolving the related issues can interfere with some situations of expansion, generating errors. Be mindful of names within an \cmd{\edef}, for example, unless you control expansion explicitly.
%
% \LaTeX\marginpar{\small\raggedleft\dbend} also removes spaces between undelimited macro arguments, but not from the trailing undelimited argument. This is no longer an issue for name arguments in \textsf{nameauth}, but we include the information anyway:
% \begin{center}\setstretch{1.1}
% \def\foo#1#2#3\relax{<#1#2><#3>}
% \begin{tabular}{lll}\toprule
% Argument & Macro & Result\\\midrule
% |a b c| & |\foo a b c\relax| & \foo a b c\relax\\
% |ab c| & |\foo ab c\relax| & \foo ab c\relax\\
% |a bc| & |\foo a bc\relax| & \foo a bc\relax\\
% |abc| & |\foo abc\relax| & \foo abc\relax\\\bottomrule
% \end{tabular}
% \end{center}
% Using explicit spacing macros prevents gobbled spaces:
% \begin{center}\small\setstretch{1.1}
% \def\foo#1#2#3\relax{<#1#2><#3>}
% \begin{tabular}{lll}\toprule
% Argument & Macro & Result\\\midrule
% |a~bc| & |\foo a~bc\relax| & \foo a~bc\relax\\
% |a\nobreakspace bc| & |\foo a\nobreakspace bc\relax| & \foo a\nobreakspace bc\relax\\
% |a\space bc| & |\foo a\space bc\relax| & \foo a\space bc\relax\\\bottomrule
% \end{tabular}
% \end{center}
% See also Sections~\ref{sec:standards} and~\ref{sec:accents}, as well as Section~\ref{sec:IndexSort}.
% \clearpage
%
% \subsubsection{\LaTeX\ Engines}
% \label{sec:engines}
%
% The\marginpar{\small\raggedleft\dbend} \textsf{nameauth} package tries to work with multiple languages and typesetting engines. The following preamble snippet illustrates how that can be done:\footnote{A similar version of this example is in \texttt{examples.tex}, collocated with this manual.}
% This example reflects changes to several packages since 2014 and may not address older documents and systems or all possible cases. Of course, the user must specify the main and alternate languages and any package options as the respective package documentation files indicate.
% \begin{quote}\small\setstretch{1.1}
% |\ifdefined\Umathchar|\\
% |  \usepackage{fontspec}|\\
% |  \usepackage{polyglossia}|\\
% |\else|\\
% |  \usepackage[utf8]{inputenc}|\\
% |  \usepackage[TS1,T1]{fontenc}|\\
% |  \usepackage{babel}|\\
% |\fi|\\
% |% Below is optional; use only if your dvi viewer|\\
% |% crashes or becomes unresponsive with tikz.|\\
% |\usepackage{ifxetex}|\\
% |\usepackage{ifluatex}|\\
% |\usepackage{ifpdf}|\\
% |\ifxetex|\\
% |  \usepackage{tikz}|\\
% |\else|\\
% |  \ifpdf|\\
% |    \usepackage{tikz}|\\
% |  \fi|\\
% |\fi|
% \end{quote}
%
% This general arrangement works for this manual, which is tested with all of the \LaTeX\ engines above. This example is not meant to be the only possible way to check which engine you are using and how to set things up.
%
% The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines. One must include the \textsf{ifxetex}, \textsf{ifluatex}, and \textsf{ifpdf} packages for it to work.
%
% \begin{quote}\small\setstretch{1.1}
% |\ifxetex| \meta{xelatex text}|%|\\
% |\else|\\
% \hbox{\quad}|\ifluatex|\\
% \hbox{\qquad}|\ifpdf |\meta{lualatex in pdf mode text}|%|\\
% \hbox{\qquad}|\else |\meta{lualatex in dvi mode text}|%|\\
% \hbox{\qquad}|\fi|\\
% \hbox{\quad}|\else|\\
% \hbox{\qquad}|\ifpdf |\meta{pdflatex text}|%|\\
% \hbox{\qquad}|\else |\meta{latex text}|%|\\
% \hbox{\qquad}|\fi|\\
% \hbox{\quad}|\fi|\\
% |\fi|
% \end{quote}
% \clearpage
%
% \subsubsection{Hooks: Intro}
% \label{sec:Hooksa}
%
% Starting with this section we reset all formatting hooks to do nothing. This helps us focus on the modifications made hereafter.
% \renewcommand*\NamesFormat{}
% \renewcommand*\FrontNamesFormat{}
% \renewcommand*\MainNameHook{}
% \renewcommand*\FrontNameHook{}
%
% Before\marginpar{\small\raggedleft Margin\break Paragraphs} we get to the use of text tags and name conditionals in name formatting, we begin with an intermediate example to illustrate that something more complex can occur in \cmd{\NamesFormat}.\marginpar{\small\raggedleft\dbend} Here we put the first mention of a name in boldface, along with a marginal notation if possible:\footnote{A similar version of this example is in \texttt{examples.tex}, collocated with this manual.}
% \begin{quote}\small\setstretch{1.1}
% |\let\OldFormat\NamesFormat%|\\
% |\renewcommand*\NamesFormat[1]|\\
% |  {\textbf{#1}\unless\ifinner|\\
% |  \marginpar{\raggedleft\scriptsize #1}\fi}|\\
% \dots\\
% |\let\NamesFormat\OldFormat%|
% \end{quote}
% Changes to \cmd{\NamesFormat} are not relying just on scoping rules to keep them ``local.'' We use \cmd{\let} to make explicit changes in order to avoid some possible side effects. We now use the example above in a sample text:
% \begin{quote}\small\setstretch{1.1}
% \let\OldFormat\NamesFormat\ignorespaces%
% \renewcommand*\NamesFormat[1]{\textbf{#1}\unless\ifinner
%   \marginpar{\raggedleft\scriptsize #1}\fi}%
% |\PretagName{Vlad, Ţepeş}{Vlad Tepes}% for accented names|\\[2ex]
% {\small |\Name{Vlad| |III,| |Dracula},| |known| |as| |\AKA{Vlad| |III,| |Dracula}{Vlad,| |Ţepeş}| |(the| |Impaler)| |after| |his| |death,| |was| |the| |son| |of| |\Name{Vlad| |II,| |Dracul},| |a| |member| |of| |the| |Order| |of| |the| |Dragon.| |Later| |references| |to| |``\Name{Vlad| |III,| |Dracula}''| |appear| |thus.|}\\[2ex]
% \Name{Vlad III, Dracula}, known as \AKA{Vlad III, Dracula}{Vlad, Ţepeş} (the Impaler) after his death, was the son of \Name{Vlad II, Dracul}, a member of the Order of the Dragon. Later references to ``\Name{Vlad III, Dracula}'' appear thus.
% \let\NamesFormat\OldFormat%
% \end{quote}
%
% Now again we have reverted to the default \cmd{\NamesFormat} and we get \ForgetName{Vlad III, Dracula}\Name{Vlad III, Dracula} and \Name{Vlad III, Dracula}. For references to ``Vlad'' consider using |\Name{Vlad, III}| and use \cmd{\NameAddInfo} and \cmd{\NameQueryInfo} to handle ``\texttt{Dracula}.'' The simplified interface greatly helps one to avoid confusion and settle on specific name forms.
%
% \let\OldMainHook\MainNameHook%
% You\marginpar{\small\raggedleft\dbend} cannot re-enter \cmd{\Name} or \cmd{\AKA} by calling them within any of the formatting hooks, as the next example shows:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*\MainNameHook[1]|\\
% |{%|\\
% |  {#1}%|\\
% |  \IndexInactive%|\\
% |  \Name{foo}\AKA{bar}{baz}%|\\
% |  \IndexActive%|\\
% |}|
% \end{quote}
% \renewcommand*\MainNameHook[1]{{#1}\IndexInactive\Name{foo}\AKA{bar}{baz}\IndexActive}%
% Calling,\marginpar{\large\raggedleft\textsf{\bfseries 2.4}\strut} \emph{e.g.}, |\Wash| produces \Wash, without foo, bar, or baz. \cmd{\Name} and \cmd{\AKA} expand to nothing. This prevents stack overflows both in this case and if you called the naming macros as their own arguments. |\Name{foo\Name{bar}}| would produce ``foo'' in the text and ``foobar'' in the index. As you see, these cases are to be avoided.
% \let\MainNameHook\OldMainHook
% \clearpage
%
% \subsubsection{Hooks: Life Dates}
% \label{sec:Hooksb}
% We can use name conditionals (Section~\ref{sec:tests}) and text tags (Section~\ref{sec:tagtext}) to add life information to names when desired.
%
% \DescribeMacro{\if@nameauth@InName}
% \DescribeMacro{\if@nameauth@InAKA}
% The example \cmd{\NamesFormat} below adds a text tag to the first occurrences of main-matter names. It uses internal macros of \cmd{\@nameauth@Name}. To prevent errors, the Boolean values \texttt{\textbackslash if@nameauth@InName} and \texttt{\textbackslash if@nameauth@InAKA} are true only within the scope of \cmd{\@nameauth@Name} and \cmd{\AKA} respectively.
%
% \DescribeMacro{\@nameauth@toksa}
% \DescribeMacro{\@nameauth@toksb}
% \DescribeMacro{\@nameauth@toksc}
% This package makes three token registers available to facilitate using the name conditional macros as we do below. Using these registers allows accented names to be recognized properly. In \cmd{\AKA} the token registers are copies of the \emph{last} three arguments, corresponding to the pseudonym.\marginpar{\small\raggedleft\dbend} Nevertheless, they have the same names as the registers in \cmd{\@nameauth@Name} because they work the same way and may be easier to use this way.
%
% We assume that we will not be using the \texttt{alwaysformat} option, meaning that we only call this hook once for a first use of \cmd{\AKA}. We also use a different formatting for the naming macros on the one hand and \cmd{\AKA} on the other:\footnote{A similar version of this example is in \texttt{examples.tex}, collocated with this manual.}
% \begin{quote}\small\setstretch{1.1}
% |\newif\ifNoTag|{\color{nared}|%|\hfill|allows us to work around \ForgetName|}\\
% |\let\OldFormat\NamesFormat|{\color{nared}|%|\hfill|save the format|}\\
% |\let\OldFrontFormat\FrontNamesFormat|\\
% |\makeatletter|{\color{nared}|%|\hfill|access internals|}\\
% |\renewcommand*\NamesFormat[1]{\begingroup%|\\
% |  \protected@edef\temp{\endgroup\textbf{#1}%|\\
% |  \unless\ifNoTag|\\
% |    \if@nameauth@InName|\\
% |      {\bfseries\noexpand\NameQueryInfo|\\
% |      [\unexpanded\expandafter{\the\@nameauth@toksa}]|\\
% |      {\unexpanded\expandafter{\the\@nameauth@toksb}}|\\
% |      [\unexpanded\expandafter{\the\@nameauth@toksc}]}\fi|\\
% |    \if@nameauth@InAKA\noexpand\NameQueryInfo|\\
% |      [\unexpanded\expandafter{\the\@nameauth@toksa}]|\\
% |      {\unexpanded\expandafter{\the\@nameauth@toksb}}|\\
% |      [\unexpanded\expandafter{\the\@nameauth@toksc}]\fi|\\
% |  \fi}\temp\global\NoTagfalse%|\\
% |}|\\
% |\makeatother|\\
% |\let\FrontNamesFormat\NamesFormat|
% \end{quote}
% \let\OldFormat\NamesFormat\ignorespaces%
% \let\OldFrontFormat\FrontNamesFormat\ignorespaces%
% \makeatletter\ignorespaces%
% \renewcommand*\NamesFormat[1]{\begingroup\ignorespaces%
%   \protected@edef\temp{\endgroup\textbf{#1}\ignorespaces%
%   \unless\ifNoTag
%     \if@nameauth@InName
%       {\bfseries\noexpand\NameQueryInfo
%       [\unexpanded\expandafter{\the\@nameauth@toksa}]
%       {\unexpanded\expandafter{\the\@nameauth@toksb}}
%       [\unexpanded\expandafter{\the\@nameauth@toksc}]}\fi
%     \if@nameauth@InAKA\noexpand\NameQueryInfo
%       [\unexpanded\expandafter{\the\@nameauth@toksa}]
%       {\unexpanded\expandafter{\the\@nameauth@toksb}}
%       [\unexpanded\expandafter{\the\@nameauth@toksc}]\fi
%   \fi}\temp\global\NoTagfalse}\ignorespaces%
% \makeatother%
% This change prints tags in the first use hooks unless \cmd{\NoTag} is set true. Please note that the conditional path here is placed within the \cmd{\edef}. Putting it outside the \cmd{\edef}, such as |\unless\ifNoTag\temp\fi|, will cause errors.
%
% This method uses the $\epsilon$-\TeX{} primitives \cmd{\noexpand} and \cmd{\unexpanded} to avoid the extensive repetition of \cmd{\expandafter}. Since the \textsf{nameauth} package depends on \textsf{etoolbox}, we assume that we are using $\epsilon$-\TeX.
%
% Before we can refer to any text tags, we must create them. Using the approach above, we must include a leading space in the text tags:
% \begin{quote}\small\setstretch{1.1}
% |\NameAddInfo[George]{Washington}{ (1732--99)}%|\\
% |\NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}%|\\
% |\NameAddInfo{Atatürk}{ (in 1934, a special surname)}%|
% \NameAddInfo[George]{Washington}{ (1732--99)}%
% \NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}%
% \NameAddInfo{Atatürk}{ (in 1934, a special surname)}%
% \end{quote}
%
% The leading space is needed only when a text tag appears. Another way to add that space is to put it in the conditional path of the formatting hook and leave it out of the text tags entirely:
% \begin{quote}\small
% \dots|\unless\ifNoTag|\dots|{ }\noexpand\NameQueryInfo|\dots|\fi}\temp|
% \end{quote}
%
% Now we begin with the first example, where both the name and the dates are in boldface because we use a naming macro:
% \begin{quote}\small\setstretch{1.1}
% |\ForgetThis\Wash held office 1789--97. No tags: \Wash.|\\
% |First use, dates suppressed: \NoTagtrue\ForgetThis\Wash.|\\[1ex]
% \ForgetThis\Wash\ held office 1789--97. No tags: \Wash.
% First use, dates suppressed: \NoTagtrue\ForgetThis\Wash.
% \end{quote}
%
% Since \cmd{\AKA} usually calls the ``subsequent use'' formatting hooks, we can create a scope to ``fool'' it into calling the first-use hook via \cmd{\let}:
% \begin{quote}\small\setstretch{1.1}
% |\Name[Mustafa]{Kemal} was granted the name%|\\
% |\begingroup\let\MainNameHook\NamesFormat%|\\
% |\AKA[Mustafa]{Kemal}{Atatürk}\endgroup. We mention%|\\
% |\AKA[Mustafa]{Kemal}{Atatürk} again.|
%
% \Name[Mustafa]{Kemal} was granted the name \begingroup\let\MainNameHook\NamesFormat \AKA[Mustafa]{Kemal}{Atatürk}\endgroup. We mention \AKA[Mustafa]{Kemal}{Atatürk} again.
% \end{quote}
%
% Another\marginpar{\small\raggedleft\dbend} solution uses the \texttt{formatAKA} package option. In the example below, we simulate a first occurrence of \Name[Mustafa]{Kemal}. Then we simulate \texttt{formatAKA}. Finally, we use \cmd{\ForceName} with \cmd{\AKA}:
% \begin{quote}\small\setstretch{1.1}
% |\ForgetName[Mustafa]{Kemal}%|\hfill|first use|\\
% |\makeatletter\@nameauth@AKAFormattrue\makeatother%|\hfill|formatAKA|\\
% |\Name[Mustafa]{Kemal} was granted the name%|\\
% |\AKA[Mustafa]{Kemal}{Atatürk}. We mention%|\\
% |\AKA[Mustafa]{Kemal}{Atatürk} again.|\\[1ex]
% \ForgetName[Mustafa]{Kemal}\makeatletter\@nameauth@AKAFormattrue\makeatother\Name[Mustafa]{Kemal} was granted the name \ForceName\AKA[Mustafa]{Kemal}{Atatürk}. We mention \AKA[Mustafa]{Kemal}{Atatürk} again.
% \end{quote}
%
% There are other solutions for getting this result, such as using \cmd{\IncludeName*} or non-printing control sequences. One must decide the best approach for oneself. Please remember to reset the formatting, if needed:
% \begin{quote}\small\setstretch{1.1}
% |\let\NamesFormat\OldFormat|\\
% |\let\FrontNamesFormat\OldFrontFormat|
% \end{quote}
% \let\NamesFormat\OldFormat
% \let\FrontNamesFormat\OldFrontFormat
%
% See Section~\ref{sec:internal} and page~\pageref{page:parser} for the decision paths and the logic used by the package. Presently, writing hook macros should be much simpler than in earlier versions of this package.
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}}
% \clearpage
%
% \subsubsection{Hooks: Advanced}
% \label{sec:Hooksc}
% \AltFormatActive\begingroup
%
% \begin{center}\bfseries Alternate Formatting\end{center}
% The\marginpar{\large\raggedleft\textsf{\bfseries 3.1}} alternate formatting framework now makes designing hooks much easier by providing some built-in features that add not only error protection but also ease of use. We enabled that framework at the beginning of this section with \cmd{\AltFormatActive} and take care not to use the names in this section elsewhere.
%
% Both \cmd{\AltFormatActive} and \cmd{\AltFormatActive*} set the internal Boolean flag \cmd{\@nameauth@AltFormattrue}, which enables alternate formatting. Additionally, \cmd{\AltFormatActive} sets \cmd{\@nameauth@DoAlttrue}, which ``switches on'' alternate formatting. \cmd{\AltFormatInactive} sets both flags false.
%
% The main feature\marginpar{\small\raggedleft\cmd{\CapThis}\break protection} of this framework is protecting against errors created when \cmd{\@nameauth@Cap} gets a misleading result from \cmd{\@nameauthUTFtest} and splits a token list in a way that causes an error. The alternate capping macro \cmd{\AltCaps} and \cmd{\CapThis} work mutually in \cmd{\@nameauth@Parse} to ensure that they do not interfere with each other, as we saw demonstrated in Section~\ref{sec:altformat}.
%
% \begin{center}\bfseries Continental Format\end{center}
% Here we look in greater detail at the more complex version of Continental formatting from Section~\ref{sec:altformat}.
%
% Font changes \marginpar{\small\raggedleft changes\break in text} in the text occur with the short macros \cmd{\textSC}, \cmd{\textIT}, \cmd{\textBF}, and \cmd{\textUC}. They all look similar to \cmd{\textSC}. We therefore show just this one macro as an example from the package source.
% \begin{quote}\small\setstretch{1.1}
% |\newcommand*\textSC[1]{%|\\
% |  \if@nameauth@DoAlt\textsc{#1}\else#1\fi|\\
% |}|
% \end{quote}
%
% Using this method, formatting occurs in both the text and in the index if the \texttt{altformat} option or \cmd{\AltFormatActive} was used. If you use a name that uses these macros both within and outside of the alternate formatting regime, you will get spurious index entries.\footnote{Using \cmd{\AltFormatActive*} is interesting because it looks like the normal \textsf{nameauth} regime but prevents \cmd{\CapThis} from having its normal effect unless you use \cmd{\AltCaps}. With \cmd{\AltFormatActive*} if you use a name that has alternate formatting both within and outside of the alternate formatting regime, you may not get spurious index entries as long as control sequences are consistent.}
%
% We plan to have small caps on by default, then off in subsequent uses. We thus use \cmd{\AltFormatActive} for the ``always on'' general condition, then redefine \cmd{\MainNameHook}  because it is the subsequent use. We use \cmd{\AltOff} to suppress formatting. It works only in the formatting hooks. \cmd{\AltOff} toggles an internal flag that deactivates any changes. From the source, it looks like:
% \begin{quote}\small\setstretch{1.1}
% |\newcommand*\AltOff{%|\\
% |  \if@nameauth@InHook\@nameauth@DoAltfalse\fi|\\
% |}|
% \end{quote}
%
% Since the normal effects of \cmd{\CapThis} are disabled, \cmd{\AltCaps} does the job by capitalizing its argument in braces |{| |}| when it is used in a macro hook and triggered by \cmd{\CapThis}. The source looks like:
% \begin{quote}\small\setstretch{1.1}
% |\newcommand*\AltCaps[1]{%|\\
% |  \if@nameauth@InHook|\\
% |    \if@nameauth@DoCaps\MakeUppercase{#1}\else#1\fi|\\
% |  \else#1\fi|\\
% |}|
% \end{quote}
%
% It is important that these macros not expand too soon. We therefore must put \cmd{\noexpand} once before \cmd{\textSC}, etc., and once before \cmd{\AltCaps}. This is because the name arguments in \textsf{nameauth} have to use \cmd{\protected@edef} to work right. We will get to that when we set up the names and any applicable tags.
%
% Before we alter the formatting hooks, we can save the hook macros if we want to recall them (below) or we can use \cmd{\begingroup} and \cmd{\endgroup} to create a new scope and let that handle any changes. We use scoping in this section.
%
% The final step \emph{does not come} from the \textsf{nameauth} source. We must redefine the formatting hooks ourselves. One of the simplest ways to do this when using the \texttt{altformat} option or \cmd{\AltFormatActive} is:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*\MainNameHook{\AltOff}|
% \end{quote}
% Simple, \emph{oder}? If needed, we can \cmd{\let}\cmd{\FrontNameHook}\cmd{\MainNameHook}.
% \renewcommand*\MainNameHook{\AltOff}\let\FrontNameHook\MainNameHook
% If you want to suppress formatting altogether in the front matter, make the following change: |\let\FrontNamesFormat\MainNameHook|.
% 
% Continental formatting usually alters at least one element in the required name field, as we see below:
% \begin{quote}\small\setstretch{1.1}
% |\begin{nameauth}|\\
% |  \< Adams   & John  & \noexpand\textSC{Adams}      & >|\\
% |  \< SDJR    & Sammy & \noexpand\textSC{Davis},|\\
% |                     \noexpand\textSC{Jr}.          & >|\\
% |  \< HAR     &       & Harun, \noexpand\textSC%|\\
% |                     {\noexpand\AltCaps{a}l-Rashid} & >|\\
% |  \< Mencius &       & \noexpand\textSC{Mencius}    & >|\\
% |\end{nameauth}|
% \end{quote}
%
% Now we must ensure that these names are sorted properly in the index. See again how the formatting must be present:
% \begin{quote}\small\setstretch{1.1}
% |\PretagName[John]{\noexpand\textSC{Adams}}{Adams, John}|\\
% |\PretagName[Sammy]%|\\
% |  {\noexpand\textSC{Davis}, \noexpand\textSC{Jr}.}%|\\
% |  {Davis, Sammy, Jr.}|\\
% |\PretagName{Harun, \noexpand\textSC%|\\
% |  {\noexpand\AltCaps{a}l-Rashid}}{Harun al-Rashid}|\\
% |\PretagName{\noexpand\textSC{Mencius}}{Mencius}|
% \end{quote}
%
% The use in the body text is not much different than normal, but only if we use the simplified interface.
% \begin{center}
% \small\noindent\begin{tabular}{llll}\toprule
% First & Next & Long & Short \\\midrule
% \Adams & \Adams & \LAdams & \SAdams\\
% \SDJR & \SDJR & \LSDJR & \SSDJR\\
% \HAR & \HAR & \LHAR & \SHAR\\
% \Mencius & \Mencius & \LMencius & \SMencius\\\bottomrule
% \end{tabular}
% \end{center}
%
% \begin{itemize}\small
% \item Punctuation detection works: \ForceName\LSDJR. Also \LSDJR. Then \ForceName\SDJR. Now \SDJR. (We used \cmd{\ForceName} for formatting.)
% \item \cmd{\ForceName}\cmd{\DropAffix}\cmd{\LSDJR} gives \ForceName\DropAffix\LSDJR. Otherwise, using just \cmd{\DropAffix}\cmd{\LSDJR} gives \DropAffix\LSDJR.
% \item \cmd{\RevComma}\cmd{\LAdams} yields \RevComma\LAdams. All the reversing macros work.
% \item \cmd{\ForceName}\cmd{\ForceFN}\cmd{\SHAR} produces \ForceName\ForceFN\SHAR. \cmd{\ForceFN}\cmd{\SHAR} produces \ForceFN\SHAR. If we add \cmd{\CapThis} we get \CapThis\ForceName\ForceFN\SHAR\ and \CapThis\ForceFN\SHAR. The way that Continental resources treat certain affixes relates to similar issues in [\hyperlink{Mulvany}{Mulvany}, 168--73].\footnote{Handling non-Western names in Western sources can be a gray area. One ought take care to be culturally sensitive in these matters.}
% \item One must include the extra control sequences in all the macro arguments that use these names.
% \end{itemize}
%
% \makeatletter\@nameauth@AKAFormattrue\makeatother
% If we use the \texttt{formatAKA} option we can refer to \Mencius\ as \AKA{\noexpand\textSC{Mencius}}{\noexpand\textSC{Meng}, Ke}, and again \AKA{\noexpand\textSC{Mencius}}{\noexpand\textSC{Meng}, Ke}. We get that with:
% \begin{quote}\small\setstretch{1.1}
% |\PretagName{\noexpand\textSC{Meng}, Ke}{Meng Ke}|\\
% |\AKA{\noexpand\textSC{Mencius}}{\noexpand\textSC{Meng}, Ke}|
% \end{quote}
% \makeatletter\@nameauth@AKAFormatfalse\makeatother
%
% \begin{center}\bfseries Rolling Your Own: New Style\end{center}
% \noindent ``New style'' means that we are sticking closely with various package features that have been implemented already and look similar to the solutions in Section~\ref{sec:altformat}. Here we set out on the path to custom formatting.
%
% When\marginpar{\small\raggedleft\dbend} redesigning formatting hooks, you should use \cmd{\AltFormatActive} or the \texttt{altformat} option to enable alternate formatting and prevent \cmd{\CapThis} from breaking your formatting macros.
%
% We recommend using the internal package flag \cmd{\@nameauth@DoAlt}, which activates alternate formatting, \cmd{\@nameauth@DoCaps}, which handles capitalization, and \cmd{\@nameauth@InHook}, which is true when the formatting hooks are called. See page~\pageref{page:hooks} and following. If you create your own macros, they will look similar:\footnote{A similar version of this example is in \texttt{examples.tex}, collocated with this manual.}
% \begin{quote}\small\setstretch{1.1}
% |\makeatletter%|\\
% |\newcommand*\Fbox[1]{%|\\
% |  \if@nameauth@DoAlt\fbox{#1}\else#1\fi|\\
% |}|\\
% |\makeatother|
% \end{quote}
% \makeatletter\newcommand*\Fbox[1]{\if@nameauth@DoAlt\fbox{#1}\else#1\fi}\makeatother
%
% Since \cmd{\AltCaps} is part of \textsf{nameauth}, you need not reinvent that particular wheel. As was the case previously, the final step is redefining the formatting hooks. One of the simplest ways to do this is:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*\MainNameHook{\AltOff}|\\
% |\let\FrontNameHook\MainNameHook|
% \end{quote}
%
% When defining names, be sure to use \cmd{\noexpand} before the control sequences in the macro arguments so they expand at the proper time:
% \begin{quote}\small\setstretch{1.1}
% |\PretagName[Pierre-Jean]%|\\
% |  {\noexpand\Fbox{\noexpand\AltCaps{d}e Smet}}%|\\
% |  {de Smet, Pierre-Jean}|\medskip
%
% |\begin{nameauth}|\\
% |  \< deSmet & Pierre-Jean &|\\
% |              \noexpand\Fbox{\noexpand\AltCaps{d}e Smet}} & >|\\
% |\end{nameauth}|
% \end{quote}
%
% Now we show how the formatting hooks work in the body text. One can check the index to see that it is formatted properly and consistently.
% \begin{center}\footnotesize
% \begin{tabular}{llll}\toprule
% First & Next & Long & Short \\\midrule
% |\deSmet| & |\deSmet| & |\LdeSmet| & |\SdeSmet|\\
% \deSmet & \deSmet & \LdeSmet & \SdeSmet\\\bottomrule
% \end{tabular}
% \end{center}
%
% The capitalized version |\CapThis\deSmet| is \CapThis\deSmet. This also works for a formatted use via \cmd{\ForceName}: \ForceName\CapThis\deSmet. The index entries will be consistent for all the variations in the text.
%
% Also, remember to restore the macro hooks if they should not persist for the entire document, or else you will get unwanted results.
%
% \begin{center}\bfseries Rolling Your Own: Old Style\end{center}
% ``Old style'' refers to the way hooks were designed before recent package changes. Sometimes one might want to achieve more customized results. We begin that journey by looking at \cmd{\NameParser}.
%
% \DescribeMacro{\NameParser}
% This user-accessible parser\marginpar{\large\raggedleft\textsf{\bfseries 3.1}} (page~\pageref{page:parser}) builds a name from the internal macros \cmd{\FNN}, \cmd{\SNN}, \cmd{\rootb} and \cmd{\suffb}. Reversing and commas are still usable; capitalization depends on the context. The general form is:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*|\meta{Hook}|[1]{|\texttt{\dots}\cmd{\NameParser}\texttt{\dots}|}|
% \end{quote}
% In order to use this hook-level parser, we want the option of ignoring the text that is sent to the formatting hooks from \cmd{\@nameauth@Parse}. We do that by redefining the hooks to take an argument.
%
% If we use the \texttt{altformat} option or \cmd{\AltFormatActive}, then alternate formatting is both enabled and ``switched on''; whatever formatting macros that we are using should be in the ``on'' state. If we want subsequent uses of names to be in the ``off'' state, we can design a hook like:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*|\meta{Hook}|[1]{|\texttt{\dots}\cmd{\AltOff}\cmd{\NameParser}\texttt{\dots}|}|
% \end{quote}
%
% If we used \cmd{\AltFormatActive*}, where the formatting macros are ``switched off'' but enabled nonetheless, then we might want a hook that turns the macros ``on'' instead:
% \begin{quote}\small\setstretch{1.1}
% |\renewcommand*|\meta{Hook}|[1]{|\texttt{\dots}\cmd{\AltOn}\cmd{\NameParser}\texttt{\dots}|}|
% \end{quote}
%
% We have shown\marginpar{\small\raggedleft\dbend} already that you do not really need \cmd{\NameParser} to use these switching macros in the hooks. Yet the user-level parser does have some handy uses, especially as we go further toward designing custom macros. For example, we demonstrate an extreme case based on Section~\ref{sec:Hooksa} where we modify some internal flags to have \cmd{\NameParser} to produce different syntactic forms than the normal output:\footnote{A similar version of this example is in \texttt{examples.tex}, collocated with this manual.}
% \begin{quote}\small\setstretch{1.1}\makeatletter
% \renewcommand*\NamesFormat[1]{#1\unless\ifinner\marginpar{\small\raggedleft\@nameauth@FullNametrue\@nameauth@FirstNamefalse\@nameauth@EastFNfalse\NameParser}\fi}
% \renewcommand*\MainNameHook[1]{\AltOff#1\unless\ifinner\marginpar{\small\raggedleft\@nameauth@FullNamefalse\@nameauth@FirstNamefalse\@nameauth@EastFNfalse\NameParser}\fi}
% |\makeatletter|\\
% |\renewcommand*\NamesFormat[1]{#1\unless\ifinner|\\
% |  \marginpar{\small\raggedleft%|\\
% |  \@nameauth@FullNametrue\@nameauth@FirstNamefalse%|\\
% |  \@nameauth@EastFNfalse\NameParser}\fi}|\\
% |\renewcommand*\MainNameHook[1]{\AltOff#1\unless\ifinner|\\
% |  \marginpar{\small\raggedleft%|\\
% |  \@nameauth@FullNamefalse\@nameauth@FirstNamefalse%|\\
% |  \@nameauth@EastFNfalse\NameParser}\fi}|\\
% |\makeatother|\makeatother
%
% \Name[Wm.]{\noexpand\textSC{Shakespeare}}\hfill |\Name[Wm.]{\noexpand\textSC{Shakespeare}}|
%
% \Name[Wm.]{\noexpand\textSC{Shakespeare}}\hfill |\Name[Wm.]{\noexpand\textSC{Shakespeare}}|
%
% \Name*[Wm.]{\noexpand\textSC{Shakespeare}}\hfill |\Name*[Wm.]{\noexpand\textSC{Shakespeare}}|
%
% \FName[Wm.]{\noexpand\textSC{Shakespeare}}[William]\hfill |\FName[Wm.]{\noexpand\textSC{Shakespeare}}[William]|
%
% \ForceName\Name[Wm.]{\noexpand\textSC{Shakespeare}}\\\hbox{}\hfill |\ForceName\Name[Wm.]{\noexpand\textSC{Shakespeare}}|
% \end{quote}
%
% In a first-use hook, the person's full name always is displayed in the margin. In a subsequent-use formatting hook, only a surname, ancient personal name, or mononym can be displayed in the margin.
%
% We use the \cmd{\NameParser} macro to re-create the name, but using different rules via the internal Boolean flags. The macros that toggle these flags are discussed elsewhere. These include:
% \begin{quote}\small\setstretch{1.1}
% |\if@nameauth@FullName|\hfill Print a full name if true.\\
% |\if@nameauth@FirstName|\hfill Print a first name if true.\\
% Only one or the other of these can be true to avoid undocumented behavior.\\[1ex]
% |\if@nameauth@RevThis|\hfill Reverse name order if true.\\
% |\if@nameauth@EastFN|\hfill toggled by \cmd{\ForceFN}.\\
% |\if@nameauth@RevThisComma|\hfill Reverse Western name, add comma.\\
% Reversing without commas overrides reversing with commas.
% \end{quote}
%
% Please\marginpar{\small\raggedleft\dbend} be aware that if you designed your own hooks for versions of \textsf{nameauth} before 3.0, it remains likely that they still work, but without the newer features. Updating your custom hooks is advised.
%
% The older version of ``rolling your own'' is reminiscent of the newer way, but it has significant differences:
% \begin{itemize}\small
% \item We do not use the internal package macros.
% \item We best use \cmd{\NameParser} to generate the name in the hooks. It may be possible not to do so, but as we get more customized the user-level parser is a handy way to get reasonably predictable results.
% \item We still recommend using \cmd{\AltFormatActive} if you want to disable the normal effects of \cmd{\CapThis}. Otherwise redefine \cmd{\CapThis} (which is what we do below).
% \end{itemize}
%
%\newif\ifFbox
%\newif\ifFirstCap
%\newif\ifInHook
%\Fboxtrue
% We define three Boolean flags and set one of them true by default. The \texttt{\textbackslash ifFbox} flag takes over the internal function of \texttt{\textbackslash @nameauth@DoAlt}, which is enabled by \cmd{\AltFormatActive}. The \texttt{\textbackslash ifFirstCap} flag takes over the internal function of \texttt{\textbackslash @nameauth@DoCaps}, which is enabled by \cmd{\CapThis}. The \texttt{\textbackslash ifInHook} flag replaces the internal function of \texttt{\textbackslash @nameauth@InHook}, which is enabled by the internal format hook dispatcher.\footnote{A similar version of this example is in \texttt{examples.tex}, collocated with this manual.}
%\begin{quote}\small\setstretch{1.1}
% |\newif\ifFbox|\\
% |\newif\ifFirstCap|\\
% |\newif\ifInHook|\\
% |\Fboxtrue|
%\end{quote}
%
%\renewcommand*\Fbox[1]{\ifFbox\fbox{#1}\else#1\fi}
% The formatting macro is like the new style, except it refers to \texttt{\textbackslash ifFbox}:
%\begin{quote}\small\setstretch{1.1}
% |\renewcommand*\Fbox[1]{%|\\
% |  \ifFbox\fbox{#1}\else#1\fi|\\
% |}|
%\end{quote}
%
%\renewcommand*\AltCaps[1]{\ifInHook
%    \ifFirstCap\MakeUppercase{#1}\else#1\fi
%  \else
%    #1\fi}
% Our new \cmd{\AltCaps} works like the built-in version, except it does not use the internal macros and flags:
%\begin{quote}\small\setstretch{1.1}
% |\renewcommand*\AltCaps[1]{%|\\
% |  \ifInHook|\\
% |    \ifFirstCap\MakeUppercase{#1}\else#1\fi|\\
% |  \else|\\
% |    #1%|\\
% |  \fi|\\
% |}|
%\end{quote}
%
%\renewcommand*\CapThis{\FirstCaptrue}
%\renewcommand*\NamesFormat[1]
%{\InHooktrue\NameParser\InHookfalse\global\FirstCapfalse}
%\renewcommand*\MainNameHook[1]
%{\Fboxfalse\InHooktrue\NameParser\InHookfalse\global\FirstCapfalse\Fboxtrue}
%\let\FrontNamesFormat\Namesformat
%\let\FrontNameHook\MainNameHook
% Here we redefine \cmd{\CapThis} to use our flag instead of the internal flag:
%\begin{quote}\small\setstretch{1.1}
% |\renewcommand*\CapThis{\FirstCaptrue}|
%\end{quote}
%
% We have to do in our own hooks what the naming macros do internally in order to get the same exit conditions. In the new style, we do not have to define \cmd{\NamesFormat}. Here we have to define everything: 
%\begin{quote}\small\setstretch{1.1}
% |\renewcommand*\NamesFormat[1]|\\
% |{%|\\
% |  \InHooktrue\NameParser\InHookfalse%|\\
% |  \global\FirstCapfalse%|\\
% |}|
%\end{quote}
%
% Instead of using just \cmd{\AltOff} before \cmd{\NameParser} below, we have to add a few extras in order to mimic the functions of the internal flags:
%\begin{quote}\small\setstretch{1.1}
% |\renewcommand*\MainNameHook[1]|\\
% |{%|\\
% |  \Fboxfalse\InHooktrue\NameParser\InHookfalse%|\\
% |  \global\FirstCapfalse\Fboxtrue%|\\
% |}|
%\end{quote}
%\clearpage
%
% We avoid spurious index entries in the front matter by using the same hooks.
%\begin{quote}\small\setstretch{1.1}
% |\let\FrontNamesFormat\Namesformat|\\
% |\let\FrontNameHook\MainNameHook|
%\end{quote}
%
% Because we use \cmd{\noexpand}, our ``old-style'' macros will index the name below under the same entry as the ``new-style'' macros.
% \begin{center}\footnotesize
% \begin{tabular}{llll}\toprule
% First & Next & Long & Short \\\midrule
% |\deSmet| & |\deSmet| & |\LdeSmet| & |\SdeSmet|\\
% \ForgetThis\deSmet & \deSmet & \LdeSmet & \SdeSmet\\\bottomrule
% \end{tabular}
% \end{center}
%
% The capitalized version |\CapThis\deSmet| is \CapThis\deSmet. This also works for a formatted use via \cmd{\ForceName}: \ForceName\CapThis\deSmet.\medskip
%
% We can reuse\marginpar{\raggedleft\dbend} new-style names with old-style macros when needed. We show this here in abbreviated fashion. We keep the Boolean flags \texttt{\textbackslash ifFirstCap} and \texttt{\textbackslash ifInHook} from earlier. We also keep the redefined \cmd{\AltCaps}, \cmd{\CapThis}, and \cmd{\NamesFormat}. One might have to make modifications as needed.\footnote{A fuller version of this example is in \texttt{examples.tex}, collocated with this manual.}
%\newif\ifCaps
%\Capstrue
%\renewcommand*\textSC[1]{\ifCaps\textsc{#1}\else#1\fi}
%\renewcommand*\MainNameHook[1]
%{\Capsfalse\InHooktrue\NameParser\InHookfalse\global\FirstCapfalse\Capstrue}
%\let\FrontNameHook\MainNameHook
%\begin{quote}\small\setstretch{1.1}
% |\newif\ifCaps|\\
% |\Capstrue|\\
% |\renewcommand*\textSC[1]{%|\\
% |  \ifCaps\textsc{#1}\else#1\fi|\\
% |}|\\
% |\renewcommand*\MainNameHook[1]|\\
% |{%|\\
% |  \Capsfalse\InHooktrue\NameParser\InHookfalse%|\\
% |  \global\FirstCapfalse\Capstrue%|\\
% |}|\\
% |\let\FrontNameHook\MainNameHook|
%\end{quote}
%
% The names below have the same declarations and index entries as they did above. They look and work the same but use different macros.
% \begin{center}
% \small\noindent\begin{tabular}{llll}\toprule
% First & Next & Long & Short \\\midrule
% \ForgetThis\Adams & \Adams & \LAdams & \SAdams\\
% \ForgetThis\SDJR & \SDJR & \LSDJR & \SSDJR\\
% \ForgetThis\HAR & \HAR & \LHAR & \SHAR\\
% \ForgetThis\Mencius & \Mencius & \LMencius & \SMencius\\\bottomrule
% \end{tabular}
% \end{center}
%
% As earlier, punctuation detection works: \ForceName\LSDJR. Also \LSDJR. Then \ForceName\SDJR. Now \SDJR. \cmd{\ForceName}\cmd{\DropAffix}\cmd{\LSDJR} gives \ForceName\DropAffix\LSDJR. \cmd{\DropAffix}\cmd{\LSDJR} gives \DropAffix\LSDJR. \cmd{\RevComma}\cmd{\LAdams} yields \RevComma\LAdams. \cmd{\ForceName}\cmd{\ForceFN}\cmd{\SHAR} produces \ForceName\ForceFN\SHAR. \cmd{\ForceFN}\cmd{\SHAR} produces \ForceFN\SHAR. If we add \cmd{\CapThis} we get \CapThis\ForceName\ForceFN\SHAR\ and \CapThis\ForceFN\SHAR.
%
% Use names with alternate formatting only when it is active to avoid spurious index entries. We resume normal formatting with \cmd{\AltFormatInactive}.
% \AltFormatInactive\endgroup
%
% {\medskip\noindent\hbox{}\hfill\large Back to Section~\ref{sec:RefTables} \hfill\hbox{}} 
% \clearpage
%
% \subsubsection{Full Redesign}
% \label{sec:NewEngine}
%
% Assuming\marginpar{\small\raggedleft\dbend\dbend} that redefining hooks and adding control sequences is insufficient to your task, you could modify the core naming macros and hook those modifications back into the \textsf{nameauth} package without needing to continuously track and patch the style file itself.
%
% \DescribeMacro{\NameauthName}
% \DescribeMacro{\NameauthLName}
% \DescribeMacro{\NameauthFName}
% These macros are set by default to \cmd{\@nameauth@Name}, the internal name parser. The main and simplified interfaces call them as respective synonyms for \cmd{\Name}, \cmd{\Name*}, and \cmd{\FName}. Should you desire to create your own naming macros, you can redefine them. Here is the minimal working example:
% \begin{quote}\small\setstretch{1.1}
% |\makeatletter|\\
% |\newcommandx*\MyName[3][1=\@empty, 3=\@empty]{|\meta{Name}|}|\\
% |\newcommandx*\MyLName[3][1=\@empty, 3=\@empty]|\\
% |  {|\meta{Long name}|\@nameauth@FullNamefalse}|\\
% |\newcommandx*\MyFName[3][1=\@empty, 3=\@empty]|\\
% |  {|\meta{Short name}|\@nameauth@FirstNamefalse}|\\
% |\makeatother|
% \end{quote}
%
% The macros above do not really work together with the rest of \textsf{nameauth} package, so be careful! You can hook these macros into the user interface thus:
% \begin{quote}\small\setstretch{1.1}
% \makeatletter%
% \newcommandx*\MyName[3][1=\@empty, 3=\@empty]{\meta{Name}}%
% \newcommandx*\MyLName[3][1=\@empty, 3=\@empty]{\meta{Long name}\@nameauth@FullNamefalse}%
% \newcommandx*\MyFName[3][1=\@empty, 3=\@empty]{\meta{Short name}\@nameauth@FirstNamefalse}%
% \makeatother%
% |\renewcommand*\NameauthName{\MyName}|\\
% |\renewcommand*\NameauthLName{\MyLName}|\\
% |\renewcommand*\NameauthFName{\MyFName}|\\
% |\begin{nameauth}|\\
% |  \< Silly & No Particular & Name & >|\\
% |\end{nameauth}|\\
% |This is \Silly, \LSilly, and \SSilly.|\\
% \renewcommand*\NameauthName{\MyName}%
% \renewcommand*\NameauthLName{\MyLName}%
% \renewcommand*\NameauthFName{\MyFName}%
% \begin{nameauth}
%   \< Silly & No Particular & Name & >
% \end{nameauth}
% This is \Silly, \LSilly, and \SSilly.
% \end{quote}
% Like\marginpar{\small\raggedleft\cmd{\global}} \cmd{\NamesFormat}, the other hook macros, and many of the state-changing and triggering macros in this package, these naming macros can be redefined or used locally within a scope without making global changes to the document unless you specifically use \cmd{\global}.
%
% Here we show that \cmd{\NameauthName}, \cmd{\NameauthLName}, and \cmd{\NameauthFName} have reverted back to their original forms. Now |\Name[No Particular]{Name}| and \cmd{\Silly} produce {\IndexInactive\Name[No Particular]{Name} and \Silly.}
% \vfil
% \begin{center}\large \emph{This space intentionally left blank.}\end{center}
% \clearpage
%
% \subsection{Technical Notes}
% \label{sec:notes}
% About the package itself:
% \begin{itemize}\small
% \item We put great weight on being backward-compatible with older versions.
% \item Recent changes aim for simpler work flow, not more features.
% \item The package works with both \texttt{xindy} and \texttt{makeindex}. We recommend \texttt{xindy} for languages whose collating sequences do not map to English.\footnote{\cmd{\PretagName} may not be useful in that case. German \emph{does} map to English: ä, ö, ü, and ß are ae, oe, ue, and ss. Norwegian \emph{does not} map to English: æ, ø, and å come after z.}
% \item We\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} support alternate names in both Western and ``native'' Eastern forms. Mononyms and the older syntax for non-Western names do not support alternate names.
% \item Name\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} output, index entries, and index cross-references are independent modules.
% \item Warnings\marginpar{\large\raggedleft\textsf{\bfseries 3.0}\strut} for the indexing macros are suppressed unless one uses the \texttt{verbose} option. The \texttt{nameauth} environment will continue to emit warnings as needed.
% \item The\marginpar{\large\raggedleft\textsf{\bfseries 2.6}\strut} \texttt{comma} option and the older syntax are no longer restrictive, save with \cmd{\AKA} and its derivatives. See Sections~\ref{sec:obsolete}, \ref{sec:Affix}, and~\ref{sec:AKA}.
% \item No\marginpar{\large\raggedleft\textsf{\bfseries 2.5\strut}} formatting is selected by default. Cf. Sections~\ref{sec:formatting}, \ref{sec:Hooksa}, \ref{sec:Hooksb}, and~\ref{sec:Hooksc}.
% \end{itemize}
% \noindent About the manual:
% \begin{itemize}\small
% \item This manual is compatible with both A4 and US letter formats.
% \item For an index that focuses on using the names, we minimize macro references.
% \item We mention when this manual changes package internals for an example.
% \item The name pattern reference was removed for redundancy and obsolescence.
% \end{itemize}
% About package building:
% \begin{itemize}\small
% \item The \textsf{nameauth} package requires \textsf{etoolbox}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. The \texttt{dtx} file encoding is UTF-8; we cannot guarantee building and using this package on systems that are not Unicode-compliant.
% \item With each release, we test \textsf{nameauth} with dvi-mode \texttt{latex} and with pdf-mode engines \texttt{pdflatex}, \texttt{lualatex}, and \texttt{xelatex} using \texttt{makeindex}. We run the GNU Makefile with the ENGINE=\meta{engine} option.\footnote{The manual is used as the test suite. In dvi mode the manual omits all references to \emph{TikZ} because some dvi display programs (\emph{e.g.} \texttt{dviout}, but not \texttt{xdvi}) will emit errors about bad specials even if one just includes the \textsf{tikz} package. The \emph{TikZ} diagrams herein will appear as blank space in that case. This does not affect \textsf{nameauth} proper.}
% \item This package was built with \ifxetex\texttt{xelatex}\else
%     \ifluatex\ifpdf\texttt{lualatex} in \texttt{pdf} mode\else
%     \texttt{lualatex} in \texttt{dvi} mode\fi
%     \else\ifpdf\texttt{pdflatex}\else
%     \texttt{latex}\fi\fi\fi. This item changes per \LaTeX\ engine.
% \item This package is tested on Ubuntu Linux and Windows 7 (both vanilla \TeX\ Live). Cygwin provides \texttt{make} on Windows. The \texttt{pdflatex} version of this package is released from the Ubuntu platform to CTAN.
% \end{itemize}
% \clearpage
%
% \subsection{Errors and Warnings}
% \label{sec:error}
%
% Here are some ways to avoid common errors:
%
% \begin{itemize}\small
% \item Keep it simple! Avoid unneeded macros and use the simplified interface.
% \item Check braces and brackets with naming macros to avoid errors like ``Paragraph ended\dots'' and ``Missing \meta{grouping token} inserted.''
% \item Do not apply a formatting macro to an entire comma-delimited \meta{SNN, affix} pair. Format each part separately.
% \item Consider using \cmd{\PretagName} with all names containing control sequences or active Unicode; see Section~\ref{sec:IndexSort}.
% \item One way to spot errors is to compare index entries with names in the body text. All macros that produce output also emit meaningful warnings.
% \end{itemize}
% The older syntax presents its own group of potential errors:
% \begin{itemize}\small{\IndexInactive
% \item Erroneously typing |\Name[Henry]{VIII}| prints ``\Name*[Henry]{VIII}'' and ``\Name[Henry]{VIII},'' as well as producing a malformed index entry.
% \item Avoid forms like |\Name[Henry]{VIII}[Tudor]| which gives ``\Name*[Henry]{VIII}[Tudor]'' and ``\Name[Henry]{VIII}[Tudor].'' That is a Western alternate name form, which is incorrect.}
% \item The older syntax will not work with some macros. The comma-suffixed form does work with those macros. See Section~\ref{sec:AKA}.
% \end{itemize}
% Warnings result from the following:
% \begin{itemize}\small
% \item Using the \texttt{nameauth} environment to redefine shorthands or define shorthands that collide with extant macros generates warning because that could result in unwanted behavior like unexpected name forms and index entries. The following will create a warning for such reasons:\\[1ex]
% |\PretagName[E.\,B.]{White}{White, E. B.}|\dots\\[1ex]
% |\begin{nameauth}|\\\IndexName[E.\,B.]{White}\ignorespaces
% |  \< White & E.\,B. & White & >|\\
% |  \< White & E. B. & White & >|\\
% |\end{nameauth}|\\[1ex]
% Sometimes dedefinition is harmless because it produces no unwanted results. It is up to the user to consider these warnings.
% \item Use the \texttt{verbose} option for warnings from the indexing macros.
% \item Using an index cross-reference name as a page entry. Nothing will happen.
% \item Creating the same cross-reference multiple times. Nothing will happen.
% \item Creating a page reference after a cross-reference has been created or after you have used \cmd{\ExcludeName}. Nothing happens until you use a variant of \cmd{\Includename}.
% \item Using \cmd{\TagName} and \cmd{\UntagName} on cross-references. Nothing will happen.
% \item Using \cmd{\PretagName} with cross-references will create sorting tags for them, but also will generate ``informational warnings'' only if the \texttt{verbose} option is selected.
% \item Using \cmd{\ExcludeName} with cross-references. Nothing will happen.
% \item Using \cmd{\ExcludeName} to exclude a name that has already been excluded. Likewise, it will do nothing.
% \end{itemize}
%
% \StopEventually{^^A
%  \clearpage
%  \newgeometry{textwidth=147mm,textheight=237mm,right=25mm}
%  \PrintChanges\clearpage\PrintIndex
% }
%
% \section{Implementation}
%
% \iffalse
%<*package>
% \fi
% \small
% \subsection{Flags and Registers}
%
% The flags below are grouped according to general function. We begin with flow control\medskip
%
% \noindent{\large\bfseries Who Called Me?}\\[0.5ex]
% These values are used by the format hook dispatcher \cmd{\@nameauth@Hook} and the hook macros to determine if they have been called by either \cmd{\@nameauth@Name}, \cmd{\AKA}, or \cmd{\IndexRef}, respectively. Those macros set these flags. On their use, see also Sections~\ref{sec:Hooksb} and ~\ref{sec:Hooksc}.
%    \begin{macrocode}
\newif\if@nameauth@InAKA
\newif\if@nameauth@InName
\newif\if@nameauth@Xref
%    \end{macrocode}
% As an aside, \cmd{\AKA} will invoke \cmd{\NamesFormat} or \cmd{\FrontNamesFormat} if the \texttt{alwaysformat} option is set. Otherwise it will invoke \cmd{\MainNameHook} or \cmd{\FrontNameHook}.\medskip
%
% \noindent{\large\bfseries Core Macro Lock}\\[0.5ex]
% The macros \cmd{\@nameauth@Name} and \cmd{\AKA}, with some auxiliary macros, process names in a ``locked'' state. These flags prevent a stack overflow. See also Sections~\ref{sec:Hooksb} and ~\ref{sec:Hooksc}.
%    \begin{macrocode}
\newif\if@nameauth@Lock
\newif\if@nameauth@InHook
%    \end{macrocode}\smallskip
%
% \noindent{\large\bfseries Indexing}\\[0.5ex]
% As the naming macros have locks, so do the indexing macros. These locks permit or prevent both indexing and tags. \cmd{\IndexActive} and \cmd{\IndexInctive} or the \texttt{index} and \texttt{noindex} options toggle the first flag; \cmd{\SkipIndex} toggles the second. \cmd{\JustIndex} toggles the third, which makes the core naming engine act like a call to \cmd{\IndexName}:
%    \begin{macrocode}
\newif\if@nameauth@DoIndex
\newif\if@nameauth@SkipIndex
\newif\if@nameauth@JustIndex
%    \end{macrocode}
% The \texttt{pretag} and \texttt{nopretag} options toggle the value below, which allows or prevents the insertion of sort keys.
%    \begin{macrocode}
\newif\if@nameauth@Pretag
%    \end{macrocode}
% Theis flag determines whether \cmd{\IndexRef} creates a \emph{see} reference or a \emph{see also} reference.
%    \begin{macrocode}
\newif\if@nameauth@SeeAlso
%    \end{macrocode}\smallskip
%
% \noindent{\large\bfseries Formatting}\\[0.5ex]
% \cmd{\NamesActive} and \cmd{\NamesInactive}, with the \texttt{mainmatter} and \texttt{frontmatter}, options toggle formatting hooks via \texttt{\textbackslash if@nameauth@MainFormat}. \texttt{\textbackslash if@nameauth@AKAFormat} permits \cmd{\AKA} to call the first-use hooks once.
%    \begin{macrocode}
\newif\if@nameauth@MainFormat
\newif\if@nameauth@AKAFormat
%    \end{macrocode}
% The next flag works with \cmd{\LocalNames} and \cmd{\GlobalNames}.
%    \begin{macrocode}
\newif\if@nameauth@LocalNames
%    \end{macrocode}\medskip
% These two flags trigger \cmd{\ForgetName} and \cmd{\SubvertName} within \cmd{\@nameauth@Name}.
%    \begin{macrocode}
\newif\if@nameauth@Forget
\newif\if@nameauth@Subvert
%    \end{macrocode}\medskip
% \texttt{\textbackslash if@nameauth@FirstFormat} triggers the first-use hooks to be called; otherwise the second-use hooks are called. Additionally, \texttt{\textbackslash if@nameauth@AlwaysFormat} forces this true, except when \texttt{\textbackslash if@nameauth@AKAFormat} is false.
%    \begin{macrocode}
\newif\if@nameauth@FirstFormat
\newif\if@nameauth@AlwaysFormat
%    \end{macrocode}\clearpage
%
% \noindent Next we move from general flow control to specific modification of name forms.\medskip
%
% \noindent{\large\bfseries Affix Commas}\\[0.5ex]
% The \texttt{comma} and \texttt{nocomma} options toggle the flag value below. \cmd{\ShowComma} and \cmd{\NoComma} respectively toggle the second and third.
%    \begin{macrocode}
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
\newif\if@nameauth@NoComma
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Name Breaking}\\[0.5ex]
% \cmd{\KeepAffix} toggles the first flag below, while \cmd{\KeepName} toggles the second. Both affect the use of non-breaking spaces in the text.
%    \begin{macrocode}
\newif\if@nameauth@NBSP
\newif\if@nameauth@NBSPX
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Detect Punctuation}\\[0.5ex]
% This Boolean value is used to prevent double full stops at the end of a name in the text.
%    \begin{macrocode}
\newif\if@nameauth@Punct
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Long and Short Names}\\[0.5ex]
% \texttt{\textbackslash if@nameauth@FullName} is true for a long name reference. \texttt{\textbackslash if@nameauth@FirstName} disables full-name references and causes only Western forenames to be displayed.
%
% \texttt{\textbackslash if@nameauth@AltAKA} is toggled respectively by \cmd{\AKA} and \cmd{\AKA*} to print a longer or shorter name. \texttt{\textbackslash if@nameauth@OldAKA} forces the pre-3.0 behavior of \cmd{\AKA*}.
%
% \texttt{\textbackslash if@nameauth@ShortSNN} is used with \cmd{\DropAffix} to suppress the affix of a Western name. \texttt{\textbackslash if@nameauth@EastFN} toggles the forced printing of Eastern forenames.
%    \begin{macrocode}
\newif\if@nameauth@FullName
\newif\if@nameauth@FirstName
\newif\if@nameauth@AltAKA
\newif\if@nameauth@OldAKA
\newif\if@nameauth@ShortSNN
\newif\if@nameauth@EastFN
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Eastern Names}\\[0.5ex]
% The next flags values govern name reversing and full surname capitalization. The first of each pair is a global state. The second of each pair is an individual state.
%    \begin{macrocode}
\newif\if@nameauth@RevAll
\newif\if@nameauth@RevThis
\newif\if@nameauth@AllCaps
\newif\if@nameauth@AllThis
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Last-Comma-First}\\[0.5ex]
% This pair of flags deals with Western names reordered in a list according to surname.
%    \begin{macrocode}
\newif\if@nameauth@RevAllComma
\newif\if@nameauth@RevThisComma
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Capitalize First Letter}\\[0.5ex]
% The next flags deal with first-letter capitalization. The first Boolean value is triggered by \cmd{\CapThis} and reset by \cmd{\Name} and \cmd{\AKA}. The second is triggered by \cmd{\@nameauth@UTFtest} when it encounters a Unicode character under NFSS. The third is an ``override switch'' triggered by \cmd{\AccentCapThis} as a fall-back. The fourth prevents the first-letter capping mechanism from interacting with Continental formatting and the fifth toggles it.
%    \begin{macrocode}
\newif\if@nameauth@DoCaps
\newif\if@nameauth@UTF
\newif\if@nameauth@Accent
\newif\if@nameauth@AltFormat
\newif\if@nameauth@DoAlt
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Warning Levels}\\[0.5ex]
% This flag controls how many warnings you get. Defaults to few warnings. Verbose gives you plenty of warnings about cross-references in the index.
%    \begin{macrocode}
\newif\if@nameauth@Verbose
%    \end{macrocode}\medskip
%
% \noindent{\large\bfseries Name Argument Token Registers}\\[0.5ex]
% These three token registers contain the current values of the name arguments passed to \cmd{\Name}, its variants, and the cross-reference fields of \cmd{\AKA}.
%    \begin{macrocode}
\newtoks\@nameauth@toksa%
\newtoks\@nameauth@toksb%
\newtoks\@nameauth@toksc%
%    \end{macrocode}
% These three token registers contain the current values of the name arguments in each line of the \texttt{nameauth} environment.
%    \begin{macrocode}
\newtoks\@nameauth@etoksb%
\newtoks\@nameauth@etoksc%
\newtoks\@nameauth@etoksd%
%    \end{macrocode}
%
% \subsection{Hooks}
% \begin{macro}{\NamesFormat}
% Post-process ``first'' instance of final complete name form in text. See Sections~\ref{sec:formatting} and~\ref{sec:Hooksa}f. Called when both |\@nameauth@MainFormat| and |\@nameauth@FirstFormat| are true.
%    \begin{macrocode}
\newcommand*\NamesFormat{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\MainNameHook}
% \changes{2.4}{2016/03/15}{Added}
% Post-process subsequent instance of final complete name form in main-matter text. See Sections~\ref{sec:formatting} and~\ref{sec:Hooksa}f. Called when |\@nameauth@MainFormat| is true and the Boolean flag |\@nameauth@FirstFormat| is false.
%    \begin{macrocode}
\newcommand*\MainNameHook{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FrontNamesFormat}
% \changes{2.5}{2016/04/06}{Added}
% Post-process ``first'' instance of final complete name form in front-matter text. Called when |\@nameauth@MainFormat| is false and |\@nameauth@FirstFormat| is true.
%    \begin{macrocode}
\newcommand*\FrontNamesFormat{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\FrontNameHook}
% \changes{2.4}{2016/03/15}{Added}
% Post-process subsequent instance of final complete name form in front-matter text. Called when |\@nameauth@MainFormat| is false and |\@nameauth@FirstFormat| is false.
%    \begin{macrocode}
\newcommand*\FrontNameHook{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthName}
% \changes{2.2}{2015/12/01}{Added}
% Hook to create custom naming macros. Usually the three macros below have the same control sequence, but they need not do so if you want something different. See Section~\ref{sec:NewEngine}. Use at your own risk! Changing these macros basically rewrites this package.
%    \begin{macrocode}
\newcommand*\NameauthName{\@nameauth@Name}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthLName}
% \changes{2.3}{2016/01/05}{Added}
% Customization hook called after \cmd{\@nameauth@FullName} is set true. See Section~\ref{sec:NewEngine}.
%    \begin{macrocode}
\newcommand*\NameauthLName{\@nameauth@Name}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthFName}
% \changes{2.2}{2015/12/01}{Added}
% Customization hook called after \cmd{\@nameauth@FirstName} is set true. See Section~\ref{sec:NewEngine}.
%    \begin{macrocode}
\newcommand*\NameauthFName{\@nameauth@Name}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Package Options}
% The following package options interact with many of the prior Boolean values.
%    \begin{macrocode}
\DeclareOption{comma}{\@nameauth@AlwaysCommatrue}
\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
\DeclareOption{mainmatter}{\@nameauth@MainFormattrue}
\DeclareOption{frontmatter}{\@nameauth@MainFormatfalse}
\DeclareOption{formatAKA}{\@nameauth@AKAFormattrue}
\DeclareOption{oldAKA}{\@nameauth@OldAKAtrue}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
\DeclareOption{pretag}{\@nameauth@Pretagtrue}
\DeclareOption{nopretag}{\@nameauth@Pretagfalse}
\DeclareOption{allcaps}{\@nameauth@AllCapstrue}
\DeclareOption{normalcaps}{\@nameauth@AllCapsfalse}
\DeclareOption{allreversed}%
  {\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse}
\DeclareOption{allrevcomma}%
  {\@nameauth@RevAllfalse\@nameauth@RevAllCommatrue}
\DeclareOption{notreversed}%
  {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue}
\DeclareOption{smallcaps}{\renewcommand*\NamesFormat{\scshape}}
\DeclareOption{italic}{\renewcommand*\NamesFormat{\itshape}}
\DeclareOption{boldface}{\renewcommand*\NamesFormat{\bfseries}}
\DeclareOption{noformat}{\renewcommand*\NamesFormat{}}
\DeclareOption{verbose}{\@nameauth@Verbosetrue}
\DeclareOption{altformat}{%
  \@nameauth@AltFormattrue\@nameauth@DoAlttrue}
\ExecuteOptions%
  {nocomma,mainmatter,index,pretag,%
   normalcaps,notreversed,noformat}
\ProcessOptions\relax
%    \end{macrocode}
%
% Now we load the required packages. They facilitate the first/subsequent name uses, the parsing of arguments, and the implementation of starred forms.
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{suffix}
\RequirePackage{trimspaces}
\RequirePackage{xargs}
%    \end{macrocode}
%
% The \textsf{etoolbox} package is essential for processing name control sequences. Using \textsf{xargs} allows the optional arguments to work. Using \textsf{suffix} facilitated the starred form of macros. Finally, \textsf{trimspaces} helps the fault tolerance of name arguments.
%
% \subsection{Internal Macros}
% \label{sec:internal}
%
% \noindent{\large\bfseries Name Control Sequence: Who Am I?}
% \begin{macro}{\@nameauth@Clean}
% Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string used to make a (hopefully) unique control sequence for a name. We can test the existence of that control string to determine first occurrences of a name or cross-reference.
%    \begin{macrocode}
\newcommand*\@nameauth@Clean[1]
  {\expandafter\zap@space\detokenize{#1} \@empty}
%    \end{macrocode}
% \end{macro}\medskip
% \clearpage
%
% \noindent{\large\bfseries Parsing: Root and Suffix}
% \begin{macro}{\@nameauth@Root}
% \changes{1.4}{2012/07/24}{More robust}
% The following two macros return everything before a comma in \meta{SNN}.
%    \begin{macrocode}
\newcommand*\@nameauth@Root[1]{\@nameauth@@Root#1,\\}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@@Root}
% \changes{0.9}{2012/02/10}{Expands}
% \changes{2.0}{2015/11/11}{Trim spaces}
% \changes{3.0}{2016/10/26}{Redesigned}
% \changes{3.2}{2017/03/22}{Renamed}
% Throw out the comma and suffix, return the radix.
%    \begin{macrocode}
\def\@nameauth@@Root#1,#2\\{\trim@spaces{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@TrimTag}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.2}{2017/03/22}{Renamed}
% The following two macros return everything before a vertical bar (\verb+|+) in an index tag.
%    \begin{macrocode}
\newcommand*\@nameauth@TrimTag[1]{\@nameauth@@TrimTag#1|\\}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@@TrimTag}
% \changes{3.0}{2016/10/26}{Added}
% Throw out the bar and suffix, return the radix.
%    \begin{macrocode}
\def\@nameauth@@TrimTag#1|#2\\{#1}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Suffix}
% \changes{0.9}{2012/02/10}{Added}
% The following two macros parse \meta{SNN} into a radix and a comma-delimited suffix, returning only the suffix after a comma in the argument, or nothing.
%    \begin{macrocode}
\newcommand*\@nameauth@Suffix[1]{\@nameauth@@Suffix#1,,\\}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@@Suffix}
% \changes{0.9}{2012/02/10}{Added}
% \changes{1.5}{2013/02/22}{Trim spaces}
% \changes{3.0}{2016/10/26}{New test}
% \changes{3.2}{2017/03/22}{Renamed}
% Throw out the radix; return the suffix with no leading spaces. We use this when printing the suffix.
%    \begin{macrocode}
\def\@nameauth@@Suffix#1,#2,#3\\%
  {\ifx\\#2\\\@empty\else\trim@spaces{#2}\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@GetSuff}
% \changes{3.2}{2017/03/22}{Added}
% The following two macros just grab the suffix for testing if the first non-space character is an active character from \textsf{inputenc}.
%    \begin{macrocode}
\newcommand*\@nameauth@GetSuff[1]{\@nameauth@@GetSuff#1,,\\}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@@GetSuff}
% \changes{3.2}{2017/03/22}{Added}
% Throw out the radix; return the suffix.
%    \begin{macrocode}
\def\@nameauth@@GetSuff#1,#2,#3\\{#2}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Parsing: Capitalization}
% \begin{macro}{\@nameauth@TestToks}
% \phantomsection\label{page:CapSystem}
% \changes{3.2}{2017/03/22}{Added}
% Test if the leading token is the same as the leading token of an active Unicode character, using an \emph{Esszett} (\texttt{ß}) as the control. We only run this macro if we are in the \textsf{inputenc} regime.
%    \begin{macrocode}
\newcommand*\@nameauth@TestToks[1]
{%
  \toks@\expandafter{\@car#1\@nil}%
  \edef\one{\the\toks@}%
  \toks@\expandafter{\@carß\@nil}%
  \edef\two{\the\toks@}%
  \ifx\one\two\@nameauth@UTFtrue\else\@nameauth@UTFfalse\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@UTFtest}
% \phantomsection\label{page:CapSystem}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.1}{2017/01/13}{Override bypasses test}
% \changes{3.2}{2017/03/22}{Non-suffix only}
% Before we attempt at capitalizing anything, we need to determine if we are running under \texttt{xelatex} or \texttt{lualatex} by testing for \cmd{\Umathchar}. Then we see if \textsf{inputenc} is loaded. We set up the comparison and pass off to \cmd{@nameauth@TestToks}.
%    \begin{macrocode}
\newcommand*\@nameauth@UTFtest[1]
{%
  \def\testarg{#1}%
  \ifdefined\Umathchar
    \@nameauth@UTFfalse%
  \else
    \ifdefined\UTFviii@two@octets
      \if@nameauth@Accent
        \@nameauth@UTFtrue\@nameauth@Accentfalse%
      \else
        \expandafter\@nameauth@TestToks\expandafter{\testarg}%
      \fi
    \else
      \@nameauth@UTFfalse%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@UTFtestS}
% \changes{3.2}{2017/03/22}{Added}
% This test is like the one above, but a special case when we have a suffix. We have to do a bit more in the way of expansion to get the comparison to work properly. Moreover, we only use this when the regular suffix macro is not \cmd{\@empty}.
%    \begin{macrocode}
\newcommand*\@nameauth@UTFtestS[1]
{%
  \let\ex\expandafter%
  \ex\def\ex\testarg\ex{\@nameauth@GetSuff{#1}}%
  \ex\toks@\ex\ex\ex{\testarg}%
  \ex\def\ex\test@rg\ex{\the\toks@}%
  \ifdefined\Umathchar
    \@nameauth@UTFfalse%
  \else
    \ifdefined\UTFviii@two@octets
      \if@nameauth@Accent
        \@nameauth@UTFtrue\@nameauth@Accentfalse%
      \else
        \expandafter\@nameauth@TestToks\expandafter{\test@rg}%
      \fi
    \else
      \@nameauth@UTFfalse%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Cap}
% \changes{3.1}{2017/01/13}{Added; old caps gone}
% \changes{3.2}{2017/03/22}{Non-UTF}
% The following two macros cap the first letter of the argument.
%    \begin{macrocode}
\newcommand*\@nameauth@Cap[1]{\@nameauth@C@p#1\\}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@C@p}
% \changes{3.1}{2017/01/13}{Added}
% \changes{3.2}{2017/03/22}{Renamed}
% Helper macro for the one above.
%    \begin{macrocode}
\def\@nameauth@C@p#1#2\\%
  {\expandafter\trim@spaces\expandafter{\MakeUppercase{#1}#2}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@CapUTF}
% \changes{3.2}{2017/03/22}{Added}
% The following two macros cap the first active Unicode letter under \textsf{inputenc}.
%    \begin{macrocode}
\newcommand*\@nameauth@CapUTF[1]{\@nameauth@C@pUTF#1\\}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@C@pUTF}
% \changes{3.1}{2017/01/13}{Added}
% Helper macro for the one above.
%    \begin{macrocode}
\def\@nameauth@C@pUTF#1#2#3\\%
  {\expandafter\trim@spaces\expandafter{\MakeUppercase{#1#2}#3}}
%    \end{macrocode}
% \end{macro}
% \clearpage
%
% \noindent{\large\bfseries Parsing: Punctuation Detection}
% \begin{macro}{\@nameauth@TestDot}
% This macro, based on a snippet by \Name*[Uwe]{Lueck}, checks for a period at the end of its argument. It determines whether we need to call \cmd{\@nameauth@CheckDot} below.
%    \begin{macrocode}
\newcommand*\@nameauth@TestDot[1]
{%
  \def\TestDot##1.\TestEnd##2\\{\TestPunct{##2}}%
  \def\TestPunct##1{%
    \ifx\TestPunct##1\TestPunct%
    \else
      \@nameauth@Puncttrue%
    \fi
  }%
  \@nameauth@Punctfalse%
  \TestDot#1\TestEnd.\TestEnd\\%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@CheckDot}
% We assume that \cmd{\expandafter} precedes the invocation of \cmd{\@nameauth@CheckDot}, which only is called if the terminal character of the input is a period. We evaluate the lookahead \cmd{\@token} while keeping it on the list of input tokens.
%    \begin{macrocode}
\newcommand*\@nameauth@CheckDot%
  {\futurelet\@token\@nameauth@EvalDot}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@EvalDot}
%  If \cmd{\@token} is a full stop, we gobble the token.
%    \begin{macrocode}
\newcommand*\@nameauth@EvalDot%
{%
  \let\@period=.%
  \ifx\@token\@period\expandafter\@gobble \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Error Detection}
% \begin{macro}{\@nameauth@Error}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.01}{2016/10/27}{Fixed}
% One can cause \textsf{nameauth} to halt with an error by leaving a required name argument empty, providing an argument that expands to empty, or creating an empty root within a root/suffix pair.
%    \begin{macrocode}
\newcommand*\@nameauth@Error[2]
{%
  \edef\msga{#2 SNN field empty}%
  \edef\msgb{#2 SNN field malformed}%
  \protected@edef\testname{\trim@spaces{#1}}%
  \protected@edef\testroot{\@nameauth@Root{#1}}%
  \ifx\testname\@empty
    \PackageError{nameauth}{\msga}%
  \fi
  \ifx\testroot\@empty
      \PackageError{nameauth}{\msgb}%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Core Name Engine}
%
% \begin{macro}{\@nameauth@Name}
% \changes{0.85}{2012/02/05}{Hide commas}
% \changes{1.5}{2013/02/22}{Reversing/caps}
% \changes{2.0}{2015/11/11}{Trim spaces; redesign tagging}
% \changes{2.1}{2015/11/24}{Fix Unicode}
% \changes{2.3}{2016/01/05}{Now internal}
% \changes{2.4}{2016/03/15}{Set token regs}
% \changes{2.41}{2016/03/17}{Fix token regs}
% \changes{2.5}{2016/04/06}{Current parsing approach}
% \changes{2.6}{2016/09/19}{Better indexing}
% \changes{3.0}{2016/10/26}{Redesigned}
% \changes{3.1}{2017/01/13}{Enhanced workflow control}
% Here is the heart of the package. \Name*[Marc van]{Dongen} provided the original basic structure. Parsing, indexing, and formatting are more discrete than in earlier versions.
%    \begin{macrocode}
\newcommandx*\@nameauth@Name[3][1=\@empty, 3=\@empty]
{%
%    \end{macrocode}
% Both \cmd{\@nameauth@Name} and \cmd{\AKA} engage the lock below, preventing a stack overflow.
%    \begin{macrocode}
  \unless\if@nameauth@Lock
    \@nameauth@Locktrue%
%    \end{macrocode}
% Tell the formatting mechanism that it is being called from \cmd{\@nameauth@Name}. Then test for malformed input.
%    \begin{macrocode}
    \@nameauth@InNametrue%
    \@nameauth@Error{#2}{macro \string\@nameauth@name}%
%    \end{macrocode}
% If we use \cmd{\JustIndex} then skip everything else..
%    \begin{macrocode}
    \if@nameauth@JustIndex
      \IndexName[#1]{#2}[#3]%
      \@nameauth@InNamefalse%
      \@nameauth@Lockfalse%
      \@nameauth@JustIndexfalse%
    \else
%    \end{macrocode}
% Delete/create name cseq if directed. If the delete flag is set, the create flag is ignored. Ensure that names are printed in horizontal mode. Print the name between two index entries, if allowed.
%    \begin{macrocode}
      \if@nameauth@Forget
        \ForgetName[#1]{#2}[#3]%
      \else
        \if@nameauth@Subvert
          \SubvertName[#1]{#2}[#3]%
        \fi
      \fi
      \leavevmode\hbox{}%
      \unless\if@nameauth@SkipIndex\IndexName[#1]{#2}[#3]\fi
      \if@nameauth@MainFormat
        \@nameauth@Parse[#1]{#2}[#3]{!MN}%
      \else
        \@nameauth@Parse[#1]{#2}[#3]{!NF}%
      \fi
      \unless\if@nameauth@SkipIndex\IndexName[#1]{#2}[#3]\fi
%    \end{macrocode}
% Reset all the ``per name'' Boolean values.
%    \begin{macrocode}
      \@nameauth@SkipIndexfalse%
      \@nameauth@Forgetfalse%
      \@nameauth@Subvertfalse%
      \@nameauth@Lockfalse%
      \@nameauth@InNamefalse%
      \@nameauth@NBSPfalse%
      \@nameauth@NBSPXfalse%
      \@nameauth@DoCapsfalse%
      \@nameauth@Accentfalse%
      \@nameauth@AllThisfalse%
      \@nameauth@ShowCommafalse%
      \@nameauth@NoCommafalse%
      \@nameauth@RevThisfalse%
      \@nameauth@RevThisCommafalse%
      \@nameauth@ShortSNNfalse%
      \@nameauth@EastFNfalse%
    \fi
%    \end{macrocode}
% Close the ``locked'' branch.
%    \begin{macrocode}
  \fi
%    \end{macrocode}
% Call the full stop detection.
%    \begin{macrocode}
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Parse}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.1}{2017/01/13}{Enhanced, integrated caps}
% \changes{3.2}{2017/03/22}{Fix alt. format and Western affixes}
% Parse and print a name in the text. The final required argument is a ``mode designator'' that can be ``!MN'' (main name); ``!NF'' (was ``non-formatted,'' now ``name in front matter''); and ``!PN'' (pseudonym/cross-reference). Both \cmd{\@nameauth@Name} and \cmd{\AKA} call this parser.
%    \begin{macrocode}
\newcommandx*\@nameauth@Parse[4][1=\@empty, 3=\@empty]
{%
  \if@nameauth@Lock
    \let\ex\expandafter%
%    \end{macrocode}
% We want these arguments to expand to \cmd{\@empty} (or not) when we test them.
%    \begin{macrocode}
    \protected@edef\arga{\trim@spaces{#1}}%
    \protected@edef\rootb{\@nameauth@Root{#2}}%
    \protected@edef\suffb{\@nameauth@Suffix{#2}}%
    \protected@edef\argc{\trim@spaces{#3}}%
%    \end{macrocode}
% If global caps. reversing, and commas are true, set the local flags true.
%    \begin{macrocode}
    \if@nameauth@AllCaps\@nameauth@AllThistrue\fi
    \if@nameauth@RevAll\@nameauth@RevThistrue\fi
    \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi
%    \end{macrocode}
% Make (usually) unique control sequence values from the name arguments.
%    \begin{macrocode}
    \def\csb{\@nameauth@Clean{#2}}%
    \def\csbc{\@nameauth@Clean{#2,#3}}%
    \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% Make token register copies of the current name args to be available for the hook macros.
%    \begin{macrocode}
    \@nameauth@toksa\expandafter{#1}%
    \@nameauth@toksb\expandafter{#2}%
    \@nameauth@toksc\expandafter{#3}%
%    \end{macrocode}
% Implement capitalization on demand in the body text if not in Continental mode.
%    \begin{macrocode}
    \if@nameauth@DoCaps
      \let\carga\arga%
      \let\crootb\rootb%
      \let\csuffb\suffb%
      \let\cargc\argc%
      \unless\if@nameauth@AltFormat
%    \end{macrocode}
% We test the first optarg for active Unicode characters. Then we capitalize the first letter. 
%    \begin{macrocode}
        \unless\ifx\arga\@empty
          \def\test{#1}%
          \ex\@nameauth@UTFtest\ex{\test}%
          \if@nameauth@UTF
            \ex\def\ex\carga\ex{\ex\@nameauth@CapUTF\ex{\test}}%
          \else
            \ex\def\ex\carga\ex{\ex\@nameauth@Cap\ex{\test}}%
          \fi
        \fi
%    \end{macrocode}
% We test the root surname for active Unicode characters. Then we capitalize the first letter.
%    \begin{macrocode}
        \def\test{#2}%
        \ex\@nameauth@UTFtest\ex{\test}%
        \if@nameauth@UTF
          \ex\def\ex\crootb\ex{\ex\@nameauth@CapUTF\ex{\rootb}}%
        \else
          \ex\def\ex\crootb\ex{\ex\@nameauth@Cap\ex{\rootb}}%
        \fi
%    \end{macrocode}
% We test the suffix for active Unicode characters. Then we capitalize the first letter.
%    \begin{macrocode}
        \unless\ifx\suffb\@empty
          \def\test{#2}%
          \ex\@nameauth@UTFtestS\ex{\test}%
          \protected@edef\test{\@nameauth@GetSuff{#2}}%
          \if@nameauth@UTF
            \protected@edef\test{\@nameauth@Suffix{#2}}%
            \ex\def\ex\csuffb\ex{\ex\@nameauth@CapUTF\ex{\test}}%
          \else
            \edef\test{\@nameauth@Suffix{#2}}%
            \ex\def\ex\csuffb\ex{\ex\@nameauth@Cap\ex{\test}}%
          \fi
        \fi
%    \end{macrocode}
% We test the final optarg for active Unicode characters. Then we capitalize the first letter. 
%    \begin{macrocode}
        \unless\ifx\argc\@empty
          \def\test{#3}%
          \ex\@nameauth@UTFtest\ex{\test}%
          \if@nameauth@UTF
            \ex\def\ex\cargc\ex{\ex\@nameauth@CapUTF\ex{\test}}%
          \else
            \ex\def\ex\cargc\ex{\ex\@nameauth@Cap\ex{\test}}%
          \fi
        \fi
      \fi
      \let\arga\carga%
      \let\rootb\crootb%
      \let\suffb\csuffb%
      \let\argc\cargc%
    \fi
%    \end{macrocode}
% We capitalize the entire surname when desired; different from above.
%    \begin{macrocode}
    \if@nameauth@AllThis
      \protected@edef\rootb{\MakeUppercase{\@nameauth@Root{#2}}}%
    \fi
%    \end{macrocode}
% Use non-breaking spaces and commas as desired.
%    \begin{macrocode}
    \edef\Space{\space}%
    \edef\SpaceX{\space}%
    \if@nameauth@NBSP\edef\Space{\nobreakspace}\fi
    \if@nameauth@NBSPX\edef\SpaceX{\nobreakspace}\fi
    \unless\ifx\arga\@empty
      \if@nameauth@AlwaysComma
        \edef\Space{,\space}%
        \if@nameauth@NBSP\edef\Space{,\nobreakspace}\fi
      \fi
      \if@nameauth@ShowComma
        \edef\Space{,\space}%
        \if@nameauth@NBSP\edef\Space{,\nobreakspace}\fi
      \fi
      \if@nameauth@NoComma
        \edef\Space{\space}%
        \if@nameauth@NBSP\edef\Space{\nobreakspace}\fi
      \fi
    \fi
%    \end{macrocode}
% We parses names by attaching ``meaning'' to patterns of macro arguments primarily via \cmd{\FNN} and \cmd{\SNN}. Then we call the name printing macros, based on the optional arguments.
%    \begin{macrocode}
    \let\SNN\rootb%
    \ifx\arga\@empty
      \ifx\argc\@empty
%    \end{macrocode}
% When \cmd{\arga}, \cmd{\argc}, and \cmd{\suffb} are empty, we have a mononym. When \cmd{\suffb} is not empty, we have a native Eastern name or non-Western name.
%    \begin{macrocode}
        \let\FNN\suffb%
        \let\SNN\rootb%
        \@nameauth@NonWest{\csb#4}%
      \else
%    \end{macrocode}
% When \cmd{\arga} and \cmd{\suffb} are empty, but \cmd{\argc} is not, we have the older syntax. When \cmd{\arga} is empty, but \cmd{\argc} and \cmd{\suffb} are not, we have alternate names for non-Western names.
%    \begin{macrocode}
        \ifx\suffb\@empty
          \let\FNN\argc%
          \let\SNN\rootb%
          \@nameauth@NonWest{\csbc#4}%
        \else
          \let\FNN\argc%
          \let\SNN\rootb%
          \@nameauth@NonWest{\csb#4}%
        \fi
      \fi
    \else
%    \end{macrocode}
% When \cmd{\arga} is not empty, we have either a Western name or a non-native Eastern name. When \cmd{\argc} is not empty, we use alternate names. When \cmd{\suffb} is not empty we use suffixed forms.
%    \begin{macrocode}
      \ifx\argc\@empty
        \let\FNN\arga%
      \else
        \let\FNN\argc%
      \fi
      \unless\ifx\suffb\@empty
        \def\SNN{\rootb\Space\suffb}%
        \if@nameauth@ShortSNN\let\SNN\rootb\fi
      \fi
      \@nameauth@West{\csab#4}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@NonWest}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.02}{2016/11/01}{Restrict \cmd{\ForceFN}}
% Print non-Western names from \cmd{\@nameauth@name} and \cmd{\AKA}. We inherit internal control sequences from the naming macros and do nothing if called outside them.
%    \begin{macrocode}
\newcommand*\@nameauth@NonWest[1]
{%
  \if@nameauth@Lock
    \unless\ifcsname#1\endcsname
      \@nameauth@FirstFormattrue%
    \fi
    \if@nameauth@InAKA
      \if@nameauth@AltAKA
        \if@nameauth@OldAKA\@nameauth@EastFNtrue\fi
        \@nameauth@FullNamefalse%
        \@nameauth@FirstNametrue%
      \else
        \@nameauth@FullNametrue%
        \@nameauth@FirstNamefalse%
      \fi
    \else
      \unless\ifcsname#1\endcsname
        \@nameauth@FullNametrue%
        \@nameauth@FirstNamefalse%
      \fi
    \fi
    \if@nameauth@FirstName
      \@nameauth@FullNamefalse%
    \fi
    \ifx\FNN\@empty
      \@nameauth@Hook{\SNN}%
    \else
      \if@nameauth@FullName
        \if@nameauth@RevThis
          \@nameauth@Hook{\FNN\Space\SNN}%
        \else
          \@nameauth@Hook{\SNN\Space\FNN}%
        \fi
      \else
        \if@nameauth@FirstName
          \if@nameauth@EastFN
            \@nameauth@Hook{\FNN}%
          \else
            \@nameauth@Hook{\SNN}%
          \fi
        \else
          \@nameauth@Hook{\SNN}%
        \fi
      \fi
    \fi
    \unless\ifcsname#1\endcsname
      \unless\if@nameauth@InAKA\csgdef{#1}{}\fi
    \fi
    \@nameauth@FullNamefalse%
    \@nameauth@FirstNamefalse%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@West}
% \changes{3.0}{2016/10/26}{Added}
% Print Western names and ``non-native'' Eastern names from \cmd{\@nameauth@name} and \cmd{\AKA}. We inherit internal control sequences from the naming macros and do nothing if called outside them.
%    \begin{macrocode}
\newcommand*\@nameauth@West[1]
{%
  \if@nameauth@Lock
    \unless\ifcsname#1\endcsname
      \@nameauth@FirstFormattrue%
    \fi
    \if@nameauth@InAKA
      \if@nameauth@AltAKA
        \@nameauth@FullNamefalse%
        \@nameauth@FirstNametrue%
      \else
        \@nameauth@FullNametrue%
        \@nameauth@FirstNamefalse%
      \fi
    \else
      \unless\ifcsname#1\endcsname
        \@nameauth@FullNametrue%
        \@nameauth@FirstNamefalse%
      \fi
    \fi
    \if@nameauth@FirstName
      \@nameauth@FullNamefalse%
    \fi
    \if@nameauth@FullName
      \if@nameauth@RevThis
        \@nameauth@Hook{\SNN\SpaceX\FNN}%
      \else
        \if@nameauth@RevThisComma
          \edef\RevSpace{,\SpaceX}%
          \@nameauth@Hook{\SNN\RevSpace\FNN}%
        \else
          \@nameauth@Hook{\FNN\SpaceX\SNN}%
        \fi
      \fi
    \else
      \if@nameauth@FirstName
        \@nameauth@Hook{\FNN}%
      \else
        \@nameauth@Hook{\rootb}%
      \fi
    \fi
    \unless\ifcsname#1\endcsname
      \unless\if@nameauth@InAKA\csgdef{#1}{}\fi
    \fi
    \@nameauth@FullNamefalse%
    \@nameauth@FirstNamefalse%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Format Hook Dispatcher}
% \begin{macro}{\@nameauth@Hook}
% \changes{2.4}{2016/03/15}{Current form}
% \changes{2.5}{2016/04/06}{Improve hooks}
% \changes{3.0}{2016/10/26}{Fix punct. detection}
% Flags help the dispatcher invoke the correct formatting hooks. The flags control which hook is called (first/subsequent use, name type). The first set of tests handles formatting within \cmd{\AKA}. The second set of tests handles regular name formatting.
%    \begin{macrocode}
\newcommand*\@nameauth@Hook[1]
{%
  \if@nameauth@Lock
    \@nameauth@InHooktrue%
    \protected@edef\test{#1}%
    \expandafter\@nameauth@TestDot\expandafter{\test}%
    \if@nameauth@InAKA
      \if@nameauth@AlwaysFormat
        \@nameauth@FirstFormattrue%
      \else
        \unless\if@nameauth@AKAFormat
        \@nameauth@FirstFormatfalse\fi
      \fi
      \if@nameauth@MainFormat
        \if@nameauth@FirstFormat
          \bgroup\NamesFormat{#1}\egroup%
        \else
          \bgroup\MainNameHook{#1}\egroup%
        \fi
      \else
        \if@nameauth@FirstFormat
          \bgroup\FrontNamesFormat{#1}\egroup%
        \else
          \bgroup\FrontNameHook{#1}\egroup%
        \fi
      \fi
    \else
      \if@nameauth@AlwaysFormat
        \@nameauth@FirstFormattrue%
      \fi
      \if@nameauth@MainFormat
        \if@nameauth@FirstFormat
          \bgroup\NamesFormat{#1}\egroup%
        \else
          \bgroup\MainNameHook{#1}\egroup%
        \fi
      \else
        \if@nameauth@FirstFormat
          \bgroup\FrontNamesFormat{#1}\egroup%
        \else
          \bgroup\FrontNameHook{#1}\egroup%
        \fi
      \fi
    \fi
    \@nameauth@FirstFormatfalse%
    \@nameauth@InHookfalse%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Indexing Internals}
% \begin{macro}{\@nameauth@Index}
% \changes{0.94}{2012/02/15}{Added}
% \changes{2.0}{2015/11/11}{New tagging}
% If the indexing flag is true, create an index entry, otherwise do nothing. Add tags automatically if they exist.
%    \begin{macrocode}
\newcommand*\@nameauth@Index[2]
{%
  \def\cseq{#1}%
  \let\ex\expandafter%
  \ifcsname\cseq!TAG\endcsname
    \protected@edef\Tag{\csname#1!TAG\endcsname}%
    \ex\def\ex\ShortTag\ex{\ex\@nameauth@TrimTag\ex{\Tag}}%
  \fi
  \if@nameauth@DoIndex
    \ifcsname\cseq!TAG\endcsname
      \ifcsname\cseq!PRE\endcsname
        \if@nameauth@Xref%
          \index%
          {\csname\cseq!PRE\endcsname#2\ShortTag}%
        \else
          \index%
          {\csname\cseq!PRE\endcsname#2\csname\cseq!TAG\endcsname}%
        \fi
      \else
        \if@nameauth@Xref
          \index{#2\ShortTag}%
        \else
          \index{#2\csname\cseq!TAG\endcsname}%
        \fi
      \fi
    \else
      \ifcsname\cseq!PRE\endcsname
        \index{\csname\cseq!PRE\endcsname#2}%
      \else
        \index{#2}%
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Actual}
% \changes{2.0}{2015/11/11}{Added}
% This sets the ``actual'' character used by \textsf{nameauth} for index sorting.
%    \begin{macrocode}
\newcommand*\@nameauth@Actual{@}
%    \end{macrocode}
% \end{macro}
%
% \subsection{User Interface Macros}
% \noindent{\large\bfseries Syntactic Formatting\,---\,Capitalization}
% \begin{macro}{\CapThis}
% \changes{0.94}{2012/02/15}{Added}
% Tells the root capping macro to cap the first character. This excludes \cmd{\CapName}.
%    \begin{macrocode}
\newcommand*\CapThis{\@nameauth@DoCapstrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AccentCapThis}
% \changes{2.1}{2015/11/24}{Added}
% Overrides the automatic test for active Unicode characters. This is a fall-back in case the automatic test for active Unicode characters fails.
%    \begin{macrocode}
\newcommand*\AccentCapThis%
  {\@nameauth@Accenttrue\@nameauth@DoCapstrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\CapName}
% \changes{1.5}{2013/02/22}{Added}
% Capitalize entire required name. \cmd{\CapThis} overrides this.
%    \begin{macrocode}
\newcommand*\CapName{\@nameauth@AllThistrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AllCapsInactive}
% Turn off global surname capitalization. \cmd{\CapThis} overrides this.
% \changes{1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*\AllCapsInactive{\@nameauth@AllCapsfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AllCapsActive}
% \changes{1.5}{2013/02/22}{Added}
% Turn on global surname capitalization. \cmd{\CapThis} overrides this.
%    \begin{macrocode}
\newcommand*\AllCapsActive{\@nameauth@AllCapstrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Syntactic Formatting\,---\,Reversing}
% \begin{macro}{\RevName}
% \changes{1.5}{2013/02/22}{Added}
% Reverse name order.
%    \begin{macrocode}
\newcommand*\RevName{\@nameauth@RevThistrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseInactive}
% Turn off global name reversing.
% \changes{1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*\ReverseInactive{\@nameauth@RevAllfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseActive}
% Turn on global name reversing.
% \changes{1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*\ReverseActive{\@nameauth@RevAlltrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ForceFN}
% Force the printing of an Eastern forename in the text, but only when using the ``short name'' macro \cmd{\FName} and the S-modifier.
% \changes{3.0}{2016/10/26}{Added}
%    \begin{macrocode}
\newcommand*\ForceFN{\@nameauth@EastFNtrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Syntactic Formatting\,---\,Reversing with Commas}
% \begin{macro}{\RevComma}
% \changes{1.5}{2013/02/22}{Added}
% Last name, comma, first name.
%    \begin{macrocode}
\newcommand*\RevComma%
  {\@nameauth@RevThisCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseCommaInactive}
% Turn off global ``last-name-comma-first.''
% \changes{1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*\ReverseCommaInactive%
  {\@nameauth@RevAllCommafalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseCommaActive}
% Turn on global ``last-name-comma-first.''
% \changes{1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*\ReverseCommaActive%
  {\@nameauth@RevAllCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Alternate Syntactic Formatting}
% \phantomsection\label{page:hooks}
% \begin{macro}{\AltFormatActive}
% \changes{3.1}{2017/01/13}{Added}
% Turn on alternate formatting.
%    \begin{macrocode}
\newcommand*\AltFormatActive{%
  \global\@nameauth@AltFormattrue%
  \global\@nameauth@DoAlttrue%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AltFormatActive*}
% \changes{3.1}{2017/01/13}{Added}
% Turn on alternate formatting.
%    \begin{macrocode}
\WithSuffix{\newcommand*}\AltFormatActive*{%
  \global\@nameauth@AltFormattrue%
  \global\@nameauth@DoAltfalse%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AltFormatInactive}
% Turn off alternate formatting.
% \changes{3.1}{2017/01/13}{Added}
%    \begin{macrocode}
\newcommand*\AltFormatInactive{%
  \global\@nameauth@AltFormatfalse%
  \global\@nameauth@DoAltfalse%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AltOn}
% Locally turn on alternate formatting.
% \changes{3.1}{2017/01/13}{Added}
%    \begin{macrocode}
\newcommand*\AltOn{%
  \if@nameauth@InHook
    \if@nameauth@AltFormat\@nameauth@DoAlttrue\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AltOff}
% Locally turn off alternate formatting.
% \changes{3.1}{2017/01/13}{Added}
%    \begin{macrocode}
\newcommand*\AltOff{%
  \if@nameauth@InHook
    \if@nameauth@AltFormat\@nameauth@DoAltfalse\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AltCaps}
% \changes{3.1}{2017/01/13}{Added}
% Alternate discretionary capping macro triggered by \cmd{\CapThis}.
%    \begin{macrocode}
\newcommand*\AltCaps[1]{%
  \if@nameauth@InHook
    \if@nameauth@DoCaps\MakeUppercase{#1}\else#1\fi
  \else#1%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textSC}
% \changes{3.1}{2017/01/13}{Added}
% Alternate formatting macro: small caps when active.
%    \begin{macrocode}
\newcommand*\textSC[1]{%
  \if@nameauth@DoAlt\textsc{#1}\else#1\fi}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\textUC}
% \changes{3.1}{2017/01/13}{Added}
% Alternate formatting macro: uppercase when active.
%    \begin{macrocode}
\newcommand*\textUC[1]{%
  \if@nameauth@DoAlt\MakeUppercase{#1}\else#1\fi}
%    \end{macrocode}
% \end{macro}
%  
% \begin{macro}{\textIT}
% \changes{3.1}{2017/01/13}{Added}
% Alternate formatting macro: italic when active.
%    \begin{macrocode}
\newcommand*\textIT[1]{%
  \if@nameauth@DoAlt\textit{#1}\else#1\fi}
%    \end{macrocode}
% \end{macro}
%  
% \begin{macro}{\textBF}
% \changes{3.1}{2017/01/13}{Added}
% Alternate formatting macro: boldface when active.
%    \begin{macrocode}
\newcommand*\textBF[1]{%
  \if@nameauth@DoAlt\textbf{#1}\else#1\fi}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Syntactic Formatting\,---\,Affixes}
% \begin{macro}{\ShowComma}
% \changes{1.4}{2012/07/24}{Added}
% Put comma between name and suffix one time.
%    \begin{macrocode}
\newcommand*\ShowComma{\@nameauth@ShowCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NoComma}
% \changes{2.6}{2016/09/19}{Added}
% Remove comma between name and suffix one time (with \texttt{comma} option).
%    \begin{macrocode}
\newcommand*\NoComma{\@nameauth@NoCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DropAffix}
% \changes{3.0}{2016/10/26}{Added}
% Suppress the affix in a long Western name.
%    \begin{macrocode}
\newcommand*\DropAffix{\@nameauth@ShortSNNtrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\KeepAffix}
% \changes{1.9}{2015/07/09}{Added}
% Trigger a name-suffix pair to be separated by a non-breaking space.
%    \begin{macrocode}
\newcommand*\KeepAffix{\@nameauth@NBSPtrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\KeepName}
% \changes{3.1}{2017/01/13}{Added}
% Use non-breaking spaces between name syntactic forms.
%    \begin{macrocode}
\newcommand*\KeepName{\@nameauth@NBSPtrue\@nameauth@NBSPXtrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Typographic Formatting\,---\,Main Versus Front Matter}
% \begin{macro}{\NamesInactive}
% Switch to the ``non-formatted'' species of names.
%    \begin{macrocode}
\newcommand*\NamesInactive{\@nameauth@MainFormatfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NamesActive}
% Switch to the ``formatted'' species of names.
%    \begin{macrocode}
\newcommand*\NamesActive{\@nameauth@MainFormattrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Typographic Formatting\,---\,First / Subsequent Reference}
% \begin{macro}{\ForgetThis}
% \changes{3.1}{2017/01/13}{Added}
% Have the naming engine \cmd{\@nameauth@Name} call \cmd{\ForgetName} internally.
%    \begin{macrocode}
\newcommand*\ForgetThis{\@nameauth@Forgettrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SubvertThis}
% \changes{3.1}{2017/01/13}{Added}
% Have the naming engine \cmd{\@nameauth@Name} call \cmd{\SubvertName} internally.
%    \begin{macrocode}
\newcommand*\SubvertThis{\@nameauth@Subverttrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ForceName}
% \changes{3.1}{2017/01/13}{Added}
% Set \cmd{\@nameauth@FirstFormat} to be true even for subsequent name uses. Works for one name only.
%    \begin{macrocode}
\newcommand*\ForceName{\@nameauth@FirstFormattrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Name Occurrence Tweaks}
% \begin{macro}{\LocalNames}
% \changes{2.3}{2016/01/05}{Added}
% \changes{2.4}{2016/03/15}{Ensure global}
% \cmd{\LocalNames} sets |@nameauth@LocalNames| true so \cmd{\ForgetName} and \cmd{\SubvertName} do not affect both formatted and unformatted naming systems.
%    \begin{macrocode}
\newcommand*\LocalNames{\global\@nameauth@LocalNamestrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\GlobalNames}
% \changes{2.3}{2016/01/05}{Added}
% \changes{2.4}{2016/03/15}{Ensure global}
% \cmd{\GlobalNames} sets |@nameauth@LocalNames| false. This restores the default behavior of \cmd{\ForgetName} and \cmd{\SubvertName}.
%    \begin{macrocode}
\newcommand*\GlobalNames{\global\@nameauth@LocalNamesfalse}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Index Operations}
% \begin{macro}{\IndexInactive}
% \changes{0.94}{2012/02/15}{Added}
% Turn off global indexing of names.
%    \begin{macrocode}
\newcommand*\IndexInactive{\@nameauth@DoIndexfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SkipIndex}
% \changes{3.1}{2017/01/13}{Added}
% Turn off the next instance of indexing in \cmd{\Name}, \cmd{\FName}, and starred forms.
%    \begin{macrocode}
\newcommand*\SkipIndex{\@nameauth@SkipIndextrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\JustIndex}
% \changes{3.1}{2017/01/13}{Added}
% Makes the next call to \cmd{\Name}, \cmd{\FName}, and starred forms act like \cmd{\IndexName}. Overrides \cmd{\SkipIndex}.
%    \begin{macrocode}
\newcommand*\JustIndex{\@nameauth@JustIndextrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexActive}
% \changes{0.94}{2012/02/15}{Added}
% Turn on global indexing of names.
%    \begin{macrocode}
\newcommand*\IndexActive{\@nameauth@DoIndextrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexActual}
% \changes{2.0}{2015/11/11}{Added}
% Change the ``actual'' character from the default.
%    \begin{macrocode}
\newcommand*\IndexActual[1]
  {\global\renewcommand*\@nameauth@Actual{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SeeAlso}
% \changes{3.0}{2016/10/26}{Added}
% Change the type of cross-reference from a \emph{see} reference to a \emph{see also} reference. Works once per xref, unless one uses \cmd{\Include*}, in which case, take care!
%    \begin{macrocode}
\newcommand*\SeeAlso{\@nameauth@SeeAlsotrue}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Hook Macro Name Parser}
% \phantomsection\label{page:parser}
% \begin{macro}{\NameParser}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.03}{2016/11/01}{First name only with ``short'' macros}
% \changes{3.1}{2017/01/13}{Older syntax fixed; NBSP added}
% \changes{3.2}{2017/03/22}{Fix alt. format and Western affixes}
% Generate a name form based on the current state of the \textsf{nameauth} macros in the locked path. Available for use only in the hook macros.
%    \begin{macrocode}
\newcommand*\NameParser
{%
  \if@nameauth@InHook
    \let\SNN\rootb%
    \ifx\arga\@empty
%    \end{macrocode}
%  If the first optarg is empty, it is a non-Western name. The forename will be either the suffix or the final optarg.
%    \begin{macrocode}
      \ifx\argc\@empty
        \let\FNN\suffb%
      \else
        \let\FNN\argc%
      \fi
      \ifx\suffb\@empty
%    \end{macrocode}
%  Mononym case
%    \begin{macrocode}
        \ifx\FNN\@empty
          \SNN%
        \else
%    \end{macrocode}
%  Eastern or ancient name, using the older syntax, with name reversing and forcing
%    \begin{macrocode}
          \if@nameauth@FullName%
            \if@nameauth@RevThis
              \FNN\Space\SNN%
            \else
              \SNN\Space\FNN%
            \fi
          \else
            \if@nameauth@FirstName
              \if@nameauth@EastFN
                \FNN%
              \else
                \SNN%
              \fi
            \else
              \SNN%
            \fi
          \fi
        \fi
      \else
%    \end{macrocode}
%  Eastern or ancient name, using the new syntax, with name reversing and forcing
%    \begin{macrocode}
        \if@nameauth@FullName
          \if@nameauth@RevThis
            \FNN\Space\SNN%
          \else
            \SNN\Space\FNN%
          \fi
        \else
          \if@nameauth@FirstName
            \if@nameauth@EastFN
              \FNN%
            \else
              \SNN%
            \fi
          \else
            \SNN%
          \fi
        \fi
      \fi
    \else
%    \end{macrocode}
%  Western name with name reversing and suffixes
%    \begin{macrocode}
      \ifx\argc\@empty
        \let\FNN\arga%
      \else
        \let\FNN\argc%
      \fi
      \unless\ifx\suffb\@empty
        \def\SNN{\rootb\Space\suffb}%
        \if@nameauth@ShortSNN\let\SNN\rootb\fi%
      \fi
      \if@nameauth@FullName
        \if@nameauth@RevThis
          \SNN\SpaceX\FNN%
        \else
          \if@nameauth@RevThisComma
            \SNN\RevSpace\FNN%
          \else
            \FNN\SpaceX\SNN%
          \fi
        \fi
      \else
        \if@nameauth@FirstName
          \FNN%
        \else
          \let\SNN\rootb%
          \SNN%
        \fi
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Traditional Naming Interface}
% \begin{macro}{\Name}
% \changes{2.3}{2016/01/05}{Interface macro}
% \cmd{\Name} calls \cmd{\NameauthName}, the interface hook.
%    \begin{macrocode}
\newcommand\Name{\NameauthName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Name*}
% \changes{2.3}{2016/01/05}{Interface macro}
% \cmd{\Name*} sets up a long name reference and calls \cmd{\NameauthLName}, the interface hook.
%    \begin{macrocode}
\WithSuffix{\newcommand*}\Name*%
  {\@nameauth@FullNametrue\NameauthLName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName}
% \changes{0.9}{2012/02/10}{Added}
% \changes{2.3}{2016/01/05}{Interface macro}
% \cmd{\FName} sets up a short name reference and calls \cmd{\NameauthFName}, the interface hook.
%    \begin{macrocode}
\newcommand\FName{\@nameauth@FirstNametrue\NameauthFName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName*}
% \changes{2.3}{2016/01/05}{Interface macro}
% \cmd{\FName} and \cmd{\FName*} are identical in function.
%    \begin{macrocode}
\WithSuffix{\newcommand*}\FName*%
  {\@nameauth@FirstNametrue\NameauthFName}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Index Operations}
% \begin{macro}{\IndexName}
% \changes{0.75}{2012/01/19}{Has current args}
% \changes{0.85}{2012/02/05}{Hide commas}
% \changes{1.26}{2012/04/24}{Affixes now correct}
% \changes{2.0}{2015/11/11}{Fix spaces, tagging}
% \changes{2.6}{2016/09/19}{Fix commas}
% \changes{3.0}{2016/10/26}{Redesigned}
% \changes{3.1}{2017/01/13}{Better tests}
% This creates an index entry with page references. It issues warnings if the \texttt{verbose} option is selected. It prints nothing. First we make copies of the arguments.
%    \begin{macrocode}
\newcommandx*\IndexName[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\rootb{\@nameauth@Root{#2}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
%  Test for malformed input.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IndexName}%
%    \end{macrocode}
% We create the appropriate index entries, calling \cmd{\@nameauth@Index} to handle sorting and tagging. We do not create an index entry for a cross-reference (code !PN for pseudonym), used by \cmd{\IndexRef}, \cmd{\Excludename}, \cmd{\Includename}, \cmd{\AKA}, and \cmd{\PName}. If the first optarg is empty, it is a non-Western name.
%    \begin{macrocode}
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!PN\endcsname
        \if@nameauth@Verbose
          \PackageWarning{nameauth}%
          {macro \IndexName: XRef: #2 exists}%
        \fi
      \else
        \ifx\suffb\@empty
%    \end{macrocode}
%  mononym or Eastern / ancient name, new syntax
%    \begin{macrocode}
          \@nameauth@Index{\csb}{\rootb}%
        \else
          \@nameauth@Index{\csb}{\rootb\space\suffb}%
        \fi
      \fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \IndexName: XRef: #2 #3 exists}%
          \fi
        \else
%    \end{macrocode}
%  Eastern or ancient name, older syntax
%    \begin{macrocode}
          \@nameauth@Index{\csbc}{\rootb\space\argc}%
        \fi
      \else
        \ifcsname\csb!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \IndexName: XRef: #2 exists}%
          \fi
        \else
%    \end{macrocode}
%  Eastern or ancient name, new syntax, alternate name ignored
%    \begin{macrocode}
          \@nameauth@Index{\csb}{\rootb\space\suffb}%
        \fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \if@nameauth@Verbose
        \PackageWarning{nameauth}%
        {macro \IndexName: XRef: #1 #2 exists}%
      \fi
    \else
%    \end{macrocode}
%  Western name, without and with affix
%    \begin{macrocode}
      \ifx\suffb\@empty
        \@nameauth@Index{\csab}%
        {\rootb,\space\arga}%
      \else
        \@nameauth@Index{\csab}%
        {\rootb,\space\arga,\space\suffb}%
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexRef}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.1}{2017/01/13}{Better tests}
% This creates an index cross-reference that is not already a pseudonym. It prints nothing. First we make copies of the arguments to test them and make parsing decisions.
%    \begin{macrocode}
\newcommandx*\IndexRef[4][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\rootb{\@nameauth@Root{#2}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\target{#4}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
  \let\ex\expandafter%
%    \end{macrocode}
%  Test for malformed input.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IndexRef}%
  \@nameauth@Xreftrue%
%    \end{macrocode}
% We create either \emph{see also} entries or \emph{see} entries. The former are unrestricted. The latter are only created if they do not already exist as main entries.
%    \begin{macrocode}
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!PN\endcsname
        \if@nameauth@Verbose
          \PackageWarning{nameauth}%
          {macro \IndexRef: XRef: #2 exists}%
        \fi
      \else
        \ifx\suffb\@empty
%    \end{macrocode}
%  mononym or Eastern / ancient name, new syntax
%    \begin{macrocode}
          \if@nameauth@SeeAlso
            \@nameauth@Index{\csb}{\rootb|seealso{\target}}%
          \else
            \@nameauth@Index{\csb}{\rootb|see{\target}}%
          \fi
        \else
          \if@nameauth@SeeAlso
            \@nameauth@Index{\csb}{\rootb\space\suffb|seealso{\target}}%
          \else
            \@nameauth@Index{\csb}{\rootb\space\suffb|see{\target}}%
          \fi
        \fi
        \csgdef{\csb!PN}{}%
      \fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \IndexRef: XRef: #2 #3 exists}%
          \fi
        \else
%    \end{macrocode}
%  Eastern or ancient name, older syntax
%    \begin{macrocode}
          \if@nameauth@SeeAlso
            \@nameauth@Index{\csbc}%
              {\rootb\space\argc|seealso{\target}}%
          \else
            \@nameauth@Index{\csbc}%
              {\rootb\space\argc|see{\target}}%
          \fi
          \csgdef{\csbc!PN}{}%
        \fi
      \else
        \ifcsname\csb!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \IndexRef: XRef: #2 exists}%
          \fi
        \else
%    \end{macrocode}
%  Eastern or ancient name, new syntax, alternate name ignored
%    \begin{macrocode}
          \if@nameauth@SeeAlso
            \@nameauth@Index{\csb}%
              {\rootb\space\suffb|seealso{\target}}%
          \else
            \@nameauth@Index{\csb}%
              {\rootb\space\suffb|see{\target}}%
          \fi
          \csgdef{\csb!PN}{}%
        \fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \if@nameauth@Verbose
        \PackageWarning{nameauth}%
        {macro \IndexRef: XRef: #1 #2 exists}%
      \fi
    \else
%    \end{macrocode}
%  Western name, without and with affix
%    \begin{macrocode}
      \ifx\suffb\@empty
        \if@nameauth@SeeAlso
          \@nameauth@Index{\csab}%
          {\rootb,\space\arga|seealso{\target}}%
        \else
          \@nameauth@Index{\csab}%
          {\rootb,\space\arga|see{\target}}%
        \fi
      \else
        \if@nameauth@SeeAlso
          \@nameauth@Index{\csab}%
          {\rootb,\space\arga,\space\suffb|seealso{\target}}%
        \else
          \@nameauth@Index{\csab}%
          {\rootb,\space\arga,\space\suffb|see{\target}}%
        \fi
      \fi
      \csgdef{\csab!PN}{}%
    \fi
  \fi
  \@nameauth@SeeAlsofalse%
  \@nameauth@Xreffalse%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ExcludeName}
% \changes{0.94}{2012/02/15}{Added}
% \changes{2.3}{2016/01/05}{New xref test}
% \changes{3.0}{2016/10/26}{Redesigned}
% This macro prevents a name from being indexed.
%    \begin{macrocode}
\newcommandx*\ExcludeName[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% Below we parse the name arguments and create a non-empty pseudonym macro.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\ExcludeName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \if@nameauth@Verbose
        \ifcsname\csb!MN\endcsname
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #2 exists}%
        \fi
        \ifcsname\csb!NF\endcsname
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #2 exists}%
        \fi
      \fi
      \ifcsname\csb!PN\endcsname
        \if@nameauth@Verbose
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Xref: #2 exists}%
        \fi
      \else
        \csgdef{\csb!PN}{!}%
      \fi
    \else
      \ifx\suffb\@empty
        \if@nameauth@Verbose
          \ifcsname\csbc!MN\endcsname
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 #3 exists}%
          \fi
          \ifcsname\csbc!NF\endcsname
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 #3 exists}%
          \fi
        \fi
        \csgdef{\csbc!PN}{!}%
        \ifcsname\csbc!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Xref: #2 exists}%
          \fi
        \else
          \csgdef{\csbc!PN}{!}%
        \fi
      \else
        \if@nameauth@Verbose
          \ifcsname\csb!MN\endcsname
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 exists}%
          \fi
          \ifcsname\csb!NF\endcsname
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 exists}%
          \fi
        \fi
        \ifcsname\csb!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Xref: #2 exists}%
          \fi
        \else
          \csgdef{\csb!PN}{!}%
        \fi
      \fi
    \fi
  \else
    \if@nameauth@Verbose
      \ifcsname\csab!MN\endcsname
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Reference: #1 #2 exists}%
      \fi
      \ifcsname\csab!NF\endcsname
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Reference: #1 #2 exists}%
      \fi
    \fi
    \ifcsname\csab!PN\endcsname
      \if@nameauth@Verbose
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Xref: #2 exists}%
      \fi
    \else
      \csgdef{\csab!PN}{!}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IncludeName}
% \changes{3.0}{2016/10/26}{Added}
% This macro allows a name to be indexed if it is not a cross-reference.
%    \begin{macrocode}
\newcommandx*\IncludeName[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% Below we parse the name arguments and undefine an ``excluded'' name.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IncludeName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!PN\endcsname
        \edef\testex{\csname\csb!PN\endcsname}%
        \unless\ifx\testex\@empty\global\csundef{\csb!PN}\fi
      \fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!PN\endcsname
          \edef\testex{\csname\csbc!PN\endcsname}%
          \unless\ifx\testex\@empty\global\csundef{\csbc!PN}\fi
        \fi
      \else
        \ifcsname\csb!PN\endcsname
          \edef\testex{\csname\csb!PN\endcsname}%
          \unless\ifx\testex\@empty\global\csundef{\csb!PN}\fi
        \fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \edef\testex{\csname\csab!PN\endcsname}%
      \unless\ifx\testex\@empty\global\csundef{\csab!PN}\fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IncludeName*}
% \changes{3.0}{2016/10/26}{Added}
% \changes{3.1}{2017/01/13}{Fixed}
% This macro allows any name to be indexed, undefining cross-references.
%    \begin{macrocode}
\WithSuffix{\newcommandx*}\IncludeName*[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% Below we parse the name arguments and undefine an xref control sequence.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IncludeName*}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \global\csundef{\csb!PN}%
    \else
      \ifx\suffb\@empty
        \global\csundef{\csbc!PN}%
      \else
        \global\csundef{\csb!PN}%
      \fi
    \fi
  \else
    \global\csundef{\csab!PN}%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PretagName}
% \changes{2.0}{2015/11/11}{Added}
% This creates an index entry tag that is applied before a name.
%    \begin{macrocode}
\newcommandx*\PretagName[4][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We parse the arguments, defining the sort tag control sequences used by\newline \cmd{\@nameauth@Index}.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\PretagName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!PN\endcsname
        \if@nameauth@Verbose
          \PackageWarning{nameauth}%
          {macro \PretagName: tagging xref: #2}%
        \fi
      \fi
      \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \PretagName: tagging xref: #2 #3}%
          \fi
        \fi
        \if@nameauth@Pretag\csgdef{\csbc!PRE}{#4\@nameauth@Actual}\fi
      \else
        \ifcsname\csb!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \PretagName: tagging xref: #2}%
          \fi
        \fi
        \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \if@nameauth@Verbose
        \PackageWarning{nameauth}%
        {macro \PretagName: tagging xref: #1 #2}%
      \fi
    \fi
    \if@nameauth@Pretag\csgdef{\csab!PRE}{#4\@nameauth@Actual}\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\TagName}
% \changes{1.2}{2012/02/25}{Added}
% \changes{1.9}{2015/07/09}{Fix cs collisions}
% \changes{2.0}{2015/11/11}{Redesign tagging}
% This creates an index entry tag for a name that is not used as a cross-reference.
%    \begin{macrocode}
\newcommandx*\TagName[4][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We parse the arguments, defining the index tag control sequences used by\newline \cmd{\@nameauth@Index}.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\TagName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!PN\endcsname
        \if@nameauth@Verbose
          \PackageWarning{nameauth}%
          {macro \TagName: not tagging xref: #2}%
        \fi
      \else
        \csgdef{\csb!TAG}{#4}%
      \fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \TagName: not tagging xref: #2 #3}%
          \fi
        \else
          \csgdef{\csbc!TAG}{#4}%
        \fi
      \else
        \ifcsname\csb!PN\endcsname
          \if@nameauth@Verbose
            \PackageWarning{nameauth}%
            {macro \TagName: not tagging xref: #2}%
          \fi
        \else
          \csgdef{\csb!TAG}{#4}%
        \fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \if@nameauth@Verbose
        \PackageWarning{nameauth}%
        {macro \TagName: not tagging xref: #1 #2}%
      \fi
    \else
      \csgdef{\csab!TAG}{#4}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\UntagName}
% \changes{1.2}{2012/02/25}{Added}
% \changes{1.9}{2015/07/09}{Ensure global undef, fix cs collisions}
% \changes{2.0}{2015/11/11}{Redesign tagging}
% This deletes an index tag.
%    \begin{macrocode}
\newcommandx*\UntagName[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We parse the arguments, undefining the index tag control sequences.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\UntagName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \global\csundef{\csb!TAG}%
    \else
      \ifx\suffb\@empty
        \global\csundef{\csbc!TAG}%
      \else
        \global\csundef{\csb!TAG}%
      \fi
    \fi
  \else
    \global\csundef{\csab!TAG}%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Name Info Data Set: ``Text Tags''}
% \begin{macro}{\NameAddInfo}
% \changes{2.4}{2016/03/15}{Added}
% This creates a control sequence and information associated with a given name, similar to an index tag, but usable in the body text.
%    \begin{macrocode}
\newcommandx\NameAddInfo[4][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\Suff{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We parse the arguments, defining the text tag control sequences.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\NameAddInfo}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \csgdef{\csb!DB}{#4}%
    \else
      \ifx\Suff\@empty
        \csgdef{\csbc!DB}{#4}%
      \else
        \csgdef{\csb!DB}{#4}%
      \fi
    \fi
  \else
    \csgdef{\csab!DB}{#4}%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NameQueryInfo}
% \changes{2.4}{2016/03/15}{Added}
% \changes{3.1}{2017/01/13}{Short macro}
% This prints the information created by \cmd{\NameAddInfo} if it exists.
%    \begin{macrocode}
\newcommandx*\NameQueryInfo[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\Suff{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We parse the arguments, invoking the tag control sequences to expand to their contents.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\NameQueryInfo}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!DB\endcsname\csname\csb!DB\endcsname\fi
    \else
      \ifx\Suff\@empty
        \ifcsname\csbc!DB\endcsname\csname\csbc!DB\endcsname\fi
      \else
        \ifcsname\csb!DB\endcsname\csname\csb!DB\endcsname\fi
      \fi
    \fi
  \else
    \ifcsname\csab!DB\endcsname\csname\csab!DB\endcsname\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NameClearInfo}
% \changes{2.4}{2016/03/15}{Added}
% This deletes a text tag. It has the same structure as \cmd{\UntagName}.
%    \begin{macrocode}
\newcommandx*\NameClearInfo[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\Suff{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We parse the arguments, undefining the text tag control sequences.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\NameClearInfo}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \global\csundef{\csb!DB}%
    \else
      \ifx\Suff\@empty
        \global\csundef{\csbc!DB}%
      \else
        \global\csundef{\csb!DB}%
      \fi
    \fi
  \else
    \global\csundef{\csab!DB}%
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage
%
% \noindent{\large\bfseries Name Decisions}
% \begin{macro}{\IfMainName}
% \changes{2.3}{2016/01/05}{Added}
% This macro expands one path if a main matter name exists, or else the other.
%    \begin{macrocode}
\newcommandx\IfMainName[5][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% Below we parse the name arguments and choose the path.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IfMainName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!MN\endcsname{#4}\else{#5}\fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!MN\endcsname{#4}\else{#5}\fi
      \else
        \ifcsname\csb!MN\endcsname{#4}\else{#5}\fi
      \fi
    \fi
  \else
    \ifcsname\csab!MN\endcsname{#4}\else{#5}\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IfFrontName}
% \changes{2.3}{2016/01/05}{Added}
% This macro expands one path if a front matter name exists, or else the other.
%    \begin{macrocode}
\newcommandx\IfFrontName[5][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% Below we parse the name arguments and choose the path.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IfFrontName}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!NF\endcsname{#4}\else{#5}\fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!NF\endcsname{#4}\else{#5}\fi
      \else
        \ifcsname\csb!NF\endcsname{#4}\else{#5}\fi
      \fi
    \fi
  \else
    \ifcsname\csab!NF\endcsname{#4}\else{#5}\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IfAKA}
% \changes{2.3}{2016/01/05}{Added}
% \changes{2.4}{2016/03/15}{Test for excluded}
% \changes{3.0}{2016/10/26}{Redesigned}
% This macro expands one path if a cross-reference exists, another if it does not exist, and a third if it is excluded.
%    \begin{macrocode}
\newcommandx\IfAKA[6][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% For each class of name we test first if a cross-reference exists, then if it is excluded.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\IfAKA}%
  \ifx\arga\@empty
    \ifx\argc\@empty
      \ifcsname\csb!PN\endcsname
        \edef\testex{\csname\csb!PN\endcsname}%
        \ifx\testex\@empty{#4}\else{#6}\fi
      \else{#5}\fi
    \else
      \ifx\suffb\@empty
        \ifcsname\csbc!PN\endcsname
          \edef\testex{\csname\csbc!PN\endcsname}%
          \ifx\testex\@empty{#4}\else{#6}\fi
        \else{#5}\fi
      \else
        \ifcsname\csb!PN\endcsname
          \edef\testex{\csname\csb!PN\endcsname}%
          \ifx\testex\@empty{#4}\else{#6}\fi
        \else{#5}\fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \edef\testex{\csname\csab!PN\endcsname}%
      \ifx\testex\@empty{#4}\else{#6}\fi
    \else{#5}\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Changing Name Decisions}
% \begin{macro}{\ForgetName}
% \changes{0.75}{2012/01/19}{Add new argument}
% \changes{1.9}{2015/07/09}{Ensure global undef}
% \changes{2.3}{2016/01/05}{Global or local}
% This undefines a control sequence to force a ``first use.''
%    \begin{macrocode}
\newcommandx*\ForgetName[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
  \@nameauth@Error{#2}{macro \string\ForgetName}%
%    \end{macrocode}
% \clearpage\noindent
% Now we parse the arguments, undefining the control sequences either by current name type (via |@nameauth@MainFormat|) or completely (toggled by |@nameauth@LocalNames|).
%    \begin{macrocode}
  \ifx\arga\@empty
    \ifx\argc\@empty
      \if@nameauth@LocalNames
        \if@nameauth@MainFormat
          \global\csundef{\csb!MN}%
        \else
          \global\csundef{\csb!NF}%
        \fi
      \else
        \global\csundef{\csb!MN}%
        \global\csundef{\csb!NF}%
      \fi
    \else
      \ifx\suffb\@empty
        \if@nameauth@LocalNames
          \if@nameauth@MainFormat
            \global\csundef{\csbc!MN}%
          \else
            \global\csundef{\csbc!NF}%
          \fi
        \else
          \global\csundef{\csbc!MN}%
          \global\csundef{\csbc!NF}%
        \fi
      \else
        \if@nameauth@LocalNames
          \if@nameauth@MainFormat
            \global\csundef{\csb!MN}%
          \else
            \global\csundef{\csb!NF}%
          \fi
        \else
          \global\csundef{\csb!MN}%
          \global\csundef{\csb!NF}%
        \fi
      \fi
    \fi
  \else
    \if@nameauth@LocalNames
      \if@nameauth@MainFormat
        \global\csundef{\csab!MN}%
      \else
        \global\csundef{\csab!NF}%
      \fi
    \else
      \global\csundef{\csab!MN}%
      \global\csundef{\csab!NF}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage
%
% \begin{macro}{\SubvertName}
% \changes{0.9}{2012/02/10}{Added}
% \changes{2.3}{2016/01/05}{Global or local}
% \changes{3.1}{2017/01/13}{Fix old syntax}
% This defines a control sequence to force a ``subsequent use.''
%    \begin{macrocode}
\newcommandx*\SubvertName[3][1=\@empty, 3=\@empty]
{%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\suffb{\@nameauth@Suffix{#2}}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2,#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% We make copies of the arguments to test them.
%    \begin{macrocode}
  \@nameauth@Error{#2}{macro \string\SubvertName}%
%    \end{macrocode}
% Now we parse the arguments, defining the control sequences either locally by section type or globally. |@nameauth@LocalNames| toggles the local or global behavior, while we select the type of name with |@nameauth@MainFormat|.
%    \begin{macrocode}
  \ifx\arga\@empty
    \ifx\argc\@empty
      \if@nameauth@LocalNames
        \if@nameauth@MainFormat
          \csgdef{\csb!MN}{}%
        \else
          \csgdef{\csb!NF}{}%
        \fi
      \else
        \csgdef{\csb!MN}{}%
        \csgdef{\csb!NF}{}%
      \fi
    \else
      \ifx\suffb\@empty
        \if@nameauth@LocalNames
          \if@nameauth@MainFormat
            \csgdef{\csbc!MN}{}%
          \else
            \csgdef{\csbc!NF}{}%
          \fi
        \else
          \csgdef{\csbc!MN}{}%
          \csgdef{\csbc!NF}{}%
        \fi
      \else  
        \if@nameauth@LocalNames
          \if@nameauth@MainFormat
            \csgdef{\csb!MN}{}%
          \else
            \csgdef{\csb!NF}{}%
          \fi
        \else
          \csgdef{\csb!MN}{}%
          \csgdef{\csb!NF}{}%
        \fi
      \fi
    \fi
  \else
    \if@nameauth@LocalNames
      \if@nameauth@MainFormat
        \csgdef{\csab!MN}{}%
      \else
        \csgdef{\csab!NF}{}%
      \fi
    \else
      \csgdef{\csab!MN}{}%
      \csgdef{\csab!NF}{}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Alternate Names}
% \begin{macro}{\AKA}
% \changes{0.85}{2012/02/05}{Hide commas}
% \changes{1.26}{2012/04/24}{Fix name suffixes}
% \changes{1.5}{2013/02/22}{Reversing and caps}
% \changes{2.0}{2015/11/11}{Trim spaces; fix tagging}
% \changes{2.1}{2015/11/24}{Fix Unicode}
% \changes{2.3}{2016/01/05}{Expand starred mode}
% \changes{2.41}{2016/03/17}{Fix token regs}
% \changes{2.6}{2016/09/19}{Fix index commas}
% \changes{3.0}{2016/10/26}{Redesigned}
% \changes{3.1}{2017/01/13}{Can skip index}
% \cmd{\AKA} prints an alternate name and creates index cross-references. It prevents multiple generation of cross-references and suppresses double periods.
%    \begin{macrocode}
\newcommandx*\AKA[5][1=\@empty, 3=\@empty, 5=\@empty]
{%
%    \end{macrocode}
% Prevent entering \cmd{\AKA} via itself or \cmd{\@nameauth@Name}. Prevent the index-only flag.
%    \begin{macrocode}
  \unless\if@nameauth@Lock
  \@nameauth@Locktrue%
  \@nameauth@JustIndexfalse%
%    \end{macrocode}
% Tell the formatting system that \cmd{\AKA} is running. Test for malformed input.
%    \begin{macrocode}
  \@nameauth@InAKAtrue%
  \@nameauth@Error{#2}{macro \string\AKA}%
  \@nameauth@Error{#4}{macro \string\AKA}%
%    \end{macrocode}
% Names occur in horizontal mode; we ensure that. Next we make copies of the target name arguments and we parse and print the cross-reference name.
%    \begin{macrocode}
  \leavevmode\hbox{}%
  \protected@edef\argi{\trim@spaces{#1}}%
  \protected@edef\rooti{\@nameauth@Root{#2}}%
  \protected@edef\suffi{\@nameauth@Suffix{#2}}%
  \@nameauth@Parse[#3]{#4}[#5]{!PN}%
%    \end{macrocode}
% Create an index cross-reference based on the arguments.
%    \begin{macrocode}
  \unless\if@nameauth@SkipIndex
    \ifx\argi\@empty
      \ifx\suffi\@empty
        \IndexRef[#3]{#4}[#5]{\rooti}%
      \else
        \IndexRef[#3]{#4}[#5]{\rooti\space\suffi}%
      \fi
    \else
      \ifx\suffi\@empty
        \IndexRef[#3]{#4}[#5]{\rooti,\space\argi}%
      \else
        \IndexRef[#3]{#4}[#5]{\rooti,\space\argi,\space\suffi}%
      \fi
    \fi
  \fi
%    \end{macrocode}
% Reset all the ``per name'' Boolean values.
%    \begin{macrocode}
  \@nameauth@SkipIndexfalse%
  \@nameauth@Lockfalse%
  \@nameauth@InAKAfalse%
  \@nameauth@AltAKAfalse%
  \@nameauth@NBSPfalse%
  \@nameauth@NBSPXfalse%
  \@nameauth@DoCapsfalse%
  \@nameauth@Accentfalse%
  \@nameauth@AllThisfalse%
  \@nameauth@ShowCommafalse%
  \@nameauth@NoCommafalse%
  \@nameauth@RevThisfalse%
  \@nameauth@RevThisCommafalse%
  \@nameauth@ShortSNNfalse%
  \@nameauth@EastFNfalse%
%    \end{macrocode}
% Close the ``locked'' branch.
%    \begin{macrocode}
  \fi
%    \end{macrocode}
% Call the full stop detection.
%    \begin{macrocode}
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AKA*}
% \changes{0.9}{2012/02/10}{Added}
% This starred form sets a Boolean to print only the alternate name argument, if that exists, and calls \cmd{\AKA}.
%    \begin{macrocode}
\WithSuffix{\newcommand*}\AKA*{\@nameauth@AltAKAtrue\AKA}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PName}
% \changes{2.3}{2016/01/05}{Work directly with hooks}
% \changes{3.1}{2017/01/13}{Can skip index}
% \cmd{\PName} is a convenience macro that calls \cmd{\NameauthName}, then \cmd{\AKA}. It prevents the index-only feature from triggering.
%    \begin{macrocode}
\newcommandx*\PName[5][1=\@empty,3=\@empty,5=\@empty]
{%
  \@nameauth@JustIndexfalse%
  \if@nameauth@SkipIndex
    \NameauthName[#1]{#2}\space(\SkipIndex\AKA[#1]{#2}[#3]{#4}[#5])%
  \else
    \NameauthName[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PName*}
% This sets up a long name reference and calls \cmd{\PName}.
%    \begin{macrocode}
\WithSuffix{\newcommand*}\PName*{\@nameauth@FullNametrue\PName}
%    \end{macrocode}
% \end{macro}
%
% \noindent{\large\bfseries Simplified Interface}
% \begin{environment}{nameauth}
% \changes{1.6}{2013/03/10}{Environment added}
% \changes{1.9}{2015/07/09}{Bugfix}
% \changes{2.0}{2015/11/11}{Better arg handling}
% \changes{2.11}{2015/11/29}{Bugfix}
% \changes{2.41}{2016/03/17}{No local \cmd{\newtoks}}
% The \texttt{nameauth} environment creares macro shorthands. First we define a control sequence \cmd{\<} that takes four parameters, delimited by three ampersands and \texttt{>}.
%    \begin{macrocode}
\newenvironment{nameauth}{%
  \begingroup%
  \let\ex\expandafter%
  \csdef{<}##1&##2&##3&##4>{%
    \protected@edef\@arga{\trim@spaces{##1}}%
    \protected@edef\@testb{\trim@spaces{##2}}%
    \protected@edef\@testd{\trim@spaces{##4}}%
    \@nameauth@etoksb\expandafter{##2}%
    \@nameauth@etoksc\expandafter{##3}%
    \@nameauth@etoksd\expandafter{##4}%
%    \end{macrocode}
% The first argument must have some text to create a set of control sequences with it. The third argument is the required name field. Redefining a shorthand creates a warning.
%    \begin{macrocode}
    \ifx\@arga\@empty
      \PackageError{nameauth}%
      {environment nameauth: Control sequence missing}%
    \fi
    \@nameauth@Error{##3}{environment nameauth}%
    \ifcsname\@arga\endcsname
      \PackageWarning{nameauth}%
      {environment nameauth: Shorthand macro already exists}%
   \fi
%    \end{macrocode}
% Set up shorthands according to name form. We have to use \cmd{\expandafter}, not the $\epsilon$-\TeX{} way, due to \cmd{\protected@edef} in the naming macros.
%
% We begin with mononyms and non-Western names that use the new syntax. We use one \cmd{\expandafter} per token because we only have one argument to expand first.
%    \begin{macrocode}
   \ifx\@testd\@empty
      \ifx\@testb\@empty
        \ex\csgdef\ex{\ex\@arga\ex}\ex{\ex\NameauthName\ex{%
          \the\@nameauth@etoksc}}%
        \ex\csgdef\ex{\ex L\ex\@arga\ex}\ex{%
          \ex\@nameauth@FullNametrue%
          \ex\NameauthLName\ex{\the\@nameauth@etoksc}}%
        \ex\csgdef\ex{\ex S\ex\@arga\ex}\ex{%
          \ex\@nameauth@FirstNametrue%
          \ex\NameauthFName\ex{\the\@nameauth@etoksc}}%
      \else
%    \end{macrocode}
% Next we have Western names with no alternate names. Here we have two arguments to expand in reverse order, so we need three, then one uses of \cmd{\expandafter} per token.
%    \begin{macrocode}
        \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga\ex\ex\ex}%
          \ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex[%
          \ex\the\ex\@nameauth@etoksb\ex]\ex{\the\@nameauth@etoksc}}%
        \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\@arga%
          \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue%
          \ex\ex\ex\NameauthLName\ex\ex\ex[%
          \ex\the\ex\@nameauth@etoksb\ex]\ex{\the\@nameauth@etoksc}}%
        \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\@arga%
          \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue%
          \ex\ex\ex\NameauthFName\ex\ex\ex[%
          \ex\the\ex\@nameauth@etoksb\ex]\ex{\the\@nameauth@etoksc}}%
      \fi
    \else
%    \end{macrocode}
% Below are native Eastern names with alternates and the older syntax. Again, we have three or one use of  \cmd{\expandafter} per step before the respective arguments.
%    \begin{macrocode}
      \ifx\@testb\@empty
        \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga\ex\ex\ex}%
          \ex\ex\ex{\ex\ex\ex\NameauthName\ex\ex\ex{%
          \ex\the\ex\@nameauth@etoksc\ex}\ex[\the\@nameauth@etoksd]}%
        \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\@arga%
          \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue%
          \ex\ex\ex\NameauthLName\ex\ex\ex{%
          \ex\the\ex\@nameauth@etoksc\ex}\ex[\the\@nameauth@etoksd]}%
        \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\@arga%
          \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue%
          \ex\ex\ex\NameauthFName\ex\ex\ex{%
          \ex\the\ex\@nameauth@etoksc\ex}\ex[\the\@nameauth@etoksd]}%
      \else
%    \end{macrocode}
% Here are Western names with alternates. We have three arguments to expand, so we have seven, three, and one respective use of \cmd{\expandafter}.
%    \begin{macrocode}
        \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
          \ex\ex\ex\ex\ex\ex\ex\@arga\ex\ex\ex\ex\ex\ex\ex}%
          \ex\ex\ex\ex\ex\ex\ex{\ex\ex\ex\ex\ex\ex\ex\NameauthName%
          \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\@nameauth@etoksb%
          \ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}\ex[%
          \the\@nameauth@etoksd]}%
        \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
          \ex\ex\ex\ex\ex\ex\ex L\ex\ex\ex\ex\ex\ex\ex\@arga%
          \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{%
          \ex\ex\ex\ex\ex\ex\ex\@nameauth@FullNametrue%
          \ex\ex\ex\ex\ex\ex\ex\NameauthLName\ex\ex\ex\ex\ex\ex\ex[%
          \ex\ex\ex\the\ex\ex\ex\@nameauth@etoksb%
          \ex\ex\ex]\ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}\ex[%
          \the\@nameauth@etoksd]}%
        \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
          \ex\ex\ex\ex\ex\ex\ex S\ex\ex\ex\ex\ex\ex\ex\@arga%
          \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{%
          \ex\ex\ex\ex\ex\ex\ex\@nameauth@FirstNametrue%
          \ex\ex\ex\ex\ex\ex\ex\NameauthFName\ex\ex\ex\ex\ex\ex\ex[%
          \ex\ex\ex\the\ex\ex\ex\@nameauth@etoksb\ex\ex\ex]%
          \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}\ex[%
          \the\@nameauth@etoksd]}%
      \fi
    \fi
    \ignorespaces%
  }\ignorespaces%
}{\endgroup\ignorespaces}
%    \end{macrocode}
% \end{environment}
%\Finale
\endinput
%</package>