Debian Codegraph @

texmf-dist/source/latex/nameauth/nameauth.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2025 by Charles P. Schaum <charles[dot][email protected]>
4 % -----------------------------------------------
5 %
6 % This file may be distributed and/or modified under the
7 % conditions of the LaTeX Project Public License, either
8 % version 1.3 of this license or (at your option) any
9 % later version. The latest version of this license is in:
10 %
11 % http://www.latex-project.org/lppl.txt
12 %
13 % and version 1.3 or later is part of all distributions
14 % of LaTeX version 2005/12/01 or later.
15 %
16 % This work includes all source and generated files
17 % described as such in README.md, included herein.
18 %
19 % -----------------------------------------------
20 %
21 %<*internal>
22 \iffalse
23 %</internal>
24 %<*readme>
25 %<<readmevb
26 # 1 Short Description
27
28 The `nameauth` package automates the correct formatting and indexing of names for professional writing. This aids the use of a name authority and the editing process without needing to retype name instances.
29
30 # 2 Installing a Distro Package
31
32 One can find `nameauth` in one's current TeX distribution. See the appropriate documentation in TeXlive, MikTeX, MacTeX, Linux distro, BSD, etc. Use those tools to ensure that `nameauth` is installed. **You are done.**
33
34 # 3 Obtaining from CTAN
35
36 ## 3.1 Getting the Package Archive
37
38 If not using the tools above, one can download `nameauth.zip` from [CTAN](https://mirrors.ctan.org/macros/latex/contrib/nameauth.zip). After downloading, unpack `nameauth.zip` in an appropriate directory. Change to the directory containing the supplied files. The following files are included in the archive that is uploaded to CTAN:
39
40 | Filename | Description |
41 | :------------- | :------------------------- |
42 | *Source* | |
43 | `Makefile` | for use with GNU make |
44 | `cat01.pdf` | manual illustration, ch. 7 |
45 | `beamer01.pdf` | manual illustration, ch. 9 |
46 | `beamer02.pdf` | manual illustration, ch. 9 |
47 | `beamer03.pdf` | manual illustration, ch. 9 |
48 | `nameauth.dtx` | commented macro file |
49 | *Generated* | |
50 | `compat.tex` | compatibility module |
51 | `examples.tex` | example file |
52 | `README.md` | this file |
53 | *Built* | |
54 | `nameauth.pdf` | package documentation |
55
56 ## 3.2 Determining the Installation type
57
58 ### 3.2.1 Read `Makefile` First
59
60 `Makefile` has an extensive comment on usage, as well as other helpful comments. It lists all required programs needed to use the GNU make file for installation in a POSIX-compliant environment, such as GNU/Linux, various BSDs, MacOS, and WSL or Cygwin on Windows.
61
62 Minimum required programs include `bash` or an equivalent shell (for which one must edit `Makefile`), and `make`, plus a TeX distribution. To distribute the package, one also requires at least `sed`, and `zip`.
63
64 ### 3.2.2 POSIX Cases
65
66 If one is using a TeX distribution in a POSIX environment (MacOS, Linux distro, BSD, etc.) and has the required programs listed in `Makefile`, one may do one of the following:
67
68 1. Use GNU make to build and install. **Section 4.1**
69
70 2. Build and install manually. **Section 4.2**
71
72 ### 3.2.3 Windows Cases
73
74 Windows offers the largest number of possibilities:
75
76 * Cygwin offers a POSIX environment and its own TeX distribution. Avoid installing another TeX distro via WSL or Windows native. **Section 4.1**
77
78 * WSL offers a POSIX environment and its own TeX distribution. Avoid installing another TeX distro via Cygwin or Windows native. **Section 4.1**
79
80 * Use `make` within either Cygwin or WSL to build this package for native Windows TeX distributions MikTeX or TeXlive. Install needed build components in either Cygwin or WSL, alongside either MikTeX or TeXlive, but not both distros. Avoid installing another TeX distro in either Cygwin or WSL.
81
82 * One can use `make` to build this package. **Section 4.1.1**
83
84 * Installation must be manual. **Section 4.2.2**
85
86 * Directly using native Windows TeX distributions (MikTeX or TeXlive)
87
88 All building and installation must be manual. **Section 4.2**
89
90 * Other POSIX environments running under DOS, Windows, and other systems have not been tested and are not supported.
91
92 * `Makefile` contains tests that will mitigate some issues:
93
94 * If a `.exe` extension is needed by programs used in the building process, that is detected automatically.
95
96 * If `ltxfileinfo` does not exist, the make process will produce a zip file that avoids potential problems in Windows.
97
98 * If `dvipdf` from Ghostscript is installed, the make process will use that. Otherwise it will fall back to `dvipdfmx`.
99
100 * If `pdfjam` is installed, the make process uses it. Otherwise, it will instruct the user to proceed manually. **Section 6.2.3**
101
102 * When installing, the make process will check if the path to the install directory exists. If it does not, it will produce an error message and exit.
103
104 If this error message occurs, which is more likely in Windows, please refer to installation of local packages in MikTeX [here](https://docs.miktex.org/manual/localadditions.html#id573803) and [here](https://miktex.org/kb/texmf-roots). Otherwise see the [TeX FAQ](https://www.texfaq.org/FAQ-privinst) and [this page](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages).
105
106 Here is a table showing the feasibility of a few scenarios. Any case that is not mentioned below has not been tested and is not recommended.
107
108 | Build Env. | TeX Distro Platform | Make builds pkg/zip | Make installs package |
109 | :--------- | :------------------ | :----------------------------- | :------------------------------ |
110 | POSIX | POSIX | Yes<sup>1</sup> | Yes |
111 | Cygwin | Cygwin (packages) | Not tested; likely<sup>1</sup> | Not tested; likely <sup>2</sup> |
112 | Cygwin | MikTeX (Windows) | Yes<sup>1, 3</sup> | No;<sup>4</sup> do manually |
113 | Cygwin | TeXlive (Windows) | Not tested; likely<sup>1</sup> | Not tested; do manually |
114 | WSL | WSL Linux packages | Yes<sup>1</sup> | Yes<sup>5</sup> |
115 | WSL | MikTeX (Windows) | Yes<sup>1, 3</sup> | No;<sup>4</sup> do manually |
116 | WSL | TeXlive (Windows) | Not tested; likely<sup>1</sup> | Not tested; do manually |
117
118 <sup>1</sup> All dependencies must be met. Bear in mind possible MacOS issues.
119
120 <sup>2</sup> Installs only to Cygwin environment; not to Windows environment.
121
122 <sup>3</sup> The `make images` target using `pdfjam` likely will not work as desired. **Section 6.2.3 Images**
123
124 <sup>4</sup> Neither `ltxfileinfo` nor `kpsewhich` will give useful results; do a manual install.
125
126 <sup>5</sup> Installs only to WSL Linux distro environment; not to Windows environment.
127
128 # 4 Building and Installing
129
130 Regarding command line options longer than one letter, the programs included with major TeX distributions, except for `pdfjam`, use either single dashes or GNU-style double dashes.
131
132 Here, for the sake of consistency, we use the GNU convention of single dashes with one-letter options and double dashes for longer options.
133
134 ## 4.1 GNU `make` for Building and Installation
135
136 ### 4.1.1 Build
137
138 In the directory where the files unpacked from the zip archive are located, type `make`. This will do a fresh build of the package using `pdflatex`. To add more options, use, e.g.: `make ADDOPTS="--synctex=1"`.
139
140 There is a make target, `make unpack`, that does not build the package. It only regenerates files from `nameauth.dtx`.
141
142 ### 4.1.2 Install
143
144 Currently, `Makefile` only installs into POSIX environments.
145
146 For individual use, one must have a TDS-compliant tree set up in order for installation to work. For more info in setting up those trees, see **Section 4.2.3** for the individual case and **Section 4.2.4** for the site-wide case.
147
148 For site-wide use, one must be able to get root privileges via `sudo`.
149
150 * Type `make inst` to install the package files in the user's personal TDS-compliant directory tree.
151
152 * Type `make install` to install the package files in the site-wide, local TDS-compliant directory tree. The user will be prompted for the `sudo` password.
153
154 ### 4.1.3 Remove
155
156 The same constraints that apply to installation also apply to removal. If one can do the former, one can do the latter.
157
158 * Type `make uninst` to remove the package files in the user's personal TDS-compliant directory tree.
159
160 * Type `make uninstall` to remove the package files in the site-wide, local TDS-compliant directory tree. The user will be prompted for the `sudo` password.
161
162 `Makefile` will produce listings from the remaining texmf trees after uninstalling the package.
163
164 ## 4.2 Manual Building and Installation
165
166 Unlike the case with the supplied `Makefile`, which automates adding extensions, in certain cases using Windows TeX distros, one may have to add the ".exe" extension to the programs.
167
168 ### 4.2.1 Build
169
170 1. Using the unpacked files from the zip archive, we begin by creating the installation driver, unpacking additional files from `nameauth.dtx`, and generating a copy of the documentation without the table of contents and cross-references:
171
172 pdflatex --shell-escape --recorder --interaction=batchmode nameauth.dtx
173
174 a. We see the following main files:
175
176 `Makefile`, `cat01.pdf`, `beamer01.pdf`, `beamer02.pdf`, `beamer03.pdf`, `nameauth.dtx`, `compat.tex`, `examples.tex`, `nameauth.pdf`, `README.md`, `nameauth.ins`, and `nameauth.sty`.
177
178 b. We also see the following temporary files:
179
180 `nameauth.aux`, `nameauth.fls`, `nameauth.glo`, `nameauth.hd`, `nameauth.idx`, `nameauth.log`, `nameauth.out`, `nameauth.tmp`, and `nameauth.toc`.
181
182 2. Generate the TOC and cross-references within the documentation:
183
184 pdflatex --recorder --interaction=nonstopmode nameauth.dtx
185
186 3. Generate the index and glossary files using `makeindex`:
187
188 makeindex -q -s gglo.ist -o nameauth.gls nameauth.glo
189 makeindex -q -s gind.ist -o nameauth.ind nameauth.idx
190
191 This adds three files: `nameauth.gls`, `nameauth.ilg`, and `nameauth.ind`.
192
193 4. Integrate the glossary (list of changes) and index into the documentation. The second run updates the TOC:
194
195 pdflatex --recorder --interaction=nonstopmode nameauth.dtx
196 pdflatex --recorder --interaction=nonstopmode nameauth.dtx
197
198 The list of files now looks like:
199
200 | Filename | Description |
201 | :------------- | :--------------------------- |
202 | `Makefile` | for use with GNU make |
203 | `cat01.pdf` | manual illustration, ch. 7 |
204 | `beamer01.pdf` | manual illustration, ch. 9 |
205 | `beamer02.pdf` | manual illustration, ch. 9 |
206 | `beamer03.pdf` | manual illustration, ch. 9 |
207 | `nameauth.dtx` | commented style file |
208 | | |
209 | `compat.tex` | compatibility module |
210 | `examples.tex` | example file |
211 | `nameauth.pdf` | package documentation |
212 | `README.md` | this file |
213 | | |
214 | `nameauth.ins` | installation driver |
215 | `nameauth.sty` | style file |
216 | | |
217 | `nameauth.aux` | auxiliary file |
218 | `nameauth.fls` | shows files read |
219 | `nameauth.glo` | raw glossary entries |
220 | `nameauth.hd` | |
221 | `nameauth.idx` | raw index entries |
222 | `nameauth.log` | log file |
223 | `nameauth.out` | pdf bookmark/hypertext info |
224 | `nameauth.tmp` | temp file used with fancyvrb |
225 | `nameauth.toc` | table of contents info |
226 | `manhook.tmp` | snippet with manual's fmt |
227 | `nullhook.tmp | snippet with default format |
228 | | |
229 | `nameauth.gls` | typeset glossary entries |
230 | `nameauth.ilg` | `makeindex` log file |
231 | `nameauth.ind` | typeset index entries |
232
233 ### 4.2.2 General Install Info
234
235 In order to perform manual installation, one should be familiar with the general information at the [TeX FAQ](https://www.texfaq.org/FAQ-installthings).
236
237 Different TeX distributions have somewhat different ways to store TDS-compliant configuration and package data. See, for example, for MikTeX [here](https://docs.miktex.org/manual/localadditions.html#id573803) and [here](https://miktex.org/kb/texmf-roots). Otherwise see the [TeX FAQ](https://www.texfaq.org/FAQ-privinst) and [this page](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages).
238
239 The instructions below conform generally to a Unix-like system. There are some cases under Windows where this method may not work. For other non-POSIX systems, one will have to know the appropriate procedures and documentation as needed for those cases, which are not covered here.
240
241 The user must already have a TDS-compliant tree set up in order for installation to work. We assume that one knows how to become superuser, create directories, move files, and the like.
242
243 ### 4.2.3 Install for a User
244
245 `TEXMFHOME` is an environment (shell) variable that points to the root of a TDS-compliant directory tree available to a user. To get its value on POSIX-compliant systems, use:
246
247 * `kpsewhich --var-value TEXMFHOME`
248
249 Quite often, `$TEXMFHOME` is equivalent to `$HOME/texmf`. The dollar sign in front of the variable denotes the value of the variable instead of its name. If `$HOME` is `/home/bob`, then `$TEXMFHOME` would be `/home/bob/texmf`. We can understand the following paths to be under this home directory.
250
251 | Path | Files |
252 | :--------------------------------- | :------------- |
253 | `$TEXMFHOME/source/latex/nameauth` | `Makefile` |
254 | | `cat01.pdf` |
255 | | `beamer01.pdf` |
256 | | `beamer02.pdf` |
257 | | `beamer03.pdf` |
258 | | `nameauth.dtx` |
259 | | |
260 | `$TEXMFHOME/doc/latex/nameauth` | `compat.tex` |
261 | | `examples.tex` |
262 | | `nameauth.pdf` |
263 | | `README.md` |
264 | | |
265 | `$TEXMFHOME/tex/latex/nameauth` | `nameauth.sty` |
266
267 Create the directories in the left-hand column, or the equivalent. For manual installation, move or copy the files in the right-hand column to their respective directories in the left-hand column. On older TeX distributions, run `mktexlsr` on `$TEXMFHOME` to complete the install process (current distributions may not need this).
268
269 ### 4.2.4 Install Site-Wide
270
271 `TEXMFLOCAL` is a variable that points to the root of a TDS-compliant directory tree available to all users on a local site, system-wide installation. To get its value, use:
272
273 * `kpsewhich --var-value TEXMFLOCAL`
274
275 See the [TeX FAQ](https://www.texfaq.org/FAQ-what-TDS). We can understand the following paths to be under this local site, system-wide directory:
276
277 | Path | Files |
278 | :---------------------------------- | :------------- |
279 | `$TEXMFLOCAL/source/latex/nameauth` | `Makefile` |
280 | | `cat01.pdf` |
281 | | `beamer01.pdf` |
282 | | `beamer02.pdf` |
283 | | `beamer03.pdf` |
284 | | `nameauth.dtx` |
285 | | |
286 | `$TEXMFLOCAL/doc/latex/nameauth` | `compat.tex` |
287 | | `examples.tex` |
288 | | `nameauth.pdf` |
289 | | `README.md` |
290 | | |
291 | `$TEXMFLOCAL/tex/latex/nameauth` | `nameauth.sty` |
292
293 Create the directories in the left-hand column. For manual installation, move or copy the files in the right-hand column to their respective directories in the left-hand column. Change file ownership as needed. If needed, run `mktexlsr` with the appropriate permissions on `$TEXMFLOCAL` to complete the install process. See also the discussion on [this page](https://tex.stackexchange.com/questions/45231/how-to-install-system-wide-packages-without-requiring-an-ls-r-database-with-tex).
294
295 # 5 More on Package Building
296
297 * The package and manual build on current and older TeX distributions, being designed with that in mind.
298
299 * The documentation is built only with `pdflatex` for the sake of its design elements. The examples and tests can be built with any LaTeX engine.
300
301 * This release was tested on Linux (Pop! OS; vanilla TL, both current and 2017) and Windows 10 (MikTeX using shells from both Cygwin and WSL). Using TL 2017, this release was tested on the full manuscript of the published volume, *Breath of God, Yet Work of Man: Scripture, Philosophy, Dialogue, and Conflict*, with Dr. Albert B. Collver III.
302
303 * The CTAN release was created with the current vanilla TL on Pop! OS. See also [this page](https://wiki.debian.org/TeXLive) for Debian-based systems. For Arch-based systems, the AUR has a package that takes care of dependencies.
304
305 * TeXlive versions are managed on Pop! OS using [tl-switch](https://github.com/ServusCarolus/tl-switch).
306
307 * Four pdf files (`cat01.pdf` and `beamer*.pdf`) used in graphic illustrations are created from the output of test files associated with this manual (see below). Normally, the user need not generate them; they are supplied as source files.
308
309 # 6 Examples / Testing
310
311 The file `examples.tex` also includes `compat.tex`; they should be in the same directory when compiled. The examples document should be enough to illustrate various non-trivial features of this package. It includes most of the longer examples in the manual, edited to fit together in a single document. It also includes other material and tests.
312
313 In addition to this file, a special run of `nameauth.dtx` that defines the macro `\NameauthDoTestFiles` will generate many separate test files. They are not included in the package archive by default.
314
315 To test `nameauth`, either test the files right after installing, or create a new testing directory. One then can copy the files from the TDS-compliant source dir and optionally, the documentation directory as well, or unpack the CTAN zip file into the test directory and build the package.
316
317 ## 6.1 Using GNU `make`
318
319 ### 6.1.1 Examples
320
321 * Use the default: `make examples`.
322
323 * If one wants to change engines and re-test the file, type `make exclean`.
324
325 * To create `examples.pdf` with other LaTeX engines, one can do the following:
326
327 make examples ENGINE=xelatex
328 make examples ENGINE=lualatex
329 make examples ENGINE=dvilualatex
330 make examples ENGINE=latex
331
332 * To add more options, use, e.g.:
333
334 make examples ADDOPTS="--synctex=1"
335
336 ### 6.1.2 Tests
337
338 This will produce many test files numbered by chapter and example within that chapter from the `nameauth.dtx` file. By default it will compile all of the test files using `pdflatex`.
339
340 * To generate test files, type `make tests`.
341
342 * If one wants to change engines and re-test the files, type `make testclean`.
343
344 * One can add the value of ENGINE:
345
346 make tests ENGINE=xelatex
347 make tests ENGINE=lualatex
348 make tests ENGINE=dvilualatex
349 make tests ENGINE=latex
350
351 * To add more options, use, e.g.:
352
353 make tests ADDOPTS="--synctex=1"
354
355 ### 6.1.3 Manual Illustrations
356
357 Four manual illustrations are based on included tests. If, for some reason, one wanted to create those illustrations (usually not required), one would type `make images`.
358
359 ## 6.2 Manual Method
360
361 ### 6.2.1 Examples
362
363 * Compile `examples.tex`.
364
365 In the following command lines, one may substitute `latex`, `xelatex`, `lualatex`, and `dvilualatex` for `pdflatex`.
366
367 pdflatex --interaction=nonstopmode examples
368 pdflatex --interaction=nonstopmode examples
369 makeindex -o examples.ind examples.idx
370
371 * This next line is needed because the `index` package makes an index of persons.
372
373 makeindex -o examples.rnd examples.rdx
374
375 * These lines complete the indexes and TOC.
376
377 pdflatex --interaction=nonstopmode examples
378 pdflatex --interaction=nonstopmode examples
379
380 * Another step is used only with `latex` and `dvilualatex`.
381
382 We default to `dvipdfmx` in case Ghostscript is not installed. If Ghostscript is already installed, one can use `dvipdf` instead. If a file `examples.out.ps` exists, one may delete it after creating the pdf file.
383
384 dvipdfmx examples
385
386 If one changes LaTeX engines, one first must remove all of the auxiliary files.
387
388 ### 6.2.2 Tests
389
390 * Generate the test files in the following manner from the `dtx`:
391
392 pdflatex "\def\NameauthDoTestFiles{}\input{nameauth.dtx}"
393
394 * Compile the test files.
395
396 In the following command lines, one may substitute `latex`, `xelatex`, `lualatex`, and `dvilualatex` for `pdflatex`. One must change the root or base file name for each test file.
397
398 pdflatex --interaction=nonstopmode test01-01
399 pdflatex --interaction=nonstopmode test01-01
400 makeindex -o test01-01.ind test01-01.idx
401
402 * This next line is needed only for `test07-01.tex` because the `index` package is used for an index of persons.
403
404 makeindex -o test07-01.rnd test07-01.rdx
405
406 * These lines complete the indexes and TOC.
407
408 pdflatex --interaction=nonstopmode test01-01
409 pdflatex --interaction=nonstopmode test01-01
410
411 * This step is used only when using `latex` and `dvilualatex`.
412
413 dvipdfmx test01-01
414
415 If one changes LaTeX engines, one first must remove all of the auxiliary files.
416
417
418 ### 6.2.3 Images
419
420 Four manual illustrations are based on included tests. If, for some reason, one wanted to make the manual illustrations (usually not required), this would be the default procedure:
421
422 * Generate the test files in the following manner from the `dtx`:
423
424 pdflatex "\def\NameauthDoTestFiles{}\input{nameauth.dtx}"
425
426 * Compile the test files:
427
428 pdflatex --interaction=nonstopmode test07-02
429 pdflatex --interaction=nonstopmode test07-02
430 makeindex -o test07-02.ind test07-02.idx
431 pdflatex --interaction=nonstopmode test07-02
432 pdflatex --interaction=nonstopmode test07-02
433
434 pdflatex --interaction=nonstopmode test09-01
435 pdflatex --interaction=nonstopmode test09-01
436 makeindex -o test09-01.ind test09-01.idx
437 pdflatex --interaction=nonstopmode test09-01
438 pdflatex --interaction=nonstopmode test09-01
439
440 * Split and convert the files. If `pdfjam` is not available, one would have to use other programs to do this.
441
442 pdfjam --paper a6paper --landscape --quiet test07_02.pdf 3 --outfile cat01.pdf
443 pdfjam --paper a5paper --landscape --quiet test09_01.pdf 1 --outfile beamer01.pdf
444 pdfjam --paper a5paper --landscape --quiet test09_01.pdf 2 --outfile beamer02.pdf
445 pdfjam --paper a5paper --landscape --quiet test09_01.pdf 3 --outfile beamer03.pdf
446
447 # 7 Additional Notes
448
449 Starting from version 4.0 we switched from `xargs` and `suffix` to `xparse`. Should any modifications still require `xargs` and `suffix`, one can use the `oldargs` package option.
450
451 Version 3.7 remains here: [style](https://www.tug.org/svn/texlive/branches/branch2022.final/Master/texmf-dist/tex/latex/nameauth/), [docs](https://www.tug.org/svn/texlive/branches/branch2022.final/Master/texmf-dist/doc/latex/nameauth/), and [source](https://www.tug.org/svn/texlive/branches/branch2022.final/Master/texmf-dist/source/latex/nameauth/).
452
453 # 8 Copyright
454
455 Copyright (C) 2025 by Charles P. Schaum <charles[dot][email protected]>
456
457 This file may be distributed and/or modified under the
458 conditions of the LaTeX Project Public License, either
459 version 1.3 of this license or (at your option) any
460 later version. The latest version of this license is in:
461
462 [https://www.latex-project.org/lppl.txt](https://www.latex-project.org/lppl.txt)
463
464 and version 1.3 or later is part of all distributions
465 of LaTeX version 2005/12/01 or later.
466
467 This work includes all source and generated files
468 described as such in this file, README.md.
469 %readmevb
470 %</readme>
471 %<*internal>
472 \fi
473 \def\nameofplainTeX{plain}
474 \ifx\fmtname\nameofplainTeX\else
475 \expandafter\begingroup
476 \fi
477 %</internal>
478 %<*install>
479 \input docstrip.tex
480 \keepsilent
481 \askforoverwritefalse
482
483 \preamble
484
485 This is a generated file.
486
487 Copyright (C) 2025 by Charles P. Schaum <charles[dot][email protected]>
488
489 This file may be distributed and/or modified under the
490 conditions of the LaTeX Project Public License, either
491 version 1.3 of this license or (at your option) any
492 later version. The latest version of this license is in:
493
494 https://www.latex-project.org/lppl.txt
495
496 and version 1.3 or later is part of all distributions
497 of LaTeX version 2005/12/01 or later.
498
499 This work includes all source and generated files
500 described as such in README.md, included herein.
501
502 \endpreamble
503
504 \usedir{tex/latex/nameauth}
505 \generate{
506 \file{\jobname.sty}{\from{\jobname.dtx}{package}}
507 }
508 %</install>
509 %<install>\endbatchfile
510 %<*internal>
511 \usedir{source/latex/nameauth}
512 \generate{
513 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
514 }
515 \usedir{doc/latex/nameauth}
516 \nopostamble
517 \generate{
518 \file{examples.tex}{\from{\jobname.dtx}{examples}}
519 }
520 \generate{
521 \file{compat.tex}{\from{\jobname.dtx}{compat}}
522 }
523 \nopreamble
524 \generate{
525 \file{README.md}{\from{\jobname.dtx}{readme}}
526 }
527 \ifx\fmtname\nameofplainTeX
528 \expandafter\endbatchfile
529 \else
530 \expandafter\endgroup
531 \fi
532 %</internal>
533 % \fi
534 %
535 % \iffalse
536 %<*driver>
537 \ProvidesFile{nameauth.dtx}
538 %</driver>
539 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
540 %<package>\ProvidesPackage{nameauth}
541 %<*package>
542 [2025/08/27 4.2 Name authority mechanism for consistency in text and index]
543 %</package>
544 %
545 %<*driver>
546 %^^A %%%%%%%%%%%%%%%%%%%%%%% Start of Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%
547
548 \documentclass[11pt]{ltxdoc}
549
550
551 %^^A @@@@@ General Document Layout @@@@@
552
553 %^^A Set up page layout to fit both letter and DIN A4.
554 \usepackage[paperheight=279.4mm,paperwidth=210mm,
555 textheight=239.4mm,textwidth=138mm,
556 right=20mm,marginparwidth=40mm,
557 marginparsep=4mm,nohead]{geometry}
558
559 %^^A Permit horizontal boxes to be overfull.
560 \hfuzz=3pt
561
562
563 %^^A @@@@@ Detecting LaTeX engine used @@@@@
564
565 %^^A Since we only use pdflatex to make the documentation,
566 %^^A We only use these macros for some detection examples.
567 %^^A We need etoolbox for this functionality.
568 \usepackage{etoolbox}
569
570 %^^A Provide a macro to check latex versions and define a macro.
571 %^^A This must be done in the document preamble.
572 %^^A We use the date 2018/10/05 because that is when Unicode
573 %^^A processing changed for the better.
574 %^^A We use the date 2018/04/30 because that is when xparse
575 %^^A added the ! modifier.
576 \makeatletter
577 \@ifl@t@r\fmtversion{2018/10/05}{\newcommand\nameauthltx{}}{}
578 \@ifl@t@r\fmtversion{2018/04/30}{\newcommand\nameauthxp{}}{}
579 \makeatother
580
581
582 %^^A @@@@@ Set up fonts and typography @@@@@
583
584 %^^A We do not load inputenc unless we are using an old distro.
585 \IfFileExists{utf8-2018.def}{}{\usepackage[utf8]{inputenc}}
586
587 \usepackage[TS1,T1]{fontenc}
588
589 %^^A We load the Latin Modern font.
590 \usepackage{lmodern}
591
592 %^^A Load the dangerous bend symbol.
593 \usepackage{manfnt}
594
595 %^^A We load textcomp for backward compatibility.
596 \usepackage{textcomp}
597
598 %^^A Use babel for languages.
599 \usepackage[main=american, ngerman, latin, polutonikogreek]{babel}
600 \newcommand\DE[1]{{\itshape\foreignlanguage{ngerman}{#1}}}
601 \newcommand\de[1]{\foreignlanguage{ngerman}{#1}}
602 \newcommand{\LA}[1]{{\itshape\foreignlanguage{latin}{#1}}}
603 \newcommand{\la}[1]{\foreignlanguage{latin}{#1}}
604 \newcommand{\el}[1]{\foreignlanguage{polutonikogreek}{#1}}
605
606 %^^A Use this in Greek text.
607 \edef\nbsp{~}
608
609 %^^A This bit is for an example that involves accents and names.
610 \usepackage{newunicodechar}
611 \DeclareTextSymbolDefault{\textlongs}{TS1}
612 \DeclareTextSymbol{\textlongs}{TS1}{115}
613 \newunicodechar{ſ}{\textlongs}
614
615 %^^A Use microtypography.
616 \usepackage{microtype}
617
618 %^^A Do not automatically put extra space after a full stop.
619 \frenchspacing
620
621 %^^A Redefine emphasis in the body text because italic has dedicated uses.
622 \let\oldemph\emph
623 \let\emph\textbf
624
625 \let\Title\textit
626
627
628 %^^A ----- Font debugging; only for developer use -----
629
630 %^^A These two macros help track down changes to font sizes.
631 %^^A They can be used only one time each.
632 \let\savegraf\everypar
633 \makeatletter
634 \newcommand\FontDebugStart
635 {%^^A
636 \let\oldep\everypar%^^A
637 \newtoks\everypar%^^A
638 \oldep{\the\everypar \llap{%^^A
639 \hbox to \marginparwidth {\f@size\hfill}}}%^^A
640 }
641 \newcommand\FontDebugStop
642 {%^^A
643 \let\oldep\savegraf%^^A
644 \oldep{\the\everypar}%^^A
645 }
646 \makeatother
647
648
649 %^^A @@@@@ Set up specific document elements @@@@@
650
651
652 %^^A ----- Names, the reason for it all -----
653
654 %^^A Include specifically the current version of the package.
655 \usepackage{\jobname}[2025/08/27]
656
657 %^^A Set up the ``actual'' character
658 \IndexActual{=}
659
660
661 %^^A ----- Vertical space -----
662
663 %^^A Define negative skip values.
664 \newcommand\negsmallskip{\vspace{-\smallskipamount}}
665 \newcommand\negmedskip{\vspace{-\medskipamount}}
666 \newcommand\negbigskip{\vspace{-\bigskipamount}}
667
668
669 %^^A ----- TOC and index -----
670
671 %^^A Two-column TOC
672 \usepackage[toc]{multitoc}
673
674 \newcommand\TOCbreak{\addtocontents{toc}{\protect\goodbreak}}
675
676 %^^A Include an index
677 \usepackage{makeidx}
678
679 %^^A These options allow the index to focus on names in the index more
680 %^^A like one might see in a normal document.
681 %^^A We do not use \DisableCrossrefs
682 \CodelineIndex
683 \RecordChanges
684
685
686 %^^A ----- Color and graphical diagram elements -----
687
688 %^^A Color helps categorize information.
689 \usepackage{xcolor}
690 \colorlet{nared}{red!80!black}
691 \colorlet{nagrey}{white!93!black}
692
693 %^^A Use color for yes/no indicators in tables.
694 \newcommand\NO{{%^^A
695 \color{white!80!black}\lower 0.075ex\hbox{\rule{1.5ex}{1.5ex}}}}
696 \newcommand\YES{{%^^A
697 \color{black}\lower 0.075ex\hbox{\rule{1.5ex}{1.5ex}}}}
698
699 %^^A Diagrams
700 \usepackage{tikz}
701 \usepackage{tcolorbox}
702
703 %^^A Set basic format for tcolorboxes drawn by TikZ.
704 \tcbset{fonttitle=\bfseries\sffamily,box align=top,lower separated=false}
705
706
707 %^^A ----- Hyperlinks and URLs -----
708
709 %^^A Have documentation with hyperlinks
710 \usepackage[numbered]{hypdoc}
711
712 %^^A Change URL color
713 \hypersetup{urlcolor=purple}
714
715
716 %^^A ----- Tables, lists, quote, center -----
717
718 \usepackage{booktabs}
719 \usepackage{colortbl}
720
721 %^^A Margin note in a table
722 \newcommand\tmarg[2][white]
723 {%^^A
724 \llap
725 {%^^A
726 \colorbox{#1}{\hbox to 0.8\marginparwidth{\strut\hfill #2}}%^^A
727 \qquad\qquad%^^A
728 }%^^A
729 }
730
731 \usepackage{enumitem}
732 \setlist{rightmargin=\leftmargin,itemsep=0pt}
733
734 %^^A Make default font small for Quote and Center environments
735 \newenvironment{Quote}{\begin{quote}\small}{\end{quote}}
736 \newenvironment{Center}{\begin{center}\small}{\end{center}}
737
738
739 %^^A ----- Verbatim environments -----
740
741 %^^A Let verbatim environments be fancy.
742 \usepackage{fancyvrb}
743
744 %^^A Define fancyvrb defaults.
745 \fvset{gobble=2,numbers=left,fontsize=\small}
746
747
748 %^^A ----- Various text elements -----
749
750 %^^A Put information in the margin.
751 \NewDocumentCommand{\Info}{s O{0ex} m}
752 {%^^A
753 \unless\ifinner
754 \begingroup%^^A
755 \microtypesetup{activate=false}%^^A
756 \IfBooleanTF{#1}
757 {\leavevmode\marginpar{\raggedleft\footnotesize#3}}
758 {%^^A
759 \vspace{\dimexpr#2\relax}%^^A
760 \marginpar{\raggedleft\footnotesize#3}%^^A
761 \vspace{\dimexpr-#2\relax}%^^A
762 }%^^A
763 \endgroup%^^A
764 \fi
765 }
766
767 %^^A Show name patterns in margin.
768 \NewDocumentCommand{\PatInfo}{s O{0ex} m}
769 {%^^A
770 \IfBooleanTF{#1}
771 {\Info*{Name Pattern(s):\hfill\break{\ttfamily #3}}}
772 {\Info[#2]{Name Pattern(s):\hfill\break{\ttfamily #3}}}%^^A
773 }
774
775 %^^A Show both name patterns and index entries in margin.
776 \NewDocumentCommand{\BothInfo}{s O{0ex} m m}
777 {%^^A
778 \IfBooleanTF{#1}
779 {\Info*{Name Pattern(s):\hfill\break{\ttfamily #3}%^^A
780 \break Basic Index:\hfill\break #4}}
781 {\Info[#2]{Name Pattern(s):\hfill\break{\ttfamily #3}%^^A
782 \break Basic Index:\hfill\break #4}}%^^A
783 }
784
785 %^^A Return to the TOC at the end of a major section.
786 \newcommand*\ReturnLink
787 {%^^A
788 \begin{center}
789 \normalsize%^^A
790 \tcbox[colback=nagrey]{Back to \hyperlink{TOC}{Table of Contents}}
791 \end{center}
792 }
793
794 %^^A Print a high-visibility callout that can have an optional title.
795 \newenvironment{InfoBox}[1][]
796 {%^^A
797 \begin{quote}\negmedskip\normalsize%^^A
798 \def\titulus{#1}%^^A
799 \ifx\titulus\empty
800 \begin{tcolorbox}[colback=white,colframe=red!90!black]%^^A
801 \else
802 \begin{tcolorbox}[colback=white,colframe=red!90!black,
803 adjusted title={\bfseries\hfil #1}]%^^A
804 \fi
805 }
806 {\end{tcolorbox}\end{quote}}
807
808 %^^A Print a one-cell callout that can have an optional title.
809 \newenvironment{SyntaxBox}[1][]
810 {%^^A
811 \begin{quote}\negmedskip\normalsize%^^A
812 \def\titulus{#1}%^^A
813 \ifx\titulus\empty
814 \begin{tcolorbox}[colback=white,colframe=darkgray]%^^A
815 \begin{tabular}{@{}l@{}}
816 \else
817 \begin{tcolorbox}[colback=white,colframe=darkgray,
818 adjusted title={\bfseries\hfil #1}]%^^A
819 \begin{tabular}{@{}l@{}}
820 \fi
821 }
822 {\end{tabular}\end{tcolorbox}\end{quote}}
823
824 %^^A Print a two-cell callout that can have an optional title.
825 \newenvironment{SyntaxBoxii}[1][]
826 {%^^A
827 \begin{quote}\negmedskip\normalsize%^^A
828 \def\titulus{#1}%^^A
829 \ifx\titulus\empty
830 \begin{tcolorbox}[colback=white,colframe=darkgray]%^^A
831 \begin{tabular}{@{}ll@{}}
832 \else
833 \begin{tcolorbox}[colback=white,colframe=darkgray,
834 adjusted title={\bfseries\hfil #1}]%^^A
835 \begin{tabular}{@{}ll@{}}
836 \fi
837 }
838 {\end{tabular}\end{tcolorbox}\end{quote}}
839
840 %^^A Print a quote and the source.
841 \renewcommand{\hrulefill}{%
842 \leavevmode\leaders\hrule height 1.5pt\hfill\kern0pt}
843
844 \newenvironment{Quotation}[2]
845 {%^^A
846 \vfill%^^A
847 \begingroup%^^A
848 \small\noindent\hrulefill
849 \begin{quote}%^^A
850 \newcommand\QuoteName{#1}%^^A
851 \newcommand\QuotePub{#2}}
852 {\par\negbigskip\hbox{}\hfill---\ForgetThis\QuoteName%^^A
853 \unless\ifx\QuotePub\empty \\\hbox{}\hfill\QuotePub\fi
854 \end{quote}%^^A
855 \endgroup%^^A
856 }
857
858 %^^A Used for many examples
859 \newenvironment{Block}
860 {\begin{Quote}\microtypesetup{activate=false}}
861 {\end{Quote}}
862
863 %^^A Used to show when macros may need to be global.
864 \newcommand\Global{\Info*{\small\cmd{\global}}}
865
866 %^^A Warning repeated throughout the manual
867 \newcommand\NameArgWarning
868 {%^^A
869 \begin{InfoBox}%^^A
870 Address any concerns about expansion of macros in name arguments
871 by using \cmd{\noexpand} before those macros.
872 \end{InfoBox}%^^A
873 }
874
875 %^^A Macros that handle describing index states
876 \newcommand\Stay[2]
877 {%^^A
878 \parbox{0.685\textwidth}{#1\dotfill}%^^A
879 \lower 2ex\hbox{%^^A
880 \quad\tcbox[boxsep=0.2ex,colback=nagrey]
881 {\textls[-20]{\hyperlink{State #2}{Stay in State #2}}}%^^A
882 }%^^A
883 }
884
885 \newcommand\Go[2]
886 {%^^A
887 \parbox{0.685\textwidth}{#1\dotfill}%^^A
888 \lower 2ex\hbox{%^^A
889 \quad\tcbox[boxsep=0.2ex,colback=nagrey]
890 {\textls[30]{\hyperlink{State #2}{Go to State #2}}}%^^A
891 }%^^A
892 }
893
894 %^^A Used when introducing name forms
895 \newcommand\FUse{\leavevmode\hbox to 5em{First use:\hfill}}
896 \newcommand\LUse{\leavevmode\hbox to 5em{Later use:\hfill}}
897 \newcommand\UseL{\leavevmode\hbox to 5em{Long use:\hfill}}
898 \newcommand\UseS{\leavevmode\hbox to 5em{Short use:\hfill}}
899 \newcommand\UseB{\leavevmode\hbox to 5em{\hfill}}
900 \newcommand\UseI{\leavevmode\hbox to 5em{Index:\hfill}}
901
902 %^^A Use this example in the body text. It is defined here due
903 %^^A to the vertical bars, which are redefined in the body text.
904 \newcommand\Orphan[2]{#1(\hyperpage{#2})}
905 \TagName[Lost]{Name}{ \S|Orphan{perdit}}
906 \TagName{foo\Name {bar}}{ \S|hyperpage}
907
908 %^^A Define macros to differentiate name arguments.
909 \newcommand\nri{}
910 \newcommand\nrii{}
911
912 %^^A Set up all the shorthands, but not all the names. Even if one does
913 %^^A not set up all the names here, it is a very good idea to set up the
914 %^^A tags for all names just below, especially in a dtx file, where the
915 %^^A vertical bars are active.
916 \begin{nameauth}
917 \< Aeth & & Æthelred, II & >
918 \< Aris & & Aristotle & >
919 \< Bailey & Betsey & Bailey & >
920 \< Bradley & Omar N. & Bradley & >
921 \< Carter & J.E. & Carter, Jr. & >
922 \< CatoE & Marcus Porcius & Cato, the Elder & >
923 \< CatoEi & Marcus & Porcius Cato the Elder & >
924 \< CatoY & Marcus Porcius & Cato, the Younger & >
925 \< CatoYi & Marcus Porcius & Cato the Younger & >
926 \< Cicero & M.T. & Cicero & >
927 \< Confucius & & Confucius & >
928 \< Dagb & & Dagobert & I >
929 \< Dem & & Demetrius, I & >
930 \< deSmet & Pierre-Jean &
931 \noexpand\Fbox{\noexpand\AltCaps{d}e~Smet} & >
932 \< Soto & Hernando & de~Soto & >
933 \< Doug & Frederick & Douglass & >
934 \< DuBois & W.E.B. & Du~Bois & >
935 \< AltDuBois & W.E.B. & DuBois & >
936 \< Einstein & Albert & Einstein & >
937 \< Eliz & & Elizabeth, I & >
938 \< Faisal & & Faisal, bin Abdulaziz & >
939 \< Fukuyama & & \noexpand\textUC{Fukuyama} & Takeshi >
940 \ifdefined\nameauthltx
941 \< Ghazali & & Ghazāli & >
942 \else
943 \< Ghazali & & Ghazali & >
944 \fi
945 \< JLF & Jean de & La Fontaine & >
946 \< JWG & J.W. von & Goethe & >
947 \< TGrac & \noexpand\TSemp & Gracchus & >
948 \< Harnack & Adolf & Harnack & >
949 \< AVH & Adolf & Harnack & Adolf\noexpand\von >
950 \< Henry & & Henry & VIII >
951 \< Ike & Dwight D. & Eisenhower & >
952 \< Jeff & Thomas &
953 \noexpand\textSC{Jefferson}\noexpand\GEN{} & >
954 \< Eriugena & & John, Eriugena & >
955 \< MLK & Martin Luther & King, Jr. & >
956 \< Lewis & Clive Staples & Lewis & >
957 \< CSL & Clive Staples & Lewis & C.S. >
958 \< Linc & Abraham & Lincoln & >
959 \< Luth & Martin & \noexpand\textSC{Luther} & >
960 \< Cath & Catherine \noexpand\AltCaps{d}e' &
961 \noexpand\textSC{Medici} & >
962 \< Miyazaki & & Miyazaki, Hayao & >
963 \< MSens & & Miyazaki, Hayao & Sensei >
964 \< Molnar & Ferenc & Molnár & >
965 \< Noguchi & Hideyo & Noguchi & >
966 \< Patton & George S. & Patton, Jr. & >
967 \< Plato & & Plato & >
968 \< JRIV & J.D. & Rockefeller, IV & >
969 \< JayR & J.D. & Rockefeller, IV & Jay >
970 \< Scipio & \noexpand\SCIPi & \noexpand\SCIPii & >
971 \< OScipio & Lucius & \noexpand\CSB & >
972 \< Senecai & Lucius Annaeus & Seneca\nri & >
973 \< Senecaii & Lucius Annaeus & Seneca\nrii & >
974 \< Shak & \noexpand\WM & \noexpand\SHK & >
975 \< Striet & John & \noexpand\de{Strietelmeier} & >
976 \< Sun & & Sun, Yat-sen & >
977 \< KempMed & & Thomas, à~Kempis & >
978 \< KempW & Thomas & à~Kempis & >
979 \< Tyson & Mike & Tyson & >
980 \< Iron & Mike & Tyson & Iron Mike >
981 \< Wash & George & Washington & >
982 %^^A We use the next row as an example in the docs.
983 %^^A \< White & E.\,B. & White & >
984 \< Yamt & & Yamamoto, Isoroku & >
985 \< Yosh & & Yoshida & Shigeru >
986 \end{nameauth}
987
988 %^^A Exclude names form from the index.
989 %^^A We index them without the comma.
990 \ExcludeName[Marcus Porcius]{Cato, the Elder}
991 \ExcludeName[Marcus Porcius]{Cato, the Younger}
992
993 %^^A Add a name tag. We usually do this in
994 %^^A the running text below, but we do it here too.
995 \NameAddInfo{Faisal, bin Abdulaziz}{ Al Saud}
996
997 %^^A Add index sorting tags here for names needing them.
998 %^^A That includes active Unicode, spaces, Roman numerals,
999 %^^A and macros in names.
1000 \PretagName{Æthelred, II}{Aethelred 2}
1001 \PretagName[Thomas]{à~Kempis}{Akempis, Thomas}
1002 \PretagName{Antiochus, III}{Antiochus 3}
1003 \PretagName{Antiochus, IV}{Antiochus 4}
1004 \PretagName{Atat\"urk}{Ataturk}
1005 \PretagName[W.H.]{Auden}{Auden, Wystan}
1006
1007 \PretagName[Charles]{\noexpand\textBF{Babbage}}{Babbage, Charles}
1008 \PretagName{Bo\"ethius}{Boethius}
1009 \PretagName[Robert]{\textSC{Burns}}{Burns, Robert}
1010
1011 \PretagName[Giovanni]{d'Andrea}{Dandrea, Giovanni}
1012 \PretagName{Demetrius, I}{Demetrius 1}
1013 \PretagName[Walter]{de la Mare}{delaMare, Walter}
1014 \PretagName[Jacques]{De~Pamele}{Depamele, Jacques}
1015 \PretagName[Charles-Louis]{de Secondat}{deSecondat, Charles}
1016 \PretagName[Pierre-Jean]{\noexpand\Fbox{\noexpand\AltCaps{d}e~Smet}}
1017 {deSmet, Pierre-Jean}
1018 \PretagName[Hernando]{de~Soto}{Desoto, Hernando}
1019 \PretagName{\textit{Doctor angelicus}}{Doctor angelicus}
1020 \PretagName{\textit{Doctor mellifluus}}{Doctor mellifluus}
1021 \PretagName[W.E.B.]{Du~Bois}{DuBois, William}
1022 \PretagName{du~Cange}{Ducange}
1023 \PretagName[Charles]{du~Fresne}{Dufresne, Charles}
1024 \PretagName[S.J.]{Du Toit}{DuToit, Stephanus}
1025
1026 \PretagName{Elizabeth, I}{Elizabeth 1}
1027
1028 \PretagName{\noexpand\textUC{Fukuyama}}[Takeshi]{Fukuyama Takeshi}
1029
1030 \PretagName[Greta]{\noexpand\textSC{Garbo}}{Garbo, Greta}
1031 \ifdefined\nameauthltx
1032 \PretagName{Ghazāli}{Ghazali}
1033 \fi
1034 \PretagName[\noexpand\TSemp]{Gracchus}{Gracchus, Tiberius Sempronius}
1035 \PretagName{Gregory, I}{Gregory 1}
1036
1037 \PretagName[Thomas]{\noexpand\textSC{Jefferson}\noexpand\GEN{}}
1038 {Jefferson, Thomas}
1039
1040 \PretagName{\noexpand\textUC{Kanade}, Takeo}{Kanade Takeo}
1041
1042 \PretagName[Jean de]{La Fontaine}{LaFontaine, Jean de}
1043 \PretagName[Manuel Antonio]{Las Heras}{LasHeras, Manuel}
1044 \PretagName[Werner]{\noexpand\textSC{Lemberg}}{Lemberg, Werner}
1045 \PretagName[Pierre]{L'Enfant}{LEnfant, Pierre}
1046 \PretagName[Ada]{\noexpand\textIT{Lovelace}}{Lovelace, Ada}
1047 \PretagName[Martin]{\noexpand\textSC{Luther}}{Luther, Martin}
1048
1049 \PretagName[Catherine \noexpand\AltCaps{d}e']{\noexpand\textSC{Medici}}
1050 {Medici, Catherine de}
1051 \PretagName{\noexpand\textSC{Misora}, Hibari}{Misora Hibari}
1052 \PretagName[Ferenc]{Molnár}{Molnar, Ferenc}
1053
1054 \PretagName[Sandra Day]{O'Connor}{OConnor, Sandra}
1055
1056 \PretagName{Ptolemy, IV}{Ptolemy 4}
1057
1058 \PretagName{Ptolemy, V}{Ptolemy 5}
1059
1060 \PretagName[J.D.]{Rockefeller, IV}{Rockefeller, John D 4}
1061 \PretagName[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}}
1062 {Ruehmann, Heinrich Wilhelm}
1063 \PretagName[Heinz]{\noexpand\textSC{R\"uhmann}}{Ruehmann, Heinz}
1064
1065 \PretagName[Lucius Annaeus]{Seneca\nri}{Seneca, Lucius Annaeus 1}
1066 \PretagName[Lucius Annaeus]{Seneca\nrii}{Seneca, Lucius Annaeus 2}
1067 \PretagName{Seleucus, III}{Seleucus 3}
1068 \PretagName[\noexpand\SCIPi]{\noexpand\SCIPii}{Scipio Africanus}
1069 \PretagName[Lucius]{\noexpand\CSB}{Cornelius Scipio Barbatus}
1070 \PretagName[\noexpand\WM]{\noexpand\SHK}{Shakespeare, William}
1071 \PretagName{\textit{Snellius}}{Snellius}
1072 \PretagName[John]{\noexpand\de{Strietelmeier}}{Strietelmeier, John}
1073 \PretagName[John]{\unexpanded{\noexpand\de{Strietelmeier}}}
1074 {Strietelmeier, John}
1075
1076 \PretagName{Thomas, à~Kempis}{Thomas Akempis}
1077
1078 \PretagName[Martin]{Van Buren}{VanBuren, Martin}
1079 \PretagName[Daisy]{Ver Boven}{VerBoven, Daisy}
1080 \PretagName{Vlad, {\c T}epe{\c s}}{Vlad Tepes}
1081
1082 \PretagName[E.\,B.]{White}{White, Elwyn}
1083
1084 \PretagName[Otto]{Zur Linde}{ZurLinde, Otto}
1085 \PretagName[Konrad]{\noexpand\textSC{Zuse}}{Zuse, Konrad}
1086
1087 %^^A Add index tags for all names in the dtx file.
1088 \TagName{Æthelred, II}{, king|hyperpage}
1089 \TagName{Antiochus, III}{ the Great, king|hyperpage}
1090 \TagName{Antiochus, IV}{ Epiphanes, king|hyperpage}
1091 \TagName{Aristotle}{|hyperpage}
1092 \TagName{Attila, the Hun}{|hyperpage}
1093 \TagName[W.H.]{Auden}{|hyperpage}
1094
1095 \TagName[Charles]{\noexpand\textBF{Babbage}}{|hyperpage}
1096 \TagName[Betsey]{Bailey}{|hyperpage}
1097 \TagName[Omar N.]{Bradley}{|hyperpage}
1098 \TagName[Leonard]{Bernstein}{|hyperpage}
1099 \TagName{Bernard, of Clairvaux}{|hyperpage}
1100 \TagName{Bo\"ethius}{|hyperpage}
1101 \TagName[Anic. Manl.]{Severinus Boethius}{|hyperpage}
1102 \TagName[Max]{Born}{|hyperpage}
1103 \TagName[Bernhard ten]{Brink}{|hyperpage}
1104 \TagName[Ferris]{Bueller}{ \S|hyperpage}
1105 \TagName[Robert]{\textSC{Burns}}{|hyperpage}
1106
1107 \TagName[Julius]{Caesar}{, imperator|hyperpage}
1108 \TagName[Rudolph]{Carnap}{|hyperpage}
1109 \TagName[J.E.]{Carter, Jr.}{, pres.|hyperpage}
1110 \TagName[Marcus]{Porcius Cato the Elder}{|hyperpage}
1111 \TagName[Marcus Porcius]{Cato the Younger}{|hyperpage}
1112 \TagName[Charlie]{Chaplin}{|hyperpage}
1113 \TagName[Charles W.]{Chesnutt}{|hyperpage}
1114 \TagName[M.T.]{Cicero}{|hyperpage}
1115 \TagName{Chiang}[Kai-shek]{\ddag, pres.|hyperpage}
1116 \TagName[Schuyler]{Colfax}{, v.p.|hyperpage}
1117 \TagName{Confucius}{|hyperpage}
1118 \TagName{Cratylus}{|hyperpage}
1119 \TagName[e.e.]{cummings}{|hyperpage}
1120
1121 \TagName{Dagobert}[I]{\ddag, king|hyperpage}
1122 \TagName[Sammy]{Davis,Jr.}{|hyperpage}
1123 \TagName[Giovanni]{d'Andrea}{|hyperpage}
1124 \TagName[Walter]{de la Mare}{|hyperpage}
1125 \TagName{Demetrius, I}{ Soter, king|hyperpage}
1126 \TagName[Jacques]{De~Pamele}{|hyperpage}
1127 \TagName[Pierre-Jean]
1128 {\noexpand\Fbox{\noexpand\AltCaps{d}e~Smet}}{|hyperpage}
1129 \TagName[Hernando]{de~Soto}{|hyperpage}
1130 \TagName[Marc van]{Dongen}{|hyperpage}
1131 \TagName[Frederick]{Douglass}{|hyperpage}
1132 \TagName[W.E.B.]{Du~Bois}{|hyperpage}
1133 \TagName[Charles]{du~Fresne}{|hyperpage}
1134 \TagName[S.J.]{Du Toit}{|hyperpage}
1135
1136 \TagName[Albert]{Einstein}{|hyperpage}
1137 \TagName[Dwight D.]{Eisenhower}{, pres.|hyperpage}
1138 \TagName{Elizabeth, I}{, queen|hyperpage}
1139 \TagName[Leif]{Erikson}{|hyperpage}
1140
1141 \TagName[Robin]{Fairbairns}{|hyperpage}
1142 \TagName{Faisal, bin Abdulaziz}{ Al Saud, king|hyperpage}
1143 \TagName[Francisco de]{Figueroa}{|hyperpage}
1144 \TagName[Cameron]{Frye}{ \S|hyperpage}
1145 \TagName{\noexpand\textUC{Fukuyama}}[Takeshi]{\ddag|hyperpage}
1146
1147 \TagName[Greta]{\noexpand\textSC{Garbo}}{|hyperpage}
1148 \TagName{Ghazāli}{|hyperpage}
1149 \TagName{Ghazali}{|hyperpage}
1150 \TagName[\noexpand\TSemp]{Gracchus}{, consul|hyperpage}
1151 \TagName[J.W. von]{Goethe}{|hyperpage}
1152 \TagName[Ulysses S.]{Grant}{, pres.|hyperpage}
1153 \TagName[Enrico]{Gregorio}{|hyperpage}
1154 \TagName{Gregory, I}{ the Great, pope|hyperpage}
1155
1156 \TagName[Oskar]{Hammerstein, II}{|hyperpage}
1157 \TagName[Adolf]{Harnack}{|hyperpage}
1158 \TagName[Lafcadio]{Hearn}{|hyperpage}
1159 \TagName{Hermogenes}{|hyperpage}
1160 \TagName{Henry}[VIII]{, king|hyperpage}
1161 \TagName[Herbert]{Hoover}{, pres.|hyperpage}
1162 \TagName[Bob]{Hope}{|hyperpage}
1163 \TagName[Hubert H.]{Humphrey}{, v.p.|hyperpage}
1164
1165 \TagName[Thomas]{\noexpand\textSC{Jefferson}\noexpand\GEN{}}
1166 {, pres.|hyperpage}
1167 \TagName{Jesus, Christ}{|hyperpage}
1168 \TagName{John, Eriugena}{|hyperpage}
1169
1170 \TagName[Mustafa]{Kemal}{|hyperpage}
1171 \TagName[John F.]{Kennedy}{, pres.|hyperpage}
1172 \TagName{Kim, Jong Un}{|hyperpage}
1173 \TagName[Martin Luther]{King, Jr.}{|hyperpage}
1174
1175 \TagName[Jean de]{La Fontaine}{|hyperpage}
1176 \TagName{Lao-tzu}{|hyperpage}
1177 \TagName[Manuel Antonio]{Las Heras}{|hyperpage}
1178 \TagName[Werner]{\noexpand\textSC{Lemberg}}{|hyperpage}
1179 \TagName[Pierre]{L'Enfant}{|hyperpage}
1180 \TagName[Clive Staples]{Lewis}{|hyperpage}
1181 \TagName[Abraham]{Lincoln}{, pres.|hyperpage}
1182 \TagName[Ferenc]{Liszt}{\dag|hyperpage}
1183 \TagName[Titus]{Livius}{|hyperpage}
1184 \TagName{Llywelyn, ap Gruffudd}{, prince|hyperpage}
1185 \TagName{Louis, XIV}{, king|hyperpage}
1186 \TagName[Ada]{\noexpand\textIT{Lovelace}}{|hyperpage}
1187 \TagName[Uwe]{Lueck}{|hyperpage}
1188 \TagName[Dan]{Luecking}{|hyperpage}
1189 \TagName[Martin]{\noexpand\textSC{Luther}}{|hyperpage}
1190
1191 \TagName{Maimonides}{|hyperpage}
1192 \TagName[Dean]{Martin}{|hyperpage}
1193 \TagName{\noexpand\textSC{Misora}, Hibari}{|hyperpage}
1194 \TagName[Nicolas]{Malebranche}{|hyperpage}
1195 \TagName[Catherine \noexpand\AltCaps{d}e']{\noexpand\textSC{Medici}}
1196 {|hyperpage}
1197 \TagName{\noexpand\textSC{Mencius}}{|hyperpage}
1198 \TagName{Miyazaki, Hayao}{|hyperpage}
1199 \TagName[L.M.]{Montgomery}{|hyperpage}
1200 \TagName[Ferenc]{Molnár}{\dag|hyperpage}
1201 \TagName[Nancy C.]{Mulvany}{|hyperpage}
1202
1203 \TagName{Nippon Gakki}{|hyperpage}
1204 \TagName[Hideyo]{Noguchi}{\dag|hyperpage}
1205
1206 \TagName[Sandra Day]{O'Connor}{, justice|hyperpage}
1207 \TagName[Heiko]{Oberdiek}{|hyperpage}
1208 \TagName[M.S.]{Omartian}{|hyperpage}
1209
1210 \TagName[George S.]{Patton, Jr.}{|hyperpage}
1211 \TagName[Lucius]{Sergius Paulus}{|hyperpage}
1212 \TagName{Plato}{|hyperpage}
1213 \TagName{Pontius, Pilate}{|hyperpage}
1214 \TagName{Ptolemy, IV}{ Philopator, king|hyperpage}
1215 \TagName{Ptolemy, V}{ Epiphanes, king|hyperpage}
1216
1217 \TagName{Rambam}{|hyperpage}
1218 \TagName[Luke]{Ranieri}{|hyperpage}
1219 \TagName[the]{Rat Pack}{|hyperpage}
1220 \TagName[J.D.]{Rockefeller, IV}{|hyperpage}
1221 \TagName[Theodore]{Roosevelt}{, pres.|hyperpage}
1222 \TagName[Heinz]{\noexpand\textSC{R\"uhmann}}{|hyperpage}
1223 \TagName[Salman]{Rushdie}{|hyperpage}
1224
1225 \TagName{Saul, of Tarsus}{|hyperpage}
1226 \TagName[Robert]{Schlicht}{|hyperpage}
1227 \TagName{Seleucus, III}{ Ceraunus, king|hyperpage}
1228 \TagName[Lucius Annaeus]{Seneca\nri}{ (the Elder)|hyperpage}
1229 \TagName[Lucius Annaeus]{Seneca\nrii}{ (the Younger)|hyperpage}
1230 \TagName[\noexpand\SCIPi]{\noexpand\SCIPii}{|hyperpage}
1231 \TagName[Lucius]{\noexpand\CSB}{, consul|hyperpage}
1232 \TagName[\noexpand\WM]{\noexpand\SHK}{|hyperpage}
1233 \TagName[Frank]{Sinatra}{|hyperpage}
1234 \TagName[R.]{Snel van Royen}{|hyperpage}
1235 \TagName[W.]{Snel van Royen}{|hyperpage}
1236 \TagName{Socrates}{|hyperpage}
1237 \TagName[Philipp]{Stephani}{|hyperpage}
1238 \TagName[John]{\noexpand\de{Strietelmeier}}{|hyperpage}
1239 \TagName{Sun, Yat-sen}{, pres.|hyperpage}
1240
1241 \TagName{Thomas, à~Kempis}{|hyperpage}
1242 \TagName{Thomas, Aquinas}{|hyperpage}
1243 \TagName[Henry David]{Thoreau}{|hyperpage}
1244 \TagName{\noexpand\textUC{Kanade}, Takeo}{|hyperpage}
1245 \TagName[Mark]{Twain}{|hyperpage}
1246 \TagName[Mike]{Tyson}{|hyperpage}
1247
1248 \TagName[Bob]{Uecker}{|hyperpage}
1249 \TagName[Harold]{Urey}{|hyperpage}
1250
1251 \TagName[Martin]{Van Buren}{, pres.|hyperpage}
1252 \TagName[Publius]{Vegetius Renatus}{|hyperpage}
1253 \TagName[Daisy]{Ver Boven}{|hyperpage}
1254 \TagName[Jesse]{Ventura}{|hyperpage}
1255 \TagName{Vlad, II}{ Dracul|hyperpage}
1256 \TagName{Vlad, III}{ Dracula|hyperpage}
1257 \TagName{Voltaire}{|hyperpage}
1258
1259 \TagName[George]{Washington}{, pres.|hyperpage}
1260 \TagName[Alan]{Watts}{|hyperpage}
1261 \TagName[Marcus]{Welby,M.D.}{ \S|hyperpage}
1262 \TagName[E.\,B.]{White}{|hyperpage}
1263 \TagName{William, I}{, king |hyperpage}
1264 \TagName{William, the Conqueror}{|hyperpage}
1265 \TagName[John]{Wyche}{|hyperpage}
1266
1267 \TagName{Yamaha, Torakusu}{|hyperpage}
1268 \TagName{Yamaha Corp.}{|hyperpage}
1269 \TagName{Yamamoto, Isoroku}{|hyperpage}
1270 \TagName{Yoshida}[Shigeru]{\ddag, PM|hyperpage}
1271
1272 \TagName[Caspar]{Ziegler}{|hyperpage}
1273 \TagName[Otto]{Zur Linde}{|hyperpage}
1274 \TagName[Konrad]{\noexpand\textSC{Zuse}}{|hyperpage}
1275
1276 \begin{document}
1277 \DocInput{\jobname.dtx}
1278 \end{document}
1279 %^^A %%%%%%%%%%%%%%%%%%%%%%% End of Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%
1280 %</driver>
1281 % \fi
1282 %^^A %%%%%%%%%%%%%%%%%%%%%%% Start of Document %%%%%%%%%%%%%%%%%%%%%%%%%%
1283 %
1284 %^^A @@@@@ Error Correction @@@@@
1285 %
1286 % \CheckSum{3779}
1287 %
1288 % \CharacterTable
1289 % {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
1290 % 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
1291 % Digits \0\1\2\3\4\5\6\7\8\9
1292 % Exclamation \! Double quote \" Hash (number) \#
1293 % Dollar \$ Percent \% Ampersand \&
1294 % Acute accent \' Left paren \( Right paren \)
1295 % Asterisk \* Plus \+ Comma \,
1296 % Minus \- Point \. Solidus \/
1297 % Colon \: Semicolon \; Less than \<
1298 % Equals \= Greater than \> Question mark \?
1299 % Commercial at \@ Left bracket \[ Backslash \\
1300 % Right bracket \] Circumflex \^ Underscore \_
1301 % Grave accent \` Left brace \{ Vertical bar \|
1302 % Right brace \} Tilde \~}
1303 %
1304 % \changes{0.7}{2011/12/26}{Initial release}
1305 % \changes{1.0}{2012/02/20}
1306 % {Works with \textsf{microtype}, \textsf{memoir}}
1307 % \changes{2.3}{2016/01/05}{New back-end for naming macros}
1308 % \changes{2.5}{2016/04/06}{No default format}
1309 % \changes{3.5}{2020/11/23}{Update and merge most included files into \texttt{dtx} file}
1310 % \changes{3.7}{2023/02/03}{Major updates to all files}
1311 % \changes{4.0}{2024/02/09}{Update included files}
1312 % \changes{4.1}{2025/02/04}{Update included files}
1313 % \changes{4.2}{2025/08/27}{Update included files}
1314 %
1315 %
1316 %^^A @@@@@ Administrative Setup @@@@@
1317 %
1318 % \GetFileInfo{\jobname.dtx}
1319 %
1320 % \DoNotIndex{\@empty, \@gobble, \@period,
1321 % \@token, \trim@spaces, \zap@space}
1322 %
1323 % \DoNotIndex{\begingroup, \bfseries, \bgroup,
1324 % \csdef, \csgdef, \csname, \csundef,
1325 % \DeclareOption, \def, \detokenize, \edef,
1326 % \egroup, \else, \endcsname, \endgroup, \endinput,
1327 % \ExecuteOptions, \expandafter, \fi, \futurelet,
1328 % \global, \hbox, \if, \ifcsname, \ifx, \ignorespaces,
1329 % \ignorespacesafterend, \index, \itshape, \leavevmode,
1330 % \let, \newcommand, \NewDocumentCommand, \newenvironment,
1331 % \newif, \nobreakspace, \PackageError, \PackageWarning,
1332 % \ProcessOptions, \relax, \renewcommand,
1333 % \RequirePackage, \scshape, \textbackslash, \uppercase}
1334 %
1335 %
1336 %^^A @@@@@ Items Defined Here, or Stuff Doesn't Work @@@@@
1337 %
1338 %^^A ----- Lengths -----
1339 %
1340 % \newlength{\nameboxi}
1341 % \newlength{\nameboxii}
1342 % \newlength{\nameboxiii}
1343 %
1344 %
1345 %^^A ----- Conditionals -----
1346 %
1347 %^^A Global definitions of conditionals used for examples
1348 %^^A must be included here because \newif statements cannot
1349 %^^A occur within an \iffalse ... \fi pair (driver section).
1350 %
1351 %^^A For George Washington/Mustafa Kemal
1352 % \newif\ifNoTag
1353 %
1354 %^^A For Thomas Jefferson
1355 % \newif\ifGenitive
1356 % \newif\ifDoGenitive
1357 %
1358 %^^A For the Cornelii Scipiones and Gracchi
1359 % \newif\ifNoPraenomen
1360 % \newif\ifNoGens
1361 % \newif\ifNoCognomen
1362 % \newif\ifNoAgnomen
1363 % \newif\ifXPrae
1364 % \newif\ifXGens
1365 % \newif\ifXCogn
1366 % \newif\ifXAgno
1367 %
1368 %^^A For Babbage and company
1369 % \newif\ifHeadword
1370 % \newif\ifAncientName
1371 %
1372 %^^A For William Shakespeare
1373 % \newif\ifSpecialFN
1374 % \newif\ifSpecialSN
1375 % \newif\ifRevertSN
1376 %
1377 %
1378 %^^A ----- Macros in Names -----
1379 %
1380 %^^A For Thomas Jefferson
1381 % \newcommand*\GEN{\ifDoGenitive\textSC{'s}\fi}
1382 %
1383 %^^A For Scipio Africanus
1384 % \newcommand*\SCIPi
1385 % {^^A
1386 % \ifXGens Publius\else
1387 % \ifXPrae Cornelius\else
1388 % Publius Cornelius^^A
1389 % \fi
1390 % \fi
1391 % }
1392 %
1393 % \newcommand*\SCIPii
1394 % {\ifXAgno Scipio\else Scipio Africanus\fi}
1395 %
1396 %^^A For Gracchus
1397 % \newcommand*\TSemp
1398 % {^^A
1399 % \ifXGens Tiberius\else
1400 % \ifXPrae Sempronius\else
1401 % Tiberius Sempronius^^A
1402 % \fi
1403 % \fi
1404 % }
1405 %
1406 %^^A For Scipio Barbatus
1407 % \newcommand*\CSB
1408 % {^^A
1409 % \ifXGens
1410 % \ifXAgno Scipio\else Scipio Barbatus\fi
1411 % \else
1412 % \ifXCogn Cornelius\else
1413 % \ifXAgno Cornelius Scipio\else
1414 % Cornelius Scipio Barbatus^^A
1415 % \fi
1416 % \fi\noindent
1417 % \fi
1418 % }
1419 %
1420 %^^A For William Shakespeare
1421 % \newcommand*\WM
1422 % {\ifSpecialFN Wm.\else William\fi}
1423 %
1424 % \newcommand*\SHK
1425 % {^^A
1426 % \ifRevertSN
1427 % \textSC{Shakespeare}\else
1428 % \ifSpecialSN
1429 % \noexpand\AltCaps{t}he Bard\else
1430 % \textSC{Shakespeare}^^A
1431 % \fi
1432 % \fi
1433 % }
1434 %
1435 % \newcommand*\Revert{\RevertSNtrue}
1436 %
1437 %
1438 %^^A ----- Name Format Standards -----
1439 %
1440 %^^A Redefine and save name formatting for this manual.
1441 % \begin{VerbatimOut}{manhook.tmp}
1442 % \renewcommand*\FrontNamesFormat{\color{violet}\sffamily}
1443 % \renewcommand*\FrontNameHook{\color{darkgray}\sffamily}
1444 % \renewcommand*\NamesFormat{\color{blue}\sffamily}
1445 % \renewcommand*\MainNameHook{\sffamily}
1446 % \end{VerbatimOut}
1447 %
1448 % \begin{VerbatimOut}{nullhook.tmp}
1449 % \renewcommand*\FrontNamesFormat{}
1450 % \renewcommand*\FrontNameHook{}
1451 % \renewcommand*\NamesFormat{}
1452 % \renewcommand*\MainNameHook{}
1453 % \end{VerbatimOut}
1454 %
1455 % \input{manhook.tmp}
1456 %
1457 %^^A @@@@@ Title Page @@@@@
1458 %
1459 % \title{\textsf{nameauth} --- Name authority mechanism\\
1460 % for consistency in text and index^^A
1461 % \thanks{This file describes version \fileversion, last revised \filedate.}}
1462 % \author{Charles P. Schaum\thanks{Email: charles[dot][email protected]}}
1463 % \date{Released \filedate}
1464 %
1465 % \maketitle
1466 %
1467 % \begin{abstract}
1468 % \noindent The \textsf{nameauth} package automates the correct formatting and indexing of names for professional writing. This aids the use of a \emph{name authority} and the editing process without needing to retype name instances.
1469 % \end{abstract}
1470 %
1471 %
1472 %^^A @@@@@ Table of Contents @@@@@
1473 %
1474 % \begingroup
1475 % \small
1476 % \hypertarget{TOC}{}^^A
1477 % \tableofcontents
1478 % \endgroup
1479 %
1480 %
1481 %^^A ----- Paragraph Skip -----
1482 %^^A Changed from initial 0pt plus 1pt
1483 % \setlength{\parskip}{2.5pt plus 0.5pt minus 0.5pt}
1484 %
1485 % \subsection*{Disclaimer}
1486 %
1487 % This manual mentions names of historical figures both living and deceased. We intend to use all names herein with respect, for teaching purposes only, and never to express or imply any disrespect or bias.
1488 %
1489 % \subsection*{Fair Use}
1490 %
1491 % Works quoted herein either are in the public domain or they are under copyright, but cited under the terms of fair use. The transformative purpose is to show the evocative power of words and names.
1492 %
1493 % \subsection*{Thanks}
1494 %
1495 % For assistance, thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani}, \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, \Name[Dan]{Luecking}, \Name[Robert]{Schlicht}, \AltFormatActive \Name[Werner]{\noexpand\textSC{Lemberg}}, \AltFormatInactive and others.\\[1ex]
1496 % \hbox{}\hfil \LA{In memoriam} \Name[Robin]{Fairbairns}\\[1ex]
1497 % He was very kind when I first uploaded \textsf{nameauth}, and gracious thereafter as well.
1498 %
1499 % \begin{Quotation}{\Wash}
1500 % {Farewell Address (1796)}
1501 % I have already intimated to you the danger of parties in the State, with particular reference to the founding of them on geographical discriminations. Let me now take a more comprehensive view, and warn you in the most solemn manner against the baneful effects of the spirit of party generally.
1502 %
1503 % This spirit, unfortunately, is inseparable from our nature, having its root in the strongest passions of the human mind. It exists under different shapes in all governments, more or less stifled, controlled, or repressed; but, in those of the popular form, it is seen in its greatest rankness, and is truly their worst enemy.
1504 %
1505 % \textls[5]{The alternate domination of one faction over another, sharpened by the spirit of revenge, natural to party dissension, which in different ages and countries has perpetrated the most horrid enormities, is itself a frightful despotism. But this leads at length to a more formal and permanent despotism. The disorders and miseries which result gradually incline the minds of men to seek security and repose in the absolute power of an individual; and sooner or later the chief of some prevailing faction, more able or more fortunate than his competitors, turns this disposition to the purposes of his own elevation, on the ruins of public liberty.}
1506 % \index{politicians, quotes of\noexpand\string|hyperpage}
1507 % \end{Quotation}
1508 %
1509 % \newpage
1510 %
1511 %^^A %%%%%%%%%%%%%%%%% Start of Documentation Proper %%%%%%%%%%%%%%%%%%%%%
1512 %
1513 % \section{Quick Start}
1514 % \label{sec:QuickStart}
1515 %
1516 % A \emph{name authority} (Section~\ref{sec:NameAuthority}) is a canonical list of names to which variant names refer. Books can have hundreds of names and index entries. The \textsf{nameauth} package assists academic and business writing:
1517 % \begin{itemize}
1518 % \item Automate the syntax and formatting of names.
1519 %
1520 % \item Manage and display information that is associated with names.
1521 %
1522 % \item Make decisions relating to names.
1523 %
1524 % \item Sort name index entries properly.
1525 %
1526 % \item Automatically add information to index entries.
1527 %
1528 % \item Ensure correct indexing of names that span page breaks.
1529 %
1530 % \item Change name forms in the text while retaining consistent index entries.
1531 %
1532 % \item Use culturally appropriate name forms in the text and index.
1533 %
1534 % \item Do not force users to use any particular naming convention.
1535 %
1536 % \item Permit European academic conventions (``Continental'' formatting).
1537 % \end{itemize}
1538 %
1539 % Indexing rules are based on \Name[Nancy C.]{Mulvany}, \Title{Indexing Books} (Chicago: University of Chicago Press, 1994). All references [\hypertarget{Mulvany}{Mulvany}] refer to this edition.\footnote{Compare \Title{The Chicago Manual of Style} (15\textsuperscript{th} ed., Chicago: Chicago UP, 2003, 309f., 755f.) or newer editions. All references [\hypertarget{Chicago}{Chicago}] refer to this edition.}
1540 %
1541 % \subsection{Simple Example}
1542 %
1543 % \input{nullhook.tmp}
1544 %
1545 % Using the default \textsf{nameauth} options and formatting hooks (not the general formatting used in this manual; cf. Section~\ref{sec:Formatting}), we show how names change automatically when we reorder statements by African-American author \Name[Charles W.]{Chesnutt}[Charles Waddell].\footnote{\Name[Charles W.]{Chesnutt}, \Title{Frederick Douglass} (Boston: Small, Maynard, 1899). See also \href{https://docsouth.unc.edu/neh/chesnutt/summary.html} {\bfseries this web page}.}
1546 %
1547 % The \texttt{nameauth} environment (Section~\ref{sec:QuickUIStart}) resembles a \texttt{tabular} with four columns. In column one we define name shorthands. Columns two and three hold the names. We leave column four empty. \cmd{\ForgetName} (Section~\ref{sec:NameControl}) used before Group~2 lets us ``start over'' with the names by forgetting their patterns.
1548 %^^A
1549 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test01_01.tex}\else
1550 % \edef\NameauthTestFile{\jobname.tmp}\fi
1551 %^^A
1552 % \begin{VerbatimOut}{\NameauthTestFile}
1553 % \documentclass{article}
1554 % \input{compat.tex} % Included with nameauth; example file aids
1555 % % compatibility across different LaTeX versions and engines.
1556 % \usepackage{makeidx}
1557 % \usepackage{nameauth}
1558 % \makeindex
1559 %
1560 % \begin{nameauth}
1561 % % Col. 1 Col. 2 Col. 3 Col. 4
1562 % \< Doug & Frederick & Douglass & >
1563 % \< Bailey & Betsey & Bailey & >
1564 % \end{nameauth}
1565 %
1566 % \begin{document}
1567 %
1568 % \textbf{Group 1}
1569 % \begin{enumerate}
1570 % \item[\textbf{1.}] \Doug\ rose to eminence by sheer force
1571 % of character and talents that neither slavery nor caste
1572 % proscription could crush.
1573 % \item[\textbf{2.}] \Doug's early life is perhaps the most
1574 % complete indictment of the slave system ever presented at
1575 % the bar of public opinion.
1576 % \item[\textbf{3.}] \Doug\ was born in February, 1817. His
1577 % earliest memories centered around the cabin of his
1578 % grandmother, \Bailey.
1579 % \end{enumerate}
1580 %
1581 % \textbf{Group 2} (Statement order changed.)
1582 % \ForgetName[Frederick]{Douglass}
1583 % \ForgetName[Betsey]{Bailey}
1584 % \begin{enumerate}
1585 % \item[\textbf{2.}] \Doug's early life is perhaps the most
1586 % complete indictment of the slave system ever presented at
1587 % the bar of public opinion.
1588 % \item[\textbf{3.}] \Doug\ was born in February, 1817. His
1589 % earliest memories centered around the cabin of his
1590 % grandmother, \Bailey.
1591 % \item[\textbf{1.}] \Doug\ rose to eminence by sheer force
1592 % of character and talents that neither slavery nor caste
1593 % proscription could crush.
1594 % \end{enumerate}
1595 %
1596 % \printindex
1597 % \end{document}
1598 % \end{VerbatimOut}
1599 %^^A
1600 % \begin{Quote}
1601 % \VerbatimInput[gobble=0,lastline=15]{\NameauthTestFile}
1602 %
1603 % \newpage
1604 %
1605 % \VerbatimInput[gobble=0,firstline=16]{\NameauthTestFile}
1606 % \end{Quote}
1607 %
1608 % \textbf{Group 1}
1609 % \begin{enumerate}
1610 % \item[\textbf{1.}] \Doug\ rose to eminence by sheer force
1611 % of character and talents that neither slavery nor caste
1612 % proscription could crush.
1613 % \item[\textbf{2.}] \Doug's early life is perhaps the most
1614 % complete indictment of the slave system ever presented at
1615 % the bar of public opinion.
1616 % \item[\textbf{3.}] \Doug\ was born in February, 1817. His
1617 % earliest memories centered around the cabin of his
1618 % grandmother, \Bailey.
1619 % \end{enumerate}
1620 %
1621 % \textbf{Group 2} (Statement order changed.)
1622 % \ForgetName[Frederick]{Douglass}
1623 % \ForgetName[Betsey]{Bailey}
1624 % \begin{enumerate}
1625 % \item[\textbf{2.}] \Doug's early life is perhaps the most
1626 % complete indictment of the slave system ever presented at
1627 % the bar of public opinion.
1628 % \item[\textbf{3.}] \Doug\ was born in February, 1817. His
1629 % earliest memories centered around the cabin of his
1630 % grandmother, \Bailey.
1631 % \item[\textbf{1.}] \Doug\ rose to eminence by sheer force
1632 % of character and talents that neither slavery nor caste
1633 % proscription could crush.
1634 % \end{enumerate}
1635 %
1636 % The goal of this example is to suggest that, if one has a project typeset using \LaTeX, it takes a lot of time and attention to ensure the proper appearance of names. If a unit of text gets moved somewhere else, the knock-on effect could involve re-examining many names to see if their forms are acceptable. Our mission is to automate the editing process to a degree and let names take care of themselves.
1637 %
1638 % \newpage
1639 %
1640 % \subsection{How To Use the Manual}
1641 %
1642 % \input{manhook.tmp}
1643 %
1644 % This manual tries to support various learning styles by using layout, colors, shapes, and similar ordering of both document sections and package code.
1645 %
1646 % \subsubsection*{\hfil Macro Argument Types}
1647 %
1648 % \negbigskip
1649 % \begin{multicols}{2}
1650 % \tcbox{\bfseries Mandatory args in black}
1651 %
1652 % \tcbox[colback=white]{\color{nared}\bfseries Optional args in dark red}
1653 % \end{multicols}
1654 %
1655 % \subsubsection*{\hfil Scope and Sequence}
1656 %
1657 % The table of contents goes from simpler, frequently-used features to more complex, infrequent ones. The end of each major section has a return link to the \hyperlink{TOC}{TOC}. Thus, as the section numbers increase in the lists below, so does the complexity.
1658 % \begin{center}
1659 % \begin{tabular}{ll}
1660 % General concepts: &
1661 % \ref{sec:QuickStart}, \ref{sec:Indexing}, \ref{sec:DataTags},
1662 % \ref{sec:FormatChoice}, \ref{sec:NameAuthority}\\
1663 % Multilingual: &
1664 % \ref{sec:Lang}, \ref{sec:AdvancedFormat}\\
1665 % Details and debugging: &
1666 % \ref{sec:PkgOptions}, \ref{sec:Priorities},
1667 % \ref{sec:NamePedantic}, \ref{sec:Debugging},
1668 % \ref{sec:OldStuff}\\
1669 % \end{tabular}
1670 % \end{center}
1671 %
1672 % \subsubsection*{\hfil Key Concepts}
1673 %
1674 % Starting in Section~\ref{sec:BasicStart}, \emph{name patterns} appear in the margin (overview in Section~\ref{sec:NamePatterns}), which are key to how names work in \textsf{nameauth}. Through Section~\ref{sec:RomanScholari} \emph{basic index entries} appear in the margin to show how macro arguments and index entries relate. Thereafter, we use margin notes less due to greater complexity.
1675 %
1676 % \subsubsection*{\hfil Special Signs and Typography}
1677 %
1678 % \begin{itemize}
1679 % \item[\ \ ]We highlight {\NamesFormat{First Uses}} and {\MainNameHook{Later Uses}} of names (Sections~\ref{sec:Formatting}--\ref{sec:NameControl}).
1680 % \end{itemize}
1681 %
1682 % \begin{InfoBox}
1683 % \VerbatimInput[gobble=0,numbers=none,fontsize=\small]{manhook.tmp}
1684 % \end{InfoBox}
1685 %
1686 % \begin{itemize}
1687 % \item[\dag\ ]A dagger indicates reversed Western forms (Sections~\ref{sec:RevNames}).
1688 %
1689 % \item[\ddag\ ]A double dagger shows usage of the obsolete syntax (Section~\ref{sec:Obsolete}).
1690 %
1691 % \item[\S\ ]A section mark denotes index entries of fictional names.
1692 %
1693 % \item[\dbend]The ``dangerous bend'' shows where extra caution is needed.
1694 % \end{itemize}
1695 %
1696 % \begin{Quotation}{\Doug}
1697 % {speech at Rochester, NY, 1852)}
1698 % You profess to believe that ``of one blood God made all nations of men to dwell on the face of the earth''\,---\,and hath commanded all men, everywhere, to love one another\,---\,yet you notoriously hate (and glory in your hatred!) all men whose skins are not colored like your own.
1699 % \index{civil rights leaders, quotes of\noexpand\string|hyperpage}
1700 % \end{Quotation}
1701 %
1702 % \newpage
1703 %
1704 % \subsubsection*{\hfil General Advice}
1705 %
1706 % \begin{itemize}
1707 % \item See \texttt{README.md} for details about package development and testing.
1708 %
1709 % \item Both \texttt{compat.tex} and \texttt{examples.tex} contain useful information. They are located with this manual.
1710 %
1711 % \item Do not put naming macros withing a macro defined with \cmd{\edef}.
1712 %
1713 % \item Naming macros can be arguments of a macro defined with \cmd{\edef}.
1714 %
1715 % \item In \texttt{dtx} files, it can be simpler to put the \texttt{nameauth} environment and initial tagging macros in the \texttt{<driver>} part. Yet \cmd{\newif} statements must occur in the ``commented part''.
1716 % \end{itemize}
1717 %
1718 % We summarize some issues related to backward compatibility, which \textsf{nameauth} takes quite seriously as a partner to those who want to preserve their publications.
1719 % \begin{itemize}
1720 % \item Starting with version 4.0, \textsf{nameauth} has used \textsf{xparse} for starred macros and name arguments, which offers many benefits.
1721 %
1722 % \item Users of \TeX\ distribution before 2018 might encounter unexpected or undefined behavior. To mitigate them, see Sections~\ref{sec:FinalOptargs}, \ref{sec:Unicode}f., \ref{sec:CompatON}, and~\ref{sec:FullCustomize}. See also \texttt{compat.tex}.
1723 %
1724 % \item Older customizations using \textsf{xargs} may still work with the \texttt{oldargs} option. See Section~\ref{sec:OptionCompat} and \texttt{examples.tex}. It includes additional code snippets that deal with compatibility. If one should require \textsf{nameauth} version 3.7, see section 7 of \texttt{README.md}.
1725 % \item To use older \TeX\ distributions (2018 and before), one must include the \textsf{textcomp} package for backward compatibility.
1726 %
1727 % \item If users need to preserve older \TeX\ distributions in order to maintain publications for reprint, they are encouraged to view and modify \texttt{compat.tex}, then \cmd{\input} it into the preambles of their projects.
1728 % \end{itemize}
1729 %
1730 % \begin{Quotation}{\Name{Aristotle}}
1731 % {\Title{Politics} (post-338 \textsc{bc})}
1732 % Man is by nature a social animal; an individual who is unsocial
1733 % naturally and not accidentally is either beneath our notice or more
1734 % than human. Society is something that precedes the individual. Anyone
1735 % who either cannot lead the common life or is so self-sufficient as not
1736 % to need to, and therefore does not partake of society, is either a
1737 % beast or a god.
1738 % \index{philosophers, quotes of\noexpand\string|hyperpage}
1739 % \end{Quotation}
1740 %
1741 % \newpage
1742 %
1743 % \subsection{Basic Concepts}
1744 %
1745 % \subsubsection{Name Ambiguity}
1746 %
1747 % \subsubsection*{\hfil Culture resolves ambiguity.}
1748 %
1749 % Western culture often includes forenames followed by a surname and an optional affix. Exceptions can include patronyms like \Name[Leif]{Erikson} and \Name{Llywelyn, ap Gruffudd}, as well as ancient and royal names.\footnote{Indexed here under \Name[Leif]{Erikson} and \Name{Llywelyn, ap Gruffudd}. See \href{https://www.theindexer.org/wp-content/uploads/2020/07/welsh-personal-names.pdf} {\bfseries this document} on Welsh names.}
1750 % Due to the conventions taught to them, Western readers might misinterpret the following names:
1751 %
1752 % \begin{Block}
1753 % \begin{tabular}{llll}
1754 % Forenames: &
1755 % \ForceName\SubvertThis\FName[M.T.]{Cicero}[Marcus Tullius] &
1756 % Surname: &
1757 % \ForceName\Name[M.T.]{Cicero}\\[0.5ex]
1758 %
1759 % Forename: &
1760 % \ForceName\SubvertThis\Name{Pontius, Pilate} &
1761 % Surname: &
1762 % \ForceName\ForceFN\FName{Pontius, Pilate}\\[0.5ex]
1763 %
1764 % Forename: &
1765 % \ForceName\SubvertThis\Name{Jesus, Christ} &
1766 % Surname: &
1767 % \ForceName\ForceFN\FName{Jesus, Christ}
1768 % \end{tabular}
1769 % \end{Block}
1770 %
1771 % Yet these names have meanings that cannot be known \emph{as signs in themselves} apart from their native cultural setting. That reveals the following information:
1772 %
1773 % \begin{Block}
1774 % \begin{tabular}{cllll}
1775 % \LA{Praenomen}:
1776 % \SubvertThis\FName[M.T.]{Cicero}[Marcus] &
1777 % \LA{Nomen}: &
1778 %
1779 % \SubvertThis\FName[M.T.]{Cicero}[Tullius] &
1780 % \LA{Cognomen}: &
1781 % \Name[M.T.]{Cicero}\\[0.5ex]
1782 %
1783 % \meta{empty} &
1784 % \LA{Nomen}: &
1785 % \SubvertThis\Name{Pontius, Pilate} &
1786 % \LA{Cognomen}: &
1787 % \ForceFN\FName{Pontius, Pilate}[Pilatus]\\[0.5ex]
1788 %
1789 % \hfil \meta{empty} &
1790 % Name: &
1791 % \SubvertThis\Name{Jesus, Christ} &
1792 % Sobriquet: &
1793 % \ForceFN\FName{Jesus, Christ}
1794 % \end{tabular}
1795 % \end{Block}
1796 %
1797 % Roman names have a forename, a clan name, and one or more names that can denote branch families, nicknames, etc. Forenames (\LA{praenomina}) do not carry great weight; the clan name (\LA{nomen}) is of most importance. The clan name of \Name[M.T.]{Cicero} actually is \FName[M.T.]{Cicero}[Tullius]. In English, he used to be known as \IndexRef{Tully}{Cicero, M.T.}\Name{Tully}. \Name*{Pontius, Pilate} has no forename. \Name{Pontius, Pilate} is a clan name. The ``nickname'' (\LA{cognomen}) \ForceFN\FName{Pontius, Pilate}[Pilatus] refers to skill with the \LA{pilum}, a barbed spear. The name \Name*{Jesus, Christ} comes from \el{Ἰησοῦς ὁ\nbsp Χριστός}, from Hebrew \textit{Y'shua ha-Mashiach}, ``Joshua the Anointed One''.
1798 %
1799 % \subsubsection*{\hfil \textbf{We embrace ambiguity.}}
1800 %
1801 % \IndexRef{Pilate}{Pontius Pilate}
1802 % The market determines usage, whether general or scholarly (Section~\ref{sec:Romani}).\footnote{For an example of a resource that tries to span both the popular and the scholarly, see John Bartlett, \Title{Bartlett's Familiar Quotations}, 16\textsuperscript{th} ed., ed. Justin Kaplan (Boston: Little, Brown, 1991).}
1803 % Here we represent \Name[M.T.]{Cicero} as a Western name and both \ForceFN\FName{Pontius, Pilate} and \ForceFN\FName{Jesus, Christ} as Non-Western names. \Name[M.T.]{Cicero} is indexed by his \LA{cognomen}; \ForceFN\FName{Pontius, Pilate} by his \LA{nomen}.\footnote{\cmd{\IndexRef\{Pilate\}\{Pontius Pilate\}} makes ``Pilate \dots\ \textit{see} Pontius Pilate'', a cross-reference that guides Western readers from the expected index entry to the entry used here (Section~\ref{sec:IndexRef}).}
1804 % \begin{itemize}
1805 % \item Western Index Entry:\smallskip
1806 %
1807 % \begingroup\small
1808 % \begin{tabular}{p{2.2cm}p{4.2cm}p{2.5cm}}\toprule
1809 % \rowcolor{nagrey}\bfseries Text &
1810 % \bfseries Macro / Arguments & \bfseries Index\\
1811 % \Name*[M.T.]{Cicero} & \cmd{\Name[M.T.]\{Cicero\}} &
1812 % \ShowIdxPageref*{}\\\bottomrule
1813 % \end{tabular}
1814 % \endgroup\medskip
1815 %
1816 % \item Non-Western Index Entries:\smallskip
1817 %
1818 % \begingroup\small
1819 % \begin{tabular}{p{2.2cm}p{4.2cm}p{2.5cm}}\toprule
1820 % \rowcolor{nagrey}\bfseries Text &
1821 % \bfseries Macro / Arguments & \bfseries Index\\
1822 % \Name*{Pontius, Pilate} &
1823 % \cmd{\Name\{Pontius, Pilate\}} &
1824 % \ShowIdxPageref*{}\\
1825 % \rowcolor{nagrey}\Name*{Jesus, Christ} &
1826 % \cmd{\Name\{Jesus, Christ\}} &
1827 % \ShowIdxPageref*{}\\\bottomrule
1828 % \end{tabular}
1829 % \endgroup
1830 % \end{itemize}
1831 %
1832 % \newpage
1833 %
1834 % Name forms in the text can be changed independently of their index entries. This is necessary for cases like Hungarian names, Roman names, or when a publisher wants to use Western index entry forms with Eastern names.
1835 %
1836 % For example, the Hungarian name \RevName\Name[Ferenc]{Liszt}\dag\ has the index entry ``\ShowIdxPageref*{}''. We used the macro arguments for Western names to get the correct index entry, but we reversed the name in the text via |\RevName\Name[Ferenc]{Liszt}|. \IndexRef[Franz]{Liszt}{Liszt, Ferenc}\Name[Franz]{Liszt} is his equivalent German name, cross-referenced to the Hungarian form.
1837 %
1838 % \subsubsection*{\hfil \textbf{Name arguments determine index entries.}}
1839 %
1840 % The way that one encodes names using macro arguments primarily determines the form of the index entry\,—\,not the mutable form in the text. This is the key reason to use \textsf{nameauth} over manual methods. We do not index the names below, but we show how the index entries would appear:
1841 % \IndexInactive
1842 % \begin{itemize}
1843 % \item Western Index Entries:\smallskip
1844 %
1845 % \begingroup\small
1846 % \begin{tabular}{p{2.2cm}p{5.6cm}p{2.7cm}}\toprule
1847 % \rowcolor{nagrey}\bfseries Text &
1848 % \bfseries Macro / Arguments & \bfseries Index\\
1849 % \Name[First]{Last, Affix} & |\Name[First]{Last, Affix}| &
1850 % \ShowIdxPageref*[First]{Last, Affix}\\
1851 % \Name[First]{Last, Affix} & |\Name[First]{Last, Affix}| &
1852 % \ShowIdxPageref*[First]{Last, Affix}\\
1853 % \Name[First]{Last} & |\Name[First]{Last}| &
1854 % \ShowIdxPageref*[First]{Last}\\
1855 % \Name[First]{Last} & |\Name[First]{Last}| &
1856 % \ShowIdxPageref*[First]{Last}\\
1857 % \RevName\Name*[First]{Last} & |\RevName\Name*[First]{Last}| &
1858 % \ShowIdxPageref*[First]{Last}\\\bottomrule
1859 % \end{tabular}
1860 % \endgroup\medskip
1861 %
1862 % \item Non-Western Index Entries:\smallskip
1863 %
1864 % \begingroup\small
1865 % \begin{tabular}{p{2.2cm}p{5.6cm}p{2.7cm}}\toprule
1866 % \rowcolor{nagrey}\bfseries Text &
1867 % \bfseries Macro / Arguments & \bfseries Index\\
1868 % \Name{Family, Person} & |\Name{Family, Person}| &
1869 % \ShowIdxPageref*{Family, Person}\\
1870 % \Name{Family, Person} & |\Name{Family, Person}| &
1871 % \ShowIdxPageref*{Family, Person}\\
1872 % \RevName\Name*{Family, Person} &
1873 % |\RevName\Name*{Family, Person}| &
1874 % \ShowIdxPageref*{Family, Person}\\
1875 % \Name{Person, Affix} & |\Name{Person, Affix}| &
1876 % \ShowIdxPageref*{Person, Affix}\\
1877 % \Name{Person, Affix} & |\Name{Person, Affix}| &
1878 % \ShowIdxPageref*{Person, Affix}\\
1879 % \Name{Person} & |\Name{Person}| &
1880 % \ShowIdxPageref*{Person}\\\bottomrule
1881 % \end{tabular}
1882 % \endgroup
1883 % \end{itemize}
1884 % \IndexActive
1885 %
1886 % \subsubsection*{\hfil \textbf{Name complexity creates \textsf{nameauth} complexity.}}
1887 %
1888 % We might take names for granted until we have to consider them, use them in multicultural contexts, index them, and so on. Even if one does not use the \textsf{nameauth} package, one cannot escape this complexity.
1889 %
1890 % The process of making \textsf{nameauth} became the means by which the present author learned about both the many intricate and fascinating complexities of names and the complexities of \LaTeX. One hopes that this package might facilitate accurate and respectful cross-cultural use of names in quality publications.
1891 %
1892 % \begin{Quotation}{\Name[Harold]{Urey} (1961)}{}
1893 % The space program is not only scientific in purpose but also is
1894 % an expression of man's insistent determination to do the nearly
1895 % impossible\,---\,to explore the unknown, even at great risk.
1896 % \index{scientists, quotes of\noexpand\string|hyperpage}
1897 % \end{Quotation}
1898 %
1899 % \newpage
1900 %
1901 % \subsubsection{Name Arguments}
1902 % \label{sec:NameArgs}
1903 %
1904 % \begingroup\small
1905 % \setbox0\hbox{Family / clan name\ }
1906 % \global\setlength{\nameboxi}{\wd0}
1907 % \setbox0\hbox{nomen / cognomen\ }
1908 % \global\setlength{\nameboxii}{\wd0}
1909 % \setbox0\hbox{notable attribute\ }
1910 % \global\setlength{\nameboxiii}{\wd0}
1911 % \endgroup
1912 %
1913 % We describe the general form of names according to the current \textsf{nameauth} syntax.\footnote{Adopted from [\hyperlink{Mulvany}{Mulvany}, 152--82] and [\hyperlink{Chicago}{Chicago}].}
1914 % Mandatory and optional \emph{macro arguments} aid a natural-language approach. They are subordinate to \emph{required and optional name elements}, shown by black and red text. Issues with final optional arguments are covered in Section~\ref{sec:FinalOptargs}.
1915 %
1916 % \newcommand*\WestSyntax{Western Names: \cmd{\Name}\oarg{FNN}^^A
1917 % \marg{SNN{\color{nared}\textbf{,}Affix}}^^A
1918 % \oarg{{\color{nared}Alternate}}}
1919 % \newcommand*\EastSyntax{``Native'' Eastern Names:
1920 % \cmd{\Name}\marg{SNN\textbf{,}Affix}^^A
1921 % \oarg{{\color{nared}Alternate}}}
1922 % \newcommand*\AncientSyntax{Ancient / Royal Names:
1923 % \cmd{\Name}\marg{SNN{\color{nared}\textbf{,}Affix}}^^A
1924 % \oarg{{\color{nared}Alternate}}}
1925 %
1926 % \subsubsection*{\hfil \protect\WestSyntax}
1927 % \begin{tcolorbox}[colframe=gray]
1928 % \centering\small^^A
1929 %^^A
1930 % \tcbox[equal height group=A,on line,tikznode,colback=white,
1931 % adjusted title={\centering\bfseries\sffamily Forename(s):\meta{FNN}}]
1932 % {\hbox to \nameboxi {\hfil Personal name(s):\hfil}\\
1933 % \textit{baptismal name}\\
1934 % \textit{Christian name}\\
1935 % \textit{multiple names}\\
1936 % (\LA{prae})\LA{nomen}\footnotemark}\hfill^^A
1937 %^^A
1938 % \tcbox[equal height group=A,on line,tikznode,colback=white,
1939 % adjusted title={\centering\bfseries\sffamily
1940 % Surname(s):\meta{SNN}}]
1941 % {\hbox to \nameboxii {\hfil Family name:\hfil}\\
1942 % \textit{of father, mother}\\
1943 % \textit{ancestor, vocation}\\
1944 % \textit{origin, region}\\
1945 % \LA{nomen\,/\,cognomen}\\
1946 % \textit{patronym}}\hfill^^A
1947 %^^A
1948 % \tcbox[equal height group=A,on line,tikznode,colback=white,colframe=nared,
1949 % adjusted title={\centering\bfseries\sffamily
1950 % Qualifier:\meta{Affix}}]
1951 % {\hbox to \nameboxiii {\hfil Sobriquet\,/\,title:\hfil}\\
1952 % \textit{Sr., Jr., III\dots}\\
1953 % \textit{notable attribute}\\
1954 % \textit{origin, region}\\
1955 % \LA{agnomen}}
1956 %
1957 % \begin{tcolorbox}[colback=white,colframe=nared,
1958 % adjusted title={\centering\bfseries\sffamily
1959 % Alias:\meta{Alternate}}]
1960 % \centering Replaces \meta{FNN} only in the text, not in the index.
1961 % \end{tcolorbox}
1962 %
1963 % \end{tcolorbox}
1964 % \footnotetext{There are several ways of handling the Roman \LA{tria
1965 % nomina}. See Section~\ref{sec:Romani}.}
1966 %
1967 % \subsubsection*{\hfil \protect\EastSyntax}
1968 %
1969 % \begin{tcolorbox}[colframe=gray]
1970 % \centering\small^^A
1971 %^^A
1972 % \tcbox[equal height group=B,on line,tikznode,colback=white,
1973 % adjusted title={\centering\bfseries\sffamily
1974 % Family:\meta{SNN}}]
1975 % {\hbox to \nameboxi {\hfil Family\,/\,clan name\hfil}}\hfill^^A
1976 %^^A
1977 % \tcbox[equal height group=B,on line,tikznode,colback=white,
1978 % adjusted title={\centering\bfseries\sffamily
1979 % Personal:\meta{Affix}}]
1980 % {\hbox to \nameboxii {\hfil Usually one name\hfil}}\hfill^^A
1981 %^^A
1982 % \tcbox[equal height group=B,on line,tikznode,colback=white,colframe=nared,
1983 % adjusted title={\centering\bfseries\sffamily
1984 % Alias:\meta{Alternate}}]
1985 % {\hbox to \nameboxiii {\hfil Replaces \meta{Affix}\hfil}\\
1986 % only in text.\footnotemark}
1987 % \end{tcolorbox}
1988 % \footnotetext{The obsolete syntax uses \meta{Alternate} instead of
1989 % \meta{Affix} for a personal name (Section~\ref{sec:Obsolete}).}
1990 %
1991 % \subsubsection*{\hfil \protect\AncientSyntax}
1992 %
1993 % \begin{tcolorbox}[colframe=gray]
1994 % \centering\small^^A
1995 %^^A
1996 % \tcbox[equal height group=C,on line,tikznode,colback=white,
1997 % adjusted title={\centering\bfseries\sffamily
1998 % Personal:\meta{SNN}}]
1999 % {\hbox to \nameboxi {\hfil Given name(s)\hfil}\\
2000 % \phantom{Family\,/\,clan name}}\hfill^^A
2001 %^^A
2002 % \tcbox[equal height group=C,on line,tikznode,colback=white,colframe=nared,
2003 % adjusted title={\centering\bfseries\sffamily
2004 % Qualifier:\meta{Affix}}]
2005 % {\hbox to \nameboxii {\hfil Sobriquet\,/\,title:\hfil}\\
2006 % \textit{Sr., Jr., III\dots}\\
2007 % \textit{notable attribute}\\
2008 % \textit{origin, region}\\
2009 % \textit{patronym}}\hfill^^A
2010 %^^A
2011 % \tcbox[equal height group=C,on line,tikznode,colback=white,colframe=nared,
2012 % adjusted title={\centering\bfseries\sffamily
2013 % Alias:\meta{Alternate}}]
2014 % {\hbox to \nameboxiii {\hfil Replaces \meta{Affix}\hfil}\\
2015 % only in text.\footnotemark}
2016 % \end{tcolorbox}
2017 % \footnotetext{The obsolete syntax uses \meta{Alternate} instead of
2018 % \meta{Affix} for a qualifier (Section~\ref{sec:Obsolete}).}
2019 %
2020 % \newpage
2021 %
2022 % \subsection{Basic Interface}
2023 % \label{sec:BasicStart}
2024 %
2025 % The description of macro arguments in this section applies to all \textsf{nameauth} macros that take name arguments (Sections~\ref{sec:NameArgs}, \ref{sec:NameArgMacros}, and~\ref{sec:FinalOptargs}), making this section critical to using and mastering \textsf{nameauth}. Here are some general tips:
2026 % \begin{itemize}
2027 % \item If the required argument \meta{SNN} is empty, \textsf{nameauth} issues a package error, even when the \meta{Affix} part of an \meta{SNN}\textbf{,}\meta{Affix} pair is not empty. Macros that take null arguments (Section~\ref{sec:NullArgs}) are the exception.
2028 %
2029 % \item Extra spaces around each argument are stripped.
2030 %
2031 % \item Include name arguments consistently to have consistent index entries.
2032 % \end{itemize}
2033 %
2034 % \subsubsection{Western Names}
2035 %
2036 % \begin{tcolorbox}[colframe=gray]\centering
2037 % \begin{tabular}{l@{ }c@{ }c@{ }c}
2038 % & Required & Required \meta{SNN} & Optional\\
2039 % & \meta{FNN} & optional \meta{Affix} & (text only)\\[1ex]
2040 % \tcbox[equal height group=D,colback=white,tikznode,
2041 % left=1mm,right=1mm,valign=center]
2042 % {\normalsize\bfseries \hbox{\cmd{\Name}\texttt{ }}\\
2043 % \cmd{\Name*}\\
2044 % \cmd{\FName}} &
2045 % \tcbox[equal height group=D,colback=white,tikznode,
2046 % left=1mm,right=1mm,valign=center]
2047 % {\normalsize\bfseries\oarg{FNN}} &
2048 % \tcbox[equal height group=D,colback=white,tikznode,
2049 % left=1mm,right=1mm,valign=center]
2050 % {\normalsize\bfseries\marg{SNN\color{nared}\textbf{,}Affix}} &
2051 % \tcbox[equal height group=D,colback=white,tikznode,
2052 % left=1mm,right=1mm,valign=center]
2053 % {\normalsize\bfseries\oarg{\color{nared}Alternate}}
2054 % \end{tabular}
2055 % \end{tcolorbox}
2056 %
2057 % \begin{itemize}
2058 % \item Western names must use the \meta{FNN} argument.
2059 %
2060 % \item They require a comma to delimit any affixes (Section~\ref{sec:Affix}).
2061 %
2062 % \item They use \meta{Alternate} to swap with \meta{FNN} in the text.
2063 %
2064 % \item They have Western name patterns (Section~\ref{sec:NamePatterns}) and index entries:
2065 % \begin{itemize}
2066 % \item[] \meta{SNN}, \meta{FNN}
2067 %
2068 % \item[] \meta{SNN}, \meta{FNN}, \meta{Affix}
2069 % \end{itemize}
2070 % \end{itemize}
2071 %
2072 % \subsubsection*{\hfil Full, Last, and First Names}
2073 %
2074 % \cmd{\Name} prints first uses of names long, then short thereafter. \cmd{\Name*} ensures a long form. Both \cmd{\FName} and \cmd{\FName*} print long names in first uses, then just a forename in later uses. The intent is that one can just add an \texttt{F} to either \cmd{\Name} or \cmd{\Name*}. The affix in a surname only appears in long name instances.
2075 %
2076 % \BothInfo[5ex]{\ShowPattern[George]{Washington}\break
2077 % \ShowPattern[George S.]{Patton, Jr.}}
2078 % {\ShowIdxPageref*[George]{Washington}\break
2079 % \ShowIdxPageref*[George S.]{Patton, Jr.}}
2080 % \begin{Block}
2081 % \ForgetName[George]{Washington}
2082 % \FUse \Name [George]{Washington}\dotfill^^A
2083 % |\Name [George]{Washington}|\\
2084 % \UseL \Name*[George]{Washington}\dotfill^^A
2085 % |\Name*[George]{Washington}|\\
2086 % \LUse \Name [George]{Washington}\dotfill^^A
2087 % |\Name [George]{Washington}|\\
2088 % \UseS \FName[George]{Washington}\dotfill^^A
2089 % |\FName[George]{Washington}|
2090 % \end{Block}
2091 %
2092 % \begin{Block}
2093 % \FUse \Name [George S.]{Patton, Jr.}\dotfill^^A
2094 % |\Name [George S.]{Patton, Jr.}|\\
2095 % \UseL \Name*[George S.]{Patton, Jr.}\dotfill^^A
2096 % |\Name*[George S.]{Patton, Jr.}|\\
2097 % \LUse \Name [George S.]{Patton, Jr.}\dotfill^^A
2098 % |\Name [George S.]{Patton, Jr.}|\\
2099 % \UseS \FName[George S.]{Patton, Jr.}\dotfill^^A
2100 % |\FName[George S.]{Patton, Jr.}|
2101 % \end{Block}
2102 %
2103 % \newpage
2104 %
2105 % \subsubsection*{\hfil Affixes and Alternate Forms}
2106 %
2107 % Here we use prefix macros to change name forms (Section~\ref{sec:ListPrefix}). In a long name instance, \cmd{\DropAffix} drops the affix from a Western surname. The \meta{Alternate} argument appears only in long names or forename-only names in the text. Otherwise, the automatic shortening of names will display only a short surname.
2108 % \begin{itemize}
2109 % \item Drop the affix in a first- or long use (\cmd{\Name*}):
2110 % \BothInfo*{\ShowPattern[George S.]{Patton, Jr.}\break
2111 % \ShowPattern[J.D.]{Rockefeller, IV}\break
2112 % \ShowPattern[Clive Staples]{Lewis}}
2113 % {\ShowIdxPageref*[George S.]{Patton, Jr.}\break
2114 % \ShowIdxPageref*[J.D.]{Rockefeller, IV}\break
2115 % \ShowIdxPageref*[Clive Staples]{Lewis}}
2116 % \begin{Block}
2117 % \FUse \ForgetThis\DropAffix\Name[George S.]{Patton, Jr.}\\
2118 % \UseB |\DropAffix\Name[George S.]{Patton, Jr.}|\\
2119 % \UseL \DropAffix\Name*[George S.]{Patton, Jr.}\\
2120 % \UseB |\DropAffix\Name*[George S.]{Patton, Jr.}|
2121 % \end{Block}
2122 %
2123 % \item To force the printing of only \meta{Affix} in the subsequent use of a Roman name, see the use of \cmd{\ForceAffix} in Section~\ref{sec:RomanGeneral}.
2124 %
2125 % \item Use an alternate forename in a first- or long use:
2126 % \begin{Block}
2127 % \FUse \Name[J.D.]{Rockefeller, IV}[John Davison]\\
2128 % \UseB |\Name[J.D.]{Rockefeller, IV}[John Davison]|\\
2129 % \UseL \Name*[J.D.]{Rockefeller, IV}[John Davison]\\
2130 % \UseB |\Name*[J.D.]{Rockefeller, IV}[John Davison]|
2131 % \end{Block}
2132 %
2133 % \item Use an alternate forename in a forename-only use (\cmd{\FName}):
2134 % \begin{Block}
2135 % \UseS \FName[George S.]{Patton, Jr.}[George]\dotfill^^A
2136 % |\FName[George S.]{Patton, Jr.}[George]|\\
2137 % \UseS \FName[J.D.]{Rockefeller, IV}[Jay]\dotfill^^A
2138 % |\FName[J.D.]{Rockefeller, IV}[Jay]|
2139 % \end{Block}
2140 %
2141 % \item Drop the affix and alter the forenames:
2142 % \begin{Block}
2143 % \FUse \ForgetThis\DropAffix\Name[J.D.]{Rockefeller, IV}[Jay]\\
2144 % \UseB |\DropAffix\Name[J.D.]{Rockefeller, IV}[Jay]|\\
2145 % \UseL \DropAffix\Name*[J.D.]{Rockefeller, IV}[Jay]\\
2146 % \UseB |\DropAffix\Name*[J.D.]{Rockefeller, IV}[Jay]|
2147 % \end{Block}
2148 %
2149 % \item Use multiple alternate forenames for the same person:
2150 % \begin{Block}
2151 % \FUse \Name [Clive Staples]{Lewis}\dotfill^^A
2152 % |\Name [Clive Staples]{Lewis}|\\
2153 % \UseL \Name*[Clive Staples]{Lewis}[C.S.]\dotfill^^A
2154 % |\Name*[Clive Staples]{Lewis}[C.S.]|\\
2155 % \UseS \FName[Clive Staples]{Lewis}[Jack]\dotfill^^A
2156 % |\FName[Clive Staples]{Lewis}[Jack]|
2157 % \end{Block}
2158 % \end{itemize}
2159 % \smallskip
2160 %
2161 % \begin{InfoBox}
2162 % All names should be sorted in the index by their longest unique forms. Convert Roman numerals to Arabic in order to avoid sorting the numbers alphabetically. See Sections~\ref{sec:IndexSort}, \ref{sec:IndexInitials}, and~\ref{sec:VarNames}.\smallskip
2163 %
2164 % \begin{Center}
2165 % |\PretagName[J.D.]{Rockefeller, IV}{Rockefeller, John D 4}|
2166 % \end{Center}
2167 % \end{InfoBox}
2168 %
2169 % \begin{Quotation}{\Name[W.H.]{Auden}}
2170 % {\Title{Paris Review} interview (1972) p. 206}
2171 % I don't think the mystical experience can be verbalized. When
2172 % the ego disappears, so does power over language.
2173 % \index{creatives, quotes of\noexpand\string|hyperpage}
2174 % \end{Quotation}
2175 %
2176 % \newpage
2177 %
2178 % \subsubsection[Reversed Western]{Reversed Western Names}
2179 %
2180 % \begin{tcolorbox}[colframe=gray]\centering
2181 % \begin{tabular}{l@{ }c@{ }c@{ }c}
2182 % & Required & Required \meta{SNN} & Optional\\
2183 % & \meta{FNN} & no \meta{Affix} & (text only)\\[1ex]
2184 % \tcbox[equal height group=D,colback=white,tikznode,
2185 % left=1mm,right=1mm,valign=center]
2186 % {\normalsize\bfseries \hbox{\cmd{\Name}\texttt{ }}\\
2187 % \cmd{\Name*}\\
2188 % \cmd{\FName}} &
2189 % \tcbox[equal height group=D,colback=white,tikznode,
2190 % left=1mm,right=1mm,valign=center]
2191 % {\normalsize\bfseries\oarg{FNN}} &
2192 % \tcbox[equal height group=D,colback=white,tikznode,
2193 % left=1mm,right=1mm,valign=center]
2194 % {\normalsize\bfseries\quad\marg{SNN}\quad\hbox{}} &
2195 % \tcbox[equal height group=D,colback=white,tikznode,
2196 % left=1mm,right=1mm,valign=center]
2197 % {\normalsize\bfseries\oarg{\color{nared}Alternate}}
2198 % \end{tabular}
2199 % \end{tcolorbox}
2200 %
2201 % \begin{itemize}
2202 % \item Names must use the \meta{FNN} argument. They do not use \meta{Affix}.\footnote{This prevents strange name forms. Using \cmd{\DropAffix} (Section~\ref{sec:Affix}) will not help.}
2203 %
2204 % \item They use \meta{Alternate} to swap with \meta{FNN} in the text.
2205 %
2206 % \item They have Western name patterns and index entries:
2207 % \begin{itemize}
2208 % \item[] \meta{SNN}, \meta{FNN}
2209 % \end{itemize}
2210 %
2211 % \item They do not work with the obsolete syntax (Section~\ref{sec:Obsolete}).
2212 % \end{itemize}
2213 %
2214 % \subsubsection*{\hfil Starting with Western Name Forms}
2215 %
2216 % Reversed Western forms (as with Hungarian and other names) start out as Western names before we put them into reverse order. They retain Western index entries [\hyperlink{Mulvany}{Mulvany}, 166]. Without being reversed, they look like:\footnote{Regarding the margin note that shows name patterns, with \texttt{pdflatex} and \texttt{latex} using \textsf{inputenc} and \textsf{fontenc}, in \texttt{\ShowPattern[Ferenc]{Molnár}} the glyphs \texttt{Ãą} correspond to \cmd{\IeC\{\textbackslash\textquotesingle a\}}.}
2217 %
2218 % \BothInfo[5ex]{\ShowPattern[Ferenc]{Molnár}\break
2219 % \ShowPattern[Hideyo]{Noguchi}}
2220 % {\ShowIdxPageref*[Hideyo]{Noguchi}\break
2221 % \ShowIdxPageref*[Ferenc]{Molnár}}
2222 % \begin{Block}
2223 % \FUse \Name[Ferenc]{Molnár}\dotfill^^A
2224 % |\Name[Ferenc]{Molnár}|\\
2225 % \LUse \Name[Ferenc]{Molnár}\dotfill^^A
2226 % |\Name[Ferenc]{Molnár}|\\
2227 % \FUse \Name[Hideyo]{Noguchi}\dotfill^^A
2228 % |\Name[Hideyo]{Noguchi}|\\
2229 % \LUse \Name[Hideyo]{Noguchi}\dotfill^^A
2230 % |\Name[Hideyo]{Noguchi}|\\
2231 % \UseL \Name*[Hideyo]{Noguchi}[Doctor]\dotfill^^A
2232 % |\Name*[Hideyo]{Noguchi}[Doctor]|
2233 % \end{Block}
2234 %
2235 % \subsubsection*{\hfil Using the Reversing and Other Macros}
2236 %
2237 % We use \cmd{\RevName} and optionally \cmd{\CapName} (Section~\ref{sec:AllCaps}) to print reversed names in the text without changing the Western forms of their index entries. They function well in context, not arbitrarily:
2238 %
2239 % \begin{Block}
2240 % \FUse \ForgetThis\RevName\Name[Ferenc]{Molnár}\dag\\
2241 % \UseB |\RevName\Name[Ferenc]{Molnár}\dag|\\
2242 % \LUse \RevName\Name[Ferenc]{Molnár}\dag\\
2243 % \UseB |\RevName\Name[Ferenc]{Molnár}\dag|\\
2244 % \FUse \ForgetThis\CapName\RevName\Name[Hideyo]{Noguchi}[Sensei]\dag\\
2245 % \UseB |\CapName\RevName\Name[Hideyo]{Noguchi}[Sensei]\dag|\\
2246 % \LUse \CapName\RevName\Name[Hideyo]{Noguchi}[Sensei]\dag\\
2247 % \UseB |\CapName\RevName\Name[Hideyo]{Noguchi}[Sensei]\dag|\\
2248 % \UseL \CapName\RevName\Name*[Hideyo]{Noguchi}[Sensei]\dag\\
2249 % \UseB |\CapName\RevName\Name*[Hideyo]{Noguchi}[Sensei]\dag|
2250 % \end{Block}
2251 %
2252 % \newpage
2253 %
2254 % \subsubsection[Eastern Names]{``Native'' Eastern Names}
2255 %
2256 % \begin{tcolorbox}[colframe=gray]\centering
2257 % \begin{tabular}{l@{ }c@{ }c}
2258 % & Required \meta{SNN} & Optional\\
2259 % & required \meta{Affix} & (text only)\\[1ex]
2260 % \tcbox[equal height group=D,colback=white,tikznode,
2261 % left=1mm,right=1mm,valign=center]
2262 % {\normalsize\bfseries \hbox{\cmd{\Name}\texttt{ }}\\
2263 % \cmd{\Name*}\\
2264 % \cmd{\FName}} &
2265 % \tcbox[equal height group=D,colback=white,tikznode,
2266 % left=1mm,right=1mm,valign=center]
2267 % {\normalsize\bfseries\marg{SNN\textbf{,}Affix}} &
2268 % \tcbox[equal height group=D,colback=white,tikznode,
2269 % left=1mm,right=1mm,valign=center]
2270 % {\normalsize\bfseries\oarg{\color{nared}Alternate}}
2271 % \end{tabular}
2272 % \end{tcolorbox}
2273 %
2274 % \begin{itemize}
2275 % \item They must \emph{leave empty} the \meta{FNN} argument.
2276 %
2277 % \item They use instead the \meta{SNN\textbf{,}Affix} arguments.
2278 %
2279 % \item They can swap \meta{Alternate} and \meta{Affix} in the text.\footnote{We discourage the obsolete syntax (Section~\ref{sec:Obsolete}) because \meta{Alternate} does not work with it.}
2280 %
2281 % \item They have Non-Western name patterns and index entries:
2282 % \begin{itemize}
2283 % \item[] \meta{SNN} \meta{Affix}
2284 % \end{itemize}
2285 %
2286 % \item If name order is reversed in the text with \cmd{\RevName}, these names retain Non-Western index entries.
2287 % \end{itemize}
2288 %
2289 % \subsubsection*{\hfil Starting with Eastern Name Forms}
2290 %
2291 % Among the names shown below, \cmd{\FName} does not show a personal name by default. This design helps to prevent Western writers from being culturally insensitive.
2292 %
2293 % \BothInfo[5ex]{\ShowPattern{Miyazaki, Hayao}}
2294 % {\ShowIdxPageref*{Miyazaki, Hayao}}
2295 % \begin{Block}
2296 % \ForgetName{Miyazaki, Hayao}
2297 % \FUse \Name{Miyazaki, Hayao}\dotfill |\Name{Miyazaki, Hayao}|\\
2298 % \LUse \Name{Miyazaki, Hayao}\dotfill |\Name{Miyazaki, Hayao}|\\
2299 % \UseL \Name*{Miyazaki, Hayao}[Sensei]\dotfill |\Name*{Miyazaki, Hayao}[Sensei]|\\
2300 % \UseS \FName{Miyazaki, Hayao}\dotfill |\FName{Miyazaki, Hayao}|
2301 % \end{Block}
2302 %
2303 % \subsubsection*{\hfil Using the Reversing and Other Macros}
2304 %
2305 % The reversing macros produce a Western name ordering in the text. One must use \cmd{\ForceFN} with \cmd{\FName} (Section~\ref{sec:FName}) to print just a personal name:
2306 %
2307 % \begin{Block}
2308 % \FUse \ForgetThis\RevName\Name{Miyazaki, Hayao}\\
2309 % \UseB |\RevName\Name{Miyazaki, Hayao}|\\
2310 % \UseS \ForceFN\FName{Miyazaki, Hayao}\\
2311 % \UseB |\ForceFN\FName{Miyazaki, Hayao}|\\
2312 % \UseL \RevName\Name*{Miyazaki, Hayao}[Mr.]\\
2313 % \UseB |\RevName\Name*{Miyazaki, Hayao}[Mr.]|\\
2314 % \UseL \CapName\Name*{Miyazaki, Hayao}[Sensei]\\
2315 % \UseB |\CapName\Name*{Miyazaki, Hayao}[Sensei]|\\
2316 % \UseS \ForceFN\FName{Miyazaki, Hayao}[Sensei]\\
2317 % \UseB |\ForceFN\FName{Miyazaki, Hayao}[Sensei]|
2318 % \end{Block}
2319 %
2320 % \newpage
2321 %
2322 % \subsubsection[Ancient Names]{Royal or Ancient Names}
2323 %
2324 % \begin{tcolorbox}[colframe=gray]\centering
2325 % \begin{tabular}{l@{ }c@{ }c}
2326 % & Required \meta{SNN} & Optional,\\
2327 % & optional \meta{Affix} & special\\[1ex]
2328 % \tcbox[equal height group=D,colback=white,tikznode,
2329 % left=1mm,right=1mm,valign=center]
2330 % {\normalsize\bfseries \hbox{\cmd{\Name}\texttt{ }}\\
2331 % \cmd{\Name*}\\
2332 % \cmd{\FName}} &
2333 % \tcbox[equal height group=D,colback=white,tikznode,
2334 % left=1mm,right=1mm,valign=center]
2335 % {\normalsize\bfseries\marg{SNN\color{nared}\textbf{,}Affix}} &
2336 % \tcbox[equal height group=D,colback=white,tikznode,
2337 % left=1mm,right=1mm,valign=center]
2338 % {\normalsize\bfseries\oarg{\color{nared}Alternate}}
2339 % \end{tabular}
2340 % \end{tcolorbox}
2341 %
2342 % \begin{itemize}
2343 % \item They must \emph{leave empty} the \meta{FNN} argument.
2344 %
2345 % \item They use either the \meta{SNN\textbf{,}Affix} arguments or just \meta{SNN}.
2346 %
2347 % \item Their index entries take Non-Western forms:
2348 % \begin{itemize}
2349 % \item[] \meta{SNN} \meta{Affix}
2350 % \item[] \meta{SNN}
2351 % \end{itemize}
2352 %
2353 % \item Names with \meta{SNN\textbf{,}Affix} can swap \meta{Alternate} and \meta{Affix} in the text.
2354 %
2355 % \item Names with \meta{SNN} should not use \meta{Alternate}.\footnote{That would produce the obsolete syntax (Section~\ref{sec:Obsolete}).}
2356 % \end{itemize}
2357 %
2358 % \subsubsection*{\hfil No School Like the Old School}
2359 %
2360 % \begin{itemize}
2361 % \item \cmd{\FName} normally prints \meta{SNN} to avoid mistakes.
2362 % \BothInfo*{\ShowPattern{Elizabeth, I}\break
2363 % \ShowPattern{John, Eriugena}\break
2364 % \ShowPattern{Aristotle}}
2365 % {\ShowIdxPageref*{Elizabeth, I}\break
2366 % \ShowIdxPageref*{John, Eriugena}\break
2367 % \ShowIdxPageref*{Aristotle}}
2368 % \begin{Block}
2369 % \FUse \ForgetThis\Name{Elizabeth, I}\dotfill |\Name{Elizabeth, I}|\\
2370 % \LUse \Name{Elizabeth, I}\dotfill |\Name{Elizabeth, I}|\\
2371 % \UseS \FName{Elizabeth, I}\dotfill |\FName{Elizabeth, I}|
2372 % \end{Block}
2373 %
2374 % \item Here we work with titles and sobriquets:
2375 % \begin{Block}
2376 % \FUse \ForgetThis\Name{Elizabeth, I}[I ``Gloriana'']\\
2377 % \UseB |\Name{Elizabeth, I}[I ``Gloriana'']|\\
2378 % \UseS \ForceFN\FName{Elizabeth, I}[Gloriana]\\
2379 % \UseB |\ForceFN\FName{Elizabeth, I}[Gloriana]|
2380 % \end{Block}
2381 %
2382 % \item In long name references, a space always occurs between \meta{SNN} and \meta{Affix} or \meta{SNN} and \meta{Alternate}. When a sobriquet begins with a comma, semicolon, etc., use name tags (Sections~\ref{sec:Complexity} and~\ref{sec:DataTags}):
2383 % \begingroup\begin{itemize}
2384 % \item Avoid forms like the following:
2385 %
2386 % \item[] {\small \Name{Attila, the Hun}[, the Scourge of God]\\
2387 % |\Name{Attila, the Hun}[, the Scourge of God]|}
2388 %
2389 % \item Use instead something like:
2390 %
2391 % \item[] {\small \NameAddInfo{Attila, the Hun}{, the Scourge of God}^^A
2392 % \ForgetThis\Name{Attila, the Hun}\NameQueryInfo{}\\
2393 % \Name{Attila, the Hun}\NameQueryInfo{}\\
2394 % |\NameAddInfo{Attila, the Hun}{, the Scourge of God}|\\
2395 % |\ForgetThis\Name{Attila, the Hun}\NameQueryInfo{}|\\
2396 % |\Name{Attila, the Hun}\NameQueryInfo{}|}
2397 % \end{itemize}\endgroup
2398 %
2399 % \newpage
2400 %
2401 % \item Here we show a non-royal, medieval name:
2402 % \begin{Block}
2403 % \FUse \Name{John, Eriugena}[Scotus Eriugena]\\
2404 % \UseB |\Name{John, Eriugena}[Scotus Eriugena]|\\
2405 % \UseL \Name*{John, Eriugena}\dotfill |\Name*{John, Eriugena}|\\
2406 % \LUse \Name{John, Eriugena}\dotfill |\Name{John, Eriugena}|
2407 % \end{Block}
2408 %
2409 % \item Context matters; do not reverse names or force affixes arbitrarily:
2410 % \begin{Block}
2411 % \UseS \ForceFN\FName{Elizabeth, I}\dotfill^^A
2412 % |\ForceFN\FName{Elizabeth, I}|\\
2413 % \UseL \RevName\Name*{John, Eriugena}\dotfill^^A
2414 % |\RevName\Name*{John, Eriugena}|
2415 % \end{Block}
2416 %
2417 % \item Here is the trivial case:
2418 % \begin{Block}
2419 % \FUse \Name{Aristotle}\dotfill |\Name{Aristotle}|\\
2420 % \LUse \Name{Aristotle}\dotfill |\Name{Aristotle}|
2421 % \end{Block}
2422 % \end{itemize}
2423 %
2424 % \subsubsection[Selecting Types]{More about Selecting Name Types}
2425 % \label{sec:SelectingTypes}
2426 %
2427 % \ExcludeName{Leif, Erikson}
2428 % \ExcludeName[Pontius]{Pilate}
2429 % How does one decide from among these name forms? Some choices are fairly obvious and standardized. Others depend on one's culture and publication standards.
2430 % \begin{itemize}
2431 % \item Dealing with patronyms can vary according to one's culture.
2432 % \PatInfo[4ex]{\ShowPattern[Leif]{Erikson}\break
2433 % \ShowPattern{Leif, Erikson}}
2434 % \begin{itemize}
2435 % \item To index under the patronym, use a Western form:
2436 % \begin{Block}
2437 % \ForgetThis\Name[Leif]{Erikson}\dotfill|\Name[Leif]{Erikson}|\\
2438 % \Name[Leif]{Erikson}\dotfill|\Name[Leif]{Erikson}|\\
2439 % \FName[Leif]{Erikson}\dotfill|\FName[Leif]{Erikson}|\\
2440 % Index: \ShowIdxPageref*[Leif]{Erikson}
2441 % \end{Block}
2442 %
2443 % \item To index under the personal name, use a Non-Western form:
2444 % \begin{Block}
2445 % \Name{Leif, Erikson}\dotfill|\Name{Leif, Erikson}|\\
2446 % \Name{Leif, Erikson}\dotfill|\Name{Leif, Erikson}|\\
2447 % \ForceFN\FName{Leif, Erikson}\dotfill^^A
2448 % |\ForceFN\FName{Leif, Erikson}|\\
2449 % Index: \ShowIdxPageref*{Leif, Erikson}
2450 % \end{Block}
2451 % \end{itemize}
2452 %
2453 % \item Roman names are quite challenging (Sections~\ref{sec:Romani}f.).
2454 % \PatInfo[4ex]{\ShowPattern[M.T.]{Cicero}\break
2455 % \ShowPattern[Pontius]{Pilate}\break
2456 % \ShowPattern{Pontius,Pilate}}
2457 % \begin{itemize}
2458 % \item Common Western usage draws on popular name forms:
2459 % \begin{Block}
2460 % \ForgetThis\Name[M.T.]{Cicero}\dotfill|\Name[M.T.]{Cicero}|\\
2461 % \Name[M.T.]{Cicero}\dotfill|\Name[M.T.]{Cicero}|\\
2462 % Index: \ShowIdxPageref*[M.T.]{Cicero}
2463 % \end{Block}
2464 %
2465 % \item That segues into names indexed by \LA{cognomen}:
2466 % \begin{Block}
2467 % \Name[Pontius]{Pilate}\dotfill|\Name[Pontius]{Pilate}|\\
2468 % \Name[Pontius]{Pilate}\dotfill|\Name[Pontius]{Pilate}|\\
2469 % Index: \ShowIdxPageref*[Pontius]{Pilate}
2470 % \end{Block}
2471 %
2472 % \item Yet other approaches can index by \LA{nomen}:
2473 % \begin{Block}
2474 % \ForgetThis\Name{Pontius,Pilate}\dotfill^^A
2475 % |\Name{Pontius,Pilate}|\\
2476 % \Name{Pontius,Pilate}\dotfill|\Name{Pontius,Pilate}|\\
2477 % \ForceFN\FName{Pontius,Pilate}\dotfill^^A
2478 % |\ForceFN\FName{Pontius,Pilate}|\\
2479 % Index: \ShowIdxPageref*{Pontius,Pilate}
2480 % \end{Block}
2481 % \end{itemize}
2482 % \end{itemize}
2483 %
2484 % There are ways to display a name using one form, while indexing under another, starting in Section~\ref{sec:NameMedieval}. The quick interface discussed in the next section can make these choices easier to implement and change, if needed. One should consult a style guide or in-house guidelines to help choose the proper name forms.
2485 %
2486 % \newpage
2487 %
2488 % \subsection{Quick Interface}
2489 % \label{sec:QuickUIStart}
2490 %
2491 % \subsubsection{Name Shorthands}
2492 %
2493 % \DescribeEnv{nameauth}
2494 % To reduce typing, we replace frequently-used macros with the shorthand forms of the quick interface. Using the \texttt{nameauth} environment in the preamble guards against undefined macros. It defines a delimited macro \cmd{\<}, recalling a \texttt{tabular}:
2495 %
2496 % \begin{SyntaxBox}
2497 % \cmd{\begin\{nameauth\}}\\
2498 % \hspace{2em}\cmd{\<} \meta{arg1} \texttt{\&}
2499 % \meta{arg2} \texttt{\&}
2500 % \meta{arg3} \texttt{\&}
2501 % \meta{arg4} \texttt{>}\\
2502 % \cmd{\end\{nameauth\}}
2503 % \end{SyntaxBox}
2504 %
2505 % In this context, \meta{arg1} becomes the root of three new macros per name:
2506 % \begin{Quote}
2507 % \begin{tabular}{@{\quad}l@{\ same as: }ll}
2508 % \texttt{\textbackslash}\meta{arg1} &
2509 % \cmd{\Name\ }\oarg{arg2}\marg{arg3}\oarg{arg4} \\
2510 % \texttt{\textbackslash L}\meta{arg1} &
2511 % \cmd{\Name*}\oarg{arg2}\marg{arg3}\oarg{arg4} &
2512 % {\color{nared} |%| L for \textit{long}} \\
2513 % \texttt{\textbackslash S}\meta{arg1} &
2514 % \cmd{\FName}\oarg{arg2}\marg{arg3}\oarg{arg4} &
2515 % {\color{nared} |%| S for \textit{short}} \\
2516 % \end{tabular}
2517 % \end{Quote}
2518 %
2519 % Usually we leave \meta{arg4} empty, apart from specific contexts. That field permanently displays only alternate names, or is used with the obsolete syntax (Section~\ref{sec:Obsolete}). Here is another way of thinking about arguments in the \texttt{nameauth} environment that relates back to what we have seen with the basic interface:
2520 %
2521 % \begin{SyntaxBox}
2522 % \cmd{\begin\{nameauth\}}\\
2523 % \hspace{2em}\cmd{\<} \meta{arg1} \texttt{\&}
2524 % \meta{\color{nared}FNN} \texttt{\&}
2525 % \meta{SNN\color{nared}\textbf{,}Affix} \texttt{\&}
2526 % \meta{\color{nared}Alternate} \texttt{>}\\
2527 % \cmd{\end\{nameauth\}}
2528 % \end{SyntaxBox}
2529 %
2530 % By seeing the mandatory arguments in black and the optional ones in red, it helps us to see that, if either \meta{arg1} or \meta{arg3} are empty, or \meta{SNN} is empty, \textsf{nameauth} will generate a package error. Forgetting the backslash, any ampersand, or angle bracket will cause fatal errors. See Section~\ref{sec:FinalOptargs} on final optional arguments.
2531 %
2532 % \Info*{\small\dbend}Package warnings result when one redefines name shorthands using the \texttt{nameauth} environment. For example, we use \texttt{White} in two different rows to populate \meta{arg1}. That causes \cmd{\White}, \cmd{\LWhite}, and \cmd{\SWhite} to be redefined:
2533 % \begin{Quote}
2534 % \begin{Verbatim}
2535 % \begin{nameauth}
2536 % \< White & E.B. & White & > % version 1
2537 % \< White & E.\,B. & White & > % version 2
2538 % \end{nameauth}
2539 % \end{Verbatim}
2540 % \end{Quote}
2541 % \begin{nameauth}
2542 % \< White & E.B. & White & > ^^A version 1
2543 % \< White & E.\,B. & White & > ^^A version 2
2544 % \end{nameauth}
2545 %
2546 % \BothInfo*{\ShowPattern[E.\,B.]{White}}
2547 % {\ShowIdxPageref*[E.\,B.]{White}}^^A
2548 % \cmd{\White} produces \White, the version with the thin space. We lost the first version of the name when we redefined it.\footnote{When building \textsf{nameauth} an intended warning will appear: \texttt{Shorthand macro already exists.}}
2549 %
2550 % On the next page we will create an example \texttt{nameauth} environment using many of the names that we have so far encountered. We will add other names that we have not yet seen, introducing additional concepts in the process. Those include Western name forms that contain particles (articles and prepositions), which are discussed in greater detail in Section~\ref{sec:NameParticles}.
2551 %
2552 % \newpage
2553 %
2554 % The comments below are merely explanatory and in no wise required to use the environment. Likewise, extra spaces that are added for clarity are stripped.
2555 % \begin{Quote}
2556 % \JustIndex\Wash^^A
2557 % \JustIndex\Lewis^^A
2558 % \JustIndex\Patton^^A
2559 % \JustIndex\JRIV^^A
2560 % \JustIndex\Soto^^A
2561 % \JustIndex\JLF^^A
2562 % \JustIndex\JWG^^A
2563 % \JustIndex\Noguchi^^A
2564 % \JustIndex\Molnar^^A
2565 % \JustIndex\Miyazaki^^A
2566 % \JustIndex\Eliz^^A
2567 % \JustIndex\Aeth^^A
2568 % \JustIndex\Eriugena^^A
2569 % \JustIndex\Aris^^A
2570 % \begin{Verbatim}
2571 % \begin{nameauth}
2572 % % Western Name Forms
2573 % % <arg1> <arg2> <arg3> <arg4>
2574 % \< Wash & George & Washington & >
2575 % \< Lewis & Clive Staples & Lewis & >
2576 % % Western Name Forms with Affixes
2577 % \< Patton & George S. & Patton, Jr. & >
2578 % \< JRIV & J.D. & Rockefeller, IV & >
2579 % % Western Name Forms with Particles
2580 % \< Soto & Hernando & de Soto & >
2581 % \< JLF & Jean de & La Fontaine & >
2582 % \< JWG & J.W. von & Goethe & >
2583 % % Reversed Western Forms
2584 % \< Noguchi & Hideyo & Noguchi & >
2585 % \< Molnar & Ferenc & Molnár & >
2586 % % ``Native'' Eastern Forms
2587 % \< Miyazaki & & Miyazaki, Hayao & >
2588 % % Royal, Medieval, and Ancient Forms
2589 % \< Eliz & & Elizabeth, I & >
2590 % \< Aeth & & Æthelred, II & >
2591 % \< Eriugena & & John, Eriugena & >
2592 % \< Aris & & Aristotle & >
2593 % % Name Forms Always Using Alternate Names
2594 % \< CSL & Clive Staples & Lewis & C.S. >
2595 % \< MSens & & Miyazaki, Hayao & Sensei >
2596 % \end{nameauth}
2597 % \end{Verbatim}
2598 % \end{Quote}
2599 %
2600 % Here is an example of how much typing one can save with the quick interface, not to mention the prevention of error by not retyping arguments:
2601 % \begin{Center}
2602 % \BothInfo[4ex]{\ShowPattern[George]{Washington}}
2603 % {\ShowIdxPageref*[George]{Washington}}
2604 % \begin{tabular}{rll}\toprule
2605 % \rowcolor{nagrey}^^A
2606 % \bfseries Text & & \bfseries Macro / Arguments\\
2607 %
2608 % \Wash & Quick: & \cmd{\Wash}\\
2609 % & Basic: &
2610 % \cmd{\Name}\texttt{[George]\{Washington\}}\\
2611 %
2612 % \rowcolor{nagrey}^^A
2613 % \LWash & Quick: & \cmd{\LWash}\\
2614 % \rowcolor{nagrey}^^A
2615 % & Basic: &
2616 % \cmd{\Name*}\texttt{[George]\{Washington\}}\\
2617 %
2618 % \SWash & Quick: & \cmd{\SWash}\\
2619 % & Basic: &
2620 % \cmd{\FName}\texttt{[George]\{Washington\}}\\
2621 %
2622 % \rowcolor{nagrey}^^A
2623 % \ForgetThis\Wash & Quick: & \cmd{\ForgetThis}\cmd{\Wash}\\
2624 % \rowcolor{nagrey}^^A
2625 % & Basic: &
2626 % \cmd{\ForgetName}^^A
2627 % \texttt{[George]\{Washington\}}\\
2628 % \rowcolor{nagrey}^^A
2629 % & &
2630 % \cmd{\Name}\texttt{[George]\{Washington\}}\\
2631 %
2632 % \rowcolor{nagrey}^^A
2633 % & & \emph{---\,OR\,---}\\
2634 % \rowcolor{nagrey}^^A
2635 % & Basic: &
2636 % \cmd{\ForgetThis}^^A
2637 % \cmd{\Name}\texttt{[George]\{Washington\}}\\
2638 %
2639 % \SubvertThis\Wash & Quick: & \cmd{\SubvertThis}\cmd{\Wash}\\
2640 % & Basic: &
2641 % \cmd{\SubvertName}^^A
2642 % \texttt{[George]\{Washington\}}\\
2643 % & &
2644 % \cmd{\Name}\texttt{[George]\{Washington\}}\\
2645 %
2646 % & & \emph{---\,OR\,---}\\
2647 % & Basic: &
2648 % \cmd{\SubvertThis}\cmd{\Name}^^A
2649 % \texttt{[George]\{Washington\}}\\
2650 %
2651 % \rowcolor{nagrey}^^A
2652 % \JustIndex\Wash(unseen in text) & Quick: &
2653 % \cmd{\JustIndex}\cmd{\Wash}\\
2654 % \rowcolor{nagrey}^^A
2655 % & Basic: &
2656 % \cmd{\IndexName}^^A
2657 % \texttt{[George]\{Washington\}}\\\bottomrule
2658 % \end{tabular}
2659 % \end{Center}
2660 %
2661 % \newpage
2662 %
2663 % \subsubsection[Name Variants]{Quick Name Variant Overview}
2664 %
2665 % After setting up the previous \texttt{nameauth} environment, we use the resulting name shorthands. Below we show more prefix macros that affect name forms in the text (Section~\ref{sec:ListPrefix}). We hide the use of \cmd{\ForgetThis} (Section~\ref{sec:NameControl}), which makes the \textsf{nameauth} logic ``forget'' that a name exists, creating a first-use instance.
2666 % \begin{itemize}
2667 % \item Western Names: \hfill Sections~\ref{sec:Naming},
2668 % \ref{sec:FName}
2669 % \BothInfo*{\ShowPattern[George]{Washington}}
2670 % {\ShowIdxPageref*[George]{Washington}}
2671 % \begin{Block}
2672 % \FUse \ForgetThis\Wash \dotfill \cmd{\Wash}\\
2673 % \UseL \LWash \dotfill \cmd{\LWash}\\
2674 % \LUse \Wash \dotfill \cmd{\Wash}\\
2675 % \UseS \SWash \dotfill \cmd{\SWash}
2676 % \end{Block}
2677 %
2678 % \item Nicknames and Affixes: \hfill Sections~\ref{sec:FName},
2679 % \ref{sec:Affix}
2680 % \BothInfo*{\ShowPattern[George S.]{Patton, Jr.}\break
2681 % \ShowPattern[J.D.]{Rockefeller, IV}\break
2682 % \ShowPattern[Clive Staples]{Lewis}}
2683 % {\ShowIdxPageref*[George S.]{Patton, Jr.}\break
2684 % \ShowIdxPageref*[J.D.]{Rockefeller, IV}\break
2685 % \ShowIdxPageref*[Clive Staples]{Lewis}}
2686 % \begin{Block}
2687 % \FUse \ForgetThis\DropAffix\Patton \dotfill^^A
2688 % \cmd{\DropAffix}\cmd{\Patton}\\
2689 % \UseL \LPatton \dotfill \cmd{\LPatton}\\
2690 % \UseL \DropAffix\LPatton \dotfill \cmd{\DropAffix}\cmd{\LPatton}\\
2691 % \UseL \DropAffix\LPatton[George]\dotfill^^A
2692 % \cmd{\DropAffix}\cmd{\LPatton[George]}\\
2693 % \LUse \Patton \dotfill \cmd{\Patton}\\
2694 % \UseS \SPatton\dotfill \cmd{\SPatton}\\
2695 % \UseS \SPatton[George]\dotfill \cmd{\SPatton[George]}
2696 % \end{Block}
2697 %
2698 % \begin{Block}
2699 % \FUse \ForgetThis\JRIV[John Davison]\dotfill^^A
2700 % \cmd{\JRIV[John Davison]}\\
2701 % \UseL \LJRIV \dotfill \cmd{\LJRIV}\\
2702 % \UseL \DropAffix\LJRIV[Jay]\dotfill^^A
2703 % \cmd{\DropAffix}\cmd{\LJRIV[Jay]}\\
2704 % \LUse \JRIV \dotfill \cmd{\JRIV}
2705 % \end{Block}
2706 %
2707 % \begin{Block}
2708 % \FUse \ForgetThis\Lewis\dotfill \cmd{\Lewis}\\
2709 % \UseL \LLewis[C.S.]\dotfill \cmd{\LLewis[C.S.]}\\
2710 % \UseL \LLewis[Jack]\dotfill \cmd{\LLewis[Jack]}\\
2711 % \UseS \SLewis\dotfill \cmd{\SLewis}\\
2712 % \UseS \SLewis[Jack]\dotfill \cmd{\SLewis[Jack]}\\
2713 % \UseL \LCSL\dotfill \cmd{\LCSL}\\
2714 % \UseS \SCSL\dotfill \cmd{\SCSL}
2715 % \end{Block}
2716 %
2717 % \item Non-Western (``Native'' Eastern) Names: \hfill Sections~\ref{sec:Eastern}, \ref{sec:AllCaps}, \ref{sec:RevNames}
2718 % \BothInfo*{\ShowPattern{Miyazaki, Hayao}}
2719 % {\ShowIdxPageref*{Miyazaki, Hayao}}
2720 % \begin{Block}
2721 % \FUse \ForgetThis\CapName\Miyazaki\dotfill^^A
2722 % \cmd{\CapName}\cmd{\Miyazaki}\\
2723 % \UseL \CapName\LMiyazaki\dotfill \cmd{\CapName}\cmd{\LMiyazaki}\\
2724 % \LUse \CapName\Miyazaki\dotfill \cmd{\CapName}\cmd{\Miyazaki}\\
2725 % \UseL \RevName\LMiyazaki\dotfill \cmd{\RevName}\cmd{\LMiyazaki}\\
2726 % \UseL \RevName\LMiyazaki[Mr.]\dotfill^^A
2727 % \cmd{\RevName}\cmd{\LMiyazaki[Mr.]}\\
2728 % \UseS \SMiyazaki\dotfill \cmd{\SMiyazaki}\\
2729 % \UseS \ForceFN\SMiyazaki\dotfill \cmd{\ForceFN}\cmd{\SMiyazaki}
2730 % \end{Block}
2731 %
2732 % \item Reversed Western Names: \hfill Sections~\ref{sec:AllCaps}, \ref{sec:RevNames}
2733 % \BothInfo*{\ShowPattern[Hideyo]{Noguchi}}
2734 % {\ShowIdxPageref*[Hideyo]{Noguchi}}
2735 % \begin{Block}
2736 % \FUse \ForgetThis\Noguchi\dotfill \cmd{\Noguchi}\\
2737 % \UseL \LNoguchi\dotfill \cmd{\LNoguchi}\\
2738 % \UseL \LNoguchi[Doctor]\dotfill \cmd{\LNoguchi[Doctor]}\\
2739 % \UseS \SNoguchi\dotfill \cmd{\SNoguchi}\\
2740 % \UseL \RevName\LNoguchi\dag\dotfill^^A
2741 % \cmd{\RevName}\cmd{\LNoguchi}\cmd{\dag}\\
2742 % \UseL \CapName\RevName\LNoguchi\dag\dotfill^^A
2743 % \cmd{\CapName}\cmd{\RevName}\cmd{\LNoguchi}\cmd{\dag}\\
2744 % \LUse \CapName\Noguchi\dag\dotfill^^A
2745 % \cmd{\CapName}\cmd{\Noguchi}\cmd{\dag}
2746 % \end{Block}
2747 %
2748 % \newpage
2749 %
2750 % \item Western Names Reversed by Surname: \hfill Section \ref{sec:LastFirst}
2751 % \BothInfo*{\ShowPattern[George]{Washington}}
2752 % {\ShowIdxPageref*[George]{Washington}}
2753 % \begin{Block}
2754 % \FUse \ForgetThis\RevComma\Wash\dotfill \cmd{\RevComma}\cmd{\Wash}\\
2755 % \UseL \RevComma\LWash\dotfill \cmd{\RevComma}\cmd{\LWash}
2756 % \end{Block}
2757 %
2758 % \item Particles, English usage: \hfill Section~\ref{sec:NameParticles}
2759 % \BothInfo*{\ShowPattern[Hernando]{de~Soto}}
2760 % {\ShowIdxPageref*[Hernando]{de~Soto}}
2761 % \begin{Block}
2762 % \FUse \ForgetThis\Soto\dotfill \cmd{\Soto}\\
2763 % \LUse \CapThis\Soto\dotfill \cmd{\CapThis}\cmd{\Soto}
2764 % \end{Block}
2765 %
2766 % \item Particles, Non-English usage: \hfill Section~\ref{sec:NameParticles}
2767 % \BothInfo*{\ShowPattern[Jean de]{La Fontaine}\break
2768 % \ShowPattern[J.W. von]{Goethe}}
2769 % {\ShowIdxPageref*[Jean de]{La Fontaine}\break
2770 % \ShowIdxPageref*[J.W. von]{Goethe}}
2771 % \begin{Block}
2772 % \FUse \ForgetThis\JLF\dotfill \cmd{\JLF}\\
2773 % \LUse \JLF\dotfill \cmd{\JLF}\\
2774 % \FUse \ForgetThis\JWG[Joh. Wolfgang v.]\dotfill^^A
2775 % |\JWG[Joh. Wolfgang v.]|\\
2776 % \LUse \JWG\dotfill \cmd{\JWG}
2777 % \end{Block}
2778 %
2779 % \item Royal, Medieval, and Ancient Names: \hfill Sections~\ref{sec:NameMedieval}, \ref{sec:NameAncient}
2780 % \BothInfo*{\ShowPattern{Æthelred, II}\break
2781 % \ShowPattern{John, Eriugena}\break
2782 % \ShowPattern{Aristotle}}
2783 % {\ShowIdxPageref*{Æthelred, II}\break
2784 % \ShowIdxPageref*{John, Eriugena}\break
2785 % \ShowIdxPageref*{Aristotle}}
2786 % \begin{Block}
2787 % \FUse \ForgetThis\Aeth\footnote
2788 % {Regarding the margin note with name patterns, with
2789 % \texttt{pdflatex} and \texttt{latex} using \textsf{inputenc}
2790 % and \textsf{fontenc}, in \texttt{\ShowPattern{Æthelred, II}}
2791 % the glyphs \texttt{ÃĘ} correspond to \cmd{\IeC\{}\cmd{\AE\}}.}^^A
2792 % \dotfill \cmd{\Aeth}\\
2793 % \LUse \Aeth\dotfill \cmd{\Aeth}\\
2794 % \UseL \LAeth[II, ``Unræd'']\dotfill |\LAeth[II, ``Unræd'']|
2795 % \end{Block}
2796 %
2797 % \begin{Block}
2798 % \FUse \ForgetThis\Eriugena[Scotus Eriugena]\dotfill^^A
2799 % \cmd{\Eriugena[Scotus Eriugena]}\\
2800 % \UseL \LEriugena\dotfill \cmd{\LEriugena}\\
2801 % \LUse \Eriugena\dotfill \cmd{\Eriugena}
2802 % \end{Block}
2803 %
2804 % \begin{Block}
2805 % \FUse \ForgetThis\Aris\dotfill \cmd{\Aris}\\
2806 % \LUse \Aris\dotfill \cmd{\Aris}
2807 % \end{Block}
2808 % \end{itemize}
2809 %
2810 % \subsubsection[\protect\textit{Alternate} Field]
2811 % {\protect\meta{Alternate} Name Field}
2812 % \label{sec:ArgIV}
2813 %
2814 % Two shorthands above use \meta{arg4}, the final field in each row of the \texttt{nameauth} environment. These are \cmd{\CSL} and \cmd{\MSens}. They correspond to similar name shorthands \cmd{\Lewis} and \cmd{\Miyazaki}, which leave \meta{arg4} empty. Here is how they are related:
2815 % \begin{itemize}
2816 % \item They share identical name patterns (Section~\ref{sec:NamePatterns}).
2817 % \BothInfo*{\ShowPattern[Clive Staples]{Lewis}\break
2818 % \ShowPattern{Miyazaki, Hayao}}
2819 % {\ShowIdxPageref*[Clive Staples]{Lewis}\break
2820 % \ShowIdxPageref*{Miyazaki, Hayao}}
2821 % \begin{Block}
2822 % \ForgetName{Miyazaki, Hayao}\ForgetName[Clive Staples]{Lewis}
2823 % \FUse \CSL\dotfill \cmd{\CSL}\\
2824 % \LUse \Lewis\dotfill \cmd{\Lewis}\\
2825 % \FUse \MSens\dotfill \cmd{\MSens}\\
2826 % \LUse \Miyazaki\dotfill \cmd{\Miyazaki}
2827 % \end{Block}
2828 %
2829 % \item Usually, one leaves \meta{arg4} empty and adds alternate names in brackets as needed: \LLewis[C.S.] \cmd{\LLewis[C.S.]}
2830 %
2831 % \item By using \meta{arg4}, one trades less work for more ambiguity: Can one add an alternate name or not? To answer that, one should keep track of all name shorthands that use \meta{arg4}.
2832 %
2833 % \item Failure to keep track of such macros creates output like \LCSL[Jack] \cmd{\LCSL[Jack]} and \LMSens[Sensei] \cmd{\LMSens[Sensei]}. The \meta{arg4} content populates \meta{Alternate}; the text in brackets is just text.
2834 %
2835 % \item Remember that \meta{arg4} can be used for the obsolete syntax, as mentioned previously, but we do not cover that here.
2836 % \end{itemize}
2837 %
2838 % \newpage
2839 %
2840 % \subsection{Select Macro Overview}
2841 %
2842 % \subsubsection[With Name Args]{Macros with Name Arguments}
2843 % \label{sec:NameArgMacros}
2844 %
2845 % Macros that take name arguments (Section~\ref{sec:NameArgs}) can have final optional arguments (Section~\ref{sec:FinalOptargs}) and update \cmd{\NameauthPattern} (Section~\ref{sec:NamePatterns}). The \meta{xref args} are the same as \meta{name args} for a cross-reference to a \meta{target} (Section~\ref{sec:IndexRef}). For more on null arguments, see Section~\ref{sec:NullArgs}.
2846 % \begin{Center}
2847 % \begin{tabular}{lrcll}\toprule
2848 % \rowcolor{nagrey}^^A
2849 % \tmarg[nagrey]{}^^A
2850 % Optional Prefix & Macro & Star & Arguments & \\
2851 %
2852 % \tmarg{Print a name}^^A
2853 % \meta{prefix macros} &
2854 % \cmd{\Name} & \texttt{*} & \meta{name args} & \\
2855 % \tmarg{}^^A
2856 % \meta{prefix macros} &
2857 % \cmd{\FName} & \texttt{*} & \meta{name args} & \\
2858 %
2859 % \rowcolor{nagrey}^^A
2860 % \tmarg[nagrey]{Page entry}^^A
2861 % only \cmd{\SeeAlso} & \cmd{\IndexName} & & \meta{name args} & \\
2862 % \rowcolor{nagrey}^^A
2863 % \tmarg[nagrey]{Only cross-reference}^^A
2864 % only \cmd{\SeeAlso} & \cmd{\IndexRef} & &
2865 % \meta{xref args} & \meta{target}\\
2866 %
2867 % \tmarg{Stop page entry}^^A
2868 % & \cmd{\ExcludeName} & & \meta{name args} & \\
2869 % \tmarg{Allow page entry}^^A
2870 % & \cmd{\IncludeName} & \texttt{*} & \meta{name args} & \\
2871 %
2872 % \rowcolor{nagrey}^^A
2873 % \tmarg[nagrey]{Sort index}^^A
2874 % & \cmd{\PretagName} & & \meta{name args} & \meta{sort key} \\
2875 % \rowcolor{nagrey}^^A
2876 % \tmarg[nagrey]{Make index tag}^^A
2877 % & \cmd{\TagName} & & \meta{name args} & \meta{tag} \\
2878 % \rowcolor{nagrey}^^A
2879 % \tmarg[nagrey]{Delete index tag}^^A
2880 % & \cmd{\UntagName} & & \meta{name args} & \\
2881 %
2882 % \tmarg{Make name tag}^^A
2883 % & \cmd{\NameAddInfo} & & \meta{name args} & \meta{tag} \\
2884 % \tmarg{Show name tag}^^A
2885 % & \cmd{\NameQueryInfo} & & \meta{name args} & or null argument \\
2886 % \tmarg{Delete name tag}^^A
2887 % & \cmd{\NameClearInfo} & & \meta{name args} & \\
2888 %
2889 % \rowcolor{nagrey}^^A
2890 % \tmarg[nagrey]{Delete name pattern}^^A
2891 % & \cmd{\ForgetName} & & \meta{name args} & \\
2892 % \rowcolor{nagrey}^^A
2893 % \tmarg[nagrey]{Create name pattern}^^A
2894 % & \cmd{\SubvertName} & & \meta{name args} & \\
2895 %
2896 % \tmarg{Name pattern tests}^^A
2897 % & \cmd{\IfMainName} & & \meta{name args} & \marg{y}\marg{n}\\
2898 % \tmarg{}^^A
2899 % & \cmd{\IfFrontName} & & \meta{name args} & \marg{y}\marg{n}\\
2900 % \tmarg{}^^A
2901 % & \cmd{\IfAKA} & & \meta{name args} & \marg{y}\marg{n}\marg{x}\\
2902 %
2903 % \rowcolor{nagrey}^^A
2904 % \tmarg[nagrey]{Debugging}^^A
2905 % & \cmd{\ShowPattern} & & \meta{name args} & or null argument \\
2906 % \rowcolor{nagrey}^^A
2907 % \tmarg[nagrey]{}^^A
2908 % & \cmd{\ShowIdxPageref} & \texttt{*}
2909 % & \meta{name args} & or null argument \\
2910 % \rowcolor{nagrey}^^A
2911 % \tmarg[nagrey]{}^^A
2912 % & \cmd{\ShowNameInfo} & & \meta{name args} & or null argument \\
2913 % \rowcolor{nagrey}^^A
2914 % \tmarg[nagrey]{}^^A
2915 % & \cmd{\ShowNameState} & \texttt{*}
2916 % & \meta{name args} & or null argument \\\bottomrule
2917 % \end{tabular}
2918 % \end{Center}
2919 %
2920 % Regarding prefix macros, see Section~\ref{sec:ListPrefix}. Not shown above are \cmd{\AKA}, \cmd{\AKA*}, \cmd{\PName}, and \cmd{\PName*} (Section~\ref{sec:AKA}). They have their own rules.
2921 %
2922 % \begin{Quotation}{\ForgetThis\Miyazaki}
2923 % {Proposal for \Title{Princess Mononoke} (c. 1994)}
2924 % We depict hatred, but it is to depict that there are more important
2925 % things. We depict a curse, to depict the joy of liberation.
2926 % \index{creatives, quotes of\noexpand\string|hyperpage}
2927 % \end{Quotation}
2928 %
2929 % \newpage
2930 %
2931 % \subsubsection{Prefix Macros}
2932 % \label{sec:ListPrefix}
2933 %
2934 % Similar to the package options (Section~\ref{sec:PkgOptions}), many prefix macros alter the values of the Boolean flags that reflect the state of names and name processing. The naming and indexing macros reset the Boolean flags after they are invoked.
2935 % \begin{itemize}[rightmargin=0em]
2936 % \item Capitalization in the text:
2937 % \begin{itemize}[leftmargin=6.9em]\small
2938 % \item[\cmd{\CapName}] Capitalize entire \meta{SNN}. Overrides \cmd{\CapThis}.
2939 % \item[\cmd{\CapThis}] Capitalize first letter of all name components.
2940 % \item[\cmd{\AccentCapThis}] Fallback when Unicode detection cannot be done.
2941 % \end{itemize}
2942 %
2943 % \item Reversing names in the text:
2944 % \begin{itemize}[leftmargin=6.9em]\small
2945 % \item[\cmd{\RevName}] Reverse order of any name. Overrides \cmd{\RevComma}
2946 % \item[\cmd{\RevComma}] Reverse only Western names to \meta{SNN}, \meta{FNN}.
2947 % \end{itemize}
2948 %
2949 % \item Use of commas before Western affixes in the text:
2950 % \begin{itemize}[leftmargin=6.9em]\small
2951 % \item[\cmd{\ShowComma}] Add comma between \meta{SNN} and \meta{Affix}.
2952 % \item[\cmd{\NoComma}] No comma between \meta{SNN} and \meta{Affix}. Overrides \cmd{\ShowComma}.
2953 % \end{itemize}
2954 %
2955 % \item Name breaks in the text:
2956 % \begin{itemize}[leftmargin=6.9em]\small
2957 % \item[\cmd{\DropAffix}] Drop affix only for a long Western name instance.
2958 % \item[\cmd{\KeepAffix}] Insert non-breaking space between \meta{SNN}, \meta{FNN/Affix}.
2959 % \item[\cmd{\KeepName}] Insert NBSP between all name elements. Overrides \cmd{\KeepAffix}.
2960 % \end{itemize}
2961 %
2962 % \item Forcing name forms in the text by deleting or creating patterns:
2963 % \begin{itemize}[leftmargin=6.9em]\small
2964 % \item[\cmd{\ForgetThis}] Force first name instance. Negates \cmd{\SubvertThis}.
2965 % \item[\cmd{\SubvertThis}] Force subsequent name instance.
2966 % \end{itemize}
2967 %
2968 % \item Forcing other name forms:
2969 % \begin{itemize}[leftmargin=6.9em]\small
2970 % \item[\cmd{\ForceName}] Force first-use formatting hooks.
2971 % \item[\cmd{\ForceAffix}] Print only the affix of a Western name (Section~\ref{sec:RomanGeneral}).
2972 % \item[\cmd{\ForceFN}] Print \meta{Affix} or \meta{Alternate} in a Non-Western short name.
2973 % \end{itemize}
2974 %
2975 % \item Indexing:
2976 % \begin{itemize}[leftmargin=6.9em]\small
2977 % \item[\cmd{\SeeAlso}] For \cmd{\IndexName}, \cmd{\AKA}, and \cmd{\PName}; make a \textit{see also} xref.
2978 % \item[\cmd{\SkipIndex}] For naming macros; do not create index entry.
2979 % \item[\cmd{\JustIndex}] For naming macros; index only; negated by \cmd{\AKA}, \cmd{\PName}.
2980 % \end{itemize}
2981 %
2982 % \item Prefix macros can ``stack'' their effects:\\[0.4ex]
2983 % \CapThis\RevName\SkipIndex\Name[bar]{foo}\dotfill^^A
2984 % |\CapThis\RevName\SkipIndex\Name[bar]{foo}|
2985 %
2986 % \item The Boolean flags governed by the prefix macros are reverted after the appropriate macros produce output in the text (or index) unless the output of the naming macros is suppressed via \cmd{\JustIndex}.
2987 %
2988 % \item Even after using \cmd{\JustIndex}, several name form modifiers are reset. This prevents errors when handling the next name.
2989 %
2990 % \item Except for \cmd{\SeeAlso}, use prefix macros only before a naming macro that is designed to print output in the text.
2991 %
2992 % \item Use \cmd{\SeeAlso} only with \cmd{\IndexRef}, \cmd{\AKA}, and \cmd{\PName}. Otherwise it will be ignored and reset by \cmd{\IndexName} and the naming macros.
2993 % \end{itemize}
2994 %
2995 % \subsection{Names and Complexity}
2996 % \label{sec:Complexity}
2997 %
2998 % The \textsf{nameauth} package allows levels of complexity when representing names. Previously, we have seen this example:
2999 %
3000 % \begin{Block}
3001 % \LEliz[I ``Gloriana'']\dotfill |\LEliz[I ``Gloriana'']|
3002 % \end{Block}
3003 %
3004 % We can display the same name form using different macros. This next example does not offer more features; it only presents more complexity:
3005 %
3006 % \begin{Block}
3007 % \LEliz\ ``\ForceFN\SEliz[Gloriana]''\dotfill^^A
3008 % |\LEliz\ ``\ForceFN\SEliz[Gloriana]''|
3009 % \end{Block}
3010 %
3011 % The next example offers more features and better automation. Based on Section~\ref{sec:NameAncient} (cf.~\ref{sec:Formatting}), we use name tags and adapt the formatting hooks to this manual's conventions. We make key changes once, which govern names thereafter:
3012 % \begingroup
3013 % \begin{Quote}
3014 % \begin{Verbatim}
3015 % \makeatletter
3016 % \NameAddInfo{Elizabeth, I}{\if@nameauth@InHook{ }\fi``Gloriana''}
3017 % \makeatother
3018 % \renewcommand*\NamesFormat[1]
3019 % {\color{blue}\sffamily #1\NameQueryInfo{}}
3020 % \renewcommand*\MainNameHook{\sffamily}
3021 % \end{Verbatim}
3022 % \end{Quote}
3023 %
3024 % \makeatletter
3025 % \NameAddInfo{Elizabeth, I}{\if@nameauth@InHook{ }\fi``Gloriana''}
3026 % \makeatother
3027 % \renewcommand*\NamesFormat[1]
3028 % {\color{blue}\sffamily#1\NameQueryInfo{}}
3029 % \renewcommand*\MainNameHook{\sffamily}
3030 % \begin{Block}
3031 % \BothInfo[1ex]{\ShowPattern{}}{\ShowIdxPageref*{}}
3032 % \FUse \ForgetThis\LEliz\dotfill |\ForgetThis\LEliz|\\
3033 % \UseL \LEliz\dotfill |\LEliz|\\
3034 % \LUse \Eliz\dotfill |\Eliz|\\
3035 % \UseB \NameQueryInfo{}\dotfill |\NameQueryInfo{}|
3036 % \end{Block}
3037 % \endgroup
3038 %
3039 % \begin{InfoBox}[Avoid the Rabbit Hole]
3040 % \begin{itemize}[leftmargin=1em,rightmargin=0em,itemsep=0.2ex]
3041 % \item Names are nouns with changeable states.
3042 % \begin{itemize}[rightmargin=1em]
3043 % \item \meta{FNN} and \meta{Alternate} can change easily in the text.
3044 %
3045 % \item Changing \meta{Affix} depends on the name type.
3046 %
3047 % \item Changing \meta{SNN} needs \cmd{\noexpand} with a macro that changes only in the formatting hooks (Section~\ref{sec:AltFormat}).
3048 % \end{itemize}
3049 %
3050 % \item Names also are verbs that affect their environment.
3051 %
3052 % \item There are design trade-offs:
3053 % \begin{itemize}
3054 % \item Simple examples are easy to write, but they can require subtle, ongoing changes of repetitive macros.
3055 %
3056 % \item Automation shifts the work to a complex, one-time setup that hides complexity thereafter.
3057 % \end{itemize}
3058 %
3059 % \item Use a simple approach unless otherwise needed.
3060 % \end{itemize}
3061 % \end{InfoBox}
3062 % \ReturnLink
3063 %
3064 % \newpage
3065 %
3066 % \section{Package Options}
3067 % \label{sec:PkgOptions}
3068 %
3069 % The \textsf{nameauth} options range from standards compliance, control, and appearance to backward compatibility with old versions. Thus:
3070 %
3071 % \begin{SyntaxBox}
3072 % \cmd{\usepackage[}\meta{\(option_1\)}\textbf{,}\meta{\(option_2\)}^^A
3073 % \textbf{,}\dots\textbf{,}\meta{\(option_n\)}\texttt{]\{nameauth\}}
3074 % \end{SyntaxBox}
3075 %
3076 % We discuss package options according to the structure of this package. Section~\ref{sec:Priorities} shows the priority of options and related macros. Default options are in \emph{boldface} and need not be invoked. Other options are in \emph{\color{nared} dark red} and must be invoked explicitly. Many options work with macros offering finer control.
3077 %
3078 % \subsection{Name Grammar and Syntax}
3079 %
3080 % \subsubsection*{\hfil Syntax Warnings}
3081 %
3082 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3083 % \leavevmode\color{nared}\quad\texttt{strictsyntax} &
3084 % \leavevmode\color{nared}Show warnings when the obsolete syntax appears.\medskip\\
3085 % \end{tabular}
3086 %
3087 % \noindent Disabled by default, this option helps one to avoid using the obsolete syntax.
3088 %
3089 % \subsubsection*{\hfil Show/Hide Affix Commas}
3090 %
3091 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3092 % \quad\bfseries\texttt{nocomma} &
3093 % \bfseries Modern standards: Suppress commas between Western surnames
3094 % and affixes.\smallskip\\
3095 % \leavevmode\color{nared}\quad\texttt{comma} &
3096 % \leavevmode\color{nared}Older standards: Retain commas between Western
3097 % surnames and affixes.\medskip\\
3098 % \end{tabular}
3099 %
3100 % \BothInfo[2.5ex]{\ShowPattern[J.E.]{Carter, Jr.}}
3101 % {\ShowIdxPageref*[J.E.]{Carter, Jr.}}^^A
3102 % \noindent These options do not affect the index. The default \texttt{nocomma} option lets us produce, e.g., \Name*[J.E.]{Carter, Jr.} (\FName[J.E.]{Carter, Jr.}[Jimmy]). The \texttt{comma} option produces \ShowComma\Name*[J.E.]{Carter, Jr.}. For equivalent macros, see Section~\ref{sec:Affix}.
3103 %
3104 % \subsubsection*{\hfil Capitalize Entire Surnames}
3105 %
3106 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3107 % \quad\bfseries\texttt{normalcaps} &
3108 % \bfseries Do not perform any special capitalization.\smallskip\\
3109 % \leavevmode\color{nared}\quad\texttt{allcaps} &
3110 % \leavevmode\color{nared}\textls[-5]{Capitalize entire surnames, e.g., Romanized
3111 % Eastern names, throughout the document.}\medskip\\
3112 % \end{tabular}
3113 %
3114 % \noindent These options do not affect the index. See Section~\ref{sec:Eastern} for finer control. To capitalize names in the index, use caps as desired or alternate formatting (Section~\ref{sec:AltFormat}).
3115 %
3116 % \subsubsection*{\hfil Reverse Name Order}
3117 %
3118 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3119 % \quad\bfseries\texttt{notreversed} &
3120 % \bfseries Print names in the order specified by \cmd{\Name}
3121 % and the other macros.\smallskip\\
3122 % \leavevmode\color{nared}\quad\texttt{allreversed} &
3123 % \leavevmode\color{nared}Print all name forms in ``smart'' reverse order;
3124 % Western as Non-Western, and vice versa.\smallskip\\
3125 % \leavevmode\color{nared}\quad\texttt{allrevcomma} &
3126 % \leavevmode\color{nared}Print all Western names as
3127 % ``Surname, Forenames''.\medskip\\
3128 % \end{tabular}
3129 %
3130 % \noindent These options do not affect the index and are mutually exclusive (Sections~\ref{sec:RevNames} and~\ref{sec:LastFirst}). Use \texttt{allrevcomma} option only for listing Western names by surname.
3131 %
3132 % \subsection{Indexing}
3133 %
3134 % \subsubsection*{\hfil Toggle Indexing}
3135 %
3136 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3137 % \quad\bfseries\texttt{index} &
3138 % \bfseries Create index entries in place with names.\smallskip\\
3139 % \leavevmode\color{nared}\quad\texttt{noindex} &
3140 % \leavevmode\color{nared}Suppress indexing of names.\medskip\\
3141 % \end{tabular}
3142 %
3143 %^^A ----- Recompile Point -----
3144 %^^A Starting with the text below, any errors will force one to remove all
3145 %^^A auxiliary files before compiling this file.
3146 %
3147 % \noindent
3148 % These options and related macros apply only to the \textsf{nameauth} package macros. The default \texttt{index} option enables name indexing right away. The \texttt{noindex} option disables the indexing of names until \cmd{\IndexActive} enables it.
3149 %
3150 % \Info*{\small\dbend}Using \texttt{noindex} and \cmd{\IndexInactive} prevents index tags until \cmd{\IndexActive} is called, as explained in Section~\ref{sec:GeneralIndex}. For indexing feature priority, see Section~\ref{sec:Priorities}.
3151 %
3152 % \subsubsection*{\hfil Toggle Index Sorting}
3153 %
3154 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3155 % \quad\bfseries\texttt{pretag} &
3156 % \bfseries Create sort keys used with \texttt{makeindex}.\smallskip\\
3157 % \leavevmode\color{nared}\quad\texttt{nopretag} &
3158 % \leavevmode\color{nared}Do not create sort keys.\medskip\\
3159 % \end{tabular}
3160 %
3161 % \noindent The default allows \cmd{\PretagName} to create sort keys used with \texttt{makeindex}. The \texttt{nopretag} option disables the sorting mechanism and causes \cmd{\PretagName} only to emit warnings. See Section~\ref{sec:IndexSort}.
3162 %
3163 % \subsubsection*{\hfil Verbose Warnings}
3164 %
3165 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3166 % \leavevmode\color{nared}\quad\texttt{verbose} &
3167 % \leavevmode\color{nared}Show more diagnostic warnings.\medskip\\
3168 % \end{tabular}
3169 %
3170 % \noindent The default suppresses all but the most essential package warnings. Increasing the warnings may help to debug index page entries, cross-references, and exclusions. Section~\ref{sec:GeneralIndex} shows macros that can enable and disable verbose warnings.
3171 %
3172 % \subsection[Formatting]{Formatting and Name Patterns}
3173 %
3174 % Formatting, in its simplest form, is typographic post-processing of a name in the body text. In its complex forms, formatting can affect the syntactic form of a name in both the body text and the index.
3175 %
3176 % \subsubsection*{\hfil Choose Formatting System}
3177 %
3178 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3179 % \bfseries\quad\texttt{mainmatter} &
3180 % \bfseries Start with ``main-matter names'' and formatting hooks. \normalfont(Section~\ref{sec:Formatting})\smallskip\\
3181 % \leavevmode\color{nared}\quad\texttt{frontmatter} &
3182 % \leavevmode\color{nared}Start with ``front-matter names'' and hooks until
3183 % \cmd{\NamesActive} starts the main system.\smallskip\\
3184 % \leavevmode\color{nared}\quad\texttt{alwaysformat} &
3185 % \leavevmode\color{nared}Use only respective ``first use'' formatting
3186 % hooks.\smallskip\\
3187 % \leavevmode\color{nared}\quad\texttt{formatAKA} &
3188 % \leavevmode\color{nared}Format the first use of a name with \cmd{\AKA} like
3189 % the first use of a name with \cmd{\Name}.\medskip\\
3190 % \end{tabular}
3191 %
3192 % \noindent The \texttt{mainmatter} and \texttt{frontmatter} options enable two respectively independent systems of name use and formatting. Even when no extra formatting occurs, the formatting hooks are defined. Changes require \cmd{\renewcommand}.
3193 %
3194 % The \texttt{alwaysformat} option forces ``first use'' hooks globally in both name systems. It is of limited usefulness in current versions of \textsf{nameauth}.
3195 %
3196 % The \texttt{formatAKA} option permits \cmd{\AKA} to use the ``first use'' formatting hooks. This enables \cmd{\ForceName} to trigger those hooks at will (Section~\ref{sec:AKA}). Otherwise \cmd{\AKA} only uses ``subsequent use'' formatting hooks.
3197 %
3198 % \subsubsection*{\hfil Predefined Formatting Hooks}
3199 %
3200 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3201 % \quad\bfseries\texttt{noformat} &
3202 % \bfseries Pass the displayed name through the formatting hooks
3203 % unchanged.\smallskip\\
3204 % \leavevmode\color{nared}\quad\texttt{smallcaps} &
3205 % \leavevmode\color{nared}First use of a main-matter name in small
3206 % caps.\smallskip\\
3207 % \leavevmode\color{nared}\quad\texttt{italic} &
3208 % \leavevmode\color{nared}First use of a main-matter name in
3209 % italic.\smallskip\\
3210 % \leavevmode\color{nared}\quad\texttt{boldface} &
3211 % \leavevmode\color{nared}First use of a main-matter name in
3212 % boldface.\medskip\\
3213 % \end{tabular}
3214 %
3215 % \noindent The options above are ``quick'' definitions of \cmd{\NamesFormat} based on English typography. The default is no formatting.\footnote{For the old default, use the \texttt{smallcaps} option. User feedback dictated this change.}
3216 % See also Robert Bringhurst, \Title{The Elements of Typographic Style}, version 3.2 (Point Roberts, Washington: Hartley \& Marks, 2008), 53--60. All references [\hypertarget{Bringhurst}{Bringhurst}] refer to this edition.
3217 %
3218 % The following macros govern the way that names in the text appear. Two name systems are used in \textsf{nameauth}, one for main-matter text (default) and one for front-matter text.\footnote{\cmd{\NamesFormat} was once the only formatting hook. The other macros developed from there. Regrettably, this approach contributed to some ``cargo-cult'' programming, hopefully remedied.}
3219 % These hooks do not affect the index. Changes to the formatting hooks normally apply within the scope where they occur:
3220 % \begin{itemize}
3221 % \item \cmd{\NamesFormat} formats first uses of main-matter names.
3222 %
3223 % \item \cmd{\MainNameHook} formats subsequent uses of main-matter names.
3224 %
3225 % \item \cmd{\FrontNamesFormat} formats first uses of front-matter names.
3226 %
3227 % \item \cmd{\FrontNameHook} formats subsequent uses of front-matter names.
3228 % \end{itemize}
3229 %
3230 % Sections \ref{sec:Formatting} and~\ref{sec:AdvancedFormat}f. explain these hooks and their redefinition in greater detail. Section~\ref{sec:AKA} discusses how \cmd{\AKA} does not respect these formatting systems.
3231 %
3232 % \subsection{Alternate Formatting}
3233 %
3234 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3235 % \leavevmode\color{nared}\quad\texttt{altformat} &
3236 % \leavevmode\color{nared}Make available the alternate formatting framework
3237 % from the start of the document. Activate alternate formatting by
3238 % default.\medskip\\
3239 % \end{tabular}
3240 %
3241 % \noindent A built-in framework provides an alternate formatting mechanism that can be used for European or ``Continental'' standads in German, French, and so on. These standards often format surnames, both in the text and in the index. See Section~\ref{sec:AltFormat}.
3242 %
3243 % \subsection[Scope of Decisions]{Change Scope of Name Decision Macros}
3244 %
3245 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3246 % \leavevmode\color{nared}\quad\texttt{globaltest} &
3247 % \leavevmode\color{nared}Do not put name decision paths in a local
3248 % scope.\medskip\\
3249 % \end{tabular}
3250 %
3251 % \noindent The default puts the decision paths of \cmd{\IfMainName}, etc., into groups with local scope (Section~\ref{sec:NameTests}). This option removes that scoping. Note that names tracked by \textsf{nameauth} within such decision paths are global with respect to their values.
3252 %
3253 % \subsection{Version Compatibility}
3254 % \label{sec:OptionCompat}
3255 %
3256 % These options can introduce undocumented behavior. They exist only for backward compatibility to help users cope with this author's ignorance as development changed to better fit the problem domain.\medskip
3257 %
3258 % \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
3259 % \leavevmode\color{nared}\quad\texttt{oldAKA} &
3260 % \leavevmode\color{nared}Force \cmd{\AKA*} to act like it did before
3261 % version 3.0, instead of like \cmd{\FName}.\smallskip\\
3262 % \leavevmode\color{nared}\quad\texttt{oldreset} &
3263 % \leavevmode\color{nared}Reset per-use name flags locally; let
3264 % \cmd{\ForgetThis} and \cmd{\SubvertThis} pass through \cmd{\AKA} (pre-v3.3).
3265 % Let \cmd{\SeeAlso} pass through \cmd{\IndexName} and other macros.
3266 % Keep \cmd{\IndexName} and \cmd{\IndexRef} from resetting \cmd{\SkipIndex}
3267 % (pre-version 3.5).\smallskip\\
3268 % \leavevmode\color{nared}\quad\texttt{oldpass} &
3269 % \leavevmode\color{nared}When \cmd{\Justindex} is called, allow long or short
3270 % Boolean flags to pass through, as they did before version 3.3.\smallskip\\
3271 % \leavevmode\color{nared}\quad\texttt{oldtoks} &
3272 % \leavevmode\color{nared}Token registers holding the arguments of the
3273 % last-used name are set locally, as before version 3.5.\smallskip\\
3274 % \leavevmode\color{nared}\quad\texttt{oldsee} &
3275 % \leavevmode\color{nared}Allow lax handling of \textit{see} references that
3276 % are extant names, as before version 3.5.\smallskip\\
3277 % \leavevmode\color{nared}\quad\texttt{oldargs} &
3278 % \leavevmode\color{nared}Load the \textsf{xargs} and \textsf{suffix}
3279 % packages in order to permit user-supplied modifications to work as
3280 % in version 3.7 and before. The package macros will still use
3281 % \textsf{xparse} because of its advantages.\medskip\\
3282 % \end{tabular}
3283 %
3284 % The following table shows how one gets approximate backward compatibility:
3285 % \begin{center}
3286 % \begin{tabular}{lll}\toprule
3287 % \rowcolor{nagrey}^^A
3288 % \bfseries Version & \bfseries Needed Options & \bfseries Possible Options \\
3289 %
3290 % \(\le2.6\) & \ttfamily oldreset,oldtoks,oldsee, & \ttfamily oldargs \\
3291 % & \ttfamily oldAKA,oldpass & \\
3292 %
3293 % \rowcolor{nagrey}^^A
3294 % 3.0--3.2 & \ttfamily oldreset,oldtoks,oldsee, & \ttfamily oldargs \\
3295 % \rowcolor{nagrey}^^A
3296 % & \ttfamily oldpass & \\
3297 %
3298 % 3.3--3.4 & \ttfamily oldreset,oldtoks,oldsee & \ttfamily oldargs \\
3299 %
3300 % \rowcolor{nagrey}^^A
3301 % 3.5--3.7 & \ttfamily & \ttfamily oldargs \\\bottomrule
3302 % \end{tabular}
3303 % \end{center}
3304 % \ReturnLink
3305 %
3306 % \begin{AltFormatZone}
3307 % \begin{Quotation}{\Luth}
3308 % {\Title{\de{Von der Freiheit eines Christenmenschen}} (1520)}
3309 % \de{Eyn Chriſten menſch iſt eyn freyer herr /
3310 % u\raise 0.25ex\hbox{\kern -1.1ex\textsuperscript{e}\kern 1pt}ber alle
3311 % ding / und niemande unterthan. Eyn Chriſten menſch iſt eyn dienſtpar
3312 % knecht aller ding und yderman unterthan.}
3313 %
3314 % (A Christian person is a free lord, above all things, and subject to
3315 % no one. A Christian person is a willing servant of all things and is
3316 % subject to everyone.)
3317 % \index{theologians, quotes of\noexpand\string|hyperpage}
3318 % \end{Quotation}
3319 % \end{AltFormatZone}
3320 %
3321 % \newpage
3322 %
3323 % \section{Feature Priority}
3324 % \label{sec:Priorities}
3325 %
3326 % \begin{Center}
3327 % \begin{tabular}{llll}\toprule
3328 % \bfseries Indexing & \bfseries Capitalization &
3329 % \bfseries Reversing & \bfseries Name Forms,\\
3330 % & & & \bfseries Commas, Breaks\\\midrule
3331 %
3332 % \ttfamily\bfseries index & \ttfamily\bfseries normalcaps &
3333 % \ttfamily\bfseries notreversed & \cmd{\ForgetThis}\\
3334 % \ttfamily\bfseries noindex & \ttfamily\bfseries allcaps &
3335 % \ttfamily\bfseries allreversed & \cmd{\DropAffix}\\
3336 % \cmd{\IndexActive} & \cmd{\AllCapsInactive} & \cmd{\ReverseActive}\\
3337 % \cmd{\IndexInactive} & \cmd{\AllCapsActive} & \cmd{\ReverseInactive}\\[1ex]
3338 %
3339 % \rowcolor{white!95!black}
3340 % \cmd{\JustIndex} & \cmd{\CapName} & \cmd{\RevName} & \cmd{\NoComma}\\
3341 % \rowcolor{white!95!black}
3342 % & & & \cmd{\SubvertThis}\\
3343 % \rowcolor{white!95!black}
3344 % & & & \cmd{\ForceAffix}\\
3345 % \rowcolor{white!95!black}
3346 % & & & \cmd{\ForceName}\\[1ex]
3347 %
3348 % \rowcolor{white!90!black}
3349 % \cmd{\SkipIndex} & \cmd{\AccentCapThis} &
3350 % \ttfamily\bfseries allrevcomma & \cmd{\KeepName}\\
3351 % \rowcolor{white!90!black}
3352 % & & \cmd{\RevCommaActive} & \cmd{\ForceFN}\\
3353 % \rowcolor{white!90!black}
3354 % & & \cmd{\RevCommaInactive} & \ttfamily\bfseries showcomma\\
3355 % \rowcolor{white!90!black}
3356 % & & & \cmd{\ShowComma}\\
3357 % \rowcolor{white!90!black}
3358 % & & & \ttfamily\bfseries nocomma\\[1ex]
3359 %
3360 % \rowcolor{white!85!black}
3361 % \cmd{\SeeAlso} & \cmd{\CapThis} & \cmd{\RevComma} &
3362 % \cmd{\KeepAffix}\\\bottomrule
3363 % \end{tabular}
3364 % \end{Center}
3365 %
3366 % Above we see the relative priority of package options and their related macros. Package options are shown in boldface.
3367 % \begin{itemize}
3368 % \item Lighter-colored rows show higher priority. Darker-colored rows show lower priority. Higher-priority options and macros have the ability to override lower-priority ones.
3369 %
3370 % \item All options and macros in a given row have equal priority and are able to countermand each other within a given column.
3371 %
3372 % \item Priority affects macros and options within columns. \cmd{\IndexInactive} overrides \cmd{\JustIndex}, which overrides \cmd{\SkipIndex}. If \cmd{\IndexInactive} is invoked, \cmd{\JustIndex} will have no effect.
3373 %
3374 % \item Section~\ref{sec:IdxPrefix} shows the complex interaction between \cmd{\SkipIndex} and \cmd{\JustIndex}. It it is best to use \cmd{\SkipIndex} and \cmd{\JustIndex} only before a naming macro that can print to the text.
3375 %
3376 % \item Priority usually does not affect macros and options in different columns. Yet the macros themselves can have specific effects that change the expected behavior of macros in other columns.
3377 %
3378 % \item[] For example, \cmd{\JustIndex} prevents a name from being displayed in the text. Even if \cmd{\IndexInactive} overrides \cmd{\JustIndex} with respect to indexing, it has no effect on the fact that the name will not be printed.
3379 %
3380 % \item[] Also, \cmd{\JustIndex} resets the effects of \cmd{\ForgetThis} and \cmd{\SubvertThis} because those prefix macros (Section~\ref{sec:ListPrefix}) should precede only naming macros that produce output in the text.
3381 %
3382 % \item[] Although \cmd{\JustIndex} does not override the caps and reversing macros and options, it prevents anything related to displaying a name.
3383 % \end{itemize}
3384 % \ReturnLink
3385 %
3386 % \newpage
3387 %
3388 % \section{Naming Macros}
3389 % \label{sec:NamePedantic}
3390 %
3391 % This section is a ``pedantic'' presentation of macros, their syntax, and their output. Section~\ref{sec:BasicStart} is better for getting started. All naming macros that have the same arguments also create consistent index entries. These entries are created both at the start and at the end of a name, in case that name spans a page break.
3392 %
3393 % \subsection{\texttt{\textbackslash Name} and \texttt{\textbackslash Name*}}
3394 % \label{sec:Naming}
3395 %
3396 % \DescribeMacro{\Name}
3397 % \cmd{\Name} displays and indexes names. It prints the full name at the first occurrence, then usually just \meta{SNN} thereafter.
3398 % \DescribeMacro{\Name*}
3399 % \cmd{\Name*} always prints the full name:
3400 %
3401 % \begin{SyntaxBox}
3402 % \cmd{\Name\ }\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
3403 % \cmd{\Name*}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
3404 % \end{SyntaxBox}
3405 %
3406 % In the body text only, the \meta{Alternate} argument replaces either \meta{FNN} or, if \meta{FNN} is absent, \meta{Affix}. If both \meta{FNN} and \meta{Affix} are absent when \meta{Alternate} is present, then the obsolete syntax is used (Section~\ref{sec:Obsolete}, not shown below).
3407 % \begin{Quote}
3408 % \begin{Verbatim}
3409 % \begin{nameauth}
3410 % \< Einstein & Albert & Einstein & >
3411 % \< Carter & J.E. & Carter, Jr. & >
3412 % \< Miyazaki & & Miyazaki, Hayao & >
3413 % \< Eliz & & Elizabeth, I & >
3414 % \< Confucius & & Confucius & >
3415 % \end{nameauth}
3416 % \end{Verbatim}
3417 % \end{Quote}
3418 %
3419 % \ForgetName[Albert]{Einstein}\ForgetName[J.E.]{Carter, Jr.}
3420 % \begin{Center}
3421 % \BothInfo[2.6ex]{\ShowPattern[Albert]{Einstein}\break
3422 % \ShowPattern[J.E.]{Carter, Jr.}\break
3423 % \ShowPattern{Miyazaki, Hayao}\break
3424 % \ShowPattern{Elizabeth, I}\break
3425 % \ShowPattern{Confucius}}
3426 % {\ShowIdxPageref*[Albert]{Einstein}\break
3427 % \ShowIdxPageref*[J.E.]{Carter, Jr.}\break
3428 % \ShowIdxPageref*{Miyazaki, Hayao}\break
3429 % \ShowIdxPageref*{Elizabeth, I}\break
3430 % \ShowIdxPageref*{Confucius}}
3431 % \begin{tabular}{ll}\toprule
3432 % \rowcolor{nagrey}^^A
3433 % \Name [Albert]{Einstein} & |\Name [Albert]{Einstein}| or |\Einstein|\\
3434 % \rowcolor{nagrey}^^A
3435 % \LEinstein & |\Name*[Albert]{Einstein}| or |\LEinstein|\\
3436 % \rowcolor{nagrey}^^A
3437 % \Einstein & |\Name [Albert]{Einstein}| or |\Einstein|\\
3438 %
3439 % \Name [J.E.]{Carter, Jr.} & |\Name [J.E.]{Carter, Jr.}| or |\Carter|\\
3440 % \LCarter[James Earl] & |\Name*[J.E.]{Carter, Jr.}[James Earl]|\\
3441 % & or |\LCarter[James Earl]|\\
3442 % \Carter & |\Name [J.E.]{Carter, Jr.}| or |\Carter|\\
3443 %
3444 % \rowcolor{nagrey}^^A
3445 % \ForgetThis\Name {Miyazaki, Hayao} &
3446 % |\Name {Miyazaki, Hayao}| or |\Miyazaki|\\
3447 % \rowcolor{nagrey}^^A
3448 % \Name*{Miyazaki, Hayao}[Sensei] & |\Name*{Miyazaki, Hayao}[Sensei]|\\
3449 % \rowcolor{nagrey}^^A
3450 % \Name {Miyazaki, Hayao} & |\Name {Miyazaki, Hayao}| or |\Miyazaki|\\
3451 %
3452 % \ForgetThis\Eliz & |\Name {Elizabeth, I}| or |\Eliz|\\
3453 % \Name*{Elizabeth, I} & |\Name*{Elizabeth, I}| or |\LEliz|\\
3454 % \Name {Elizabeth, I} & |\Name {Elizabeth, I}| or |\Eliz|\\
3455 %
3456 % \rowcolor{nagrey}^^A
3457 % \ForgetThis\Confucius & |\Name {Confucius}| or |\Confucius|\\
3458 % \rowcolor{nagrey}^^A
3459 % \Confucius & |\Name {Confucius}| or |\Confucius|\\\bottomrule
3460 % \end{tabular}
3461 % \end{Center}
3462 % With the quick interface, the usual way to use alternate names is by appending them in brackets:
3463 % \begin{Block}
3464 % \LCarter[James Earl]\dotfill |\LCarter[James Earl]|\\
3465 % \LMiyazaki[Sensei]\dotfill |\LMiyazaki[Sensei]|
3466 % \end{Block}
3467 % Otherwise, one can populate the final field in the \texttt{nameauth} environment, with several caveats (Section~\ref{sec:ArgIV}). Alternate names appear only in long name forms or short name forms described in the next section.
3468 %
3469 % \newpage
3470 %
3471 % \subsection{Forenames: \texttt{\textbackslash FName}}
3472 % \label{sec:FName}
3473 %
3474 % \DescribeMacro{\FName}
3475 % \cmd{\FName} and its synonym \cmd{\FName*} print personal names only in subsequent name uses.
3476 % \DescribeMacro{\FName*}
3477 % That means when a name pattern does not exist, they print long name forms because it is a first use of a name.
3478 %
3479 % Unlike all other starred forms of macros in \textsf{nameauth}, these macros are synonyms because one might edit either \cmd{\Name} or \cmd{\Name*} by adding an \texttt{F} to create a short name instead of the usual forms. This approach was implemented before the quick interface was developed.
3480 %
3481 % \begin{SyntaxBox}
3482 % \cmd{\FName\ }\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
3483 % \cmd{\FName*}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
3484 % \end{SyntaxBox}
3485 %
3486 % These forename instance macros will permit all name types, but the normal behavior prints forenames only with Western names. With Non-Western names only \meta{SNN} is printed. This is designed to prevent Western writers from causing unintended offense in Eastern contexts. It also prevents the display of nonsense forms in the context of ancient and royal names.
3487 %
3488 % \DescribeMacro{\ForceFN}
3489 % To get an Eastern personal name or any affixed components of an ancient name, or to get \meta{Alternate} to display in their place, one must precede these macros with \cmd{\ForceFN}. See also Section~\ref{sec:NameMedieval} for more uses of \cmd{\ForceFN}.
3490 % \begin{Center}
3491 % \BothInfo[2.5ex]{\ShowPattern[Albert]{Einstein}\break
3492 % \ShowPattern[J.E.]{Carter, Jr.}\break
3493 % \ShowPattern{Miyazaki, Hayao}\break
3494 % \ShowPattern{Elizabeth, I}\break
3495 % \ShowPattern{Confucius}}
3496 % {\ShowIdxPageref*[Albert]{Einstein}\break
3497 % \ShowIdxPageref*[J.E.]{Carter, Jr.}\break
3498 % \ShowIdxPageref*{Miyazaki, Hayao}\break
3499 % \ShowIdxPageref*{Elizabeth, I}\break
3500 % \ShowIdxPageref*{Confucius}}
3501 % \begin{tabular}{ll}\toprule
3502 % \rowcolor{nagrey}^^A
3503 % \SEinstein & |\FName[Albert]{Einstein}| or |\SEinstein|\\
3504 %
3505 % \SCarter[Jimmy] & |\FName[J.E.]{Carter, Jr.}[Jimmy]|\\
3506 % & or |\SCarter[Jimmy]|\\
3507 %
3508 % \rowcolor{nagrey}^^A
3509 % \FName{Miyazaki, Hayao} & |\FName{Miyazaki, Hayao}| or |\SMiyazaki|\\
3510 %
3511 % \rowcolor{nagrey}^^A
3512 % \ForceFN\FName{Miyazaki, Hayao} & |\ForceFN\FName{Miyazaki, Hayao}|\\
3513 % \rowcolor{nagrey}^^A
3514 % & or |\ForceFN\SMiyazaki|\\
3515 %
3516 % \rowcolor{nagrey}^^A
3517 % \ForceFN\FName{Miyazaki, Hayao}[Sensei] &
3518 % |\ForceFN\FName{Miyazaki, Hayao}[Sensei]|\\
3519 % \rowcolor{nagrey}^^A
3520 % & or |\ForceFN\SMiyazaki[Sensei]|\\
3521 %
3522 % \SEliz & |\FName{Elizabeth, I}| or |\SEliz|\\
3523 % \ForceFN\SEliz[Gloriana] &
3524 % |\ForceFN\FName{Elizabeth, I}[Gloriana]|\\
3525 % & or |\ForceFN\SEliz[Gloriana]|\\
3526 %
3527 % \rowcolor{nagrey}^^A
3528 % \FName{Confucius} & |\FName{Confucius}| or |\SConfucius |\\\bottomrule
3529 % \end{tabular}
3530 % \end{Center}
3531 %
3532 % The \meta{Alternate} argument replaces forenames in the text, which strongly shapes the use of \cmd{\FName}. We already have covered the use of \meta{Arg4} of the \texttt{nameauth} environment in Section~\ref{sec:ArgIV}. Please refer to that material when using \meta{Alternate}, especially with the quick interface.
3533 %
3534 % \begin{Quotation}{\Eliz}
3535 % {speech to Parliament, 1586}
3536 % As for me, I see no such great cause why I should either be
3537 % fond to live or fear to die. I have had good experience of this
3538 % world, and I know what it is to be a subject and what to be a
3539 % sovereign. Good neighbors I have had, and I have met with bad;
3540 % and in trust I have found treason.
3541 % \index{politicians, quotes of\noexpand\string|hyperpage}
3542 % \end{Quotation}
3543 %
3544 % \newpage
3545 %
3546 % \subsection{Technical Details}
3547 %
3548 % \subsubsection[Final Optargs]{Final Optional Arguments}
3549 % \label{sec:FinalOptargs}
3550 %
3551 % Macros that take name arguments using the current syntax (see also Section~\ref{sec:NameArgMacros}) can have a final optional argument. We do not index the names below in this manual, but we show how the index entries would appear:
3552 % \begingroup
3553 % \IndexInactive
3554 % \renewcommand\NamesFormat{}
3555 % \renewcommand\MainNameHook{}
3556 % \begin{itemize}
3557 % \item Western Index Entries:\smallskip
3558 %
3559 % \begingroup\footnotesize
3560 % \begin{tabular}{p{2.2cm}p{6.13cm}p{2.35cm}}\toprule
3561 % \rowcolor{nagrey}\bfseries Text &
3562 % \bfseries Macro / Arguments & \bfseries Index\\
3563 % \Name*[First]{Last, Affix}[Alias] &
3564 % |\Name*[First]{Last, Affix}[Alias]| &
3565 % \ShowIdxPageref*[First]{Last, Affix}\\
3566 % \Name*[First]{Last}[Alias] &
3567 % |\Name*[First]{Last}[Alias]| &
3568 % \ShowIdxPageref*[First]{Last}\\
3569 % \RevName\Name*[First]{Last}[Alias] &
3570 % |\RevName\Name*[First]{Last}[Alias]| &
3571 % \ShowIdxPageref*[First]{Last}\\\bottomrule
3572 % \end{tabular}
3573 % \endgroup\smallskip
3574 %
3575 % \item Non-Western Index Entries:\smallskip
3576 %
3577 % \begingroup\footnotesize
3578 % \begin{tabular}{p{2.2cm}p{6.13cm}p{2.35cm}}\toprule
3579 % \rowcolor{nagrey}\bfseries Text &
3580 % \bfseries Macro / Arguments & \bfseries Index\\
3581 % \Name*{Family, Person}[Alias] &
3582 % |\Name*{Family, Person}[Alias]| &
3583 % \ShowIdxPageref*{Family, Person}\\
3584 % \RevName\Name*{Family, Person}[Alias] &
3585 % |\RevName\Name*{Family, Person}[Alias]| &
3586 % \ShowIdxPageref*{Family, Person}\\
3587 % \Name*{Person, Affix}[Alias] &
3588 % |\Name*{Person, Affix}[Alias]| &
3589 % \ShowIdxPageref*{Person, Affix}\\\bottomrule
3590 % \end{tabular}
3591 % \endgroup
3592 % \end{itemize}
3593 % \endgroup
3594 %
3595 % Since May 2018, \textsf{xparse} either can ignore spaces before final optional arguments, or it can see those spaces as significant. Below \cmd{\Namei} ignores these spaces, the default for \textsf{nameauth}. \cmd{\Nameii} sees these spaces as significant.\footnote{Before May 2018, \cmd{\Namei} worked like \cmd{\Nameii} does now. This manual checks for the appropriate changes and mitigates errors. Currently, \textsf{xparse} is just as stable as \textsf{xargs} and \textsf{suffix}.}
3596 % The default advantages of \cmd{\Namei} outweigh those of \cmd{\Nameii}. Section~\ref{sec:FullCustomize} shows how one can change these defaults via advanced customization. There are no ``perfect'' choices, only trade-offs.
3597 %
3598 % \begin{Quote}
3599 % \begin{Verbatim}
3600 % \NewDocumentCommand {\Namei}{O{} m O{}}
3601 % {\providecommand\Opt{#3}\ifx\Opt\empty #1\ #2\else \Opt\ #2\fi}
3602 % % Cannot use this definition before May 2018.
3603 % \NewDocumentCommand{\Nameii}{O{} m !O{}}
3604 % {\providecommand\Opt{#3}\ifx\Opt\empty #1\ #2\else \Opt\ #2\fi}
3605 %
3606 % \cmd{\Namei: } \Namei[Person1]{Family1} [something1]\\[1ex]
3607 % \cmd{\Nameii:} \Nameii[Person2]{Family2} [something2]
3608 % \end{Verbatim}
3609 %
3610 % \ifdefined\nameauthxp%^^A
3611 % \NewDocumentCommand {\Namei}{O{} m O{}}
3612 % {\providecommand\Opt{#3}\ifx\Opt\empty #1\ #2\else \Opt\ #2\fi}
3613 % \NewDocumentCommand{\Nameii}{O{} m !O{}}
3614 % {\providecommand\Opt{#3}\ifx\Opt\empty #1\ #2\else \Opt\ #2\fi}
3615 % \cmd{\Namei: } \Namei[Person1]{Family1} [something1]\\[1ex]
3616 % \cmd{\Nameii:} \Nameii[Person2]{Family2} [something2]%^^A
3617 % \else
3618 % \NewDocumentCommand {\Namei}{O{} m O{}}
3619 % {\providecommand\Opt{#3}\ifx\Opt\empty #1\ #2\else \Opt\ #2\fi}
3620 % \cmd{\Namei: } \Namei[Person1]{Family1} [something1]\\[1ex]
3621 % \cmd{\Nameii:} (\LaTeX\ too old)%^^A
3622 % \fi
3623 % \end{Quote}
3624 % \begin{itemize}
3625 % \item What happens when we ignore these spaces (\cmd{\Namei})?
3626 % \begin{itemize}
3627 % \item Subsequent text in brackets always becomes a name argument.
3628 % \item We avoid errors arising from unintended spaces.
3629 % \item This follows standard \LaTeX\ behavior.
3630 % \end{itemize}
3631 %
3632 % \item What happens when these spaces are significant (\cmd{\Nameii})?
3633 % \begin{itemize}
3634 % \item Spaces that follow the required argument prevent the final optional argument from being seen as such.
3635 % \item Unintended spaces could ``orphan'' final optional arguments.
3636 % \end{itemize}
3637 % \end{itemize}
3638 %
3639 % \newpage
3640 %
3641 % The default behavior can cause problems when using interpolated text in square brackets following a name. We show this using both name interfaces. We simulate first instances of names (Section~\ref{sec:NameControl}), and we suppress name formatting.
3642 %
3643 % \begingroup
3644 % \renewcommand\NamesFormat{}
3645 % \renewcommand\MainNameHook{}
3646 % \ForgetName[Albert]{Einstein}
3647 % \ForgetName{Miyazaki, Hayao}
3648 % \begin{itemize}
3649 % \item We expect to see the following text:
3650 % \BothInfo*{\ShowPattern[Albert]{Einstein}\break
3651 % \ShowPattern{Miyazaki, Hayao}}
3652 % {\ShowIdxPageref*[Albert]{Einstein}\break
3653 % \ShowIdxPageref*{Miyazaki, Hayao}}
3654 % \begin{Block}\textls[7]{^^A
3655 % Albert Einstein [first] spoke about physics.
3656 % Miyazaki Hayao [then] spoke about animation.
3657 % Einstein [again] spoke about physics.
3658 % Miyazaki [later] spoke about film.}
3659 % \end{Block}
3660 %
3661 % \item We use these macros and get poor results:
3662 % \begin{Verbatim}[numbers=none]
3663 % \Name[Albert]{Einstein} [first] spoke about physics.
3664 % \Name{Miyazaki, Hayao} [then] spoke about animation.
3665 % \Name[Albert]{Einstein} [again] spoke about physics.
3666 % \Name{Miyazaki, Hayao} [later] spoke about film.
3667 % \end{Verbatim}
3668 % \begin{Block}\textls[7]{^^A
3669 % \Name[Albert]{Einstein} [first] spoke about physics.
3670 % \Name{Miyazaki, Hayao} [then] spoke about animation.
3671 % \Name[Albert]{Einstein} [again] spoke about physics.
3672 % \Name{Miyazaki, Hayao} [later] spoke about film.}
3673 % \end{Block}
3674 %
3675 % \ForgetName[Albert]{Einstein}
3676 % \ForgetName{Miyazaki, Hayao}
3677 % \item We add explicit spaces or curly braces to get correct results:
3678 % \begin{Verbatim}[numbers=none]
3679 % \Name[Albert]{Einstein}\ [first] spoke about physics.
3680 % \Name{Miyazaki, Hayao}\ [then] spoke about animation.
3681 % \Name[Albert]{Einstein}{} [again] spoke about physics.
3682 % \Name{Miyazaki, Hayao}{} [later] spoke about film.
3683 % \end{Verbatim}
3684 % \begin{Block}\textls[7]{^^A
3685 % \Name[Albert]{Einstein}\ [first] spoke about physics.
3686 % \Name{Miyazaki, Hayao}\ [then] spoke about animation.
3687 % \Name[Albert]{Einstein}{} [again] spoke about physics.
3688 % \Name{Miyazaki, Hayao}{} [later] spoke about film.}
3689 % \end{Block}
3690 % \end{itemize}
3691 % \begin{Quote}
3692 % \begin{Verbatim}[numbers=none]
3693 % \begin{nameauth}
3694 % \< Einstein & Albert & Einstein & >
3695 % \< Miyazaki & & Miyazaki, Hayao & >
3696 % \end{nameauth}
3697 % \end{Verbatim}
3698 % \end{Quote}
3699 % \ForgetName[Albert]{Einstein}
3700 % \ForgetName{Miyazaki, Hayao}
3701 % \begin{itemize}
3702 % \item We expect to see the same text as above.
3703 %
3704 % \item We use these macros and get poor results:
3705 % \begin{Verbatim}[numbers=none]
3706 % \Einstein [first] spoke about physics.
3707 % \Miyazaki [then] spoke about animation.
3708 % \Einstein [again] spoke about physics.
3709 % \Miyazaki [later] spoke about film.
3710 % \end{Verbatim}
3711 % \begin{Block}\textls[7]{^^A
3712 % \Einstein [first] spoke about physics.
3713 % \Miyazaki [then] spoke about animation.
3714 % \Einstein [again] spoke about physics.
3715 % \Miyazaki [later] spoke about film.}
3716 % \end{Block}
3717 %
3718 % \ForgetName[Albert]{Einstein}
3719 % \ForgetName{Miyazaki, Hayao}
3720 % \item We add explicit spaces or curly braces to get correct results:
3721 % \begin{Verbatim}[numbers=none]
3722 % \Einstein\ [first] spoke about physics.
3723 % \Miyazaki\ [then] spoke about animation.
3724 % \Einstein{} [again] spoke about physics.
3725 % \Miyazaki{} [later] spoke about film.
3726 % \end{Verbatim}
3727 % \begin{Block}\textls[7]{^^A
3728 % \Einstein\ [first] spoke about physics.
3729 % \Miyazaki\ [then] spoke about animation.
3730 % \Einstein{} [again] spoke about physics.
3731 % \Miyazaki{} [later] spoke about film.}
3732 % \end{Block}
3733 % \end{itemize}
3734 % \endgroup
3735 %
3736 % \subsubsection[Affixes]{Affixes Need Commas}
3737 % \label{sec:Affix}
3738 %
3739 % A comma is not a required name element unless used in an \meta{SNN\textbf{,}Affix} pair. When thus used it delimits a Western surname from its affix, an Eastern family name from a personal name, and an ancient name from an affix.
3740 %
3741 % When a comma appears in a required name argument, each member of the \meta{SNN\textbf{,}Affix} pair is treated as a separate argument. Thus, we say that the comma delimits or segments the name argument. Spaces around the comma are ignored. See Section~\ref{sec:Noexpand} for more information when using macros in name arguments.
3742 % \begin{InfoBox}
3743 % Regarding an \meta{SNN\textbf{,}Affix} pair, avoid error by applying macros to \meta{SNN} and \meta{Affix} as if they were independent arguments.
3744 % \end{InfoBox}
3745 %
3746 % \begin{Center}
3747 % \BothInfo[2ex]{\ShowPattern[Oskar]{Hammerstein, II}\break
3748 % \ShowPattern{Louis, XIV}\break
3749 % \ShowPattern{Sun, Yat-sen}}
3750 % {\ShowIdxPageref*[Oskar]{Hammerstein, II}\break
3751 % \ShowIdxPageref*{Louis, XIV}\break
3752 % \ShowIdxPageref*{Sun, Yat-sen}}
3753 % \ForgetName{Sun, Yat-sen}
3754 % \begin{tabular}{ll}\toprule
3755 % \rowcolor{nagrey}^^A
3756 % \bfseries Text & \bfseries Macro / Arguments\\
3757 % \Name[Oskar]{Hammerstein, II} & |\Name[Oskar]{Hammerstein, II}|\\
3758 % \Name[Oskar]{Hammerstein, II} & |\Name[Oskar]{Hammerstein, II}|\\
3759 %
3760 % \rowcolor{nagrey}^^A
3761 % \ForgetThis\Name{Louis, XIV} & |\Name{Louis, XIV}|\\
3762 % \rowcolor{nagrey}^^A
3763 % \Name{Louis, XIV} & |\Name{Louis, XIV}|\\
3764 %
3765 % \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\\
3766 % \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\\\bottomrule
3767 % \end{tabular}
3768 % \end{Center}
3769 %
3770 % \BothInfo[1.2ex]{\ShowPattern[Oskar]{Hammerstein}[II]}
3771 % {\ShowIdxPageref*[Oskar]{Hammerstein}[II]}
3772 % Western names with affixes must use \meta{SNN\textbf{,}Affix}, never the obsolete syntax, which is meant for Non-Western names and is discouraged. We get \SkipIndex\Name[Oskar]{Hammerstein}[II] and a bad index entry from, e.g., \cmd{\SkipIndex}\cmd{\Name[Oskar]\{Hammerstein\}[II]}.
3773 %
3774 % \DescribeMacro{\KeepAffix}
3775 % If the name displayed in the text shows both \meta{SNN} and \meta{Affix}, then \cmd{\KeepAffix} turns the space \emph{between} \meta{SNN} and \meta{Affix} into a non-breaking space. \cmd{\KeepAffix}\cmd{\Name\{Louis, XIV\}} will not break between \Name{Louis, XIV} and \ForceFN\FName{Louis, XIV}. All name types that use \meta{Affix} are supported.
3776 %
3777 % \DescribeMacro{\DropAffix}\leavevmode
3778 % If \cmd{\DropAffix} precedes only a Western name, it will suppress the affix after the surname in a first or long instance. We get ``\DropAffix\Name*[Oskar]{Hammerstein, II}'' From |\DropAffix\Name*[Oskar]{Hammerstein, II}|.
3779 %
3780 % With Non-Western names, the \meta{Affix} in the \meta{SNN\textbf{,}Affix} pair drops automatically in the text for subsequent uses, making \cmd{\DropAffix} redundant. We see that above in the case of \Name*{Louis,XIV}, who becomes \Name{Louis,XIV}.
3781 %
3782 % \Info*{\small\cmd{\ForceAffix}} Since the macro \cmd{\ForceAffix}, which prints only the affix of subsequent-use Western names, has such a narrow intended use, we cover it in Section~\ref{sec:RomanGeneral}.
3783 %
3784 % \DescribeMacro{\ShowComma}
3785 % In a long name form, \cmd{\ShowComma} forces the display of a comma between a Western name and its affix.
3786 % \DescribeMacro{\NoComma}
3787 % It works like the \texttt{comma} option on a per-name basis, and only in the text. One uses \cmd{\ShowComma} with older publication styles that separate a Western name and affix with a comma. \cmd{\NoComma} works like the \texttt{nocomma} option in the body text on a per-name basis.
3788 % \medskip
3789 %
3790 % \BothInfo[2.5ex]{\ShowPattern[George S.]{Patton, Jr.}}
3791 % {\ShowIdxPageref*[George S.]{Patton, Jr.}}
3792 % \begin{tabular}{@{}lll}
3793 % With comma: & \ShowComma\LPatton & |\ShowComma\LPatton|\\[1ex]
3794 % No comma: & \NoComma\LPatton & |\NoComma\LPatton|\\
3795 % \end{tabular}
3796 % \medskip
3797 %
3798 % Neither \cmd{\ShowComma}, \cmd{\NoComma}, nor their related package options interact with the use of \cmd{\RevComma} and friends (Sections~\ref{sec:Priorities} and~\ref{sec:LastFirst}).
3799 %
3800 % \subsubsection{Trimming Spaces}
3801 %
3802 % To get consistent index entries, all \textsf{nameauth} macros that take name arguments trim extra spaces around each name argument, shown in gray below:
3803 % \begin{Quote}
3804 % \newcommand\gbox{\colorbox{nagrey}{\strut\ \ \strut}}
3805 % \bfseries
3806 % \cmd{\Name}\texttt{[}\gbox\meta{\color{nared}FNN}\gbox\texttt{]}^^A
3807 % \texttt{\{}\gbox\meta{SNN}\gbox\texttt{\color{nared},}\gbox^^A
3808 % \meta{\color{nared}Affix}\gbox\texttt{\}}^^A
3809 % \texttt{[}\gbox\meta{\color{nared}Alternate}\gbox\texttt{]}
3810 % \end{Quote}
3811 % We show this in practice while suppressing name formatting:
3812 % ^^A
3813 % \begin{VerbatimOut}{\jobname.tmp}
3814 % No spaces:\\
3815 % \fbox{\strut\Name*[Martin Luther]{King,Jr.}}
3816 % \fbox{\strut\Name [Martin Luther]{King,Jr.}}
3817 % \fbox{\strut\FName[Martin Luther]{King,Jr.}}
3818 %
3819 % Spaces:\\
3820 % \fbox{\strut\Name*[ Martin Luther ]{ King , Jr. }}
3821 % \fbox{\strut\Name [ Martin Luther ]{ King , Jr. }}
3822 % \fbox{\strut\FName[ Martin Luther ]{ King , Jr. }}
3823 % \end{VerbatimOut}
3824 %^^A
3825 % \begin{Quote}
3826 % \VerbatimInput[gobble=0]{\jobname.tmp}
3827 % \renewcommand*\NamesFormat{}
3828 % \renewcommand*\MainNameHook{}
3829 %
3830 % \BothInfo[3ex]{\ShowPattern[Martin Luther]{King, Jr.}\break
3831 % \ShowPattern[ Martin Luther ]{ King , Jr. }}
3832 % {\ShowIdxPageref*[Martin Luther]{King, Jr.}\break
3833 % \ShowIdxPageref*[ Martin Luther ]{ King , Jr. }}
3834 % \input{\jobname.tmp}
3835 % \end{Quote}
3836 %
3837 % We resume name formatting to show names that look the same, but are different. Non-breaking spaces, explicit spaces, thin spaces, and macros that expand to spaces \emph{are not trimmed}. They produce different name patterns, shown below:
3838 % \begin{Center}\IndexInactive
3839 % \begin{tabular}{lll}\toprule
3840 % \rowcolor{nagrey}^^A
3841 % \bfseries Text & \bfseries Macro / Arguments & \bfseries Name Pattern\\
3842 %
3843 % \Name{foo~bar} & |\Name{foo~bar}| & \ttfamily\ShowPattern{foo~bar} \\
3844 %
3845 % \rowcolor{nagrey}^^A
3846 % \Name{foo\ bar} & |\Name{foo\ bar}| & \ttfamily\ShowPattern{foo\ bar} \\
3847 %
3848 % \Name{foo\space bar} & |\Name{foo\space bar}| &
3849 % \ttfamily\ShowPattern{foo\space bar} \\\bottomrule
3850 % \end{tabular}\IndexActive
3851 % \end{Center}
3852 %
3853 % For more on uniqueness, see Sections~\ref{sec:NamePatterns} and~\ref{sec:Unique}. Names with macros in their arguments must be sorted with \cmd{\PretagName} (Section~\ref{sec:IndexSort}).
3854 %
3855 % \subsubsection{Formatting Initials}
3856 %
3857 % Some publishers are dead-set on having a space between initials. Many designers find that practice to be inelegant at best. [\hyperlink{Bringhurst}{Bringhurst}] wisely advises one to omit spaces between initials. Yet, fighting with one's editor does little good. If a style guide requires spaces, try thin spaces and sorting as below:
3858 %
3859 % \begin{Block}
3860 % \BothInfo[3.5ex]{\ShowPattern[E.\,B.]{White}}
3861 % {\ShowIdxPageref*[E.\,B.]{White}}
3862 % \begin{Verbatim}
3863 % \PretagName[E.\,B.]{White}{White, Elwyn}
3864 % \begin{nameauth}
3865 % \< White & E.\,B. & White & >
3866 % \end{nameauth}
3867 % \end{Verbatim}
3868 %
3869 % \large
3870 % \renewcommand*\NamesFormat{}
3871 % \renewcommand*\MainNameHook{}
3872 % \begin{tabular}{ll}
3873 % Thin spaces &
3874 % \vrule width 1pt\LWhite[E.\vrule width 1pt\,\vrule width 1ptB.\vrule width 1pt\ \vrule width 1pt]\vrule width 1pt\\\hline
3875 % Normal spaces &
3876 % \vrule width 1pt\LWhite[E.\vrule width 1pt\ \vrule width 1ptB.\vrule width 1pt\ \vrule width 1pt]\vrule width 1pt\\
3877 % \end{tabular}
3878 % \end{Block}
3879 %
3880 % We used \cmd{\PretagName} to sort this name as: ``White, Elwyn'' to ensure that his index entry is sorted properly. (Section~\ref{sec:IndexInitials}).
3881 %
3882 % \subsubsection{Name Breakpoints}
3883 %
3884 % \DescribeMacro{\KeepName}
3885 % In longer name forms, \cmd{\KeepName} turns spaces \emph{between} all visible name elements into non-breaking spaces. This macro does not alter spaces \emph{within} name elements with multiple names, such as French and German forenames, as well as Spanish surnames. \cmd{\KeepName} works with all name types.
3886 % \BothInfo[5ex]{\ShowPattern[Sandra Day]{O'Connor}}
3887 % {\ShowIdxPageref*[Sandra Day]{O'Connor}}
3888 % \begin{itemize}
3889 % \item \Name[Sandra Day]{O'Connor} |\Name[Sandra Day]{O'Connor}| has two points where the name can break: after \FName[Sandra Day]{O'Connor}[Sandra] and after \FName[Sandra Day]{O'Connor}[Day].
3890 %
3891 % \item \KeepName\Name*[Sandra Day]{O'Connor} |\KeepName\Name*[Sandra Day]{O'Connor}| has one point where the name can break: after
3892 % \FName[Sandra Day]{O'Connor}[Sandra].
3893 % \end{itemize}
3894 %
3895 % \subsubsection{Full Stop Detection}
3896 %
3897 % Names may use full stops in some cases, including the following:
3898 % \begin{itemize}
3899 % \item When forenames are abbreviated as initials: \LJRIV\ is \SJRIV.
3900 % \BothInfo{\ShowPattern[George S.]{Patton, Jr.}\break
3901 % \ShowPattern[J.D.]{Rockefeller, IV}\break
3902 % \ShowPattern[Marcus]{Welby,M.D.}}
3903 % {\ShowIdxPageref*[George S.]{Patton, Jr.}\break
3904 % \ShowIdxPageref*[J.D.]{Rockefeller, IV}\break
3905 % \ShowIdxPageref*[Marcus]{Welby,M.D.}}
3906 %
3907 % \item After affixes: ``Jr''. (junior), ``Sr''. (senior), ``d.\,Ä.'' (\DE{der Ältere}), ``d.\,J.'' (\DE{der Jüngere}) etc.: \LPatton.
3908 %
3909 % \item In some contexts, after degrees like ``M.D.'' (\LA{Medicinae Doctor}), J.D. (\LA{Juris Doctor}), Ph.D. (\LA{Philosophiae Doctor}), etc.: \Name[Marcus]{Welby,M.D.}.
3910 % \end{itemize}
3911 %
3912 % The printed names above end with a full stop, and a full stop follows them in the text. The \textsf{nameauth} macros that print names in the text check if the name ends with a full stop. If that is true, and if the lookahead token contains a full stop, they gobble the lookahead token. Below we see how this works in greater detail:
3913 % \begin{Quote}
3914 % \begin{Verbatim}
3915 % \begin{nameauth}
3916 % \< MLK & Martin Luther & King, Jr. & >
3917 % \end{nameauth}
3918 % \end{Verbatim}
3919 % \end{Quote}
3920 % \negbigskip
3921 %
3922 % \ForgetName[Martin Luther]{King, Jr.}
3923 % \BothInfo[5.5ex]{\ShowPattern[Martin Luther]{King, Jr.}}
3924 % {\ShowIdxPageref*[Martin Luther]{King, Jr.}}
3925 % \begin{itemize}[leftmargin=3cm]\small
3926 % \item[Full stop gobbled:] First use of a name; the last name element has a full stop and is followed by one:
3927 % \Name[Martin Luther]{King, Jr.}.\\
3928 % |\Name[Martin Luther]{King, Jr.}.| or |\MLK.|
3929 %
3930 % \item[Full stop gobbled:] Long use of a name; the last name element has a full stop and is followed by one:
3931 % \LMLK.\\
3932 % |\Name*[Martin Luther]{King, Jr.}.| or |\LMLK.|
3933 %
3934 % \item[Full stop gobbled:] Using \meta{alternate} with long Western names will not affect the last element:
3935 % \LMLK[Dr. M.L.].\\
3936 % |\Name*[Martin Luther]{King, Jr.}[Dr. M.L.].|\\
3937 % or |\LMLK[Dr. M.L.].|
3938 %
3939 % \item[Full stop gobbled:] Using \meta{alternate} with short Western names will affect the last element:
3940 % \SMLK[Dr. M.L.].\\
3941 % |\FName[Martin Luther]{King, Jr.}[Dr. M.L.].|\\
3942 % or |\SMLK[Dr. M.L.].|
3943 %
3944 % \item[Full stop remains:] Affix drops in subsequent uses:
3945 % \MLK.\\
3946 % |\Name[Martin Luther]{King, Jr.}.| or |\MLK.|
3947 %
3948 % \item[Full stop remains:] Affix forced to drop in first or long uses:
3949 % \DropAffix\LMLK.\\
3950 % |\DropAffix\Name*[Martin Luther]{King, Jr.}.|\\
3951 % or |\DropAffix\LMLK.|
3952 % \end{itemize}
3953 %
3954 % Curly braces can defeat full stop detection and create a new, unique name (Section~\ref{sec:Unique}), similar to using spaces between a name and a full stop:
3955 % \ExcludeName[Martin Luther]{King, {Jr.}}
3956 % \ExcludeName[Martin Luther]{King, {Jr}.}
3957 %
3958 % \BothInfo[5ex]{\ShowPattern[Martin Luther]{King, Jr.}\break
3959 % \ShowPattern[Martin Luther]{King, {Jr.}}\break
3960 % \ShowPattern[Martin Luther]{King, {Jr}.}}
3961 % {\ShowIdxPageref*[Martin Luther]{King, Jr.}\break
3962 % \ShowIdxPageref*[Martin Luther]{King, {Jr.}}\break
3963 % \ShowIdxPageref*[Martin Luther]{King, {Jr}.}}
3964 % \begin{itemize}[leftmargin=3cm]\small
3965 % \item[Full stop remains:] The whole name is within a group, but the full stop is outside of the group:
3966 % {\Name*[Martin Luther]{King, Jr.}}.\\
3967 % |{\Name*[Martin Luther]{King, Jr.}}.| or |{\LMLK}.|
3968 %
3969 % \item[Full stop gobbled:] Both name and full stop are in the group:
3970 % {\LMLK.}\\
3971 % |{\Name*[Martin Luther]{King, Jr.}.}| or |{\LMLK.}|
3972 %
3973 % \item[Full stop remains:] Grouping tokens in \meta{Affix} create a new name, break full stop detection (full stop in group):
3974 % \Name*[Martin Luther]{King, {Jr.}}.\\
3975 % |\Name*[Martin Luther]{King, {Jr.}}.|
3976 %
3977 % \item[Full stop gobbled:] Grouping tokens in \meta{Affix} create a new name, do not break detection (full stop outside of group):
3978 % \Name*[Martin Luther]{King, {Jr}.}.\\
3979 % |\Name*[Martin Luther]{King, {Jr}.}.|
3980 %
3981 % \item[Full stop remains:] There is intervening space between the name and the full stop:
3982 % \Name*[Martin Luther]{King, Jr.} .\\
3983 % |\Name*[Martin Luther]{King, Jr.} .|
3984 %
3985 % \item[Full stop gobbled:] Shorthands ignore spaces after them:
3986 % \LMLK .\\
3987 % |\LMLK .|
3988 %
3989 % \item[Full stop remains:] Shorthands with optional arguments do not ignore intervening space:
3990 % \LMLK[Dr. M.L.] .\\
3991 % |\LMLK[Dr. M.L.] .|
3992 % \end{itemize}
3993 %
3994 % It is rare to see initials in Eastern names or ancient names. Nevertheless, if one had a Non-Western name form that terminated with a full stop, similar rules would apply. We demonstrate this below, but do not index the names:
3995 % \IndexInactive
3996 % \begin{itemize}[leftmargin=3cm]\small
3997 % \item[Full stop gobbled:] First use of a name; the last name element has a full stop and is followed by one:
3998 % \Name{Full, Stop.}.\\
3999 % |\Name{Full, Stop.}.|
4000 %
4001 % \item[Full stop gobbled:] Long use of a name; the last name element has a full stop and is followed by one:
4002 % \Name*{Full, Stop.}.\\
4003 % |\Name*{Full, Stop.}.|
4004 %
4005 % \item[Full stop gobbled:] Using \meta{alternate} with long Non-Western names will affect the last element:
4006 % \Name*{Full, Non-Stop}[Cessation.].\\
4007 % |\Name*{Full, Non-Stop}[Cessation.].|
4008 % \end{itemize}
4009 % \IndexActive
4010 %
4011 % In the other cases for Non-Western names, the full stop would not be gobbled because it would not terminate the displayed name.
4012 %
4013 % \begin{Quotation}{\MLK[Dr. Martin Luther]}
4014 % {\Title{Stride Towards Freedom} (1958)}
4015 % We believe firmly in the revelation of God in Jesus Christ. I can
4016 % see no conflict between our devotion to Jesus Christ and our present
4017 % action. In fact, I can see a necessary relationship. If one is truly
4018 % devoted to the religion of Jesus he will seek to rid the earth of social
4019 % evils. The gospel is social as well as personal.
4020 % \IndexName{Jesus, Christ}
4021 % \index{civil rights leaders, quotes of\noexpand\string|hyperpage}
4022 % \index{theologians, quotes of\noexpand\string|hyperpage}
4023 % \end{Quotation}
4024 %
4025 % \subsubsection[Macros in Name Args]{Macros in Name Arguments}
4026 %
4027 % As we discuss specialized topics like language-specific needs and advanced formatting, we will encounter macros in name arguments with greater frequency. It would be good to get some general tips on how to handle such macros.
4028 %
4029 % \begin{itemize}
4030 % \item Missing square brackets or curly braces can cause errors like ``\texttt{Paragraph ended}'' and ``\texttt{Missing} \meta{grouping token} \texttt{inserted.}''
4031 %
4032 % \item Alternate formatting (Section~\ref{sec:AltFormat}) helps to avoid potential problems, e.g., when using \cmd{\CapThis}.
4033 %
4034 % \item Use \cmd{\noexpand}\meta{macro} in name macro arguments as a best practice.
4035 %
4036 % \item Macros used in name arguments must be defined either in the preamble or in the outermost document scope to avoid errors.
4037 %
4038 % \item Boolean flags (\texttt{\textbackslash if}\meta{flag}) used in formatting hooks must be defined either in the preamble or in the outermost document scope.
4039 %
4040 % \item The \cmd{\global} modifier does not work with \cmd{\newif} and \cmd{\newcommand}. Yet \cmd{\global} can precede the use of a macro defined with \cmd{\newcommand}. \Title{The \TeX book}, pages 275--277, shows what \cmd{\global} can and cannot do. See more about this issue and \cmd{\newcommand} on \href{https://tex.stackexchange.com/questions/51733/global-renewcommand-equivalent-of-global-def}{\bfseries this page}.
4041 %
4042 % \item Below we show general aspects of scoping to apply them to this package:
4043 %^^A
4044 % \begin{VerbatimOut}{\jobname.tmp}
4045 % \newif\ifCondA
4046 % \newcommand\MacroA{}
4047 % \begingroup
4048 % \newif\ifCondB
4049 % \global\newif\ifCondC
4050 % \global\newcommand\MacroB{}
4051 % \newcommand\MacroC{\def\MacroD{}}
4052 % \global\MacroC
4053 % \global\CondAtrue
4054 % \endgroup
4055 %
4056 % \begin{itemize}[rightmargin=0pt]
4057 % \item \ifdefined\CondAtrue
4058 % \texttt{\textbackslash ifCondA} is defined globally.\else
4059 % \texttt{\textbackslash ifCondA} is not defined.\fi
4060 %
4061 % \item \ifdefined\MacroA
4062 % \cmd{\MacroA} is defined globally.\else
4063 % \cmd{\MacroA} is not defined.\fi
4064 %
4065 % \item \ifdefined\CondBtrue
4066 % \texttt{\textbackslash ifCondB} is defined globally.\else
4067 % \texttt{\textbackslash ifCondB} is defined locally.\fi
4068 %
4069 % \item \ifdefined\CondCtrue
4070 % \texttt{\textbackslash ifCondC} is defined globally. \else
4071 % \texttt{\textbackslash ifCondC} is defined locally. \fi
4072 % No \cmd{\global}\cmd{\newif} allowed.
4073 %
4074 % \item \ifdefined\MacroB \cmd{\MacroB} is defined globally. \else
4075 % \cmd{\MacroB} is defined locally. \fi
4076 % No \cmd{\global}\cmd{\newcommand} allowed.
4077 %
4078 % \item \ifdefined\MacroC \cmd{\MacroC} is defined globally.\else
4079 % \cmd{\MacroC} is defined locally.\fi
4080 %
4081 % \item \ifdefined\MacroD \cmd{\MacroD} is defined globally. \else
4082 % \cmd{\MacroD} is defined locally. \fi
4083 % The \cmd{\global} before \cmd{\MacroB} affects the \cmd{\def} inside \cmd{\MacroC}.
4084 %
4085 % \item \ifCondA \texttt{\textbackslash ifCondA} is true due
4086 % to \cmd{\global}. \else
4087 % \texttt{\textbackslash ifCondA} is false. \fi
4088 % Global assignment works, not global instantiation.
4089 % \end{itemize}
4090 % \end{VerbatimOut}
4091 %^^A
4092 % \begin{Quote}
4093 % \VerbatimInput[gobble=0,lastline=10]{\jobname.tmp}
4094 %
4095 % \input{\jobname.tmp}
4096 % \end{Quote}
4097 % \end{itemize}
4098 %
4099 % \begin{InfoBox}
4100 % Any macro that is used in the argument of a naming macro must be defined in all scopes in which that name is used. The name patterns themselves are global, but macros in name arguments are not guaranteed to be so.
4101 % \end{InfoBox}
4102 %
4103 % \newpage
4104 %
4105 % \subsubsection[Unicode, General]{Active Unicode Characters}
4106 % \label{sec:Unicode}
4107 %
4108 % Both \texttt{xelatex} and \texttt{lualatex} support Unicode natively. Using the \textsf{fontenc} package with the \texttt{T1} option allows \texttt{latex} and \texttt{pdflatex} to use many Unicode characters via active characters that ``secretly'' invoke macros. Use \cmd{\PretagName} to sort names with these characters (Section~\ref{sec:IndexSort}).
4109 %
4110 % Below we group characters that are supported in \texttt{pdflatex} without additional modification by accents and diacritical marks. We align similar letters, so that one gets a better idea of what letters take what accents.
4111 %
4112 % \newcommand\SP[1]{\phantom{#1}}
4113 % \newcommand\Cell[1]{\hbox to 1.1em {\hfil#1\hfil}}
4114 % \begin{center}\large
4115 % \begin{tabular}{ll}\toprule
4116 % \rowcolor{nagrey}^^A
4117 % \bfseries Capitals & \strut\\
4118 %
4119 % acute & \Cell{Á}\Cell{Ć}\Cell{ }\Cell{É}\Cell{Ǵ}\Cell{H}\Cell{Í}^^A
4120 % \Cell{J}\Cell{K}\Cell{Ĺ}\Cell{Ń}\Cell{Ó}\Cell{Ŕ}\Cell{Ś}^^A
4121 % \Cell{ }\Cell{Ú}\Cell{ }\Cell{Ý}\Cell{Ź}\strut\\
4122 %
4123 % \rowcolor{nagrey}^^A
4124 % grave & \Cell{À}\Cell{ }\Cell{ }\Cell{È}\Cell{ }\Cell{ }\Cell{Ì}^^A
4125 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ò}\Cell{ }\Cell{ }^^A
4126 % \Cell{ }\Cell{Ù}\Cell{ }\Cell{ }\Cell{ }\strut\\
4127 %
4128 % circumflex & \Cell{Â}\Cell{Ĉ}\Cell{ }\Cell{Ê}\Cell{Ĝ}\Cell{Ĥ}\Cell{Î}^^A
4129 % \Cell{Ĵ}\Cell{ }\Cell{ }\Cell{ }\Cell{Ô}\Cell{ }\Cell{Ŝ}^^A
4130 % \Cell{ }\Cell{Û}\Cell{Ŵ}\Cell{Ŷ}\Cell{ }\strut\\
4131 %
4132 % \rowcolor{nagrey}^^A
4133 % tilde & \Cell{Ã}\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ĩ}^^A
4134 % \Cell{ }\Cell{ }\Cell{ }\Cell{Ñ}\Cell{Õ}\Cell{ }\Cell{ }^^A
4135 % \Cell{ }\Cell{Ũ}\Cell{ }\Cell{ }\Cell{ }\strut\\
4136 %
4137 % diaeresis\footnotemark
4138 % & \Cell{Ä}\Cell{ }\Cell{ }\Cell{Ë}\Cell{ }\Cell{ }\Cell{Ï}^^A
4139 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ö}\Cell{ }\Cell{ }^^A
4140 % \Cell{ }\Cell{Ü}\Cell{ }\Cell{Ÿ}\Cell{ }\strut\\
4141 %
4142 % \rowcolor{nagrey}^^A
4143 % cedilla & \Cell{ }\Cell{Ç}\Cell{ }\Cell{ }\Cell{Ģ}\Cell{ }\Cell{ }^^A
4144 % \Cell{ }\Cell{Ķ}\Cell{Ļ}\Cell{Ņ}\Cell{ }\Cell{Ŗ}\Cell{Ş}^^A
4145 % \Cell{Ţ}\Cell{ }\Cell{ }\Cell{ }\Cell{ }\strut\\
4146 %
4147 % macron & \Cell{Ā}\Cell{ }\Cell{ }\Cell{Ē}\Cell{Ḡ}\Cell{ }\Cell{Ī}^^A
4148 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ō}\Cell{ }\Cell{ }^^A
4149 % \Cell{ }\Cell{Ū}\Cell{Ǣ}\Cell{Ȳ}\Cell{ }\strut\\
4150 %
4151 % \rowcolor{nagrey}^^A
4152 % breve & \Cell{Ă}\Cell{ }\Cell{ }\Cell{ }\Cell{Ğ}\Cell{ }\Cell{Ĭ}^^A
4153 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ŏ}\Cell{ }\Cell{ }^^A
4154 % \Cell{ }\Cell{Ŭ}\Cell{ }\Cell{ }\Cell{ }\strut\\
4155 %
4156 % dot/dotless & \Cell{Ḃ}\Cell{Ċ}\Cell{ }\Cell{Ė}\Cell{Ġ}\Cell{ }\Cell{İ}^^A
4157 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }^^A
4158 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ż}\strut\\
4159 %
4160 % \rowcolor{nagrey}^^A
4161 % ogonek & \Cell{Ą}\Cell{ }\Cell{ }\Cell{Ę}\Cell{ }\Cell{ }\Cell{Į}^^A
4162 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{Ǫ}\Cell{ }\Cell{ }^^A
4163 % \Cell{ }\Cell{Ų}\Cell{ }\Cell{ }\Cell{ }\strut\\
4164 %
4165 % caron & \Cell{Ǎ}\Cell{Č}\Cell{Ď}\Cell{Ě}\Cell{Ǧ}\Cell{ }\Cell{Ǐ}^^A
4166 % \Cell{ }\Cell{Ǩ}\Cell{Ľ}\Cell{Ň}\Cell{Ǒ}\Cell{Ř}\Cell{Š}^^A
4167 % \Cell{Ť}\Cell{Ǔ}\Cell{ }\Cell{ }\Cell{Ž}\strut\\
4168 %
4169 % \rowcolor{nagrey}^^A
4170 % various & \Cell{Å}\Cell{Æ}\Cell{Ð}(eth)\Cell{Đ}(D stroke)\Cell{IJ}^^A
4171 % \Cell{Ł}\Cell{Ŋ}\Cell{Ø}\Cell{Œ}\Cell{Ő}\Cell{Ů}\Cell{Ű}^^A
4172 % \Cell{Ș}\Cell{Ț}\Cell{Þ}\strut\\\bottomrule
4173 % \end{tabular}
4174 % \footnotetext{A diaeresis mark is one way to indicate a sound change (\textit{Umlaut}). German originally used a superscript \textsf{e} over \textsf{a}, \textsf{o}, and \textsf{u}. The cursive form of \textsf{e} simplified to a diaeresis in the 1800s. A diaeresis also signals pronouncing a diphthong or digraph as two monophthongs, e.g., ``noëtic''.}
4175 % \end{center}
4176 %
4177 % \begin{center}\large
4178 % \begin{tabular}{ll}\toprule
4179 % \rowcolor{nagrey}^^A
4180 % \bfseries Lowercase & \strut\\
4181 %
4182 % acute & \Cell{á}\Cell{ć}\Cell{ }\Cell{é}\Cell{ǵ}\Cell{ }\Cell{í}^^A
4183 % \Cell{ }\Cell{ }\Cell{ĺ}\Cell{ń}\Cell{ó}\Cell{ŕ}\Cell{ś}^^A
4184 % \Cell{ }\Cell{ú}\Cell{ }\Cell{ý}\Cell{ź}\strut\\
4185 %
4186 % \rowcolor{nagrey}^^A
4187 % grave & \Cell{à}\Cell{ }\Cell{ }\Cell{è}\Cell{ }\Cell{ }\Cell{ì}^^A
4188 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ò}\Cell{ }\Cell{ }^^A
4189 % \Cell{ }\Cell{ù}\Cell{ }\Cell{ }\Cell{ }\strut\\
4190 %
4191 % circumflex & \Cell{â}\Cell{ĉ}\Cell{ }\Cell{ê}\Cell{ĝ}\Cell{ĥ}\Cell{î}^^A
4192 % \Cell{ĵ}\Cell{ }\Cell{ }\Cell{ }\Cell{ô}\Cell{ }\Cell{ŝ}^^A
4193 % \Cell{ }\Cell{û}\Cell{ŵ}\Cell{ŷ}\Cell{ } \strut\\
4194 %
4195 % \rowcolor{nagrey}^^A
4196 % tilde & \Cell{ã}\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ĩ}^^A
4197 % \Cell{ }\Cell{ }\Cell{ }\Cell{ñ}\Cell{õ}\Cell{ }\Cell{ }^^A
4198 % \Cell{ }\Cell{ũ}\Cell{ }\Cell{ }\Cell{ }\strut\\
4199 %
4200 % diaeresis & \Cell{ä}\Cell{ }\Cell{ }\Cell{ë}\Cell{ }\Cell{ }\Cell{ï}^^A
4201 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ö}\Cell{ }\Cell{ }^^A
4202 % \Cell{ }\Cell{ü}\Cell{ }\Cell{ÿ}\Cell{ }\strut\\
4203 %
4204 % \rowcolor{nagrey}^^A
4205 % cedilla & \Cell{ }\Cell{ç}\Cell{ }\Cell{ }\Cell{ģ}\Cell{ }\Cell{ }^^A
4206 % \Cell{ }\Cell{ķ}\Cell{ļ}\Cell{ņ}\Cell{ }\Cell{ŗ}\Cell{ş}^^A
4207 % \Cell{ţ}\Cell{ }\Cell{ }\Cell{ }\Cell{ }\strut\\
4208 %
4209 % macron & \Cell{ā}\Cell{ }\Cell{ }\Cell{ē}\Cell{ḡ}\Cell{ }\Cell{ī}^^A
4210 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ō}\Cell{ }\Cell{ }^^A
4211 % \Cell{ }\Cell{ū}\Cell{ǣ}\Cell{ȳ}\Cell{ }\strut\\
4212 %
4213 % \rowcolor{nagrey}^^A
4214 % breve & \Cell{ă}\Cell{ }\Cell{ }\Cell{ }\Cell{ğ}\Cell{h}\Cell{ĭ}^^A
4215 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ŏ}\Cell{ }\Cell{ }^^A
4216 % \Cell{ }\Cell{ŭ}\Cell{ }\Cell{ }\Cell{ }\strut\\
4217 %
4218 % dot/dotless & \Cell{ḃ}\Cell{ċ}\Cell{ }\Cell{ė}\Cell{ġ}\Cell{ }\Cell{ı}^^A
4219 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ }^^A
4220 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ż}\strut\\
4221 %
4222 % \rowcolor{nagrey}^^A
4223 % ogonek & \Cell{ą}\Cell{ }\Cell{ }\Cell{ę}\Cell{ }\Cell{ }\Cell{į}^^A
4224 % \Cell{ }\Cell{ }\Cell{ }\Cell{ }\Cell{ǫ}\Cell{ }\Cell{ }^^A
4225 % \Cell{ }\Cell{ų}\Cell{ }\Cell{ }\Cell{ }\strut\\
4226 %
4227 % caron & \Cell{ǎ}\Cell{č}\Cell{ď}\Cell{ě}\Cell{ǧ}\Cell{ }\Cell{ǐ}^^A
4228 % \Cell{ǰ}\Cell{ǩ}\Cell{ľ}\Cell{ň}\Cell{ǒ}\Cell{ř}\Cell{š}^^A
4229 % \Cell{ť}\Cell{ǔ}\Cell{ }\Cell{ }\Cell{ž}\strut\\
4230 %
4231 % \rowcolor{nagrey}^^A
4232 % various & \Cell{å}\Cell{æ}\Cell{ð}\Cell{đ}\Cell{ij}\Cell{ł}\Cell{ŋ}^^A
4233 % \Cell{ø}\Cell{œ}\Cell{ő}\Cell{ů}\Cell{ű}\Cell{ș}\Cell{ß}^^A
4234 % \Cell{ț}\Cell{þ}\hspace{5.5em}\strut\\\bottomrule
4235 % \end{tabular}
4236 % \end{center}
4237 %
4238 % More Unicode characters can be made available when using fonts with TS1 glyphs (pages 455--463 in \Title{The Latex Companion}). Compare \href{https://tug.ctan.org/info/symbols/comprehensive/}{\bfseries this page} or type either \texttt{texdoc comprehensive}, \texttt{texdoc symbols-A4}, or \texttt{texdoc symbols-letter} for more information.
4239 %
4240 % When using a font with TS1 glyphs, the following preamble snippet is an example of how one might add more Unicode characters, such as a long s (\LA{s-medialis}):
4241 % \begin{Quote}
4242 % \begin{Verbatim}
4243 % \usepackage[utf8]{inputenc} % For older TL releases
4244 % \usepackage[TS1,T1]{fontenc}
4245 % \usepackage{lmodern}% Contains TS1 glyph 115
4246 % \usepackage{newunicodechar}
4247 % \DeclareTextSymbolDefault{\textlongs}{TS1}
4248 % \DeclareTextSymbol{\textlongs}{TS1}{115}
4249 % \newunicodechar{ſ}{\textlongs}
4250 %
4251 % In Congreſs, July 4, 1776
4252 % \end{Verbatim}
4253 %
4254 % In Congreſs, July 4, 1776
4255 % \end{Quote}
4256 %
4257 % \subsubsection[Unicode, Fragility]{Fragility of Active Unicode}
4258 %
4259 % This topic can affect different issues:
4260 % \begin{enumerate}
4261 % \item \cmd{\CapThis} does not cause errors because we check for an active Unicode character at the beginning of a name element. Macros in name arguments may need alternate formatting. See also Sections~\ref{sec:CapParticles} and~\ref{sec:AltCaps}.
4262 %
4263 % \item In older \TeX\ distributions, names with active Unicode characters could expand differently in the index if the indexing macros were written first to the \texttt{aux} file. This wasmitigated since 2018.
4264 %
4265 % \item If some of the macros represented by active characters get redefined, then both the names and their patterns that contain such characters may change unexpectedly, affecting both text and index.
4266 % \end{enumerate}
4267 %
4268 % \TeX\ macros that partition their arguments can break active Unicode characters quite easily, as we show here with this delimited macro:
4269 % \begin{Quote}
4270 % \begin{Verbatim}[numbers=none]
4271 % \def\Breaker#1#2#3!{<#1#2><#3>}
4272 % \def\Atsign{@}
4273 % \def\AtAt{\Atsign\Atsign}
4274 % \end{Verbatim}
4275 % \end{Quote}
4276 % The macro \cmd{\Breaker} will take an arbitrary stream of tokens as an argument until it terminates with a bang, which is a delimiter. It puts the first token in |#1|. The second goes in |#2|, while the third gets everything up to the bang.
4277 % \begin{Center}
4278 % \def\Breaker#1#2#3!{<#1#2><#3>}
4279 % \def\Atsign{@}
4280 % \def\AtAt{\Atsign\Atsign}
4281 % \begin{tabular}{llll}\toprule
4282 % \rowcolor{nagrey}^^A
4283 % \bfseries Argument & \bfseries Macro & \bfseries Engine & \bfseries Result\\
4284 %
4285 % |abcde| & |\Breaker abcde!| & (any) & \Breaker abcde!\\
4286 % |{æ}bcde| & |\Breaker {æ}bcde!| & (any) & \Breaker {æ}bcde!\\
4287 % |\ae bcde| & |\Breaker \ae bcde!| & (any) & \Breaker \ae bcde!\\
4288 % |a\AtAt bcde| & |\Breaker a\AtAt bcde!| & (any) & \Breaker a\AtAt bcde!\\
4289 %
4290 % \rowcolor{nagrey}^^A
4291 % |æbcde| & |\Breaker æbcde!| & \texttt{xelatex} & <æb><cde>\\
4292 % \rowcolor{nagrey}^^A
4293 % |æbcde| & |\Breaker æbcde!| & \texttt{lualatex} & <æb><cde>\\
4294 % |æbcde| & |\Breaker æbcde!| & \texttt{pdflatex} & \Breaker æbcde!\\
4295 % |æbcde| & |\Breaker æbcde!| & \texttt{latex} & \Breaker æbcde!\\
4296 % \bottomrule
4297 % \end{tabular}
4298 % \end{Center}
4299 %
4300 % Here is why the first two glyphs, or the first macro and glyph, are grouped together in |#1#2| below, and how this affects \textsf{nameauth}:
4301 % \begin{itemize}
4302 % \item The letter \texttt{a} is one argument, and \texttt{b} is the second.
4303 % \item Since \texttt{\{æ\}} is in a group, it is one argument, and \texttt{b} is the second.
4304 % \item The macro \cmd{\ae} also is one argument that prints æ, and \texttt{b} is the second.
4305 % \item The letter \texttt{a} is one argument, and \cmd{\AtAt} is one argument that prints @@. But if it were evaluated or written to a file at some point during its expansion, for the purposes of name arguments in \textsf{nameauth}, something unexpected could occur.
4306 % \item Both \texttt{xelatex} and \texttt{lualatex} treat the Unicode letter \texttt{æ} as one argument, with \texttt{b} as the second.
4307 % \item In \texttt{latex} and \texttt{pdflatex}, however, \texttt{æ} is an active Unicode control sequence that uses two arguments all by itself. It fills up |#1#2|. The rest of the input is in |#3|.
4308 % \item Any active Unicode character where this |#1#2| pair is divided into |#1| and |#2| will produce one of two errors: \texttt{Unicode char \dots not set up for LaTeX} or \texttt{Argument of \textbackslash UTFviii@two@octets has an extra \}}.
4309 % \end{itemize}
4310 %
4311 % Starting on page \pageref{page:Caps} we show how to test if \cmd{\Umathchar} is not defined. If so, we check if the leading token of the argument matches the start of an active Unicode control sequence. If \cmd{\@car}\meta{test}\cmd{\@nil} is equal to \cmd{\@car ß} \cmd{\@nil} we capitalize |#1#2|, otherwise just |#1|. Should |#1| be a protected macro or something that does not expand to a sequence of letters, use \cmd{\AltCaps} (Section~\ref{sec:AltFeatures}).
4312 %
4313 % \ReturnLink
4314 %
4315 % \begin{Quotation}{\Linc}
4316 % {\Title{Gettysburg Address} (19 November 1863)}
4317 % Four score and seven years ago our fathers brought forth on this
4318 % continent, a new nation, conceived in Liberty, and dedicated to the
4319 % proposition that all men are created equal.
4320 %
4321 % Now we are engaged in a great civil war, testing whether that nation,
4322 % or any nation so conceived and so dedicated, can long endure. We are met
4323 % on a great battle-field of that war. We have come to dedicate a portion
4324 % of that field, as a final resting place for those who here gave their
4325 % lives that that nation might live. It is altogether fitting and proper
4326 % that we should do this.
4327 %
4328 % But, in a larger sense, we can not dedicate\,---\,we can not
4329 % consecrate\,---\,we can not hallow\,---\,this ground. The brave men,
4330 % living and dead, who struggled here, have consecrated it, far above our
4331 % poor power to add or detract. The world will little note, nor long
4332 % remember what we say here, but it can never forget what they did here.
4333 % It is for us the living, rather, to be dedicated here to the unfinished
4334 % work which they who fought here have thus far so nobly advanced. It is
4335 % rather for us to be here dedicated to the great task remaining before
4336 % us\,---\,that from these honored dead we take increased devotion to that
4337 % cause for which they gave the last full measure of devotion\,---\,that
4338 % we here highly resolve that these dead shall not have died in
4339 % vain\,---\,that this nation, under God, shall have a new birth of
4340 % freedom\,---\,and that government of the people, by the people, for the
4341 % people, shall not perish from the earth.
4342 % \index{politicians, quotes of\noexpand\string|hyperpage}
4343 % \end{Quotation}
4344 %
4345 % \newpage
4346 %
4347 % \section{Language Topics}
4348 % \label{sec:Lang}
4349 %
4350 % Here we cover technical issues related to the use of names in various languages and cultures. We draw on material from Sections~\ref{sec:DataTagHooks} and~\ref{sec:Formatting}. We also make use of the debugging macros in the next section. Although we show how non-English names are represented in English, this material can apply to other language standards.
4351 %
4352 % \subsection[Active Characters]{Caveats with Active Characters}
4353 %
4354 % When using active characters, specific characters have been given the category code of a macro or control sequence in order to represent them in the classical regime of \textsf{latex} and \textsf{pdflatex}. Active characters and macros generate different names, even though the output on the page looks the same.
4355 %
4356 % Active characters affect name patterns and index sorting, depending on the \LaTeX\ engine being used. One finds more technical details on the matter in Section~\ref{sec:Unicode}. We use \cmd{\PretagName} (Section~\ref{sec:IndexSort}) to get correct sorting and \cmd{\SkipIndex} (Section~\ref{sec:IdxPrefix}) to suppress bogus index entries:
4357 % \begin{enumerate}\small
4358 % \item \Name*{Æthelred, II}\dotfill |\Name*{Æthelred, II}|
4359 % \PatInfo*{\ShowPattern{Æthelred, II} \textrm{(1)}\break
4360 % \ShowPattern{\AE thelred, II} \textrm{(2)}\break
4361 % \ShowPattern{Bo\"ethius} \textrm{(3)}\break
4362 % \ShowPattern{Boëthius} \textrm{(4)}\break
4363 % \ShowPattern{Bo{\"e}thius} \textrm{(5)}}
4364 %
4365 % \item[] We have seen this name earlier, as the formatting shows.\footnote{Regarding the margin note that shows name patterns, with \texttt{pdflatex} and \texttt{latex}, in \texttt{\ShowPattern{Æthelred, II}} the glyphs \texttt{ÃĘ} correspond to \cmd{\IeC\{}\cmd{\AE\}}. Likewise in \texttt{\ShowPattern{Boëthius}} the glyphs \texttt{Ãń} correspond to \cmd{\IeC\{}\cmd{\"e\}}. The active Unicode character is being detokenized and its control sequence is interpreted as two glyphs. This is a result of using \textsf{inputenc} and \textsf{fontenc}.}
4366 %
4367 % \item[] We sort this with |\PretagName{Æthelred, II}{Aethelred, 2}|
4368 %
4369 % \item \SkipIndex\Name{\AE thelred, II}\dotfill |\SkipIndex\Name{\AE thelred, II}|
4370 %
4371 % \item[] This name is new, as the formatting shows us. It looks like the name above, but its control pattern differs by the macro \cmd{\AE}.
4372 %
4373 % \item[] We get a different index entry, regardless of how we sort it.
4374 %
4375 % \item \Name{Bo\"ethius}\dotfill |\Name{Bo\"ethius}|
4376 %
4377 % \item[] This new name uses |\"e| to display a lowercase e with a diaeresis.
4378 %
4379 % \item[] We sort it with |\PretagName{Bo\"ethius}{Boethius}|.
4380 %
4381 % \item \SkipIndex\Name{Boëthius}\dotfill |\SkipIndex\Name{Boëthius}|
4382 %
4383 % \item[] This name differs by the character ë. It cannot have the same index entry as \Name{Bo\"ethius} above.
4384 %
4385 % \item \SkipIndex\Name{Bo{\"e}thius}\dotfill |\SkipIndex\Name{Bo{\"e}thius}|
4386 %
4387 % \item[] Yet another different name by virtue of grouping tokens (Section~\ref{sec:Unique}). The index entry for this one is again different.
4388 % \end{enumerate}
4389 %
4390 % \begin{Quotation}{\Name{Bo\"ethius}\IndexRef[Anic. Manl.]{Severinus Boethius}{Bo\"ethius} (\Name[Anic. Manl.]{Severinus Boethius})}
4391 % {\Title{On the Consolation of Philosophy} IV.III (523 \textsc{ad})}
4392 % For since good and bad, and likewise reward and punishment, are contraries, it necessarily follows that, corresponding to all that we see accrue as reward of the good, there is some penalty attached as punishment of evil. As, then, righteousness itself is the reward of the righteous, so wickedness itself is the punishment of the unrighteous.
4393 % \index{theologians, quotes of\noexpand\string|hyperpage}
4394 % \index{philosophers, quotes of\noexpand\string|hyperpage}
4395 % \end{Quotation}
4396 % \newpage
4397 %
4398 % \subsection{Hyphenation}
4399 % \label{sec:HyphNames}
4400 %
4401 % Unlike English standards up to the middle twentieth century, modern English conventions encourage that names of non-English origin can and should be hyphenated to reflect their cultural origins. For example, even with place names, modern English prefers German \emph{Mainz} over the older English form \emph{Mayence}. With \textsf{nameauth}, one can accommodate names from different cultures by using optional hyphens or packages like \textsf{babel} and \textsf{polyglossia}.
4402 %
4403 % \subsubsection*{\hfil Default Hyphenation}
4404 %
4405 % \PatInfo*{\ShowPattern[John]{Strietelmeier}}^^A
4406 % Here we show potential issues that can arise when dealing with default English hyphenation. We get the name of a deceased, yet long-time, influential professor at Valparaiso University whose last name is of German origin, to hyphenate poorly.\footnote{Not shown in these examples, we use \cmd{\textls} from \textsf{microtype} to ensure bad breaks. We omit all forms of this name from the index except for \cmd{\Name[John]\{}\cmd{\noexpand}\cmd{\de\{Strietelmeier\}\}} because we use \textsf{babel}-related macros.}
4407 % \begin{Quote}
4408 % \begin{Verbatim}
4409 % In English, some names come from other cultures. Names like
4410 % \Name[John]{Strietelmeier} can break badly in some cases.
4411 % \end{Verbatim}
4412 %
4413 % \IndexName[John]{\noexpand\de{Strietelmeier}}
4414 % \textls[20]{In English, some names come from other cultures.
4415 % Names like \SkipIndex\Name[John]{Strietelmeier} can break badly
4416 % in some cases.}
4417 % \end{Quote}
4418 %
4419 % \subsubsection*{\hfil Discretionary Hyphens}
4420 %
4421 % \PatInfo*{\ShowPattern[John]{Strie\-tel\-meier}}^^A
4422 % We now use a different name from the name above. Even though it may look the same in the text, using discretionary hyphens will cause it to have a different index entry. As a result, one must use discretionary hyphens consistently in the macro arguments to avoid creating different names and index entries. Nevertheless, this name breaks properly.\footnote{Here again, we omit \cmd{\Name[John]\{Strie\textbackslash-tel\textbackslash-meier\}} from the index.}
4423 % \begin{Quote}
4424 % \begin{Verbatim}
4425 % In English, some names come from other cultures. Names like
4426 % \Name[John]{Strie\-tel\-meier} can break badly in some cases.
4427 % \end{Verbatim}
4428 %
4429 % \IndexName[John]{\noexpand\de{Strietelmeier}}
4430 % \textls[20]{In English, some names come from other cultures.
4431 % Names like \SkipIndex\Name[John]{Strie\-tel\-meier}
4432 % can break badly in some cases.}
4433 % \end{Quote}
4434 %
4435 % \subsubsection*{\hfil Language Packages}
4436 %
4437 % \Info*{Name patterns and index entries are too big for the margin.}^^A
4438 % Here we use macros in name arguments that can work with either \textsf{babel} or \textsf{polyglossia}.\footnote{For best results, one should consult the documentation for \textsf{babel} and \textsf{polyglossia}.}
4439 % This approach has some caveats when using the macro \cmd{\CapThis}. Since the leading element of \meta{SNN} is a macro, using \cmd{\CapThis} would halt \LaTeX\ with errors unless we used alternate formatting (Section~\ref{sec:AltFormat}). Related issues appear in Sections~\ref{sec:NameParticles} and \ref{sec:Noexpand}, showing ways to mitigate possible errors.
4440 %
4441 % \NameArgWarning
4442 %
4443 % \newpage
4444 %
4445 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test05_01.tex}\else
4446 % \edef\NameauthTestFile{\jobname.tmp}\fi
4447 %^^A
4448 % \begin{VerbatimOut}{\NameauthTestFile}
4449 % \documentclass{article}
4450 %
4451 % \newcommand\nolangs{} % Do not load the language packages via compat.tex
4452 % \input{compat.tex} % Included with nameauth for compatibility.
4453 %
4454 % \ifloadbabel % Defined in compat.tex
4455 % % For any LaTeX format; compat.tex makes \loadbabel true
4456 % % only for use with dvilualatex, pdflatex, and latex.
4457 %
4458 % \usepackage[main=american,ngerman]{babel}
4459 % \usepackage[babel=true]{microtype} % if desired
4460 %
4461 % % Convenience macros, classical babel approach
4462 % \newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}
4463 %
4464 % \else
4465 % % For XeLaTeX and LuaLaTeX; compat.tex makes \loadbabel
4466 % % false by default, which is the historic behavior.
4467 % % Currently, one also can use babel with these engines.
4468 % \usepackage{polyglossia}
4469 % \setdefaultlanguage[variant=american]{english}
4470 % \setotherlanguage[variant=german, spelling=new]{german}
4471 % \usepackage{microtype} % if desired
4472 %
4473 % % Convenience macros, not using babel-equivalent macros
4474 % \newcommand{\de}[1]{\textgerman{#1}}
4475 % \fi
4476 %
4477 % % Other setup
4478 % \usepackage{nameauth}
4479 %
4480 % \begin{nameauth}
4481 % \< Striet & John & \noexpand\de{Strietelmeier} & >
4482 % \end{nameauth}
4483 %
4484 % \PretagName[John]{\noexpand\de{Strietelmeier}}
4485 % {Strietelmeier, John}
4486 %
4487 % \begin{document}
4488 %
4489 % In English, some names come from other cultures. Names like
4490 % \Striet\ or \Name[John]{\noexpand\de{Strietelmeier}} can
4491 % break badly in some cases.
4492 %
4493 % \end{document}
4494 % \end{VerbatimOut}
4495 %^^A
4496 % \begin{Quote}
4497 % \VerbatimInput[gobble=0]{\NameauthTestFile}
4498 % \end{Quote}
4499 %
4500 % The name pattern is:
4501 % \texttt{\ShowPattern[John]{\noexpand\de{Strietelmeier}}}.
4502 % The example above gives us the following:
4503 % \begin{Quote}
4504 % \textls[20]{In English, some names come from other cultures. Names like
4505 % \Striet\ or \Name[John]{\noexpand\de{Strietelmeier}} can
4506 % break badly in some cases.}
4507 % \end{Quote}
4508 %
4509 % \newpage
4510 %
4511 % \subsection{Eastern Names}
4512 % \label{sec:Eastern}
4513 %
4514 % Proper Eastern names are encoded using comma-delimited syntax. They have Non-Western index entries: \meta{SNN} \meta{Affix} (no comma between name elements). The current syntax permits alternate names; the obsolete syntax does not (Section~\ref{sec:Obsolete}).
4515 %
4516 % \begin{SyntaxBox}
4517 % \cmd{\Name}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
4518 % \end{SyntaxBox}
4519 %
4520 % \BothInfo*{\ShowPattern{Sun, Yat-sen}}
4521 % {\ShowIdxPageref*{Sun, Yat-sen}}
4522 % Even in some academic texts, one sees Non-Western names encoded with Western forms.\footnote{\textls[-5]{Jaroslav Pelikan, \Title{The Christian Tradition}, 5 vols. (Chicago: Chicago UP, 1971--1989); Immanuel Geiss, \Title{\de{Personen: Die biographische Dimension der Weltgeschichte}}, \de{Geschichte Griffbereit} vol. 2 (Munich: Wissen Media Verlag, 2002).} As of writing, \href{https://www.nndb.com/}{\bfseries NNDB} sorts \Name{Kim, Jong Un} under U, not K. That prioritizes accesibility over accuracy. This is not the publisher's fault; it is a market reality.}
4523 % The \textsf{nameauth} package seeks to remedy that issue, which has more to do with outsourcing indexes to non-expert providers than with scholars. For example, the macro |\Name*{Sun, Yat-sen}| ensures correct forms of the name \Name*{Sun, Yat-sen} in the text and the index. We get both cross-cultural sensitivity and scholarly accuracy.
4524 %
4525 % \subsection{Names in All Caps}
4526 % \label{sec:AllCaps}
4527 %
4528 % \DescribeMacro{\AllCapsActive}
4529 % Some contexts capitalize one's entire family name. This differs from the way in which initial letter capitalization is handled (Section~\ref{sec:NameParticles}).
4530 % \DescribeMacro{\AllCapsInactive}
4531 % In addition to the \texttt{allcaps} package option (Section~\ref{sec:PkgOptions}),
4532 % \DescribeMacro{\CapName}
4533 % \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} work for blocks of text. All have priority over \cmd{\CapName}, which works once per name. These capitalize \meta{SNN} in the body text only. They also work with \cmd{\AKA} and friends. For capitalization using macros in both the text and index, see Sections~\ref{sec:AltFormat} and~\ref{sec:AdvCustomize}.
4534 %
4535 % \Global Both \cmd{\AllCapsActive} and \cmd{\AllCapsInactive} can be used either as a pair or singly within an explicitly local scope. Use \cmd{\global} to force a global effect.
4536 % \begin{Center}
4537 % \BothInfo[2.5ex]{\ShowPattern[Hideyo]{Noguchi}\break
4538 % \ShowPattern{Miyazaki, Hayao}}
4539 % {\ShowIdxPageref*[Hideyo]{Noguchi}\break
4540 % \ShowIdxPageref*{Miyazaki, Hayao}}
4541 % \begin{tabular}{ll}\toprule
4542 % \rowcolor{nagrey}^^A
4543 % \bfseries Text & \bfseries Macro\\
4544 % \LNoguchi & |\LNoguchi| \\
4545 %
4546 % \rowcolor{nagrey}^^A
4547 % \CapName\LNoguchi & |\CapName\LNoguchi|\\
4548 %
4549 % \LMiyazaki & |\LMiyazaki| \\
4550 %
4551 % \rowcolor{nagrey}^^A
4552 % \CapName\LMiyazaki & |\CapName\LMiyazaki|\\\bottomrule
4553 % \end{tabular}
4554 % \end{Center}
4555 %
4556 % \subsection{Reversed Names}
4557 % \label{sec:RevNames}
4558 %
4559 % Sometimes a publisher expects Western-style index entries. Sometimes certain names need to have specific forms in the index, The reversing macros can adapt forms in the text to required Western index entries.
4560 %
4561 % \DescribeMacro{\ReverseActive}
4562 % In addition to the \texttt{allreversed} option for reversing name order (Section~\ref{sec:PkgOptions}), \cmd{\ReverseActive} and \cmd{\ReverseInactive} do the same for blocks of text.
4563 % \DescribeMacro{\ReverseInactive}
4564 % These all have priority over the use of \cmd{\RevName}, used once per name.
4565 % \DescribeMacro{\RevName}
4566 % These macros do not affect the index. They work also with \cmd{\AKA} and friends. \emph{Reversing only affects long name forms,} which is why we show only long names below.
4567 %
4568 % \Global Both \cmd{\ReverseActive} and \cmd{\ReverseInactive} can be used either as a pair or singly within an explicitly local scope. Use \cmd{\global} to force a global effect.
4569 %
4570 % Unwanted results that may arise from reversing names depend more on the context than on the syntactic forms of the names themselves. This is the crux of how \textsf{nameauth} deals with ambiguity across cultures.
4571 %
4572 % \begin{SyntaxBox}[Reversing Western Names]
4573 % \cmd{\RevName}\cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate}
4574 % \end{SyntaxBox}
4575 %
4576 % Avoid using \meta{Affix} with such names. For example, |\RevName\LPatton\dag| produces ``\RevName\LPatton\dag''. The name looks wrong unless one uses either \cmd{\RevComma} or \cmd{\DropAffix}. This name has a Western index entry.
4577 % \BothInfo[-7.5ex]{\ShowPattern{}}{\ShowIdxPageref*{}}
4578 %
4579 % \BothInfo[5ex]{\ShowPattern[Hideyo]{Noguchi}}
4580 % {\ShowIdxPageref*[Hideyo]{Noguchi}}
4581 % \begin{Center}
4582 % \begin{tabular}{ll}\toprule
4583 % \rowcolor{nagrey}^^A
4584 % \bfseries Text & \bfseries Macro / Arguments\\
4585 %
4586 % \LNoguchi & |\LNoguchi| \\
4587 % \LNoguchi[Doctor] & |\LNoguchi[Doctor]| \\
4588 %
4589 % \rowcolor{nagrey}^^A
4590 % \strut Unwanted result: \LNoguchi[Sensei] &
4591 % |\LNoguchi[Sensei]| \\
4592 %
4593 % \RevName\LNoguchi\dag & |\RevName\LNoguchi\dag| \\
4594 %
4595 % \RevName\LNoguchi[Sensei]\dag & |\RevName\LNoguchi[Sensei]| \\
4596 %
4597 % \rowcolor{nagrey}^^A
4598 % \strut Unwanted result: \RevName\LNoguchi[Doctor] & |\RevName\LNoguchi[Doctor]| \\\bottomrule
4599 % \end{tabular}
4600 % \end{Center}
4601 % \smallskip
4602 %
4603 % \begin{SyntaxBox}[Reversing Eastern Names]
4604 % \cmd{\RevName}\cmd{\Name}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
4605 % \end{SyntaxBox}
4606 %
4607 % The index entry of this name form looks like \meta{SNN} \meta{FNN} (no comma). This name has a Non-Western index entry. \emph{Reversing ancient names functions the same way, but often produces nonsensical name forms.}
4608 %
4609 % \BothInfo[5ex]{\ShowPattern{Miyazaki, Hayao}}
4610 % {\ShowIdxPageref*{Miyazaki, Hayao}}
4611 % \begin{Center}
4612 % \begin{tabular}{ll}\toprule
4613 % \rowcolor{nagrey}^^A
4614 % \bfseries Text & \bfseries Macro / Arguments\\
4615 %
4616 % \LMiyazaki & |\LMiyazaki| \\
4617 % \LMiyazaki[Sensei] & |\LMiyazaki[Sensei]| \\
4618 %
4619 % \rowcolor{nagrey}^^A
4620 % \strut Unwanted result: \LMiyazaki[Mr.] & |\LMiyazaki[Mr.]| \\
4621 %
4622 % \RevName\LMiyazaki & |\RevName\LMiyazaki| \\
4623 % \RevName\LMiyazaki[Mr.] & |\RevName\LMiyazaki[Mr.]| \\
4624 %
4625 % \rowcolor{nagrey}^^A
4626 % \strut Unwanted result: \RevName\LMiyazaki[Sensei] &
4627 % |\RevName\LMiyazaki[Sensei]| \\\bottomrule
4628 % \end{tabular}
4629 % \end{Center}
4630 %
4631 % \subsection[Listing by Surname]{Listing Western names by Surname}
4632 % \label{sec:LastFirst}
4633 %
4634 % \DescribeMacro{\ReverseCommaActive}
4635 % To make lists of ``last comma first'' names, in addition to the \texttt{allrevcomma} option (Section~\ref{sec:PkgOptions}),
4636 % \DescribeMacro{\ReverseCommaInactive}
4637 % the macros \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} function the same way with blocks of text.\DescribeMacro{\RevComma} They both have priority over \cmd{\RevComma}. These all affect only long Western name forms. The first two are broad toggles, while the third is used once per name.
4638 %
4639 % \Global Both \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} can be used either as a pair or singly within a local scope. Use \cmd{\global} to force a global effect.
4640 %
4641 % \newpage
4642 %
4643 % \begin{itemize}
4644 % \item Western names change to reversed comma form:
4645 % \PatInfo*{\ShowPattern[Oskar]{Hammerstein, II}\break
4646 % \ShowPattern[Hideyo]{Noguchi}\break
4647 % \ShowPattern{Æthelred,II}\break
4648 % \ShowPattern{Sun, Yat-sen}}
4649 %
4650 % \begin{tabular}{p{3.7cm}l}
4651 % \Name*[Oskar]{Hammerstein, II} &
4652 % \RevComma\Name*[Oskar]{Hammerstein, II} \\
4653 % \LNoguchi & \RevComma\LNoguchi \\
4654 % \end{tabular}
4655 %
4656 % \item Non-Western names do not change:
4657 %
4658 % \begin{tabular}{p{3.7cm}l}
4659 % \LAeth & \RevComma\LAeth \\
4660 % \Name*{Sun, Yat-sen} & \RevComma\Name*{Sun, Yat-sen}\\
4661 % \end{tabular}
4662 % \end{itemize}
4663 %
4664 % \subsection{Particles in Names}
4665 % \label{sec:NameParticles}
4666 %
4667 % Particles usually are articles and prepositions grouped either with forenames or surnames. They can refer to places, noble houses, and so on.
4668 %
4669 % In modern usage, particles have crossed into other languages and cultures. The same particles may be handled differently, depending on their source language. Users should consult style guides. See also Section~\ref{sec:RealAltEx}.
4670 %
4671 % \begin{InfoBox}
4672 % One must sort names with particles in \meta{SNN} using \cmd{\PretagName} (Section~\ref{sec:IndexSort}), often by removing spaces in the sort key.
4673 % \end{InfoBox}
4674 %
4675 % \subsubsection{Standard Rules}
4676 %
4677 % Here we show how [\hyperlink{Mulvany}{Mulvany}, 152--82] handles name particles, thus pertaining to naming macro arguments. This list is not exhaustive.
4678 % \begin{itemize}
4679 % \item \emph{Afrikaans and English variants:} Particles go in \meta{SNN}. These can include \textit{de}, \textit{de la}, \textit{d'}, \textit{von}, \textit{van}, and \textit{ten}. Capitalization of particles may vary, but \textit{Du} usually is capitalized, yet one sees, e.g., ``\AKA[Charles]{du~Fresne}{du~Cange}'', ``\CapThis\AKA[Charles]{du~Fresne}{du~Cange}'', and even ``\textsf{Ducange}''. \textit{Le}, \textit{La}, and \textit{L'} are capitalized unless preceded by \textit{de}.
4680 %
4681 % \BothInfo[4.5ex]{\ShowPattern[S.J.]{Du Toit}\break
4682 % \ShowPattern[Martin]{Van Buren}\break
4683 % \ShowPattern[Pierre]{L'Enfant}\break
4684 % \ShowPattern[Walter]{de la Mare}\break
4685 % \ShowPattern[Hernando]{de~Soto}}
4686 % {\ShowIdxPageref*[S.J.]{Du Toit}\break
4687 % \ShowIdxPageref*[Martin]{Van Buren}\break
4688 % \ShowIdxPageref*[Pierre]{L'Enfant}\break
4689 % \ShowIdxPageref*[Walter]{de la Mare}\break
4690 % \ShowIdxPageref*[Hernando]{de~Soto}}
4691 % \begin{Block}
4692 % \Name[S.J.]{Du Toit}[Stephanus Johannes]\\
4693 % |\Name[S.J.]{Du Toit}[Stephanus Johannes]|\\
4694 % \Name[S.J.]{Du Toit}\dotfill^^A
4695 % |\Name[S.J.]{Du Toit}|\\[1ex]
4696 % \ForgetThis\Name[Martin]{Van Buren}\dotfill^^A
4697 % |\Name[Martin]{Van Buren}|\\
4698 % \Name[Martin]{Van Buren}\dotfill^^A
4699 % |\Name[Martin]{Van Buren}|\\[1ex]
4700 % \Name[Pierre]{L'Enfant}\dotfill^^A
4701 % |\Name[Pierre]{L'Enfant}|\\
4702 % \Name[Pierre]{L'Enfant}\dotfill^^A
4703 % |\Name[Pierre]{L'Enfant}|\\[1ex]
4704 % \Name[Walter]{de la Mare}\dotfill^^A
4705 % |\Name[Walter]{de la Mare}|\\
4706 % \Name[Walter]{de la Mare}\dotfill^^A
4707 % |\Name[Walter]{de la Mare}|\\
4708 % \CapThis\Name[Walter]{de la Mare}\dotfill^^A
4709 % |\CapThis\Name[Walter]{de la Mare}|\\[1ex]
4710 % \ForgetThis\Name[Hernando]{de~Soto}\dotfill^^A
4711 % |\Name[Hernando]{de~Soto}|\\
4712 % \Name[Hernando]{de~Soto}\dotfill^^A
4713 % |\Name[Hernando]{de~Soto}|\\
4714 % \CapThis\Name[Hernando]{de~Soto}\dotfill^^A
4715 % |\CapThis\Name[Hernando]{de~Soto}|
4716 % \end{Block}
4717 %
4718 % \item \emph{Dutch:} Particles go in \meta{FNN}, except for \textit{ver}, which goes in \meta{SNN}.
4719 % \BothInfo*{\ShowPattern[Bernhard ten]{Brink}\break
4720 % \ShowPattern[Daisy]{Ver Boven}}
4721 % {\ShowIdxPageref*[Bernhard ten]{Brink}\break
4722 % \ShowIdxPageref*[Daisy]{Ver Boven}}
4723 % \begin{Block}
4724 % \Name[Bernhard ten]{Brink}\dotfill^^A
4725 % |\Name[Bernhard ten]{Brink}|\\
4726 % \Name[Bernhard ten]{Brink}\dotfill^^A
4727 % |\Name[Bernhard ten]{Brink}|\\[1ex]
4728 % \Name[Daisy]{Ver Boven}\dotfill^^A
4729 % |\Name[Daisy]{Ver Boven}|\\
4730 % \Name[Daisy]{Ver Boven}\dotfill^^A
4731 % |\Name[Daisy]{Ver Boven}|
4732 % \end{Block}
4733 %
4734 % \item \emph{French:} If the surname has an article (or contracted article) plus preposition, the particles go in \meta{SNN}. Otherwise, prepositions by themselves go in \meta{FNN}.
4735 % \BothInfo*{\ShowPattern[Jean de]{La Fontaine}}
4736 % {\ShowIdxPageref*[Jean de]{La Fontaine}}
4737 % \begin{Block}
4738 % \ForgetThis\Name[Jean de]{La Fontaine}\dotfill^^A
4739 % |\Name[Jean de]{La Fontaine}|\\
4740 % \Name[Jean de]{La Fontaine}\dotfill^^A
4741 % |\Name[Jean de]{La Fontaine}|
4742 % \end{Block}
4743 %
4744 % \item \emph{German:} If the surname has an article (or contracted article), optionally plus a preposition, the particles go in \meta{SNN}. Otherwise, the particles (usually just prepositions) go in \meta{FNN}.
4745 % \BothInfo[3ex]{\ShowPattern[J.W. von]{Goethe}\break
4746 % \ShowPattern[Otto]{Zur Linde}}
4747 % {\ShowIdxPageref*[J.W. von]{Goethe}\break
4748 % \ShowIdxPageref*[Otto]{Zur Linde}}
4749 % \begin{Block}
4750 % \ForgetThis\Name[J.W. von]{Goethe}[Johann Wolfgang v.]\\
4751 % |\Name[J.W. von]{Goethe}[Johann Wolfgang v.]|\\
4752 % \Name[J.W. von]{Goethe}\dotfill^^A
4753 % |\Name[J.W. von]{Goethe}|\\[1ex]
4754 % \Name[Otto]{Zur Linde}\dotfill^^A
4755 % |\Name[Otto]{Zur Linde}|\\
4756 % \Name[Otto]{Zur Linde}\dotfill^^A
4757 % |\Name[Otto]{Zur Linde}|
4758 % \end{Block}
4759 %
4760 % \item \emph{Modern Italian:} Particles go in \meta{SNN}.
4761 %
4762 % \item \emph{Medieval Italian:} Particles usually go in \meta{FNN}.
4763 %
4764 % \item \emph{Portuguese:} Particles go in \meta{FNN}.
4765 %
4766 % \item \emph{Romanian:} Particles go in \meta{SNN}, except for \textit{de}, which goes in \meta{FNN}.
4767 %
4768 % \item \emph{Scandinavian languages:} Particles go in \meta{FNN} if they are of Scandinavian, Dutch, or German origin, except for the Dutch particle \textit{de} and particles of other origin, which go in \meta{SNN}.
4769 %
4770 % \item \emph{Spanish:} If the surname has an article, it goes in \meta{SNN}. Otherwise, particles go in \meta{FNN}. Compound surnames are indexed by their first element, including names connected by \textit{y} (and).
4771 % \BothInfo[0.5ex]{\ShowPattern[Francisco de]{Figueroa}\break
4772 % \ShowPattern[Manuel Antonio]{Las Heras}}
4773 % {\ShowIdxPageref*[Francisco de]{Figueroa}\break
4774 % \ShowIdxPageref*[Manuel Antonio]{Las Heras}}
4775 % \begin{Block}
4776 % \Name[Francisco de]{Figueroa}\dotfill^^A
4777 % |\Name[Francisco de]{Figueroa}|\\
4778 % \Name[Francisco de]{Figueroa}\dotfill^^A
4779 % |\Name[Francisco de]{Figueroa}|\\[1ex]
4780 % \Name[Manuel Antonio]{Las Heras}\dotfill^^A
4781 % |\Name[Manuel Antonio]{Las Heras}|\\
4782 % \Name[Manuel Antonio]{Las Heras}\dotfill^^A
4783 % |\Name[Manuel Antonio]{Las Heras}|
4784 % \end{Block}
4785 %
4786 % \item \emph{Modern Welsh, Irish, and Scots contexts:} names often merge particles with surnames: FitzRoy or Fitzroy; O'Leary; McDonald, MacLeish.
4787 % \end{itemize}
4788 %
4789 % \subsubsection{Non-Breaking Spaces}
4790 %
4791 % Despite the macros in Section~\ref{sec:Affix}, names with particles present their own challenges. We recommend inserting a tilde (active character equivalent to \cmd{\nobreakspace}) or Unicode NBSP as needed to prevent bad breaks (see also Sections~\ref{sec:IndexSort}). Here the quick interface helps greatly.
4792 %
4793 % \subsubsection{Look-Alike Particles}
4794 %
4795 % There are characters that look similar, but in fact are different. For example, \textit{L'} (L+apostrophe) and \textit{d'} (d+apostrophe) are two separate glyphs each. In contrast, \textit{Ľ} (L+caron) and \textit{ď} (d+caron) are one Unicode glyph each (Section~\ref{sec:Unicode}). If one confuses these similar characters, spurious results can occur.
4796 %
4797 % \subsubsection[Capitalizing]{Capitalizing Particles}
4798 % \label{sec:CapParticles}
4799 %
4800 % \DescribeMacro{\CapThis}
4801 % In English, names like \LSoto\ have their particles in the \meta{SNN} argument: \Soto. At the beginning of a sentence, one must capitalize the name:
4802 %
4803 % \begin{itemize}
4804 % \item[] \CapThis\Soto\ was a famous Spanish explorer.
4805 % \item[] |\CapThis\Soto\ was a famous Spanish explorer.|
4806 % \end{itemize}
4807 %
4808 % With \texttt{latex} and \texttt{pdflatex}, using \cmd{\CapThis} should work with all of the Unicode characters available in the T1 encoding. For a broader set of characters, consider using \texttt{xelatex} and \texttt{lualatex}.
4809 %
4810 % Section~\ref{sec:NonstandardCaps} applies \cmd{\CapThis} to names that have nonstandard capitalization. Section~\ref{sec:AltFormat} explains how to avoid potential problems with \cmd{\CapThis} when using macros in name arguments. That is a trade-off for using a natural language approach.
4811 %
4812 % The macro \cmd{\CapName} overrides the \meta{SNN} created by \cmd{\CapThis}, effectively nullifying its effects. It is unlikely that the two macros would be used together,so this should not present a problem.
4813 %
4814 % \DescribeMacro{\AccentCapThis}
4815 % Before \textsf{nameauth} used automatic Unicode detection, \cmd{\AccentCapThis} placed before \cmd{\CapThis} handled Unicode. It remains only for backward compatibility.
4816 %
4817 % \subsection{Medieval Names}
4818 % \label{sec:NameMedieval}
4819 %
4820 % Medieval (and some ancient) names present some interesting difficulties, often based on the expected standards of the context in which they are used:
4821 % \begin{itemize}
4822 % \item Some publications present medieval names as Western names due to common convention. That also is reflected in index styles.
4823 %
4824 % \item Scholarly publications (sometimes) do not sacrifice details for the sake of convention. This makes their indexes more unfamiliar to the general reader. One might create cross-references from common forms to scholarly forms using \cmd{\IndexRef}, as explained in Section~\ref{sec:IndexRef}.
4825 % \end{itemize}
4826 %
4827 % The design of \textsf{nameauth} helps users implement both approaches when needed, even though the two approaches are not compatible with each other. Indeed, we show both common and scholarly approaches in this manual. The trade-off for flexibility means that users have to put more work into designing how they address this complexity. That is why the manual provides so many examples.
4828 %
4829 % In the following preamble snippet we illustrate how some different approaches may work, and how, even in one document, they can be made to play nicely with each other. Yet we should emphasize that, in general, a document will not use both common and scholarly approaches. We show the ``worst-case'' scenario in order to demonstrate how much easier the normal cases can be.\footnote{Regarding the margin note that shows name patterns, in \texttt{\ShowPattern{Thomas, à~Kempis}} the glyphs \texttt{Ãă} correspond to \cmd{\IeC\{}\texttt{\textbackslash\textquotesingle a\}}. This is a result of using \textsf{inputenc} and \textsf{fontenc}.}
4830 %^^A
4831 % ^^A
4832 % \begin{Quote}
4833 % \begin{Verbatim}
4834 % \PretagName{Thomas, à~Kempis}{Thomas Akempis} % medieval
4835 % \PretagName[Thomas]{à~Kempis}{Akempis, Thomas} % Western
4836 %
4837 % % We do not index an alternate medieval form
4838 % \ExcludeName{Thomas, \`a~Kempis}
4839 %
4840 % \end{Verbatim}
4841 %
4842 % \begin{Verbatim}
4843 % % If we did use the alternate form, we would sort it as
4844 % \PretagName{Thomas, \`a~Kempis}{Thomas Akempis}
4845 %
4846 % \begin{nameauth}
4847 % \< KempMed & & Thomas, à~Kempis & > % medieval
4848 % \< KempW & Thomas & à~Kempis & > % Western
4849 % \end{nameauth}
4850 %
4851 % % Create xref before using the Western name.
4852 % \IndexRef[Thomas]{à~Kempis}{Thomas à~Kempis}
4853 % \end{Verbatim}
4854 % \ExcludeName{Thomas,\`a~Kempis}
4855 % \IndexRef[Thomas]{à~Kempis}{Thomas à~Kempis}
4856 % \end{Quote}
4857 %
4858 % Below we illustrate different name forms using statements numbered from 1 to 10. The marginal information pertains as indicated to those respective numbered statements to show important differences among the name forms.
4859 % \begin{itemize}
4860 % \item Medieval form: \cmd{\KempMed}
4861 % \BothInfo*{\ShowPattern{Thomas, à~Kempis}\hfill \textrm{(1--4, 7)}\break
4862 % \ShowPattern{Thomas,\`a~Kempis}\hfill \textrm{(5--6)}\break
4863 % \ShowPattern[Thomas]{à~Kempis}\hfill \textrm{(8--10)}}
4864 % {\ShowIdxPageref*{Thomas, à~Kempis}\hfill (1--4, 7)\break
4865 % \ShowIdxPageref*{Thomas,\`a~Kempis}\hfill (5--6)\break
4866 % \ShowIdxPageref*[Thomas]{à~Kempis}\hfill (8--10)}
4867 % \begin{enumerate}
4868 % \item In the text, we see ``\KempMed'' and ``\KempMed''. The added name ``\ForceFN\SKempMed'' |\ForceFN\SKempMed| is a place name, not a surname. It is Latin for \DE{von Kempen}.
4869 %
4870 % \item ``\KempMed'' |\KempMed| is indexed as ``\ShowIdxPageref*{Thomas, à~Kempis}''.
4871 %
4872 % \item ``\CapThis\ForceFN\SKempMed'' |\CapThis\ForceFN\SKempMed| can start a sentence, but such usage would be infrequent.
4873 %
4874 % \item We use \cmd{\PretagName} (Section~\ref{sec:IndexSort}) to sort the name according to the expected collating sequence:
4875 %
4876 % \item[] |\PretagName{Thomas, à~Kempis}{Thomas Akempis}|
4877 % \end{enumerate}
4878 %
4879 % \item Alternate medieval form: |\Name{Thomas,\`a~Kempis}|
4880 % \begin{enumerate}\addtocounter{enumi}{4}
4881 % \item ``\Name{Thomas,\`a~Kempis}'' is a different name with a different pattern, about which the next section goes into some detail.
4882 %
4883 % \item We used \cmd{\ExcludeName} (Section~\ref{sec:IdxFine}) before using the alternate form to keep it from generating a duplicate index entry.
4884 %
4885 % \item We index the canonical form here with \JustIndex\KempMed
4886 % |\JustIndex\KempMed|.
4887 % \end{enumerate}
4888 %
4889 % \item Western form: \cmd{\KempW}
4890 % \begin{enumerate}\addtocounter{enumi}{7}
4891 % \item ``\KempW'' is a Western name form with the index entry: ``\ShowIdxPageref*[Thomas]{à~Kempis}''.
4892 %
4893 % \item ``\CapThis\KempW'' appears by using |\CapThis\KempW|. We refer to ``\SKempW'' via |\SKempW|. We get the same breadth of usage as the Non-Western forms, but the index entries differ, as do the specific ways of using the names.
4894 %
4895 % \item We first created a cross-reference from the Western form to the medieval form to prevent spurious page entries (Section~\ref{sec:IndexRef}).
4896 %
4897 % \item[] We index the canonical form: \JustIndex\KempMed
4898 % |\JustIndex\KempMed|.
4899 %
4900 % \item[] To prevent the name from appearing before ``\texttt{aardvark}'' in the index, we remove extra spaces to get the proper sorting between ``\texttt{ajar}'' and ``\texttt{alkaline}'':
4901 %
4902 % \item[] |\PretagName[Thomas]{à~Kempis}{Akempis, Thomas}|
4903 % \end{enumerate}
4904 % \end{itemize}
4905 %
4906 % \subsection{Ancient Names}
4907 % \label{sec:NameAncient}
4908 %
4909 % \begingroup ^^A Local format hook redefinition
4910 %
4911 % Ancient names are fluid regarding the meaning and use of affixes. Certain scholarly contexts add more information to a name when it is first introduced. How do we handle that? We use information from the latter sections mentioned below. First we manually add affixes to a standard name:
4912 % \begin{itemize}
4913 % \item We use \cmd{\PretagName} (Section~\ref{sec:IndexSort}) to sort especially Roman numerals in the index. For example:
4914 % \PatInfo[1ex]{\ShowPattern{Antiochus, IV}!PRE}
4915 % \item[] \cmd{\PretagName\{Antiochus, IV\}\{Antiochus 4\}}
4916 %
4917 % \item We use \cmd{\TagName} (Section~\ref{sec:IndexTag}) to ensure that added information is displayed in the index:
4918 % \PatInfo[1ex]{\ShowPattern{Antiochus, IV}!TAG}
4919 % \item[] \cmd{\TagName\{Antiochus, IV\}\{ Epiphanes, king\}}.
4920 %
4921 % \item Using \cmd{\PretagName} and \cmd{\TagName} in the preamble ensures consistency.
4922 %
4923 % \item We use \meta{Alternate} to add information in the text, e.g.:
4924 % \end{itemize}
4925 % \begin{Block}
4926 % \negmedskip
4927 % \PatInfo[3ex]{\ShowPattern{Antiochus, IV}!MN}
4928 % \Name{Antiochus, IV}[IV Epiphanes]\dotfill
4929 % \cmd{\Name\ \{Antiochus, IV\}[IV Epiphanes]}\\
4930 % \Name*{Antiochus, IV}\dotfill \cmd{\Name*\{Antiochus, IV\}}\\
4931 % \Name{Antiochus, IV}\dotfill \cmd{\Name\ \{Antiochus, IV\}}
4932 % \end{Block}
4933 %
4934 % Next we show a snippet that uses the quick interface with this same method. We trigger a first use, followed by long and short subsequent uses:
4935 % \begin{Quote}
4936 % \begin{Verbatim}
4937 % \PretagName{Demetrius, I}{Demetrius 1}
4938 % \TagName{Demetrius, I}{ Soter, king}
4939 % \begin{nameauth}
4940 % \< Dem & & Demetrius, I & >
4941 % \end{nameauth}
4942 % \end{Verbatim}
4943 % \end{Quote}
4944 %
4945 % \negbigskip
4946 % \begin{Block}
4947 % \BothInfo[1.3ex]{\ShowPattern{Demetrius, I}!PRE\break
4948 % \ShowPattern{Demetrius, I}!TAG\break
4949 % \ShowPattern{Demetrius, I}!MN}
4950 % {\ShowIdxPageref*{Demetrius, I}}
4951 % \Dem[I Soter]\dotfill|\Dem[I Soter]|\\
4952 % \LDem\dotfill|\LDem|\\
4953 % \Dem\dotfill|\Dem|
4954 % \end{Block}
4955 %
4956 % Below, instead of manually using \meta{Alternate}, we use a more complex initial setup that automates tags via in first-use formatting hooks (Section~\ref{sec:DataTagHooks}). We also show that we can still have manual changes, here with \textsf{babel} and a macro \cmd{\el} that we made for using Greek, which is part of this manual's preamble:
4957 % \begin{Quote}
4958 % \begin{Verbatim}[firstnumber=last]
4959 % \NameAddInfo{Demetrius, I}{ Soter}
4960 % \renewcommand*\NamesFormat[1]
4961 % {\color{blue}\sffamily#1\NameQueryInfo{}}
4962 % \renewcommand*\MainNameHook{\sffamily}
4963 % \end{Verbatim}
4964 % \end{Quote}
4965 %
4966 % \NameAddInfo{Demetrius, I}{ Soter}
4967 % \renewcommand*\NamesFormat[1]
4968 % {\color{blue}\sffamily#1\NameQueryInfo{}}
4969 % \renewcommand*\MainNameHook{\sffamily}
4970 %
4971 % \begin{Block}
4972 % \BothInfo[3.2ex]{\ShowPattern{Demetrius, I}!DB}
4973 % {\ShowIdxPageref*{Demetrius, I}}
4974 % \ForgetThis\Dem\dotfill|\ForgetThis\Dem|\\
4975 % \LDem\dotfill|\LDem|\\
4976 % \Dem\dotfill|\Dem|\\
4977 % \LDem[I \noexpand \el{Σωτήρ}]\dotfill|\LDem[I \noexpand \el{|^^A
4978 % \textsf{\el{Σωτήρ}}|}]|
4979 % \end{Block}
4980 %
4981 % The full index entry for both cases of \Dem\ in a normal document would look like:
4982 % \begingroup
4983 % \IndexActual{@}^^A
4984 % \TagName{Demetrius, I}{ Soter, king}^^A
4985 % \texttt{\ShowIdxPageref{Demetrius, I}}.^^A
4986 % \TagName{Demetrius, I}{ Soter, king\string|hyperpage}
4987 % \endgroup
4988 % The first use of a name, or one after \cmd{\ForgetName} or \cmd{\ForgetThis}, shows the most information. A long instance of an extant name shows less info, and a short instance shows the least.
4989 % \endgroup^^A Local format hook redefinition
4990 %
4991 % \subsection{Roman Names I}
4992 % \label{sec:Romani}
4993 %
4994 % In this section we take a simple approach. Later on we will use macros in the arguments (Section~\ref{sec:Romanii}). Roman names consist of the following elements:
4995 % \begin{itemize}
4996 % \item A personal name (\LA{praenomen})
4997 %
4998 % \item A clan name (\LA{nomen})
4999 %
5000 % \item An epithet or nickname (\LA{cognomen})
5001 % \end{itemize}
5002 %
5003 % The \LA{cognomen} can denote a branch family in a larger clan. Affixed to that, one might see additional names (\LA{agnomina}). In ancient Rome, the \LA{nomen} was most important, helping to structure
5004 % \href{https://en.wikipedia.org/wiki/Patrician_(ancient_Rome)}{Roman society}.
5005 % \href{https://en.wikipedia.org/wiki/Roman_naming_conventions}{Naming conventions} changed over time.
5006 % \href{https://en.wikipedia.org/wiki/Praenomen}{\LA{Praenomina}} also have their own history.
5007 % One finds a
5008 % \href{https://www.youtube.com/watch?v=RMLb1jVl_Uo}{helpful video} on the YouTube channel PolýMATHY by \Name[Luke]{Ranieri}. We \emph{do not use} the method where Roman names are indexed using recognizable mononyms.\footnote{Justo L. González, \Title{The Story of Christianity}, 2 vols. (San Francisco: Harper, 1984). [\hyperlink{Mulvany}{Mulvany}] does not advise using such a method, which is ill-suited for \textsf{nameauth}.}
5009 %
5010 % \subsubsection[General Reference]{General Reference Materials}
5011 % \label{sec:RomanGeneral}
5012 %
5013 % The basic approach uses Western name forms, but with some modifications. One often sees this method when indexing well-known Romans.\footnote{Philip J. Adler, \Title{World Civilizations}, 3rd ed. (Belmont, Calif.: Thomson/Wadsworth, 2003).}
5014 %
5015 % \subsubsection*{\hfil Names without \LA{Agnomina}}
5016 %
5017 % \BothInfo*{\ShowPattern[Julius]{Caesar}[Gaius Julius]\break
5018 % \ShowPattern[Pontius]{Pilate}}
5019 % {\ShowIdxPageref*[Julius]{Caesar}[Gaius Julius]\break
5020 % \ShowIdxPageref*[Pontius]{Pilate}}
5021 % Below we have the \LA{nomen} in \meta{FNN}, the \LA{cognomen} in \meta{SNN}, and we add the \LA{praenomen} with the \LA{nomen} in \meta{Alternate} as needed:
5022 % \begin{Block}
5023 % \Name[Julius]{Caesar}[Gaius Julius]\dotfill |\Name[Julius]{Caesar}[Gaius Julius]|\\
5024 % \Name*[Julius]{Caesar}\dotfill |\Name*[Julius]{Caesar}|\\
5025 % \Name[Julius]{Caesar}\dotfill |\Name[Julius]{Caesar}|
5026 % \end{Block}
5027 %
5028 % If indexing according to the \LA{cognomen}, perhaps use a Western name, where the \LA{nomen} is in \meta{FNN} and the \LA{cognomen} in \meta{SNN}:
5029 % \begin{Block}
5030 % \Name*[Pontius]{Pilate}\dotfill |\Name*[Pontius]{Pilate}|
5031 % \end{Block}
5032 %
5033 % \BothInfo*{\ShowPattern{Pontius, Pilate}}
5034 % {\ShowIdxPageref*{}}
5035 % In Section~\ref{sec:SelectingTypes} we mentioned that some Roman names could have Non-Western forms, especially those without \LA{praenomina}. They would be indexed according to the \LA{nomen}, which we see in some scholarly resources (Section~\ref{sec:RomanScholari}).
5036 % \begin{Block}
5037 % \ForgetName{Pontius, Pilate}
5038 % \Name{Pontius, Pilate}\dotfill |\Name{Pontius, Pilate}|\\
5039 % \ForceFN\FName{Pontius, Pilate}\dotfill |\ForceFN\FName{Pontius, Pilate}|
5040 % \end{Block}
5041 %
5042 % \begin{Quotation}{\Name[Julius]{Caesar}}
5043 % {\Title{\la{De bello gallico}} 3.16.6 (58--49 \textsc{bc})}
5044 % \la{Fere libenter homines, id quod volunt, credunt.}
5045 %
5046 % (In general, people willingly believe what they want [to believe].)
5047 % \index{Romans, quotes of\noexpand\string|hyperpage}
5048 % \end{Quotation}
5049 %
5050 % \newpage
5051 %
5052 % \subsubsection*{\hfil Names with \LA{Agnomina}: Tags}
5053 %
5054 % We can use index ``pre-tags'' and tags (Sections~\ref{sec:IndexSort} and~\ref{sec:IdxIdent}) to sort and differentiate names in the index. We also can use name tags (Section~\ref{sec:DataTags}) for \LA{agnomina}. Yet Romans tended to use and pass down a relatively small set of names over many generations.
5055 %
5056 % By defining empty macros \cmd{\nri}, \cmd{\nrii}, \cmd{\nriii}\dots, we can disambiguate identical names. We use \cmd{\nr} (number) followed by Roman numerals to avoid collisions with, for example, the dotless \i. When put at the tail of name arguments, they avoid the need to use either \cmd{\noexpand} or alternate formatting. We can reuse these macros with many different names.
5057 %
5058 % This approach solves most issues in the text. If we need specific index forms, we could index under alternate names, as we do on the next page. With a nod to Section~\ref{sec:DataTagHooks}, we automate the first use of a name to display the name tag. In a normal \LaTeX\ file, we would see the following results:
5059 %^^A
5060 % \begin{VerbatimOut}{\jobname.tmp}
5061 % \newcommand\nri{}
5062 % \newcommand\nrii{}
5063 %
5064 % \begin{nameauth}
5065 % \< Senecai & Lucius Annaeus & Seneca\nri & >
5066 % \< Senecaii & Lucius Annaeus & Seneca\nrii & >
5067 % \end{nameauth}
5068 %
5069 % \renewcommand*\NamesFormat[1]
5070 % {\color{blue}\sffamily#1\NameQueryInfo{}}
5071 %
5072 % \PretagName[Lucius Annaeus]{Seneca\nri}{Seneca, Lucius Annaeus 1}
5073 % \PretagName[Lucius Annaeus]{Seneca\nrii}{Seneca, Lucius Annaeus 2}
5074 % \TagName[Lucius Annaeus]{Seneca\nri}{ (the Elder)}
5075 % \TagName[Lucius Annaeus]{Seneca\nrii}{ (the Younger)}
5076 % \NameAddInfo[Lucius Annaeus]{Seneca\nri}{ the Elder}
5077 % \NameAddInfo[Lucius Annaeus]{Seneca\nrii}{ the Younger}
5078 %
5079 % We can differentiate between
5080 % \Senecai\ and \Senecaii;
5081 % \Senecai \NameQueryInfo{} and \Senecaii \NameQueryInfo{}.
5082 %
5083 % Their full index entries are:\\
5084 % \ShowIdxPageref[Lucius Annaeus]{Seneca\nri}\\
5085 % \ShowIdxPageref[Lucius Annaeus]{Seneca\ii}
5086 % \end{VerbatimOut}
5087 %^^A
5088 % \begin{Quote}
5089 % \VerbatimInput[gobble=0]{\jobname.tmp}
5090 %
5091 % \Info[2.5ex]{Name patterns and index entries are too big for the margin.}
5092 % \renewcommand*\NamesFormat[1]
5093 % {\color{blue}\sffamily#1\NameQueryInfo{}}^^A
5094 % \NameAddInfo[Lucius Annaeus]{Seneca\nri}{ the Elder}^^A
5095 % \NameAddInfo[Lucius Annaeus]{Seneca\nrii}{ the Younger}^^A
5096 %^^A
5097 % We can differentiate between
5098 % \Senecai\ and \Senecaii;
5099 % \Senecai \NameQueryInfo{} and \Senecaii \NameQueryInfo{}.
5100 %
5101 % \IndexActual{@}
5102 % \TagName[Lucius Annaeus]{Seneca\nri}{ (the Elder)}
5103 % \TagName[Lucius Annaeus]{Seneca\nrii}{ (the Younger)}
5104 % Their full index entries are:\\
5105 % \ShowIdxPageref[Lucius Annaeus]{Seneca\nri}\\
5106 % \ShowIdxPageref[Lucius Annaeus]{Seneca\nrii}
5107 % \TagName[Lucius Annaeus]{Seneca\nri}{, the Elder\string|hyperpage}
5108 % \TagName[Lucius Annaeus]{Seneca\nrii}{, the Younger\string|hyperpage}
5109 % \end{Quote}
5110 %
5111 % \begin{Quotation}{\Scipio}
5112 % {attr. by \Name[Titus]{Livius},
5113 % \Title{\la{Ab urbe condita}} B 30 (27--9 \textsc{bc})}
5114 % \la{Bellum parate, quoniam pacem pati non potuistis.}
5115 %
5116 % (Prepare for war, for it seems that you are unable to tolerate peace.)
5117 % \index{Romans, quotes of\noexpand\string|hyperpage}
5118 % \end{Quotation}
5119 %
5120 %
5121 % \subsubsection*{\hfil Names with \LA{Agnomina}: \meta{Affix}}
5122 %
5123 % \DescribeMacro{\ForceAffix} In subsequent uses of a Western name, the prefix macro \cmd{\ForceAffix} allows one to print just \meta{Affix} by itself. \cmd{\ForceFN} has a similar use with Non-Western names.
5124 % \begin{InfoBox}
5125 % Where formatting hooks also change syntactic name forms (Section~\ref{sec:AdvancedFormat}f.), that could interfere with \cmd{\ForceFN} and \cmd{\ForceAffix}.
5126 % \end{InfoBox}
5127 %
5128 % We move \LA{agnomina} into the \meta{Affix} field. The \LA{agnomen} drops automatically in the text for subsequent name uses, but we get potentially undesirable index entries:
5129 % \begin{itemize}
5130 % \item[] The text has:
5131 % |\Name[|\meta{praenomen}| |\meta{nomen}|]{|^^A
5132 % \meta{cognomen}\textbf{,}\meta{agnomen}|}|
5133 % \item[] In the index we get:
5134 % \ShowIdxPageref*[\meta{praenomen} \meta{nomen}]
5135 % {\meta{cognomen}, \meta{agnomen}}
5136 % \item[] In the index we want:
5137 % \ShowIdxPageref*[\meta{praenomen} \meta{nomen}]
5138 % {\meta{cognomen} \meta{agnomen}}
5139 % \end{itemize}
5140 % We avoid this problem by using \cmd{\ExcludeName} for names that have \LA{agnomina} in \meta{Affix}. We index different name forms, as in the next example:
5141 % \begin{Quote}
5142 % \begin{Verbatim}
5143 % \begin{nameauth}
5144 % \< CatoY & Marcus Porcius & Cato, the Younger & >
5145 % \< CatoYi & Marcus Porcius & Cato the Younger & >
5146 % \end{nameauth}
5147 % \renewcommand*\NamesFormat[1]
5148 % {\color{blue}\sffamily#1\NameQueryInfo{}}
5149 % \ExcludeName[Marcus Porcius]{Cato, the Younger}
5150 % \makeatletter
5151 % \NameAddInfo[Marcus Porcius]{Cato, the Younger}
5152 % {\if@nameauth@InHook\ (Uticensis, 94--45\ %
5153 % {\rmfamily\textsc{bc}})\else Uticensis\fi}
5154 % \makeatother
5155 %
5156 % \JustIndex\CatoYi
5157 % \CatoY\ is known as \CatoY\ \ForceAffix\CatoY, to distinguish him
5158 % from his great-grandfather. His names include \SCatoY[Marcus]
5159 % (\textit{praenomen}), \SCatoY[Porcius] (\textit{nomen}, one of the
5160 % Porcia clan), and \CatoY, the \textit{cognomen} by which he is best
5161 % known. His other \textit{agnomen}, \NameQueryInfo{}, means he was
5162 % born in Utica.
5163 % \JustIndex\CatoYi He is indexed as: \ShowIdxPageref*{}
5164 % \end{Verbatim}
5165 %
5166 % \Info*{Name patterns and index entries are too big for the margin.}^^A
5167 % \renewcommand*\NamesFormat[1]
5168 % {\color{blue}\sffamily#1\NameQueryInfo{}}^^A
5169 % \makeatletter^^A
5170 % \NameAddInfo[Marcus Porcius]{Cato, the Younger}
5171 % {\if@nameauth@InHook\ (Uticensis, 94--45\ %
5172 % {\rmfamily\textsc{bc}})\else Uticensis\fi}^^A
5173 % \makeatother^^A
5174 % \JustIndex\CatoYi^^A
5175 % \CatoY\ is known as \CatoY\ \ForceAffix\CatoY, to distinguish him
5176 % from his great-grandfather. His names include \SCatoY[Marcus]
5177 % (\textit{praenomen}), \SCatoY[Porcius] (\textit{nomen}, one of the
5178 % Porcia clan), and \CatoY, the \textit{cognomen} by which he is best
5179 % known. His other \textit{agnomen}, \NameQueryInfo{}, means he was
5180 % born in Utica.
5181 % \JustIndex\CatoYi He is indexed as: \ShowIdxPageref*{}
5182 % \end{Quote}
5183 %
5184 % \begin{Quotation}{\Name[Publius]{Vegetius Renatus}}
5185 % {\Title{\la{De re militari}} (c. 390 \textsc{ad})}
5186 % Igitur qui desiderat pacem, praeparet bellum.
5187 %
5188 % (Accordingly, the person who would desire peace prepares for war.)^^A
5189 % \index{Romans, quotes of\noexpand\string|hyperpage}
5190 % \end{Quotation}
5191 %
5192 % \newpage
5193 %
5194 % \subsubsection{Scholarly Works}
5195 % \label{sec:RomanScholari}
5196 %
5197 % The \Title{Oxford Classical Dictionary} and other scholarly sources index according to the \LA{nomen}. That approach moves the \LA{nomen} from \meta{FNN} to \meta{SNN}, making this indexing method incompatible with the previous section:
5198 % \begin{itemize}
5199 % \item[] Index: \ShowIdxPageref*[\meta{praenomen}]{\meta{nomen} \meta{cognomen} \meta{agnomen}}
5200 % \item[] Macro: |\IndexName[|\meta{praenomen}|]{|\meta{nomen} \meta{cognomen} \meta{agnomen}|}|
5201 % \end{itemize}
5202 %
5203 % \BothInfo*{\ShowPattern[Lucius]{Sergius Paulus}}
5204 % {\ShowIdxPageref*{}}
5205 % By putting the \LA{nomen} and \LA{cognomen} into \meta{SNN}, with the \LA{praenomen} in \meta{FNN} and \LA{agnomina} in name tags, we can take a basic approach to these names.\footnote{Cf. Paul L. Maier, \Title{In the Fullness of Time: A Historian Looks at Christmas, Easter, and the Early Church}, revised ed. (San Francisco: Harper, 1991).}
5206 % \begin{Block}
5207 % \Name[Lucius]{Sergius Paulus}\dotfill |\Name[Lucius]{Sergius Paulus}|\\
5208 % \Name[Lucius]{Sergius Paulus}\dotfill |\Name[Lucius]{Sergius Paulus}|
5209 % \end{Block}
5210 %
5211 % If one is indexing according to the \LA{cognomen}, one must index by an alternate name. This also allows for greater flexibility.
5212 % \begin{itemize}
5213 % \item Use this naming approach, seen in Section~\ref{sec:RomanGeneral}:
5214 %
5215 % \item[] |\Name[|\meta{praenomen}| |\meta{nomen}|]{|^^A
5216 % \meta{cognomen}\textbf{,}\meta{agnomen}|}|
5217 %
5218 % \item[] This allows the standard \textsf{nameauth} logic to handle changes of name forms, as well as the use of \cmd{\ForceAffix}.
5219 %
5220 % \item Use \cmd{\ExcludeName} for every name that should not appear in the index.
5221 %
5222 % \item Use \cmd{\IndexName} or \cmd{\JustIndex} as needed:
5223 %
5224 % \item[] |\IndexName[|\meta{praenomen}|]{|^^A
5225 % \meta{nomen} \meta{cognomen} \meta{agnomen}|}|
5226 % \end{itemize}
5227 % \begin{Quote}
5228 % \begin{Verbatim}
5229 % \begin{nameauth}
5230 % \< CatoE & Marcus Porcius & Cato, the Elder & >
5231 % \< CatoEi & Marcus & Porcius Cato the Elder & >
5232 % \end{nameauth}
5233 % \ExcludeName[Marcus Porcius]{Cato, the Elder}
5234 %
5235 % \JustIndex\CatoEi
5236 % \DropAffix\CatoE\ (234--149 \textsc{bc}) is known as
5237 % \CatoE{} \ForceAffix\CatoE, among other sobriquets.
5238 % His \textit{praenomen} is \SCatoE[Marcus]. His
5239 % \textit{nomen} is \SCatoE[Porcius], a member of the
5240 % Porcia clan. His \textit{cognomen} is \CatoE.
5241 % \JustIndex\CatoEi
5242 % Index: \ShowIdxPageref*{}
5243 % \end{Verbatim}
5244 %
5245 % \Info*{Name patterns and index entries too large for margin.}^^A
5246 % \JustIndex\CatoEi^^A
5247 % \DropAffix\CatoE\ (234--149 \textsc{bc}) is known as
5248 % \CatoE{} \ForceAffix\CatoE, among other sobriquets.
5249 % His \textit{praenomen} is \SCatoE[Marcus]. His
5250 % \textit{nomen} is \SCatoE[Porcius], a member of the
5251 % Porcia clan. His \textit{cognomen} is \CatoE.
5252 % \JustIndex\CatoEi
5253 % Index: \ShowIdxPageref*{}
5254 % \end{Quote}
5255 %
5256 % \ReturnLink
5257 %
5258 % \newpage
5259 %
5260 % \section{Debugging}
5261 % \label{sec:Debugging}
5262 %
5263 % Name patterns\,---\,generally unique macros based on names that usually expand to the empty string\,---\,govern interactions in \textsf{nameauth}. We take a deep dive here because name patterns greatly impact the remainder of the manual. We start to show index entries in the body text instead of the margin due to their complexity.
5264 %
5265 % \subsection{Null Arguments}
5266 % \label{sec:NullArgs}
5267 %
5268 % All macros that evaluate name arguments (Section~\ref{sec:NameArgMacros}) leave information about the last name that was evaluated. Since version 4.1, some macros that take name arguments also can have a \emph{null argument.} That occurs when the \marg{SNN\textbf{,}Affix} argument is empty. Instead of creating a package error (the normal case), \emph{all macro arguments are ignored} and the macro uses the persistent information from the last name arguments that were evaluated:
5269 %
5270 % \begin{Block}
5271 % Using the example \Name{Confucius}, the following are equivalent:\\
5272 % \ShowPattern{}\dotfill |\ShowPattern{}|\\
5273 % \ShowPattern[this]{}[that]\dotfill |\ShowPattern[this]{}[that]|
5274 % \end{Block}
5275 % \begin{itemize}
5276 % \item \cmd{\@nameauth@LoadArgs} isolates each name element, removes surrounding spaces, generates possible name patterns, and saves token registers (page~\pageref{page:NameauthLoadArgs} and following).
5277 %
5278 % \item \cmd{\@nameauth@Choice} determines the name type, then sets flags and selects a pattern according to that name type. Then it executes its arguments.
5279 %
5280 % \item The macro \cmd{\NameauthPattern} that expresses both the name and its type is covered in Section~\ref{sec:NamePatterns}.
5281 %
5282 % \item The flags |\ifNameauthWestern| and |\ifNameauthObsolete| that express the name type are discussed in Section~\ref{sec:SpecialUses}.
5283 % \end{itemize}
5284 %
5285 % The macros that use both name arguments and null arguments include:
5286 %
5287 % \begin{multicols}{2}
5288 % \begin{Block}
5289 % \setbox0\hbox{.3}
5290 % \begin{itemize}
5291 % \item[\S~\ref{sec:DebuggingMacros}] \cmd{\ShowPattern}
5292 %
5293 % \item[\S~\ref{sec:DebuggingMacros}] \cmd{\ShowIdxPageref}
5294 %
5295 % \item[\S~\ref{sec:DebuggingMacros}] \cmd{\ShowIdxPageref*}
5296 %
5297 % \item[\S~\ref{sec:DebuggingMacros}] \cmd{\ShowNameInfo}
5298 %
5299 % \item[\S~\ref{sec:DebuggingMacros}] \cmd{\ShowNameState}
5300 %
5301 % \item[\S~\ref{sec:DebuggingMacros}] \cmd{\ShowNameState*}
5302 %
5303 % \item[\S~\ref{sec:DataTags}\hbox to \wd0{\hfill}] \cmd{\NameQueryInfo}
5304 % \end{itemize}
5305 % \end{Block}
5306 % \end{multicols}
5307 %
5308 % \begin{InfoBox}
5309 % No \textsf{nameauth} macros that take null arguments change name information; they only display information. This avoids errors.
5310 % \end{InfoBox}
5311 %
5312 % \begin{Quotation}{\ForgetThis\Name{Maimonides}}
5313 % {\Title{Guide for the Perplexed} (1190)}
5314 % For a truth, once established by proof, does neither gain force nor
5315 % certainty by the consent of all scholars, nor lose by the general
5316 % dissent.
5317 % \index{theologians, quotes of\noexpand\string|hyperpage}
5318 % \index{philosophers, quotes of\noexpand\string|hyperpage}
5319 % \end{Quotation}
5320 %
5321 % \subsection[Name Patterns]{Name Pattern Overview}
5322 % \label{sec:NamePatterns}
5323 %
5324 % \DescribeMacro{\NameauthPattern}
5325 % All macros that evaluate name arguments (Section~\ref{sec:NameArgMacros}) globally assign to \cmd{\NameauthPattern} a value that corresponds to the last-used name. The \meta{Alternate} argument only affects patterns when using the obsolete syntax (Section~\ref{sec:Obsolete}).
5326 % \begin{Center}
5327 % \begin{tabular}{lll}\toprule
5328 % \rowcolor{nagrey}^^A
5329 % \bfseries Macro Name Arguments & \bfseries Name Patterns & \bfseries Name Type\\
5330 %
5331 % \oarg{FNN}\marg{SNN} &
5332 % \meta{FNN}!\meta{SNN} & Western\\
5333 % \oarg{FNN}\marg{SNN}\oarg{Alt} &
5334 % \meta{FNN}!\meta{SNN} & Western\\
5335 % \oarg{FNN}\marg{SNN\textbf{,}Affix} &
5336 % \meta{FNN}!\meta{SNN},\meta{Affix} & Western\\
5337 % \oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alt} &
5338 % \meta{FNN}!\meta{SNN},\meta{Affix} & Western\\
5339 %
5340 % \rowcolor{nagrey}^^A
5341 % \hphantom{\oarg{FNN}}\marg{SNN\textbf{,}Affix} &
5342 % \meta{SNN},\meta{Affix} & Non-Western\\
5343 % \rowcolor{nagrey}^^A
5344 % \hphantom{\oarg{FNN}}\marg{SNN\textbf{,}Affix}\oarg{Alt} &
5345 % \meta{SNN},\meta{Affix} & Non-Western\\
5346 % \rowcolor{nagrey}^^A
5347 % \hphantom{\oarg{FNN}}\marg{SNN}\oarg{Alt} &
5348 % \meta{SNN},\meta{Alt} & old syntax\\
5349 % \rowcolor{nagrey}^^A
5350 % \hphantom{\oarg{FNN}}\marg{SNN} &
5351 % \meta{SNN} & Non-Western\\\bottomrule
5352 % \end{tabular}
5353 % \end{Center}
5354 %
5355 % In the case of the name \LWash, we get a basic Western name pattern: \texttt{\ShowPattern[George]{Washington}}. For this pattern to be useful to \textsf{nameauth}, the internal macros add extra bits to it, which we can demonstrate various ways.
5356 % Below we test manually whether or not various patterns relating to \Wash, \Name{Tully}, \LEliz, and \CatoY\ exist. After that, we shall unpack the meaning of these patterns and their affixes (\texttt{!MN, !NF, !PN, !PRE, !TAG, !DB}).
5357 % \IndexName[Marcus Porcius]{Cato the Younger}
5358 %^^A
5359 % \begin{VerbatimOut}{\jobname.tmp}
5360 % \newcommand\Defined[3]{\ifcsdef{#1}{#2}{#3}}
5361 %
5362 % \begin{enumerate}[itemsep=0pt]
5363 % \item The main-matter name \Wash\
5364 % \Defined{George!Washington!MN}{exists}{is undefined}.
5365 % \item The front-matter name \Wash\
5366 % \Defined{George!Washington!NF}{exists}{is undefined}.
5367 % \item The index cross-reference \Name{Tully}
5368 % \Defined{Tully!PN}{exists}{is undefined}.
5369 % \item The index sort tag for \Eliz\
5370 % \Defined{Elizabeth,I!PRE}{is: \csuse{Elizabeth,I!PRE}}
5371 % {is undefined.}
5372 % \item The index tag for \Wash\
5373 % \Defined{George!Washington!TAG}{is: \csuse{George!Washington!TAG}}
5374 % {is undefined.}
5375 % \item The name tag for \Wash\
5376 % \Defined{George!Washington!DB}{is: \csuse{George!Washington!DB}}
5377 % {is undefined.}
5378 % \item The name \CatoY\ is
5379 % \Defined{MarcusPorcius!Cato,theYounger!PN}
5380 % {excluded\csuse{MarcusPorcius!Cato,theYounger!PN}}
5381 % {in another state.}
5382 % \end{enumerate}
5383 % \end{VerbatimOut}
5384 %^^A
5385 % \begin{Quote}
5386 % \VerbatimInput[gobble=0]{\jobname.tmp}
5387 % \end{Quote}
5388 %
5389 % \bgroup\small
5390 % \input{\jobname.tmp}
5391 % \egroup
5392 %
5393 % This demonstrates the basic functioning of \textsf{nameauth}. The base name pattern always has an affix that tells what kind of name or related element it is, and in what context it belongs. Basic name patterns correlate with consistent index entries; printed name forms may vary. Western name patterns have a bang and a comma; Non-Western name patterns have a comma or nothing.
5394 % \begin{Center}
5395 % \begin{tabular}{lll}\toprule
5396 % \rowcolor{nagrey}^^A
5397 % \bfseries Text & \bfseries Basic Pattern & \bfseries Macro / Arguments\\
5398 %
5399 % \Harnack[Adolf von] & \texttt{\NameauthPattern} &
5400 % \cmd{\Harnack[Adolf von]}\\
5401 % \LHarnack & \texttt{\NameauthPattern} &
5402 % \cmd{\LHarnack}\\
5403 %
5404 % \rowcolor{nagrey}^^A
5405 % \ForgetThis\Patton & \texttt{\NameauthPattern} &
5406 % \cmd{\ForgetThis}\cmd{\Patton}\\
5407 % \rowcolor{nagrey}^^A
5408 % \DropAffix\LPatton & \texttt{\NameauthPattern} &
5409 % \cmd{\DropAffix}\cmd{\LPatton}\\
5410 %
5411 % \ForgetThis\Noguchi & \texttt{\NameauthPattern} &
5412 % \cmd{\ForgetThis}\cmd{\Noguchi}\\
5413 % \RevName\LNoguchi\dag & \texttt{\NameauthPattern} &
5414 % \cmd{\RevName}\cmd{\LNoguchi}\cmd{\dag}\\
5415 %
5416 % \rowcolor{nagrey}^^A
5417 % \ForgetThis\Yamt & \texttt{\NameauthPattern} &
5418 % \cmd{\ForgetThis}\cmd{\Yamt}\\
5419 % \rowcolor{nagrey}^^A
5420 % \RevName\LYamt & \texttt{\NameauthPattern} &
5421 % \cmd{\RevName}\cmd{\LYamt}\\
5422 %
5423 % \Name{Henry,VIII} & \texttt{\NameauthPattern} &
5424 % \cmd{\Name\{Henry,VIII\}}\\
5425 % \Name*{Henry}[VIII]\ddag & \texttt{\NameauthPattern} &
5426 % \cmd{\Name*\{Henry\}[VIII]}\cmd{\ddag}\\
5427 %
5428 % \rowcolor{nagrey}^^A
5429 % \Dem[I Soter] & \texttt{\NameauthPattern} & \cmd{\Dem[I Soter]}\\
5430 % \rowcolor{nagrey}^^A
5431 % \LDem & \texttt{\NameauthPattern} & \cmd{\LDem}\\
5432 %
5433 % \ForgetThis\Aris & \texttt{\NameauthPattern} &
5434 % \cmd{\ForgetThis}\cmd{\Aris}\\\bottomrule
5435 % \end{tabular}
5436 % \end{Center}
5437 %
5438 % Six suffixes are added to name patterns to create six ``systems'' or data sets. Regarding their IDs, shown below, see also page~\pageref{page:NameState}. The \texttt{!MN} and \texttt{!NF} systems control name formatting. Macros in Section~\ref{sec:AKA} use the \texttt{!PN} system with formatting. Indexing involves the \texttt{!PN}, \texttt{!PRE}, and \texttt{!TAG} systems. Name tags use the \texttt{!DB} system.
5439 % \begin{Center}
5440 % \begin{tabular}{llll}\toprule
5441 % \rowcolor{nagrey}^^A
5442 % \bfseries Description & \bfseries ID & \bfseries Pattern & \bfseries Notes\\
5443 %
5444 % Main-matter names & main & \meta{pattern}\texttt{!MN} &
5445 % expands to empty string\\
5446 %
5447 % Front-matter names & front & \meta{pattern}\texttt{!NF} &
5448 % expands to empty string\\
5449 %
5450 % Index cross-refs & xref & \meta{pattern}\texttt{!PN} &
5451 % expands to empty string\\
5452 %
5453 % \rowcolor{nagrey}^^A
5454 % Exclusions & excl & \meta{pattern}\texttt{!PN} &
5455 % expands to exclusion value\\
5456 %
5457 % Index sort tags & pretag & \meta{pattern}\texttt{!PRE} &
5458 % expands to tag value\\
5459 %
5460 % Index tags & idxtag & \meta{pattern}\texttt{!TAG} &
5461 % expands to tag value\\
5462 %
5463 % Name tags & namedb & \meta{pattern}\texttt{!DB} &
5464 % expands to tag value\\\bottomrule
5465 % \end{tabular}
5466 % \end{Center}
5467 %
5468 % Next we see how certain macros write patterns to systems, indicated by black boxes. \cmd{\IndexName} does not generate a name pattern; it only creates an index page entry, depending on the cross-references that control the index logic.
5469 % \begin{Center}
5470 % \begin{tabular}{lcccccc}\toprule[1pt]
5471 % \bfseries Macros & \bfseries \ttfamily \,!NF\, & \bfseries \ttfamily \,!MN\, &
5472 % \bfseries \ttfamily \,!PN\, & \bfseries \ttfamily !PRE &
5473 % \bfseries \ttfamily !TAG & \bfseries \ttfamily \,!DB\,\\\midrule
5474 % \cmd{\Name} \cmd{\Name*} \cmd{\FName} \cmd{\FName*} & \YES & \YES & \NO &
5475 % \NO & \NO & \NO\\
5476 % \cmd{\ForgetName} \cmd{\SubvertName} & \YES & \YES & \NO &
5477 % \NO & \NO & \NO\\\midrule
5478 % \cmd{\PName} \cmd{\PName*} & \YES & \YES & \YES & \NO & \NO & \NO\\\midrule
5479 % \cmd{\AKA} \cmd{\AKA*} \cmd{\IndexRef} & \NO & \NO & \YES &
5480 % \NO & \NO & \NO\\
5481 % \cmd{\ExcludeName} & \NO & \NO & \YES & \NO & \NO & \NO\\
5482 % \cmd{\IncludeName} \cmd{\IncludeName*} & \NO & \NO & \YES &
5483 % \NO & \NO & \NO\\\midrule
5484 % \cmd{\IndexName} & \NO & \NO & \NO & \NO & \NO & \NO\\\midrule
5485 % \cmd{\PretagName} & \NO & \NO & \NO & \YES & \NO & \NO\\\midrule
5486 % \cmd{\TagName} \cmd{\UntagName} & \NO & \NO & \NO &
5487 % \NO & \YES & \NO\\\midrule
5488 % \cmd{\NameAddInfo} \cmd{\NameClearInfo} & \NO & \NO & \NO &
5489 % \NO & \NO & \YES\\\bottomrule
5490 % \end{tabular}
5491 % \end{Center}
5492 %
5493 % \subsection{Name Uniqueness}
5494 % \label{sec:Unique}
5495 %
5496 % We disable indexing for the examples below. Grouping tokens \texttt{\bfseries\{\,\}} do not appear in the text, but they do appear in the name patterns. The same goes for non-printing macros, such as \cmd{\empty}. Thus, all names below are unique, as the ``first-use'' color shows. Even if they look alike in the text, they have different name patterns and different index entries. See also Sections~\ref{sec:NamePatterns}, \ref{sec:Noexpand}, and~\ref{sec:IndexSort}.
5497 % \newcommand\MyType
5498 % {\dotfill\ifNameauthWestern Western name \else Non-Western name\fi}
5499 % \begin{enumerate}\IndexInactive
5500 % \item \Name[one]{two}
5501 % |\Name[one]{two}|\\
5502 % Pattern: \texttt{\ShowPattern{}} \MyType
5503 %
5504 % \item \Name[{one}]{{two}}
5505 % |\Name[{one}]{{two}}|\footnote{The grouping tokens for the mandatory argument remain, while those of the optional argument go away. This ia a function of the \textsf{xparse} package. If one plugs the arguments directly into \cmd{\@nameauth@LoadArgs} and \cmd{\@nameauth@Choice}, they are not expanded unevenly. Still, the benefits of \textsf{xparse} outweigh the downsides. The takeaway here is to check the name pattern when debugging.}\\
5506 % Pattern: \texttt{\ShowPattern{}} \MyType
5507 %
5508 % \item \Name[one]{\empty two}
5509 % |\Name[one]{\empty two}|\\
5510 % Pattern: \texttt{\ShowPattern{}} \MyType
5511 %
5512 % \item \Name{one, two}
5513 % |\Name{one, two}|\\
5514 % Pattern: \texttt{\ShowPattern{}} \MyType
5515 %
5516 % \item \Name{{one}, {two}}
5517 % |\Name{{one}, {two}}|\\
5518 % Pattern: \texttt{\ShowPattern{}} \MyType
5519 %
5520 % \item \Name{{one, two}}
5521 % |\Name{{one, two}}|\\
5522 % Pattern: \texttt{\ShowPattern{}} \dotfill(Malformed \meta{SNN})
5523 % \end{enumerate}\IndexActive
5524 % \negmedskip
5525 % \begin{InfoBox}
5526 % In \meta{SNN\textbf{,}Affix} apply macros separately to \meta{SNN} and \meta{Affix}.
5527 % \end{InfoBox}
5528 %
5529 % There are several ways to make different names out of otherwise identical names. They vary in complexity. Among the methods we have:
5530 % \begin{itemize}
5531 % \item Index tags (\cmd{\TagName}, Section~\ref{sec:IdxIdent}) can create different index entries for otherwise identical names. This requires keeping track of the context and where one changes those tags.
5532 %
5533 % \item Non-printing tokens and macros in name arguments help one to assign unique patterns for similar index and name tags (Sections~~\ref{sec:IdxIdent} and~\ref{sec:DataTags}). This requires one to sort names with \cmd{\PretagName} (Section~\ref{sec:IndexSort}).
5534 %
5535 % \item If such macros are at the leading edge of a name instead of the trailing edge, or if any macros might expand differently at different times, one may need to use \cmd{\noexpand} and alternate formatting (Section~\ref{sec:Noexpand}).
5536 % \end{itemize}
5537 %
5538 % \NameArgWarning
5539 %
5540 % \newpage
5541 %
5542 % \subsection{Indexing States}
5543 % \label{sec:RuleStates}
5544 %
5545 % Six distinct ``states'' describe any name pattern with respect to page entries and cross-references in the index. While it may seem odd to discuss this here, this information relates directly to \cmd{\ShowNameState}, and these states are not reflected \emph{as such} by the indexing macros. They are derived from a matrix of Boolean flags and control sequences, serving more as a useful debugging mnemonic for package users. Below we show what these states mean.\medskip
5546 %
5547 % \begin{tcolorbox}
5548 % [colback=white,colframe=darkgray,
5549 % adjusted title={\bfseries\hfil \hypertarget{State 1}{State 1}: No Name Information Present}]
5550 % \footnotesize
5551 % \begin{itemize}[leftmargin=1em,rightmargin=1em]
5552 % \item \Stay{\cmd{\IndexName} makes index page entry,
5553 % creates no name pattern control sequence}{1}
5554 %
5555 % \item \Stay{\cmd{\TagName} makes index tag, creates a pattern
5556 % ending in \texttt{!TAG}; \cmd{\UntagName} destroys it}{1}
5557 %
5558 % \item \Stay{\cmd{\PretagName} makes index sort tag, creates a
5559 % pattern ending in \texttt{!PRE} (do only once)}{1}
5560 %
5561 % \item \Stay{\cmd{\ForgetName} is redundant; it cannot destroy
5562 % a control sequence that does not exist.}{1}
5563 %
5564 % \item \Go{Naming macro makes name pattern (\texttt{!MN} or
5565 % \texttt{!NF}), prints name, makes two index page entries}{2}
5566 %
5567 % \item \Go{\cmd{\SubvertName} makes a name pattern ending
5568 % either in \texttt{!MN} or in \texttt{!NF}, or both at once}{2}
5569 %
5570 % \item \Go{\cmd{\IndexRef} makes an xref pattern ending with
5571 % \texttt{!PN}; that pattern expands to empty}{3}
5572 %
5573 % \item \Go{\cmd{\SeeAlso}\cmd{\IndexRef} makes an xref pattern
5574 % ending with \texttt{!PN}; that pattern expands to empty}{3}
5575 %
5576 % \item \Go{\cmd{\ExcludeName} makes an xref pattern ending with
5577 % \texttt{!PN}; that pattern expands to \texttt{!x!}}{5}
5578 % \end{itemize}
5579 % \end{tcolorbox}
5580 % \medskip
5581 %
5582 % \begin{tcolorbox}
5583 % [colback=white,colframe=darkgray,
5584 % adjusted title={\bfseries\hfil \hypertarget{State 2}{State 2}: Only a Name Pattern Exists}]
5585 % \footnotesize
5586 % \begin{itemize}[leftmargin=1em,rightmargin=1em]
5587 % \item \Stay{\cmd{\IndexName} makes index page entry, creates
5588 % no name pattern control sequence}{2}
5589 %
5590 % \item \Stay{\cmd{\TagName} makes index tag, creates a pattern
5591 % ending in \texttt{!TAG}; \cmd{\UntagName} destroys it}{2}
5592 %
5593 % \item \Stay{\cmd{\PretagName} is doable, but not recommended
5594 % (that will create spurious entries)}{2}
5595 %
5596 % \item \Stay{Naming macro makes name pattern (\texttt{!MN} or
5597 % \texttt{!NF}), prints name, makes two index page entries}{2}
5598 %
5599 % \item \Stay{\cmd{\SubvertName} is redundant; it cannot create
5600 % a control sequence that already exists.}{2}
5601 %
5602 % \item \Stay{\cmd{\IndexRef} by itself does nothing because a
5603 % name pattern already exists}{2}
5604 %
5605 % \item \Go{\cmd{\ForgetName} destroys a name pattern ending in
5606 % \texttt{!MN}, \texttt{!NF}, or both at once}{1}
5607 %
5608 % \item \Go{\cmd{\SeeAlso}\cmd{\IndexRef} makes an xref pattern
5609 % ending with \texttt{!PN}; that pattern expands to empty}{4}
5610 %
5611 % \item \Go{\cmd{\ExcludeName} makes an xref pattern ending with
5612 % \texttt{!PN}, that pattern expands to \texttt{!x!}}{6}
5613 % \end{itemize}
5614 % \end{tcolorbox}
5615 % \medskip
5616 %
5617 % \begin{tcolorbox}
5618 % [colback=white,colframe=darkgray,
5619 % adjusted title={\bfseries\hfil \hypertarget{State 3}{State 3}: Only an Xref Pattern Exists}]
5620 % \footnotesize
5621 % \begin{itemize}[leftmargin=1em,rightmargin=1em]
5622 % \item \Stay{\cmd{\PretagName} is doable, but not recommended
5623 % (that will create spurious entries)}{3}
5624 %
5625 % \item \Stay{\cmd{\TagName}, \cmd{\UntagName}, \cmd{\IndexName},
5626 % \cmd{\IndexRef} (also with \cmd{\SeeAlso}), \cmd{\ExcludeName},
5627 % and \cmd{\IncludeName} do nothing}{3}
5628 %
5629 % \item \Stay{\cmd{\ForgetName} is redundant; it cannot destroy
5630 % a control sequence that does not exist.}{3}
5631 %
5632 % \item \Go{\cmd{\Includename*} destroys an extant xref pattern
5633 % (\texttt{!PN})}{1}
5634 %
5635 % \item \Go{Naming macro makes name pattern (\texttt{!MN} or
5636 % \texttt{!NF}), prints name, makes no index entries}{4}
5637 %
5638 % \item \Go{\cmd{\SubvertName} creates a name pattern ending
5639 % either in \texttt{!MN} or in \texttt{!NF}, or both at once}{4}
5640 % \end{itemize}
5641 % \end{tcolorbox}
5642 % \medskip
5643 %
5644 % \begin{tcolorbox}
5645 % [colback=white,colframe=darkgray,
5646 % adjusted title={\bfseries\hfil \hypertarget{State 4}{State 4}: Both Name and
5647 % Xref Patterns Exist}]
5648 % \footnotesize
5649 % \begin{itemize}[leftmargin=1em,rightmargin=1em]
5650 % \item \Stay{\cmd{\PretagName} is doable, but not recommended
5651 % (that will create spurious entries)}{4}
5652 %
5653 % \item \Stay{\cmd{\TagName}, \cmd{\UntagName}, \cmd{\IndexName},
5654 % \cmd{\IndexRef} (also with \cmd{\SeeAlso}), \cmd{\ExcludeName},
5655 % and \cmd{\IncludeName} do nothing}{4}
5656 %
5657 % \item \Stay{Naming macro makes name pattern (\texttt{!MN} or
5658 % \texttt{!NF}), prints name, makes no index entries}{4}
5659 %
5660 % \item \Stay{\cmd{\SubvertName} is redundant; it cannot create
5661 % a control sequence that already exists.}{4}
5662 %
5663 % \item \Go{\cmd{\Includename*} destroys an extant xref pattern
5664 % (\texttt{!PN})}{2}
5665 %
5666 % \item \Go{\cmd{\ForgetName} destroys a name pattern ending in
5667 % \texttt{!MN}, \texttt{!NF}, or both at once}{3}
5668 % \end{itemize}
5669 % \end{tcolorbox}
5670 % \medskip
5671 %
5672 % \begin{tcolorbox}
5673 % [colback=white,colframe=darkgray,
5674 % adjusted title={\bfseries\hfil \hypertarget{State 5}{State 5}: Only an Exclusion Exists}]
5675 % \footnotesize
5676 % \begin{itemize}[leftmargin=1em,rightmargin=1em]
5677 % \item \Stay{\cmd{\PretagName} is doable, but not recommended
5678 % (that will create spurious entries)}{5}
5679 %
5680 % \item \Stay{\cmd{\TagName}, \cmd{\UntagName}, \cmd{\IndexName},
5681 % \cmd{\IndexRef} (also with \cmd{\SeeAlso}), and
5682 % \cmd{\ExcludeName} do nothing}{5}
5683 %
5684 % \item \Stay{\cmd{\ForgetName} is redundant; it cannot destroy
5685 % a control sequence that does not exist.}{5}
5686 %
5687 % \item \Go{\cmd{\Includename}, \cmd{\Includename*} destroy xref
5688 % pattern ending with \texttt{!PN}, expanding to \texttt{!x!}}{1}
5689 %
5690 % \item \Go{Naming macro makes name pattern (\texttt{!MN} or
5691 % \texttt{!NF}), prints name, makes no index entries}{6}
5692 %
5693 % \item \Go{\cmd{\SubvertName} creates a name pattern ending either
5694 % in \texttt{!MN} or in \texttt{!NF}, or both at once}{6}
5695 % \end{itemize}
5696 % \end{tcolorbox}
5697 % \medskip
5698 %
5699 % \begin{tcolorbox}
5700 % [colback=white,colframe=darkgray,
5701 % adjusted title={\bfseries\hfil \hypertarget{State 6}{State 6}: Both Name Pattern and
5702 % Exclusion Exist}]
5703 % \footnotesize
5704 % \begin{itemize}[leftmargin=1em,rightmargin=1em]
5705 % \item \Stay{\cmd{\PretagName} is doable, but not recommended
5706 % (that will create spurious entries)}{6}
5707 %
5708 % \item \Stay{\cmd{\TagName}, \cmd{\UntagName}, \cmd{\IndexName},
5709 % \cmd{\IndexRef} (also with \cmd{\SeeAlso}), and
5710 % \cmd{\ExcludeName} do nothing}{6}
5711 %
5712 % \item \Stay{Naming macro makes name pattern (\texttt{!MN} or
5713 % \texttt{!NF}), prints name, makes no index entries}{6}
5714 %
5715 % \item \Go{\cmd{\Includename}, \cmd{\Includename*} destroy xref
5716 % pattern ending with \texttt{!PN}, expanding to \texttt{!x!}}{2}
5717 %
5718 % \item \Go{\cmd{\ForgetName} destroys a name pattern ending in
5719 % \texttt{!MN}, \texttt{!NF}, or both at once}{5}
5720 % \end{itemize}
5721 % \end{tcolorbox}
5722 %
5723 % \subsection{Using \texttt{\textbackslash noexpand}}
5724 % \label{sec:Noexpand}
5725 %
5726 % The natural-language approach of \textsf{nameauth}, combined with requirements of indexing, requires strict control over macro expansion. We use \cmd{\noexpand} in name arguments for the following reasons:
5727 % \begin{itemize}
5728 % \item A name uses the hyphenation of a foreign language via macros in name arguments.
5729 %
5730 % \item Name elements change within the local scope of formatting hooks, but remain uniform globally when generating index entries. This is the crux of alternate formatting (Section~\ref{sec:AltFormat}).
5731 %
5732 % \item A name specifically uses the alternate form of \cmd{\CapThis} via alternate formatting (Section~\ref{sec:AltCaps}).
5733 %
5734 % \item There is a possibility that macros in name arguments might expand unpredictably in different situations, resulting in spurious index entries and name pattern tests failing in some cases.
5735 % \end{itemize}
5736 %
5737 % If a macro is undefined, even putting \cmd{\noexpand} before it will cause an error unless the macro is detokenized or verbatim. To avoid some errors, one can apply macros separately to \meta{SNN} and \meta{Affix}:
5738 % \begin{Quote}
5739 % |\Name{\noexpand\MyMacro{|\meta{SNN}|},\noexpand\MyMacro{|\meta{Affix}|}}|
5740 % \end{Quote}
5741 %
5742 % \begin{Quotation}{\Einstein}
5743 % {Letter to \Name[Max]{Born}, 4 December 1928}
5744 % \de{Die Quantenmechanik ist sehr achtunggebietend. Aber eine innere
5745 % Stimme sagt mir, daß das noch nicht der wahre Jakob ist. Die Theorie
5746 % liefert viel, aber dem Geheimnis des Alten bringt sie uns kaum näher.
5747 % Jedenfalls bin ich überzeugt, daß der nicht würfelt.}
5748 %
5749 % (Quantum mechanics is quite significant. But an inner voice tells me
5750 % that it is not yet the right [path]. The theory delivers much, but
5751 % it brings us hardly any closer to the secret of God.
5752 % In any case, I am convinced that He does not throw dice.)
5753 % \index{scientists, quotes of\noexpand\string|hyperpage}
5754 % \end{Quotation}
5755 %
5756 % \newpage
5757 %
5758 % \subsection{Debugging Macros}
5759 % \label{sec:DebuggingMacros}
5760 %
5761 % These macros never grant users access to the full internal name patterns used by \textsf{nameauth}, but they do query those patterns. These macros help users identify how their intent to use the naming and other macros correlates with what the macros are seeing as input and how they are functioning.
5762 %
5763 % \DescribeMacro{\ShowPattern}
5764 % Although \cmd{\NameauthPattern} is useful in hooks when you want the pattern of the last name evaluated, \cmd{\ShowPattern} offers both that function, when called with a null argument, as well as the ability to display any pattern according to the name arguments provided to it:
5765 %
5766 % \begin{SyntaxBox}
5767 % \cmd{\ShowPattern}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
5768 % \cmd{\ShowPattern\{\}}
5769 % \end{SyntaxBox}
5770 %
5771 % \begin{itemize}
5772 % \item Let us refer to the name \LAeth. \cmd{\ShowPattern\{\}} now gives us the pattern: \ShowPattern{}. \cmd{\NameauthPattern} also: \NameauthPattern.\footnote{This again is due to using \textsf{inputenc} and \textsf{fontenc}.}
5773 %
5774 % \item |\ShowPattern[Hernando]{de~Soto}| prints: \ShowPattern[Hernando]{de~Soto}\JustIndex\Soto. Since the name arguments were evaluated, now \cmd{\ShowPattern\{\}} gives us the pattern: \ShowPattern{}.
5775 %
5776 % \item Section~\ref{sec:NameArgMacros} lists all the macros that change the current name pattern.
5777 % \end{itemize}
5778 %
5779 % \DescribeMacro{\ShowIdxPageref}
5780 % \cmd{\ShowIdxPageref} shows how macro arguments generate an index page reference, regardless of whether or not that page reference or cross-reference actually exists. Internally, it puts the indexing mechanism into a state that will print a full page reference in the text.
5781 %
5782 % \begin{SyntaxBox}
5783 % \cmd{\ShowIdxPageref\ }\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
5784 % \cmd{\ShowIdxPageref\{\}}
5785 % \end{SyntaxBox}
5786 %
5787 % Index styles, \cmd{\PretagName}, and \cmd{\TagName} affect the output of \cmd{\ShowIdxPageref}. Active characters and macros appear as they would be printed in the text, not as they may be represented in the \texttt{idx} file. One should check that too when debugging.
5788 %
5789 % In a normal \LaTeX\ document, for example, if we mention \LSoto\ after setting up a sort tag (Section~\ref{sec:IndexSort}), we get the following:
5790 % \begin{Quote}
5791 % \IndexActual{@}
5792 % \UntagName[Hernando]{de~Soto}
5793 % \ShowIdxPageref{}
5794 %
5795 % |\PretagName[Hernando]{de~Soto}{Desoto, Hernando}|\\
5796 % |\ShowIdxPageref[Hernando]{de~Soto}|
5797 % \end{Quote}
5798 %
5799 % A \texttt{dtx} file uses a different default for \cmd{\IndexActual} (Section~\ref{sec:IndexSort}). Since we tag all names in this \texttt{dtx} file with \cmd{\TagName} to have hyperlinked index page references (Section~\ref{sec:IndexTag}), we instead have here:
5800 % \begin{Quote}
5801 % \IndexActual{=}
5802 % \TagName[Hernando]{de~Soto}{\string|hyperpage}
5803 % \ShowIdxPageref{}
5804 %
5805 % |\ShowIdxPageref[Hernando]{de~Soto}|
5806 % \end{Quote}
5807 %
5808 % \newpage
5809 %
5810 % \DescribeMacro{\ShowIdxPageref*}
5811 % Throughout this manual, \cmd{\ShowIdxPageref*} illustrates basic index entries that do not contain sorting information or tags. The syntax is:
5812 %
5813 % \begin{SyntaxBox}
5814 % \cmd{\ShowIdxPageref*}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
5815 % \cmd{\ShowIdxPageref*\{\}}
5816 % \end{SyntaxBox}
5817 %
5818 % Regardless of whether we have a normal \LaTeX\ document or a \texttt{dtx} file, we get:\JustIndex\Soto
5819 % \begin{Quote}
5820 % |\ShowIdxPageref*[Hernando]{de~Soto}|\\
5821 % \ShowIdxPageref*{}
5822 % \end{Quote}
5823 %
5824 % \DescribeMacro{\ShowNameInfo}
5825 % Here we can see how the macros that take name arguments interpret them. We can check our intent against what the package actually sees as input. When we use a null argument, \cmd{\ShowNameInfo} uses the token registers that contain the arguments of the last name arguments that were evaluated.
5826 %
5827 % \begin{SyntaxBox}
5828 % \cmd{\ShowNameInfo}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
5829 % \cmd{\ShowNameInfo\{\}}
5830 % \end{SyntaxBox}
5831 %
5832 % Next we use \cmd{\ShowNameInfo} to illustrate detokenized name arguments from a number of names. This approach both prevents potential errors and discloses macros in name arguments. The ``Affix*'' and ``Alt*'' designations have an asterisk because, while those are the syntactic terms that describe name macro arguments, those terms do not describe the exact cultural meaning of their contents.
5833 % \begin{itemize}\small
5834 % \item \Name*[J.E.]{Carter, Jr.}[James Earl]\dotfill^^A
5835 % |\Name*[J.E.]{Carter, Jr.}[James Earl]|
5836 % \item[] \ShowNameInfo{}
5837 %
5838 % \item \Name*{Miyazaki, Hayao}[Sensei]\dotfill^^A
5839 % |\Name*{Miyazaki, Hayao}[Sensei]|
5840 % \item[] \ShowNameInfo{}
5841 %
5842 % \item \Name*{Elizabeth, I}[I, ``Gloriana'']\dotfill^^A
5843 % |\Name*{Elizabeth, I}[I, ``Gloriana'']|
5844 % \item[] \ShowNameInfo{}
5845 %
5846 % \item \Name*{Henry}[VIII]\ddag\dotfill |\Name*{Henry}[VIII]\ddag|
5847 % \item[] \ShowNameInfo{}
5848 %
5849 % \item \Name*{Confucius}\dotfill |\Name*{Confucius}|
5850 % \item[] \ShowNameInfo{}
5851 % \end{itemize}
5852 %
5853 % \NameArgWarning
5854 %
5855 % When using macros in name arguments, \cmd{\ShowNameInfo} may give different results, depending on the use of \cmd{\noexpand} and the name interface. Macros in name arguments may be displayed with trailing spaces because \textsf{nameauth} uses \cmd{\protected@edef} when parsing name elements. We show how to mitigate these issues. In the following name examples, we assume that the \cmd{\de} macro was defined to use \textsf{babel}, as in Section~\ref{sec:HyphNames}.
5856 % \begin{itemize}\footnotesize
5857 % \item The macro in these arguments expands, which can change name patterns.
5858 % \item[] \ShowNameInfo[John]{\de{Strietelmeier}}\\
5859 % |\ShowNameInfo[John]{\de{Strietelmeier}}|
5860 %
5861 % \item The macro in these arguments stays consistent due to \cmd{\noexpand}.
5862 % \item[] \ShowNameInfo[John]{\noexpand\de{Strietelmeier}}\\
5863 % |\ShowNameInfo[John]{\noexpand\de{Strietelmeier}}|
5864 % \end{itemize}
5865 %
5866 % \begin{Quote}
5867 % \begin{Verbatim}
5868 % \begin{nameauth}
5869 % \< Striet & John & \noexpand\de{Strietelmeier} & >
5870 % \end{nameauth}
5871 % \NameAddInfo[John]{\noexpand\de{Strietelmeier}}
5872 % {professor}
5873 % \end{Verbatim}
5874 % \end{Quote}
5875 %
5876 % \NameAddInfo[John]{\noexpand\de{Strietelmeier}}
5877 % {professor}
5878 % \begin{itemize}
5879 % \item \ForgetThis \Striet\dotfill \cmd{\Striet}\\
5880 % With the first use of the name, we note the info.
5881 % \begin{itemize}
5882 % \item \NameQueryInfo{}\dotfill |\NameQueryInfo{}|
5883 % \item \ShowPattern{}\dotfill |\ShowPattern{}|
5884 % \item \ShowNameInfo{}\dotfill |\ShowNameInfo{}|
5885 % \end{itemize}
5886 %
5887 % \item \Striet\dotfill \cmd{\Striet}\\
5888 % The name is repeated; the same pattern recurs.
5889 % \begin{itemize}
5890 % \item \NameQueryInfo{}\dotfill |\NameQueryInfo{}|
5891 % \item \ShowPattern{}\dotfill |\ShowPattern{}|
5892 % \item \ShowNameInfo{}\dotfill |\ShowNameInfo{}|
5893 % \end{itemize}
5894 %
5895 % \item \Name[John]{\noexpand\de{Strietelmeier}}\dotfill^^A
5896 % |\Name[John]{\noexpand\de{Strietelmeier}}|\\
5897 % We use the same name again, but with the basic interface.
5898 % The name pattern still works, but \cmd{\ShowNameInfo}
5899 % expands the arguments after pulling them from the internal
5900 % token registers. We no longer refer to these registers for
5901 % use in customization in order to avoid errors.
5902 % \begin{itemize}\footnotesize
5903 % \item \NameQueryInfo{}\dotfill |\NameQueryInfo{}|
5904 % \item \ShowPattern{}\dotfill |\ShowPattern{}|
5905 % \item \ShowNameInfo{}\\
5906 % |\ShowNameInfo{}|
5907 % \end{itemize}
5908 %
5909 % \item \Name[John]{\noexpand\de{Strietelmeier}}\dotfill^^A
5910 % |\Name[John]{\noexpand\de{Strietelmeier}}|\\
5911 % This expansion is hidden when using full name arguments everywhere.
5912 % \begin{itemize}
5913 % \item \NameQueryInfo[John]{\noexpand\de{Strietelmeier}}\\
5914 % |\NameQueryInfo[John]{\noexpand\de{Strietelmeier}}|
5915 % \item \ShowPattern[John]{\noexpand\de{Strietelmeier}}\\
5916 % |\ShowPattern[John]{\noexpand\de{Strietelmeier}}|
5917 % \item \ShowNameInfo[John]{\noexpand\de{Strietelmeier}}\\
5918 % |\ShowNameInfo[John]{\noexpand\de{Strietelmeier}}|
5919 % \end{itemize}
5920 % \end{itemize}
5921 %
5922 % Thus, we rely on \cmd{\NameauthPattern} for name-related information instead of re-parsing name arguments. That is how recent versions of \cmd{\NameQueryInfo} work, simplifying the use of name tags in formatting hooks (Sections~\ref{sec:DataTags} and~\ref{sec:DataTagHooks}).
5923 %
5924 % \newpage
5925 %
5926 % Below we activate alternate formatting (Section~\ref{sec:AltFormat}) and use name forms seen in European academic writing.
5927 % \begin{AltFormatZone}
5928 % \begin{itemize}
5929 % \item \ForgetThis \Cath
5930 % \item[] \ShowNameInfo{}
5931 %
5932 % \item \ForgetThis \Luth
5933 % \item[] \ShowNameInfo{}
5934 % \end{itemize}
5935 % \end{AltFormatZone}
5936 %
5937 % \phantomsection
5938 % \label{page:NameState}
5939 % \DescribeMacro{\ShowNameState}
5940 % With these macros we can see in plain text the name pattern, the name type, the current index state of the name,
5941 % \DescribeMacro{\ShowNameState*}
5942 % and all the systems with which its pattern is associated. The un-starred form prints the information in one long line of text. The starred form prints five shorter lines of text, each ending with |\par|. As with other macros in this section, these macros can have null arguments.
5943 %
5944 % \begin{SyntaxBox}
5945 % \cmd{\ShowNameState}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
5946 % \cmd{\ShowNameState\{\}}\\[1ex]
5947 % \cmd{\ShowNameState*}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
5948 % \cmd{\ShowNameState*\{\}}
5949 % \end{SyntaxBox}
5950 % Here is the key to understanding the output of these macros:
5951 % \begin{itemize}[leftmargin=4.3em]
5952 % \item[Pattern:] The base name pattern shown by \cmd{\NameauthPattern}.
5953 %
5954 % \item[Type:] The category of the name; how the name arguments were parsed:
5955 % \begin{itemize}[leftmargin=4.6em]
5956 % \item[w :] Western name
5957 % \item[nw :] Non-Western name, current syntax
5958 % \item[nw,os :] Non-Western name, obsolete syntax (Section~\ref{sec:Obsolete})
5959 % \end{itemize}
5960 %
5961 % \item[State:] The index state, as defined in Section~\ref{sec:RuleStates}:
5962 % \begin{itemize}[leftmargin=4.6em]
5963 % \item[states :] 1, 2, 3, 4, 5, and 6
5964 % \end{itemize}
5965 %
5966 % \item[Systems:] All the control systems (Section~\ref{sec:NamePatterns}) that the name pattern inhabits, including front matter, main matter, cross-references, excluded cross-references, index sorting tags, index tags, and name database tags:
5967 % \begin{itemize}[leftmargin=4.6em]
5968 % \item[systems :] front, main, xref, excl, pretag, idxtag, namedb.
5969 % \end{itemize}
5970 % \end{itemize}
5971 % We begin by showing info about some unused names that will not appear in the index. We add margin notes using \cmd{\ShowNameState*}, while using \cmd{\ShowNameState} in the body text.
5972 % \begin{itemize}
5973 % \item |\ShowNameState[Hieronymus]{Bosch}|\\
5974 % \ShowNameState[Hieronymus]{Bosch}
5975 % \Info[-11.5ex]{\ShowNameState*{}}
5976 % \item |\ShowNameState{Tamerlane}|\\
5977 % \ShowNameState{Tamerlane}
5978 % \Info[-7.5ex]{\ShowNameState*{}}
5979 % \end{itemize}
5980 %
5981 % \newpage
5982 %
5983 % Now we display the info for new and extant names in the text.\footnote{In a \texttt{dtx} file, with the \textsf{ltxdoc} class and \textsf{hypdoc} package, we tag all names in the index with hyperlinks (Section~\ref{sec:SpecialTag}). Otherwise, names need not have a pattern in the \texttt{idxtag} system.}
5984 % \begin{itemize}
5985 % \item \Name*[Rudolph]{Carnap}\dotfill |\Name*[Rudolph]{Carnap}|\\
5986 % \ShowNameState{}
5987 % \Info[-9ex]{\ShowNameState*{}}
5988 %
5989 % \item \Name*{Henry, VIII}\dotfill |\Name*{Henry, VIII}|\\
5990 % \ShowNameState{}
5991 % \Info[-5.5ex]{\ShowNameState*{}}
5992 %
5993 % \item \NamesInactive\Name*{Henry}[VIII]\ddag\NamesActive \dotfill^^A
5994 % |\NamesInactive|\\
5995 % \hbox{}\hfill|\Name*{Henry}[VIII]\ddag|\\
5996 % \hbox{}\hfill|\NamesActive|\\
5997 % \ShowNameState{}
5998 % \Info[-7.5ex]{\ShowNameState*{}}
5999 %
6000 % \item \Name*{Thomas, à~Kempis}\dotfill |\Name*{Thomas, à~Kempis}|
6001 % \item[] \ShowNameState{}\footnote{This again is due to using \textsf{inputenc} and \textsf{fontenc}.}
6002 % \Info[-8ex]{\ShowNameState*{}}
6003 % \end{itemize}
6004 % Here is a name used only in a cross-reference:\footnote{Here we should populate the name arguments because the name has not appeared in the text.}
6005 % \begin{itemize}
6006 % \item |\IndexRef{Sun King}{Louis XIV}|\IndexRef{Sun King}{Louis XIV}\\
6007 % \ShowNameState{Sun King}
6008 % \Info[-7ex]{\ShowNameState*{}}
6009 % \end{itemize}
6010 % Next is a name displayed after a cross-reference exists:\footnote{If the name is printed and \cmd{\ShowNameState} follows immediately, we can use a null argument.}
6011 % \begin{itemize}
6012 % \item \Name*{Sun King}\dotfill |\Name*{Sun King}|\\
6013 % \ShowNameState{}
6014 % \Info[-7.5ex]{\ShowNameState*{}}
6015 % \end{itemize}
6016 % The following is an unused name excluded from the index:\footnote{Here we should populate the name arguments because the name has not appeared in the text.}
6017 % \begin{itemize}
6018 % \item |\ExcludeName{Santa, Claus}|\ExcludeName{Santa, Claus}\\
6019 % \ShowNameState{Santa, Claus}
6020 % \Info[-7.5ex]{\ShowNameState*{}}
6021 % \end{itemize}
6022 % Finally we have a previously excluded name used in the text:\footnote{If the name is printed and \cmd{\ShowNameState} follows immediately, we can use a null argument.}
6023 % \begin{itemize}
6024 % \item \Name{Santa, Claus}\dotfill |\Name{Santa, Claus}|\\
6025 % \ShowNameState{}
6026 % \Info[-7.5ex]{\ShowNameState*{}}
6027 % \end{itemize}
6028 %
6029 % \ReturnLink
6030 %
6031 % \begin{Quotation}{\Name[L.M.]{Montgomery}}
6032 % {\Title{Anne of Green Gables}, C 5 (1908)}
6033 % I read in a book once that a rose by any other name would smell as
6034 % sweet, but I've never been able to believe it. I don't believe a rose
6035 % \textsc{would} be as nice if it was called a thistle or a skunk cabbage.
6036 % \index{creatives, quotes of\noexpand\string|hyperpage}
6037 % \index{Rose, references to\noexpand\string|hyperpage}
6038 % \end{Quotation}
6039 %
6040 % \newpage
6041 %
6042 % \section{Indexing Macros}
6043 % \label{sec:Indexing}
6044 %
6045 % This section draws on what we have seen so far and applies that knowledge to creating indexes of names via the \textsf{nameauth} package macros, not indexing in general.
6046 %
6047 % \subsection{General Control}
6048 % \label{sec:GeneralIndex}
6049 %
6050 % Before we get to the topics of index entries and cross-references, we cover those macros that globally affect the indexing of names.
6051 %
6052 % \subsubsection{Toggle Indexing}
6053 %
6054 % \DescribeMacro{\IndexInactive}
6055 % \cmd{\IndexInactive} deactivates the indexing functions of the naming macros, as well as \cmd{\IndexName}, and \cmd{\IndexRef}.
6056 % \DescribeMacro{\IndexActive}
6057 % \cmd{\IndexActive} enables indexing. These can be used throughout the document. They do not affect indexing apart from \textsf{nameauth} names.
6058 % \begin{itemize}
6059 % \item \cmd{\IndexInactive} broadly suppresses \cmd{\IndexName}, \cmd{\IndexRef}, and the indexing components of naming macros, \cmd{\AKA}, and \cmd{\PName}.
6060 %
6061 % \item For a fine degree of control, see Section~\ref{sec:IdxFine}.
6062 % \end{itemize}
6063 %
6064 % \Global \cmd{\IndexActive} and \cmd{\IndexInactive} can be used as a pair or singly within a group. They have top priority (Section~\ref{sec:Priorities}). Use \cmd{\global} to force a global effect.
6065 %
6066 % \subsubsection{Multiple Indexes}
6067 %
6068 % \DescribeMacro{\NameauthIndex}
6069 % \LaTeX\ has various ways to produce multiple indexes; see \href{https://www.texfaq.org/FAQ-multind}{\bfseries this page}. \cmd{\NameauthIndex} is the indexing hook defined by default as \cmd{\index}. Users can redefine this hook for use with multiple indexes. Below we use the \textsf{index} package to do this.
6070 % \Info[4ex]{\hrule\strut Here we test indexing rules:\break
6071 % \Name{Yamaha, Torakusu}\label{page:Idx1}\break
6072 % create index entry:\break
6073 % \cmd{\IndexName}\texttt{\{Nippon Gakki\}}\IndexName{Nippon Gakki}\strut\hrule}
6074 %^^A
6075 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test07_01.tex}\else
6076 % \edef\NameauthTestFile{\jobname.tmp}\fi
6077 %^^A
6078 % \begin{VerbatimOut}{\NameauthTestFile}
6079 % \documentclass{article}
6080 % \input{compat.tex} % Included with nameauth for compatibility.
6081 %
6082 % \usepackage{makeidx} % Must have for defining \seealso macro.
6083 % \usepackage{index}
6084 % \usepackage{nameauth}
6085 %
6086 % \makeindex % Default index
6087 % \newindex{per}{rdx}{rnd}{Index of Persons} % Other index
6088 % \renewcommand*\NameauthIndex{\index[per]}
6089 %
6090 % \begin{document}
6091 % The Electric Boogaloo\index{Boogaloo, Electric} % main index
6092 % was created by \Name{Ollie~\& Jerry}. % name index
6093 %
6094 % \printindex[per] % Shows the entry: Ollie & Jerry, 1
6095 %
6096 % \renewcommand\indexname{Index of Subjects}
6097 % \printindex % Shows the entry: Boogaloo, Electric, 1
6098 % \end{document}
6099 % \end{VerbatimOut}
6100 %^^A
6101 % \begin{Quote}
6102 % \VerbatimInput[gobble=0]{\NameauthTestFile}
6103 % \end{Quote}
6104 %
6105 % \newpage
6106 %
6107 % \subsubsection{Verbose Warnings}
6108 %
6109 % \DescribeMacro{\IndexWarnVerbose}
6110 % As with many of the other options in \textsf{nameauth}, we have added two macros that toggle verbose index warnings like the \texttt{verbose} option (default is terse).
6111 % \DescribeMacro{\IndexWarnTerse}
6112 % To disable verbose warnings, use \cmd{\IndexWarnTerse}. To enable verbose warnings, use the \texttt{verbose} option or \cmd{\IndexWarnVerbose}.
6113 %
6114 % \Global \cmd{\IndexWarnVerbose} and \cmd{\IndexWarnTerse} can be used as a pair or singly within a group. They have the same priority as the \texttt{verbose} option, but they do not affect what is displayed in the document. Use \cmd{\global} to force a global effect.
6115 %
6116 % \subsubsection{Index Protection}
6117 %
6118 % \DescribeMacro{\IndexProtect}
6119 % This macro prevents naming macros from producing output, both in the text and in the index. It is local in scope. Its primary use is to prevent errors in the index, in case the naming macros get passed as arguments to themselves or passed into index entries by mistake. The core naming engine uses internal locks to protect against this problem in the text.
6120 % One can use \cmd{\IndexProtect} right before \cmd{\printindex} to protect the index against bogus output. For example:
6121 % \Info[4ex]{\hrule\strut Here we test indexing rules:\break
6122 % \Name{Yamaha, Torakusu}\label{page:Idx2}\strut\hrule}
6123 % \begin{itemize}
6124 % \item |\Name{foo\Name{bar}}| in the text generates \Name{foo\Name{bar}}. Notice that the internal locks prevent |\Name{bar}| from producing output in the text.
6125 %
6126 % \item The first \LaTeX\ pass creates |\indexentry{foo\Name {bar}}| in the \texttt{idx} file. With enough passes of \LaTeX\ and \texttt{makeindex}, in the \texttt{ind} file we get both |\item foo\Name {bar}| from the text and an additional |\item bar| from the macro executed in the index.
6127 %
6128 % \item That gives one index entry ``foo{\NamesFormat bar}'' and another entry ``bar''.
6129 %
6130 % \item Using \cmd{\IndexProtect} \cmd{\printindex} still permits the index entry generated by |\item foo\Name {bar}|, but it does not allow |\Name {bar}| to generate any output or additional entries in the index.
6131 %
6132 % \item We get only one entry ``foo'', similar to what we see in the text.\footnote{We add the index tag \S\ to this example to show that it is a made-up name.}
6133 % \end{itemize}
6134 %
6135 % \subsection{Page Entries}
6136 % \label{sec:IndexPageno}
6137 %
6138 % \DescribeMacro{\IndexName}
6139 % The internal version of this macro is used also by the naming macros. This is the user interface to create index page entries in the same way that the naming macros do. \cmd{\IndexName} prints nothing in the body text.
6140 %
6141 % \begin{SyntaxBox}
6142 % \cmd{\IndexName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
6143 % \end{SyntaxBox}
6144 %
6145 % If \meta{FNN} is present, it ignores \meta{Alternate} for Western and ``native'' Eastern name forms. If \meta{FNN} is absent, \cmd{\IndexName} can use either the current or the obsolete Non-Western syntax (Section~\ref{sec:Obsolete}). Indexing follows guidelines in [\hyperlink{Mulvany}{Mulvany}, 152--82]. The following points also deal with macros explained in Section~\ref{sec:IdxPrefix}.
6146 % \begin{itemize}
6147 % \item \cmd{\IndexName} obeys both \cmd{\IndexInactive} and \cmd{\IndexActive}, which are used to deactivate and activate indexing.
6148 %
6149 % \item \cmd{\IndexName} does not obey \cmd{\SkipIndex}. The latter only works with macros that display a name in the text, which \cmd{\IndexName} does not.
6150 %
6151 % \item \cmd{\IndexName} will not make page entries for any names that are excluded by \cmd{\ExcludeName}. Nor will it make entries names that have been used to create cross-references.
6152 %
6153 % \item \cmd{\IndexName} resets the effects of both \cmd{\SeeAlso} and \cmd{\SkipIndex} unless one uses the \texttt{oldreset} option.
6154 %
6155 % \item Section~\ref{sec:IdxPrefix} shows behavior among \cmd{\SkipIndex}, \cmd{\JustIndex}, and the naming macros that differs from the same macros and \cmd{\IndexName}.
6156 % \end{itemize}
6157 %
6158 % \subsection{Cross-References}
6159 % \label{sec:IndexRef}
6160 %
6161 % Index cross-references have two kinds. \textit{See} references only point from a name to other name entries containing page entries. \textit{See also} references occur at the end of an entry with page entries or sub-entries.
6162 %
6163 % \subsubsection[Basic Macro]{Basic Macros for Both Kinds of Xrefs}
6164 %
6165 % \DescribeMacro{\IndexRef}
6166 % By default, \cmd{\IndexRef} creates a \textit{see} reference from the name defined by its first three arguments to the target in its final argument. To create a \textit{see also} reference, one must precede it with \cmd{\SeeAlso} (Section~\ref{sec:IdxPrefix}). Thus, the two forms used are:
6167 %
6168 % \begin{SyntaxBox}
6169 % \phantom{\cmd{\SeeAlso}}\cmd{\IndexRef}\oarg{FNN}\marg{SNN^^A
6170 % \textbf{,}Affix}\oarg{Alt.}\marg{Target}\\
6171 % \cmd{\SeeAlso}\cmd{\IndexRef}\oarg{FNN}\marg{SNN^^A
6172 % \textbf{,}Affix}\oarg{Alt.}\marg{Target}
6173 % \end{SyntaxBox}
6174 %
6175 % Although it might be redundant to point this out, in practice, when using \cmd{\IndexName} and \cmd{\IndexRef}, one might forget that the latter has four arguments, at least two of which are required. Missing text and bad xrefs can result.
6176 % \begin{itemize}
6177 % \item Define \textit{see} references \emph{before} making any \cmd{\Name} entries for them.
6178 %
6179 % \Info[-2ex]{\hrule\strut Here we test indexing rules:\break
6180 % Creating \textit{see also} xref\break\footnotesize
6181 % \cmd{\SeeAlso}\cmd{\IndexRef}\break\ttfamily
6182 % \{Yamaha, Torakusu\}\break
6183 % \{Nippon Gakki\}\SeeAlso\IndexRef{Yamaha, Torakusu}{Nippon Gakki}^^A
6184 % \label{page:Idx3}\strut\hrule}
6185 %
6186 % \item Define \textit{see also} references \emph{after} all \cmd{\Name} instances to the respective names have been created.
6187 %
6188 % \item \cmd{\IndexRef} will not alter or repeat extant cross-references.
6189 %
6190 % \item \cmd{\IndexRef} will not cross-reference names excluded by \cmd{\ExcludeName}.
6191 %
6192 % \item \cmd{\IndexRef} will not add a \textit{see} cross-reference that would map also to an extant name pattern, unless one uses the \texttt{oldsee} option. See Section~\ref{sec:RuleStates} for a state diagram that explains this in detail. A page entry usually correlates with a name pattern, but that may not always be the case. We check for a control sequence (name pattern).
6193 %
6194 % \item \cmd{\IndexName} resets the effects of both \cmd{\SeeAlso} and \cmd{\SkipIndex}, unless one uses the \texttt{oldreset} option.
6195 %
6196 % \item To have multiple names and cross-references interact, see Section~\ref{sec:IdxVariants}.
6197 %
6198 % \item To manage multiple sub-entries, see Section~\ref{sec:CatSub}.
6199 % \end{itemize}
6200 %
6201 % \newpage
6202 %
6203 % \cmd{\IndexRef} prints nothing in the text. The name parsing is like \cmd{\IndexName}. The final argument is not checked in any way. For example:
6204 % \begin{Quote}
6205 % \PatInfo[3.5ex]{\ShowPattern{Sun King}!PN}
6206 % \begin{tabular}{ll}
6207 % source: & \cmd{\IndexRef}\texttt{\{Sun King\}\{Louis XIV\}}^^A
6208 % \IndexRef{Sun King}{Louis XIV}\\[0.5ex]
6209 % index: & Sun King \textit{see} Louis XIV\\
6210 % \end{tabular}
6211 % \end{Quote}
6212 %
6213 % \cmd{\IndexRef} will not merge multiple cross-references and it will not allow more than one cross-reference. For multiple cross-references one must use something like the following example, or create manual index entries:
6214 % \begin{Quote}
6215 % \begin{tabular}{ll}
6216 % source: & |\IndexRef{bar}{baz; foo}|\\[0.5ex]
6217 % index: & bar, \textit{see} baz; foo\\
6218 % \end{tabular}
6219 % \end{Quote}
6220 %
6221 % \subsubsection[Fine Control]{Fine Control of Xref Logic}
6222 % \label{sec:IdxFine}
6223 %
6224 % The index control logic for cross-references can establish fine-grained control that excludes individual names. We trade more macros for more automation.
6225 %
6226 % \DescribeMacro{\ExcludeName}
6227 % We can prevent a name from being used as either an index entry or as an index cross-reference. This macro will not exclude extant cross-references:
6228 %
6229 % \begin{SyntaxBox}
6230 % \cmd{\ExcludeName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
6231 % \end{SyntaxBox}
6232 %
6233 % Unlike \cmd{\IndexInactive} and \cmd{\IndexActive}, which affect all \textsf{nameauth} indexing, \cmd{\ExcludeName} only excludes a specific name from being printed as a page entry or cross-reference in the index. See the following example, as well as examples in Sections~\ref{sec:NameParticles} and \ref{sec:VarNames}. Indexing remains active:
6234 %^^A
6235 % \begin{VerbatimOut}{\jobname.tmp}
6236 % \ExcludeName{Mr. Baseball}
6237 % In this example we cannot get page entries for
6238 % \Name{Mr. Baseball}, the nickname of
6239 % \Name[Bob]{Uecker}, because it was excluded.
6240 % \end{VerbatimOut}
6241 %^^A
6242 % \begin{Quote}
6243 % \PatInfo[4ex]{\ShowPattern{Mr. Baseball}!PN\break
6244 % \ShowPattern[Bob]{Uecker}!MN}
6245 % \VerbatimInput[gobble=0]{\jobname.tmp}
6246 %
6247 % \input{\jobname.tmp}
6248 % \end{Quote}
6249 %
6250 % \DescribeMacro{\IncludeName}
6251 % Use the following macros to break a few indexing rules. They remove protections used for exclusion and cross-referencing.
6252 % \DescribeMacro{\IncludeName*}
6253 % They have the same syntax as \cmd{\ExcludeName}:
6254 %
6255 % \begin{SyntaxBox}
6256 % \cmd{\IncludeName\ }\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
6257 % \cmd{\IncludeName*}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
6258 % \end{SyntaxBox}
6259 %
6260 % \cmd{\IncludeName} removes an exclusion attached to a name by \cmd{\ExcludeName}. \cmd{\IncludeName*} completely erases both exclusion and cross-reference information. Once that protection is removed, one can create page entries to a name in the index that had been used as a cross-reference.
6261 %
6262 % Analogously, \cmd{\ForgetName} (Section~\ref{sec:NameControl}) removes name patterns, allowing one to create a cross-reference. Section~\ref{sec:RuleStates} explains this behavior as a set of states. Below we run some tests (cf. Section~\ref{sec:NameTests}).
6263 %^^A
6264 % \begin{VerbatimOut}{\jobname.tmp}
6265 % \begin{itemize}
6266 % \item \Name*{Mr. Baseball} is
6267 % \IfAKA{Mr. Baseball}
6268 % {\meta{an xref}}{\meta{a name}}{\meta{excluded}}.
6269 %
6270 % \item Making an xref fails.\IndexRef{Mr. Baseball}{Uecker, Bob}
6271 % \Name*{Mr. Baseball} is still
6272 % \IfAKA{Mr. Baseball}
6273 % {\meta{an xref}}{\meta{a name}}{\meta{excluded}}.
6274 %
6275 % \item The inclusion macro\IncludeName{Mr. Baseball} makes it
6276 % \IfAKA{Mr. Baseball}
6277 % {\meta{an xref}}{\meta{a name}}{\meta{excluded}}.
6278 % Now we could create page entries with a naming macro.
6279 %
6280 % \item Instead, we forget the name\ForgetName{Mr. Baseball}
6281 % to destroy the name pattern that governs the name. It is now
6282 % \IfAKA{Mr. Baseball}
6283 % {\meta{an xref}}
6284 % {\IfMainName{Mr. Baseball}{\meta{extant}}
6285 % {\IfFrontName{Mr. Baseball}{\meta{extant}}
6286 % {\meta{destroyed}}}}
6287 % {\meta{excluded}}.
6288 %
6289 % \item Making another xref\IndexRef{Mr. Baseball}{Uecker, Bob}
6290 % creates \IfAKA{Mr. Baseball}
6291 % {\meta{an xref}}{\meta{a name}}{\meta{excluded}}.
6292 % \end{itemize}
6293 % \end{VerbatimOut}
6294 %^^A
6295 % \begin{Quote}
6296 % \Info[3ex]{\hrule\strut Here we test indexing rules:\break
6297 % \Name{Yamaha, Torakusu}\label{page:Idx4}\strut\hrule}
6298 % \VerbatimInput[gobble=0]{\jobname.tmp}
6299 % \end{Quote}
6300 %
6301 % \input{\jobname.tmp}
6302 %
6303 % Cross-references get more protection than exclusions:
6304 % \PatInfo[3ex]{\ShowPattern[J.D.]{Rockefeller, IV}!MN\break
6305 % \ShowPattern[Jay]{Rockefeller}!PN\break
6306 % \ShowPattern[Jay]{Rockefeller}!MN}
6307 % \begin{VerbatimOut}{\jobname.tmp}
6308 % \begin{itemize}
6309 % \item \DropAffix\LJRIV[Jay] was indexed as
6310 % ``\ShowIdxPageref*[J.D.]{Rockefeller, IV}.''
6311 %
6312 % \item We create the
6313 % xref\IndexRef[Jay]{Rockefeller}{Rockefeller, J.D., IV}.
6314 %
6315 % \item The test calls \SJRIV[Jay] an
6316 % \IfAKA[Jay]{Rockefeller}{\meta{xref}}{\meta{name}}{}.
6317 %
6318 % \item After being ``included''\IncludeName[Jay]{Rockefeller}
6319 % he still is an
6320 % \IfAKA[Jay]{Rockefeller}{\meta{xref}}{\meta{name}}{}.
6321 %
6322 % \item After ``forced inclusion''\IncludeName*[Jay]{Rockefeller}
6323 % he can be a \IfAKA[Jay]{Rockefeller}{\meta{xref}}{\meta{name}}{}
6324 % and create page entries.
6325 % \end{itemize}
6326 % \end{VerbatimOut}
6327 %^^A
6328 % \begin{Quote}
6329 % \VerbatimInput[gobble=0,lastline=14]{\jobname.tmp}
6330 %
6331 % \VerbatimInput[gobble=0,firstline=15]{\jobname.tmp}
6332 % \end{Quote}
6333 %
6334 % \input{\jobname.tmp}
6335 %
6336 % \begin{InfoBox}
6337 % Using \cmd{\IncludeName*} is necessary when creating index sub-entries for a name using \cmd{\IndexTag}. If one creates a cross-reference in any sub-entry of a name, \cmd{\IncludeName*} will permit additional page entries to be made for the other sub-entries of that name or for the name itself. See Section~\ref{sec:CatSub}.
6338 % \end{InfoBox}
6339 %
6340 % \subsection[Prefix Macros]{Prefix Macros Used for Indexing}
6341 % \label{sec:IdxPrefix}
6342 %
6343 % Indexing macros ignore Boolean flags meant for naming macros. Yet there are three prefix macros that affect indexing: \cmd{\SeeAlso}, \cmd{\SkipIndex}, and \cmd{\JustIndex}.
6344 %
6345 % \DescribeMacro{\SeeAlso}
6346 % Put \cmd{\SeeAlso} before \cmd{\IndexRef}, \cmd{\AKA}, and \cmd{\PName} (Section~\ref{sec:AKA}) to make a \textit{see also} reference for a name that has appeared already in the index. If enabled before invoking \cmd{\PName}, \cmd{\SeeAlso} will be disabled when the regular name is generated, then enabled when the cross-reference is generated.
6347 %^^A
6348 % \Info[3ex]{\hrule\strut Here we test indexing rules:\break
6349 % \Name{Nippon Gakki}\label{page:Idx5}\strut\hrule}
6350 % \begin{VerbatimOut}{\jobname.tmp}
6351 % One can refer to \Name[the]{Rat Pack} as a group of entertainers
6352 % including \Name[Sammy]{Davis, Jr.}, \Name[Dean]{Martin}, and
6353 % \Name[Frank]{Sinatra}. No more page entries for
6354 % \Name*[the]{Rat Pack} will occur after this line, and a
6355 % \textit{see also} xref will exist.
6356 % \SeeAlso\IndexRef[the]{Rat Pack}
6357 % {Davis, Sammy, Jr.; Martin, Dean; Sinatra, Frank}
6358 % \end{VerbatimOut}
6359 %^^A
6360 % \begin{Quote}
6361 % \VerbatimInput[gobble=0]{\jobname.tmp}
6362 %
6363 % \input{\jobname.tmp}
6364 % \end{Quote}
6365 %
6366 % Currently \cmd{\IndexName} and other \textsf{nameauth} macros that create index entries will reset the Boolean flag governed by \cmd{\SeeAlso} unless one uses the \texttt{oldreset} option. preventing a stray use of the macro from affecting the index.
6367 %
6368 % \DescribeMacro{\SkipIndex}
6369 % The prefix macro \cmd{\SkipIndex} will suppress indexing for just one instance of a name displayed by a naming macro. |\SkipIndex\Name[Monty]{Python}| produces \SkipIndex\Name[Monty]{Python} in the text, but with no index entry. \cmd{\SkipIndex} works with the naming macros. Side effects include:
6370 % \begin{itemize}
6371 % \item Unless the \texttt{oldreset} option is used, both \cmd{\IndexName} and \cmd{\IndexRef} issue warnings if \cmd{\SkipIndex} precedes them. Then, both \cmd{\IndexName} and \cmd{\IndexRef} ignore \cmd{\SkipIndex} and reset its flag.
6372 %
6373 % \item When the \texttt{oldreset} option is used, both \cmd{\PName} and \cmd{\PName*} issue warnings when {\ttfamily \string \if@nameauth@SkipIndex} is true on exit.
6374 % \end{itemize}
6375 %
6376 % \DescribeMacro{\JustIndex}
6377 % This prefix macro makes \cmd{\Name}, \cmd{\Name*}, \cmd{\FName}, and the quick interface shorthand macros act similar to \cmd{\IndexName}. \cmd{\JustIndex} suppresses name output in the text, but flags for long and first name forms are reset as if the naming macro had produced output. Using the \texttt{oldreset} option prevents these flags from being reset, completely mimicking a call to \cmd{\IndexName}.
6378 % \begin{Center}
6379 % \begin{tabular}{lll}\toprule
6380 % \rowcolor{nagrey}^^A
6381 % \bfseries Option & \bfseries Text & \bfseries Macros\\
6382 %
6383 % default & \JustIndex\SWash \Wash & |\JustIndex\SWash \Wash|\\
6384 %
6385 % default & \JustIndex\LWash \Wash & |\JustIndex\LWash \Wash|\\
6386 %
6387 % \rowcolor{nagrey}^^A
6388 % \makeatletter\global\@nameauth@OldPasstrue\makeatother^^A
6389 % \ttfamily oldpass & \JustIndex\SWash \Wash &
6390 % |\JustIndex\SWash \Wash|\\
6391 % \rowcolor{nagrey}^^A
6392 % \ttfamily oldpass & \JustIndex\LWash \Wash &
6393 % |\JustIndex\LWash \Wash|\\\bottomrule
6394 % \makeatletter\global\@nameauth@OldPassfalse\makeatother^^A
6395 % \end{tabular}
6396 % \end{Center}
6397 %
6398 % There are potential side effects related to \cmd{\JustIndex}:
6399 % \begin{itemize}
6400 % \item Both \cmd{\AKA} and \cmd{\PName} ignore \cmd{\JustIndex} and go on about their business. They also set \cmd{\@nameauth@JustIndexfalse}.
6401 %
6402 % \item \cmd{\JustIndex} resets the flags set by \cmd{\ForgetThis} and \cmd{\SubvertThis}, preventing them from passing through.
6403 %
6404 % \item The following three lines are equivalent:
6405 % \phantomsection
6406 % \Info[2ex]{\hrule\strut Here we test indexing rules:\break
6407 % Creating \textit{see} xref\break\footnotesize
6408 % \cmd{\IndexRef}\ttfamily \{Nippon Gakki\}\break
6409 % \{Yamaha Corp.\}^^A
6410 % \IndexRef{Nippon Gakki}{Yamaha Corp.}^^A
6411 % \label{page:Idx6}\strut\hrule}
6412 % \begin{itemize}
6413 % \item\cmd{\JustIndex} \cmd{\SkipIndex}
6414 % \cmd{\Name\{A\}} \cmd{\Name\{B\}}
6415 %
6416 % \item\cmd{\SkipIndex} \cmd{\JustIndex}
6417 % \cmd{\Name\{A\}} \cmd{\Name\{B\}}
6418 %
6419 % \item\cmd{\JustIndex} \cmd{\Name\{A\}}
6420 % \cmd{\SkipIndex} \cmd{\Name\{B\}}
6421 % \end{itemize}
6422 % \item[] \cmd{\JustIndex} takes priority with \cmd{\Name\{A\}} and passes \cmd{\SkipIndex} to \cmd{\Name\{B\}} (see also Section~\ref{sec:Priorities}).
6423 %
6424 % \item \cmd{\JustIndex} and the naming macros do not replace \cmd{\IndexRef}.
6425 % \end{itemize}
6426 %
6427 % \subsection{Automatic Rules}
6428 % \label{sec:IdxRules}
6429 %
6430 % Below we indicate what to expect regarding index rules. We do not attempt to concatenate page ranges. Previously we put names and cross-references in margin notes, indicating that we were testing the index rules. Here are the results:
6431 % \begin{itemize}[leftmargin=2.8\parindent]\small
6432 % \item[\emph{Page \pageref{page:Idx1}}:]
6433 % There are no name patterns (Section~\ref{sec:NamePatterns}) for either a name or a cross-reference. Then we create the name \Name*{Yamaha, Torakusu} along with its pattern. A pair of index page entries are generated, one before and one after the name. Also on page \pageref{page:Idx1} an index page entry is created for \Name{Nippon Gakki}, whose name pattern still does not yet exist.
6434 % \PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN}
6435 %
6436 % \item[]
6437 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6438 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6439 % \cmd{\Name\{Yamaha, Torakusu\}}\par
6440 % \cmd{\IndexName\{Nippon Gakki\}} &
6441 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1}\par
6442 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1}
6443 % \end{tabular}
6444 % \medskip
6445 %
6446 % \item[\emph{Page \pageref{page:Idx2}}:]
6447 % The name \Name{Yamaha, Torakusu} appears again. Since a pattern exists, the short form is printed and two index page entries are generated.
6448 % \PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN}
6449 %
6450 % \item[]
6451 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6452 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6453 % \cmd{\Name\{Yamaha, Torakusu\}} &
6454 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1}\par
6455 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1},
6456 % \pageref{page:Idx2}\\
6457 % \end{tabular}
6458 % \medskip
6459 %
6460 % \item[\emph{Page \pageref{page:Idx3}}:]
6461 % We create a \textit{see also} cross-reference from \Name*{Yamaha, Torakusu} to the name \Name{Nippon Gakki}. Now a cross-reference pattern exists for Mr. \Name{Yamaha, Torakusu}. We can no longer create index page entries for Mr. \Name{Yamaha, Torakusu}.
6462 %\PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN\break
6463 % \ShowPattern{Yamaha,Torakusu}!PN}
6464 %
6465 % \item[]
6466 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6467 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6468 % \cmd{\SeeAlso}\cmd{\IndexRef\{Yamaha,}\par
6469 % \texttt{Torakusu\}\{Nippon Gakki\}} &
6470 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1}\par
6471 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1},
6472 % \pageref{page:Idx2}
6473 % \textit{see also} Nippon Gakki\\
6474 % \end{tabular}
6475 %
6476 % \item[\emph{Page \pageref{page:Idx4}}:]
6477 % We attempt to make an index page entry to Mr. \Name{Yamaha, Torakusu} by invoking his name. That attempt fails due to the extant xref.
6478 % \PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN\break
6479 % \ShowPattern{Yamaha,Torakusu}!PN}
6480 %
6481 % \item[]
6482 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6483 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6484 % \cmd{\Name\{Yamaha, Torakusu\}} &
6485 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1}\par
6486 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1},
6487 % \pageref{page:Idx2}
6488 % \textit{see also} Nippon Gakki\\
6489 % \end{tabular}
6490 % \medskip
6491 %
6492 % \item[\emph{Page \pageref{page:Idx5}}:]
6493 % We print the name \Name{Nippon Gakki}, bringing its name pattern into being. Even though it was the \emph{target} of an xref, that does not restrict the ability to make page entries for it.
6494 % \PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN\break
6495 % \ShowPattern{Yamaha,Torakusu}!PN\break
6496 % \ShowPattern{Nippon Gakki}!MN}
6497 %
6498 % \item[]
6499 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6500 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6501 % \cmd{\Name\{Nippon Gakki\}} &
6502 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1},
6503 % \pageref{page:Idx5}\par
6504 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1},
6505 % \pageref{page:Idx2}
6506 % \textit{see also} Nippon Gakki\\
6507 % \end{tabular}
6508 % \medskip
6509 %
6510 % \label{page:Idx7}
6511 % \item[\emph{Page \pageref{page:Idx6}}:]
6512 % We attempt to create a \textit{see} cross-reference from \Name{Nippon Gakki} to the target \Name{Yamaha Corp.}. That fails because, unlike a \textit{see also} reference, a \textit{see} reference cannot be created when a name pattern already exists. The \textsf{nameauth} package issues a warning at this point. Yet the name \Name{Yamaha Corp.} is not created until page \pageref{page:Idx7}.
6513 % \PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN\break
6514 % \ShowPattern{Yamaha,Torakusu}!PN\break
6515 % \ShowPattern{Nippon Gakki}!MN}^^A
6516 %
6517 % \item[]
6518 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6519 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6520 % \cmd{\IndexRef\{Nippon Gakki\}}\par \texttt{\{Yamaha Corp.\}} &
6521 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1},
6522 % \pageref{page:Idx5}\par
6523 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1},
6524 % \pageref{page:Idx2}
6525 % \textit{see also} Nippon Gakki\\
6526 % \end{tabular}
6527 % \medskip
6528 %
6529 % \item[\emph{Page \pageref{page:Idx7}}:]
6530 % Index entries for \Name{Nippon Gakki} and \Name{Yamaha Corp.} also include this page due to the content of this list.
6531 % \PatInfo[3ex]{\ShowPattern{Yamaha,Torakusu}!MN\break
6532 % \ShowPattern{Yamaha,Torakusu}!PN\break
6533 % \ShowPattern{Nippon Gakki}!MN\break
6534 % \ShowPattern{Yamaha Corp.}!MN}^^A
6535 %
6536 % \item[]
6537 % \begin{tabular}{@{}p{0.36\textwidth}p{0.4\textwidth}}
6538 % \emph{Macros} & \emph{Cumulative Index}\\[0.5ex]
6539 % \cmd{\Name\{Nippon Gakki\}}\par
6540 % \cmd{\Name\{Yamaha Corp.\}} &
6541 % \ShowIdxPageref*{Nippon Gakki}, \pageref{page:Idx1},
6542 % \pageref{page:Idx5}, \pageref{page:Idx7}\par
6543 % \ShowIdxPageref*{Yamaha Corp.} \pageref{page:Idx7}\par
6544 % \ShowIdxPageref*{Yamaha, Torakusu}, \pageref{page:Idx1},
6545 % \pageref{page:Idx2},
6546 % \textit{see also} Nippon Gakki\\
6547 % \end{tabular}
6548 % \end{itemize}
6549 %
6550 % \begin{Quotation}{\Name[Dwight D.]{Eisenhower}}
6551 % {Associated Press luncheon (24 April 1950)}
6552 % Censorship, in my opinion, is a stupid and shallow way of
6553 % approaching the solution to any problem. Though sometimes
6554 % necessary, as witness a professional and technical secret that may
6555 % have a bearing upon the welfare and very safety of this country, we
6556 % should be very careful in the way we apply it, because in censorship
6557 % always lurks the very great danger of working to the disadvantage of
6558 % the American nation.
6559 % \index{politicians, quotes of\noexpand\string|hyperpage}
6560 % \end{Quotation}
6561 %
6562 % \newpage
6563 %
6564 % \subsection[Sorting Names]{Sorting Names in the Index}
6565 % \label{sec:IndexSort}
6566 %
6567 % When using \texttt{makeindex}, names with characters outside the ASCII range \texttt{[A--Za--z]} need to be sorted, as do names with spaces, active characters, Roman numerals, and macros especially in the \meta{SNN} argument. We do that in \textsf{nameauth} using sort tags. For other multilingual approaches, see the respective documentation for \textsf{xindex} and \texttt{xindy}. Those details go beyond the scope of this manual.
6568 %
6569 % \subsubsection{General Approach}
6570 %
6571 % \DescribeMacro{\IndexActual}
6572 % Using \cmd{\index\{}\meta{sort key}\texttt{@}\meta{actual}\texttt{\}} works with both \texttt{makeindex} and \texttt{texindy}. The general practice for sorting with \texttt{makeindex -s} involves creating an \texttt{ist} file (pages 659--65 in \Title{The Latex Companion}).
6573 %
6574 % By default, the ``actual'' character is |@|. If one needs to change the ``actual'' character, such as when using \texttt{gind.ist} with \texttt{dtx} files, one would put |\IndexActual{=}| in the preamble (or driver section) before creating index entries with the naming macros. \cmd{\PretagName} does not care about the ``actual'' character, but it provides the information that is automatically added after that character.
6575 %
6576 % \Global Effects of \cmd{\IndexActual} are local in scope. Use \cmd{\global} to make it otherwise, but that will affect every use of \cmd{\PretagName} thereafter. We demonstrate this scoping below as it pertains to \texttt{gind.ist} in a \texttt{dtx} file:\footnote{This example will generate a warning because we sort a name that does not exist.}
6577 % \begin{Quote}
6578 % \begin{Verbatim}
6579 % \PretagName{Ægidius}{Aegidius}
6580 %
6581 % In a \texttt{dtx} file the ``actual'' character is \texttt{=}.
6582 % \begingroup
6583 % In a local scope we change to the normal character \texttt{@}
6584 % and show the index entry:
6585 % \texttt{\IndexActual{@}\ShowIdxPageref{Ægidius}}.
6586 % \endgroup
6587 % Now back to \texttt{dtx} mode: \texttt{\ShowIdxPageref{Ægidius}}.
6588 % \end{Verbatim}
6589 % \PatInfo[3ex]{\ShowPattern{Ægidius}!PRE}
6590 % \PretagName{Ægidius}{Aegidius}
6591 %
6592 % In a \texttt{dtx} file the ``actual'' character is \texttt{=}.
6593 % \begingroup
6594 % In a local scope we change to the normal character \texttt{@}
6595 % and show the index entry:
6596 % \texttt{\IndexActual{@}\ShowIdxPageref{Ægidius}}.
6597 % \endgroup
6598 % Now back to \texttt{dtx} mode: \texttt{\ShowIdxPageref{Ægidius}}.
6599 % \end{Quote}
6600 %
6601 % \noindent \DescribeMacro{\PretagName}
6602 % The \textsf{nameauth} package enables automatic index sorting using a ``pretag'' (cf. Section~\ref{sec:NamePatterns}). Unless the \texttt{nopretag} option is used (which results in warnings), \cmd{\PretagName} creates a sort key terminated with the ``actual'' character. Do not put the ``actual'' character in the ``pretag'':
6603 %
6604 % \begin{SyntaxBox}
6605 % \cmd{\PretagName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\marg{tag}
6606 % \end{SyntaxBox}
6607 %
6608 % \PatInfo[2ex]{\ShowPattern{Æthelred, II}!PRE\break
6609 % \ShowPattern[W.E.B.]{Du~Bois}!PRE\break
6610 % \ShowPattern{Æthelred, II}!MN\break
6611 % \ShowPattern[W.E.B.]{Du~Bois}!MN}
6612 % One can ``pretag'' any name, any cross-reference, and even excluded names. Once made, sorting tags cannot be unmade. If one uses \cmd{\PretagName} in the preamble, those names will be sorted automatically throughout the document. For example:
6613 % \begin{Quote}
6614 % \begin{Verbatim}
6615 % \PretagName{Æthelred, II}{Aethelred 2}
6616 % \PretagName[W.E.B.]{Du~Bois}{Dubois, William}
6617 % \end{Verbatim}
6618 % \end{Quote}
6619 %
6620 % \newpage
6621 %
6622 % Every reference to \LAeth\ and \LDuBois\ is automatically tagged and sorted.\footnote{Regarding the margin note that shows name patterns, with \texttt{pdflatex} and \texttt{latex}, in \texttt{\ShowPattern{Æthelred, II}} the glyphs \texttt{ÃĘ} correspond to \cmd{\IeC\{}\cmd{\AE\}}.} One should ``pretag'' all names that contain active characters or macros unless one is using other multilingual tools like \textsf{xindex} and \texttt{xindy}.
6623 %
6624 % We keep the next example simple to illustrate the concept. We do not use alternate formatting because we do not capitalize, mutate, or segment the alias ``\LA{Doctor angelicus}'' (cf. Sections~\ref{sec:NameMedieval}, \ref{sec:AltFormat}).
6625 % \Info[4ex]{Name patterns and index entries too large for margin.}^^A
6626 %^^A
6627 % \begin{VerbatimOut}{\jobname.tmp}
6628 % \PretagName{\textit{Doctor angelicus}}{Doctor angelicus}
6629 % \IndexRef{\textit{Doctor angelicus}}{Thomas Aquinas}
6630 % \IndexRef[Thomas]{Aquinas}{Thomas Aquinas}
6631 %
6632 % Perhaps the greatest medieval theologian was
6633 % \Name{Thomas, Aquinas}, later known as
6634 % \Name{\textit{Doctor angelicus}}.
6635 % \SeeAlso\IndexRef{\textit{Doctor angelicus}}{Thomas Aquinas}
6636 % \end{VerbatimOut}
6637 %^^A
6638 % \begin{Quote}
6639 % \VerbatimInput[gobble=0,lastline=7]{\jobname.tmp}
6640 %
6641 % \IndexRef{\textit{Doctor angelicus}}{Thomas Aquinas}
6642 % \IndexRef[Thomas]{Aquinas}{Thomas Aquinas}
6643 %
6644 % Perhaps the greatest medieval theologian was
6645 % \Name{Thomas, Aquinas}, later known as
6646 % \Name{\textit{Doctor angelicus}}.
6647 % \end{Quote}
6648 %
6649 % We make \Name{\textit{Doctor angelicus}} a \textit{see} references with no page entries. If we did want page entries and a \textit{see also} reference from \Name{\textit{Doctor angelicus}} to \Name{Thomas, Aquinas}, we would omit line~2 above, wait until the body text is complete at the the end of the document, such as before \cmd{\printindex}, and then use:
6650 % \begin{Quote}
6651 % \VerbatimInput[gobble=0,numbers=none,firstline=8]{\jobname.tmp}
6652 % \end{Quote}
6653 %
6654 % \subsubsection*{\hfil Name Particles}
6655 %
6656 % Spaces change sorting. For example, the sort tag \texttt{De\textvisiblespace Soto} precedes \texttt{deal} due to the space therein. The sort tag \texttt{DeSoto} falls as expected between \texttt{derp} and \texttt{determinism}. Remove spaces when sorting with \cmd{\PretagName}.
6657 %
6658 % \subsubsection*{\hfil Collating Sequences}
6659 %
6660 % German \textsf{ä ö ü ß} map to English \textsf{ae oe ue ss}. Yet Norwegian \textsf{æ ø å} follow \textsf{z} in that order. One might have to create a sort tag that substitutes, e.g., \textsf{za zb zc} for \textsf{æ ø å}. Check a style guide regarding collating sequences, spaces, and sorting. This is where using other multilingual tools can be helpful.
6661 %
6662 % \subsubsection*{\hfil Alternate Formatting}
6663 %
6664 % Additional examples starting with Section~\ref{sec:RealAltEx} deal with index sorting as it relates to alternate formatting, ``Continental'' practice, and macros in name arguments.
6665 %
6666 % \begin{AltFormatZone}
6667 % \begin{Quotation}{\Shak}
6668 % {``Julius Caesar'', Act III, Scene II (first performed 1599)}
6669 % \textbf{Antony:} Friends, Romans, countrymen, lend me your ears;\\
6670 % I come to bury Caesar, not to praise him.
6671 % \index{creatives, quotes of\noexpand\string|hyperpage}
6672 % \end{Quotation}
6673 % \end{AltFormatZone}
6674 %
6675 % \newpage
6676 %
6677 % \subsubsection{Sorting Initials}
6678 % \label{sec:IndexInitials}
6679 %
6680 % Sorting \Name*[J.D.]{Rockefeller, IV} (|\Name*[J.D.]{Rockefeller, IV}|) presents a problem that does not occur with \Name*[Clive Staples]{Lewis} (|\Name*[Clive Staples]{Lewis}|). In the case of \Name*[J.D.]{Rockefeller, IV}[Jay], the initials will appear in the index, while with \Name*[Clive Staples]{Lewis}[C.S.], the longer names will appear in the index.
6681 %
6682 % In \textsf{nameauth} we have a specific way to do that once per name, and all the remaining names will be sorted as expected. Before we use a name like \Name[J.D.]{Rockefeller, IV}, preferably in the preamble, we use the following macro:
6683 % \begin{Quote}
6684 % |\PretagName[J.D.]{Rockefeller, IV}{Rockefeller, John D 4}|
6685 % \begin{itemize}
6686 % \item The index entry is ``\ShowIdxPageref*[J.D.]{Rockefeller, IV}''.
6687 %
6688 % \item In the ``pretag'' we spell out the first forename and add enough of the second to get a unique sorting key.
6689 %
6690 % \item We turn the Roman numeral affix into an Arabic numeral so that it does not sort like letters.
6691 % \end{itemize}
6692 % \end{Quote}
6693 %
6694 % For more examples, see Sections~\ref{sec:NameMedieval}, \ref{sec:Romani}, \ref{sec:VarNames}, and all of Section~\ref{sec:AdvancedFormat}.
6695 %
6696 % \begin{InfoBox}
6697 % In order to sort the index consistently and properly, all names
6698 % should be sorted by their longer name forms, not their initials.
6699 % \end{InfoBox}
6700 %
6701 % \subsubsection[Unicode]{Unicode Compatibility}
6702 % \label{sec:CompatON}
6703 %
6704 % Here we engage how active Unicode characters affect index entries. Changes in the way that \texttt{pdflatex} and \texttt{latex} handle Unicode characters since 2018 have made indexing simpler and more intuitive, e.g.
6705 % \begin{Center}
6706 % \begin{tabular}{rllrll}\toprule
6707 % \rowcolor{nagrey}^^A
6708 % \bfseries Pre-2018 & & \bfseries Index &
6709 % \bfseries Post-2018 & & \bfseries Index\\
6710 %
6711 % ä & \textrightarrow &
6712 % \texttt{\cmd{\IeC\textvisiblespace}\{\cmd{\"a}\}} &
6713 % ä & \textrightarrow & \texttt{ä}\\
6714 %
6715 % \rowcolor{nagrey}^^A
6716 % æ & \textrightarrow &
6717 % \texttt{\cmd{\IeC\textvisiblespace}\{\cmd{\ae\textvisiblespace}\}} &
6718 % æ & \textrightarrow & \texttt{æ}\\\bottomrule
6719 % \end{tabular}
6720 % \end{Center}
6721 %
6722 % The \cmd{\IeC} macro plus its argument then would expand to \cmd{\T1} plus its argument, which would occur especially if accented characters were written out to a file, then read in again. This could cause problems that would generate multiple index entries. We can test for changes that can affect \textsf{nameauth}:
6723 % \begin{enumerate}
6724 % \item Test for the presence of \texttt{utf8-2018.def} and define a macro:
6725 % \begin{Quote}
6726 % \begin{Verbatim}
6727 % \makeatletter
6728 % \@ifl@t@r\fmtversion{2018/10/05}{\newcommand\nameauthltx{}}{}
6729 % \makeatother
6730 % \end{Verbatim}
6731 % \end{Quote}
6732 %
6733 % \item Test for the presence of \texttt{utf8-2018.def} by checking for a file:
6734 % \begin{Quote}
6735 % \begin{Verbatim}
6736 % \IfFileExists{utf8-2018.def}{do if present}{do if absent}
6737 % \end{Verbatim}
6738 % \end{Quote}
6739 %
6740 % \item Test for the version of \textsf{xparse} that allows the current function of name arguments, and define a macro:
6741 % \begin{Quote}
6742 % \begin{Verbatim}
6743 % \makeatletter
6744 % \@ifl@t@r\fmtversion{2018/04/30}{\newcommand\nameauthxp{}}{}
6745 % \makeatother
6746 % \end{Verbatim}
6747 % \end{Quote}
6748 % \end{enumerate}
6749 %
6750 % Before 2018, some index styles like \texttt{gind.ist} could not work with characters with macrons. Since 2018, those restrictions have been removed. To work with both old or new versions of \texttt{pdflatex} and \texttt{latex}, we can do the following:
6751 % \begin{Quote}
6752 % \begin{Verbatim}
6753 % \begin{nameauth}
6754 % \ifdefined\nameauthltx
6755 % \< Ghazali & & Ghazāli & >
6756 % \else
6757 % \< Ghazali & & Ghazali & >
6758 % \fi
6759 % \end{nameauth}
6760 %
6761 % \ifdefined\nameauthltx
6762 % \PretagName{Ghazāli}{Ghazali}
6763 % \fi
6764 %
6765 % \Ghazali\ was an important Islamic philosopher.
6766 % \end{Verbatim}
6767 %
6768 % \Ghazali\ was an important Islamic philosopher.
6769 % \end{Quote}
6770 %
6771 % \subsubsection{Debugging}
6772 %
6773 % If one sees multiple index entries for the same name, or if the names are not sorted correctly, either check the \texttt{idx} file or use the debugging macros (Section~\ref{sec:DebuggingMacros}). Check \textsf{nameauth} package warnings. Set the \texttt{verbose} option, which will offer a number of ``informational'' warnings that could be of assistance.
6774 % \begin{itemize}
6775 % \item Do naming macros always use the same arguments?
6776 %
6777 % \item Are there any active characters, spaces, or control sequences in the name arguments? Use \cmd{\PretagName}.
6778 %
6779 % \item Are active Unicode characters expanding consistently?
6780 %
6781 % \item Use \cmd{\ShowPattern}, \cmd{\ShowIdxPageref}, and \cmd{\ShowNameState}.
6782 %
6783 % \item Did \cmd{\noexpand} precede macros in name arguments? Can those macros ultimately expand differently in the index? If so, check how alternate formatting is being used.
6784 %
6785 % \item Is alternate formatting used consistently? Are names used within sections of alternate formatting used outside of them?
6786 % \end{itemize}
6787 %
6788 % Using \cmd{\protected@edef} in macros can add spaces to index entries. The \textsf{nameauth} macros must use \cmd{\protected@edef} to work with classes that write index entries to \texttt{aux} files. One must check this in the \texttt{idx} file. We show this below:
6789 % \begin{Quote}
6790 % \begin{Verbatim}
6791 % \makeatletter
6792 % \newcommand\Idx[1]{\protected@edef\arg{#1}\index{\arg}}
6793 % \makeatother
6794 % \end{Verbatim}
6795 %
6796 % \cmd{\Idx\{}\cmd{\textsc\{football\}\}} produces:\\
6797 % \hbox{}\qquad\cmd{\indexentry}\texttt
6798 % {\{\cmd{\textsc\textvisiblespace\textvisiblespace}\{football\}\}\{}\meta
6799 % {page}\texttt{\}}\\[1ex]
6800 % The macro \cmd{\index\{}\cmd{\textsc\{football\}\}} produces:\\
6801 % \hbox{}\qquad\cmd{\indexentry}\texttt
6802 % {\{\cmd{\textsc}\{football\}\}\{}\meta{page}\texttt{\}}
6803 % \end{Quote}
6804 %
6805 % \subsection{Index Tags}
6806 % \label{sec:IndexTag}
6807 %
6808 % \subsubsection{General Approach}
6809 %
6810 % \DescribeMacro{\TagName}
6811 % Index tags are information added automatically to entries created by \textsf{nameauth} macros.
6812 % \DescribeMacro{\UntagName}
6813 % \cmd{\TagName} creates or changes a persistent tag. \cmd{\UntagName} deletes a tag. This information can include life dates, regnal dates, etc. Both \cmd{\TagName} and \cmd{\UntagName} have \emph{global scope} and handle arguments in the same way as \cmd{\IndexName}:
6814 %
6815 % \begin{SyntaxBox}
6816 % \cmd{\TagName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\marg{tag}\\
6817 % \cmd{\UntagName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
6818 % \end{SyntaxBox}
6819 %
6820 % All the indexing macros are keyed to the name patterns. \cmd{\PretagName} generates the leading sort key. \cmd{\TagName} and \cmd{\UntagName} affect the trailing content. The following graphic illustrates the ``segments'' of an index entry and the \textsf{nameauth} macros that affect the respective segments:
6821 % \begin{Center}
6822 % \begin{tabular}{r|l|l|l}\toprule
6823 % & & Naming macros\\
6824 % & \cmd{\PretagName} & \cmd{\IndexName}\\
6825 % \large\bfseries|\index{| & \large\bfseries|Aethelred 2@| &
6826 % \large\bfseries|Æthelred II| & \large\bfseries|, king}|\\
6827 % & & & \cmd{\TagName}\\
6828 % & & & \cmd{\UntagName}\\\bottomrule
6829 % \end{tabular}
6830 % \end{Center}
6831 %
6832 % Tags created by \cmd{\TagName} can be helpful in the indexes of academic texts by adding dates, titles, etc. \cmd{\TagName} causes the \textsf{nameauth} indexing macros to append
6833 % {\ttfamily\fbox{\textvisiblespace the Great, pope}}
6834 % to the index entry below (normal \LaTeX\ document):\IndexName{Gregory, I}
6835 % \begin{Quote}
6836 % \IndexInactive
6837 % \PatInfo[3.5ex]{\ShowPattern{Gregory, I}!PRE\break
6838 % \ShowPattern{Gregory, I}!TAG\break
6839 % \ShowPattern{Gregory, I}!MN}
6840 % \begin{Verbatim}
6841 % \PretagName{Gregory, I}{Gregory 1}
6842 % \TagName{Gregory, I}{ the Great, pope}
6843 % Pope \Name*{Gregory, I} is known as \Name*{Gregory, I}
6844 % [the Great].\\
6845 % Index: \ShowIdxPageref{Gregory, I}
6846 % \end{Verbatim}
6847 %
6848 % \IndexActual{@}
6849 % \TagName{Gregory, I}{ the Great, pope}
6850 % Pope \Name*{Gregory, I} is known as \Name*{Gregory, I}
6851 % [the Great].\\
6852 % Index: \ShowIdxPageref{Gregory, I}
6853 % \TagName{Gregory, I}{ the Great, pope\string|hyperpage}
6854 % \end{Quote}
6855 % \IndexName{Gregory, I}
6856 %
6857 % See Section~\ref{sec:NameAncient} for more ways to deal with ancient names. \cmd{\TagName} works with all names that produce index page entries. It does not work with with cross-references produced by \cmd{\IndexRef}, \cmd{\AKA}, etc.
6858 % Tags can hold different kinds of information, but they should not be verbose. They can include daggers, asterisks, and so on. For example, all fictional names in the index of this manual are tagged with \S. One must add any desired spaces to the start of the tag.
6859 %
6860 % \begin{Quotation}{\ForgetThis\Name[M.T.]{Cicero}[Marcus Tullius]}
6861 % {\Title{\la{De oratore}} B II; C IX, \S 36 (55 \textsc{BC})}
6862 % By what other voice, too, than that of the orator, is history,
6863 % the evidence of time, the light of truth, the life of memory, the
6864 % directress of life, the herald of antiquity, committed to immortality?
6865 % \index{Romans, quotes of\noexpand\string|hyperpage}
6866 % \end{Quotation}
6867 %
6868 % \newpage
6869 %
6870 % \subsubsection[Identical Names]{Disambiguating Identical Names}
6871 % \label{sec:IdxIdent}
6872 %
6873 % We can format and index one name as two different people with \cmd{\TagName} and \cmd{\ForgetThis} (Section~\ref{sec:NameControl}). The index tags group together their respective entries:
6874 % \begin{Quote}
6875 % \begin{Verbatim}
6876 % \TagName[Engelbert]{Humperdinck}{ (composer, 1854--1921)}
6877 % This refers to the classical German composer:
6878 % \Name[Engelbert]{Humperdinck}.
6879 %
6880 % \TagName[Engelbert]{Humperdinck}{ (singer, *1936)}
6881 % This refers to the English singer from the 60s and 70s:
6882 % \ForgetThis\Name[Engelbert]{Humperdinck}.
6883 % \end{Verbatim}
6884 %
6885 % \TagName[Engelbert]{Humperdinck}{ (composer, 1854--1921)\string|hyperpage}
6886 % This refers to the classical composer:
6887 % \Name[Engelbert]{Humperdinck}.
6888 %
6889 % \TagName[Engelbert]{Humperdinck}{ (singer, *1936)\string|hyperpage}
6890 % This refers to the singer from the 60s and 70s:
6891 % \ForgetThis\Name[Engelbert]{Humperdinck}.
6892 % \end{Quote}
6893 %
6894 % The name patterns are \texttt{\ShowPattern[Engelbert]{Humperdinck}!TAG} for the index tag and \texttt{\ShowPattern[Engelbert]{Humperdinck}!MN} for the name.
6895 % This is the least ``intrusive'' way of creating unique names but it requires one to track potential changes to the text that might change the placement of index tags relative to their names.\footnote{The name decision macros might help automate this, as might the separate name systems.}
6896 %
6897 % Sections~\ref{sec:Romani} and~\ref{sec:Unique} show how one can do similar things with non-printing macros in name arguments, where the names are sorted with \cmd{\PretagName} and also have index tags. This relieves one of having to keep track of otherwise identical names, because the name patterns are distinct, even if they look alike. One can go to greater lengths in Section~\ref{sec:AdvancedFormat} and its subsections.
6898 %
6899 % One should try to use the \textsf{nameauth} macros in a way that is arguably the most ``natural'' and has the best fit for one's use case. That is a reason why this manual contains so many different examples. See also Section~\ref{sec:Complexity}.
6900 %
6901 % \subsubsection[Special Tags]{Special Tags for Special Cases}
6902 % \label{sec:SpecialTag}
6903 %
6904 % \cmd{\TagName} can create ``special'' index entries for names with the general form below. These tags are compatible with \textsf{hyperref} used in normal \LaTeX\ documents.\footnote{This was implemented in v.3.3, based on the answer of \Name*[Heiko]{Oberdiek} to \href{https://tex.stackexchange.com/questions/201720/index-produces-invalid-idx-entry-with-manual-style-commaparse-hyperref}
6905 % {\bfseries this question}.}
6906 % When a \meta{macro} that takes one or more arguments exists, one can use the form:
6907 %
6908 % \begin{SyntaxBox}
6909 % \cmd{\TagName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\marg{\texttt{\upshape\textbar}macro}\\
6910 % \end{SyntaxBox}
6911 %
6912 % \begin{Quotation}{\Name{Plato}}
6913 % {opening statement in \textit{Cratylus} (c. 388 \textsc{bc})}
6914 % \Name{Hermogenes}: I should explain to you, \Name{Socrates}, that our friend \Name{Cratylus} has been arguing about names; he says that they are natural and not conventional; not a portion of the human voice which men agree to use; but that there is a truth or correctness in them, which is the same for Hellenes as for barbarians.^^A
6915 % \index{philosophers, quotes of\noexpand\string|hyperpage}
6916 % \end{Quotation}
6917 %
6918 % \newpage
6919 %
6920 % \Info*{\small\dbend}When using the \textsf{ltxdoc} class with \textsf{hypdoc}, as in this manual, neither \textsf{nameauth} nor regular use of \cmd{\index} creates hyperlinked page entries. Index data tags in the |<driver>| section of the \texttt{dtx} file, which reads the ``commented'' part of the \texttt{dtx} file into a \texttt{document} environment, take the form:
6921 % \begin{Quote}
6922 % \cmd{\TagName}\meta{name args}\texttt{\{\textbar hyperpage\}}
6923 % \end{Quote}
6924 %
6925 % Within the ``commented'' part of the package documentation in this \texttt{dtx} file, the vertical bar is active. Hence, in this part, we use one of these two:
6926 % \begin{itemize}
6927 % \item \cmd{\TagName}\meta{name args}\texttt{\{}\cmd{\string\textbar hyperpage\}}
6928 % \item \cmd{\index\{}\meta{entry info}\cmd{\noexpand}\cmd{\string \textbar hyperpage\}}
6929 % \end{itemize}
6930 %
6931 % Internally, in \cmd{\@nameauth@IdxFormat}, when a cross-reference is being created, a tag of the form \meta{some text}\texttt{\textbar}\meta{some macro} is reduced to \meta{some text}, allowing the macros \texttt{\textbar see} and \texttt{\textbar seealso} internally to be appended to the index entry even if a tag with a vertical bar exists.
6932 %
6933 % \Info*{\small\dbend}Next we create a special tag. Since we used lines~1--2 in this \texttt{dtx} file, we put them in the driver section to keep it simple.
6934 % \begin{Quote}
6935 % \begin{Verbatim}
6936 % \newcommand\Orphan[2]{#1(\hyperpage{#2})}
6937 % \TagName[Lost]{Name}{\,\S|Orphan{perdit}}
6938 % \Name[Lost]{Name}
6939 % \end{Verbatim}
6940 %
6941 % \Name[Lost]{Name}\\
6942 % \texttt{idx} file:
6943 % |\indexentry{Name, Lost\,\S |\texttt
6944 % {\textbar}|Orphan{perdit}}{|\meta{page}|}|\\
6945 % \texttt{ind} file:
6946 % |\item Name, Lost\,\S \pfill \Orphan{perdit}{|\meta{page}|}|
6947 % \end{Quote}
6948 %
6949 % The \textsf{microtype} package and its tracking features is probably the best solution to fix index entries and sub-entries that break badly across columns or pages. Here we show how to add manual breaks, inelegant as that may be.
6950 % \begin{itemize}
6951 % \item Create a macro that takes an argument and appends a break:
6952 % \item[] |\newcommand*{\EndBreak}[1]{#1\newpage}|
6953 % \item The principle is similar to using:
6954 % \item[] \cmd{\index\{Doe, John\string|textbf\}}
6955 % \item The default for two column mode is \cmd{\newpage}. One might use
6956 % \cmd{\newcolumn} with \textsf{multicol} and \textsf{idxlayout}, etc.
6957 %\end{itemize}
6958 %
6959 % We use \cmd{\EndBreak} in an index tag for every index entry on the last page where such entries occur. If all instances of a name on that pagee have the same index tag, there will be no duplicate page entries, hyperlinks will work, and the index will break as indicated:
6960 % \begin{Center}
6961 % \begin{tabular}{rll}\toprule
6962 % \rowcolor{nagrey}^^A
6963 % \bfseries Page & \bfseries Macro & \bfseries Index\\
6964 %
6965 % (preamble) & |\newcommand*{\EndBreak}[1]|\\
6966 % & | {#1\newpage}|\\
6967 %
6968 % 10 & \cmd{\Name\{Some, Name\}} & Some Name, 10\\
6969 %
6970 % 15 & \cmd{\Name\{Some, Name\}} & Some Name, 10, 15\\
6971 %
6972 % 18 & \cmd{\TagName\{Some, Name\textbar EndBreak\}} & \\
6973 % & \cmd{\Name\{Some, Name\}} &
6974 % Some Name, 10, 15, 18\meta{break}\\\bottomrule
6975 % \end{tabular}
6976 % \end{Center}
6977 %
6978 % We do not have to supply an argument to \cmd{\EndBreak} because, as with font switching in the index, the page entry is implied. We also can intermix \textsf{nameauth} macros with manual index entries.\footnote{One may need to look at the \texttt{idx} or \texttt{ind} files to craft matching entries on the page where the break occurs. Again, this approach is probably not as good as using \textsf{microtype}.}
6979 % Instead of using \cmd{\TagName}, we could try this:
6980 % \begin{Center}
6981 % \begin{tabular}{rll}\toprule
6982 % \rowcolor{nagrey}^^A
6983 % \bfseries Page & \bfseries Macro & \bfseries Index\\
6984 %
6985 % 18 & |\SkipIndex\Name\{Some, Name}% |\\
6986 % & \cmd{\index\{Some Name\textbar EndBreak\}} &
6987 % Some Name, 10, 15, 18\meta{break}\\\bottomrule
6988 % \end{tabular}
6989 % \end{Center}
6990 %
6991 % Results for manual entries may vary, depending on what distribution of \LaTeX\ is being used and how old it is. Any name with active characters needs to be handled differently before 2018 than after 2018. All instances of \cmd{\index\{Some Name\textbar EndBreak\}} must fall on the same page.
6992 %
6993 % We do not recommend breaking an index entry in the middle. There are several discussions, such as \href{https://tex.stackexchange.com/questions/86646/indexing-subentries-and-see-also}{\bfseries this page} and \href{https://tex.stackexchange.com/questions/231840/what-is-the-proper-use-of-several-seealso-in-the-same-index-entry-with-makeinde}{\bfseries that page}. Modifying \cmd{\EndBreak} above by putting \cmd{\@gobble} after \cmd{\newpage} would allow breaking an index entry in the middle, but there are no real guarantees that the new macro would work well.
6994 %
6995 % \subsection[Categories/Sub-entries]{Categories and Sub-entries}
6996 % \label{sec:CatSub}
6997 %
6998 % Indexes can have categories and sub-entries such as the following:
6999 % \begin{itemize}
7000 % \item[] \meta{category 1}
7001 % \begin{itemize}
7002 % \item[] \meta{name entry}
7003 % \begin{itemize}
7004 % \item[] \meta{name sub-entry 1}
7005 % \item[] \meta{name sub-entry 2}\dots
7006 % \end{itemize}
7007 % \item[] \meta{name entry}\dots
7008 % \end{itemize}
7009 % \item[] \meta{category 2}\dots
7010 % \end{itemize}
7011 %
7012 % To get \textsf{nameauth} to work with this structure, one uses \cmd{\PretagName} to organize names under categories. One uses \cmd{\TagName} to create sub-entrues under names. A simple mnemonic is: ``Pre stands for C'' when it comes to categories, while ``Tags are on the inside'' like sub-entries.
7013 %
7014 % The following syntax box shows a couple of generic examples for creating categories and sorting names under them with \cmd{\PretagName}:
7015 %
7016 % \begin{SyntaxBox}
7017 % \cmd{\PretagName}\oarg{FNN}\marg{SNN}\texttt
7018 % {\{}\meta{category 1}\texttt{!}\meta{SNN}\texttt
7019 % {, }\meta{FNN}\texttt{\}}\\
7020 % \cmd{\PretagName}\marg{SNN\textbf{,}Affix}\texttt
7021 % {\{}\meta{category 1}\texttt{!}\meta{SNN} \meta{Affix}\texttt{\}}
7022 % \end{SyntaxBox}
7023 %
7024 % Likewise, the following syntax box shows a couple of generic examples for creating sub-entries under names with \cmd{\TagName}:
7025 %
7026 % \begin{SyntaxBox}
7027 % \cmd{\TagName}\oarg{FNN}\marg{SNN}\texttt
7028 % {\{!}\meta{name sub-entry}\texttt{\}}\\
7029 % \cmd{\TagName}\marg{SNN\textbf{,}Affix}\texttt
7030 % {\{!}\meta{name sub-entry}\texttt{\}}
7031 % \end{SyntaxBox}
7032 %
7033 % \newpage
7034 %
7035 % \begin{itemize}
7036 % \item If the name has no tag, \cmd{\UntagName} will
7037 % restore the base name entry.
7038 %
7039 % \item \cmd{\TagName} can set up a default tag, set up or change
7040 % sub-entries, and change back to the default tag.
7041 %
7042 % \item If a sub-entry of a name needs a \textit{see} reference:
7043 % \begin{itemize}
7044 % \item If the name has been used in the front matter or the main matter,
7045 % use \cmd{\ForgetName} or no \textit{see} reference will be created.
7046 % \item Pick sub-entry A with no page references.
7047 % \item[] |\TagName[Some]{Name}{!Sub-entry A}|
7048 % \item Create a \textit{see} reference using that sub-entry.
7049 % \item[] |\IndexRef[Some]{Name}{Something else}|
7050 % \item Free up the name for more references.
7051 % \item[] |\IncludeName*[Some]{Name}|
7052 % \item Change back to the base name entry or another sub-entry.
7053 % \item If needed, use \cmd{\SubvertName}.
7054 % \end{itemize}
7055 %
7056 % \item If a sub-entry of a name needs a \textit{see also} reference:
7057 % \begin{itemize}
7058 % \item Pick sub-entry B with complete page references.
7059 % \item[] |\TagName[Some]{Name}{!Sub-entry B}|
7060 % \item Create a \textit{see also} reference using that sub-entry.
7061 % \item[] |\SeeAlso\IndexRef[Some]{Name}{Something else}|
7062 % \item Free up the name for more references.
7063 % \item[] |\IncludeName*[Some]{Name}|
7064 % \item Change back to the base name emtry or another sub-entry.
7065 % \end{itemize}
7066 %
7067 % \item Have as few levels in an index as needed.
7068 % \end{itemize}
7069 %
7070 % Next, we show categories and sub-entries used in a normal \LaTeX\ document.
7071 %
7072 % \JustIndex\Wash \JustIndex\Ike
7073 %^^A
7074 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test07_02.tex}\else
7075 % \edef\NameauthTestFile{\jobname.tmp}\fi
7076 %^^A
7077 % \begin{VerbatimOut}{\NameauthTestFile}
7078 % \documentclass{article}
7079 % \input{compat.tex} % Included with nameauth for compatibility.
7080 % \usepackage[a6paper,landscape,left=1cm,right=1cm]{geometry}
7081 % \usepackage{makeidx}
7082 % \usepackage{nameauth}
7083 %
7084 % \newcommand*{\EndBreak}[1]{#1\newpage}
7085 %
7086 % \makeindex
7087 %
7088 % % Sort these names under: US Generals.
7089 % \PretagName[Omar N.]{Bradley}{US Generals!Bradley, Omar}
7090 % \PretagName[George S.]{Patton, Jr.}{US Generals!Patton, George}
7091 %
7092 % % Sort these names under: US Presidents.
7093 % \PretagName[George]{Washington}{US Presidents!Washington, George}
7094 % \PretagName[Dwight D.]{Eisenhower}{US Presidents!Eisenhower, Dwight D.}
7095 % \PretagName[Abraham]{Lincoln}{US Presidents!Lincoln, Abraham}
7096 %
7097 % % Sort these names under: Philosophers.
7098 % \PretagName{Aristotle}{Philosophers!Aristotle}
7099 % \PretagName{Plato}{Philosophers!Plato}
7100 %
7101 % % Sort these names under: Black Americans, famous.
7102 % \PretagName[Frederick]{Douglass}
7103 % {Black Americans, famous!Douglass, Frederick}
7104 % \PretagName[Martin Luther]{King, Jr.}
7105 % {Black Americans, famous!King, Martin Luther, Jr.}
7106 %
7107 % % Sort these names under: Europeans, historical.
7108 % \PretagName{\AE thelred, II}{Europeans, historical!Aethelred 2}
7109 % \PretagName[Hernando]{de Soto}
7110 % {Europeans, historical!de Soto, Hernando}
7111 %
7112 % \begin{nameauth}
7113 % \< Wash & George & Washington & >
7114 % \< Bradley & Omar N. & Bradley & >
7115 % \< Aris & & Aristotle & >
7116 % \< Plato & & Plato & >
7117 % \< Aeth & & \AE thelred, II & >
7118 % \< Linc & Abraham & Lincoln & >
7119 % \< MLK & Martin Luther & King, Jr. & >
7120 % \< Soto & Hernando & de Soto & >
7121 % \< Patton & George S. & Patton, Jr. & >
7122 % \< Ike & Dwight D. & Eisenhower & >
7123 % \end{nameauth}
7124 %
7125 % \begin{document}
7126 % \small
7127 %
7128 % \section{Famous Black Americans}
7129 %
7130 % \Name[Frederick]{Douglass} rose to eminence by sheer force of
7131 % character and talents that neither slavery nor caste
7132 % proscription could crush. Circumstances made
7133 % \Name[Frederick]{Douglass} a slave, but they could not prevent
7134 % him from becoming a freeman and a leader among mankind.\\
7135 %
7136 % We also celebrate \MLK, then \MLK.
7137 %
7138 % \section{Patres Patriae}
7139 %
7140 % We mention President \Wash; again, \Wash.
7141 % Family and close friends called him \SWash.\\
7142 %
7143 % \TagName[George]{Washington}{!as general}
7144 % We can reminisce about \LWash[General].
7145 % \UntagName[George]{Washington}
7146 %
7147 % When speaking of \Linc, we can refer to \LLinc[Abe].
7148 %
7149 % \section{Philosophers}
7150 %
7151 % \TagName{Plato}{|EndBreak}
7152 % Among philosophers we consider \Plato\ and \Aris.
7153 %
7154 % \section{Historical Figures}
7155 %
7156 % We ponder about \Aeth, then \Aeth.
7157 % We note \Soto, then just \Soto.
7158 % \CapThis\Soto{} starts a sentence.
7159 %
7160 % \section{Further Discussion}
7161 %
7162 % \TagName[George]{Washington}{!as general}
7163 % \TagName[Dwight D.]{Eisenhower}{!as general}
7164 % \LWash, \LIke, \LBradley, and \LPatton
7165 % were high-ranking generals.\\
7166 % \SeeAlso\IndexRef[George]{Washington}{Eisenhower}
7167 % \SeeAlso\IndexRef[Dwight D.]{Eisenhower}{Washington}
7168 % \IncludeName*[George]{Washington}
7169 % \IncludeName*[Dwight D.]{Eisenhower}
7170 %
7171 % \UntagName[George]{Washington}
7172 % \UntagName[Dwight D.]{Eisenhower}
7173 % \Wash\ and \Ike\ also were US presidents.
7174 %
7175 % \ForgetName[Omar N.]{Bradley}
7176 % \ForgetName[George S.]{Patton, Jr.}
7177 % \TagName[Omar N.]{Bradley}{!colleagues of}
7178 % \TagName[George S.]{Patton, Jr.}{!colleagues of}
7179 % \IndexRef[Omar N.]{Bradley}{Eisenhower, Patton}
7180 % \IndexRef[George S.]{Patton, Jr.}{Bradley, Eisenhower}
7181 %
7182 % \printindex
7183 % \end{document}
7184 % \end{VerbatimOut}
7185 %^^A
7186 % \begin{Quote}
7187 % \VerbatimInput[gobble=0,lastline=23]{\NameauthTestFile}
7188 %
7189 % \newpage
7190 %
7191 % \VerbatimInput[gobble=0,firstline=24,lastline=76]{\NameauthTestFile}
7192 %
7193 % \newpage
7194 %
7195 % \VerbatimInput[gobble=0,firstline=77]{\NameauthTestFile}
7196 % \end{Quote}
7197 %
7198 % \JustIndex\MLK \JustIndex\Doug
7199 % \JustIndex\Aeth \JustIndex\Soto
7200 % \JustIndex\Aris \JustIndex\Plato
7201 % \JustIndex\Linc \JustIndex\Wash
7202 % \JustIndex\Ike \JustIndex\Patton \JustIndex\Bradley
7203 % \begin{tcolorbox}[colback=white]
7204 % \IfFileExists{cat01.pdf}{\includegraphics[scale=0.85]{cat01.pdf}}
7205 % {\hbox{\vbox to 8cm{\hbox{\hfill}}}}
7206 % \end{tcolorbox}
7207 % \medskip
7208 %
7209 % \newpage
7210 %
7211 % A few notable features from this example include:
7212 % \begin{itemize}
7213 % \item The entry categories are set up in the preamble with \cmd{\PretagName}. They do not change thereafter.
7214 %
7215 % \item Changes from one sub-entry to another, or back to the base name entry, occur using \cmd{\TagName} and \cmd{\UntagName}.
7216 %
7217 % \item We permit references to names with other sub-entries or main entries again with \cmd{\IncludeName*}. Otherwise, the creation of an xref would protect that name from further entries.
7218 %
7219 % \item We permit the creation of \textit{see} references in subentries of extant names by using \cmd{\ForgetName}
7220 % \end{itemize}
7221 %
7222 % Obviously, the more complex an index gets, the more complex it will be to deal with the \textsf{nameauth} macros. The user must decide where the break-even point lies.
7223 %
7224 % \ReturnLink
7225 %
7226 % \begin{Quotation}{\Name[John F.]{Kennedy}}
7227 % {Inaugural Address (1961)}
7228 % The world is very different now. For man holds in his mortal hands the power to abolish all forms of human poverty and all forms of human life. And yet the same revolutionary beliefs for which our forebears fought are still at issue around the globe\,---\,the belief that the rights of man come not from the generosity of the state but from the hand of God.
7229 %
7230 % \dots And so, my fellow Americans: ask not what your country can do for you\,---\,ask what you can do for your country.
7231 %
7232 % My fellow citizens of the world: ask not what America will do for you, but what together we can do for the freedom of man.
7233 %
7234 % Finally, whether you are citizens of America or citizens of the world, ask of us here the same high standards of strength and sacrifice which we ask of you. With a good conscience our only sure reward, with history the final judge of our deeds, let us go forth to lead the land we love, asking His blessing and His help, but knowing that here on earth God's work must truly be our own.
7235 % \index{politicians, quotes of\noexpand\string|hyperpage}
7236 % \end{Quotation}
7237 %
7238 % \newpage
7239 %
7240 % \section{Name Tags}
7241 % \label{sec:DataTags}
7242 %
7243 % \subsection{Basics}
7244 %
7245 % \DescribeMacro{\NameAddInfo}
7246 % All valid names in \textsf{nameauth} can have name tags. Unlike other kinds of tags, name tags are not generated automatically with every name managed by \textsf{nameauth}. \cmd{\NameAddInfo} is \cmd{\long}, allowing for more information in the \meta{tag} argument:
7247 % \begin{SyntaxBox}
7248 % \cmd{\NameAddInfo}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\marg{tag}
7249 % \end{SyntaxBox}
7250 %
7251 % \PatInfo*{\ShowPattern[George]{Washington}!DB\break
7252 % \ShowPattern[George]{Washington}!MN}^^A
7253 % For example, |\NameAddInfo[George]{Washington}{(1732--99)}|\NameAddInfo[George]{Washington}{(1732--99)} makes a name tag but does not print whenever \Wash\ \cmd{\Wash} is used. The name tag is displayed only by using the macro \cmd{\NameQueryInfo\{\}} \NameQueryInfo{}.
7254 %
7255 % When making a tag, include a leading space if \cmd{\NameQueryInfo} is used in a formatting hook (Section~\ref{sec:DataTagHooks}) and such space is desired. Otherwise avoid leading spaces. Another way uses a conditional:
7256 % ^^A
7257 % \begin{VerbatimOut}{\jobname.tmp}
7258 % \makeatletter
7259 % \NameAddInfo[George]{Washington}
7260 % {\if@nameauth@InHook{ }\fi(1732--99)}
7261 % \makeatother
7262 % \end{VerbatimOut}
7263 % ^^A
7264 % \begin{Quote}
7265 % \VerbatimInput[gobble=0]{\jobname.tmp}
7266 %
7267 % \input{\jobname.tmp}
7268 % \end{Quote}
7269 %
7270 % \DescribeMacro{\NameQueryInfo}
7271 % To print a name tag for a given name, we use \cmd{\NameQueryInfo}, either from an arbitrary set of name arguments, or from the previously-evaluated name arguments if a null argument is given. It prints a name tag from the name info data set:
7272 %
7273 % \begin{SyntaxBox}
7274 % \cmd{\NameQueryInfo}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}\\
7275 % \cmd{\NameQueryInfo\{\}}
7276 % \end{SyntaxBox}
7277 %
7278 % \begin{itemize}
7279 % \item With name arguments, using the pattern for those arguments:\\
7280 % |\NameQueryInfo[George]{Washington}|\dotfill^^A
7281 % \NameQueryInfo[George]{Washington}\JustIndex\Wash
7282 % \PatInfo[-4ex]{\ShowPattern[George]{Washington}!DB\break
7283 % \ShowPattern{Elizabeth, I}!MN\break
7284 % \ShowPattern{Elizabeth, I}!DB}
7285 %
7286 % \item With a null argument, using the pattern from the last name used:\\
7287 % |\LEliz\ \NameQueryInfo{}|\dotfill^^A
7288 % \LEliz\ \NameQueryInfo{}
7289 % \end{itemize}
7290 %
7291 % \DescribeMacro{\NameClearInfo}
7292 % \cmd{\NameAddInfo} will replace one name tag with another name tag, but it does not delete a tag. That is the role of \cmd{\NameClearInfo}. The syntax is:
7293 %
7294 % \begin{SyntaxBox}
7295 % \cmd{\NameClearInfo}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
7296 % \end{SyntaxBox}
7297 %
7298 % \PatInfo*{\ShowPattern[George]{Washington}!DB\break
7299 % \ShowPattern[George]{Washington}!MN}^^A
7300 % We now revisit \LWash\ and his associated name tag.
7301 %^^A
7302 % \begin{VerbatimOut}{\jobname.tmp}
7303 % The name tag for \Wash\ is: \NameQueryInfo{}\\
7304 % Clearing the tag.\NameClearInfo[George]{Washington}
7305 % \ifcsdef{George!Washington!DB}
7306 % {The tag exists}{The tag is gone.}
7307 % \end{VerbatimOut}
7308 %^^A
7309 % \begin{Quote}
7310 % \VerbatimInput[gobble=0]{\jobname.tmp}
7311 %
7312 % \input{\jobname.tmp}
7313 % \end{Quote}
7314 %
7315 % \subsection{Name Tags in Hooks}
7316 % \label{sec:DataTagHooks}
7317 %
7318 % \Info*{\small\dbend}When calling name tags in formatting hooks (Section~\ref{sec:Formatting}), it helps to remember that they can call other tags as well. Here we offer a quick reminder to stop potential recursion, either with Boolean flags or locally-defined macros. We show the latter below; note the extra grouping tokens:
7319 %^^A
7320 % \begin{VerbatimOut}{\jobname.tmp}
7321 % \NameAddInfo{A}
7322 % {{\newcommand\A{Tag A} \A \unless\ifdefined\B \NameQueryInfo{B} \fi}}
7323 % \NameAddInfo{B}
7324 % {{\newcommand\B{Tag B} \B \unless\ifdefined\A \NameQueryInfo{A} \fi}}
7325 %
7326 % \begin{itemize}
7327 % \item \NameQueryInfo{A}
7328 % \item \NameQueryInfo{B}
7329 % \end{itemize}
7330 % \end{VerbatimOut}
7331 %^^A
7332 % \begin{Quote}
7333 % \VerbatimInput[gobble=0]{\jobname.tmp}
7334 %
7335 % \input{\jobname.tmp}
7336 % \end{Quote}
7337 %
7338 % With version 4.1 of \textsf{nameauth}, printing name tags in hooks has become easy. For example, we can print tags with the first use of a name. Formatting hooks are called within a local scope. They can take zero arguments, where they insert macros like font switches before a name. They also can take one argument, where they start to more complex actions (Section~\ref{sec:AdvancedFormat}). Here are two basic tips:
7339 % \begin{itemize}
7340 % \item Use the recommended template as a base model for custom hooks.
7341 %
7342 % \item Keep all changes local to the formatting hooks.
7343 % \end{itemize}
7344 %
7345 % Below we recommend a starter hook template that uses \cmd{\NameQueryInfo} with a null argument (Section~\ref{sec:NullArgs}) to print the tag with the first use of a name:
7346 % \begin{Quote}
7347 % \begin{Verbatim}
7348 % \renewcommand*\NamesFormat[1]
7349 % {#1\NameQueryInfo{}}
7350 % \end{Verbatim}
7351 % \end{Quote}
7352 %
7353 % Here is another example with more nuanced control:
7354 % \begin{Quote}
7355 % \begin{Verbatim}
7356 % \newif\ifNoTag
7357 % \renewcommand*\NamesFormat[1]
7358 % {%
7359 % #1\unless\ifNoTag\NameQueryInfo{}\fi
7360 % \global\NoTagfalse%
7361 % }
7362 % \end{Verbatim}
7363 % \end{Quote}
7364 %
7365 % We saw this next example in Section~\ref{sec:Complexity}. If the tag is in a hook, it adds a space before it. Otherwise it adds no space. The color and font switches match the conventions of this manual:
7366 % \begin{Quote}
7367 % \begin{Verbatim}
7368 % \makeatletter
7369 % \NameAddInfo{Elizabeth, I}{\if@nameauth@InHook{ }\fi``Gloriana''}
7370 % \makeatother
7371 % \renewcommand*\NamesFormat[1]
7372 % {\color{blue}\sffamily #1\NameQueryInfo{}}
7373 % \renewcommand*\MainNameHook{\sffamily}
7374 % \end{Verbatim}
7375 % \end{Quote}
7376 %
7377 % \Info*{\small\dbend}Even though the core name engine has a ``locked path'' to protect against being reentrant, that does not prevent all problems. Below we show an example of a solution that will avoid halting \LaTeX\ with an error. We ensure that, if we are in a formatting hook, we will not call an infinite series of \cmd{\NameQueryInfo}. Take care to note what happens in a formatting hook, and what happens outside of a hook.
7378 %^^A
7379 % \begin{VerbatimOut}{\jobname.tmp}
7380 % \makeatletter
7381 % \NameAddInfo[Ulysses S.]{Grant}
7382 % {\if@nameauth@InHook\ (term 1869--1877)\else
7383 % eighteenth US president (1869--1877)\fi}
7384 % \NameAddInfo[Schuyler]{Colfax}
7385 % {\if@nameauth@InHook\ (seventeenth US vice-president)\else
7386 % \footnote{\Name[Schuyler]{Colfax} was the seventeenth
7387 % US vice-president during the first term (1869--1873)
7388 % of \Name*[Ulysses S.]{Grant}, \NameQueryInfo{}.}\fi}
7389 % \makeatother
7390 %
7391 % \renewcommand*\NamesFormat{}
7392 % \renewcommand*\MainNameHook{}
7393 %
7394 % Let's remember \Name[Schuyler]{Colfax}.\NameQueryInfo{}
7395 % Derived from ``scholar'', this name can occur
7396 % as ``Skylar'' for girls and ``Skyler'' for boys.
7397 %
7398 % \renewcommand*\NamesFormat[1]{#1\NameQueryInfo{}}
7399 %
7400 % \ForgetThis\Name[Ulysses S.]{Grant} had a poor reputation among
7401 % radical Republicans, especially the Forty-Eighters. Again we note
7402 % \ForgetThis\Name[Schuyler]{Colfax}.
7403 % \end{VerbatimOut}
7404 %^^A
7405 % \begin{Quote}
7406 % \PatInfo[3.5ex]{\ShowPattern[Ulysses S.]{Grant}!DB\break
7407 % \ShowPattern[Schuyler]{Colfax}!DB\break
7408 % \ShowPattern[Schuyler]{Colfax}!MN\break
7409 % \ShowPattern[Ulysses S.]{Grant}!MN}
7410 % \VerbatimInput[gobble=0]{\jobname.tmp}
7411 %
7412 % \input{\jobname.tmp}
7413 % \end{Quote}
7414 %
7415 % \ReturnLink
7416 %
7417 % \begin{Quotation}{\Name[Leonard]{Bernstein}}
7418 % {``What Makes Opera Grand?'', \Title{Vogue} (December 1958)}
7419 % \textls[8]{Any great work of art \dots revives and readapts time and
7420 % space, and the measure of its success is the extent to which it makes
7421 % you an inhabitant of that world\,---\,the extent to which it invites
7422 % you in and lets you breathe its strange, special air.}
7423 % \index{creatives, quotes of\noexpand\string|hyperpage}
7424 % \end{Quotation}
7425 %
7426 % \newpage
7427 %
7428 % \section[Formatting and Decisions]{Basic Formatting and Name Decisions}
7429 % \label{sec:FormatChoice}
7430 %
7431 % \subsection{Basic Formatting}
7432 % \label{sec:Formatting}
7433 %
7434 % This section gives a basic overview. Section~\ref{sec:AdvancedFormat} explores automation and more.
7435 %
7436 % \negmedskip
7437 % \subsubsection*{\hfil Syntactic Changes}
7438 %
7439 % Even with the default options for \textsf{nameauth} wherein no font changes occur, we can observe syntactic changes to names:
7440 %
7441 % \begingroup
7442 % \renewcommand\NamesFormat{}
7443 % \renewcommand\MainNameHook{}
7444 % \begin{tcolorbox}[colframe=gray,colback=white,
7445 % adjusted title={\large\hfil Syntactic Changes;
7446 % No Formatting or Post-Processing}]\centering
7447 % \begin{tabular}{llll}\toprule
7448 % \bfseries First Instance & \bfseries Macro & \bfseries Later Instance & \bfseries Macro\\\midrule
7449 % \ForgetThis\Patton & \cmd{\Patton} & \Patton & \cmd{\Patton}\\
7450 % \ForgetThis\LPatton & \cmd{\LPatton} & \LPatton & \cmd{\LPatton}\\
7451 % \ForgetThis\SPatton & \cmd{\SPatton} & \SPatton & \cmd{\SPatton}\\\midrule
7452 % \ForgetThis\Yamt & \cmd{\Yamt} & \Yamt & \cmd{\Yamt}\\
7453 % \ForgetThis\LYamt & \cmd{\LYamt} & \LYamt & \cmd{\LYamt}\\
7454 % \ForgetThis\SYamt & \cmd{\SYamt} & \SYamt & \cmd{\SYamt}\\\bottomrule
7455 % \end{tabular}
7456 % \end{tcolorbox}
7457 % \endgroup
7458 %
7459 % We can add formatting to these changes by using formatting hooks. In its basic form, this refers to font changes. In its advanced form, one can add or modify text elements, syntactic forms of names, and so on, while leaving index entries undisturbed (Section~\ref{sec:AltFormat}). Although we have encountered examples of syntactic name changes since the start of this manual, here we define that behavior formally:
7460 % \begin{itemize}
7461 % \item First instance of a name
7462 % \begin{itemize}
7463 % \item No name pattern exists.
7464 %
7465 % \item A name is printed with its long form (default).
7466 %
7467 % \item The ``first-use'' formatting hook is used (default).
7468 %
7469 % \item After the name is printed, a name pattern is created.
7470 % \end{itemize}
7471 %
7472 % \item Subsequent instance of a name
7473 % \begin{itemize}
7474 % \item A name pattern already exists.
7475 %
7476 % \item A name is printed using a shorter form (default).
7477 %
7478 % \item The ``subsequent-use'' formatting hook is used (default).
7479 % \end{itemize}
7480 % \end{itemize}
7481 %
7482 % \subsubsection*{\hfil Two Formatting Systems}
7483 %
7484 % Many books are structured with front matter that includes a table of contents, foreword, introductory material, and other instructive content that is not part of the main matter. The \textsf{nameauth} package has separate syntax and formatting system for front matter (\texttt{!NF}) and main matter (\texttt{!MN}), linked to name patterns (Section~\ref{sec:NamePatterns}).
7485 %
7486 % \DescribeMacro{\NamesActive}
7487 % Independent ``main-matter'' and ``front-matter'' systems are used to format first and subsequent name uses.
7488 % \DescribeMacro{\NamesInactive}
7489 % \cmd{\NamesInactive} and the \texttt{frontmatter} option enable the front-matter system. \cmd{\NamesActive} switches names to the main-matter system. The \texttt{mainmatter} option is the default setting for names.
7490 %
7491 % \Global Both \cmd{\NamesInactive} and \cmd{\NamesActive} can be used explicitly as a pair or singly within a local scope. Use \cmd{\global} to force a global effect.
7492 %
7493 % \DescribeMacro{\NamesFormat}
7494 % The main-matter system uses \cmd{\NamesFormat} to post-process first occurrences of names and
7495 % \DescribeMacro{\MainNameHook}
7496 % \cmd{\MainNameHook} for subsequent uses. The front-matter system uses \cmd{\FrontNamesFormat}
7497 % \DescribeMacro{\FrontNamesFormat}
7498 % for first uses and \cmd{\FrontNameHook} for subsequent uses. The \texttt{alwaysformat}
7499 % \DescribeMacro{\FrontNameHook}
7500 % option causes only \cmd{\NamesFormat} and \cmd{\FrontNamesFormat} to be used. Since the formatting hooks always are defined when using \textsf{nameauth}, one must use \cmd{\renewcommand} when changing their definitions.\footnote{The names of these macros grew from \cmd{\NamesFormat}, originally the only formatting hook. Especially with the macros in this section, the naming scheme is unfortunate because package development involved some groping in the dark regarding the concepts.}
7501 % Below we color-code the systems and ``forget'' previous name uses:
7502 % \begin{Quote}
7503 % \ForgetName[Rudolph]{Carnap}
7504 % \PatInfo[4ex]{\textrm{front-matter}\hfill\break
7505 % \ShowPattern[Rudolph]{Carnap}!NF\break
7506 % \ShowPattern[Nicolas]{Malebranche}!NF\break
7507 % \textrm{main-matter}\hfill\break
7508 % \ShowPattern[Rudolph]{Carnap}!MN\break
7509 % \ShowPattern[Nicolas]{Malebranche}!MN}
7510 % \begin{tcolorbox}[colframe=violet,colback=white,
7511 % adjusted title={\large\hfil Front-matter system: \cmd{\NamesInactive}}]
7512 % \NamesInactive
7513 % \begin{tabular}{ll}
7514 % \Name[Rudolph]{Carnap} & |\Name[Rudolph]{Carnap}|\\
7515 % \Name[Rudolph]{Carnap} & |\Name[Rudolph]{Carnap}|\\
7516 % \Name[Nicolas]{Malebranche} & |\Name[Nicolas]{Malebranche}|\\
7517 % \Name[Nicolas]{Malebranche} & |\Name[Nicolas]{Malebranche}|\\
7518 % \end{tabular}
7519 % \end{tcolorbox}
7520 %
7521 % \begin{tcolorbox}[colframe=blue,colback=white,
7522 % adjusted title={\large\hfil Main-matter system: \cmd{\NamesActive}}]
7523 % \NamesActive
7524 % \begin{tabular}{ll}
7525 % \Name[Rudolph]{Carnap} & |\Name[Rudolph]{Carnap}|\\
7526 % \Name[Rudolph]{Carnap} & |\Name[Rudolph]{Carnap}|\\
7527 % \Name[Nicolas]{Malebranche} & |\Name[Nicolas]{Malebranche}|\\
7528 % \Name[Nicolas]{Malebranche} & |\Name[Nicolas]{Malebranche}|\\
7529 % \end{tabular}
7530 % \end{tcolorbox}
7531 % \end{Quote}
7532 %
7533 % We used the \textsf{xcolor} package with the following macros:
7534 % \begin{Quote}
7535 % \begin{Verbatim}
7536 % \renewcommand*\FrontNamesFormat[1]{\color{violet}\sffamily #1}
7537 % \renewcommand*\FrontNameHook[1]{\color{darkgray}\sffamily #1}
7538 % \renewcommand*\NamesFormat[1]{\color{blue}\sffamily #1}
7539 % \renewcommand*\MainNameHook[1]{\sffamily #1}
7540 % \end{Verbatim}
7541 % \end{Quote}
7542 %
7543 % \DescribeMacro{\ForceName}
7544 % Use this prefix macro to force ``first use'' formatting for the next \cmd{\Name}, etc., but without deleting any name patterns. See also Sections~\ref{sec:DataTagHooks}, \ref{sec:NameControl}, and~\ref{sec:AKA}. Thus:
7545 % \begin{Block}
7546 % \PatInfo*{\ShowPattern[Rudolph]{Carnap}!MN}^^A
7547 % \Name[Rudolph]{Carnap}\dotfill^^A
7548 % \cmd{\Name[Rudolph]\{Carnap\}}\\
7549 % \ForceName\Name[Rudolph]{Carnap}\dotfill^^A
7550 % \cmd{\ForceName}\cmd{\Name[Rudolph]\{Carnap\}}
7551 % \end{Block}
7552 %
7553 % \begin{InfoBox}
7554 % In cases where formatting also changes the syntactic form of a name in addition to its typography (Section~\ref{sec:AltFormat}f.), \cmd{\ForceName} could interfere with \cmd{\ForceFN} and \cmd{\ForceAffix}.
7555 % \end{InfoBox}
7556 %
7557 % \Info*{\small\texttt{alwaysformat}}Below we simulate \texttt{alwaysformat} via package internals. Only the ``first use'' formatting hooks are used. This is a relic from early versions of \textsf{nameauth}.
7558 % \makeatletter\@nameauth@AlwaysFormattrue\makeatother%
7559 % \ForgetName[M.T.]{Cicero}\ForgetName{Elizabeth, I}%
7560 % \begin{itemize}
7561 % \item Front matter: \NamesInactive \Name[Albert]{Einstein}, \Name[Albert]{Einstein}; \Name{Confucius}, \Name{Confucius}.\\
7562 % Patterns: \texttt{\ShowPattern[Albert]{Einstein}!NF \ShowPattern{Confucius}!NF}
7563 %
7564 % \item Main matter: \NamesActive \Name[M.T.]{Cicero}, \Name[M.T.]{Cicero}; \Name{Elizabeth, I}, \Name{Elizabeth, I}.\\
7565 % Patterns: \texttt{\ShowPattern[M.T.]{Cicero}!MN \ShowPattern{Elizabeth, I}!MN}
7566 % \end{itemize}
7567 % \makeatletter\@nameauth@AlwaysFormatfalse\makeatother
7568 %
7569 % \subsubsection*{\hfil Hook caveats}
7570 %
7571 % The core name engine determines what syntactic name elements exist and how they are to be displayed (Sections~\ref{sec:NullArgs} and~\ref{sec:AdvancedFormat}). The format hook dispatcher passes the name to the formatting hooks within a local scope:\footnote{We moved \cmd{\@nameauth@InHooktrue} into the immediate hook groups from the beginning of the hook dispatcher to make the logic and functionality more obvious to read.}
7572 % \begin{itemize}
7573 % \item[] \cmd{\bgroup}\cmd{\@nameauth@InHooktrue}\meta{Hook}\texttt{\{\#1\}}\cmd{\egroup}.
7574 % \end{itemize}
7575 % Due to this design, both the following achieve the same effect:
7576 % \begin{itemize}
7577 % \item[] \cmd{\renewcommand*}\cmd{\NamesFormat\{}\cmd{\itshape}\texttt{\}}
7578 % \item[] \cmd{\renewcommand*}\cmd{\NamesFormat\{}\cmd{\textit}\texttt{\}}
7579 % \end{itemize}
7580 %
7581 % One can create formatting hooks that take either no argument or one argument. Since the formatting hooks are already defined, one must not use \cmd{\newcommand} to create new hooks. Instead, use \cmd{\renewcommand} e.g.:
7582 % \begin{itemize}
7583 % \item[] \cmd{\renewcommand*}\cmd{\NamesFormat\{}\meta{content}\texttt{\}}
7584 % \item[] \cmd{\renewcommand*}\cmd{\NamesFormat[1]\{}\meta{content}\texttt{\}}
7585 % \end{itemize}
7586 % A hook with one argument has more options than a font switch (Section~\ref{sec:SpecialUses}). To test if one is in a formatting hook, use |\if@nameauth@InHook| (Sections~\ref{sec:Complexity} and~\ref{sec:DataTags}).
7587 %
7588 % \subsection{Application: Footnotes}
7589 %
7590 % Names in the body text, such as \ForgetThis\Harnack\ (later ennobled to \LHarnack[Adolf von]), normally affect name forms in the footnotes.\footnote{We have \Harnack\ from \cmd{\Harnack} instead of \ForgetThis\Harnack.}
7591 % In footnote \arabic{footnote} below, \cmd{\MainNameHook} is called instead of \cmd{\NamesFormat} because \Harnack\ occurred above. We could use \cmd{\ForgetThis} (Section~\ref{sec:NameControl}) in the footnote to change that behavior. Another way uses the front-matter system and a redefined footnote macro:
7592 %^^A
7593 % \begin{VerbatimOut}{\jobname.tmp}
7594 % \makeatletter
7595 % \let\@oldfntext\@makefntext
7596 % \long\def\@makefntext#1{\NamesInactive\@oldfntext{#1}\NamesActive}
7597 % \makeatother
7598 % \end{VerbatimOut}
7599 %^^A
7600 % \begin{Quote}
7601 % \PatInfo[4ex]{\ShowPattern[Adolf]{Harnack}!MN\break
7602 % \ShowPattern[Adolf]{Harnack}!NF}
7603 % \VerbatimInput[gobble=0]{\jobname.tmp}
7604 % \end{Quote}
7605 % \input{\jobname.tmp}
7606 %
7607 % Now we see different results.\footnote{We have \Harnack\ from \cmd{\Harnack}, then \Harnack.}
7608 % Footnote \arabic{footnote} shows the first use of a name because it is the first use in the front-matter system. Below we revert footnotes with:
7609 %^^A
7610 % \begin{VerbatimOut}{\jobname.tmp}
7611 % \makeatletter
7612 % \let\@makefntext\@oldfntext
7613 % \makeatother
7614 % \end{VerbatimOut}
7615 %^^A
7616 % \begin{Quote}
7617 % \VerbatimInput[gobble=0]{\jobname.tmp}
7618 % \end{Quote}
7619 % \input{\jobname.tmp}
7620 %
7621 % \begin{Quotation}{\Name{Confucius}}
7622 % {\Title{The Analects}, C II (475--221 \textsc{bc})}
7623 % He who exercises government by means of his virtue may be compared
7624 % to the north polar star, which keeps its place and all the stars
7625 % turn towards it.
7626 % \index{philosophers, quotes of\noexpand\string|hyperpage}
7627 % \end{Quotation}
7628 %
7629 % \newpage
7630 %
7631 % \subsection{Making Name Decisions}
7632 % \label{sec:NameControl}
7633 %
7634 % The macros that switch between name systems are local (\cmd{\NamesActive} and \cmd{\NamesInactive}). Otherwise, all the macros below are \emph{global} with respect to name patterns and scoping. Unless restricted to the current name system by \cmd{\LocalNames}, they affect both name systems. %
7635 % Creating and deleting name patterns affects syntactic name forms, formatting, index protection of cross-references (Section~\ref{sec:IndexRef}), and the outcomes of name tests (Section~\ref{sec:NameTests}).
7636 %
7637 % \DescribeMacro{\ForgetName}
7638 % This macro ``forgets'' a name by deleting its pattern. That forces a ``pre-first use'' state. The core name engine treats the name as a first use. Some test results change (Section~\ref{sec:NameTests}), and name protection for indexing is removed, similar to the way that \cmd{\IncludeName*} ``unprotects'' xrefs (Section~\ref{sec:IdxFine}).
7639 %
7640 % \begin{SyntaxBox}
7641 % \cmd{\ForgetName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
7642 % \end{SyntaxBox}
7643 %
7644 % \DescribeMacro{\ForgetThis}
7645 % This macro makes the name engine ``forget'' the name pattern just before the parser, printing the name as a first use, then ``remembering'' the name. This can affect some tests in formatting hooks. After knowing \Einstein, we forget him again:\footnote{\cmd{\ForgetThis} no longer affects the index unless one uses the \texttt{oldreset} option. Likewise, \cmd{\SubvertThis} no longer affects the index unless one uses the \texttt{oldreset} option.}
7646 % \begin{Block}
7647 % \ForgetThis\Einstein\dotfill |\ForgetThis\Einstein|
7648 % \end{Block}
7649 %
7650 % \DescribeMacro{\SubvertName}
7651 % This macro ``subverts'' a name by creating a name pattern. This makes the name engine handle a name as a subsequent use, changes some test results, and ``protects'' a name from being used as a \textit{see} reference, analogous to \cmd{\ExcludeName} and \cmd{\IndexRef}:
7652 %
7653 % \begin{SyntaxBox}
7654 % \cmd{\SubvertName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alternate}
7655 % \end{SyntaxBox}
7656 %
7657 % \DescribeMacro{\SubvertThis}
7658 % This macro causes the name egine to create a name pattern just before the parser, printing the name as a subsequent use. This can affect some tests in formatting hooks. \cmd{\ForgetThis} has a higher priority than \cmd{\SubvertThis} and negates it (Section~\ref{sec:Priorities}).
7659 %
7660 % \begin{InfoBox}
7661 % We advise users to avoid using \cmd{\ForgetThis} and \cmd{\SubvertThis} before any macro that does not print a name in the text.
7662 % \end{InfoBox}
7663 %
7664 % \begin{itemize}
7665 % \item \DescribeMacro{\LocalNames} The helper macro \cmd{\LocalNames} restricts the macros above to the \emph{current} name system, but not to any scope.
7666 %
7667 % \item \DescribeMacro{\GlobalNames} The helper macro \cmd{\GlobalNames} restores the effects of these macros to \emph{both name systems.}
7668 % \end{itemize}
7669 %
7670 % In the next example we define a macro that reports whether or not the specific name |\Name[Charlie]{Chaplin}|\JustIndex\Name[Charlie]{Chaplin} exists. There are four outcomes: the name exists in the main matter, in the front matter, in both name systems, or it does not exist. The naming macros use the current name system. The macros on this page affect both name systems by default.
7671 %
7672 % \newpage
7673 %
7674 % \begin{VerbatimOut}{\jobname.tmp}
7675 % \newcommand\CheckChuck{{Name systems:
7676 % \IfFrontName[Charlie]{Chaplin}
7677 % {\bfseries\IfMainName[Charlie]{Chaplin}{in both}{in front}}
7678 % {\bfseries\IfMainName[Charlie]{Chaplin}{in main}{in none}}}}
7679 %
7680 % Create a name pattern in both systems\dotfill
7681 % \SubvertName[Charlie]{Chaplin}\CheckChuck
7682 %
7683 % Restrict to the current (main) name system. \LocalNames
7684 %
7685 % Forget a name in the main-matter system\dotfill
7686 % \ForgetName[Charlie]{Chaplin}\CheckChuck
7687 %
7688 % Restored: \Name[Charlie]{Chaplin}\dotfill\CheckChuck
7689 %
7690 % Switch to the front matter. \NamesInactive
7691 %
7692 % Forget a name in the front-matter system\dotfill
7693 % \ForgetName[Charlie]{Chaplin}\CheckChuck
7694 %
7695 % Restored: \Name[Charlie]{Chaplin}\dotfill\CheckChuck
7696 %
7697 % Switch to the main matter. \NamesActive
7698 %
7699 % Lift name system restrictions. \GlobalNames
7700 %
7701 % Forget a name in both systems\dotfill
7702 % \ForgetName[Charlie]{Chaplin}\CheckChuck
7703 % \end{VerbatimOut}
7704 % \begin{Quote}
7705 % \VerbatimInput[gobble=0]{\jobname.tmp}
7706 %
7707 % \PatInfo[3ex]{\ShowPattern[Charlie]{Chaplin}!MN\break
7708 % \ShowPattern[Charlie]{Chaplin}!NF}
7709 % \input{\jobname.tmp}
7710 % \end{Quote}
7711 %
7712 % \subsection{Summary}
7713 %
7714 % \begingroup
7715 % We summarize info on name forms and formatting, using the following macros:
7716 % \begin{Quote}
7717 % \begin{Verbatim}
7718 % \renewcommand*\NamesFormat[1]
7719 % {\color{blue}\sffamily#1\NameQueryInfo{}}
7720 % \renewcommand*\MainNameHook{\sffamily}
7721 % \begin{nameauth}
7722 % \< Bailey & Betsey & Bailey & >
7723 % \< Faisal & & Faisal, bin Abdulaziz & >
7724 % \end{nameauth}
7725 % \NameAddInfo{Faisal, bin Abdulaziz}{ Al Saud}
7726 % \TagName{Faisal, bin Abdulaziz}{ Al Saud, king}
7727 % \end{Verbatim}
7728 % \end{Quote}
7729 % \renewcommand*\NamesFormat[1]
7730 % {\color{blue}\sffamily#1\NameQueryInfo{}}
7731 % \renewcommand*\MainNameHook{\sffamily}
7732 %
7733 % Now we show the macros at work. Regarding the automatic use of the name tag in the first-use hook, see Section~\ref{sec:DataTagHooks}.
7734 % \phantomsection
7735 % \begin{itemize}[leftmargin=3cm]\small
7736 % \item[\hypertarget{FirstI}{First Instance:}]
7737 % \PatInfo[3ex]{\ShowPattern[Betsey]{Bailey}!MN\break
7738 % \ShowPattern{Faisal, bin Abdulaziz}!MN}
7739 % Name pattern created with text output.
7740 % Index state 2, 4, or 6 (Section~\ref{sec:RuleStates}).
7741 % Name form: long. First-use hooks.
7742 % \item[] \ForgetThis\Bailey \dotfill \cmd{\Bailey}\\
7743 % \hbox{}\hfill \cmd{\LBailey}\\
7744 % \hbox{}\hfill \cmd{\SBailey}
7745 % \item[] \ForgetThis\Faisal \dotfill \cmd{\Faisal}\\
7746 % \hbox{}\hfill \cmd{\LFaisal}\\
7747 % \hbox{}\hfill \cmd{\SFaisal}
7748 %
7749 % \item[\hypertarget{LaterI}{Later Instance:}]
7750 % No change to name pattern. Index state 2, 4, or 6.
7751 % Name form: short or long. Subsequent-use hooks.
7752 % \item[] \Bailey \dotfill^^A
7753 % \cmd{\Bailey}
7754 % \item[] \LBailey \dotfill^^A
7755 % \cmd{\LBailey}
7756 % \item[] \SBailey \dotfill^^A
7757 % \cmd{\SBailey}
7758 % \item[] \Faisal \dotfill^^A
7759 % \cmd{\Faisal}\\
7760 % \hbox{}\hfill \cmd{\SFaisal}
7761 % \item[] \LFaisal \dotfill^^A
7762 % \cmd{\LFaisal}
7763 % \item[] \ForceFN\SFaisal \dotfill^^A
7764 % \cmd{\ForceFN}\cmd{\SFaisal}
7765 %
7766 % \item[Forgotten:]
7767 % Name pattern deleted. Index state 1, 3, or 5.
7768 % Next instance usually will be a
7769 % \hyperlink{FirstI}{first instance}.
7770 % \item[] (no output)\ForgetName[Betsey]{Bailey}^^A
7771 % \dotfill \cmd{\ForgetName[Betsey]\{Bailey\}}
7772 % \item[] (no output)\ForgetName{Faisal, bin Abdulaziz}^^A
7773 % \dotfill |\ForgetName{Faisal, bin Abdulaziz}|
7774 %
7775 % \item[Subverted:]
7776 % Name pattern created. Index state 2, 4, or 6.
7777 % Next instance usually will be a
7778 % \hyperlink{LaterI}{later instance}.
7779 % \item[] (no output)\SubvertName[Betsey]{Bailey}^^A
7780 % \dotfill \cmd{\SubvertName[Betsey]\{Bailey\}}
7781 % \item[] (no output)\SubvertName{Faisal, bin Abdulaziz}^^A
7782 % \dotfill |\SubvertName{Faisal, bin Abdulaziz}|
7783 %
7784 % \item[\cmd{\ForgetThis}:]
7785 % Name pattern deleted, then created again.
7786 % Index state 2, 4, or 6. Name form and format:
7787 % \hyperlink{FirstI}{first instance}.
7788 % Next instance usually will be a
7789 % \hyperlink{LaterI}{later instance}.
7790 % \item[] \ForgetThis\Bailey \dotfill \cmd{\ForgetThis}\cmd{\Bailey}\\
7791 % \hbox{}\hfill \cmd{\ForgetThis}\cmd{\LBailey}\\
7792 % \hbox{}\hfill \cmd{\ForgetThis}\cmd{\SBailey}
7793 % \item[] \ForgetThis\Faisal \dotfill \cmd{\ForgetThis}\cmd{\Faisal}\\
7794 % \hbox{}\hfill \cmd{\ForgetThis}\cmd{\LFaisal}\\
7795 % \hbox{}\hfill \cmd{\ForgetThis}\cmd{\SFaisal}
7796 %
7797 % \item[\cmd{\SubvertThis}:]
7798 % Name pattern created. Index state 2, 4, or 6.
7799 % Name form and format: \hyperlink{LaterI}{later instance}.
7800 % Next instance usually will be a
7801 % \hyperlink{LaterI}{later instance}.
7802 % \item[] \SubvertThis\Bailey \dotfill^^A
7803 % \cmd{\SubvertThis}\cmd{\Bailey}
7804 % \item[] \SubvertThis\LBailey \dotfill^^A
7805 % \cmd{\SubvertThis}\cmd{\LBailey}
7806 % \item[] \SubvertThis\SBailey \dotfill^^A
7807 % \cmd{\SubvertThis}\cmd{\SBailey}
7808 % \item[] \SubvertThis\Faisal \dotfill^^A
7809 % \cmd{\SubvertThis}\cmd{\Faisal}\\
7810 % \hbox{}\hfill \cmd{\SubvertThis}\cmd{\SFaisal}
7811 % \item[] \SubvertThis\LFaisal \dotfill^^A
7812 % \cmd{\SubvertThis}\cmd{\LFaisal}
7813 % \item[] \SubvertThis\ForceFN\SFaisal \dotfill^^A
7814 % \cmd{\SubvertThis}\cmd{\ForceFN}\cmd{\SFaisal}
7815 %
7816 % \item[Format as First:]
7817 % No change to name pattern. Index state 2, 4, or 6.
7818 % Name form: short or long. Name format: First-use hooks.
7819 % \item[] \ForceName\Bailey \dotfill^^A
7820 % \cmd{\ForceName}\cmd{\Bailey}
7821 % \item[] \ForceName\LBailey \dotfill^^A
7822 % \cmd{\ForceName}\cmd{\LBailey}
7823 % \item[] \ForceName\SBailey \dotfill^^A
7824 % \cmd{\ForceName}\cmd{\SBailey}
7825 % \item[] \ForceName\Faisal \dotfill^^A
7826 % \cmd{\ForceName}\cmd{\Faisal}
7827 % \item[] \ForceName\LFaisal \dotfill^^A
7828 % \cmd{\ForceName}\cmd{\LFaisal}
7829 % \item[] \ForceName\SFaisal \dotfill^^A
7830 % \cmd{\ForceName}\cmd{\SFaisal}
7831 % \item[] \ForceName\ForceFN\SFaisal \dotfill^^A
7832 % \cmd{\ForceName}\cmd{\ForceFN}\cmd{\SFaisal}
7833 % \end{itemize}
7834 % \endgroup
7835 %
7836 % \subsection{Testing Name Decisions}
7837 % \label{sec:NameTests}
7838 %
7839 % Since name patterns are control sequences like macros, we can test for their existence. This can relate names to each other dynamically throughout a document.
7840 %
7841 % \subsubsection{Testing Macros}
7842 %
7843 % The macros in this section test for the presence or absence of a name, then expand to a result based on the outcome of the test.
7844 %
7845 % \DescribeMacro{\GlobalNameTest}
7846 % The default behavior \emph{encapsulates the decision paths in a local scope,} insulating some changes therein.
7847 % \DescribeMacro{\LocalNameTest}
7848 % If this is not desired, use the \texttt{globaltest} option or \cmd{\GlobalNameTest}. \cmd{\LocalNameTest} will re-enable the default. Any naming macros (\cmd{\Name}, etc.) used in these paths will have global assignments associated with them, i.e., name patterns, tags, etc.
7849 %
7850 % \DescribeMacro{\IfMainName}
7851 % In order to test whether or not a ``main matter'' name pattern exists, use this long macro that can accommodate paragraph breaks:
7852 %
7853 % \begin{SyntaxBox}
7854 % \cmd{\IfMainName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alt.}^^A
7855 % \marg{yes}\marg{no}
7856 % \end{SyntaxBox}
7857 %
7858 % For example we have not encountered |\Name[Bob]{Hope}| yet. We could do the following test that will reflect whether or not the name is present in the text:
7859 %^^A
7860 % \begin{VerbatimOut}{\jobname.tmp}
7861 % I heard someone say: \IfMainName[Bob]{Hope}
7862 % {Bob here!}
7863 % {No Bob here.}\IndexName[Bob]{Hope}
7864 % \end{VerbatimOut}
7865 %^^A
7866 % \begin{Quote}
7867 % \VerbatimInput[gobble=0]{\jobname.tmp}
7868 %
7869 % \input{\jobname.tmp}
7870 % \end{Quote}
7871 %
7872 % Now we test for |\Name{Elizabeth,I}|, which has occurred, and show how local and global test paths differ with respect to scope. At least some \LaTeX\ commands that define macros will behave differently than \cmd{\def}:
7873 %^^A
7874 % \begin{VerbatimOut}{\jobname.tmp}
7875 % \GlobalNameTest
7876 % \def\msg{We reserve judgment on \LEliz}
7877 % \IfMainName{Elizabeth,I}
7878 % {\def\msg{\LEliz\ is Gloriana!}}
7879 % {\def\msg{We do not know of \LEliz}}
7880 % \parbox{0.4\textwidth}{\msg} (\cmd{\GlobalNameTest}).
7881 %
7882 % \LocalNameTest
7883 % \def\msg{We reserve judgment on \LEliz}
7884 % \IfMainName{Elizabeth,I}
7885 % {\def\msg{\LEliz\ is Gloriana!}}
7886 % {\def\msg{We do not know of \LEliz}}
7887 % \parbox{0.4\textwidth}{\msg} (\cmd{\LocalNameTest}).
7888 % \end{VerbatimOut}
7889 %^^A
7890 % \begin{Quote}
7891 % \VerbatimInput[gobble=0,lastline=7]{\jobname.tmp}
7892 %
7893 % \VerbatimInput[gobble=0,firstline=8]{\jobname.tmp}
7894 %
7895 % \input{\jobname.tmp}
7896 % \end{Quote}
7897 %
7898 % \DescribeMacro{\IfFrontName}
7899 % In order to test whether or not a ``front matter'' name pattern exists, use this long macro that can accommodate paragraph breaks. Its syntax is:
7900 %
7901 % \begin{SyntaxBox}
7902 % \cmd{\IfFrontName}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alt.}^^A
7903 % \marg{yes}\marg{no}
7904 % \end{SyntaxBox}
7905 %
7906 % This macro works just like \cmd{\IfMainName}, except using the ``front matter'' name patterns as the test subject. These testing macros prove their worth especially through combination. For example, we do a test based on Section~\ref{sec:Formatting}.
7907 %^^A
7908 % \begin{VerbatimOut}{\jobname.tmp}
7909 % \IfFrontName[Rudolph]{Carnap}
7910 % {\IfMainName[Rudolph]{Carnap}
7911 % {\Name[Rudolph]{Carnap} is in both main- and front-matter text.}
7912 % {\Name[Rudolph]{Carnap} is only in front-matter text.}}
7913 % {\IfMainName[Rudolph]{Carnap}
7914 % {\Name[Rudolph]{Carnap} is only in main-matter text.}
7915 % {\Name[Rudolph]{Carnap} has not been mentioned.}}
7916 % \end{VerbatimOut}
7917 %^^A
7918 % \begin{Quote}
7919 % \VerbatimInput[gobble=0]{\jobname.tmp}
7920 %
7921 % \input{\jobname.tmp}
7922 % \end{Quote}
7923 %
7924 % \DescribeMacro{\IfAKA}
7925 % This macro tests whether or not a regular or excluded form of cross-reference control sequence exists. The syntax is:
7926 %
7927 % \begin{SyntaxBox}
7928 % \cmd{\IfAKA}\oarg{FNN}\marg{SNN\textbf{,}Affix}\oarg{Alt.}^^A
7929 % \marg{y}\marg{n}\marg{excl}
7930 % \end{SyntaxBox}
7931 %
7932 % This macro also works like \cmd{\IfMainName}, except that it has an additional \meta{excl} branch to detect names excluded by \cmd{\ExcludeName} (Section~\ref{sec:GeneralIndex}). If we do not use \cmd{\ExcludeName}, we can leave the \meta{excl} branch empty.
7933 % \begin{itemize}
7934 % \item Cross-references (the \meta{y} path) are name patterns ending in \texttt{!PN} (Section~\ref{sec:NamePatterns}). They expand to empty.
7935 %
7936 % \item Excluded names (the \meta{excl} path) have xrefs that expand to the value of \cmd{\@nameauth@Exclude}.
7937 %
7938 % \item \cmd{\ExcludeName} creates excluded xrefs. \cmd{\IncludeName} destroys them.
7939 %
7940 % \item \cmd{\IndexRef}, \cmd{\AKA}, \cmd{\AKA*}, \cmd{\PName}, and \cmd{\PName*} create xrefs, which are destroyed only by \cmd{\IncludeName*}.
7941 % \end{itemize}
7942 % \begin{Quote}
7943 % \begin{Verbatim}
7944 % \IfAKA[James]{Janos}
7945 % {\Name*[Jesse]{Ventura} is a stage name}
7946 % {\Name*[Jesse]{Ventura} is a regular name}
7947 % {}.
7948 % \end{Verbatim}
7949 % \end{Quote}
7950 % \PatInfo*{\ShowPattern[Jesse]{Ventura}!MN\break
7951 % \ShowPattern[James]{Janos}!PN\break
7952 % \ShowPattern[James]{Janos}!MN}^^A
7953 % First we mention \Name[Jesse]{Ventura} |\Name[Jesse]{Ventura}|, pro wrestler and Minnesota governor. His lesser-known legal name,
7954 % \IndexRef[James]{Janos}{Ventura, Jesse}\Name[James]{Janos} is an
7955 % alias:
7956 % |\IndexRef[James]{Janos}{Ventura, Jesse}\Name[James]{Janos}|.
7957 % The order of the macros is important. The test above says:
7958 % \IfAKA[James]{Janos}
7959 % {\Name*[Jesse]{Ventura} is a stage name}
7960 % {\Name*[Jesse]{Ventura} is a regular name}
7961 % {}.
7962 % We also can create a complete, unified test:
7963 % \begin{Quote}
7964 % \begin{Verbatim}
7965 % \IfAKA[FNN]{SNN, Affix}[Alt.]
7966 % {It is an xref.}
7967 % {It is a name.
7968 % \IfFrontName[FNN]{SNN, Affix}[Alt.]
7969 % {% It is at least in the front matter
7970 % \IfMainName[FNN]{SNN, Affix}[Alt.]
7971 % {It is in both front and main matter.}
7972 % {It is only in the front matter.}%
7973 % }
7974 % {% It is not in the front matter.
7975 % \IfMainName[FNN]{SNN, Affix}[Alt.]
7976 % {It is only in the main matter.}
7977 % {It does not exist.}%
7978 % }%
7979 % }
7980 % {It is excluded.}
7981 % \end{Verbatim}
7982 % \end{Quote}
7983 %
7984 % \subsubsection{Applications}
7985 %
7986 % As we have seen, we can control name forms with \cmd{\ForgetThis} and the like. Yet we also can use tests in situations where we might not know if a name has appeared, like when a name appears in a \texttt{table} or other float environment. Thus:
7987 % \begin{Quote}
7988 % \begin{Verbatim}
7989 % \IfMainName[M.S.]{Omartian}
7990 % {\Name[M.S.]{Omartian}}
7991 % {\Name[M.S.]{Omartian}[Michael]} produced many number-one
7992 % records over three decades.
7993 % \end{Verbatim}
7994 %
7995 % \PatInfo*{\ShowPattern[M.S.]{Omartian}}
7996 % \IfMainName[M.S.]{Omartian}
7997 % {\Name[M.S.]{Omartian}}
7998 % {\Name[M.S.]{Omartian}[Michael]} produced many number-one
7999 % records over three decades.
8000 % \end{Quote}
8001 %
8002 % Next we recall the movie, \textit{Ferris Bueller's Day Off}. Using conditionals, we can design statements that are sensitive to the plot.
8003 % \begin{Quote}
8004 % \begin{Verbatim}
8005 % This is \FName[Cameron]{Frye}.
8006 % \IfMainName[Ferris]{Bueller}
8007 % {He is developing positive traits.}
8008 % {He is gloomy and introspective.}
8009 % \Name[Ferris]{Bueller} decides to hang out with
8010 % \FName[Cameron]{Frye}.
8011 % \IfMainName[Ferris]{Bueller}
8012 % {He is developing positive traits.}
8013 % {He is gloomy and introspective.}
8014 % \end{Verbatim}
8015 %
8016 % This is \FName[Cameron]{Frye}.
8017 % \IfMainName[Ferris]{Bueller}
8018 % {He is developing positive traits.}
8019 % {He is gloomy and introspective.}
8020 % \Name[Ferris]{Bueller} decides to hang out with
8021 % \FName[Cameron]{Frye}.
8022 % \IfMainName[Ferris]{Bueller}
8023 % {He is developing positive traits.}
8024 % {He is gloomy and introspective.}
8025 % \end{Quote}
8026 %
8027 % Below, we can extend the use of conditionals to name tags. This allows different facts to appear with names, depending on what other names have appeared. We forget all names beforehand and show the following example:
8028 % \begin{VerbatimOut}{\jobname.tmp}
8029 % \NameAddInfo{Saul, of Tarsus}
8030 % {\IfMainName{Jesus, Christ}
8031 % {\IfMainName[Lucius]{Sergius Paulus}
8032 % {called himself \Name{Paul},
8033 % perhaps in honor of his patron}
8034 % {next became a preacher to the Gentiles}}
8035 % {wrote first that he persecuted Christians}}
8036 %
8037 % \ForgetName{Jesus, Christ}
8038 % \ForgetName[Lucius]{Sergius Paulus}
8039 % \IndexRef{Paul}{Saul of Tarsus}
8040 %
8041 % \Name{Saul, of Tarsus} \NameQueryInfo{}.
8042 % He wrote in the letter to the Galatians, later reported in
8043 % the book of Acts, that he saw a vision of \Name{Jesus, Christ}
8044 % on the road to Damascus.
8045 %
8046 % \Name{Saul, of Tarsus} \NameQueryInfo{}.
8047 % He undertook three missionary journeys before being
8048 % sent to Rome for trial in an appeal to Caesar.
8049 % While in Cyprus, \Name{Saul, of Tarsus} converted
8050 % \Name[Lucius]{Sergius Paulus}, who became a patron.
8051 %
8052 % \Name{Saul, of Tarsus} \NameQueryInfo{}.
8053 % Under the name \Name{Paul} he wrote his letters
8054 % during his journeys and imprisonment.
8055 % \end{VerbatimOut}
8056 %^^A
8057 % \begin{Quote}
8058 % \PatInfo[3ex]{\ShowPattern{Paul}!PN\break
8059 % \ShowPattern{Saul, of Tarsus}!DB\break
8060 % \ShowPattern{Jesus, Christ}!MN\break
8061 % \textls[-10]{\ShowPattern[Lucius]{Sergius Paulus}!MN}\break
8062 % \ShowPattern{Paul}!MN\break
8063 % \ShowPattern{Saul, of Tarsus}!MN}
8064 % \VerbatimInput[gobble=0]{\jobname.tmp}
8065 %
8066 % \input{\jobname.tmp}
8067 % \end{Quote}
8068 %
8069 % \subsubsection*{\hfil Caveats}
8070 %
8071 % \begin{itemize}
8072 % \item One should check and validate test results. That is particularly true when using the tests inside macros. See \Title{The \TeX book}, 212--15.
8073 %
8074 % \item See Section~\ref{sec:Noexpand} regarding the use of \cmd{\noexpand} in name arguments to stabilize name patterns so that comparisons are consistent and valid.
8075 %
8076 % \item See also Section~\ref{sec:Unicode} regarding possible Unicode issues. This is perhaps less of an issue in modern \TeX\ distributions.
8077 %
8078 % \item The \textsf{trace} package, along with the macros \cmd{\show} and \cmd{\meaning}, can help debug problems.
8079 % \end{itemize}
8080 %
8081 % \newpage
8082 %
8083 % \subsubsection{Beamer Example}
8084 %
8085 % Names will change automatically in \textsf{beamer} overlays as one advances the slides unless we control them, as shown in the following example.
8086 %^^A
8087 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test09_01.tex}\else
8088 % \edef\NameauthTestFile{\jobname.tmp}\fi
8089 %^^A
8090 % \begin{VerbatimOut}{\NameauthTestFile}
8091 % \documentclass{beamer}
8092 % \input{compat.tex} % Included with nameauth for compatibility.
8093 % \usepackage[noindex]{nameauth}
8094 %
8095 % \mode<presentation>
8096 % \beamerdefaultoverlayspecification{<+->}
8097 %
8098 % \begin{document}
8099 %
8100 % \begin{frame}{Move Text Without Retyping Names}
8101 % \begin{itemize}\footnotesize
8102 % \item<1-> Original\ForgetName[George]{Washington}%
8103 % \ForgetName[George]{Washington's}\\
8104 % This version of \Name[Ulysses S.]{Grant} changes.
8105 % \begin{enumerate}
8106 % \item<2-> \IfMainName[George]{Washington's}{He}%
8107 % {\Name[George]{Washington}}
8108 % became the first president
8109 % of the United States.
8110 % \item<3-> \IfMainName[George]{Washington}{His}%
8111 % {\Name*[George]{Washington's}}
8112 % military successes during the Seven Years War
8113 % readied him to command the army
8114 % of the Continental Congress.
8115 % \end{enumerate}
8116 % \item<1-> Reordered\ForgetName[George]{Washington}%
8117 % \ForgetName[George]{Washington's}\\
8118 % This version of \ForgetThis\Name[Ulysses S.]{Grant}
8119 % does not change.
8120 % \begin{enumerate}
8121 % \item<3-> \IfMainName[George]{Washington}{His}%
8122 % {\Name*[George]{Washington's}}
8123 % military successes during the Seven Years War
8124 % readied him to command the army
8125 % of the Continental Congress.
8126 % \item<2-> \IfMainName[George]{Washington's}{He}%
8127 % {\Name[George]{Washington}}
8128 % became the first president
8129 % of the United States.
8130 % \end{enumerate}
8131 % \end{itemize}
8132 %
8133 % \end{frame}
8134 %
8135 % \end{document}
8136 % \end{VerbatimOut}
8137 %^^A
8138 % \begin{Quote}
8139 % \VerbatimInput[gobble=0]{\NameauthTestFile}
8140 % \IndexName[George]{Washington}
8141 % \IndexName[Ulysses S.]{Grant}
8142 % \end{Quote}
8143 %
8144 % The overlays, numbered from one to three, keep name forms consistent by deleting name patterns for each new overlay. Otherwise, name patterns would change for each new overlay.
8145 %
8146 % \newpage
8147 %
8148 % Name conditionals ensure specific, context-dependent forms based on what name has appeared. These conditionals allow the text in each overlay to be order-independent and able to be moved around at will. The first overlay shows the use of \cmd{\ForgetThis} to keep names constant.
8149 %
8150 % \begin{tcolorbox}\centering
8151 % \IfFileExists{beamer01.pdf}{\includegraphics[scale=0.6]{beamer01.pdf}}
8152 % {\hbox{\vbox to 8cm{\hbox{\hfill}}}}
8153 % \end{tcolorbox}
8154 % \IndexName[George]{Washington}
8155 % \IndexName[Ulysses S.]{Grant}
8156 % \bigskip
8157 %
8158 % The second overlay uses \cmd{\ForgetName} forcing specific name forms respective to each overlay, instead of respective to the overall sequence of overlays. We also observe the use of name conditionals in text elements that one might reorder.
8159 %
8160 % \begin{tcolorbox}\centering
8161 % \IfFileExists{beamer02.pdf}{\includegraphics[scale=0.6]{beamer02.pdf}}
8162 % {\hbox{\vbox to 8cm{\hbox{\hfill}}}}
8163 % \end{tcolorbox}
8164 % \IndexName[George]{Washington}
8165 % \IndexName[Ulysses S.]{Grant}
8166 %
8167 % \newpage
8168 %
8169 % Overlay three shows how these features integrate. A presenter can design slides that determine name forms, regardless of being re-ordered.
8170 %
8171 % \begin{tcolorbox}\centering
8172 % \IfFileExists{beamer03.pdf}{\includegraphics[scale=0.6]{beamer03.pdf}}
8173 % {\hbox{\vbox to 8cm{\hbox{\hfill}}}}
8174 % \end{tcolorbox}
8175 % \IndexName[George]{Washington}
8176 % \IndexName[Ulysses S.]{Grant}
8177 % \ReturnLink
8178 %
8179 % \begin{Quotation}{\Name[Theodore]{Roosevelt}}
8180 % {Introduction, \Title{The Papers and Writings of Abraham Lincoln} (1905)}
8181 % It is a very poor thing, whether for nations or individuals, to advance
8182 % the history of great deeds done in the past as an excuse for doing poorly
8183 % in the present; but it is an excellent thing to study the history of the
8184 % great deeds of the past, and of the great men who did them, with an
8185 % earnest desire to profit thereby so as to render better service in the
8186 % present. In their essentials, the men of the present day are much like
8187 % the men of the past, and the live issues of the present can be faced to
8188 % better advantage by men who have in good faith studied how the leaders of
8189 % the nation faced the dead issues of the past.
8190 % \index{politicians, quotes of\noexpand\string|hyperpage}
8191 % \end{Quotation}
8192 %
8193 % \newpage
8194 %
8195 % \section{Name Authority Basics}
8196 % \label{sec:NameAuthority}
8197 %
8198 % \subsection{Variant Names}
8199 % \label{sec:VarNames}
8200 %
8201 % This section explains how to manage simpler surname variants. There are several ways that \textsf{nameauth} can handle variants, in increasing levels of complexity.
8202 % \begin{itemize}[leftmargin=2cm]
8203 % \item[Group 1:] Use \meta{Alternate} to create variant forms, yet retain consistent index entries. This is the default function of \textsf{nameauth} seen already.
8204 %
8205 % \item[Group 2:] Use methods from Sections~\ref{sec:IndexPageno} and~\ref{sec:IndexRef}, and the manual approaches in Section~\ref{sec:Romani}.
8206 % \begin{itemize}
8207 % \item Use a particular name as a ``standard'' variant, then use other variants with a \textit{see} reference.
8208 %
8209 % \item Use one or more names as ``standard'' variants that refer to each other via \textit{see also} references.
8210 % \end{itemize}
8211 %
8212 % \item[Group 3:] Use alternate formatting and macros in name arguments (Sections~\ref{sec:AltFormat} and~\ref{sec:Romani}).
8213 % \end{itemize}
8214 %
8215 % \NameArgWarning
8216 %
8217 % \subsubsection[Alternate Argument]{Variants and the \protect\meta{Alternate} Argument}
8218 %
8219 % We begin with the first kind of variant names listed above. We decide that the canonical name to be used is \Tyson. We set up both the canonical name and an alternate name in the \texttt{nameauth} environment:
8220 % \begin{Quote}
8221 % \PatInfo[4ex]{\ShowPattern[Mike]{Tyson}!MN}
8222 % \begin{Verbatim}
8223 % \begin{nameauth}
8224 % \< Tyson & Mike & Tyson & >
8225 % \< Iron & Mike & Tyson & Iron Mike >
8226 % \end{nameauth}
8227 %
8228 % \IndexRef{Iron Mike}{Tyson, Mike}
8229 % \end{Verbatim}
8230 % \end{Quote}
8231 %
8232 % Because \cmd{\Iron} uses the \meta{Alternate} column, all index page entries are the same as those for \cmd{\Tyson}, the canonical name. Adding the cross-reference via \cmd{\IndexRef} produces ``Iron Mike \textit{see} Tyson, Mike'' in the index.
8233 % \begin{Quote}
8234 % \begin{tabular}{llll}\toprule
8235 % \rowcolor{nagrey}^^A
8236 % \bfseries Text & \bfseries Macro &
8237 % \bfseries Text & \bfseries Macro\\
8238 %
8239 % \LIron \qquad & \cmd{\LIron} &
8240 % \LTyson[Iron Mike] & \cmd{\LTyson[Iron Mike]}\\
8241 %
8242 % \rowcolor{nagrey}^^A
8243 % \Iron & \cmd{\Iron} & \Tyson & \cmd{\Tyson}\\
8244 %
8245 % \SIron & \cmd{\SIron} & \STyson & \cmd{\STyson}\\\bottomrule
8246 % \end{tabular}
8247 % \end{Quote}
8248 %
8249 % Yet \meta{Alternate} does more than handle variant forenames in Western name forms. It can be used to manage alternate names in Eastern and ancient forms, as we have already seen. For this to work properly, we must have a name where \meta{SNN} and \meta{Affix} are both populated in order to use \meta{Alternate}. Otherwise, one winds up with the obsolete syntax (Section~\ref{sec:Obsolete}). That probably is undesired.
8250 %
8251 % \newpage
8252 %
8253 % We will engage with different kinds of variant names more, beginning with Section~\ref{sec:NameAncient}, Here we give a basic illustration of how one can start to manage these names just by using \meta{Alternate}. For instance:
8254 % \begin{Quote}
8255 % \PatInfo[4ex]{\ShowPattern{Elizabeth, I}!MN}
8256 % \begin{Verbatim}
8257 % \begin{nameauth}
8258 % \< Eliz & & Elizabeth, I & >
8259 % \end{nameauth}
8260 %
8261 % \IndexRef{Gloriana}{Elizabeth I}
8262 % \IndexRef[Good Queen]{Bess}{Elizabeth I}
8263 %
8264 % \LEliz[I, ``Gloriana''] was known also as
8265 % \ForceFN\SEliz[``Good Queen Bess''].
8266 % \end{Verbatim}
8267 %
8268 % \LEliz[I, ``Gloriana''] was known also as
8269 % \ForceFN\SEliz[``Good Queen Bess''].
8270 % \end{Quote}
8271 %
8272 % \subsubsection[Multiple Variants]{Managing Multiple Variant Names}
8273 %
8274 % With the second group of name variants listed above (relating to Sections~\ref{sec:IndexPageno} and~\ref{sec:IndexRef}), we get into pseudonyms, aliases, and variant family names. This class is more complicated for the following reasons:
8275 % \begin{itemize}
8276 % \item Names having separate index entries are linked together with cross-references; most of the work that interrelates these names is done with the indexing macros.
8277 %
8278 % \item Names that the author wants to treat as different may be seen by the \textsf{nameauth} internals as identical (Section~\ref{sec:Unique}). One can use nonprinting macros or grouping tokens in name arguments, index tagging macros, and formatting macros to create unique names (see below and Section~\ref{sec:IndexTag}).
8279 % \end{itemize}
8280 %
8281 % We approach and cross the boundary between the second and third groups of names mentioned above when we deal with names that contain particles, that change capitalization, that have changing grammatical endings (Sections~\ref{sec:NameParticles}, \ref{sec:NameMedieval}, \ref{sec:NameAncient}, \ref{sec:Romani}, and~\ref{sec:RealAltEx}f.).
8282 %
8283 % The following method avoids using macros in name arguments and it is easier to set up. The trade-off is that, while macros in name arguments are harder to set up, they benefit from automation. Below we establish two names and a sort key for the main name under which both names are indexed:
8284 % \begin{Quote}
8285 % \begin{Verbatim}
8286 % \begin{nameauth}
8287 % \< DuBois & W.E.B. & Du~Bois & >
8288 % \< AltDuBois & W.E.B. & DuBois & >
8289 % \end{nameauth}
8290 % \PretagName[W.E.B.]{Du~Bois}{DuBois, William}
8291 % \end{Verbatim}
8292 % \end{Quote}
8293 % \begin{itemize}
8294 % \item \PatInfo*{\ShowPattern[W.E.B.]{Du~Bois}!MN\break
8295 % \ShowPattern[W.E.B.]{DuBois}!MN}^^A
8296 % Based on historical research and some name authorities, we decide that the the canonical name will be: \ForgetThis\DuBois\ \cmd{\DuBois}.
8297 %
8298 % \item We use the non-breaking space (the tilde active character) because internally, \textsf{nameauth} removes all regular spaces from name patterns. Both \cmd{\Name[W.E.B.]\{Du Bois\}} and \cmd{\Name[W.E.B.]\{DuBois\}} have the same name pattern: \texttt{\ShowPattern[W.E.B.]{DuBois}} (Section~\ref{sec:NamePatterns}). The name pattern \texttt{\ShowPattern[W.E.B.]{Du~Bois}} differs from both of the other names.
8299 %
8300 % \item Another reason to use the non-breaking space is that it prevents a line break between the particle \textit{Du} and the name \textit{Bois}.
8301 %
8302 % \item The sort key that could be applicable to both names is \texttt{\{DuBois, William\}}. Had we used the sort key \texttt{\{Du Bois, William\}}, the name would be sorted before \texttt{dual}, which is not in order (Section~\ref{sec:IndexInitials}).
8303 %
8304 % \item Instead of using \cmd{\SkipIndex}\cmd{\AltDuBois} many times, we create a cross-reference before the alternate name is used to prevent index page entries from being created for the alternate form:
8305 % \IndexRef[W.E.B.]{DuBois}{Du Bois, W.E.B.}\\[1ex]
8306 % | \IndexRef[W.E.B.]{DuBois}{Du Bois, W.E.B.}|
8307 %
8308 % \item With the following setup we keep full stop detection and modify name forms. The only manual part would be to check if the name straddles a page break, then add |\JustIndex\DuBois| after the name if needed:
8309 %^^A
8310 % \begin{VerbatimOut}{\jobname.tmp}
8311 % \newcommand\VarDuBois{\JustIndex\DuBois\AltDuBois}
8312 % \newcommand\LVarDuBois{\JustIndex\DuBois\LAltDuBois}
8313 % \newcommand\SVarDuBois{\JustIndex\DuBois\SAltDuBois}
8314 % \VarDuBois[William E.B.];
8315 % \LVarDuBois;
8316 % \SVarDuBois[William]
8317 % \end{VerbatimOut}
8318 %^^A
8319 % \begin{Quote}
8320 % \VerbatimInput[gobble=0]{\jobname.tmp}
8321 %
8322 % \input{\jobname.tmp}
8323 % \end{Quote}
8324 % \end{itemize}
8325 %
8326 % There are other solutions that one might envision, but they are a bit unwieldy. It does not seem practical to implement complex solutions for names unless perhaps one is using \LaTeX\ as a back-end for perhaps an XML workflow.
8327 %
8328 % \subsubsection[Nonstandard Caps]{Nonstandard Capitalization and Indexing}
8329 % \label{sec:NonstandardCaps}
8330 %
8331 % Here we look at simple nonstandard capitalization. Section~\ref{sec:AltFormat} dals with more complex examples. We consider poet \ForgetThis\Name[e.e.]{cummings}. Using the default \texttt{noformat} option, one can begin a sentence with something like:
8332 % \BothInfo[-6ex]{\ShowPattern[e.e.]{cummings}!MN}
8333 % {\ShowIdxPageref*[e.e.]{cummings}}
8334 %^^A
8335 % \begin{VerbatimOut}{\jobname.tmp}
8336 % \SubvertThis\CapThis\Name[e.e.]{cummings}'s motif of the
8337 % goat-footed balloon man has underlying sexual themes that
8338 % nevertheless present a childish facade.
8339 % \end{VerbatimOut}
8340 %^^A
8341 % \begin{Quote}
8342 % \VerbatimInput[gobble=0]{\jobname.tmp}
8343 % \renewcommand*\NamesFormat{}
8344 % \renewcommand*\MainNameHook{}
8345 %
8346 % \input{\jobname.tmp}
8347 % \end{Quote}
8348 %
8349 % If we want formatting and capitalization, we can do it this way:
8350 % \begin{VerbatimOut}{\jobname.tmp}
8351 % \ExcludeName[e.e.]{cummings's}
8352 % \JustIndex\Name[e.e.]{cummings}
8353 % \ForceName\SubvertThis\CapThis\Name[e.e.]{cummings's}
8354 % motif of the goat-footed balloon man has underlying
8355 % sexual themes that nevertheless present a childish facade.
8356 % \end{VerbatimOut}
8357 %^^A
8358 % \begin{Quote}
8359 % \VerbatimInput[gobble=0]{\jobname.tmp}
8360 % \PatInfo{\ShowPattern[e.e.]{cummings's}!PN\break
8361 % \ShowPattern[e.e.]{cummings's}!MN}
8362 %
8363 % \input{\jobname.tmp}
8364 % \end{Quote}
8365 %
8366 % In both examples above, we use \cmd{\SubvertThis} to force a subsequent use in order to prevent a first use that looks like ``\ForgetThis\CapThis\Name[e.e.]{cummings's}''. The macro \cmd{\CapThis} will capitalize the first letter in \emph{all name elements.} Using \cmd{\ExcludeName} keeps one from having to use \cmd{\SkipIndex} every time.
8367 %
8368 % \subsubsection[Variants and Xrefs]{Variant Names and Index Cross-References}
8369 % \label{sec:IdxVariants}
8370 %
8371 % \subsubsection*{\hfil Single Connections}
8372 %
8373 % Here we show differences among variants and cross-references. We can index variants under the canonical name or we can set up cross-references to variants. The order in which we do that is significant.
8374 % \begin{Quote}
8375 % \begin{Verbatim}
8376 % \begin{nameauth}
8377 % \< Carter & J.E. & Carter, Jr. & >
8378 % \end{nameauth}
8379 % \end{Verbatim}
8380 % \end{Quote}
8381 %
8382 % \begin{enumerate}
8383 % \item We use the canonical name to create page entries:
8384 % \PatInfo*{\ShowPattern[J.E.]{Carter, Jr.}!MN\hfill
8385 % \textrm{(1--2)}\break
8386 % \ShowPattern[Jimmy]{Carter}!PN\hfill \textrm{(3, 6)}\break
8387 % \ShowPattern[Jimmy]{Carter}!MN\hfill \textrm{(4)}\break
8388 % \ShowPattern[J.E.]{Carter, Jr.}!PN\hfill
8389 % \textrm{(5)}}
8390 % \item[] \LCarter[James Earl]\dotfill |\LCarter[James Earl]|
8391 %
8392 % \item Variants that only use \meta{Alternate} in the text create page entries under the canonical form, not under the variant form:
8393 % \item[] \DropAffix\LCarter[Jimmy]\dotfill^^A
8394 % |\DropAffix\LCarter[Jimmy]|
8395 % \item[] |\ShowIdxPageref*[J.E.]{Carter, Jr.}[Jimmy]|\dotfill^^A
8396 % \ShowIdxPageref*[J.E.]{Carter, Jr.}[Jimmy]
8397 %
8398 % \item We must create a \textit{see} reference from an alternate form to a canonical form \emph{before} using the alternate form in a naming macro, or the xref will be ignored and a warning will result:
8399 % \item[] |\IndexRef[Jimmy]{Carter}{Carter, J.E., Jr.}|^^A
8400 % \IndexRef[Jimmy]{Carter}{Carter, J.E., Jr.}
8401 %
8402 % \item No page entries will occur below because we made the \textit{see} reference first. Note how the alternate form is an independent name:
8403 % \item[] \Name[Jimmy]{Carter}\dotfill |\Name[Jimmy]{Carter}|\JustIndex\Carter
8404 %
8405 % \item We must index the alternate name with one of the following:
8406 % \item[] |\IndexName[J.E.]{Carter, Jr.}|
8407 % \item[] |\JustIndex\Carter|
8408 %
8409 % \item If instead we wanted to make a \textit{see also} reference, we would use both the canonical name and the alternate name, then create the cross-reference at the end of the document, \emph{after} all uses of the alternate name:
8410 % \item[] |\SeeAlso\IndexRef[Jimmy]{Carter}{Carter, J.E., Jr.}|
8411 % \end{enumerate}
8412 %
8413 % \subsubsection*{\hfil Multiple Connections}
8414 %
8415 % Below, two names are indexed with page numbers. They have \textit{see also} cross-references to each other. One of those names also has a \textit{see} reference to it:
8416 % \begin{enumerate}
8417 % \item We use the canonical name to set up page entries:
8418 % \PatInfo{\ShowPattern{Maimonides}!MN \textrm{(1)}\break
8419 % \ShowPattern{Moses, ben-Maimon}!PN \textrm{(2)}\break
8420 % \ShowPattern{Moses, ben-Maimon}!MN \textrm{(3)}\break
8421 % \ShowPattern{Rambam}!MN \textrm{(4)}\break
8422 % \ShowPattern{Rambam}!PN \textrm{(5)}}
8423 % \item[] \Name{Maimonides}\dotfill |\Name{Maimonides}|
8424 %
8425 % \item \Name{Maimonides} has two other names, one more used than the other. We set up his least-used name as the \textit{see} reference:
8426 % \item[] |\IndexRef{Moses, ben-Maimon}{Maimonides}|^^A
8427 % \IndexRef{Moses, ben-Maimon}{Maimonides}
8428 %
8429 % \item We have a main name with a page entry and a ``\textit{see} reference'' to that name. No page entries will occur below because we made the xref first:
8430 % \item[] \Name{Moses, ben-Maimon}\dotfill |\Name{Moses, ben-Maimon}|
8431 %
8432 % \item Before creating \textit{see also} cross-references, we use the other alias so that all the page entries precede the cross-references:
8433 % \item[] \Name{Rambam}\dotfill |\Name{Rambam}|
8434 %
8435 % \item All \textit{see also} references must come after all page entries. For example, one could put both of these macros at the end of the document:
8436 % \item[] |\SeeAlso\IndexRef{Maimonides}{Rambam}|\\
8437 % \SeeAlso\IndexRef{Maimonides}{Rambam}^^A
8438 % |\SeeAlso\IndexRef{Rambam}{Maimonides}|^^A
8439 % \SeeAlso\IndexRef{Rambam}{Maimonides}
8440 % \end{enumerate}
8441 %
8442 % \subsubsection*{\hfil Multiple Targets}
8443 %
8444 % There is a case where one cross-reference can point to multiple targets, such as demonstrated in the example below:
8445 %^^A
8446 % \begin{VerbatimOut}{\jobname.tmp}
8447 % \PretagName{\textit{Snellius}}{Snellius}
8448 % \IndexRef{\textit{Snellius}}
8449 % {Snel van Royen, R.; Snel van Royen, W.}
8450 % Both \Name[W.]{Snel van Royen}[Willebrord] and
8451 % his son \Name[R.]{Snel van Royen}[Rudolph] were known
8452 % by the Latin moniker \Name{\textit{Snellius}}.
8453 % \end{VerbatimOut}
8454 %^^A
8455 % \begin{Quote}
8456 % \PatInfo[5ex]{\ShowPattern{\textit{Snellius}}!PRE\break
8457 % \ShowPattern{\textit{Snellius}}!PN\break
8458 % \ShowPattern[W.]{Snel van Royen}!MN\break
8459 % \ShowPattern[R.]{Snel van Royen}!MN}
8460 % \VerbatimInput[gobble=0]{\jobname.tmp}
8461 %
8462 % \input{\jobname.tmp}
8463 % \end{Quote}
8464 %
8465 % One must plan the location of xrefs or use \cmd{\IncludeName*}. Above, we have no page entry for |\Name{\textit{Snellius}}| because \cmd{\IndexRef} comes first.
8466 %
8467 % \subsection{Using a Name Authority}
8468 %
8469 % Below are two names from a name authority that this author created for a translation of \Title{\la{De Diaconis et Diaconissis Veteris Ecclesiae Liber Commentarius}} by \Name[Caspar]{Ziegler}. To get valid names that one can research, here are some tips:
8470 % \begin{itemize}
8471 % \item \href{https://data.cerl.org/thesaurus/_search}{CERL Thesaurus}
8472 %
8473 % \item \href{https://viaf.org/}{Virtual International Authority File}
8474 %
8475 % \item \href{https://edit16.iccu.sbn.it/web/edit-16}{EDIT16}
8476 %
8477 % \item \href{https://www.worldcat.org/}{WorldCat}
8478 %
8479 % \item \href{https://id.loc.gov/authorities/names.html}{Library of Congress}
8480 %
8481 % \item \href{https://www.columbia.edu/acis/ets/Graesse/contents.html}
8482 % {Older version of Graesse, \Title{\la{Orbis Latinus}}}
8483 % \end{itemize}
8484 % \begin{enumerate}
8485 % \item Vernacular names are canonical. Latin names refer to them. That holds also for place names.
8486 %
8487 % \item Sort vernacular names with \cmd{\PretagName} due to particles (Section~\ref{sec:IndexSort}).
8488 %
8489 % \item If Latin names are only cross-references, use \cmd{\IndexRef}\meta{name args} to generate cross-references before referring to any names (Section~\ref{sec:IndexRef}).
8490 %
8491 % \item If Latin names have page entries, then place \cmd{\SeeAlso}\cmd{\IndexRef}\meta{name args} as needed at the end of the document, before \cmd{\printindex}.
8492 %
8493 % \item English usage requires \cmd{\CapThis} with particles in \meta{SNN} (Section~\ref{sec:NameParticles}).
8494 % \end{enumerate}
8495 % \begin{Quote}
8496 % \vspace{3ex}
8497 % \BothInfo{\ShowPattern[Jacques]{De~Pamele}!MN\break
8498 % \ShowPattern[Jacobus]{Pamelius}!MN\break
8499 % \ShowPattern[Giovanni]{d'Andrea}!MN\break
8500 % \ShowPattern[Ioannes]{Andreae}!MN}
8501 % {\ShowIdxPageref*[Jacques]{De~Pamele}\break
8502 % \ShowIdxPageref*[Jacobus]{Pamelius}\break
8503 % \ShowIdxPageref*[Giovanni]{d'Andrea}\break
8504 % \ShowIdxPageref*[Ioannes]{Andreae}}
8505 % \vspace{-3ex}
8506 % \begin{Verbatim}
8507 % \PretagName[Jacques]{De~Pamele}{Depamele, Jacques}
8508 % \Name[Jacques]{De~Pamele}[Jacques de~Joigny]
8509 % \IndexRef[Jacobus]{Pamelius}{De~Pamele, Jacques}
8510 % \Name[Jacobus]{Pamelius}
8511 %
8512 % \PretagName[Giovanni]{d'Andrea}{Dandrea, Giovanni}
8513 % \Name[Giovanni]{d'Andrea}
8514 % \IndexRef[Ioannes]{Andreae}{d'Andrea, Giovanni}
8515 % \Name[Ioannes]{Andreae}
8516 % \end{Verbatim}
8517 % \end{Quote}
8518 % \negmedskip
8519 % \IndexRef[Jacobus]{Pamelius}{De~Pamele, Jacques}
8520 % \IndexRef[Ioannes]{Andreae}{d'Andrea, Giovanni}
8521 % \begin{itemize}[leftmargin=3.5cm]
8522 % \item[Canonical Name] \Name[Jacques]{De~Pamele}[Jacques de~Joigny]\\
8523 % |\Name[Jacques]{De~Pamele}[Jacques de~Joigny]|
8524 %
8525 % \item[Latin Name] \Name[Jacobus]{Pamelius}\\
8526 % |\Name[Jacobus]{Pamelius}|
8527 %
8528 % \item[Canonical Name] \Name[Giovanni]{d'Andrea}\\
8529 % |\Name[Giovanni]{d'Andrea}|
8530 %
8531 % \item[Latin Name] \Name[Ioannes]{Andreae}\\
8532 % |\Name[Ioannes]{Andreae}|
8533 % \end{itemize}
8534 %
8535 % \CapThis\Name[Giovanni]{d'Andrea} |\CapThis\Name[Giovanni]{d'Andrea}| can be used at the beginning of a sentence. |\Name[Jacques]{De~Pamele}| gives \Name[Jacques]{De~Pamele}.
8536 %
8537 % \ReturnLink
8538 %
8539 % \begin{Quotation}{\DuBois}
8540 % {\Title{Darkwater: Voices from within the Veil} (1920)}
8541 % In the awful cataclysm of World War, where from beating, slandering,
8542 % and murdering us the white world turned temporarily aside to kill each
8543 % other, we of the Darker Peoples looked on in mild amaze.
8544 %
8545 % \dots The fateful day came. It had to come. The cause of war is
8546 % preparation for war; and of all that Europe has done in a century there
8547 % is nothing that has equaled in energy, thought, and time her preparation
8548 % for wholesale murder. The only adequate cause of this preparation was
8549 % conquest and conquest, not in Europe, but primarily among the darker
8550 % peoples of Asia and Africa; conquest, not for assimilation and uplift,
8551 % but for commerce and degradation. For this, and this mainly, did Europe
8552 % gird herself at frightful cost for war.
8553 % \index{civil rights leaders, quotes of\noexpand\string|hyperpage}
8554 % \end{Quotation}
8555 %
8556 % \newpage
8557 %
8558 % \section{Advanced Formatting}
8559 % \label{sec:AdvancedFormat}
8560 %
8561 % Up to this point, formatting hooks have applied font and color changes to a parsed name, and perhaps printed a name tag. In this section we start to change the syntactic form of a name inside the formatting hooks. Below we see a general scheme of how the core name engine processes a name:
8562 %
8563 % \begin{tcolorbox}[colframe=violet!80!black,colback=white,
8564 % adjusted title={\sffamily\bfseries Naming Macro Layer}]
8565 % \small
8566 %
8567 % Naming macros (\cmd{\Name}, \cmd{\Name*}, \cmd{\FName}, \cmd{\FName*}, and the macros created by the \texttt{nameauth} environment) send arguments to three ``interface hooks'' that, by default, point to \cmd{\@nameauth@Name} (Section~\ref{sec:FullCustomize}). That macro is the backend for both the basic and quick interfaces.\medskip
8568 %
8569 % This backend handles work requested by \cmd{\JustIndex}, \cmd{\SubvertThis}, \cmd{\ForgetThis}, and \cmd{\SkipIndex}. Unless \cmd{\JustIndex} occurred, the backend then hands off the name arguments to the name parser, with either a main-matter \texttt{!MN} suffix or a front-matter \texttt{!NF} suffix.
8570 %
8571 % \begin{tcolorbox}[colframe=blue!80!black,colback=white,
8572 % adjusted title={\sffamily\bfseries Syntactic Element Layer}]
8573 %
8574 % The \cmd{\@nameauth@Parse} macro determines name category (Western or Non-Western), capitalization, punctuation, and name elements to be used. All needed macros are made available to the next layer.
8575 %
8576 % \begin{tcolorbox}[colframe=orange!80!black,colback=white,
8577 % adjusted title={\sffamily\bfseries Name Display Layer}]
8578 %
8579 % The two main macros in this layer are \cmd{\@nameauth@NonWest} and \cmd{\@nameauth@West}. The macro \cmd{\@nameauth@Form} has rules that set Boolean flags to determine the name form to be displayed, which goes to the format hook dispatcher.
8580 %
8581 % \begin{tcolorbox}[colframe=red!80!black,colback=white,
8582 % adjusted title={\sffamily\bfseries Format Hook Dispatcher}]
8583 %
8584 % \cmd{\@nameauth@Hook}: Check the name to be printed for a final full stop. Check which name system we are using.\medskip
8585 %
8586 % Call the appropriate formatting hook, depending on whether or not the name pattern exists, and if we are in the main-matter system or the front-matter system.
8587 %
8588 % \end{tcolorbox}
8589 %
8590 % \end{tcolorbox}
8591 %
8592 % \cmd{\@nameauth@Parse}: Create the name's pattern, a control sequence that makes the name ``exist'' for the sake of \textsf{nameauth}.
8593 %
8594 % \end{tcolorbox}
8595 %
8596 % \cmd{\@nameauth@Name}: If the final full stop flag is true, check the lookahead token for a full stop and gobble it if needed.
8597 %
8598 % \end{tcolorbox}
8599 %
8600 % \begin{Quotation}{\Name{Voltaire}}
8601 % {\Title{Sept Discours en Vers sur l'Homme} (1738)}
8602 % The secret to being a bore is to tell everything.
8603 % \index{philosophers, quotes of\noexpand\string|hyperpage}
8604 % \end{Quotation}
8605 %
8606 % \newpage
8607 %
8608 % \subsection{Formatting Hooks}
8609 % \label{sec:ComplexHooks}
8610 %
8611 % \begin{InfoBox}[General Hook Redefinition]
8612 % \VerbatimInput[gobble=0,numbers=none,fontsize=\small]{nullhook.tmp}
8613 % \end{InfoBox}
8614 %
8615 % \input{nullhook.tmp}
8616 %
8617 % \begingroup^^A Local format hook redefinition
8618 % This proof of concept puts the first mention of a name either in italics (front matter) or in boldface (main matter), and it adds a margin note if that is allowed. We use \cmd{\let} to save and restore the old hooks:
8619 %^^A
8620 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_01.tex}\else
8621 % \edef\NameauthTestFile{\jobname.tmp}\fi
8622 %^^A
8623 % \begin{VerbatimOut}{\NameauthTestFile}
8624 % \documentclass{article}
8625 % \input{compat.tex} % Included with nameauth for compatibility.
8626 % \usepackage{makeidx}
8627 % \usepackage{nameauth}
8628 %
8629 % \makeindex
8630 %
8631 % % First save main- and front-matter hooks. Then change
8632 % % first-use hooks for both main matter and front matter.
8633 % \let\OldFormat\NamesFormat
8634 % \let\OldFrontNames\FrontNamesFormat
8635 %
8636 % \renewcommand*\NamesFormat[1]{\textbf{#1}\unless\ifinner
8637 % \marginpar{\raggedleft\scriptsize #1}\fi}
8638 % \renewcommand*\FrontNamesFormat[1]{\textit{#1}\unless\ifinner
8639 % \marginpar{\raggedleft\scriptsize #1}\fi}
8640 %
8641 % \PretagName{Vlad, {\c T}epe{\c s}}
8642 % {Vlad Tepes} % for accented names
8643 % \TagName{Vlad, II}{ Dracul} % for index information
8644 % \TagName{Vlad, III}{ Dracula}
8645 % \IndexRef{Dracula}{Vlad III}
8646 %
8647 % \begin{document}
8648 %
8649 % \begin{quote}
8650 % The new format (front matter):\NamesInactive
8651 %
8652 % \Name{Vlad, III}[III Dracula], known as
8653 % \IndexRef{Vlad, {\c T}epe{\c s}}{Vlad III}%
8654 % \SubvertThis\Name*{Vlad, {\c T}epe{\c s}}
8655 % (\Name*{Vlad, {\c T}epe{\c s}}[the Impaler])
8656 % after his death, was the son of \Name{Vlad, II}[II Dracul],
8657 % a member of the Order of the Dragon. Later instances of
8658 % ``\Name*{Vlad, III}'' and ``\Name{Vlad, III}'' appear thus.
8659 %
8660 % The new format (main matter):\NamesActive
8661 %
8662 % \Name{Vlad, III}[III Dracula], known as
8663 % \IndexRef{Vlad, {\c T}epe{\c s}}{Vlad III}%
8664 % \SubvertThis\Name*{Vlad, {\c T}epe{\c s}}
8665 % (\Name*{Vlad, {\c T}epe{\c s}}[the Impaler])
8666 % after his death, was the son of \Name{Vlad, II}[II Dracul],
8667 % a member of the Order of the Dragon. Later instances of
8668 % ``\Name*{Vlad, III}'' and ``\Name{Vlad, III}'' appear thus.
8669 %
8670 % \let\NamesFormat\OldFormat
8671 % \let\FrontNamesFormat\OldFrontNames
8672 %
8673 % We are back in the old format.
8674 %
8675 % in the front matter we see: \NamesInactive
8676 % \ForgetThis\Name{Vlad, III}[III Dracula],
8677 % \Name*{Vlad, III}, and \Name{Vlad, III}.
8678 %
8679 % in the main matter we see: \NamesActive
8680 % \ForgetThis\Name{Vlad, III}[III Dracula],
8681 % \Name*{Vlad, III}, and \Name{Vlad, III}.
8682 % \end{quote}
8683 %
8684 % \printindex
8685 % \end{document}
8686 % \end{VerbatimOut}
8687 %^^A
8688 % \begin{Quote}
8689 % \VerbatimInput[gobble=0,lastline=38]{\NameauthTestFile}
8690 %
8691 % \newpage
8692 %
8693 % \VerbatimInput[gobble=0,firstline=39]{\NameauthTestFile}
8694 %
8695 % \let\OldFormat\NamesFormat
8696 % \let\OldFrontNames\FrontNamesFormat
8697 %
8698 % \renewcommand*\NamesFormat[1]{\textbf{#1}\unless\ifinner
8699 % \marginpar{\raggedleft\scriptsize #1}\fi}
8700 % \renewcommand*\FrontNamesFormat[1]{\textit{#1}\unless\ifinner
8701 % \marginpar{\raggedleft\scriptsize #1}\fi}
8702 %
8703 % The new format (front matter):\NamesInactive
8704 %
8705 % \Name{Vlad, III}[III Dracula], known as
8706 % \IndexRef{Vlad, {\c T}epe{\c s}}{Vlad III}^^A
8707 % \SubvertThis\Name*{Vlad, {\c T}epe{\c s}}
8708 % (\Name*{Vlad, {\c T}epe{\c s}}[the Impaler])
8709 % after his death, was the son of \Name{Vlad, II}[II Dracul],
8710 % a member of the Order of the Dragon. Later instances of
8711 % ``\Name*{Vlad, III}'' and ``\Name{Vlad, III}'' appear thus.
8712 %
8713 % The new format (main matter):\NamesActive
8714 %
8715 % \Name{Vlad, III}[III Dracula], known as
8716 % \IndexRef{Vlad, {\c T}epe{\c s}}{Vlad III}^^A
8717 % \SubvertThis\Name*{Vlad, {\c T}epe{\c s}}
8718 % (\Name*{Vlad, {\c T}epe{\c s}}[the Impaler])
8719 % after his death, was the son of \Name{Vlad, II}[II Dracul],
8720 % a member of the Order of the Dragon. Later instances of
8721 % ``\Name*{Vlad, III}'' and ``\Name{Vlad, III}'' appear thus.
8722 %
8723 % \let\NamesFormat\OldFormat
8724 % \let\FrontNamesFormat\OldFrontNames
8725 %
8726 % We are back in the old format.
8727 %
8728 % in the front matter we see: \NamesInactive
8729 % \ForgetThis\Name{Vlad, III}[III Dracula],
8730 % \Name*{Vlad, III}, and \Name{Vlad, III}.
8731 %
8732 % in the main matter we see: \NamesActive
8733 % \ForgetThis\Name{Vlad, III}[III Dracula],
8734 % \Name*{Vlad, III}, and \Name{Vlad, III}.
8735 % \end{Quote}
8736 %
8737 % We redefine \cmd{\NamesFormat} and \cmd{\FrontNamesFormat} because it is more common to add extra information with the first mention of a name.
8738 % \endgroup^^A Local format hook redefinition
8739 %
8740 % \subsubsection[Life Dates]{Application: Life Dates}
8741 %
8742 % \begingroup^^A Local format hook redefinition
8743 % History texts tend to use life dates, regnal dates, and dates when certain figures flourished. We can use name tags for such dates, which can work with all name types. When used with Roman names (Section~\ref{sec:Romani}), if using name tags for dates, one would put \LA{agnomina} in \meta{Affix}.
8744 %
8745 % First we must create any name tags that might be used. Whether it is in the preamble or in the body text, the main point is that the tag can only be used if it exists. The tags used below have a leading space because they are printed conditionally in formatting hooks.
8746 %
8747 % We also define a cross-reference ``Atat\"urk''. After doing so, we use naming macros with that name, printing formatted names in the text but making no index page entries. That is a result of indexing rules in \textsf{nameauth}.
8748 %
8749 % We add a Boolean flag to the formatting hook that lets us suppress dates in first uses as needed, while normally displaying dates in first uses by default. We set aside the usual formatting of this manual.
8750 %^^A
8751 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_02.tex}\else
8752 % \edef\NameauthTestFile{\jobname.tmp}\fi
8753 %^^A
8754 % \begin{VerbatimOut}{\NameauthTestFile}
8755 % \documentclass{article}
8756 % \input{compat.tex} % Included with nameauth for compatibility.
8757 % \usepackage{makeidx}
8758 % \usepackage{nameauth}
8759 %
8760 % \makeindex
8761 %
8762 % % Add name tags to names.
8763 % \NameAddInfo[George]{Washington}{ (1732--99)}
8764 % \NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}
8765 % \NameAddInfo{Atat\"urk}{ (in 1934, a special surname)}
8766 %
8767 % % Ensure that Atat\"urk is a cross-reference that
8768 % % has no page entries in the index.
8769 % \IndexRef{Atat\"urk}{Kemal, Mustafa}
8770 %
8771 % % Manually suppress name tag in ``first'' instance
8772 % \newif\ifNoTag
8773 %
8774 % % Redesign formatting hook to usually print a tag
8775 % % only in ``first'' instance. On exit, It resets
8776 % % the flag that suppresses tags, making that flag
8777 % % work only once per name use.
8778 %
8779 % \renewcommand*\NamesFormat[1]
8780 % {%
8781 % #1\unless\ifNoTag\NameQueryInfo{}\fi
8782 % \global\NoTagfalse%
8783 % }
8784 %
8785 % \begin{document}
8786 %
8787 % \ForgetThis\Name[George]{Washington} held office as
8788 % the first US president from 1789 to 1797.
8789 % \Name[George]{Washington} was the only president whose
8790 % term in office was completely in the eighteenth century.
8791 %
8792 % If we need to trigger the first use hook at some point,
8793 % we can suppress dates and get an automatic long instance via:
8794 % \NoTagtrue\ForgetThis\Name[George]{Washington}.
8795 %
8796 % Or we can trigger the first-use hook in a subsequent name use
8797 % and still have dates: \ForceName\Name[George]{Washington}.
8798 %
8799 % We can add name info tags to names used only as cross-%
8800 % references. For example, \Name[Mustafa]{Kemal} was granted
8801 % the name \Name{Atat\"urk}.
8802 %
8803 % We mention \Name[Mustafa]{Kemal}
8804 % and \Name{Atat\"urk} again. Likewise, we can trigger a
8805 % first use, but with no name tag:
8806 % \NoTagtrue\ForgetThis\Name{Atat\"urk}.
8807 %
8808 % \printindex
8809 % \end{document}
8810 % \end{VerbatimOut}
8811 %^^A
8812 % \NameAddInfo[George]{Washington}{ (1732--99)}
8813 % \NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}
8814 % \NameAddInfo{Atat\"urk}{ (in 1934, a special surname)}
8815 % \IndexRef{Atat\"urk}{Kemal, Mustafa}
8816 % \renewcommand*\NamesFormat[1]
8817 % {^^A
8818 % #1\unless\ifNoTag\NameQueryInfo{}\fi
8819 % \global\NoTagfalse^^A
8820 % }
8821 %^^A
8822 % \begin{Quote}
8823 % \VerbatimInput[gobble=0,lastline=5]{\NameauthTestFile}
8824 %
8825 % \VerbatimInput[gobble=0,firstline=6,lastline=32]{\NameauthTestFile}
8826 % \end{Quote}
8827 %
8828 % Up to now there has been a lot of setup. The payoff, however, comes in the main body text where the naming macros do not need manual additions:
8829 % \begin{Quote}
8830 % \VerbatimInput[gobble=0,firstline=33,lastline=44]{\NameauthTestFile}
8831 %
8832 % \ForgetThis\Name[George]{Washington} held office as
8833 % the first US president from 1789 to 1797.
8834 % \Name[George]{Washington} was the only president whose
8835 % term in office was completely in the eighteenth century.
8836 %
8837 % If we need to trigger the first use hook at some point,
8838 % we can suppress dates and get an automatic long instance via:
8839 % \NoTagtrue\ForgetThis\Name[George]{Washington}.
8840 %
8841 % Or we can trigger the first-use hook in a subsequent name use
8842 % and still have dates: \ForceName\Name[George]{Washington}.
8843 % \end{Quote}
8844 %
8845 % Since we already have set up a cross-reference with \cmd{\IndexRef}, we can use just the the naming macros with ``Atat\"urk'' and get the desired formatting without any page entries in the index:
8846 % \begin{Quote}
8847 % \VerbatimInput[gobble=0,firstline=45]{\NameauthTestFile}
8848 %
8849 % We can add name info tags to names used only as cross-^^A
8850 % references. For example, \Name[Mustafa]{Kemal} was granted
8851 % the name \Name{Atat\"urk}.
8852 %
8853 % We mention \Name[Mustafa]{Kemal}
8854 % and \Name{Atat\"urk} again. Likewise, we can trigger a
8855 % first use, but with no name tag:
8856 % \NoTagtrue\ForgetThis\Name{Atat\"urk}.
8857 % \end{Quote}
8858 % \endgroup^^A Local format hook redefinition
8859 %
8860 % \subsection{Alternate Formatting}
8861 % \label{sec:AltFormat}
8862 %
8863 % Alternate formatting is a framework that isolates local name changes in the text, especially to \meta{SNN}, from the name forms used globally in index entries. This allows some European or ``Continental'' academic formatting.
8864 % \begin{itemize}
8865 % \item Sections~\ref{sec:AltPossible} amd~\ref{sec:AltEnv} show how to enable and disable alternate formatting in either an activated or deactivated state.
8866 %
8867 % \item Section~\ref{sec:AltCaps} shows how \cmd{\CapThis} works only through its helper macro, \cmd{\AltCaps}, when alternate formatting is enabled.
8868 %
8869 % \item Section~\ref{sec:AltFeatures} shows how some built-in formatting macros work in formatting hooks along with the helper macros \cmd{\AltOn} and \cmd{\AltOff}.
8870 % \end{itemize}
8871 %
8872 % \begin{InfoBox}
8873 % Alternate formatting requires \cmd{\noexpand} before macros in name arguments to isolate all local changes in the formatting hooks from the global context, thus protecting index entries.\smallskip
8874 %
8875 % Every user-defined state change in custom macros used for alternate formatting requires two Boolean flags: one for the global state, and one for the local state.\smallskip
8876 %
8877 % Names that depend on alternate formatting cannot be used without it. Otherwise, one will see incorrect name forms in the text and spurious entries in the index.
8878 % \end{InfoBox}
8879 %
8880 % \subsubsection[Enabling/Disabling]{Enabling and Disabling}
8881 % \label{sec:AltPossible}
8882 %
8883 % Alternate formatting involves two separate things: capitalization and name formatting. Thus, we have two ``switches'' to manage it. The first is like the ignition switch of an automobile that either ``enables'' or ``disables'' the whole car. Alternate capitalization will work only while the auto is running.
8884 %
8885 % The second switch is like the manual clutch pedal of an auto. When one depresses the clutch, the output of the motor does not transfer to the wheels. It is ``deactivated''; the alternate formatting macros do not format their arguments.
8886 %
8887 % If one lets out the clutch, the power will transfer to the wheels and the car will be ``activated'' and start moving. Such activation happens when the alternate formatting macros format their arguments.
8888 %
8889 % \begin{Center}
8890 % \begin{tabular}{lcc}\toprule
8891 % Macro & Enabled & Activated\\\midrule
8892 % \cmd{\AltFormatActive} & \YES & \YES\\
8893 % \cmd{\AltFormatActive*} & \YES & \NO\\
8894 % \cmd{\AltFormatInactive} & \NO & \NO\\\bottomrule
8895 % \end{tabular}
8896 % \end{Center}
8897 % \begin{itemize}
8898 % \item \emph{Enabled} means that the alternate formatting mechanism inhibits the normal behavior of \cmd{\CapThis} and permits both \cmd{\AltCaps} and the local changes in formatting hooks triggered by \cmd{\AltOn}.
8899 %
8900 % \item \emph{Disabled} means that \cmd{\CapThis} again works normally and alternate formatting macros (\cmd{\AltCaps}, \cmd{\AltOn}, and \cmd{\AltOff}) are inhibited.
8901 %
8902 % \item \emph{Activated} means that built-in alternate formatting macros like \cmd{\textSC} globally format their arguments, except when turned off in formatting hooks by \cmd{\AltOff}.
8903 %
8904 % \item \emph{Deactivated} means that built-in alternate formatting macros like \cmd{\textSC} globally do not format their arguments, except when turned on in formatting hooks by \cmd{\AltOn}.
8905 % \end{itemize}
8906 %
8907 % \DescribeMacro{\AltFormatActive}
8908 % Both the \texttt{altformat} option and \cmd{\AltFormatActive} enable and globally activate alternate formatting. \cmd{\CapThis} works via \cmd{\AltCaps}. Built-in formatting macros will format their arguments. \cmd{\AltFormatActive} countermands \cmd{\AltFormatActive*}.
8909 %
8910 % \DescribeMacro{\AltFormatActive*}
8911 % The starred form \cmd{\AltFormatActive*} enables alternate formatting but leaves it in a globally deactivated state. It countermands both the \texttt{altformat} option and \cmd{\AltFormatActive}. It causes \cmd{\CapThis} to work via \cmd{\AltCaps}. Built-in formatting macros will not format their arguments.
8912 %
8913 % \DescribeMacro{\AltFormatInactive}
8914 % This macro both disables and deactivates alternate formatting. This reverts globally to standard formatting and the normal function of \cmd{\CapThis}.
8915 %
8916 % \begin{InfoBox}
8917 % These alternate formatting macros have global scope.
8918 % \end{InfoBox}
8919 %
8920 % \subsubsection[Environment]{Formatting Environment}
8921 % \label{sec:AltEnv}
8922 %
8923 % The sections in this manual can get complicated. Some quotations use alternate formatting. Some sections also use it, then switch back to regular formatting.
8924 %
8925 % Although many people will use either regular or alternate formatting, but not both, we have added environments to aid the use of text designed for alternate formatting into an arbitrary context, without worrying if the switching macros have set the proper state.
8926 % \DescribeEnv{AltFormatZone}
8927 % \texttt{AltFormatZone} works like \cmd{\AltFormatActive}, while \texttt{AltFormatZone*} works like \cmd{\AltFormatActive*}.
8928 % \DescribeEnv{AltFormatZone*}
8929 % When they exit, they disable alternate formatting. Thus, they can serve as a wrapper.
8930 %
8931 % \DescribeMacro{\FixateFormat}
8932 % These format environments create a local scope. \cmd{\FixateFormat} works only within \texttt{AltFormatZone} and \texttt{AltFormatZone*} to prevent the format switches from making any changes. \cmd{\FixateFormat} makes the environments the sole controller of alternate formatting within their scope. Below we show the use of \texttt{AltFormatZone} and \cmd{\FixateFormat}. Hooks do no formatting; the alternate formatting macros do that instead (Section~\ref{sec:AltFeatures}). \cmd{\SkipIndex} prevents spurious index entries:
8933 %^^A
8934 % \begin{VerbatimOut}{\jobname.tmp}
8935 % \FixateFormat Format cannot be fixated here.
8936 %
8937 % \AltFormatActive
8938 % \qquad \Name*[Konrad]{\noexpand\textSC{Zuse}};
8939 % formatting is enabled and active.
8940 %
8941 % \AltFormatActive*
8942 % \qquad \SkipIndex \Name*[Konrad]{\noexpand\textSC{Zuse}};
8943 % formatting is enabled and inactive.
8944 % \AltFormatInactive \hfill Formatting disabled.
8945 %
8946 % \begin{AltFormatZone}
8947 % Zone is active; format is not fixated.
8948 %
8949 % \qquad \Name*[Konrad]{\noexpand\textSC{Zuse}};
8950 % formatting is enabled and active.
8951 %
8952 % \AltFormatActive*
8953 % \qquad \SkipIndex \Name*[Konrad]{\noexpand\textSC{Zuse}};
8954 % formatting is enabled and inactive.
8955 % \end{AltFormatZone} \hfill Formatting disabled.
8956 %
8957 % \begin{AltFormatZone}
8958 % \FixateFormat Format is fixated as: enabled and active.
8959 %
8960 % \qquad \Name*[Konrad]{\noexpand\textSC{Zuse}};
8961 % formatting is enabled and active.
8962 %
8963 % \AltFormatActive*
8964 % \qquad \SkipIndex \Name*[Konrad]{\noexpand\textSC{Zuse}};
8965 % formatting is still enabled and active.
8966 % \end{AltFormatZone} \hfill Formatting disabled.
8967 % \end{VerbatimOut}
8968 %^^A
8969 % \begin{Quote}
8970 % \VerbatimInput[gobble=0]{\jobname.tmp}
8971 %
8972 % \input{\jobname.tmp}
8973 % \end{Quote}
8974 % \ForgetName[Konrad]{\noexpand\textSC{Zuse}}
8975 %
8976 % \subsubsection[Capitalization]{Alternate Capitalization}
8977 % \label{sec:AltCaps}
8978 %
8979 % \Info[1.5ex]{\hrule\strut We begin a big region of alternate formatting\strut\hrule}
8980 % \begin{AltFormatZone}
8981 % \FixateFormat^^A
8982 % Previously, we referred to potential problems using \cmd{\CapThis}. When alternate formatting is enabled, \cmd{\CapThis} changes its mechanism to avoid such problems. This aspect of alternate formatting does not engage the formatting hooks.
8983 %
8984 % \DescribeMacro{\AltCaps}
8985 % Using the aid of the helper macro \cmd{\AltCaps}, \cmd{\CapThis} will cause \cmd{\AltCaps} to capitalize its argument only in a formatting hook. \cmd{\AltCaps} is enabled whenever alternate formatting is enabled, but it works independently of both \cmd{\AltOn} and \cmd{\AltOff}, which are covered in the next section. \cmd{\AltCaps} does not partition its argument, which avoids any problems with \cmd{\CapThis}. We describe the syntax:
8986 %
8987 % \begin{SyntaxBox}
8988 % \cmd{\noexpand}\cmd{\AltCaps}\marg{Argument}
8989 % \end{SyntaxBox}
8990 %
8991 % \begin{Quote}
8992 % \begin{Verbatim}
8993 % \begin{nameauth}
8994 % \< Cath & Catherine \noexpand\AltCaps{d}e'
8995 % & \noexpand\textSC{Medici} & >
8996 % \end{nameauth}
8997 % \PretagName[Catherine \noexpand\AltCaps{d}e']
8998 % {\noexpand\textSC{Medici}}{Medici, Catherine de}
8999 %
9000 % \ForgetThis\Cath\ was a powerful queen of France.
9001 % \CapThis\LCath[\noexpand\AltCaps{d}e']
9002 % was blamed for the St.\ Bartholomew's Day massacre.
9003 % \end{Verbatim}
9004 %
9005 % \ForgetThis\Cath\ was a powerful queen of France.
9006 % \CapThis\LCath[\noexpand\AltCaps{d}e']
9007 % was blamed for the St.\ Bartholomew's Day massacre.
9008 % \end{Quote}
9009 %
9010 % One major difference between formatting regimes is that, with regular formatting, \cmd{\CapThis} will cause the core name engine to capitalize every name element because we do not know which one to display. With alternate formatting, \cmd{\AltCaps} only capitalizes its argument. That causes \cmd{\CapThis} to work in a more granular way.
9011 %
9012 % \subsubsection{Formatting Features}
9013 % \label{sec:AltFeatures}
9014 %
9015 % \begingroup^^A Local format hook redefinition
9016 %
9017 % This part of alternate formatting works within the formatting hooks. First, we show the basic concept where macros do not change between the local scope of the hooks and the global scope of the index. After that, we show where the macros do change.
9018 %
9019 % \DescribeMacro{\textSC}
9020 % Using alternate formatting can be as easy as using any one of four predefined macros.
9021 % \DescribeMacro{\textIT}
9022 % These macros are analogous to the predefined formatting hooks that are accessible via package options.
9023 % \DescribeMacro{\textBF}
9024 % They \emph{always format} their arguments when using the \texttt{altformat} option or \cmd{\AltFormatActive}.
9025 % \DescribeMacro{\textUC}
9026 % They \emph{never format} their arguments when \cmd{\AltFormatActive*} is used or alternate formatting is disabled.
9027 % \cmd{\CapName}, \cmd{\RevComma}, and \cmd{\RevName} can modify names that use these hooks, but the results appear only in the text.
9028 %
9029 % There are subtle differences among these macros. \cmd{\textIT} and \cmd{\textBF} use font commands to make one font change. \cmd{\textUC} makes no font changes; it just calls \cmd{\MakeUppercase}. \cmd{\textSC}, however, makes two font changes. It first makes a roman font declaration, then calls \cmd{\textsc}. This mitigates font substitution warnings.
9030 %
9031 % \subsubsection*{\hfil No Local Changes}
9032 %
9033 % Here we show what happens when these formatting macros are used with \cmd{\AltFormatActive}. One should use \cmd{\noexpand} before these macros to prevent spurious index entries. Assuming that we have sorted the following names with \cmd{\PretagName} (Section~\ref{sec:IndexSort}), we get the following with this manual's formatting:
9034 %^^A
9035 % \begin{VerbatimOut}{\jobname.tmp}
9036 % \Name[Konrad]{\noexpand\textSC{Zuse}};
9037 % \Name[Konrad]{\noexpand\textSC{Zuse}}\\
9038 % \Name[Ada]{\noexpand\textIT{Lovelace}};
9039 % \Name[Ada]{\noexpand\textIT{Lovelace}}\\
9040 % \Name[Charles]{\noexpand\textBF{Babbage}};
9041 % \Name[Charles]{\noexpand\textBF{Babbage}}\\
9042 % \Name{\noexpand\textUC{Kanade}, Takeo};
9043 % \Name{\noexpand\textUC{Kanade}, Takeo}
9044 % \end{VerbatimOut}
9045 %^^A
9046 % \begin{Quote}
9047 % \VerbatimInput[gobble=0]{\jobname.tmp}
9048 %
9049 % \input{\jobname.tmp}
9050 % \end{Quote}
9051 %
9052 % \subsubsection*{\hfil Local Changes}
9053 %
9054 % Now we permit the macros above to change their output within the formatting hooks. Using \cmd{\noexpand} is necessary to avoid unwanted index entries.
9055 %
9056 % \DescribeMacro{\AltOff}Recalling our automobile analogy, \cmd{\AltOff} is like depressing the clutch, It prevents macros like \cmd{\textSC}, \cmd{\textBF}, \cmd{\textIT}, and \cmd{\textUC} from formatting their arguments, but only within a formatting hook.
9057 %
9058 % \DescribeMacro{\AltOn} Likewise, \cmd{\AltOn} is like letting out the clutch. It allows macros like \cmd{\textSC}, \cmd{\textBF}, \cmd{\textIT}, and \cmd{\textUC} to format their arguments, but only within a formatting hook. The index reflects only the global state.
9059 %
9060 % If one uses the \texttt{altformat} option, \cmd{\AltFormatActive}, or \texttt{AltFormatZone}, the formatting ``power'' goes to the formatting macros by default in both the text and the index. If we want name forms to change in the text, we can add a formatting hook that uses \cmd{\AltOff} to suppress formatting in subsequent uses of a name (even when using \cmd{\FixateFormat}), without affecting the index:
9061 %^^A
9062 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_03.tex}\else
9063 % \edef\NameauthTestFile{\jobname.tmp}\fi
9064 %^^A
9065 % \begin{VerbatimOut}{\NameauthTestFile}
9066 % \documentclass{article}
9067 % \input{compat.tex} % Included with nameauth for compatibility.
9068 % \usepackage{makeidx}
9069 % \usepackage[altformat]{nameauth}
9070 %
9071 % \makeindex
9072 %
9073 % \PretagName[Konrad]{\noexpand\textSC{Zuse}}{Zuse, Konrad}
9074 % \PretagName[Ada]{\noexpand\textIT{Lovelace}}{Lovelace, Ada}
9075 % \PretagName[Charles]{\noexpand\textBF{Babbage}}
9076 % {Babbage, Charles}
9077 % \PretagName{\noexpand\textUC{Kanade}, Takeo}{Kanade Takeo}
9078 % \renewcommand*\MainNameHook{\AltOff}
9079 %
9080 % \begin{document}
9081 %
9082 % \begin{quote}
9083 % \ForgetThis\Name[Konrad]{\noexpand\textSC{Zuse}};
9084 % \Name[Konrad]{\noexpand\textSC{Zuse}}\\
9085 % \ForgetThis\Name[Ada]{\noexpand\textIT{Lovelace}};
9086 % \Name[Ada]{\noexpand\textIT{Lovelace}}\\
9087 % \ForgetThis\Name[Charles]{\noexpand\textBF{Babbage}};
9088 % \Name[Charles]{\noexpand\textBF{Babbage}}\\
9089 % \ForgetThis\Name{\noexpand\textUC{Kanade}, Takeo};
9090 % \Name{\noexpand\textUC{Kanade}, Takeo}
9091 % \end{quote}
9092 %
9093 % \printindex
9094 % \end{document}
9095 % \end{VerbatimOut}
9096 %^^A
9097 % \begin{Quote}
9098 % \VerbatimInput[gobble=0, lastline=16]{\NameauthTestFile}
9099 %
9100 % \VerbatimInput[gobble=0, firstline=17]{\NameauthTestFile}
9101 %
9102 % \renewcommand*\NamesFormat{}
9103 % \renewcommand*\MainNameHook{\AltOff}
9104 %
9105 % \ForgetThis\Name[Konrad]{\noexpand\textSC{Zuse}};
9106 % \Name[Konrad]{\noexpand\textSC{Zuse}}\\
9107 % \ForgetThis\Name[Ada]{\noexpand\textIT{Lovelace}};
9108 % \Name[Ada]{\noexpand\textIT{Lovelace}}\\
9109 % \ForgetThis\Name[Charles]{\noexpand\textBF{Babbage}};
9110 % \Name[Charles]{\noexpand\textBF{Babbage}}\\
9111 % \ForgetThis\Name{\noexpand\textUC{Kanade}, Takeo};
9112 % \Name{\noexpand\textUC{Kanade}, Takeo}
9113 % \end{Quote}
9114 % \endgroup^^A Local format hook redefinition
9115 %
9116 % \subsubsection{History Text}
9117 % \label{sec:RealAltEx}
9118 %
9119 % \begingroup^^A Local format hook redefinition
9120 %
9121 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_04.tex}\else
9122 % \edef\NameauthTestFile{\jobname.tmp}\fi
9123 %^^A
9124 % \begin{VerbatimOut}{\NameauthTestFile}
9125 % \documentclass{article}
9126 % \input{compat.tex} % Included with nameauth for compatibility.
9127 % \usepackage{makeidx}
9128 % \usepackage[altformat]{nameauth}
9129 %
9130 % \makeindex
9131 %
9132 % \begin{nameauth}
9133 % \< Luth & Martin & \noexpand\textSC{Luther} & >
9134 % \< Cath & Catherine \noexpand\AltCaps{d}e'
9135 % & \noexpand\textSC{Medici} & >
9136 % \end{nameauth}
9137 % \PretagName[Martin]{\noexpand\textSC{Luther}}{Luther, Martin}
9138 % \PretagName[Catherine \noexpand\AltCaps{d}e']
9139 % {\noexpand\textSC{Medici}}{Medici, Catherine de}
9140 %
9141 % \renewcommand*\MainNameHook{\AltOff}
9142 %
9143 % \begin{document}
9144 %
9145 % \ForgetThis\Luth\ was a leading figure in the Protestant
9146 % Reformation. \Luth\ believed that one is declared
9147 % righteous in a forensic sense by divine grace through faith
9148 % created by the Holy Spirit via the Gospel and the Sacraments.
9149 %
9150 % \ForgetThis\Cath\ was not only Queen of France in her own right,
9151 % but she also guided the reigns of her three sons.
9152 % \CapThis\LCath[\noexpand\AltCaps{d}e']
9153 % was blamed for the St.\ Bartholomew's Day massacre that saw the
9154 % murder of thousands of Huguenots.
9155 %
9156 % \printindex
9157 % \end{document}
9158 % \end{VerbatimOut}
9159 %^^A
9160 % \renewcommand*\MainNameHook{\AltOff}
9161 % \begin{Quote}
9162 % \VerbatimInput[gobble=0]{\NameauthTestFile}
9163 %
9164 % \newpage
9165 %
9166 % \ForgetThis\Luth\ was a leading figure in the Protestant
9167 % Reformation. \Luth\ believed that one is declared
9168 % righteous in a forensic sense by divine grace through faith
9169 % created by the Holy Spirit via the Gospel and the Sacraments.
9170 %
9171 % \ForgetThis\Cath\ was not only Queen of France in her own right,
9172 % but she also guided the reigns of her three sons.
9173 % \CapThis\LCath[\noexpand\AltCaps{d}e']
9174 % was blamed for the St.\ Bartholomew's Day massacre that saw the
9175 % murder of thousands of Huguenots.
9176 % \end{Quote}
9177 %
9178 % Here we keep the particle with the forename, but display them as a long reference with the surname, showing a degree of flexibility (Section~\ref{sec:NameParticles}):
9179 % \begin{itemize}
9180 % \item \parbox{0.2\textwidth}{\LCath[\noexpand\AltCaps{d}e']}
9181 % |\LCath[\noexpand\AltCaps{d}e']|
9182 %
9183 % \item \parbox{0.2\textwidth}{\CapThis\LCath[\noexpand\AltCaps{d}e']}
9184 % |\CapThis\LCath[\noexpand\AltCaps{d}e']|
9185 % \end{itemize}
9186 % \endgroup^^A Local format hook redefinition
9187 %
9188 % \subsubsection{Inflected Names}
9189 % \label{sec:InflNames}
9190 % \begingroup^^A Local format hook redefinition
9191 %
9192 % Next we design grammatical inflections for use with alternate formatting. Perhaps this could be useful also for paradigms in a grammar book.
9193 %
9194 % We need two Boolean flags for one change in name form, which is a grammatical inflection in this case. Thus, we set up \texttt{\textbackslash ifGenitive} as the global flag and \texttt{\textbackslash ifDoGenitive} as the local flag.
9195 %
9196 % \cmd{\DoGenitivetrue} occurs only in the formatting hook. The macro that produces the genitive (or possessive) ending only does so when \texttt{\textbackslash ifDoGenitive} is true. This keeps the index entries consistent via \cmd{\noexpand}. Likewise, \cmd{\AltOff} only occurs in the formatting hook \cmd{\MainNameHook}.
9197 % \JustIndex\Jeff
9198 %^^A
9199 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_05.tex}\else
9200 % \edef\NameauthTestFile{\jobname.tmp}\fi
9201 %^^A
9202 % \begin{VerbatimOut}{\NameauthTestFile}
9203 % \documentclass{article}
9204 % \input{compat.tex} % Included with nameauth for compatibility.
9205 % \usepackage{makeidx}
9206 % \usepackage[altformat]{nameauth}
9207 %
9208 % \makeindex
9209 %
9210 % \newif\ifGenitive
9211 % \newif\ifDoGenitive
9212 % \newcommand*\GEN{\ifDoGenitive\textSC{'s}\fi}
9213 %
9214 % \begin{nameauth}
9215 % \< Jeff & Thomas &
9216 % \noexpand\textSC{Jefferson}\noexpand\GEN{} & >
9217 % \end{nameauth}
9218 %
9219 % \PretagName[Thomas]{\noexpand\textSC{Jefferson}\noexpand\GEN{}}
9220 % {Jefferson, Thomas}
9221 % \TagName[Thomas]{\noexpand\textSC{Jefferson}\noexpand\GEN{}}
9222 % {, pres.}
9223 %
9224 % \renewcommand*\NamesFormat[1]
9225 % {\ifGenitive\DoGenitivetrue\fi#1\global\Genitivefalse}
9226 % \renewcommand*\MainNameHook[1]
9227 % {\ifGenitive\DoGenitivetrue\fi\AltOff#1\global\Genitivefalse}
9228 %
9229 % \begin{document}
9230 %
9231 % Consider \Genitivetrue\Jeff\ legacy as the author of the
9232 % colonies' \textit{Declaration of Independence} and his impact
9233 % as third president of the United States. \Jeff\ was a complex
9234 % historical figure whose actions defy a consistent moral compass
9235 % both in public policy and in personal affairs.
9236 %
9237 % \printindex
9238 % \end{document}
9239 % \end{VerbatimOut}
9240 %^^A
9241 % \begin{Quote}
9242 % \VerbatimInput[gobble=0,lastline=28]{\NameauthTestFile}
9243 %
9244 % \newpage
9245 %
9246 % \VerbatimInput[gobble=0,firstline=29]{\NameauthTestFile}
9247 %
9248 % \renewcommand*\NamesFormat[1]
9249 % {\ifGenitive\DoGenitivetrue\fi#1\global\Genitivefalse}
9250 % \renewcommand*\MainNameHook[1]
9251 % {\ifGenitive\DoGenitivetrue\fi\AltOff#1\global\Genitivefalse}
9252 %
9253 % Consider \ForgetThis\Genitivetrue\Jeff\ legacy as the author of the
9254 % colonies' \textit{Declaration of Independence} and his impact
9255 % as third president of the United States. \Jeff\ was a complex
9256 % historical figure whose actions defy a consistent moral compass
9257 % both in public policy and in personal affairs.
9258 % \end{Quote}
9259 % \endgroup^^A Local format hook redefinition
9260 %
9261 % \subsubsection{Reference Work I}
9262 % \label{sec:RefI}
9263 % \begingroup^^A Local format hook redefinition
9264 %
9265 % Here we show how \textsf{nameauth} might be used in a reference work, where names are also the head-words of articles. We present examples that include a basic Western name, a basic Eastern name, and a Western name with an alias. Some tips include:
9266 % \begin{itemize}
9267 % \item Sort all names that use alternate formatting.
9268 %
9269 % \item Match index entry forms to article head-words.
9270 %
9271 % \item Cross-reference name variants to the head-word.
9272 %
9273 % \item The first instance of a name displays the active alternate formatting.
9274 %
9275 % \item Deactivate alternate formatting in subsequent name instances.
9276 %
9277 % \item Since some \LaTeX\ fonts do not combine small caps and boldface, we use slanted text in \cmd{\RefArticle} below.
9278 % \end{itemize}
9279 %^^A
9280 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_06.tex}\else
9281 % \edef\NameauthTestFile{\jobname.tmp}\fi
9282 %^^A
9283 % \begin{VerbatimOut}{\NameauthTestFile}
9284 % \documentclass{article}
9285 % \input{compat.tex} % Included with nameauth for compatibility.
9286 % \usepackage{makeidx}
9287 % \usepackage[altformat]{nameauth}
9288 %
9289 % \makeindex
9290 %
9291 % % Sort any names with macros in the arguments.
9292 %
9293 % \PretagName[Greta]{\noexpand\textSC{Garbo}}{Garbo, Greta}
9294 % \PretagName{\noexpand\textSC{Misora}, Hibari}{Misora Hibari}
9295 % \PretagName[Heinz]{\noexpand\textSC{R\"uhmann}}{Ruehmann, Heinz}
9296 % \PretagName[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}}
9297 % {Ruehmann, Heinrich Wilhelm}
9298 %
9299 % % Make a cross-reference from a variant name form to the
9300 % % form of the head-words
9301 %
9302 % \IndexRef[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}}
9303 % {\noexpand\textSC{R\"uhmann}, Heinz}
9304 %
9305 % % Define the formatting hooks. Since we use the `altformat'
9306 % % option, alternate formatting is turned off in later
9307 % % name uses.
9308 %
9309 % \renewcommand*\MainNameHook{\AltOff}
9310 %
9311 % % Typeset head-words with a slanted font.
9312 %
9313 % \newcommand{\RefArticle}[3]
9314 % {%
9315 % \def\Check{#2}%
9316 % \ifx\Check\empty
9317 % \noindent\ForgetThis\textsl{#1}\ #3
9318 % \else
9319 % \noindent\ForgetThis\textsl{#1}\ #2\ #3
9320 % \fi\medskip
9321 % }
9322 %
9323 % \begin{document}
9324 %
9325 % \RefArticle
9326 % {\RevComma\Name[Greta]{\noexpand\textSC{Garbo}}}
9327 % {}
9328 % {(18 September 1905\,--\,15 April 1990) was a Swedish
9329 % film actress during the 1920s and 1930s.
9330 % \Name[Greta]{\noexpand\textSC{Garbo}}\dots}
9331 %
9332 % \RefArticle
9333 % {\Name{\noexpand\textSC{Misora}, Hibari}}
9334 % {(W:\,``\RevName\Name*{\noexpand\textSC{Misora}, Hibari}'';}
9335 % {29 May 1937\,--\,24 June 1989) was a Japanese singer
9336 % and actress noted for her positive message.
9337 % \Name{\noexpand\textSC{Misora}, Hibari}\dots}
9338 %
9339 % \RefArticle
9340 % {\RevComma\Name[Heinz]{\noexpand\textSC{R\"uhmann}}}
9341 % {(\SubvertThis\ForceName
9342 % \FName[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}};}
9343 % {7 March 1902\,--\,3 October 1994) was a German actor
9344 % in over 100 films.
9345 % \Name[Heinz]{\noexpand\textSC{R\"uhmann}}\dots}
9346 %
9347 % \printindex
9348 % \end{document}
9349 % \end{VerbatimOut}
9350 %^^A
9351 % \begin{Quote}
9352 % \VerbatimInput[gobble=0,lastline=25]{\NameauthTestFile}
9353 %
9354 % \VerbatimInput[gobble=0, firstline=26]{\NameauthTestFile}
9355 %
9356 % \IndexRef[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}}
9357 % {\noexpand\textSC{R\"uhmann}, Heinz}
9358 %
9359 % \renewcommand*\NamesFormat{}
9360 % \renewcommand*\MainNameHook{\AltOff}
9361 %
9362 % \newcommand{\RefArticle}[3]
9363 % {^^A
9364 % \def\Check{#2}^^A
9365 % \ifx\Check\empty
9366 % \noindent\ForgetThis\textsl{#1}\ #3
9367 % \else
9368 % \noindent\ForgetThis\textsl{#1}\ #2\ #3
9369 % \fi\medskip
9370 % }
9371 %
9372 % \RefArticle
9373 % {\RevComma\Name[Greta]{\noexpand\textSC{Garbo}}}
9374 % {}
9375 % {(18 September 1905\,--\,15 April 1990) was a Swedish
9376 % film actress during the 1920s and 1930s.
9377 % \Name[Greta]{\noexpand\textSC{Garbo}}\dots}
9378 %
9379 % \RefArticle
9380 % {\Name{\noexpand\textSC{Misora}, Hibari}}
9381 % {(W:\,``\RevName\Name*{\noexpand\textSC{Misora}, Hibari}'';}
9382 % {29 May 1937\,--\,24 June 1989) was a Japanese singer
9383 % and actress noted for her positive message.
9384 % \Name{\noexpand\textSC{Misora}, Hibari}\dots}
9385 %
9386 % \RefArticle
9387 % {\RevComma\Name[Heinz]{\noexpand\textSC{R\"uhmann}}}
9388 % {(\SubvertThis\ForceName
9389 % \FName[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}};}
9390 % {7 March 1902\,--\,3 October 1994) was a German actor
9391 % in over 100 films.
9392 % \Name[Heinz]{\noexpand\textSC{R\"uhmann}}\dots}
9393 % \end{Quote}
9394 % \endgroup^^A Local format hook redefinition
9395 %
9396 % We will revisit the topic of a reference work in Section~\ref{sec:RefII}, where we integrate custom formatting hooks into the concept. This puts the work into setup and automation instead of using macros with several arguments.
9397 %
9398 % \subsection{Roman Names II}
9399 % \label{sec:Romanii}
9400 %
9401 % \subsubsection[General Reference]{General Reference Works}
9402 % \label{sec:RomanStudent}
9403 %
9404 % \begingroup^^A Local format hook redefinition
9405 % \renewcommand*\NamesFormat{}
9406 % \renewcommand*\MainNameHook{}
9407 %
9408 % In this subsection and the next, we do not use the formatting conventions of this manual and we activate alternate formatting. We focus here on reference works that treat the \LA{cognomen} as a Western surname and index according to it.\footnote{See Geiss, \Title{\de{Geschichte Griffbereit}}; Kinder and Hilgemann, \Title{\de{dtv-Atlas zur Weltgeschichte}}, 2 vols., 29th printing (1964; Munich: Deutscher Taschenbuch Verlag, 1993). See also \href{https://books.infotoday.com/books/Indexing-names.shtml}{\bfseries this page}.}
9409 %
9410 % This approach corresponds roughly with the manual approach that we saw in Section~\ref{sec:RomanGeneral}, except that we will not use \meta{Affix} to drop \LA{agnomina} and we will not use \meta{Alternate} to display variants of the \la{praenomen} and \LA{nomen}. Instead, we use macros that take advantage of alternate formatting to handle name form changes.
9411 % \begin{Quote}
9412 % Index: \ShowIdxPageref*[\meta{praenomen} \meta{nomen}]
9413 % {\meta{cognomen} \meta{agnomen}}\\[1ex]
9414 % Macro: |\Name[|\meta{praenomen}| |\meta{nomen}|]{|\meta{cognomen}
9415 % \meta{agnomen}|}|
9416 % \end{Quote}
9417 %
9418 % This method increases the number of macros by \emph{two per name,} one for each individual \meta{FNN} and \meta{SNN}. That might be a deal-breaker for some. The general logic used by the respective macros used in each name component follows the plan below, with the \textsf{nameauth} logic for Western names doing the rest:
9419 % \begin{itemize}
9420 % \item Display either \LA{praenomen}, \LA{nomen}, or both in \meta{FNN}.
9421 % \item Display either \LA{cognomen}, \LA{agnomen}, or both in \meta{SNN}.
9422 % \end{itemize}
9423 %
9424 % We use alternate formatting and \cmd{\noexpand} in the macro arguments to ensure that index entries remain consistent. We define macros in both \meta{FNN} and \meta{SNN} that expand conditionally. We use the quick interface to define name shorthands, and we use \cmd{\PretagName} and \cmd{\TagName} as needed (cf. Section~\ref{sec:NameAncient}. In the preamble we define all macros and conditionals used in naming macro arguments to avoid errors. We use \texttt{\textbackslash ifNoGens} for the \LA{nomen} because \texttt{\textbackslash ifNoNomen} invites haplography.
9425 % \NameArgWarning
9426 % \begin{itemize}
9427 % \item When using Boolean flags (\texttt{\textbackslash if}\meta{flag}) in the macros that represent name elements, ensure that those flags only change their value within the local scope of the name formatting hooks (Section~\ref{sec:Formatting}).
9428 %
9429 % \item Two Boolean flags are needed for each automated variant in the name. One flag reflects the \emph{global} state and the name form in the index. The other reflects the \emph{local} state of the formatting hooks.
9430 %
9431 % \item Since we have four name \emph{components}, we need at most eight Boolean flags, two per \emph{potential change}. The logic shows longer forms when the flags are false, shorter forms when the flags are true.
9432 % \end{itemize}
9433 %
9434 % \newpage
9435 %
9436 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_07.tex}\else
9437 % \edef\NameauthTestFile{\jobname.tmp}\fi
9438 %^^A
9439 % \begin{VerbatimOut}{\NameauthTestFile}
9440 % \documentclass{article}
9441 % \input{compat.tex} % Included with nameauth for compatibility.
9442 % \usepackage{makeidx}
9443 % \usepackage[altformat]{nameauth}
9444 %
9445 % \makeindex
9446 %
9447 % % Global Boolean flags need to be defined only once.
9448 % \newif\ifNoPraenomen
9449 % \newif\ifNoCognomen
9450 % \newif\ifNoGens
9451 % \newif\ifNoAgnomen
9452 %
9453 % % Local Boolean flags need to be defined only once.
9454 % \newif\ifXPrae
9455 % \newif\ifXCogn
9456 % \newif\ifXGens
9457 % \newif\ifXAgno
9458 %
9459 % % Name variant macros are defined uniquely for each name.
9460 % \newcommand*\SCIPi
9461 % {%
9462 % \ifXGens Publius\else
9463 % \ifXPrae Cornelius\else
9464 % Publius Cornelius%
9465 % \fi
9466 % \fi
9467 % }
9468 %
9469 % \newcommand*\SCIPii
9470 % {\ifXAgno Scipio\else Scipio Africanus\fi}
9471 %
9472 % \newcommand*\TSemp
9473 % {%
9474 % \ifXGens Tiberius\else
9475 % \ifXPrae Sempronius\else
9476 % Tiberius Sempronius%
9477 % \fi
9478 % \fi
9479 % }
9480 %
9481 % % Quick interface definitions.
9482 % \begin{nameauth}
9483 % \< Scipio & \noexpand\SCIPi & \noexpand\SCIPii & >
9484 % \< TGrac & \noexpand\TSemp & Gracchus & >
9485 % \end{nameauth}
9486 %
9487 % % We add a name tag.
9488 % \NameAddInfo[\noexpand\TSemp]{Gracchus}
9489 % { (consul, 177 \textsc{bc})}
9490 %
9491 % % Sorting and tagging the names
9492 % \PretagName[\noexpand\SCIPi]{\noexpand\SCIPii}
9493 % {Scipio Africanus}
9494 % \PretagName[\noexpand\TSemp]{Gracchus}
9495 % {Gracchus, Tiberius Sempronius}
9496 % \TagName[\noexpand\TSemp]{Gracchus}{, consul}
9497 %
9498 % % We define formatting hooks.
9499 % \renewcommand*\NamesFormat[1]
9500 % {%
9501 % \ifNoPraenomen\XPraetrue\fi%
9502 % \ifNoGens\XGenstrue\fi%
9503 % \ifNoCognomen\XCogntrue\fi%
9504 % \ifNoAgnomen\XAgnotrue\fi%
9505 % #1\NameQueryInfo{}%
9506 % \global\NoPraenomenfalse%
9507 % \global\NoGensfalse%
9508 % \global\NoCognomenfalse%
9509 % \global\NoAgnomenfalse%
9510 % }
9511 %
9512 % \renewcommand*\MainNameHook[1]
9513 % {%
9514 % \ifNoPraenomen\XPraetrue\fi%
9515 % \ifNoGens\XGenstrue\fi%
9516 % \ifNoCognomen\XCogntrue\fi%
9517 % \ifNoAgnomen\XAgnotrue\fi%
9518 % #1%
9519 % \global\NoPraenomenfalse%
9520 % \global\NoGensfalse%
9521 % \global\NoCognomenfalse%
9522 % \global\NoAgnomenfalse%
9523 % }
9524 %
9525 % \begin{document}
9526 %
9527 % \NoAgnomentrue\Scipio\ was born around 236 \textsc{bc}
9528 % into the Scipiones branch of the Cornelii clan.
9529 % \NoAgnomentrue\Scipio\ rose to military fame during the
9530 % Second Punic War. Thereafter he was known as \Scipio.
9531 % He flourished during the Egyptian reigns of
9532 % \Name{Ptolemy, IV}[IV Philopator] and
9533 % \Name{Ptolemy, V}[V Epiphanes], and the Syrian
9534 % reigns of \Name{Seleucus, III}[III Ceraunus] and
9535 % \Name{Antiochus, III}[III the Great].
9536 %
9537 % \TGrac\ served as tribune of the plebs in 184 \textsc{bc}.
9538 % \NoGenstrue\STGrac\ was elected praetor for 180 \textsc{bc},
9539 % after which he was appointed governor of Hispania Citerior,
9540 % serving with the rank of proconsul. In 177 \textsc{bc},
9541 % he was elected consul, again in 163 \textsc{bc}.
9542 %
9543 % \printindex
9544 % \end{document}
9545 % \end{VerbatimOut}
9546 %^^A
9547 % \begin{Quote}
9548 % \VerbatimInput[gobble=0, lastline=19]{\NameauthTestFile}
9549 % \end{Quote}
9550 %
9551 % \JustIndex\CatoYi
9552 % For every name, one must define two macros. True, there can be multiple names that are alike and use the same macros, as with many a \CatoY, but then one must use \cmd{\TagName} and non-printing macros in name arguments to create unique names and index entries (Section~\ref{sec:Unique}). The Romans had a small set of acceptable names and often named fathers and sons alike.
9553 % \begin{Quote}
9554 % \VerbatimInput[gobble=0, firstline=20, lastline=47]{\NameauthTestFile}
9555 % \end{Quote}
9556 %
9557 % \newpage
9558 %
9559 % If one uses \cmd{\NameQueryInfo\{\}} within formatting hooks, it is best to put a space at the beginning of a tag if space is needed, instead of in the hook.
9560 % \begin{Quote}
9561 % \VerbatimInput[gobble=0, firstline=48, lastline=58]{\NameauthTestFile}
9562 % \end{Quote}
9563 %
9564 % We reset the global Boolean flags to ensure the longest name forms in the index. Local Boolean flags revert to false outside the scope of the formatting hooks.
9565 %^^A
9566 % \renewcommand*\NamesFormat[1]
9567 % {^^A
9568 % \ifNoPraenomen\XPraetrue\fi^^A
9569 % \ifNoGens\XGenstrue\fi^^A
9570 % \ifNoCognomen\XCogntrue\fi^^A
9571 % \ifNoAgnomen\XAgnotrue\fi^^A
9572 % #1\NameQueryInfo{}^^A
9573 % \global\NoPraenomenfalse^^A
9574 % \global\NoGensfalse^^A
9575 % \global\NoCognomenfalse^^A
9576 % \global\NoAgnomenfalse^^A
9577 % }
9578 % \renewcommand*\MainNameHook[1]
9579 % {^^A
9580 % \ifNoPraenomen\XPraetrue\fi^^A
9581 % \ifNoGens\XGenstrue\fi^^A
9582 % \ifNoCognomen\XCogntrue\fi^^A
9583 % \ifNoAgnomen\XAgnotrue\fi^^A
9584 % #1^^A
9585 % \global\NoPraenomenfalse^^A
9586 % \global\NoGensfalse^^A
9587 % \global\NoCognomenfalse^^A
9588 % \global\NoAgnomenfalse^^A
9589 % }
9590 % \begin{Quote}
9591 % \VerbatimInput[gobble=0, firstline=59, lastline=97]{\NameauthTestFile}
9592 %
9593 % \newpage
9594 %
9595 % \ForgetThis\NoAgnomentrue\Scipio\ was born around 236 \textsc{bc}
9596 % into the Scipiones branch of the Cornelii clan.
9597 % \NoAgnomentrue\Scipio\ rose to military fame during the
9598 % Second Punic War. Thereafter he was known as \Scipio.
9599 % He flourished during the Egyptian reigns of
9600 % \Name{Ptolemy, IV}[IV Philopator] and
9601 % \Name{Ptolemy, V}[V Epiphanes], and the Syrian
9602 % reigns of \Name{Seleucus, III}[III Ceraunus] and
9603 % \Name{Antiochus, III}[III the Great].
9604 % \end{Quote}
9605 %
9606 % Below we show more name variations than were shown above:
9607 %
9608 % \begin{Block}
9609 % \ForgetThis\Scipio \dotfill |\ForgetThis\Scipio|\\
9610 % \LScipio \dotfill |\LScipio|\\
9611 % \Scipio \dotfill |\Scipio|\\
9612 % \SScipio \dotfill |\SScipio|\\
9613 % \NoAgnomentrue\LScipio \dotfill |\NoAgnomentrue\LScipio|\\
9614 % \NoAgnomentrue\Scipio \dotfill |\NoAgnomentrue\Scipio|\\
9615 % \NoGenstrue\SScipio \dotfill |\NoGenstrue\SScipio|\\
9616 % \NoPraenomentrue\SScipio \dotfill |\NoPraenomentrue\SScipio|
9617 % \end{Block}
9618 %
9619 % In Section~\ref{sec:NameAncient}, we used name tags instead of \meta{Alternate} in the first-use formatting hook. Here we adopt a similar approach. Since formatting hooks are local by design, whatever changes inside of them does not affect the index.
9620 % \begin{Quote}
9621 % \VerbatimInput[gobble=0,firstline=98]{\NameauthTestFile}
9622 % \NameAddInfo[\noexpand\TSemp]{Gracchus}
9623 % { (consul, 177 \textsc{bc})}
9624 %
9625 % \TGrac\ served as tribune of the plebs in 184 \textsc{bc}.
9626 % \TGrac\ was elected praetor for 180 \textsc{bc},
9627 % after which he was appointed governor of Hispania Citerior,
9628 % serving with the rank of proconsul. In 177 \textsc{bc},
9629 % he was elected consul, again in 163 \textsc{bc}.
9630 % \end{Quote}
9631 %
9632 % Again we see more name variations:
9633 %
9634 % \begin{Block}
9635 % \ForgetThis\TGrac \dotfill |\ForgetThis\TGrac|\\
9636 % \LTGrac \dotfill |\LTGrac|\\
9637 % \NoGenstrue\LTGrac \dotfill |\NoGenstrue\LTGrac|\\
9638 % \TGrac \dotfill |\TGrac|\\
9639 % \STGrac \dotfill |\STGrac|\\
9640 % \NoGenstrue\STGrac \dotfill |\NoGenstrue\STGrac|\\
9641 % \NoPraenomentrue\STGrac \dotfill |\NoPraenomentrue\STGrac|
9642 % \end{Block}
9643 %
9644 % Next we see other types of names using these same formatting hooks:
9645 %
9646 % \begin{Block}
9647 % \Name*{Ptolemy, IV}[IV Philopator]\dotfill |\Name*{Ptolemy, IV}[IV Philopator]|\\
9648 % \Name*{Ptolemy, IV}\dotfill |\Name*{Ptolemy, IV}|\\
9649 % \Name{Ptolemy, IV}\dotfill |\Name{Ptolemy, IV}|\\
9650 % \ForgetThis\Dem \dotfill |\ForgetThis\Dem|\\
9651 % \LDem \dotfill |\LDem|\\
9652 % \Dem \dotfill |\Dem|
9653 % \end{Block}
9654 %
9655 % \subsubsection[Scholarly Works]{Scholarly Reference Works}
9656 % \label{sec:RomanScholarii}
9657 %
9658 % We retain most of the code from the previous section in the example below, but we change the macros used in the name arguments, following this logic:
9659 % \begin{itemize}
9660 % \item Display the \LA{praenomen} in \meta{FNN}:
9661 %
9662 % \item Display one of the following in \meta{SNN}:
9663 % \begin{itemize}
9664 % \item Only the \LA{cognomen}
9665 %
9666 % \item Both the \LA{cognomen} and \LA{agnomina}
9667 %
9668 % \item Only the \LA{nomen}
9669 %
9670 % \item Both the \LA{nomen} and \LA{cognomen}
9671 %
9672 % \item The \LA{nomen}, \LA{cognomen}, and \LA{agnomina}
9673 % \end{itemize}
9674 % \end{itemize}
9675 %^^A
9676 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_08.tex}\else
9677 % \edef\NameauthTestFile{\jobname.tmp}\fi
9678 %^^A
9679 % \begin{VerbatimOut}{\NameauthTestFile}
9680 % \documentclass{article}
9681 % \input{compat.tex} % Included with nameauth for compatibility.
9682 % \usepackage{makeidx}
9683 % \usepackage[altformat]{nameauth}
9684 %
9685 % \makeindex
9686 %
9687 % % Global Boolean flags need to be defined only once.
9688 % \newif\ifNoPraenomen
9689 % \newif\ifNoCognomen
9690 % \newif\ifNoGens
9691 % \newif\ifNoAgnomen
9692 %
9693 % % Local Boolean flags need to be defined only once.
9694 % \newif\ifXPrae
9695 % \newif\ifXCogn
9696 % \newif\ifXGens
9697 % \newif\ifXAgno
9698 %
9699 % % Name variant macros are defined uniquely for each name.
9700 % \newcommand*\CSB
9701 % {%
9702 % \ifXGens
9703 % \ifXAgno Scipio\else Scipio Barbatus\fi
9704 % \else
9705 % \ifXCogn Cornelius\else
9706 % \ifXAgno Cornelius Scipio\else
9707 % Cornelius Scipio Barbatus%
9708 % \fi
9709 % \fi
9710 % \fi
9711 % }
9712 %
9713 % % Quick interface definition
9714 % \begin{nameauth}
9715 % \< OScipio & Lucius & \noexpand\CSB & > % O for Oxford
9716 % \end{nameauth}
9717 %
9718 % % Sorting and tagging
9719 % \PretagName[Lucius]{\noexpand\CSB}{Cornelius Scipio Barbatus}
9720 % \TagName[Lucius]{\noexpand\CSB}{, consul}
9721 %
9722 % \renewcommand*\NamesFormat[1]
9723 % {%
9724 % \ifNoPraenomen\XPraetrue\fi%
9725 % \ifNoGens\XGenstrue\fi%
9726 % \ifNoCognomen\XCogntrue\fi%
9727 % \ifNoAgnomen\XAgnotrue\fi%
9728 % #1\NameQueryInfo{}%
9729 % \global\NoPraenomenfalse%
9730 % \global\NoGensfalse%
9731 % \global\NoCognomenfalse%
9732 % \global\NoAgnomenfalse%
9733 % }
9734 %
9735 % \begin{document}
9736 %
9737 % \OScipio\ was born around 337 \textsc{bc} into the
9738 % Scipiones branch of the Cornelii clan, one of the large
9739 % patrician clans. \NoGenstrue\NoAgnomentrue\OScipio\ was
9740 % one of the two elected consuls in 298 \textsc{bc}
9741 % and served during the Third Samnite War.
9742 %
9743 % \printindex
9744 % \end{document}
9745 % \end{VerbatimOut}
9746 %^^A
9747 % \begin{Quote}
9748 % \VerbatimInput[gobble=0,lastline=38]{\NameauthTestFile}
9749 %
9750 % \newpage
9751 %
9752 % \VerbatimInput[gobble=0,firstline=39]{\NameauthTestFile}
9753 %
9754 % \OScipio\ was born around 337 \textsc{bc} into the
9755 % Scipiones branch of the Cornelii clan, one of the large
9756 % patrician clans. \NoGenstrue\NoAgnomentrue\OScipio\ was
9757 % one of the two elected consuls in 298 \textsc{bc}
9758 % and served during the Third Samnite War.
9759 % \end{Quote}
9760 %
9761 % Instead of relying on some \textsf{nameauth} features that drop some name elements automatically, in all but \meta{FNN} we have to state explicitly what we want:
9762 %
9763 % \begin{Block}
9764 % \ForgetThis\OScipio \dotfill |\ForgetThis\OScipio|\\
9765 % \LOScipio \dotfill |\LOScipio|\\
9766 % \OScipio \dotfill |\OScipio|\\
9767 % \SOScipio \dotfill |\SOScipio|\\
9768 % \NoCognomentrue\OScipio \dotfill |\NoCognomentrue\OScipio|\\
9769 % \NoAgnomentrue\OScipio \dotfill |\NoAgnomentrue\OScipio|\\
9770 % \NoGenstrue\OScipio \dotfill |\NoGenstrue\OScipio|\\
9771 % \NoGenstrue\NoAgnomentrue\OScipio \dotfill^^A
9772 % |\NoGenstrue\NoAgnomentrue\OScipio|
9773 % \end{Block}
9774 %
9775 % \endgroup^^A Local format hook redefinition
9776 %
9777 % \begin{AltFormatZone}
9778 % \renewcommand*\NamesFormat[1]
9779 % {\color{blue}\sffamily^^A
9780 % \ifGenitive\DoGenitivetrue\fi#1^^A
9781 % \global\Genitivefalse}
9782 % \renewcommand*\MainNameHook[1]
9783 % {\sffamily^^A
9784 % \ifGenitive\DoGenitivetrue\fi\AltOff#1^^A
9785 % \global\Genitivefalse}
9786 % \begin{Quotation}{\Jeff}
9787 % {letter to \Name[John]{Wyche}, 1809}
9788 % I have often thought that nothing would do more extensive good at small expense than the establishment of a small circulating library in every county, to consist of a few well-chosen books, to be lent to the people of the country under regulations as would secure their safe return in due time.
9789 % \index{politicians, quotes of\noexpand\string|hyperpage}
9790 % \end{Quotation}
9791 % \end{AltFormatZone}
9792 %
9793 % \subsection[Special Uses]{Special Name Uses}
9794 % \label{sec:SpecialUses}
9795 %
9796 % \begingroup^^A Local format hook redefinition
9797 % Previously, formatting hooks either changed typefaces or mutated their arguments. Now we move beyond parsing the argument as we have received it.
9798 %
9799 % \DescribeMacro{\NameParser}
9800 % The user-accessible parser (Section~\ref{sec:NameParser}) is distinct from the internal name parser. Yet it only can be called within the formatting hooks, the point where the internal parser generates output. Thus, the two parsers are linked.
9801 %
9802 % Capitalization and \meta{Alternate} swapping happen early in the parsing process before we know what name elements to display. \cmd{\NameParser} only sees the name elements after these actions are done. It displays a printed name based on the elements it sees and a matrix of Boolean flags:
9803 % \begin{itemize}
9804 % \item When |\if@nameauth@FullName| is true:
9805 % \begin{itemize}
9806 % \item Name forms are long.
9807 %
9808 % \item If true, |\if@nameauth@ShortSNN| causes the affix of a Western surname to not be displayed.
9809 %
9810 % \item If true, |\if@nameauth@RevThis| causes name order to be reversed, as applicable.
9811 %
9812 % \item If true, |\if@nameauth@RevThisComma| causes a Western name to be reversed, adding a comma between \meta{SNN} and \meta{FNN} only if |\if@nameauth@RevThis| is false.
9813 % \end{itemize}
9814 %
9815 % \item When |\if@nameauth@FullName| is false:
9816 % \begin{itemize}
9817 % \item Name forms are short.
9818 %
9819 % \item If true, |\if@nameauth@ForceAffix| causes only the suffix of a Western name to print.
9820 %
9821 % \item If true, |\if@nameauth@FirstName| causes only a Western forename to print.
9822 %
9823 % \item If true, |\if@nameauth@FirstName| causes an Eastern personal name or an ancient sobriquet to print, but only if |\if@nameauth@EastFN| is true.
9824 % \end{itemize}
9825 % \end{itemize}
9826 %
9827 % \Info*{\small\texttt{\textbackslash ifNameauthWestern}\\[0.4ex] \texttt{\textbackslash ifNameauthObsolete}}^^A
9828 % We provide an example that uses \cmd{\NameParser}, |\ifNameauthWestern|, and |\ifNameauthObsolete| (Section~\ref{sec:NamePatterns}) to show and evaluate name parts:
9829 %^^A
9830 % \begin{VerbatimOut}{\jobname.tmp}
9831 % \makeatletter
9832 % \renewcommand\MainNameHook[1]{%
9833 % \@nameauth@FullNamefalse%
9834 % \@nameauth@FirstNamefalse%
9835 % \@nameauth@ForceAffixfalse%
9836 % \@nameauth@EastFNtrue%
9837 % \ifNameauthWestern
9838 % Western name:\\
9839 % \hbox to 3.5cm {Forename: \@nameauth@FirstNametrue%
9840 % \NameParser\hfill}
9841 % \hbox to 3.5cm {Surname: \@nameauth@FirstNamefalse%
9842 % \NameParser\hfill}
9843 % Affix: \@nameauth@ForceAffixtrue \NameParser\smallskip
9844 % \else
9845 % \hbox to 3.5cm{Non-Western name:\hfill}
9846 % \ifNameauthObsolete
9847 % (obsolete syntax)\\ \hbox to 3.5cm{\hfill} \fi
9848 % \hbox to 3.5cm {Name: \@nameauth@FirstNamefalse%
9849 % \NameParser\hfill}
9850 % Person/Sobriquet: \@nameauth@FirstNametrue%
9851 % \NameParser\smallskip
9852 % \fi
9853 % }
9854 % \makeatother
9855 %
9856 % \Name[Martin]{Van Buren}\\
9857 % \Name[George S.]{Patton, Jr.}[George]\\
9858 % \Name{Miyazaki, Hayao}\\
9859 % \Name{Henry}[VIII]\\
9860 % \Name{Confucius}
9861 % \end{VerbatimOut}
9862 %^^A
9863 % \begin{Quote}
9864 % \VerbatimInput[gobble=0, lastline=13]{\jobname.tmp}
9865 %
9866 % \newpage
9867 %
9868 % \VerbatimInput[gobble=0, firstline=14]{\jobname.tmp}
9869 % \makeatletter
9870 % \renewcommand\MainNameHook[1]{^^A
9871 % \@nameauth@FullNamefalse^^A
9872 % \@nameauth@FirstNamefalse^^A
9873 % \@nameauth@ForceAffixfalse^^A
9874 % \@nameauth@EastFNtrue^^A
9875 % \ifNameauthWestern
9876 % Western name:\\
9877 % \hbox to 3.5cm {Forename: \@nameauth@FirstNametrue^^A
9878 % \NameParser\hfill}
9879 % \hbox to 3.5cm {Surname: \@nameauth@FirstNamefalse^^A
9880 % \NameParser\hfill}
9881 % Affix: \@nameauth@ForceAffixtrue \NameParser\smallskip
9882 % \else
9883 % \hbox to 3.5cm{Non-Western name:\hfill}
9884 % \ifNameauthObsolete
9885 % (obsolete syntax)\\ \hbox to 3.5cm{\hfill} \fi
9886 % \hbox to 3.5cm {Name: \@nameauth@FirstNamefalse^^A
9887 % \NameParser\hfill}
9888 % Person/Sobriquet: \@nameauth@FirstNametrue^^A
9889 % \NameParser\smallskip
9890 % \fi
9891 % }
9892 % \makeatother
9893 %
9894 % \Name[Martin]{Van Buren}\\
9895 % \Name[George S.]{Patton, Jr.}[George]\\
9896 % \Name{Miyazaki, Hayao}\\
9897 % \Name{Henry}[VIII]\\
9898 % \Name{Confucius}
9899 % \end{Quote}
9900 %
9901 % \subsubsection{Reference Work II}
9902 % \label{sec:RefII}
9903 %
9904 % Below we revisit the idea of a reference work, using the formatting hooks to automate tasks instead of populating the different arguments of \cmd{\RefArticle} in Section~\ref{sec:RefI}. We shift the work from proofreading to setup.
9905 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_09.tex}\else
9906 % \edef\NameauthTestFile{\jobname.tmp}\fi
9907 %^^A
9908 % \begin{VerbatimOut}{\NameauthTestFile}
9909 % \documentclass{article}
9910 % \input{compat.tex} % Included with nameauth for compatibility.
9911 % \usepackage{makeidx}
9912 % \usepackage[altformat]{nameauth}
9913 %
9914 % \makeindex
9915 %
9916 % % Boolean flags; the first sets up headwords and the second
9917 % % indicates that a Non-Western form should not be reversed.
9918 % \newif\ifHeadword
9919 % \newif\ifAncientName
9920 %
9921 % % Sorting and tagging the names:
9922 % \PretagName[Charles]{\noexpand\textBF{Babbage}}{Babbage, Charles}
9923 % \PretagName{\noexpand\textUC{Kanade}, Takeo}{Kanade Takeo}
9924 % \PretagName[Ada]{\noexpand\textIT{Lovelace}}{Lovelace, Ada}
9925 %
9926 % % Adding name information:
9927 % \NameAddInfo{Aristotle}{ (384--322 \textsc{bc})}
9928 % \NameAddInfo[Charles]{\noexpand\textBF{Babbage}}{ (1791--1871)}
9929 % \NameAddInfo{\noexpand\textUC{Kanade}, Takeo}{ (1945-- )}
9930 % \NameAddInfo[Ada]{\noexpand\textIT{Lovelace}}
9931 % { (Augusta Ada King, Countess of Lovelace
9932 % [n\'ee Byron]; 1815--52)}
9933 %
9934 % % Redefining the formatting hooks:
9935 % \makeatletter
9936 % \renewcommand\NamesFormat[1]
9937 % {%
9938 % \ifHeadword
9939 % \ifNameauthWestern
9940 % \@nameauth@RevThisCommatrue%
9941 % \bfseries \NameParser%
9942 % \normalfont\NameQueryInfo{}%
9943 % \else
9944 % \begingroup%
9945 % \bfseries \NameParser%
9946 % \unless\ifAncientName
9947 % \normalfont; W:\AltOff\space
9948 % \@nameauth@RevThistrue \NameParser%
9949 % \fi
9950 % \normalfont\NameQueryInfo{}%
9951 % \endgroup%
9952 % \fi
9953 % \else
9954 % \NameParser%
9955 % \fi
9956 % \global\Headwordfalse%
9957 % \global\AncientNamefalse%
9958 % }
9959 % \makeatother
9960 % \renewcommand\MainNameHook{\AltOff}
9961 %
9962 % % Define related macros:
9963 % \newcommand\Headword{\Headwordtrue\ForgetThis}
9964 % \newcommand{\RefArticle}[2]
9965 % {\noindent\Headword #1 #2\medskip}
9966 %
9967 % \begin{document}
9968 %
9969 % \RefArticle{\AncientNametrue\Name{Aristotle}}{was the first to offer
9970 % a system of logic, most notably syllogistic logic, that would
9971 % become the basis for discrete states and circuitry of
9972 % digital computers. \Name{Aristotle}\dots}
9973 %
9974 % \RefArticle{\Name[Charles]{\noexpand\textBF{Babbage}}}{designed and
9975 % built the Difference Engine and began work on the Analytical
9976 % Engine. \Name[Charles]{\noexpand\textBF{Babbage}}\dots}
9977 %
9978 % \RefArticle{\Name{\noexpand\textUC{Kanade}, Takeo}}{is one of the
9979 % foremost pioneers in the field of computer vision.
9980 % \Name{\noexpand\textUC{Kanade}, Takeo}\dots}
9981 %
9982 % \RefArticle{\Name[Ada]{\noexpand\textIT{Lovelace}}}{collaborated with
9983 % \Name*[Charles]{\noexpand\textBF{Babbage}}* and wrote what some
9984 % consider to be the first computer program for the Analytical
9985 % Engine. \Name[Ada]{\noexpand\textIT{Lovelace}}\dots}
9986 %
9987 % \printindex
9988 % \end{document}
9989 % \end{VerbatimOut}
9990 %^^A
9991 % \begin{Quote}
9992 % \VerbatimInput[gobble=0, lastline=17]{\NameauthTestFile}
9993 %
9994 % \newpage
9995 %
9996 % \VerbatimInput[gobble=0, firstline=18, lastline=25]{\NameauthTestFile}
9997 % \end{Quote}
9998 %
9999 % The formatting hook does all the heavy lifting. If the name appears in the headword part of \cmd{\RefArticle}, the hook reverses the name with commas only if it is a Western name. Otherwise, if it is a Non-Western name, but not ancient or royal, then both the Eastern name and its Western version are displayed. Only headwords are printed in boldface. After the first name occurrence, forced by the headword part of \cmd{\RefArticle}, the name tag also is printed.
10000 % \begin{Quote}
10001 % \VerbatimInput[gobble=0, firstline=26, lastline=53]{\NameauthTestFile}
10002 % \end{Quote}
10003 %
10004 % In Section~\ref{sec:RefI} the \cmd{\RefArticle} macro took three arguments, one of which frequently was empty, and required information like dates to be put at the front of each entry. Now \cmd{\RefArticle} simply takes two arguments: a name and some information. The rest is automated.
10005 % \begin{Quote}
10006 % \VerbatimInput[gobble=0, firstline=54, lastline=58]{\NameauthTestFile}
10007 %
10008 % \newpage
10009 %
10010 % \VerbatimInput[gobble=0, firstline=59]{\NameauthTestFile}
10011 %
10012 % \NameAddInfo{Aristotle}{ (384--322 \textsc{bc})}
10013 % \NameAddInfo[Charles]{\noexpand\textBF{Babbage}}{ (1791--1871)}
10014 % \NameAddInfo{\noexpand\textUC{Kanade}, Takeo}{ (1945-- )}
10015 % \NameAddInfo[Ada]{\noexpand\textIT{Lovelace}}
10016 % { (Augusta Ada King, Countess of Lovelace
10017 % [n\'ee Byron]; 1815--52)}
10018 %
10019 % \makeatletter
10020 % \renewcommand\NamesFormat[1]
10021 % {^^A
10022 % \ifHeadword
10023 % \ifNameauthWestern
10024 % \@nameauth@RevThisCommatrue^^A
10025 % \bfseries \NameParser^^A
10026 % \normalfont\NameQueryInfo{}^^A
10027 % \else
10028 % \begingroup^^A
10029 % \bfseries \NameParser^^A
10030 % \unless\ifAncientName
10031 % \normalfont; W:\AltOff\space
10032 % \@nameauth@RevThistrue \NameParser^^A
10033 % \fi
10034 % \normalfont\NameQueryInfo{}^^A
10035 % \endgroup^^A
10036 % \fi
10037 % \else
10038 % \NameParser^^A
10039 % \fi
10040 % \global\Headwordfalse^^A
10041 % \global\AncientNamefalse^^A
10042 % }
10043 % \makeatother
10044 % \renewcommand\MainNameHook{\AltOff}
10045 %
10046 % \newcommand\Headword{\Headwordtrue\ForgetThis}
10047 % \newcommand{\RefArticle}[2]
10048 % {\noindent\Headword #1 #2\medskip}
10049 %
10050 % \RefArticle{\AncientNametrue\Name{Aristotle}}{was the first to offer
10051 % a system of logic, most notably syllogistic logic, that would
10052 % become the basis for discrete states and circuitry of
10053 % digital computers. \Name{Aristotle}\dots}
10054 %
10055 % \RefArticle{\Name[Charles]{\noexpand\textBF{Babbage}}}{designed and
10056 % built the Difference Engine and began work on the Analytical
10057 % Engine. \Name[Charles]{\noexpand\textBF{Babbage}}\dots}
10058 %
10059 % \RefArticle{\Name{\noexpand\textUC{Kanade}, Takeo}}{is one of the
10060 % foremost pioneers in the field of computer vision.
10061 % \Name{\noexpand\textUC{Kanade}, Takeo}\dots}
10062 %
10063 % \RefArticle{\Name[Ada]{\noexpand\textIT{Lovelace}}}{collaborated with
10064 % \Name*[Charles]{\noexpand\textBF{Babbage}}* and wrote what some
10065 % consider to be the first computer program for the Analytical
10066 % Engine. \Name[Ada]{\noexpand\textIT{Lovelace}}\dots}
10067 % \end{Quote}
10068 %
10069 % \begin{AltFormatZone}
10070 % \renewcommand*\NamesFormat{\color{blue}\sffamily}
10071 % \renewcommand*\MainNameHook{\sffamily}
10072 % \begin{Quotation}{\Shak}
10073 % {``Romeo and Juliet'', Act II, Scene II (published 1597)}
10074 % `Tis but thy name that is my enemy;\\
10075 % Thou art thyself, though not a Montague.\\
10076 % What’s Montague? It is nor hand, nor foot,\\
10077 % Nor arm, nor face. O, be some other name\\
10078 % Belonging to a man.\\
10079 % What's in a name? That which we call a rose\\
10080 % By any other name would smell as sweet;\\
10081 % So Romeo would, were he not Romeo call'd,\\
10082 % Retain that dear perfection which he owes\\
10083 % Without that title. Romeo, doff thy name,\\
10084 % And for that name which is no part of thee\\
10085 % Take all myself.
10086 % \index{creatives, quotes of\noexpand\string|hyperpage}
10087 % \index{Rose, references to\noexpand\string|hyperpage}
10088 % \end{Quotation}
10089 % \end{AltFormatZone}
10090 %
10091 % \newpage
10092 %
10093 % \subsubsection{Marginalia}
10094 %
10095 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test11_10.tex}\else
10096 % \edef\NameauthTestFile{\jobname.tmp}\fi
10097 %^^A
10098 % \begin{VerbatimOut}{\NameauthTestFile}
10099 % \documentclass{article}
10100 % \input{compat.tex} % Included with nameauth for compatibility.
10101 % \usepackage{makeidx}
10102 % \usepackage[altformat]{nameauth}
10103 %
10104 % \makeindex
10105 %
10106 % % Global Boolean flags need to be defined only once.
10107 % \newif\ifSpecialFN
10108 % \newif\ifSpecialSN
10109 % \newif\ifRevertSN
10110 %
10111 % % Name variant macros must be defined for each name.
10112 % % For a long name, we want to use ``William'' in the text
10113 % % and ``Wm.'' in the margin.
10114 %
10115 % \newcommand*\WM{\ifSpecialFN Wm.\else William\fi}
10116 %
10117 % % The first surname use will be ``Shakespeare'', but ``the
10118 % % Bard'' thereafter. We allow for alternate caps.
10119 % % We can get ``Shakespeare'' thereafter by toggling a flag.
10120 %
10121 % \newcommand*\SHK
10122 % {%
10123 % \ifRevertSN
10124 % \textSC{Shakespeare}\else
10125 % \ifSpecialSN
10126 % \noexpand\AltCaps{t}he Bard\else
10127 % \textSC{Shakespeare}%
10128 % \fi
10129 % \fi
10130 % }
10131 %
10132 % % Here is how we toggle that flag.
10133 % \newcommand*\Revert{\RevertSNtrue}
10134 %
10135 % % Quick interface name definition:
10136 % \begin{nameauth}
10137 % \< Shak & \noexpand\WM & \noexpand\SHK & >
10138 % \end{nameauth}
10139 %
10140 % % Sorting and tagging the name:
10141 % \PretagName[\noexpand\WM]{\noexpand\SHK}
10142 % {Shakespeare, William}
10143 % \PretagName[Robert]{\textSC{Burns}}{Burns, Robert}
10144 %
10145 % \makeatletter
10146 % \renewcommand*\NamesFormat[1]
10147 % {%
10148 % \RevertSNfalse\SpecialFNfalse\SpecialSNfalse%
10149 % #1%
10150 % \unless\ifinner
10151 % \marginpar
10152 % {%
10153 % \footnotesize\raggedleft%
10154 % \SpecialFNtrue\SpecialSNfalse%
10155 % \NameParser%
10156 % }%
10157 % \fi
10158 % \global\RevertSNfalse%
10159 % }
10160 %
10161 % \renewcommand*\MainNameHook[1]
10162 % {%
10163 % \AltOff\SpecialFNfalse\SpecialSNtrue%
10164 % #1%
10165 % \unless\ifinner
10166 % \unless\ifRevertSN
10167 % \marginpar
10168 % {%
10169 % \footnotesize\raggedleft%
10170 % \SpecialFNfalse\SpecialSNfalse%
10171 % \NameParser%
10172 % }%
10173 % \fi
10174 % \fi
10175 % \global\RevertSNfalse%
10176 % }
10177 % \makeatother
10178 %
10179 % \begin{document}
10180 %
10181 % \ForgetThis\Shak\ is the national poet of England
10182 % in much the same way that \Name[Robert]{\textSC{Burns}}
10183 % is that of Scotland. With the latter's rise of influence
10184 % in the 1800s, \Revert\Shak\ became known as ``\Shak''.
10185 %
10186 % \printindex
10187 % \end{document}
10188 % \end{VerbatimOut}
10189 %^^A
10190 % This example further illustrates aspects of automation be it practical or not. We begin in the document preamble by defining Boolean flags and macros. As with Roman names, their default values produce the name form in the index entry.
10191 %
10192 % The default name form aligns with the default Boolean flag setting: false. All non-default values and expansions of these macros occur only in the formatting hooks. This design helps to prevent spurious index entries.
10193 %
10194 % We must use \cmd{\PretagName} to sort the names in the index. \cmd{\Revert} is used to print a specific form of the surname (via the macros in the naming arguments) as well as suppressing the margin note (via the formatting hooks). Thus we show a complex interplay between syntactic name forms and typographic name formatting.
10195 % \begin{Quote}
10196 % \VerbatimInput[gobble=0,lastline=41]{\NameauthTestFile}
10197 %
10198 % \newpage
10199 %
10200 % \VerbatimInput[gobble=0,firstline=42, lastline=46]{\NameauthTestFile}
10201 % \end{Quote}
10202 %
10203 % Next we define the two formatting hooks that govern changes in the text. We force \cmd{\NamesFormat} to print only the default name via \cmd{\RevertSNfalse}, \cmd{\SpecialFNfalse}, and \cmd{\SpecialSNfalse}. \cmd{\MainNameHook} disables alternate formatting with \cmd{\AltOff}, but it allows variant name forms.
10204 %
10205 % Macros in the name arguments take the role usually played by internal Boolean flags. In the hooks we print the default name in the body text. If allowed, we print a margin paragraph with an alternate full name using \cmd{\NameParser}. Both hooks set \cmd{\RevertSNfalse} on exit, so that \cmd{\Revert} works on a per-name basis.
10206 %^^A
10207 % \makeatletter
10208 % \renewcommand*\NamesFormat[1]
10209 % {^^A
10210 % \RevertSNfalse\SpecialFNfalse\SpecialSNfalse^^A
10211 % #1^^A
10212 % \unless\ifinner
10213 % \marginpar
10214 % {^^A
10215 % \footnotesize\raggedleft^^A
10216 % \SpecialFNtrue\SpecialSNfalse^^A
10217 % \NameParser^^A
10218 % }^^A
10219 % \fi
10220 % \global\RevertSNfalse^^A
10221 % }
10222 % \renewcommand*\MainNameHook[1]
10223 % {^^A
10224 % \AltOff\SpecialFNfalse\SpecialSNtrue^^A
10225 % #1^^A
10226 % \unless\ifinner
10227 % \unless\ifRevertSN
10228 % \marginpar
10229 % {^^A
10230 % \footnotesize\raggedleft^^A
10231 % \SpecialFNfalse\SpecialSNfalse^^A
10232 % \NameParser^^A
10233 % }^^A
10234 % \fi
10235 % \fi
10236 % \global\RevertSNfalse^^A
10237 % }
10238 % \makeatother
10239 % \begin{Quote}
10240 % \VerbatimInput[gobble=0,firstline=47, lastline=80]{\NameauthTestFile}
10241 %
10242 % \newpage
10243 %
10244 % \VerbatimInput[gobble=0,firstline=81]{\NameauthTestFile}
10245 %
10246 % \ForgetThis\Shak\ is the national poet of England
10247 % in much the same way that \Name[Robert]{\textSC{Burns}}
10248 % is that of Scotland. With the latter's rise of influence
10249 % in the 1800s, \Revert\Shak\ became known as ``\Shak''.
10250 % \end{Quote}
10251 % \endgroup^^A Local format hook redefinition
10252 %
10253 % \subsection{Advanced Customization}
10254 % \label{sec:AdvCustomize}
10255 %
10256 % Here we discuss customization and adding features. We set aside the formatting in this manual, using alternate formatting for much of this section.
10257 %
10258 % \begingroup^^A Local format hook redefinition
10259 %
10260 % \subsubsection[Using Internals]{Using Package Internals}
10261 %
10262 % We start with alternate formatting (Section~\ref{sec:AltFormat}), changing the ``back-end'' macros to our custom code. Here, we need only check \texttt{\textbackslash if@nameauth@DoAlt}, which is toggled by \cmd{\AltOn} and \cmd{\AltOff}.
10263 % Instead of using \cmd{\textSC} and friends, we define a new macro that works in similar fashion. \cmd{\Fbox} draws a frame around the name:
10264 %^^A
10265 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test13_01.tex}\else
10266 % \edef\NameauthTestFile{\jobname.tmp}\fi
10267 %^^A
10268 % \begin{VerbatimOut}{\NameauthTestFile}
10269 % \documentclass{article}
10270 % \input{compat.tex} % Included with nameauth for compatibility.
10271 % \usepackage{makeidx}
10272 % \usepackage[altformat]{nameauth}
10273 %
10274 % \makeindex
10275 %
10276 % % Alternate formatting macro definition
10277 % \makeatletter
10278 % \newcommand*\Fbox[1]{%
10279 % \if@nameauth@DoAlt\protect\fbox{#1}\else#1\fi
10280 % }
10281 % \makeatother
10282 %
10283 % % Quick interface definition
10284 % \begin{nameauth}
10285 % \< deSmet & Pierre-Jean &
10286 % \noexpand\Fbox{\noexpand\AltCaps{d}e~Smet} & >
10287 % \end{nameauth}
10288 %
10289 % % Sorting and tagging
10290 % \PretagName[Pierre-Jean]%
10291 % {\noexpand\Fbox{\noexpand\AltCaps{d}e~Smet}}%
10292 % {de~Smet, Pierre-Jean}
10293 %
10294 % \renewcommand*\MainNameHook{\AltOff}
10295 % \renewcommand*\FrontNameHook{\AltOff}
10296 %
10297 % \begin{document}
10298 %
10299 % \deSmet\ was a Jesuit missionary who arrived in North
10300 % America in 1821 at the age of twenty, after a year of seminary
10301 % education. \CapThis\deSmet\ was ordained in 1827 and worked
10302 % among American Indian nations after 1837. We can show the forms
10303 % \LdeSmet\ and \SdeSmet.
10304 %
10305 % \printindex
10306 % \end{document}
10307 % \end{VerbatimOut}
10308 %^^A
10309 % \begin{Quote}
10310 % \VerbatimInput[gobble=0,lastline=14]{\NameauthTestFile}
10311 % \end{Quote}
10312 %
10313 % Since \cmd{\AltCaps} is part of \textsf{nameauth}, one need not reinvent that wheel. Just use it in the name arguments and sorting macros:
10314 % \begin{Quote}
10315 % \VerbatimInput[gobble=0,firstline=15,lastline=25]{\NameauthTestFile}
10316 % \end{Quote}
10317 %
10318 % \makeatletter
10319 % \newcommand*\Fbox[1]{^^A
10320 % \if@nameauth@DoAlt\protect\fbox{#1}\else#1\fi
10321 % }^^A
10322 % \makeatother
10323 % \renewcommand*\MainNameHook{\AltOff}
10324 % \renewcommand*\FrontNameHook{\AltOff}
10325 %
10326 % The final step is redefining the hooks, which can be quite simple:
10327 % \begin{Quote}
10328 % \VerbatimInput[gobble=0,firstline=26]{\NameauthTestFile}
10329 %
10330 % \deSmet\ was a Jesuit missionary who arrived in North
10331 % America in 1821 at the age of twenty, after a year of seminary
10332 % education. \CapThis\deSmet\ was ordained in 1827 and worked
10333 % among American Indian nations after 1837. We can show the forms
10334 % \LdeSmet\ and \SdeSmet.
10335 % \end{Quote}
10336 %
10337 % \endgroup^^A Local format hook redefinition
10338 %
10339 % \subsubsection[Name Hooks]{Using Name Hooks}
10340 % \label{sec:FullCustomize}
10341 %
10342 % \begingroup^^A Local format hook redefinition
10343 %
10344 % One can redesign or augment the core naming macros that handle regular, long, and short names, then hook those changes into the core name engine. It should be obvious that such changes could break \textsf{nameauth} if not done carefully. These macros are set by default to \cmd{\@nameauth@Name}, the internal name parser.
10345 % \begin{itemize}
10346 % \item \DescribeMacro{\NameauthName}\cmd{\Name}, or an unmodified shorthand, calls \cmd{\NameauthName}.
10347 %
10348 % \item \DescribeMacro{\NameauthLName}\cmd{\Name*}, or an L-shorthand, sets \cmd{\@nameauth@FullNametrue}, then calls \cmd{\NameauthLName}.
10349 %
10350 % \item \DescribeMacro{\NameauthFName}\cmd{\FName}, or an S-shorthand, sets \cmd{\@nameauth@FirstNametrue}, then calls \cmd{\NameauthFName}.
10351 % \end{itemize}
10352 %
10353 % \begin{InfoBox}
10354 % One should not modify \cmd{\Name} and \cmd{\FName} directly.
10355 % \end{InfoBox}
10356 %
10357 % \subsubsection*{\hfil Names In Boxes}
10358 %
10359 % Since \textsf{nameauth} uses \textsf{xparse}, the next examples use it also. Here we look at decoration in the sense of putting a name into something around it. This could be useful if, in certain parts of a document, one wanted to turn names into hyperlinks or some other kind of feature. Here we simply put names into colored boxes.\footnote{After the parsed and formatted name is printed in the body text, the internal macros \emph{globally} set \cmd{\@nameauth@FullNamefalse} and \cmd{\@nameauth@FirstNamefalse}, as well as other flags related to the prefix macros. This prevents certain cases of undocumented behavior in versions of \textsf{nameauth} before 3.3, where resetting flags locally could cause unexpected name forms. If an existing document leverages the local resetting of flags, one can use the \texttt{oldreset} option.}
10360 %
10361 % \Global These macros can be redefined or used locally within a scope without making global changes to the document unless you specifically use \cmd{\global}.
10362 %
10363 % \newpage
10364 %
10365 % \ifdefined\NameauthDoTestFiles \edef\NameauthTestFile{test13_02.tex}\else
10366 % \edef\NameauthTestFile{\jobname.tmp}\fi
10367 %^^A
10368 % \begin{VerbatimOut}{\NameauthTestFile}
10369 % \documentclass{article}
10370 % \input{compat.tex} % Included with nameauth for compatibility.
10371 % \usepackage{makeidx}
10372 % \usepackage[altformat]{nameauth}
10373 % \usepackage{xcolor}
10374 %
10375 % \makeindex
10376 %
10377 % \makeatletter
10378 % % Change the general-case name macro to show
10379 % % a name in a framed, colored box.
10380 %
10381 % \NewDocumentCommand{\MyName}{O{} m O{}}
10382 % {\fcolorbox{black}{gray!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
10383 %
10384 % % Likewise change the macro for when names are forced long.
10385 % \NewDocumentCommand{\MyLName}{O{} m O{}}
10386 % {\fcolorbox{black}{green!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
10387 %
10388 % % Likewise change the macro when personal names are desired.
10389 % \NewDocumentCommand{\MyFName}{O{} m O{}}
10390 % {\fcolorbox{black}{yellow!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
10391 % \makeatother
10392 %
10393 % % Change the formatting hooks, but do not use alternate.
10394 % % formatting, which is separate from the customization above.
10395 % \renewcommand*\NamesFormat{\scshape}
10396 % \renewcommand*\MainNameHook{}
10397 %
10398 % % Change the naming macro hooks.
10399 % \renewcommand*\NameauthName{\MyName}
10400 % \renewcommand*\NameauthLName{\MyLName}
10401 % \renewcommand*\NameauthFName{\MyFName}
10402 %
10403 % \begin{document}
10404 %
10405 % \ForgetThis\Name[Adolf]{Harnack} was a theologian who stressed
10406 % the Fatherhood of God and the brotherhood of man.
10407 % \Name[Adolf]{Harnack} flourished in the early twentieth
10408 % century; \Name*[Adolf]{Harnack}[Adolf von]; \FName[Adolf]{Harnack}.
10409 %
10410 % \printindex
10411 % \end{document}
10412 % \end{VerbatimOut}
10413 %^^A
10414 % \begin{Quote}
10415 % \VerbatimInput[gobble=0]{\NameauthTestFile}
10416 %
10417 % \makeatletter
10418 % \NewDocumentCommand{\MyName}{O{} m O{}}
10419 % {\fcolorbox{black}{gray!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
10420 %
10421 % \NewDocumentCommand{\MyLName}{O{} m O{}}
10422 % {\fcolorbox{black}{green!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
10423 %
10424 % \NewDocumentCommand{\MyFName}{O{} m O{}}
10425 % {\fcolorbox{black}{yellow!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
10426 % \makeatother
10427 %
10428 % \renewcommand*\NamesFormat{\scshape}
10429 % \renewcommand*\MainNameHook{}
10430 % \renewcommand*\NameauthName{\MyName}
10431 % \renewcommand*\NameauthLName{\MyLName}
10432 % \renewcommand*\NameauthFName{\MyFName}
10433 %
10434 % \ForgetThis\Name[Adolf]{Harnack} was a theologian who stressed
10435 % the Fatherhood of God and the brotherhood of man.
10436 % \Name[Adolf]{Harnack} flourished in the early twentieth
10437 % century; \Name*[Adolf]{Harnack}[Adolf von]; \FName[Adolf]{Harnack}.
10438 % \end{Quote}
10439 % \endgroup^^A Local format hook redefinition
10440 %
10441 % \begingroup
10442 % \renewcommand*\NamesFormat{\color{blue}\sffamily}
10443 % \renewcommand*\MainNameHook{\sffamily}
10444 % \begin{Quotation}{\Name[Mark]{Twain}}
10445 % {\Title{The Innocents Abroad} (1869)}
10446 % Virtue never has been as respectable as money.
10447 % \index{creatives, quotes of\noexpand\string|hyperpage}
10448 % \end{Quotation}
10449 % \endgroup
10450 %
10451 % \newpage
10452 %
10453 % \begingroup^^A Local format hook redefinition
10454 %
10455 % \subsubsection*{\hfil Change Parsing}
10456 %
10457 % Section~\ref{sec:FinalOptargs} discussed final optional arguments. Here we use \textsf{xparse} to change the default behavior of optional arguments, but only for \TeX\ distros since May 2018.
10458 %^^A
10459 % \begin{VerbatimOut}{\jobname.tmp}
10460 % \makeatletter
10461 % \@ifl@t@r\fmtversion{2018/04/30}{\newcommand\nameauthxp{}}{}
10462 %
10463 % \ifdefined\nameauthxp
10464 % \NewDocumentCommand{\MyName}{O{} m !O{}}
10465 % {\@nameauth@Name[#1]{#2}[#3]}
10466 % \else
10467 % \NewDocumentCommand{\MyName}{O{} m O{}}
10468 % {\@nameauth@Name[#1]{#2}[#3]}
10469 % \fi
10470 % \makeatother
10471 %
10472 % \let\NameauthName\MyName
10473 % \let\NameauthLName\MyName
10474 % \let\NameauthFName\MyName
10475 % \ForgetName[Albert]{Einstein}
10476 % \ForgetName{Miyazaki, Hayao}
10477 %
10478 % We want: ``Albert Einstein [first] spoke about physics.
10479 % Miyazaki Hayao [later] spoke about animation.
10480 % Einstein [first] spoke about physics.
10481 % Miyazaki [later] spoke about animation.''
10482 %
10483 % We get: ``\Name[Albert]{Einstein} [first] spoke about physics.
10484 % \Name{Miyazaki, Hayao} [later] spoke about animation.
10485 % \Name[Albert]{Einstein} [first] spoke about physics.
10486 % \Name{Miyazaki, Hayao} [later] spoke about animation.''
10487 % \end{VerbatimOut}
10488 %^^A
10489 % \begin{Quote}
10490 %^^A Display the appropriate verbatim text above.
10491 % \VerbatimInput[gobble=0]{\jobname.tmp}
10492 %^^A Redefine formatting macros.
10493 % \renewcommand\NamesFormat{}
10494 % \renewcommand\MainNameHook{}
10495 %
10496 % \makeatletter
10497 % \ifdefined\nameauthxp
10498 % \NewDocumentCommand{\MyName}{O{} m !O{}}
10499 % {\@nameauth@Name[#1]{#2}[#3]}
10500 % \else
10501 % \NewDocumentCommand{\MyName}{O{} m O{}}
10502 % {\@nameauth@Name[#1]{#2}[#3]}
10503 % \fi
10504 % \makeatother
10505 %
10506 % \let\NameauthName\MyName
10507 % \let\NameauthLName\MyName
10508 % \let\NameauthFName\MyName
10509 % \ForgetName[Albert]{Einstein}
10510 % \ForgetName{Miyazaki, Hayao}
10511 %
10512 % We want: ``Albert Einstein [first] spoke about physics.
10513 % Miyazaki Hayao [later] spoke about animation.
10514 % Einstein [first] spoke about physics.
10515 % Miyazaki [later] spoke about animation.''
10516 %
10517 % We get: ``\Name[Albert]{Einstein} [first] spoke about physics.
10518 % \Name{Miyazaki, Hayao} [later] spoke about animation.
10519 % \Name[Albert]{Einstein} [first] spoke about physics.
10520 % \Name{Miyazaki, Hayao} [later] spoke about animation.''
10521 % \end{Quote}
10522 %
10523 % \endgroup^^A Local format hook redefinition
10524 %
10525 % \ReturnLink
10526 %
10527 % \end{AltFormatZone}
10528 % \Info{\hrule\strut We end a big region of alternate formatting\strut\hrule}
10529 %
10530 % \begingroup
10531 % \renewcommand*\NamesFormat[1]{\color{blue}\sffamily #1}
10532 % \renewcommand*\MainNameHook[1]{\sffamily #1}
10533 % \begin{Quotation}{\Name[Herbert]{Hoover}}
10534 % {\Title{American Individualism} (1922)}
10535 % \textls[-5]{Now, as the storm of war, of revolution and of emotion
10536 % subsides there is left even with us of the United States much unrest,
10537 % much discontent with the surer forces of human advancement. To all of
10538 % us, out of this crucible of actual, poignant, individual experience
10539 % has come a deal of new understanding, and it is for all of us to ponder
10540 % these new currents if we are to shape our future with intelligence.}
10541 % \index{politicians, quotes of\noexpand\string|hyperpage}
10542 % \end{Quotation}
10543 % \endgroup
10544 %
10545 % \newpage
10546 %
10547 % \section{Obsolete Features}
10548 % \label{sec:OldStuff}
10549 %
10550 % \begin{InfoBox}[General Hook Redefinition]
10551 % \VerbatimInput[gobble=0,numbers=none,fontsize=\small]{manhook.tmp}
10552 % \end{InfoBox}
10553 %
10554 % \input{manhook.tmp}
10555 %
10556 % \subsection[Pseudonyms]{Pseudonym Macros}
10557 % \label{sec:AKA}
10558 %
10559 % The macros described in this section are early features of \textsf{nameauth}. They do not work like other macros that display names. They remain only for backward compatibility, but will not be developed further.
10560 %
10561 % \subsubsection*{\hfil Special Syntax}
10562 %
10563 % To save space, we show \meta{SAFX} as the equivalent of \meta{SNN\textbf{,}Affix}. The macros in this section all take arguments of the form:
10564 %
10565 % \begin{SyntaxBoxii}
10566 % Target Name & Cross-Reference Name\\\midrule
10567 % \oarg{FNN}\marg{SAFX} & \oarg{xref FNN}\marg
10568 % {xref SAFX}\oarg{xref Alt.}\\
10569 % \end{SyntaxBoxii}
10570 %
10571 % \begin{itemize}
10572 % \item The target name comes first, which is the \emph{opposite} of \cmd{\IndexRef}. There the target name comes last because it is text passed to the index macros.
10573 %
10574 % \item The cross-reference comes last to allow for the widest range of name forms (again, the opposite of \cmd{\IndexRef}). We avoid two optional arguments in succession by preventing the target from having a final optional argument. Neither \meta{Alt.} nor the obsolete syntax can be used with the target name. Both can be used with the cross-reference.
10575 %
10576 % \item \meta{SAFX} and \meta{xref SAFX} can have comma-delimited suffixes.
10577 %
10578 % \item One cannot use \cmd{\TagName} with a cross-reference, but one can sort a cross-reference with \cmd{\PretagName} (Section~\ref{sec:IndexSort}).
10579 % \end{itemize}
10580 %
10581 % This syntax can produce results in the text that can look legitimate, yet the index entries are wrong due to confusion. The normal name arguments make it easier to determine name forms. For example,
10582 % \IndexInactive
10583 % \begin{itemize}
10584 % \item We see \PName*{William, I}[William]{the Conqueror} in the text.
10585 % \item |\PName*{William, I}[William]{the Conqueror}|
10586 % \item The syntax obfuscates the fact that the xref has a Western form.
10587 % \item The index is wrong: ``\ShowIdxPageref*[William]{the Conqueror} \textit{see} \ShowIdxPageref*{William, I}''
10588 % \end{itemize}
10589 % \IndexActive
10590 %
10591 % \newpage
10592 %
10593 % \subsubsection*{\hfil The Macros}
10594 %
10595 % \DescribeMacro{\AKA}
10596 % The \emph{also known as} macro and its starred form display an alias in the text and create a cross-reference in the index.
10597 % \DescribeMacro{\AKA*}
10598 % They format names differently than the naming macros because they use the name patterns for cross-references as a means to account for the name forms that they print in the test.
10599 %
10600 % \begin{SyntaxBox}
10601 % \small\cmd{\AKA\ }\oarg{FNN}\marg{SAFX}\oarg{xref FNN}\marg
10602 % {xref SAFX}\oarg{xref Alt.}\\
10603 % \small\cmd{\AKA*}\oarg{FNN}\marg{SAFX}\oarg{xref FNN}\marg
10604 % {xref SAFX}\oarg{xref Alt.}\\
10605 % \end{SyntaxBox}
10606 %
10607 % \begin{itemize}
10608 % \item Both macros create a cross-reference in the index to the target name.
10609 %
10610 % \item \cmd{\AKA} prints a long form of the cross-reference name in the text. \cmd{\SeeAlso} works with \cmd{\AKA}, \cmd{\AKA*}, \cmd{\PName}, and \cmd{\PName*}.
10611 %
10612 % \item If \meta{xref Alt.} is present in a Western name form, then instead of \meta{xref FNN}, \meta{xref Alt.} will be printed in the text.
10613 %
10614 % \item If \meta{xref Alt.} is present in a Non-Western name form, then instead of \meta{xref Affix} (if present), \meta{xref Alt.} will be printed in the text.
10615 %
10616 % \item If \meta{xref Alt.} is present without either \meta{xref FNN} or \meta{xref Affix}, the obsolete syntax is used only with the xref.
10617 %
10618 % \item \cmd{\AKA*} is analogous to \cmd{\FName}. \cmd{\ForceFN} works with it. The \texttt{oldAKA} option implies \cmd{\ForceFN} with every use of \cmd{\AKA*}.
10619 %
10620 % \item \cmd{\AKA}, \cmd{\AKA*}, \cmd{\PName*}, and \cmd{\PName*} do not permit the effects of \cmd{\ForgetThis} and \cmd{\SubvertThis} to ``pass through'' because they produce output in the text. The \texttt{oldreset} option negates this.
10621 % \end{itemize}
10622 %
10623 % Below we make cross-references to \Name[Bob]{Hope} \cmd{\Name[Bob]\{Hope\}}; all of the forms listed create the cross-reference ``\ShowIdxPageref*[Leslie Townes]{Hope} \textit{see} \ShowIdxPageref*[Bob]{Hope}''.
10624 % \begin{Block}
10625 % \PatInfo[3ex]{\ShowPattern[Bob]{Hope}!MN\break
10626 % \ShowPattern[Leslie Townes]{Hope}!PN}
10627 % \AKA[Bob]{Hope}[Leslie Townes]{Hope}\dotfill^^A
10628 % |\AKA[Bob]{Hope}[Leslie Townes]{Hope}|\\
10629 % \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}\dotfill^^A
10630 % |\RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}|\\
10631 % \AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]\dotfill^^A
10632 % |\AKA[Bob]{Hope}[Leslie Townes]{Hope}[Lester T.]|\\
10633 % \AKA*[Bob]{Hope}[Leslie Townes]{Hope}\dotfill^^A
10634 % |\AKA*[Bob]{Hope}[Leslie Townes]{Hope}|\\
10635 % \AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester]\dotfill^^A
10636 % |\AKA*[Bob]{Hope}[Leslie Townes]{Hope}[Lester]|
10637 % \end{Block}
10638 %
10639 % Using these macros with Roman names and other specialized names likely will produce unsatisfactory results. Below we display other name forms after referring to some names to ensure that they have sensible page entries:
10640 % \PatInfo[4ex]{\ShowPattern{Louis, XIV}!MN\break
10641 % \ShowPattern{Lao-tzu}!MN\break
10642 % \ShowPattern[Lafcadio]{Hearn}!MN\break
10643 % \ShowPattern[Charles]{du~Fresne}!MN\break
10644 % \ShowPattern{Sun King}!PN\break
10645 % \ShowPattern{Li, Er}!PN\break
10646 % \ShowPattern{du~Cange}!PN\break
10647 % \ShowPattern{Koizumi, Yakumo}!PN}
10648 % \begin{Quote}
10649 % \begin{tabular}{@{}ll}
10650 % \ForgetThis\Name{Louis, XIV}&
10651 % |\ForgetThis\Name{Louis, XIV}|\\
10652 % \Name{Lao-tzu} & |\Name{Lao-tzu}|\\
10653 % \Name[Lafcadio]{Hearn} & |\Name[Lafcadio]{Hearn}|\\
10654 % \Name[Charles]{du~Fresne}&
10655 % |\Name[Charles]{du~Fresne}|\\
10656 % \end{tabular}
10657 % \end{Quote}
10658 % Caps and reversing macros work on the arguments that are printed
10659 % in the text.
10660 % \begin{Block}
10661 % \AKA{Louis, XIV}{Sun King}\dotfill^^A
10662 % |\AKA{Louis, XIV}{Sun King}|\\
10663 % \AKA{Lao-tzu}{Li, Er}\dotfill^^A
10664 % |\AKA{Lao-tzu}{Li, Er}|\\
10665 % \AKA[Charles]{du~Fresne}{du~Cange}\dotfill^^A
10666 % |\AKA[Charles]{du~Fresne}{du~Cange}|\\
10667 % \CapThis\AKA[Charles]{du~Fresne}{du~Cange}\dotfill^^A
10668 % |\CapThis\AKA[Charles]{du~Fresne}{du~Cange}|\\
10669 % \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}\dotfill^^A
10670 % |\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|\\
10671 % \RevName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}\dotfill^^A
10672 % |\RevName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|\\
10673 % \ForceFN\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}\dotfill^^A
10674 % |\ForceFN\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|
10675 % \end{Block}
10676 %
10677 % \DescribeMacro{\PName}
10678 % These convenience macros were an early feature of \textsf{nameauth}. They print a main name followed by a cross-reference in parentheses.
10679 % \DescribeMacro{\PName*}
10680 % If one is inclined to view \cmd{\AKA} as quirky rubbish, these two macros are a dumpster fire.
10681 % \begin{SyntaxBox}
10682 % \small\cmd{\PName\ }\oarg{FNN}\marg{SAFX}\oarg{xref\,FNN}\marg
10683 % {xref\,SAFX}\oarg{xref\,Alt.}\\
10684 % \small\cmd{\PName*}\oarg{FNN}\marg{SAFX}\oarg{xref\,FNN}\marg
10685 % {xref\,SAFX}\oarg{xref\,Alt.}\\
10686 % \end{SyntaxBox}
10687 %
10688 % \cmd{\PName*} is like \cmd{\Name*} to the extent that it prints a long form of \meta{FNN}\meta{SAFX}. It does not affect the cross-reference \meta{xref FNN}\meta{xref SAFX}\meta{xref Alt.}.
10689 % \begin{itemize}
10690 % \item Most prefix macros only affect \meta{FNN}\meta{SAFX}, not the cross-reference.
10691 %
10692 % \item The cross-reference always has a long form.
10693 %
10694 % \item \cmd{\SkipIndex} keeps both names out of the index.
10695 %
10696 % \item \meta{Alt.} and the obsolete syntax work only with the cross-reference.
10697 % \end{itemize}
10698 % \ForgetName[Mark]{Twain}
10699 % \ForgetName{William, I}
10700 % \ForgetName{Lao-tzu}
10701 % \begin{Block}
10702 % \FUse \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
10703 % \LUse \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
10704 % \UseB |\PName[Mark]{Twain}[Samuel L.]{Clemens}|\\
10705 % \UseL \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\
10706 % \UseB |\PName*[Mark]{Twain}[Samuel L.]{Clemens}|
10707 %
10708 % \UseI \ShowIdxPageref*[Samuel L.]{Clemens} \textit{see}
10709 % \ShowIdxPageref*[Mark]{Twain}\medskip
10710 %
10711 % \FUse \ForgetThis\PName{Voltaire}[François-Marie]{Arouet}\\
10712 % \LUse \PName{Voltaire}[François-Marie]{Arouet}\\
10713 % \UseB |\PName{Voltaire}[François-Marie]{Arouet}|
10714 %
10715 % \UseI \ShowIdxPageref*[François-Marie]{Arouet} \textit{see}
10716 % \ShowIdxPageref*{Voltaire}\medskip
10717 %
10718 % \FUse \PName{William, I}{William, the Conqueror}\\
10719 % \LUse \PName{William, I}{William, the Conqueror}\\
10720 % \UseB |\PName{William, I}{William, the Conqueror}|\\
10721 % \UseL \PName*{William, I}{William, the Conqueror}\\
10722 % \UseB |\PName*{William, I}{William, the Conqueror}|
10723 %
10724 % \UseI \ShowIdxPageref*{William, the Conqueror} \textit{see}
10725 % \ShowIdxPageref*{William, I}\medskip
10726 %
10727 % \FUse \PName{Bernard, of Clairvaux}
10728 % {\textit{Doctor mellifluus}}\\
10729 % \LUse \PName{Bernard, of Clairvaux}
10730 % {\textit{Doctor mellifluus}}\\
10731 % \UseB |\PName{Bernard, of Clairvaux}|\\
10732 % \UseB | {\textit{Doctor mellifluus}}|\\
10733 % \UseL \PName*{Bernard, of Clairvaux}
10734 % {\textit{Doctor mellifluus}}\\
10735 % \UseB |\PName*{Bernard, of Clairvaux}|\\
10736 % \UseB | {\textit{Doctor mellifluus}}|
10737 %
10738 % \UseI \ShowIdxPageref*{\textit{Doctor mellifluus}} \textit{see}
10739 % \ShowIdxPageref*{Bernard, of Clairvaux}\medskip
10740 %
10741 % \FUse \PName{Lao-tzu}{Li, Er}\\
10742 % \LUse \PName{Lao-tzu}{Li, Er}\\
10743 % \UseB |\PName{Lao-tzu}{Li, Er}|
10744 %
10745 % \UseI \ShowIdxPageref*{Li, Er} \textit{see} \ShowIdxPageref*{Lao-tzu}
10746 % \end{Block}
10747 %
10748 % \subsubsection*{\hfil Formatting Workarounds}
10749 %
10750 % These macros only use subsequent-use formatting hooks (Section~\ref{sec:Formatting}). When \cmd{\NamesFormat} was the only formatting hook, cross-references printed in the text were not formatted.
10751 %
10752 % \Info*{\small\texttt{formatAKA}}The \texttt{formatAKA} option permits \cmd{\ForceName} to force ``first-use'' formatting hooks, but under different conditions because the name patterns are in the cross-reference system (Section~\ref{sec:NamePatterns}). When using \texttt{formatAKA} we get:
10753 %
10754 % \begingroup
10755 % \makeatletter\@nameauth@AKAFormattrue\makeatother
10756 % \begin{itemize}
10757 % \global\NamesInactive
10758 % \item Front Matter
10759 % \PatInfo{\ShowPattern[Good Queen]{Bess}!PN}
10760 % \begin{itemize}\footnotesize
10761 % \item \AKA{Elizabeth,I}[Good Queen]{Bess}%^^A
10762 % \dotfill |\AKA{Elizabeth,I}[Good Queen]{Bess}|
10763 % \item \AKA{Elizabeth,I}[Good Queen]{Bess}%^^A
10764 % \dotfill |\AKA{Elizabeth,I}[Good Queen]{Bess}|
10765 % \end{itemize}
10766 %
10767 % \global\NamesActive
10768 % \item Main Matter
10769 % \begin{itemize}\footnotesize
10770 % \item \AKA{Elizabeth,I}[Good Queen]{Bess}%^^A
10771 % \dotfill |\AKA{Elizabeth,I}[Good Queen]{Bess}|
10772 % \item \ForceName%^^A
10773 % \AKA{Elizabeth,I}[Good Queen]{Bess}^^A
10774 % \dotfill |\ForceName\AKA{Elizabeth,I}[Good Queen]{Bess}|
10775 % \end{itemize}
10776 % \end{itemize}
10777 % \endgroup
10778 %
10779 % The first appearance of \AKA{Elizabeth,I}[Good Queen]{Bess} above uses \cmd{\FrontNamesFormat} as its formatting hook because it is the first occurrence of the alternate name in the front matter. After that, even though \AKA{Elizabeth,I}[Good Queen]{Bess} occurs for the first time in the main matter, it uses the subsequent-use \cmd{\MainNameHook} because we are using the cross-reference name patterns. We need to use \cmd{\ForceName}, which triggers the expected use of \cmd{\NamesFormat}, the first-use main-matter hook.
10780 %
10781 % \Info*{\small\texttt{alwaysformat}}We can use the \texttt{alwaysformat} option to force only the use of \cmd{\NamesFormat} and \cmd{\FrontNamesFormat}, but that can look like rubbish:
10782 % \begin{Quote}
10783 % \makeatletter\@nameauth@AlwaysFormattrue\makeatother
10784 % \ForgetThis\LEliz\ was known as ``\AKA{Elizabeth,I}[Good Queen]{Bess}''.
10785 % Again we mention Queen \Eliz, ``\AKA{Elizabeth, I}[Good Queen]{Bess}''.
10786 % Using \cmd{\ForceName}: \ForceName\AKA{Elizabeth, I}[Good Queen]{Bess}.
10787 % \end{Quote}
10788 %
10789 % \subsection{Obsolete Syntax}
10790 % \label{sec:Obsolete}
10791 %
10792 % This older version of the Non-Western syntax limits the use of alternate names and cross-references, prevents the use of comma-delimited names, and complicates indexing. It remains for backward compatibility.
10793 %
10794 % \begin{SyntaxBox}
10795 % \cmd{\Name}\marg{SNN}\oarg{Alternate}
10796 % \end{SyntaxBox}
10797 %
10798 % Unlike the comma-delimited \meta{SNN\textbf{,}Affix} pair, it was easy to implement the older syntax with \meta{Alternate}. This syntax created an unacceptable second-tier status, thus, the current syntax replaced it. We show this syntax only for the sake of completeness; we advise not to use it.
10799 % \begin{itemize}
10800 % \item One must \emph{leave empty} the first optional \meta{FNN} argument.
10801 %
10802 % \item One must \emph{never use} the comma-delimited argument \meta{Affix}.
10803 %
10804 % \item These names \emph{always use} \meta{Alternate}.
10805 %
10806 % \item \meta{Alternate} acts like \meta{Affix}. This is the only time that the \meta{Alternate} argument affects both name and index patterns (Section~\ref{sec:NamePatterns}).
10807 %
10808 % \item These names take the form \meta{SNN Alternate} in the index.
10809 % \end{itemize}
10810 % \begin{Quote}
10811 % \begin{Verbatim}
10812 % \Name{Henry}[VIII] % Ancient
10813 % \Name{Chiang}[Kai-shek] % Eastern
10814 % \begin{nameauth}
10815 % \< Dagb & & Dagobert & I > % Ancient
10816 % \< Yosh & & Yoshida & Shigeru > % Eastern
10817 % \< Fukuyama & &
10818 % \noexpand\textUC{Fukuyama} & Takeshi > % Alt. format
10819 % \end{nameauth}
10820 % \end{Verbatim}
10821 % \end{Quote}
10822 % \AltFormatActive
10823 % \begin{Quote}
10824 % After studying in the US during the 1930s, in 1954 Rev.
10825 % \Fukuyama\ddag\ \cmd{\Fukuyama}\cmd{\ddag} published
10826 % \Title{Nihon Fukuin R\=uteru Ky\=okai Shi} (History
10827 % of the Evangelical Lutheran Church in Japan).
10828 % \end{Quote}
10829 % \AltFormatInactive
10830 % \begin{Center}
10831 % \begin{tabular}{ll}\toprule
10832 % \rowcolor{nagrey}^^A
10833 % \ForgetThis\Name{Henry}[VIII]\ddag &
10834 % |\ForgetThis\Name{Henry}[VIII]\ddag|\\
10835 % \rowcolor{nagrey}^^A
10836 % \Name{Henry}[VIII]\ddag &
10837 % |\Name{Henry}[VIII]\ddag|\\
10838 %
10839 % \ForgetThis\Name{Chiang}[Kai-shek]\ddag &
10840 % |\ForgetThis\Name{Chiang}[Kai-shek]\ddag|\\
10841 % \Name{Chiang}[Kai-shek]\ddag &
10842 % |\Name{Chiang}[Kai-shek]\ddag|\\
10843 %
10844 % \rowcolor{nagrey}^^A
10845 % \Dagb\ddag & |\Dagb\ddag|\\
10846 % \rowcolor{nagrey}^^A
10847 % \Dagb\ddag & |\Dagb\ddag|\\
10848 %
10849 % \CapName\Yosh\ddag & |\CapName\Yosh\ddag|\\
10850 % \CapName\RevName\LYosh\ddag & |\CapName\RevName\LYosh\ddag|\\
10851 %
10852 % \rowcolor{nagrey}^^A
10853 % & |\AltFormatActive| \AltFormatActive\\
10854 % \rowcolor{nagrey}^^A
10855 % \ForgetThis\Fukuyama\ddag & |\ForgetThis\Fukuyama\ddag|\\
10856 % \rowcolor{nagrey}^^A
10857 % \Fukuyama\ddag & |\Fukuyama\ddag|\\
10858 % \rowcolor{nagrey}^^A
10859 % & |\AltFormatInactive| \AltFormatInactive\\\bottomrule
10860 % \end{tabular}
10861 % \end{Center}
10862 %
10863 % Regardless of its flaws, the obsolete syntax shares name patterns, index tags, name tags, and index entries with the current syntax:
10864 % \begin{Quote}
10865 % \begin{tabular}{@{}lll}
10866 % Obsolete syntax: & \ForgetThis\Name{Henry}[VIII]\ddag &
10867 % \cmd{\ForgetThis}\cmd{\Name\{Henry\}[VIII]}\cmd{\ddag}\\[1ex]
10868 % & \ShowPattern{Henry}[VIII] & \cmd{\ShowPattern\{Henry\}[VIII]}\\[1ex]
10869 % Current syntax: & \Name{Henry, VIII} & \cmd{\Name\{Henry, VIII\}}\\[1ex]
10870 % & \ShowPattern{Henry, VIII} & \cmd{\ShowPattern\{Henry, VIII\}}\\
10871 % \end{tabular}
10872 % \end{Quote}
10873 %
10874 % We do not expect people to use the obsolete syntax much anymore. Here we list more advantages to using the current syntax and avoiding the old.
10875 % \begin{itemize}
10876 % \item Only the newer syntax permits such variants:
10877 % \item[] \Name*{Henry, VIII}[Tudor]\dotfill \cmd{\Name*\{Henry, VIII\}[Tudor]}
10878 %
10879 % \item The proper form for the old syntax is, e.g.:
10880 % \item[] \Name*{Henry}[VIII]\dotfill \cmd{\Name*\{Henry\}[VIII]}
10881 %
10882 % \IndexInactive
10883 % \item Next we see malformed Western names:
10884 % \item[] \Name[Henry]{VIII}, \Name[Henry]{VIII}\dotfill \cmd{\Name[Henry]\{VIII\}}\\
10885 % \Name*[Henry]{VIII}[Tudor], \Name[Henry]{VIII}[Tudor]\dotfill^^A
10886 % \cmd{\Name*[Henry]\{VIII\}[Tudor]}
10887 % \item[] These malformed names have the same index entry\dotfill^^A
10888 % \ShowIdxPageref*[Henry]{VIII}
10889 % \IndexActive
10890 % \end{itemize}
10891 % If users want to receive warnings about this syntax, use the \emph{strictsyntax} option.
10892 %
10893 % \ReturnLink
10894 %
10895 % \newpage
10896 %
10897 % \StopEventually{^^A
10898 % \let\emph\oldemph
10899 % \newgeometry{textheight=239mm,left=20mm,right=20mm,nohead}
10900 % \IndexProtect
10901 % \GlossaryPrologue{\section{Change History}^^A
10902 % Minor changes, such as only to documentation and example files, are not shown.}
10903 % \PrintChanges
10904 % \newpage
10905 % \IndexPrologue{\section{Index}^^A
10906 % Page numbers in \emph{italic} refer to the page where the corresponding entry is \textbf{described.} Page numbers that are underlined refer to the \textbf{code line} of the definition. Unmodified roman page numbers are used by names and other entries in the documentation.}
10907 % \PrintIndex
10908 % }
10909 % \iffalse
10910 %<*package>
10911 % \fi
10912 %
10913 %^^A ----- Paragraph Skip Reset -----
10914 % \setlength{\parskip}{0pt plus 1pt}
10915 %
10916 % \section{Implementation}
10917 %
10918 % Both the manual and the package code follow a similar organization.
10919 %
10920 % \subsection{Boolean Flags}
10921 %
10922 % The \textsf{nameauth} package is a name parser and indexer. These flags
10923 % reflect its states.
10924 %
10925 % \subsubsection{Flow Control}
10926 %
10927 % \subsubsection*{\hfil Who Called Me?}
10928 %
10929 % Let name formatting macros in the core name engine know if they were
10930 % called by the naming macros or by the pseudonym macros.
10931 %
10932 % \begin{macrocode}
10933 \newif\if@nameauth@InAKA
10934 \newif\if@nameauth@InName
10935 % \end{macrocode}
10936 %
10937 % \subsubsection*{\hfil Core Macro Locks}
10938 %
10939 % \cmd{\@nameauth@Name}, \cmd{\AKA}, and macros that call them use
10940 % \texttt{\textbackslash if@nameauth@Lock} to avoid a stack overflow.
10941 % Setting \texttt{\textbackslash if@nameauth@BigLock} true will prevent
10942 % the core name engine from executing until the ``big lock'' is set false.
10943 %
10944 % \begin{macrocode}
10945 \newif\if@nameauth@Lock
10946 \newif\if@nameauth@BigLock
10947 % \end{macrocode}
10948 %
10949 % \subsubsection*{\hfil Formatting Hook Indicator}
10950 %
10951 % Tell alternate formatting control macros that they are in
10952 % a formatting hook.
10953 %
10954 % \begin{macrocode}
10955 \newif\if@nameauth@InHook
10956 % \end{macrocode}
10957 %
10958 % \subsubsection*{\hfil Core Name Engine Choices}
10959 %
10960 % \cmd{\JustIndex} toggles this flag, which makes the core name engine
10961 % act like \cmd{\IndexName}.
10962 %
10963 % \begin{macrocode}
10964 \newif\if@nameauth@JustIndex
10965 % \end{macrocode}
10966 % These two flags trigger \cmd{\ForgetName} and \cmd{\SubvertName}
10967 % within \cmd{\@nameauth@Name}.
10968 %
10969 % \begin{macrocode}
10970 \newif\if@nameauth@Forget
10971 \newif\if@nameauth@Subvert
10972 % \end{macrocode}
10973 %
10974 % \subsubsection[Syntax]{Name Grammar and Syntax}
10975 %
10976 % \subsubsection*{\hfil Strict Syntax}
10977 %
10978 % If this flag is true, one will get warnings when using the obsolete syntax.
10979 %
10980 % \begin{macrocode}
10981 \newif\if@nameauth@StrictSyntax
10982 % \end{macrocode}
10983 %
10984 % \subsubsection*{\hfil Name Types}
10985 %
10986 % These flags reflect the last name type evaluated by any macro that
10987 % takes name arguments. The first shows whether or not we have a Western
10988 % or Non-Western name. The second shows the kind of Non-Western
10989 % syntax used. They are not reset.
10990 %
10991 % \begin{macrocode}
10992 \newif\ifNameauthWestern
10993 \newif\ifNameauthObsolete
10994 % \end{macrocode}
10995 %
10996 % \subsubsection*{\hfil Show/Hide Affix Commas}
10997 %
10998 % The \texttt{comma} and \texttt{nocomma} options toggle the first
10999 % flag below. \cmd{\ShowComma} and \cmd{\NoComma} respectively toggle
11000 % the second and third.
11001 %
11002 % \begin{macrocode}
11003 \newif\if@nameauth@AlwaysComma
11004 \newif\if@nameauth@ShowComma
11005 \newif\if@nameauth@NoComma
11006 % \end{macrocode}
11007 %
11008 % \subsubsection*{\hfil Capitalize Entire Surnames}
11009 %
11010 % The first flag is global. The second is for individual names.
11011 %
11012 % \begin{macrocode}
11013 \newif\if@nameauth@AllCaps
11014 \newif\if@nameauth@AllThis
11015 % \end{macrocode}
11016 %
11017 % \subsubsection*{\hfil Reverse Name Order}
11018 %
11019 % These flags govern name reversing, first global, then for individual names.
11020 %
11021 % \begin{macrocode}
11022 \newif\if@nameauth@RevAll
11023 \newif\if@nameauth@RevThis
11024 % \end{macrocode}
11025 % These flags deals with Western names ordered
11026 % in a list according to surname.
11027 %
11028 % \begin{macrocode}
11029 \newif\if@nameauth@RevAllComma
11030 \newif\if@nameauth@RevThisComma
11031 % \end{macrocode}
11032 %
11033 % \subsubsection*{\hfil Full Stop Detection}
11034 %
11035 % This flag is used to prevent double full stops after a name
11036 % is displayed.
11037 %
11038 % \begin{macrocode}
11039 \newif\if@nameauth@Punct
11040 % \end{macrocode}
11041 %
11042 % \subsubsection*{\hfil Name Breaking}
11043 %
11044 % \cmd{\KeepAffix} toggles the first flag below, while \cmd{\KeepName}
11045 % toggles the second. Both affect the use of non-breaking spaces
11046 % in the text.
11047 %
11048 % \begin{macrocode}
11049 \newif\if@nameauth@NBSP
11050 \newif\if@nameauth@NBSPX
11051 % \end{macrocode}
11052 %
11053 % \subsubsection*{\hfil Long and Short Names}
11054 %
11055 % \texttt{\textbackslash if@nameauth@FullName} is true for a long
11056 % name form. \texttt{\textbackslash if@nameauth@FirstName} causes only
11057 % Western forenames or (potentially) Non-Western surnames to be displayed
11058 % when a shorter form is used.
11059 %
11060 % \texttt{\textbackslash if@nameauth@ShortSNN} works with
11061 % \cmd{\DropAffix} to suppress the affix of a Western name.
11062 % \texttt{\textbackslash if@nameauth@ForceAffix} toggles the display of
11063 % only the Western affix.
11064 % \texttt{\textbackslash if@nameauth@EastFN} forces the printing
11065 % of Eastern forenames via \cmd{\ForceFN}.
11066 %
11067 % \begin{macrocode}
11068 \newif\if@nameauth@FullName
11069 \newif\if@nameauth@FirstName
11070 \newif\if@nameauth@AltAKA
11071 \newif\if@nameauth@ShortSNN
11072 \newif\if@nameauth@ForceAffix
11073 \newif\if@nameauth@EastFN
11074 % \end{macrocode}
11075 %
11076 % \subsubsection{Debugging}
11077 %
11078 % When used with the index debugging macros, show complete index entries
11079 % in the text if true, otherwise show simple entries.
11080 %
11081 % \begin{macrocode}
11082 \newif\if@nameauth@LongIdxDebug
11083 % \end{macrocode}
11084 %
11085 % \subsubsection{Indexing}
11086 %
11087 % \subsubsection*{\hfil Toggle Indexing}
11088 %
11089 % The indexing flags permit or prevent name indexing and tags.
11090 % \cmd{\IndexActive} and \cmd{\IndexInctive} or the \texttt{index} and
11091 % \texttt{noindex} options toggle the first flag and \cmd{\SkipIndex}
11092 % toggles the second.
11093 %
11094 % \begin{macrocode}
11095 \newif\if@nameauth@DoIndex
11096 \newif\if@nameauth@SkipIndex
11097 % \end{macrocode}
11098 %
11099 % \subsubsection*{\hfil Toggle Index Sorting}
11100 %
11101 % Allow or prevent the insertion of index sort keys.
11102 %
11103 % \begin{macrocode}
11104 \newif\if@nameauth@Pretag
11105 % \end{macrocode}
11106 %
11107 % \subsubsection*{\hfil Verbose Index Warnings}
11108 %
11109 % Control the number of warnings concerning the index; default is terse.
11110 %
11111 % \begin{macrocode}
11112 \newif\if@nameauth@Verbose
11113 % \end{macrocode}
11114 %
11115 % \subsubsection*{\hfil Index Cross-References}
11116 %
11117 % Determine whether \cmd{\IndexRef} creates a \textit{see} reference
11118 % or a \textit{see also} reference.
11119 %
11120 % \begin{macrocode}
11121 \newif\if@nameauth@SeeAlso
11122 % \end{macrocode}
11123 %
11124 % \subsubsection[Formatting]{Formatting and Name Patterns}
11125 %
11126 % \subsubsection*{\hfil Choose Formatting System}
11127 %
11128 % \cmd{\NamesActive} and \cmd{\NamesInactive}, with the
11129 % \texttt{mainmatter} and \texttt{frontmatter} options, toggle
11130 % formatting hooks via \texttt{\textbackslash if@nameauth@MainFormat}.
11131 %
11132 % \begin{macrocode}
11133 \newif\if@nameauth@MainFormat
11134 % \end{macrocode}
11135 %
11136 % \subsubsection*{\hfil Modify Pseudonym Formatting}
11137 %
11138 % Permit \cmd{\AKA} and related macros to call the first-use formatting
11139 % hooks once.
11140 %
11141 % \begin{macrocode}
11142 \newif\if@nameauth@AKAFormat
11143 % \end{macrocode}
11144 %
11145 % \subsubsection*{\hfil Select Formatting Hooks}
11146 %
11147 % \texttt{\textbackslash if@nameauth@FirstFormat} triggers the first-use
11148 % hooks to be called; otherwise the second-use hooks are called.
11149 % Additionally, \texttt{\textbackslash if@nameauth@AlwaysFormat} forces
11150 % this true, except when \texttt{\textbackslash if@nameauth@AKAFormat}
11151 % is false.
11152 %
11153 % \begin{macrocode}
11154 \newif\if@nameauth@FirstFormat
11155 \newif\if@nameauth@AlwaysFormat
11156 % \end{macrocode}
11157 %
11158 % \subsubsection*{\hfil Caps and Alternate Formatting}
11159 %
11160 % The next flags deal with first-letter capitalization. \cmd{\CapThis}
11161 % sets the first Boolean value. The second is triggered by
11162 % \cmd{\@nameauth@UTFtest} when it encounters an active Unicode character.
11163 % The third is a fallback triggered by \cmd{\AccentCapThis}. The fourth
11164 % disables \cmd{\CapThis} for alternate formatting. The fifth toggles
11165 % alternate formatting within formatting hooks.
11166 %
11167 % \begin{macrocode}
11168 \newif\if@nameauth@DoCaps
11169 \newif\if@nameauth@UTF
11170 \newif\if@nameauth@Accent
11171 \newif\if@nameauth@AltFormat
11172 \newif\if@nameauth@DoAlt
11173 % \end{macrocode}
11174 %
11175 % \subsubsection{Name Decisions}
11176 %
11177 % \subsubsection*{\hfil Creating and Destroying Name Patterns}
11178 %
11179 % Restrict creation and destruction of name patters to the current
11180 % name system if true. Otherwise, work with both systems.
11181 %
11182 % \begin{macrocode}
11183 \newif\if@nameauth@LocalNames
11184 % \end{macrocode}
11185 %
11186 % \subsubsection*{\hfil Scope of Name Decision Macros}
11187 %
11188 % \cmd{\IfMainName}, \cmd{\IfFrontName}, and \cmd{\IfAKA} use
11189 % locally-scoped paths by default. When true, this flag causes these
11190 % macros to have global scope.
11191 %
11192 % \begin{macrocode}
11193 \newif\if@nameauth@GlobalScope
11194 % \end{macrocode}
11195 %
11196 % \subsubsection[Compatibility]{Version Compatibility}
11197 %
11198 % \texttt{\textbackslash if@nameauth@AltAKA} is toggled respectively
11199 % by \cmd{\AKA} and \cmd{\AKA*} to print a longer or shorter name.
11200 % \texttt{\textbackslash if@nameauth@OldAKA} forces the pre-3.0 behavior
11201 % of \cmd{\AKA*}.
11202 %
11203 % \begin{macrocode}
11204 \newif\if@nameauth@OldAKA
11205 % \end{macrocode}
11206 % Determine how strict to be with \textit{see} references.
11207 %
11208 % \begin{macrocode}
11209 \newif\if@nameauth@OldSee
11210 % \end{macrocode}
11211 % These flags are used only for backward compatibility. The first
11212 % determines how per-name flags are reset. The second affects the
11213 % behavior of \cmd{\JustIndex}. The third toggles whether or not the
11214 % name argument token registers are set globally. The fourth toggles the
11215 % inclusion of \textsf{xargs} and \textsf{suffix} for legacy cases.
11216 %
11217 % \begin{macrocode}
11218 \newif\if@nameauth@OldReset
11219 \newif\if@nameauth@OldPass
11220 \newif\if@nameauth@OldToks
11221 \newif\if@nameauth@OldArgs
11222 % \end{macrocode}
11223 %
11224 % \subsection[Registers, Hooks, Values]
11225 % {Token Registers, Hooks, and Internal Values}
11226 %
11227 % \subsubsection[Token Registers]{Name Argument Token Registers}
11228 %
11229 % These three token registers contain the current values of the name
11230 % arguments passed to macros that accept naming arguments.
11231 %
11232 % \begin{macrocode}
11233 \newtoks\@nameauth@toksa
11234 \newtoks\@nameauth@toksb
11235 \newtoks\@nameauth@toksc
11236 % \end{macrocode}
11237 % These three token registers contain the current values of the name
11238 % arguments in each line of the \texttt{nameauth} environment, thus, \texttt{@nameauth@e} for that environment.
11239 %
11240 % \begin{macrocode}
11241 \newtoks\@nameauth@etoksb
11242 \newtoks\@nameauth@etoksc
11243 \newtoks\@nameauth@etoksd
11244 % \end{macrocode}
11245 %
11246 % \subsubsection{Hooks}
11247 %
11248 % \begin{macro}{\NamesFormat}
11249 % Used for ``first'' instances of names in main-matter text.
11250 % See Sections~\ref{sec:Formatting} and~\ref{sec:ComplexHooks}. Called when
11251 % both |\@nameauth@MainFormat| and |\@nameauth@FirstFormat| are true.
11252 %
11253 % \begin{macrocode}
11254 \newcommand*\NamesFormat{}
11255 % \end{macrocode}
11256 % \end{macro}
11257 %
11258 % \begin{macro}{\MainNameHook}
11259 % \changes{2.4}{2016/03/15}{Added}
11260 % Used for later instances of names in main-matter text. See Sections~\ref{sec:Formatting}
11261 % and~\ref{sec:ComplexHooks}f. Called when |\@nameauth@MainFormat| is true
11262 % and |\@nameauth@FirstFormat| is false.
11263 %
11264 % \begin{macrocode}
11265 \newcommand*\MainNameHook{}
11266 % \end{macrocode}
11267 % \end{macro}
11268 %
11269 % \begin{macro}{\FrontNamesFormat}
11270 % \changes{2.5}{2016/04/06}{Added}
11271 % Used for ``first'' instances of names in front-matter text. This
11272 % formatting hook is called when |\@nameauth@MainFormat| is false
11273 % and |\@nameauth@FirstFormat| is true.
11274 %
11275 % \begin{macrocode}
11276 \newcommand*\FrontNamesFormat{}
11277 % \end{macrocode}
11278 % \end{macro}
11279 %
11280 % \begin{macro}{\FrontNameHook}
11281 % \changes{2.4}{2016/03/15}{Added}
11282 % Used for subsequent instances of names in front-matter text.
11283 % This hook is called when |\@nameauth@MainFormat| is false
11284 % and |\@nameauth@FirstFormat| is false.
11285 %
11286 % \begin{macrocode}
11287 \newcommand*\FrontNameHook{}
11288 % \end{macrocode}
11289 % \end{macro}
11290 %
11291 % \noindent The following are customization points for
11292 % the core name engine (Section~\ref{sec:FullCustomize}).
11293 %
11294 % \begin{macro}{\NameauthName}
11295 % \changes{2.2}{2015/12/01}{Added}
11296 % Hook called when no special name modification is made.
11297 %
11298 % \begin{macrocode}
11299 \newcommand*\NameauthName{\@nameauth@Name}
11300 % \end{macrocode}
11301 % \end{macro}
11302 %
11303 % \begin{macro}{\NameauthLName}
11304 % \changes{2.3}{2016/01/05}{Added}
11305 % Hook called after a name is forced long via
11306 % \texttt{\textbackslash if@nameauth@name} being set to true.
11307 %
11308 % \begin{macrocode}
11309 \newcommand*\NameauthLName{\@nameauth@Name}
11310 % \end{macrocode}
11311 % \end{macro}
11312 %
11313 % \begin{macro}{\NameauthFName}
11314 % \changes{2.2}{2015/12/01}{Added}
11315 % Hook called after \texttt{\textbackslash if@nameauth@FirstName}
11316 % is set true.
11317 %
11318 % \begin{macrocode}
11319 \newcommand*\NameauthFName{\@nameauth@Name}
11320 % \end{macrocode}
11321 % \end{macro}
11322 %
11323 % \begin{macro}{\NameauthIndex}
11324 % \changes{3.5}{2020/11/23}{Added}
11325 % This hook allows one to redefine what happens when any naming macro
11326 % or indexing macro calls the equivalent of \cmd{\index}. See
11327 % Section~\ref{sec:GeneralIndex}.
11328 %
11329 % \begin{macrocode}
11330 \newcommand*\NameauthIndex{\index}
11331 % \end{macrocode}
11332 % \end{macro}
11333 %
11334 % \begin{macro}{\NameauthPattern}
11335 % \changes{3.7}{2023/02/03}{Added}
11336 % The current name pattern is stored here. With
11337 % every call to a macro that takes name arguments
11338 % (Section~\ref{sec:NameArgMacros}), this hook is updated.
11339 %
11340 % \begin{macrocode}
11341 \let\NameauthPattern\@empty
11342 % \end{macrocode}
11343 % \end{macro}
11344 %
11345 % \subsubsection{Internal Values}
11346 %
11347 % \begin{macro}{\@nameauth@Actual}
11348 % \changes{2.0}{2015/11/11}{Added}
11349 % \changes{3.5}{2020/11/23}{Use \cmd{\def}}
11350 % This sets the ``actual'' character used by \textsf{nameauth} for
11351 % index sorting.
11352 %
11353 % \begin{macrocode}
11354 \def\@nameauth@Actual{@}
11355 % \end{macrocode}
11356 % \end{macro}
11357 %
11358 % \begin{macro}{\@nameauth@Exclude}
11359 % \changes{3.5}{2020/11/23}{Added}
11360 % This makes an index xref into an ``exclusion'': any name pattern
11361 % ending in \texttt{!PN} that expands to this value.
11362 % See \cmd{\ExcludeName} below.
11363 %
11364 % \begin{macrocode}
11365 \newcommand*\@nameauth@Exclude{!}
11366 % \end{macrocode}
11367 % \end{macro}
11368 %
11369 % \begin{macro}{\@nameauth@space}
11370 % \changes{3.7}{2023/02/03}{Made global}
11371 % This macro provides a consistent space character for index entries.
11372 %
11373 % \begin{macrocode}
11374 \def\@nameauth@space{ }
11375 % \end{macrocode}
11376 % \end{macro}
11377 %
11378 % \subsection{Package Options}
11379 %
11380 % \subsubsection[Syntax]{Name Grammar and Syntax}
11381 %
11382 % Show warnings when using the obsolete syntax.
11383 %
11384 % \begin{macrocode}
11385 \DeclareOption{strictsyntax}{\@nameauth@StrictSyntaxtrue}
11386 % \end{macrocode}
11387 % Change the way that names are displayed with respect to their syntactic forms.
11388 %
11389 % \begin{macrocode}
11390 \DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
11391 \DeclareOption{comma}{\@nameauth@AlwaysCommatrue}
11392 \DeclareOption{normalcaps}{\@nameauth@AllCapsfalse}
11393 \DeclareOption{allcaps}{\@nameauth@AllCapstrue}
11394 \DeclareOption{notreversed}%
11395 {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
11396 \DeclareOption{allreversed}%
11397 {\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse}
11398 \DeclareOption{allrevcomma}%
11399 {\@nameauth@RevAllfalse\@nameauth@RevAllCommatrue}
11400 % \end{macrocode}
11401 %
11402 % \subsubsection{Indexing}
11403 %
11404 % Global setting for enabling indexing, sort tags, and verbose warnings.
11405 %
11406 % \begin{macrocode}
11407 \DeclareOption{index}{\@nameauth@DoIndextrue}
11408 \DeclareOption{noindex}{\@nameauth@DoIndexfalse}
11409 \DeclareOption{pretag}{\@nameauth@Pretagtrue}
11410 \DeclareOption{nopretag}{\@nameauth@Pretagfalse}
11411 \DeclareOption{verbose}{\@nameauth@Verbosetrue}
11412 % \end{macrocode}
11413 %
11414 % \subsubsection{Formatting}
11415 %
11416 % Determine the name system or change formatting behavior.
11417 %
11418 % \begin{macrocode}
11419 \DeclareOption{mainmatter}{\@nameauth@MainFormattrue}
11420 \DeclareOption{frontmatter}{\@nameauth@MainFormatfalse}
11421 \DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue}
11422 \DeclareOption{formatAKA}{\@nameauth@AKAFormattrue}
11423 % \end{macrocode}
11424 %
11425 % \subsubsection[Predefined Hooks]{Predefined Formatting Hooks}
11426 %
11427 % \begin{macrocode}
11428 \DeclareOption{noformat}{\providecommand*\NamesFormat{}}
11429 \DeclareOption{smallcaps}{\providecommand*\NamesFormat{\scshape}}
11430 \DeclareOption{italic}{\providecommand*\NamesFormat{\itshape}}
11431 \DeclareOption{boldface}{\providecommand*\NamesFormat{\bfseries}}
11432 % \end{macrocode}
11433 %
11434 % \subsubsection[Alternate Format]{Alternate Formatting}
11435 %
11436 % Enable alternate formatting.
11437 %
11438 % \begin{macrocode}
11439 \DeclareOption{altformat}{%
11440 \@nameauth@AltFormattrue\@nameauth@DoAlttrue}
11441 % \end{macrocode}
11442 %
11443 % \subsubsection{Scope}
11444 %
11445 % Name test paths are either local or the same scope in which they are called.
11446 %
11447 % \begin{macrocode}
11448 \DeclareOption{globaltest}{\@nameauth@GlobalScopetrue}
11449 % \end{macrocode}
11450 %
11451 % \subsubsection[Compatibility]{Version Compatibility}
11452 %
11453 % Revert package behavior to mimic older versions.
11454 %
11455 % \begin{macrocode}
11456 \DeclareOption{oldAKA}{\@nameauth@OldAKAtrue}
11457 \DeclareOption{oldreset}{\@nameauth@OldResettrue}
11458 \DeclareOption{oldpass}{\@nameauth@OldPasstrue}
11459 \DeclareOption{oldtoks}{\@nameauth@OldTokstrue}
11460 \DeclareOption{oldsee}{\@nameauth@OldSeetrue}
11461 \DeclareOption{oldargs}{\@nameauth@OldArgstrue}
11462 % \end{macrocode}
11463 %
11464 % \subsection{Package Initialization}
11465 %
11466 % Execute default options and process options passed by the user.
11467 % Load required packages for $\epsilon$-\TeX\ features, trimming
11468 % spaces from arguments, starred commands, and optional arguments.
11469 %
11470 % \begin{macrocode}
11471 \ExecuteOptions
11472 {nocomma,mainmatter,index,pretag,
11473 normalcaps,notreversed,noformat}
11474 \ProcessOptions\relax
11475 \RequirePackage{etoolbox}
11476 \RequirePackage{trimspaces}
11477 \RequirePackage{xparse}
11478 % \end{macrocode}
11479 % Test for the OldArgs flag and include legacy packages
11480 % if the flag is true.
11481 %
11482 % \begin{macrocode}
11483 \if@nameauth@OldArgs
11484 \RequirePackage{xargs}
11485 \RequirePackage{suffix}
11486 \fi
11487 % \end{macrocode}
11488 %
11489 % \newpage
11490 %
11491 % \subsection{Internal Macros}
11492 % \label{sec:InternalMacros}
11493 %
11494 % \subsubsection{Fundamental Macros}
11495 %
11496 % The following macros are the most essential to the concept of names.
11497 %
11498 % \subsubsection*{\hfil Name Patterns: Who Am I?}
11499 %
11500 % \begin{macro}{\@nameauth@Clean}
11501 % Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized''
11502 % string to make a control sequence for a name. Testing for the existence
11503 % and providing for macros based on that control sequence is the core of
11504 % \textsf{nameauth}.
11505 %
11506 % \begin{macrocode}
11507 \newcommand*\@nameauth@Clean[1]
11508 {\expandafter\zap@space\detokenize{#1} \@empty}
11509 % \end{macrocode}
11510 % \end{macro}
11511 %
11512 % \begin{macro}{\@nameauth@MakeCS}
11513 % \changes{3.5}{2020/11/23}{Added}
11514 % Unless we are in \cmd{\AKA}, create a name pattern
11515 % in the core name engine.
11516 %
11517 % \begin{macrocode}
11518 \newcommand*\@nameauth@MakeCS[1]
11519 {%
11520 \unless\ifcsname#1\endcsname
11521 \unless\if@nameauth@InAKA\csgdef{#1}{}\fi
11522 \fi
11523 }
11524 % \end{macrocode}
11525 % \end{macro}
11526 %
11527 % \subsubsection*{\hfil Parsing: Root and Suffix}
11528 %
11529 % \begin{macro}{\@nameauth@Root}
11530 % Return everything before a comma in \meta{SNN}, using the helper macro below.
11531 %
11532 % \begin{macrocode}
11533 \newcommand*\@nameauth@Root[1]{\@nameauth@@Root#1,\\}
11534 % \end{macrocode}
11535 % \end{macro}
11536 %
11537 % \begin{macro}{\@nameauth@@Root}
11538 % \changes{2.0}{2015/11/11}{Trim spaces}
11539 % \changes{3.0}{2016/10/26}{Redesigned}
11540 % \changes{3.2}{2017/03/22}{Renamed}
11541 % Throw out the comma and suffix, return the radix.
11542 %
11543 % \begin{macrocode}
11544 \def\@nameauth@@Root#1,#2\\{\trim@spaces{#1}}
11545 % \end{macrocode}
11546 % \end{macro}
11547 %
11548 % \begin{macro}{\@nameauth@TrimTag}
11549 % \changes{3.0}{2016/10/26}{Added}
11550 % \changes{3.2}{2017/03/22}{Renamed}
11551 % Return everything before a vertical bar (\texttt{\textbar})
11552 % in an index tag, using the helper below.
11553 %
11554 % \begin{macrocode}
11555 \newcommand*\@nameauth@TrimTag[1]{\@nameauth@@TrimTag#1|\\}
11556 % \end{macrocode}
11557 % \end{macro}
11558 %
11559 % \begin{macro}{\@nameauth@@TrimTag}
11560 % \changes{3.0}{2016/10/26}{Added}
11561 % Throw out the bar and suffix, return the radix.
11562 %
11563 % \begin{macrocode}
11564 \def\@nameauth@@TrimTag#1|#2\\{#1}
11565 % \end{macrocode}
11566 % \end{macro}
11567 %
11568 % \begin{macro}{\@nameauth@Suffix}
11569 % \changes{0.9}{2012/02/10}{Added}
11570 % Return only the affix in an \meta{SNN\textbf{,}Affix} pair,
11571 % using the helper macro below.
11572 %
11573 % \begin{macrocode}
11574 \newcommand*\@nameauth@Suffix[1]{\@nameauth@@Suffix#1,,\\}
11575 % \end{macrocode}
11576 % \end{macro}
11577 %
11578 % \begin{macro}{\@nameauth@@Suffix}
11579 % \changes{0.9}{2012/02/10}{Added}
11580 % \changes{1.5}{2013/02/22}{Trim spaces}
11581 % \changes{3.0}{2016/10/26}{New test}
11582 % \changes{3.2}{2017/03/22}{Renamed}
11583 % Throw out the radix; return the suffix with no leading spaces.
11584 %
11585 % \begin{macrocode}
11586 \def\@nameauth@@Suffix#1,#2,#3\\{%
11587 \ifx\\#2\\\@empty\else\trim@spaces{#2}\fi
11588 }
11589 % \end{macrocode}
11590 % \end{macro}
11591 %
11592 % \begin{macro}{\@nameauth@GetSuff}
11593 % \changes{3.2}{2017/03/22}{Added}
11594 % Test the suffix for a leading active Unicode character.
11595 %
11596 % \begin{macrocode}
11597 \newcommand*\@nameauth@GetSuff[1]{\@nameauth@@GetSuff#1,,\\}
11598 % \end{macrocode}
11599 % \end{macro}
11600 %
11601 % \begin{macro}{\@nameauth@@GetSuff}
11602 % \changes{3.2}{2017/03/22}{Added}
11603 % Throw out the radix; return the suffix.
11604 %
11605 % \begin{macrocode}
11606 \def\@nameauth@@GetSuff#1,#2,#3\\{#2}
11607 % \end{macrocode}
11608 % \end{macro}
11609 %
11610 % \subsubsection*{\hfil Parsing: Capitalization}
11611 % \label{page:Caps}
11612 %
11613 % \begin{macro}{\@nameauth@TestToks}
11614 % \changes{3.2}{2017/03/22}{Added}
11615 % \changes{3.5}{2020/11/23} {Fix namespace}
11616 % Test if the leading token is the same as the leading token of an
11617 % active Unicode character, using an \DE{Esszett} (\texttt{ß})
11618 % as the control. Used only with \textsf{inputenc}\,/\,\textsf{fontenc} in the next two macros below.
11619 %
11620 % \begin{macrocode}
11621 \newcommand*\@nameauth@TestToks[1]
11622 {%
11623 \toks@\expandafter{\@car#1\@nil}%
11624 \edef\@nameauth@one{\the\toks@}%
11625 \toks@\expandafter{\@carß\@nil}%
11626 \edef\@nameauth@two{\the\toks@}%
11627 \ifx\@nameauth@one\@nameauth@two
11628 \@nameauth@UTFtrue%
11629 \else
11630 \@nameauth@UTFfalse%
11631 \fi
11632 }
11633 % \end{macrocode}
11634 % \end{macro}
11635 %
11636 % \begin{macro}{\@nameauth@UTFtest}
11637 % \changes{3.0}{2016/10/26}{Added}
11638 % \changes{3.1}{2017/01/13}{Can skip test}
11639 % \changes{3.2}{2017/03/22}{Non-suffix only}
11640 % \changes{3.5}{2020/11/23}{Fix namespace}
11641 % Fully test what method to use when capitalizing a letter, whether
11642 % native Unicode (\texttt{xelatex} or \texttt{lualatex} via
11643 % \cmd{\Umathchar}) or \textsf{inputenc}\,/\,\textsf{fontenc}.
11644 %
11645 % \begin{macrocode}
11646 \newcommand*\@nameauth@UTFtest[1]
11647 {%
11648 \def\@nameauth@testarg{#1}%
11649 \ifdefined\Umathchar
11650 \@nameauth@UTFfalse%
11651 \else
11652 \ifdefined\UTFviii@two@octets
11653 \if@nameauth@Accent
11654 \@nameauth@UTFtrue\@nameauth@Accentfalse%
11655 \else
11656 \expandafter\@nameauth@TestToks
11657 \expandafter{\@nameauth@testarg}%
11658 \fi
11659 \else
11660 \@nameauth@UTFfalse%
11661 \fi
11662 \fi
11663 }
11664 % \end{macrocode}
11665 % \end{macro}
11666 %
11667 % \begin{macro}{\@nameauth@UTFtestS}
11668 % \changes{3.2}{2017/03/22}{Added}
11669 % \changes{3.5}{2020/11/23}{Fix namespace}
11670 % This test is like the one above, but for a suffix, which requires
11671 % more work to function properly. Moreover, we only use this when
11672 % the regular suffix macro is not \cmd{\@empty}.
11673 %
11674 % \begin{macrocode}
11675 \newcommand*\@nameauth@UTFtestS[1]
11676 {%
11677 \expandafter\def\expandafter\@nameauth@testarg%
11678 \expandafter{\@nameauth@GetSuff{#1}}%
11679 % \end{macrocode}
11680 % This token register assignment looks weird, but it works.
11681 %
11682 % \begin{macrocode}
11683 \expandafter\toks@%
11684 \expandafter\expandafter\expandafter{\@nameauth@testarg}%
11685 % \end{macrocode}
11686 % \newpage
11687 % \noindent Assign the token register value to a macro to do the test.
11688 %
11689 % \begin{macrocode}
11690 \expandafter\def\expandafter\@nameauth@test@rg%
11691 \expandafter{\the\toks@}%
11692 \ifdefined\Umathchar
11693 \@nameauth@UTFfalse%
11694 \else
11695 \ifdefined\UTFviii@two@octets
11696 \if@nameauth@Accent
11697 \@nameauth@UTFtrue\@nameauth@Accentfalse%
11698 \else
11699 \expandafter\@nameauth@TestToks%
11700 \expandafter{\@nameauth@test@rg}%
11701 \fi
11702 \else
11703 \@nameauth@UTFfalse%
11704 \fi
11705 \fi
11706 }
11707 % \end{macrocode}
11708 % \end{macro}
11709 %
11710 % \begin{macro}{\@nameauth@Cap}
11711 % \changes{3.1}{2017/01/13}{Redesigned}
11712 % \changes{3.2}{2017/03/22}{Not for UTF in \textsf{inputenc}}
11713 % Capitalize the first letter of the argument, using the helper below.
11714 %
11715 % \begin{macrocode}
11716 \newcommand*\@nameauth@Cap[1]{\@nameauth@C@p#1\\}
11717 % \end{macrocode}
11718 % \end{macro}
11719 %
11720 % \begin{macro}{\@nameauth@C@p}
11721 % \changes{3.1}{2017/01/13}{Added}
11722 % \changes{3.2}{2017/03/22}{Renamed, use \cmd{\MakeUppercase}}
11723 % Helper macro for the one above.
11724 %
11725 % \begin{macrocode}
11726 \def\@nameauth@C@p#1#2\\{%
11727 \expandafter\trim@spaces\expandafter{\MakeUppercase{#1}#2}%
11728 }
11729 % \end{macrocode}
11730 % \end{macro}
11731 %
11732 % \begin{macro}{\@nameauth@CapUTF}
11733 % \changes{3.2}{2017/03/22}{Added}
11734 % Capitalize the first active Unicode letter when using \textsf{inputenc}.
11735 %
11736 % \begin{macrocode}
11737 \newcommand*\@nameauth@CapUTF[1]{\@nameauth@C@pUTF#1\\}
11738 % \end{macrocode}
11739 % \end{macro}
11740 %
11741 % \begin{macro}{\@nameauth@C@pUTF}
11742 % \changes{3.1}{2017/01/13}{Added}
11743 % \changes{3.2}{2017/03/22}{Use \cmd{\MakeUppercase}}
11744 % Helper macro for the one above.
11745 %
11746 % \begin{macrocode}
11747 \def\@nameauth@C@pUTF#1#2#3\\{%
11748 \expandafter\trim@spaces\expandafter{\MakeUppercase{#1#2}#3}%
11749 }
11750 % \end{macrocode}
11751 % \end{macro}
11752 %
11753 % \begin{macro}{\@nameauth@CapArgs}
11754 % \changes{3.5}{2020/11/23}{Added}
11755 % Capitalize the first letter of all name arguments, when not
11756 % in alternate formatting. We only use this macro in the local scope
11757 % of \cmd{\@nameauth@Parse}.
11758 %
11759 % \begin{macrocode}
11760 \newcommand*\@nameauth@CapArgs[3]
11761 {%
11762 \ifdefined\@nameauth@InParser
11763 \unless\if@nameauth@AltFormat
11764 \let\carga\arga%
11765 \let\crootb\rootb%
11766 \let\csuffb\suffb%
11767 \let\cargc\argc%
11768 % \end{macrocode}
11769 % We test \meta{FNN} for active Unicode
11770 % characters, then cap the first letter.
11771 %
11772 % \begin{macrocode}
11773 \unless\ifx\arga\@empty
11774 \def\test{#1}%
11775 \expandafter\@nameauth@UTFtest\expandafter{\test}%
11776 % \end{macrocode}
11777 % Capitalize the first active Unicode character
11778 % when using \textsf{inputenc}.
11779 %
11780 % \begin{macrocode}
11781 \if@nameauth@UTF
11782 \expandafter\def\expandafter\carga\expandafter{%
11783 \expandafter\@nameauth@CapUTF\expandafter{\test}}%
11784 % \end{macrocode}
11785 % Capitalize the first native Unicode character.
11786 %
11787 % \begin{macrocode}
11788 \else
11789 \expandafter\def\expandafter\carga\expandafter{%
11790 \expandafter\@nameauth@Cap\expandafter{\test}}%
11791 \fi
11792 \fi
11793 % \end{macrocode}
11794 % We test \meta{SNN} for active Unicode,
11795 % characters, then cap the first letter.
11796 %
11797 % \begin{macrocode}
11798 \def\test{#2}%
11799 \expandafter\@nameauth@UTFtest\expandafter{\test}%
11800 % \end{macrocode}
11801 % Capitalize the first active Unicode character.
11802 %
11803 % \begin{macrocode}
11804 \if@nameauth@UTF
11805 \expandafter\def\expandafter\crootb\expandafter{%
11806 \expandafter\@nameauth@CapUTF\expandafter{\rootb}}%
11807 % \end{macrocode}
11808 % Capitalize the first native Unicode character.
11809 %
11810 % \begin{macrocode}
11811 \else
11812 \expandafter\def\expandafter\crootb\expandafter{%
11813 \expandafter\@nameauth@Cap\expandafter{\rootb}}%
11814 \fi
11815 % \end{macrocode}
11816 % We test \meta{Affix} for active Unicode
11817 % characters, then cap the first letter.
11818 %
11819 % \begin{macrocode}
11820 \unless\ifx\suffb\@empty
11821 \def\test{#2}%
11822 \expandafter\@nameauth@UTFtestS\expandafter{\test}%
11823 \protected@edef\test{\@nameauth@GetSuff{#2}}%
11824 % \end{macrocode}
11825 % Capitalize the first active Unicode character.
11826 %
11827 % \begin{macrocode}
11828 \if@nameauth@UTF
11829 \protected@edef\test{\@nameauth@Suffix{#2}}%
11830 \expandafter\def\expandafter\csuffb\expandafter{%
11831 \expandafter\@nameauth@CapUTF\expandafter{\test}}%
11832 % \end{macrocode}
11833 % Capitalize the first native Unicode character.
11834 %
11835 % \begin{macrocode}
11836 \else
11837 \edef\@nameauth@test{\@nameauth@Suffix{#2}}%
11838 \expandafter\def\expandafter\csuffb\expandafter{%
11839 \expandafter\@nameauth@Cap\expandafter{\test}}%
11840 \fi
11841 \fi
11842 % \end{macrocode}
11843 % We test \meta{Alternate} for active Unicode
11844 % characters, then cap the first letter.
11845 %
11846 % \begin{macrocode}
11847 \unless\ifx\argc\@empty
11848 \def\test{#3}%
11849 \expandafter\@nameauth@UTFtest\expandafter{\test}%
11850 % \end{macrocode}
11851 % Capitalize the first active Unicode character.
11852 %
11853 % \begin{macrocode}
11854 \if@nameauth@UTF
11855 \expandafter\def\expandafter\cargc\expandafter{%
11856 \expandafter\@nameauth@CapUTF\expandafter{\test}}%
11857 % \end{macrocode}
11858 % \newpage
11859 % \noindent Capitalize the first native Unicode character.
11860 %
11861 % \begin{macrocode}
11862 \else
11863 \expandafter\def\expandafter\cargc\expandafter{%
11864 \expandafter\@nameauth@Cap\expandafter{\test}}%
11865 \fi
11866 \fi
11867 % \end{macrocode}
11868 % Let all the local name elements have caps.
11869 % We do not know which ones will be used.
11870 %
11871 % \begin{macrocode}
11872 \let\arga\carga%
11873 \let\rootb\crootb%
11874 \let\suffb\csuffb%
11875 \let\argc\cargc%
11876 \fi
11877 \fi
11878 }
11879 % \end{macrocode}
11880 % \end{macro}
11881 %
11882 % \subsubsection*{\hfil Parsing: Full Stops}
11883 %
11884 % \begin{macro}{\@nameauth@TestDot}
11885 % \changes{3.5}{2020/11/23}{Redesigned}
11886 % This macro, based on a snippet by \Name*[Uwe]{Lueck}, checks for
11887 % a full stop at the end of its argument using the two internal helper
11888 % macros below.
11889 %
11890 % \begin{macrocode}
11891 \newcommand*\@nameauth@TestDot[1]
11892 {%
11893 % \end{macrocode}
11894 % If no full stop is present, \texttt{\#\#1} is associated with the first
11895 % \cmd{\@End.} The second \cmd{\@End} gets absorbed, leaving
11896 % \texttt{\#\#2} empty. If a full stop is present, \texttt{\#\#2}
11897 % will contain it.
11898 %
11899 % \begin{macrocode}
11900 \def\@nameauth@TestD@t##1.\@End##2\\{\@nameauth@TestPunct{##2}}%
11901 % \end{macrocode}
11902 % The two control sequences are equal if \texttt{\#\#1} is empty
11903 % (no full stop). If \texttt{\#\#1} is not empty, it sets
11904 % \cmd{\@nameauth@Puncttrue}, which triggers the call to
11905 % \cmd{\@nameauth@CheckDot}.
11906 %
11907 % \begin{macrocode}
11908 \def\@nameauth@TestPunct##1%
11909 {%
11910 \ifx\@nameauth@TestPunct##1\@nameauth@TestPunct
11911 \else
11912 \global\@nameauth@Puncttrue%
11913 \fi
11914 }%
11915 \global\@nameauth@Punctfalse%
11916 \@nameauth@TestD@t#1\@End.\@End\\%
11917 }
11918 % \end{macrocode}
11919 % \end{macro}
11920 %
11921 % \begin{macro}{\@nameauth@CheckDot}
11922 % We assume that \cmd{\expandafter} precedes the invocation of
11923 % \cmd{\@nameauth@CheckDot}, which only is called if the terminal
11924 % character of the input is a full stop. We evaluate the lookahead
11925 % \cmd{\@nameauth@token} while keeping it on the list of input tokens.
11926 %
11927 % \begin{macrocode}
11928 \newcommand*\@nameauth@CheckDot
11929 {\futurelet\@nameauth@token\@nameauth@EvalDot}
11930 % \end{macrocode}
11931 % \end{macro}
11932 %
11933 % \begin{macro}{\@nameauth@EvalDot}
11934 % If \cmd{\@nameauth@token}, the lookahead, is a full stop, we gobble it.
11935 %
11936 % \begin{macrocode}
11937 \newcommand*\@nameauth@EvalDot
11938 {%
11939 \let\@nameauth@stop=.%
11940 \ifx\@nameauth@token\@nameauth@stop
11941 \expandafter\@gobble \fi
11942 }
11943 % \end{macrocode}
11944 % \end{macro}
11945 %
11946 % \subsubsection*{\hfil Parsing: Breaking, Spaces, and Commas}
11947 %
11948 % \begin{macro}{\@nameauth@AddPunct}
11949 % \changes{3.5}{2020/11/23}{Added}
11950 % Here we make spaces between name elements in the text break or not,
11951 % and decide whether to add commas or not, depending on the name type.
11952 % We only use this macro in \cmd{\@nameauth@Parse}.
11953 %
11954 % \begin{macrocode}
11955 \newcommand*\@nameauth@AddPunct
11956 {%
11957 \ifdefined\@nameauth@InParser
11958 \def\Space{ }%
11959 \def\SpaceW{ }%
11960 % \end{macrocode}
11961 % \cmd{\SpaceW} is used for the space between a Western name and an affix,
11962 % specifically tied to \cmd{\KeepAffix}. \cmd{\Space} is used for all
11963 % other spaces between name elements.
11964 %
11965 % \begin{macrocode}
11966 \if@nameauth@NBSP \edef\Space{\nobreakspace}\fi
11967 \if@nameauth@NBSPX \edef\SpaceW{\nobreakspace}\fi
11968 % \end{macrocode}
11969 % Western names use commas differently from all other names,
11970 % so we only use the following logic if \meta{FNN} is not empty.
11971 %
11972 % \begin{macrocode}
11973 \unless\ifx\arga\@empty
11974 \if@nameauth@AlwaysComma\@nameauth@ShowCommatrue\fi
11975 \if@nameauth@ShowComma
11976 \def\Space{, }%
11977 \if@nameauth@NBSP\edef\Space{,\nobreakspace}\fi
11978 \fi
11979 \if@nameauth@NoComma
11980 \def\Space{ }%
11981 \if@nameauth@NBSP\edef\Space{\nobreakspace}\fi
11982 \fi
11983 \fi
11984 \fi
11985 }
11986 % \end{macrocode}
11987 % \end{macro}
11988 %
11989 % \subsubsection*{\hfil Parsing: Name Argument Loading}
11990 % \label{page:NameauthLoadArgs}
11991 %
11992 % \begin{macro}{\@nameauth@LoadArgs}
11993 % \changes{3.5}{2020/11/23}{Added}
11994 % \changes{4.1}{2025/02/04}{Clean name patterns via \cmd{\xdef}, name arg tokens saved here}
11995 % Assign name arguments to internal macros to determine name syntax.
11996 % This is used in all macros that take name arguments.
11997 %
11998 % \begin{macrocode}
11999 \newcommand*\@nameauth@LoadArgs[3]
12000 {%
12001 % \end{macrocode}
12002 % We want these arguments to expand to \cmd{\@empty} (or not)
12003 % when we test them.
12004 %
12005 % \begin{macrocode}
12006 \protected@edef\@nameauth@A{\trim@spaces{#1}}%
12007 \protected@edef\@nameauth@B{\@nameauth@Root{#2}}%
12008 \protected@edef\@nameauth@SB{\@nameauth@Suffix{#2}}%
12009 \protected@edef\@nameauth@C{\trim@spaces{#3}}%
12010 % \end{macrocode}
12011 % Make (usually) unique control sequence values from the name arguments
12012 % for all possible name forms. We use \cmd{\@nameauth@Choice} to pick
12013 % the name pattern that we want. Using \cmd{\edef} ensures that these
12014 % macros are just the detokenized arguments.
12015 %
12016 % \begin{macrocode}
12017 \xdef\@nameauth@csb{\@nameauth@Clean{#2}}%
12018 \xdef\@nameauth@csbc{\@nameauth@Clean{#2,#3}}%
12019 \xdef\@nameauth@csab{\@nameauth@Clean{#1!#2}}%
12020 % \end{macrocode}
12021 % \newpage
12022 % \noindent Make token register copies of the current name arguments.
12023 %
12024 % \begin{macrocode}
12025 \if@nameauth@OldToks
12026 \@nameauth@toksa\expandafter{#1}%
12027 \@nameauth@toksb\expandafter{#2}%
12028 \@nameauth@toksc\expandafter{#3}%
12029 \else
12030 \global\@nameauth@toksa\expandafter{#1}%
12031 \global\@nameauth@toksb\expandafter{#2}%
12032 \global\@nameauth@toksc\expandafter{#3}%
12033 \fi
12034 }
12035 % \end{macrocode}
12036 % \end{macro}
12037 %
12038 % \subsubsection*{\hfil Parsing: Standard Parsing Logic}
12039 %
12040 % \begin{macro}{\@nameauth@Choice}
12041 % \changes{3.5}{2020/11/23}{Added}
12042 % \changes{3.7}{2023/02/03}{Redesigned to optimize many macros}
12043 % \changes{4.1}{2025/02/04}{Globally update name pattern and name type info}
12044 % This standard logic applies to all macros that take name arguments. Here
12045 % we update \cmd{\NameauthPattern},
12046 % \texttt{\textbackslash ifNameauthWestern}, and
12047 % \texttt{\textbackslash ifNameauthObsolete} to show the resulting name
12048 % pattern and type of name.
12049 %
12050 % \begin{macrocode}
12051 \newcommand\@nameauth@Choice[3]
12052 {%
12053 \ifx\@nameauth@A\@empty
12054 \ifx\@nameauth@C\@empty
12055 % \end{macrocode}
12056 % This path is for Non-Western names. The \texttt{\#1} argument is
12057 % used both here and below when \cmd{\@nameauth@SB} is present. The
12058 % \texttt{\#1} path always corresponds to the present syntax.
12059 % Thus, when printing names in the text, the \texttt{\#1} argument
12060 % must test both \cmd{\@nameauth@C} and \cmd{\@nameauth@SB}, replacing
12061 % the latter with former if it exists. With indexing and other macros,
12062 % one ignores \cmd{\@nameauth@C}.
12063 %
12064 % \begin{macrocode}
12065 \global\let\NameauthPattern\@nameauth@csb%
12066 \global\NameauthWesternfalse%
12067 \global\NameauthObsoletefalse%
12068 #1%
12069 \else
12070 \ifx\@nameauth@SB\@empty
12071 % \end{macrocode}
12072 % The \texttt{\#2} argument is only for Non-Western names that use
12073 % the obsolete syntax. Here \cmd{\@nameauth@SB}
12074 % never occurs. For indexing and control sequences, one cannot ignore
12075 % the use of \cmd{\@nameauth@C} in this path.
12076 %
12077 % \begin{macrocode}
12078 \if@nameauth@StrictSyntax
12079 \PackageWarning{nameauth}{Use of obsolete syntax}\fi
12080 \global\let\NameauthPattern\@nameauth@csbc%
12081 \global\NameauthWesternfalse%
12082 \global\NameauthObsoletetrue%
12083 #2%
12084 \else
12085 % \end{macrocode}
12086 % But if both \cmd{\@nameauth@SB} and \cmd{\@nameauth@C} are present,
12087 % we invoke the \texttt{\#1} argument instead and let it do any further
12088 % testing and processing. That shows we are again using the current
12089 % syntax with a potential name swap.
12090 %
12091 % \begin{macrocode}
12092 \global\let\NameauthPattern\@nameauth@csb%
12093 \global\NameauthWesternfalse%
12094 \global\NameauthObsoletefalse%
12095 #1%
12096 \fi
12097 \fi
12098 \else
12099 % \end{macrocode}
12100 % This path is for Western names. When printing
12101 % names in the text, somewhere in the \texttt{\#3}
12102 % argument one must test for \cmd{\@nameauth@C} and swap it for
12103 % \cmd{\@nameauth@A}. Also check for and handle
12104 % \cmd{\@nameauth@SB}. Otherwise, for indexing and patterns,
12105 % ignore \cmd{\@nameauth@C} in this path and handle
12106 % \cmd{\@nameauth@SB} appropriately.
12107 %
12108 % \begin{macrocode}
12109 \global\let\NameauthPattern\@nameauth@csab%
12110 \global\NameauthWesterntrue%
12111 \global\NameauthObsoletefalse%
12112 #3%
12113 \fi
12114 }
12115 % \end{macrocode}
12116 % \end{macro}
12117 %
12118 % \begin{macro}{\@nameauth@Flags}
12119 % \changes{3.5}{2020/09/25}{Added}
12120 % \changes{4.1}{2025/02/04}{Add global \cmd{\ForceAffix} flag reset}
12121 % Reset flags after the naming macros and \cmd{\AKA} and friends create
12122 % output in the text. Other places where flags are reset are for
12123 % special cases.
12124 %
12125 % \begin{macrocode}
12126 \newcommand*\@nameauth@Flags
12127 {%
12128 \global\@nameauth@ForceAffixfalse%
12129 \if@nameauth@OldReset
12130 % \end{macrocode}
12131 % The \texttt{oldreset} option implies not only a difference
12132 % in scope regarding how flags are reset, but it also lets the effects
12133 % of \cmd{\ForgetThis} and \cmd{\SubvertThis} pass through \cmd{\AKA}
12134 % and \cmd{\AKA*}. We reset \texttt{\textbackslash
12135 % if@nameauth@AltAKA} here due to macros like \cmd{\PName}.
12136 %
12137 % \begin{macrocode}
12138 \if@nameauth@InAKA\@nameauth@AltAKAfalse\fi
12139 \@nameauth@SkipIndexfalse%
12140 \if@nameauth@InName
12141 \@nameauth@Forgetfalse \@nameauth@Subvertfalse%
12142 \fi
12143 \@nameauth@NBSPfalse \@nameauth@NBSPXfalse%
12144 \@nameauth@DoCapsfalse \@nameauth@Accentfalse%
12145 \@nameauth@AllThisfalse \@nameauth@ShowCommafalse%
12146 \@nameauth@NoCommafalse \@nameauth@RevThisfalse%
12147 \@nameauth@RevThisCommafalse%
12148 \@nameauth@ShortSNNfalse \@nameauth@EastFNfalse%
12149 \else
12150 % \end{macrocode}
12151 % The current way that the flags are reset makes them both global
12152 % and more uniform, hopefully eliminating a few chances for errors
12153 % that might be quite difficult to debug.
12154 %
12155 % \begin{macrocode}
12156 \if@nameauth@InAKA\global\@nameauth@AltAKAfalse\fi
12157 \global\@nameauth@SkipIndexfalse%
12158 \global\@nameauth@Forgetfalse \global\@nameauth@Subvertfalse%
12159 \global\@nameauth@NBSPfalse \global\@nameauth@NBSPXfalse%
12160 \global\@nameauth@DoCapsfalse \global\@nameauth@Accentfalse%
12161 \global\@nameauth@AllThisfalse \global\@nameauth@ShowCommafalse%
12162 \global\@nameauth@NoCommafalse \global\@nameauth@RevThisfalse%
12163 \global\@nameauth@RevThisCommafalse%
12164 \global\@nameauth@ShortSNNfalse \global\@nameauth@EastFNfalse%
12165 \fi
12166 }
12167 % \end{macrocode}
12168 % \end{macro}
12169 %
12170 % \newpage
12171 %
12172 % \subsubsection[Errors/Debugging]{Error Detection and Debugging}
12173 %
12174 % \begin{macro}{\@nameauth@Error}
12175 % \changes{3.0}{2016/10/26}{Added}
12176 % \changes{3.01}{2016/10/27}{Fixed}
12177 % \changes{3.5}{2020/11/23}{Fix namespace}
12178 % The \textsf{nameauth} package will halt with a meaningful error
12179 % when a required name argument is empty, expands to empty, or
12180 % has an empty root in a root/suffix pair.
12181 %
12182 % \begin{macrocode}
12183 \newcommand*\@nameauth@Error[2]
12184 {%
12185 \edef\@nameauth@msga{#2 SNN arg empty}%
12186 \edef\@nameauth@msgb{#2 SNN arg malformed}%
12187 \protected@edef\@nameauth@testname{\trim@spaces{#1}}%
12188 \protected@edef\@nameauth@testroot{\@nameauth@Root{#1}}%
12189 \ifx\@nameauth@testname\@empty
12190 \PackageError{nameauth}{\@nameauth@msga}%
12191 \fi
12192 \ifx\@nameauth@testroot\@empty
12193 \PackageError{nameauth}{\@nameauth@msgb}%
12194 \fi
12195 }
12196 % \end{macrocode}
12197 % \end{macro}
12198 %
12199 % \begin{macro}{\@nameauth@IdxPageref}
12200 % \changes{3.3}{2020/02/20}{Added}
12201 % \changes{3.5}{2020/11/23}{Fix name space, redefine hook
12202 % to print in text}
12203 % \changes{3.7}{2023/02/03}{Renamed; only show index entries;
12204 % add warning; optimized}
12205 % Here we set up a local scope because we make changes that would
12206 % otherwise affect normal \textsf{nameauth} output. We redefine
12207 % \cmd{\NameauthIndex} to print an argument in the text instead of
12208 % the index, and we force indexing to occur.
12209 %
12210 % \begin{macrocode}
12211 \newcommand*\@nameauth@IdxPageref[3]
12212 {%
12213 % \end{macrocode}
12214 % Warn if \cmd{\SkipIndex} was called before \cmd{\ShowIdxPageref},
12215 % and reset it.
12216 %
12217 % \begin{macrocode}
12218 \if@nameauth@SkipIndex
12219 \PackageWarning{nameauth}
12220 {\string\SkipIndex precedes \string\ShowIdxPageref; check}%
12221 \unless\if@nameauth@OldReset
12222 \@nameauth@SkipIndexfalse%
12223 \fi
12224 \fi
12225 % \end{macrocode}
12226 % Start a local scope to isolate any changes and redefine
12227 % \cmd{\NameauthIndex} (the index macro hook) to print
12228 % an entry in the text.
12229 %
12230 % \begin{macrocode}
12231 \begingroup%
12232 \def\NameauthIndex##1{##1}%
12233 \@nameauth@DoIndextrue%
12234 % \end{macrocode}
12235 % We locally delete any tag and xref control sequences as needed.
12236 % They will be restored when the scope ends. If \cmd{\ShowIdxPageref}
12237 % set \cmd{\@nameauth@LongIdxDebugtrue} we produce a full index entry
12238 % that shows all the tags and the ``actual'' character as well as the
12239 % name. Otherwise we produce a short index entry that shows only the name.
12240 %
12241 % \begin{macrocode}
12242 \@nameauth@Choice{}{}{}%
12243 \csundef{\NameauthPattern!PN}%
12244 \unless\if@nameauth@LongIdxDebug
12245 \csundef{\NameauthPattern!PRE}%
12246 \csundef{\NameauthPattern!TAG}%
12247 \fi
12248 \IndexName[#1]{#2}[#3]%
12249 % \end{macrocode}
12250 % We close the scope and reset the flags.
12251 %
12252 % \begin{macrocode}
12253 \endgroup%
12254 \global\@nameauth@LongIdxDebugfalse%
12255 }
12256 % \end{macrocode}
12257 % \end{macro}
12258 %
12259 % \subsubsection{Core Name Engine}
12260 % \label{sec:CoreName}
12261 %
12262 % \subsubsection*{\hfil Argument Processing Layer}
12263 %
12264 % \begin{macro}{\@nameauth@Name}
12265 % \changes{1.5}{2013/02/22}{Reversing/caps}
12266 % \changes{2.0}{2015/11/11}{Trim spaces; fix tags}
12267 % \changes{2.1}{2015/11/24}{Fix Unicode}
12268 % \changes{2.3}{2016/01/05}{Now internal}
12269 % \changes{2.4}{2016/03/15}{Set token regs}
12270 % \changes{2.41}{2016/03/17}{Fix token regs}
12271 % \changes{2.5}{2016/04/06}{Fix old syntax}
12272 % \changes{2.6}{2016/09/19}{Better indexing}
12273 % \changes{3.0}{2016/10/26}{Redesigned}
12274 % \changes{3.1}{2017/01/13}{New workflow}
12275 % \changes{3.3}{2020/02/20}{Global flag reset}
12276 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
12277 % \Name*[Marc van]{Dongen} provided the original basic structure.
12278 % Parsing, indexing, and formatting are more modularized than
12279 % in earlier versions.
12280 %
12281 % \begin{macrocode}
12282 \NewDocumentCommand{\@nameauth@Name}{O{} m O{}}
12283 {%
12284 % \end{macrocode}
12285 % Both \cmd{\@nameauth@Name} and \cmd{\AKA} engage the
12286 % lock below, preventing a stack overflow. Tell the formatting
12287 % mechanism that it is being called from \cmd{\@nameauth@Name}.
12288 %
12289 % \begin{macrocode}
12290 \if@nameauth@BigLock \@nameauth@Locktrue\fi
12291 \unless\if@nameauth@Lock
12292 \@nameauth@Locktrue%
12293 \@nameauth@InNametrue%
12294 % \end{macrocode}
12295 % Test for malformed input.
12296 %
12297 % \begin{macrocode}
12298 \@nameauth@Error{#2}{macro \string\@nameauth@name}%
12299 % \end{macrocode}
12300 % If we use \cmd{\JustIndex} then skip everything else.
12301 % The \texttt{oldpass} option restores what we did before
12302 % version 3.3, where we locally reset \cmd{\@nameauth@JustIndexfalse}
12303 % and were done. Now, however, the default is a global reset to avoid
12304 % undocumented behavior.
12305 %
12306 % \begin{macrocode}
12307 \if@nameauth@JustIndex
12308 \IndexName[#1]{#2}[#3]%
12309 \if@nameauth@OldPass
12310 \@nameauth@JustIndexfalse%
12311 \else
12312 \if@nameauth@OldReset
12313 \@nameauth@FullNamefalse%
12314 \@nameauth@FirstNamefalse%
12315 \@nameauth@JustIndexfalse%
12316 \else
12317 \global\@nameauth@FullNamefalse%
12318 \global\@nameauth@FirstNamefalse%
12319 \global\@nameauth@JustIndexfalse%
12320 \fi
12321 \fi
12322 \else
12323 % \end{macrocode}
12324 % Create or delete name pattern if directed. Deletion has priority
12325 % because it occurs after creation. Ensure that names are printed
12326 % in horizontal mode. Wrap the name with two index entries in case
12327 % a page break occurs between them.
12328 %
12329 % \begin{macrocode}
12330 \if@nameauth@Subvert \SubvertName[#1]{#2}[#3]\fi
12331 \if@nameauth@Forget \ForgetName[#1]{#2}[#3]\fi
12332 \leavevmode\hbox{}%
12333 \unless\if@nameauth@SkipIndex \IndexName[#1]{#2}[#3]\fi
12334 \if@nameauth@MainFormat
12335 \@nameauth@Parse{#1}{#2}{#3}{!MN}%
12336 \else
12337 \@nameauth@Parse{#1}{#2}{#3}{!NF}%
12338 \fi
12339 \unless\if@nameauth@SkipIndex \IndexName[#1]{#2}[#3]\fi
12340 % \end{macrocode}
12341 % \newpage
12342 % \noindent Reset all the ``per name'' Boolean values after printing a name.
12343 % The default is global.
12344 %
12345 % \begin{macrocode}
12346 \@nameauth@Flags%
12347 \fi
12348 \@nameauth@Lockfalse%
12349 \@nameauth@InNamefalse%
12350 % \end{macrocode}
12351 % Close the ``locked'' branch and complete the full stop detection
12352 % and removal.
12353 %
12354 % \begin{macrocode}
12355 \fi
12356 \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
12357 }
12358 % \end{macrocode}
12359 % \end{macro}
12360 %
12361 % \subsubsection*{\hfil Syntactic Element Layer}
12362 %
12363 % \begin{macro}{\@nameauth@Parse}
12364 % \changes{3.0}{2016/10/26}{Added}
12365 % \changes{3.1}{2017/01/13}{New workflow, caps}
12366 % \changes{3.2}{2017/03/22}{Fix alt. format, affixes,
12367 % use \cmd{\MakeUppercase}}
12368 % \changes{3.5}{2020/11/23}{Global token regs, optimize logic,
12369 % fix namespace}
12370 % \changes{4.1}{2025/02/04}{Name arg tokens saved elsewhere for consistency}
12371 % Parse and print a name in the text. The final required argument tells
12372 % us which name system we are in (Section~\ref{sec:NamePatterns}).
12373 % Both \cmd{\@nameauth@Name} and \cmd{\AKA} call this parser, which only
12374 % works in a locked state.
12375 %
12376 % \begin{macrocode}
12377 \newcommand\@nameauth@Parse[4]
12378 {%
12379 \if@nameauth@BigLock \@nameauth@Lockfalse\fi
12380 \if@nameauth@Lock
12381 % \end{macrocode}
12382 % If global caps. reversing, and commas are true,
12383 % set the per-name flags true.
12384 %
12385 % \begin{macrocode}
12386 \if@nameauth@AllCaps \@nameauth@AllThistrue\fi
12387 \if@nameauth@RevAll \@nameauth@RevThistrue\fi
12388 \if@nameauth@RevAllComma \@nameauth@RevThisCommatrue\fi
12389 % \end{macrocode}
12390 % Enter a local scope where we can use simple macros
12391 % without worry about name space collisions. We process
12392 % and load the arguments into the appropriate macros.
12393 %
12394 % \begin{macrocode}
12395 \begingroup%
12396 \def\@nameauth@InParser{}%
12397 \@nameauth@LoadArgs{#1}{#2}{#3}%
12398 % \end{macrocode}
12399 % Let the protected control sequences to local ones.
12400 %
12401 % \begin{macrocode}
12402 \let\arga\@nameauth@A%
12403 \let\rootb\@nameauth@B%
12404 \let\suffb\@nameauth@SB%
12405 \let\argc\@nameauth@C%
12406 % \end{macrocode}
12407 % Capitalization on demand in the body text
12408 % if not in alternate formatting.
12409 %
12410 % \begin{macrocode}
12411 \if@nameauth@DoCaps
12412 \@nameauth@CapArgs{#1}{#2}{#3}%
12413 \fi
12414 % \end{macrocode}
12415 % We capitalize the entire surname when desired;
12416 % different from above and overrides it.
12417 %
12418 % \begin{macrocode}
12419 \if@nameauth@AllThis
12420 \protected@edef\rootb%
12421 {\MakeUppercase{\@nameauth@Root{#2}}}%
12422 \fi
12423 % \end{macrocode}
12424 % Use non-breaking spaces and commas as desired.
12425 %
12426 % \begin{macrocode}
12427 \@nameauth@AddPunct%
12428 % \end{macrocode}
12429 % We attach ``meaning'' to patterns of macro arguments primarily via
12430 % \cmd{\FNN} and \cmd{\SNN}. Then we call the name printing macros
12431 % based on optional arguments.
12432 %
12433 % \begin{macrocode}
12434 \let\SNN\rootb%
12435 \@nameauth@Choice
12436 % \end{macrocode}
12437 % Non-Western names, current syntax.
12438 % We test \cmd{\argc} and \cmd{\suffb} as needed.
12439 %
12440 % \begin{macrocode}
12441 {%
12442 \ifx\argc\@empty
12443 \let\FNN\suffb%
12444 \else
12445 \let\FNN\argc%
12446 \fi
12447 \@nameauth@NonWest{\@nameauth@csb#4}%
12448 \@nameauth@MakeCS{\@nameauth@csb#4}%
12449 }%
12450 % \end{macrocode}
12451 % Non-Western names, obsolete syntax. Here \cmd{\argc} is significant.
12452 %
12453 % \begin{macrocode}
12454 {%
12455 \let\FNN\argc%
12456 \@nameauth@NonWest{\@nameauth@csbc#4}%
12457 \@nameauth@MakeCS{\@nameauth@csbc#4}%
12458 }%
12459 % \end{macrocode}
12460 % Western names.
12461 % We test for \cmd{\argc} and swap it for \cmd{\arga} and
12462 % account for \cmd{\suffb}. We allow \cmd{\ForceAffix} to
12463 % work only if if no affix exists
12464 %
12465 % \begin{macrocode}
12466 {%
12467 \ifx\argc\@empty
12468 \let\FNN\arga%
12469 \else
12470 \let\FNN\argc%
12471 \fi
12472 \ifx\suffb\@empty
12473 \@nameauth@ForceAffixfalse%
12474 \else
12475 \def\SNN{\rootb\Space\suffb}%
12476 \if@nameauth@ShortSNN
12477 \let\SNN\rootb%
12478 \fi
12479 \fi
12480 \@nameauth@West{\@nameauth@csab#4}%
12481 \@nameauth@MakeCS{\@nameauth@csab#4}%
12482 }%
12483 % \end{macrocode}
12484 % We end the local group and reset the flags for name forms here.
12485 %
12486 % \begin{macrocode}
12487 \endgroup%
12488 \if@nameauth@OldReset
12489 \@nameauth@FullNamefalse%
12490 \@nameauth@FirstNamefalse%
12491 \@nameauth@FirstFormatfalse%
12492 \else
12493 \global\@nameauth@FullNamefalse%
12494 \global\@nameauth@FirstNamefalse%
12495 \global\@nameauth@FirstFormatfalse%
12496 \fi
12497 \fi
12498 }
12499 % \end{macrocode}
12500 % \end{macro}
12501 %
12502 % \subsubsection*{\hfil Name Display Layer}
12503 %
12504 % \begin{macro}{\@nameauth@NonWest}
12505 % \changes{3.0}{2016/10/26}{Added}
12506 % \changes{3.02}{2016/11/01}{Restrict \cmd{\ForceFN}}
12507 % \changes{3.3}{2020/02/20}{global flag reset}
12508 % Arrange forms of Non-Western names. We inherit macros from
12509 % the parser and only use this macro in the local scope of the parser.
12510 %
12511 % \begin{macrocode}
12512 \newcommand*\@nameauth@NonWest[1]
12513 {%
12514 \ifdefined\@nameauth@InParser
12515 % \end{macrocode}
12516 % Toggle flags based on the name arguments.
12517 %
12518 % \begin{macrocode}
12519 \@nameauth@Form{#1}%
12520 % \end{macrocode}
12521 % Send a mononym to the hook dispatcher.
12522 %
12523 % \begin{macrocode}
12524 \ifx\FNN\@empty
12525 \@nameauth@Hook{\SNN}%
12526 \else
12527 % \end{macrocode}
12528 % Send a full name or reversed full name to the hook dispatcher.
12529 %
12530 % \begin{macrocode}
12531 \if@nameauth@FullName
12532 \if@nameauth@RevThis
12533 \@nameauth@Hook{\FNN\Space\SNN}%
12534 \else
12535 \@nameauth@Hook{\SNN\Space\FNN}%
12536 \fi
12537 \else
12538 % \end{macrocode}
12539 % Send a partial name to the hook dispatcher.
12540 %
12541 % \begin{macrocode}
12542 \if@nameauth@FirstName
12543 \if@nameauth@EastFN
12544 \@nameauth@Hook{\FNN}%
12545 \else
12546 \@nameauth@Hook{\SNN}%
12547 \fi
12548 \else
12549 \@nameauth@Hook{\SNN}%
12550 \fi
12551 \fi
12552 \fi
12553 \fi
12554 }
12555 % \end{macrocode}
12556 % \end{macro}
12557 %
12558 % \begin{macro}{\@nameauth@West}
12559 % \changes{3.0}{2016/10/26}{Added}
12560 % \changes{3.3}{2020/02/20}{global flag reset}
12561 % \changes{3.7}{2023/02/03}{always define local macros}
12562 % \changes{4.1}{2025/02/04}{Support affix-only output}
12563 % Arrange forms of Western names and ``non-native'' Eastern names.
12564 % We inherit macros from the parser and only use this macro in the
12565 % local scope of the parser.
12566 %
12567 % \begin{macrocode}
12568 \newcommand*\@nameauth@West[1]
12569 {%
12570 \ifdefined\@nameauth@InParser
12571 % \end{macrocode}
12572 % Toggle flags based on the name arguments.
12573 %
12574 % \begin{macrocode}
12575 \@nameauth@Form{#1}%
12576 \edef\RevSpace{,\SpaceW}%
12577 % \end{macrocode}
12578 % \newpage
12579 % \noindent Send a reversed full name, reversed full name with commas,
12580 % or a full name to the hook dispatcher.
12581 %
12582 % \begin{macrocode}
12583 \if@nameauth@FullName
12584 \if@nameauth@RevThis
12585 \@nameauth@Hook{\SNN\SpaceW\FNN}%
12586 \else
12587 \if@nameauth@RevThisComma
12588 \@nameauth@Hook{\SNN\RevSpace\FNN}%
12589 \else
12590 \@nameauth@Hook{\FNN\SpaceW\SNN}%
12591 \fi
12592 \fi
12593 \else
12594 % \end{macrocode}
12595 % Send only an affix to the hook dispatcher.
12596 %
12597 % \begin{macrocode}
12598 \if@nameauth@ForceAffix
12599 \@nameauth@Hook{\suffb}%
12600 \else
12601 % \end{macrocode}
12602 % Send a partial name to the hook dispatcher.
12603 %
12604 % \begin{macrocode}
12605 \if@nameauth@FirstName
12606 \@nameauth@Hook{\FNN}%
12607 \else
12608 \@nameauth@Hook{\rootb}%
12609 \fi
12610 \fi
12611 \fi
12612 \fi
12613 }
12614 % \end{macrocode}
12615 % \end{macro}
12616 %
12617 % \begin{macro}{\@nameauth@Form}
12618 % \changes{3.5}{2020/11/23}{Added}
12619 % Set up the flags per the formatting rules for first, subsequent, long,
12620 % and short uses. We only use this macro in the local scope of the parser.
12621 %
12622 % \begin{macrocode}
12623 \newcommand*\@nameauth@Form[1]
12624 {%
12625 \ifdefined\@nameauth@InParser
12626 % \end{macrocode}
12627 % If the name does not exist yet or if the \texttt{alwaysformat} option
12628 % is used, force first-use formatting, force a long name,
12629 % and inhibit a short name.
12630 %
12631 % \begin{macrocode}
12632 \unless\ifcsname#1\endcsname
12633 \@nameauth@FirstFormattrue%
12634 \@nameauth@FullNametrue%
12635 \@nameauth@FirstNamefalse%
12636 \else
12637 \if@nameauth@AlwaysFormat\@nameauth@FirstFormattrue\fi
12638 \fi
12639 % \end{macrocode}
12640 % If we are not in \cmd{\AKA}, if a short name form is desired,
12641 % inhibit a long form.
12642 %
12643 % \begin{macrocode}
12644 \unless\if@nameauth@InAKA
12645 \if@nameauth@FirstName\@nameauth@FullNamefalse\fi
12646 \else
12647 % \end{macrocode}
12648 % If we are in \cmd{\AKA} use special formatting rules. \cmd{\AKA*}
12649 % acts like \cmd{\FName}, while \cmd{\AKA} acts like \cmd{\Name*}.
12650 % Both prefer using the subsequent-use hooks unless the \texttt{formatAKA}
12651 % option or the \texttt{alwaysformat} option are used.
12652 %
12653 % \begin{macrocode}
12654 \if@nameauth@AltAKA
12655 \if@nameauth@OldAKA\@nameauth@EastFNtrue\fi
12656 \@nameauth@FullNamefalse%
12657 \@nameauth@FirstNametrue%
12658 \else
12659 \@nameauth@FullNametrue%
12660 \@nameauth@FirstNamefalse%
12661 \fi
12662 \unless\if@nameauth@AlwaysFormat
12663 \unless\if@nameauth@AKAFormat
12664 \@nameauth@FirstFormatfalse%
12665 \fi
12666 \fi
12667 \fi
12668 \fi
12669 }
12670 % \end{macrocode}
12671 % \end{macro}
12672 %
12673 % \subsubsection*{\hfil Format Hook Dispatcher}
12674 %
12675 % \begin{macro}{\@nameauth@Hook}
12676 % \changes{2.4}{2016/03/15}{Current form}
12677 % \changes{2.5}{2016/04/06}{Improve hooks}
12678 % \changes{3.0}{2016/10/26}{Fix punct. detection}
12679 % \changes{3.5}{2020/11/23}{Fix namespace}
12680 % \changes{4.1}{2025/02/04}{Ensure localized hook flag}
12681 % Boolean flags control which hook is called (first/subsequent use,
12682 % name type). We only use this macro in the local scope of the parser.
12683 %
12684 % \begin{macrocode}
12685 \newcommand*\@nameauth@Hook[1]
12686 {%
12687 \ifdefined\@nameauth@InParser
12688 % \end{macrocode}
12689 % We tell the formatting hooks that they are in the hook dispatcher
12690 % to enable alternate formatting. We test the printed name form to see
12691 % if it has a trailing full stop. The flag \texttt{\textbackslash^^A
12692 % if@nameauth@InHook} will reset outside of the local scope in
12693 % \cmd{\@nameauth@Parse}.
12694 % \begin{macrocode}
12695 \protected@edef\test{#1}%
12696 \expandafter\@nameauth@TestDot\expandafter{\test}%
12697 \if@nameauth@MainFormat
12698 % \end{macrocode}
12699 % We use the formatting hooks for the main-matter system.
12700 %
12701 % \begin{macrocode}
12702 \if@nameauth@FirstFormat
12703 \bgroup\@nameauth@InHooktrue\NamesFormat{#1}\egroup%
12704 \else
12705 \bgroup\@nameauth@InHooktrue\MainNameHook{#1}\egroup%
12706 \fi
12707 \else
12708 % \end{macrocode}
12709 % We use the formatting hooks for the front-matter system.
12710 %
12711 % \begin{macrocode}
12712 \if@nameauth@FirstFormat
12713 \bgroup\@nameauth@InHooktrue\FrontNamesFormat{#1}\egroup%
12714 \else
12715 \bgroup\@nameauth@InHooktrue\FrontNameHook{#1}\egroup%
12716 \fi
12717 \fi
12718 \fi
12719 }
12720 % \end{macrocode}
12721 % \end{macro}
12722 %
12723 % \newpage
12724 %
12725 % \subsubsection{Indexing}
12726 %
12727 % \begin{macro}{\@nameauth@Index}
12728 % \changes{0.94}{2012/02/15}{Added}
12729 % \changes{2.0}{2015/11/11}{New tagging}
12730 % \changes{3.3}{2020/02/20}{Support hyperref}
12731 % \changes{3.5}{2020/11/23}{Fix namespace}
12732 % \changes{4.1}{2025/02/04}{Fix sub-entry xrefs}
12733 % This is the core index mechanism. If the indexing flag is true,
12734 % create an index entry, otherwise do nothing. Add any tags
12735 % automatically if they exist.
12736 %
12737 % \begin{macrocode}
12738 \newcommand*\@nameauth@Index[4][\@empty]
12739 {%
12740 \if@nameauth@DoIndex
12741 \edef\@nameauth@XrefType{#1}%
12742 % \end{macrocode}
12743 % If a cross-reference will be created, its type is in the first
12744 % argument. We put that argument into a macro to evaluate it.
12745 % If an index tag exists for the entry, get it. Also create
12746 % a short version of the tag without any vertical bar or trailing macro.
12747 % If we are creating a cross-reference, use the short tag, otherwise
12748 % use the long tag.
12749 %
12750 % \begin{macrocode}
12751 \ifcsname#2!TAG\endcsname
12752 \protected@edef\@nameauth@Tag{\csname#2!TAG\endcsname}%
12753 \expandafter\def\expandafter\@nameauth@ShortTag\expandafter{%
12754 \expandafter\@nameauth@TrimTag\expandafter{\@nameauth@Tag}}%
12755 % \end{macrocode}
12756 % Set up either a page entry or an xref with both a sorting
12757 % tag and an info tag.
12758 %
12759 % \begin{macrocode}
12760 \ifcsname#2!PRE\endcsname
12761 \protected@edef\@nameauth@Pre{\csname#2!PRE\endcsname}%
12762 \ifx\@nameauth@XrefType\@empty
12763 \protected@edef\@nameauth@IdxEntry
12764 {\@nameauth@Pre#3\@nameauth@Tag}%
12765 \else
12766 \protected@edef\@nameauth@IdxEntry
12767 {\@nameauth@Pre#3\@nameauth@ShortTag|#1{#4}}%
12768 \fi
12769 \else
12770 % \end{macrocode}
12771 % Set up either a page entry or a cross-reference with an info tag.
12772 %
12773 % \begin{macrocode}
12774 \ifx\@nameauth@XrefType\@empty
12775 \protected@edef\@nameauth@IdxEntry
12776 {#3\@nameauth@Tag}%
12777 \else
12778 \protected@edef\@nameauth@IdxEntry
12779 {#3\@nameauth@ShortTag|#1{#4}}%
12780 \fi
12781 \fi
12782 \else
12783 % \end{macrocode}
12784 % Set up either a page entry or a cross-reference with a sorting tag.
12785 %
12786 % \begin{macrocode}
12787 \ifcsname#2!PRE\endcsname
12788 \protected@edef\@nameauth@Pre{\csname#2!PRE\endcsname}%
12789 \ifx\@nameauth@XrefType\@empty
12790 \protected@edef\@nameauth@IdxEntry{\@nameauth@Pre#3}%
12791 \else
12792 \protected@edef\@nameauth@IdxEntry{\@nameauth@Pre#3|#1{#4}}%
12793 \fi
12794 \else
12795 % \end{macrocode}
12796 % \newpage
12797 % \noindent Set up either a page entry or a cross-reference with no tag.
12798 %
12799 % \begin{macrocode}
12800 \ifx\@nameauth@XrefType\@empty
12801 \protected@edef\@nameauth@IdxEntry{#3}%
12802 \else
12803 \protected@edef\@nameauth@IdxEntry{#3|#1{#4}}%
12804 \fi
12805 \fi
12806 \fi
12807 % \end{macrocode}
12808 % Create the index entry.
12809 %
12810 % \begin{macrocode}
12811 \expandafter\NameauthIndex\expandafter{\@nameauth@IdxEntry}%
12812 \fi
12813 }
12814 % \end{macrocode}
12815 % \end{macro}
12816 %
12817 % \subsection[User Macros: Prefix]{For Users: Prefix Macros}
12818 % \label{sec:PrefixMacs}
12819 %
12820 % Prefix macros precede a particular name (or xref) to affect
12821 % only that name.
12822 %
12823 % \subsubsection[Syntax]{Name Syntax}
12824 %
12825 % \subsubsection*{\hfil Commas Before Affixes}
12826 %
12827 % \begin{macro}{\ShowComma}
12828 % \changes{1.4}{2012/07/24}{Added}
12829 % Put comma between name and suffix one time.
12830 %
12831 % \begin{macrocode}
12832 \newcommand*\ShowComma{\@nameauth@ShowCommatrue}
12833 % \end{macrocode}
12834 % \end{macro}
12835 %
12836 % \begin{macro}{\NoComma}
12837 % \changes{2.6}{2016/09/19}{Added}
12838 % Remove comma between name and suffix one time
12839 % (with \texttt{comma} option).
12840 %
12841 % \begin{macrocode}
12842 \newcommand*\NoComma{\@nameauth@NoCommatrue}
12843 % \end{macrocode}
12844 % \end{macro}
12845 %
12846 % \subsubsection*{\hfil Capitalization}
12847 %
12848 % \begin{macro}{\CapThis}
12849 % \changes{0.94}{2012/02/15}{Added}
12850 % Tells the root capping macro to cap the first character
12851 % of all name elements.
12852 %
12853 % \begin{macrocode}
12854 \newcommand*\CapThis{\@nameauth@DoCapstrue}
12855 % \end{macrocode}
12856 % \end{macro}
12857 %
12858 % \begin{macro}{\AccentCapThis}
12859 % \changes{2.1}{2015/11/24}{Added}
12860 % Overrides the automatic test for active Unicode characters; a fallback.
12861 %
12862 % \begin{macrocode}
12863 \newcommand*\AccentCapThis
12864 {\@nameauth@Accenttrue\@nameauth@DoCapstrue}
12865 % \end{macrocode}
12866 % \end{macro}
12867 %
12868 % \begin{macro}{\CapName}
12869 % \changes{1.5}{2013/02/22}{Added}
12870 % Capitalize entire \meta{SNN}. Overrides \cmd{\CapThis} for surnames.
12871 %
12872 % \begin{macrocode}
12873 \newcommand*\CapName{\@nameauth@AllThistrue}
12874 % \end{macrocode}
12875 % \end{macro}
12876 %
12877 % \subsubsection*{\hfil Reversing and Name Parts}
12878 %
12879 % \begin{macro}{\RevName}
12880 % \changes{1.5}{2013/02/22}{Added}
12881 % Reverse name order.
12882 %
12883 % \begin{macrocode}
12884 \newcommand*\RevName{\@nameauth@RevThistrue}
12885 % \end{macrocode}
12886 % \end{macro}
12887 %
12888 % \begin{macro}{\ForceFN}
12889 % \changes{3.0}{2016/10/26}{Added}
12890 % Force the printing of an Eastern forename or ancient affix
12891 % in the text, but only when using the ``short name'' macro
12892 % \cmd{\FName} and the \cmd{\S}\meta{macro}.
12893 %
12894 % \begin{macrocode}
12895 \newcommand*\ForceFN{\@nameauth@EastFNtrue}
12896 % \end{macrocode}
12897 % \end{macro}
12898 %
12899 % \subsubsection*{\hfil Reversing with Commas}
12900 %
12901 % \begin{macro}{\RevComma}
12902 % \changes{1.5}{2013/02/22}{Added}
12903 % Last name, comma, first name.
12904 %
12905 % \begin{macrocode}
12906 \newcommand*\RevComma{\@nameauth@RevThisCommatrue}
12907 % \end{macrocode}
12908 % \end{macro}
12909 %
12910 % \subsubsection*{\hfil Affixes and Breaking}
12911 %
12912 % \begin{macro}{\ForceAffix}
12913 % \changes{4.1}{2025/02/04}{Added}
12914 % Force the printing of just the affix of a short Western name
12915 % in the text.
12916 %
12917 % \begin{macrocode}
12918 \newcommand*\ForceAffix{\@nameauth@ForceAffixtrue}
12919 % \end{macrocode}
12920 % \end{macro}
12921 %
12922 % \begin{macro}{\DropAffix}
12923 % \changes{3.0}{2016/10/26}{Added}
12924 % Suppress printing the affix of a long Western name.
12925 %
12926 % \begin{macrocode}
12927 \newcommand*\DropAffix{\@nameauth@ShortSNNtrue}
12928 % \end{macrocode}
12929 % \end{macro}
12930 %
12931 % \begin{macro}{\KeepAffix}
12932 % \changes{1.9}{2015/07/09}{Added}
12933 % Bind a name-affix pair with a non-breaking space.
12934 %
12935 % \begin{macrocode}
12936 \newcommand*\KeepAffix{\@nameauth@NBSPtrue}
12937 % \end{macrocode}
12938 % \end{macro}
12939 %
12940 % \begin{macro}{\KeepName}
12941 % \changes{3.1}{2017/01/13}{Added}
12942 % Use non-breaking spaces between name syntactic forms.
12943 %
12944 % \begin{macrocode}
12945 \newcommand*\KeepName
12946 {\@nameauth@NBSPtrue\@nameauth@NBSPXtrue}
12947 % \end{macrocode}
12948 % \end{macro}
12949 %
12950 % \subsubsection{Indexing}
12951 %
12952 % \begin{macro}{\SkipIndex}
12953 % \changes{3.1}{2017/01/13}{Added}
12954 % Turn off the next instance of indexing in \cmd{\Name},
12955 % \cmd{\FName}, and starred forms.
12956 %
12957 % \begin{macrocode}
12958 \newcommand*\SkipIndex{\@nameauth@SkipIndextrue}
12959 % \end{macrocode}
12960 % \end{macro}
12961 %
12962 % \begin{macro}{\JustIndex}
12963 % \changes{3.1}{2017/01/13}{Added}
12964 % Makes the next call to \cmd{\Name}, \cmd{\FName},
12965 % and starred forms act like \cmd{\IndexName}.
12966 % Overrides \cmd{\SkipIndex}.
12967 %
12968 % \begin{macrocode}
12969 \newcommand*\JustIndex{\@nameauth@JustIndextrue}
12970 % \end{macrocode}
12971 % \end{macro}
12972 %
12973 % \begin{macro}{\SeeAlso}
12974 % \changes{3.0}{2016/10/26}{Added}
12975 % Change the type of cross-reference from a \textit{see}
12976 % reference to a \textit{see also} reference. Works once
12977 % per xref, unless one uses \cmd{\Include*}.
12978 %
12979 % \begin{macrocode}
12980 \newcommand*\SeeAlso{\@nameauth@SeeAlsotrue}
12981 % \end{macrocode}
12982 % \end{macro}
12983 %
12984 % \subsubsection[Format/Decisions]{Formatting and Name Decisions}
12985 %
12986 % \begin{macro}{\ForceName}
12987 % \changes{3.1}{2017/01/13}{Added}
12988 % Set \cmd{\@nameauth@FirstFormat} to be true even for
12989 % subsequent name uses. Makes the core name engine use
12990 % \cmd{\NamesFormat}. Works for one name only.
12991 %
12992 % \begin{macrocode}
12993 \newcommand*\ForceName{\@nameauth@FirstFormattrue}
12994 % \end{macrocode}
12995 % \end{macro}
12996 %
12997 % \begin{macro}{\ForgetThis}
12998 % \changes{3.1}{2017/01/13}{Added}
12999 % Have the naming engine \cmd{\@nameauth@Name}
13000 % call \cmd{\ForgetName} internally.
13001 %
13002 % \begin{macrocode}
13003 \newcommand*\ForgetThis{\@nameauth@Forgettrue}
13004 % \end{macrocode}
13005 % \end{macro}
13006 %
13007 % \begin{macro}{\SubvertThis}
13008 % \changes{3.1}{2017/01/13}{Added}
13009 % Have the naming engine \cmd{\@nameauth@Name}
13010 % call \cmd{\SubvertName} internally.
13011 %
13012 % \begin{macrocode}
13013 \newcommand*\SubvertThis{\@nameauth@Subverttrue}
13014 % \end{macrocode}
13015 % \end{macro}
13016 %
13017 % \TOCbreak
13018 % \subsection[User Macros: Helpers]{For Users: Helper Macros}
13019 % \label{sec:Helpers}
13020 %
13021 % Helper macros do not need to precede a particular name and their effects
13022 % endure for multiple names. They tend to affect an entire scope
13023 % and usually come in pairs.
13024 %
13025 % \subsubsection[Syntax]{Name Syntax}
13026 %
13027 % \subsubsection*{\hfil Capitalization}
13028 %
13029 % \begin{macro}{\AllCapsInactive}
13030 % Turn off global surname capitalization.
13031 % \changes{1.5}{2013/02/22}{Added}
13032 %
13033 % \begin{macrocode}
13034 \newcommand*\AllCapsInactive{\@nameauth@AllCapsfalse}
13035 % \end{macrocode}
13036 % \end{macro}
13037 %
13038 % \begin{macro}{\AllCapsActive}
13039 % \changes{1.5}{2013/02/22}{Added}
13040 % Turn on global surname capitalization.
13041 % Activates \cmd{\CapName} for every name.
13042 %
13043 % \begin{macrocode}
13044 \newcommand*\AllCapsActive{\@nameauth@AllCapstrue}
13045 % \end{macrocode}
13046 % \end{macro}
13047 %
13048 % \subsubsection*{\hfil Reversing}
13049 %
13050 % \begin{macro}{\ReverseInactive}
13051 % Turn off global name reversing.
13052 % \changes{1.5}{2013/02/22}{Added}
13053 %
13054 % \begin{macrocode}
13055 \newcommand*\ReverseInactive{\@nameauth@RevAllfalse}
13056 % \end{macrocode}
13057 % \end{macro}
13058 %
13059 % \begin{macro}{\ReverseActive}
13060 % \changes{1.5}{2013/02/22}{Added}
13061 % Turn on global name reversing.
13062 % Activates \cmd{\RevName} for every name.
13063 %
13064 % \begin{macrocode}
13065 \newcommand*\ReverseActive{\@nameauth@RevAlltrue}
13066 % \end{macrocode}
13067 % \end{macro}
13068 %
13069 % \subsubsection*{\hfil Reversing with Commas}
13070 %
13071 % \begin{macro}{\ReverseCommaInactive}
13072 % \changes{1.5}{2013/02/22}{Added}
13073 % Turn off global ``last-name-comma-first''.
13074 %
13075 % \begin{macrocode}
13076 \newcommand*\ReverseCommaInactive{\@nameauth@RevAllCommafalse}
13077 % \end{macrocode}
13078 % \end{macro}
13079 %
13080 % \begin{macro}{\ReverseCommaActive}
13081 % \changes{1.5}{2013/02/22}{Added}
13082 % Turn on global ``last-name-comma-first''.
13083 % Activates \cmd{\RevComma} for every name. The macro
13084 % \cmd{\ReverseActive} takes priority over this macro.
13085 %
13086 % \begin{macrocode}
13087 \newcommand*\ReverseCommaActive{\@nameauth@RevAllCommatrue}
13088 % \end{macrocode}
13089 % \end{macro}
13090 %
13091 % \subsubsection{Indexing}
13092 %
13093 % \begin{macro}{\IndexActual}
13094 % \changes{2.0}{2015/11/11}{Added}
13095 % \changes{3.5}{2020/11/23}{Use \cmd{\def}}
13096 % Change the ``actual'' character from the default.
13097 % This allows one to use, for example,
13098 % |\global\IndexActual{=}| in \texttt{dtx} files.
13099 %
13100 % \begin{macrocode}
13101 \newcommand*\IndexActual[1]{\def\@nameauth@Actual{#1}}
13102 % \end{macrocode}
13103 % \end{macro}
13104 %
13105 % \begin{macro}{\IndexInactive}
13106 % \changes{0.94}{2012/02/15}{Added}
13107 % Turn off global indexing of names.
13108 %
13109 % \begin{macrocode}
13110 \newcommand*\IndexInactive{\@nameauth@DoIndexfalse}
13111 % \end{macrocode}
13112 % \end{macro}
13113 %
13114 % \begin{macro}{\IndexActive}
13115 % \changes{0.94}{2012/02/15}{Added}
13116 % Turn on global indexing of names.
13117 %
13118 % \begin{macrocode}
13119 \newcommand*\IndexActive{\@nameauth@DoIndextrue}
13120 % \end{macrocode}
13121 % \end{macro}
13122 %
13123 % \begin{macro}{\IndexWarnVerbose}
13124 % \changes{3.7}{2023/02/03}{Added}
13125 % Turn on verbose warnings for indexing.
13126 %
13127 % \begin{macrocode}
13128 \newcommand*\IndexWarnVerbose{\@nameauth@Verbosetrue}
13129 % \end{macrocode}
13130 % \end{macro}
13131 %
13132 % \begin{macro}{\IndexWarnTerse}
13133 % \changes{3.7}{2023/02/03}{Added}
13134 % Turn off verbose warnings for indexing.
13135 %
13136 % \begin{macrocode}
13137 \newcommand*\IndexWarnTerse{\@nameauth@Verbosefalse}
13138 % \end{macrocode}
13139 % \end{macro}
13140 %
13141 % \begin{macro}{\IndexProtect}
13142 % \changes{3.3}{2020/02/20}{Added}
13143 % We shut down all output from the naming and indexing macros
13144 % to protect against problems in the index in case a macro in the
13145 % index contains one of the naming macros. This macro is deliberately
13146 % local, so one can use scoping to isolate its effects.
13147 %
13148 % \begin{macrocode}
13149 \newcommand*\IndexProtect
13150 {\@nameauth@DoIndexfalse\@nameauth@BigLocktrue}
13151 % \end{macrocode}
13152 % \end{macro}
13153 %
13154 % \subsubsection{Formatting}
13155 %
13156 % \begin{macro}{\NamesInactive}
13157 % Switch to the front-matter name system.
13158 %
13159 % \begin{macrocode}
13160 \newcommand*\NamesInactive{\@nameauth@MainFormatfalse}
13161 % \end{macrocode}
13162 % \end{macro}
13163 %
13164 % \begin{macro}{\NamesActive}
13165 % Switch to the main-matter name system.
13166 %
13167 % \begin{macrocode}
13168 \newcommand*\NamesActive{\@nameauth@MainFormattrue}
13169 % \end{macrocode}
13170 % \end{macro}
13171 %
13172 % \subsubsection[Alternate Format]{Alternate Formatting}
13173 % \label{sec:AltFmtMacros}
13174 %
13175 % \begin{macro}{\AltFormatActive}
13176 % \changes{3.1}{2017/01/13}{Added}
13177 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
13178 % \begin{macro}{\AltFormatActive*}\end{macro}\vspace{-2.7ex}
13179 % \noindent Turn on alternate formatting and
13180 % disengage the formatting macros if using the starred form or
13181 % engage the formatting macros if using the un-starred form.
13182 %
13183 % \begin{macrocode}
13184 \NewDocumentCommand{\AltFormatActive}{s}
13185 {%
13186 \global\@nameauth@AltFormattrue%
13187 \IfBooleanTF{#1}
13188 {\global\@nameauth@DoAltfalse}
13189 {\global\@nameauth@DoAlttrue}%
13190 }
13191 % \end{macrocode}
13192 % \end{macro}
13193 %
13194 % \begin{macro}{\AltFormatInactive}
13195 % \changes{3.1}{2017/01/13}{Added}
13196 % Turn off alternate formatting altogether.
13197 %
13198 % \begin{macrocode}
13199 \newcommand*\AltFormatInactive
13200 {\global\@nameauth@AltFormatfalse\global\@nameauth@DoAltfalse}
13201 % \end{macrocode}
13202 % \end{macro}
13203 %
13204 % \begin{environment}{AltFormatZone}
13205 % \changes{4.1}{2025/02/04}{Added}
13206 % We enable alternate formatting in its active (on) state.
13207 %
13208 % \begin{macrocode}
13209 \newenvironment{AltFormatZone}
13210 {\AltFormatActive\begingroup\def\@nameauth@InZone{}\ignorespaces}
13211 {\endgroup\AltFormatInactive\ignorespacesafterend}
13212 % \end{macrocode}
13213 % \end{environment}
13214 %
13215 % \begin{environment}{AltFormatZone*}
13216 % \changes{4.1}{2025/02/04}{Added}
13217 % We enable alternate formatting in its inactive (off) state.
13218 %
13219 % \begin{macrocode}
13220 \newenvironment{AltFormatZone*}
13221 {\AltFormatActive*\begingroup\def\@nameauth@InZone{}\ignorespaces}
13222 {\endgroup\AltFormatInactive\ignorespacesafterend}
13223 % \end{macrocode}
13224 % \end{environment}
13225 %
13226 % \begin{macro}{\FixateFormat}
13227 % \changes{4.1}{2025/02/04}{Added}
13228 % Redefine alternate formatting switches to do nothing only within
13229 % the environments above. The user must choose to invoke this macro.
13230 %
13231 % \begin{macrocode}
13232 \newcommand{\FixateFormat}
13233 {%
13234 \ifdefined\@nameauth@InZone
13235 \RenewDocumentCommand{\AltFormatActive}{s}{}%
13236 \renewcommand\AltFormatInactive{}%
13237 \fi
13238 }
13239 % \end{macrocode}
13240 % \end{macro}
13241 %
13242 % \begin{macro}{\AltOn}
13243 % Locally turn on alternate formatting.
13244 % \changes{3.1}{2017/01/13}{Added}
13245 %
13246 % \begin{macrocode}
13247 \newcommand*\AltOn
13248 {%
13249 \if@nameauth@InHook
13250 \if@nameauth@AltFormat\@nameauth@DoAlttrue\fi
13251 \fi
13252 }
13253 % \end{macrocode}
13254 % \end{macro}
13255 %
13256 % \begin{macro}{\AltOff}
13257 % Locally turn off alternate formatting.
13258 % \changes{3.1}{2017/01/13}{Added}
13259 %
13260 % \begin{macrocode}
13261 \newcommand*\AltOff
13262 {%
13263 \if@nameauth@InHook
13264 \if@nameauth@AltFormat\@nameauth@DoAltfalse\fi
13265 \fi
13266 }
13267 % \end{macrocode}
13268 % \end{macro}
13269 %
13270 % \begin{macro}{\AltCaps}
13271 % \changes{3.1}{2017/01/13}{Added}
13272 % \changes{3.2}{2017/03/22}{Use \cmd{\MakeUppercase}}
13273 % Alternate discretionary capping macro triggered by \cmd{\CapThis}.
13274 %
13275 % \begin{macrocode}
13276 \newcommand*\AltCaps[1]
13277 {%
13278 \if@nameauth@InHook
13279 \if@nameauth@DoCaps\MakeUppercase{#1}\else#1\fi
13280 \else
13281 #1%
13282 \fi
13283 }
13284 % \end{macrocode}
13285 % \end{macro}
13286 %
13287 % \begin{macro}{\textSC}
13288 % \changes{3.1}{2017/01/13}{Added}
13289 % \changes{4.1}{2025/02/04}{Two font switches avoid warnings}
13290 % Alternate formatting macro: small caps when active. Change
13291 % first to roman, then small caps, to avoid font warning.
13292 %
13293 % \begin{macrocode}
13294 \newcommand*\textSC[1]
13295 {\if@nameauth@DoAlt{\rmfamily\textsc{#1}}\else#1\fi}
13296 % \end{macrocode}
13297 % \end{macro}
13298 %
13299 % \begin{macro}{\textUC}
13300 % \changes{3.1}{2017/01/13}{Added}
13301 % \changes{3.2}{2017/03/22}{Use \cmd{\MakeUppercase}}
13302 % Alternate formatting macro: uppercase when active.
13303 %
13304 % \begin{macrocode}
13305 \newcommand*\textUC[1]
13306 {\if@nameauth@DoAlt\MakeUppercase{#1}\else#1\fi}
13307 % \end{macrocode}
13308 % \end{macro}
13309 %
13310 % \begin{macro}{\textIT}
13311 % \changes{3.1}{2017/01/13}{Added}
13312 % Alternate formatting macro: italic when active.
13313 %
13314 % \begin{macrocode}
13315 \newcommand*\textIT[1]
13316 {\if@nameauth@DoAlt\textit{#1}\else#1\fi}
13317 % \end{macrocode}
13318 % \end{macro}
13319 %
13320 % \begin{macro}{\textBF}
13321 % \changes{3.1}{2017/01/13}{Added}
13322 % Alternate formatting macro: boldface when active.
13323 %
13324 % \begin{macrocode}
13325 \newcommand*\textBF[1]
13326 {\if@nameauth@DoAlt\textbf{#1}\else#1\fi}
13327 % \end{macrocode}
13328 % \end{macro}
13329 %
13330 % \subsubsection{Name Decisions}
13331 %
13332 % \begin{macro}{\LocalNameTest}
13333 % \changes{3.5}{2020/11/23}{Added}
13334 % Causes decision paths in the name decision macros to be in a local scope.
13335 %
13336 % \begin{macrocode}
13337 \newcommand*\LocalNameTest{\global\@nameauth@GlobalScopefalse}
13338 % \end{macrocode}
13339 % \end{macro}
13340 %
13341 % \begin{macro}{\GlobalNameTest}
13342 % \changes{3.5}{2020/11/23}{Added}
13343 % Causes decision paths in the name decision macros to have no scoping.
13344 %
13345 % \begin{macrocode}
13346 \newcommand*\GlobalNameTest{\global\@nameauth@GlobalScopetrue}
13347 % \end{macrocode}
13348 % \end{macro}
13349 %
13350 % \begin{macro}{\LocalNames}
13351 % \changes{2.3}{2016/01/05}{Added}
13352 % \changes{2.4}{2016/03/15}{Ensure global}
13353 % \cmd{\LocalNames} sets |@nameauth@LocalNames| true so \cmd{\ForgetName}
13354 % and \cmd{\SubvertName} do not affect both main and front matter
13355 % name systems, only the current one.
13356 %
13357 % \begin{macrocode}
13358 \newcommand*\LocalNames{\global\@nameauth@LocalNamestrue}
13359 % \end{macrocode}
13360 % \end{macro}
13361 %
13362 % \begin{macro}{\GlobalNames}
13363 % \changes{2.3}{2016/01/05}{Added}
13364 % \changes{2.4}{2016/03/15}{Ensure global}
13365 % \cmd{\GlobalNames} restores the default behavior of \cmd{\ForgetName}
13366 % and \cmd{\SubvertName}, which affects both name systems at once.
13367 %
13368 % \begin{macrocode}
13369 \newcommand*\GlobalNames{\global\@nameauth@LocalNamesfalse}
13370 % \end{macrocode}
13371 % \end{macro}
13372 %
13373 % \subsubsection[Name Parser]{User-Accessible Name Parser}
13374 % \label{sec:NameParser}
13375 %
13376 % \begin{macro}{\NameParser}
13377 % \changes{3.0}{2016/10/26}{Added}
13378 % \changes{3.03}{2016/11/01}{Restrict first names}
13379 % \changes{3.1}{2017/01/13}{Fix old syntax; add NBSP}
13380 % \changes{3.2}{2017/03/22}{Fix alt. format, affixes}
13381 % \changes{3.5}{2020/11/23}{Optimize logic}
13382 % \changes{4.1}{2025/02/04}{Support affix-only output; allow empty output}
13383 % Print a name form based on the current state of the
13384 % \textsf{nameauth} flags in the locked path. Used only
13385 % in the hook macros, within the local scope of \cmd{\@nameauth@Parse}.
13386 % We \cmd{\let} values to \cmd{\FNN} and \cmd{\SNN} not to
13387 % be efficient but to be pedantic. Sometimes, the attempt to
13388 % short-circuit parser logic will seem to work, only for a case
13389 % to emerge that breaks things. Being pedantic reduces that risk,
13390 % even if it is slower at times.
13391 %
13392 % \begin{macrocode}
13393 \newcommand*\NameParser
13394 {%
13395 \if@nameauth@InHook
13396 \let\SNN\rootb%
13397 \@nameauth@Choice
13398 % \end{macrocode}
13399 % Non-Western names.
13400 % We test both \cmd{\argc} and \cmd{\suffb} as needed.
13401 %
13402 % \begin{macrocode}
13403 {%
13404 \ifx\argc\@empty \let\FNN\suffb \else
13405 \let\FNN\argc \fi
13406 \ifx\FNN\@empty
13407 \unless\if@nameauth@FirstName \SNN \fi
13408 \else
13409 \if@nameauth@FullName
13410 \if@nameauth@RevThis \FNN\Space\SNN \else
13411 \SNN\Space\FNN \fi
13412 \else
13413 \if@nameauth@FirstName
13414 \if@nameauth@EastFN \FNN \else \SNN \fi
13415 \else
13416 \SNN%
13417 \fi
13418 \fi
13419 \fi
13420 }%
13421 % \end{macrocode}
13422 % Non-Western names, obsolete syntax.
13423 % Using \cmd{\argc} in this path affects indexing.
13424 %
13425 % \begin{macrocode}
13426 {%
13427 \let\FNN\argc%
13428 \if@nameauth@FullName%
13429 \if@nameauth@RevThis \FNN\Space\SNN \else
13430 \SNN\Space\FNN \fi
13431 \else
13432 \if@nameauth@FirstName
13433 \if@nameauth@EastFN \FNN \else \SNN \fi
13434 \else
13435 \SNN%
13436 \fi
13437 \fi
13438 }%
13439 % \end{macrocode}
13440 % Western names.
13441 % We test for \cmd{\argc} and swap it for \cmd{\arga},
13442 % and account for \cmd{\suffb}.
13443 %
13444 % \begin{macrocode}
13445 {%
13446 \ifx\argc\@empty \let\FNN\arga \else
13447 \let\FNN\argc \fi
13448 \unless\ifx\suffb\@empty
13449 \def\SNN{\rootb\Space\suffb}%
13450 \if@nameauth@ShortSNN \let\SNN\rootb \fi
13451 \fi
13452 \if@nameauth@FullName
13453 \if@nameauth@RevThis
13454 \SNN\SpaceW\FNN%
13455 \else
13456 \if@nameauth@RevThisComma
13457 \SNN\RevSpace\FNN%
13458 \else
13459 \FNN\SpaceW\SNN%
13460 \fi
13461 \fi
13462 \else
13463 \if@nameauth@ForceAffix
13464 \let\SNN\suffb \SNN%
13465 \else
13466 \if@nameauth@FirstName \FNN%
13467 \else
13468 \let\SNN\rootb \SNN%
13469 \fi
13470 \fi
13471 \fi
13472 }%
13473 \fi
13474 }
13475 % \end{macrocode}
13476 % \end{macro}
13477 %
13478 % \subsection[User Macros: Name Args]{For Users: Macros That Take Name Arguments}
13479 % \label{sec:UserInterface}
13480 %
13481 % The rest of the \textsf{nameauth} macros all take name arguments. They all
13482 % update \cmd{\NameauthPattern}, \texttt{\textbackslash ifNameauthWestern},
13483 % and \texttt{\textbackslash ifNameauthObsolete} when called. The file
13484 % \texttt{examples.tex} iterates through all possible argument variations of
13485 % these macros except the debugging macros, the non-printing arguments of
13486 % \cmd{\AKA}, and \cmd{\PName}. It thus tests for spurious spaces and
13487 % bad output.
13488 %
13489 % \subsubsection{Basic Interface}
13490 %
13491 % \begin{macro}{\Name}
13492 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
13493 % \begin{macro}{\Name*}\end{macro}\vspace{-2.7ex}
13494 % \noindent \cmd{\Name} calls \cmd{\NameauthName}, the interface hook, printing
13495 % a long name and calling \cmd{\NameauthLName} when using the starred form.
13496 %
13497 % \begin{macrocode}
13498 \NewDocumentCommand{\Name}{s}
13499 {%
13500 \IfBooleanTF{#1}
13501 {\@nameauth@FullNametrue\NameauthLName}
13502 {\NameauthName}%
13503 }
13504 % \end{macrocode}
13505 % \end{macro}
13506 %
13507 % \begin{macro}{\FName}
13508 % \changes{0.9}{2012/02/10}{Added}
13509 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
13510 % \begin{macro}{\FName*}\end{macro}\vspace{-2.7ex}
13511 % \noindent \cmd{\FName} sets up a short name instance and calls \cmd{\NameauthFName},
13512 % the interface hook. Its starred form is identical in function.
13513 %
13514 % \begin{macrocode}
13515 \NewDocumentCommand{\FName}{s}
13516 {\@nameauth@FirstNametrue\NameauthFName}
13517 % \end{macrocode}
13518 % \end{macro}
13519 %
13520 % \subsubsection{Quick Interface}
13521 %
13522 % \begin{environment}{nameauth}
13523 % \changes{1.6}{2013/03/10}{Environment added}
13524 % \changes{2.0}{2015/11/11}{Better arg handling}
13525 % \changes{2.41}{2016/03/17}{No local \cmd{\newtoks}}
13526 % \changes{3.5}{2020/11/23}{Fix namespace}
13527 % \changes{3.7}{2023/02/03}{Improve warnings}
13528 % \changes{4.1}{2025/02/04}{Better at ignoring spaces}
13529 % % Here we create macro shorthands. First we define a macro \cmd{\<} that
13530 % takes four arguments, delimited by three ampersands and \texttt{>}.
13531 % This macro is local to the \texttt{nameauth} environment,
13532 % but the shorthand macros that it creates are global.
13533 %
13534 % \begin{macrocode}
13535 \newenvironment{nameauth}
13536 {%
13537 \begingroup%
13538 \let\ex\expandafter%
13539 \csdef{<}##1&##2&##3&##4>%
13540 {%
13541 \protected@edef\@arga@{\trim@spaces{##1}}%
13542 \protected@edef\@larga@{L\trim@spaces{##1}}%
13543 \protected@edef\@sarga@{S\trim@spaces{##1}}%
13544 \protected@edef\@testb@{\trim@spaces{##2}}%
13545 \protected@edef\@testd@{\trim@spaces{##4}}%
13546 \@nameauth@etoksb\ex{##2}%
13547 \@nameauth@etoksc\ex{##3}%
13548 \@nameauth@etoksd\ex{##4}%
13549 % \end{macrocode}
13550 % The first argument must have some text to create a set of control
13551 % sequences with it. The third argument is the required name argument.
13552 % Lacking either will produce an error.
13553 % Redefining a shorthand only creates a warning.
13554 %
13555 % \begin{macrocode}
13556 \ifx\@arga@\@empty
13557 \PackageError{nameauth}%
13558 {environment nameauth: Macro name missing;
13559 \expandafter\detokenize\expandafter{##3}}%
13560 \fi
13561 \@nameauth@Error{##3}{macro \ex\zap@space\string\ \@empty##1}%
13562 \ifcsname\@arga@\endcsname
13563 \PackageWarning{nameauth}
13564 {Environment nameauth: shorthand macro already exists}%
13565 \fi
13566 % \end{macrocode}
13567 % Set up shorthands according to name form. We use \cmd{\expandafter}
13568 % due to \cmd{\protected@edef} in the naming macros. We begin with
13569 % Non-Western names that use the new syntax.
13570 %
13571 % \begin{macrocode}
13572 \ifx\@testd@\@empty
13573 \ifx\@testb@\@empty
13574 % \end{macrocode}
13575 % Standard name:
13576 %
13577 % \begin{macrocode}
13578 \ex\csgdef\ex{\ex\@arga@\ex}%
13579 \ex{\ex\NameauthName\ex{\the\@nameauth@etoksc}}%
13580 % \end{macrocode}
13581 % Long name:
13582 %
13583 % \begin{macrocode}
13584 \ex\csgdef\ex{\ex\@larga@\ex}%
13585 \ex{\ex\@nameauth@FullNametrue%
13586 \ex\NameauthLName\ex{\the\@nameauth@etoksc}}%
13587 % \end{macrocode}
13588 % Short name:
13589 %
13590 % \begin{macrocode}
13591 \ex\csgdef\ex{\ex\@sarga@\ex}%
13592 \ex{\ex\@nameauth@FirstNametrue%
13593 \ex\NameauthFName\ex{\the\@nameauth@etoksc}}%
13594 \else
13595 % \end{macrocode}
13596 % Next we have Western names with no alternate names.
13597 % Here we have two arguments to expand in reverse order,
13598 % so we need three uses, then one use of \cmd{\ex} per token.
13599 % \medskip
13600 %
13601 % \noindent Standard name:
13602 % \begin{macrocode}
13603 \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga@\ex\ex\ex}%
13604 \ex\ex\ex{\ex\ex\ex\NameauthName%
13605 \ex\ex\ex[\ex\the\ex\@nameauth@etoksb\ex]%
13606 \ex{\the\@nameauth@etoksc}}%
13607 % \end{macrocode}
13608 % Long name:
13609 %
13610 % \begin{macrocode}
13611 \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@larga@\ex\ex\ex}%
13612 \ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue%
13613 \ex\ex\ex\NameauthLName%
13614 \ex\ex\ex[\ex\the\ex\@nameauth@etoksb\ex]%
13615 \ex{\the\@nameauth@etoksc}}%
13616 % \end{macrocode}
13617 % Short name:
13618 %
13619 % \begin{macrocode}
13620 \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@sarga@\ex\ex\ex}%
13621 \ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue%
13622 \ex\ex\ex\NameauthFName%
13623 \ex\ex\ex[\ex\the\ex\@nameauth@etoksb\ex]%
13624 \ex{\the\@nameauth@etoksc}}%
13625 \fi
13626 \else
13627 % \end{macrocode}
13628 % Below are ``native'' Eastern names with alternates or
13629 % the older syntax. We again have two arguments to expand first.
13630 %
13631 % \medskip
13632 %
13633 % \noindent Standard name:
13634 % \begin{macrocode}
13635 \ifx\@testb@\@empty
13636 \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@arga@\ex\ex\ex}%
13637 \ex\ex\ex{\ex\ex\ex\NameauthName%
13638 \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}%
13639 \ex[\the\@nameauth@etoksd]}%
13640 % \end{macrocode}
13641 % Long name:
13642 %
13643 % \begin{macrocode}
13644 \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@larga@\ex\ex\ex}%
13645 \ex\ex\ex{\ex\ex\ex\@nameauth@FullNametrue%
13646 \ex\ex\ex\NameauthLName%
13647 \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}%
13648 \ex[\the\@nameauth@etoksd]}%
13649 % \end{macrocode}
13650 % Short name:
13651 %
13652 % \begin{macrocode}
13653 \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\@sarga@\ex\ex\ex}%
13654 \ex\ex\ex{\ex\ex\ex\@nameauth@FirstNametrue%
13655 \ex\ex\ex\NameauthFName%
13656 \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}%
13657 \ex[\the\@nameauth@etoksd]}%
13658 \else
13659 % \end{macrocode}
13660 % Here are Western names with alternates. We have three arguments
13661 % to expand, so we have seven uses, three uses, and one use of \cmd{\ex}.
13662 %
13663 % \medskip
13664 %
13665 % \noindent Standard name:
13666 % \begin{macrocode}
13667 \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
13668 \ex\ex\ex\ex\ex\ex\ex\@arga@\ex\ex\ex\ex\ex\ex\ex}%
13669 \ex\ex\ex\ex\ex\ex\ex{\ex\ex\ex\ex\ex\ex\ex\NameauthName%
13670 \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the%
13671 \ex\ex\ex\@nameauth@etoksb\ex\ex\ex]%
13672 \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}%
13673 \ex[\the\@nameauth@etoksd]}%
13674 % \end{macrocode}
13675 % Long name:
13676 %
13677 % \begin{macrocode}
13678 \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
13679 \ex\ex\ex\ex\ex\ex\ex\@larga@\ex\ex\ex\ex\ex\ex\ex}%
13680 \ex\ex\ex\ex\ex\ex\ex{%
13681 \ex\ex\ex\ex\ex\ex\ex\@nameauth@FullNametrue%
13682 \ex\ex\ex\ex\ex\ex\ex\NameauthLName%
13683 \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex%
13684 \@nameauth@etoksb\ex\ex\ex]%
13685 \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}%
13686 \ex[\the\@nameauth@etoksd]}%
13687 % \end{macrocode}
13688 % Short name:
13689 %
13690 % \begin{macrocode}
13691 \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
13692 \ex\ex\ex\ex\ex\ex\ex\@sarga@\ex\ex\ex\ex\ex\ex\ex}%
13693 \ex\ex\ex\ex\ex\ex\ex{%
13694 \ex\ex\ex\ex\ex\ex\ex\@nameauth@FirstNametrue%
13695 \ex\ex\ex\ex\ex\ex\ex\NameauthFName%
13696 \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex%
13697 \@nameauth@etoksb\ex\ex\ex]%
13698 \ex\ex\ex{\ex\the\ex\@nameauth@etoksc\ex}%
13699 \ex[\the\@nameauth@etoksd]}%
13700 \fi
13701 \fi\ignorespaces%
13702 }\ignorespaces%
13703 }
13704 {\endgroup\ignorespacesafterend}
13705 % \end{macrocode}
13706 % \end{environment}
13707 %
13708 % \subsubsection{Debugging Macros}
13709 %
13710 % \begin{macro}{\ShowPattern}
13711 % \changes{3.3}{2020/02/20}{Added}
13712 % \changes{3.7}{2023/02/03}{Redesigned}
13713 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
13714 % \changes{4.1}{2025/02/04}{Allow null args}
13715 % This macro shows a name pattern created by its arguments, unless
13716 % invoked with an empty argument. Then it returns \cmd{\NameauthPattern}
13717 % from the last name arguments that were evaluated.
13718 %
13719 % \begin{macrocode}
13720 \NewDocumentCommand{\ShowPattern}{O{} m O{}}
13721 {%
13722 \protected@edef\@nameauth@testname{\trim@spaces{#2}}%
13723 \unless\ifx\@nameauth@testname\@empty
13724 \@nameauth@Error{#2}{macro \string\ShowPattern}%
13725 \@nameauth@LoadArgs{#1}{#2}{#3}%
13726 \@nameauth@Choice{}{}{}\NameauthPattern%
13727 \else\NameauthPattern\fi
13728 }
13729 % \end{macrocode}
13730 % \end{macro}
13731 %
13732 % \begin{macro}{\ShowIdxPageref}
13733 % \changes{3.3}{2020/02/20}{Added}
13734 % \changes{3.5}{2020/11/23}{Fix name space, use Boolean flags}
13735 % \changes{3.7}{2023/02/03}{Use common back-end}
13736 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
13737 % \changes{4.1}{2025/02/04}{Allow null args}
13738 % \begin{macro}{\ShowIdxPageref*}\end{macro}\vspace{-2.7ex}
13739 % \noindent Show an index page entry appearance for the given
13740 % name arguments or, if a null argument is given, show an entry
13741 % for the name arguments in the token registers.
13742 % \begin{macrocode}
13743 \NewDocumentCommand{\ShowIdxPageref}{s O{} m O{}}
13744 {%
13745 \begingroup%
13746 \let\ex\expandafter%
13747 \IfBooleanTF {#1}%
13748 % \end{macrocode}
13749 % The starred form displays a basic index entry with no tag.
13750 %
13751 % \begin{macrocode}
13752 {%
13753 \protected@edef\@nameauth@testname{\trim@spaces{#3}}%
13754 \unless\ifx\@nameauth@testname\@empty
13755 \@nameauth@Error{#3}{macro \string\ShowIdxPageref*}%
13756 \@nameauth@LoadArgs{#2}{#3}{#4}%
13757 \@nameauth@IdxPageref{#2}{#3}{#4}%
13758 \else
13759 % \end{macrocode}
13760 % Pull name arguments from the token regs.
13761 %
13762 % \begin{macrocode}
13763 \ex\ex\ex\ex\ex\ex\ex\@nameauth@LoadArgs%
13764 \ex\ex\ex\ex\ex\ex\ex{%
13765 \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex}%
13766 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
13767 \ex{\the\@nameauth@toksc}%
13768 \ex\ex\ex\ex\ex\ex\ex\@nameauth@IdxPageref%
13769 \ex\ex\ex\ex\ex\ex\ex{%
13770 \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex}%
13771 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
13772 \ex{\the\@nameauth@toksc}%
13773 \fi
13774 }%
13775 % \end{macrocode}
13776 % The un-starred form displays (expanded, as printed) the index
13777 % entry that will be generated, but not exactly what is in the
13778 % \texttt{idx} file.
13779 %
13780 % \begin{macrocode}
13781 {%
13782 \global\@nameauth@LongIdxDebugtrue%
13783 \protected@edef\@nameauth@testname{\trim@spaces{#3}}%
13784 \unless\ifx\@nameauth@testname\@empty
13785 \@nameauth@Error{#3}{macro \string\ShowIdxPageref}%
13786 \@nameauth@LoadArgs{#2}{#3}{#4}%
13787 \@nameauth@IdxPageref{#2}{#3}{#4}%
13788 \else
13789 % \end{macrocode}
13790 % Pull name arguments from the token regs.
13791 %
13792 % \begin{macrocode}
13793 \ex\ex\ex\ex\ex\ex\ex\@nameauth@LoadArgs%
13794 \ex\ex\ex\ex\ex\ex\ex{%
13795 \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex}%
13796 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
13797 \ex{\the\@nameauth@toksc}%
13798 \ex\ex\ex\ex\ex\ex\ex\@nameauth@IdxPageref%
13799 \ex\ex\ex\ex\ex\ex\ex{%
13800 \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex}%
13801 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
13802 \ex{\the\@nameauth@toksc}%
13803 \fi
13804 }%
13805 \endgroup%
13806 }
13807 % \end{macrocode}
13808 % \end{macro}
13809 %
13810 % \begin{macro}{\ShowNameInfo}
13811 % \changes{3.7}{2023/02/03}{Added}
13812 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
13813 % \changes{4.1}{2025/02/04}{Allow null args}
13814 % Show how the name arguments are interpreted by the \textsf{nameauth}
13815 % macros, but as detokenized text. If a null argument is given, use the
13816 % arguments in the token regs, left from the last name evaluated.
13817 % The starred form puts the separate data on different lines.
13818 %
13819 % \begin{macrocode}
13820 \NewDocumentCommand{\ShowNameInfo}{O{} m O{}}
13821 {%
13822 \begingroup%
13823 \let\ex\expandafter%
13824 % \end{macrocode}
13825 % Test for bad input, then load the argument values into
13826 % the appropriate macros.
13827 %
13828 % \begin{macrocode}
13829 \protected@edef\@nameauth@testname{\trim@spaces{#2}}%
13830 \unless\ifx\@nameauth@testname\@empty
13831 \@nameauth@Error{#2}{macro \string\ShowNameInfo}%
13832 \@nameauth@LoadArgs{#1}{#2}{#3}%
13833 \else
13834 % \end{macrocode}
13835 % In the case of a null argument,
13836 % load name arguments from the token regs.
13837 %
13838 % \begin{macrocode}
13839 \ex\ex\ex\ex\ex\ex\ex\@nameauth@LoadArgs%
13840 \ex\ex\ex\ex\ex\ex\ex{%
13841 \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex}%
13842 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
13843 \ex{\the\@nameauth@toksc}%
13844 \fi
13845 \protected@edef\@nameauth@cleanA
13846 {\expandafter\detokenize\expandafter{\@nameauth@A}}%
13847 \protected@edef\@nameauth@cleanB
13848 {\expandafter\detokenize\expandafter{\@nameauth@B}}%
13849 \protected@edef\@nameauth@cleanSB
13850 {\expandafter\detokenize\expandafter{\@nameauth@SB}}%
13851 \protected@edef\@nameauth@cleanC
13852 {\expandafter\detokenize\expandafter{\@nameauth@C}}%
13853 % \end{macrocode}
13854 % First we have Non-Western names using the current syntax.
13855 %
13856 % \begin{macrocode}
13857 \@nameauth@Choice
13858 {%
13859 (SNN: \@nameauth@cleanB)%
13860 \unless\ifx\@nameauth@SB\@empty
13861 \ (Affix*: \@nameauth@cleanSB)%
13862 \fi
13863 \unless\ifx\@nameauth@C\@empty
13864 \ (Alt: \@nameauth@cleanC)%
13865 \fi
13866 }%
13867 % \end{macrocode}
13868 % Next is Non-Western names using the obsolete syntax.
13869 %
13870 % \begin{macrocode}
13871 {%
13872 (SNN: \@nameauth@cleanB)%
13873 \unless\ifx\@nameauth@C\@empty
13874 \ (Alt*: \@nameauth@cleanC)%
13875 \fi
13876 }%
13877 % \end{macrocode}
13878 % Finally we have Western names.
13879 %
13880 % \begin{macrocode}
13881 {%
13882 (FNN: \@nameauth@cleanA)
13883 (SNN: \@nameauth@cleanB)%
13884 \unless\ifx\@nameauth@SB\@empty
13885 \ (Affix: \@nameauth@cleanSB)%
13886 \fi
13887 \unless\ifx\@nameauth@C\@empty
13888 \ (Alt: \@nameauth@cleanC)%
13889 \fi
13890 }%
13891 \endgroup%
13892 }
13893 % \end{macrocode}
13894 % \end{macro}
13895 %
13896 % \begin{macro}{\ShowNameState}
13897 % \changes{3.7}{2023/02/03}{Added}
13898 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
13899 % \changes{4.1}{2025/02/04}{Allow null args, add starred form, improve output}
13900 % \begin{macro}{\ShowNameState*}\end{macro}\vspace{-2.7ex}
13901 % These macros show the user the name pattern, name type, index state,
13902 % and name systems of a given name. The un-starred form prints on one
13903 % line; the starred form, multiple lines. If a null argument
13904 % is given, they use the arguments from the last printed name.
13905 %
13906 % \begin{macrocode}
13907 \NewDocumentCommand{\ShowNameState}{s O{} m O{}}
13908 {%
13909 % \end{macrocode}
13910 % Create a local scope to kill any local definitions on exit.
13911 % Test for bad input, then load the argument values into
13912 % the appropriate macros. Test for a star and set the break
13913 % to |\par| or a space.
13914 %
13915 % \begin{macrocode}
13916 \begingroup%
13917 \IfBooleanTF{#1}
13918 {\def\@nameauth@break{\par}}
13919 {\def\@nameauth@break{ }}
13920 \let\ex\expandafter%
13921 \protected@edef\@nameauth@testname{\trim@spaces{#3}}%
13922 \unless\ifx\@nameauth@testname\@empty
13923 \@nameauth@Error{#3}{macro \string\ShowNameState}%
13924 \@nameauth@LoadArgs{#2}{#3}{#4}%
13925 \else
13926 % \end{macrocode}
13927 % Pull name arguments from the token regs.
13928 %
13929 % \begin{macrocode}
13930 \ex\ex\ex\ex\ex\ex\ex\@nameauth@LoadArgs%
13931 \ex\ex\ex\ex\ex\ex\ex{%
13932 \ex\ex\ex\the\ex\ex\ex\@nameauth@toksa\ex\ex\ex}%
13933 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
13934 \ex{\the\@nameauth@toksc}%
13935 \fi
13936 % \end{macrocode}
13937 % Parse the name arguments and determine name type. We use this method
13938 % instead of examining the Boolean flags because it is more efficient here.
13939 %
13940 % \begin{macrocode}
13941 \@nameauth@Choice
13942 {\def\@nameauth@nametype{nw}}
13943 {\def\@nameauth@nametype{nw,os}}
13944 {\def\@nameauth@nametype{w}}
13945 % \end{macrocode}
13946 % Check to see what control sequences exist and collect the information.
13947 %
13948 % \begin{macrocode}
13949 \ifcsname\NameauthPattern!MN\endcsname
13950 \def\@nameauth@mainname{main}%
13951 \fi
13952 \ifcsname\NameauthPattern!NF\endcsname
13953 \def\@nameauth@frontname{front}%
13954 \fi
13955 \ifcsname\NameauthPattern!PN\endcsname
13956 \edef\@nameauth@testex
13957 {\csname\NameauthPattern!PN\endcsname}%
13958 \ifx\@nameauth@testex\@nameauth@Exclude
13959 \def\@nameauth@excl{excl}%
13960 \else
13961 \def\@nameauth@xref{xref}%
13962 \fi
13963 \fi
13964 \ifcsname\NameauthPattern!PRE\endcsname
13965 \def\@nameauth@pre{pretag}%
13966 \fi
13967 \ifcsname\NameauthPattern!TAG\endcsname
13968 \def\@nameauth@tag{idxtag}%
13969 \fi
13970 \ifcsname\NameauthPattern!DB\endcsname
13971 \def\@nameauth@db{namedb}%
13972 \fi
13973 % \end{macrocode}
13974 % If either a main name or a front name exist, create a macro
13975 % that reflects this condition.
13976 %
13977 % \begin{macrocode}
13978 \ifdefined \@nameauth@mainname \def\@nameauth@namecs{}\fi
13979 \ifdefined \@nameauth@frontname \def\@nameauth@namecs{}\fi
13980 % \end{macrocode}
13981 % If an xref and an exclusion exist for a name, something went wrong.
13982 %
13983 % \begin{macrocode}
13984 \ifdefined \@nameauth@xref
13985 \ifdefined \@nameauth@excl
13986 \PackageWarning{nameauth}
13987 {Both xref and exclusion exist for \NameauthPattern}%
13988 \fi
13989 \fi
13990 % \end{macrocode}
13991 % Determine the state of the ``index finite state machine''.
13992 %
13993 % \begin{macrocode}
13994 \ifdefined \@nameauth@namecs
13995 \def\@nameauth@idxstate{2}%
13996 \ifdefined \@nameauth@xref
13997 \def\@nameauth@idxstate{4}%
13998 \fi
13999 \ifdefined \@nameauth@excl
14000 \def\@nameauth@idxstate{6}%
14001 \fi
14002 \else
14003 \ifdefined \@nameauth@xref
14004 \def\@nameauth@idxstate{3}%
14005 \ifdefined \@nameauth@excl
14006 \def\@nameauth@idxstate{5}%
14007 \fi
14008 \else
14009 \def\@nameauth@idxstate{1}%
14010 \def\@nameauth@nosystem{none}%
14011 \fi
14012 \fi
14013 % \end{macrocode}
14014 % Display the output.
14015 %
14016 % \begin{macrocode}
14017 Pattern: \NameauthPattern\@nameauth@break
14018 Type: \@nameauth@nametype\@nameauth@break
14019 State: \@nameauth@idxstate\@nameauth@break
14020 Systems:%
14021 \ifdefined \@nameauth@nosystem\ \@nameauth@nosystem \fi
14022 \ifdefined \@nameauth@mainname\ \@nameauth@mainname \fi
14023 \ifdefined \@nameauth@frontname\ \@nameauth@frontname \fi
14024 \ifdefined \@nameauth@xref\ \@nameauth@xref \fi
14025 \ifdefined \@nameauth@excl\ \@nameauth@excl \fi
14026 \ifdefined \@nameauth@pre\ \@nameauth@pre \fi
14027 \ifdefined \@nameauth@tag\ \@nameauth@tag \fi
14028 \ifdefined \@nameauth@db\ \@nameauth@db \fi
14029 \endgroup%
14030 }
14031 % \end{macrocode}
14032 % \end{macro}
14033 %
14034 % \newpage
14035 %
14036 % \subsubsection{Indexing}
14037 %
14038 % \begin{macro}{\IndexName}
14039 % \changes{1.26}{2012/04/24}{Fix affixes}
14040 % \changes{2.0}{2015/11/11}{Fix spaces, tagging}
14041 % \changes{2.6}{2016/09/19}{Fix commas}
14042 % \changes{3.0}{2016/10/26}{Redesigned}
14043 % \changes{3.1}{2017/01/13}{Better tests}
14044 % \changes{3.5}{2020/11/23}{New warnings, new exclusion test,
14045 % improve logic, fix namespace}
14046 % \changes{3.7}{2023/02/03}{Fix warnings}
14047 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14048 % \changes{4.1}{2025/02/04}{Use updated \cmd{\@nameauth@Index}}
14049 % This creates an index entry with page entries. It warns if
14050 % the \cmd{\SkipIndex} prefix macro was used before it was called.
14051 % It issues additional warnings if the \texttt{verbose} option is selected.
14052 % It prints nothing.
14053 %
14054 % \begin{macrocode}
14055 \NewDocumentCommand{\IndexName}{O{} m O{}}
14056 {%
14057 % \end{macrocode}
14058 % Process and load the arguments; test for malformed input.
14059 %
14060 % \begin{macrocode}
14061 \@nameauth@LoadArgs{#1}{#2}{#3}%
14062 \@nameauth@Error{#2}{macro \string\IndexName}%
14063 % \end{macrocode}
14064 % Warn if \cmd{\SkipIndex} was called before \cmd{\IndexName} and reset
14065 % it unless the \texttt{oldreset} option was used.
14066 %
14067 % \begin{macrocode}
14068 \if@nameauth@SkipIndex
14069 \PackageWarning{nameauth}
14070 {\string\SkipIndex precedes \string\IndexName; check for issues}%
14071 \unless\if@nameauth@OldReset
14072 \@nameauth@SkipIndexfalse%
14073 \fi
14074 \fi
14075 % \end{macrocode}
14076 % Warn if \cmd{\SeeAlso} was called before \cmd{\IndexName} and reset it.
14077 %
14078 % \begin{macrocode}
14079 \unless\if@nameauth@OldReset
14080 \if@nameauth@SeeAlso
14081 \global\@nameauth@SeeAlsofalse%
14082 \PackageWarning{nameauth}{\string\SeeAlso was reset}%
14083 \fi
14084 \fi
14085 % \end{macrocode}
14086 % Enter a local scope, and if so forced, enable indexing only
14087 % within that scope.
14088 % Create the appropriate index entries, calling \cmd{\@nameauth@Index}
14089 % to handle sorting and tagging. We do not create an index entry for a
14090 % cross-reference or exclusion.
14091 %
14092 % Non-Western names. We ignore \cmd{\@nameauth@C}.
14093 %
14094 % \begin{macrocode}
14095 \@nameauth@Choice
14096 {%
14097 \def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2}}%
14098 \ifcsname\@nameauth@csb!PN\endcsname
14099 % \end{macrocode}
14100 % Verbose warnings: Does an exclusion or cross-reference exist?
14101 %
14102 % \begin{macrocode}
14103 \if@nameauth@Verbose
14104 \edef\@nameauth@testex
14105 {\csname\@nameauth@csb!PN\endcsname}%
14106 \ifx\@nameauth@testex\@nameauth@Exclude
14107 \PackageWarning{nameauth}
14108 {\string\IndexName: exclusion exists \@nameauth@Temp}%
14109 \else
14110 \PackageWarning{nameauth}
14111 {\string\IndexName: xref exists \@nameauth@Temp}%
14112 \fi
14113 \fi
14114 \else
14115 % \end{macrocode}
14116 % \newpage
14117 % \noindent Mononym entry
14118 %
14119 % \begin{macrocode}
14120 \ifx\@nameauth@SB\@empty
14121 \@nameauth@Index{\@nameauth@csb}{\@nameauth@B}{}%
14122 \else
14123 % \end{macrocode}
14124 % Non-Western entry
14125 %
14126 % \begin{macrocode}
14127 \@nameauth@Index{\@nameauth@csb}
14128 {\@nameauth@B\@nameauth@space\@nameauth@SB}{}%
14129 \fi
14130 \fi
14131 }%
14132 % \end{macrocode}
14133 % Non-Western names, obsolete syntax.
14134 % Using \cmd{\@nameauth@C} affects indexing here.
14135 %
14136 % \begin{macrocode}
14137 {%
14138 \def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2 #3}}%
14139 \ifcsname\@nameauth@csbc!PN\endcsname
14140 % \end{macrocode}
14141 % Verbose warnings: Does an exclusion or cross-reference exist?
14142 %
14143 % \begin{macrocode}
14144 \if@nameauth@Verbose
14145 \edef\@nameauth@testex
14146 {\csname\@nameauth@csbc!PN\endcsname}%
14147 \ifx\@nameauth@testex\@nameauth@Exclude
14148 \PackageWarning{nameauth}
14149 {\string\IndexName: exclusion exists \@nameauth@Temp}%
14150 \else
14151 \PackageWarning{nameauth}
14152 {\string\IndexName: xref exists \@nameauth@Temp}%
14153 \fi
14154 \fi
14155 \else
14156 % \end{macrocode}
14157 % Non-Western entry
14158 %
14159 % \begin{macrocode}
14160 \@nameauth@Index{\@nameauth@csbc}
14161 {\@nameauth@B\@nameauth@space\@nameauth@C}{}%
14162 \fi
14163 }%
14164 % \end{macrocode}
14165 % Western names.
14166 % We ignore \cmd{\@nameauth@C} and handle \cmd{\@nameauth@SB}.
14167 %
14168 % \begin{macrocode}
14169 {%
14170 \def\@nameauth@Temp{\expandafter\detokenize\expandafter{#1 #2}}%
14171 \ifcsname\@nameauth@csab!PN\endcsname
14172 % \end{macrocode}
14173 % Verbose warnings: Does an exclusion or cross-reference exist?
14174 %
14175 % \begin{macrocode}
14176 \if@nameauth@Verbose
14177 \edef\@nameauth@testex
14178 {\csname\@nameauth@csab!PN\endcsname}%
14179 \ifx\@nameauth@testex\@nameauth@Exclude
14180 \PackageWarning{nameauth}
14181 {\string\IndexName: exclusion exists \@nameauth@Temp}%
14182 \else
14183 \PackageWarning{nameauth}
14184 {\string\IndexName: xref exists \@nameauth@Temp}%
14185 \fi
14186 \fi
14187 \else
14188 % \end{macrocode}
14189 % Western entry, no affix
14190 %
14191 % \begin{macrocode}
14192 \ifx\@nameauth@SB\@empty
14193 \@nameauth@Index{\@nameauth@csab}
14194 {\@nameauth@B,\@nameauth@space\@nameauth@A}{}%
14195 \else
14196 % \end{macrocode}
14197 % Western entry, with affix
14198 %
14199 % \begin{macrocode}
14200 \@nameauth@Index{\@nameauth@csab}
14201 {\@nameauth@B,\@nameauth@space%
14202 \@nameauth@A,\@nameauth@space\@nameauth@SB}{}%
14203 \fi
14204 \fi
14205 }%
14206 }
14207 % \end{macrocode}
14208 % \end{macro}
14209 %
14210 % \begin{macro}{\IndexRef}
14211 % \changes{3.0}{2016/10/26}{Added}
14212 % \changes{3.1}{2017/01/13}{Better tests}
14213 % \changes{3.3}{2020/02/20}{Global flag reset}
14214 % \changes{3.5}{2020/11/23}{Strict \textit{see} refs, new warnings,
14215 % new exclusion test, improve logic, fix namespace}
14216 % \changes{3.7}{2023/02/03}{Fix warnings}
14217 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14218 % \changes{4.1}{2025/02/04}{Use updated \cmd{\@nameauth@Index}}
14219 % Create a cross-reference that is not already an exclusion or
14220 % a cross-reference.
14221 %
14222 % \begin{macrocode}
14223 \NewDocumentCommand{\IndexRef}{O{} m O{} m}
14224 {%
14225 % \end{macrocode}
14226 % Process and load the arguments into the appropriate macros.
14227 %
14228 % \begin{macrocode}
14229 \@nameauth@LoadArgs{#1}{#2}{#3}%
14230 \protected@edef\@nameauth@Target{#4}%
14231 % \end{macrocode}
14232 % Test for malformed input.
14233 %
14234 % \begin{macrocode}
14235 \@nameauth@Error{#2}{macro \string\IndexRef}%
14236 % \end{macrocode}
14237 % Warn if \cmd{\SkipIndex} was called before \cmd{\IndexName},
14238 % and reset it unless the \texttt{oldreset} option was used.
14239 %
14240 % \begin{macrocode}
14241 \if@nameauth@SkipIndex
14242 \PackageWarning{nameauth}
14243 {\string\SkipIndex preceded \string\IndexRef; check for issues}%
14244 \unless\if@nameauth@OldReset
14245 \@nameauth@SkipIndexfalse%
14246 \fi
14247 \fi
14248 \@nameauth@Choice
14249 % \end{macrocode}
14250 % Non-Western name, new syntax, no \meta{Affix}
14251 %
14252 % \begin{macrocode}
14253 {%
14254 \def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2}}%
14255 \ifcsname\@nameauth@csb!PN\endcsname
14256 % \end{macrocode}
14257 % Verbose warnings: Does an exclusion or cross-reference exist?
14258 %
14259 % \begin{macrocode}
14260 \if@nameauth@Verbose
14261 \edef\@nameauth@testex
14262 {\csname\@nameauth@csb!PN\endcsname}%
14263 \ifx\@nameauth@testex\@nameauth@Exclude
14264 \PackageWarning{nameauth}
14265 {\string\IndexRef: exclusion exists \@nameauth@Temp}%
14266 \else
14267 \PackageWarning{nameauth}
14268 {\string\IndexRef: xref exists \@nameauth@Temp}%
14269 \fi
14270 \fi
14271 \else
14272 % \end{macrocode}
14273 % If no xref or exclusion exists, proceed. If creating
14274 % a \textit{see also} reference, just do it.
14275 %
14276 % \begin{macrocode}
14277 \ifx\@nameauth@SB\@empty
14278 \if@nameauth@SeeAlso
14279 \@nameauth@Index[seealso]{\@nameauth@csb}
14280 {\@nameauth@B}{\@nameauth@Target}%
14281 \csgdef{\@nameauth@csb!PN}{}%
14282 \else
14283 % \end{macrocode}
14284 % When creating a \textit{see} reference, check if a name
14285 % already exists. If so, skip and warn.
14286 %
14287 % \begin{macrocode}
14288 \unless\if@nameauth@OldSee
14289 \unless\ifcsname\@nameauth@csb!MN\endcsname
14290 \unless\ifcsname\@nameauth@csb!NF\endcsname
14291 \@nameauth@Index[see]{\@nameauth@csb}
14292 {\@nameauth@B}{\@nameauth@Target}%
14293 \csgdef{\@nameauth@csb!PN}{}%
14294 \else
14295 \PackageWarning{nameauth}
14296 {\string\IndexRef: extant name;
14297 no xref \@nameauth@Temp}%
14298 \fi
14299 \else
14300 \PackageWarning{nameauth}
14301 {\string\IndexRef: extant name;
14302 no xref \@nameauth@Temp}%
14303 \fi
14304 \else
14305 % \end{macrocode}
14306 % Extra verbose warnings and old behavior
14307 %
14308 % \begin{macrocode}
14309 \if@nameauth@Verbose
14310 \PackageWarning{nameauth}
14311 {\string\IndexRef: non-strict xref \@nameauth@Temp}%
14312 \fi
14313 \@nameauth@Index[see]{\@nameauth@csb}
14314 {\@nameauth@B}{\@nameauth@Target}%
14315 \csgdef{\@nameauth@csb!PN}{}%
14316 \fi
14317 \fi
14318 \else
14319 % \end{macrocode}
14320 % Non-Western name, new syntax, \meta{Affix} exists; create
14321 % a \textit{see also} reference if needed.
14322 %
14323 % \begin{macrocode}
14324 \if@nameauth@SeeAlso
14325 \@nameauth@Index[seealso]{\@nameauth@csb}
14326 {\@nameauth@B\@nameauth@space%
14327 \@nameauth@SB}{\@nameauth@Target}%
14328 \csgdef{\@nameauth@csb!PN}{}%
14329 \else
14330 % \end{macrocode}
14331 % \newpage
14332 % \noindent When creating a \textit{see} reference, check if a name
14333 % already exists. If so, skip and warn.
14334 %
14335 % \begin{macrocode}
14336 \unless\if@nameauth@OldSee
14337 \unless\ifcsname\@nameauth@csb!MN\endcsname
14338 \unless\ifcsname\@nameauth@csb!NF\endcsname
14339 \@nameauth@Index[see]{\@nameauth@csb}
14340 {\@nameauth@B\@nameauth@space%
14341 \@nameauth@SB}{\@nameauth@Target}%
14342 \csgdef{\@nameauth@csb!PN}{}%
14343 \else
14344 \PackageWarning{nameauth}
14345 {\string\IndexRef: extant name;
14346 no xref \@nameauth@Temp}%
14347 \fi
14348 \else
14349 \PackageWarning{nameauth}
14350 {\string\IndexRef: extant name;
14351 no xref \@nameauth@Temp}%
14352 \fi
14353 \else
14354 % \end{macrocode}
14355 % Extra verbose warnings and old behavior
14356 %
14357 % \begin{macrocode}
14358 \if@nameauth@Verbose
14359 \PackageWarning{nameauth}
14360 {\string\IndexRef: non-strict xref \@nameauth@Temp}%
14361 \fi
14362 \@nameauth@Index[see]{\@nameauth@csb}
14363 {\@nameauth@B\@nameauth@space%
14364 \@nameauth@SB}{\@nameauth@Target}%
14365 \csgdef{\@nameauth@csb!PN}{}%
14366 \fi
14367 \fi
14368 \fi
14369 \fi
14370 }%
14371 % \end{macrocode}
14372 % Eastern or ancient name, obsolete syntax
14373 %
14374 % \begin{macrocode}
14375 {%
14376 \def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2 #3}}%
14377 \ifcsname\@nameauth@csbc!PN\endcsname
14378 % \end{macrocode}
14379 % Verbose warnings: Does an exclusion or cross-reference exist?
14380 %
14381 % \begin{macrocode}
14382 \if@nameauth@Verbose
14383 \edef\@nameauth@testex
14384 {\csname\@nameauth@csbc!PN\endcsname}%
14385 \ifx\@nameauth@testex\@nameauth@Exclude
14386 \PackageWarning{nameauth}
14387 {\string\IndexRef: exclusion exists \@nameauth@Temp}%
14388 \else
14389 \PackageWarning{nameauth}
14390 {\string\IndexRef: xref exists \@nameauth@Temp}%
14391 \fi
14392 \fi
14393 \else
14394 % \end{macrocode}
14395 % \newpage
14396 % \noindent If no xref or exclusion exists, proceed. If creating
14397 % a \textit{see also} reference, just do it.
14398 %
14399 % \begin{macrocode}
14400 \if@nameauth@SeeAlso
14401 \@nameauth@Index[seealso]{\@nameauth@csbc}
14402 {\@nameauth@B\@nameauth@space\@nameauth@C}
14403 {\@nameauth@Target}%
14404 \csgdef{\@nameauth@csbc!PN}{}%
14405 \else
14406 % \end{macrocode}
14407 % When creating a \textit{see} reference, check if a name
14408 % already exists. If so, skip and warn.
14409 %
14410 % \begin{macrocode}
14411 \unless\if@nameauth@OldSee
14412 \unless\ifcsname\@nameauth@csbc!MN\endcsname
14413 \unless\ifcsname\@nameauth@csbc!NF\endcsname
14414 \@nameauth@Index[see]{\@nameauth@csbc}
14415 {\@nameauth@B\@nameauth@space\@nameauth@C}
14416 {\@nameauth@Target}%
14417 \csgdef{\@nameauth@csbc!PN}{}%
14418 \else
14419 \PackageWarning{nameauth}
14420 {\string\IndexRef: extant name;
14421 no xref \@nameauth@Temp}%
14422 \fi
14423 \else
14424 \PackageWarning{nameauth}
14425 {\string\IndexRef: extant name;
14426 no xref \@nameauth@Temp}%
14427 \fi
14428 \else
14429 % \end{macrocode}
14430 % Extra verbose warnings and old behavior
14431 %
14432 % \begin{macrocode}
14433 \if@nameauth@Verbose
14434 \PackageWarning{nameauth}
14435 {\string\IndexRef: non-strict xref \@nameauth@Temp}%
14436 \fi
14437 \@nameauth@Index[see]{\@nameauth@csbc}
14438 {\@nameauth@B\@nameauth@space\@nameauth@C}
14439 {\@nameauth@Target}%
14440 \csgdef{\@nameauth@csbc!PN}{}%
14441 \fi
14442 \fi
14443 \fi
14444 }%
14445 % \end{macrocode}
14446 % Western name
14447 %
14448 % \begin{macrocode}
14449 {%
14450 \def\@nameauth@Temp{\expandafter\detokenize\expandafter{#1 #2}}%
14451 \ifcsname\@nameauth@csab!PN\endcsname
14452 % \end{macrocode}
14453 % \newpage
14454 % \noindent Verbose warnings: Does an exclusion or cross-reference exist?
14455 %
14456 % \begin{macrocode}
14457 \if@nameauth@Verbose
14458 \edef\@nameauth@testex
14459 {\csname\@nameauth@csab!PN\endcsname}%
14460 \ifx\@nameauth@testex\@nameauth@Exclude
14461 \PackageWarning{nameauth}
14462 {\string\IndexRef: exclusion exists \@nameauth@Temp}%
14463 \else
14464 \PackageWarning{nameauth}
14465 {\string\IndexRef: xref exists \@nameauth@Temp}%
14466 \fi
14467 \fi
14468 \else
14469 % \end{macrocode}
14470 % If no xref or exclusion exists, proceed.
14471 % Process names without an affix.
14472 % If creating a \textit{see also} reference, just do it.
14473 %
14474 % \begin{macrocode}
14475 \ifx\@nameauth@SB\@empty
14476 \if@nameauth@SeeAlso
14477 \@nameauth@Index[seealso]{\@nameauth@csab}
14478 {\@nameauth@B,\@nameauth@space\@nameauth@A}
14479 {\@nameauth@Target}%
14480 \csgdef{\@nameauth@csab!PN}{}%
14481 \else
14482 % \end{macrocode}
14483 % When creating a \textit{see} reference, check if a name
14484 % already exists. If so, skip and warn.
14485 %
14486 % \begin{macrocode}
14487 \unless\if@nameauth@OldSee
14488 \unless\ifcsname\@nameauth@csab!MN\endcsname
14489 \unless\ifcsname\@nameauth@csab!NF\endcsname
14490 \@nameauth@Index[see]{\@nameauth@csab}
14491 {\@nameauth@B,\@nameauth@space\@nameauth@A}
14492 {\@nameauth@Target}%
14493 \csgdef{\@nameauth@csab!PN}{}%
14494 \else
14495 \PackageWarning{nameauth}
14496 {\string\IndexRef: extant name;
14497 no xref \@nameauth@Temp}%
14498 \fi
14499 \else
14500 \PackageWarning{nameauth}
14501 {\string\IndexRef: extant name;
14502 no xref \@nameauth@Temp}%
14503 \fi
14504 \else
14505 % \end{macrocode}
14506 % Extra verbose warnings and old behavior
14507 %
14508 % \begin{macrocode}
14509 \if@nameauth@Verbose
14510 \PackageWarning{nameauth}
14511 {\string\IndexRef: non-strict xref \@nameauth@Temp}%
14512 \fi
14513 \@nameauth@Index[see]{\@nameauth@csab}
14514 {\@nameauth@B,\@nameauth@space\@nameauth@A}
14515 {\@nameauth@Target}%
14516 \csgdef{\@nameauth@csab!PN}{}%
14517 \fi
14518 \fi
14519 \else
14520 % \end{macrocode}
14521 % Process names with an affix.
14522 % If creating a \textit{see also} reference, just do it.
14523 %
14524 % \begin{macrocode}
14525 \if@nameauth@SeeAlso
14526 \@nameauth@Index[seealso]{\@nameauth@csab}
14527 {\@nameauth@B,\@nameauth@space%
14528 \@nameauth@A,\@nameauth@space\@nameauth@SB}
14529 {\@nameauth@Target}%
14530 \csgdef{\@nameauth@csab!PN}{}%
14531 \else
14532 % \end{macrocode}
14533 % When creating a \textit{see} reference, check if a name
14534 % already exists. If so, skip and warn.
14535 %
14536 % \begin{macrocode}
14537 \unless\if@nameauth@OldSee
14538 \unless\ifcsname\@nameauth@csab!MN\endcsname
14539 \unless\ifcsname\@nameauth@csab!NF\endcsname
14540 \@nameauth@Index[see]{\@nameauth@csab}
14541 {\@nameauth@B,\@nameauth@space%
14542 \@nameauth@A,\@nameauth@space\@nameauth@SB}
14543 {\@nameauth@Target}%
14544 \csgdef{\@nameauth@csab!PN}{}%
14545 \else
14546 \PackageWarning{nameauth}
14547 {\string\IndexRef: extant name;
14548 no xref \@nameauth@Temp}%
14549 \fi
14550 \else
14551 \PackageWarning{nameauth}
14552 {\string\IndexRef: extant name;
14553 no xref \@nameauth@Temp}%
14554 \fi
14555 \else
14556 % \end{macrocode}
14557 % Extra verbose warnings and old behavior
14558 %
14559 % \begin{macrocode}
14560 \if@nameauth@Verbose
14561 \PackageWarning{nameauth}
14562 {\string\IndexRef: non-strict xref \@nameauth@Temp}%
14563 \fi
14564 \@nameauth@Index[see]{\@nameauth@csab}
14565 {\@nameauth@B,\@nameauth@space%
14566 \@nameauth@A,\@nameauth@space\@nameauth@SB}
14567 {\@nameauth@Target}%
14568 \csgdef{\@nameauth@csab!PN}{}%
14569 \fi
14570 \fi
14571 \fi
14572 \fi
14573 }%
14574 % \end{macrocode}
14575 % Reset the \textit{see also} flag to false.
14576 %
14577 % \begin{macrocode}
14578 \if@nameauth@OldReset
14579 \@nameauth@SeeAlsofalse%
14580 \else
14581 \global\@nameauth@SeeAlsofalse%
14582 \fi
14583 }
14584 % \end{macrocode}
14585 % \end{macro}
14586 % \newpage
14587 %
14588 % \begin{macro}{\ExcludeName}
14589 % \changes{0.94}{2012/02/15}{Added}
14590 % \changes{2.3}{2016/01/05}{New xref test}
14591 % \changes{3.0}{2016/10/26}{Redesigned}
14592 % \changes{3.3}{2020/02/20}{Better warnings}
14593 % \changes{3.5}{2020/11/23}{New warnings, new exclusion test,
14594 % fix bug in old syntax, new logic, fix namespace}
14595 % \changes{3.7}{2023/02/03}{Fix warnings, optimized}
14596 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14597 % Prevent a name from being indexed by initializing a regular
14598 % cross-reference control sequence with the value of
14599 % \cmd{\@nameauth@Exclude}.
14600 %
14601 % \begin{macrocode}
14602 \NewDocumentCommand{\ExcludeName}{O{} m O{}}
14603 {%
14604 % \end{macrocode}
14605 % Process and load the arguments into the appropriate macros.
14606 %
14607 % \begin{macrocode}
14608 \@nameauth@LoadArgs{#1}{#2}{#3}%
14609 \@nameauth@Error{#2}{macro \string\ExcludeName}%
14610 % \end{macrocode}
14611 % Parse the name arguments and create an excluded xref,
14612 % unless one already exists.
14613 %
14614 % \begin{macrocode}
14615 \@nameauth@Choice
14616 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2}}}
14617 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2 #3}}}
14618 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#1 #2}}}%
14619 % \end{macrocode}
14620 % Verbose warnings say that an extant name is being excluded;
14621 % the operation is allowed.
14622 %
14623 % \begin{macrocode}
14624 \if@nameauth@Verbose
14625 \ifcsname\NameauthPattern!MN\endcsname
14626 \PackageWarning{nameauth}
14627 {\string\ExcludeName: extant name \@nameauth@Temp}%
14628 \fi
14629 \ifcsname\NameauthPattern!NF\endcsname
14630 \PackageWarning{nameauth}
14631 {\string\ExcludeName: extant name \@nameauth@Temp}%
14632 \fi
14633 \fi
14634 % \end{macrocode}
14635 % One cannot exclude an extant cross-reference or exclusion.
14636 % Verbose warnings only.
14637 %
14638 % \begin{macrocode}
14639 \ifcsname\NameauthPattern!PN\endcsname
14640 \if@nameauth@Verbose
14641 \edef\@nameauth@testex
14642 {\csname\NameauthPattern!PN\endcsname}%
14643 \ifx\@nameauth@testex\@nameauth@Exclude
14644 \PackageWarning{nameauth}
14645 {\string\ExcludeName: exclusion exists \@nameauth@Temp}%
14646 \else
14647 \PackageWarning{nameauth}
14648 {\string\ExcludeName: xref exists \@nameauth@Temp}%
14649 \fi
14650 \fi
14651 \else
14652 \csxdef{\NameauthPattern!PN}{\@nameauth@Exclude}%
14653 \fi
14654 }
14655 % \end{macrocode}
14656 % \end{macro}
14657 %
14658 % \begin{macro}{\IncludeName}
14659 % \changes{3.0}{2016/10/26}{Added}
14660 % \changes{3.3}{2020/02/20}{Added warnings}
14661 % \changes{3.5}{2020/11/23}{New exclusion test, optimize logic,
14662 % fix namespace}
14663 % \changes{3.7}{2023/02/03}{Fix warnings, optimized}
14664 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
14665 % \begin{macro}{\IncludeName*}\end{macro}\vspace{-2.7ex}
14666 % \noindent Allow names to be included as page entries, even if they have been
14667 % used as cross-references.
14668 % \begin{macrocode}
14669 \NewDocumentCommand{\IncludeName}{s O{} m O{}}
14670 {%
14671 \IfBooleanTF {#1}%
14672 % \end{macrocode}
14673 % The starred form allows any name to be indexed by voiding any
14674 % exclusion or cross-reference.
14675 % Process and load the arguments into the appropriate macros.
14676 % Check for errors, get the current name pattern, then nuke it.
14677 %
14678 % \begin{macrocode}
14679 {%
14680 \@nameauth@LoadArgs{#2}{#3}{#4}%
14681 \@nameauth@Error{#3}{macro \string\IncludeName*}%
14682 \@nameauth@Choice{}{}{}%
14683 \global\csundef{\NameauthPattern!PN}%
14684 }%
14685 % \end{macrocode}
14686 % The un-starred form allows a name to be indexed once again only if
14687 % it had been excluded.
14688 % Process and load the arguments into the appropriate macros.
14689 % Get the current name type, pattern, and contents if a warning
14690 % is needed.
14691 %
14692 % \begin{macrocode}
14693 {%
14694 \@nameauth@LoadArgs{#2}{#3}{#4}%
14695 \@nameauth@Error{#3}{macro \string\IncludeName}%
14696 \@nameauth@Choice
14697 {\def\@nameauth@Temp
14698 {\expandafter\detokenize\expandafter{#3}}}
14699 {\def\@nameauth@Temp
14700 {\expandafter\detokenize\expandafter{#3 #4}}}
14701 {\def\@nameauth@Temp
14702 {\expandafter\detokenize\expandafter{#2 #3}}}%
14703 % \end{macrocode}
14704 % Test whether the name is an exclusion or a regular xref.
14705 % If the former, delete its control sequence. If the latter,
14706 % do nothing and issue a warning.
14707 %
14708 % \begin{macrocode}
14709 \ifcsname\NameauthPattern!PN\endcsname
14710 \edef\@nameauth@testex
14711 {\csname\NameauthPattern!PN\endcsname}%
14712 \ifx\@nameauth@testex\@nameauth@Exclude
14713 \global\csundef{\NameauthPattern!PN}%
14714 \else
14715 \if@nameauth@Verbose
14716 \PackageWarning{nameauth}
14717 {\string\IncludeName: extant xref \@nameauth@Temp}%
14718 \fi
14719 \fi
14720 \fi
14721 }%
14722 }
14723 % \end{macrocode}
14724 % \end{macro}
14725 %
14726 % \begin{macro}{\PretagName}
14727 % \changes{2.0}{2015/11/11}{Added}
14728 % \changes{3.5}{2020/11/23}{New warnings, new exclusion test,
14729 % improve logic, fix namespace}
14730 % \changes{3.7}{2023/02/03}{Fix warnings, optimized}
14731 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14732 % This creates an index sort tag that is applied before a name.
14733 %
14734 % \begin{macrocode}
14735 \NewDocumentCommand{\PretagName}{O{} m O{} m}
14736 {%
14737 % \end{macrocode}
14738 % Process and load the arguments into the appropriate macros.
14739 %
14740 % \begin{macrocode}
14741 \@nameauth@LoadArgs{#1}{#2}{#3}%
14742 \@nameauth@Error{#2}{macro \string\PretagName}%
14743 % \end{macrocode}
14744 % Sort only when permitted.
14745 % Get the current name type, pattern, and contents if a warning
14746 % is needed.
14747 %
14748 % \begin{macrocode}
14749 \if@nameauth@Pretag
14750 \@nameauth@Choice
14751 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2}}}
14752 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2 #3}}}
14753 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#1 #2}}}%
14754 % \end{macrocode}
14755 % Create the sort tag. Verbose warnings let us know if we are
14756 % sorting either exclusions or names that are either
14757 % cross-references or do not exist yet.
14758 %
14759 % \begin{macrocode}
14760 \if@nameauth@Verbose
14761 \edef\@nameauth@testex
14762 {\csname\NameauthPattern!PN\endcsname}%
14763 \ifx\@nameauth@testex\@nameauth@Exclude
14764 \PackageWarning{nameauth}
14765 {\string\PretagName: tag exclusion \@nameauth@Temp}%
14766 \else
14767 \PackageWarning{nameauth}
14768 {\string\PretagName: tag xref/no exist \@nameauth@Temp}%
14769 \fi
14770 \fi
14771 \csgdef{\NameauthPattern!PRE}{#4\@nameauth@Actual}%
14772 \else
14773 \PackageWarning{nameauth}
14774 {\string\PretagName: deactivated}%
14775 \fi
14776 }
14777 % \end{macrocode}
14778 % \end{macro}
14779 %
14780 % \begin{macro}{\TagName}
14781 % \changes{1.2}{2012/02/25}{Added}
14782 % \changes{1.9}{2015/07/09}{Fix cs collisions}
14783 % \changes{2.0}{2015/11/11}{Redesign tagging}
14784 % \changes{3.5}{2020/11/23}{New warnings, new exclusion test,
14785 % improve logic, fix namespace}
14786 % \changes{3.7}{2023/02/03}{Optimized}
14787 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14788 % This creates an index entry tag for a name that is not either
14789 % an exclusion or a cross-reference.
14790 %
14791 % \begin{macrocode}
14792 \NewDocumentCommand{\TagName}{O{} m O{} m}
14793 {%
14794 % \end{macrocode}
14795 % Process and load the arguments into the appropriate macros.
14796 % Get the current name type, pattern, and contents if a warning
14797 % is needed.
14798 %
14799 % \begin{macrocode}
14800 \@nameauth@LoadArgs{#1}{#2}{#3}%
14801 \@nameauth@Error{#2}{macro \string\TagName}%
14802 \@nameauth@Choice
14803 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2}}}
14804 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#2 #3}}}
14805 {\def\@nameauth@Temp{\expandafter\detokenize\expandafter{#1 #2}}}%
14806 % \end{macrocode}
14807 % Verbose warnings let us know if we are sorting either
14808 % exclusions or cross-references. Do not create a tag if
14809 % that is the case; otherwise, create a tag.
14810 %
14811 % \begin{macrocode}
14812 \ifcsname\NameauthPattern!PN\endcsname
14813 \if@nameauth@Verbose
14814 \edef\@nameauth@testex
14815 {\csname\NameauthPattern!PN\endcsname}%
14816 \ifx\@nameauth@testex\@nameauth@Exclude
14817 \PackageWarning{nameauth}
14818 {\string\TagName: no tag, exclusion \@nameauth@Temp}%
14819 \else
14820 \PackageWarning{nameauth}
14821 {\string\TagName: no tag, xref \@nameauth@Temp}%
14822 \fi
14823 \fi
14824 \else
14825 \csgdef{\NameauthPattern!TAG}{#4}%
14826 \fi
14827 }
14828 % \end{macrocode}
14829 % \end{macro}
14830 % \newpage
14831 %
14832 % \begin{macro}{\UntagName}
14833 % \changes{1.2}{2012/02/25}{Added}
14834 % \changes{1.9}{2015/07/09}{Global undef, no cs collisions}
14835 % \changes{2.0}{2015/11/11}{Redesign tagging}
14836 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace}
14837 % \changes{3.7}{2023/02/03}{Optimized}
14838 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14839 % This deletes an index tag.
14840 %
14841 % \begin{macrocode}
14842 \NewDocumentCommand{\UntagName}{O{} m O{}}
14843 {%
14844 \@nameauth@LoadArgs{#1}{#2}{#3}%
14845 \@nameauth@Error{#2}{macro \string\UntagName}%
14846 \@nameauth@Choice{}{}{}%
14847 \global\csundef{\NameauthPattern!TAG}%
14848 }
14849 % \end{macrocode}
14850 % \end{macro}
14851 %
14852 % \subsubsection{Name Tags}
14853 %
14854 % \begin{macro}{\NameAddInfo}
14855 % \changes{2.4}{2016/03/15}{Added}
14856 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace}
14857 % \changes{3.7}{2023/02/03}{Optimized}
14858 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14859 % This creates a macro that expands to information associated with
14860 % a given name, similar to an index tag, but usable in the body text.
14861 %
14862 % \begin{macrocode}
14863 \NewDocumentCommand{\NameAddInfo}{O{} m O{} +m}
14864 {%
14865 \@nameauth@LoadArgs{#1}{#2}{#3}%
14866 \@nameauth@Error{#2}{macro \string\NameAddInfo}%
14867 \@nameauth@Choice{}{}{}%
14868 \csgdef{\NameauthPattern!DB}{#4}%
14869 }
14870 % \end{macrocode}
14871 % \end{macro}
14872 %
14873 % \begin{macro}{\NameQueryInfo}
14874 % \changes{2.4}{2016/03/15}{Added}
14875 % \changes{3.1}{2017/01/13}{Short macro}
14876 % \changes{3.3}{2020/02/20}{Lock added}
14877 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace}
14878 % \changes{3.7}{2023/02/03}{Optimized}
14879 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14880 % \changes{4.1}{2025/02/04}{Works always in hooks when using null args}
14881 % This prints the information created by \cmd{\NameAddInfo} if it exists.
14882 %
14883 % \begin{macrocode}
14884 \NewDocumentCommand{\NameQueryInfo}{O{} m O{}}
14885 {%
14886 \unless\if@nameauth@BigLock
14887 \protected@edef\@nameauth@testname{\trim@spaces{#2}}%
14888 \unless\ifx\@nameauth@testname\@empty
14889 \@nameauth@Error{#2}{macro \string\NameQueryInfo}%
14890 \@nameauth@LoadArgs{#1}{#2}{#3}%
14891 \@nameauth@Choice{}{}{}%
14892 \fi
14893 \ifcsname\NameauthPattern!DB\endcsname
14894 \expandafter\csname\NameauthPattern!DB\endcsname%
14895 \fi
14896 \fi
14897 }
14898 % \end{macrocode}
14899 % \end{macro}
14900 %
14901 % \begin{macro}{\NameClearInfo}
14902 % \changes{2.4}{2016/03/15}{Added}
14903 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace}
14904 % \changes{3.7}{2023/02/03}{Optimized}
14905 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14906 % This deletes a text tag. It has the same structure as \cmd{\UntagName}.
14907 %
14908 % \begin{macrocode}
14909 \NewDocumentCommand{\NameClearInfo}{O{} m O{}}
14910 {%
14911 \@nameauth@LoadArgs{#1}{#2}{#3}%
14912 \@nameauth@Error{#2}{macro \string\NameClearInfo}%
14913 \@nameauth@Choice{}{}{}%
14914 \global\csundef{\NameauthPattern!DB}%
14915 }
14916 % \end{macrocode}
14917 % \end{macro}
14918 %
14919 % \subsubsection{Name Decisions}
14920 %
14921 % \begin{macro}{\IfMainName}
14922 % \changes{2.3}{2016/01/05}{Added}
14923 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace,
14924 % local or global scope}
14925 % \changes{3.7}{2023/02/03}{Optimized}
14926 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14927 % This macro expands one path if a main matter name exists, or else the
14928 % other. The state of \texttt{\textbackslash if@nameauth@GlobalScope}
14929 % determines whether or not the paths are in a local scope. First we
14930 % load the arguments into the standard macros, check for error, and
14931 % get the current name pattern.
14932 % \newpage
14933 %
14934 % \begin{macrocode}
14935 \NewDocumentCommand{\IfMainName}{O{} m O{} +m +m}
14936 {%
14937 \@nameauth@LoadArgs{#1}{#2}{#3}%
14938 \@nameauth@Error{#2}{macro \string\IfMainName}%
14939 \@nameauth@Choice{}{}{}%
14940 % \end{macrocode}
14941 % Take this path if the pattern exists.
14942 %
14943 % \begin{macrocode}
14944 \ifcsname\NameauthPattern!MN\endcsname
14945 \if@nameauth@GlobalScope #4\else {#4}\fi
14946 \else
14947 % \end{macrocode}
14948 % Take this path if the pattern does not exist.
14949 %
14950 % \begin{macrocode}
14951 \if@nameauth@GlobalScope #5\else {#5}\fi
14952 \fi
14953 }%
14954 % \end{macrocode}
14955 % \end{macro}
14956 %
14957 % \begin{macro}{\IfFrontName}
14958 % \changes{2.3}{2016/01/05}{Added}
14959 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace,
14960 % local or global scope}
14961 % \changes{3.7}{2023/02/03}{Optimized}
14962 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
14963 % This macro expands one path if a front matter name exists, or else the
14964 % other. The state of \texttt{\textbackslash if@nameauth@GlobalScope}
14965 % determines whether or not the paths are in a local scope. First we
14966 % load the arguments into the standard macros, check for error, and
14967 % get the current name pattern.
14968 %
14969 % \begin{macrocode}
14970 \NewDocumentCommand{\IfFrontName}{O{} m O{} +m +m}
14971 {%
14972 \@nameauth@LoadArgs{#1}{#2}{#3}%
14973 \@nameauth@Error{#2}{macro \string\IfFrontName}%
14974 \@nameauth@Choice{}{}{}%
14975 % \end{macrocode}
14976 % Take this path if the pattern exists.
14977 %
14978 % \begin{macrocode}
14979 \ifcsname\NameauthPattern!NF\endcsname
14980 \if@nameauth@GlobalScope #4\else {#4}\fi
14981 \else
14982 % \end{macrocode}
14983 % Take this path if the pattern does not exist.
14984 %
14985 % \begin{macrocode}
14986 \if@nameauth@GlobalScope #5\else {#5}\fi
14987 \fi
14988 }
14989 % \end{macrocode}
14990 % \end{macro}
14991 %
14992 % \begin{macro}{\IfAKA}
14993 % \changes{2.3}{2016/01/05}{Added}
14994 % \changes{2.4}{2016/03/15}{Test for excluded}
14995 % \changes{3.0}{2016/10/26}{Redesigned}
14996 % \changes{3.5}{2020/11/23}{New exclusion test, optimize logic,
14997 % fix namespace, local or global scope}
14998 % \changes{3.7}{2023/02/03}{Optimized}
14999 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
15000 % This macro expands one path if a cross-reference exists, another if
15001 % it does not exist, and a third if it is excluded. The state of
15002 % \texttt{\textbackslash if@nameauth@GlobalScope} determines whether or not
15003 % the paths are in a local scope. First we load the arguments into
15004 % the standard macros, check for error, and get the current name pattern.
15005 %
15006 % \begin{macrocode}
15007 \NewDocumentCommand{\IfAKA}{O{} m O{} +m +m +m}
15008 {%
15009 \@nameauth@LoadArgs{#1}{#2}{#3}%
15010 \@nameauth@Error{#2}{macro \string\IfAKA}%
15011 \@nameauth@Choice{}{}{}%
15012 \ifcsname\NameauthPattern!PN\endcsname
15013 \edef\@nameauth@testex
15014 {\csname\NameauthPattern!PN\endcsname}%
15015 % \end{macrocode}
15016 % Take this path if the pattern is an exclusion.
15017 %
15018 % \begin{macrocode}
15019 \ifx\@nameauth@testex\@nameauth@Exclude
15020 \if@nameauth@GlobalScope #6\else {#6}\fi
15021 \else
15022 % \end{macrocode}
15023 % Take this path if the pattern exists.
15024 %
15025 % \begin{macrocode}
15026 \if@nameauth@GlobalScope #4\else {#4}\fi
15027 \fi
15028 \else
15029 % \end{macrocode}
15030 % Take this path if the pattern does not exist.
15031 %
15032 % \begin{macrocode}
15033 \if@nameauth@GlobalScope #5\else {#5}\fi
15034 \fi
15035 }
15036 % \end{macrocode}
15037 % \end{macro}
15038 %
15039 % \begin{macro}{\ForgetName}
15040 % \changes{1.9}{2015/07/09}{Global undef}
15041 % \changes{2.3}{2016/01/05}{Global or local}
15042 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace}
15043 % \changes{3.7}{2023/02/03}{Optimized}
15044 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
15045 % This undefines a control sequence to force a ``first use''.
15046 %
15047 % \begin{macrocode}
15048 \NewDocumentCommand{\ForgetName}{O{} m O{}}
15049 {%
15050 % \end{macrocode}
15051 % Process and load the arguments into the appropriate macros.
15052 %
15053 % \begin{macrocode}
15054 \@nameauth@LoadArgs{#1}{#2}{#3}%
15055 \@nameauth@Error{#2}{macro \string\ForgetName}%
15056 % \end{macrocode}
15057 % Now we parse the arguments, destroying the control sequences either
15058 % by current name system type or completely. |@nameauth@LocalNames| toggles
15059 % current system or both, while we select the type of name with
15060 % |@nameauth@MainFormat|.
15061 %
15062 % \begin{macrocode}
15063 \@nameauth@Choice{}{}{}%
15064 \if@nameauth@LocalNames
15065 \if@nameauth@MainFormat
15066 \global\csundef{\NameauthPattern!MN}%
15067 \else
15068 \global\csundef{\NameauthPattern!NF}%
15069 \fi
15070 \else
15071 \global\csundef{\NameauthPattern!MN}%
15072 \global\csundef{\NameauthPattern!NF}%
15073 \fi
15074 }
15075 % \end{macrocode}
15076 % \end{macro}
15077 %
15078 % \begin{macro}{\SubvertName}
15079 % \changes{0.9}{2012/02/10}{Added}
15080 % \changes{2.3}{2016/01/05}{Global or local}
15081 % \changes{3.1}{2017/01/13}{Fix old syntax}
15082 % \changes{3.5}{2020/11/23}{Improve logic, fix namespace}
15083 % \changes{3.7}{2023/02/03}{Optimized}
15084 % \changes{4.0}{2024/02/09}{Use \textsf{xparse}}
15085 % This defines a control sequence to force a ``subsequent use''.
15086 %
15087 % \begin{macrocode}
15088 \NewDocumentCommand{\SubvertName}{O{} m O{}}
15089 {%
15090 \@nameauth@LoadArgs{#1}{#2}{#3}%
15091 \@nameauth@Error{#2}{macro \string\SubvertName}%
15092 % \end{macrocode}
15093 % Now we parse the arguments, defining the control sequences either
15094 % by current name system type or completely. |@nameauth@LocalNames| toggles
15095 % current system or both, while we select the type of name with
15096 % |@nameauth@MainFormat|.
15097 %
15098 % \begin{macrocode}
15099 \@nameauth@Choice{}{}{}%
15100 \if@nameauth@LocalNames
15101 \if@nameauth@MainFormat
15102 \csgdef{\NameauthPattern!MN}{}%
15103 \else
15104 \csgdef{\NameauthPattern!NF}{}%
15105 \fi
15106 \else
15107 \csgdef{\NameauthPattern!MN}{}%
15108 \csgdef{\NameauthPattern!NF}{}%
15109 \fi
15110 }
15111 % \end{macrocode}
15112 % \end{macro}
15113 %
15114 % \newpage
15115 %
15116 % \subsubsection{Pseudonyms}
15117 %
15118 % \begin{macro}{\AKA}
15119 % \changes{1.26}{2012/04/24}{Fix affixes}
15120 % \changes{1.5}{2013/02/22}{Reversing/caps}
15121 % \changes{2.0}{2015/11/11}{Trim spaces; fix tags}
15122 % \changes{2.1}{2015/11/24}{Fix Unicode}
15123 % \changes{2.3}{2016/01/05}{Fix starred mode}
15124 % \changes{2.41}{2016/03/17}{Fix token regs}
15125 % \changes{2.6}{2016/09/19}{Fix index commas}
15126 % \changes{3.0}{2016/10/26}{Redesigned}
15127 % \changes{3.1}{2017/01/13}{Can skip index}
15128 % \changes{3.3}{2020/02/20}{Global flag reset}
15129 % \changes{3.5}{2020/11/23}{Fix namespace}
15130 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
15131 % \begin{macro}{\AKA*}\end{macro}\vspace{-2.7ex}
15132 % \noindent \cmd{\AKA} prints an alternate name and creates index cross-references.
15133 % The starred form displays the alternate name like \cmd{\FName}.
15134 %
15135 % \begin{macrocode}
15136 \NewDocumentCommand{\AKA}{s O{} m O{} m O{}}
15137 {%
15138 % \end{macrocode}
15139 % Prevent entering \cmd{\AKA} via itself or \cmd{\@nameauth@Name}.
15140 % Tell the formatting system that \cmd{\AKA} is running.
15141 % Prevent and reset \cmd{\JustIndex}.
15142 %
15143 % \begin{macrocode}
15144 \if@nameauth@BigLock
15145 \@nameauth@Locktrue%
15146 \fi
15147 \IfBooleanTF {#1}{\@nameauth@AltAKAtrue}{}%
15148 \unless\if@nameauth@Lock
15149 \@nameauth@Locktrue%
15150 \@nameauth@InAKAtrue%
15151 \if@nameauth@OldReset
15152 \@nameauth@JustIndexfalse%
15153 \else
15154 \global\@nameauth@JustIndexfalse%
15155 \fi
15156 % \end{macrocode}
15157 % Test for malformed input, then load args and save the persistent
15158 % info of the xref.
15159 %
15160 % \begin{macrocode}
15161 \@nameauth@Error{#3}{macro \string\AKA}%
15162 \@nameauth@Error{#5}{macro \string\AKA}%
15163 \@nameauth@LoadArgs{#4}{#5}{#6}%
15164 \@nameauth@Choice{}{}{}%
15165 % \end{macrocode}
15166 % Names occur in horizontal mode; we ensure that.
15167 % Next we make copies of the target name arguments and we parse
15168 % and print the cross-reference name.
15169 %
15170 % \begin{macrocode}
15171 \leavevmode\hbox{}%
15172 \protected@edef\@nameauth@Ai{\trim@spaces{#2}}%
15173 \protected@edef\@nameauth@Bi{\@nameauth@Root{#3}}%
15174 \protected@edef\@nameauth@Si{\@nameauth@Suffix{#3}}%
15175 \@nameauth@Parse{#4}{#5}{#6}{!PN}%
15176 % \end{macrocode}
15177 % \noindent Create an index cross-reference based on the arguments.
15178 %
15179 % \begin{macrocode}
15180 \unless\if@nameauth@SkipIndex
15181 \ifx\@nameauth@Ai\@empty
15182 \ifx\@nameauth@Si\@empty
15183 \IndexRef[#4]{#5}[#6]{\@nameauth@Bi}%
15184 \else
15185 \IndexRef[#4]{#5}[#6]
15186 {\@nameauth@Bi\@nameauth@space\@nameauth@Si}%
15187 \fi
15188 \else
15189 \ifx\@nameauth@Si\@empty
15190 \IndexRef[#4]{#5}[#6]
15191 {\@nameauth@Bi,\@nameauth@space\@nameauth@Ai}%
15192 \else
15193 \IndexRef[#4]{#5}[#6]
15194 {\@nameauth@Bi,\@nameauth@space
15195 \@nameauth@Ai,\@nameauth@space\@nameauth@Si}%
15196 \fi
15197 \fi
15198 \fi
15199 % \end{macrocode}
15200 % Reset all the ``per name'' Boolean values. The default is global.
15201 %
15202 % \begin{macrocode}
15203 \@nameauth@Flags%
15204 \@nameauth@Lockfalse%
15205 \@nameauth@InAKAfalse%
15206 % \end{macrocode}
15207 % Close the ``locked'' branch and call the full stop detection.
15208 % This conditional statement must be on one line.
15209 %
15210 % \begin{macrocode}
15211 \fi
15212 \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
15213 }
15214 % \end{macrocode}
15215 % \end{macro}
15216 %
15217 % \begin{macro}{\PName}
15218 % \changes{2.3}{2016/01/05}{Work with hooks}
15219 % \changes{3.1}{2017/01/13}{Can skip index}
15220 % \changes{3.5}{2020/11/23}{Warning and flag resets added}
15221 % \changes{3.7}{2023/02/03}{Fix warnings}
15222 % \changes{4.0}{2024/02/09}{Combine starred, un-starred macros}
15223 % \begin{macro}{\PName*}\end{macro}\vspace{-2.7ex}
15224 % \noindent \cmd{\PName} is a convenience macro that calls \cmd{\NameauthName}, then \cmd{\AKA}. Its starred form prints a long name.
15225 %
15226 % \begin{macrocode}
15227 \NewDocumentCommand{\PName}{s O{} m O{} m O{}}
15228 {%
15229 % \end{macrocode}
15230 % If we have a starred form, we will display a long name.
15231 % If we used \cmd{\JustIndex}, we ignore and reset its flag to false.
15232 %
15233 % \begin{macrocode}
15234 \IfBooleanTF {#1}{\@nameauth@FullNametrue}{}%
15235 \if@nameauth@OldReset
15236 \@nameauth@JustIndexfalse%
15237 \else
15238 \global\@nameauth@JustIndexfalse%
15239 \fi
15240 % \end{macrocode}
15241 % If we used \cmd{\SkipIndex}, we reset the flag of \cmd{\SeeAlso} and
15242 % activate \cmd{\SkipIndex} for both \cmd{\NameauthName} and \cmd{\AKA}.
15243 %
15244 % \begin{macrocode}
15245 \if@nameauth@SkipIndex
15246 \unless\if@nameauth@OldReset
15247 \global\@nameauth@SeeAlsofalse%
15248 \fi
15249 \NameauthName[#2]{#3} (\SkipIndex\AKA[#2]{#3}[#4]{#5}[#6])%
15250 \else
15251 % \end{macrocode}
15252 % Otherwise, if we used \cmd{\SeeAlso} we set the flag of \cmd{\SeeAlso}
15253 % false for \cmd{\NameauthName} and true for \cmd{\AKA}. The ``normal''
15254 % case after that is trivial.
15255 %
15256 % \begin{macrocode}
15257 \if@nameauth@SeeAlso
15258 \@nameauth@SeeAlsofalse\NameauthName[#2]{#3}
15259 \@nameauth@SeeAlsotrue(\AKA[#2]{#3}[#4]{#5}[#6])%
15260 \else
15261 \NameauthName[#2]{#3}
15262 (\AKA[#2]{#3}[#4]{#5}[#6])%
15263 \fi
15264 \fi
15265 % \end{macrocode}
15266 % Warn if \cmd{\SkipIndex} remains in effect (potentially due to
15267 % the \texttt{oldreset} option). Normally, this state should not occur.
15268 %
15269 % \begin{macrocode}
15270 \if@nameauth@SkipIndex
15271 \PackageWarning{nameauth}
15272 {\string\SkipIndex still active after \string\PName; check}%
15273 \fi
15274 }
15275 % \end{macrocode}
15276 % \end{macro}
15277 %
15278 % \Finale
15279 % \endinput
15280 %</package>
15281 %<*compat>
15282 %<<compatvb
15283 % This is not a standalone document.
15284 % Use this file only in the document preamble.
15285
15286 % Ensure that we have the needed macros.
15287 \usepackage{etoolbox}
15288
15289 % Allow special catcodes.
15290 \makeatletter
15291
15292 % Do not include the rest of this file
15293 % unless we are in a document preamble.
15294 \ifx\@onlypreamble\@notprerr\else
15295 % Include the rest of this if--else statement.
15296
15297 % Check against the latex version date. Create a macro
15298 % if the date is at least 2018/10/05 because that is
15299 % when Unicode processing changed for the better.
15300 \@ifl@t@r\fmtversion{2018/10/05}{\newcommand*\nameauthltx{}}{}
15301
15302 % Here we check for 2018/04/30 because that is when xparse
15303 % added the ! modifier.
15304 \@ifl@t@r\fmtversion{2018/04/30}{\newcommand*\nameauthxp{}}{}
15305
15306 % Here we assist backward compatibility for older
15307 % distributions of LaTeX and compatibility for multiple
15308 % LaTeX engines.
15309
15310 % If we want to use TikZ, this flag will help us.
15311 % We use this method to avoid crashing some dvi
15312 % viewers. Define the macro \noTikZ to bypass this check.
15313 \newif\ifDoTikZ
15314
15315 % If we couch this statement in a conditional, we avoid
15316 % potential errors in older versions.
15317 \IfFileExists{iftex.sty}{\usepackage{iftex}}{}
15318
15319 % The presence of \RequireTUTeX means that these older
15320 % packages are not needed (thanks to iftex). Otherwise
15321 % we are using an older version and need these packages.
15322
15323 \unless\ifdefined\RequireTUTeX
15324 \usepackage{ifxetex}
15325 \usepackage{ifluatex}
15326 \usepackage{ifpdf}
15327 \fi
15328
15329 % Instead of worrying about older or newer changes, we
15330 % ensure consistency when the LaTeX engine changes.
15331 % The goal is to get the same ``lmodern'' look.
15332 % Users will need to change language and font options
15333 % for their own needs.
15334
15335 % To remain compatible with our experience on older
15336 % distributions, we load fontspec and prefer polyglossia
15337 % with both XeLaTeX and LuaLaTeX. One cannot load both
15338 % babel and polyglossia. See the relevant documentation.
15339
15340 % This flag causes polyglossia to be the default.
15341 \newif\ifloadbabel
15342
15343 % Here we do the right thing for the right LaTeX version.
15344 \ifxetex
15345 % We always load fontspec in this case.
15346 \usepackage{fontspec}
15347 % Loading TikZ will work (pdf)
15348 \DoTikZtrue
15349 \else
15350 \ifluatex
15351 \ifpdf
15352 % This is the usual pdf-version lualatex.
15353 % We always load fontspec in this case.
15354 \usepackage{fontspec}
15355 % Loading TikZ will work (pdf)
15356 \DoTikZtrue
15357 \else
15358 \loadbabeltrue
15359 % This is dvilualatex (dvi mode).
15360 \IfFileExists{utf8-2018.def}{}
15361 {\usepackage[utf8]{inputenc}}
15362 \usepackage[TS1,T1]{fontenc}
15363 \usepackage{lmodern}
15364 % No TikZ with dvi workflows for dvi viewers.
15365 \fi
15366 \else
15367 \loadbabeltrue
15368 % Here we load the same packages, whether dvi
15369 % or pdf is being used. We address that below.
15370 \IfFileExists{utf8-2018.def}{}
15371 {\usepackage[utf8]{inputenc}}
15372 \usepackage[TS1,T1]{fontenc}
15373 \usepackage{lmodern}
15374 % Now we check for pdflatex. If so, use TikZ.
15375 \ifpdf \DoTikZtrue \fi
15376 % Otherwise, no TikZ with dvi workflows.
15377 \fi
15378 \fi
15379
15380 % Defining the \nolangs macro inhibits defaults.
15381 \unless\ifdefined{\nolangs}
15382 \ifloadbabel
15383 \usepackage[american]{babel}
15384 \else
15385 \usepackage{polyglossia}
15386 \setdefaultlanguage{american}
15387 \fi
15388 \fi
15389
15390 % Defining the \noTikZ macro inhibits defaults.
15391 \unless\ifdefined{\noTikZ}
15392 \ifDoTikZ
15393 \usepackage{tikz}
15394 \else
15395 % Do something with pstricks, pdftricks, ps4pdf.
15396 \fi
15397 \fi
15398
15399 % End of part needing to be in the preamble.
15400 \fi
15401
15402 % Return to normal catcodes.
15403 \makeatother
15404
15405 % End of included file.
15406 %compatvb
15407 %</compat>
15408 %<*examples>
15409 %<<examplesvb
15410 \documentclass[oneside]{article}
15411
15412 \input{compat.tex} % Included with nameauth; needed only if
15413 % compiling on multiple TeX distros or LaTeX engines.
15414
15415 \usepackage[textwidth=137mm,textheight=237mm,
15416 right=40mm,marginparwidth=40mm]{geometry}
15417
15418 \usepackage{makeidx} % Must have for defining \seealso macro.
15419 \usepackage{index}
15420
15421 \usepackage[oldargs]{nameauth}[2025/02/04]
15422
15423 \usepackage{fancyvrb}
15424
15425 % Define fancyvrb defaults.
15426 \fvset{gobble=2,numbers=left,fontsize=\small}
15427
15428 \usepackage{xcolor}
15429 \usepackage[colorlinks=true]{hyperref}
15430
15431 %
15432 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15433 % Set up indexing and put margin paragraphs on the left.
15434 %
15435
15436 \makeindex
15437 \newindex{per}{rdx}{rnd}{Index of Persons}
15438 \renewcommand\NameauthIndex{\index[per]}
15439 \reversemarginpar
15440
15441 %
15442 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15443 % Create name shorthands. Note the use of \noexpand
15444 % in the macro arguments below.
15445 %
15446
15447 \begin{nameauth}
15448 \< Doug & Frederick & Douglass & >
15449 \< Bailey & Betsey & Bailey & >
15450 \end{nameauth}
15451
15452 \begin{nameauth}
15453 \< Wash & George & Washington & >
15454 \< Bradley & Omar N. & Bradley & >
15455 \< Aris & & Aristotle & >
15456 \< Plato & & Plato & >
15457 \< Aeth & & \AE thelred, II & >
15458 \< Linc & Abraham & Lincoln & >
15459 \< MLK & Martin Luther & King, Jr. & >
15460 \< Soto & Hernando & de Soto & >
15461 \< Patton & George S. & Patton, Jr. & >
15462 \< Ike & Dwight D. & Eisenhower & >
15463 \end{nameauth}
15464
15465 \begin{nameauth}
15466 \< Luth & Martin & \noexpand\textSC{Luther} & >
15467 \< Cath & Catherine \noexpand\AltCaps{d}e'
15468 & \noexpand\textSC{Medici} & >
15469 \end{nameauth}
15470
15471 \begin{nameauth}
15472 \< Jeff & Thomas &
15473 \noexpand\textSC{Jefferson}\noexpand\GEN{} & >
15474 \end{nameauth}
15475
15476 \begin{nameauth}
15477 \< Scipio & \noexpand\SCIPi & \noexpand\SCIPii & >
15478 \< TGrac & \noexpand\TSemp & Gracchus & >
15479 \end{nameauth}
15480
15481 \begin{nameauth}
15482 \< OScipio & Lucius & \noexpand\CSB & > % O for Oxford
15483 \end{nameauth}
15484
15485 \begin{nameauth}
15486 \< Shak & \noexpand\WM & \noexpand\SHK & >
15487 \end{nameauth}
15488
15489 \begin{nameauth}
15490 \< deSmet & Pierre-Jean &
15491 \noexpand\Fbox{\noexpand\AltCaps{d}e~Smet} & >
15492 \end{nameauth}
15493
15494 %
15495 % We could add name info database tags (text tags) either
15496 % in the preamble or in the document environment. We will do
15497 % the latter in this example file.
15498 %
15499 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15500 % Below we establish sort tags for names.
15501 %
15502
15503 % Sort these names under: US Generals.
15504 \PretagName[Omar N.]{Bradley}{US Generals!Bradley, Omar}
15505 \PretagName[George S.]{Patton, Jr.}{US Generals!Patton, George}
15506
15507 % Sort these names under: US Presidents.
15508 \PretagName[George]{Washington}{US Presidents!Washington, George}
15509 \PretagName[Dwight D.]{Eisenhower}{US Presidents!Eisenhower, Dwight D.}
15510 \PretagName[Abraham]{Lincoln}{US Presidents!Lincoln, Abraham}
15511
15512 % Sort these names under: Philosophers.
15513 \PretagName{Aristotle}{Philosophers!Aristotle}
15514 \PretagName{Plato}{Philosophers!Plato}
15515
15516 % Sort these names under: Black Americans, famous.
15517 \PretagName[Frederick]{Douglass}
15518 {Black Americans, famous!Douglass, Frederick}
15519 \PretagName[Martin Luther]{King, Jr.}
15520 {Black Americans, famous!King, Martin Luther, Jr.}
15521
15522 % Sort these names under: Europeans, historical.
15523 \PretagName{\AE thelred, II}{Europeans, historical!Aethelred 2}
15524 \PretagName[Hernando]{de Soto}
15525 {Europeans, historical!de Soto, Hernando}
15526
15527
15528 \PretagName{Vlad, Ţepeş}{Vlad Tepes} % for accented names
15529
15530
15531 \PretagName[Konrad]{\noexpand\textSC{Zuse}}{Zuse, Konrad}
15532 \PretagName[Ada]{\noexpand\textIT{Lovelace}}{Lovelace, Ada}
15533 \PretagName[Charles]{\noexpand\textBF{Babbage}}
15534 {Babbage, Charles}
15535 \PretagName{\noexpand\textUC{Kanade}, Takeo}{Kanade Takeo}
15536
15537
15538 \PretagName[Martin]{\noexpand\textSC{Luther}}{Luther, Martin}
15539 \PretagName[Catherine \noexpand\AltCaps{d}e']
15540 {\noexpand\textSC{Medici}}{Medici, Catherine de}
15541
15542
15543 \PretagName[Thomas]{\noexpand\textSC{Jefferson}\noexpand\GEN{}}
15544 {Jefferson, Thomas}
15545
15546
15547 \PretagName[Greta]{\noexpand\textSC{Garbo}}{Garbo, Greta}
15548 \PretagName{\noexpand\textSC{Misora}, Hibari}{Misora Hibari}
15549 \PretagName[Heinz]{\noexpand\textSC{R\"uhmann}}{Ruehmann, Heinz}
15550 \PretagName[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}}
15551 {Ruehmann, Heinrich Wilhelm}
15552
15553
15554 \PretagName[\noexpand\SCIPi]{\noexpand\SCIPii}
15555 {Scipio Africanus}
15556 \PretagName[\noexpand\TSemp]{Gracchus}
15557 {Gracchus, Tiberius Sempronius}
15558
15559
15560 \PretagName[Lucius]{\noexpand\CSB}{Cornelius Scipio Barbatus}
15561
15562
15563 \PretagName[\noexpand\WM]{\noexpand\SHK}
15564 {Shakespeare, William}
15565 \PretagName[Robert]{\textSC{Burns}}{Burns, Robert}
15566
15567
15568 \PretagName[Pierre-Jean]%
15569 {\noexpand\Fbox{\noexpand\AltCaps{d}e~Smet}}%
15570 {de~Smet, Pierre-Jean}
15571
15572 %
15573 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15574 % Below we establish some index tags for names.
15575 %
15576
15577 \TagName{Vlad, II}{ Dracul}
15578 \TagName{Vlad, III}{ Dracula}
15579 \IndexRef{Dracula}{Vlad III}
15580
15581
15582 \TagName[Thomas]{\noexpand\textSC{Jefferson}\noexpand\GEN{}}
15583 {, pres.}
15584
15585
15586 \TagName[\noexpand\TSemp]{Gracchus}{, consul}
15587
15588
15589 \TagName[Lucius]{\noexpand\CSB}{, consul}
15590
15591 %
15592 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15593 %
15594
15595 \title{\bfseries Some \textsf{nameauth} Examples}
15596 \author{Charles P. Schaum}
15597 \date{2025/02/04}
15598
15599 \begin{document}
15600 \maketitle
15601
15602 \phantomsection
15603 \pdfbookmark[1]{\contentsname}{toc}
15604 \tableofcontents
15605 \newpage
15606
15607 %
15608 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15609 %
15610
15611 \section{Minimal Example}
15612
15613 \textbf{Group 1}
15614 \begin{enumerate}
15615 \item[\textbf{1.}] \Doug\ rose to eminence by sheer force
15616 of character and talents that neither slavery nor caste
15617 proscription could crush.
15618 \item[\textbf{2.}] \Doug's early life is perhaps the most
15619 complete indictment of the slave system ever presented at
15620 the bar of public opinion.
15621 \item[\textbf{3.}] \Doug\ was born in February, 1817. His
15622 earliest memories centered around the cabin of his
15623 grandmother, \Bailey.
15624 \end{enumerate}
15625
15626 \medskip\noindent\textbf{Group 2}
15627 \ForgetName[Frederick]{Douglass}
15628 \ForgetName[Betsey]{Bailey}
15629 \begin{enumerate}
15630 \item[\textbf{2.}] \Doug's early life is perhaps the most
15631 complete indictment of the slave system ever presented at
15632 the bar of public opinion.
15633 \item[\textbf{3.}] \Doug\ was born in February, 1817. His
15634 earliest memories centered around the cabin of his
15635 grandmother, \Bailey.
15636 \item[\textbf{1.}] \Doug\ rose to eminence by sheer force
15637 of character and talents that neither slavery nor caste
15638 proscription could crush.
15639 \end{enumerate}
15640
15641 %
15642 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15643 %
15644
15645 \section{Roman Names I}
15646
15647 Here we modify a few details from the manual in order to make
15648 all the name examples work well together.
15649
15650 \newcommand\nri{}
15651 \newcommand\nrii{}
15652
15653 \begin{nameauth}
15654 \< Senecai & Lucius Annaeus & Seneca\nri & >
15655 \< Senecaii & Lucius Annaeus & Seneca\nrii & >
15656 \end{nameauth}
15657
15658 \renewcommand*\NamesFormat[1]
15659 {#1\NameQueryInfo{}}
15660
15661 \PretagName[Lucius Annaeus]{Seneca\nri}{Seneca, Lucius Annaeus 1}
15662 \PretagName[Lucius Annaeus]{Seneca\nrii}{Seneca, Lucius Annaeus 2}
15663 \TagName[Lucius Annaeus]{Seneca\nri}{ (the Elder)}
15664 \TagName[Lucius Annaeus]{Seneca\nrii}{ (the Younger)}
15665 \NameAddInfo[Lucius Annaeus]{Seneca\nri}{ the Elder}
15666 \NameAddInfo[Lucius Annaeus]{Seneca\nrii}{ the Younger}
15667
15668 We can differentiate between
15669 \Senecai\ and \Senecaii;
15670 \Senecai \NameQueryInfo{} and \Senecaii \NameQueryInfo{}.
15671
15672 Their full index entries are:\\
15673 \ShowIdxPageref[Lucius Annaeus]{Seneca\nri}\\
15674 \ShowIdxPageref[Lucius Annaeus]{Seneca\nrii}
15675 \index{Roman names, student}
15676
15677
15678 \begin{nameauth}
15679 \< CatoY & Marcus Porcius & Cato, the Younger & >
15680 \< CatoYi & Marcus Porcius & Cato the Younger & >
15681 \end{nameauth}
15682 \ExcludeName[Marcus Porcius]{Cato, the Younger}
15683 \makeatletter
15684 \NameAddInfo[Marcus Porcius]{Cato, the Younger}
15685 {\if@nameauth@InHook\ (Uticensis, 94--45 \textsc{bc})%
15686 \else Uticensis\fi}
15687 \makeatother
15688
15689 \JustIndex\CatoYi
15690 \CatoY\ is known as \CatoY\ \ForceAffix\CatoY, to distinguish him
15691 from his great-grandfather. His names include \SCatoY[Marcus]
15692 (\textit{praenomen}), \SCatoY[Porcius] (\textit{nomen}, one of the
15693 Porcia clan), and \CatoY, the \textit{cognomen} by which he is best
15694 known. His other \textit{agnomen}, \NameQueryInfo{}, means he was
15695 born in Utica.
15696 \JustIndex\CatoYi He is indexed as: \ShowIdxPageref*{}
15697 \index{Roman names, student}
15698
15699
15700 \begin{nameauth}
15701 \< CatoE & Marcus Porcius & Cato, the Elder & >
15702 \< CatoEi & Marcus & Porcius Cato the Elder & >
15703 \end{nameauth}
15704 \ExcludeName[Marcus Porcius]{Cato, the Elder}
15705
15706 \JustIndex\CatoEi
15707 \DropAffix\CatoE\ (234--149 \textsc{bc}) is known as
15708 \CatoE{} \ForceAffix\CatoE, among other sobriquets.
15709 His \textit{praenomen} is \SCatoE[Marcus]. His
15710 \textit{nomen} is \SCatoE[Porcius], a member of the
15711 Porcia clan. His \textit{cognomen} is \CatoE.
15712 \JustIndex\CatoEi
15713 Index: \ShowIdxPageref*{}
15714 \index{Roman names, scholar}
15715
15716 %
15717 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15718 %
15719
15720 \section{Multiple Indexes}
15721
15722 The Electric Boogaloo\index{Boogaloo, Electric} % main index
15723 was created by \Name{Ollie~\& Jerry}. % name index
15724 \index{indexes, multiple}
15725
15726 %
15727 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15728 %
15729
15730 \section{Index Categories}
15731
15732 \subsection{Famous Black Americans}
15733
15734 \Name[Frederick]{Douglass} rose to eminence by sheer force of
15735 character and talents that neither slavery nor caste
15736 proscription could crush. Circumstances made
15737 \Name[Frederick]{Douglass} a slave, but they could not prevent
15738 him from becoming a freeman and a leader among mankind.\\
15739
15740 We also celebrate \MLK, then \MLK.
15741
15742 \subsection{Patres Patriae}
15743
15744 We mention President \Wash; again, \Wash.
15745 Family and close friends called him \SWash.\\
15746
15747 \TagName[George]{Washington}{!as general}
15748 We can reminisce about \LWash[General].
15749 \UntagName[George]{Washington}
15750
15751 When speaking of \Linc, we can refer to \LLinc[Abe].
15752
15753 \subsection{Philosophers}
15754
15755 Among philosophers we consider \Plato\ and \Aris.
15756
15757 \subsection{Historical Figures}
15758
15759 We ponder about \Aeth, then \Aeth.
15760 We note \Soto, then just \Soto.
15761 \CapThis\Soto{} starts a sentence.
15762
15763 \subsection{Further Discussion}
15764
15765 \TagName[George]{Washington}{!as general}
15766 \TagName[Dwight D.]{Eisenhower}{!as general}
15767 \LWash, \LIke, \LBradley, and \LPatton
15768 were high-ranking generals.\\
15769 \SeeAlso\IndexRef[George]{Washington}{Eisenhower}
15770 \SeeAlso\IndexRef[Dwight D.]{Eisenhower}{Washington}
15771 \IncludeName*[George]{Washington}
15772 \IncludeName*[Dwight D.]{Eisenhower}
15773
15774 \UntagName[George]{Washington}
15775 \UntagName[Dwight D.]{Eisenhower}
15776 \Wash\ and \Ike\ also were US presidents.
15777
15778 \ForgetName[Omar N.]{Bradley}
15779 \ForgetName[George S.]{Patton, Jr.}
15780 \TagName[Omar N.]{Bradley}{!colleagues of}
15781 \TagName[George S.]{Patton, Jr.}{!colleagues of}
15782 \IndexRef[Omar N.]{Bradley}{Eisenhower, Patton}
15783 \IndexRef[George S.]{Patton, Jr.}{Bradley, Eisenhower}
15784
15785 %
15786 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15787 %
15788
15789 \section{More Complex Hooks}
15790
15791 % First save main- and front-matter hooks. Then change
15792 % first-use hooks for both main matter and front matter.
15793 \let\OldFormat\NamesFormat
15794 \let\OldFrontNames\FrontNamesFormat
15795
15796 \renewcommand*\NamesFormat[1]{\textbf{#1}\unless\ifinner
15797 \marginpar{\raggedleft\scriptsize #1}\fi}
15798 \renewcommand*\FrontNamesFormat[1]{\textit{#1}\unless\ifinner
15799 \marginpar{\raggedleft\scriptsize #1}\fi}
15800 \index{complex hooks, intro}
15801
15802 \subsection{New Format, Front Matter}
15803 \NamesInactive
15804
15805 The new format (front matter):\NamesInactive
15806
15807 \Name{Vlad, III}[III Dracula], known as
15808 \IndexRef{Vlad, {\c T}epe{\c s}}{Vlad III}%
15809 \SubvertThis\Name*{Vlad, {\c T}epe{\c s}}
15810 (\Name*{Vlad, {\c T}epe{\c s}}[the Impaler])
15811 after his death, was the son of \Name{Vlad, II}[II Dracul],
15812 a member of the Order of the Dragon. Later instances of
15813 ``\Name*{Vlad, III}'' and ``\Name{Vlad, III}'' appear thus.
15814
15815 The new format (main matter):\NamesActive
15816
15817 \Name{Vlad, III}[III Dracula], known as
15818 \IndexRef{Vlad, {\c T}epe{\c s}}{Vlad III}%
15819 \SubvertThis\Name*{Vlad, {\c T}epe{\c s}}
15820 (\Name*{Vlad, {\c T}epe{\c s}}[the Impaler])
15821 after his death, was the son of \Name{Vlad, II}[II Dracul],
15822 a member of the Order of the Dragon. Later instances of
15823 ``\Name*{Vlad, III}'' and ``\Name{Vlad, III}'' appear thus.
15824
15825 \let\NamesFormat\OldFormat
15826 \let\FrontNamesFormat\OldFrontNames
15827
15828 We are back in the old format.
15829
15830 in the front matter we see: \NamesInactive
15831 \ForgetThis\Name{Vlad, III}[III Dracula],
15832 \Name*{Vlad, III}, and \Name{Vlad, III}.
15833
15834 in the main matter we see: \NamesActive
15835 \ForgetThis\Name{Vlad, III}[III Dracula],
15836 \Name*{Vlad, III}, and \Name{Vlad, III}.
15837
15838 %
15839 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15840 %
15841
15842 \section{Template Test}
15843
15844 Here we demonstrate that fetching information by using the name pattern is better than reading the internal token registers. This is due to expansion sometimes happening in the basic interface.
15845
15846 We set up the following test for our three templates, with indexing suppressed:
15847
15848 \begin{itemize}
15849 \item If we see the outcome, ``Test\dots passed'', we have success.
15850 \item If we see the outcome, ``Test\dots'', we have failure.
15851 \end{itemize}
15852
15853 \subsection{Test Setup}
15854
15855 \begingroup
15856
15857 \IndexInactive
15858 \begin{VerbatimOut}{\jobname.tmp}
15859 \NameAddInfo{Testi}{\dots passed}
15860 \NameAddInfo{\noexpand\testname}{\dots passed}
15861 \newcommand\testname{Testii}
15862 \begin{nameauth}
15863 \< Testi & & Testi & >
15864 \< Testii & & \noexpand\testname & >
15865 \end{nameauth}
15866 \end{VerbatimOut}
15867
15868 \VerbatimInput[gobble=0]{\jobname.tmp}
15869
15870 \input{\jobname.tmp}
15871
15872 \subsection{Recommended Hook}
15873
15874 We display the name, followed by the tag produced with the most recent name pattern vis: \Verb+\NameQueryInfo{}+ taking a null argument.
15875
15876 \begin{VerbatimOut}{\jobname.tmp}
15877 \renewcommand*\NamesFormat[1]
15878 {#1\NameQueryInfo{}}
15879 \end{VerbatimOut}
15880
15881 \VerbatimInput[gobble=0]{\jobname.tmp}
15882 \input{\jobname.tmp}
15883
15884 \begin{tabular}{ll}
15885 \Verb+\ForgetThis\Name{Testi}+ & \ForgetThis\Name{Testi} \\
15886 \Verb+\ForgetThis\Testi+ & \ForgetThis\Testi \\
15887 \Verb+\ForgetThis\Name{\noexpand\testname}+ &
15888 \ForgetThis\Name{\noexpand\testname} \\
15889 \Verb+\ForgetThis\Testii+ & \ForgetThis\Testii \\
15890 \end{tabular}
15891
15892 \subsection{Alternate Hook A}
15893
15894 If we try to use the internal token registers, we have to get more complicated, and it does not always work:
15895
15896 \begin{VerbatimOut}{\jobname.tmp}
15897 \makeatletter
15898 \renewcommand*\NamesFormat[1]{%
15899 \begingroup%
15900 \protected@edef\temp{\endgroup%
15901 {#1\noexpand\NameQueryInfo
15902 [\unexpanded\expandafter{\the\@nameauth@toksa}]
15903 {\unexpanded\expandafter{\the\@nameauth@toksb}}
15904 [\unexpanded\expandafter{\the\@nameauth@toksc}]%
15905 }%
15906 }%
15907 \temp%
15908 }
15909 \makeatother
15910 \end{VerbatimOut}
15911
15912 \VerbatimInput[gobble=0]{\jobname.tmp}
15913 \input{\jobname.tmp}
15914
15915 \begin{tabular}{ll}
15916 \Verb+\ForgetThis\Name{Testi}+ & \ForgetThis\Name{Testi} \\
15917 \Verb+\ForgetThis\Testi+ & \ForgetThis\Testi \\
15918 \Verb+\ForgetThis\Name{\noexpand\testname}+ &
15919 \ForgetThis\Name{\noexpand\testname} \\
15920 \Verb+\ForgetThis\Testii+ & \ForgetThis\Testii \\
15921 \end{tabular}
15922
15923
15924 \subsection{Alternate Hook B}
15925
15926 This is an ``older'' way of using the internal token registers. It has similar problems with consistency:
15927
15928 \begin{VerbatimOut}{\jobname.tmp}
15929 \let\ex\expandafter
15930 \makeatletter
15931 \renewcommand*\NamesFormat[1]{%
15932 #1%
15933 \ex\ex\ex\ex\ex\ex\ex\NameQueryInfo%
15934 \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the%
15935 \ex\ex\ex\@nameauth@toksa\ex\ex\ex]%
15936 \ex\ex\ex{\ex\the\ex\@nameauth@toksb\ex}%
15937 \ex[\the\@nameauth@etoksc]%
15938 }
15939 \makeatother
15940 \end{VerbatimOut}
15941
15942 \VerbatimInput[gobble=0]{\jobname.tmp}
15943 \input{\jobname.tmp}
15944
15945 \begin{tabular}{ll}
15946 \Verb+\ForgetThis\Name{Testi}+ & \ForgetThis\Name{Testi} \\
15947 \Verb+\ForgetThis\Testi+ & \ForgetThis\Testi \\
15948 \Verb+\ForgetThis\Name{\noexpand\testname}+ &
15949 \ForgetThis\Name{\noexpand\testname} \\
15950 \Verb+\ForgetThis\Testii+ & \ForgetThis\Testii \\
15951 \end{tabular}
15952
15953 \endgroup
15954
15955 %
15956 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15957 %
15958
15959 \section{Life Dates in Hooks}
15960
15961 % Add name tags to names.
15962 \NameAddInfo[George]{Washington}{ (1732--99)}
15963 \NameAddInfo[Mustafa]{Kemal}{ (1881--1938)}
15964 \NameAddInfo{Atat\"urk}{ (in 1934, a special surname)}
15965
15966 % Ensure that Atat\"urk is a cross-reference that
15967 % has no page entries in the index.
15968 \IndexRef{Atat\"urk}{Kemal, Mustafa}
15969
15970 % Manually suppress name tag in ``first'' instance
15971 \newif\ifNoTag
15972
15973 % Redesign formatting hook to usually print a tag
15974 % only in ``first'' instance. On exit, It resets
15975 % the flag that suppresses tags, making that flag
15976 % work only once per name use.
15977
15978 \renewcommand*\NamesFormat[1]
15979 {%
15980 #1\unless\ifNoTag\NameQueryInfo{}\fi
15981 \global\NoTagfalse%
15982 }
15983
15984 \ForgetThis\Name[George]{Washington} held office as
15985 the first US president from 1789 to 1797.
15986 \Name[George]{Washington} was the only president whose
15987 term in office was completely in the eighteenth century.
15988
15989 If we need to trigger the first use hook at some point,
15990 we can suppress dates and get an automatic long instance via:
15991 \NoTagtrue\ForgetThis\Name[George]{Washington}.
15992
15993 Or we can trigger the first-use hook in a subsequent name use
15994 and still have dates: \ForceName\Name[George]{Washington}.
15995
15996 We can add name info tags to names used only as cross-
15997 references. For example, \Name[Mustafa]{Kemal} was granted
15998 the name \Name{Atat\"urk}.
15999
16000 We mention \Name[Mustafa]{Kemal}
16001 and \Name{Atat\"urk} again. Likewise, we can trigger a
16002 first use, but with no name tag tag:
16003 \NoTagtrue\ForgetThis\Name{Atat\"urk}.
16004
16005 %
16006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16007 %
16008
16009 \section{Alternate Formatting}
16010
16011 \AltFormatActive
16012 \renewcommand*\NamesFormat{}
16013 \renewcommand*\MainNameHook{\AltOff}
16014
16015 \noindent
16016 \ForgetThis\Name[Konrad]{\noexpand\textSC{Zuse}};
16017 \Name[Konrad]{\noexpand\textSC{Zuse}}\\
16018 \ForgetThis\Name[Ada]{\noexpand\textIT{Lovelace}};
16019 \Name[Ada]{\noexpand\textIT{Lovelace}}\\
16020 \ForgetThis\Name[Charles]{\noexpand\textBF{Babbage}};
16021 \Name[Charles]{\noexpand\textBF{Babbage}}\\
16022 \ForgetThis\Name{\noexpand\textUC{Kanade}, Takeo};
16023 \Name{\noexpand\textUC{Kanade}, Takeo}
16024 \index{formatting, alternate}
16025
16026 \renewcommand*\MainNameHook{\sffamily\AltOff}
16027
16028 \ForgetThis\Luth\ was a leading figure in the Protestant
16029 Reformation. \Luth\ believed that one is declared
16030 righteous in a forensic sense by divine grace through faith
16031 created by the Holy Spirit via the Gospel and the Sacraments.
16032
16033 \ForgetThis\Cath\ was not only Queen of France in her own right,
16034 but she also guided the reigns of her three sons.
16035 \CapThis\LCath[\noexpand\AltCaps{d}e']
16036 was blamed for the St.\ Bartholomew's Day massacre that saw the
16037 murder of thousands of Huguenots.
16038 \index{formatting, alternate}
16039
16040 %
16041 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16042 %
16043
16044 \section{Grammatical Inflections in Names}
16045
16046 \newif\ifGenitive
16047 \newif\ifDoGenitive
16048
16049 \newcommand*\GEN{\ifDoGenitive\textSC{'s}\fi}
16050
16051 \renewcommand*\NamesFormat[1]
16052 {\ifGenitive\DoGenitivetrue\fi#1\global\Genitivefalse}
16053 \renewcommand*\MainNameHook[1]
16054 {\ifGenitive\DoGenitivetrue\fi\AltOff#1\global\Genitivefalse}
16055
16056 Consider \Genitivetrue\Jeff\ legacy as the author of the
16057 colonies' Declaration of Independence and his impact as third
16058 president of the United States. \Jeff\ was a complex historical
16059 figure whose actions defy a consistent moral compass both in
16060 public policy and in personal affairs.
16061 \index{inflections, grammatical}
16062
16063 %
16064 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16065 %
16066
16067 \section{Sample Reference Work I}
16068
16069 % Make a cross-reference from a variant name form to the
16070 % form of the head-words
16071
16072 \IndexRef[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}}
16073 {\noexpand\textSC{R\"uhmann}, Heinz}
16074
16075 % Define the formatting hooks. Since we use the `altformat'
16076 % option, alternate formatting is turned off in later
16077 % name uses.
16078
16079 \renewcommand*\NamesFormat{}
16080 \renewcommand*\MainNameHook{\AltOff}
16081
16082 % Typeset head-words with a slanted font.
16083
16084 \newcommand{\RefArticle}[3]
16085 {%
16086 \def\Check{#2}%
16087 \ifx\Check\empty
16088 \noindent\ForgetThis\textsl{#1}\ #3
16089 \else
16090 \noindent\ForgetThis\textsl{#1}\ #2\ #3
16091 \fi\medskip
16092 }
16093
16094 \index{reference work}
16095 \RefArticle
16096 {\RevComma\Name[Greta]{\noexpand\textSC{Garbo}}}
16097 {}
16098 {(18 September 1905\,--\,15 April 1990) was a Swedish
16099 film actress during the 1920s and 1930s.
16100 \Name[Greta]{\noexpand\textSC{Garbo}}\dots}
16101
16102 \RefArticle
16103 {\Name{\noexpand\textSC{Misora}, Hibari}}
16104 {(W:\,``\RevName\Name*{\noexpand\textSC{Misora}, Hibari}'';}
16105 {29 May 1937\,--\,24 June 1989) was a Japanese singer
16106 and actress noted for her positive message.
16107 \Name{\noexpand\textSC{Misora}, Hibari}\dots}
16108
16109 \RefArticle
16110 {\RevComma\Name[Heinz]{\noexpand\textSC{R\"uhmann}}}
16111 {(\SubvertThis\ForceName
16112 \FName[Heinrich Wilhelm]{\noexpand\textSC{R\"uhmann}};}
16113 {7 March 1902\,--\,3 October 1994) was a German actor
16114 in over 100 films.
16115 \Name[Heinz]{\noexpand\textSC{R\"uhmann}}\dots}
16116
16117 %
16118 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16119 %
16120
16121 \section{Roman Names II}
16122
16123 \subsection{General Reference}
16124
16125 % Global Boolean flags need to be defined only once.
16126 \newif\ifNoPraenomen
16127 \newif\ifNoCognomen
16128 \newif\ifNoGens
16129 \newif\ifNoAgnomen
16130
16131 % Local Boolean flags need to be defined only once.
16132 \newif\ifXPrae
16133 \newif\ifXCogn
16134 \newif\ifXGens
16135 \newif\ifXAgno
16136
16137 % Name variant macros need to be defined uniquely for each
16138 % name. First is Scipio. Second is Gracchus.
16139
16140 \newcommand*\SCIPi
16141 {%
16142 \ifXGens Publius\else
16143 \ifXPrae Cornelius\else
16144 Publius Cornelius%
16145 \fi
16146 \fi
16147 }
16148
16149 \newcommand*\SCIPii
16150 {%
16151 \ifXAgno Scipio\else
16152 Scipio Africanus%
16153 \fi
16154 }
16155
16156 \newcommand*\TSemp
16157 {%
16158 \ifXGens Tiberius\else
16159 \ifXPrae Sempronius\else
16160 Tiberius Sempronius%
16161 \fi
16162 \fi
16163 }
16164
16165 % We add the name tag.
16166 \NameAddInfo[\noexpand\TSemp]{Gracchus}
16167 { (consul, 177 \textsc{bc})}
16168
16169 % Although it is helpful to set everything up
16170 % In the preamble, it is not absolutely necessary.
16171 % Here we define the simpler set of formatting hooks
16172 % for Scipio, although the complex hooks will work
16173 % for both equally as well.
16174
16175 \renewcommand*\NamesFormat[1]
16176 {%
16177 \ifNoPraenomen\XPraetrue\fi%
16178 \ifNoGens\XGenstrue\fi%
16179 \ifNoCognomen\XCogntrue\fi%
16180 \ifNoAgnomen\XAgnotrue\fi%
16181 #1\NameQueryInfo{}%
16182 \global\NoPraenomenfalse%
16183 \global\NoGensfalse%
16184 \global\NoCognomenfalse%
16185 \global\NoAgnomenfalse%
16186 }
16187
16188 \renewcommand*\MainNameHook[1]
16189 {%
16190 \ifNoPraenomen\XPraetrue\fi%
16191 \ifNoGens\XGenstrue\fi%
16192 \ifNoCognomen\XCogntrue\fi%
16193 \ifNoAgnomen\XAgnotrue\fi%
16194 #1%
16195 \global\NoPraenomenfalse%
16196 \global\NoGensfalse%
16197 \global\NoCognomenfalse%
16198 \global\NoAgnomenfalse%
16199 }
16200
16201 \index{Roman names, student}
16202 \NoAgnomentrue\Scipio\ was born around 236 \textsc{bc}
16203 into the Scipiones branch of the Cornelii clan.
16204 \NoAgnomentrue\Scipio\ rose to military fame during the
16205 Second Punic War. Thereafter he was known as \Scipio.
16206 He flourished during the Egyptian reigns of
16207 \Name{Ptolemy, IV}[IV Philopator] and
16208 \Name{Ptolemy, V}[V Epiphanes], and the Syrian
16209 reigns of \Name{Seleucus, III}[III Ceraunus] and
16210 \Name{Antiochus, III}[III the Great].
16211
16212 \TGrac\ served as tribune of the plebs in 184 \textsc{bc}.
16213 \TGrac\ was elected praetor for 180 \textsc{bc},
16214 after which he was appointed governor of Hispania Citerior,
16215 serving with the rank of proconsul. In 177 \textsc{bc},
16216 he was elected consul, again in 163 \textsc{bc}.
16217
16218 \subsection{Scholarly Work}
16219
16220 % Name variant macros need to be defined
16221 % uniquely for each name.
16222
16223 \newcommand*\CSB
16224 {%
16225 \ifXGens
16226 \ifXAgno Scipio\else
16227 Scipio Barbatus\fi
16228 \else
16229 \ifXCogn Cornelius\else
16230 \ifXAgno Cornelius Scipio\else
16231 Cornelius Scipio Barbatus%
16232 \fi
16233 \fi
16234 \fi
16235 }
16236
16237 \index{Roman names, scholar}
16238 \OScipio\ was born around 337 \textsc{bc} into the
16239 Scipiones branch of the Cornelii clan, one of the large
16240 patrician clans. \NoGenstrue\NoAgnomentrue\OScipio\ was
16241 one of the two elected consuls in 298 \textsc{bc}
16242 and served during the Third Samnite War.
16243
16244 %
16245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16246 %
16247
16248 \section{Reference Work II}
16249
16250 % Boolean flags; the first sets up headwords and the second
16251 % indicates that a Non-Western form should not be reversed.
16252 \newif\ifHeadword
16253 \newif\ifAncientName
16254
16255 % Sorting and tagging the names:
16256
16257 % Adding name information:
16258 \NameAddInfo{Aristotle}{ (384--322 \textsc{bc})}
16259 \NameAddInfo[Charles]{\noexpand\textBF{Babbage}}{ (1791--1871)}
16260 \NameAddInfo{\noexpand\textUC{Kanade}, Takeo}{ (1945-- )}
16261 \NameAddInfo[Ada]{\noexpand\textIT{Lovelace}}
16262 { (Augusta Ada King, Countess of Lovelace
16263 [née Byron]; 1815--52)}
16264
16265 % Redefining the formatting hooks:
16266 \makeatletter
16267 \renewcommand\NamesFormat[1]
16268 {%
16269 \ifHeadword
16270 \ifNameauthWestern
16271 \@nameauth@RevThisCommatrue%
16272 \bfseries \NameParser%
16273 \normalfont\NameQueryInfo{}%
16274 \else
16275 \begingroup%
16276 \bfseries \NameParser%
16277 \unless\ifAncientName
16278 \normalfont; W:\AltOff\space
16279 \@nameauth@RevThistrue \NameParser%
16280 \fi
16281 \normalfont\NameQueryInfo{}%
16282 \endgroup%
16283 \fi
16284 \else
16285 \NameParser%
16286 \fi
16287 \global\Headwordfalse%
16288 \global\AncientNamefalse%
16289 }
16290 \makeatother
16291 \renewcommand\MainNameHook{\AltOff}
16292
16293 % Define related macros:
16294 \newcommand\Headword{\Headwordtrue\ForgetThis}
16295 \renewcommand{\RefArticle}[2]
16296 {%
16297 \noindent\Headword #1 #2
16298 \medskip
16299 }
16300 \index{reference work}
16301
16302 \RefArticle{\AncientNametrue\Name{Aristotle}}{was the first to offer
16303 a system of logic, most notably syllogistic logic, that would
16304 become the basis for discrete states and circuitry of
16305 digital computers. \Name{Aristotle}\dots}
16306
16307 \RefArticle{\Name[Charles]{\noexpand\textBF{Babbage}}}{designed and
16308 built the Difference Engine and began work on the Analytical
16309 Engine. \Name[Charles]{\noexpand\textBF{Babbage}}\dots}
16310
16311 \RefArticle{\Name{\noexpand\textUC{Kanade}, Takeo}}{is one of the
16312 foremost pioneers in the field of computer vision.
16313 \Name{\noexpand\textUC{Kanade}, Takeo}\dots}
16314
16315 \RefArticle{\Name[Ada]{\noexpand\textIT{Lovelace}}}{collaborated with
16316 \Name*[Charles]{\noexpand\textBF{Babbage}}* and wrote what some
16317 consider to be the first computer program for the Analytical
16318 Engine. \Name[Ada]{\noexpand\textIT{Lovelace}}\dots}
16319 \index{reference work}
16320
16321 %
16322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16323 %
16324
16325 \section{Marginalia}
16326
16327 % Global Boolean flags need to be defined only once.
16328 \newif\ifSpecialFN
16329 \newif\ifSpecialSN
16330 \newif\ifRevertSN
16331
16332 % Name variant macros need to be defined
16333 % uniquely for each name.
16334
16335 % For a long name, we want to use ``William'' in the text
16336 % and ``Wm.'' in the margin.
16337
16338 \newcommand*\WM
16339 {%
16340 \ifSpecialFN Wm.\else
16341 William\fi
16342 }
16343
16344 % The first surname use will be ``Shakespeare'', but ``the
16345 % Bard'' thereafter. We allow for alternate caps.
16346 % We can get ``Shakespeare'' thereafter by toggling a flag.
16347
16348 \newcommand*\SHK
16349 {%
16350 \ifRevertSN
16351 \textSC{Shakespeare}\else
16352 \ifSpecialSN
16353 \noexpand\AltCaps{t}he Bard\else
16354 \textSC{Shakespeare}%
16355 \fi
16356 \fi
16357 }
16358
16359 % Here is how we toggle that flag.
16360
16361 \newcommand*\Revert{\RevertSNtrue}
16362
16363 % The ``first-use'' hook prints a name, then tries
16364 % to insert a margin note using a different name form
16365 % and the user-accessible parser. Finally it resets
16366 % the reversion flag, which is only effective in the
16367 % ``subsequent-use'' hook. Note how macros in the
16368 % name arguments take the role of what the internal
16369 % Boolean flags might otherwise handle.
16370
16371 \makeatletter
16372 \renewcommand*\NamesFormat[1]
16373 {%
16374 \RevertSNfalse\SpecialFNfalse\SpecialSNfalse%
16375 #1%
16376 \unless\ifinner
16377 \marginpar
16378 {%
16379 \footnotesize\raggedleft%
16380 \SpecialFNtrue\SpecialSNfalse%
16381 \NameParser%
16382 }%
16383 \fi
16384 \global\RevertSNfalse%
16385 }
16386
16387 \renewcommand*\MainNameHook[1]
16388 {%
16389 \AltOff\SpecialFNfalse\SpecialSNtrue%
16390 #1%
16391 \unless\ifinner
16392 \unless\ifRevertSN
16393 \marginpar
16394 {%
16395 \footnotesize\raggedleft%
16396 \SpecialFNfalse\SpecialSNfalse%
16397 \NameParser%
16398 }%
16399 \fi
16400 \fi
16401 \global\RevertSNfalse%
16402 }
16403 \makeatother
16404
16405 \index{special uses}
16406 \ForgetThis\Shak\ is the national poet of England
16407 in much the same way that \Name[Robert]{\textSC{Burns}}
16408 is that of Scotland. With the latter's rise of influence
16409 in the 1800s, \Revert\Shak\ became known as ``\Shak''.
16410
16411 %
16412 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16413 %
16414
16415 \section{Customization Using Internals}
16416
16417 \makeatletter
16418 \newcommand*\Fbox[1]{%
16419 \if@nameauth@DoAlt\protect\fbox{#1}\else#1\fi
16420 }
16421 \makeatother
16422
16423 \renewcommand*\NamesFormat{}
16424 \renewcommand*\FrontNamesFormat{}
16425 \renewcommand*\MainNameHook{\AltOff}
16426 \renewcommand*\FrontNameHook{\AltOff}
16427
16428 \index{customization, easy}
16429 \deSmet\ was a Jesuit missionary who arrived in North
16430 America in 1821 at the age of twenty, after a year of seminary
16431 education. \CapThis\deSmet\ was ordained in 1827 and worked
16432 among American Indian nations after 1837. We can show the forms
16433 \LdeSmet\ and \SdeSmet.
16434
16435 %
16436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16437 %
16438
16439 \section{Customization Using Separate Macros}
16440
16441 We do not show this section in the manual because it starts to go farther afield of the main focus of \textsf{nameauth}. Nevertheless, we show it for completeness.
16442
16443 \newif\ifFbox % Replaces \if@nameauth@DoAlt \AltOn \AltOff
16444 \newif\ifFirstCap % Replaces \if@nameauth@DoCaps \AltCaps
16445 \newif\ifInHook % Replaces \if@nameauth@InHook hook dispatcher
16446 \Fboxtrue % Replaces \AltFormatActive
16447
16448 % Alternate formatting macro definition
16449 \renewcommand*\Fbox[1]{%
16450 \ifFbox\protect\fbox{#1}\else#1\fi
16451 }
16452
16453 % Redefinition of \AltCaps and \CapThis
16454 \renewcommand*\AltCaps[1]{%
16455 \ifInHook
16456 \ifFirstCap\MakeUppercase{#1}\else#1\fi
16457 \else
16458 #1%
16459 \fi
16460 }
16461 \renewcommand*\CapThis{\FirstCaptrue}
16462
16463 \renewcommand*\NamesFormat[1]
16464 {\InHooktrue\NameParser\global\FirstCapfalse}
16465
16466 \renewcommand*\MainNameHook[1]
16467 {\Fboxfalse\InHooktrue\NameParser\global\FirstCapfalse}
16468
16469 \let\FrontNamesFormat\Namesformat
16470 \let\FrontNameHook\MainNameHook
16471
16472 \index{customization, complicated}
16473 \ForgetThis\deSmet\ was a Jesuit missionary who arrived in North
16474 America in 1821 at the age of twenty, after a year of seminary
16475 education. \CapThis\deSmet\ was ordained in 1827 and worked
16476 among American Indian nations after 1837. We can show the forms
16477 \LdeSmet\ and \SdeSmet.
16478
16479 \newif\ifCaps % Replaces \if@nameauth@DoAlt
16480 \Capstrue % Replaces \AltFormatActive
16481
16482 % Alternate formatting macro definition
16483 \renewcommand*\textSC[1]{\ifCaps\textsc{#1}\else#1\fi}
16484
16485 % Redefinition of \AltCaps and \CapThis
16486 \renewcommand*\AltCaps[1]{%
16487 \ifInHook
16488 \ifFirstCap\MakeUppercase{#1}\else#1\fi
16489 \else
16490 #1%
16491 \fi
16492 }
16493 \renewcommand*\CapThis{\FirstCaptrue}
16494
16495 \renewcommand*\NamesFormat[1]
16496 {\InHooktrue#1\global\FirstCapfalse}
16497
16498 \renewcommand*\MainNameHook[1]
16499 {\Capsfalse\InHooktrue#1\global\FirstCapfalse}
16500
16501 \let\FrontNamesFormat\Namesformat
16502 \let\FrontNameHook\MainNameHook
16503
16504 \ForgetThis\Luth\ was a leading figure in the Protestant
16505 Reformation. \Luth\ believed that one is declared
16506 righteous in a forensic sense by divine grace through faith
16507 created by the Holy Spirit via the Gospel and the Sacraments.
16508
16509 \ForgetThis\Cath\ was not only Queen of France in her own right,
16510 but she also guided the reigns of her three sons.
16511 \CapThis\LCath[\noexpand\AltCaps{d}e']
16512 was blamed for the St.\ Bartholomew's Day massacre that saw the
16513 murder of thousands of Huguenots.
16514
16515 \renewcommand*\NamesFormat{}
16516 \newcommand*\FrontNamesFormat{}
16517 \renewcommand*\MainNameHook{}
16518 \renewcommand*\FrontNameHook{}
16519
16520 %
16521 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16522 %
16523
16524 \section{Full Customization}
16525
16526 We do not go into this much detail in the manual because it starts to go farther afield of the main focus of \textsf{nameauth}. Nevertheless, we show it for completeness.
16527
16528 \subsection[With xparse]{With \textsf{xparse}}
16529
16530 \makeatletter
16531
16532 % Change the general-case name macro to show
16533 % a name in a framed, colored box.
16534
16535 \NewDocumentCommand{\MyName}{O{} m O{}}
16536 {\fcolorbox{black}{gray!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
16537
16538 % Likewise change the macro for when names are forced long.
16539 \NewDocumentCommand{\MyLName}{O{} m O{}}
16540 {\fcolorbox{black}{green!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
16541
16542 % Likewise change the macro when personal names are desired.
16543 \NewDocumentCommand{\MyFName}{O{} m O{}}
16544 {\fcolorbox{black}{yellow!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
16545 \makeatother
16546
16547 % Change the formatting hooks, but do not use alternate.
16548 % formatting, which is separate from that above.
16549 \renewcommand*\NamesFormat[1]{\scshape#1}
16550 \renewcommand*\MainNameHook[1]{#1}
16551
16552 % Change the naming macro hooks.
16553 \renewcommand*\NameauthName{\MyName}
16554 \renewcommand*\NameauthLName{\MyLName}
16555 \renewcommand*\NameauthFName{\MyFName}
16556
16557 \index{customization, insane}
16558 \ForgetThis\Name[Adolf]{Harnack} was a theologian who stressed
16559 the Fatherhood of God and the brotherhood of man.
16560 \Name[Adolf]{Harnack} flourished in the early twentieth
16561 century; \Name*[Adolf von]{Harnack}; \FName[Adolf]{Harnack}.
16562 \AltFormatInactive
16563
16564 \makeatletter
16565 \renewcommand*\NameauthName{\@nameauth@Name}
16566 \renewcommand*\NameauthLName{\@nameauth@Name}
16567 \renewcommand*\NameauthFName{\@nameauth@Name}
16568 \makeatother
16569
16570 \renewcommand*\NamesFormat{}
16571 \renewcommand*\MainNameHook{}
16572
16573 \subsection[With xargs]{With \textsf{xargs}}
16574
16575 \makeatletter
16576 % Change the general-case name macro to show
16577 % a name in a framed, colored box.
16578
16579 \renewcommandx\MyName[3][1=\empty, 3=\empty]
16580 {\fcolorbox{black}{gray!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
16581
16582 % Likewise change the macro for when names are forced long.
16583 \renewcommandx\MyLName[3][1=\empty, 3=\empty]
16584 {\fcolorbox{black}{green!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
16585
16586 % Likewise change the macro when personal names are desired.
16587 \renewcommandx\MyFName[3][1=\empty, 3=\empty]
16588 {\fcolorbox{black}{yellow!25!white}{\@nameauth@Name[#1]{#2}[#3]}}
16589 \makeatother
16590
16591 % Change the formatting hooks, but do not use alternate.
16592 % formatting, which is separate from that above.
16593 \renewcommand*\NamesFormat[1]{\scshape#1}
16594 \renewcommand*\MainNameHook[1]{#1}
16595
16596 % Change the naming macro hooks.
16597 \renewcommand*\NameauthName{\MyName}
16598 \renewcommand*\NameauthLName{\MyLName}
16599 \renewcommand*\NameauthFName{\MyFName}
16600
16601 \index{customization, insane}
16602 \ForgetThis\Name[Adolf]{Harnack} was a theologian who stressed
16603 the Fatherhood of God and the brotherhood of man.
16604 \Name[Adolf]{Harnack} flourished in the early twentieth
16605 century; \Name*[Adolf von]{Harnack}; \FName[Adolf]{Harnack}.
16606 \AltFormatInactive
16607
16608 \makeatletter
16609 \renewcommand*\NameauthName{\@nameauth@Name}
16610 \renewcommand*\NameauthLName{\@nameauth@Name}
16611 \renewcommand*\NameauthFName{\@nameauth@Name}
16612 \makeatother
16613
16614 \renewcommand*\NamesFormat{}
16615 \renewcommand*\MainNameHook{}
16616
16617 %
16618 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16619 %
16620
16621 \section{\protect\LaTeX\ Engines}
16622
16623 \subsection{\protect\texttt{compat.tex}}
16624
16625 One can define \Verb+\nolangs+ before loading the file below to inhibit
16626 the default language loading. We use Latin Modern for the font to get
16627 a consistent look. Below we list the salient cross-engine points from
16628 \texttt{compat.tex}, included with \textsf{nameauth}.
16629 \index{\protect\LaTeX\ engines}
16630
16631 \begin{quote}\small
16632 \VerbatimInput[gobble=0, firstline=24]{compat.tex}
16633 \end{quote}
16634
16635 \subsection{Check Engine Tests}
16636
16637 In the body text we can use something like the test below for:\quad
16638 \fbox{\ifxetex doing \texttt{pdf} things\else
16639 \ifpdf doing \texttt{pdf} things\else
16640 doing \texttt{dvi} things\fi
16641 \fi}
16642
16643 \begin{quote}\small
16644 \begin{Verbatim}
16645 \ifxetex
16646 doing \texttt{pdf} things
16647 \else
16648 \ifpdf
16649 doing \texttt{pdf} things
16650 \else
16651 doing \texttt{dvi} things
16652 \fi
16653 \fi
16654 \end{Verbatim}
16655 \end{quote}
16656
16657 The following equivalent conditional statements can help a macro
16658 or just the body text to work under multiple engines:
16659 \begin{quote}\small
16660 \begin{Verbatim}
16661 \ifxetex xelatex%
16662 \else
16663 \ifluatex
16664 \ifpdf lualatex (pdf)%
16665 \else lualatex (dvi)%
16666 \fi
16667 \else
16668 \ifpdf pdflatex%
16669 \else latex (dvi)%
16670 \fi
16671 \fi
16672 \fi
16673 \end{Verbatim}
16674
16675 \begin{Verbatim}
16676 \unless\ifxetex
16677 \unless\ifluatex
16678 \ifpdf pdflatex%
16679 \else latex (dvi)%
16680 \fi
16681 \else
16682 \ifpdf lualatex (pdf)%
16683 \else lualatex (dvi)%
16684 \fi
16685 \fi
16686 \else xelatex%
16687 \fi
16688 \end{Verbatim}
16689 \end{quote}
16690
16691 %
16692 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16693 %
16694
16695 \section{Miscellaneous Tests: Spaces}
16696
16697 Here we test to see if any unwanted spaces exist in macros that take
16698 name arguments. If everything is OK, one should see two vertical bars
16699 \texttt{||} where no output in the text is produced, or no spaces
16700 between an enclosed name and the bars. This section also tests if most
16701 possible argument combinations work in most macros that take name arguments.
16702
16703 \subsection{Western Name with Suffix}
16704
16705 \begin{quote}
16706 \Verb+\Name[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16707 |\Name[FNNa]{SNNa, Affix}[Alternate]|\\
16708 \Verb+\Name*[FNNa]{SNNa, Affix}+\dotfill
16709 |\Name*[FNNa]{SNNa, Affix}|\\
16710 \Verb+\DropAffix\Name*[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16711 |\DropAffix\Name*[FNNa]{SNNa, Affix}[Alternate]|\\
16712 \Verb+\DropAffix\Name*[FNNa]{SNNa, Affix}+\dotfill
16713 |\DropAffix\Name*[FNNa]{SNNa, Affix}|\\
16714 \Verb+\Name[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16715 |\Name[FNNa]{SNNa, Affix}[Alternate]|\\
16716 \Verb+\Name[FNNa]{SNNa, Affix}+\dotfill
16717 |\Name[FNNa]{SNNa, Affix}|\\
16718 \Verb+\FName[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16719 |\FName[FNNa]{SNNa, Affix}[Alternate]|\\
16720 \Verb+\FName[FNNa]{SNNa, Affix}+\dotfill
16721 |\FName[FNNa]{SNNa, Affix}|
16722 \end{quote}
16723
16724 \subsection{Western Name without Suffix}
16725
16726 \begin{quote}
16727 \Verb+\Name[FNNb]{SNNb}[Alternate]+\dotfill
16728 |\Name[FNNb]{SNNb}[Alternate]|\\
16729 \Verb+\Name*[FNNb]{SNNb}+\dotfill
16730 |\Name*[FNNb]{SNNb}|\\
16731 \Verb+\Name[FNNb]{SNNb}[Alternate]+\dotfill
16732 |\Name[FNNb]{SNNb}[Alternate]|\\
16733 \Verb+\Name[FNNb]{SNNb}+\dotfill
16734 |\Name[FNNb]{SNNb}|\\
16735 \Verb+\FName[FNNb]{SNNb}[Alternate]+\dotfill
16736 |\FName[FNNb]{SNNb}[Alternate]|\\
16737 \Verb+\FName[FNNb]{SNNb}+\dotfill
16738 |\FName[FNNb]{SNNb}|
16739 \end{quote}
16740
16741 \subsection{Non-Western Name, Current Syntax}
16742
16743 \begin{quote}
16744 \Verb+\Name{SNNc, Affix}[Alternate]+\dotfill
16745 |\Name{SNNc, Affix}[Alternate]|\\
16746 \Verb+\Name*{SNNc, Affix}+\dotfill
16747 |\Name*{SNNc, Affix}|\\
16748 \Verb+\Name{SNNc, Affix}[Alternate]+\dotfill
16749 |\Name{SNNc, Affix}[Alternate]|\\
16750 \Verb+\Name{SNNc, Affix}+\dotfill
16751 |\Name{SNNc, Affix}|\\
16752 \Verb+\FName{SNNc, Affix}[Alternate]+\dotfill
16753 |\FName{SNNc, Affix}[Alternate]|\\
16754 \Verb+\FName{SNNc, Affix}+\dotfill
16755 |\FName{SNNc, Affix}|\\
16756 \Verb+\ForceFN\FName{SNNc, Affix}[Alternate]+\dotfill
16757 |\ForceFN\FName{SNNc, Affix}[Alternate]|\\
16758 \Verb+\ForceFN\FName{SNNc, Affix}+\dotfill
16759 |\ForceFN\FName{SNNc, Affix}|
16760 \end{quote}
16761
16762 \subsection{Non-Western Name, Obsolete Syntax}
16763
16764 \begin{quote}
16765 \Verb+\Name{SNNd}[Alternate]+\dotfill
16766 |\Name{SNNd}[Alternate]|\\
16767 \Verb+\Name*{SNNd}[Alternate]+\dotfill
16768 |\Name*{SNNd}[Alternate]|\\
16769 \Verb+\Name{SNNd}[Alternate]+\dotfill
16770 |\Name{SNNd}[Alternate]|\\
16771 \Verb+\FName{SNNd}[Alternate]+\dotfill
16772 |\FName{SNNd}[Alternate]|\\
16773 \Verb+\ForceFN\FName{SNNd}[Alternate]+\dotfill
16774 |\ForceFN\FName{SNNd}[Alternate]|
16775 \end{quote}
16776
16777 \subsection{Working with All Forms}
16778
16779 \subsubsection{Index Names and Xrefs}
16780
16781 \begin{quote}
16782 \Verb+\IndexName[FNNe]{SNNe, Affix}[Alternate]+\dotfill
16783 |\IndexName[FNNe]{SNNe, Affix}[Alternate]|\\
16784 \Verb+\IndexName[FNNe]{SNNe, Affix}+\dotfill
16785 |\IndexName[FNNe]{SNNe, Affix}|\\
16786 \Verb+\IndexName{SNNf, Affix}[Alternate]+\dotfill
16787 |\IndexName{SNNf, Affix}[Alternate]|\\
16788 \Verb+\IndexName{SNNf, Affix}+\dotfill
16789 |\IndexName{SNNf, Affix}|\\
16790 \Verb+\IndexName{SNNf}[Alternate]+\dotfill
16791 |\IndexName{SNNf}[Alternate]|
16792 \end{quote}
16793
16794 \begin{quote}
16795 \Verb+\IndexRef[FNNg]{SNNg, Affix}[Alternate]{Target}+\dotfill
16796 |\IndexRef[FNNg]{SNNg, Affix}[Alternate]{Target}|\\
16797 \Verb+\IndexRef[FNNg]{SNNg, Affix}{Target}+\dotfill
16798 |\IndexRef[FNNg]{SNNg, Affix}{Target}|\\
16799 \Verb+\IndexRef{SNNh, Affix}[Alternate]{Target}+\dotfill
16800 |\IndexRef{SNNh, Affix}[Alternate]{Target}|\\
16801 \Verb+\IndexRef{SNNh, Affix}{Target}+\dotfill
16802 |\IndexRef{SNNh, Affix}{Target}|\\
16803 \Verb+\IndexRef{SNNh}[Alternate]{Target}+\dotfill
16804 |\IndexRef{SNNh}[Alternate]{Target}|
16805 \end{quote}
16806
16807 \subsubsection{Excluding and Including}
16808
16809 \begin{quote}
16810 \Verb+\ExcludeName[FNNi]{SNNi, Affix}[Alternate]+\dotfill
16811 |\ExcludeName[FNNi]{SNNi, Affix}[Alternate]|\\
16812 \Verb+\ExcludeName[FNNi]{SNNi, Affix}+\dotfill
16813 |\ExcludeName[FNNi]{SNNi, Affix}|\\
16814 \Verb+\ExcludeName{SNNj, Affix}[Alternate]+\dotfill
16815 |\ExcludeName{SNNj, Affix}[Alternate]|\\
16816 \Verb+\ExcludeName{SNNj, Affix}+\dotfill
16817 |\ExcludeName{SNNj, Affix}|\\
16818 \Verb+\ExcludeName{SNNj}[Alternate]+\dotfill
16819 |\ExcludeName{SNNj}[Alternate]|
16820 \end{quote}
16821
16822 \begin{quote}
16823 \Verb+\IncludeName[FNNi]{SNNi, Affix}[Alternate]+\dotfill
16824 |\IncludeName[FNNi]{SNNi, Affix}[Alternate]|\\
16825 \Verb+\IncludeName[FNNi]{SNNi, Affix}+\dotfill
16826 |\IncludeName[FNNi]{SNNi, Affix}|\\
16827 \Verb+\IncludeName{SNNj, Affix}[Alternate]+\dotfill
16828 |\IncludeName{SNNj, Affix}[Alternate]|\\
16829 \Verb+\IncludeName{SNNj, Affix}+\dotfill
16830 |\IncludeName{SNNj, Affix}|\\
16831 \Verb+\IncludeName{SNNj}[Alternate]+\dotfill
16832 |\IncludeName{SNNj}[Alternate]|
16833 \end{quote}
16834
16835 \begin{quote}
16836 \Verb+\IncludeName*[FNNi]{SNNi, Affix}[Alternate]+\dotfill
16837 |\IncludeName*[FNNi]{SNNi, Affix}[Alternate]|\\
16838 \Verb+\IncludeName*[FNNi]{SNNi, Affix}+\dotfill
16839 |\IncludeName*[FNNi]{SNNi, Affix}|\\
16840 \Verb+\IncludeName*{SNNj, Affix}[Alternate]+\dotfill
16841 |\IncludeName*{SNNj, Affix}[Alternate]|\\
16842 \Verb+\IncludeName*{SNNj, Affix}+\dotfill
16843 |\IncludeName*{SNNj, Affix}|\\
16844 \Verb+\IncludeName*{SNNj}[Alternate]+\dotfill
16845 |\IncludeName*{SNNj}[Alternate]|
16846 \end{quote}
16847
16848 \subsubsection{Index Sorting}
16849
16850 \begin{quote}
16851 \Verb+\PretagName[FNNk]{SNNk, Affix}[Alternate]{Sorta}+\dotfill
16852 |\PretagName[FNNk]{SNNk, Affix}[Alternate]{Sorta}|\\
16853 \Verb+\PretagName[FNNl]{SNNl, Affix}{Sortb}+\dotfill
16854 |\PretagName[FNNl]{SNNl, Affix}{Sortb}|\\
16855 \Verb+\PretagName{SNNm, Affix}[Alternate]{Sortc}+\dotfill
16856 |\PretagName{SNNm, Affix}[Alternate]{Sortc}|\\
16857 \Verb+\PretagName{SNNn, Affix}{Sortd}+\dotfill
16858 |\PretagName{SNNn, Affix}{Sortd}|\\
16859 \Verb+\PretagName{SNNo}[Alternate]{Sorte}+\dotfill
16860 |\PretagName{SNNo}[Alternate]{Sorte}|
16861 \end{quote}
16862
16863 \subsubsection{Index Tagging and Untagging}
16864
16865 \begin{quote}
16866 \Verb+\TagName[FNNa]{SNNa, Affix}[Alternate]{Tag}+\dotfill
16867 |\TagName[FNNa]{SNNa, Affix}[Alternate]{Tag}|\\
16868 \Verb+\TagName[FNNa]{SNNa, Affix}{Tag}+\dotfill
16869 |\TagName[FNNa]{SNNa, Affix}{Tag}|\\
16870 \Verb+\TagName[FNNb]{SNNb}[Alternate]{Tag}+\dotfill
16871 |\TagName[FNNb]{SNNb}[Alternate]{Tag}|\\
16872 \Verb+\TagName[FNNb]{SNNb}{Tag}+\dotfill
16873 |\TagName[FNNb]{SNNb, Affix}{Tag}|\\
16874 \Verb+\TagName{SNNc, Affix}[Alternate]{Tag}+\dotfill
16875 |\TagName{SNNc, Affix}[Alternate]{Tag}|\\
16876 \Verb+\TagName{SNNc, Affix}{Tag}+\dotfill
16877 |\TagName{SNNc, Affix}{Tag}|\\
16878 \Verb+\TagName{SNNd}[Alternate]{Tag}+\dotfill
16879 |\TagName{SNNd}[Alternate]{Tag}|
16880 \end{quote}
16881
16882 \begin{quote}
16883 \Verb+\UntagName[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16884 |\UntagName[FNNa]{SNNa, Affix}[Alternate]|\\
16885 \Verb+\UntagName[FNNa]{SNNa, Affix}+\dotfill
16886 |\UntagName[FNNa]{SNNa, Affix}|\\
16887 \Verb+\UntagName[FNNb]{SNNb}[Alternate]+\dotfill
16888 |\UntagName[FNNb]{SNNb}[Alternate]|\\
16889 \Verb+\UntagName[FNNb]{SNNb}+\dotfill
16890 |\UntagName[FNNb]{SNNb, Affix}|\\
16891 \Verb+\UntagName{SNNc, Affix}[Alternate]+\dotfill
16892 |\UntagName{SNNc, Affix}[Alternate]|\\
16893 \Verb+\UntagName{SNNc, Affix}+\dotfill
16894 |\UntagName{SNNc, Affix}|\\
16895 \Verb+\UntagName{SNNd}[Alternate]+\dotfill
16896 |\UntagName{SNNd}[Alternate]|
16897 \end{quote}
16898
16899 \subsubsection{Name Info}
16900
16901 \begin{quote}
16902 \Verb+\NameAddInfo[FNNa]{SNNa, Affix}[Alternate]{Info1}+\dotfill
16903 |\NameAddInfo[FNNa]{SNNa, Affixa}[Alternate]{Info1}|\\
16904 \Verb+\NameAddInfo[FNNa]{SNNa, Affix}{Info2}+\dotfill
16905 |\NameAddInfo[FNNa]{SNNa, Affix}{Info2}|\\
16906 \Verb+\NameAddInfo[FNNb]{SNNb}[Alternate]{Info3}+\dotfill
16907 |\NameAddInfo[FNNb]{SNNb}[Alternate]{Info3}|\\
16908 \Verb+\NameAddInfo[FNNb]{SNNb}{Info4}+\dotfill
16909 |\NameAddInfo[FNNb]{SNNb}{Info4}|\\
16910 \Verb+\NameAddInfo{SNNc, Affix}[Alternate]{Info5}+\dotfill
16911 |\NameAddInfo{SNNc, Affix}[Alternate]{Info5}|\\
16912 \Verb+\NameAddInfo{SNNc, Affix}{Info6}+\dotfill
16913 |\NameAddInfo{SNNc, Affix}{Info6}|\\
16914 \Verb+\NameAddInfo{SNNd}[Alternate]{Info7}+\dotfill
16915 |\NameAddInfo{SNNd}[Alternate]{Info7}|
16916 \end{quote}
16917
16918 \begin{quote}
16919 \Verb+\NameQueryInfo[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16920 |\NameQueryInfo[FNNa]{SNNa, Affix}[Alternate]|\\
16921 \Verb+\NameQueryInfo[FNNa]{SNNa, Affix}+\dotfill
16922 |\NameQueryInfo[FNNa]{SNNa, Affix}|\\
16923 \Verb+\NameQueryInfo[FNNb]{SNNb}[Alternate]+\dotfill
16924 |\NameQueryInfo[FNNb]{SNNb}[Alternate]|\\
16925 \Verb+\NameQueryInfo[FNNb]{SNNb}+\dotfill
16926 |\NameQueryInfo[FNNb]{SNNb}|\\
16927 \Verb+\NameQueryInfo{SNNc, Affix}[Alternate]+\dotfill
16928 |\NameQueryInfo{SNNc, Affix}[Alternate]|\\
16929 \Verb+\NameQueryInfo{SNNc, Affix}+\dotfill
16930 |\NameQueryInfo{SNNc, Affix}|\\
16931 \Verb+\NameQueryInfo{SNNd}[Alternate]+\dotfill
16932 |\NameQueryInfo{SNNd}[Alternate]|
16933 \end{quote}
16934
16935 \begin{quote}
16936 \Verb+\NameClearInfo[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16937 |\NameClearInfo[FNNa]{SNNa, Affix}[Alternate]|\\
16938 \Verb+\NameClearInfo[FNNa]{SNNa, Affix}+\dotfill
16939 |\NameClearInfo[FNNa]{SNNa, Affix}|\\
16940 \Verb+\NameClearInfo[FNNb]{SNNb}[Alternate]+\dotfill
16941 |\NameClearInfo[FNNb]{SNNb}[Alternate]|\\
16942 \Verb+\NameClearInfo[FNNb]{SNNb}+\dotfill
16943 |\NameClearInfo[FNNb]{SNNb}|\\
16944 \Verb+\NameClearInfo{SNNc, Affix}[Alternate]+\dotfill
16945 |\NameClearInfo{SNNc, Affix}[Alternate]|\\
16946 \Verb+\NameClearInfo{SNNc, Affix}+\dotfill
16947 |\NameClearInfo{SNNc, Affix}|\\
16948 \Verb+\NameClearInfo{SNNd}[Alternate]+\dotfill
16949 |\NameClearInfo{SNNd}[Alternate]|
16950 \end{quote}
16951
16952 \subsubsection{Forgetting, Global}
16953
16954 \begin{quote}
16955 \Verb+\ForgetName[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16956 |\ForgetName[FNNa]{SNNa, Affix}[Alternate]|\\
16957 \Verb+\ForgetName[FNNa]{SNNa, Affix}+\dotfill
16958 |\ForgetName[FNNa]{SNNa, Affix}|\\
16959 \Verb+\ForgetName[FNNb]{SNNb}[Alternate]+\dotfill
16960 |\ForgetName[FNNb]{SNNb}[Alternate]|\\
16961 \Verb+\ForgetName[FNNb]{SNNb}+\dotfill
16962 |\ForgetName[FNNb]{SNNb}|\\
16963 \Verb+\ForgetName{SNNc, Affix}[Alternate]+\dotfill
16964 |\ForgetName{SNNc, Affix}[Alternate]|\\
16965 \Verb+\ForgetName{SNNc, Affix}+\dotfill
16966 |\ForgetName{SNNc, Affix}|\\
16967 \Verb+\ForgetName{SNNd}[Alternate]+\dotfill
16968 |\ForgetName{SNNd}[Alternate]|
16969 \end{quote}
16970
16971 \subsubsection{Subverting, Local}
16972
16973 \begin{quote}
16974 \Verb+\LocalNames+\LocalNames\\
16975 \Verb+\SubvertName[FNNa]{SNNa, Affix}[Alternate]+\dotfill
16976 |\SubvertName[FNNa]{SNNa, Affix}[Alternate]|\\
16977 \Verb+\SubvertName[FNNb]{SNNb}[Alternate]+\dotfill
16978 |\SubvertName[FNNb]{SNNb}[Alternate]|\\
16979 \Verb+\SubvertName{SNNc, Affix}[Alternate]+\dotfill
16980 |\SubvertName{SNNc, Affix}[Alternate]|\\
16981 \Verb+\SubvertName{SNNd}[Alternate]+\dotfill
16982 |\SubvertName{SNNd}[Alternate]|\\
16983 \Verb+\GlobalNames+\GlobalNames
16984 \end{quote}
16985
16986 \subsubsection{Name Conditionals}
16987
16988 \begin{quote}
16989 \Verb+\IfMainName[FNNa]{SNNa, Affix}{Y}{N}+\dotfill
16990 |\IfMainName[FNNa]{SNNa, Affix}{Y}{N}|\\
16991 \Verb+\IfMainName[FNNb]{SNNb}{Y}{N}+\dotfill
16992 |\IfMainName[FNNb]{SNNb}{Y}{N}|\\
16993 \Verb+\IfMainName{SNNc, Affix}{Y}{N}+\dotfill
16994 |\IfMainName{SNNc, Affix}{Y}{N}|\\
16995 \Verb+\IfMainName{SNNd}[Alternate]{Y}{N}+\dotfill
16996 |\IfMainName{SNNd}[Alternate]{Y}{N}|
16997 \end{quote}
16998
16999 \begin{quote}
17000 \Verb+\IfFrontName[FNNa]{SNNa, Affix}[Alternate]{Y}{N}+\dotfill
17001 |\IfFrontName[FNNa]{SNNa, Affix}[Alternate]{Y}{N}|\\
17002 \Verb+\IfFrontName[FNNb]{SNNb}[Alternate]{Y}{N}+\dotfill
17003 |\IfFrontName[FNNb]{SNNb}[Alternate]{Y}{N}|\\
17004 \Verb+\IfFrontName{SNNc, Affix}[Alternate]{Y}{N}+\dotfill
17005 |\IfFrontName{SNNc, Affix}[Alternate]{Y}{N}|\\
17006 \Verb+\IfFrontName{SNNd}[Alternate]{Y}{N}+\dotfill
17007 |\IfFrontName{SNNd}[Alternate]{Y}{N}|
17008 \end{quote}
17009
17010 \begin{quote}
17011 \Verb+\SeeAlso\IndexRef[FNNp]{SNNp, Affix}{Target}+\dotfill
17012 |\SeeAlso\IndexRef[FNNp]{SNNp, Affix}{Target}|\\
17013 \Verb+\ExcludeName{SNNq, Affix}+\dotfill
17014 |\ExcludeName{SNNq, Affix}|\\
17015 \Verb+\IfAKA[FNNp]{SNNp, Affix}[Alternate]{Y}{N}{X}+\dotfill
17016 |\IfAKA[FNNp]{SNNp, Affix}[Alternate]{Y}{N}{X}|\\
17017 \Verb+\IfAKA[FNNp]{SNNp, Affix}{Y}{N}{X}+\dotfill
17018 |\IfAKA[FNNp]{SNNp, Affix}{Y}{N}{X}|\\
17019 \Verb+\IfAKA{SNNq, Affix}[Alternate]{Y}{N}{X}+\dotfill
17020 |\IfAKA{SNNq, Affix}[Alternate]{Y}{N}{X}|\\
17021 \Verb+\IfAKA{SNNq, Affix}{Y}{N}{X}+\dotfill
17022 |\IfAKA{SNNq, Affix}{Y}{N}{X}|\\
17023 \Verb+\IfAKA{SNNr}[Alternate]{Y}{N}{X}+\dotfill
17024 |\IfAKA{SNNr}[Alternate]{Y}{N}{X}|
17025 \end{quote}
17026
17027 \subsubsection{Pseudonym Syntax: The Horror}
17028
17029 \begin{quote}
17030 \Verb+\AKA[FNN1]{SNN1, Affix1}%+\\
17031 \Verb+ [FNN2]{SNN2, Affix2}[Alternate2]+\dotfill
17032 |\AKA[FNN1]{SNN1, Affix1}[FNN2]{SNN2, Affix2}[Alternate2]|\\
17033 \Verb+\AKA[FNN1]{SNN1, Affix1}%+\\
17034 \Verb+ [FNN2]{SNN2, Affix2}+\dotfill
17035 |\AKA[FNN1]{SNN1, Affix1}[FNN2]{SNN2, Affix2}|\\
17036 \Verb+\DropAffix\AKA[FNN1]{SNN1, Affix1}%+\\
17037 \Verb+ [FNN2]{SNN2, Affix2}+\dotfill
17038 |\DropAffix\AKA[FNN1]{SNN1, Affix1}[FNN2]{SNN2, Affix2}|\\
17039 \Verb+\AKA*[FNN1]{SNN1, Affix1}%+\\
17040 \Verb+ [FNN2]{SNN2, Affix2}[Alternate2]+\dotfill
17041 |\AKA*[FNN1]{SNN1, Affix1}[FNN2]{SNN2, Affix2}[Alternate2]|\\
17042 \Verb+\AKA*[FNN1]{SNN1, Affix1}%+\\
17043 \Verb+ [FNN2]{SNN2, Affix2}+\dotfill
17044 |\AKA*[FNN1]{SNN1, Affix1}[FNN2]{SNN2, Affix2}|
17045 \end{quote}
17046
17047 \begin{quote}
17048 \Verb+\AKA[FNN1]{SNN1, Affix1}%+\\
17049 \Verb+ {SNN3, Affix3}[Alternate3]+\dotfill
17050 |\AKA[FNN1]{SNN1, Affix1}{SNN3, Affix3}[Alternate3]|\\
17051 \Verb+\AKA[FNN1]{SNN1, Affix1}%+\\
17052 \Verb+ {SNN3, Affix3}+\dotfill
17053 |\AKA[FNN1]{SNN1, Affix1}{SNN3, Affix3}|\\
17054 \Verb+\AKA*[FNN1]{SNN1, Affix1}%+\\
17055 \Verb+ {SNN3, Affix3}+\dotfill
17056 |\AKA*[FNN1]{SNN1, Affix1}{SNN3, Affix3}|\\
17057 \Verb+\ForceFN\AKA*[FNN1]{SNN1, Affix1}%+\\
17058 \Verb+ {SNN3, Affix3}[Alternate3]+\dotfill
17059 |\ForceFN\AKA*[FNN1]{SNN1, Affix1}{SNN3, Affix3}[Alternate3]|\\
17060 \Verb+\ForceFN\AKA*[FNN1]{SNN1, Affix1}%+\\
17061 \Verb+ {SNN3, Affix3}+\dotfill
17062 |\ForceFN\AKA*[FNN1]{SNN1, Affix1}{SNN3, Affix3}|
17063 \end{quote}
17064
17065 \begin{quote}
17066 \Verb+\AKA[FNN1]{SNN1, Affix1}{SNN4}[Alternate4]+\dotfill
17067 |\AKA[FNN1]{SNN1, Affix1}{SNN4}[Alternate4]|\\
17068 \Verb+\AKA*[FNN1]{SNN1, Affix1}{SNN4}[Alternate4]+\dotfill
17069 |\AKA*[FNN1]{SNN1, Affix1}{SNN4}[Alternate4]|\\
17070 \Verb+\ForceFN\AKA*[FNN1]{SNN1, Affix1}{SNN4}[Alternate4]+\dotfill
17071 |\ForceFN\AKA*[FNN1]{SNN1, Affix1}{SNN4}[Alternate4]|
17072 \end{quote}
17073
17074 \begin{quote}
17075 \Verb+\AKA{SNN5, Affix5}%+\\
17076 \Verb+ [FNN6]{SNN6, Affix6}[Alternate6]+\dotfill
17077 |\AKA{SNN5, Affix5}[FNN6]{SNN6, Affix6}[Alternate6]|\\
17078 \Verb+\AKA{SNN5, Affix5}{SNN7, Affix7}+\dotfill
17079 |\AKA{SNN5, Affix5}{SNN7, Affix7}|\\
17080 \Verb+\AKA{SNN5, Affix5}{SNN8}[Alternate8]+\dotfill
17081 |\AKA{SNN5, Affix5}{SNN8}[Alternate8]|\\
17082 \end{quote}
17083
17084 \subsection{Reference Targets for Completeness}
17085
17086 \begin{quote}
17087 \Verb+\IndexName{Target}+\dotfill|\IndexName{Target}|\\
17088 \Verb+\IndexName[FNN1]{SNN1, Affix1}+\dotfill
17089 |\IndexName[FNN1]{SNN1, Affix1}|\\
17090 \Verb+\IndexName{SNN5, Affix5}+\dotfill
17091 |\IndexName{SNN5, Affix5}|
17092 \end{quote}
17093
17094 %
17095 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17096 %
17097
17098 \phantomsection
17099 \addcontentsline{toc}{section}{Index of Persons}
17100 \printindex[per]
17101
17102 \renewcommand\indexname{Index of Subjects}
17103 \phantomsection
17104 \addcontentsline{toc}{section}{Index of Subjects}
17105 \printindex
17106
17107 \end{document}
17108 %examplesvb
17109 %</examples>
17110 \endinput