summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
blob: 178b4e0c17afac9c849ad077259374db74e491a7 (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
% \iffalse meta-comment
%
% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at att 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>
    [2013/02/22 v1.5 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}[2013/02/22]
\usepackage{hypdoc}
\usepackage{tikz}
\makeindex
\frenchspacing
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{nameauth.dtx}
  \PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{1572}
%
% \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}{New features added and described}
% \changes{v0.8}{2012/01/29}{Improved function and compatibility; added quick start guide}
% \changes{v0.85}{2012/02/05}{Added comma suppression, new class options, and more functionality}
% \changes{v0.86}{2012/02/06}{Fixed some regressions}
% \changes{v0.9}{2012/02/10}{Added first name formatting; comma and suffix handling expandable}
% \changes{v0.94}{2012/02/15}{Build with all major \LaTeX{} engines; Added 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}{Fixed errors when emitting warnings}
% \changes{v1.2}{2012/03/25}{Added tagging features; extensively edited documentation}
% \changes{v1.26}{2012/04/24}{First-letter caps fixed; fixed sorting of name suffixes in index}
% \changes{v1.4}{2012/07/24}{Fixed issues moving argument problems, added several features}
% \changes{v1.5}{2013/02/22}{Minor bugfixes; added several features}
%
% \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}
%
% \TagName{Louis}[the Pious]{, emperor}%
% \TagName{Ptolemy I}[Soter]{, king}%
% \TagName{Henry}[VIII]{, English king}%
% \TagName{Charles}[the Bald]{, emperor}%
% \TagName{Francis, I}{, French king}%
% \TagName{Demetrius, I Soter}{, king}%
% \TagName{Charles, V}{, emperor}%
% \TagName{Louis, XIV}{, French king}%
% \TagName{Leo, I}{, pope}
% \TagName{Gregory, I}{, pope}
%
% \GetFileInfo{nameauth.dtx}
% \title{The \textsf{nameauth} package}
% \author{Charles P. Schaum \\ \texttt{charles dot schaum at att dot net}}
% \date{\fileversion~from \filedate}
% \maketitle
%
% \begin{abstract}
% \noindent The \textsf{nameauth} package automates the formatting and indexing of names, facilitating the implementation of a \textbf{name authority}. This allows one to move blocks of text without retyping names, making it easier to go from drafts to a final manuscript. This package mainly supports Western names, with basic features for ancient, royal, and Eastern names.
% \end{abstract}
%
% \tableofcontents
%
% \section{Introduction}
%
% Book-length studies can engage more than 500 different names. Editors and proofreaders cost money when checking those names. This package provides basic tools for consistently and automatically formatting names for the body text and the index. The goal is to reduce error, streamline work, and become a more cost-effective author. Features include:
% \begin{multicols}{2}
% \begin{itemize}\setlength\itemsep{0pt}\small
% \item Format, print, and index names all at once.
% \item Automatically print a full name the first time it appears, with full or shorter forms thereafter.
% \item Automatically apply typesetting to names, recalling German \emph{Sperr\-druck}.
% \item Rearrange text without retyping the names therein.
% \item Allow predictable name variants in the text, yet index consistent name forms, thus abstracting the concept of a name.
% \item Provide for some cross-cultural features in name ordering, capitalization, and indexing.
% \item ``Tag'' and ``untag'' names in the index in order to index different people with the same name.
% \item Macros can be used in the body text, in a \cmd{\marginpar}, in tabular material, and in list environments like \texttt{enumerate}, among others.
% \end{itemize}
% \end{multicols}
%
% \subsection{Design Notes and Thanks}
%
% This package depends on \textsf{etoolbox}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. As of version 1.4 it has been refactored extensively with robustness and modularity in mind. It has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}. It will work with \textsf{makeindex} and \textsf{texindy}. This document 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}.
%
% 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. The light of their knowledge banished the umbra of my ignorance.
%
% \subsection{Disclaimer}
% This documentation uses names of living and historical figures because users refer to real people in their projects. At no time herein 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.
% \subsection{Caveat}
% Throughout this manual I perform a ``torture test'' of sorts on several macros in this package, disregarding the advice I offer the reader. General authors may never encounter some of these cases, as in Sections~\ref{sec:formatting} and~\ref{sec:Tweaks}.
% \clearpage
%
% \section{Usage}
%
% \subsection{Package Options}
% \label{sec:options}
% Package options fall into several categories. Default options are in boldface:\\
%
% \begin{tabular}{p{0.2\textwidth}p{0.6\textwidth}}
% & {\large\bfseries Show/Hide Suffix Commas}\\[1ex]
% \bfseries\texttt{nocomma} & \bfseries Suppress commas between surnames and suffixes, following modern styles like \emph{Chicago Manual of Style}. Commas can be forced on a per-use basis with \cmd{\ShowComma}. See Section~\ref{sec:suffix}.\\[1ex]
% \texttt{comma} & Retain commas between all surnames and suffixes. This imposes limits on certain macros.\\[2ex]
% \end{tabular}
%
% \noindent These options are the ``most global'' because they affect names in both the text and the index. The |comma| option, meant for use with older texts, restricts name forms and available macros. The \cmd{\ShowComma} macro allows the general benefits of |nocomma| while allowing the more limited |comma| behavior on a per-use basis at the cost of greater complexity.
%
%The above options are meant to be invoked at load time and left alone thereafter. Below we start those options that represent states of behavior capable of being toggled on and off.\\
%
% \begin{tabular}{p{0.2\textwidth}p{0.6\textwidth}}
% & {\large\bfseries Enable/Disable Formatting}\\[1ex]
% \bfseries\texttt{mainmatter} & \bfseries Enable formatting attributes (see below), starting at the beginning of a document.\\[1ex]
% \texttt{frontmatter} & Disable formatting \emph{before} the invocation of \cmd{\NamesActive} while retaining automatic full and short forms. This option fits well, e.g., with a foreword from a contributor. See Section~\ref{sec:SectionFormat}.\\[1ex]
% & {\large\bfseries Enable/Disable Indexing}\\[1ex]
% \bfseries\texttt{index} & \bfseries Create index entries in place with names.\\[1ex]
% \texttt{noindex} & Prevent indexing before the invocation of the macro \cmd{\IndexActive}. See Section~\ref{sec:SectionIndex}.\\[2ex]
% \end{tabular}
%
% \noindent The options above broadly affect whether formatting and indexing are ``on'' or ``off.'' They set the initial states of formatting and indexing, which can be toggled on and off respectively with \cmd{\NamesActive} and \cmd{\IndexActive} on the one hand and \cmd{\NamesInactive} and \cmd{\IndexInactive} on the other.
%
% This package makes a distinction between \textit{formatting}, i.e., font weight, style, family, placement, and so on, and \textit{form}, i.e., capitalization and name order. The options on the next page alter the printing and capitalization of names apart from their formatting, but they do not change index entries:
%
% \begin{tabular}{p{0.2\textwidth}p{0.6\textwidth}}
% & {\large\bfseries Capitalize Entire Surnames}\\[1ex]
% \bfseries\texttt{normalcaps} & \bfseries Do not perform any special capitalization.\\[1ex]
% \texttt{allcaps} & Capitalize entire surnames in the manner of some romanized Japanese contexts. Note that this only affects the printed form; no capitalization occurs in the index. In that case, the user should type in the caps manually.\\[1ex]
% & {\large\bfseries Reverse Name Order}\\[1ex]
% \bfseries\texttt{notreversed} & \bfseries Print names in the order specified by \cmd{\Name} and the other macros.\\[1ex]
% \texttt{allreversed} & Print name forms in ``smart'' reverse order. See Sections~\ref{sec:suffix} and~\ref{sec:Eastern}.\\[1ex]
% \texttt{allrevcomma} & Not the same as the |comma| option or the \cmd{\ShowComma} macro. This causes all names to print in reverse Western order, with a comma between the surname and the other names.\\[2ex]
% \end{tabular}
%
% \noindent Macros that toggle the states represented by these options include \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} for capitalizing entire surnames, \cmd{\ReverseActive} and \cmd{\ReverseInactive} for reversing name order, and \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} to aid making lists in last-comma-first order. An even finer grain of control exists with the macros \cmd{\CapName}, \cmd{\RevName}, and \cmd{\RevComma}, which activate these features on a per-use basis.\\
%
% \begin{tabular}{p{0.2\textwidth}p{0.6\textwidth}}
% & {\large\bfseries Formatting Attributes}\\[1ex]
% \texttt{alwaysformat} & With the \texttt{mainmatter} option or after \cmd{\NamesActive}, this option causes the formatting options below to affect every occurrence of \cmd{\Name}, not just the first use of a name. This recalls some contexts where German \emph{Sperrdruck} is used. See also the material on custom formatting (Section~\ref{sec:formatting}).\\[1ex]
% \bfseries\texttt{smallcaps} & \bfseries Set the first use of a name in small caps.\\[1ex]
% \texttt{italic} & Italicize the first occurrence of a name.\\[1ex]
% \texttt{boldface} & Set the first use of a name in boldface.\\[1ex]
% \texttt{noformat} & This is a ``do nothing'' format that merely suppresses the ``look'' of formatting without disabling the mechanism itself.\\
% \end{tabular}
% \clearpage
%
% \subsection{Quick Start Guide}
% \label{sec:start}
%
% This general section gets one using many of the package features right away. Read the columns below in a left to right, top to bottom order. The basic patterns for \cmd{\Name}\oarg{arg1}\marg{arg2}\oarg{arg3} are:\\
%
%\begin{tikzpicture}[line/.style={draw,thick}]
%  \node [matrix,column sep=4cm] (tipsi) at (3,3)
%  {
%    \node[text width=2cm,align=left](opt){\footnotesize Add to force full name.}; &
%    \node[text width=4cm,align=left](grp){\footnotesize Add before immediately subsequent |[|text in braces|]| if \meta{arg3} not used; else omit.}; \\
%  };
%  \node [matrix] (macro) at (2,1)
%  {
%    \node(cmd){\bfseries\texttt{\textbackslash Name}}; &
%    \node(star){\bfseries\texttt{*}}; &
%    \node(arg1){\bfseries\texttt{[}\textit{arg1}\texttt{]}}; &
%    \node(arg2){\bfseries\texttt{\{}\textit{arg2}\texttt{\}}}; &
%    \node(arg3){\bfseries\texttt{[}\textit{arg3}\texttt{]}}; &
%    \node(braces){\bfseries\texttt{\{\}}}; \\
%  };
%  \node [matrix,column sep=1em] (tipsii) at (3,-2.5)
%  {
%    \node[align=left](a1)
%    {
%      \textit{forename(s)}\\
%      \textit{forename(s)}\\
%      \textit{forename(s)}\\
%      \textit{forename(s)}\\
%      \meta{empty}\\
%      \meta{empty}\\
%      \meta{empty}\\
%      \textit{Eastern FNN}\\
%      \meta{empty}\\
%      \meta{empty}\\
%    }; & & &
%    \node[align=left](a2)
%    {
%      \textit{surname(s)}\\
%      \textit{surname(s)}\texttt{, }\textit{Suffix}$^1$\\
%      \textit{surname(s)}\\
%      \textit{surname(s)}\texttt{, }\textit{Suffix}$^1$\\
%      \textit{mononym}\\
%      \textit{mononym}\texttt{, }\textit{Affix}$^1$\\
%      \textit{mononym}\\
%      \textit{Eastern SNN}$^4$\\
%      \textit{Eastern SNN}\texttt{, }\textit{FNN}$^{1,5}$\\
%      \textit{Eastern SNN}\\
%    }; & &
%    \node[align=left](a3)
%    {
%      \meta{empty}\\
%      \meta{empty}\\
%      \textit{Nickname(s)}$^2$\\
%      \textit{Nickname(s)}$^2$\\
%      \meta{empty}\\
%      \meta{empty}\\
%      \textit{Affix}$^3$\\
%      \meta{empty}\\
%      \meta{empty}\\
%      \textit{Eastern FNN}$^{3,5}$\\
%    }; \\
%  };
%  \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}
%
% \indent\textsuperscript{1}The pattern \cmd{\Name}\oarg{forenames}\marg{surnames, suffix} and all patterns thereafter with the mandatory argument \meta{Name$_1$, Name$_2$} cannot be used with the |comma| option or in an instance where \cmd{\ShowComma} is used.\\[1ex]
% \indent\textsuperscript{2}The presence of a nickname is determined when both forename and nickname are present. In that case, the latter is swapped with the former.\\[1ex]
% \indent\textsuperscript{3}When \meta{arg1} is empty, \meta{arg3} is an affix. That form cannot be used with \cmd{\PName} and \cmd{\AKA}, but it does work with |comma| and \cmd{\ShowComma}.\\[1ex]
% \indent\textsuperscript{4}When expressing Eastern names via \cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN}, they will appear in the index as the Western form \meta{SNN, FNN} even if \cmd{\RevName} is used to create an Eastern word order in the text.\\[1ex]
% \indent\textsuperscript{5}When expressing Eastern names using the form \cmd{\Name}\marg{Eastern SNN, FNN} or \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN}, such names will appear in the index using the Eastern form \meta{SNN FNN} even if \cmd{\RevName} is used to create a Western word order in the text.\\[1.5ex]
% If given the choice, use the |nocomma| option and the \meta{Name$_1$, Name$_2$} forms for suffixes and affixes in order to take advantage of extra space removal and other features that minimize possible errors.
%
% \subsubsection{Additional Hints}
% \IndexInactive\NamesInactive
% \begin{tabular}{lp{4in}}
% Q:&Too many macros! I quit.\\[0.5ex]
% A:&The macro you will use the most is \cmd{\Name}. Just use it until you discover that you need one of the other macros.\\[1ex]
% Q:&I see ``Paragraph ended\dots'' or ``Missing \meta{grouping token} inserted'' and execution stops.\\[0.5ex]
% A:&Check that the |{|braces|}| and |[|brackets|]| are balanced.\\[1ex]
% Q:&There is too much space between the initials in the names.\\[0.5ex]
% A:&Bringhurst's \emph{Elements of Typographic Style} calls for no spaces or thin spaces between initials. Use \cmd{\frenchspacing}.\\[1ex]
% Q:&|\Name[Davey]{Jones}[a Monkee]| shows ``\Name[Davey]{Jones}[a Monkee]'' or just ``\Name[Davey]{Jones}[a Monkee].'' \cmd{\FName} gives ``\FName[Davey]{Jones}[a Monkee].''\\[0.5ex]
% A:&\cmd{\Name}\oarg{Forenames}\marg{Surnames}\oarg{Nicknames} creates a nickname, not an affix or sobriquet.\\[1ex]
% Q:&|\Name[Henry]{VII}| prints either ``\Name*[Henry]{VII}'' or ``\Name[Henry]{VII}.'' Adding [Tudor] creates ``\Name*[Henry]{VII}[Tudor]'' and ``\Name[Henry]{VII}[Tudor].''\\[0.5ex]
% A:&\cmd{\Name}\oarg{King}\marg{Affix} will not work. Even though Mulvany, \emph{Indexing Books}, talks about forenames and optional surnames for royals, we prevent ambiguity by encoding royal names as surnames with optional affixes. Use \cmd{\Name}\marg{King, Affix} if possible, or \cmd{\Name}\marg{King}\oarg{Affix} with the |comma| option. |\Name{Henry, VII}| gives ``\Name{Henry, VII}'' and ``\Name{Henry, VII}.'' Manually add ``Tudor'' in the text and use |\TagName{Henry, VII}{, Tudor}| to add the tag automatically to the index entry.\\[1ex]
% Q:&|\Name{Aethelred, the really}[Unraedig]| shows ``\Name{Aethelred, the really}[Unraedig]'' or ``\Name{Aethelred, the really}[Unraedig].''\\[0.5ex]
% A:&The form \cmd{\Name}\marg{Mononym, Affix$_1$}\oarg{Affix$_2$} creates two sobriquets, but badly. Use either \cmd{\Name}\marg{Mononym, Affix} or \cmd{\Name}\marg{Mononym}\oarg{Affix} with |comma|. Mix the forms either at your peril or at your whimsy.\\[1ex]
% Q:&|\AKA{Boris}[the Animal]{Just Boris}| fails.\\[0.5ex]
% A:&\cmd{\AKA} fails with the \marg{Mononym}\oarg{Affix} pattern in order to avoid the collision of optional arguments. See Section~\ref{sec:AKA}.\\[1ex]
% Q:&So how do I deal with some stage names and the like?\\[0.5ex]
% A:&Use a forename or first initials to prevent failure:\\[0.5ex]
% &OK: |\Name[J.]{Kreskin}[The Amazing]  |\Name[J.]{Kreskin}[The Amazing]\\&\quad|(\AKA[J.]{Kreskin}[Joseph]{Kresge})| (\AKA[J.]{Kreskin}[Joseph]{Kresge})\\[0.5ex]
% &FAIL: |\Name{Kreskin}[The Amazing]|\\&\qquad|\AKA{Kreskin}[Joseph]{Kresge}|\\[1ex]
% \end{tabular}
%
% \begin{tabular}{lp{4in}}
% Q:&How do I refer to ``\SubvertName[Mike]{Tyson}\FName[Mike]{Tyson}[Iron Mike]'' \Name[Mike]{Tyson}?\\[0.5ex]
% A:&Very carefully. One way uses |``\SubvertName[Mike]{Tyson}| |\FName[Mike]{Tyson}[Iron Mike]''| |\Name[Mike]{Tyson}| to produce the text above. Other manual methods are discussed on page \pageref{manualxref}. 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.\\[1ex]
% Q:&\cmd{\Name} has a full name in the source, but it is shorter in the text!\\[0.5ex]
% A:&And you did not mean that to happen. Use \cmd{\Name*} in that case. It can be easy to forget that \cmd{\Name} auto-formats its arguments even if you type them out.\\[1ex]
% \end{tabular}
% \IndexActive\NamesActive
%
% \subsubsection{Error Handling}
% \label{sec:error}
%
% Version 1.5 introduces space removal in \meta{Name$_1$, Name$_2$} pairs that mitigates problems in both the text and in the index. Older versions of \texttt{nameauth} were susceptible to fragility and moving arguments. Version 1.4 and later of \textsf{nameauth} address many of these issues.
%
% Except for the indexing parts of macros, most of the macros in this package print any erroneous arguments in the text, but not in the index. To find errors, one can look at index entries for irregularities or examine package warnings. Unless there is a syntax error, all macros that produce output also emit meaningful warnings. Convenience macros like \cmd{\PName} produce warnings via their component macros, e.g., \cmd{\Name} and \cmd{\AKA}.
%
% Not all warnings are created equal. For example, the multiple creation of a cross-reference with \cmd{\AKA} will generate a warning, but it will have no ill effects and may be intentional. Other warnings, especially in the case of indexing macros, indicate that the macro produced no output.\\
%
% \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.
% \end{enumerate}
% \clearpage
%
% \subsection{Naming Macros}
%
% \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{forename(s)}\marg{surname(s)}\oarg{alternate names}\\
% \cmd{\Name*}\oarg{forename(s)}\marg{surname(s)}\oarg{alternate names}
% \end{quote}
%
% \noindent From now on we will abbreviate \meta{forename(s)} with \meta{FNN} and \meta{surname(s)} with \meta{SNN} at various points. The following table helps to show how the syntax description works with first and subsequent references:
%
% \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}
%
% \noindent \cmd{\Name} connects the \meta{FNN} to the \meta{SNN} to create respective printed and indexed forms, as illustrated in Section~\ref{sec:PatRef} and thereafter. The invocation of \cmd{\Name} always prints the \meta{SNN} field. \cmd{\Name} prints the ``full name'' at the first occurrence, then only the partial form thereafter. \cmd{\Name*} always prints the full name.
%
% Nicknames and sobriquets of some historical figures are implemented in slightly different ways. A nickname assumes the presence of \meta{FNN} and \meta{SNN} (see the example for \Name[M.T.]{Cicero}[Marcus Tullius] above). The \meta{alternate names} field allows a nickname to replace the \meta{FNN} field in the text while keeping the \meta{FNN} field in the index. Nicknames are truly optional. As long as the \meta{FNN} and \meta{SNN} fields are consistent, the index entries will be consistent. The shorter name printed by \cmd{\Name} will not print forenames or nicknames. See also Section~\ref{sec:start} and \cmd{\FName} below.
%
% In the example of \Name*{Charles}[the Bald] above, ``the Bald'' is not a nickname because no \meta{FNN} are present. In that case the \meta{alternate names} field is appended to the \meta{SNN} in both the printed form \emph{and} in the index form. This behavior implies that, while ``the Bald'' uses an optional parameter, it is not truly optional once used.
%
% Later we shall see that a similar effect, perhaps more preferable, can be achieved with the default \texttt{nocomma} option and |\Name{Charles, the Bald}|, as seen in Section~\ref{sec:suffix}. One must always be consistent in using these forms. Otherwise one may get bogus index entries and errors in the text that are difficult to track.
% \clearpage
%
% \subsubsection{Forenames: \texttt{\textbackslash 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 following table shows the output at a glance:\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}
%
% \noindent See how the first reference is a full name? That prevents an accidental reference to a first name before a person has been introduced. Nicknames are used by including them in the \meta{alternate names} field in addition to \meta{FNN}. For example, aviation hero \Name[Chesley B.]{Sullenberger, III} can be noted as:
%
% \begin{quote}|``\FName[Chesley B.]{Sullenberger, III}[Sully]''|\quad``\FName[Chesley B.]{Sullenberger, III}[Sully]''\end{quote}
%
%\noindent A good way to cut keystrokes would be to assign the above macro to the control sequence \cmd{\Sully}.
%
% \subsubsection{Full Stop Detection}
%
% Suffixes and initials could result in the period of an abbreviation like ``Jr.,'' ``Sr.,'' and ``d.\,\"{A}.'' (\textit{der \"{A}ltere}) 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.} (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}
% See Section~\ref{sec:suffix} for more on comma-delimited suffixes. Full-stop detection also works with \cmd{\FName} in cases like the fictional \FName[J.D.]{Rock, III} where one might discuss |``who shot \FName[J.D.]{Rock, III}.''| ``who shot \FName[J.D.]{Rock, III}.''
%
% \subsection{Affixes and Eastern Names}
%
% \subsubsection{Comma-Delimited Suffixes}
% \label{sec:suffix}
%
% Before we consider the topic of non-Western names, we must first engage the concept of suffixes and affixes as expressed in the \meta{Name$_1$, Name$_2$} pattern used in the mandatory argument of \cmd{\Name}.
%
% \DescribeMacro{\ShowComma}
% The |comma| option is restrictive, but helpful in reproducing older texts. \cmd{\ShowComma} permits the default |nocomma| option, yet forces a comma to appear between the name and suffix: |\ShowComma\Name[Louis]{Gossett, Jr.}| \ShowComma\Name[Louis]{Gossett, Jr.}. A caveat is that one must use \cmd{\ShowComma} consistently with that name thereafter or risk errors.

%The |comma| option and \cmd{\ShowComma} restrict the use of some royal names and Eastern names. \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms, but \cmd{\AKA} can cross-reference \emph{from} these forms in its second set of arguments. These restricted forms are shown below:
%
% \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}
%
% \noindent We remember that these forms work because no \meta{FNN} are present, only the \cmd{\Name}\marg{mononym}\oarg{affix} type pattern. Of course, the mononym field can have more than one word in it, as can the affix.
%
% Using the default package option \texttt{nocomma} with comma-delimited suffixes offers a more robust method that can handle several different name types quite flexibly. We begin with the idea of a name and a suffix. One cannot write |\Name[Oskar]{Hammerstein}[II]| without getting the likes of ``II Hammerstein.'' On the other hand, |\Name[Oskar]{Hammerstein, II}| produces \Name[Oskar]{Hammerstein, II} the first time and \Name[Oskar]{Hammerstein, II} thereafter. One must always include a comma as a suffix delimiter; trailing commas are ignored. Automatic space removal and formatting helps reduce potential error.
%
% We can move beyond suffixes to work with more complex examples, including royal names and basic Eastern name forms:
%
% \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}
%
% \noindent The benefit to using this form is that 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. The first method shown above prevents such usage.
%
% Suffix and sobriquet features generally produce the same \emph{output}, yet internally they are \emph{different}. For example, they do not respect each other's first use. One can force them to cooperate, as in Section~\ref{sec:formatting}, but it is not trivial. Users should avoid mixing the two suffix methods shown here.
%
% \subsubsection{Eastern Names}
% \label{sec:Eastern}
%
% This section will work with both \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN} and \cmd{\Name}\marg{Eastern SNN, Eastern FNN}. We have already shown the advantages of preferring the latter form. In particular, this section addresses some features seen in romanized Japanese contexts. Nevertheless, its use may be broader.
%
% One sees in many non-Western contexts that the family name comes first, followed by personal names. The \textsf{nameauth} package offers two routes to that result. Those routes depend on how \cmd{\Name} assembles index entries. \cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN} will produce an index entry of the form \meta{Eastern SNN}, \meta{Eastern FNN}. There exists a comma between the names and the default output order is Western. We will see how to change that below.
%
% In contrast, both \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN} and \cmd{\Name}\marg{Eastern SNN, Eastern FNN} produce an index entry of the form \meta{Eastern SNN} \meta{Eastern FNN}. No comma is present in the latter form. Furthermore, in the latter two cases, the default  output order is Eastern.
%
% \DescribeMacro{\ReverseActive}
% \DescribeMacro{\ReverseInactive}
% \DescribeMacro{\RevName}
% The way we get these two methods to meet is the reverse output mechanism. One can use the class options described in Section~\ref{sec:options}. One may activate and deactivate reversal with \cmd{\ReverseActive} and \cmd{\ReverseInactive}. One also may activate reversal for one time with \cmd{\RevName}. Using these methods, Western word order can be made to look Eastern and vice-versa. Therefore, the key is to decide the index entry format and choose the name encoding.
%
% The reversing mechanism intelligently swaps name patterns. To illustrate this, we turn off indexing and name formatting and always use full names. A list of Japanese music artists allows us to use \cmd{\RevName}\cmd{\Name}\dots\ and some creativity:
%
% \NamesInactive\IndexInactive
% \begin{quote}
% \begin{tabular}{lll}\hline
% {\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\IndexActive\medskip
%
% \DescribeMacro{\AllCapsActive}
% \DescribeMacro{\AllCapsInctive}
% \DescribeMacro{\CapName}
% \vskip-2.8ex\noindent Full capitalization of surnames occurs with \cmd{\AllCapsActive}, \cmd{\AllCapsInactive}, and \cmd{\CapName}. These macros are analogous to the reversing macros above and may be used alone or with those macros, e.g. \cmd{\CapName}\cmd{\RevName}\cmd{\Name}:
%
% \NamesInactive\IndexInactive
% \begin{quote}
% \begin{tabular}{lll}\hline
% {\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\IndexActive
%
% \noindent 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 cap everything manually or modify the macros.
%
% \subsection{Other Naming Topics}
%
% \subsubsection{Listing by Surname}
%
%\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-use 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*[Jeremy]{Bentham} & \RevComma\Name*[Jeremy]{Bentham} & OK\\
% {\large\strut}\Name*[J.S.]{Mill}[John Stuart] & \RevComma\Name*[J.S.]{Mill}[John Stuart] & OK\\
% {\large\strut}\Name*{John, Eriugena} & \RevComma\Name*{John, Eriugena} & FAIL\\
% {\large\strut}\Name*{Albertus}[Magnus] & \RevComma\Name*{Albertus}[Magnus] & FAIL\\
% {\large\strut}\Name*{Anaximander} & \RevComma\Name*{Anaximander} & OK\\
% \end{tabular}
% \end{quote}
% \NamesActive
% \noindent There is no way around this ``fail'' here because that is exactly what we want to happen in the case of Eastern names. It is not possible for this package to be all things to all names, but it tries to be as broad as possible.
%
% \subsubsection{Naming Standards}
%
% \DescribeMacro{\CapThis}
% 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'} are capitalized unless preceded by \emph{de}. In English, these particles go in the \meta{SNN} field of \cmd{\Name}, e.g., \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare}. To capitalize the first particle in a subsequent \cmd{\Name} reference at the beginning of a sentence, use |\CapThis\Name[Walter]{de la Mare}|. \CapThis\Name[Walter]{de la Mare} will think it fair. \CapThis\Name{du Cange} (\AKA{du Cange}[Charles]{du Fresne}) would too, because \cmd{\CapThis} works universally as of version 1.4.
%
% Names foreign to English often associate these particles with the \meta{FNN} field of \cmd{\Name}. Yet these particles are not really first names. Using \cmd{\FName} with alternate forenames avoids that issue. See also Section~\ref{sec:Particles}.

%
% \subsubsection{Hyphenation}
%
% I find it helpful to use respectively the \textsf{babel} or \textsf{polyglossia} packages with name hyphenation. If one is using English as the main language, the default hyphenation patterns may not suffice. For example, the name \Name[John]{Strietelmeier} may break thus: ``Stri-etelmeier.'' That is fixed by creating a \cmd{\de} macro equivalent to |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}| (using \textsf{babel}) and writing |\de{\Name[John]{Strietelmeier}}|.
%
% One can insert optional hyphens in the arguments of \cmd{\Name} and friends but that must be done \emph{consistently} to avoid variants being treated as different names.
%
% \subsubsection{Accented Names}
% \label{sec:accents}
% 
% If you use accented names, \textsf{xindy} (or \textsf{texindy}) are strongly recommended. The following Unicode characters are available using \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 control sequences in \cmd{\Name} (thanks \Name*[Robert]{Schlicht}). That means more accents with NFSS, such as the next example that uses \textsf{inputenc}/\textsf{fontenc}:
%  \begin{quote}\small
% |\usepackage{newunicodechar}|\\
% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
% |\newunicodechar{ſ}{\textlongs}|\\
% |\newunicodechar{ā}{\=a}|\\
% |\newunicodechar{ṃ}{\d m}|
% \end{quote}
% For some situations, such as ``traditional'' NFSS, you will need fonts with TS1 glyphs, e.g., |\usepackage{lmodern}|. See the informative tables on pages 455--63 in \emph{The Latex Companion}. This allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghazāli}\IndexActive.
%
% In some cases, indexing accented names only works with \textsf{xetex} and \textsf{luatex}, both of which use \textsf{fontspec}. Using \textsf{makeindex} may require The |-g| option and user-created settings in an |.ist| file may be needed. That goes beyond the scope of this document. One could use \cmd{\IndexActive} and \cmd{\IndexInactive} to suppress indexing and create manual entries but that would be tedious in non-English documents. Control sequences like |\=a| fail when using \textsf{makeindex} and \texttt{gind.ist} because the equal sign is interpreted as a ``literal'' character, as mentioned by \Name[Dan]{Luecking}. I used |\IndexInactive\Name{Ghazāli}\IndexActive| to prevent the index entry ``ali'' sorted under ``Ghaz''. Even the manual entry fails in that case.
% 
% It is important that this package work in the context of multiple languages. The use of multiple typesetting engines facilitates that. This snippet from the preamble to this file allows it to be typeset with multiple engines.\\
%
% \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\noindent 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. A second example puts the mention of first names in the margin if possible:
%
% \begin{quote}
% |\let\oldformat\NamesFormat|\\
% |\renewcommand{\NamesFormat}[1]{\textbf{#1}%|\\
% |\ifinner\else\marginpar{\scriptsize #1}\fi}|
% \end{quote}
% The result produces something like:
%
% \begin{quote}
% \let\oldformat\NamesFormat%
% \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\scriptsize #1}\fi}%
% \bgroup\small\ttfamily%
% |\Name{Vlad III}[Dracula]| was known as Vlad Ţepeş, ``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 Vlad Ţepeş, ``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}
%
% \noindent The forms above do not work with \cmd{\PName} and \cmd{\AKA}. Consistently use either the suffix mechanism (Section~\ref{sec:suffix}) or see Section~\ref{sec:pennames} regarding manual entries. If you use the suffix mechanism, you would use the following forms:
%
%\begin{quote}\ForgetName{Vlad III}[Dracula]\ForgetName{Vlad II}[Dracul]
% \let\oldformat\NamesFormat%
% \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\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}
%
% \noindent The redefinition of \cmd{\NamesFormat} given above follows scoping rules. Since I used it in a quote environment, it reverts to normal and now we have: \ForgetName{Vlad III}[Dracula]\Name{Vlad III}[Dracula]. Later references produce \Name{Vlad III}[Dracula]. The ``Dracula'' example was manipulated extensively with the tweaking macros \cmd{\ForgetName} and \cmd{\SubvertName}. Mixing the comma-delimited suffix and third-parameter affix forms might cause errors.
%
% \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}
% 
%\noindent Notice that we have two independent cases of ``first use'' above. That is intended for different sections of the document, like front matter and main matter. It clashes when on the same page or on one nearby.
%
% \subsubsection{Tweaks: \texttt{\textbackslash ForgetName} and \texttt{\textbackslash SubvertName}}
% \label{sec:Tweaks}
% 
% Perhaps the easiest way to avoid the 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 with respect to typesetting. The next use will print as if it were a ``first use.'' Index entries and cross-references (see the next section) are \emph{never} forgotten.
% 
% \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 will print as if it were a ``subsequent use.''
%
% \subsection{Name Variant Macros}
% \subsubsection{Introduction}
% \label{sec:pennames}
% 
% \cmd{\AKA} handles pseudonyms, stage names, \emph{noms de plume}, and so on. Before we examine \cmd{\AKA} in detail, we should cover the manual solution that \cmd{\AKA} helps to automate. If needed, the \texttt{.idx} file can be a helpful reference when linking manual entries with \textsf{nameauth} entries. This remains the only solution for certain cases, especially with the \texttt{comma} option:
%
% \begin{quote}
% \bgroup\ttfamily\small
% \verb+\index{Jean the Fearless|see{Jean sans Peur}}%+\\
% |\Name{Jean}[sans Peur]| (Jean the Fearless) reigned as Duke of\break Burgundy from 1404 to 1419.
% \egroup
%
% \TagName{Jean}[sans Peur]{, duke}%
% \index{Jean the Fearless|see{Jean sans Peur}}%
% \Name{Jean}[sans Peur] (Jean the Fearless) reigned as Duke of Burgundy from 1404 to 1419.
% \end{quote}
%
% \noindent The suffix workaround would use |\Name{Jean, sans Peur}| and the author need merely type |\AKA{Jean, sans Peur}{Jean the Fearless}|. See also Section~\ref{sec:suffix}. Using \textsf{makeindex} also requires 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 AKA}}
% \label{sec:AKA}
%
% \DescribeMacro{\AKA}
% \DescribeMacro{\AKA*}
% The primary macro that handles aliases is \cmd{\AKA}. Its syntax 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 The \meta{FNN} and \meta{SNN} arguments \emph{do not include} the final optional argument of \cmd{\Name} to avoid ambiguity. \cmd{\AKA} will not create a \emph{see} reference to a name that uses the \meta{alternate names} field. That must be done manually (see above). This macro is designed mainly with Western names in mind.
%
% \cmd{\AKA} only prints the alternate name, not the name to which it refers. It assumes that a \cmd{\Name} macro occurs somewhere to create the page-indexed target of a cross-reference. \textbf{No error checking} occurs for this. The macro also prevents double periods. Following is a quick review of what works and what fails for examples using \Name[Bob]{Hope}, \ForgetName{Louis, XIV}\Name{Louis, XIV}, and \Name{Gregory, I}:
%
% \begin{quote}\footnotesize
% \begin{tabular}{ll}\hline
% {\large\strut}|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
% {\large\strut}\dag|\AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\\\hline
% {\large\strut}\ddag|\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
% {\large\strut}|\AKA{Louis}[XIV]{Sun King}| & FAIL\\\hline
% {\large\strut}\S|\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\\\hline
% \end{tabular}
%
% \smallskip\dag{} This succeeds, but replaces ``Leslie Townes'' with ``Lester T.'' in the text, while keeping ``Hope, Leslie Townes'' as the \emph{see} reference in the index.\\
% \ddag{} This form uses the \texttt{nocomma} feature.\\
% \S{} This produces different output, depending on whether \cmd{\AKA} or \cmd{\AKA*} is used.
% \end{quote}
%
% \noindent \cmd{\AKA} prints an alternate name and creates a cross reference in the index. The target of this cross-reference is either \meta{SNN}, \meta{FNN} or just \meta{SNN}. In the cross-reference, the \meta{alternate names} replace the \meta{alternate FNN} if both exist. Otherwise the \meta{alternate names} follow the \meta{alternate SNN}:
%
% \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}
%
% \noindent If the starred form \cmd{\AKA*} is used with the template \meta{none}\meta{alternate SNN}\meta{alt. names}, it only prints the \meta{alt. names}. With the same template, \cmd{\AKA} prints \meta{alternate SNN} followed by \meta{alt. names}. Section~\ref{sec:TagName} further illustrates the usefulness of \cmd{\AKA}, \cmd{\AKA*}, and index tagging.
% 
% The cross-references generated by \cmd{\AKA} and \cmd{\AKA*} are meant to be \emph{see} references and thus the other macros in this package will not create page references for these cross-references. See also Section~\ref{sec:error}. In certain cases, the alternate name might need to be indexed with page numbers. Do not use \cmd{\AKA} in those cases. Use \cmd{\Name} for both the main and the alternate names. Then, only after both instances of \cmd{\Name} have been invoked, create manual cross-references with \cmd{\index}, e.g.:\\
%
% \label{manualxref}%
% \bgroup\footnotesize\label{Rambam}
% \begin{tabular}{p{0.7in}ll}\hline
% {\large\strut}Authoritative Name & Alternate Name\newline & Example of Use\newline\\\hline
% {\large\strut}\Name{Maimonides} & \AKA{Maimonides}{Moses ben-Maimon} & |\Name{Maimonides}|\\
% &&|\AKA{Maimonides}{Moses ben-Maimon}|\\
% {\large\strut}\Name{Maimonides} & \Name{Rambam} & |\Name{Rambam}%|\\& & \verb!\index{Rambam|seealso{Maimonides}}!\\\hline
% \end{tabular}
% \index{Rambam|seealso{Maimonides}}\egroup
%
% \bigskip\noindent\cmd{\AKA} will not create multiple instances of a cross-reference. This allows the macro \cmd{\ExcludeName} to work, but it also prevents the special case where one moniker applies to multiple people, e.g.: \PName*[Willebrord]{Snel van Royen}{Snellius} and his son \PName*[Rudolph]{Snel van Royen}{Snellius}. \cmd{\AKA} produces the first cross-reference; the user manually creates the second:
% \index{Snellius|see{Snel van Royen, Rudolph}}%
% \begin{quote}
% \verb!\index{Snellius|see{Snel van Royen, Rudolph}}!
% \end{quote}
% 
% \subsubsection{\texttt{\textbackslash PName}}
%
% \DescribeMacro{\PName}
% \cmd{\PName} is a ``convenience macro'' that sacrifices flexibility for simplicity. It uses only the \meta{FNN}\meta{SNN} use of \cmd{\AKA}. It does not use \cmd{\AKA*}. It is meant for Western-style names. It calls formats a Western-style ``main'' name followed by a cross-reference in parentheses. The syntax is:
% \begin{quote}
% \cmd{\PName}\oarg{FNN}\marg{SNN}\oarg{other FNN}\marg{other SNN}\oarg{other alt.}
% \end{quote}
%
% \noindent The author determines the name that is indexed (the first name) and the subsequent name that only occurs as a \emph{see} reference. For example:
%
% \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}
%
% \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} does not index \meta{alternate names} unless \meta{FNN} are absent, whereupon it treats \meta{alternate names} as an affix. If indexing is switched off (see Section~\ref{sec:SectionIndex}), this macro does nothing. It will not create index entries for names that have been used as cross-references.
%
% \subsubsection{\texttt{\textbackslash TagName}}
% \label{sec:TagName}
%
% \DescribeMacro{\TagName}
% This macro creates a tag that will appear in all index entries corresponding to the name arguments from the point of invocation of \cmd{\TagName} onward. For consistency throughout the document, tag names at the beginning. The syntax is:
% \begin{quote}
% \cmd{\TagName}\oarg{FNN}\marg{SNN}\oarg{alternate names}\marg{tag}
% \end{quote}
% \cmd{\TagName} and \cmd{\UntagName} handle their name arguments like \cmd{\IndexName}. 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 \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]
%
% \noindent \cmd{\TagName} causes tags in the index entries to be inserted automatically from the point of invocation. \cmd{\AKA} prints the name and the sobriquet, while \cmd{\AKA*} only prints the sobriquet. The tag is literal text; it can be comma-delimited, in parentheses, or whetever an author might want.
%
% \subsubsection{\texttt{\textbackslash UntagName}}
%
% \DescribeMacro{\UntagName}
% This macro removes a tag created by \cmd{\TagName}. The syntax is:
% \begin{quote}
% \cmd{\UntagName}\oarg{FNN}\marg{SNN}\oarg{alternate names}
% \end{quote}
% \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}. By using these two commands, one can disambiguate different people with the same name. For example:\\
%
% \begin{tabular}{p{2in}p{2in}}
% |\ForgetName[John]{Smith}| |\TagName[John]{Smith}%| |{, the other one}| |\Name[John]{Smith}|\dots & This is the first reference to \ForgetName[John]{Smith}\TagName[John]{Smith}{, the other one}\Name[John]{Smith}, ``the other one'' in the index. Notice that it is tweaked.\newline\\[0.5ex]
% |\ForgetName[John]{Smith}| |\TagName[John]{Smith}%| |{, the third}| |\Name[John]{Smith}|\dots & This refers to \ForgetName[John]{Smith}\TagName[John]{Smith}{, the third}\Name[John]{Smith} ``the third'' in the index. It is tweaked again as a ``first occurrence.''\newline\\[0.5ex]
% |\SubvertName[John]{Smith}| |\UntagName[John]{Smith}| |\Name*[John]{Smith}| & This refers to the original \SubvertName[John]{Smith}\UntagName[John]{Smith}\Name*[John]{Smith}. It is tweaked in order to force a subsequent reference.\\[1ex]
% \end{tabular}\\
% \UntagName[John]{Smith}
% \noindent Tagging and untagging in this manner requires the author to juggle more info. With more freedom comes more responsibility. Also, if you use \cmd{\UntagName} within a scope, you may need to repeat it after leaving that scope.
%
% \subsubsection{\texttt{\textbackslash ExcludeName}}
% 
% \DescribeMacro{\ExcludeName}
% This prevents \cmd{\Name}, etc. from both formatting and indexing a specific name, but \emph{only if that name has not been used}. See also Section~\ref{sec:error}. The syntax is:
% \begin{quote}
% \cmd{\ExcludeName}\oarg{FNN}\marg{SNN}\oarg{alternate names}
% \end{quote}
% To suppress only indexing but retain formatting, enclose \cmd{\Name}, etc. between \cmd{\IndexInactive} and \cmd{\IndexActive}.
%
% \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, but one could create macros on a per-case basis to make it easier. For example, one might settle on the form \Name[W.E.B.]{Du Bois} in one's name authority. Yet an essay could use \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 In those cases where the only variation in the name is spacing (as above), you must call \cmd{\ForgetName} to generate a ``first use'' of the alternate spelling. The ``first use'' mechanism ignores spaces.
% \item In all cases of the variant spelling, wrap \cmd{\Name} and friends between \cmd{\IndexInactive} and \cmd{\IndexActive}. A macro can do this easily.
% \item Call \cmd{\IndexName} with the authoritative form right after \cmd{\IndexActive}. Again, this can be part of a macro.
% \end{enumerate}
% This looks cumbersome, but it ensures accuracy. It cannot be reduced to an all-purpose macro because that would generate an ambiguous argument list. It should only be used in those cases where minor variations in spelling do not cause the reader to question the identity of the person in question.
%
% \subsection{Naming Pattern Reference}
% \label{sec:PatRef}
% \subsubsection{Basic Naming}
% \label{sec:Basic}
% When referring to a name for the first time, the following have the same result. We put the starred form first because its output is always longest:\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% 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}|\\[0.5ex]
% First mononym reference:\newline\hbox to 1em{\hfil}\ForgetName{Plato}\Name{Plato} &
% |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\
% \end{tabular}\\[2ex]
% Subsequent references to names differ, based on the macro used:\\[1ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% Subsequent full name:\newline\hbox to 1em{\hfil}\Name*[John]{Smith} & |\Name*[John]{Smith}|\newline\\[0.5ex]
% Subsequent surname: \Name[John]{Smith} & |\Name[John]{Smith}|\\[0.5ex]
% Subsequent forename: \FName[John]{Smith} & |\FName[John]{Smith}|\\[0.5ex]
% Subsequent mononym: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\
% \end{tabular}\\[2ex]
% \clearpage
% \noindent Nicknames and alternate forenames use both the first and third arguments of \cmd{\Name}. The index forms are constant even when the print forms change:\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% Long first ref: \ForgetName[J.Q.]{Public}\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.]|\\[0.5ex]
% Different forenames, same surname: \Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\newline\\[0.5ex]
% Subsequent name: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\[0.5ex]
% Alternate forename: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\[0.5ex]
% \end{tabular}\\[2ex]
% These next examples are the ``limited'' variants that work with the \texttt{comma} option. \cmd{\AKA} and \cmd{\PName} cannot cross-reference to these forms. Sections~\ref{sec:suffix} and~\ref{sec:pennames} address this issue with different solutions.\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% First Eastern reference:\newline \ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\newline |\Name{Mao}[Tse-tung]|\\[0.5ex]
% Subsequent refs: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\[0.5ex]
% Subsequent refs: \Name{Mao}[Tse-tung] & |\Name{Mao}[Tse-tung]|\newline |\FName{Mao}[Tse-tung]|\\[0.5ex]
% First royal: \ForgetName{Louis}[the Pious]\Name{Louis}[the Pious] & |\Name*{Louis}[the Pious]|\newline |\Name{Louis}[the Pious]|\newline |\FName{Louis}[the Pious]|\\[0.5ex]
% Subsequent refs: \Name*{Louis}[the Pious] & |\Name*{Louis}[the Pious]|\\[0.5ex]
% Subsequent refs: \Name{Louis}[the Pious] & |\Name{Louis}[the Pious]|\newline |\FName{Louis}[the Pious]|\\[0.5ex]
% First ancient ref:\newline \ForgetName{Ptolemy I}[Soter]\Name{Ptolemy I}[Soter] & |\Name*{Ptolemy I}[Soter]|\newline |\Name{Ptolemy I}[Soter]|\newline |\FName{Ptolemy I}[Soter]|\\[0.5ex]
% Subsequent refs: \Name*{Ptolemy I}[Soter] & |\Name*{Ptolemy I}[Soter]|\\[0.5ex]
% Subsequent refs: \Name{Ptolemy I}[Soter] & |\Name{Ptolemy I}[Soter]|\newline |\FName{Ptolemy I}[Soter]|\\[0.5ex]
% First royal: \ForgetName{Henry}[VIII]\Name{Henry}[VIII] & |\Name*{Henry}[VIII]|\newline |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[0.5ex]
% Subsequent refs: \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\[0.5ex]
% Subsequent refs: \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\
% \end{tabular}
% \clearpage
%
% \subsubsection{Affixes}
% \label{sec:Intermediate}
% Always use a comma to delimit name/affix pairs. \cmd{\AKA} and \cmd{\PName} will cross-reference these forms. See also Section~\ref{sec:suffix}.\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% First: \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.}|\\[0.5ex]
% Subsequent full:\newline\hbox to 1em{\hfil}\Name*[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\newline\\[0.5ex]
% Subsequent surname: \Name[George S.]{Patton, Jr.} & |\Name[George S.]{Patton, Jr.}|\\[0.5ex]
% Subsequent forename: \FName[George S.]{Patton, Jr.}[George] & |\FName[George S.]{Patton, Jr.}[George]|\\
% \end{tabular}\\[2ex]
% The next cases depend on the default \texttt{nocomma} option, whereby one can use comma suppression to implement forms of ancient, royal and Eastern names. \cmd{\AKA} and \cmd{\PName} will cross-reference these forms. Cf. the reference to \Name{Ptolemy I}[Soter] (Section~\ref{sec:Basic}). Using |\Name{Demetrius, I Soter}| keeps the number with the suffix. To keep the number with the name, use |\Name{Demetrius I, Soter}|.\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% First reference: \ForgetName{Francis, I}\Name{Francis, I} & |\Name*{Francis, I}|\newline |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[0.5ex]
% Subsequent full name: \Name*{Francis, I} & |\Name*{Francis, I}|\\[0.5ex]
% Subsequent name: \Name{Francis, I} & |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[0.5ex]
% 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}|\\[0.5ex]
% Next full name: \newline\hbox to 1em{\hfil}\Name*{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\newline\\[0.5ex]
% Subsequent name: \Name{Demetrius, I Soter} & |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\[0.5ex]
% First reference: \ForgetName{Sun, Yat-sen}\Name{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\[0.5ex]
% Subsequent full name: \newline\hbox to 1em{\hfil}\Name*{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline\\[0.5ex]
% Subsequent name: \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\
% \end{tabular}\\
% \clearpage
%
% \subsubsection{Particles}
% \label{sec:Particles}
% The following illustrate the American style of particulate names.\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% 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}|\\[0.5ex]
% Next reference: \Name[Walter]{de la Mare} & |\Name[Walter]{de la Mare}|\\[0.5ex]
% At start of sentence: \CapThis\Name[Walter]{de la Mare} & |\CapThis\Name[Walter]{de la Mare}|\\[0.5ex]
% Forename: \FName[Walter]{de la Mare} & |\FName[Walter]{de la Mare}|\\[0.5ex]
% \end{tabular}\\[2ex]
% The Continental style differs slightly. These first three forms below put the particles in the index. Long macros are split for readability.\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% 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}|\\[0.5ex]
% Subsequent: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\[0.5ex]
% Forenames: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang] & |\FName[Johann Wolfgang von]{Goethe}%|\newline|[Johann Wolfgang]|\\[0.5ex]
% \end{tabular}\\[2ex]
% These latter examples of the Continental style use the nickname feature to omit the particles from the index. Long macros are split for readability.\\[2ex]
% \begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
% First: \Name[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}[Adolf von]|\newline |\FName[Adolf]{Harnack}[Adolf von]|\\[0.5ex]
% Next full name:\newline\hbox to 1em{\hfil}\Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\[0.5ex]
% Subsequent surname: \Name[Adolf]{Harnack}[Adolf von] & |\Name[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}|\\[0.5ex]
% Subsequent forename: \FName[Adolf]{Harnack} & |\FName[Adolf]{Harnack}|\\[0.5ex]
% \end{tabular}
% \clearpage
%
% \StopEventually{\PrintChanges\clearpage\PrintIndex}
%
% \section{Implementation}
%
% \iffalse
%<*package>
% \fi
% \subsection{Package Options and Required Packages}
%
%    \begin{macrocode}
\newif\if@nameauth@FullName
\newif\if@nameauth@FirstName
\newif\if@nameauth@AltAKA
%    \end{macrocode}
% 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@DoFormat
\newif\if@nameauth@DoIndex
\newif\if@nameauth@AlwaysFormat
\newif\if@nameauth@ShowComma
%    \end{macrocode}
% These Boolean values control formatting. The first two can be toggled with \cmd{\NamesActive} and \cmd{\NamesInctive}, as well as \cmd{\IndexActive} and \cmd{\IndexInctive}. The first three are set with package options. The last is set with \cmd{\ShowComma} and cleared by \cmd{\Name} and friends.\\
%
%    \begin{macrocode}
\newif\if@nameauth@Comma
\newif\if@nameauth@Punct
%    \end{macrocode}
% These Boolean values are used internally for detection of suffixes and final periods.\\
%
%    \begin{macrocode}
\newif\if@nameauth@DoCaps
\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}
% This Boolean triggers capitalization in \cmd{\Name} of particles like \emph{de la} that may occur at the start of a sentence. It is triggered with \cmd{\CapThis}.\\
%
%    \begin{macrocode}
\DeclareOption{mainmatter}{\@nameauth@DoFormattrue}
\DeclareOption{frontmatter}{\@nameauth@DoFormatfalse}
\DeclareOption{smallcaps}{\newcommand{\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}{\protected@edef\Interspace{,\space}}
\DeclareOption{nocomma}{\protected@edef\Interspace{\space}}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
\ExecuteOptions{nocomma,mainmatter,index,normalcaps,notreversed,smallcaps}
\ProcessOptions\relax
\RequirePackage{etoolbox}
\RequirePackage{trimspaces}
\RequirePackage{suffix}
\RequirePackage{xargs}
%    \end{macrocode}
% The options above interact with 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.\\
%
% \subsection{Internal Macros}
% \begin{macro}{\@nameauth@CleanName}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
%    \begin{macrocode}
\newcommand*{\@nameauth@CleanName}[1]%
{%
  \expandafter\zap@space\detokenize{#1} \@empty%
}
%    \end{macrocode}
% \end{macro}
% Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string based on the forename/surname parameters of \cmd{\Name} and friends. With this we can construct a control sequence name. Testing for the presence of that control sequence determines the existence of pseudonyms and the first occurrence of a name.\\
%
% The following macros parse a ``base'' name into a radix and a suffix. They are designed so that their function occurs at the time of macro expansion, not execution. This expandability is key to the proper indexing function of this package. They form the kernel of the suffix removal and comma suppression features.
%
% \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}
%    \begin{macrocode}
\newcommand*{\@nameauth@Root}[1]%
{%
  \@nameauth@TrimRoot#1,\@empty\relax%
}
%    \end{macrocode}
% \end{macro}
% Anything starting with a comma and ending with the end of the name is stripped off. That includes ``Sr.,'' ``Jr.,'' ``III,'' and so on.
%
% \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}
%    \begin{macrocode}
\def\@nameauth@TrimRoot#1,#2\relax{#1}
%    \end{macrocode}
% \end{macro}
% This delimited-parameter macro strips off the second parameter as it returns the first.
%
% \begin{macro}{\@nameauth@CapRoot}
% \changes{v0.95}{2012/02/17}{Added macro}
%    \begin{macrocode}
\newcommand*{\@nameauth@CapRoot}[1]%
{%
  \@nameauth@CR#1\relax%
}
%    \end{macrocode}
% \end{macro}
% This macro implements the particulate name capitalization mechanism.
%
% \begin{macro}{\@nameauth@CR}
% \changes{v0.95}{2012/02/17}{Added macro}
%    \begin{macrocode}
\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}}
%    \end{macrocode}
% \end{macro}
% This delimited-parameter macro caps the first parameter and strips suffixes off the second.
%
% \begin{macro}{\@nameauth@AllCapRoot}
% \changes{v1.5}{2013/02/22}{Added macro}
%    \begin{macrocode}
\newcommand*{\@nameauth@AllCapRoot}[1]%
{%
  \uppercase{\@nameauth@Root{#1}}%
}
%    \end{macrocode}
% \end{macro}
% This macro caps the root name(s) in a potential \meta{root}|,|\meta{suffix} pair.
%
% \begin{macro}{\@nameauth@Suffix}
% \changes{v0.9}{2012/02/10}{added macro}
% \changes{v1.4}{2012/07/24}{Made more robust}
%    \begin{macrocode}
\newcommand*{\@nameauth@Suffix}[1]%
{%
  \@nameauth@TrimSuffix#1\relax%
}
%    \end{macrocode}
% \end{macro}
% Anything before a comma is stripped off by |\@nameauth@Suffix|, but it should be called only in a conditional where one knows that a comma will be present.
%
% \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}
%    \begin{macrocode}
\def\@nameauth@TrimSuffix#1,#2\relax{\trim@spaces{#2}}
%    \end{macrocode}
% \end{macro}
% This delimited-parameter macro strips the first parameter and returns the second. By stripping off spaces it allows consistent formatting.
%
%The next macros check whether the next token is a period. They are only called if the terminal character produced within \cmd{\Name} and \cmd{\FName} is itself a period.
%
% \begin{macro}{\@nameauth@CheckDot}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
%    \begin{macrocode}
\def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot}
%    \end{macrocode}
% \end{macro}
% This macro assigns the lookahead token \cmd{\@token} to be evaluated by\break \cmd{\@nameauth@EvalDot} while keeping \cmd{\@token} non-destructively on the list of input tokens. This does not gobble spaces like \cmd{\@nextchar}.
%
% \begin{macro}{\@nameauth@EvalDot}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
%    \begin{macrocode}
\def\@nameauth@EvalDot%
{%
  \let\@period=.\ifx\@token\@period\expandafter\@gobble \fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\@nameauth@EvalDot} checks if \cmd{\@token} is a period. If so it gobbles it by using \cmd{\expandafter} to get past the grouping. Another \cmd{\expandafter} occurs immediately before the invocation of \cmd{\@nameauth@CheckDot} in \cmd{\Name}, \cmd{\FName}, and \cmd{\AKA}.
