summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
blob: 0cbb83185716d2a68f41afb54576b14c9007a3a9 (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
% \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>
    [2012/02/19 v0.96 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{lmodern}
\fi
\fi
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{nameauth}[2012/02/19]
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\begingroup\lccode`!=`\\\lowercase{\endgroup\def\bsc{!}}
\makeindex
\frenchspacing
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{nameauth.dtx}
  \PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{928}
%
% \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 described; documentation subject to change until 1.0}
% \changes{v0.8}{2012/01/29}{Refactoring improved functionality and compatibility}
% \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.92}{2012/02/12}{Build with all major \LaTeX{} engines}
% \changes{v0.94}{2012/02/15}{Added index suppression, error checking, better particle handling}
% \changes{v0.95}{2012/02/17}{Fixed occasional incompatibility with \textsf{microtype}.}
% \changes{v0.96}{2012/02/19}{Defined compatibility limits with \textsf{microtype} and \textsf{memoir}.}
%
% \DoNotIndex{\newcommand, \newenvironment, \@empty, \@gobble, \bfseries, \bgroup, \def, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \fi, \if, \ifx, \IfBooleanTF, \IfValueTF, \itshape, \let, \newif, \relax, \renewcommand, \RequirePackage, \scshape, \space, \DeclareDocumentCommand, \DeclareOption, \ProcessOptions, \@token,  \@period, \csgdef, \csundef, \detokenize, \expandafter, \Forenames, \futurelet, \if@nameauth@DoComma, \if@nameauth@DoFormat, \if@nameauth@Punct, \ifcsname, \index, \PackageWarning, \Surnames, \Surnamesi, \Surnamesii, \TestDot, \TestEnd, \TestPunct, \TestStop, \zap@space, \edef, \if@nameauth@DoIndex, \if@nameauth@Comma, \Test, \bsc, \uppercase, \Input, \Output, \if@nameauth@DoCaps, \Cap, \@Cap, \ISurnames, \Shortnames}
%
% \providecommand*{\url}{\texttt}
% \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 Using the \textsf{nameauth} package, an author can encode names according to a name authority. Index entries will be consistent if the input parameters are consistent. An author can move blocks of text arbitrarily and the names will be reformatted automatically, making it easier to transition from drafts to a final manuscript. This package mainly supports Western naming conventions, with some basic features for ancient, royal, and Eastern names.
% \end{abstract}
%
% \section{Introduction}
%
% Suppose you were working on a collection of essays. Different publishers' permissions may force you to accept variance in the spelling of people's names. You would track and index those names using a name authority. Your index might use abbreviated name forms. This package allows the author to encode names so that the time and cost of an editor and proofreader can be minimized. This could make an author more desirable for publication.
%
% \subsection{Typesetting, Indexing, and Design}
%
% This package depends on \textsf{etoolbox} and \textsf{xparse.} It has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}, as well as \textsf{makeindex} and \textsf{texindy}. This file 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}. Section \ref{sec:accents} discusses infrequent cases of incompatibility with \textsf{microtype} when using \textsf{memoir}. The default options and design of this package try to minimize keystrokes or trade extra work for benefits in formatting and consistency. The \texttt{.dtx} file is also a good source of information.
%
% \subsection{Thanks}
%
% Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani}, \Name[Heiko]{Oberdiek}, and \Name[Uwe]{Lueck} for their invaluable assistance. \FName[Marc van]{Dongen}[Marc] showed me the basic structure using the \textsf{xparse} package. \FName[Enrico]{Gregorio} and \FName[Philipp]{Stephani} helped with generating control sequences and sanitizing. \FName[Heiko]{Oberdiek} gave a space-removing solution that could be passed as an argument in a macro. Code adapted from \FName[Uwe]{Lueck}'s work on the texhax list enabled the routines to function with the \textsf{microtype} package.
%
% \section{Usage}
%
% \subsection{Package Options}
% If the default behavior is not desired, the following options easily alter it. The class options are listed with defaults first in each category:
%
% \begin{quote}\small
% \begin{tabular}{lp{3in}}
% \texttt{mainmatter} & The default behavior triggers special typesetting of the first occurrence of a name, starting at the beginning of a document.\\[1ex]
% \texttt{frontmatter} & This option suppresses the special typesetting of the first occurrence of a name before the invocation of \cmd{\NamesActive}. This option fits well with front matter from a contributor who may not intend the same formatting and emphasis found in the main matter. The indexing and aliasing features of the package remain operative. \emph{Note}: One can switch at will between formatted and non-formatted sections; see Section \ref{sec:SectionFormat}.\\[0.25ex]\hline
% {\large\strut}\texttt{smallcaps} & The default behavior when a name is first encountered is to print it in small caps.\\[1ex]
% \texttt{italic} & This option causes the first occurrence of the name to be italicized.\\[1ex]
% \texttt{boldface} & This option causes the first occurrence of the name to be set in boldface.\\[1ex]
% \texttt{noformat} & This option suppresses document formatting after the invocation of \cmd{\NamesActive}. If an author wants the indexing and aliasing functions without any special typesetting, this option accomplishes that easily. Additional formatting options are discussed in Section \ref{sec:formatting}. This option is \emph{not} equivalent to \texttt{frontmatter}, which prevents formatting when in force. The \texttt{noformat} option simply sets the `formatting'' to nil, helping one to write the same document for different publishers' style requirements.\\[0.25ex]\hline
% {\large\strut}\texttt{nocomma} & The default behavior suppresses printing of commas between surnames and suffixes, following modern styles like \emph{Chicago Manual of Style}. See Section \ref{sec:suffix} for implications of this behavior.\\[1ex]
% \texttt{comma} & Print commas between surnames and suffixes, following older styles. See also Section \ref{sec:suffix}.\\[0.25ex]\hline
% {\large\strut}\texttt{index} & The default behavior creates index entries in place with the names.\\[1ex]
% \texttt{noindex} & Similar to \texttt{frontmatter}, this option prevents indexing until a call to \cmd{\IndexActive}. See also Section \ref{sec:SectionIndex}.\\
% \end{tabular}
% \end{quote}
% \clearpage
%
% \subsection{Example Text}
% \label{sec:example}
%
% We begin with a sample text that attempts to cover the basic features, and even a couple of advanced ones. It is in the genre of a merry wedding reception toast, proving that a serious package can be used lightheartedly.\\
%
% \noindent DISCLAIMER: I use a number of names associated with historical figures throughout this document. This is because I expect that the users of this package will refer to real-world figures. At no time in this document am I intending either to promote, disparage, align with, align against, or make any assertions about any persons living or dead. As far as I am concerned, all names mentioned herein deserve respect for the impact and legacy of their bearers.\\
%
% \noindent\textbf{Example Text:}
%
% {\small\ttfamily This is a toast to |\Name[John]{Smith}| and his longtime sweetheart,\break |\Name[J.Q.]{Public}[Jane Q.]|. |\FName[John]{Smith}| and\break |``\FName[J.Q.]{Public}[Janie]''| have finally made it official today! After\break casual dating as teenagers, they met again in college where they learned\break about |\Name{Aristotle}| and all the stuff that I can't keep in my head.\break [laughs] Nevertheless, by the time they got to |\Name{John}[Duns Scotus]| they were definitely a number. They studied medieval history-makers like\break |\Name{Gregory, I}| |``\AKA*{Gregory, I}{Gregory}[the Great]''| and by the\break Renaissance they were engaged. After spending time in separate grad schools, these promising medievalists got faculty positions at adjoining colleges\break and here we are. As the brother of |\FName[J.Q.]{Public}[Jane]|\break |``\AKA*[J.Q.]{Public}{Jane}[the Great]''| I am happy to welcome\break |\FName[John]{Smith}[Sir John]| to our raucous family.}\\
%  
% This is a toast to \Name[John]{Smith} and his longtime sweetheart, \Name[J.Q.]{Public}[Jane Q.]. \FName[John]{Smith} and ``\FName[J.Q.]{Public}[Janie]'' have finally made it official today! After casual dating as teenagers, they met again in college where they learned about \Name{Aristotle} and all the stuff that I can't keep in my head. [laughs] Nevertheless, by the time they got to \Name{John}[Duns Scotus] they were definitely a number. They studied medieval history-makers like \Name{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' and by the Renaissance they were engaged. After spending time in separate grad schools, these promising medievalists got faculty positions at adjoining colleges and here we are. As the brother of \FName[J.Q.]{Public}[Jane] ``\AKA*[J.Q.]{Public}{Jane}[the Great]'' I am happy to welcome \FName[John]{Smith}[Sir John] to our raucous family.\\
%  
% Here you will notice that one can make a reference to Pope |\Name{Gregory, I}| followed by ``the Great'' via |``\AKA*{Gregory, I}{Gregory}[the Great]''|. That is achieved by the ambiguous behavior of the default \texttt{nocomma} option plus the ``sobriquet only'' feature of \cmd{\AKA*}. It is easy to use these features, but can be tricky to debug. Sections \ref{sec:suffix} and \ref{sec:pennames} have more details.
%
% \subsection{Quick Start Guide}
% \label{sec:start}
% \changes{v0.8}{2012/01/29}{Added quick start guide}
% \changes{v0.85}{2012/02/05}{Updated quick start guide}
% \changes{v0.96}{2012/02/19}{Redesigned guide for better readability.}
%
% This ``cheat sheet'' engages about 80\% of the features in this package.
%
% \begin{multicols}{2}\small
% \subsubsection{Rules of Thumb}
% \begin{enumerate}\setlength\itemsep{0pt}\small
% \item \cmd{\frenchspacing} is recommended.
% \item The indexed forms of the names remain the same if you follow the macro input charts consistently.
% \item Problematic index entries often lead to correctable mistakes.
% \item Trade work for consistency.
% \item Use just the macros you \emph{need}.
% \end{enumerate}
% \subsubsection{Basic}
% These examples work predictably under the broadest conditions.
% \begin{enumerate}\setlength\itemsep{0pt}\small
% \item First reference: \ForgetName[John]{Smith}\Name[John]{Smith}\\[0.5ex]
% |\Name*[John]{Smith}| or\\ |\Name[John]{Smith}| or\\ |\FName[John]{Smith}|
% \item Subsequent full name: \Name*[John]{Smith}\\[0.5ex]
% |\Name*[John]{Smith}|
% \item Subsequent surname: \Name[John]{Smith}\\[0.5ex]
% |\Name[John]{Smith}|
% \item Subsequent forename: \FName[John]{Smith}\\[0.5ex]
% |\FName[John]{Smith}|
% \item First mononym reference: \ForgetName{Plato}\Name{Plato}\\[0.5ex]
% |\Name*{Plato}| or\\ |\Name{Plato}| or\\ |\FName{Plato}|
% \item Subsequent references: \Name{Plato}\\[0.5ex]
% |\Name*{Plato}| or\\ |\Name{Plato}| or\\ |\FName{Plato}|\\[1.5ex]
% These next examples work with the \texttt{comma} option, not \cmd{\AKA} and \cmd{\PName}. The next page offers a workaround that depends on the \texttt{nocomma} option.
% \item First Eastern ref: \ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung]\\[0.5ex]
% |\Name*{Mao}[Tse-tung]| or\\ |\Name{Mao}[Tse-tung]|
% \item Subsequent references: \Name*{Mao}[Tse-tung]\\[0.5ex]
% |\Name*{Mao}[Tse-tung]|
% \item Subsequent references: \Name{Mao}[Tse-tung]\\[0.5ex]
% |\Name{Mao}[Tse-tung]| or\\ |\FName{Mao}[Tse-tung]|
% \item First royal: \ForgetName{Louis}[the Pious]\Name{Louis}[the Pious]\\[0.5ex]
% |\Name*{Louis}[the Pious]| or\\ |\Name{Louis}[the Pious]| or\\ |\FName{Louis}[the Pious]|
% \item Subsequent refs: \Name*{Louis}[the Pious]\\[0.5ex]
% |\Name*{Louis}[the Pious]|
% \item Subsequent references: \Name{Louis}[the Pious]\\[0.5ex]
% |\Name{Louis}[the Pious]| or\\ |\FName{Louis}[the Pious]|
% \item First ancient: \ForgetName{Ptolemy I}[Soter]\Name{Ptolemy I}[Soter]\\[0.5ex]
% |\Name*{Ptolemy I}[Soter]| or\\ |\Name{Ptolemy I}[Soter]| or\\ |\FName{Ptolemy I}[Soter]|
% \item Subsequent refs: \Name*{Ptolemy I}[Soter]\\[0.5ex]
% |\Name*{Ptolemy I}[Soter]|
% \item Subsequent refs: \Name{Ptolemy I}[Soter]\\[0.5ex]
% |\Name{Ptolemy I}[Soter]| or\\ |\FName{Ptolemy I}[Soter]|
% \item First royal: \ForgetName{Henry}[VIII]\Name{Henry}[VIII]\\[0.5ex]
% |\Name*{Henry}[VIII]| or\\ |\Name{Henry}[VIII]| or\\ |\FName{Henry}[VIII]|
% \item Subsequent refs: \Name*{Henry}[VIII]\\[0.5ex]
% |\Name*{Henry}[VIII]|
% \item Subsequent references: \Name{Henry}[VIII]\\[0.5ex]
% |\Name{Henry}[VIII]| or\\ |\FName{Henry}[VIII]|\\[1ex]
% \end{enumerate}
% \subsubsection{Intermediate}
% The following employ alternate forenames. They keep regular forenames in the index. 
% \begin{enumerate}\setlength\itemsep{0pt}\small
% \item Print an embellished first reference: \ForgetName[J.Q.]{Public}\Name[J.Q.]{Public}[Jane Q.]\\[0.5ex]
% |\Name*[J.Q.]{Public}[Jane Q.]| or\\ |\Name[J.Q.]{Public}[Jane Q.]| or\\ |\FName[J.Q.]{Public}[Jane Q.]|
% \item Subsequent full name, alternate forename, same person in index: \Name*[J.Q.]{Public}[Jane Qetsiyah]\\[0.5ex]
% {\footnotesize |\Name*[J.Q.]{Public}[Jane Qetsiyah]|}
% \item Subsequent ``shorter'' full name, same person in index: \Name*[J.Q.]{Public}\\[0.5ex]
% |\Name*[J.Q.]{Public}|
% \item Subsequent alternate forename, same person in index: \FName[J.Q.]{Public}[Janie]\\[0.5ex]
% |\FName[J.Q.]{Public}[Janie]|
% \end{enumerate}
% \subsubsection{Advanced}
% These next examples engage a number of special cases. Many depend on the default \texttt{nocomma} option. Always use a comma to delimit suffixes. Use a space or thin space after the comma. These forms will work with \cmd{\AKA} and \cmd{\PName}. See also Section \ref{sec:suffix}
% \begin{enumerate}\setlength\itemsep{0pt}\small
% \item First: \ForgetName[George S.]{Patton, Jr.}\Name[George S.]{Patton, Jr.}\\[0.5ex]
% {\footnotesize |\Name*[George S.]{Patton, Jr.}|\,or\\ |\Name[George S.]{Patton, Jr.}| or\\ |\FName[George S.]{Patton, Jr.}|}
% \item Subsequent full: \Name*[George S.]{Patton, Jr.}\\[0.5ex]
% |\Name*[George S.]{Patton, Jr.}|
% \item Subsequent surname: \Name[George S.]{Patton, Jr.}\\[0.5ex]
% |\Name[George S.]{Patton, Jr.}|
% \item Subsequent forename: \FName[George S.]{Patton, Jr.}[George]\\[0.5ex]
% |\FName[George S.]{Patton, Jr.}%|\\|[George]|\\[2ex] The next forms take advantage of comma suppression to implement forms of ancient, royal and Eastern names. Adding a final optional parameter is discouraged.
% \item First reference: \ForgetName{Gregory, I}\Name{Gregory, I}\\[0.5ex]
% |\Name*{Gregory, I}| or\\ |\Name{Gregory, I}| or\\ |\FName{Gregory, I}|
% \item Subsequent full name: \Name*{Gregory, I}\\[0.5ex]
% |\Name*{Gregory, I}|
% \item Subsequent name: \Name{Gregory, I}\\[0.5ex]
% |\Name{Gregory, I}| or\\ |\FName{Gregory, I}|
% \item First reference: \ForgetName{Demetrius, I Soter}\Name{Demetrius, I Soter}\\[0.5ex]
% |\Name*{Demetrius, I Soter}| or\\ |\Name{Demetrius, I Soter}| or\\ |\FName{Demetrius, I Soter}|
% \item Next full name: \Name*{Demetrius, I Soter}\\[0.5ex]
% |\Name*{Demetrius, I Soter}|
% \item Subsequent name: \Name{Demetrius, I Soter}\\[0.5ex]
% |\Name{Demetrius, I Soter}| or\\ |\FName{Demetrius, I Soter}|
% \item First reference: \ForgetName{Sun, Yat-sen}\Name{Sun, Yat-sen}\\[0.5ex]
% |\Name*{Sun, Yat-sen}| or\\ |\Name{Sun, Yat-sen}| or\\ |\FName{Sun, Yat-sen}|
% \item Subsequent full name: \Name*{Sun, Yat-sen}\\[0.5ex]
% |\Name*{Sun, Yat-sen}|
% \item Subsequent name: \Name{Sun, Yat-sen}\\[0.5ex]
% |\Name{Sun, Yat-sen}| or\\ |\FName{Sun, Yat-sen}|\\[2ex] The following illustrate the American style of particulate names.
% \item First: \Name[Walter]{de la Mare}\\[0.5ex]
% |\Name*[Walter]{de la Mare}| or\\ |\Name[Walter]{de la Mare}| or\\ |\FName[Walter]{de la Mare}|
% \item Next reference: \Name[Walter]{de la Mare}\\[0.5ex]
% |\Name[Walter]{de la Mare}|
% \item At start of sentence: \CapThis\Name[Walter]{de la Mare}\\[0.5ex]
% |\CapThis\Name[Walter]{de la Mare}|
% \item Forename: \FName[Walter]{de la Mare}\\[0.5ex]
% |\FName[Walter]{de la Mare}|\\[2ex] The following illustrate the Continental style of particulate names. The first keeps particles in the index.
% \item First: \Name[Johann Wolfgang von]{Goethe}\\[0.5ex]
% {\footnotesize |\Name*[Johann Wolfgang von]{Goethe}|\,or\\ |\Name[Johann Wolfgang von]{Goethe}|\,or\\ |\FName[Johann Wolfgang von]{Goethe}|}
% \item Subsequent surname: \Name[Johann Wolfgang von]{Goethe}\\[0.5ex]
% |\Name[Johann Wolfgang von]{Goethe}|
% \item Next forename: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang]\\[0.5ex]
% |\FName[Johann Wolfgang von]%|\\ |{Goethe}[Johann Wolfgang]|\\[2ex] The following Continental forms prevent the indexing of particles.
% \item First: \Name[Adolf]{Harnack}[Adolf von]\\[0.5ex]
% {\footnotesize|\Name*[Adolf]{Harnack}[Adolf von]|\,or\\ |\Name[Adolf]{Harnack}[Adolf von]|\,or\\ |\FName[Adolf]{Harnack}[Adolf von]|}
% \item Next full name: \Name*[Adolf]{Harnack}[Adolf von]\\[0.5ex]
% |\Name*[Adolf]{Harnack}[Adolf von]| \\[2ex] With the following example, the final optional parameter can be dropped.
% \item Subsequent surname: \Name[Adolf]{Harnack}[Adolf von]\\[0.5ex]
% |\Name[Adolf]{Harnack}[Adolf von]|
% \item Subsequent forename: \FName[Adolf]{Harnack}\\[0.5ex]
% |\FName[Adolf]{Harnack}|
% \end{enumerate}
% \subsubsection{Expert}
% The following examples deal with complicated or technical macros.
% \begin{enumerate}\setlength\itemsep{0pt}\small
% \item Index, but do not print a reference to ``Public, J.Q.'' \IndexName[J.Q.]{Public}\\[0.5ex]
% |\IndexName[J.Q.]{Public}|\\[0.5ex] Note that in Western names, the final optional parameters are ignored.
% \item Index, but do not print a reference to ``Plato'' \IndexName{Plato}\\[0.5ex]
% |\IndexName{Plato}|
% \item Index, but do not print a reference to ``Mao Tse-tung'' \IndexName{Mao}[Tse-tung]\\[0.5ex]
% |\IndexName{Mao}[Tse-tung]|
% \item Index, but do not print a reference to ``Henry VIII'' \IndexName{Henry}[VIII]\\[0.5ex]
% |\IndexName{Henry}[VIII]|
% \item Index, but do not print a reference to ``Ptolemy I Soter'' \IndexName{Ptolemy I}[Soter]\\[0.5ex]
% |\IndexName{Ptolemy I}[Soter]|\\[0.5ex] The following only work with the default \texttt{nocomma} option.
% \item Index, but do not print a reference to ``Gregory I'' \IndexName{Gregory, I}\\[0.5ex]
% |\IndexName{Gregory, I}|
% \item Index, but do not print a reference to ``Sun Yat-sen'' \IndexName{Sun, Yat-sen}\\[0.5ex]
% |\IndexName{Sun, Yat-sen}|
% \item Following a name, print a pseudonym in parentheses. \PName[Bob]{Hope}[Leslie Townes]{Hope}\\[0.5ex]
% |\PName[Bob]{Hope}%|\\|[Leslie Townes]{Hope}|
% \item Print a name that is only a \emph{see} reference to another: \AKA[Bob]{Hope}[Lester T.]{Hope}\\[0.5ex]
% |\AKA[Bob]{Hope}[Lester T.]{Hope}|\\[2ex] The following only works with the default \texttt{nocomma} option.
% \item Print a name and ``sobriquet'' for an ancient name, making it a cross-reference: \AKA{Leo, I}{Leo}[the Great]\\[0.5ex]
% |\AKA{Leo, I}{Leo}[the Great]|
% \item Print only the ``sobriquet'' form directly after a \cmd{\Name} reference: \Name{Leo, I} ``\AKA*{Leo, I}{Leo}[the Great]''\\[0.5ex]
% |\Name{Leo, I}| |``\AKA*{Leo, I}%| |{Leo}[the Great]''|
% \end{enumerate}
% \subsubsection{Pitfalls}
% Avoiding the following pitfalls will save time and frustration:
% \begin{enumerate}\setlength\itemsep{0pt}\small
% \item Mixing sobriquets with modern forms fails due to the ``alternate name'' feature:\\ |\Name[First]{Ancient}[Sobriquet]|\\ |\Name[King]{Number}[Sobriquet]|
% \item Using \cmd{\AKA} and \cmd{\PName} with sobriquet-based forms will fail unless you use comma-delimited suffixes. See Section \ref{sec:suffix}.
% \item Using a forename or first initials can prevent failure in some cases:\\[0.5ex]{\footnotesize OK: |\Name[J.]{Kreskin}[The Amazing]|\\ |(\AKA[J.]{Kreskin}[Joseph]{Kresge})|\\[0.5ex] FAIL: |\Name[]{Kreskin}[The Amazing]|\\ |(\AKA{Kreskin}[Joseph]{Kresge})|\\[0.5ex] FAIL: |\Name{Kreskin}[The Amazing]|\\ |(\AKA{Kreskin}[Joseph]{Kresge})|}
% \item \cmd{\Name} can shorten a reference even if you use the full name in the text.
% \item Unbalanced or incorrect \texttt{\{} braces \texttt{\}} and \texttt{[} brackets \texttt{]}, as well as forgetting the periods in initials, create errors that can be difficult to track. Leading spaces in macro arguments will create incorrectly sorted index entries.
% \end{enumerate}
% \end{multicols}
 %
% \subsection{Basic Macros: \bsc Name and \bsc FName}
%
% \subsubsection{\texttt{\bsc Name} and \texttt{\bsc 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 \emph{forename(s)} with \emph{FNN} and \emph{surname(s)} with \emph{SNN} at various points. The syntax descriptions do not capture exactly how the \cmd{\Name} macro behaves. The following table helps to show first and subsequent references:
%
% \begin{quote}\small
% \begin{tabular}{llll}\hline
% {\large\strut}\emph{FNN} & \emph{SNN} & Alternate Names & Result\\\hline
% \texttt{Albert} & \texttt {Einstein} & (none) & \Name[Albert]{Einstein}\\
% \texttt{Albert} & \texttt {Einstein} & (none) & \Name[Albert]{Einstein}\\
% (none) & \texttt{Confucius} & (none) & \Name{Confucius}\\
% (none) & \texttt{Confucius} & (none) & \Name{Confucius}\\
% \texttt{M.T.} & \texttt{Cicero} & \texttt{Marcus Tullius} & \Name[M.T.]{Cicero}[Marcus Tullius]\\
% \texttt{M.T.} & \texttt{Cicero} & \texttt{Marcus Tullius} & \Name[M.T.]{Cicero}[Marcus Tullius]\\
% (none) & \texttt{Charles} & \texttt{the Bald} & \Name{Charles}[the Bald]\\
% (none) & \texttt{Charles} & \texttt{the Bald} & \Name{Charles}[the Bald]\\\hline
% \end{tabular}
% \end{quote}
%
% \noindent Basically, \cmd{\Name} connects the \emph{FNN} to the \emph{SNN} to create respective printed and indexed forms, usually \emph{FNN}\,\emph{SNN} and \emph{SNN},\,\emph{FNN}. This takes care of most Western names. For those with one name, such as ancient figures or stage names, one can drop the \emph{FNN} so that \cmd{\Name} produces the result \emph{SNN} for both text and index.\cmd{\Name} always prints the surname or ``base name.''
%
% Sometimes you might want to have the option of using either an alternate set of forenames, like a nickname, or a sobriquet that functions as a surname for ancient figures. These two alternatives are handled by the final, optional field of \cmd{\Name}. If ``regular'' \emph{FNN} are present, then the alternate names conditionally will replace the \emph{FNN} in the printed form, but not in the indexed form. If no regular \emph{FNN} are present, then the alternate names will be appended to the \emph{SNN} in the printed form \emph{and} in the indexed form. You may choose to include or exclude nicknames and such, but you must always use the sobriquet form of a name consistently.
%
% I mentioned conditional use. The unstarred form prints the ``full name'' at the first occurrence, then only the partial form thereafter. The starred form always prints the full name. Both macros usually apply a different ``font  attribute'' to the name when it first appears in the running text.
%
% As long as the ``main'' \emph{FNN} are constant in Western-style names, the ``alternate names'' field can vary, yet the index entries will be constant. Sections \ref{sec:example} and  \ref{sec:start} contain a number of ``intermediate'' examples that illustrate this ability to swap out forenames. This is useful when dropping out references to middle initials in \cmd{\FName}. Alternate forenames only get printed in subsequent occurrences of \cmd{\Name*} and \cmd{\FName}. The surname argument is \emph{always} printed in \cmd{\Name*} and \cmd{\Name}.
%
% Another option employs a ``sobriquet'' feature for royal names and basic Eastern names. \cmd{\AKA} and \cmd{\PName} cannot refer to these forms, although they can use these forms in the \emph{second} name argument to construct a cross-reference. A workaround is discussed in Section \ref{sec:suffix}. The following method is the only one that works with the \texttt{comma} option. Valid ``sobriquet'' forms are:\\
%
% \bgroup\footnotesize\ForgetName{Henry}[VIII]
% \begin{tabular}{llp{1.2cm}ll}\hline
% {\normalsize\strut}\emph{FNN} & \emph{SNN} & Alternate Names & Result & Function\\\hline
% (none) & \texttt{Henry} & \texttt{VIII} & \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\\
% (none) & \texttt{Henry} & \texttt{VIII} & \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\\\hline
% (none) & \texttt{Chiang} & \texttt{Kai-shek} & \Name{Chiang}[Kai-shek] & |\Name{Chiang}[Kai-shek]|\\
% (none) & \texttt{Chiang} & \texttt{Kai-shek} & \Name{Chiang}[Kai-shek] & |\Name{Chiang}[Kai-shek]|\\\hline
% \end{tabular}
% \egroup\bigskip
%
% \noindent Again, alternate forenames \emph{override} the \emph{FNN} in the text. Sobriquets are \emph{appended} to \emph{SNN}. The presence or absence of \emph{FNN} triggers this difference between the two actions---\emph{this is a central concept}. 
%
% \emph{Note}: Throughout this manual I play a ``dirty trick'' that makes a name print as if it had not yet occurred. In some cases I make a first occurrence print as if the name already had occurred. This trick can be used, for example, to force the formatting of the first name in a chapter or section. See Section \ref{sec:Tweaks} for more.
%
% \subsubsection{\texttt{\bsc FName}}
%
% \DescribeMacro{\FName}
% This casual friend of \cmd{\Name} prints only ``first'' names except if a first use occurs, whereupon it prints a full, formatted name as set by the class options or the formatting macros. \cmd{\FName} is intended for Western-style names. The syntax is basically the same:
% \begin{quote}
% \cmd{\FName}\oarg{FNN}\marg{SNN}\oarg{alternate names}
% \end{quote}
% Remember that \cmd{\FName} \emph{has no starred form}. Next we see what it does:
%
% \begin{quote}\small
% \begin{tabular}{llll}\hline
% {\large\strut}\emph{FNN} & \emph{SNN} & Alternate Names & Result\\\hline
% \texttt{Albert} & \texttt {Einstein} & (none) & \FName[Albert]{Einstein}\\
% (none) & \texttt{Confucius} & (none) & \FName{Confucius}\\
% \texttt{M.T.} & \texttt{Cicero} & \texttt{Marcus Tullius} & \FName[M.T.]{Cicero}[Marcus Tullius]\\
% (none) & \texttt{Charles} & \texttt{the Bald} & \FName{Charles}[the Bald]\\\hline
% \end{tabular}
% \end{quote}
%
% \noindent If one accidentally referred to |\FName[Max]{Planck}| as a first reference, that would appear as \FName[Max]{Planck}. otherwise it would just be \FName[Max]{Planck}. For nicknames use the ``alternate names'' option. 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}. With comma-delimited suffixes we note special cases governed by the \texttt{nocomma} class option (see Section \ref{sec:suffix}). These include names like like \FName[J.D.]{Rock, III} and \FName{Charles, V}:
% \begin{quote}|\FName[J.D.]{Rock, III}|, ``\FName[J.D.]{Rock, III},'' |\FName{Charles, V}|, ``\FName{Charles, V}''\end{quote}
% \cmd{\FName} suppresses extra periods if a forename with initials occurs at the end of a sentence, as in the plot-line ``who shot \FName[J.D.]{Rock, III}.'' See also Section \ref{sec:suffix}.
%
% \subsection{Advanced Topics}
%
% \subsubsection{Error Handling}
% \label{sec:error}
%
% Except for \cmd{\ExcludeName}, the macros silently print any erroneous arguments in the text and emit warnings. Sometimes a warning is just a warning. \cmd{\PName} produces warnings via \cmd{\Name} and \cmd{\AKA}. 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 xref multiple times.
% \item Using \cmd{\ExcludeName} to exclude a name that has already been used.
% \end{enumerate}
% 
% \subsubsection{Naming Conventions}
%
% \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 \emph{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.
%
% Names foreign to English usually put these particles in the \emph{FNN} field of \cmd{\Name}. Yet these particles are not first names. Using \cmd{\FName} with alternate forenames overcomes this issue. Section \ref{sec:start} likely has the best illustration of this.
%
% \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{\texttt{\bsc IndexName}}
% 
% \DescribeMacro{\IndexName}
% This macro creates an index entry like \cmd{\Name} and friends. It prints no text in the body and includes no special formatting. The syntax is similar to \cmd{\Name}:
% \begin{quote}
% \cmd{\IndexName}\oarg{FNN}\marg{SNN}\oarg{alternate names}
% \end{quote}
% \cmd{\IndexName} does not index the alternate names unless \emph{FNN} are absent, like \cmd{\Name} using the sobriquet feature. See also Section \ref{sec:SectionIndex} for switching indexing on and off.
%
% \subsubsection{\texttt{\bsc 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{Manual Index Entries}
% \label{sec:manual}
%
% \cmd{\Name} and friends produce index entries compatible with manual index entries since version 0.9. The \texttt{.idx} file is a helpful reference when linking manual entries with \textsf{nameauth} entries, although it is usually unnecessary to consult.
%
% \subsubsection{Suffix Removal}
% \label{sec:suffix}
% \changes{v0.85}{2012/02/05}{New suffix removal features}
% 
% \cmd{\Name}---not \cmd{\Name*}---truncates comma-delimited suffixes from last names. For example, it prints the name \Name[Oskar]{Hammerstein, II} the first time and \Name[Oskar]{Hammerstein, II} thereafter. One must always use a comma to activate this, e.g., |\Name[Oskar]{Hammerstein, II}|. The space after the comma is literal, but not manipulated by the package in case one wants to use a thin space.
%
% Again, \textbf{the comma is not optional with suffixes}. It is how this feature works. More than one comma in the \emph{SNN} argument of \cmd{\Name} and friends will cause unwanted results. Fortunately, that is unlikely.
%
%  These macros keep track of whether the name ends with the period of an abbreviation like ``Jr.'' and ``Sr.'' That should also work with abbreviations like ``d.~\"{A}.'' (\textit{der \"{A}ltere}). Two periods are not printed when the full name is printed at the end of a sentence. The following example shows possible combinations:
% 
% \ForgetName[Martin Luther]{King, Jr.}%
% \begin{quote}\small
% \begin{tabular}{ll}
% |\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\
% |\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\
% |\Name[Martin Luther]{King, Jr.}| & \Name[Martin Luther]{King, Jr.} (e.g., in a sentence)\\
% |\Name*[Martin Luther]{King, Jr.}.| & \Name*[Martin Luther]{King, Jr.}.\\
% |\Name*[Martin Luther]{King, Jr.}| & \Name*[Martin Luther]{King, Jr.}
% \end{tabular}
% \end{quote}
%
% Using the default class option \texttt{nocomma} with suffix removal, one can take advantage of the suffix feature to tweak more possibilities out of \cmd{\Name}. Instead of the sobriquet feature, one could use the following variants:
%
% \begin{quote}\small\ForgetName{Sun, Yat-sen}
% \begin{tabular}{llp{1.2cm}ll}\hline
% {\large\strut}\emph{FNN} & \emph{SNN} & Alternate Names & Result & Function\\\hline
% (none) & \texttt{Louis, XIV} & (none) & \Name{Louis, XIV} & |\Name{Louis, XIV}|\\
% (none) & \texttt{Louis, XIV} & (none) & \Name{Louis, XIV} & |\Name{Louis, XIV}|\\
% (none) & \texttt{Sun, Yat-sen} & (none) & \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\\
% (none) & \texttt{Sun, Yat-sen} & (none) & \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 reference from ``Sun King'' to ``Louis XIV'' in the index. The sobriquet feature would otherwise prevent such usage.
%
% Even though suffix and sobriquet features look like they produce the same \emph{output} in the body text using the \texttt{nocomma} option, they are internally \emph{different}. They will not respect each other regarding ``first use,'' although they will (tentatively) cooperate in the index. Use each approach consistently. An example of ``dangerous'' use of these features occurs in Section \ref{sec:formatting}. The \texttt{comma} option will cause these forms above to have commas and behave differently. Again, \emph{caveat auctor}.
%
% \subsubsection{Pen Names: An Introduction}
% \label{sec:pennames}
% 
% The macro \cmd{\AKA} deals with pseudonyms, stage names, \emph{noms de plume}, etc. We already saw the suffix feature above as a workaround for sobriquets and Eastern names when using \cmd{\AKA}. Before we examine its function in detail, we touch on the only solution for some name forms, especially if one chooses 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) was Duke of Burgundy\break from 1404 to 1419.
% \egroup
%
% \index{Jean the Fearless|see{Jean sans Peur}}%
% \Name{Jean}[sans Peur] (Jean the Fearless) was Duke of Burgundy from 1404 to 1419.
% \end{quote}
%
% \noindent The suffix workaround also can work with the above example, but be careful; see Section \ref{sec:formatting}.  A more complicated example is:
% \begin{quote}
% \bgroup\ttfamily\footnotesize
% \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, so many modern scholars simply refer to him as \break |\Name{Thomas}[Aquinas]|.
% \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, so many modern scholars simply refer to him as \Name{Thomas}[Aquinas].
% \end{quote}
% 
% \subsubsection{\texttt{\bsc 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{alternate FNN}\marg{alternate SNN}\oarg{alt. names}\\
% \cmd{\AKA*}\oarg{FNN}\marg{SNN}\oarg{alternate FNN}\marg{alternate SNN}\oarg{alt. names}
% \end{quote}
%
% \noindent Notice that the \emph{FNN} and \emph{SNN} arguments \emph{do not accept} the third argument field of \cmd{\Name}. This means that one cannot use \cmd{\AKA} to create a \emph{see} reference to a name with a sobriquet or to an Eastern name unless one uses the suffix feature mentioned previously. Here is a quick review of what works and what fails:
%
% \begin{quote}\footnotesize
% \begin{tabular}{llllll}\hline
% {\normalsize\strut}\emph{FNN} & \emph{SNN} & Alt. \emph{FNN} & Alt. \emph{SNN} & Alt. names & Result \\\hline
% {\small\strut}\texttt{Bob} & \texttt{Hope} & \texttt{Leslie Townes} & \texttt{Hope} & (none) & success\\
% {\small\strut}\dag\texttt{Bob} & \texttt{Hope} & \texttt{Leslie Townes} & \texttt{Hope} & \texttt{Lester T.} & success\\\hline
% {\small\strut}(none) & \texttt{Louis} & \texttt{XIV} & \texttt{Sun King} & (none) & FAIL\\
% {\small\strut}\ddag(none) & \texttt{Louis, XIV} & (none) & \texttt{Sun King} & (none) & success\\\hline
% {\small\strut}(none) & \texttt{Gregory} & \texttt{I} & \texttt{Gregory} & \texttt{the Great} & FAIL\\
% {\small\strut}\S (none) & \texttt{Gregory, I} & (none) & \texttt{Gregory} & \texttt{the Great} & success\\\hline
% \end{tabular}
%
% \smallskip\dag{} This succeeds, but replaces ``Leslie Townes'' with ``Lester T.''\\
% \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 Since \cmd{\AKA} is designed to handle a number of otherwise incompatible needs, its use may be the most complex of all macros in this package. \cmd{\AKA} creates a cross reference. The target of this cross-reference is either \emph{SNN}, \emph{FNN} or just \emph{SNN}. The main entry in which the cross-reference occurs is constructed exactly like \cmd{\Name} handles its arguments. The \emph{alternate FNN} are replaced by the \emph{alternate names} if both exist. The \emph{alternate names} follow the \emph{alternate SNN} otherwise.
%
% The twist is the starred form \cmd{\AKA*}. If the starred form is used with the template (none)\marg{alternate SNN}\oarg{alt. names}, it only prints the \oarg{alt. names}. This allows it to be used in the manner of the example text in Section \ref{sec:example}. \cmd{\AKA} prints \marg{alternate SNN} followed by \oarg{alt. names}. A difference between this macro and \cmd{\Name} using sobriquets is that this macro creates a cross-reference and allows the ``sobriquet'' to be printed separately.
%
% \cmd{\AKA} only prints the alternate name. It assumes that a \cmd{\Name} macro occurs somewhere to create the page-indexed target of a cross-reference. No error checking otherwise occurs for this. The macro also prevents double periods.
%
%A brief example follows:
% 
% \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 The alternate name references generated by \cmd{\AKA} and \cmd{\AKA*} only work as cross-references and cannot be used with \cmd{\Name} and \cmd{\FName}, which print the alternate names and emit a warning. 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} if that is so. Use \cmd{\Name} for both the main and the alternate names. Then create manual cross-references with \cmd{\index}, e.g.:\bigskip
%
% \bgroup\footnotesize\index{Rambam|seealso{Maimonides}}
% \begin{tabular}{p{0.7in}ll}\hline
% Authoritative Name & Alternate Name & Example of Use\\\hline
% \Name{Maimonides} & \AKA{Maimonides}{Moses ben-Maimon} & |\AKA{Maimonides}{Moses ben-Maimon}|\\
% \Name{Maimonides} & \Name{Rambam} & |\Name{Rambam}%|\\& & \verb!\index{Rambam|seealso{Maimonides}}!\\\hline
% \end{tabular}
% \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{\bsc PName}}
%
% \DescribeMacro{\PName}
% \cmd{\PName} is a ``convenience macro'' that sacrifices flexibility for simplicity. It does not implement \cmd{\AKA*} and it works best with Western-style names. It calls \cmd{\Name} or \cmd{\Name*} and prints a Western-style ``main'' name. It then always calls \cmd{\AKA} with a full alternate name and prints it in parentheses. The syntax is:
% \begin{quote}
% \cmd{\PName}\oarg{FNN}\marg{SNN}\oarg{lesser-known FNN}\marg{lesser-known SNN}
% \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}
% |\PName*[Mark]{Twain}[Samuel L.]{Clemens}| compared to\\
% |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\
% Print \PName*[Mark]{Twain}[Samuel L.]{Clemens} the first time it appears. Later, print \PName*[Mark]{Twain}[Samuel L.]{Clemens}. The form \cmd{\PName} later just prints \PName[Mark]{Twain}[Samuel L.]{Clemens}.\\[1ex]
% |\PName*{Voltaire}[François-Marie]{Arouet}| and\\
% |\PName{Voltaire}[François-Marie]{Arouet}|\\
% Print \PName{Voltaire}[François-Marie]{Arouet} the first time it appears. Later, print \PName{Voltaire}[François-Marie]{Arouet}.
% \end{quote}
%
% \noindent If you use the unstarred forms  \cmd{\PName} and \cmd{\Name}, you must remember that, just because you include a full name as a parameter does not mean that the full name will print. You could end up with ambiguous references to the same last name, e.g., ``Snel van Royen.'' You are responsible for checking this.
%
% \subsection{Accented Names}
% \label{sec:accents}
% 
% The snippet on the next page from the preamble allows this document to be typeset with multiple engines. I used the following in the text to test what is being used:\\
%
% \bgroup\footnotesize%
% \noindent |\ifxetex\textsf{xelatex}%|\\
% |\else\ifluatex%|\\
% \hbox{\qquad}|\ifpdf\textsf{lualatex} in \texttt{pdf} mode%|\\
% \hbox{\qquad}|\else\textsf{lualatex} in \texttt{dvi} mode\fi%|\\
% \hbox{\quad}|\else%|\\
% \hbox{\qquad}|\ifpdf\textsf{pdflatex}%|\\
% \hbox{\qquad}|\else\textsf{latex}\fi\fi%|\\
% |\fi{}|\egroup
%
% \bgroup\footnotesize%
% \begin{tabular}{ll}
% |\usepackage{ifxetex}|\\
% |\usepackage{ifluatex}|\\
% |\ifxetex| & |% uses fontspec and other packages|\\
% \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| & |% with pdflatex and latex|\\
% \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\
% \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\
% \hbox{\quad}|\fi|\\
% |\fi|
% \end{tabular}
% \egroup\\
%
% \noindent 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}
% 
% \noindent \emph{Caveat}: If one uses \textsf{inputenc} with the \texttt{utf8} option together with \textsf{microtype} and the \textsf{memoir} class, \cmd{\Name}, etc. will cause \textsf{microtype} to emit errors if one uses accented characters apart from the list above. One can avoid this issue by manually formatting and indexing names that contain characters apart from the list. Control sequences like |\=a| also fail when using \textsf{makeindex} and \texttt{gind.ist} because the equal sign is interpreted as a ``literal.''
%
% Technically, \textsf{microtype} wants the control sequences fully expanded via \cmd{\edef} when comma suppression and suffix removal occur in \cmd{\Name} and \cmd{\FName}. Fixing that conflict puts accented characters directly into the \texttt{.aux} files when using \textsf{inputenc} with the \texttt{utf8} option and the indexing macros built into \textsf{memoir}. That causes a conflict with \textsf{inputenc}. The workaround for that is to use \cmd{\def}, which then conflicts with \textsf{microtype}. Until I can determine whether a permanent workaround exists, I have chosen the lesser of two package conflicts. If someone knows of a solution, I will implement it and give credit where it is due.
% \subsection{Name Formatting}
% \label{sec:formatting}
%
% \DescribeMacro{\NamesFormat}
% The first time a name is printed, it is formatted with the font attribute stored in \cmd{\NamesFormat}. This is set with the class options or manually. \cmd{\NamesFormat} can use either the command form or the declaration form of selecting font attributes, e.g., \cmd{\textsc} or \cmd{\scshape}. By redefining this macro, one can ``hook'' into the special typesetting of the first occurrence of a name. Consider the following:
%
% \begin{quote}
% |\renewcommand{\NamesFormat}[1]{\textbf{#1}%|\\
% |\ifinner\else\marginpar{\scriptsize #1}\fi}|
% \end{quote}
% 
% \noindent If we \cmd{\let} the value of \cmd{\NamesFormat} to save the current value and implement a temporary change like the above, we get:
% \let\oldformat\NamesFormat
% \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\scriptsize #1}\fi}
%
%\begin{quote}
% \bgroup\ttfamily |\Name{Vlad III}[Dracula]| became known as Vlad Ţepeş, ``The\break Impaler,''  after his death. He was the son of\break |\Name{Vlad II}[Dracul]|, a member of the Order of the Dragon. Later references to |\Name{Vlad III}[Dracula]| appear thus.\egroup
%
% \Name{Vlad III}[Dracula] became 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}
%
% \let\NamesFormat\oldformat
%
% \noindent After using \cmd{\let} to revert \cmd{\NamesFormat}, a first occurrence again takes the form: \ForgetName{Vlad III}[Dracula]\Name{Vlad III}[Dracula], while subsequent references are to \Name{Vlad III}[Dracula].\\
%
% Let me again stress that the forms above do not work with  \cmd{\PName} and \cmd{\AKA}. Consistently use either the suffix mechanism (Section \ref{sec:suffix}) or use as a guide the examples above for \Name*{Jean}[sans Peur] and \Name*{Thomas}[Aquinas]. If you use the suffix mechanism, you would use the following forms:
%
%\begin{quote}\ForgetName{Vlad III}[Dracula]\ForgetName{Vlad II}[Dracul]
% \bgroup\ttfamily |\Name{Vlad III, Dracula}| became known as \break |\AKA{Vlad III, Dracula}{Vlad}[Ţepeş]|,\break |``\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.\egroup
%
% \Name{Vlad III, Dracula} became 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 NOTE: The ``Dracula'' example is complex and the usual ``first use'' feature has been manipulated extensively to produce these results. If you mix casually the sobriquet and suffix forms, errors may ``bite.'' Puns aside, \Name{Vlad III}[Dracula] was a complex historical figure, as was his father, living in the no-man's land between the Ottoman Empire and the Holy Roman Empire.
%
% \subsection{Formatting Certain Sections}
% \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 formatting on and off. The mechanism works in a complementary, yet independent manner. It can be used throughout the document.
% 
% 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}
% 
% \subsection{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{Tweaks: \texttt{\bsc ForgetName} and \texttt{\bsc SubvertName}}
% \label{sec:Tweaks}
% 
% Using these two macros may hinder the arbitrary rearrangement of text. I suggest that one wait until the final draft before implementing them.
%
% \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 \emph{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 pseudonyms (see above) 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.''
%
% \StopEventually{\PrintChanges\clearpage\PrintIndex}
%
% \section{Implementation}
%
% \iffalse
%<*package>
% \fi
% \subsection{Class Options and Required Packages}
%
%    \begin{macrocode}
\newif\if@nameauth@DoFormat
\newif\if@nameauth@DoIndex
\newif\if@nameauth@DoComma
%    \end{macrocode}
% These Boolean values are used to control formatting, index suppression, and comma suppression. They all may be set with class options, but the first two can be toggled with the user interface macros \cmd{\NamesActive}---\cmd{\NamesInctive} and \cmd{\IndexActive}---\cmd{\IndexInctive}.\\
%
%    \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.\\
%
% \changes{v0.94}{2012/02/15}{Added capitalization feature}
%    \begin{macrocode}
\newif\if@nameauth@DoCaps
%    \end{macrocode}
% This Boolean triggers select first letter capitalization of names preceded by particles like \emph{de la} that may need occasional initial capitalization. That first letter capitalization happens only in \cmd{\Name}.\\
%
% \changes{v0.85}{2012/02/05}{Added nocomma, comma options}
% \changes{v0.94}{2012/02/15}{Added index, noindex options}
%    \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{comma}{\@nameauth@DoCommatrue}
\DeclareOption{nocomma}{\@nameauth@DoCommafalse}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
\ExecuteOptions{smallcaps,mainmatter,nocomma,index}
\ProcessOptions\relax
\RequirePackage{etoolbox}
\RequirePackage{xparse}
%    \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.\\
%
% \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.\bigskip\hrule\bigskip
% \noindent 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}
%    \begin{macrocode}
\newcommand*{\@nameauth@Root}[1]%
{%
     \@nameauth@TrimRoot#1\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. An extra comma is included at the end of the parameter when |\@nameauth@Root| is called directly from \cmd{\Name} and friends so that the delimiter list will always be correct. By using \cmd{\@nameauth@CheckComma} below, one can call this macro only when the parameter takes the form <a,b>. This allows one to select the root and suffix without having a trailing comma hanging about.
%
% \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@Suffix}
% \changes{v0.9}{2012/02/10}{added macro}
%    \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 governed by |@nameauth@Comma| and \cmd{\@nameauth@CheckComma} or else errors will result. This macro calls its auxiliary macro below.
%
% \begin{macro}{\@nameauth@TrimSuffix}
% \changes{v0.9}{2012/02/10}{added macro}
%    \begin{macrocode}
\def\@nameauth@TrimSuffix#1,#2\relax{#2}
%    \end{macrocode}
% \end{macro}
% This delimited-parameter macro strips off the first parameter and returns the second.
%
% \begin{macro}{\@nameauth@CheckComma}
% \changes{v0.85}{2012/02/05}{Add suffix handling functionality}
% \changes{v0.9}{2012/02/10}{Fix comma checking, now expandable}
%    \begin{macrocode}
\newcommand*{\@nameauth@CheckComma}[1]%
{%
     \@nameauth@CheckSuffix#1,\relax%
}
%    \end{macrocode}
% \end{macro}
% This macro checks for a comma-delimited suffix. It calls the auxiliary macro below.
% 
% \begin{macro}{\@nameauth@CheckSuffix}
% \changes{v0.9}{2012/02/10}{Added macro}
%    \begin{macrocode}
\def\@nameauth@CheckSuffix#1,#2\relax%
{%
     \def\Test{#2}%
     \ifx\Test\@empty\@nameauth@Commafalse\else\@nameauth@Commatrue\fi%
}
%    \end{macrocode}
% \end{macro}
% This macro checks for a comma-delimited suffix and sets the Boolean |@nameauth@Comma| true if the suffix is not equal to the empty string.\bigskip\hrule\bigskip
%\noindent 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.\bigskip\hrule\bigskip
%
% \noindent The following macros format the output for \cmd{\Name} and friends.
%
% \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}
\DeclareDocumentCommand\@nameauth@FmtName{s m}%
{%
    \@nameauth@DoCapsfalse%
    \@nameauth@TestDot{#2}%
    \IfBooleanTF{#1}%
          {#2}%
          {\bgroup\NamesFormat{#2}\egroup}%
}
%    \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.
%
% \begin{macro}{\@nameauth@Index}
% \changes{v0.94}{2012/02/15}{Added macro}
%    \begin{macrocode}
\newcommand{\@nameauth@Index}[1]{%
     \if@nameauth@DoIndex\index{#1}\fi%
}
%    \end{macrocode}
% \end{macro}
% If the indexing flag is true, create an index entry, otherwise do nothing.
%
% \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. All of the macros that manipulate strings through parametrized expansion appear to work best when called immediately in \cmd{\Name} and \cmd{\FName}.
%
% \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 on the second.
%
% \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}
% Toggle the capitalizing of particles. \cmd{\@nameauth@FmtName} always reverts the Boolean to false, thus localizing any changes until this is called again.
%
% \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}.}
%    \begin{macrocode}
\DeclareDocumentCommand\Name{s o m o}%
{%
     \edef\Surnames{#3}%
     \def\ISurnames{#3}%
     \if@nameauth@DoCaps%
          \def\Shortnames{\@nameauth@CapRoot{#3,}}%
     \else%
          \def\Shortnames{\@nameauth@Root{#3,}}%
     \fi%
     \if@nameauth@DoComma\else%
          \@nameauth@CheckComma{#3}%
          \if@nameauth@Comma%
               \edef\Surnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
               \def\ISurnames{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
          \fi%
     \fi%
     \IfValueTF{#2}%
     {\IfValueTF{#4}%
          {\def\Forenames{#4}}{\def\Forenames{#2}}%
     \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
               \expandafter\Forenames\expandafter\space\Surnames}%
          \PackageWarning{nameauth}%
          {\bsc Name Cross-reference: #2 #3 cannot be a page reference.}%
     \else%
          \if@nameauth@DoFormat%
               \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
               \IfBooleanTF{#1}%
                    {\expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                         \expandafter\Forenames\expandafter\space\Surnames}%
                         \@nameauth@Index{\ISurnames, #2}}%
                    {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
                         \@nameauth@Index{\ISurnames, #2}}%
               \else%
                    \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
                    \expandafter\@nameauth@FmtName\expandafter{%
                         \expandafter\Forenames\expandafter\space\Surnames}%
                         \@nameauth@Index{\ISurnames, #2}%
               \fi%
          \else%
               \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
               \IfBooleanTF{#1}%
                    {\expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                         \expandafter\Forenames\expandafter\space\Surnames}%
                         \@nameauth@Index{\ISurnames, #2}}%
                    {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
                         \@nameauth@Index{\ISurnames, #2}}%
               \else%
                    \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
                    \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
                         \expandafter\Forenames\expandafter\space\Surnames}%
                         \@nameauth@Index{\ISurnames, #2}%
               \fi%
          \fi%
     \fi}%
     {\IfValueTF{#4}
          {\ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname%
               \expandafter\@nameauth@FmtName\expandafter*%
                    \expandafter{\Surnames\space#4}%
               \PackageWarning{nameauth}%
               {\bsc Name Cross-reference: #3 #4 cannot be a page reference.}%
          \else%
               \if@nameauth@DoFormat%
                    \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname%
                    \IfBooleanTF{#1}%
                         {\expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames\space#4}%
                              \@nameauth@Index{\ISurnames\space#4}}%
                         {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
                              \@nameauth@Index{\ISurnames\space#4}}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#3#4!MN!}}{}%
                         \expandafter\@nameauth@FmtName\expandafter{%
                              \Surnames\space#4}%
                              \@nameauth@Index{\ISurnames\space#4}%
                     \fi%
               \else%
                    \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname%
                    \IfBooleanTF{#1}%
                         {\expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames\space#4}%
                              \@nameauth@Index{\ISurnames\space#4}}%
                         {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Shortnames}%
                              \@nameauth@Index{\ISurnames\space#4}}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#3#4!NF!}}{}%
                         \expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames\space#4}%
                              \@nameauth@Index{\ISurnames\space#4}%
                     \fi%
               \fi%
          \fi}%
          {\ifcsname\@nameauth@CleanName{#3!PN!}\endcsname%
               \expandafter\@nameauth@FmtName\expandafter*%
                    \expandafter{\Surnames}%
               \PackageWarning{nameauth}%
               {\bsc Name Cross-reference: #3 cannot be a page reference.}%
          \else%
               \if@nameauth@DoFormat%
                    \ifcsname\@nameauth@CleanName{#3!MN!}\endcsname%
                    \IfBooleanTF{#1}%
                         {\expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames}%
                              \@nameauth@Index{\ISurnames}}%
                         {\@nameauth@FmtName*{\Shortnames}%
                              \@nameauth@Index{\ISurnames}}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#3!MN!}}{}%
                         \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
                              \@nameauth@Index{\ISurnames}%
                     \fi%
               \else%
                    \ifcsname\@nameauth@CleanName{#3!NF!}\endcsname%
                    \IfBooleanTF{#1}%
                         {\expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames}%
                              \@nameauth@Index{\ISurnames}}%
                         {\@nameauth@FmtName*{\Shortnames}%
                              \@nameauth@Index{\ISurnames}}%
                     \else%
                         \csgdef{\@nameauth@CleanName{#3!NF!}}{}%
                         \expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames}%
                              \@nameauth@Index{\ISurnames}%
                    \fi%
               \fi%
          \fi}%
     }%
     \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\Name} is the heart of this package. \Name*[Marc van]{Dongen} provided the basic structure.
%
%The reason why one sees seven outcomes repeated three times for twenty-one variations is because one must make different decisions based on the dynamic interaction of many factors beyond mere input. Three choices occur when one tries to use an ``alternate name'' defined by \cmd{\AKA} as an argument to \cmd{\Name}. The latter prints the arguments with comma suppression if appropriate, emits a warning, and exits. One cannot use \cmd{\ForgetName} to expunge a pen name. This is a deliberate decision to avoid corruption of the index cross-references.
%
% Regarding the remaining eighteen branches, one cannot assume that the name will terminate with a suffix like ``Jr.'' until a check has been run to determine if the suffix should be truncated. The Boolean and value parameters offer eight valid patterns of input. The first or subsequent use are two more, as are front or main matter use. Operations on suffixes are governed by the first or subsequent use. The formatting or non-formatting of output is governed both by a formatting Boolean and by first/subsequent use. A final choice deals with handling alternate names in the \cmd{\Forenames} macro.
%
% Here is how these many factors interrelate: \cmd{\Name} first checks for comma suppression. if so it stores a comma-suppressed version of the third parameter in \cmd{\Surnames}. Otherwise it stores an unchanged version in \cmd{\Surnames} and \cmd{\ISurnames}. The former needs to be fully expanded for the double-period checking to work, thus using \cmd{\edef}. The latter should not be fully expanded when using the \textsf{memoir} class with the utf8 option of \textsf{inputenc}. This will be passed respectively to \cmd{\@nameauth@FmtName} and \cmd{\@nameauth@Index}.\\
% 
%\noindent \cmd{\Name} then checks for the forenames argument. Two outcomes are possible.
% \begin{enumerate}
% \item Forenames are present. In this case, the alternate names argument creates two choices.
% \begin{enumerate}
% \item The alternate names replace the forenames in the printed form, not the indexed form.
% \item The absence of alternate names will result in the forenames being used for both forms.
% \end{enumerate}
% \item Forenames are absent. In that case, the alternate names argument creates two different choices.
% \begin{enumerate}
% \item The alternate names are appended to the surnames in both printed and indexed forms.
% \item Only the surnames are used.
% \end{enumerate}
% \end{enumerate}
%
% The next branch involves the Boolean value \texttt{@nameauth@DoFormat}, which is controlled by \cmd{\NamesActive} and \cmd{\NamesInactive}. If formatting is active, choose the unstarred form of \cmd{\@nameauth@FmtName}, which applies the formatting hook. Otherwise use the starred form that applies no formatting.
%
% The state of  \texttt{@nameauth@DoFormat} also controls the suffix used in the control sequences: \texttt{!MN!} for main name or \texttt{!NF!} for no format. This is the heart of the \texttt{frontmatter} / \texttt{mainmatter} mechanism.
%
% Where longer and shorter versions of names are printed, there the star parameter controls those outcomes. Comma suppression is used or not, as appropriate, in the index entries. Note again that one must always use commas with suffixes in the input, even if commas are suppressed in the output.
%
% 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}.}
%    \begin{macrocode}
\DeclareDocumentCommand\FName{o m o}%
{%
     \edef\Surnames{#2}%
     \def\ISurnames{#2}%
     \if@nameauth@DoComma\else%
          \@nameauth@CheckComma{#2}%
          \if@nameauth@Comma%
               \edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
               \def\ISurnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
          \fi%
     \fi%
    \IfValueTF{#1}%
     {\IfValueTF{#3}{\edef\Forenames{#3}}{\edef\Forenames{#1}}%
     \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
          \expandafter\@nameauth@FmtName\expandafter*%
               \expandafter{\Forenames}%
          \PackageWarning{nameauth}%
          {\bsc FName Cross-reference: #1 #2 cannot be a page reference.}%
     \else%
          \if@nameauth@DoFormat%
               \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
                    \expandafter\@nameauth@FmtName\expandafter*%
                         \expandafter{\Forenames}%
                    \@nameauth@Index{\ISurnames, #1}%
               \else%
                    \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
                    \expandafter\@nameauth@FmtName\expandafter{%
                        \expandafter\Forenames\expandafter\space\Surnames}%
                    \@nameauth@Index{\ISurnames, #1}%
               \fi%
          \else%
               \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
                   \expandafter\@nameauth@FmtName\expandafter*%
                         \expandafter{\Forenames}%
                   \@nameauth@Index{\ISurnames, #1}%
               \else%
                    \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
                    \expandafter\@nameauth@FmtName\expandafter*%
                         \expandafter{\Forenames\expandafter\space\Surnames}%
                    \@nameauth@Index{\ISurnames, #1}%
               \fi%
          \fi%
     \fi}%
     {\IfValueTF{#3}
          {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
               \expandafter\@nameauth@FmtName\expandafter*%
                    \expandafter{\Surnames\space#3}%
               \PackageWarning{nameauth}%
               {\bsc FName Cross-reference: #2 #3 cannot be a page reference.}%
          \else%
               \if@nameauth@DoFormat%
                    \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
                         \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
                         \@nameauth@Index{\ISurnames\space#3}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
                         \expandafter\@nameauth@FmtName%
                              \expandafter{\Surnames\space#3}%
                         \@nameauth@Index{\ISurnames\space#3}%
                     \fi%
               \else%
                    \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
                         \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
                         \@nameauth@Index{\ISurnames\space#3}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
                              \expandafter\@nameauth@FmtName\expandafter*%
                         \expandafter{\Surnames\space#3}%
                         \@nameauth@Index{\ISurnames\space#3}%
                     \fi%
               \fi%
          \fi}%
          {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
               \expandafter\@nameauth@FmtName\expandafter*%
                    \expandafter{\Surnames}%
               \PackageWarning{nameauth}%
               {\bsc FName Cross-reference: #2 cannot be a page reference.}%
          \else%
               \if@nameauth@DoFormat%
                    \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
                         \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
                         \@nameauth@Index{\ISurnames}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
                         \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
                         \@nameauth@Index{\ISurnames}%
                     \fi%
               \else%
                    \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
                         \@nameauth@FmtName*{\@nameauth@Root{#2,}}%
                         \@nameauth@Index{\ISurnames}%
                     \else%
                         \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
                         \expandafter\@nameauth@FmtName\expandafter*%
                              \expandafter{\Surnames}%
                         \@nameauth@Index{\ISurnames}%
                    \fi%
               \fi%
          \fi}%
     }%
     \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\FName} is derived from \cmd{\Name} and uses its logic to print forename(s) in a subsequent use. It obeys the \texttt{nocomma} option and eliminates double periods.
%
% \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}
%    \begin{macrocode}
\DeclareDocumentCommand\AKA{s o m o m o}%
{%
     \def\Surnamesi{#3}%
     \def\Surnamesii{#5}%
     \if@nameauth@DoComma\else%
          \@nameauth@CheckComma{#3}%
          \if@nameauth@Comma%
               \def\Surnamesi{\@nameauth@Root{#3}\@nameauth@Suffix{#3}}%
          \fi%
          \@nameauth@CheckComma{#5}%
          \if@nameauth@Comma%
               \def\Surnamesii{\@nameauth@Root{#5}\@nameauth@Suffix{#5}}%
          \fi%
     \fi%
     \IfValueTF{#4}%
     {\IfValueTF{#6}%
          {\edef\Forenames{#6}}{\edef\Forenames{#4}}%
          \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
               \expandafter\Forenames\expandafter\space\Surnamesii}%
          \ifcsname\@nameauth@CleanName{#4#5!PN!}\endcsname%
               \PackageWarning{nameauth}%
               { \bsc AKA XRef: #1 #2 exists.}%
          \else%
               \ifcsname\@nameauth@CleanName{#4#5!MN!}\endcsname%
                    \PackageWarning{nameauth}%
                    { \bsc AKA Name reference: #4 #5 already exists; no see ref.}%
               \else%
                    \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
                         \PackageWarning{nameauth}%
                         { \bsc AKA Name reference: #4 #5 already exists; no see ref.}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#4#5!PN!}}{}%
                         \IfValueTF{#2}%
                              {\@nameauth@Index{\Surnamesii, #4|see{\Surnamesi, #2}}}%
                              {\@nameauth@Index{\Surnamesii, #4|see{\Surnamesi}}}%
                    \fi%
               \fi%
          \fi}%
     {\IfValueTF{#6}%
          {\IfBooleanTF{#1}%
               {\@nameauth@FmtName*{#6}}%
               {\expandafter\@nameauth@FmtName\expandafter*%
                    \expandafter{\Surnamesii\space#6}}%
          \ifcsname\@nameauth@CleanName{#5#6!PN!}\endcsname\relax%
          \else%
               \ifcsname\@nameauth@CleanName{#5#6!MN!}\endcsname%
                    \PackageWarning{nameauth}%
                    {\bsc AKA Name reference: #5 #6 already exists; no see ref.}%
               \else%
                    \ifcsname\@nameauth@CleanName{#5#6!NF!}\endcsname%
                         \PackageWarning{nameauth}%
                         {\bsc AKA Name reference: #5 #6 already exists; no see ref.}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#5#6!PN!}}{}%
                         \IfValueTF{#2}%
                              {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi, #2}}}%
                              {\@nameauth@Index{\Surnamesii\space#6|see{\Surnamesi}}}%
                    \fi%
               \fi%
          \fi}%
          {\expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesii}%
          \ifcsname\@nameauth@CleanName{#5!PN!}\endcsname\relax%
          \else%
               \ifcsname\@nameauth@CleanName{#5!MN!}\endcsname%
                    \PackageWarning{nameauth}%
                    {\bsc AKA Name reference: #5 already exists; no see ref.}%
               \else%
                    \ifcsname\@nameauth@CleanName{#5!NF!}\endcsname%
                         \PackageWarning{nameauth}%
                         {\bsc AKA Name reference: #5 already exists; no see ref.}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#5!PN!}}{}%
                         \IfValueTF{#2}%
                              {\@nameauth@Index{\Surnamesii|see{\Surnamesi, #2}}}%
                              {\@nameauth@Index{\Surnamesii|see{\Surnamesi}}}%
                    \fi%
               \fi%
          \fi}%
     }%
     \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
}
%    \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}
\DeclareDocumentCommand\PName{s o m o m o}%
{%
     \IfBooleanTF{#1}{\Name*[#2]{#3}}{\Name[#2]{#3}}%
     {\space}(\AKA[#2]{#3}[#4]{#5}[#6])%
}
%    \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}{\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}
%    \begin{macrocode}
\DeclareDocumentCommand\IndexName{o m o}%
{%
     \def\Surnames{#2}%
     \if@nameauth@DoComma\else%
          \@nameauth@CheckComma{#2}%
          \if@nameauth@Comma%
               \edef\Surnames{\@nameauth@Root{#2}\@nameauth@Suffix{#2}}%
          \fi%
     \fi%
     \IfValueTF{#1}%
          {\ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
               \else%
                    \@nameauth@Index{\Surnames, #1}%
               \fi}%
          {\IfValueTF{#3}
               {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
               \else%
                    \@nameauth@Index{\Surnames\space#3}%
               \fi}%
               {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
               \else%
                    \@nameauth@Index{\Surnames}%
               \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}
\DeclareDocumentCommand\ExcludeName{o m o}%
{%
     \IfValueTF{#1}%
     {%
          \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
               \PackageWarning{nameauth}%
               {\bsc ExcludeName XRef: #1 #2 exists.}%
          \else%
               \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
                    \PackageWarning{nameauth}%
                    {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}%
               \else%
                    \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
                         \PackageWarning{nameauth}%
                         {\bsc ExcludeName Reference: #1 #2 already exists; no exclusion.}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}%
                    \fi%
               \fi%
          \fi}%
     {\IfValueTF{#3}%
          {\ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname\relax%
          \else%
               \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
                    \PackageWarning{nameauth}%
                    {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}%
               \else%
                    \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
                         \PackageWarning{nameauth}%
                         {\bsc ExcludeName Reference: #2 #3 already exists; no exclusion.}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}%
                    \fi%
               \fi%
          \fi}%
          {\ifcsname\@nameauth@CleanName{#2!PN!}\endcsname\relax%
          \else%
               \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
                    \PackageWarning{nameauth}%
                    {\bsc ExcludeName Reference: #2 already exists; no exclusion.}%
               \else%
                    \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
                         \PackageWarning{nameauth}%
                         {\bsc ExcludeName Reference: #2 already exists; no exclusion.}%
                    \else%
                         \csgdef{\@nameauth@CleanName{#2!PN!}}{}%
                    \fi%
               \fi%
          \fi}%
     }%
}
%    \end{macrocode}
% \end{macro}
% This macro prevents a name from being indexed by using the exclusion mechanism of \cmd{\AKA} to prevent the other macros from indexing a name. The result is that \cmd{\Name} and friends will print their arguments, emit a warning, and continue.\clearpage
%
% \begin{macro}{\ForgetName}
% \changes{v0.75}{2012/01/19}{New parameter added}
%    \begin{macrocode}
\DeclareDocumentCommand\ForgetName{o m o}%
{%
     \IfValueTF{#1}%
          {\csundef{\@nameauth@CleanName{#1#2!MN!}}%
          \csundef{\@nameauth@CleanName{#1#2!NF!}}}%
          {\IfValueTF{#3}%
               {\csundef{\@nameauth@CleanName{#2#3!MN!}}%
               \csundef{\@nameauth@CleanName{#2#3!NF!}}}%
               {\csundef{\@nameauth@CleanName{#2!MN!}}%
               \csundef{\@nameauth@CleanName{#2!NF!}}}%
          }%
}
%    \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}
\DeclareDocumentCommand\SubvertName{o m o}%
{%
     \IfValueTF{#1}%
          {\csgdef{\@nameauth@CleanName{#1#2!MN!}}%
          \csgdef{\@nameauth@CleanName{#1#2!NF!}}}%
          {\IfValueTF{#3}%
               {\csgdef{\@nameauth@CleanName{#2#3!MN!}}%
               \csgdef{\@nameauth@CleanName{#2#3!NF!}}}%
               {\csgdef{\@nameauth@CleanName{#2!MN!}}%
               \csgdef{\@nameauth@CleanName{#2!NF!}}}%
          }%
}
%    \end{macrocode}
% \end{macro}
% \cmd{\SubvertName} defines control sequences to suppress the ``first use'' of \cmd{\Name}.\bigskip\hrule\bigskip
%
% \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}
%
% \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