summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
blob: d4a81496bf6dac68acdbac121446688c5af4424f (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
% \iffalse meta-comment
%
% Copyright (C) 2011 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, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Charles P. Schaum.
%
% This work consists of the files nameauth.dtx and nameauth.ins
% and the derived filebase nameauth.sty.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{nameauth.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{nameauth}
%<*package>
    [2015/07/09 v1.9 name authority macros to aid consistent display and indexing of names]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\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
\usepackage{makeidx}
\usepackage{multicol}
\usepackage[toc]{multitoc}
\usepackage{nameauth}[2015/07/09]
\usepackage{hypdoc}
\usepackage{tikz}
\makeindex
\frenchspacing
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{nameauth}
  \< Wash & George & Washington & >
  \< Soto & Hernando & de Soto & >
  \< JRock & John David & Rockefeller, II & >
  \< JayR & John David & Rockefeller, IV & Jay >
  \< Aris & & Aristotle & >
  \< Eliz & & Elizabeth, I & >
  \< 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 & >
\end{nameauth}
\TagName{Antiochus, IV}{ Epiphanes, king}
\TagName{Chiang}[Kai-shek]{, president}
\TagName{Sun, Yat-sen}{, president}
\TagName{Mao}[Tse-tung]{, chairman}
\TagName{Ptolemy I}[Soter]{, king}
\TagName{Henry}[VIII]{, king}
\TagName{Charles, the Bald}{, emperor}
\TagName{Francis, I}{, king}
\TagName{Demetrius, I Soter}{, king}
\TagName{Charles, V}{, emperor}
\TagName{Louis, XIV}{, king}
\TagName{Dagobert}[I]{, king}
\TagName{Elizabeth, I}{, queen}
\TagName{Leo, I}{, pope}
\TagName[George]{Washington}{, president}
\TagName{Gregory, I}{, pope}
\TagName[Fumimaro]{Konoe}{, PM}
\TagName{Yoshida}[Shigeru]{, PM}
\TagName[James Earl]{Carter, Jr.}{, president}
\TagName[John]{Smith}{*}
\TagName[J.Q.]{Public}{*}
\begin{document}
  \DocInput{nameauth.dtx}
  \PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{1821}
%
% \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 version}
% \changes{v0.75}{2012/01/19}{Add new features.}
% \changes{v0.8}{2012/01/29}{Improve functionality, compatibility, and docs.}
% \changes{v0.85}{2012/02/05}{Add comma suppression, new options, more features.}
% \changes{v0.86}{2012/02/06}{Fix regressions.}
% \changes{v0.9}{2012/02/10}{Add first name formatting; comma and affix handling expandable.}
% \changes{v0.94}{2012/02/15}{Build with all major \LaTeX{} engines. 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}{Fix errors when emitting warnings.}
% \changes{v1.2}{2012/03/25}{Add tagging features; improve documentation.}
% \changes{v1.26}{2012/04/24}{Fix first-letter caps \& sorting of name affixes in index.}
% \changes{v1.4}{2012/07/24}{Fix moving arguments \& other bugs; add features.}
% \changes{v1.5}{2013/02/22}{Minor bugfixes; add features.}
% \changes{v1.6}{2013/03/10}{Add |nameauth| environment.}
% \changes{v1.7}{2013/04/02}{Change options processing to prevent errors.}
% \changes{v1.8}{2013/09/19}{Warn users to avoid protected accenting macros in names.}
% \changes{v1.9}{2015/07/09}{Improve Eastern name support. Fix potential name collisions with the simplified interface. Ensure global undefining of names and tags. Rewrite documentation.}
%
% \DoNotIndex{\@empty, \@gobble, \@period, \@token, \protected@edef, \zap@space, \bfseries, \bgroup, \csgdef, \csname, \csundef, \DeclareOption, \def, \detokenize, \edef, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \expandafter, \fi, \Forenames, \futurelet, \hbox, \if, \ifcsname, \ifx, \ignorespaces, \index, \itshape, \leavevmode, \let, \newcommand, \newcommandx, \newenvironment, \newif, \PackageWarning, \ProcessOptions, \relax, \renewcommand, \RequirePackage, \scshape, \space, \textbackslash, \uppercase, \WithSuffix}
%
% \GetFileInfo{nameauth.dtx}
% \title{The \textsf{nameauth} package}
% \author{Charles P. Schaum \\ \texttt{charles dot schaum at comcast dot net}}
% \date{\fileversion~from \filedate}
% \maketitle
%
% \begin{abstract}
% \noindent The \textsf{nameauth} package automates the formatting and indexing of names.\footnote{I omit the ``Implementation'' section to show the naming macros with a ``normal'' index.} 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}
%
% \tableofcontents
%
% \section{Introduction}
%
% \subsection{Preliminaries}
%
% Books can reference hundreds of names. It takes time and money to check them. This package helps to format and index names consistently and automatically, helping you save time and money. Features include:
% \begin{multicols}{2}
% \begin{itemize}\setlength\itemsep{0pt}\small
% \item Simultaneously format, display, and index names.
% \item Change the syntactic format, typographical display, and other name features without retyping names.
% \item Display first and subsequent uses of names for professional writing. Default is a full name for the first use and shorter forms thereafter.
% \item Apply various custom typesetting formats to fit your needs without retyping names.
% \item Move text without retyping names.
% \item Show name variants in the text, yet index consistent name forms.
% \item Process different names according to cross-cultural naming conventions. These include mononyms, names with epithets, names with particles, and Eastern names in addition to basic Western names.
% \item Allow for different capitalizing and other conventions.
% \item Index different people with the same name by using a tag feature.
% \item Process names in list environments and other special environments.
% \end{itemize}
% \end{multicols}
%
% I started using \LaTeX\ and wrote this package for translating old German and Latin texts. Only in recent years have WYSIWYG apps become useful here. I learned much more than I expected regarding different \LaTeX\ typesetting engines, different font systems, different indexing programs, different package interactions, and different naming conventions. In order to meet my  cross-cultural needs amid such challenges, I encountered some technical restrictions:
%
% Please avoid using control sequences like \cmd{\protected@edef} and \cmd{\noexpand} in names because this package uses \cmd{\protected@edef} as it parses its input (cf. Section~\ref{sec:accents}). This is done in order to get name display and indexing to work under the constraints mentioned above. I advise the casual user not to perform a ``torture test'' on this package like I do in this manual.
%
% This package depends on \textsf{etoolbox}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. It has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}. It will work with \textsf{makeindex} and \textsf{texindy}. This manual was typeset with \ifxetex\textsf{xelatex}\else\ifluatex\ifpdf\textsf{lualatex} in \texttt{pdf} mode\else\textsf{lualatex} in \texttt{dvi} mode\fi\else\ifpdf\textsf{pdflatex}\else\textsf{latex}\fi\fi\fi{} and \textsf{makeindex}.
%
% 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.
%
% This documentation uses names of living and historical figures because users refer to real people in their projects. At no time do I intending any statement of bias for or against a particular person, culture, or tradition. All names mentioned herein deserve respect for the impact and legacy of their bearers.
%
% Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani}, \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, and \Name[Robert]{Schlicht} for their assistance.
%
% \subsection{What's In A Name?}
% \label{sec:NameTypes}
%
% Here a name denotes a person. Apart from historical and cultural contexts, name forms are ambiguous. The \textsf{nameauth} package uses Boolean switches and macros to show names in specific contexts without the need to retype the names.
%
% We see three categories of names, shown below. For special cases, one might have to decide how to handle Hungarian and Icelandic names as Eastern or Western. 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. Some publications call for the first use of a name to be typeset differently than subsequent uses. The subsequent package options set broad parameters for such needs.\\
%
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(type){\strut Western name:}; &
%    \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}
%
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(type){\strut Eastern name:}; &
%    \node(arg1){\strut\textbf{Family name}}; &
%    \node(arg2){\strut\textbf{Given name}};\\
%  };
%  \node [matrix,column sep=1em] (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}
%
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix] (macro) at (0,1)
%  {
%    \node(type){\strut Ancient name:}; &
%    \node(arg1){\strut\textbf{Given name}}; &
%    \node(arg2){\strut\textbf{Sobriquet, etc.}};\\
%  };
%  \node [matrix,column sep=1em] (tipsii) at (1,-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}
%
% \section{Usage}
%
% \subsection{Package Options}
% \label{sec:options}
%
% Package options are designed to address how one expects name data to be entered, how names are displayed both semantically and typographically, and how they are indexed in different document sections. \textbf{Default options are in boldface}:\\
%
%\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 only at load time. The default |nocomma| option works better with Eastern names and modern standards, \emph{e.g.}, \Name[James Earl]{Carter, Jr.}. The |comma| option works with Western names and older standards, putting a comma before affixes, \emph{e.g.}, \ForgetName[James Earl]{Carter, Jr.}\ShowComma\Name[James Earl]{Carter, Jr.}. One can switch options without retyping names and force commas with \cmd{\ShowComma} (Section~\ref{sec:Affix}).
%
% Before version 0.9 the \textsf{nameauth} package assumed the |comma| option and its limits on \cmd{\AKA} and \cmd{\PName}. The older syntax remains only for backward compatibility.\\
%
% \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. See Section~\ref{sec:SectionFormat}.\\[2ex]
% \end{tabular}\\
% The default starts formatting names immediately. The |frontmatter| option is equivalent to \cmd{\NamesInactive}. It disables typographic name formatting until formatting is enabled with \cmd{\NamesActive}. It has no effect on syntactic name formatting, \emph{i.e.}, the use of longer or shorter names depending on the context. It is designed for material provided by editors and contributors.\\
%
% \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. See Section~\ref{sec:SectionIndex}.\\[2ex]
% \end{tabular}\\
% The default starts indexing names right away. The |noindex| option is equivalent to \cmd{\IndexInactive}. It disables the indexing of names until \cmd{\IndexActive} enables it. This applies only to naming and indexing macros in the \textsf{nameauth} package.
% \clearpage
%
% \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, \emph{e.g.}, romanized Eastern names. See Section~\ref{sec:Eastern}. \\[2ex]
% \end{tabular}\\
% This only affects the body text. To get caps in both the body text and the index, the user should type in the caps manually. Section-level control of family name capitalization occurs with \cmd{\AllCapsActive} and \cmd{\AllCapsInactive}. \cmd{\CapName} has the same effect on the individual instance of a name.\medskip
%
% \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. See Sections~\ref{sec:Affix} and~\ref{sec:Eastern}.\\[1ex]
% \quad\texttt{allrevcomma} & Print all names in Western ``Surname, Forenames'' order. See Section~\ref{sec:LastFirst}.\\[2ex]
% \end{tabular}\\
% \cmd{\ReverseActive} and \cmd{\ReverseInactive} are used for reversing name order at the section level. \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} can be used to create lists for educators and officials in the Western-style last-comma-first order, which is \emph{not} the same as the |comma| option or \cmd{\ShowComma}. For individual instances of names, \cmd{\RevName} and \cmd{\RevComma} have the same respective effects.\medskip
%
% \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 special typographic formatting.\\[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. See  Section~\ref{sec:formatting}.\\[2ex]
% \end{tabular}\\
% The default is |smallcaps| because this package was developed to aid the editing and translation of older German and Latin documents.
% \clearpage
%
% \subsection{Quick Start Guide}
% \label{sec:start}
%
%\subsubsection{Main Interface}
% \DescribeMacro{\Name}
% The main workhorse of this package is \cmd{\Name.} More detail begins in Section~\ref{sec:Naming}. This overview shows how to work with the classes of names in Section~\ref{sec:NameTypes}. We abbreviate the command parameters \meta{forename(s)} with \meta{FNN} and \meta{surname(s)} with \meta{SNN}. Note again that the |nocomma| option generally works best, especially with Eastern, medieval, and ancient names.\\
%
%\noindent{\large\bfseries Western Names}\\[1ex]
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix,column sep=4cm] (tipsi) at (1.5,2.5)
%  {
%    \node(opt){\quad\small Add to force full name.}; &
%    \node[text width=3cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
%  };
%  \node [matrix] (macro) at (2,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 FNN}}; &
%    \node(braces){\bfseries|{}|}; \\
%  };
%  \node [matrix,column sep=1em] (tipsii) at (1.5,-1)
%  {
%    \node[align=left](a1)
%    {
%      Forename(s)\\used in index\\(\emph{e.g.}: initials,\\legal name)
%    }; & & &
%    \node[align=left](a2)
%    {
%      Surname(s)\\Surname(s)|,| Affix
%    }; & &
%    \node[align=left](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}
%
% \noindent Use \cmd{\Name}\oarg{FNN}\marg{SNN} and \cmd{\Name}\oarg{FNN}\marg{SNN|,| Affix}. For nicknames and alternate forenames use \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate FNN} and \cmd{\Name}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate FNN}. The \meta{Alternate FNN} are swapped with the non-empty \meta{FNN}, but only in the body text. The older, obsolete syntax is \cmd{\Name}\marg{SNN}\oarg{Affix}.
%
%\begin{multicols}{2}
%\noindent{\large\bfseries Eastern Names in the Text, Western-style Index}\\[1ex]
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix,column sep=1em] (tipsi) at (0,2)
%  {
%    \node(opt){\small For full name.}; &
%    \node(grp){\small If brackets follow.}; \\
%  };
%  \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}
% One uses the |allreversed| option or \cmd{\ReverseActive} or \cmd{\RevName} as appropriate (see above). The names in the body text will be in Eastern order, while they are indexed in Western fashion: \meta{SNN}, \meta{FNN}. This is the ``non-native'' form of Eastern names.\columnbreak
%
%\noindent{\large\bfseries Eastern Names in the Text, Eastern-style Index}\\[1ex]
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix,column sep=1em] (tipsi) at (0,2)
%  {
%    \node(opt){\small For full name.}; &
%    \node(grp){\small If brackets follow.}; \\
%  };
%  \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[align=left](a1)
%    {
%      \quad Family name
%    }; &
%    \node[align=left](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}
%
% \noindent These names names will appear in the index using the Eastern form \meta{SNN FNN} even if \cmd{\RevName} and friends are used to create a Western-order name in the body text. This is the ``native'' form of Eastern names. The older, obsolete syntax is \cmd{\Name}\marg{SNN}\oarg{FNN}
%\end{multicols}
%\clearpage
%\noindent{\large\bfseries Ancient Names}\\[-1.5ex]
%\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=3cm,align=left](a1){\small Mononym\break Mononym, Affix}; &
%    \node[text width=3cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
%  };
%  \node [matrix] (macro) at (1,1)
%  {
%    \node(cmd){\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}
%
% \noindent Use the forms \cmd{\Name}\marg{Mononym} or \cmd{\Name}\marg{Mononym|,| Affix}. The older, obsolete syntax is \cmd{\Name}\marg{Mononym}\oarg{Affix}.\vspace{-1.5ex}
%
% \subsubsection{Simplefied Interface}
%
% \DescribeMacro{nameauth} The |nameauth| environment saves typing via shorthands. It is best used in the document preamble. Otherwise one must add |%| at the end of each line.\vspace{-1ex}
%
% \begin{quote}
% |\begin{nameauth}|\\
% |  \<| \meta{cseq1} |&| \meta{arg1} |&| \meta{arg2} |&| \meta{arg3} |>|\\
% |  \<| \meta{cseq2} |&| \meta{arg1} |&| \meta{arg2} |&| \meta{arg3} |>| \dots\\
% |\end{nameauth}|
% \end{quote}\vspace{-1ex}
% Each \meta{cseq} creates three macros. |\|\meta{cseq} itself calls \cmd{\Name}.   |\L|\meta{cseq} (think ``Long'') calls \cmd{\Name*}. |\S|\meta{cseq} (think ``Short'') calls \cmd{\FName}. In the text, include trailing braces |{|\,|}| if text in brackets |[|\,|]| follows. Leading and trailing spaces in each field are stripped. There \emph{must} be four argument fields per line:\vspace{-0.5ex}
%
% \begin{quote}
%|\begin{nameauth}|\\[0.2ex]
%|  \< Wash & George & Washington & >|\hfill\emph{Western}\\[0.2ex]
%|  \< Soto & Hernando & de Soto & >|\hfill\emph{particle}\\[0.2ex]
%|  \< JRock & John David & Rockefeller, II & >|\hfill\emph{affix}\\[0.2ex]
%|  \< JayR & John David & Rockefeller, IV & Jay >|\hfill\emph{nickname}\footnote{Careful here! \cmd{\SJayR} always gives ``Jay.'' See Section \ref{sec:Fname}.}\\[0.2ex]
%|  \< Aris & & Aristotle & >|\hfill\emph{ancient}\\[0.2ex]
%|  \< Eliz & & Elizabeth, I & >|\hfill\emph{royal}\\[0.2ex]
%|  \< Konoe & Fumimaro & Konoe & >|\hfill\emph{Eastern/Western index}\\[0.2ex]
%|  \< Yamt & & Yamamoto, Isoroku & >|\hfill\emph{Eastern/Eastern index}\\[0.2ex]
%|\end{nameauth}|
% \end{quote}\vspace{-2ex}
% \begin{multicols}{2}
% \noindent|\Wash|:  \Wash \\
% |\Wash|: \Wash \\
% |\LWash|: \LWash \\
% |\SWash|: \SWash \\
% |\RevComma\LWash|: \RevComma\LWash \\
% |\Soto|: \Soto \\
% |\Soto|: \Soto \\
% |\CapThis\Soto|: \CapThis\Soto \\
% |\JRock|: \JRock \\
% |\JRock|: \JRock \\
% |\JayR|: \JayR \\
% |\SJayR\ \JayR|: \SJayR\ \JayR\\[1ex]
% |\Aris|: \Aris \\
% |\Eliz|: \Eliz \\
% |\Eliz|: \Eliz \\
% |\Konoe|: \Konoe \\
% |\RevName\LKonoe|: \RevName\LKonoe \\
% |\CapName\LKonoe|: \CapName\LKonoe \\
% |\CapName\RevName\LKonoe|: \\ \indent\CapName\RevName\LKonoe \\
% |\Yamt|: \Yamt \\
% |\CapName\LYamt|: \\ \indent\CapName\LYamt \\
% |\RevName\LYamt|: \RevName\LYamt \\
% \end{multicols}
%
% \subsubsection{Older Syntax}
%
% An older form of syntax remains for backward compatibility with early versions, especially with the |comma| option. It lacks some of the error checking and robustness of the new syntax and limits the use of several macros. Never mix the older and newer syntax! For the sake of completeness we have:
%
% \begin{quote}
% |\Name{Dagobert}[I]|\hfill\emph{royal name}\\[0.5ex]
% |\Name{Yoshida}[Shigeru]|\hfill\emph{Eastern name}\\[0.5ex]
% |\begin{nameauth}|\\[0.5ex]
% |  \< Dagb & & Dagobert & I >|\hfill\emph{royal name}\\[0.5ex]
% |  \< Yosh & & Yoshida & Shigeru >|\hfill\emph{Eastern name}\\[0.5ex]
%|\end{nameauth}|
% \end{quote}
%
% \begin{multicols}{2}
% \noindent|\Dagb|: \Dagb \\
% |\Dagb|: \Dagb \\
% |\LDagb|: \LDagb \\
% |\CapName\Yosh|: \CapName\Yosh\\
% |\CapName\RevName\LYosh|: \\ \indent\CapName\RevName\LYosh
% \end{multicols}
%
% \begin{itemize}
% \item This older syntax could produce weird results. |\Name{Henry}[VIII]| prints ``\Name{Henry}[VIII]'' and ``\Name{Henry}[VIII]'' as expected. \IndexInactive Using |\Name[Henry]{VIII}| (an error) prints either ``\Name*[Henry]{VIII}'' or just ``\Name[Henry]{VIII}.'' Both |\Name{Henry}[VIII]| and |\Name[Henry]{VIII}| produce the same ``first-use'' control sequence. |\Name[Henry]{VIII}[Tudor]| gives ``\Name*[Henry]{VIII}[Tudor]'' and ``\Name[Henry]{VIII}[Tudor].''
%
%  The newer syntax fixes many of these problems. |\Name{Henry, VIII}| gives ``\Name{Henry, VIII}'' and ``\Name{Henry, VIII}.'' It produces unambiguous control sequences and index entries from those above. Avoid |\Name{Henry, VIII}[Tudor]|; this gives ``\Name*{Henry, VIII}[Tudor]'' and ``\Name{Henry, VIII}[Tudor]'' in the text and ``Henry VIII'' in the index. Instead of that, add ``Tudor'' manually to |\Name{Henry, VIII}| in the text and use a tag in the index (Section \ref{sec:TagName}).
%
% \item Avoid mixing the older and newer syntax! |\Name{Mononym, Affix}| and |\Name{Mononym}[Affix]| are different names! You get both \Name{Mononym, Affix} and \Name{Mononym}[Affix]. Index tags for |\Name*[Henry]{VIII}| will not work with |\Name{Henry, VIII}|, and vice versa.\ForgetName{Henry}[VIII]\ForgetName[Henry]{VIII}\ForgetName{Henry, VIII}
%
% \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. |\Name{Boris,| |the| |Animal}| |\AKA{Boris,| |the| |Animal}{Just| |Boris}| works, and you get \Name{Boris, the Animal} being ``\AKA{Boris, the Animal}{Just Boris}.''
% \end{itemize}
% \clearpage
%
% \subsubsection{Tips and Warnings}
% \label{sec:error}
%
% \begin{itemize}
% \item Keep it simple! Avoid macros that you do not need.
%
% \item Use the simplified interface or check your use of braces and brackets with naming macros to avoid execution halting and errors like ``Paragraph ended\dots'' and ``Missing \meta{grouping token} inserted.''
%
% \item For stage names, etc., try using, \emph{e.g.}, |\Name[J.]{Kreskin}[The Amazing]| |(\AKA[J.]{Kreskin}[Joseph]{Kresge})|. You get \Name[J.]{Kreskin}[The Amazing] (\AKA[J.]{Kreskin}[Joseph]{Kresge}), with ``Kreskin, J.'' in the index. You must have initials or something in the first optional field for this to work, or else it will fail.
%
% \item Special cases like \textsc{``Iron Mike'' Tyson}\IndexName[Mike]{Tyson} can be handled with the intricate use of \cmd{\ForgetName} and \cmd{\SubvertName}, but it is easier to use manual formatting along with \cmd{\IndexName}. Using |``\AKA[Mike]{Tyson}{Iron Mike}''| creates ``\AKA[Mike]{Tyson}{Iron Mike}'' in the text and a \emph{see}-type cross-reference to the main name in the index. See Section~\ref{sec:AKA}.
%
% \item Avoid spaces between initials in first names. Either use \cmd{\frenchspacing} or \emph{consistently} put fractional spaces between them. See also Bringhurst's \emph{Elements of Typographic Style}.
%
% \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 Not all warnings are created equal. For example, \cmd{\AKA} warns one if used multiple times for the same name. That may or may not be what one wants and is left to the author. Other warnings, especially in the case of indexing macros, indicate that the macro produced no output.\\
% \end{itemize}
%
% \noindent Warnings result from:
%
% \begin{enumerate}\setlength{\itemsep}{-0.4ex}
% \item Using a cross-reference \oarg{alternate FNN}\marg{alternate SNN}\oarg{alt. names} created by \cmd{\AKA} as a reference in \cmd{\Name}, \cmd{\FName}, and \cmd{\PName}.
% \item Using a reference \oarg{FNN}\marg{SNN}\oarg{Alternate names} created by \cmd{\Name}, \cmd{\FName}, and \cmd{\PName} as a cross-reference in \cmd{\AKA}.
% \item Using \cmd{\AKA} to create the same cross-reference multiple times.
% \item Using \cmd{\IndexName} to index a cross-reference as a main entry.
% \item Using \cmd{\TagName} to tag a cross-reference.
% \item Using \cmd{\ExcludeName} to exclude a name that has already been used.
% \item Using \cmd{\Name}, \cmd{\FName}, \cmd{\PName}, and \cmd{\AKA} to refer to names and cross-references excluded by \cmd{\ExcludeName}.
% \end{enumerate}
% \clearpage
%
% \subsection{Naming Macros}
% \label{sec:Naming}
%
% \subsubsection{Surnames: \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 text only if the \meta{FNN} field is not empty; see the example for \Name[M.T.]{Cicero}[Marcus Tullius] above. One can use a nickname in some instances while keeping the indexed form constant. Thus, |\Name[M.T.]{Cicero}[Marcus Tullius]| and |\Name[M.T.]{Cicero}| are equivalent, while |\Name{Cicero}[Marcus Tullius]| and |\Name{Cicero}| are not. If you are using the newer syntax, avoid forms like |\Name{Charles}[the Bald]|.
%
% \begin{quote}
%|\begin{nameauth}% In the preamble!|\\[0.2ex]
%|  \< Einstein & Albert & Einstein & >|\\[0.2ex]
%|  \< Cicero & M.T. & Cicero & >|\\[0.2ex]
%|  \< Confucius & & Confucius & >|\\[0.2ex]
%|  \< CBald & & Charles, the Bald & >|\\[0.2ex]
%|\end{nameauth}|
%\end{quote}
%
% \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
% Above we see the same setup with the new interface in the preamble. In the body text, |\Einstein, \LEinstein, and \Einstein| produce \Einstein, \LEinstein, and \Einstein. |\CBald\ and \CBald| give \CBald\ and \CBald. In the next section we shall see why |\Cicero[Marcus Tullius]| is preferred to get \Cicero[Marcus Tullius].
% \subsubsection{Forenames: \texttt{\textbackslash FName}}
% \label{sec:Fname}
%
% \DescribeMacro{\FName}
% \DescribeMacro{\FName*}
% This casual friend of \cmd{\Name} prints only ``first'' names, but it will still print a full name when a first use occurs. \cmd{\FName} is intended for Western-style names. \cmd{\FName*} is only a synonym for \cmd{\FName}. The syntax is basically the same:
% \begin{quote}
% \cmd{\FName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
% The first reference to \cmd{\FName} always is a full name. That prevents a first-name-only reference before a person has been introduced. Intentionally, \cmd{\FName} \emph{never} gives the first name with Eastern names. You must type the first name and then use \cmd{\IndexName}. For examples we see below:
% \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}
%
% Nicknames are used instead of the regular first names by including them in the \meta{Alternate names} field. For example, when writing of aviation hero \Name[Chesley B.]{Sullenberger, III} use |``\FName[Chesley B.]{Sullenberger, III}[Sully]''| to get the nickname ``\FName[Chesley B.]{Sullenberger, III}[Sully].''
%
% With the simplified interface, |\SEinstein, \SConfucius, and \SCBald| give \SEinstein, \SConfucius, and \SCBald. You must choose whether you want the nickname or the formal name as the default. For example:
% \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}
% Subsequent references to |\SChes| produce ``\SChes.''  Subsequent references to |\SSully| produce ``\SSully.'' Now here it gets tricky: |\SChes[Sully]| gives ``\SChes[Sully]'' as expected. However, |\SSully[Chesley B.]| expands to what it says, not what you mean: |\FName[Chesley B.]{Sullenberger, III}[Sully][Chesley B.]|. That clearly gives you ``\SSully[Chesley B.].'' Use the nickname field with caution!
%
% \subsubsection{Full Stop Detection}
%
% Affixes and initials could result in the period of an abbreviation like ``Jr.,'' ``Sr.,'' ``d.\,J.'' (\textit{der J\"ungere}), and ``d.\,\"A.'' (\textit{der \"Altere}) followed by the sentence full stop. These macros check for such collisions and drop the extra full stop as needed:
%
% \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.}
% \begin{tabular}{ll}
% {\large\strut}|\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\
% {\large\strut}|\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\
% {\large\strut}|\Name[Martin Luther]{King, Jr.}| & \Name[Martin Luther]{King, Jr.} (\emph{e.g.}, in a sentence)\\
% {\large\strut}|\Name*[Martin Luther]{King, Jr.}.| & \Name*[Martin Luther]{King, Jr.}.\\
% {\large\strut}|\Name*[Martin Luther]{King, Jr.}| & \Name*[Martin Luther]{King, Jr.}
% \end{tabular}
% \end{quote}
%
% \noindent Full-stop detection also works with \cmd{\FName}. If a name reference is enclosed, \emph{e.g.}, between grouping tokens, detection will not work.
%
% \subsection{Affixes and Eastern Names}
%
% \subsubsection{Comma-Delimited Affixes}
% \label{sec:Affix}
%
% Comma-delimited affixes handle several different name types. The first is Western names with affixes. One must use |\Name[Oskar]{Hammerstein, II}| to get \Name[Oskar]{Hammerstein, II} and \Name[Oskar]{Hammerstein, II}. \emph{Always include a comma as an affix delimiter.} Extra spaces and trailing commas are ignored. Other name types include royal, medieval, and Eastern names:
%
% \begin{quote}\ForgetName{Sun, Yat-sen}
% \begin{tabular}{ll}\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}
%
% One can type |\Name*{Louis, XIV}, the| |``\AKA{Louis, XIV}{Sun King}''| and get \Name*{Louis, XIV}, the ``\AKA{Louis, XIV}{Sun King}'' in the text with an appropriate \emph{see} reference from ``Sun King'' to ``Louis XIV'' in the index (Section \ref{sec:AKA}).
%
% \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 \emph{SNN} and \emph{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.
%
% \DescribeMacro{\ShowComma}
% The |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.
%
% Avoid using the older syntax, shown below. It does not handle Western names with affixes and some other name types. \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms. Thus we have:
%
% \begin{quote}\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, please avoid using the older syntax.
%
% \subsubsection{Eastern Names}
% \label{sec:Eastern}
%
% The \textsf{nameauth} package offers two ways to handle romanized Eastern names. \cmd{\RevName}\cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN} and equivalents will produce an Eastern name in the body text and the Western form \meta{SNN}, \meta{FNN} in the index, including the comma. One might 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 form \meta{SNN} \meta{FNN} in the body text and index without any comma. This can be called ``native'' mode. The goal for offering these two ``modes'' is to allow for greatest flexibility in indexing requirements, not favoring one over another.
%
% \DescribeMacro{\ReverseActive}
% \DescribeMacro{\ReverseInactive}
% \DescribeMacro{\RevName}
% The reverse output mechanism makes the ``non-native'' mode compatible with the ``native'' mode in the body text. One chooses the style of index entry desired, then uses the ``native'' or ``non-native'' approach as desired. 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}.
%
% A list of Japanese music artists illustrates the use of \cmd{\RevName}. Both \Name[Aiko]{Nakano} and \Name[Yoko]{Kanno} are listed in Western order, then ``non-native'' Eastern order. The others are all listed in ``native'' Eastern mode, then reversed to Western order. Their index entries reflect that:
%
% \NamesInactive
% \begin{quote}
% \begin{tabular}{lll}\hline
% {\large\strut} & \emph{unchanged} & |\RevName|\\
% {\large\strut}|\Name*[Aiko]{Nakano}| & \Name*[Aiko]{Nakano} & \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
%
% \DescribeMacro{\AllCapsActive}
% \DescribeMacro{\AllCapsInctive}
% \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 macros, \emph{e.g.} \cmd{\CapName}\cmd{\RevName}\cmd{\Name}:
%
% \NamesInactive
% \begin{quote}
% \begin{tabular}{lll}\hline
% {\large\strut} & \emph{unchanged} & |\CapName\RevName|\\
% {\large\strut}|\Name*[Yoko]{Kanno}| & \CapName\Name*[Yoko]{Kanno} & \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
%
% The reversing and capitalization macros also work with \cmd{\AKA}. They affect only the text, not the index. Whoever wants all-cap forms in the index will have to capitalize everything manually or modify the macros. Note also that the above examples include the older syntax. Remember that index entries for \Name*[Aiko]{Nakano} and \Name*[Yoko]{Kanno} are Western-form; the others are Eastern-form.
%
% \subsection{Other Naming Topics}
%
% \subsubsection{Listing by Surname}
% \label{sec:LastFirst}
%
%\DescribeMacro{\ReverseCommaActive}
%\DescribeMacro{\ReverseCommaInactive}
%\DescribeMacro{\RevComma}
% Another set of reversing macros, \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}, allows the easy generation of lists with surnames, followed by a comma, then forenames. The first two are broad toggles, while the third works on a per-name basis. Here is a good place to show incompatibility between Eastern, medieval, and royal names on the one hand and Western names on the other. An indiscriminate use of \cmd{\RevComma}\cmd{\Name}\dots\ can yield:
%
% \NamesInactive
% \begin{quote}
% \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} & medieval incompatible\\
% {\large\strut}\Name*{Mao}[Tse-tung] & \RevComma\Name*{Mao}[Tse-tung] & Eastern inconpatible\\
% {\large\strut}\Name*{Anaximander} & \RevComma\Name*{Anaximander} & OK\\
% \end{tabular}
% \end{quote}
% \NamesActive
%
% It is not possible for this package to be all things to all names, but it tries in good faith to be as cross-cultural as possible.
%
% \subsubsection{Naming Standards}
%
% \DescribeMacro{\CapThis}
% 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}.
%
% 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}. To capitalize \emph{de} when it arises at the beginning of a sentence, use |\CapThis\Name[Walter]{de la Mare}|. \CapThis\Name[Walter]{de la Mare} will think it fair. Non-English contexts do not always bind particles to surnames. Using \cmd{\FName} with alternate forenames allows greater flexibility here. See Section~\ref{sec:Particles}.
%
% \subsubsection{Hints for \textsf{babel}}
% \label{sec:babel}
%
% The\marginpar{\raggedleft Hyphens} simplified interface trivializes the consistent insertion of optional hyphens in names arguments. Name hyphenation also can be aided by using the \textsf{babel} or \textsf{polyglossia} packages. With English as the main language, a name of German origin might break poorly. For example, \Name[John]{Strietelmeier} might break thus: ``Stri-\break etelmeier.'' Using |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}| and |\de{\Name[John]{Strietelmeier}}| (with \textsf{babel}) prevents such breaks. 
%
% Using\marginpar{\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 \textsf{texindy} program will ignore all such references. This issue can affect \textsf{nameauth.} One workaround for \textsf{texindy} could enclose text with any macros that write to the index in an environment or a \cmd{\long} macro defined like:
% \begin{quote}|\newcommand{\fix}[1]{\def\textlatin##1{##1}#1}|\end{quote}
%
% \subsubsection{Accented Names}
% \label{sec:accents}
% 
% Using \textsf{xindy} (\textsf{texindy}) and \textsf{xelatex} or \textsf{lualatex} is recommended for accented names. Under NFSS these Unicode characters are available (with \textsf{inputenc}/\textsf{fontenc}):
% \begin{quote}
% \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}
%
% One may use expandable control sequences in names (thanks \Name*[Robert]{Schlicht}). Protected or unexpandable control sequences via |\protected@edef| or |\noexpand| may generate, respectively, empty index entries or unbalanced groups/erroneous entries in the auxiliary files. Thanks to \Name[Patrick]{Cousot} for pointing this out.
%
%This cannot be changed because \textsf{nameauth}  uses |\protected@edef| when it parses the name parameters. This is needed to work with \textsf{makeindex}, \textsf{texindy}, \textsf{microtype}, and other packages and \LaTeX\ engines.
%
%  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}):
%  \begin{quote}
% |\usepackage{newunicodechar}|\\
% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
% |\newunicodechar{ſ}{\textlongs}|
% \end{quote}
% That lets you type ``In Congreſs, July 4, 1776.'' Similarly, the following allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz\=ali}\IndexActive: |\newunicodechar{ā}{\=a}|
%
% To get proper sorting with accents and |makeindex -g|, consider creating your own |.ist| file (pages 659--65 in \emph{The Latex Companion}) or the following form:\break |\IndexInactive\Name{|\meta{actual}|}\index{|\meta{sortkey}|@|\meta{actual}|}\IndexActive.|
%
% Control sequences like |\=a| fail when using \textsf{makeindex} and \texttt{gind.ist} because the equal sign is an ``actual'' character instead of |@|. |\index{Gh{\=a}zali}| halts execution. |\index{Gh\=azali}| gives an ``azali'' entry sorted under ``Gh'' (thanks \Name[Dan]{Luecking}). This issue is not specific to \textsf{nameauth}.
% 
% This package tries to work with multiple languages and typesetting engines. The following preamble snippet illustrates how that can be done:\\
%
% \begin{tabular}{ll}
% |\usepackage{ifxetex}|\\
% |\usepackage{ifluatex}|\\
% |\ifxetex| & |% uses fontspec|\\
% \hbox{\quad}|\usepackage{fontspec}|\\
% \hbox{\quad}|\defaultfontfeatures{Mapping=tex-text}|\\
% \hbox{\quad}|\usepackage{xunicode}|\\
% \hbox{\quad}|\usepackage{xltxtra}|\\
% |\else|\\
% \hbox{\quad}|\ifluatex| & |% also uses fontspec|\\
% \hbox{\quad}\hbox{\quad}|\usepackage{fontspec}|\\
% \hbox{\quad}\hbox{\quad}|\defaultfontfeatures{Ligatures=TeX}|\\
% \hbox{\quad}|\else| & |% traditional NFSS|\\
% \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\
% \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\
% \hbox{\quad}|\fi|\\
% |\fi|
% \end{tabular}
%
% \medskip The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:\\
%
% \begin{tabular}{l}
% |\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{tabular}
%
% \subsubsection{Custom Formatting}
% \label{sec:formatting}
%
% \DescribeMacro{\NamesFormat}
% The first instance of a name is formatted with \cmd{\NamesFormat} when formatting is active. Additionally, the \texttt{alwaysformat} option will cause every name to be formatted when formatting is active. Beyond using the package options, one can redefine \cmd{\NamesFormat} to create some custom effects. For example, if you wanted to suppress formatting in footnotes, you could do something like:
%
% \begin{quote}
% |\makeatletter|\\
% |\let\@oldfntext\@makefntext|\\
% |\long\def\@makefntext#1{\def\NamesFormat{}\@oldfntext{#1}}|\\
% |\makeatother|
% \end{quote}
%
% \noindent This approach synchronizes the ``first use'' feature in the text and the footnotes, but only suppresses the formatting. It takes advantage of the deep nesting of \cmd{\@makefntext} and a localized \cmd{\def} to make a temporary change.\smallskip
%
% A second example puts the mention of first names in boldface, with additional notations in the margin if possible:
%\begin{quote}
% |\let\oldformat\NamesFormat|\\
% |\renewcommand{\NamesFormat}[1]%|\\
% \hbox to 1cm{\hfil}|{\textbf{#1}\ifinner\else%|\break
% \hbox to 1cm{\hfil}|\marginpar{\raggedleft\scriptsize #1}\fi}|%
%
% \let\oldformat\NamesFormat%
% \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\raggedleft\scriptsize #1}\fi}%
% \bgroup\small\ttfamily%
% |\Name{Vlad III, Dracula}| was known as |\AKA{Vlad III, Dracula}%|\break|{Vlad}[Ţepeş]|, |``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler],''|\break  after his death. He was the son of |\Name{Vlad II, Dracul}|, a\break member of the Order of the Dragon. Later references to\break |\Name{Vlad III, Dracula}| appear thus.\egroup
%
% \Name{Vlad III, Dracula} was known as \AKA{Vlad III, Dracula}{Vlad}[Ţepeş], ``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler],''  after his death. He 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}
%
% The |quote| environment permits local changes to \cmd{\NamesFormat} so they revert back to give: \ForgetName{Vlad III, Dracula}\Name{Vlad III, Dracula} and \Name{Vlad III, Dracula}. For references to ``Vlad'' one could use |\Name{Vlad, III Dracula}| instead. Do not mix |\Name{Vlad III, Dracula}| with |\Name{Vlad, III Dracula}| or the old syntax, lest errors bite! You would get multiple index entries with \cmd{\Name}, unwanted cross-references with \cmd{\AKA} and unexpected forms in the text. The simplified interface helps one to avoid this.
%
% \subsubsection{Disable Formatting}
% \label{sec:SectionFormat}
% 
% \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}
% \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}
% \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 ``formatted'' and ``non-formatted,'' intended for independent sections of the document like front matter and main matter.
%
% \subsubsection{Tweaks: \texttt{\textbackslash ForgetName} and \texttt{\textbackslash SubvertName}}
% \label{sec:Tweaks}
% 
% Perhaps the easiest way to avoid the ``interspecies clashes'' above are the two macros presented here. They are meant for tweaking text at or near final draft stage. They affect both front matter and main matter.
%
% \DescribeMacro{\ForgetName}
% This macro is a ``dirty trick'' of sorts that takes the same optional and mandatory parameters used by \cmd{\Name}. It handles its arguments in the same way, except that it ignores the final parameter if \meta{FNN} are present. The syntax is:
% \begin{quote}
% \cmd{\ForgetName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \noindent This macro causes \cmd{\Name} and friends to ``forget'' prior uses of a name. The next use of that name will print as if it were a ``first use.'' Index entries and cross-references are \emph{never} forgotten by this package.
% 
% \DescribeMacro{\SubvertName}
% This macro is the opposite of the one above. It takes the same parameters. It handles its arguments in the same manner. The syntax is:
% \begin{quote}
% \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \noindent This macro causes \cmd{\Name} and friends 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.''
%
% \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:
%
% \begin{quote}
% \bgroup\ttfamily\small
% |\Name{Jean, sans Peur}| (|\AKA{Jean, sans Peur}{Jean the Fearless}|) reigned as Duke of Burgundy from 1404 to 1419.
% \egroup
%
% \TagName{Jean, sans Peur}{, duke}%
% \Name{Jean, sans Peur} (\AKA{Jean, sans Peur}{Jean the Fearless}) reigned as Duke of Burgundy from 1404 to 1419.%
% \end{quote}
%
% Notice that ``John the Fearless'' receives no special formatting. This is intentional, as it reflects the idea of formatting only main index entries, not cross-references. Nevertheless, the reversing and capitalizing mechanisms do work with \cmd{\AKA}. 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 prevent double periods at the end of a sentence.
%
% 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. \cmd{\AKA*} just prints \meta{Alt. names} (if present) in the body text. Section~\ref{sec:TagName} further illustrates \cmd{\AKA}, \cmd{\AKA*}, and index tagging. 
%
% For the following name types, \cmd{\AKA} and \cmd{\AKA*} yield the same results, using \Name[Bob]{Hope}, \ForgetName{Louis, XIV}\Name{Louis, XIV}, and \Name{Lao-tzu} as examples:
% \begin{quote}\footnotesize
% \begin{tabular}{ll}\hline
% {\large\strut}|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
% {\large\strut}|\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
% {\large\strut}|\AKA{Louis}[XIV]{Sun King}| & FAIL\\
% {\large\strut}|\AKA{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\\hline
% \end{tabular}
% \end{quote}
% \cmd{\AKA} fails with the old syntax. One can use the \meta{Alt. names} field with the names above, but that field does not generate a cross-reference. The \meta{Alt. names} field (whis is a part of the cross-reference) was envisaged for names like \Name{Gregory, I}:
% \begin{quote}\footnotesize
% \begin{tabular}{ll}\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]\\
% {\large\strut}|\AKA{Gregory}[I]{Gregory}[the Great]| & FAIL\\
% {\large\strut}|\AKA*{Gregory}[I]{Gregory}[the Great]| & FAIL\\\hline
% \end{tabular}
% \end{quote}
% |\Name*{Gregory,| |I}| |``\AKA*{Gregory,| |I}{Gregory}[the| |Great]''| produces \Name*{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' in the text and a \emph{see} reference from Gregory the Great to Gregory I in the index. This may look like the old syntax, but it is not. The comma-delimited affix form in \meta{Alt. SNN} is designed for Eastern names, while \meta{Alt. names} is not. One can refer to \Name[Lafcadio]{Hearn} with |\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|: \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}.
%
% Using \cmd{\RevComma} before |\AKA[Bob]{Hope}[Leslie Townes]{Hope}| produces \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}, while \cmd{\RevName} omits the comma. \CapThis\AKA[Charles]{du Fresne}{du Cange} refers to \Name[Charles]{du Fresne}: |\CapThis\AKA[Charles]{du Fresne}{du Cange}|. See also Section~\ref{sec:Particles} on how to deal with different standards for particles.
%
% Here we show \cmd{\AKA} used as a name in the running text:
%
% \begin{quote}
% \bgroup\ttfamily
% Today we consider |\AKA[George]{Eliot}[Mary Anne]{Evans}| and her literary contributions as |\Name[George]{Eliot}|.
% \egroup
%
% Today we consider \AKA[George]{Eliot}[Mary Anne]{Evans} and her literary contributions as \Name[George]{Eliot}.
% \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}%
% Refer, \emph{e.g.}, to |\Name{Maimonides}| |(\AKA{Maimonides}{Moses| |ben-Maimon})|: \Name{Maimonides} (\AKA{Maimonides}{Moses ben-Maimon}). That is a name and a \emph{see} reference. Now one must refer to |\Name{Rambam}|: \Name{Rambam} before making a cross-reference to \Name{Maimonides}. Add \verb!\index{Rambam|seealso{Maimonides}}! at the end of the document to ensure that it is the last 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}.}
%
% \cmd{\AKA} purposefully will not create multiple instances of a cross-reference. To deal with the special case where one moniker applies to multiple people, \emph{e.g.}, ``Snellius'' for both \Name*[Willebrord]{Snel van Royen}  and his son \Name*[Rudolph]{Snel van Royen}, use a manual solution:\\[2ex]
%|\index{Snellius|\verb!|!{}|see{Snel|\,|van|\,|Royen,|\,|Rudolph;| |Snel|\,|van|\,|Royen,|\,|Willebrord}}|
%\index{Snellius|see{Snel van Royen, Rudolph; Snel van Royen, Willebrord}}
%
% The old syntax (|\Name{Jean}[sans Peur]|) does not work with \cmd{\AKA}. Even with the new syntax, using \textsf{makeindex} may require some manual entries:
%
% \begin{quote}
% \bgroup\ttfamily\small
% \verb+\index{Doctor Angelicus@\textit{Doctor Angelicus}|see{Thomas Aquinas}}+
% \verb+\index{Thomas of Aquino|see{Thomas Aquinas}}+\\
% Perhaps the greatest medieval theologian was |\Name{Thomas}[Aquinas]| (Thomas of Aquino), also known as |\textit{Doctor Angelicus}|. His name ``Aquinas'' is not a surname.
% \egroup
%
% \index{Doctor Angelicus=\textit{Doctor Angelicus}|see{Thomas Aquinas}}
% \index{Thomas of Aquino|see{Thomas Aquinas}}
% Perhaps the greatest medieval theologian was \Name{Thomas}[Aquinas] (Thomas of Aquino), also known as \textit{Doctor Angelicus}. His name ``Aquinas'' is not a surname.
% \end{quote}
% 
% \subsubsection{\texttt{\textbackslash PName}}
%
% \DescribeMacro{\PName}
% \cmd{\PName} is a ``convenience macro'' meant for English-style Western names that sacrifices flexibility for simplicity. It generates a Western-style main name followed by a cross-reference in parentheses with the following syntax:
% \begin{quote}
% \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}. It cannot use \cmd{\AKA*}. \cmd{\PName} really is ill-suited to work with \cmd{\CapName}, \cmd{\CapThis}, \cmd{\RevComma}, \cmd{\RevName}, and the related package options. Use it if it is useful, and \emph{caveat auctor}. 
%
% The author determines the name that is indexed (the first name) and the subsequent name that only occurs as a \emph{see} reference. That subsequent name is never shortened in the text. To do that, using the table below, one would type, \emph{e.g.}, |Arouet\IndexName{Voltaire}| or use the \Name{Rambam} example above. \cmd{\PName} can generate the following examples:
%
% \begin{quote}\footnotesize
% \begin{tabular}{@{}p{0.5\textwidth}@{}p{0.37\textwidth}@{}}\hline
% {\large\strut}|\PName[Mark]{Twain}[Samuel L.]{Clemens}| & \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
% {\large\strut}|\PName*[Mark]{Twain}[Samuel L.]{Clemens}| & \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\
% {\large\strut}|\PName[Mark]{Twain}[Samuel L.]{Clemens}| & \PName[Mark]{Twain}[Samuel L.]{Clemens}\\\hline
% {\large\strut}|\PName{Voltaire}[François-Marie]{Arouet}| & \PName{Voltaire}[François-Marie]{Arouet}\\
% {\large\strut}|\PName*{Voltaire}[François-Marie]{Arouet}| & \PName*{Voltaire}[François-Marie]{Arouet}\\
% {\large\strut}|\PName{Voltaire}[François-Marie]{Arouet}| & \PName{Voltaire}[François-Marie]{Arouet}\\\hline
% \end{tabular}
% \end{quote}
%
% If one used |\PName{William, I}[William]{the Conqueror}| the body text would look right but the index cross-reference would be in error. Medieval and Eastern names are not suited for \cmd{\PName}. For them use \cmd{\AKA.}
%
% \subsection{Indexing Macros}
% \subsubsection{\texttt{\textbackslash IndexName}}
% 
% \DescribeMacro{\IndexName}
% This macro creates an index entry like those created by \cmd{\Name} and friends. It prints no text in the body and permits no special formatting. The syntax is:
% \begin{quote}
% \cmd{\IndexName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
% \cmd{\IndexName} complies with the new syntax. If \meta{FNN} are absent, it indexes \meta{Alternate names} as an affix using the old syntax; otherwise it ignores \meta{Alternate names}. If indexing is switched off (see Section~\ref{sec:SectionIndex}), this macro does nothing. 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. This formatting only occurs for Western names (where \meta{FNN} are present). 
%
% \subsubsection{\texttt{\textbackslash TagName}}
% \label{sec:TagName}
%
% \DescribeMacro{\TagName}
% This macro creates an index tag that will appear in all entries for a corresponding \cmd{\Name} from the point of invocation until the end of the document or corresponding \cmd{\UntagName}. Both \cmd{\TagName} and \cmd{\UntagName} handle their arguments like \cmd{\IndexName}. Tag names in the preamble if possible. If used in the body to create or switch index tags, put a comment delimiter at the end of the macro.
% \begin{quote}
% \cmd{\TagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
%
% 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{tabular}{p{2in}p{2in}}
% |\TagName{Leo, I}{, pope}| |\TagName{Gregory, I}{, pope}| & Tag these names at the beginning of the document.\\
% \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]''| & \Name{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' was another major pope.\\
% \end{tabular}\\[1ex]
%
% \cmd{\TagName} causes the index entries for \Name*{Gregory, I} and \Name*{Leo, I} to have the tag ``,\textvisiblespace pope'' added automatically. One must add a space manually at the front of a tag if one wants it. Otherwise one could add asterisks, daggers, and so on instead of a space and some text, sich as regnal or life dates, etc. The tag is literal text for whatever you need. For example, all fictional names in the index of this manual have an asterisk without any spaces. Tagging aids scholarly indexing.
%
% \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}
% \ttfamily This refers to |\Name*[John]{Smith}|.\\
% Now another |\ForgetName[John]{Smith}%|\\
% |\TagName[John]{Smith}{ (the other one)}\Name[John]{Smith}|.\\
% Then a third |\ForgetName[John]{Smith}%|\\
% |\TagName[John]{Smith}{ (the 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}{* (the other one)}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (the other one)\\
% Then a third \ForgetName[John]{Smith}\TagName[John]{Smith}{* (the third)}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (the third)\\
% Then the first \TagName[John]{Smith}{*}\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.
%
% Since this document 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}
% 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}
%
% For example, |\ExcludeName[Kris]{Kringle}|\ExcludeName[Kris]{Kringle} will permit \Name[Kris]{Kringle} and \Name[Kris]{Kringle} to appear in the body text via |\Name[Kris]{Kringle}|, but no index entry can occur for this name. |\ExcludeName[Santa]{Claus}|\ExcludeName[Santa]{Claus} will prevent |\AKA[Kris]{Kringle}[Santa]{Claus}| \AKA[Kris]{Kringle}[Santa]{Claus} from generating a cross-reference. It is likelier that you would enclose \cmd{\Name}, etc. between \cmd{\IndexInactive} and \cmd{\IndexActive} (below) in order to suppress just one index entry.
%
% \subsubsection{Indexing Certain Sections}
% \label{sec:SectionIndex}
%
% \DescribeMacro{\IndexActive}
% \DescribeMacro{\IndexInactive}
% Using the \texttt{noindex} option deactivates indexing until \cmd{\IndexActive} occurs. Another macro, \cmd{\IndexInactive}, will deactivate indexing again. These can be used throughout the document, independently of \cmd{\ExcludeName}.
%
% \subsection{Variant Spellings}
%
% Handling variant name spellings can be complicated. For example, one might settle on the form \Name[W.E.B.]{Du Bois} in one's name authority. Yet an essay might use an alternate spelling for \Name[W.E.B.]{Du Bois}, namely, \IndexInactive\Name*[W.E.B.]{DuBois}\IndexActive, where the publisher would not grant the right to alter the spelling. In that case, do the following in that document section:
%
% \begin{enumerate}\setlength\itemsep{0pt}
% \item Use |\ForgetName| for the first use when spaces are the only variation between name forms because the mechanism for determining whether or not a name has occurred ignores spaces.
% \item Wrap \cmd{\Name} and friends 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 look like:
% \begin{quote}%
% \gdef\DuBoisAlt{\IndexInactive\Name[W.E.B.]{DuBois}\IndexActive\IndexName[W.E.B.]{Du Bois}}%
% |\gdef\DuBoisAlt{\IndexInactive\Name[W.E.B.]{DuBois}%|\\|\IndexActive\IndexName[W.E.B.]{Du Bois}}|\\
% \verb!\index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}!\dots\\[2ex]
% \dots{}|\ForgetName[W.E.B.]{DuBois}|\dots|\DuBoisAlt|
% \end{quote}
%
% The alternate section mentions \ForgetName[W.E.B.]{DuBois}\DuBoisAlt\index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}, then just \DuBoisAlt\ thereafter. 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}\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\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}|\\{\large\strut}
% \textit{Subsequent full name}:\newline\hbox to 1em{\hfil}\Name*[John]{Smith} & |\Name*[John]{Smith}|\newline\\{\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.]|\\{\large\strut}
% \textit{Subsequent full}: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\{\large\strut}
% \textit{Alternate forenames}:\newline\hbox to 1em{\hfil}\Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\newline\\{\large\strut}
% {\large\strut}\textit{Alternate forename}: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\\hline
% \end{tabular}\\[2ex]
% 
% \noindent{\bfseries Western Plus Affixes}\\[1ex]
% Always use a comma to delimit name/affix pairs.\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\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.}|\\{\large\strut}
% \textit{Subsequent full}:\newline\hbox to 1em{\hfil}\Name*[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\newline\\{\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}
% \begin{quote}
%|\begin{nameauth}% In the preamble!|\\[0.2ex]
%|  \< Smith & John & Smith & >|\\[0.2ex]
%|  \< JQP & J.Q. & Public & >|\\[0.2ex]
%|  \< Patton & George S. & Patton, Jr. & >|\\[0.2ex]
%|\end{nameauth}|
%\end{quote}
%
% \ForgetName[John]{Smith}\ForgetName[J.Q.]{Public}|\Smith, \LSmith, \Smith, and \SSmith| give \Smith, \LSmith, \Smith, and \SSmith. |\JQP[Jane Q.],| |\LJQP[Jane Q.],| |and| |\JQP[Jane Q.]| make \JQP[Jane Q.], \LJQP[Jane Q.], and \JQP[Jane Q.].  |\LJQP[Jane| |Qetsiyah]\| |and| |\SJQP[Janie]| produce \LJQP[Jane Qetsiyah]\ and \SJQP[Janie].
%
% \ForgetName[George S.]{Patton, Jr.}|\Patton,| |\LPatton,| |\Patton,| |and| |\SPatton| give \KeepAffix\Patton, \LPatton, \Patton, and \SPatton. For the alternate forename, |\SPatton[George]| yields \SPatton[George].\clearpage
%
% \noindent{\bfseries New Syntax: Royal, Eastern, and Ancient}\\[1ex]
% 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}.\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\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}|\\{\large\strut}
% \textit{Subsequent full}: \Name*{Francis, I} & |\Name*{Francis, I}|\\{\large\strut}
% \textit{Subsequent name}: \Name{Francis, I} & |\Name{Francis, I}|\newline |\FName{Francis, I}|\\{\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}|\\{\large\strut}
% \textit{Subsequent full name}: \newline\hbox to 1em{\hfil}\Name*{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\newline\\{\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}|\\{\large\strut}
% \textit{Subsequent full name}: \newline\hbox to 1em{\hfil}\Name*{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline\\{\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}|\\{\large\strut}
% {\large\strut}\textit{Subsequent mononym}: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\\hline
% \end{tabular}
% \begin{quote}
%|\begin{nameauth}% In the preamble!|\\[0.2ex]
%|  \< Francis & & Francis, I & >|\\[0.2ex]
%|  \< Dem & & Demetrius, I Soter & >|\\[0.2ex]
%|  \< Sun & & Sun, Yat-sen & >|\\[0.2ex]
%|  \< Plato & & Plato & >|\\[0.2ex]
%|\end{nameauth}|
%\end{quote}
%
% \ForgetName{Francis, I}\ForgetName{Demetrius, I Soter}\ForgetName{Sun, Yat-sen}\ForgetName{Plato}|\Francis,| |\LFrancis,| |\Francis,| |and| |\SFrancis| give \Francis, \KeepAffix\LFrancis, \Francis, and \SFrancis. |\Dem,| |\LDem,| |\Dem,| |and \SDem| make \Dem, \LDem, \Dem, and \SDem. |\Sun,| |\LSun,| |\Sun,| |and \SSun| produce \Sun, \LSun, \Sun, and \SSun. |\Plato,| |\LPlato,| |\Plato,| |and \SPlato| yield \Plato, \LPlato, \Plato, and \SPlato.
%
% Note that |\KeepAffix\LFrancis| was used to prevent a bad break above. |\KeepAffix\Patton| prevented a bad break on the previous page.
% \clearpage
%
% \noindent{\bfseries Old Syntax: Royal and Eastern}\\[1ex]
% Please note that these forms are not recommended. |\Name{Ptolemy}[I Soter]| keeps the number with the affix. To keep the number with the name, use |\Name{Ptolemy I}[Soter]|. See also Section~\ref{sec:Affix}.\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
% First ref: \ForgetName{Henry}[VIII]\Name{Henry}[VIII] & |\Name*{Henry}[VIII]|\newline |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\{\large\strut}
% Subsequent refs: \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\{\large\strut}
% Subsequent refs: \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\{\large\strut}
% First ref: \ForgetName{Ptolemy}[I Soter]\Name{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\newline |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\{\large\strut}
% Subsequent refs: \Name*{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\\{\large\strut}
% Subsequent refs: \Name{Ptolemy}[I Soter] & |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\\hline{\large\strut}
% First reference:\newline \hbox to 1em{\hfil}\ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\newline |\Name{Mao}[Tse-tung]|\\{\large\strut}
% Subsequent refs: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\{\large\strut}
% Subsequent refs: \Name{Mao}[Tse-tung] & |\Name{Mao}[Tse-tung]|\newline |\FName{Mao}[Tse-tung]|\\\hline
% \end{tabular}
% \begin{quote}
%|\begin{nameauth}% In the preamble!|\\[0.2ex]
%|  \< Henry & & Henry & VIII >|\\[0.2ex]
%|  \< Ptol & & Ptolemy & I Soter >|\\[0.2ex]
%|  \< Mao & & Mao & Tse-tung >|\\[0.2ex]
%|\end{nameauth}|
%\end{quote}
% \ForgetName{Ptolemy}[I Soter]\ForgetName{Henry}[VIII]\ForgetName{Mao}[Tse-tung]|\Henry, \LHenry, \Henry, and \SHenry| give \Henry, \LHenry, \Henry, and \SHenry. |\Ptol,| |\LPtol,| |\Ptol,| |and \SPtol| make \Ptol, \LPtol, \Ptol, and \SPtol. |\Mao, \LMao, \Mao, and \SMao| produce \Mao, \LMao, \Mao, and \SMao.
%
% Avoid mixing syntax. If you take |\Name{Antiochus, IV}|\IndexName{Antiochus, IV} and add a sobriquet like |\Name{Antiochus, IV}[Epiphanes]| you will get two different names in the index. \cmd{\AKA} may look like it blends old and new syntax, but it really does not.
%
% Workarounds include |\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. Use |\Name{Antiochus~IV, Epiphanes}| to keep the numeral with the name (best done with the simplified interface). Maybe the best way is to use something like |\TagName{Antiochus,| |IV}{| |Epiphanes,| |king}| with |\Name{Antiochus,| |IV}| and include ``Epiphanes'' manually as needed.
%
% Remember also that you can ``stack'' modifiers like \cmd{\CapThis}, \cmd{\CapName}, \cmd{\RevName}, \cmd{\KeepAffix}, and so on in front of the control sequences of the simplified interface. |\CapName\LMao| generates \CapName\LMao.
% \clearpage
%
% \subsubsection{Particles}
% \label{sec:Particles}
% The following illustrate the American style of particulate names.\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
% 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}|\\{\large\strut}
% Next reference: \Name[Walter]{de la Mare} & |\Name[Walter]{de la Mare}|\\{\large\strut}
% At start of sentence: \CapThis\Name[Walter]{de la Mare} & |\CapThis\Name[Walter]{de la Mare}|\\{\large\strut}
% 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.\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
% 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}|\\{\large\strut}
% Subsequent: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\{\large\strut}
% 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. Long macros are split for readability.\\[1ex]
% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
% First: \Name[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}[Adolf von]|\newline |\FName[Adolf]{Harnack}[Adolf von]|\\{\large\strut}
% Next full name:\newline\hbox to 1em{\hfil}\Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\{\large\strut}
% Subsequent surname: \Name[Adolf]{Harnack}[Adolf von] & |\Name[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}|\\{\large\strut}
% Subsequent forename: \FName[Adolf]{Harnack} & |\FName[Adolf]{Harnack}|\\\hline
% \end{tabular}
% \begin{quote}
%|\begin{nameauth}% In the preamble!|\\[0.2ex]
%|  \< DLM & Walter & de la Mare & >|\\[0.2ex]
%|  \< JWG & Johann Wolfgang von & Goethe & >|\\[0.2ex]
%|  \< Harnack & Adolf & Harnack & >|\\[0.2ex]
%|\end{nameauth}|
%\end{quote}
%\ForgetName[Walter]{de la Mare}\ForgetName[Johann Wolfgang von]{Goethe}\ForgetName[Adolf]{Harnack}|\DLM\| |and| |\CapThis\DLM| produce \DLM\ and \CapThis\DLM. |\JWG\| |and| |\JWG| give \JWG\ and \JWG. Using the alternate forenames option, |\Harnack[Adolf von]\| |and| |\Harnack| yield \Harnack[Adolf von]\ and \Harnack, but you will not see \Harnack's ``von'' in the index.
% \index{Rambam|seealso{Maimonides}}
% \clearpage
%
% \StopEventually{\PrintChanges\clearpage\PrintIndex}
%
% \section{Implementation}
%
% \iffalse
%<*package>
% \fi
% \subsection{Package Options and Required Packages}
%
% Used internally to control printed name forms. |@nameauth@FullName| is only used to decide long or short forms in subsequent occurrences of names. The next Boolean, |@nameauth@FirstName|, switches surnames and forenames in the short form. |@nameauth@AltAKA| determines the cross-references that \cmd{\AKA} will print.
%    \begin{macrocode}
\newif\if@nameauth@FullName
\newif\if@nameauth@FirstName
\newif\if@nameauth@AltAKA
%    \end{macrocode}
% The next Boolean values control formatting. The first is toggled with \cmd{\NamesActive} and \cmd{\NamesInctive}; the second with \cmd{\IndexActive} and \cmd{\IndexInctive}. The first four are set with package options. The last two are set with \cmd{\ShowComma} and \cmd{\KeepAffix}, cleared by each instance of \cmd{\Name} and \cmd{\AKA}.
%    \begin{macrocode}
\newif\if@nameauth@DoFormat
\newif\if@nameauth@DoIndex
\newif\if@nameauth@AlwaysFormat
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
\newif\if@nameauth@NBSP
%    \end{macrocode}
% These Boolean values are used for detection of affixes and final periods.
%    \begin{macrocode}
\newif\if@nameauth@Comma
\newif\if@nameauth@Punct
%    \end{macrocode}
% This Boolean value is triggered by \cmd{\CapThis}.
%    \begin{macrocode}
\newif\if@nameauth@DoCaps
%    \end{macrocode}
% 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}
% The following package options interact with many of the prior Boolean values. Suppressing and showing commas is set at load time and should not be changed in the document or else significant errors will result. Most options can be changed with user interface macros. Avoid changing the internal Boolean values directly.
% \changes{v1.7}{2013/04/02}{Change options processing to prevent errors}
%    \begin{macrocode}
\newcommand{\NamesFormat}{}
\DeclareOption{mainmatter}{\@nameauth@DoFormattrue}
\DeclareOption{frontmatter}{\@nameauth@DoFormatfalse}
\DeclareOption{smallcaps}{\renewcommand{\NamesFormat}{\scshape}}
\DeclareOption{italic}{\renewcommand{\NamesFormat}{\itshape}}
\DeclareOption{boldface}{\renewcommand{\NamesFormat}{\bfseries}}
\DeclareOption{noformat}{\renewcommand{\NamesFormat}{}}
\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue}
\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{comma}{\@nameauth@AlwaysCommatrue}
\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
\ExecuteOptions{nocomma,mainmatter,index,normalcaps,notreversed,smallcaps}
\ProcessOptions\relax
%    \end{macrocode}
% Now we load the required packages. They facilitate the first/subsequent name uses, the parsing of arguments, and the implementation of starred forms.
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{trimspaces}
\RequirePackage{suffix}
\RequirePackage{xargs}
%    \end{macrocode}
%
% \subsection{Internal Macros}
% \begin{macro}{\@nameauth@CleanName}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string, even using accented characters, based on the parameters 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@CleanName}[1]%
{%
  \expandafter\zap@space\detokenize{#1} \@empty%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Root}
% \changes{v0.85}{2012/02/05}{Revise suffix handling}
% \changes{v0.9}{2012/02/10}{renamed macro; suffix handling expandable}
% \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 parameters) 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.85}{2012/02/05}{Divide suffix handling into functional parts}
% \changes{v0.9}{2012/02/10}{Renamed macro; suffix handling expandable}
% Throw out the comma and suffix, return the radix.
%    \begin{macrocode}
\def\@nameauth@TrimRoot#1,#2\relax{#1}
%    \end{macrocode}
% \end{macro}
%
% \clearpage
% \begin{macro}{\@nameauth@CapRoot}
% \changes{v0.95}{2012/02/17}{Added macro}
% The next two macros implement the particulate name capitalization mechanism by returning a radix where the first letter is capitalized.
%    \begin{macrocode}
\newcommand*{\@nameauth@CapRoot}[1]%
  {\@nameauth@CR#1\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@CR}
% \changes{v0.95}{2012/02/17}{Added macro}
% Grab the first letter as one parameter, and everything before \cmd{\relax} as the second. Capitalize the first and return it with the second.
%    \begin{macrocode}
\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@AllCapRoot}
% \changes{v1.5}{2013/02/22}{Added macro}
% 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 macro}
% \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 suffix. Anything before a comma is stripped off by |\@nameauth@Suffix|, but a comma must be present in the parameter. 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 macro}
% \changes{v1.4}{2012/07/24}{Made more robust}
% \changes{v1.5}{2013/02/22}{Added space removal}
% 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}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% This macro, based on a snippet by \Name*[Uwe]{Lueck}, checks for a period at the end of its parameter, ignoring medial periods. 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}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% 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}
\def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@EvalDot}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
%  If \cmd{\@token} is a full stop, we gobble the token.
%    \begin{macrocode}
\def\@nameauth@EvalDot%
  {\let\@period=.\ifx\@token\@period\expandafter\@gobble \fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@FmtName}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \changes{v0.9}{2012/02/10}{Redesigned macro}