%
% \begin{macro}{\@nameauth@TestDot}
% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
%    \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}
% While \cmd{\@nameauth@CheckDot} looks \emph{ahead} for a period, \cmd{\@nameauth@TestDot}\,---\,based on a snippet by \Name*[Uwe]{Lueck}\,---\,checks for a terminal period in the name passed to it, ignoring medial periods. It always resets the Boolean value before making its test, making it unnecessary to reset elsewhere.\\
%
% The following macros format the output for \cmd{\Name} and friends. The intent is to separate formatting in modular fashion from name parsing.
%
% \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}}
%    \begin{macrocode}
\newcommand{\@nameauth@FmtName}[1]%
{%
  \@nameauth@TestDot{#1}%
  \if@nameauth@DoFormat%
    \bgroup\NamesFormat{#1}\egroup%
  \else%
    #1%
  \fi%
}
\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}
% \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 above. The conditional |\if@nameauth@AlwaysFormat| causes formatting to occur always (when possible).
%
% \begin{macro}{\@nameauth@Index}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \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}
% If the indexing flag is true, create an index entry, otherwise do nothing.
%
% \subsection{User Interface Macros}
%
% \begin{macro}{\CapThis}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \begin{macrocode}
\newcommand{\CapThis}%
{%
  \@nameauth@DoCapstrue%
}
%    \end{macrocode}
% \end{macro}
% Force the capitalizing of particles. This affects the next occurrence of \cmd{\Name}, which then turns off the forced caps.
%
% \begin{macro}{\CapName}
% \changes{v1.5}{2013/02/22}{Added macro}
%    \begin{macrocode}
\newcommand{\CapName}%
{%
  \@nameauth@AllThistrue%
}
%    \end{macrocode}
% \end{macro}
% Force the capitalizing of particles. This affects the next occurrence of \cmd{\Name}, which then turns off the forced caps.
%
% \begin{macro}{\RevName}
% \changes{v1.5}{2013/02/22}{Added macro}
%    \begin{macrocode}
\newcommand{\RevName}%
{%
  \@nameauth@RevThistrue%
}
%    \end{macrocode}
% \end{macro}
% Force the capitalizing of particles. This affects the next occurrence of \cmd{\Name}, which then turns off the forced caps.
%
% \begin{macro}{\RevComma}
% \changes{v1.5}{2013/02/22}{Added macro}
%    \begin{macrocode}
\newcommand{\RevComma}%
{%
  \@nameauth@RevThistrue%
  \@nameauth@RevThisCommatrue%
}
%    \end{macrocode}
% \end{macro}
% Force the capitalizing of particles. This affects the next occurrence of \cmd{\Name}, which then turns off the forced caps.
%
% \begin{macro}{\ShowComma}
% \changes{v1.4}{2012/07/24}{Added macro}
%    \begin{macrocode}
\newcommand{\ShowComma}%
{%
  \@nameauth@ShowCommatrue%
}
%    \end{macrocode}
% \end{macro}
% Force a comma between a name and a suffix on a per-issue basis.
%
% \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}
%    \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\CapName\fi%
  \if@nameauth@RevAll\RevName\fi%
  \if@nameauth@RevAllComma\RevComma\fi%
  \if@nameauth@ShowComma%
    \protected@edef\Space{,\space}%
  \else%
    \let\Space\Interspace%
  \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\Space\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%
  \@nameauth@DoCapsfalse%
  \@nameauth@AllThisfalse%
  \@nameauth@ShowCommafalse%
  \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}]%
      \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\space#3}[\@nameauth@CleanName{#2#3}]%
      \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#3}%
          \fi%
        \fi%
      \fi%
    \fi%
  \else%
    \if@nameauth@RevThisComma%
      \protected@edef\Space{,\space}%
    \else%
      \let\Space\Interspace%
    \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}]%
      \else%
        \@nameauth@Index{\IndexShort, #1, \Suffix}[\@nameauth@CleanName{#1#2}]%
      \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@RevThisfalse%
  \@nameauth@RevThisCommafalse%
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Name*}
% \changes{v1.4}{2012/07/24}{Refactored}
%    \begin{macrocode}
\WithSuffix\newcommandx\Name*[3][1=\@empty, 3=\@empty]%
{%
  \@nameauth@FullNametrue%
  \Name[#1]{#2}[#3]%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\Name} is the heart of this package. \Name*[Marc van]{Dongen} provided the basic structure. The present version has been refactored to isolate indexing and parsing. Macros have been redesigned to be smaller, more efficient, and more robust.
%
% The present version of \cmd{\Name} incorporates \cmd{\FName} as well.
%
% The use of \cmd{\expandafter} before \cmd{\@nameauth@CheckDot} works with the other use of \cmd{\expandafter} mentioned with \cmd{\@nameauth@EvalDot} above to move past the closing brace and fetch the period as lookahead. That is only done when the check for a terminal period in the name succeeds.
%
% \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}
%    \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}
%    \begin{macrocode}
\WithSuffix\newcommandx\FName*[3][1=\@empty, 3=\@empty]%
{%
  \@nameauth@FirstNametrue%
  \Name[#1]{#2}[#3]%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\FName} and \cmd{\FName*} are identical and derived from \cmd{\Name} using it to print forename(s) in a subsequent use.
%
% \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}
%    \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\CapName\fi%
  \if@nameauth@RevAll\RevName\fi%
  \if@nameauth@RevAll\RevComma\fi%
  \if@nameauth@ShowComma%
    \protected@edef\Space{,\space}%
  \else%
    \let\Space\Interspace%
  \fi%
  \protected@edef\Shortii{\@nameauth@Root{#2}}%
  \protected@edef\Shortiv{\@nameauth@Root{#4}}%
  \ifx\testii\Shortii%
    \let\Surnamesii\Shortii%
    \protected@edef\Suffixii{\@empty}%
  \else%
    \protected@edef\Suffixii{\@nameauth@Suffix{#2}}%
    \protected@edef\Surnamesii{\Shortii\Space\Suffixii}%
  \fi%
  \ifx\testiv\Shortiv%
    \protected@edef\Suffixiv{\@empty}%
    \let\Surnamesiv\Shortiv%
    \let\Reverseiv\Shortiv%
  \else%
    \protected@edef\Suffixiv{\@nameauth@Suffix{#4}}%
    \protected@edef\Surnamesiv{\Shortiv\Space\Suffixiv}%
    \protected@edef\Reverseiv{\Suffixiv\Space\Shortiv}%
  \fi%
  \@nameauth@ShowCommafalse%
  \@nameauth@AllThisfalse%
  \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{\Surnamesiv|see{\Surnamesii}}%
            \else%
              \ifx\Suffixii\@empty \@nameauth@Index{\Surnamesiv|see{\Surnamesii, #1}}%
              \else\@nameauth@Index{\Surnamesiv|see{\Shortii, #1, \Suffixii}}\fi%
            \fi%
          \fi%
        \fi%
      \fi%
      \@nameauth@AltAKAfalse%
      \if@nameauth@RevThisComma%
        \protected@edef\Space{,\space}%
      \else%
        \let\Space\Interspace%
      \fi%
      \if@nameauth@RevThis%
        \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reverseiv}%
      \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{\Surnamesiv\space#5|see{\Surnamesii}}%
            \else%
              \ifx\Suffixii\@empty \@nameauth@Index{\Surnamesiv\space#5|see{\Surnamesii, #1}}%
              \else\@nameauth@Index{\Surnamesiv\space#5|see{\Shortii, #1, \Suffixii}}\fi%
            \fi%
          \fi%
        \fi%
      \fi%
      \if@nameauth@RevThisComma%
        \protected@edef\Space{,\space}%
      \else%
        \let\Space\Interspace%
      \fi%
      \if@nameauth@AltAKA%
        \@nameauth@AltAKAfalse%
        \if@nameauth@RevThis%
        \else%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testv}%
        \fi%
      \else%
        \@nameauth@AltAKAfalse%
        \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{\Surnamesiv, #3|see{\Surnamesii}}%
            \else\@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii}}\fi%
          \else%
            \ifx\Suffixii\@empty%
              \ifx\Suffixiv\@empty%
                \@nameauth@Index{\Surnamesiv, #3|see{\Surnamesii, #1}}%
              \else%
                \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii, #1}}%
              \fi%
            \else%
              \ifx\Suffixiv\@empty%
                \@nameauth@Index{\Surnamesiv, #3|see{\Shortii, #1, \Suffixii}}%
              \else%
                \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Shortii, #1, \Suffixii}}%
              \fi%
            \fi%
          \fi%
        \fi%
      \fi%
    \fi%
    \@nameauth@AltAKAfalse%
    \if@nameauth@RevThisComma%
      \protected@edef\Space{,\space}%
    \else%
      \let\Space\Interspace%
    \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@RevThisfalse%
  \@nameauth@RevThisCommafalse%
  \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
\WithSuffix\newcommandx\AKA*[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \@nameauth@AltAKAtrue%
  \AKA[#1]{#2}[#3]{#4}[#5]%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\AKA} prints a pseudonym and creates index cross-references. Its starred form prints only the alternate name parameter, if that exists. It prevents multiple generation of cross-references and suppresses double periods.
%
% \begin{macro}{\PName}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
%    \begin{macrocode}
\newcommandx\PName[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \Name[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
}
\WithSuffix\newcommandx\PName*[5][1=\@empty,3=\@empty,5=\@empty]%
{%
  \Name*[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\PName} is a convenience macro whose starred and unstarred forms call the respective versions of \cmd{\Name}, followed only by \cmd{\AKA}.
%
% \begin{macro}{\TagName}
% \changes{v1.2}{2012/02/25}{Added macro.}
%    \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}}{#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}}{#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}}{#4}%
      \fi%
  \fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\TagName} creates an index entry tag after a name that is not already a pseudonym.
%
% \begin{macro}{\UntagName}
% \changes{v1.2}{2012/02/25}{Added macro.}
%    \begin{macrocode}
\newcommandx\UntagName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \csundef{\@nameauth@CleanName{#2}}%
    \else%
      \csundef{\@nameauth@CleanName{#2#3}}%
    \fi%
  \else%
      \csundef{\@nameauth@CleanName{#1#2}}%
  \fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\TagName} creates an index entry tag after a name that is not already a pseudonym.
%
% \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}
%    \begin{macrocode}
\newcommandx\IndexName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testi{#1}%
  \protected@edef\testii{#2}%
  \protected@edef\testiii{#3}%
  \if@nameauth@ShowComma%
    \protected@edef\Space{,\space}%
  \else%
    \let\Space\Interspace%
  \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%
  \@nameauth@ShowCommafalse%
  \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}]%
      \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}]%
      \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}]%
        \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}]\fi%
      \fi%
  \fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\IndexName} creates an index entry that is not already a pseudonym. It prints nothing. It does ensure consistent formatting.
%
% \begin{macro}{\ExcludeName}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \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}
% This macro prevents a name from being formatted or indexed by using the exclusion mechanism of \cmd{\AKA}. The result is that \cmd{\Name} and friends will print their arguments, emit a warning, and continue.
%
% \begin{macro}{\ForgetName}
% \changes{v0.75}{2012/01/19}{New parameter added}
%    \begin{macrocode}
\newcommandx\ForgetName[3][1=\@empty, 3=\@empty]%
{%
  \protected@edef\testi{#1}%
  \protected@edef\testiii{#3}%
  \ifx\testi\@empty%
    \ifx\testiii\@empty%
      \csundef{\@nameauth@CleanName{#2!MN!}}%
      \csundef{\@nameauth@CleanName{#2!NF!}}%
    \else%
      \csundef{\@nameauth@CleanName{#2#3!MN!}}%
      \csundef{\@nameauth@CleanName{#2#3!NF!}}%
    \fi%
  \else%
      \csundef{\@nameauth@CleanName{#1#2!MN!}}%
      \csundef{\@nameauth@CleanName{#1#2!NF!}}%
  \fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\ForgetName} undefines control sequences to force the ``first use'' option of \cmd{\Name}.
%
% \begin{macro}{\SubvertName}
% \changes{v0.9}{2012/02/10}{Added macro}
%    \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}
% \cmd{\SubvertName} defines control sequences to suppress the ``first use'' of \cmd{\Name}.\\
%
% \noindent The following macros toggle formatting and indexing.
%
% \begin{macro}{\NamesInactive}
%    \begin{macrocode}
\newcommand{\NamesInactive}{\@nameauth@DoFormatfalse}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\NamesActive}
%    \begin{macrocode}
\newcommand{\NamesActive}{\@nameauth@DoFormattrue}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.5}{2013/02/22}{Added macro}
% \begin{macro}{\AllCapsInactive}
%    \begin{macrocode}
\newcommand{\AllCapsInactive}{\@nameauth@AllCapsfalse}
%    \end{macrocode}
% \end{macro}
% 
% \changes{v1.5}{2013/02/22}{Added macro}
% \begin{macro}{\AllCapsActive}
%    \begin{macrocode}
\newcommand{\AllCapsActive}{\@nameauth@AllCapstrue}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.5}{2013/02/22}{Added macro}
% \begin{macro}{\ReverseInactive}
%    \begin{macrocode}
\newcommand{\ReverseInactive}{\@nameauth@RevAllfalse}
%    \end{macrocode}
% \end{macro}
% 
% \changes{v1.5}{2013/02/22}{Added macro}
% \begin{macro}{\ReverseActive}
%    \begin{macrocode}
\newcommand{\ReverseActive}{\@nameauth@RevAlltrue}
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.5}{2013/02/22}{Added macro}
% \begin{macro}{\ReverseCommaInactive}
%    \begin{macrocode}
\newcommand{\ReverseCommaInactive}{\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
%    \end{macrocode}
% \end{macro}
% 
% \changes{v1.5}{2013/02/22}{Added macro}
% \begin{macro}{\ReverseCommaActive}
%    \begin{macrocode}
\newcommand{\ReverseCommaActive}{\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\IndexInactive}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \begin{macrocode}
\newcommand{\IndexInactive}{\@nameauth@DoIndexfalse}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\IndexActive}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \begin{macrocode}
\newcommand{\IndexActive}{\@nameauth@DoIndextrue}
%    \end{macrocode}
% \end{macro}
% \clearpage
% \Finale
\endinput
% \iffalse
%</package>
% \fi