summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
blob: 7bbff7330cf1cd9d37b5a544c925a5b3281cf0d6 (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
% \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 v1.3c or later
     See:| http://www.latex-project.org/lppl.txt


Short description:

The nameauth package automates the formatting and indexing of names.
This aids the use of a name authority and the process of textual reordering
and revision without needing to retype name references.

Files		 Distribution

README       This file
nameauth.pdf Documentation

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

Installation

Unpack nameauth.zip in an appropriate directory.

Note that the instructions below assume that you are using a *nix-
compatible computer. If that is otherwise, you will need to modify
these instructions to your needs.

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
		
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

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

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

Testing notes:

This packages works and builds with latex, lualatex, pdflatex, and xelatex.
It can be used with makeindex and texindy. The documentation builds with
lualatex, pdflatex, and xelatex, using makeindex.

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 v1.3c or later
     See:| http://www.latex-project.org/lppl.txt

\endpreamble
\postamble

Copyright (C) 2016 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 file nameauth.dtx 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>
    [2016/01/05 v2.3 Name authority mechanism for consistency in text and index]
%</package>
%<*driver>
\documentclass[11pt]{ltxdoc}
\usepackage[textwidth=135mm,textheight=237mm,right=25mm,nohead]{geometry}
\usepackage[numbered]{hypdoc}
\usepackage{enumitem}
\usepackage{\jobname}
\usepackage[ngerman,american]{babel}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage[toc]{multitoc}
\usepackage{tikz}
\usepackage{ifxetex}
\usepackage{ifluatex}
\usepackage{ifpdf}
\ifxetex
  \usepackage{fontspec}
  \defaultfontfeatures{Mapping=tex-text}
  \usepackage{xunicode}
  \usepackage{xltxtra}
\else
  \ifluatex
    \usepackage{fontspec}
    \defaultfontfeatures{Ligatures=TeX}
  \else
    \usepackage[utf8]{inputenc}
    \usepackage[TS1,T1]{fontenc}
    \usepackage{newunicodechar}
    \usepackage{lmodern}
    \DeclareTextSymbolDefault{\textlongs}{TS1}
    \DeclareTextSymbol{\textlongs}{TS1}{115}
    \newunicodechar{ſ}{\textlongs}
    \newunicodechar{ā}{\=a}
    \newunicodechar{ṃ}{\d m}
  \fi
\fi
\setlist{rightmargin=\leftmargin,itemsep=0pt}
\frenchspacing
\DisableCrossrefs
\CodelineIndex
\RecordChanges
\begin{nameauth}
  \< Wash & George & Washington & >
  \< Soto & Hernando & de Soto & >
  \< JRII & John David & Rockefeller, II & >
  \< JRIV & John David & Rockefeller, IV & >
  \< JayR & John David & Rockefeller, IV & Jay >
  \< Aris & & Aristotle & >
  \< Eliz & & Elizabeth, I & >
  \< Attil & & Attila, the Hun & >
  \< Dagb & & Dagobert & I > 
  \< Konoe & Fumimaro & Konoe & >
  \< Yamt & & Yamamoto, Isoroku & >
  \< Yosh & & Yoshida & Shigeru >
  \< Einstein & Albert & Einstein & >
  \< Cicero & M.T. & Cicero & >
  \< Confucius & & Confucius & >
  \< CBald & & Charles, the Bald & >
  \< Smith & John & Smith & >
  \< JQP & J.Q. & Public & >
  \< Patton & George S. & Patton, Jr. & >
  \< Francis & & Francis, I & >
  \< Dem & & Demetrius, I Soter & >
  \< Sun & & Sun, Yat-sen & >
  \< Plato & & Plato & >
  \< Henry & & Henry & VIII >
  \< Ptol & & Ptolemy & I Soter >
  \< Mao & & Mao & Tse-tung >
  \< DLM & Walter & de la Mare & >
  \< JWG & Johann Wolfgang von & Goethe & >
  \< Harnack & Adolf & Harnack & >
  \< Bier & Johann & Bier\-mann & >
  \< Howell & Thurston & \textsc{Howell},\textsc{III} &>
  \< Fukuyama & & \uppercase{Fukuyama}, Takeshi & >
  \< KempMed & & Thomas, à~Kempis & >
  \< KempW & Thomas & à~Kempis & >
  \< Lewis & Clive Staples & Lewis & C.S. >
  \< Jack & Clive Staples & Lewis & Jack >
\end{nameauth}
\TagName[George]{Washington}{, president|hyperpage}
\TagName[Hernando]{de Soto}{|hyperpage}
\TagName[John David]{Rockefeller, II}{|hyperpage}
\TagName[John David]{Rockefeller, IV}{|hyperpage}
\TagName{Aristotle}{|hyperpage}
\TagName{Elizabeth, I}{, queen|hyperpage}
\TagName{Attila, the Hun}{|hyperpage}
\TagName{Dagobert}[I]{, king|hyperpage}
\TagName[Fumimaro]{Konoe}{, PM\dag|hyperpage}
\TagName{Yamamoto, Isoroku}{|hyperpage}
\TagName{Yoshida}[Shigeru]{, PM|hyperpage}
\TagName[Albert]{Einstein}{|hyperpage}
\TagName[M.T.]{Cicero}{|hyperpage}
\TagName{Confucius}{|hyperpage}
\TagName{Charles, the Bald}{, emperor|hyperpage}
\TagName[George S.]{Patton, Jr.}{|hyperpage}
\TagName{Francis, I}{, king|hyperpage}
\TagName{Demetrius, I Soter}{, king|hyperpage}
\TagName{Sun, Yat-sen}{, president|hyperpage}
\TagName{Plato}{|hyperpage}
\TagName{Henry}[VIII]{, king|hyperpage}
\TagName{Henry, VIII}{, king|hyperpage}
\TagName{Ptolemy I}[Soter]{, king|hyperpage}
\TagName{Mao}[Tse-tung]{, chairman|hyperpage}
\TagName[Walter]{de la Mare}{|hyperpage}
\TagName[Johann Wolfgang von]{Goethe}{|hyperpage}
\TagName[Adolf]{Harnack}{|hyperpage}
\TagName{Antiochus, IV}{ Epiphanes, king|hyperpage}
\TagName{Chiang}[Kai-shek]{, president|hyperpage}
\TagName{Louis, XIV}{, king|hyperpage}
\TagName{Leo, I}{, pope|hyperpage}
\TagName{Gregory, I}{, pope|hyperpage}
\TagName[John]{Smith}{*|hyperpage}
\TagName[J.Q.]{Public}{*|hyperpage}
\TagName[James Earl]{Carter, Jr.}{, president|hyperpage}
\TagName{Jean, sans Peur}{, duke|hyperpage}
\PretagName[E.\,B.]{White}{White, E. B.}
\TagName[E.\,B.]{White}{|hyperpage}
\TagName{Anaximander}{|hyperpage}
\TagName{Arai, Akino}{|hyperpage}
\TagName{Boris, the Animal}{*|hyperpage}
\TagName[Rudolph]{Carnap}{|hyperpage}
\TagName[Patrick]{Cousot}{|hyperpage}
\TagName[Marc van]{Dongen}{|hyperpage}
\TagName[W.E.B.]{Du Bois}{|hyperpage}
\TagName[Charles]{du Fresne}{|hyperpage}
\TagName[George]{Eliot}{|hyperpage}
\TagName[Louis]{Gossett, Jr.}{|hyperpage}
\TagName[Enrico]{Gregorio}{|hyperpage}
\TagName[Oskar]{Hammerstein, II}{|hyperpage}
\TagName[Lafcadio]{Hearn}{|hyperpage}
\TagName[Bob]{Hope}{|hyperpage}
\TagName{Ishida}[Yoko]{|hyperpage}
\TagName{John, Eriugena}{|hyperpage}
\TagName[Yoko]{Kanno}{\dag|hyperpage}
\TagName[Martin Luther]{King, Jr.}{|hyperpage}
\TagName[The Amazing]{Kreskin}{|hyperpage}
\TagName{Lao-tzu}{|hyperpage}
\TagName[Uwe]{Lueck}{|hyperpage}
\TagName[Dan]{Luecking}{|hyperpage}
\TagName{Maimonides}{|hyperpage}
\TagName[Nicolas]{Malebranche}{|hyperpage}
\TagName[J.S.]{Mill}{|hyperpage}
\TagName[Aiko]{Nakano}{\dag|hyperpage}
\TagName{Nogawa}[Sakura]{|hyperpage}
\TagName[Heiko]{Oberdiek}{|hyperpage}
\TagName{Rambam}{|hyperpage}
\TagName[Robert]{Schlicht}{|hyperpage}
\TagName{Shikata, Akiko}{|hyperpage}
\TagName[Rudolph]{Snel van Royen}{|hyperpage}
\TagName[Willebrord]{Snel van Royen}{|hyperpage}
\TagName[Philipp]{Stephani}{|hyperpage}
\TagName[John]{Strietelmeier}{|hyperpage}
\TagName[Johann]{Bier\-mann}{*|hyperpage}
\TagName[Chesley B.]{Sullenberger, III}{|hyperpage}
\TagName{Thomas, Aquinas}{|hyperpage}
\TagName[Mark]{Twain}{|hyperpage}
\TagName[Mike]{Tyson}{|hyperpage}
\TagName{Vlad II, Dracul}{|hyperpage}
\TagName{Vlad III, Dracula}{|hyperpage}
\TagName{Voltaire}{|hyperpage}
\TagName{Yohko}{|hyperpage}
\TagName[Johann]{Andreä}{|hyperpage}
\PretagName{Æthelred, II}{Aethelred 2}
\TagName{Æthelred, II}{, king|hyperpage}
\PretagName[Jan]{Łukasiewicz}{Lukasiewicz, Jan}
\TagName[Jan]{Łukasiewicz}{|hyperpage}
\PretagName{Vlad, Ţepeş}{Vlad Tepes}
\TagName[Patrick]{Cousot}{|hyperpage}
\PretagName[Greta]{\textsc{Garbo}}{Garbo, Greta}
\TagName[Greta]{\textsc{Garbo}}{|hyperpage}
\PretagName[Thurston]{\textsc{Howell},\textsc{III}}{Howell, Thurston 3}
\TagName[Thurston]{\textsc{Howell},\textsc{III}}{*|hyperpage}
\PretagName{\uppercase{Fukuyama}, Takeshi}{Fukuyama, T}
\TagName{\uppercase{Fukuyama}, Takeshi}{|hyperpage}
\PretagName{Thomas, à~Kempis}{Thomas a Kempis}
\TagName{Thomas, à~Kempis}{|hyperpage}
\TagName[Clive Staples]{Lewis}{|hyperpage}
\PretagName[Heinz]{\textsc{Rühmann}}{Ruehmann, Heinz}
\TagName[Heinz]{\textsc{Rühmann}}{|hyperpage}
\PretagName[Heinrich Wilhelm]{\textsc{Rühmann}}{Ruehmann, Heinrich Wilhelm}
\TagName{William, I}{|hyperpage}
\TagName[Charlie]{Chaplin}{|hyperpage}
\IndexActual{=}
\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{2989}
%
% \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{v0.7}{2011/12/26}{Initial release}
% \changes{v0.8}{2012/01/29}{Add features, bugfixes}
% \changes{v0.85}{2012/02/05}{Add package options}
% \changes{v0.86}{2012/02/06}{Fix regressions}
% \changes{v0.9}{2012/02/10}{Add first name formatting; affix handling expandable}
% \changes{v0.94}{2012/02/15}{Add index suppression, error checking, name particle caps}
% \changes{v0.95}{2012/02/17}{Bugfixes}
% \changes{v0.96}{2012/02/19}{Bugfixes}
% \changes{v1.0}{2012/02/20}{Works fully with \textsf{microtype} and \textsf{memoir}}
% \changes{v1.1}{2012/03/08}{Bugfixes}
% \changes{v1.4}{2012/07/24}{Add features, bugfixes}
% \changes{v1.5}{2013/02/22}{Add features, bugfixes, options}
% \changes{v1.6}{2013/03/10}{Add |nameauth| environment}
% \changes{v1.7}{2013/04/02}{Fix options processing}
% \changes{v1.8}{2013/09/19}{Update docs}
% \changes{v1.9}{2015/07/09}{Better Eastern name support; fix |nameauth| bugs, global un-tagging}
% \changes{v2.0}{2015/11/11}{Use dtxgen template instead of dtxtut; update docs}
% \changes{v2.1}{2015/11/24}{Isolate Unicode issues}
% \changes{v2.2}{2015/12/01}{Add interface hooks and docs; fix bugs}
% \changes{v2.3}{2016/01/05}{Improve docs and hooks; add features}
% \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}
%
%\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 formatting and indexing of names. This aids the use of a \textbf{name authority} and the process of textual reordering and revision without needing to retype name references.
% \end{abstract}
%
% {\small\tableofcontents}
% \setlength{\parskip}{0.15\baselineskip plus .15\baselineskip minus .15\baselineskip}
%
% \noindent This manual is designed to be compatible with A4 and US letter. Macro references are minimized for a ``clean'' index, showing how \textsf{nameauth} handles indexing.\clearpage
%
% \section{Introduction}
%
% \subsection{Preliminaries}
%
% When publications use hundreds of names, it takes time and money to check them. This package automates much of that work. \textbf{Context determines name forms} unless otherwise modified, meaning that \textbf{you usually do not have to retype names} when editing a document. You can \textbf{implement a name authority} that allows for name variants in the text and consistent index entries. With \textsf{nameauth} you can handle some \textbf{cross-cultural naming conventions.} Additionally, you can use \textbf{index sort keys and tags} automatically after assigning them.
%
% This package grew from generalized needs for translating old German and Latin texts. Design principles include:
% \begin{enumerate}\small
% \item Format and vary name forms according to standard syntax in the body text, independent of the index.
% \begin{itemize}[noitemsep]
%   \item Default to long name references first, then shorter ones.
%   \item Use alternate names only in the body text, not the index.
%   \item Perform name caps and reversing only in the body text.
% \end{itemize}
% \item Perform typographic formatting of names only in the body text. Reflect source text typography with English conventions, but only \emph{after} syntactic formatting is complete.
% \item Allow typographic formatting to be customized and permit control sequences in names (Sections~\ref{sec:accents}, \ref{sec:formatting}, and~\ref{sec:IndexSort}) to allow Continental and non-English standards.
% \item Always aim to reduce keystrokes.
% \item Accommodate the broadest set of names while minimizing keystrokes.
% \end{enumerate}
%
% This manual performs something of a ``torture test'' on this package. You might want to avoid doing that if you are a beginner.
%
% \textsf{Nameauth} depends on \textsf{etoolbox}, \textsf{ifxetex}, \textsf{ifluatex}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. It was tested with \texttt{latex,} \texttt{lualatex,} \texttt{pdflatex,} and \texttt{xelatex,} along with \texttt{makeindex} and \texttt{texindy.} This manual was typeset 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{} using \texttt{makeindex} and \texttt{gind.ist.}
%
% Indexing generally conforms to the standard in Nancy C. Mulvany, \emph{Indexing Books} (Chicago: University of Chicago Press, 1994). This should be suitable for a very wide application across a number of disciplines. 
%
% Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani},\break \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, and \Name[Robert]{Schlicht} for their assistance in the early versions of this package.\vfill
%
% \bgroup\setlength{\fboxsep}{5pt}\noindent\fbox{\parbox{0.97\textwidth}{\small\strut This documentation uses names of living and historical figures because users refer to real people. At no time do I intend any disrespect or statement of bias regarding any particular person, culture, or tradition. All names are used only for teaching purposes.}}\egroup
%\clearpage
%
% \subsection{What's In A Name?}
% \label{sec:NameTypes}
%
% Name forms are ambiguous apart from historical and cultural contexts. The \textsf{nameauth} package helps you encode names from as many contexts as possible.
%
% In this manual we refer to three classes of names. A ``surnames'' argument, \meta{SNN}, denotes a ``required name,'' that is, a Western surname, an Eastern family name, or an ancient/medieval name.\footnote{Some professional literature speaks of forenames and optional surnames. See Mulvany, \emph{Indexing Books}, pages 152--82, which I used as a guide along with the \emph{Chicago Manual of Style}. That approach does not work in \LaTeX, where we use optional forenames for the same effect.}
% Other naming systems can be adapted to these categories, \emph{e.g.}, Icelandic, Hungarian, etc.
%
% Professional writing often calls for the full form of a person's name to be used in its first occurrence, with shorter forms used thereafter. This package adapts that principle to all the forms below.
%
%\begin{enumerate}[noitemsep]
%\item Western name:\\[1ex]
%\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\textbf{Sobriquet, etc.}};\\
%  };
%  \node [matrix,column sep=1em] (tipsii) at (1,-2)
%  {
%    \node[align=left](a1)
%    {
%      Personal name(s):\\
%      \textit{baptismal name}\\
%      \textit{Christian name}\\
%      \textit{first and middle}\\\quad\textit{names}\\
%      \textit{praenomen}
%    }; &
%    \node[align=left](a2)
%    {
%      Family designator:\\
%      \textit{father's family}\\
%      \textit{mother's family}\\
%      \textit{ancestor}\\
%      \textit{occupation}\\
%      \textit{place of origin}\\
%      \textit{territory}\\
%      \textit{nomen/cognomen}\\
%      \textit{patronym}
%    }; &
%    \node[align=left](a3)
%    {
%      Sobriquet / title:\\
%      \textit{senior, junior, III\dots}\\
%      \textit{notable feature}\\
%      \textit{notable attribute}\\
%      \textit{place of origin}\\
%      \textit{territory}\\
%      \textit{agnomen}
%    }; \\
%  };
%  \begin{scope}[every path/.style=line]
%    \path (arg1) -- (a1);
%    \path (arg2) -- (a2);
%    \path (arg3) -- (a3);
%  \end{scope}
%\end{tikzpicture}
%\item Eastern name:\\[1ex]
%\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] (tipsii) at (2,-1)
%  {
%    \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}
%\item Ancient name:\\[1ex]
%\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(spacei){\qquad\qquad\qquad}; &
%    \node(arg1){\strut\textbf{Given name}}; &
%    \node(spaceii){\qquad}; &
%    \node(arg2){\strut\textbf{Sobriquet, etc.}};\\
%  };
%  \node [matrix,column sep=2.2cm] (tipsii) at (1.5,-1.5)
%  {
%    \node[align=left](a1)
%    {
%      Personal\\ name
%    }; &
%    \node[align=left](a2)
%    {
%      Sobriquet / title:\\
%      \textit{senior, junior, III\dots}\\
%      \textit{notable feature}\\
%      \textit{notable attribute}\\
%      \textit{place of origin}\\
%      \textit{territory}
%    }; \\
%  };
%  \begin{scope}[every path/.style=line]
%    \path (arg1) -- (a1);
%    \path (arg2) -- (a2);
%  \end{scope}
%\end{tikzpicture}
%\end{enumerate}
%\clearpage
%
% \section{Usage}
%
% \subsection{Package Options}
% \label{sec:options}
%
% |\usepackage[|\meta{$option_1$}|,|\meta{$option_2$}|,|\dots|]{nameauth}|\medskip
%
% \noindent From the user's perspective these options proceed from the most general to more specific details. Package options address the following:
% \begin{enumerate}
% \item Enable or disable features (formatting, indexing, index sorting) 
% \item Affect the syntax of names (commas, capitalization, and reversing)
% \item Typographic display of names (formatted or not, and how)
% \end{enumerate}
% {\hrulefill\bfseries Default options are in boldface.\hrulefill}
%
% \begin{center}\Large\bfseries Enable/Disable Features\end{center}
%
% \noindent{\large\bfseries Enable/Disable Formatting}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{mainmatter} & \bfseries Enable typographic formatting attributes (see formatting options below), starting at the beginning of a document.\\[1ex]
% \quad\texttt{frontmatter} & Disable typographic formatting, but retain automatic full and short forms.\\[2ex]
% \end{tabular}\\
% The default |mainmatter| option starts formatting names immediately. Use the |frontmatter| option to suppress name formatting until you want it to start via \cmd{\NamesActive}. These options have no additional effects on the index, but they implement two completely separate systems of first/subsequent names. These systems manage names in separate contexts. See Section~\ref{sec:DisableFormat}.\bigskip
%
% \noindent{\large\bfseries Enable/Disable Indexing}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{index} & \bfseries Create index entries in place with names.\\[1ex]
% \quad\texttt{noindex} & Suppress indexing of names.\\[2ex]
% \end{tabular}\\
% The default |index| option enables name indexing right away. The |noindex| option disables the indexing of names until \cmd{\IndexActive} enables it. That can affect the use of index tags. This applies only to naming and indexing macros in the \textsf{nameauth} package. See Section~\ref{sec:SectionIndex}.\bigskip
%
% \noindent{\large\bfseries Enable/Disable Index Sorting}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{pretag} & \bfseries Create sort keys used with \texttt{makeindex}.\\[1ex]
% \quad\texttt{nopretag} & Do not create sort keys. \\[2ex]
% \end{tabular}\\
% The default allows \cmd{\PretagName} to create sort keys used in \texttt{makeindex} / \texttt{texindy}. Seldom would one change this option. See Section~\ref{sec:IndexSort}.\clearpage
%
% \begin{center}\Large\bfseries Affect the Syntax of Names\end{center}
%
%\noindent{\large\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.\\[1ex]
% \quad\texttt{comma} & Retain commas between surnames and affixes.\\[2ex]
% \end{tabular}\\
% This option is set at load time. If you use \emph{modern standards} or Eastern names, choose the default |nocomma| option to get, \emph{e.g.}, \Name[James Earl]{Carter, Jr.}.
%
% 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 produces, \emph{e.g.}, \ForgetName[James Earl]{Carter, Jr.}\ShowComma\Name[James Earl]{Carter, Jr.}. Yet it limits the use of macros like \cmd{\AKA} and \cmd{\PName} and it prevents the use of Eastern and ancient names with the new syntax.\footnote{Before version 0.9 the \textsf{nameauth} package assumed the \texttt{comma} option by default and used the old syntax to encode names. Newer versions are backward-compatible.}
% \item Section~\ref{sec:Affix} shows how one can use \cmd{\ShowComma} with the |nocomma| option to get similar results, but with more flexibility.
% \end{enumerate}\medskip
%
% \noindent{\large\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.\\[1ex]
% \quad\texttt{allcaps} & Capitalize entire surnames, such as romanized Eastern names.\\[2ex]
% \end{tabular}\\
% This only affects names printed in the body text. One of the design principles of this package keeps it consistent with English typography and syntax. Thus no syntactic or typographic changes are propagated into the index by default.
%
% Still, you can use this package with different conventions that involve both syntax and formatting. You can type in capitalized family names directly to get that effect. See also Section~\ref{sec:formatting} on how to use macros to get caps (\cmd{\uppercase}) or small caps (\cmd{\textsc}) in both the body text and the index. This becomes easy with the simplified interface.
%
% Section~\ref{sec:Eastern} deals with capitalization on a section-level and per-name basis.\bigskip
%
% \noindent{\large\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.\\[1ex]
% \quad\texttt{allreversed} & Print name forms in ``smart'' reverse order.\\[1ex]
% \quad\texttt{allrevcomma} & Print all names in ``Surname, Forenames'' order, meant for Western names.\\[2ex]
% \end{tabular}\\
% See Section~\ref{sec:Eastern} for related macros to control name reversing by section or by name. This also affects how Eastern names will appear in the index.
%
% So-called ``last-comma-first'' lists of names via \texttt{allrevcomma} (Section~\ref{sec:LastFirst}) are \emph{not} the same as the \texttt{comma} option. They are designed for Western names.\clearpage
%
% \begin{center}\Large\bfseries Typographic Display of Names\end{center}
%
% Section~\ref{sec:formatting} explains in greater detail that typographic display is different from the syntactic formatting of names and occurs after syntactic formatting is complete. This package is designed with type hierarchies in mind. See Robert Bringhurst, \emph{The Elements of Typographic Style}, version 3.2 (Point Roberts, Washington: Hartley \& Marks, 2008), 53--60.
%
% Even though English typography was the design choice due to native access (for me) and global reach (thanks, England), a stint in Germany helped to make me aware of continental typography. Especially in recent versions, one can adapt this package for use in Continental and other typographic standards, as Section~\ref{sec:formatting} discusses. One must use sort tags, as Section~\ref{sec:IndexSort} explains.
%
% Continental standards require you to know the surname in advance and draw formatting into the syntactic elements of the surname. By default, \textsf{nameauth} uses a ``serendipitous ambiguity'' of ancient, Eastern, and suffixed name forms handled by the \meta{Surname, affix} pattern that is resolved subtly by several factors. I burden Continental users with a few more keystrokes in order to minimize keystrokes among the broadest group of users and names.
%
% If you intend to use this package for Continental publishing where the surname is formatted with small caps in the running text and the index, use the |noformat| option. Otherwise, the options below are meant generally for applications in English typography. The default is |smallcaps| because this package was developed to aid my editing and translation of older German and Latin documents into English. I do apologize for any inconvenience in design choices.\bigskip
%
% \noindent{\large\bfseries Formatting Attributes}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\texttt{alwaysformat} & If formatting is enabled by the |mainmatter| option or by \cmd{\NamesActive}, this option causes all names to have typographic formatting applied to them, whether first or subsequent uses.\\[1ex]
% \quad\bfseries\texttt{smallcaps} & \bfseries Set the first use of a name in small caps.\\[1ex]
% \quad\texttt{italic} & Italicize the first occurrence of a name.\\[1ex]
% \quad\texttt{boldface} & Set the first use of a name in boldface.\\[1ex]
% \quad\texttt{noformat} & Do not define a default format. Can be used with custom formatting.\\[2ex]
% \end{tabular}\\
%
% Section~\ref{sec:formatting} offers even more possibilities for presenting the first use of names. That includes typographic formatting that also adds names in margins.\footnote{Two books that helped my thinking about such typographic concepts include 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.\\\indent\quad Given the use of small caps in the text and index in Lohse's volume, I looked at several possibilities and arrived at the current solution for Continental users. Pelikan's volumes pointed me to the idea of a typographic first use of names that could well be served by a margin paragraph. Being a history enthusiast, I implemented that design idea in this manual.}
% This allows one to implement some creative solutions for presenting names.
% \clearpage
%
% \subsection{Quick Start Guide}
% \label{sec:start}
%
%\subsubsection{Main Interface}
% See Section~\ref{sec:Naming} for a proper description of \cmd{\Name}. Here we see briefly how to work with the classes of names in Section~\ref{sec:NameTypes}. We abbreviate the macro arguments \meta{forename(s)} with \meta{FNN} and \meta{surname(s)} with \meta{SNN}. Use the |nocomma| option especially when using Eastern names and ancient names.\bigskip
%
% \noindent{\large\bfseries Western Names}
% \begin{quote}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=2.5cm] (tipsi) at (1.5,2.5)
%   {
%     \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 (1.1,1)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\bfseries\oarg{FNN}}; &
%     \node(arg2){\bfseries\bfseries\marg{SNN}}; &
%     \node(arg3){\bfseries\oarg{Alternate names}}; &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \node [matrix,column sep=1em] (tipsii) at (1,-1)
%   {
%     \node[align=center](a1)
%     {
%       Forename(s)\\used in index
%     }; & & &
%     \node[align=center](a2)
%     {
%       Surname(s)\\Surname(s)|,| affix\\``required name''
%     }; & &
%     \node[align=center](a3)
%     {
%       \meta{empty}\\Nickname(s)\\Full forenames, etc.
%     }; \\
%   };
%   \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}\\
% Usual forms:\\[2ex]\small
% \cmd{\Name}\oarg{FNN}\marg{SNN}\hfill|\Name[George]{Washington}|\IndexName[George]{Washington}\\
% \cmd{\Name}\oarg{FNN}\marg{SNN|,| affix}\hfill|\Name[John David]{Rockefeller, II}|\IndexName[John David]{Rockefeller, II}\\[2ex]
% You must include the \meta{FNN} field with alternate forenames. The \meta{Alternate names} are swapped with the \meta{FNN}, but only in the body text:\\[1ex]
% \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\\\hbox{}\hfill |\Name[Bob]{Hope}[Leslie Townes]|\IndexName[Bob]{Hope}\\\hbox{}\hfill |\Name[Clive Staples]{Lewis}[C.S.]|\IndexName[Clive Staples]{Lewis}\\
% \cmd{\Name}\oarg{FNN}\marg{SNN|,| affix}\oarg{Alternate names}\\\hbox{}\hfill |\Name[John David]{Rockefeller, IV}[Jay]|\IndexName[John David]{Rockefeller, IV}\\[2ex]\normalsize
% The older syntax is \cmd{\Name}\marg{SNN}\oarg{affix}. See Section~\ref{sec:obsolete} for its usage and its shortcomings. It remains for backward compatibility.
% \end{quote}\medskip
%
% \noindent{\large\bfseries Eastern Names in the Text, Western-style Index}
% \begin{quote}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=1.5cm] (tipsi) at (0.5,2)
%   {
%     \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,1)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\oarg{FNN}}; &
%     \node(arg2){\bfseries\marg{SNN}}; &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \node [matrix] (tipsii) at (0.5,0)
%   {
%     \node(a1)
%     {
%       \quad Given name
%     }; &
%     \node(a2)
%     {
%       \quad Family name
%     }; \\
%   };
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%     \path (arg2) -- (a2);
%   \end{scope}
% \end{tikzpicture}\\
% Technically, these are Western name forms without affixes. The reversing macros (Section~\ref{sec:Eastern}) cause them to display in Eastern order in the body text only. The index entries are Western in fashion: \meta{SNN}, \meta{FNN}. This ``non-native'' form of Eastern names excludes both comma-delimited forms and the old syntax.
% \end{quote}
% \clearpage
%
% \noindent{\large\bfseries Eastern Names in the Text, Eastern-style Index}
% \begin{quote}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=1cm] (tipsi) at (0.5,2)
%   {
%     \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,1)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\marg{SNN, FNN}}; &
%     \node(braces){\bfseries|{}|}; \\
%   };
%   \node [matrix,column sep=1em] (tipsii) at (0.5,0)
%   {
%     \node(a1)
%     {
%       \quad Family name
%     }; &
%     \node(a2)
%     {
%       \quad Given name
%     }; \\
%   };
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%     \path (arg1) -- (a2);
%   \end{scope}
% \end{tikzpicture}\\
% Usual form:\\[2ex]\small
% \cmd{\Name}\marg{SNN, FNN}\hfill|\Name{Yamamoto, Isoroku}|\IndexName{Yamamoto, Isoroku}\\[2ex]
% These names truly are Eastern names. They take the form \meta{SNN FNN} in the index even if the reversing macros (Section~\ref{sec:Eastern}) put the names in Western order in the body text. We call this the ``native'' Eastern form.\\[2ex]\normalsize
% The old form of Eastern names is \cmd{\Name}\marg{SNN}\oarg{FNN}. Again, this is retained only for backward compatibility. Cf. Section~\ref{sec:obsolete}.
% \end{quote}\medskip
%
% \noindent{\large\bfseries Ancient Names}
% \begin{quote}
% \begin{tikzpicture}[line/.style={draw,thick}]
%   \node [matrix,column sep=1em] (tipsi) at (2,2)
%   {
%     \node(opt){\quad\small Add to force full name.}; &
%     \node[text width=2.6cm,align=left](a1){\small Mononym\hfil\break Mononym, affix}; &
%     \node[text width=3.3cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
%   };
%   \node [matrix] (macro) at (1,1)
%   {
%     \node(cmd){\bfseries\cmd{\Name}}; &
%     \node(star){\bfseries\texttt{*}}; &
%     \node(arg1){\bfseries\marg{SNN}};  &
%     \node(braces){\bfseries|{}|}; \\
%   };\\
%   \begin{scope}[every path/.style=line]
%     \path (opt) -- (star);
%     \path (grp) -- (braces);
%     \path (arg1) -- (a1);
%   \end{scope}
% \end{tikzpicture}
% Usual form:\\[2ex]\small
% \cmd{\Name}\marg{SNN}\hfill|\Name{Aristotle}|\IndexName{Aristotle}\\
% \cmd{\Name}\marg{SNN, affix}\hfill|\Name{Elizabeth, I}|\IndexName{Elizabeth, I}\\
% \hbox{}\hfill|\Name{Attila, the Hun}|\IndexName{Attila, the Hun}\\[2ex]\normalsize
% These forms are used for royalty, ancient figures, and other monomyms with or without suffixes.\footnote{Technically, the native Eastern forms and the \meta{Mononym, affix} forms are identical, although used in different contexts. You would not wish to reverse a royal name, for example.}
% The older syntax takes the form \cmd{\Name}\marg{Mononym}\oarg{affix}. Cf. Section~\ref{sec:obsolete}.
% \end{quote}
%
% The main interface allows one to use \cmd{\Name}\meta{arguments} as a base for many other package macros. For example, all these are variants of a base pattern, where \meta{prefix macro} consist of one or more of \cmd{\CapThis,} \cmd{\CapName,} \cmd{\RevName,} \cmd{\RevComma,} \cmd{\ShowComma,} and \cmd{\KeepAffix:}
%
% \begin{center}\small
% \begin{tabular}{r@{\,}r@{}c@{\,}c@{ }l}
% \meta{prefix macro} & \cmd{\Name} & & \meta{arguments} \\
% \meta{prefix macro} & \cmd{\Name} & |*| & \meta{arguments} \\
% \meta{prefix macro} & \cmd{\FName} & & \meta{arguments} \\\hline
% & \cmd{\IndexName} & & \meta{arguments} \\
% & \cmd{\ForgetName} & & \meta{arguments} \\
% & \cmd{\SubvertName} & & \meta{arguments} \\
% & \cmd{\PretagName} & & \meta{arguments} & \meta{sort key}\\
% & \cmd{\TagName} & & \meta{arguments} & \meta{tag}\\
% & \cmd{\UntagName} & & \meta{arguments} \\
% & \cmd{\ExcludeName} & & \meta{arguments} \\
% \end{tabular}
% \end{center}
% \clearpage
%
% \subsubsection{Simplefied Interface}
% \label{sec:simplestart}%
%
% \DescribeEnv{nameauth}
% The |nameauth| environment allows one to save typing and aid consistency by using shorthands. It replaces the use of \cmd{\Name,} \cmd{\Name*,} and \cmd{\FName,} but not the other naming macros. Thus one must remain aware of the main interface.
%
% The simplified interface produces control sequences that are fully compatible with the main interface. Although not required, |nameauth| is best used in the document preamble to avoid undefined control sequences.\footnote{The |nameauth| environment uses \cmd{\ignorespaces} to mitigate the need for trailing \texttt{\%.}} The italicized comments at right are not part of the example proper, but are there for explanation. Macro fields have uniform widths only to help compare argument types.
%
% \begin{quote}\small
% |\begin{nameauth}|\\
% |  \<| \meta{cseq1} |&| \meta{FNN} |&| \meta{SNN}\hphantom{\textit{affix, }} |& >|\hfill\emph{Western}\footnote{This is also the form used with ``non-native'' Eastern names using reversing macros, but leaving them in Western form in the index.}\\
% |  \<| \meta{cseq2} |&| \meta{FNN} |&| \meta{SNN, affix} |& >|\hfill\emph{Western}\\
% |  \<| \meta{cseq3} |&| \meta{FNN} |&| \meta{SNN}\hphantom{\textit{affix, }} |&| \meta{Alt. names} |>|\hfill\emph{W. nickname}\footnote{When the \meta{Alt. names} is used, \meta{FNN} never appears in the body text, but only in the index. See Section \ref{sec:Fname} to avoid possible difficulties. You could use \cmd{\AKA} to create a \emph{see} reference for the \AKA[John David]{Rockefeller, IV}[Jay]{Rockefeller} example on the next page; see Section~\ref{sec:AKA}.}\\
% |  \<| \meta{cseq4} |&| \meta{FNN} |&| \meta{SNN, affix} |&| \meta{Alt. names} |>|\hfill\emph{W. nickname}\\
% |  \<| \meta{cseq5} |&| \hphantom{\meta{FNN}} |&| \meta{SNN}\hphantom{\textit{affix, }} |& >|\hfill\emph{ancient/mono}\\
% |  \<| \meta{cseq6} |&| \hphantom{\meta{FNN}} |&| \meta{SNN, affix} |& >|\hfill\emph{royal/ancient}\\
% |  \<| \meta{cseq7} |&| \hphantom{\meta{FNN}} |&| \meta{SNN, FNN} |& >|\hfill\emph{Eastern}\footnote{``Native'' Eastern names can be reversed to use Western order in the body text, but they will always have an Eastern form in the index.}\\
% |  \<| \meta{cseq8} |&| \hphantom{\meta{FNN}} |&| \meta{SNN}\hphantom{\textit{affix, }} |&| \meta{FNN/affix} |>|\hfill\emph{old syntax}\footnote{This is the old syntax for Eastern and royal names.}\\
% |\end{nameauth}|
% \end{quote}
%
% Each \meta{cseq} creates three macros. In the document text, |\|\meta{cseq} itself works like \cmd{\Name}. |\L|\meta{cseq} (think ``Long'') works like \cmd{\Name*}. |\S|\meta{cseq} (think ``Short'') works like \cmd{\FName}. Please bear in mind the following guidelines:
%
% \begin{itemize}\small
% \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. Think ``holy hand grenade of Antioch'' from \emph{Monty Python and the Holy Grail}.
% \item Leading and trailing spaces in each |&|-delimited field are stripped, as is also the case in the main interface.
% \item As in the main interface, medial spaces do not affect first-use control sequences, but they will affect name forms in the body text and index.
% \item In the document text, as with the main interface, include trailing braces |{|\,|}|, control spaces, or the like if text in brackets |[|\,|]| follows any of the shorthands, \emph{e.g.}, |\LWash{} [\emph{sic}].|
% \item The old syntax (Section~\ref{sec:obsolete}), triggered by an empty \meta{FNN} field, causes the \meta{Alt. names} field to be interpreted as either Eastern \meta{FNN} or an \meta{affix}. Due to its limitations and potential confusion, you are encouraged to avoid it unless you are using the \texttt{comma} option.
% \end{itemize}
% \clearpage
%
%  The example below illustrates a fairly complete set of names, apart from some special cases covered elsewhere in the manual:
%
% \begin{quote}\small
% |\begin{nameauth}|\\[0.2ex]
% |  \< Wash & George & Washington & >|\hfill\emph{Western}\\
% |  \< Soto & Hernando & de Soto & >|\hfill\emph{particle}\\
% |  \< JRII & John David & Rockefeller, II & >|\hfill\emph{affix}\\
% |  \< JRIV & John David & Rockefeller, IV & >|\hfill\emph{affix}\\
% |  \< JayR & John David & Rockefeller, IV & Jay >|\hfill\emph{nickname}\\
% |  \< Lewis & Clive Staples & Lewis & C.S. >|\hfill\emph{nickname}\\
% |  \< Jack & Clive Staples & Lewis & Jack >|\hfill\emph{nickname}\\
% |  \< Aris & & Aristotle & >|\hfill\emph{ancient}\\
% |  \< Eliz & & Elizabeth, I & >|\hfill\emph{royal}\\
% |  \< Attil & & Attila, the Hun & >|\hfill\emph{ancient}\\
% |  \< Konoe & Fumimaro & Konoe & >|\hfill\emph{Eastern/Western index}\\
% |  \< Yamt & & Yamamoto, Isoroku & >|\hfill\emph{Eastern/Eastern index}\\
% |\end{nameauth}|
% \end{quote}
%
% Now we see how this works in the body text, which you can compare with the index. A dagger (\dag) indicates an Eastern name with a Western index form.
%
% \begin{multicols}{2}\small
% \noindent\textbf{Basic Uses:}\\
% |\Wash|\hfill  \Wash \\
% |\LWash|\hfill \LWash \\
% |\Wash|\hfill \Wash \\
% |\SWash|\hfill \SWash \\[1ex]
% \textbf{Western Reversed with Comma:}\\
% |\RevComma\LWash|\hfill \RevComma\LWash \\[1ex]
% \textbf{Particles:}\\
% |\Soto|\hfill \Soto \\
% |\Soto|\hfill \Soto \\
% |\CapThis\Soto|\hfill \CapThis\Soto \\[1ex]
% \textbf{Affixes:}\\
% |\JRII|\hfill \JRII \\
% |\LJRII|\hfill \LJRII \\
% |\JRII|\hfill \JRII \\[1ex]
% \textbf{Nicknames:} (See Section~\ref{sec:Fname})\\
% |\JRIV|\hfill \JRIV \\
% |\LJRIV[Jay]|\hfill \LJRIV[Jay] \\
% |\SJRIV[Jay]|\hfill \SJRIV[Jay] \\
% |\SJRIV[Jay] \JRIV|\hfill \SJRIV[Jay] \JRIV\\
% |\LJayR|\hfill \LJayR \\
% |\SJayR|\hfill \SJayR \\
% |\SJayR\ \JayR|\hfill \SJayR\ \JayR\\
% |\Lewis|\hfill \Lewis\\
% |\Lewis|\hfill \Lewis\\
% |\LJack|\hfill \LJack\\
% |\SJack|\hfill \SJack\columnbreak\\
% \textbf{Ancient:}\\
% |\Aris|\hfill \Aris \\
% |\Aris|\hfill \Aris \\[3ex]
% \textbf{Medieval/Royal:}\\
% |\Eliz|\hfill \Eliz \\
% |\Eliz|\hfill \Eliz \\
% |\Atil|\hfill \Attil \\
% |\Atil|\hfill \Attil \\[3ex]
% \textbf{Western / Western Index:}\\
% |\Konoe|\hfill \Konoe \\
% |\LKonoe|\hfill \LKonoe \\
% |\Konoe|\hfill \Konoe \\[3ex]
% \textbf{Eastern / Western Index:}\\
% |\CapName\RevName\LKonoe|\\\hbox{}\hfill \indent\dag\CapName\RevName\LKonoe \\
% |\CapName\Konoe|\hfill \dag\CapName\Konoe \\[3.1ex]
% \textbf{Eastern / Eastern Index:}\\
% |\CapName\Yamt|\hfill \CapName\Yamt \\
% |\CapName\LYamt|\hfill \CapName\LYamt \\
% |\CapName\Yamt|\hfill \CapName\Yamt \\[3.1ex]
% \textbf{Western / Eastern Index:}\\
% |\RevName\LYamt|\hfill \RevName\LYamt \\
% |\Yamt|\hfill \Yamt
% \end{multicols}
%
% Sections~\ref{sec:standards}, \ref{sec:accents}, and~\ref{sec:IndexSort} deal with the pitfalls of accents and capitalization, as well as why you should use \cmd{\PretagName} for any name with control sequences or extended Unicode under NFSS. This becomes very important when authors and publishers use medieval names as Western names.
%
% When tagging or pre-tagging names (Section~\ref{sec:IndexSort}), the \meta{Alternate names} field has no effect on index tags. \cmd{\JRIV} and \cmd{\JayR} need only one tag:\\[1ex] \hbox{}\qquad|\TagName[John David]{Rockefeller, IV}{|\meta{something}|}|\\[1ex] Likewise, \cmd{\Lewis} and \cmd{\Jack} need only one tag:\\[1ex]\hbox{}\qquad|\TagName[Clive Staples]{Lewis}{|\meta{something}|}|\\[1ex] Only in the \meta{Alternate names} field can one use control sequences without them affecting index sorting, unlike in the other fields. If the \meta{FNN} field is empty, then you have the situation below.
%
% \subsubsection{Older Syntax}
% \label{sec:obsolete}
%
% An ``obsolete'' syntax remains for backward compatibility with early versions of \textsf{nameauth} and with the \texttt{comma} option. Please avoid mixing the older and newer forms to avoid possible confusion and error.
%
% The \texttt{comma} option causes Western names with affixes to have a comma. Yet that also causes Eastern and ancient names, or any names using a pattern like \meta{SNN, affix} or \meta{SNN, FNN} to display a comma where it should not occur. In that case the older syntax is needed. The old form lacks some error checking and robustness contained in the new syntax and limits the use of several macros, including \cmd{\AKA.} Section~\ref{sec:error} offers some cautions about the old syntax, as do many places in this manual. The form is:
%
% \begin{quote}
% |\Name{Dagobert}[I]|\hfill\emph{royal name}\\
% |\Name{Yoshida}[Shigeru]|\hfill\emph{Eastern name}\\
% |\begin{nameauth}|\\[0.5ex]
% |  \< Dagb & & Dagobert & I >|\hfill\emph{royal name}\\
% |  \< Yosh & & Yoshida & Shigeru >|\hfill\emph{Eastern name}\\
% |\end{nameauth}|\\[2ex]
% Here the \meta{FNN} fields are empty. That changes the final field from \meta{Alternate names} to \meta{affix/Eastern FNN}.
%
% |\Dagb| gives \Dagb, then \Dagb. In similar fashion, we see |\LDagb| \LDagb, |\CapName\Yosh| \CapName\Yosh, and |\CapName\RevName\LYosh| \CapName\RevName\LYosh.
% \end{quote}
%
% In the old syntax, |\Name{Henry}[VIII]| prints ``\Name{Henry}[VIII]'' and ``\Name{Henry}[VIII].'' If you mix |\Name{Henry}[VIII]| with the newer |\Name{Henry, VIII}| they both print \Name{Henry, VIII} and \Name{Henry, VIII} in the body text. Yet they generate different control sequences for both first/subsequent uses and index tags.\footnote{Technically you can mix the two, as I do here. You must force first and subsequent uses with \cmd{\ForgetName} and \cmd{\SubvertName}. You must make common index tags, \emph{e.g.}: \cmd{\TagName}\texttt{\{Henry, VIII\}\{, king\}} and \cmd{\TagName}\texttt{\{Henry\}[VIII]\{, king\}}. That undermines the time-saving features offered by this package.}
%
% \IndexInactive%
% Avoid |\Name{Henry, VIII}[Tudor]| unless you want ``\Name*{Henry, VIII}[Tudor]'' and ``\Name{Henry, VIII}[Tudor]'' in the body text and ``Henry VIII Tudor'' in the index.
% \IndexActive%
% One solution adds ``Tudor'' as needed in the text after |\Name{Henry, VIII}| and uses a tag in the index: |\TagName{Henry, VIII}{ Tudor}| (see Section \ref{sec:TagName}).
%
% \clearpage
%
% \subsection{Naming Macros}
% \label{sec:Naming}
%
% \subsubsection{\texttt{\textbackslash Name} and \texttt{\textbackslash Name*}}
% 
% \DescribeMacro{\Name}
% \DescribeMacro{\Name*}
% This macro generates two forms of the name: a printed form in the text and a form of the name that occurs in the index.
% The general syntax is:
% \begin{quote}
% \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\\
% \cmd{\Name*}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \noindent Here we see how the syntax works:
%
% \begin{quote}\small
% \begin{tabular}{ll}\hline
% {\large\strut}|\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\
% {\large\strut}|\Name*[Albert]{Einstein}| & \Name*[Albert]{Einstein}\\
% {\large\strut}|\Name[Albert]{Einstein}| & \Name[Albert]{Einstein}\\\hline
% {\large\strut}|\Name{Confucius}| & \Name{Confucius}\\
% {\large\strut}|\Name*{Confucius}| & \Name*{Confucius}\\
% {\large\strut}|\Name{Confucius}| & \Name{Confucius}\\\hline
% {\large\strut}|\Name[M.T.]{Cicero}[Marcus Tullius]| & \Name[M.T.]{Cicero}[Marcus Tullius]\\
% {\large\strut}|\Name*[M.T.]{Cicero}[Marcus Tullius]| & \Name*[M.T.]{Cicero}[Marcus Tullius]\\
% {\large\strut}|\Name[M.T.]{Cicero}[Marcus Tullius]| & \Name[M.T.]{Cicero}[Marcus Tullius]\\\hline
% {\large\strut}|\Name{Charles, the Bald}| & \Name{Charles, the Bald}\\
% {\large\strut}|\Name*{Charles, the Bald}| & \Name*{Charles, the Bald}\\
% {\large\strut}|\Name{Charles, the Bald}| & \Name{Charles, the Bald}\\\hline
% \end{tabular}
% \end{quote}
%
% \cmd{\Name} displays and indexes names, as illustrated in Section~\ref{sec:PatRef}. It always prints the \meta{SNN} field. \cmd{\Name} prints the ``full name'' at the first occurrence, then the partial form thereafter. \cmd{\Name*} always prints the full name.
%
% The \meta{Alternate names} field replaces the \meta{FNN} field in the body text only. It does this if the \meta{FNN} field is not empty; see ``\Name[M.T.]{Cicero}[Marcus Tullius]'' above. Regarding their index entries, |\Name[M.T.]{Cicero}[Marcus Tullius]| and |\Name[M.T.]{Cicero}| are equivalent. This lets one use a nickname while keeping the indexed form constant. If the \meta{FNN} is empty, you get the old syntax for Eastern and royal names (Section~\ref{sec:obsolete}).
%
% \begin{quote}
%|\begin{nameauth}|\\
%|  \< Einstein & Albert & Einstein & >|\\
%|  \< Cicero & M.T. & Cicero & >|\\
%|  \< Confucius & & Confucius & >|\\
%|  \< CBald & & Charles, the Bald & >|\\
%|\end{nameauth}|
%\end{quote}
%
% \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
% Here we have the equivalent with the simplified interface. |\Einstein,| |\LEinstein,| and |\Einstein| produce \Einstein, \LEinstein, and \Einstein. |\CBald| and |\CBald| give \CBald\ and \CBald. |\Confucius| yields \Confucius\ and \Confucius. |\Cicero| prints \Cicero\ and \Cicero, while |\LCicero[Marcus Tullius]| gives \LCicero[Marcus Tullius]. The next page explains why this form may be preferable in some cases for name variants when using the simplified interface.
% \clearpage
%
% \subsubsection{Forenames: \texttt{\textbackslash FName}}
% \label{sec:Fname}
%
% \DescribeMacro{\FName}
% \DescribeMacro{\FName*}
% \cmd{\FName} and its synonym \cmd{\FName*} print just forenames, but only in subsequent name uses.\footnote{The two macros are the same in case you edit \cmd{\Name*} by adding an |F| to get a first reference, just as you might edit \cmd{\Name} the same way to get the same result.}
% They are intended for Western-style names. The syntax is:
% \begin{quote}
% \cmd{\FName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% This macro always prints full name when a name is first used. That prevents a first-name reference before a person has been introduced. To force a short name as a first reference, you could use a macro to incorporate:
% \begin{quote}
% \cmd{\SubvertName}\oarg{FNN}\marg{SNN}|%|\\
% \cmd{\makeatletter}\cmd{\@nameauth@FirstFormattrue}\cmd{\makeatother}|%|\\
% \cmd{\FName}\oarg{FNN}\marg{SNN}
% \end{quote}
% By design, \cmd{\FName} \emph{never} prints Eastern personal names so that ancient names also work (cf. Section~\ref{sec:PatRef}). Examples of general use include: \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
%
% \begin{quote}\small
% \begin{tabular}{ll}\hline
% {\large\strut}|\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\
% {\large\strut}|\FName[Albert]{Einstein}| & \FName[Albert]{Einstein}\\\hline
% {\large\strut}|\FName{Confucius}| & \FName{Confucius}\\
% {\large\strut}|\FName{Confucius}|& \FName{Confucius}\\\hline
% {\large\strut}|\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\
% {\large\strut}|\FName[M.T.]{Cicero}[Marcus Tullius]| & \FName[M.T.]{Cicero}[Marcus Tullius]\\\hline
% {\large\strut}|\FName{Charles, the Bald}| & \FName{Charles, the Bald}\\
% {\large\strut}|\FName{Charles, the Bald}| & \FName{Charles, the Bald}\\\hline
% \end{tabular}\\
% \end{quote}
%
% With the simplified interface example from the previous page, |\SEinstein,| |\SConfucius,| |\SCicero,| and |\SCBald| give us \SEinstein, \SConfucius, \SCicero, and \SCBald. |\SCicero[Marcus Tullius]| gives \SCicero[Marcus Tullius]. However, with the macro |\FName[Chesley B.]{Sullenberger, III}[Sully]| we have ``\FName[Chesley B.]{Sullenberger, III}[Sully]'' and ``\FName[Chesley B.]{Sullenberger, III}[Sully].'' Please use caution!
%
%\ForgetName[Clive Staples]{Lewis} This may not always be a ``bug.'' Remembering Section~\ref{sec:simplestart}, you can use \Lewis\ or ``\SJack.'' |\FName[Clive Staples]{Lewis}[C.S.]| or \cmd{\Lewis} gives the first form, while |\FName[Clive Staples]{Lewis}[Jack]| or \cmd{\Jack} gives the second.   |\SJayR| gave \ForgetName[John David]{Rockefeller, IV}\SJayR\ and \SJayR, but the index entry remains ``Rockefeller, John David, IV.'' Using ``default nicknames'' in the simplified interface has some caveats:
%
% \begin{nameauth}%
% \< Ches & Chesley B. & Sullenberger, III & >%
% \< Sully & Chesley B. & Sullenberger, III & Sully >%
% \end{nameauth}%
% \begin{quote}
% |\begin{nameauth}|\\
% |  \< Ches & Chesley B. & Sullenberger, III & >|\\
% |  \< Sully & Chesley B. & Sullenberger, III & Sully >|\\
% |\end{nameauth}|
% \end{quote}
%
% \ForgetName[Chesley B.]{Sullenberger, III} The first use \cmd{\Ches} prints ``\Ches.'' Later, \cmd{\SChes} and \cmd{\SSully} print ``\SChes'' and ``\SSully.'' While |\SChes[Sully]| always gives ``\SChes[Sully],'' |\SSully[Chesley B.]| prints ``\SSully[Chesley B.].'' The \meta{Alternate names} field is always occupied when using \cmd{\Sully,} etc. Thus, the final |[Chesley B.]| is not a macro argument.
%\clearpage
%
%
% \subsection{Affixes and Eastern Names}
%
% \subsubsection{Affixes Need Commas}
% \label{sec:Affix}
%
% Comma-delimited affixes handle several different name types. \emph{Always include a comma as an affix delimiter}, even when the |nocomma| option does not print the comma. Extra spaces between the comma and affix are ignored. Extra commas have no effect. Other name types include royal, medieval, and Eastern names:
%
% \begin{quote}\small\ForgetName{Sun, Yat-sen}
% \begin{tabular}{ll}\hline
% {\large\strut}|\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\
% {\large\strut}|\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\\hline
% {\large\strut}|\Name{Louis, XIV}| & \Name{Louis, XIV}\\
% {\large\strut}|\Name{Louis, XIV}| & \Name{Louis, XIV}\\\hline
% {\large\strut}|\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\
% {\large\strut}|\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\\hline
% \end{tabular}
% \end{quote}
%
% You cannot use the old syntax with the \Name[Oskar]{Hammerstein, II} example. One must use comma-delimited suffixes when cross-referencing affixed Western names, royal names, some medieval names, and Eastern names with \cmd{\AKA}; see Section~\ref{sec:AKA}.\medskip
%
% \DescribeMacro{\KeepAffix}
% Put \cmd{\KeepAffix} before \cmd{\Name} or \cmd{\AKA} if a line break or page break divides a \meta{SNN, affix} pair. This puts a non-breaking space between \meta{SNN} and \meta{affix} in the body text, but not in the index. Other options to fix bad breaks include using \cmd{\hbox}, kerning and spacing in the \textsf{microtype} package, etc.\medskip
%
% \DescribeMacro{\ShowComma}
% The \texttt{comma} option is restrictive and used to reproduce older texts. \cmd{\ShowComma} gets the same results on a per-name basis while using the default |nocomma| option. With |\ShowComma\Name[Louis]{Gossett, Jr.}| one gets \ShowComma\Name[Louis]{Gossett, Jr.}. One must use \cmd{\ShowComma} consistently or risk errors in the body text and index.\bigskip
%
% \noindent{\large\bfseries Compare Older Syntax}\\[2ex]
% Avoid using the older syntax, shown below, except with the \texttt{comma} option. The older syntax prevents Eastern and ancient names that use the \meta{SNN, affix} pattern from having unwanted commas in them with the \texttt{comma} option or with \cmd{\ShowComma.} \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms. These older forms include:
%
% \begin{quote}\small\ForgetName{Henry}[VIII]
% \begin{tabular}{ll}\hline
% {\large\strut}|\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\
% {\large\strut}|\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\\hline
% {\large\strut}|\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\
% {\large\strut}|\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\\hline
% \end{tabular}
% \end{quote}
% These older forms work because no \meta{FNN} are present. Otherwise you would get weird nicknames. Again, to avoid potential frustration, please avoid using the older syntax unless you need it.
% \clearpage
%
% \subsubsection{Eastern Names}
% \label{sec:Eastern}
%
% The \textsf{nameauth} package offers ``non-native'' and ``native'' ways to handle romanized Eastern names. \cmd{\RevName}\cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN} will produce an Eastern name in the body text and the Western form \meta{SNN}, \meta{FNN} in the index, including the comma. We call this ``non-native'' mode.
%
% In contrast, both \cmd{\Name}\marg{Eastern SNN, Eastern FNN} and the older syntax \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN} produce an Eastern name form in the body text: \meta{SNN} \meta{FNN} as well as in the index. This form has no comma in the index. We call this ``native'' mode. Offering these two modes gives the greatest flexibility in indexing requirements.\bigskip
%
% \DescribeMacro{\ReverseActive}
% \DescribeMacro{\ReverseInactive}
% \DescribeMacro{\RevName}
% The ``smart'' reverse output mechanism converts between Western and Eastern forms in the text, but not the index. If one wants a Western-format index, then pick non-native mode. If Eastern forms are okay in the index, then pick native mode. In addition to the class options described in Section~\ref{sec:options}, \cmd{\ReverseActive} and \cmd{\ReverseInactive} toggle reversing on a larger scale, while \cmd{\RevName} is used once per \cmd{\Name}.
%
% This list of Japanese music artists shows \cmd{\RevName} in action. Names in Western order, then non-native Eastern order are marked with a dagger ({\dag}). All other names are in native Eastern, then Western order. Forms using the old syntax are in parentheses. Name formatting is turned off in order to focus on reversing:
%
% \NamesInactive
% \begin{quote}\small
% \begin{tabular}{lll}\hline
% {\large\strut} & \emph{unchanged} & |\RevName|\\
% {\large\strut}\dag|\Name*[Aiko]{Nakano}| & \dag\Name*[Aiko]{Nakano} & \dag\RevName\Name*[Aiko]{Nakano}\\
% {\large\strut}|\Name*{Arai, Akino}| & \Name*{Arai, Akino} & \RevName\Name*{Arai, Akino}\\
% {\large\strut}(|\Name*{Ishida}[Yoko]|) & (\Name*{Ishida}[Yoko]) & (\RevName\Name*{Ishida}[Yoko])\\
% {\large\strut}|\Name*{Yohko}| & \Name*{Yohko} & \RevName\Name*{Yohko}\\\hline
% \end{tabular}
% \end{quote}
% \NamesActive\medskip
%
% \DescribeMacro{\AllCapsActive}
% \DescribeMacro{\AllCapsInactive}
% \DescribeMacro{\CapName}
% Use \cmd{\AllCapsActive}, \cmd{\AllCapsInactive}, and \cmd{\CapName} for fully-capitalized family names in the body text. These macros are analogous to the reversing macros above and may be used alone or with those and other state-toggling macros, \emph{e.g.} \cmd{\CapName}\cmd{\RevName}\cmd{\Name}. Names in Western order, then non-native Eastern order are marked with a dagger ({\dag}). All other names are in native Eastern, then Western order. Forms using the old syntax are in parentheses. Name formatting is turned off in order to focus on capitalizing and reversing:
%
% \NamesInactive
% \begin{quote}\small
% \begin{tabular}{l@{ }l@{ }l}\hline
% {\large\strut} & \emph{unchanged} & |\CapName\RevName|\\
% {\large\strut}\dag|\Name*[Yoko]{Kanno}| & \dag\CapName\Name*[Yoko]{Kanno} & \dag\CapName\RevName\Name*[Yoko]{Kanno}\\
% {\large\strut}|\Name*{Shikata, Akiko}| & \CapName\Name*{Shikata, Akiko} & \CapName\RevName\Name*{Shikata, Akiko}\\
% {\large\strut}(|\Name*{Nogawa}[Sakura]|) & (\CapName\Name*{Nogawa}[Sakura]) & (\CapName\RevName\Name*{Nogawa}[Sakura])\\
% {\large\strut}|\Name*{Yohko}| & \CapName\Name*{Yohko} & \CapName\RevName\Name*{Yohko}\\\hline
% \end{tabular}
% \end{quote}
% \NamesActive\smallskip
%
% Notice how capitalization is independent of formatting. The reversing and capitalization macros also work with \cmd{\AKA}. They affect only the text, not the index. For caps in the text and index see Section~\ref{sec:formatting}.\clearpage
%
% \subsection{Other Naming Topics}
% {\hfill\large\bfseries Language-Related Issues\hfill}\vspace{-2ex}
% \subsubsection{Particles}
% \label{sec:standards}
%
% According to 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}.\medskip
%
% \DescribeMacro{\CapThis}
% In English, these particles go in the \meta{SNN} field of \cmd{\Name}, \emph{e.g.}, \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare}. |\CapThis\Name[Walter]{de la Mare}| lets you capitalize \emph{de} when at the beginning of a sentence. \CapThis\Name[Walter]{de la Mare} will think it fair. \CapThis\Soto\ (using |\CapThis\Soto| from Section~\ref{sec:simplestart}) would agree.
%
% Connect one-character particles with surnames via |~| or \cmd{\nobreakspace} to avoid bad breaks and prevent \cmd{\CapThis} from eating the space between the particle and the surname. There are no issues when particles have two or more characters in them, as do those listed above.\medskip
%
% \DescribeMacro{\AccentCapThis}
% \cmd{\CapThis} (and \cmd{\AccentCapThis}) always work and give the same desired results with \texttt{xelatex} and \texttt{lualatex}. With \texttt{pdflatex} you \emph{must} use \cmd{\AccentCapThis} when the first letter of the particle is an extended Unicode character.
% \begin{quote}
% |\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}\\
% |  \< KempW & Thomas & à~Kempis & >|\hfill\emph{Western}\\
% |\end{nameauth}|
% \end{quote}
%
% You do not need either \cmd{\CapThis} or \cmd{\AccentCapThis} if you use the medieval forms \KempMed\ and \KempMed. It is important that you do not mix medieval and Western forms to avoid odd name forms and multiple index entries.\footnote{Properly speaking, ``à~Kempis'' and ``Aquinas'' are not surnames but suffixed place names. They create different index entries from Western names and look different in the text.}
%
% \IndexInactive%
% Nevertheless, many people refer to such names as Western surnames, which purists might view as being incorrect. If you need to use the Western variant, you might have to use |\AccentCapThis\KempW| to get \SubvertName[Thomas]{à~Kempis}``\AccentCapThis\KempW.''
% \begin{itemize}\small
% \item Use \cmd{\PretagName} in all names with extended Unicode characters under \texttt{pdflatex}, NFSS, \textsf{inputenc}, and \texttt{makeindex}. See Section~\ref{sec:IndexSort}.
% \item |\CapThis\KempW| halts execution with \texttt{Argument of \textbackslash UTFviii@two@ octets has an extra \}.} Section~\ref{sec:accents} explains why.
% \item |\AccentCapThis\Name[Thomas]{à Kempis}| gives ``\AccentCapThis\Name[Thomas]{à Kempis}'' (space removed) in the absence of a non-breaking space or an explicit \cmd{\space.} This is due to \TeX\ handling ``|#1#2#3\relax|.'' 
% \item Under \texttt{pdflatex} \cmd{\AccentCapThis} should not be used if the first character of a particle is not accented. |\AccentCapThis\Soto| gives \AccentCapThis\Soto. A particle like |lé| would cause \cmd{\AccentCapThis} to fail. Section~\ref{sec:accents} explains more.
% \end{itemize}
% \IndexActive%
% To summarize, use non-breaking spaces when needed. With \texttt{pdflatex} and \textsf{inputenc}, use \cmd{\CapThis} when the first character of the particle is \texttt{a--z.} Use \cmd{\AccentCapThis} when the first character is extended Unicode.
% \clearpage
% You\marginpar{\small\raggedleft Alternates} could use name forms with braces, like |\Name[Thomas]{{à}~Kempis}|, and control sequences, like |\Name[Thomas]{\`a~Kempis}|. Using those forms consistently, with \cmd{\PretagName,} would require you to use \cmd{\CapThis,} never \cmd{\AccentCapThis}. That is because both |{à}| and |\`a| are passed as one macro argument, while under NFSS and \textsf{inputenc}, |à| is passed as two arguments in ``|#1#2#3\relax|'' (see Section~\ref{sec:accents}).
%
% Non-English contexts do not necessarily bind particles to surnames. Using \cmd{\Name} and \cmd{\FName} with alternate forenames helps address this and may skirt the particle capitalization issue. See also Section~\ref{sec:Particles}.
%
% \subsubsection{Formatting 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. Remember also to use \cmd{PretagName} to get the correct index sorting:
% \begin{quote}
% |\PretagName[E.\,B.]{White}{White, E. B.}|\\
% |\begin{nameauth}|\\
% |  \< White & E.\,B. & White & >|\\
% |\end{nameauth}|\\
% \begin{nameauth}
%   \< White & E.\,B. & White & >
% \end{nameauth}
% 
% \begin{tabular}{ll}\hline
% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\,\vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White} and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\,\vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\
% \cmd{\White} and \cmd{\LWhite} & \White\ and \LWhite\\
% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\,\vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White} and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\,\vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\\hline
% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\ \vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White}\,and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\ \vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\
% Normal:\hfill & \textsc{E. B. White}\,and E. B. White.\\
% & \vrule width0.5pt\hphantom{\textsc{E.}}\vrule width0.5pt\ \vrule width0.5pt\hphantom{\textsc{B.}}\vrule width0.5pt\hphantom{\textsc{White}\,and }\vrule width0.5pt\hphantom{E.}\vrule width0.5pt\ \vrule width0.5pt\hphantom{B.}\vrule width0.5pt\hphantom{White}\\\hline
% \end{tabular}
% \end{quote}
%
% \subsubsection{Hyphenation}
%
% The simplified interface trivializes the consistent insertion of optional hyphens in names, as we see below:
%
% \begin{quote}
% |\begin{nameauth}|\\
% |  \< Bier & Johann & Bier\-mann & >|\\
% |\end{nameauth}|
% \end{quote}
% We get \Bier\ and \Bier. This should prevent the break ``Bi-ermann,'' which could happen otherwise. You can even tag and untag such forms. The bad break above was manufactured, while the bad break below is actual.
%
% \newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}
% Bad breaks can be fixed with the \textsf{babel} or \textsf{polyglossia} packages. \Name[John]{Strietelmeier} can have a bad break in English, as you see. Using \textsf{babel}, we can use the following example so that |\de{\Name*[John]{Strietelmeier}}| generates \de{\Name*[John]{Strietelmeier}} and helps prevent bad breaks:
% \begin{quote}
% |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}|
% \end{quote}
%
% \subsubsection{Listing by Surname}
% \label{sec:LastFirst}
%
%\DescribeMacro{\ReverseCommaActive}
%\DescribeMacro{\ReverseCommaInactive}
%\DescribeMacro{\RevComma}
% The reversing macros \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}\ allow the easy generation of name lists ordered as \meta{SNN}, \meta{FNN} or \meta{SNN}, \meta{Alt. names}. The first two are broad toggles, while the third works on a per-name basis. Eastern, medieval, and royal names do not work with these macros. Name formatting has been turned off to focus on reversing and commas:
%
% \NamesInactive
% \begin{quote}\small
% \begin{tabular}{lll}
% {\large\strut}\Name*[J.S.]{Mill}[John Stuart] & \RevComma\Name*[J.S.]{Mill}[John Stuart] & OK\\
% {\large\strut}\Name*[Oskar]{Hammerstein, II} & \RevComma\Name*[Oskar]{Hammerstein, II} & OK\\
% {\large\strut}\Name*{John, Eriugena} & \RevComma\Name*{John, Eriugena} & incompatible\\
% {\large\strut}\Name*{Mao}[Tse-tung] & \RevComma\Name*{Mao}[Tse-tung] & incompatible\\
% {\large\strut}\Name*{Anaximander} & \RevComma\Name*{Anaximander} & OK\\
% \end{tabular}
% \end{quote}
% \NamesActive
%
% {\hfill\large\bfseries Technical-Related Issues\hfill}\vspace{-2ex}
% \subsubsection{Fault Tolerance}
%
% Especially since version 2.0, the \textsf{nameauth} package tries to prevent malformed input from creating side effects. For example, the malformed |\Name[Henry]{VIII}| no longer interferes with the well-formed |\Name{Henry}[VIII].| Furthermore, we guard against empty required values being passed to naming macros.
%
% To reduce errors, \cmd{\Name}, \cmd{\FName}, \cmd{\AKA}, and \cmd{\IndexName} ignore leading and trailing spaces\,---\,but not medial spaces\,---\,making the following equivalent:
%
% \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.}
% \begin{tabular}{ll}
% \textit{Macro Example} & \textit{Resulting text}\\
% |\Name*[ Martin Luther]{King, Jr.}| & \Name*[ Martin Luther]{King, Jr.}\\
% |\Name*[Martin Luther ]{King, Jr.}| & \Name*[Martin Luther ]{King, Jr.}\\
% |\Name*[ Martin Luther ]{King, Jr.}| & \Name*[ Martin Luther ]{King, Jr.}\\
% |\Name*[Martin Luther]{ King, Jr.}| & \Name*[Martin Luther]{ King, Jr.}\\
% |\Name*[Martin Luther]{King, Jr. }| & \Name*[Martin Luther]{King, Jr. }\\
% |\Name*[Martin Luther]{ King, Jr. }| & \Name*[Martin Luther]{ King, Jr. }\\
% \end{tabular}
% \end{quote}
%
% \subsubsection{Detecting Punctuation}
%
% In Western names, some affixes with full stops could appear at the end of a sentence. Such affixes include ``Jr.'' (junior), ``Sr.'' (senior), ``d.\,J.'' (\textit{der J\"ungere}), and ``d.\,\"A.'' (\textit{der \"Altere}). Consider this example:
%
% \begin{quote}\footnotesize\ForgetName[Martin Luther]{King, Jr.}
% \begin{tabular}{r@{\hbox to 1em{\hfil}}c@{\hbox to 1em{\hfil}}l}
% \textit{Macro Example} & \textit{periods} & \textit{Resulting text}\\
% |\Name[Martin Luther]{King, Jr.}.| & $2\rightarrow1$ & \Name[Martin Luther]{King, Jr.}.\\
% |\Name[Martin Luther]{King, Jr.}.| & $2\rightarrow1$ & \Name[Martin Luther]{King, Jr.}.\\
% |\Name[Martin Luther]{King, Jr.}|\texttt{\textvisiblespace} & $1\rightarrow0$ & \Name[Martin Luther]{King, Jr.}\\
% |\Name*[Martin Luther]{King, Jr.}.| & $2\rightarrow1$ & \Name*[Martin Luther]{King, Jr.}.\\
% |\Name*[Martin Luther]{King, Jr.}|\texttt{\textvisiblespace} & $1\rightarrow1$ & \Name*[Martin Luther]{King, Jr.}\\
% |{\Name*[Martin Luther]{King, Jr.}}.| & $2\rightarrow2$ & {\Name*[Martin Luther]{King, Jr.}}.\footnotemark\\
% \end{tabular}\footnotetext{Example of how to frustrate the full stop detection mechanism.}
% \end{quote}
%
%   \cmd{\Name}, \cmd{\FName}, and \cmd{\AKA} all check for a trailing full stop in the printed name in the text. If it exists, and if the next token is also a full stop, they gobble the trailing full stop. Grouping tokens, among other items, can frustrate this detection, as shown above.
%
% \subsubsection{Accented Names}
% \label{sec:accents}
% 
% For texts that contain accented characters, using \texttt{xelatex} or \texttt{lualatex} with \texttt{xindy} (\texttt{texindy}) is recommended. Since version 2.1, \textsf{nameauth} only requires special treatment of the leading character in the \meta{SNN} field when you use \cmd{\CapThis} under \texttt{pdflatex}. In that case use \cmd{\AccentCapThis} (Section~\ref{sec:standards}) if the character is not \texttt{a--z} or in the list below, for use with NFSS and the |utf8| input encoding:
% \begin{quote}\small
% \begin{tabular}{llll}
% \scshape À Á Â Ã Ä Å Æ & \scshape Ç È É Ê Ë & \scshape Ì Í Î Ï Ð Ñ & \scshape first use \\
% À Á Â Ã Ä Å Æ & Ç È É Ê Ë & Ì Í Î Ï Ð Ñ & second use \\[1ex]
% \scshape Ò Ó Ô Õ Ö Ø & \scshape Ù Ú Û Ü Ý & \scshape Þ ß & \scshape first use \\
% Ò Ó Ô Õ Ö Ø & Ù Ú Û Ü Ý & Þ ß & second use \\[1ex]
% \scshape à á â ã ä å æ & \scshape ç è é ê ë & \scshape ì í î ï ð ñ & \scshape first use \\
% à á â ã ä å æ & ç è é ê ë & ì í î ï ð ñ & second use \\[1ex]
% \scshape ò ó ô õ ö ø & \scshape ù ú û ü ý & \scshape þ ÿ & \scshape first use \\
% ò ó ô õ ö ø & ù ú û ü ý & þ ÿ & second use \\[1ex]
% \scshape Ă ă Ą ą Ć ć Č č & \scshape Ď ď Đ đ Ę ę Ě ě & \scshape Ğ ğ İ ı & \scshape first use \\
% Ă ă Ą ą Ć ć Č č & Ď ď Đ đ Ę ę Ě ě & Ğ ğ İ ı & second use \\[1ex]
% \scshape IJ ij Ľ ľ Ł ł & \scshape Ń ń Ň ň Œ œ & \scshape Ŕ ŕ Ř ř & \scshape first use \\
% IJ ij Ľ ľ Ł ł & Ń ń Ň ň Œ œ & Ŕ ŕ Ř ř & second use \\[1ex]
% \scshape Ś Ş ş Š š Ţ ţ Ť ť & \scshape Ů ů Ű ű & \scshape Ź ź Ż ż Ž ž & \scshape first use \\
% Ś Ş ş Š š Ţ ţ Ť ť & Ů ů Ű ű & Ź ź Ż ż Ž ž &  second use \\
% \end{tabular}
% \end{quote}
% These characters really act as control sequences, so you must use \cmd{\PretagName} (Section~\ref{sec:IndexSort}) to sort them properly.
%
% Examples |{æ}| and \cmd{\ae} always use argument |#1| if sent through the macro: |\def\foo#1#2#3\relax{<#1#2><#3>}.| With |\foo abc\relax| you always get <ab><c>. Both |\foo {æ}bc\relax| and |\foo \ae bc\relax| give <æb><c>.
%
% Using |æ| by itself gets tricky. In \texttt{xelatex} and \texttt{lualatex} this character always uses |#1| in |\foo æbc\relax| to get <æb><c>. Using \texttt{pdflatex} with NFSS causes problems; |\foo æbc\relax| gives <æ><bc>. With \textsf{inputenc} and \textsf{fontenc} |æ| by itself uses |#1#2|. It is ``two arguments wide.'' Any macro where this |#1#2| pair gets split into |#1| and |#2| will produce either the error \texttt{Unicode char \dots not set up for LaTeX} or the error \texttt{Argument of \textbackslash UTFviii@two@ octets has an extra \}}. Using \cmd{\CapThis} can trigger this kind of error in \texttt{pdflatex.}
% 
% Unicode characters and control sequences are not interchangeable. The example below shows this difference because the names are all long instead of long, then short (if they were the same):
% \begin{quote}
% \IndexInactive%
% |\Name[Johann]{Andre\"a}|\hfill \Name[Johann]{Andre\"a}\\
% \IndexActive%
% |\Name[Johann]{Andreä}|\hfill \Name[Johann]{Andreä} instead of \Name[Johann]{Andreä}\\
% \IndexInactive%
% |\Name{\AE thelred, II}|\hfill \Name{\AE thelred, II}\\
% \IndexActive%
% |\Name{Æthelred, II}|\hfill \Name{Æthelred, II} instead of \Name{Æthelred, II}
% \end{quote}
%
% 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}
% |\usepackage{newunicodechar}|\\
% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
% |\newunicodechar{ſ}{\textlongs}|
% \end{quote}
%
% Additionally, |\newunicodechar{ā}{\=a}| allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz\=ali}\IndexActive. But be careful! Control sequences like |\=a| fail when using \texttt{makeindex} and \texttt{gind.ist}, such as with the \textsf{ltxdoc} class, because the equal sign is an ``actual'' character instead of |@|. Using |\index{Gh{\=a}zali}| halts execution. Using |\index{Gh\=azali}| gives an ``azali'' entry sorted under ``Gh'' (thanks \Name[Dan]{Luecking}). This issue is not specific to \textsf{nameauth} and affects any document where one uses \texttt{gind.ist}.
%
%One may use expandable control sequences in names (thanks \Name*[Robert]{Schlicht}). Also, you can define letters with \cmd{\edef} and \cmd{\noexpand} to use in names, as some do to ``protect'' accented letters in names. As of version 2.0 of \textsf{nameauth} helpful concerns expressed by \Name[Patrick]{Cousot} have been addressed.
% 
% This package tries to work with multiple languages and typesetting engines. The following preamble snippet illustrates how that can be done:
% \begin{quote}\small
% |\usepackage{ifxetex}|\\
% |\usepackage{ifluatex}|\\
% |\ifxetex|\hfill |% uses fontspec|\\
% \hbox{\quad}|\usepackage{fontspec}|\\
% \hbox{\quad}|\defaultfontfeatures{Mapping=tex-text}|\\
% \hbox{\quad}|\usepackage{xunicode}|\\
% \hbox{\quad}|\usepackage{xltxtra}|\\
% |\else|\\
% \hbox{\quad}|\ifluatex|\hfill |% also uses fontspec|\\
% \hbox{\quad}\hbox{\quad}|\usepackage{fontspec}|\\
% \hbox{\quad}\hbox{\quad}|\defaultfontfeatures{Ligatures=TeX}|\\
% \hbox{\quad}|\else|\hfill |% traditional NFSS|\\
% \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\
% \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\
% \hbox{\quad}|\fi|\\
% |\fi|
% \end{quote}
%
% The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:
%
% \begin{quote}\small
% |\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}
%
% \subsubsection{Custom Formatting}
% \label{sec:formatting}
%
% There are two kinds of formatting at work:
% \begin{enumerate}\small
% \item \textbf{Syntactic Formatting:} This includes reversing names, capitalizing the first letter in the \meta{SNN} field in the body text, and capitalizing the root when \meta{SNN} is a \meta{root, suffix} pair.
% \item \textbf{Typographic Formatting:} This happens after a name has been parsed and reordered as needed into the final form it will take in the text.
% \end{enumerate}
% Formatting\marginpar{\small\raggedleft Continental\\ small caps} does not affect the index. However, literal control sequences in the macro arguments of \cmd{\Name} and friends do make it into the index. Use this method with the \texttt{noformat} option to suppress default formatting. One also must use \cmd{\PretagName} to get proper index sorting:
% \NamesInactive
% \begin{quote}
% \indent|\PretagName[Greta]{\textsc{Garbo}}{Garbo, Greta}|\\
% \indent|\Name[Greta]{\textsc{Garbo}}|
% \end{quote}
% You get \Name[Greta]{\textsc{Garbo}}, then \Name[Greta]{\textsc{Garbo}}. Even if it ``looks the same,'' the name |\Name[\normalfont{Greta}]{\textsc{Garbo}}| is a different name with a different index entry. In other words, avoid putting excess formatting into names, so that you gain both flexibility and consistency.
% 
% A comma delimiter will split the macro argument, potentially causing unbalanced braces. Avoid this by formatting the name and suffix separately:
% \begin{quote}\small
% |\PretagName{\uppercase{Fukuyama},| |Takeshi}{Fukuyama,| |Takeshi}|\\
% |\PretagName[Thurston]{\textsc{Howell},\textsc{III}}%|\\
% |  {Howell, Thurston 3}|\\[1ex]
% |\begin{nameauth}|\\
% |  \< Fukuyama & & \uppercase{Fukuyama}, Takeshi & >|\\
% |  \< Howell & Thurston & \textsc{Howell},\textsc{III} & >|\\
% |\end{nameauth}|
% \end{quote}
% \cmd{\Fukuyama} produces \Fukuyama\ and \Fukuyama. Of course, you could type all-capital surnames without control sequences. Likewise, \cmd{\Howell} generates \Howell\ and \Howell.
% \NamesActive\bigskip
%
% \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}
% |\makeatletter|\\
% |\newcommandx*\MyName[3][1=\@empty, 3=\@empty]%|\\
% |  {|\meta{Name here}|}%|\\
% |\newcommandx*\MyLName[3][1=\@empty, 3=\@empty]%|\\
% |  {|\meta{Long name here}|\@nameauth@FullNamefalse}%|\\
% |\newcommandx*\MyFName[3][1=\@empty, 3=\@empty]%|\\
% |  {|\meta{Short name here}|\@nameauth@FirstNamefalse}%|\\
% |\makeatother|
% \end{quote}
% \clearpage
%
% 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}
% \makeatletter%
% \newcommandx*\MyName[3][1=\@empty, 3=\@empty]{\meta{Name here}}%
% \newcommandx*\MyLName[3][1=\@empty, 3=\@empty]{\meta{Long name here}\@nameauth@FullNamefalse}%
% \newcommandx*\MyFName[3][1=\@empty, 3=\@empty]{\meta{Short name here}\@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 \cmd{\NamesFormat} below, the macros \cmd{\NameauthName,} \cmd{\NameauthLName,} and \cmd{\NameauthFName} respect scoping unless you use \cmd{\global.} Now \cmd{\Silly} and |\Name[No Particular]{Name}| produce \IndexInactive\Silly\ and \Name[No Particular]{Name}\IndexActive.\bigskip
%
% \DescribeMacro{\NamesFormat}
% When formatting is active, \cmd{\NamesFormat} is called at the first instance of a name, and at every instance of a name when the \texttt{alwaysformat} option is used. Beyond using the package options, one also can redefine \cmd{\NamesFormat} to create custom effects. For example, one might change formatting in all footnotes:
%
% \begin{quote}\small
% |\makeatletter|\\
% |\let\@oldfntext\@makefntext|\\
% |\long\def\@makefntext#1{%|\\
% |  \renewcommand*\NamesFormat{}\@oldfntext{#1}}|\\
% |\makeatother|
% \end{quote}
%
% \noindent This approach will not print the first use of a name in the body text if it already occured in the footnotes unless one uses \cmd{\ForgetName} to force that. This example takes advantage of the local scope of \cmd{\@makefntext}.
%
% A second example puts the mention of first names in boldface, with additional notations in the margin if possible:
%\begin{quote}\small
% |\let\oldformat\NamesFormat|\\
% |\renewcommand*{\NamesFormat}[1]%|\\
% |  {\textbf{#1}\ifinner\else|\\
% |  \marginpar{\raggedleft\scriptsize #1}\fi}|\\
% |\PretagName{Vlad, Ţepeş}{Vlad Tepes}%|
%
% \let\oldformat\NamesFormat%
% \renewcommand*{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\raggedleft\scriptsize #1}\fi}%
% {\footnotesize |\Name{Vlad| |III,| |Dracula},| |known| |as| |\AKA{Vlad| |III,| |Dracula}{Vlad, Ţepeş},| |``\AKA*{Vlad| |III,| |Dracula}{Vlad}[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.|}\smallskip
%
% \Name{Vlad III, Dracula}, known as \AKA{Vlad III, Dracula}{Vlad, Ţepeş}, ``\AKA*{Vlad III, Dracula}{Vlad}[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.
% \end{quote}
%
% Outside of the |quote| environment above, we have \ForgetName{Vlad III, Dracula}\Name{Vlad III, Dracula} and \Name{Vlad III, Dracula}. For references to ``Vlad'' instead of ``\Name{Vlad III, Dracula}'' one could use |\Name{Vlad, III Dracula}|. Do not mix these forms with each other or with the old syntax, lest errors bite! You would get multiple index entries, unwanted cross-references, and unexpected forms in the text. The simplified interface helps one to avoid this.
%
% \subsubsection{Disable Formatting}
% \label{sec:DisableFormat}
% 
% \DescribeMacro{\NamesActive}
% \DescribeMacro{\NamesInactive}
% Using the \texttt{frontmatter} option deactivates formatting until \cmd{\NamesActive} occurs. Another macro, \cmd{\NamesInactive}, will deactivate formatting again. These two macros toggle two independent systems of formatting and first use.
%
% Here we switch to the ``front matter'' mode with \cmd{\NamesInactive}:
% \NamesInactive
% \begin{quote}\small
% \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}
%
% Then we switch back to ``main matter'' mode with \cmd{\NamesActive}:
% \NamesActive
% \begin{quote}\small
% \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}
% 
% Notice that we have two independent cases of ``first use'' above. Consider the two ``species'' of names to be ``non-formatted'' and ``formatted,'' intended for front matter and main matter. Yet one could use this in footnotes to implement a different system of names (see also Section~\ref{sec:Tweaks}):
% \begin{quote}\small
% |\makeatletter|\\
% |\let\@oldfntext\@makefntext|\\
% |\long\def\@makefntext#1{%|\\
% |  \NamesInactive\@oldfntext{#1}\NamesActive%|\\
% |}\makeatother|
% \end{quote}
%
% \subsection{Name Decisions}
% \subsubsection{Testing Decisions}
% \label{sec:tests}
%
% Sometimes the behavior of your document may need to change if a name is present or not. The macros in this subsection help to make such changes possible. Only \cmd{\Name,} \cmd{\Name*,} \cmd{\PName,} \cmd{\AKA,} \cmd{\AKA*,} \cmd{\ForgetName,} \cmd{\SubvertName,} and \cmd{\ExcludeName} affect the results of these macros.
%
% The following macros can be useful for generating conditional output in the document, such as inserting a ``short biography'' footnote or callout text after a name, depending on a particular context. Authors also can use them to generate ``reminders to self'' if a name has or has not occurred yet in the document. Such reminders could be linked with the \textsf{comment}, \textsf{pdfcomment}, and similar packages to aid writing and name management.\medskip
%
% \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}
% \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.
% \clearpage
%
% For example, we can test if we have yet to encounter the name ``Bob Hope'' in this document. We get ``\IfMainName[Bob]{Hope}{I met \Name[Bob]{Hope}}{I have not met \Name[Bob]{Hope}}'' from the following:
% \begin{quote}
% |\IfMainName[Bob]{Hope}%|\\
% |{I met \Name[Bob]{Hope}}%|\\
% |{I have not met \Name[Bob]{Hope}}|
% \end{quote}%
% We will meet \FName[Bob]{Hope} in Section~\ref{sec:AKA}, so after this example we need to use the macro |\ForgetName[Bob]{Hope}| to ``forget'' that we saw this name.\ForgetName[Bob]{Hope}\medskip
%
% \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}
% \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 not capable of being formatted by this package, \emph{i.e.}, one 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.
%
% For example, we can test whether a name has been used as a formatted name, an unformatted name, or both:
% \begin{quote}
% |\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}%
% From this we get the result that we expect from Section~\ref{sec:DisableFormat}, namely:
% \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}}. We will return to this topic later.\medskip
%
% \DescribeMacro{\IfAKA}
% If you want to produce output or perform a task based on whether a ``\emph{see}-reference'' name exists, use \cmd{\IfAKA}, whose syntax is:
% \begin{quote}
% \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 ``excluded'' branch in order to detect those names excluded from indexing by \cmd{\ExcludeName} (Section~\ref{sec:exclude}). A ``\emph{see}-reference'' name is printed in the body text but only exists as a cross-reference created by \cmd{\AKA} and \cmd{\AKA*}. From the following example we get ``\IfAKA[Jay]{Rockefeller}{\LJRIV\ has an alias}{\LJRIV\ does not have an alias}{\LJRIV\ is excluded}'':
% \begin{quote}
% |\IfAKA[Jay]{Rockefeller}%|\\
% |  {\LJRIV\ has an alias}%|\\
% |  {\LJRIV\ does not have an alias}%|\\
% |  {\LJRIV\ is excluded}|
% \end{quote}
% 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 |{}.|
% \clearpage
%
% A similar use of |\IfAKA{Confucius}| tells us that ``\IfAKA{Confucius}{\Name{Confucius} is an alias}{\Name{Confucius} is not an alias}{\Name{Confucius} is excluded}.'' Yet one might have to check further about \Name{Confucius} to see if it is used as a formatted name or a non-formatted name.
%
% Here we test for a name used with \cmd{\ExcludeName} (Section~\ref{sec:exclude}) 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}
% |\ExcludeName{Grinch}%|\\
% |\IfAKA{Grinch}%|\\
% |  {\Name{Grinch} is an alias}%|\\
% |  {\Name{Grinch} is not an alias}%|\\
% |  {\Name{Grinch} is excluded}|
% \end{quote}
% 
% \subsubsection{Changing Decisions}
% \label{sec:Tweaks}
% 
% This section describes macros that change the status of whether a name has occurred. That also helps to avoid clashes between formatted and non-formatted names. They are meant for editing at or near the final draft stage. ``\emph{See}-reference'' names created by \cmd{\AKA} are not affected by these macros.\bigskip
%
% \DescribeMacro{\ForgetName}
% This macro is a ``dirty trick'' of sorts that takes the same optional and mandatory arguments used by \cmd{\Name}. It handles its arguments in the same way, except that it ignores the final argument if \meta{FNN} are present. The syntax is:
% \begin{quote}
% \cmd{\ForgetName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% This macro causes \cmd{\Name} and friends globally to ``forget'' prior uses of a name. The next use of that name will print as if it were a ``first use,'' even if it is not. Index entries and cross-references are \emph{never} forgotten.\bigskip
% 
% \DescribeMacro{\SubvertName}
% This macro is the opposite of the one above. It takes the same arguments. It handles its arguments in the same manner. The syntax is:
% \begin{quote}
% \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% This macro causes \cmd{\Name} and friends globally to think that a prior use of a name already has occurred. The next use of that name will print as if it were a ``subsequent use,'' even if it is not.\bigskip
%
% The default \marginpar{\small\raggedleft Scope} behavior of these two macros changes whether a name is ``forgotten'' or ``subverted'' simultaneously for front matter and main matter names, Remember the example above that 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}}'':
% \begin{quote}
% |\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}
%
% Now watch closely: 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 the main matter name and the front matter name were forgotten!
%
% This default behavior helps synchronize formatted and unformatted types of names. For example, if you wanted to use unformatted names in the footnotes and formatted names in the text (Section~\ref{sec:DisableFormat}), you could use, \emph{e.g.} \cmd{\SubvertName} right after the first use of a name in the body text, ensuring that all references in the text and notes would be short unless otherwise modified.\footnote{This manual takes advantage of that behavior at times in order to synchronize first and subsequent uses of names between formatted and unformatted sections of the body text.}
%
% \DescribeMacro{\LocalNames}
% \DescribeMacro{\GlobalNames}
% If, however, this ``global'' behavior of \cmd{\ForgetName} and \cmd{\SubvertName} is not desired, you can use \cmd{\LocalNames} to change that behavior and \cmd{\GlobalNames} to restore the default behavior. Both of these macros are global in scope.
%
% After \cmd{\LocalNames,} if you are in a ``front matter'' section via the \texttt{frontmatter} option or \cmd{\NamesInactive,} \cmd{\ForgetName} and \cmd{\SubvertName} will only affect unformatted names. If you are in a ``main matter'' section via the \texttt{mainmatter} option or \cmd{\NamesActive,} then \cmd{\ForgetName} and \cmd{\SubvertName} will only affect formatted names. The following example helps to illustrate local changes:
% \begin{quote}\small
% |\def\CheckChuck{%\IfFrontName[Charlie]{Chaplin}%|\\
% |  {\IfMainName[Charlie]{Chaplin}{both}{front}}%|\\
% |  {\IfMainName[Charlie]{Chaplin}{main}{none}}}%|\\[2ex]
% \def\CheckChuck{\IfFrontName[Charlie]{Chaplin}%
%   {\IfMainName[Charlie]{Chaplin}{both}{front}}%
%   {\IfMainName[Charlie]{Chaplin}{main}{none}}}%
% We begin by creating a formatted name in the main matter:\\
% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\\
% |\CheckChuck|\hfill\CheckChuck\\[2ex]
% Now we switch to an unformatted section and create a name there:\\
% |\NamesInactive|\NamesInactive\\
% |\Name*[Charlie]{Chaplin}|\hfill\Name*[Charlie]{Chaplin}\\
% |\CheckChuck|\hfill\CheckChuck\\[2ex]
% We now have two names. They look and behave the same, but are two different ``species'' with independent first and subsequent uses. We set the scope of \cmd{\ForgetName} and \cmd{\SubvertName} to local, then forget the name in the unformatted section:\\
% |\LocalNames|\LocalNames\\
% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
% |\CheckChuck|\hfill\CheckChuck\\[2ex]
% We ``subvert'' the name control sequence in the unformatted section, as if the name has occurred, and switch back to the main section:
% |\SubvertName[Charlie]{Chaplin}|\SubvertName[Charlie]{Chaplin}\\
% |\NamesActive|\NamesActive\\
% |\CheckChuck|\hfill\CheckChuck\\[2ex]
% We forget the formatted name and reset the default behavior:\\
% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
% |\GlobalNames|\GlobalNames\\
% |\CheckChuck|\hfill\CheckChuck\\[2ex]
% Finally, we forget everything:\\
% |\ForgetName[Charlie]{Chaplin}|\ForgetName[Charlie]{Chaplin}\\
% |\CheckChuck|\hfill\CheckChuck\\[2ex]
% \end{quote}
%
% \subsection{Name Variant Macros}
% \subsubsection{\texttt{\textbackslash AKA}}
% \label{sec:AKA}
%
% \DescribeMacro{\AKA}
% \DescribeMacro{\AKA*}
% \cmd{\AKA} (meaning \textit{also known as}) handles pseudonyms, stage names, \emph{noms de plume}, and so on in order to replace typing manual cross-references in the index. The syntax for \cmd{\AKA} is:
% \begin{quote}
% \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}
%
% \noindent Only the \meta{FNN} and \meta{SNN} arguments from \cmd{\Name} and friends may be cross-referenced. The new syntax allows \cmd{\AKA} to cross-reference all name types. Both macros create a cross-reference in the index from the \meta{Alt. FNN}, \meta{Alt. SNN}, and \meta{Alt. names} fields to a name defined by \meta{FNN} and \meta{SNN}, regardless of whether that name has been used.
%
% Both macros print only the \meta{Alt. FNN} and \meta{Alt. SNN} fields in the body text. If the \meta{Alt. names} field is present, \cmd{\AKA} swaps \meta{Alt. names} with \meta{Alt. FNN} in the body text, similar to the naming macros.
%
% \cmd{\AKA*} has two functions. For Western names, where \meta{Alt. FNN} is present, \cmd{\AKA*} prints either just the \meta{Alt. FNN} or just the \meta{Alt. names} when they also are present. However, if \meta{Alt. FNN} is absent, \cmd{\AKA*} prints just \meta{Alt. names} if present, otherwise \meta{Alt. SNN}. See also Section~\ref{sec:TagName}.
%
% Here is a simple example with the default system of formatting:
% \begin{quote}\small
% |\Name{Jean, sans Peur}| |(\AKA{Jean,| |sans| |Peur}{Jean| |the| |Fearless})|\\ {\ttfamily was Duke of Burgundy 1404|--|1419.}
%
% \Name{Jean, sans Peur} (\AKA{Jean, sans Peur}{Jean the Fearless}) was Duke of Burgundy 1404--1419.
% \end{quote}
% ``Jean the Fearless'' intentionally receives no formatting because I intend that only names with main index entries be formatted. One could put \cmd{\AKA} within a formatting macro to make that otherwise. Still, the reversing and capitalizing mechanisms do work with \cmd{\AKA}.
%
% This complex example shows the Continental style with no default formatting:
% \begin{quote}\small
% |\PretagName[Heinz]{\textsc{Rühmann}}{Ruehmann, Heinz}%|\\
% |\PretagName[Heinrich Wilhelm]{\textsc{Rühmann}}%|\\
% |  {Ruehmann, Heinrich Wilhelm}%|\\
% |\SubvertName[Heinz]{\textsc{Rühmann}}%|\\
% |\AKA*[Heinz]{\textsc{Rühmann}}%|\\
% |  [Heinrich Wilhelm]{\textsc{Rühmann}} %|\\
% |``\FName[Heinz]{\textsc{Rühmann}}'' %|\\
% |\Name[Heinz]{\textsc{Rühmann}} %|\\
% \texttt{(7 March 1902|-||-|3 October 1994) was a German film actor who\break appeared in over 100 films between 1926 and 1993.}\\[1ex]
% \NamesInactive
% \SubvertName[Heinz]{\textsc{Rühmann}}%
% \AKA*[Heinz]{\textsc{Rühmann}}%
%   [Heinrich Wilhelm]{\textsc{Rühmann}} %
% ``\FName[Heinz]{\textsc{Rühmann}}'' %
% \Name[Heinz]{\textsc{Rühmann}} %
% (7 March 1902--3 October 1994) was a German film actor who appeared in over 100 films between 1926 and 1993.
% \NamesActive
% \end{quote}
% First I want ``\Name*[Heinz]{\textsc{Rühmann}}'' to be the main name of reference, so \cmd{\SubvertName} causes  \cmd{\FName} to print the short version.
% Second, I use \cmd{\AKA*} to print only the forenames ``Heinrich Wilhelm'' in the body text. Nevertheless, the index cross-reference will be complete.
% Third, \cmd{\FName} prints ``\FName[Heinz]{\textsc{Rühmann}}.'' Finally, \cmd{\Name} prints \Name[Heinz]{\textsc{Rühmann}}. Of course I used \cmd{\PretagName} to sort the index entries.
% \clearpage
%
% Using \Name[Bob]{Hope}, \ForgetName{Louis, XIV}\Name{Louis, XIV}, \Name{Lao-tzu}, and \Name{Gregory, I} as examples, we see how \cmd{\AKA} and \cmd{\AKA*} work:
%
% \begin{quote}\small
% \begin{tabular}{ll}\hline
% {\large\strut}|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
% {\large\strut}|\AKA*[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}\\
% {\large\strut}|\AKA[Bob]{Hope}%|\\|  [Leslie Townes]{Hope}[Lester T.]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\
% {\large\strut}|\AKA*[Bob]{Hope}%|\\|  [Leslie Townes]{Hope}[Lester T.]| & \AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\\hline
% {\large\strut}|\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
% {\large\strut}|\AKA*{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
% {\large\strut}|\AKA{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\
% {\large\strut}|\AKA*{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\\hline
% {\large\strut}|\AKA{Gregory, I}{Gregory}[the Great]| & \AKA{Gregory, I}{Gregory}[the Great]\\
% {\large\strut}|\AKA*{Gregory, I}{Gregory}[the Great]| & \AKA*{Gregory, I}{Gregory}[the Great]\\\hline
% \end{tabular}
% \end{quote}
% The alternate form ``Lester T. Hope'' does not appear in the index, but only in the body text to allow for variations. \Name*{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' happens with\\[1ex]
% \indent\quad|\Name*{Gregory,| |I}| |``\AKA*{Gregory,| |I}{Gregory}[the| |Great]''|\\[1ex]
% The index has a \emph{see} reference from ``Gregory the Great'' to ``Gregory I.'' Some helpful tips for \cmd{\AKA} and \cmd{\AKA*} follow:
% \begin{itemize}\small
% \item \oarg{FNN}\marg{SNN} is the main name. \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} is the cross-reference. Forgetting this may cause errors.
% \item The old syntax causes \cmd{\AKA} and \cmd{\AKA*} to fail: |\AKA{Louis}[XIV]{Sun King}| and |\AKA{Gregory}[I]{Gregory}[the Great]|.
% \item The \meta{Alt. SNN} field uses comma-delimited suffixes.
% \item The \meta{Alt. names} field does not use comma-delimited suffixes.
% \item Eastern names work as pseudonyms, with all that entails. One can refer to \Name[Lafcadio]{Hearn} as \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}:\\\hbox{}\qquad|\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|.
% \item Particles work: \CapThis\AKA[Charles]{du Fresne}{du Cange} is the alternate name for \Name[Charles]{du Fresne}, which is capitalized via \cmd{\CapThis}\cmd{\AKA}. See also Section~\ref{sec:Particles}.
% \item Reversing works, \emph{e.g.},\\\hbox{}\qquad \cmd{\RevComma}: \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}\\\hbox{}\qquad \cmd{\RevName}: \RevName\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}
% \item The name fields of \cmd{\PretagName} correspond with the \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} fields of \cmd{\AKA}:\\[1ex]\hbox{}\qquad |\AKA{Vlad| |III,| |Dracula}{Vlad,| |Ţepeş}| matches\\\hbox{}\qquad |\PretagName{Vlad,| |Ţepeş}{Vlad| |Tepes}|\\[1ex] This form does not match: |\PretagName{Vlad}[Ţepeş]{Vlad| |Tepes}|.
% \item With stage names like \Name[The Amazing]{Kreskin}, if you want them in the index, use |\Name[The Amazing]{Kreskin}| to get ``Kreskin, The Amazing.'' \IndexInactive Otherwise use something like |\Name[J.]{Kreskin}[The Amazing]| to get \Name[J.]{Kreskin}[The Amazing] in the text and ``Kreskin, J.'' in the index.\\[1ex] Using \cmd{\AKA} with such names looks like: |\AKA[The Amazing]{Kreskin}| |[Joseph]{Kresge}| and |\AKA[J.]{Kreskin}[Joseph]{Kresge}|.\IndexActive You get \Name*[The Amazing]{Kreskin}, a.k.a. \AKA[The Amazing]{Kreskin}[Joseph]{Kresge}.
% \item Special cases like ``Iron Mike'' Tyson as the nickname for \Name[Mike]{Tyson} may be handled in a number of ways.
% \begin{enumerate}\small
% \item Follow |``Iron Mike''| with |\IndexName[Mike]{Tyson}| and do whatever you want in the text. This may be the easiest solution.
% \item Use |``\AKA[Mike]{Tyson}{Iron Mike}''| to create ``\AKA[Mike]{Tyson}{Iron Mike}'' in the text and a \emph{see}-type cross-reference to ``Tyson, Mike'' in the index. Be sure to have an occurrence of |\Name[Mike]{Tyson}| in the text. See also Section~\ref{sec:AKA}. This is the best solution in terms of how \textsf{nameauth} is designed.
% \item Always get ``Iron Mike Tyson'' with something like:\\[1ex]
% |\newcommand*{\Iron}{\SubvertName[Mike]{Tyson}%|\\
% |\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}}|\\[1ex]
% \newcommand*{\Iron}{\SubvertName[Mike]{Tyson}\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}}
% |``\Iron''| gives you ``\Iron.''\footnote{In typesetting this manual I defined the macro \cmd{\Iron} and others like it on one continuous line because defining a macro over multiple lines with comment characters ending them in \textsf{ltxdoc} and a \texttt{.dtx} file caused extra spaces to be inserted.} You are responsible for typesetting the first use and creating a cross-reference. This solution runs somewhat contrary to the design principles of \textsf{nameauth}, but it may be helpful if you want the invariant name ``\Iron'' to recur and you want to save typing.
% \end{enumerate}
% \end{itemize}
%
% \cmd{\AKA} will not create multiple cross-references. Handle the special case where one moniker applies to multiple people with a manual solution, \emph{e.g.}, ``Snellius'' for both \Name*[Willebrord]{Snel van Royen} and his son \Name*[Rudolph]{Snel van Royen}:
%\begin{quote}
% |\index{Snellius|\verb!|!{}|see{Snel|\,|van|\,|Royen,|\,|Rudolph;%|\\ |Snel|\,|van|\,|Royen,|\,|Willebrord}}|
% \index{Snellius|see{Snel van Royen, Rudolph;%
% Snel van Royen, Willebrord}}
%\end{quote}
%
% Cross-references generated by \cmd{\AKA} and \cmd{\AKA*} are meant only to be \emph{see} references, never page entries. See also Section~\ref{sec:error}. In certain cases, the alternate name might need to be indexed with page numbers and \emph{see also} references. Do not use \cmd{\AKA} in those cases, rather, consider the following:
%
% \label{manualxref}\label{Rambam}%
%\begin{itemize}\small
% \item Refer to the person intended, \emph{e.g.}, \Name{Maimonides} (\AKA{Maimonides}{Moses ben-Maimon}):\\ |\Name{Maimonides}| |(\AKA{Maimonides}{Moses| |ben-Maimon})|
% \item We now have a name and a \emph{see} reference. Now one must refer to the alternate name, \emph{e.g.}, \Name{Rambam}: |\Name{Rambam}|.
% \item The alternate name must occur before making a cross-reference to the main name, in this case, \Name{Maimonides}.
% \item Add \verb!\index{Rambam|seealso{Maimonides}}! at the end of the document to ensure that it is the last entry among the cross-references. Generally, \emph{see also} references follow \emph{see} references in an index entry.\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 \textsf{http://tex.stackexchange.com}.}
%\end{itemize}
% \clearpage
%
% Using \cmd{\PretagName} helps avoid the need for manual index entries. Instead of doing a lot of extra work for some names, consider the following example:
%
% \begin{quote}
% {\ttfamily%
% |\PretagName{\textit{Doctor Angelicus}}%|\\
% |  {Doctor Angelicus}%|\\
% |Perhaps the greatest medieval theologian was|\\
% |\Name{Thomas, Aquinas}|\\
% |(\AKA{Thomas, Aquinas}{Thomas of Aquino})|,\\
% also known as\\
% |\AKA{Thomas, Aquinas}{\textit{Doctor Angelicus}}|.}
%
% \PretagName{\textit{Doctor Angelicus}}%
%   {Doctor Angelicus}%
% Perhaps the greatest medieval theologian was
% \Name{Thomas, Aquinas}
% (\AKA{Thomas, Aquinas}{Thomas of Aquino}),
% 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. Section~\ref{sec:standards} talks about those unfortunate situations where one must use the Western form |\Name[Thomas]{Aquinas}.|
%
% \subsubsection{\texttt{\textbackslash PName}}
%
% \DescribeMacro{\PName}
% \cmd{\PName} is a ``convenience macro'' meant for Western names. It generates a main name followed by a cross-reference in parentheses with the following syntax:
% \begin{quote}\small
% \cmd{\PName}\oarg{FNN}\marg{SNN}\oarg{other FNN}\marg{other SNN}\oarg{other alt.}
% \end{quote}
%
% Although \cmd{\PName} creates an easy shortcut, its drawbacks are many. It only can use the \meta{FNN}\meta{SNN} form of \cmd{\AKA}. Neither \cmd{\AKA*}, nor \cmd{\CapName}, \cmd{\CapThis}, \cmd{\RevComma}, \cmd{\RevName}, and the related package options work with \cmd{\PName.}
%
% The main name comes first, followed by the name that is only a \emph{see} reference. \cmd{\PName} can generate the following examples:
%
% \begin{quote}\small
% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\\hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\[1ex]
% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}|\\\hbox{}\hfill \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\[1ex]
% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\\hbox{}\hfill \PName[Mark]{Twain}[Samuel L.]{Clemens}\\[2ex]
% |\PName{Voltaire}[François-Marie]{Arouet}|\\\hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}\\[1ex]
% |\PName*{Voltaire}[François-Marie]{Arouet}|\\\hbox{}\hfill \PName*{Voltaire}[François-Marie]{Arouet}\\[1ex]
% |\PName{Voltaire}[François-Marie]{Arouet}|\\\hbox{}\hfill \PName{Voltaire}[François-Marie]{Arouet}
% \end{quote}
%
% \cmd{\PName} can be a bit sketchy with medieval names. You get \PName{William, I}{William, the Conqueror} with |\PName{William,| |I}{William,| |the Conqueror}.| Stay away from |\PName{William, I}{William}[the Conqueror]| because that is the old syntax that can break both \cmd{\AKA} and \cmd{\PName} if used in the leading arguments instead of in the trailing arguments. The old syntax can get you confused and lead you to type |\PName{William, I}[William]{the Conqueror}.| You would get a name that looked right in the body text but wrong in the index.
%
% Something like |\PName{Lao-tzu}{Li, Er}| ``\PName{Lao-tzu}{Li, Er}'' works well enough, but |\PName{Gregory, I}{Gregory}[the Great]|\ForgetName{Gregory, I} ``\PName{Gregory, I}{Gregory}[the Great]'' starts moving close to the old syntax.
%
% \subsection{Indexing Macros}
%
% \subsubsection{Indexing Control}
% \label{sec:SectionIndex}
%
% \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, independently of \cmd{\ExcludeName}. They are global in scope, as are the other toggle macros in this package, so one must be explicit in turning indexing on and off.\medskip
%
% \noindent\textbf{You cannot use index tags if the \textsf{nameauth} indexing feature is inactive.}
%
% \subsubsection{Indexing and \textsf{babel}}
% \label{sec:babel}
% Using\marginpar{\small\raggedleft \textsf{texindy}} \textsf{babel} with Roman page numbers will put \cmd{\textlatin} in the index entries if one includes a language that does not use the Latin alphabet\,---\,even if the main language does. The \texttt{texindy} program will ignore such references. This issue can affect \textsf{nameauth.}
%
% One workaround for \texttt{texindy} redefines \cmd{\textlatin} to produce the page number itself within a certain scope like:
% \begin{quote}
% |\newcommand{\fixindex}[1]{\def\textlatin##1{##1}#1}|
% \end{quote}
% This solution has proven quite effective for me. One need only type
% \begin{quote}
% |\fixindex{%|\\
% \meta{paragraphs of running text}|%|\\
% |}|
% \end{quote}
% Of course, one can opt to check if \cmd{\textlatin} is defined, save its value, redefine it, then restore it, perhaps even in an environment.
%
% \subsubsection{\texttt{\textbackslash IndexName}}
% 
% \DescribeMacro{\IndexName}
% This macro creates an index entry like those created by \cmd{\Name} and friends. It prints nothing in the body text. The syntax is:
% \begin{quote}
% \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}. Otherwise, if \meta{FNN} are absent, \cmd{\IndexName} sees \meta{Alternate names} as an affix using the old syntax.
%
% After \cmd{\IndexInactive} this macro does nothing until \cmd{\IndexActive} appears. It will not create index entries for names used with \cmd{\AKA} as cross-references.
%
% The indexing mechanism in the \textsf{nameauth} package follows \emph{Chicago Manual of Style} standards regarding Western names and affixes. Thus the name \LChes\ becomes ``Sullenberger, Chesley B., III'' in the index. Otherwise, if \meta{FNN} is absent, the comma would trigger ancient, medieval, and Eastern name forms in the index.
%
% \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 use the following form that works with both \texttt{makeindex} and \texttt{texindy}: |\index{|\meta{sortkey}|@|\meta{actual}|}|
%
%Before version 2.0 of \textsf{nameauth}, one had to sort and index names like \Name[Jan]{Łukasiewicz} and \Name*{Æthelred, II} by putting them between \cmd{\IndexInactive} and \cmd{\IndexActive} while creating manual index entries.\medskip
% 
% \DescribeMacro{\PretagName}
% Fortunately, the current versions of \textsf{nameauth} have adopted an easier solution. The syntax of \cmd{\PretagName} is like that of \cmd{\TagName}:
% \begin{quote}
% \cmd{\PretagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
% The \cmd{\PretagName} macro differs from the other tagging macros:
% \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}
% \cmd{\PretagName} creates a sort key terminated with the ``actual'' character, which is |@| by default. Do not include the ``actual'' character in the pretag.
% Here is an example of its use:
% \begin{quote}
% |\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 created. If you create a cross-reference with \cmd{\AKA} and you want to pretag it, see Section~\ref{sec:AKA}.\medskip
%
% \DescribeMacro{\IndexActual}
% If you need to change the ``actual'' character, such as with \texttt{gind.ist}, put |\IndexActual{=}| in the preamble.
%
% \subsubsection{\texttt{\textbackslash TagName}}
% \label{sec:TagName}
%
% \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}
% \cmd{\TagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
%
% Tags are not ``pretags.'' To help sort that out, we look at what gets affected by these commands:\medskip
%
% \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}\medskip
%
% All the tagging commands use the name arguments as a reference point. \cmd{\PretagName} generates the leading sort key while \cmd{\TagName} and \cmd{\UntagName} affect the trailing content of the index entry.
% \clearpage
%
% Tags created by \cmd{\TagName} can be helpful in the indexes of history texts. Several features of this package are designed for historical research. Suppose you are working with medieval subject matter. The following macros come in handy:
% \begin{quote}\small
% \begin{tabular}{p{0.5\textwidth}p{0.28\textwidth}}
% |\TagName{Leo, I}{, pope}| |\TagName{Gregory, I}{, pope}| & (in the preamble)\\
% \dots & \\
% |\Name*{Leo,| |I}| |\Name*{Gregory,| |I}| & (first references to \ForgetName{Leo, I}\Name*{Leo, I} and \ForgetName{Gregory, I}\Name*{Gregory, I})\\
% \dots & \\
% |\Name*{Leo, I} was known as| |\AKA{Leo, I}{Leo}[the Great].| & \Name*{Leo, I} was known as \AKA{Leo, I}{Leo}[the Great].\\
% \dots & \\
% |\Name{Gregory,| |I}| |``\AKA*{Gregory,| |I}%| |{Gregory}[the Great],''| |another| |major| |pope.| & \Name{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great],'' another major pope.\\
% \end{tabular}
% \end{quote}
%
% Here \cmd{\TagName} causes the \textsf{nameauth} indexing macros to append ``\texttt{,\textvisiblespace pope}'' to the index entries for \Name*{Gregory, I} and \Name*{Leo, I}.
%
% Tags are literal text that can be daggers, asterisks, and even specials. For example, all fictional names in the index of this manual have an asterisk without any spaces before it. If space is desired between the entry and the tag, one must add the space at the start of the tag. Tagging aids scholarly indexing and can include life/regnal dates and other information.
%
% \cmd{\TagName} works with all name types, not just medieval names. Back in Section~\ref{sec:start} we had the example of \AKA[James Earl]{Carter, Jr.}[Jimmy]{Carter} (cross-reference in the index). \cmd{\TagName} adds ``\texttt{,\textvisiblespace president}'' to his index entry\IndexName[James Earl]{Carter, Jr.}.
%
% You can use the \marg{tag} field of \cmd{\TagName} to add specials to index entries for names. Every name in this document is tagged with at least \verb!{|hyperpage}! to allow hyperlinks in the index using the \textsf{ltxdoc} class and \textsf{hypdoc} package.
%
% \subsubsection{\texttt{\textbackslash UntagName}}
%
% \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}
% \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:
%
% \begin{quote}\small
% \ttfamily This refers to |\Name*[John]{Smith}|.\\
% Now another |\ForgetName[John]{Smith}%|\\
% |\TagName[John]{Smith}{ (other)}\Name[John]{Smith}|.\\
% Then a third |\ForgetName[John]{Smith}%|\\
% |\TagName[John]{Smith}{ (third)}\Name[John]{Smith}|.\\
% Then the first |\UntagName[John]{Smith}\Name*[John]{Smith}|.
%
% \normalfont This refers to \Name*[John]{Smith}.\hfill\emph{index}: Smith, John\\
% Now another \ForgetName[John]{Smith}\TagName[John]{Smith}{* (other)\string|hyperpage}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (second)\\
% Then a third \ForgetName[John]{Smith}\TagName[John]{Smith}{* (third)\string|hyperpage}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (third)\\
% Then the first \TagName[John]{Smith}{*\string|hyperpage}\Name*[John]{Smith}.\hfill\emph{index}: Smith, John
% \end{quote}
%
% The tweaking macros \cmd{\ForgetName} and \cmd{\SubvertName} make it seem like you are dealing with three people who have the same name. The index tags will group together those entries with 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 retags him with an asterisk again.}
%
% \subsubsection{Global Name Exclusion}
% 
% \DescribeMacro{\ExcludeName}
% \label{sec:exclude}
% This macro globally prevents the indexing of a particular name or cross-reference. If you do not use it at the beginning of the document, you may not exclude any name or cross-reference that has been used already. The syntax is:
% \begin{quote}
% \cmd{\ExcludeName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% You will see excluded names printed in the body text with all the formatting and other features:
% \begin{quote}
% |\ExcludeName[Kris]{Kringle}|\ExcludeName[Kris]{Kringle}\\
% |\Name[Kris]{Kringle}| and |\Name[Kris]{Kringle}|:\\
% \Name[Kris]{Kringle} and \Name[Kris]{Kringle}.
% \end{quote}
% Nevertheless, no matter how many times you use \Name[Kris]{Kringle} in the body text, the name will never appear in the index. Remember the \Name{Grinch} from Section~\ref{sec:tests}? He will not appear in the index either.
%
% \cmd{\ExcludeName} also prevents cross-references. You may see output in the body text, but no \emph{see}-reference will appear in the index:
% \begin{quote}
% |\ExcludeName[Santa]{Claus}|\ExcludeName[Santa]{Claus}\\
% |\AKA[Kris]{Kringle}[Santa]{Claus}| \AKA[Kris]{Kringle}[Santa]{Claus}
% \end{quote}
%
% Instead of using \cmd{\ExcludeName}, which basically prevents the indexing mechanism of the naming macros from doing anything with a particular name, it is far likelier that you would use the index control macros (Section~\ref{sec:SectionIndex}).
% \clearpage
%
% \subsection{Variant Spellings}
%
% This section illustrates why this package is called ``nameauth.'' Here we get to an example where the macros work together to implement a name authority.
%
% Handling variant name spellings can be complicated. For example, let us assume that you are editing a collection of essays. You might settle on the form \Name[W.E.B.]{Du Bois} in your name authority. An essay in that collection might use the alternate spelling \IndexInactive\Name*[W.E.B.]{DuBois}\IndexActive. The author or publisher who owns that work might not grant you permission to alter the spelling. In that case, you could add an alternate spelling. Using the simplified interface, it would be:
% \begin{nameauth}
% \< DuBois & W.E.B. & Du Bois & >
% \< AltDuBois & W.E.B. & DuBois & >
% \end{nameauth}
% \begin{quote}
% |\begin{nameauth}|\\
% |  \< DuBois & W.E.B. & Du Bois & >|\\
% |  \< AltDuBois & W.E.B. & DuBois & >|\\
% |\end{nameauth}|
% \end{quote}
%
% If you wanted to index the alternate spelling with its own entry, the trivial use of \cmd{\AltDuBois} allows that easily. All you need do is make cross-references to each variant in the index so that the reader is aware of them.
%
% Nevertheless, \DuBois\ and \IndexInactive\AltDuBois\IndexActive\ differ only by spaces. For several good reasons, such as fault tolerance in typing, the first/subsequent use mechanism ignores spaces and sees them as \emph{the same name}. Use |\ForgetName[W.E.B.]{Du Bois}| to trigger the first use of \cmd{\AltDuBois} in that section.
%
% If you wanted to index the variants under only one name entry, it gets more complicated. You could do the following:
%
% \begin{enumerate}\small
% \item Use |\ForgetName[W.E.B.]{Du Bois}| at the start of the section.
% \item Wrap \cmd{\AltDuBois} between \cmd{\IndexInactive} and \cmd{\IndexActive}.
% \item Call \cmd{\IndexName} with the authoritative form right after \cmd{\IndexActive}.
% \item Create a cross-reference in the index.
% \end{enumerate}
% This can be automated at the start of the section with something like:
% \begin{quote}%
% \ForgetName[W.E.B.]{DuBois}%
% \gdef\OtherDuBois{\IndexInactive\AltDuBois\IndexActive\IndexName[W.E.B.]{Du Bois}}%
% \index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}%
% |\ForgetName[W.E.B.]{DuBois}|\\
% |\gdef\OtherDuBois{\IndexInactive\AltDuBois\IndexActive%|\\|  \IndexName[W.E.B.]{Du Bois}}|\\
% \verb!\index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}!
% \end{quote}
%
% The alternate section mentions \cmd{\OtherDuBois} starting with a first use: \OtherDuBois. Subsequent uses of  \cmd{\OtherDuBois} print \OtherDuBois. Of course, one could get more complex than the example above. The index will only hold the standard entry for \Name*[W.E.B.]{Du Bois}: ``Du Bois, W.E.B.'' and a cross-reference from the variant ``DuBois, W.E.B.'' to the standard entry.
%
% \clearpage
%
% \subsection{Naming Pattern Reference}
% \label{sec:PatRef}
%
% \subsubsection{Basic Naming}
% \noindent{\bfseries Western Names}\\[2ex]{\small
% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\hline{\large\strut}
% \textit{First reference in the text}:\newline\hbox to 1em{\hfil}\ForgetName[John]{Smith}\Name[John]{Smith} &
% |\Name*[John]{Smith}|\newline |\Name[John]{Smith}|\newline |\FName[John]{Smith}|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*[John]{Smith} & |\Name*[John]{Smith}|\\{\large\strut}
% \textit{Subsequent surname}: \Name[John]{Smith} & |\Name[John]{Smith}|\\{\large\strut}
% \textit{Subsequent forename}: \FName[John]{Smith} & |\FName[John]{Smith}|\\\hline{\large\strut}
% \textit{Long first reference}: \ForgetName[J.Q.]{Public}\newline\hbox to 1em{\hfil}\Name[J.Q.]{Public}[Jane Q.] & |\Name*[J.Q.]{Public}[Jane Q.]|\newline |\Name[J.Q.]{Public}[Jane Q.]|\newline |\FName[J.Q.]{Public}[Jane Q.]|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\{\large\strut}
% \textit{Alternate}: \Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\\{\large\strut}
% {\large\strut}\textit{Alternate}: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\\hline
% \end{tabular}}
% \vfil
% 
% \noindent{\bfseries Western Plus Affixes}\\[2ex]
% Always use a comma to delimit name/affix pairs.\\[2ex]{\small
% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\hline{\large\strut}
% \textit{First reference}:\newline\hbox to 1em{\hfil}\ForgetName[George S.]{Patton, Jr.}\Name[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\newline |\Name[George S.]{Patton, Jr.}|\newline |\FName[George S.]{Patton, Jr.}|\\[1ex]{\large\strut}
% \textit{Subsequent}: \Name*[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\\{\large\strut}
% \textit{Subsequent surname}: \Name[George S.]{Patton, Jr.} & |\Name[George S.]{Patton, Jr.}|\\{\large\strut}
% {\large\strut}\textit{Subsequent forename}: \FName[George S.]{Patton, Jr.}[George] & |\FName[George S.]{Patton, Jr.}[George]|\\\hline
% \end{tabular}}
% \vfil
%
%\noindent |\begin{nameauth}|\\
%|  \< Smith & John & Smith & >|\\
%|  \< JQP & J.Q. & Public & >|\\
%|  \< Patton & George S. & Patton, Jr. & >|\\
%|\end{nameauth}|
% \vfil
%
% \ForgetName[John]{Smith}\ForgetName[J.Q.]{Public}\ForgetName[George S.]{Patton, Jr.}%
% \noindent |\Smith, \LSmith, \Smith, and \SSmith|:\\
% \indent \Smith, \LSmith, \Smith, and \SSmith\\[1ex]
% |\JQP[Jane Q.],| |\LJQP[Jane Q.],| |and| |\JQP[Jane Q.]|:\\
% \indent \JQP[Jane Q.], \LJQP[Jane Q.], and \JQP[Jane Q.]\\[1ex]
% |\LJQP[Jane| |Qetsiyah]\| |and| |\SJQP[Janie]|:\\
% \indent \LJQP[Jane Qetsiyah]\ and \SJQP[Janie]\\[1ex]
% \noindent |\Patton,| |\LPatton,| |\Patton,| |and| |\SPatton|:\\
% \indent \Patton, \LPatton, \Patton, and \SPatton.\\[1ex]
% |\SPatton[George]| prints \SPatton[George].
% \clearpage
%
% \noindent{\bfseries New Syntax: Royal, Eastern, and Ancient}\\[2ex]
% Using |\Name{Demetrius, I Soter}| keeps the number with the affix. To keep the number with the name, use |\Name{Demetrius I, Soter}|. See also Section~\ref{sec:Affix}.\\[2ex]{\small
% \begin{tabular}{p{0.53\textwidth}@{}p{0.42\textwidth}}\hline{\large\strut}
% {\large\strut}\textit{First reference}: \ForgetName{Francis, I}\Name{Francis, I} & |\Name*{Francis, I}|\newline |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*{Francis, I} & |\Name*{Francis, I}|\\[1ex]{\large\strut}
% \textit{Subsequent name}: \Name{Francis, I} & |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[1ex]{\large\strut}
% \textit{First reference}: \newline\hbox to 1em{\hfil}\ForgetName{Demetrius, I Soter}\Name{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\newline |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\\[1ex]{\large\strut}
% {\large\strut}\textit{Subsequent name}: \Name{Demetrius, I Soter} & |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\\hline{\large\strut}
% {\large\strut}\textit{First reference}: \ForgetName{Sun, Yat-sen}\Name{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\\[1ex]{\large\strut}
% {\large\strut}\textit{Subsequent name}: \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\\hline{\large\strut}
% {\large\strut}\textit{First mononym reference}:\newline\hbox to 1em{\hfil}\ForgetName{Plato}\Name{Plato} &
% |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\[1ex]{\large\strut}
% {\large\strut}\textit{Subsequent}: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\\hline
% \end{tabular}}
% \vfil
%
%\noindent |\begin{nameauth}|\\
%|  \< Francis & & Francis, I & >|\\
%|  \< Dem & & Demetrius, I Soter & >|\\
%|  \< Sun & & Sun, Yat-sen & >|\\
%|  \< Plato & & Plato & >|\\
%|\end{nameauth}|
% \vfil
%
% \ForgetName{Francis, I}\ForgetName{Demetrius, I Soter}\ForgetName{Sun, Yat-sen}\ForgetName{Plato}%
% \noindent |\Francis,| |\LFrancis,| |\Francis,| |and| |\SFrancis|:\\
% \indent \Francis, \LFrancis, \Francis, and \SFrancis\\[1ex]
% |\Dem,| |\LDem,| |\Dem,| |and \SDem|:\\
% \indent \Dem, \LDem, \Dem, and \SDem\\[1ex]
% |\Sun,| |\LSun,| |\Sun,| |and \SSun|:\\
% \indent \Sun, \LSun, \Sun, and \SSun\\[1ex]
% |\Plato,| |\LPlato,| |\Plato,| |and \SPlato|:\\
% \indent \Plato, \LPlato, \Plato, and \SPlato.
% \vfil
% You also can ``stack'' \cmd{\CapThis}, \cmd{\CapName}, \cmd{\RevName}, \cmd{\KeepAffix}, and so on in front of these control sequences. |\CapName\LSun| generates \CapName\LSun.
% \clearpage
%
% \noindent{\bfseries Old Syntax: Royal and Eastern}\\[2ex]
% Avoid these forms except with the \texttt{comma} option. |\Name{Ptolemy}[I Soter]| keeps the number with the affix. Use |\Name{Ptolemy I}[Soter]| to keep the number with the name. See also Section~\ref{sec:Affix}.\\[2ex]{\small
% \begin{tabular}{p{0.53\textwidth}@{}p{0.42\textwidth}}\hline{\large\strut}
% \textit{First reference}: \ForgetName{Henry}[VIII]\Name{Henry}[VIII] & |\Name*{Henry}[VIII]|\newline |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\[1ex]{\large\strut}
% \textit{Subsequent name}: \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[1ex]{\large\strut}
% \textit{First reference}: \ForgetName{Ptolemy}[I Soter]\Name{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\newline |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\\[1ex]{\large\strut}
% \textit{Subsequent name}: \Name{Ptolemy}[I Soter] & |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\\hline{\large\strut}
% \textit{First reference}:\newline \hbox to 1em{\hfil}\ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\newline |\Name{Mao}[Tse-tung]|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\[1ex]{\large\strut}
% \textit{Subsequent name}: \Name{Mao}[Tse-tung] & |\Name{Mao}[Tse-tung]|\newline |\FName{Mao}[Tse-tung]|\\\hline
% \end{tabular}}
% \vfil
%
%\noindent |\begin{nameauth}|\\
%|  \< Henry & & Henry & VIII >|\\
%|  \< Ptol & & Ptolemy & I Soter >|\\
%|  \< Mao & & Mao & Tse-tung >|\\
%|\end{nameauth}|
% \vfil
%
% \ForgetName{Ptolemy}[I Soter]\ForgetName{Henry}[VIII]\ForgetName{Mao}[Tse-tung]%
% \noindent |\Henry, \LHenry, \Henry, and \SHenry|:\\
% \indent \Henry, \LHenry, \Henry, and \SHenry\\[1ex]
% |\Ptol,| |\LPtol,| |\Ptol,| |and \SPtol|:\\
% \indent \Ptol, \LPtol, \Ptol, and \SPtol\\[1ex]
% |\Mao, \LMao, \Mao, and \SMao|:\\
% \indent \Mao, \LMao, \Mao, and \SMao
% \vfil
%
% Avoid mixing old and new syntax. In the body text, |\Name{Antiochus, IV}| and |\Name{Antiochus,| |IV}[Epiphanes]| look alike, but their index entries differ.
%
% \begin{itemize}\small
% \item Use |\Name{Antiochus, IV Epiphanes}| to get \IndexInactive\Name{Antiochus, IV Epiphanes} and \Name{Antiochus, IV Epiphanes} in the text and ``Antiochus IV Epiphanes'' in the index.
%
% \item Use |\Name{Antiochus~IV, Epiphanes}| to get \Name{Antiochus~IV, Epiphanes} and \Name{Antiochus~IV, Epiphanes} in the text and ``Antiochus IV Epiphanes'' in the index.\IndexActive
%
% \item Use |\Name{Antiochus,| |IV}| to get \Name{Antiochus, IV} and \Name{Antiochus, IV} in the text. Use something like |\TagName{Antiochus,| |IV}{| |Epiphanes}| to get ``Antiochus IV Epiphanes'' in the index and add ``Epiphanes'' in the text.
% \end{itemize}
% \clearpage
%
% \subsubsection{Particles}
% \label{sec:Particles}
% The following illustrate the American style of particulate names.\\[2ex]{\small
% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\hline{\large\strut}
% \textit{First}: \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare} & |\Name*[Walter]{de la Mare}|\newline |\Name[Walter]{de la Mare}|\newline |\FName[Walter]{de la Mare}|\\[1ex]{\large\strut}
% \textit{Subsequent}: \Name[Walter]{de la Mare} & |\Name[Walter]{de la Mare}|\\{\large\strut}
% \textit{Start of sentence}: \CapThis\Name[Walter]{de la Mare} & |\CapThis\Name[Walter]{de la Mare}|\\{\large\strut}
% \textit{Forename}: \FName[Walter]{de la Mare} & |\FName[Walter]{de la Mare}|\\\hline
% \end{tabular}}\\[2ex]
%
% \noindent The Continental style differs slightly. These first three forms below put the particles in the index. Long macros are split for readability.\\[2ex]{\small
% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\hline{\large\strut}
% \textit{The (admittedly long) first use}:\newline\small\Name[Johann Wolfgang von]{Goethe} & |\Name*[Johann Wolfgang von]{Goethe}|\newline |\Name[Johann Wolfgang von]{Goethe}|\newline |\FName[Johann Wolfgang von]{Goethe}|\\[1ex]{\large\strut}
% \textit{Subsequent}: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\[1ex]{\large\strut}
% \textit{Forenames}: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang] & |\FName[Johann Wolfgang von]{Goethe}%|\newline|[Johann Wolfgang]|\\\hline
% \end{tabular}}\\[2ex]
%
% \noindent These latter examples of the Continental style use the nickname feature to omit the particles from the index.\\[2ex]{\small
% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\hline{\large\strut}
% \textit{First}: \Name[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}[Adolf von]|\newline |\FName[Adolf]{Harnack}[Adolf von]|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\{\large\strut}
% \textit{Subsequent surname}: \Name[Adolf]{Harnack}[Adolf von] & |\Name[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}|\\[1ex]{\large\strut}
% \textit{Subsequent forename}: \FName[Adolf]{Harnack} & |\FName[Adolf]{Harnack}|\\\hline
% \end{tabular}}
% \vfil
%
%\noindent |\begin{nameauth}|\\
%|  \< DLM & Walter & de la Mare & >|\\
%|  \< JWG & Johann Wolfgang von & Goethe & >|\\
%|  \< Harnack & Adolf & Harnack & >|\\
%|\end{nameauth}|
%\vfil
%
% \ForgetName[Walter]{de la Mare}\ForgetName[Johann Wolfgang von]{Goethe}\ForgetName[Adolf]{Harnack}%
% \noindent |\DLM\| |and| |\CapThis\DLM|:\\
% \indent \DLM\ and \CapThis\DLM.\\[1ex]
% |\JWG\| |and| |\JWG|:\\
% \indent \JWG\ and \JWG.\\[1ex]
% |\Harnack[Adolf von]\| |and| |\Harnack|:\\
% \indent \Harnack[Adolf von]\ and \Harnack\\[1ex]
% You will not see \Harnack's ``von'' in the index because it was used only in the alternate forenames field.
% \index{Maimonides|seealso{Rambam}}
% \index{Rambam|seealso{Maimonides}}
% \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.  |\Name[Oskar]{\textsc{Hammerstein, II}}| fails due to unbalanced braces because it gets split up. Format each part instead \emph{e.g.}, |\Name[Oskar]{\textsc{Hammerstein},\textsc{II}}.|\IndexName[Oskar]{Hammerstein, II}
% \item With \texttt{pdflatex} use \cmd{\CapThis} when the first letter of a surname particle is \texttt{a--z}, otherwise use \cmd{\AccentCapThis} if it is extended Unicode. Doing otherwise may cause unbalanced braces and related errors.
% \item Consider using \cmd{\PretagName} with all names containing control sequences or extended 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. \cmd{\PName} produces warnings via \cmd{\Name} and \cmd{\AKA}.
% \item Please pay greater attention to the warnings produced by \cmd{\IndexName}, \cmd{\TagName}, \cmd{\UntagName}, and \cmd{\ExcludeName}. Many other warnings are FYI.
% \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].'' This is a Western name form, not an ancient form. It may act as malformed input if you mix it with proper medieval name forms, but it will not affect them adversely.
% \item The older syntax will not work with some macros. From the film \emph{Men in Black III}, |\AKA{Boris}[the Animal]{Just Boris}| fails. \cmd{\PName} fails for the same reasons. See also Section~\ref{sec:AKA}
% \item This form does work:\\ |\Name{Boris,| |the| |Animal}| |\AKA{Boris,| |the| |Animal}{Just| |Boris}|.\\ You get \Name{Boris, the Animal} being ``\AKA{Boris, the Animal}{Just Boris}.''\IndexActive
% \end{itemize}
% Warnings result from the following:
% \begin{itemize}\small
% \item Using a cross-reference \oarg{Alternate names}\marg{Alternate SNN}\oarg{Alt. names} created by \cmd{\AKA} as a name reference in \cmd{\Name}, \cmd{\FName}, and \cmd{\PName}. They merely will print a name in the body text.
% \item Using a name reference \oarg{FNN}\marg{SNN}\oarg{Alternate names} created by \cmd{\Name}, \cmd{\FName}, and \cmd{\PName} as a cross-reference in \cmd{\AKA}. It merely will print a name in the body text.
% \item Using \cmd{\AKA} to create the same cross-reference multiple times or with a cross-reference created by \cmd{\ExcludeName}. It merely will print a name in the body text, but not the index.
% \item Using \cmd{\IndexName} to index a cross-reference made via \cmd{\AKA} or via the mechanism in \cmd{\ExcludeName} as a main entry. It will do nothing.
% \item Using \cmd{\TagName}, \cmd{\UntagName}, and \cmd{\PretagName} with cross-references. The first two will do nothing. However, \cmd{\PretagName} will ``pretag'' a cross-reference. This is the desired behavior.
% \item Using \cmd{\ExcludeName} with cross-references. It will do nothing.
% \item Using \cmd{\ExcludeName} to exclude a name that has already been used. Likewise, it will do nothing.
% \item Using \cmd{\Name}, \cmd{\FName}, \cmd{\PName}, and \cmd{\AKA} to refer to names and cross-references excluded by \cmd{\ExcludeName}. They merely will print a name in the body text.
% \item Using the |nameauth| environment to redefine shorthands, such as:\\[2ex]
% |\PretagName[E.\,B.]{White}{White, E. B.}|\dots\\[1ex]
% |\begin{nameauth}|\\\IndexName[E.\,B.]{White}
% |  \< White & E.\,B. & White & >|\\
% |  \< White & E. B. & White & >|\\
% |\end{nameauth}|\\[1ex]
% Such redefinitions could generate unwanted index entries.
% \end{itemize}
%
% \clearpage%\StopEventually{^^A
%  \clearpage\PrintChanges
%  \clearpage\PrintIndex
%}
%
% \section{Implementation}
%
% \iffalse
%<*package>
% \fi
% \small
% \subsection{Boolean Values}
% \noindent{\large\bfseries Affix Commas}\\[.5ex]
% The \texttt{comma} and |nocomma| options toggle the first value below, while \cmd{\ShowComma} toggles the second. Each instance of \cmd{\Name} and \cmd{\AKA} reset |@nameauth@ShowComma|.
%    \begin{macrocode}
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
%    \end{macrocode}\medskip
% \noindent{\large\bfseries Toggle Formatting}\\[.5ex]
% \cmd{\NamesActive} and \cmd{\NamesInactive} or the |mainmatter| and |frontmatter| options set this value below.
%    \begin{macrocode}
\newif\if@nameauth@DoFormat
%    \end{macrocode}
% The next value works with \cmd{\LocalNames} and \cmd{\GlobalNames}.
%    \begin{macrocode}
\newif\if@nameauth@LocalNames
%    \end{macrocode}\medskip
% \noindent{\large\bfseries Indexing}\\[.5ex]
% \cmd{\IndexActive} and \cmd{\IndexInctive} or the |index| and |noindex| options set this below:
%    \begin{macrocode}
\newif\if@nameauth@DoIndex
%    \end{macrocode}
% The |pretag| and |nopretag| options toggle the value below.
%    \begin{macrocode}
\newif\if@nameauth@Pretag
%    \end{macrocode}\medskip
% \noindent{\large\bfseries Name Formatting}\\[.5ex]
% The next Boolean values govern full name capitalization, name reversing, and name reversing with commas.
%    \begin{macrocode}
\newif\if@nameauth@AllCaps
\newif\if@nameauth@AllThis
\newif\if@nameauth@RevAll
\newif\if@nameauth@RevThis
\newif\if@nameauth@RevAllComma
\newif\if@nameauth@RevThisComma
%    \end{macrocode}
% |@nameauth@FirstFormat| toggles the formatting of first occurrences of names.\\ |@nameauth@AlwaysFormat| forces name formatting whenever formatting is active.
%    \begin{macrocode}
\newif\if@nameauth@FirstFormat
\newif\if@nameauth@AlwaysFormat
%    \end{macrocode}
% |@nameauth@FullName| toggles long or short forms in subsequent name uses.\\ |@nameauth@FirstName| is used when printing only first names. |@nameauth@AltAKA| is toggled by either \cmd{\AKA} or \cmd{\AKA*} to print a longer or shorter name.
%    \begin{macrocode}
\newif\if@nameauth@FullName
\newif\if@nameauth@FirstName
\newif\if@nameauth@AltAKA
%    \end{macrocode}
% \cmd{\KeepAffix} toggles the value below. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
%    \begin{macrocode}
\newif\if@nameauth@NBSP
%    \end{macrocode}
% This Boolean value is used for detection of affixes and final periods.
%    \begin{macrocode}
\newif\if@nameauth@Punct
%    \end{macrocode}
% This Boolean value is triggered by \cmd{\CapThis}. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
%    \begin{macrocode}
\newif\if@nameauth@DoCaps
%    \end{macrocode}
% This Boolean value is triggered by \cmd{\AccentCapThis} to handle special cases of extended Unicode particle caps. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
%    \begin{macrocode}
\newif\if@nameauth@Accent
%    \end{macrocode}
% \subsection{Hooks}
% \begin{macro}{\NamesFormat}
% Change typographic formatting of final complete name form in text. See Section~\ref{sec:formatting}.
%    \begin{macrocode}
\newcommand*{\NamesFormat}{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthName}
% \changes{v2.2}{2015/12/01}{Added}
% Hook to create custom naming macros. Usually these three macros have the same control sequence, but they need not do so if you want something different. See Section~\ref{sec:formatting}.
%    \begin{macrocode}
\newcommand*{\NameauthName}{\@nameauth@Name}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthLName}
% \changes{v2.3}{2016/01/05}{Added}
% Hook to create custom naming macros. Called after |@nameauth@FullName| is set true. See Section~\ref{sec:formatting}.
%    \begin{macrocode}
\newcommand*{\NameauthLName}{\@nameauth@Name}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\NameauthFName}
% \changes{v2.2}{2015/12/01}{Added}
% Hook to create custom naming macros. Called after |@nameauth@FirstName| is set true. See Section~\ref{sec:formatting}.
%    \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@DoFormattrue}
\DeclareOption{frontmatter}{\@nameauth@DoFormatfalse}
\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@RevAlltrue\@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}{}}
\ExecuteOptions%
  {nocomma,%
   mainmatter,%
   index,%
   pretag,%
   normalcaps,%
   notreversed,%
   smallcaps}
\ProcessOptions\relax
%    \end{macrocode}
% \clearpage\noindent
% 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{ifluatex}
\RequirePackage{ifxetex}
\RequirePackage{trimspaces}
\RequirePackage{suffix}
\RequirePackage{xargs}
%    \end{macrocode}
% This macro determines the ``actual'' character for index sorting.
%    \begin{macrocode}
\newcommand*\@nameauth@Actual{@}
%    \end{macrocode}
% \subsection{Internal Macros}
% \begin{macro}{\@nameauth@Clean}
% Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string, even using accented characters, based on the arguments of \cmd{\Name} and friends. With this we can construct a control sequence name and test for it to determine the existence of pseudonyms and the first or subsequent occurrences of a name.
%    \begin{macrocode}
\newcommand*{\@nameauth@Clean}[1]%
  {\expandafter\zap@space\detokenize{#1} \@empty}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Root}
% \changes{v1.4}{2012/07/24}{Made more robust}
% The following two macros parse \meta{SNN} into a radix and a comma-delimited suffix, returning only the radix. They (and their arguments) are expandable in order to facilitate proper indexing functionality. They form the kernel of the suffix removal and comma suppression features.
%    \begin{macrocode}
\newcommand*{\@nameauth@Root}[1]%
  {\@nameauth@TrimRoot#1,\@empty\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@TrimRoot}
% \changes{v0.9}{2012/02/10}{Suffix handling expandable}
% \changes{v2.0}{2015/11/11}{trim spaces}
% Throw out the comma and suffix, return the radix.
%    \begin{macrocode}
\def\@nameauth@TrimRoot#1,#2\relax{\trim@spaces{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@CapRoot}
% \changes{v0.95}{2012/02/17}{Added}
% \changes{v2.1}{2015/11/24}{Handle Unicode better}
% The next two macros implement the particulate name capitalization mechanism by returning a radix where the first letter is capitalized. In \texttt{xelatex} and \texttt{lualatex} this is trivial and causes no problems. In \texttt{pdflatex} we have to account for ``double-wide'' accented Unicode characters.
%    \begin{macrocode}
\newcommand*{\@nameauth@CapRoot}[1]%
{%
  \ifxetex
    \@nameauth@CRii#1\relax%
  \else
    \ifluatex
      \@nameauth@CRii#1\relax%
    \else
      \if@nameauth@Accent
        \@nameauth@CRiii#1\relax%
      \else
        \@nameauth@CRii#1\relax%
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage
% \begin{macro}{\@nameauth@CRii}
% \changes{v0.95}{2012/02/17}{Added}
% \changes{v1.26}{2012/04/24}{Fixed}
% Grab the first letter as one argument, and everything before \cmd{\relax} as the second. Capitalize the first and return it with the second.
%    \begin{macrocode}
\def\@nameauth@CRii#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@CRiii}
% \changes{v2.1}{2015/11/24}{added}
% This is called in \texttt{pdflatex} under \textsf{inputenc} where an accented Unicode character takes the first two arguments. Grab the first ``letter'' as two arguments and cap it, then everything before \cmd{\relax} as the third. Capitalize the first and return it with the second.
%    \begin{macrocode}
\def\@nameauth@CRiii#1#2#3\relax{\uppercase{#1#2}\@nameauth@Root{#3}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@AllCapRoot}
% \changes{v1.5}{2013/02/22}{Added}
% This macro returns a fully-capitalized radix. It is used for generating capitalized Eastern family names in the body text.
%    \begin{macrocode}
\newcommand*{\@nameauth@AllCapRoot}[1]%
  {\uppercase{\@nameauth@Root{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Suffix}
% \changes{v0.9}{2012/02/10}{Added}
% The following two macros parse \meta{SNN} into a radix and a comma-delimited suffix, returning only the suffix. Anything before a comma is stripped off by |\@nameauth@Suffix|, but a comma must be present in the argument. Leading spaces are removed to allow consistent formatting.
%    \begin{macrocode}
\newcommand*{\@nameauth@Suffix}[1]%
  {\@nameauth@TrimSuffix#1\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@TrimSuffix}
% \changes{v0.9}{2012/02/10}{Added}
% \changes{v1.5}{2013/02/22}{Trim spaces}
% Throw out the radix, comma, and \cmd{\relax}; return the suffix with no leading spaces.
%    \begin{macrocode}
\def\@nameauth@TrimSuffix#1,#2\relax{\trim@spaces{#2}}
%    \end{macrocode}
% \end{macro}
%
% \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\TestStop{\TestPunct{##2}}%
  \def\TestPunct##1%
    {\ifx\TestPunct##1\TestPunct\else\@nameauth@Puncttrue\fi}%
  \@nameauth@Punctfalse%
  \TestDot#1\TestEnd.\TestEnd\TestStop%
}
%    \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}
% \clearpage
% \begin{macro}{\@nameauth@FmtName}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v0.94}{2012/02/15}{Add particle caps}
% \changes{v0.95}{2012/02/17}{Works with \textsf{microtype}}
% \changes{v2.0}{2015/11/11}{One macro instead of two}
% The following macros format the output of \cmd{\Name}, etc. \cmd{\@nameauth@FmtName} prints names in the body text, either formatted or not. Notice how \cmd{\NamesFormat} (Section~\ref{sec:formatting}) sits between a \cmd{\bgroup} and an \cmd{\egroup} to localize the font change. |@nameauth@AlwaysFormat| will force formatting when possible.
%    \begin{macrocode}
\newcommand*{\@nameauth@FmtName}[1]%
{%
  \if@nameauth@AlwaysFormat\@nameauth@FirstFormattrue\fi
  \@nameauth@TestDot{#1}%
  \if@nameauth@DoFormat
    \if@nameauth@FirstFormat
      \bgroup\NamesFormat{#1}\egroup%
    \else
      #1%
    \fi
  \else
    #1%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Index}
% \changes{v0.94}{2012/02/15}{Added}
% \changes{v2.0}{2015/11/11}{Redesigned tagging}
% If the indexing flag is true, create an index entry, otherwise do nothing.
%    \begin{macrocode}
\newcommand*{\@nameauth@Index}[2]%
{%
  \def\cseq{#1}%
  \ifcsname\cseq!TAG\endcsname
    \ifcsname\cseq!PRE\endcsname
      \if@nameauth@DoIndex
        \index{\csname\cseq!PRE\endcsname#2\csname\cseq!TAG\endcsname}%
      \fi
    \else
      \if@nameauth@DoIndex\index{#2\csname\cseq!TAG\endcsname}\fi
    \fi
  \else
    \ifcsname\cseq!PRE\endcsname
      \if@nameauth@DoIndex\index{\csname\cseq!PRE\endcsname#2}\fi
    \else
      \if@nameauth@DoIndex\index{#2}\fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage
% \begin{macro}{\@nameauth@Name}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v0.96}{2012/02/19}{Works w/ \textsf{microtype}, \textsf{memoir}}
% \changes{v1.5}{2013/02/22}{Add reversing and caps}
% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% \changes{v2.1}{2015/11/24}{Isolate Unicode issues}
% \changes{v2.3}{2016/01/05}{Rename as internal macro}
% Here is the heart of the package. \Name*[Marc van]{Dongen} provided the basic structure. Parsing, indexing, and formatting are in discrete elements.
%    \begin{macrocode}
\newcommandx*\@nameauth@Name[3][1=\@empty, 3=\@empty]%
{%
  \let\ex\expandafter%
  \leavevmode\hbox{}%
%    \end{macrocode}
% Names occur in horizontal mode; we ensure that. Next we make copies of the arguments to test them and make parsing decisions
%    \begin{macrocode}
  \protected@edef\testa{#1}%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testbr{\@nameauth@Root{#2}}%
  \protected@edef\testc{#3}%
  \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}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \Name: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \Name: Essential name malformed}%
    \fi
  \fi
%    \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}
% The code below handles non-breaking and regular spaces, as well as commas, in the text and the index by setting up which kind we want to use. These will be inserted as appropriate as the output is formatted.
%    \begin{macrocode}
  \protected@edef\ISpace{\space}%
  \protected@edef\Space{\space}%
  \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi
  \if@nameauth@AlwaysComma
    \protected@edef\ISpace{,\space}%
    \protected@edef\Space{,\space}%
    \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
  \fi
  \if@nameauth@ShowComma
    \protected@edef\ISpace{,\space}%
    \protected@edef\Space{,\space}%
    \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
  \fi
%    \end{macrocode}
% \clearpage\noindent
% The section below parses any ``surnames'' into name/suffix pairs and figures out how to capitalize and reverse them as needed, storing the results for the main parser. 
%    \begin{macrocode}
  \protected@edef\RawShort{\@nameauth@Root{#2}}%
  \if@nameauth@DoCaps
    \protected@edef\CapShort{\@nameauth@CapRoot{#2}}%
  \else
    \let\CapShort\RawShort%
  \fi
  \protected@edef\AllCapShort{\@nameauth@AllCapRoot{#2}}%
  \let\IndexShort\RawShort%
  \ifx\testb\testbr
    \protected@edef\Suff{\@empty}%
    \let\IndexSNN\RawShort%
    \let\Reversed\RawShort%
    \let\SNN\RawShort%
    \let\PrintShort\RawShort%
    \if@nameauth@DoCaps
      \let\Reversed\CapShort%
      \let\SNN\CapShort%
      \let\PrintShort\CapShort%
    \fi
    \if@nameauth@AllThis
      \let\Reversed\AllCapShort%
      \let\SNN\AllCapShort%
      \let\PrintShort\AllCapShort%
    \fi
  \else
    \protected@edef\Suff{\@nameauth@Suffix{#2}}%
    \protected@edef\IndexSNN{\RawShort\ISpace\Suff}%
    \protected@edef\Reversed{\Suff\Space\RawShort}%
    \protected@edef\SNN{\RawShort\Space\Suff}%
    \if@nameauth@RevThis
      \let\PrintShort\Suff%
    \else
      \let\PrintShort\RawShort%
    \fi
    \if@nameauth@DoCaps
      \protected@edef\Reversed{\Suff\Space\CapShort}%
      \protected@edef\SNN{\CapShort\Space\Suff}%
      \if@nameauth@RevThis
        \let\PrintShort\Suff%
      \else
        \let\PrintShort\CapShort%
      \fi
    \fi
    \if@nameauth@AllThis
      \protected@edef\Reversed{\Suff\Space\AllCapShort}%
      \protected@edef\SNN{\AllCapShort\Space\Suff}%
      \if@nameauth@RevThis
        \let\PrintShort\Suff%
      \else
        \let\PrintShort\AllCapShort%
      \fi
    \fi
  \fi
%    \end{macrocode}
% Here we parse names. 
%    \begin{macrocode}
  \ifx\testa\@empty
    \ifx\testc\@empty
%    \end{macrocode}
% This is the section for momonyms, royal name/suffix pairs, and native Eastern names where comma-delimited suffixes are used. The first conditional below checks if we are trying to use an alternate name cross-reference as a main name (code !PN for pseudonym). If we are using a legitimate name, we generate an index entry.
%    \begin{macrocode}
      \ifcsname\csb!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \Name: Xref: #2 cannot be a page reference}%
      \else
        \@nameauth@Index{\csb}{\IndexSNN}%
      \fi
%    \end{macrocode}
% If formatting is active, we handle first and subsequent formatting of names in the main matter (code !MN for main matter name). First we handle subsequent uses. We need \cmd{\expandafter} to enable the punctuation detection.
%    \begin{macrocode}
      \if@nameauth@DoFormat
        \ifcsname\csb!MN\endcsname
          \if@nameauth@FirstName
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
          \fi
          \if@nameauth@FullName
            \@nameauth@FullNamefalse%
            \if@nameauth@RevThis
              \ex\@nameauth@FmtName\ex{\Reversed}%
            \else
              \ex\@nameauth@FmtName\ex{\SNN}%
            \fi
          \else
            \ex\@nameauth@FmtName\ex{\PrintShort}%
          \fi
        \else
%    \end{macrocode}
% Handle first uses.
%    \begin{macrocode}
          \@nameauth@FirstFormattrue%
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \csgdef{\csb!MN}{}%
          \if@nameauth@RevThis
            \ex\@nameauth@FmtName\ex{\Reversed}%
          \else
            \ex\@nameauth@FmtName\ex{\SNN}%
          \fi
        \fi
      \else
%    \end{macrocode}
% \clearpage\noindent
% Take care of names in the front matter (code !NF for non-formatted). First handle subsequent uses.
%    \begin{macrocode}
        \ifcsname\csb!NF\endcsname
          \if@nameauth@FirstName
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
          \fi
          \if@nameauth@FullName
            \@nameauth@FullNamefalse%
            \if@nameauth@RevThis
              \ex\@nameauth@FmtName\ex{\Reversed}%
            \else
              \ex\@nameauth@FmtName\ex{\SNN}%
            \fi
          \else
            \ex\@nameauth@FmtName\ex{\PrintShort}%
          \fi
        \else
%    \end{macrocode}
% Handle first uses.
%    \begin{macrocode}
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \csgdef{\csb!NF}{}%
          \if@nameauth@RevThis
            \ex\@nameauth@FmtName\ex{\Reversed}%
          \else
            \ex\@nameauth@FmtName\ex{\SNN}%
          \fi
        \fi
      \fi
    \else
%    \end{macrocode}
% \clearpage\noindent
% This is the section that handles the old syntax for royal names and native Eastern names. The first conditional below checks if we are trying to use an alternate name cross-reference as a main name (code !PN for pseudonym). If we are using a legitimate name, we generate an index entry.
%    \begin{macrocode}
      \ifcsname\csbc!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \Name: Xref: #2 #3 cannot be a page reference}%
      \else
        \@nameauth@Index{\csbc}{\IndexSNN\ISpace\argc}%
      \fi
%    \end{macrocode}
% If formatting is active, we handle first and subsequent formatting of names in the main matter (code !MN for main matter name). First we handle subsequent uses.
%    \begin{macrocode}
      \if@nameauth@DoFormat
        \ifcsname\csbc!MN\endcsname
          \if@nameauth@FirstName
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
          \fi
          \if@nameauth@FullName
            \@nameauth@FullNamefalse%
            \if@nameauth@RevThis
              \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
            \else
              \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
            \fi
          \else
            \if@nameauth@RevThis
              \ex\@nameauth@FmtName\ex{\argc}%
            \else
              \ex\@nameauth@FmtName\ex{\PrintShort}%
            \fi
          \fi
        \else
%    \end{macrocode}
% Handle first uses.
%    \begin{macrocode}
          \@nameauth@FirstFormattrue%
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \csgdef{\csbc!MN}{}%
          \if@nameauth@RevThis
            \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
          \else
            \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
          \fi
        \fi
      \else
%    \end{macrocode}
% \clearpage\noindent
% Take care of names in the front matter (code !NF for non-formatted). First  handle subsequent uses.
%    \begin{macrocode}
        \ifcsname\csbc!NF\endcsname
          \if@nameauth@FirstName
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
          \fi
          \if@nameauth@FullName
            \@nameauth@FullNamefalse%
            \if@nameauth@RevThis
              \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
            \else
              \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
            \fi
          \else
            \if@nameauth@RevThis
              \ex\@nameauth@FmtName\ex{\argc}%
            \else
              \ex\@nameauth@FmtName\ex{\PrintShort}%
            \fi
          \fi
        \else
%    \end{macrocode}
% Handle first uses.
%    \begin{macrocode}
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \csgdef{\csbc!NF}{}%
          \if@nameauth@RevThis
            \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
          \else
            \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
          \fi
        \fi
      \fi
    \fi
  \else
%    \end{macrocode}
% \clearpage\noindent
% This is the section that handles Western names and non-native Eastern names. The first pair of conditionals handle the \texttt{comma} option, \cmd{\RevThisComma}, and alternate forenames. The next conditional below checks if we are trying to use an alternate name cross-reference as a main name (code !PN for pseudonym). If we are using a legitimate name, we generate an index entry.
%    \begin{macrocode}
    \if@nameauth@RevThisComma
      \protected@edef\ISpace{,\space}%
      \protected@edef\Space{,\space}%
      \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
    \fi
    \ifx\testc\@empty
      \let\FNN\arga%
    \else
      \let\FNN\argc%
    \fi
    \ifcsname\csab!PN\endcsname
      \PackageWarning{nameauth}%
      {macro \Name: Xref: #1 #2 cannot be a page reference}%
    \else
      \ifx\Suff\@empty
        \@nameauth@Index{\csab}{\IndexShort,\space\arga}%
      \else
        \@nameauth@Index{\csab}{\IndexShort,\space\arga,\space\Suff}%
      \fi
    \fi
%    \end{macrocode}
% If formatting is active, we handle first and subsequent formatting of names in the main matter (code !MN for main matter name). First we handle subsequent uses.
%    \begin{macrocode}
    \if@nameauth@DoFormat
      \ifcsname\csab!MN\endcsname
        \if@nameauth@FirstName
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \let\PrintShort\FNN%
        \fi
        \if@nameauth@FullName
          \@nameauth@FullNamefalse%
          \if@nameauth@RevThis
            \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
          \else
            \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
          \fi
        \else
          \ex\@nameauth@FmtName\ex{\PrintShort}%
        \fi
      \else
%    \end{macrocode}
% \clearpage\noindent
% Handle first uses.
%    \begin{macrocode}
        \@nameauth@FirstFormattrue%
        \@nameauth@FullNamefalse%
        \@nameauth@FirstNamefalse%
        \csgdef{\csab!MN}{}%
        \if@nameauth@RevThis
          \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
        \else
          \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
        \fi
      \fi
    \else
%    \end{macrocode}
% Take care of names in the front matter (code !NF for non-formatted). First  handle subsequent uses.
%    \begin{macrocode}
      \ifcsname\csab!NF\endcsname
        \if@nameauth@FirstName
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \let\PrintShort\FNN%
        \fi
        \if@nameauth@FullName
          \@nameauth@FullNamefalse%
          \if@nameauth@RevThis
            \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
          \else
            \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
          \fi
        \else
          \ex\@nameauth@FmtName\ex{\PrintShort}%
        \fi
      \else
%    \end{macrocode}
% Handle first uses.
%    \begin{macrocode}
        \@nameauth@FullNamefalse%
        \@nameauth@FirstNamefalse%
        \csgdef{\csab!NF}{}%
        \if@nameauth@RevThis
          \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
        \else
          \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
        \fi
      \fi
    \fi
  \fi
%    \end{macrocode}
% \clearpage\noindent
% Reset all the ``per name'' Boolean values.
%    \begin{macrocode}
  \@nameauth@FirstFormatfalse%
  \@nameauth@NBSPfalse%
  \@nameauth@DoCapsfalse%
  \@nameauth@Accentfalse%
  \@nameauth@AllThisfalse%
  \@nameauth@ShowCommafalse%
  \@nameauth@RevThisfalse%
  \@nameauth@RevThisCommafalse%
%    \end{macrocode}
% Call the full stop detection.
%    \begin{macrocode}
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
%    \end{macrocode}
% \end{macro}
% \subsection{User Interface Macros}
% \begin{macro}{\CapThis}
% \changes{v0.94}{2012/02/15}{Added}
% Tells the root capping macro to cap an unaccented character.
%    \begin{macrocode}
\newcommand*{\CapThis}{\@nameauth@DoCapstrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\AccentCapThis}
% \changes{v2.1}{2015/11/24}{Added}
% Tells the root capping macro to cap an accented Unicode character.
%    \begin{macrocode}
\newcommand*{\AccentCapThis}{\@nameauth@Accenttrue\@nameauth@DoCapstrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\CapName}
% \changes{v1.5}{2013/02/22}{Added}
% Capitalize entire name.
%    \begin{macrocode}
\newcommand*{\CapName}{\@nameauth@AllThistrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\RevName}
% \changes{v1.5}{2013/02/22}{Added}
% Reverse name order.
%    \begin{macrocode}
\newcommand*{\RevName}{\@nameauth@RevThistrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\RevComma}
% \changes{v1.5}{2013/02/22}{Added}
% Last name, comma, first name.
%    \begin{macrocode}
\newcommand*{\RevComma}%
  {\@nameauth@RevThistrue\@nameauth@RevThisCommatrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ShowComma}
% \changes{v1.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}{\KeepAffix}
% \changes{v1.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}{\NamesInactive}
% Switch to the ``non-formatted'' species of names.
%    \begin{macrocode}
\newcommand*{\NamesInactive}{\@nameauth@DoFormatfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NamesActive}
% Switch to the ``formatted'' species of names.
%    \begin{macrocode}
\newcommand*{\NamesActive}{\@nameauth@DoFormattrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AllCapsInactive}
% Turn off global surname capitalization.
% \changes{v1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*{\AllCapsInactive}{\@nameauth@AllCapsfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AllCapsActive}
% Turn on global surname capitalization.
% \changes{v1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*{\AllCapsActive}{\@nameauth@AllCapstrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseInactive}
% Turn off global name reversing.
% \changes{v1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*{\ReverseInactive}{\@nameauth@RevAllfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseActive}
% Turn on global name reversing.
% \changes{v1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*{\ReverseActive}{\@nameauth@RevAlltrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseCommaInactive}
% Turn off global ``last-name-comma-first.''
% \changes{v1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*{\ReverseCommaInactive}%
  {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ReverseCommaActive}
% Turn on global ``last-name-comma-first.''
% \changes{v1.5}{2013/02/22}{Added}
%    \begin{macrocode}
\newcommand*{\ReverseCommaActive}%
  {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexInactive}
% \changes{v0.94}{2012/02/15}{Added}
% turn off global indexing of names.
%    \begin{macrocode}
\newcommand*{\IndexInactive}{\@nameauth@DoIndexfalse}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\IndexActive}
% \changes{v0.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{v2.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}{\LocalNames}
% \changes{v2.3}{2016/01/05}{Added}
% \cmd{\LocalNames} sets |@nameauth@LocalNames| true so \cmd{\ForgetName} and \cmd{\SubvertName} do not affect both formatted and unformatted names.
%    \begin{macrocode}
\newcommand*\LocalNames{\@nameauth@LocalNamestrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\GlobalNames}
% \changes{v2.3}{2016/01/05}{Added}
% \cmd{\GlobalNames} sets |@nameauth@LocalNames| false, restoring the default behavior of \cmd{\ForgetName} and \cmd{\SubvertName}.
%    \begin{macrocode}
\newcommand*\GlobalNames{\@nameauth@LocalNamesfalse}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Name}
% \changes{v2.3}{2016/01/05}{Change to interface macro}
% \cmd{\Name} calls \cmd{\NameauthName,} the interface hook.
%    \begin{macrocode}
\def\Name{\NameauthName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Name*}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\Name*} sets up a long name reference and calls \cmd{\NameauthLName,} the interface hook.
%    \begin{macrocode}
\WithSuffix\def\Name*{\@nameauth@FullNametrue\NameauthLName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName}
% \changes{v0.9}{2012/02/10}{Added}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\FName} sets up a short name reference and calls \cmd{\NameauthFName,} the interface hook.
%    \begin{macrocode}
\def\FName{\@nameauth@FirstNametrue\NameauthFName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName*}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\FName} and \cmd{\FName*} are identical.
%    \begin{macrocode}
\WithSuffix\def\FName*{\@nameauth@FirstNametrue\NameauthFName}
%    \end{macrocode}
% \end{macro}
% \clearpage\noindent
% \begin{macro}{\AKA}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v0.9}{2012/02/10}{Add starred mode; redesigned}
% \changes{v1.26}{2012/04/24}{Fix sorting of name suffixes}
% \changes{v1.5}{2013/02/22}{Add reversing and caps}
% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% \changes{v2.1}{2015/11/24}{Isolate Unicode issues}
% \changes{v2.3}{2016/01/05}{Expand starred mode}
% \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]%
{%
  \let\ex\expandafter%
  \leavevmode\hbox{}%
%    \end{macrocode}
% Names occur in horizontal mode; we ensure that. Next we make copies of the arguments to test them and make parsing decisions.
%    \begin{macrocode}
  \protected@edef\testa{#1}%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testbr{\@nameauth@Root{#2}}%
  \protected@edef\testc{#3}%
  \protected@edef\argc{\trim@spaces{#3}}%
  \protected@edef\testd{\trim@spaces{#4}}%
  \protected@edef\testdr{\@nameauth@Root{#4}}%
  \protected@edef\teste{#5}%
  \protected@edef\arge{\trim@spaces{#5}}%
  \def\csd{\@nameauth@Clean{#4}}%
  \def\csde{\@nameauth@Clean{#4#5}}%
  \def\cscd{\@nameauth@Clean{#3!#4}}%
%    \end{macrocode}
% Test for malformed input.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \AKA: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \AKA: Essential name malformed}%
    \fi
  \fi
  \ifx\testd\@empty
    \PackageError{nameauth}%
    {macro \AKA: Essential name missing}%
  \else
    \ifx\csd\@empty
      \PackageError{nameauth}%
      {macro \AKA: Essential name malformed}%
    \fi
  \fi
%    \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}
% \clearpage\noindent
% The code below handles non-breaking and regular spaces, as well as commas, in the text and the index by setting up which kind we want to use. These will be inserted as appropriate as the output is formatted.
%    \begin{macrocode}
  \protected@edef\ISpace{\space}%
  \protected@edef\Space{\space}%
  \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi
  \if@nameauth@AlwaysComma
    \protected@edef\ISpace{,\space}%
    \protected@edef\Space{,\space}%
    \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
  \fi
  \if@nameauth@ShowComma
    \protected@edef\ISpace{,\space}%
    \protected@edef\Space{,\space}%
    \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
  \fi
%    \end{macrocode}
% The section below parses any ``surnames'' into name/suffix pairs and figures out how to capitalize and reverse them as needed, storing the results for the main parser. We have to handle several more combinations here than with \cmd{\Name} above.
%    \begin{macrocode}
  \protected@edef\Shortb{\@nameauth@Root{#2}}%
  \protected@edef\Shortd{\@nameauth@Root{#4}}%
  \if@nameauth@DoCaps
    \protected@edef\CapShort{\@nameauth@CapRoot{#4}}%
  \else
    \let\CapShort\Shortd
  \fi
  \protected@edef\AllCapShort{\@nameauth@AllCapRoot{#4}}%
  \ifx\testb\testbr
    \let\SNNb\Shortb%
    \protected@edef\Suffb{\@empty}%
  \else
    \protected@edef\Suffb{\@nameauth@Suffix{#2}}%
    \protected@edef\SNNb{\Shortb\ISpace\Suffb}%
  \fi
  \ifx\testd\testdr
    \protected@edef\Suffd{\@empty}%
    \let\ISNNd\Shortd%
    \let\Reversed\Shortd%
    \let\SNNd\Shortd%
    \if@nameauth@DoCaps
      \let\SNNd\CapShort%
      \let\Reversed\CapShort%
    \fi
    \if@nameauth@AllThis
      \let\SNNd\AllCapShort%
      \let\Reversed\AllCapShort%
    \fi
%    \end{macrocode}
% \clearpage
%    \begin{macrocode}
  \else
    \protected@edef\Suffd{\@nameauth@Suffix{#4}}%
    \protected@edef\ISNNd{\Shortd\ISpace\Suffd}%
    \protected@edef\Reversed{\Suffd\Space\Shortd}%
    \protected@edef\SNNd{\Shortd\Space\Suffd}%
    \if@nameauth@DoCaps
      \protected@edef\Reversed{\Suffd\Space\CapShort}%
      \protected@edef\SNNd{\CapShort\Space\Suffd}%
    \fi
    \if@nameauth@AllThis
      \protected@edef\Reversed{\Suffd\Space\AllCapShort}%
      \protected@edef\SNNd{\AllCapShort\Space\Suffd}%
    \fi
  \fi
%    \end{macrocode}
% Here we parse names. 
%    \begin{macrocode}
  \ifx\testc\@empty
    \ifx\teste\@empty
%    \end{macrocode}
% For mononyms and name/suffix pairs: If a pseudonym has not been generated by \cmd{\AKA} or \cmd{\ExcludeName}, and if the proposed pseudonym is not already a mainmatter or frontmatter name, then generate a \textit{see} reference from the pseudonym to a name that will appear in the index.
%    \begin{macrocode}
      \ifcsname\csd!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \AKA: XRef: #4 exists}%
      \else
        \ifcsname\csd!MN\endcsname
          \PackageWarning{nameauth}%
          {macro \AKA: Name reference: #4 exists; no xref}%
        \else
          \ifcsname\csd!NF\endcsname
            \PackageWarning{nameauth}%
            {macro \AKA: Name reference: #4 exists; no xref}%
          \else
            \csgdef{\csd!PN}{}%
            \ifx\testa\@empty
              \@nameauth@Index{\csd}%
                {\ISNNd|see{\SNNb}}%
            \else
              \ifx\Suffb\@empty
                \@nameauth@Index{\csd}%
                  {\ISNNd|see{\SNNb,\space\arga}}%
              \else
                \@nameauth@Index{\csd}%
                  {\ISNNd|see{\Shortb,\space\arga,\space\Suffb}}%
              \fi
            \fi
          \fi
        \fi
      \fi
%    \end{macrocode}
% \clearpage\noindent Print an appropriate version of the pseudonym (capped, reversed, etc.) in the text with no special formatting even if no cross-reference was generated in the index. Again, \cmd{\expandafter} is used for the punctuation detection.
%    \begin{macrocode}
      \if@nameauth@RevThisComma
        \protected@edef\ISpace{,\space}%
        \protected@edef\Space{,\space}%
        \if@nameauth@NBSP
          \protected@edef\Space{,\nobreakspace}%
        \fi
      \fi
      \if@nameauth@RevThis
        \ex\@nameauth@FmtName\ex{\Reversed}%
      \else
        \ex\@nameauth@FmtName\ex{\SNNd}%
      \fi
    \else
%    \end{macrocode}
% For name/affix using the old syntax: If a pseudonym has not been generated by \cmd{\AKA} or \cmd{\ExcludeName}, and if the proposed pseudonym is not already a mainmatter or frontmatter name, then generate a \textit{see} reference from the pseudonym to a name that will appear in the index.
%    \begin{macrocode}
      \ifcsname\csde!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \AKA: XRef: #4 #5 exists}%
      \else
        \ifcsname\csde!MN\endcsname
          \PackageWarning{nameauth}%
          {macro \AKA: Name reference: #4 #5 exists; no xref}%
        \else
          \ifcsname\csde!NF\endcsname
            \PackageWarning{nameauth}%
            {macro \AKA: Name reference: #4 #5 exists; no xref}%
          \else
            \csgdef{\csde!PN}{}%
            \ifx\testa\@empty
              \@nameauth@Index{\csde}%
                {\ISNNd\ISpace\arge|see{\SNNb}}%
            \else
              \ifx\Suffb\@empty
                \@nameauth@Index{\csde}%
                  {\ISNNd\ISpace\arge|see{\SNNb,\space\arga}}%
              \else
                \@nameauth@Index{\csde}%
                {\ISNNd\ISpace\arge|see{\Shortb,\space\arga,\space\Suffb}}%
              \fi
            \fi
          \fi
        \fi
      \fi
%    \end{macrocode}
% \clearpage\noindent Print an appropriate version of the pseudonym (capped, reversed, etc.) in the text with no special formatting even if no cross-reference was generated in the index.
%    \begin{macrocode}
      \if@nameauth@RevThisComma
        \protected@edef\ISpace{,\space}%
        \protected@edef\Space{,\space}%
        \if@nameauth@NBSP
          \protected@edef\Space{,\nobreakspace}%
        \fi
      \fi
      \if@nameauth@AltAKA
        \ex\@nameauth@FmtName\ex{\arge}%
      \else
        \if@nameauth@RevThis
          \ex\@nameauth@FmtName\ex{\ex\arge\ex\Space\SNNd}%
        \else
          \ex\@nameauth@FmtName\ex{\ex\SNNd\ex\space\arge}%
        \fi
      \fi
    \fi
  \else
%    \end{macrocode}
% For Western names and affixes: If a pseudonym has not been generated by \cmd{\AKA} or \cmd{\ExcludeName}, and if the proposed pseudonym is not already a mainmatter or frontmatter name, then generate a \textit{see} reference from the pseudonym to a name that will appear in the index.
%    \begin{macrocode}
    \ifcsname\cscd!PN\endcsname
      \PackageWarning{nameauth}%
      {macro \AKA: XRef: #3 #4 exists}%
    \else
      \ifcsname\cscd!MN\endcsname
        \PackageWarning{nameauth}%
        {macro \AKA: Name reference: #3 #4 exists; no xref}%
      \else
        \ifcsname\cscd!NF\endcsname
          \PackageWarning{nameauth}%
          {macro \AKA: Name reference: #3 #4 exists; no xref}%
        \else
          \csgdef{\cscd!PN}{}%
          \ifx\testa\@empty
            \ifx\Suffd\@empty
              \@nameauth@Index{\cscd}%
                {\ISNNd,\space\argc|see{\SNNb}}%
            \else
              \@nameauth@Index{\cscd}%
                {\Shortd,\space\argc,\space\Suffd|see{\SNNb}}%
            \fi
          \else
            \ifx\Suffb\@empty
              \ifx\Suffd\@empty
                \@nameauth@Index{\cscd}%
                  {\ISNNd,\space\argc|see{\SNNb,\space\arga}}%
              \else
                \@nameauth@Index{\cscd}%
                {\Shortd,\space\argc,\space\Suffd|see{\SNNb,\space\arga}}%
              \fi
            \else
              \ifx\Suffd\@empty
                \@nameauth@Index{\cscd}%
                {\ISNNd,\space\argc|see{\Shortb,\space\arga,\space\Suffb}}%
              \else
                \@nameauth@Index{\cscd}%
  {\Shortd,\space\argc,\space\Suffd|see{\Shortb,\space\arga,\space\Suffb}}%
              \fi
            \fi
          \fi
        \fi
      \fi
    \fi
%    \end{macrocode}
% \noindent Print an appropriate version of the pseudonym (capped, reversed, etc.) in the text with no special formatting even if no cross-reference was generated in the index.
%    \begin{macrocode}
    \if@nameauth@RevThisComma
      \protected@edef\ISpace{,\space}%
      \protected@edef\Space{,\space}%
      \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
    \fi
    \ifx\teste\@empty
      \let\FNN\argc%
    \else
      \let\FNN\arge%
    \fi
    \if@nameauth@AltAKA
      \ex\@nameauth@FmtName\ex{\FNN}%
    \else
      \if@nameauth@RevThis
        \ex\@nameauth@FmtName\ex{\ex\SNNd\ex\Space\FNN}%
      \else
        \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNNd}%
      \fi
    \fi
  \fi
%    \end{macrocode}
% Reset all the ``per name'' Boolean values.
%    \begin{macrocode}
  \@nameauth@NBSPfalse%
  \@nameauth@AltAKAfalse%
  \@nameauth@DoCapsfalse%
  \@nameauth@Accentfalse%
  \@nameauth@AllThisfalse%
  \@nameauth@ShowCommafalse%
  \@nameauth@RevThisfalse%
  \@nameauth@RevThisCommafalse%
%    \end{macrocode}
% Call the full stop detection.
%    \begin{macrocode}
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AKA*}
% \changes{v0.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\def\AKA*{\@nameauth@AltAKAtrue\AKA}
%    \end{macrocode}
% \end{macro}
% \clearpage\noindent
%
% \begin{macro}{\PName}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v2.3}{2016/01/05}{Work directly with hooks}
% \cmd{\PName} is a convenience macro that calls \cmd{\NameauthName}, then \cmd{\AKA}.
%    \begin{macrocode}
\newcommandx*\PName[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \NameauthName[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PName*}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% This sets up a long name reference and calls \cmd{\PName}.
%    \begin{macrocode}
\WithSuffix\def\PName*{\@nameauth@FullNametrue\PName}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\TagName}
% \changes{v1.2}{2012/02/25}{Added}
% \changes{v1.9}{2015/07/09}{Fix cs collisions}
% \changes{v2.0}{2015/11/11}{Isolate malformed input; redesign tagging}
% This creates an index entry tag that is applied to a name that is not already used as a cross reference via \cmd{\AKA}.
%    \begin{macrocode}
\newcommandx*\TagName[4][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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 and then we parse the arguments, defining the tag control sequences.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \TagName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \TagName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \TagName: not tagging xref: #2}%
      \else
        \csgdef{\csb!TAG}{#4}%
      \fi
    \else
      \ifcsname\csbc!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \TagName: not tagging xref: #2 #3}%
      \else
        \csgdef{\csbc!TAG}{#4}%
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \PackageWarning{nameauth}%
      {macro \TagName: not tagging xref: #1 #2}%
    \else
      \csgdef{\csab!TAG}{#4}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage\noindent
%
% \begin{macro}{\UntagName}
% \changes{v1.2}{2012/02/25}{Added}
% \changes{v1.9}{2015/07/09}{Ensure global undef, fix cs collisions}
% \changes{v2.0}{2015/11/11}{Isolate malformed input; redesign tagging}
% This deletes an index entry tag.
%    \begin{macrocode}
\newcommandx*\UntagName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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 and then we parse the arguments, undefining the tag control sequences.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \UntagName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \UntagName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \global\csundef{\csb!TAG}%
    \else
      \global\csundef{\csbc!TAG}%
    \fi
  \else
    \global\csundef{\csab!TAG}%
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage\noindent
%
% \begin{macro}{\PretagName}
% \changes{v2.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\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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 and then we parse the arguments, defining the tag control sequences.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \TagName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \TagName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \PretagName: tagging xref: #2}%
      \fi
      \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi
    \else
      \ifcsname\csbc!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \PretagName: tagging xref: #2 #3}%
      \fi
      \if@nameauth@Pretag\csgdef{\csbc!PRE}{#4\@nameauth@Actual}\fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \PackageWarning{nameauth}%
      {macro \PretagName: tagging xref: #1 #2}%
    \fi
    \if@nameauth@Pretag\csgdef{\csab!PRE}{#4\@nameauth@Actual}\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
% \clearpage\noindent
%
% \begin{macro}{\IndexName}
% \changes{v0.75}{2012/01/19}{Use current arguments}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v1.26}{2012/04/24}{Fix name suffix sorting}
% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% This creates an index entry that is not already a pseudonym. It prints nothing. It does ensure consistent formatting.
%    \begin{macrocode}
\newcommandx*\IndexName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\arga{\trim@spaces{#1}}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testbr{\@nameauth@Root{#2}}%
  \protected@edef\testc{#3}%
  \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}
% We make copies of the arguments to test them and make parsing decisions. Below we handle the types of spaces or commas that will be inserted into the index entries.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \IndexName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \IndexName: Essential name malformed}%
    \fi
  \fi
  \protected@edef\Space{\space}%
  \if@nameauth@AlwaysComma
    \protected@edef\Space{,\space}%
  \fi
  \if@nameauth@ShowComma
    \protected@edef\Space{,\space}%
  \fi
%    \end{macrocode}
% Now we deal with suffixes, and whether to handle them for Western or Eastern names.
%    \begin{macrocode}
  \let\Short\testbr%
  \ifx\testb\testbr
    \let\SNN\Short%
    \protected@edef\Suff{\@empty}%
  \else
    \protected@edef\Suff{\@nameauth@Suffix{#2}}%
    \protected@edef\SNN{\Short\Space\Suff}%
  \fi
%    \end{macrocode}
% \clearpage\noindent
% We create the appropriate index entries with tags, letting the internal indexing macro sort that out. We do not create an index entry in the case that a name has been used as a pseudonym by \cmd{\AKA} or \cmd{\ExcludeName}.
%    \begin{macrocode}
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \IndexName: XRef: #2 exists}%
      \else
        \@nameauth@Index{\csb}{\SNN}%
      \fi
    \else
      \ifcsname\csbc!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \IndexName: XRef: #2 #3 exists}%
      \else
        \@nameauth@Index{\csbc}{\SNN\Space\argc}%
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \PackageWarning{nameauth}%
      {macro \IndexName: XRef: #1 #2 exists}%
    \else
      \ifx\Suff\@empty
        \@nameauth@Index{\csab}{\Short,\space\arga}%
      \else
        \@nameauth@Index{\csab}{\Short,\space\arga,\space\Suff}%
      \fi
    \fi
  \fi
  \@nameauth@ShowCommafalse%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ExcludeName}
% \changes{v0.94}{2012/02/15}{Added}
% \changes{v2.0}{2015/11/11}{Isolate malformed input}
% \changes{v2.3}{2016/01/05}{Distinguish excluded names from regular aliases}
% This macro prevents a name from being formatted or indexed, making \cmd{\Name} and friends print their arguments, emit a warning, and continue.
%    \begin{macrocode}
\newcommandx*\ExcludeName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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 and make parsing decisions. Below we parse the name arguments and create a pseudonym control sequence if it does not exist.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \ExcludeName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \ExcludeName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Xref: #2 already exists}%
      \else
        \ifcsname\csb!MN\endcsname
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #2 exists; no exclusion}%
        \else
          \ifcsname\csb!NF\endcsname
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 exists; no exclusion}%
          \else
            \csgdef{\csb!PN}{!}%
          \fi
        \fi
      \fi
    \else
      \ifcsname\csbc!PN\endcsname
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Xref: #2 #3 already exists}%
      \else
        \ifcsname\csbc!MN\endcsname
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #2 #3 exists; no exclusion}%
        \else
          \ifcsname\csbc!NF\endcsname
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 #3 exists; no exclusion}%
          \else
            \csgdef{\csbc!PN}{!}%
          \fi
        \fi
      \fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \PackageWarning{nameauth}%
      {macro \ExcludeName: XRef: #1 #2 already exists}%
    \else
      \ifcsname\csab!MN\endcsname
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Reference: #1 #2 exists; no exclusion}%
      \else
        \ifcsname\csab!NF\endcsname
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #1 #2 exists; no exclusion}%
        \else
          \csgdef{\csab!PN}{!}%
        \fi
      \fi
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IfAKA}
% \changes{v2.3}{2016/01/05}{Added}
% This macro expands one path if a see-reference name 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\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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 and make parsing decisions. Below we parse the name arguments and create a pseudonym control sequence if it does not exist.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \ExcludeName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \ExcludeName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!PN\endcsname
        \ifcsempty{\csb!PN}{#4}{#6}%
      \else#5\fi
    \else
      \ifcsname\csbc!PN\endcsname
        \ifcsempty{\csbc!PN}{#4}{#6}%
      \else#5\fi
    \fi
  \else
    \ifcsname\csab!PN\endcsname
      \ifcsempty{\csab!PN}{#4}{#6}%
    \else#5\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IfFrontName}
% \changes{v2.3}{2016/01/05}{Added}
% This macro expands one path if a front matter name exists, or else the other if it does not exist.
%    \begin{macrocode}
\newcommandx\IfFrontName[5][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \def\csb{\@nameauth@Clean{#2}}%
  \def\csbc{\@nameauth@Clean{#2#3}}%
  \def\csab{\@nameauth@Clean{#1!#2}}%
%    \end{macrocode}
% \clearpage\noindent
% We make copies of the arguments to test them and make parsing decisions. Below we parse the name arguments and create a pseudonym control sequence if it does not exist.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \ExcludeName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \ExcludeName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!NF\endcsname#4\else#5\fi
    \else
      \ifcsname\csbc!NF\endcsname#4\else#5\fi
    \fi
  \else
    \ifcsname\csab!NF\endcsname#4\else#5\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IfMainName}
% \changes{v2.3}{2016/01/05}{Added}
% This macro expands one path if a main matter name exists, or else the other if it does not exist.
%    \begin{macrocode}
\newcommandx\IfMainName[5][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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 and make parsing decisions. Below we parse the name arguments and create a pseudonym control sequence if it does not exist.
%    \begin{macrocode}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \ExcludeName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \ExcludeName: Essential name malformed}%
    \fi
  \fi
  \ifx\testa\@empty
    \ifx\testc\@empty
      \ifcsname\csb!MN\endcsname#4\else#5\fi
    \else
      \ifcsname\csbc!MN\endcsname#4\else#5\fi
    \fi
  \else
    \ifcsname\csab!MN\endcsname#4\else#5\fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ForgetName}
% \changes{v0.75}{2012/01/19}{New argument added}
% \changes{v1.9}{2015/07/09}{Ensure global undef}
% \changes{v2.0}{2015/11/11}{Isolate malformed input}
% \changes{v2.3}{2016/01/05}{Changed to allow global or local behavior}
% This undefines a control sequence to force the ``first use'' option of \cmd{\Name}.
%    \begin{macrocode}
\newcommandx*\ForgetName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \ForgetName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \ForgetName: Essential name malformed}%
    \fi
  \fi
%    \end{macrocode}
% Now we parse the arguments, undefining the control sequences either locally by section type or globally. |@nameauth@LocalNames| toggles the local or global behavior, while |@nameauth@DoFormat| selects the type of name.
%    \begin{macrocode}
  \ifx\testa\@empty
    \ifx\testc\@empty
      \if@nameauth@LocalNames
        \if@nameauth@DoFormat
          \global\csundef{\csb!MN}%
        \else
          \global\csundef{\csb!NF}%
        \fi
      \else
        \global\csundef{\csb!MN}%
        \global\csundef{\csb!NF}%
      \fi
    \else
      \if@nameauth@LocalNames
        \if@nameauth@DoFormat
          \global\csundef{\csbc!MN}%
        \else
          \global\csundef{\csbc!NF}%
        \fi
      \else
        \global\csundef{\csbc!MN}%
        \global\csundef{\csbc!NF}%
      \fi
    \fi
  \else
    \if@nameauth@LocalNames
      \if@nameauth@DoFormat
        \global\csundef{\csab!MN}%
      \else
        \global\csundef{\csab!NF}%
      \fi
%    \end{macrocode}
% \clearpage\noindent
%    \begin{macrocode}
    \else
      \global\csundef{\csab!MN}%
      \global\csundef{\csab!NF}%
    \fi
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SubvertName}
% \changes{v0.9}{2012/02/10}{Added}
% \changes{v2.0}{2015/11/11}{Isolate malformed input}
% \changes{v2.3}{2016/01/05}{Changed to allow global or local behavior}
% This defines a control sequence to suppress the ``first use'' of \cmd{\Name}.
%    \begin{macrocode}
\newcommandx*\SubvertName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testa{#1}%
  \protected@edef\testb{\trim@spaces{#2}}%
  \protected@edef\testc{#3}%
  \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}
  \ifx\testb\@empty
    \PackageError{nameauth}%
    {macro \SubvertName: Essential name missing}%
  \else
    \ifx\csb\@empty
      \PackageError{nameauth}%
      {macro \SubvertName: Essential name malformed}%
    \fi
  \fi
%    \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 |@nameauth@DoFormat| selects the type of name.
%    \begin{macrocode}
  \ifx\testa\@empty
    \ifx\testc\@empty
      \if@nameauth@LocalNames
        \if@nameauth@DoFormat
          \csgdef{\csb!MN}{}%
        \else
          \csgdef{\csb!NF}{}%
        \fi
      \else
        \csgdef{\csb!MN}{}%
        \csgdef{\csb!NF}{}%
      \fi
    \else
      \if@nameauth@LocalNames
        \if@nameauth@DoFormat
          \csgdef{\csbc!MN}{}%
        \else
          \csgdef{\csbc!NF}{}%
        \fi
      \else
        \csgdef{\csbc!MN}{}%
        \csgdef{\csbc!NF}{}%
      \fi
    \fi
%    \end{macrocode}
% \clearpage\noindent
%    \begin{macrocode}
  \else
    \if@nameauth@LocalNames
      \if@nameauth@DoFormat
        \csgdef{\csab!MN}{}%
      \else
        \csgdef{\csab!NF}{}%
      \fi
    \else
      \csgdef{\csab!MN}{}%
      \csgdef{\csab!NF}{}%
    \fi
  \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{nameauth}
% \changes{v1.6}{2013/03/10}{Added}
% \changes{v2.0}{2015/11/11}{Redesigned argument handling}
% \changes{v2.11}{2015/11/29}{Bugfix}
% The |nameauth| environment provides a means to implement shorthand references to names in a document.
%    \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\testc{\trim@spaces{##3}}%
    \protected@edef\testd{\trim@spaces{##4}}%
    \newtoks\tokb%
    \newtoks\tokc%
    \newtoks\tokd%
    \tokb\expandafter{##2}%
    \tokc\expandafter{##3}%
    \tokd\expandafter{##4}%
    \ifx\arga\@empty
      \PackageError{nameauth}%
      {environment nameauth: Control sequence missing}%
    \else
      \ifx\testc\@empty
        \PackageError{nameauth}%
        {environment nameauth: Essential name missing}%
      \else
        \ifcsname\arga\endcsname
          \PackageWarning{nameauth}%
          {environment nameauth: Redefinition of shorthands}%
        \fi
        \ifx\testd\@empty
          \ifx\testb\@empty
            \ex\csgdef\ex{\ex\arga\ex}\ex{\ex\NameauthName\ex{\the\tokc}}%
            \ex\csgdef\ex{\ex L\ex\arga\ex}\ex{\ex\@nameauth@FullNametrue%
              \ex\NameauthLName\ex{\the\tokc}}%
            \ex\csgdef\ex{\ex S\ex\arga\ex}\ex{\ex\@nameauth@FirstNametrue%
              \ex\NameauthFName\ex{\the\tokc}}%
%    \end{macrocode}
% \clearpage\noindent
%    \begin{macrocode}
          \else
            \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\tokb\ex]%
              \ex{\the\tokc}}%
            \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\tokb\ex]\ex{\the\tokc}}%
            \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\tokb\ex]\ex{\the\tokc}}%
          \fi
        \else
          \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\tokc\ex}%
              \ex[\the\tokd]}%
            \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\tokc\ex}\ex[\the\tokd]}%
            \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\tokc\ex}\ex[\the\tokd]}%
          \else
            \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\tokb%
              \ex\ex\ex]\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
            \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\tokb%
              \ex\ex\ex]\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
            \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\tokb\ex\ex\ex]%
              \ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
          \fi
        \fi
      \fi
    \fi
    \ignorespaces%
  }\ignorespaces%
}{\endgroup\ignorespaces}
%    \end{macrocode}
% \end{environment}
%\Finale
\endinput
%</package>