% \changes{v0.94}{2012/02/15}{Added particle caps}
% \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}}
% The following macros format the output of \cmd{\Name}, etc. \cmd{\@nameauth@FmtName} is where the first occurrences of a name are formatted. Notice how \cmd{\NamesFormat} sits between a \cmd{\bgroup} and an \cmd{\egroup} to localize the font change.  The \cmd{\NamesFormat} hook has been discussed previously.
%    \begin{macrocode}
\newcommand{\@nameauth@FmtName}[1]%
{%
  \@nameauth@TestDot{#1}%
  \if@nameauth@DoFormat%
    \bgroup\NamesFormat{#1}\egroup%
  \else%
    #1%
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@FmtName*}
% \cmd{\@nameauth@FmtName} is where subsequent occurrences of a name are formatted. |\if@nameauth@AlwaysFormat| causes formatting to occur always (when possible).
%    \begin{macrocode}
\WithSuffix\newcommand\@nameauth@FmtName*[1]%
{%
  \@nameauth@TestDot{#1}%
  \if@nameauth@DoFormat%
    \if@nameauth@AlwaysFormat%
      \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 macro}
% \changes{v1.9}{2015/07/09}{babel workaround}
% If the indexing flag is true, create an index entry, otherwise do nothing.
%    \begin{macrocode}
\newcommandx\@nameauth@Index[2][2=\@empty]%
{%
  \ifx#2\@empty%
    \if@nameauth@DoIndex\index{#1}\fi%
  \else%
    \ifcsname#2\endcsname%
      \if@nameauth@DoIndex\index{#1\csname#2\endcsname}\fi%
    \else%
      \if@nameauth@DoIndex\index{#1}\fi%
    \fi%
  \fi%
}
%    \end{macrocode}
% \end{macro}
% \subsection{User Interface Macros}
% The following macros have been documented previously. Either they call the internal macros or set Boolean values.
% \begin{macro}{\CapThis}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \begin{macrocode}
\newcommand{\CapThis}{\@nameauth@DoCapstrue}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\CapName}
% \changes{v1.5}{2013/02/22}{Added macro}
% Capitalize entire name.
%    \begin{macrocode}
\newcommand{\CapName}{\@nameauth@AllThistrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\RevName}
% \changes{v1.5}{2013/02/22}{Added macro}
% Reverse name order.
%    \begin{macrocode}
\newcommand{\RevName}{\@nameauth@RevThistrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\RevComma}
% \changes{v1.5}{2013/02/22}{Added macro}
% 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 macro}
% 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 macro}
% 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}{\Name}
% \changes{v0.75}{2012/01/19}{Added ``sobriquet'' feature}
% \changes{v0.8}{2012/01/29}{Merged all major functionality here}
% \changes{v0.85}{2012/02/05}{Add comma suppression to indexing}
% \changes{v0.9}{2012/02/10}{Redesigned macro}
% \changes{v0.94}{2012/02/15}{Error checking expanded}
% \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}}
% \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.}
% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
% \changes{v1.4}{2012/07/24}{Made more robust}
% \changes{v1.5}{2013/02/22}{Added reversing and caps mechanisms}
% 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\Name[3][1=\@empty, 3=\@empty]%
{%
  \leavevmode\hbox{}%
  \protected@edef\testi{#1}%
  \protected@edef\testii{#2}%
  \protected@edef\testiii{#3}%
  \if@nameauth@AllCaps\@nameauth@AllThistrue\fi%
  \if@nameauth@RevAll\@nameauth@RevThistrue\fi%
  \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi%
  \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%
  \protected@edef\RawShort{\@nameauth@Root{#2}}%
  \protected@edef\CapShort{\@nameauth@CapRoot{#2}}%
  \protected@edef\AllCapShort{\@nameauth@AllCapRoot{#2}}%
  \let\IndexShort\RawShort%
  \ifx\testii\RawShort%
    \protected@edef\Suffix{\@empty}%
    \let\IndexSurnames\RawShort%
    \let\Reversed\RawShort%
    \let\Surnames\RawShort%
    \let\PrintShort\RawShort%
    \if@nameauth@DoCaps%
      \let\Reversed\CapShort%
      \let\Surnames\CapShort%
      \let\PrintShort\CapShort%
    \fi%
    \if@nameauth@AllThis%
      \let\Reversed\AllCapShort%
      \let\Surnames\AllCapShort%
      \let\PrintShort\AllCapShort%
    \fi%
  \else%
    \protected@edef\Suffix{\@nameauth@Suffix{#2}}%
    \protected@edef\IndexSurnames{\RawShort\ISpace\Suffix}%
    \protected@edef\Reversed{\Suffix\Space\RawShort}%
    \protected@edef\Surnames{\RawShort\Space\Suffix}%
    \if@nameauth@RevThis%
      \let\PrintShort\Suffix%
    \else%
      \let\PrintShort\RawShort%
    \fi%
    \if@nameauth@DoCaps%
      \protected@edef\Reversed{\Suffix\Space\CapShort}%
      \protected@edef\Surnames{\CapShort\Space\Suffix}%
      \if@nameauth@RevThis%
        \let\PrintShort\Suffix%
      \else%
        \let\PrintShort\CapShort%
      \fi%
    \fi%
    \if@nameauth@AllThis%
      \protected@edef\Reversed{\Suffix\Space\AllCapShort}%
      \protected@edef\Surnames{\AllCapShort\Space\Suffix}%
      \if@nameauth@RevThis%
        \let\PrintShort\Suffix%
      \else%
        \let\PrintShort\AllCapShort%
      \fi%
    \fi%
  \fi%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \Name: Xref: #2 cannot be a page reference.}%
      \else%
        \@nameauth@Index{\IndexSurnames}[\@nameauth@CleanName{#2}!TAG!]%
      \fi%
      \if@nameauth@DoFormat%
          \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
            \if@nameauth@FirstName%
              \@nameauth@FullNamefalse%
              \@nameauth@FirstNamefalse%
            \fi%
            \if@nameauth@FullName%
              \@nameauth@FullNamefalse%
              \if@nameauth@RevThis%
                \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
              \else%
                \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
              \fi%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
            \fi%
          \else%
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
            \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
            \if@nameauth@RevThis%
              \expandafter\@nameauth@FmtName\expandafter{\Reversed}%
            \else%
              \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
            \fi%
          \fi%
      \else%
          \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
            \if@nameauth@FirstName%
              \@nameauth@FullNamefalse%
              \@nameauth@FirstNamefalse%
            \fi%
            \if@nameauth@FullName%
              \@nameauth@FullNamefalse%
              \if@nameauth@RevThis%
                \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
              \else%
                \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
              \fi%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
            \fi%
          \else%
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
            \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
            \if@nameauth@RevThis%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
            \fi%
          \fi%
      \fi%
    \else%
      \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \Name: Xref: #2 #3 cannot be a page reference.}%
      \else%
        \@nameauth@Index{\IndexSurnames\ISpace#3}[\@nameauth@CleanName{#2#3}!TAG!]%
      \fi%
      \if@nameauth@DoFormat%
        \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
          \if@nameauth@FirstName%
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
          \fi%
          \if@nameauth@FullName%
            \@nameauth@FullNamefalse%
            \if@nameauth@RevThis%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                \expandafter\testiii\expandafter\space\Surnames}%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                \expandafter\Surnames\expandafter\space#3}%
            \fi%
          \else%
            \if@nameauth@RevThis%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testiii}%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
            \fi%
          \fi%
        \else%
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
          \if@nameauth@RevThis%
            \expandafter\@nameauth@FmtName\expandafter{%
              \expandafter\testiii\expandafter\space\Surnames}%
          \else%
            \expandafter\@nameauth@FmtName\expandafter{%
              \expandafter\Surnames\expandafter\space#3}%
          \fi%
        \fi%
      \else%
        \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
          \if@nameauth@FirstName%
            \@nameauth@FullNamefalse%
            \@nameauth@FirstNamefalse%
          \fi%
          \if@nameauth@FullName%
            \@nameauth@FullNamefalse%
            \if@nameauth@RevThis%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                \expandafter\testiii\expandafter\space\Surnames}%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                \expandafter\Surnames\expandafter\space#3}%
            \fi%
          \else%
            \if@nameauth@RevThis%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testiii}%
            \else%
              \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
            \fi%
          \fi%
        \else%
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
          \if@nameauth@RevThis%
            \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
              \expandafter\testiii\expandafter\space\Surnames}%
          \else%
            \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
              \expandafter\Surnames\expandafter\space\testiii}%
          \fi%
        \fi%
      \fi%
    \fi%
  \else%
    \if@nameauth@RevThisComma%
      \protected@edef\ISpace{,\space}%
      \protected@edef\Space{,\space}%
      \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
    \fi%
    \ifx\testiii\@empty%
      \protected@edef\Forenames{#1}%
    \else%
      \protected@edef\Forenames{#3}%
    \fi
    \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
      \PackageWarning{nameauth}%
      {macro \Name: Xref: #1 #2 cannot be a page reference.}%
    \else%
      \ifx\Suffix\@empty%
        \@nameauth@Index{\IndexShort, #1}[\@nameauth@CleanName{#1#2}!TAG!]%
      \else%
        \@nameauth@Index{\IndexShort, #1, \Suffix}[\@nameauth@CleanName{#1#2}!TAG!]%
      \fi%
    \fi%
    \if@nameauth@DoFormat%
      \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
        \if@nameauth@FirstName%
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \let\PrintShort\Forenames%
        \fi%
        \if@nameauth@FullName%
          \@nameauth@FullNamefalse%
          \if@nameauth@RevThis%
            \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
              \expandafter\Surnames\expandafter\Space\Forenames}%
          \else%
            \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
              \expandafter\Forenames\expandafter\space\Surnames}%
          \fi%
        \else%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
        \fi%
      \else%
        \@nameauth@FullNamefalse%
        \@nameauth@FirstNamefalse%
        \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
        \if@nameauth@RevThis%
          \expandafter\@nameauth@FmtName\expandafter{%
            \expandafter\Surnames\expandafter\Space\Forenames}%
        \else%
          \expandafter\@nameauth@FmtName\expandafter{%
            \expandafter\Forenames\expandafter\space\Surnames}%
        \fi%
      \fi%
    \else%
      \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
        \if@nameauth@FirstName%
          \@nameauth@FullNamefalse%
          \@nameauth@FirstNamefalse%
          \let\PrintShort\Forenames%
        \fi%
        \if@nameauth@FullName%
          \@nameauth@FullNamefalse%
          \if@nameauth@RevThis%
            \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
              \expandafter\Surnames\expandafter\Space\Forenames}%
          \else%
            \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
              \expandafter\Forenames\expandafter\space\Surnames}%
          \fi%
        \else%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
        \fi%
      \else%
        \@nameauth@FullNamefalse%
        \@nameauth@FirstNamefalse%
        \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
        \if@nameauth@RevThis%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
            \expandafter\Surnames\expandafter\Space\Forenames}%
        \else%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
            \expandafter\Forenames\expandafter\space\Surnames}%
        \fi%
      \fi%
    \fi%
  \fi%
  \@nameauth@NBSPfalse%
  \@nameauth@DoCapsfalse%
  \@nameauth@AllThisfalse%
  \@nameauth@ShowCommafalse%
  \@nameauth@RevThisfalse%
  \@nameauth@RevThisCommafalse%
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Name*}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\Name*} sets a Boolean value and calls \cmd{\Name}.
%    \begin{macrocode}
\WithSuffix\newcommandx\Name*[3][1=\@empty, 3=\@empty]%
  {\@nameauth@FullNametrue\Name[#1]{#2}[#3]}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName}
% \changes{v0.9}{2012/02/10}{Added macro}
% \changes{v0.94}{2012/02/15}{Error checking expanded}
% \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.}
% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\FName} sets a Boolean value and calls \cmd{\Name}.
%    \begin{macrocode}
\newcommandx\FName[3][1=\@empty, 3=\@empty]%
  {\@nameauth@FirstNametrue\Name[#1]{#2}[#3]}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName*}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\FName} and \cmd{\FName*} are identical.
%    \begin{macrocode}
\WithSuffix\newcommandx\FName*[3][1=\@empty, 3=\@empty]%
  {\@nameauth@FirstNametrue\Name[#1]{#2}[#3]}
%    \end{macrocode}
% \end{macro}
%
% \clearpage
% \begin{macro}{\AKA}
% \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility}
% \changes{v0.86}{2012/02/06}{Fixed some regressions}
% \changes{v0.9}{2012/02/10}{Added starred mode; redesigned}
% \changes{v0.94}{2012/02/15}{Added error checking}
% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
% \changes{v1.1}{2012/03/08}{Fixed warning reporting.}
% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
% \changes{v1.4}{2012/07/24}{Made more robust}
% \changes{v1.5}{2013/02/22}{Added reversing and caps mechanisms}
% \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]%
{%
  \leavevmode\hbox{}%
  \protected@edef\testi{#1}%
  \protected@edef\testii{#2}%
  \protected@edef\testiii{#3}%
  \protected@edef\testiv{#4}%
  \protected@edef\testv{#5}%
  \if@nameauth@AllCaps\@nameauth@AllThistrue\fi%
  \if@nameauth@RevAll\@nameauth@RevThistrue\fi%
  \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi%
  \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%
  \protected@edef\Shortii{\@nameauth@Root{#2}}%
  \protected@edef\Shortiv{\@nameauth@Root{#4}}%
  \protected@edef\CapShort{\@nameauth@CapRoot{#4}}%
  \protected@edef\AllCapShort{\@nameauth@AllCapRoot{#4}}%
  \ifx\testii\Shortii%
    \let\Surnamesii\Shortii%
    \protected@edef\Suffixii{\@empty}%
  \else%
    \protected@edef\Suffixii{\@nameauth@Suffix{#2}}%
    \protected@edef\Surnamesii{\Shortii\ISpace\Suffixii}%
  \fi%
  \ifx\testiv\Shortiv%
    \protected@edef\Suffixiv{\@empty}%
    \let\ISurnamesiv\Shortiv%
    \let\Reversed\Shortiv%
    \let\Surnamesiv\Shortiv%
    \if@nameauth@DoCaps%
      \let\Surnamesiv\CapShort%
      \let\Reversed\CapShort%
    \fi%
    \if@nameauth@AllThis%
      \let\Surnamesiv\AllCapShort%
      \let\Reversed\AllCapShort%
    \fi%
  \else%
    \protected@edef\Suffixiv{\@nameauth@Suffix{#4}}%
    \protected@edef\ISurnamesiv{\Shortiv\ISpace\Suffixiv}%
    \protected@edef\Reversed{\Suffixiv\Space\Shortiv}%
    \protected@edef\Surnamesiv{\Shortiv\Space\Suffixiv}%
    \if@nameauth@DoCaps%
      \protected@edef\Reversed{\Suffixiv\Space\CapShort}%
      \protected@edef\Surnamesiv{\CapShort\Space\Suffixiv}%
    \fi%
    \if@nameauth@AllThis%
      \protected@edef\Reversed{\Suffixiv\Space\AllCapShort}%
      \protected@edef\Surnamesiv{\AllCapShort\Space\Suffixiv}%
    \fi%
  \fi%
  \ifx\testiii\@empty%
    \ifx\testv\@empty%
      \ifcsname\@nameauth@CleanName{#4!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \AKA: XRef: #4 exists.}%
      \else%
        \ifcsname\@nameauth@CleanName{#4!MN!}\endcsname%
          \PackageWarning{nameauth}%
          {macro \AKA: Name reference: #4 already exists; no see ref.}%
        \else%
          \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
            \PackageWarning{nameauth}%
            {macro \AKA: Name reference: #4 already exists; no see ref.}%
          \else%
            \csgdef{\@nameauth@CleanName{#4!PN!}}{}%
            \ifx\testi\@empty%
              \@nameauth@Index{\ISurnamesiv|see{\Surnamesii}}%
            \else%
              \ifx\Suffixii\@empty \@nameauth@Index{\ISurnamesiv|see{\Surnamesii, #1}}%
              \else \@nameauth@Index{\ISurnamesiv|see{\Shortii, #1, \Suffixii}}\fi%
            \fi%
          \fi%
        \fi%
      \fi%
      \if@nameauth@RevThisComma%
        \protected@edef\ISpace{,\space}%
        \protected@edef\Space{,\space}%
        \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
      \fi%
      \if@nameauth@RevThis%
        \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
      \else%
        \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesiv}%
      \fi%
    \else%
      \ifcsname\@nameauth@CleanName{#4#5!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \AKA: XRef: #4 #5 exists.}%
      \else%
        \ifcsname\@nameauth@CleanName{#4#5!MN!}\endcsname%
          \PackageWarning{nameauth}%
          {macro \AKA: Name reference: #4 #5 already exists; no see ref.}%
        \else%
          \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
            \PackageWarning{nameauth}%
            {macro \AKA: Name reference: #4 #5 already exists; no see ref.}%
          \else%
            \csgdef{\@nameauth@CleanName{#4#5!PN!}}{}%
            \ifx\testi\@empty%
              \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Surnamesii}}%
            \else%
              \ifx\Suffixii\@empty \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Surnamesii, #1}}%
              \else \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Shortii, #1, \Suffixii}}\fi%
            \fi%
          \fi%
        \fi%
      \fi%
      \if@nameauth@RevThisComma%
        \protected@edef\ISpace{,\space}%
        \protected@edef\Space{,\space}%
        \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
      \fi%
      \if@nameauth@AltAKA%
        \if@nameauth@RevThis%
        \else%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testv}%
        \fi%
      \else%
        \if@nameauth@RevThis%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{\expandafter\testv\expandafter\Space\Surnamesiv}%
        \else%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{\expandafter\Surnamesiv\expandafter\space\testv}%
        \fi%
      \fi%
    \fi%
  \else%
    \ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname%
      \PackageWarning{nameauth}%
      {macro \AKA: XRef: #3 #4 exists.}%
    \else%
      \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \AKA: Name reference: #3 #4 already exists; no see ref.}%
      \else%
        \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname%
          \PackageWarning{nameauth}%
          {macro \AKA: Name reference: #3 #4 already exists; no see ref.}%
        \else%
          \csgdef{\@nameauth@CleanName{#3#4!PN!}}{}%
          \ifx\testi\@empty%
            \ifx\Suffixiv\@empty \@nameauth@Index{\ISurnamesiv, #3|see{\Surnamesii}}%
            \else \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii}}\fi%
          \else%
            \ifx\Suffixii\@empty%
              \ifx\Suffixiv\@empty%
                \@nameauth@Index{\ISurnamesiv, #3|see{\Surnamesii, #1}}%
              \else%
                \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii, #1}}%
              \fi%
            \else%
              \ifx\Suffixiv\@empty%
                \@nameauth@Index{\ISurnamesiv, #3|see{\Shortii, #1, \Suffixii}}%
              \else%
                \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Shortii, #1, \Suffixii}}%
              \fi%
            \fi%
          \fi%
        \fi%
      \fi%
    \fi%
    \if@nameauth@RevThisComma%
      \protected@edef\ISpace{,\space}%
      \protected@edef\Space{,\space}%
      \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
    \fi%
    \ifx\testv\@empty%
      \protected@edef\Forenames{#3}%
    \else%
      \protected@edef\Forenames{#5}%
    \fi%
    \if@nameauth@RevThis%
      \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
        \expandafter\Surnamesiv\expandafter\Space\Forenames}%
    \else%
      \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
        \expandafter\Forenames\expandafter\space\Surnamesiv}%
    \fi%
  \fi%
  \@nameauth@NBSPfalse%
  \@nameauth@AltAKAfalse%
  \@nameauth@DoCapsfalse%
  \@nameauth@AllThisfalse%
  \@nameauth@ShowCommafalse%
  \@nameauth@RevThisfalse%
  \@nameauth@RevThisCommafalse%
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AKA*}
% \changes{v0.9}{2012/02/10}{Added macro}
% This starred form sets a Boolean to print only the alternate name parameter, if that exists, and calls \cmd{\AKA}.
%    \begin{macrocode}
\WithSuffix\newcommandx\AKA*[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \@nameauth@AltAKAtrue%
  \AKA[#1]{#2}[#3]{#4}[#5]%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\PName}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \cmd{\PName} is a convenience macro that calls \cmd{\Name}, then \cmd{\AKA}.
%    \begin{macrocode}
\newcommandx\PName[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \Name[#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 just calls \cmd{\Name*}, then \cmd{\AKA}.
%    \begin{macrocode}
\WithSuffix\newcommandx\PName*[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \Name*[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\TagName}
% \changes{v1.2}{2012/02/25}{Added macro.}
% \changes{v1.9}{2015/07/09}{fix collisions}
% 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\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \textbackslash TagName Cannot tag xref: #2.}%
      \else%
        \csgdef{\@nameauth@CleanName{#2}!TAG!}{#4}%
      \fi%
    \else%
      \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \textbackslash TagName Cannot tag xref: #2 #3.}%
      \else%
        \csgdef{\@nameauth@CleanName{#2#3}!TAG!}{#4}%
      \fi%
    \fi%
  \else%
      \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \textbackslash TagName Cannot tag xref: #1 #2.}%
      \else%
        \csgdef{\@nameauth@CleanName{#1#2}!TAG!}{#4}%
      \fi%
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\UntagName}
% \changes{v1.2}{2012/02/25}{Added macro.}
% \changes{v1.9}{2015/07/09}{Ensure global undef, fix collisions}
% This deletes an index entry tag.
%    \begin{macrocode}
\newcommandx\UntagName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \global\csundef{\@nameauth@CleanName{#2}!TAG!}%
    \else%
      \global\csundef{\@nameauth@CleanName{#2#3}!TAG!}%
    \fi%
  \else%
      \global\csundef{\@nameauth@CleanName{#1#2}!TAG!}%
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexName}
% \changes{v0.75}{2012/01/19}{Optional parameter added; mandatory parameter deleted}
% \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility}
% \changes{v0.86}{2012/02/06}{Slight tweak using \cmd{\edef}}
% \changes{v0.9}{2012/02/10}{redesigned macro}
% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
% \changes{v1.2}{2012/02/25}{Added warnings.}
% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
% \changes{v1.4}{2012/07/24}{Made more robust}
% 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\testi{#1}%
  \protected@edef\testii{#2}%
  \protected@edef\testiii{#3}%
  \protected@edef\Space{\space}%
  \if@nameauth@AlwaysComma%
    \protected@edef\Space{,\space}%
  \fi%
  \if@nameauth@ShowComma%
    \protected@edef\Space{,\space}%
  \fi%
  \protected@edef\Short{\@nameauth@Root{#2}}%
  \ifx\testii\Short%
    \let\Surnames\Short%
    \protected@edef\Suffix{\@empty}%
  \else%
    \protected@edef\Suffix{\@nameauth@Suffix{#2}}%
    \protected@edef\Surnames{\Short\Space\Suffix}%
  \fi%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \IndexName: XRef: #2 exists.}%
      \else%
        \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}!TAG!]%
      \fi%
    \else%
      \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \IndexName: XRef: #2 #3 exists.}%
      \else%
        \@nameauth@Index{\Surnames\Space#3}[\@nameauth@CleanName{#2#3}!TAG!]%
      \fi%
    \fi%
  \else%
      \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \IndexName: XRef: #1 #2 exists.}%
      \else%
        \ifx\Suffix\@empty \@nameauth@Index{\Short, #1}[\@nameauth@CleanName{#1#2}!TAG!]%
        \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}!TAG!]\fi%
      \fi%
  \fi%
  \@nameauth@ShowCommafalse%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ExcludeName}
% \changes{v0.94}{2012/02/15}{Added macro}
% 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\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname\relax%
      \else%
        \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #2 already exists; no exclusion.}%
        \else%
          \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 already exists; no exclusion.}%
          \else%
            \csgdef{\@nameauth@CleanName{#2!PN!}}{}%
          \fi%
        \fi%
      \fi%
    \else%
      \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname\relax%
      \else%
        \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}%
        \else%
          \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
            \PackageWarning{nameauth}%
            {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}%
          \else%
            \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}%
          \fi%
        \fi%
      \fi%
    \fi%
  \else%
    \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
      \PackageWarning{nameauth}%
      {macro \ExcludeName: XRef: #1 #2 exists.}%
    \else%
      \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
        \PackageWarning{nameauth}%
        {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}%
      \else%
        \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
          \PackageWarning{nameauth}%
          {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}%
        \else%
          \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}%
        \fi%
      \fi%
    \fi%
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ForgetName}
% \changes{v0.75}{2012/01/19}{New parameter added}
% \changes{v1.9}{2015/07/09}{Ensure global undef}
% 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\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \global\csundef{\@nameauth@CleanName{#2!MN!}}%
      \global\csundef{\@nameauth@CleanName{#2!NF!}}%
    \else%
      \global\csundef{\@nameauth@CleanName{#2#3!MN!}}%
      \global\csundef{\@nameauth@CleanName{#2#3!NF!}}%
    \fi%
  \else%
      \global\csundef{\@nameauth@CleanName{#1#2!MN!}}%
      \global\csundef{\@nameauth@CleanName{#1#2!NF!}}%
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SubvertName}
% \changes{v0.9}{2012/02/10}{Added macro}
% This defines a control sequence to suppress the ``first use'' of \cmd{\Name}.
%    \begin{macrocode}
\newcommandx\SubvertName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
      \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
    \else%
      \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
      \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
    \fi%
  \else%
      \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
      \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
  \fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{nameauth}
% \changes{v1.6}{2013/03/10}{Added |nameauth| environment}
% The |nameauth| environment provides a means to implement shorthand references to names in a document.
%    \begin{macrocode}
\newenvironment{nameauth}{%
  \begingroup%
  \csdef{<}##1&##2&##3&##4>{%
    \protected@edef\arga{\trim@spaces{##1}}%
    \protected@edef\argb{\trim@spaces{##2}}%
    \protected@edef\argc{\trim@spaces{##3}}%
    \protected@edef\argd{\trim@spaces{##4}}%
    \ifx\arga\@empty
        \PackageError{nameauth}%
        {environment nameauth: Control sequence missing.}%
    \else
      \ifx\argc\@empty
        \PackageError{nameauth}%
        {environment nameauth: Essential name missing.}%
      \else
        \ifx\argd\@empty
          \ifx\argb\@empty
            \csxdef{\arga}{\Name{\argc}}%
            \csxdef{L\arga}{\Name*{\argc}}%
            \csxdef{S\arga}{\FName{\argc}}%
          \else
            \csxdef{\arga}{\Name[\argb]{\argc}}%
            \csxdef{L\arga}{\Name*[\argb]{\argc}}%
            \csxdef{S\arga}{\FName[\argb]{\argc}}%
          \fi
        \else
          \ifx\argb\@empty
            \csxdef{\arga}{\Name{\argc}[\argd]}%
            \csxdef{L\arga}{\Name*{\argc}[\argd]}%
            \csxdef{S\arga}{\FName{\argc}[\argd]}%
          \else
            \csxdef{\arga}{\Name[\argb]{\argc}[\argd]}%
            \csxdef{L\arga}{\Name*[\argb]{\argc}[\argd]}%
            \csxdef{S\arga}{\FName[\argb]{\argc}[\argd]}%
          \fi
        \fi
      \fi
    \fi
    \ignorespaces%
  }%
}{\endgroup}
%    \end{macrocode}
% \end{environment}
%
% \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 macro}
%    \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 macro}
%    \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 macro}
%    \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 macro}
%    \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 macro}
%    \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 macro}
%    \begin{macrocode}
\newcommand{\ReverseCommaActive}%
  {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexInactive}
% \changes{v0.94}{2012/02/15}{Added macro}
% 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 macro}
% turn on global indexing of names.
%    \begin{macrocode}
\newcommand{\IndexActive}{\@nameauth@DoIndextrue}
%    \end{macrocode}
% \end{macro}
% \clearpage
% \Finale
\endinput
% \iffalse
%</package>
% \fi