summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/Makefile92
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/README93
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/README.txt90
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/nameauth.hd0
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/nameauth.pdfbin706194 -> 687563 bytes
-rw-r--r--Master/texmf-dist/source/latex/nameauth/nameauth.dtx3571
-rw-r--r--Master/texmf-dist/source/latex/nameauth/nameauth.ins97
-rw-r--r--Master/texmf-dist/tex/latex/nameauth/nameauth.sty1576
8 files changed, 3381 insertions, 2138 deletions
diff --git a/Master/texmf-dist/doc/latex/nameauth/Makefile b/Master/texmf-dist/doc/latex/nameauth/Makefile
index f5c6c35da7e..e3989ed9cba 100644
--- a/Master/texmf-dist/doc/latex/nameauth/Makefile
+++ b/Master/texmf-dist/doc/latex/nameauth/Makefile
@@ -1,52 +1,40 @@
-engine ?= pdflatex # Override on the command line
- # with engine=latex
- # or with engine=xelatex
- # or with engine=lualatex.
- # If with lualatex, then use the fullpdf target.
-
-# The default builds the distribution uploaded to CTAN.
-dist: pdf clean
-
-# Making this target includes the code listing
-fullpdf : sty
- $(engine) nameauth.dtx
- makeindex -s gglo.ist -o nameauth.gls nameauth.glo
- makeindex -s gind.ist -o nameauth.ind nameauth.idx
- $(engine) nameauth.dtx
- $(engine) nameauth.dtx
-
-# This target omits the code listing.
-pdf : sty
- $(engine) -draftmode "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
- makeindex -s gglo.ist -o nameauth.gls nameauth.glo
- makeindex -s gind.ist -o nameauth.ind nameauth.idx
- $(engine) "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
- $(engine) "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
-
-# Build the package.
-sty : nameauth.dtx nameauth.ins
- $(engine) nameauth.ins
-
-# Instead of using the shell to see if files exist, take advantage of rm.
-clean :
- rm -f nameauth.aux
- rm -f nameauth.glo
- rm -f nameauth.gls
- rm -f nameauth.idx
- rm -f nameauth.ilg
- rm -f nameauth.ind
- rm -f nameauth.log
- rm -f nameauth.out
- rm -f nameauth.toc
- rm -f nameauth.hd
- rm -f nameauth.top
- rm -f texput.*
-
-# Remove all but the barest source files.
-clobber : clean
- rm -f nameauth.dvi
- rm -f nameauth.pdf
- rm -f nameauth.sty
- touch nameauth.*
-
-
+NAME = nameauth
+ENGINE ?= pdflatex
+# On the command line:
+# make ENGINE=latex
+# make ENGINE=xelatex
+# make ENGINE=lualatex
+SHELL = bash
+PWD = $(shell pwd)
+VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
+LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
+UTREE = $(shell kpsewhich --var-value TEXMFHOME)
+all: $(NAME).pdf
+ test -e README.txt && mv README.txt README || exit 0
+$(NAME).pdf: $(NAME).dtx
+ $(ENGINE) -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null
+ $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+ if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
+ if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
+ $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+ $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+clean:
+ rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc} README.txt
+distclean: clean
+ rm -f $(NAME).{pdf,sty} README
+inst: all
+ mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
+ cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
+ cp Makefile $(UTREE)/source/latex/$(NAME)
+ cp $(NAME).sty $(UTREE)/tex/latex/$(NAME)
+ cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME)
+install: all
+ sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
+ sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
+ sudo cp Makefile $(LOCAL)/source/latex/$(NAME)
+ sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME)
+ sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME)
+zip: all
+ ln -sf . $(NAME)
+ zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,Makefile,$(NAME).{pdf,dtx}}
+ rm $(NAME)
diff --git a/Master/texmf-dist/doc/latex/nameauth/README b/Master/texmf-dist/doc/latex/nameauth/README
index 137bcacd4ed..1063131bddd 100644
--- a/Master/texmf-dist/doc/latex/nameauth/README
+++ b/Master/texmf-dist/doc/latex/nameauth/README
@@ -1,59 +1,90 @@
-The nameauth package
-Charles P. Schaum
-charles dot schaum at comcast dot net
-v1.9 from 2015/07/09
+|
+--------:| ----------------------------------------------------------------
+nameauth:| Name authority mechanism for consistency in text and index
+ Author:| Charles P. Schaum
+ E-mail:| charles dot schaum at comcast dot net
+ License:| Released under the LaTeX Project Public License v1.3c or later
+ See:| http://www.latex-project.org/lppl.txt
-Abstract
+Short description:
The nameauth package automates the formatting and indexing of names.
This aids the use of a name authority and the process of textual reordering
and revision without needing to retype name references.
-Files Distribution
+Files Distribution
-README This file (normally in TEXMFDIST/doc/latex/nameauth)
-nameauth.pdf Documentation (normally in TEXMFDIST/doc/latex/nameauth)
+README This file
+nameauth.pdf Documentation
-Makefile Automates building with GNU make 3.81
-nameauth.ins Installer
-nameauth.dtx Documented LaTeX file containing both code and documentation
+Makefile Automates building with GNU make 3.81
+nameauth.dtx Documented LaTeX file containing both code and documentation
Installation
-Unpack nameauth.zip.
+Unpack nameauth.zip in an appropriate directory.
-Generate the file nameauth.sty, e.g.:
- $ pdflatex nameauth.ins
+Note that the instructions below assume that you are using a *nix-
+compatible computer. If that is otherwise, you will need to modify
+these instructions to your needs.
-Usually this will go in TEXMFDIST/tex/latex/nameauth.
+If you have a make utility compatible with GNU make you can type
-Generate the documentation (optimal with pdflatex):
- $ pdflatex nameauth.dtx -draftmode "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
- $ makeindex -s gglo.ist -o nameauth.gls nameauth.glo
- $ makeindex -s gind.ist -o nameauth.ind nameauth.idx
- $ pdflatex nameauth.dtx "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
- $ pdflatex nameauth.dtx "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
+make inst
-I used GNU make to automate the process. See the makefile for more options:
- $ make
+to install the package into your $TEXMFHOME tree or
-Create the directories listed above. For TeX Live, TEXMFDIST is often /usr/local/texmf/<year>/texmf-dist on Posix-compliant systems. Manual installation calls rather for /usr/local/texlive/texmf-local or ~/texmf.
+make install
-MacTeX and MikTeX differ. Please refer to your distribution manual.
+to install the package into your $TEXMFLOCAL tree for all users.
-Copy the distribution files to their appropriate destinations.
+Manually, you can generate the package files. First you generate the
+installer driver, README, and style files, with a preliminary PDF:
-Run mktexlsr with the appropriate level of permissions.
+pdflatex -shell-escape -recorder -interaction=batchmode nameauth.dtx
+
+Next you generate the PDF with a table of contents and all cross-references
+validated, so that the index entries will not move:
+
+pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+
+The next commands generate the glossary/index and final pdf file
+
+makeindex -q -s gglo.ist -o nameauth.gls nameauth.glo
+makeindex -q -s gind.ist -o nameauth.ind nameauth.idx
+pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+
+Normally you create the following manual installation directories for user:
+
+$TEXMFHOME/source/latex/nameauth dtx file
+$TEXMFHOME/tex/latex/nameauth sty file
+$TEXMFHOME/doc/latex/nameauth pdf file
+
+and you create the following manual installation directories for local site:
+
+$TEXMFLOCAL/source/latex/nameauth dtx file
+$TEXMFLOCAL/tex/latex/nameauth sty file
+$TEXMFLOCAL/doc/latex/nameauth pdf file
+
+The above environment variables often are /usr/local/texlive/texmf-local and
+~/texmf.
+
+Run mktexlsr with the appropriate level of permissions to complete the install.
Testing notes:
-This packages works and builds with the commands latex, lualatex, pdflatex, and xelatex. It can be used with makeindex and texindy. I have built the package documentation successfully with lualatex, pdflatex, and xelatex, using only makeindex.
+This packages works and builds with latex, lualatex, pdflatex, and xelatex.
+It can be used with makeindex and texindy. The documentation builds with
+lualatex, pdflatex, and xelatex, using makeindex.
-For testing purposes, the make file permits one to change the typesetting engine on the command line. The default is to build the package with pdflatex. See Makefile for more details.
+For testing, the make file permits one to change the typesetting engine
+on the command line. The default is to build the package and documentation
+with pdflatex. See the make file for details.
License
-This material is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license.
+This material is subject to the LaTeX Project Public License:
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
Happy TeXing!
-
diff --git a/Master/texmf-dist/doc/latex/nameauth/README.txt b/Master/texmf-dist/doc/latex/nameauth/README.txt
new file mode 100644
index 00000000000..1063131bddd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nameauth/README.txt
@@ -0,0 +1,90 @@
+|
+--------:| ----------------------------------------------------------------
+nameauth:| Name authority mechanism for consistency in text and index
+ Author:| Charles P. Schaum
+ E-mail:| charles dot schaum at comcast dot net
+ License:| Released under the LaTeX Project Public License v1.3c or later
+ See:| http://www.latex-project.org/lppl.txt
+
+Short description:
+
+The nameauth package automates the formatting and indexing of names.
+This aids the use of a name authority and the process of textual reordering
+and revision without needing to retype name references.
+
+Files Distribution
+
+README This file
+nameauth.pdf Documentation
+
+Makefile Automates building with GNU make 3.81
+nameauth.dtx Documented LaTeX file containing both code and documentation
+
+Installation
+
+Unpack nameauth.zip in an appropriate directory.
+
+Note that the instructions below assume that you are using a *nix-
+compatible computer. If that is otherwise, you will need to modify
+these instructions to your needs.
+
+If you have a make utility compatible with GNU make you can type
+
+make inst
+
+to install the package into your $TEXMFHOME tree or
+
+make install
+
+to install the package into your $TEXMFLOCAL tree for all users.
+
+Manually, you can generate the package files. First you generate the
+installer driver, README, and style files, with a preliminary PDF:
+
+pdflatex -shell-escape -recorder -interaction=batchmode nameauth.dtx
+
+Next you generate the PDF with a table of contents and all cross-references
+validated, so that the index entries will not move:
+
+pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+
+The next commands generate the glossary/index and final pdf file
+
+makeindex -q -s gglo.ist -o nameauth.gls nameauth.glo
+makeindex -q -s gind.ist -o nameauth.ind nameauth.idx
+pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+
+Normally you create the following manual installation directories for user:
+
+$TEXMFHOME/source/latex/nameauth dtx file
+$TEXMFHOME/tex/latex/nameauth sty file
+$TEXMFHOME/doc/latex/nameauth pdf file
+
+and you create the following manual installation directories for local site:
+
+$TEXMFLOCAL/source/latex/nameauth dtx file
+$TEXMFLOCAL/tex/latex/nameauth sty file
+$TEXMFLOCAL/doc/latex/nameauth pdf file
+
+The above environment variables often are /usr/local/texlive/texmf-local and
+~/texmf.
+
+Run mktexlsr with the appropriate level of permissions to complete the install.
+
+Testing notes:
+
+This packages works and builds with latex, lualatex, pdflatex, and xelatex.
+It can be used with makeindex and texindy. The documentation builds with
+lualatex, pdflatex, and xelatex, using makeindex.
+
+For testing, the make file permits one to change the typesetting engine
+on the command line. The default is to build the package and documentation
+with pdflatex. See the make file for details.
+
+License
+
+This material is subject to the LaTeX Project Public License:
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+
+Happy TeXing!
diff --git a/Master/texmf-dist/doc/latex/nameauth/nameauth.hd b/Master/texmf-dist/doc/latex/nameauth/nameauth.hd
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/nameauth/nameauth.hd
diff --git a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf
index aa2a6de5bd8..c79aba1f6e1 100644
--- a/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf
+++ b/Master/texmf-dist/doc/latex/nameauth/nameauth.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
index d4a81496bf6..34f9c1e2786 100644
--- a/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
+++ b/Master/texmf-dist/source/latex/nameauth/nameauth.dtx
@@ -1,36 +1,185 @@
% \iffalse meta-comment
-%
-% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net>
-% ---------------------------------------------------------------------------
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Charles P. Schaum.
-%
-% This work consists of the files nameauth.dtx and nameauth.ins
-% and the derived filebase nameauth.sty.
-%
+% vim: textwidth=75
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+|
+--------:| ----------------------------------------------------------------
+nameauth:| Name authority mechanism for consistency in text and index
+ Author:| Charles P. Schaum
+ E-mail:| charles dot schaum at comcast dot net
+ License:| Released under the LaTeX Project Public License v1.3c or later
+ See:| http://www.latex-project.org/lppl.txt
+
+
+Short description:
+
+The nameauth package automates the formatting and indexing of names.
+This aids the use of a name authority and the process of textual reordering
+and revision without needing to retype name references.
+
+Files Distribution
+
+README This file
+nameauth.pdf Documentation
+
+Makefile Automates building with GNU make 3.81
+nameauth.dtx Documented LaTeX file containing both code and documentation
+
+Installation
+
+Unpack nameauth.zip in an appropriate directory.
+
+Note that the instructions below assume that you are using a *nix-
+compatible computer. If that is otherwise, you will need to modify
+these instructions to your needs.
+
+If you have a make utility compatible with GNU make you can type
+
+ make inst
+
+to install the package into your $TEXMFHOME tree or
+
+ make install
+
+to install the package into your $TEXMFLOCAL tree for all users.
+
+Manually, you can generate the package files. First you generate the
+installer driver, README, and style files, with a preliminary PDF:
+
+ pdflatex -shell-escape -recorder -interaction=batchmode nameauth.dtx
+
+Next you generate the PDF with a table of contents and all cross-references
+validated, so that the index entries will not move:
+
+ pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+
+The next commands generate the glossary/index and final pdf file
+
+ makeindex -q -s gglo.ist -o nameauth.gls nameauth.glo
+ makeindex -q -s gind.ist -o nameauth.ind nameauth.idx
+ pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+ pdflatex --recorder --interaction=nonstopmode nameauth.dtx
+
+Normally you create the following manual installation directories for user:
+
+ $TEXMFHOME/source/latex/nameauth dtx file
+ $TEXMFHOME/tex/latex/nameauth sty file
+ $TEXMFHOME/doc/latex/nameauth pdf file
+
+and you create the following manual installation directories for local site:
+
+ $TEXMFLOCAL/source/latex/nameauth dtx file
+ $TEXMFLOCAL/tex/latex/nameauth sty file
+ $TEXMFLOCAL/doc/latex/nameauth pdf file
+
+The above environment variables often are /usr/local/texlive/texmf-local and
+~/texmf.
+
+Run mktexlsr with the appropriate level of permissions to complete the install.
+
+Testing notes:
+
+This packages works and builds with latex, lualatex, pdflatex, and xelatex.
+It can be used with makeindex and texindy. The documentation builds with
+lualatex, pdflatex, and xelatex, using makeindex.
+
+For testing, the make file permits one to change the typesetting engine
+on the command line. The default is to build the package and documentation
+with pdflatex. See the make file for details.
+
+License
+
+This material is subject to the LaTeX Project Public License:
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+
+Happy TeXing!
+%</readme>
+%<*internal>
+\fi
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%</internal>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+--------:| ----------------------------------------------------------------
+nameauth:| Name authority mechanism for consistency in text and index
+ Author:| Charles P. Schaum
+ E-mail:| charles dot schaum at comcast dot net
+ License:| Released under the LaTeX Project Public License v1.3c or later
+ See:| http://www.latex-project.org/lppl.txt
+
+\endpreamble
+\postamble
+
+Copyright (C) 2015 by Charles P. Schaum <charles dot schaum at comcast dot net>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in the file:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
+Charles P. Schaum.
+
+This work consists of the file nameauth.dtx and a Makefile.
+Running "make" generates the derived files README, nameauth.pdf and nameauth.sty.
+Running "make inst" installs the files in the user's TeX tree.
+Running "make install" installs the files in the local TeX tree.
+
+\endpostamble
+
+\usedir{tex/latex/nameauth}
+\generate{
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+%</install>
+%<install>\endbatchfile
+%<*internal>
+\usedir{source/latex/nameauth}
+\generate{
+ \file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\nopreamble\nopostamble
+\usedir{doc/latex/nameauth}
+\generate{
+ \file{README.txt}{\from{\jobname.dtx}{readme}}
+}
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</internal>
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{nameauth.dtx}
%</driver>
-%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{nameauth}
%<*package>
- [2015/07/09 v1.9 name authority macros to aid consistent display and indexing of names]
+ [2015/11/11 v2.0 Name authority mechanism for consistency in text and index]
%</package>
-%
%<*driver>
-\documentclass{ltxdoc}
+\documentclass[11pt]{ltxdoc}
+\usepackage[textwidth=135mm,textheight=237mm,right=25mm,nohead]{geometry}
+\usepackage[numbered]{hypdoc}
+\usepackage{\jobname}
+\usepackage[american]{babel}
+\usepackage{makeidx}
+\usepackage{multicol}
+\usepackage[toc]{multitoc}
+\usepackage{tikz}
\usepackage{ifxetex}
\usepackage{ifluatex}
\usepackage{ifpdf}
@@ -55,15 +204,8 @@
\newunicodechar{ṃ}{\d m}
\fi
\fi
-\usepackage{makeidx}
-\usepackage{multicol}
-\usepackage[toc]{multitoc}
-\usepackage{nameauth}[2015/07/09]
-\usepackage{hypdoc}
-\usepackage{tikz}
-\makeindex
\frenchspacing
-\EnableCrossrefs
+\DisableCrossrefs
\CodelineIndex
\RecordChanges
\begin{nameauth}
@@ -73,6 +215,7 @@
\< JayR & John David & Rockefeller, IV & Jay >
\< Aris & & Aristotle & >
\< Eliz & & Elizabeth, I & >
+ \< Atil & & Atilla, the Hun & >
\< Dagb & & Dagobert & I >
\< Konoe & Fumimaro & Konoe & >
\< Yamt & & Yamamoto, Isoroku & >
@@ -94,37 +237,104 @@
\< DLM & Walter & de la Mare & >
\< JWG & Johann Wolfgang von & Goethe & >
\< Harnack & Adolf & Harnack & >
+ \< Bier & Johann & Bier\-mann & >
\end{nameauth}
-\TagName{Antiochus, IV}{ Epiphanes, king}
-\TagName{Chiang}[Kai-shek]{, president}
-\TagName{Sun, Yat-sen}{, president}
-\TagName{Mao}[Tse-tung]{, chairman}
-\TagName{Ptolemy I}[Soter]{, king}
-\TagName{Henry}[VIII]{, king}
-\TagName{Charles, the Bald}{, emperor}
-\TagName{Francis, I}{, king}
-\TagName{Demetrius, I Soter}{, king}
-\TagName{Charles, V}{, emperor}
-\TagName{Louis, XIV}{, king}
-\TagName{Dagobert}[I]{, king}
-\TagName{Elizabeth, I}{, queen}
-\TagName{Leo, I}{, pope}
-\TagName[George]{Washington}{, president}
-\TagName{Gregory, I}{, pope}
-\TagName[Fumimaro]{Konoe}{, PM}
-\TagName{Yoshida}[Shigeru]{, PM}
-\TagName[James Earl]{Carter, Jr.}{, president}
-\TagName[John]{Smith}{*}
-\TagName[J.Q.]{Public}{*}
+\TagName[George]{Washington}{, president|hyperpage}
+\TagName[Hernando]{de Soto}{|hyperpage}
+\TagName[John David]{Rockefeller, II}{|hyperpage}
+\TagName[John David]{Rockefeller, IV}{|hyperpage}
+\TagName{Aristotle}{|hyperpage}
+\TagName{Elizabeth, I}{, queen|hyperpage}
+\TagName{Atilla, the Hun}{|hyperpage}
+\TagName{Dagobert}[I]{, king|hyperpage}
+\TagName[Fumimaro]{Konoe}{, PM\dag|hyperpage}
+\TagName{Yamamoto, Isoroku}{|hyperpage}
+\TagName{Yoshida}[Shigeru]{, PM|hyperpage}
+\TagName[Albert]{Einstein}{|hyperpage}
+\TagName[M.T.]{Cicero}{|hyperpage}
+\TagName{Confucius}{|hyperpage}
+\TagName{Charles, the Bald}{, emperor|hyperpage}
+\TagName[George S.]{Patton, Jr.}{|hyperpage}
+\TagName{Francis, I}{, king|hyperpage}
+\TagName{Demetrius, I Soter}{, king|hyperpage}
+\TagName{Sun, Yat-sen}{, president|hyperpage}
+\TagName{Plato}{|hyperpage}
+\TagName{Henry}[VIII]{, king|hyperpage}
+\TagName{Henry, VIII}{, king|hyperpage}
+\TagName{Ptolemy I}[Soter]{, king|hyperpage}
+\TagName{Mao}[Tse-tung]{, chairman|hyperpage}
+\TagName[Walter]{de la Mare}{|hyperpage}
+\TagName[Johann Wolfgang von]{Goethe}{|hyperpage}
+\TagName[Adolf]{Harnack}{|hyperpage}
+\TagName{Antiochus, IV}{ Epiphanes, king|hyperpage}
+\TagName{Chiang}[Kai-shek]{, president|hyperpage}
+\TagName{Louis, XIV}{, king|hyperpage}
+\TagName{Leo, I}{, pope|hyperpage}
+\TagName{Gregory, I}{, pope|hyperpage}
+\TagName[John]{Smith}{*|hyperpage}
+\TagName[J.Q.]{Public}{*|hyperpage}
+\TagName[James Earl]{Carter, Jr.}{, president|hyperpage}
+\TagName{Jean, sans Peur}{, duke|hyperpage}
+\TagName[E.\,B.]{White}{|hyperpage}
+\TagName{Anaximander}{|hyperpage}
+\TagName{Arai, Akino}{|hyperpage}
+\TagName{Boris, the Animal}{|hyperpage}
+\TagName[Rudolph]{Carnap}{|hyperpage}
+\TagName[Patrick]{Cousot}{|hyperpage}
+\TagName[Marc van]{Dongen}{|hyperpage}
+\TagName[W.E.B.]{Du Bois}{|hyperpage}
+\TagName[Charles]{du Fresne}{|hyperpage}
+\TagName[George]{Eliot}{|hyperpage}
+\TagName[Louis]{Gossett, Jr.}{|hyperpage}
+\TagName[Enrico]{Gregorio}{|hyperpage}
+\TagName[Oskar]{Hammerstein, II}{|hyperpage}
+\TagName[Lafcadio]{Hearn}{|hyperpage}
+\TagName[Bob]{Hope}{|hyperpage}
+\TagName{Ishida}[Yoko]{|hyperpage}
+\TagName{John, Eriugena}{|hyperpage}
+\TagName[Yoko]{Kanno}{\dag|hyperpage}
+\TagName[Martin Luther]{King, Jr.}{|hyperpage}
+\TagName[J.]{Kreskin}{|hyperpage}
+\TagName{Lao-tzu}{|hyperpage}
+\TagName[Uwe]{Lueck}{|hyperpage}
+\TagName[Dan]{Luecking}{|hyperpage}
+\TagName{Maimonides}{|hyperpage}
+\TagName[Nicolas]{Malebranche}{|hyperpage}
+\TagName[J.S.]{Mill}{|hyperpage}
+\TagName[Aiko]{Nakano}{\dag|hyperpage}
+\TagName{Nogawa}[Sakura]{|hyperpage}
+\TagName[Heiko]{Oberdiek}{|hyperpage}
+\TagName{Rambam}{|hyperpage}
+\TagName[Robert]{Schlicht}{|hyperpage}
+\TagName{Shikata, Akiko}{|hyperpage}
+\TagName[Rudolph]{Snel van Royen}{|hyperpage}
+\TagName[Willebrord]{Snel van Royen}{|hyperpage}
+\TagName[Philipp]{Stephani}{|hyperpage}
+\TagName[John]{Strietelmeier}{|hyperpage}
+\TagName[Johann]{Bier\-mann}{*|hyperpage}
+\TagName[Chesley B.]{Sullenberger, III}{|hyperpage}
+\TagName{Thomas, Aquinas}{|hyperpage}
+\TagName[Mark]{Twain}{|hyperpage}
+\TagName[Mike]{Tyson}{|hyperpage}
+\TagName{Vlad II, Dracul}{|hyperpage}
+\TagName{Vlad III, Dracula}{|hyperpage}
+\TagName{Voltaire}{|hyperpage}
+\TagName{Yohko}{|hyperpage}
+\TagName[Johann]{Andreä}{|hyperpage}
+\PretagName{{Æ}thelred, II}{Aethelred 2}
+\TagName{{Æ}thelred, II}{, king|hyperpage}
+\PretagName[Jan]{{Ł}ukasiewicz}{Lukasiewicz, Jan}
+\TagName[Jan]{{Ł}ukasiewicz}{|hyperpage}
+\PretagName{Vlad, Ţepeş}{Vlad Tepes}
+\TagName[Patrick]{Cousot}{|hyperpage}
+\IndexActual{=}
\begin{document}
- \DocInput{nameauth.dtx}
- \PrintChanges
- \PrintIndex
+ \DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
-% \CheckSum{1821}
+% \CheckSum{2651}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -142,39 +352,42 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \changes{v0.7}{2011/12/26}{Initial version}
-% \changes{v0.75}{2012/01/19}{Add new features.}
-% \changes{v0.8}{2012/01/29}{Improve functionality, compatibility, and docs.}
-% \changes{v0.85}{2012/02/05}{Add comma suppression, new options, more features.}
-% \changes{v0.86}{2012/02/06}{Fix regressions.}
-% \changes{v0.9}{2012/02/10}{Add first name formatting; comma and affix handling expandable.}
-% \changes{v0.94}{2012/02/15}{Build with all major \LaTeX{} engines. add index suppression, error checking, name particle caps.}
+% \changes{v0.7}{2011/12/26}{Initial release}
+% \changes{v0.8}{2012/01/29}{Add features, bugfixes}
+% \changes{v0.85}{2012/02/05}{Add package options}
+% \changes{v0.86}{2012/02/06}{Fix regressions}
+% \changes{v0.9}{2012/02/10}{Add first name formatting; affix handling expandable}
+% \changes{v0.94}{2012/02/15}{Add index suppression, error checking, name particle caps}
% \changes{v0.95}{2012/02/17}{Bugfixes}
% \changes{v0.96}{2012/02/19}{Bugfixes}
-% \changes{v1.0}{2012/02/20}{Works fully with \textsf{microtype} and \textsf{memoir}.}
-% \changes{v1.1}{2012/03/08}{Fix errors when emitting warnings.}
-% \changes{v1.2}{2012/03/25}{Add tagging features; improve documentation.}
-% \changes{v1.26}{2012/04/24}{Fix first-letter caps \& sorting of name affixes in index.}
-% \changes{v1.4}{2012/07/24}{Fix moving arguments \& other bugs; add features.}
-% \changes{v1.5}{2013/02/22}{Minor bugfixes; add features.}
-% \changes{v1.6}{2013/03/10}{Add |nameauth| environment.}
-% \changes{v1.7}{2013/04/02}{Change options processing to prevent errors.}
-% \changes{v1.8}{2013/09/19}{Warn users to avoid protected accenting macros in names.}
-% \changes{v1.9}{2015/07/09}{Improve Eastern name support. Fix potential name collisions with the simplified interface. Ensure global undefining of names and tags. Rewrite documentation.}
-%
-% \DoNotIndex{\@empty, \@gobble, \@period, \@token, \protected@edef, \zap@space, \bfseries, \bgroup, \csgdef, \csname, \csundef, \DeclareOption, \def, \detokenize, \edef, \egroup, \else, \endcsname, \endinput, \ExecuteOptions, \expandafter, \fi, \Forenames, \futurelet, \hbox, \if, \ifcsname, \ifx, \ignorespaces, \index, \itshape, \leavevmode, \let, \newcommand, \newcommandx, \newenvironment, \newif, \PackageWarning, \ProcessOptions, \relax, \renewcommand, \RequirePackage, \scshape, \space, \textbackslash, \uppercase, \WithSuffix}
-%
-% \GetFileInfo{nameauth.dtx}
-% \title{The \textsf{nameauth} package}
-% \author{Charles P. Schaum \\ \texttt{charles dot schaum at comcast dot net}}
-% \date{\fileversion~from \filedate}
-% \maketitle
+% \changes{v1.0}{2012/02/20}{Works fully with \textsf{microtype} and \textsf{memoir}}
+% \changes{v1.1}{2012/03/08}{Bugfixes}
+% \changes{v1.4}{2012/07/24}{Add features, bugfixes}
+% \changes{v1.5}{2013/02/22}{Add features, bugfixes, options}
+% \changes{v1.6}{2013/03/10}{Add |nameauth| environment}
+% \changes{v1.7}{2013/04/02}{Fix options processing}
+% \changes{v1.8}{2013/09/19}{Update docs}
+% \changes{v1.9}{2015/07/09}{Better Eastern name support; fix |nameauth| bugs, global un-tagging}
+% \changes{v2.0}{2015/11/11}{Use dtxgen template instead of dtxtut; update docs}
+% \GetFileInfo{\jobname.dtx}
+% \DoNotIndex{\@empty, \@gobble, \@period, \@token, \trim@spaces, \zap@space}
+% \DoNotIndex{\begingroup, \bfseries, \bgroup, \csdef, \csgdef, \csgdef, \csname, \csundef, \DeclareOption, \def, \detokenize, \edef, \egroup, \else, \endcsname, \endgroup, \endinput, \ExecuteOptions, \expandafter, \fi, \futurelet, \global, \hbox, \if, \ifcsname, \ifx, \ignorespaces, \index, \itshape, \leavevmode, \let, \newcommand, \newcommandx, \newenvironment, \newif, \nobreakspace, \PackageError, \PackageWarning, \ProcessOptions, \relax, \renewcommand, \RequirePackage, \scshape, \space, \textbackslash, \uppercase}
+%
+%\title{\textsf{nameauth} --- Name authority mechanism for consistency in text and index\thanks{This file
+% describes version \fileversion, last revised \filedate.}
+%}
+%\author{Charles P. Schaum\thanks{E-mail: charles dot schaum at comcast dot net}}
+%\date{Released \filedate}
+%
+%\maketitle
%
% \begin{abstract}
-% \noindent The \textsf{nameauth} package automates the formatting and indexing of names.\footnote{I omit the ``Implementation'' section to show the naming macros with a ``normal'' index.} This aids the use of a \textbf{name authority} and the process of textual reordering and revision without needing to retype name references.
+% \noindent The \textsf{nameauth} package automates the formatting and indexing of names. This aids the use of a \textbf{name authority} and the process of textual reordering and revision without needing to retype name references.
% \end{abstract}
%
-% \tableofcontents
+% {\small\tableofcontents}
+%
+% This manual is designed with a text block compatible with both US letter and A4. Macro cross refs are minimized to give a relatively ``clean'' index that illustrates this package's indexing functions.\clearpage
%
% \section{Introduction}
%
@@ -183,42 +396,50 @@
% Books can reference hundreds of names. It takes time and money to check them. This package helps to format and index names consistently and automatically, helping you save time and money. Features include:
% \begin{multicols}{2}
% \begin{itemize}\setlength\itemsep{0pt}\small
-% \item Simultaneously format, display, and index names.
-% \item Change the syntactic format, typographical display, and other name features without retyping names.
-% \item Display first and subsequent uses of names for professional writing. Default is a full name for the first use and shorter forms thereafter.
-% \item Apply various custom typesetting formats to fit your needs without retyping names.
-% \item Move text without retyping names.
+% \item Simultaneously format, display, and index names using fewest keystrokes.
+% \item Context automatically determines the syntactic form of names.
+% \item The default uses longer name forms for the first use and shorter forms thereafter.
+% \item Apply typesetting formats to fit your needs without retyping names.
+% \item Move text in the document without retyping names.
% \item Show name variants in the text, yet index consistent name forms.
-% \item Process different names according to cross-cultural naming conventions. These include mononyms, names with epithets, names with particles, and Eastern names in addition to basic Western names.
+% \item Handle some cross-cultural naming conventions.
% \item Allow for different capitalizing and other conventions.
-% \item Index different people with the same name by using a tag feature.
+% \item Index different people with the same name by using tags.
% \item Process names in list environments and other special environments.
% \end{itemize}
% \end{multicols}
%
-% I started using \LaTeX\ and wrote this package for translating old German and Latin texts. Only in recent years have WYSIWYG apps become useful here. I learned much more than I expected regarding different \LaTeX\ typesetting engines, different font systems, different indexing programs, different package interactions, and different naming conventions. In order to meet my cross-cultural needs amid such challenges, I encountered some technical restrictions:
+% I started using \LaTeX\ and wrote this package when translating old German and Latin texts. I learned much more than I expected regarding \LaTeX\ typesetting engines, font systems, indexing programs, class and package interactions, and naming conventions. Please consider the following general notes that apply to the development and use of this package:
%
-% Please avoid using control sequences like \cmd{\protected@edef} and \cmd{\noexpand} in names because this package uses \cmd{\protected@edef} as it parses its input (cf. Section~\ref{sec:accents}). This is done in order to get name display and indexing to work under the constraints mentioned above. I advise the casual user not to perform a ``torture test'' on this package like I do in this manual.
+% \begin{quote}\small
+% As of version 2.0 you \emph{can} put control sequences in names, but with a few caveats; see Section~\ref{sec:accents}. Also, this package is more fault-tolerant and prevents or warns about malformed input.
%
-% This package depends on \textsf{etoolbox}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. It has been tested with \textsf{latex}, \textsf{lualatex}, \textsf{pdflatex} and \textsf{xelatex}. It will work with \textsf{makeindex} and \textsf{texindy}. This manual was typeset with \ifxetex\textsf{xelatex}\else\ifluatex\ifpdf\textsf{lualatex} in \texttt{pdf} mode\else\textsf{lualatex} in \texttt{dvi} mode\fi\else\ifpdf\textsf{pdflatex}\else\textsf{latex}\fi\fi\fi{} and \textsf{makeindex}.
+% This manual performs something of a ``torture test'' on this package. You might want to avoid doing that.
%
-% Indexing generally conforms to the standard in Nancy C. Mulvany, \emph{Indexing Books} (Chicago: University of Chicago Press, 1994). This should be suitable for a very wide application across a number of disciplines.
+% This package depends on \textsf{etoolbox}, \textsf{suffix}, \textsf{trimspaces}, and \textsf{xargs}. It has been tested with \texttt{latex,} \texttt{lualatex,} \texttt{pdflatex,} and \texttt{xelatex.} It will work with \texttt{makeindex} and \texttt{texindy.} This documentation was typeset with \ifxetex\texttt{xelatex}\else\ifluatex\ifpdf\texttt{lualatex} in \texttt{pdf} mode\else\texttt{lualatex} in \texttt{dvi} mode\fi\else\ifpdf\texttt{pdflatex}\else\texttt{latex}\fi\fi\fi{} and \texttt{makeindex.}
%
-% This documentation uses names of living and historical figures because users refer to real people in their projects. At no time do I intending any statement of bias for or against a particular person, culture, or tradition. All names mentioned herein deserve respect for the impact and legacy of their bearers.
+% Indexing generally conforms to the standard in Nancy C. Mulvany, \emph{Indexing Books} (Chicago: University of Chicago Press, 1994). This should be suitable for a very wide application across a number of disciplines.
+% \end{quote}
%
-% Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani}, \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, and \Name[Robert]{Schlicht} for their assistance.
+% \vfill
+% Thanks to \Name[Marc van]{Dongen}, \Name[Enrico]{Gregorio}, \Name[Philipp]{Stephani},\break \Name[Heiko]{Oberdiek}, \Name[Uwe]{Lueck}, and \Name[Robert]{Schlicht} for their assistance in the early versions of this package.\\
+%
+% \bgroup\setlength{\fboxsep}{5pt}\noindent\fbox{\parbox{0.97\textwidth}{\strut This documentation uses names of living and historical figures because users refer to real people in their projects. At no time do I intending any statement of bias for or against a particular person, culture, or tradition. All names mentioned herein deserve respect for the impact and legacy of their bearers.}}\egroup
+%\clearpage
%
% \subsection{What's In A Name?}
% \label{sec:NameTypes}
%
-% Here a name denotes a person. Apart from historical and cultural contexts, name forms are ambiguous. The \textsf{nameauth} package uses Boolean switches and macros to show names in specific contexts without the need to retype the names.
+% Personal name forms are ambiguous apart from historical and cultural contexts. The \textsf{nameauth} package helps you encode names in a way that anticipates and responds automatically to such contexts without the need to retype names.
%
-% We see three categories of names, shown below. For special cases, one might have to decide how to handle Hungarian and Icelandic names as Eastern or Western. Professional writing often calls for the full form of a person's name to be used in its first occurrence, with shorter forms used thereafter. Some publications call for the first use of a name to be typeset differently than subsequent uses. The subsequent package options set broad parameters for such needs.\\
+% Below we see three categories of names with suggestions regarding what might be used therein.\footnote{These suggestions are not exhaustive. For special cases, one might have to decide how to handle, for example, Hungarian and Icelandic names as Eastern or Western.} Professional writing often calls for the full form of a person's name to be used in its first occurrence, with shorter forms used thereafter. This package adapts that principle to all the forms below.
%
-%\begin{tikzpicture}[line/.style={draw,thick}]
+%\begin{enumerate}
+%\item Western name:\\[1ex]
+%\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
% \node [matrix] (macro) at (0,1)
% {
-% \node(type){\strut Western name:}; &
+% \node(space){\qquad\qquad\qquad}; &
% \node(arg1){\strut\textbf{Forename(s)}}; &
% \node(arg2){\strut\textbf{Surname(s)}}; &
% \node(arg3){\strut\textbf{Sobriquet, etc.}};\\
@@ -262,20 +483,21 @@
% \path (arg3) -- (a3);
% \end{scope}
%\end{tikzpicture}
-%
-%\begin{tikzpicture}[line/.style={draw,thick}]
+%\item Eastern name:\\[1ex]
+%\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
% \node [matrix] (macro) at (0,1)
% {
-% \node(type){\strut Eastern name:}; &
+% \node(spacei){\qquad\qquad\qquad}; &
% \node(arg1){\strut\textbf{Family name}}; &
+% \node(spaceii){\qquad}; &
% \node(arg2){\strut\textbf{Given name}};\\
% };
-% \node [matrix,column sep=1em] (tipsii) at (2,-1)
+% \node [matrix,column sep=1cm] (tipsii) at (2,-1)
% {
% \node[align=left](a1)
% {
-% Family designator\\
-% }; & & & & &
+% Family\\ designator\\
+% }; &
% \node[align=left](a2)
% {
% (Multiple names are rare, but multi-\\character names do exist.)\\
@@ -286,20 +508,21 @@
% \path (arg2) -- (a2);
% \end{scope}
%\end{tikzpicture}
-%
-%\begin{tikzpicture}[line/.style={draw,thick}]
+%\item Ancient name:\\[1ex]
+%\begin{tikzpicture}[line/.style={draw,thick}]\normalsize
% \node [matrix] (macro) at (0,1)
% {
-% \node(type){\strut Ancient name:}; &
+% \node(spacei){\qquad\qquad\qquad}; &
% \node(arg1){\strut\textbf{Given name}}; &
+% \node(spaceii){\qquad}; &
% \node(arg2){\strut\textbf{Sobriquet, etc.}};\\
% };
-% \node [matrix,column sep=1em] (tipsii) at (1,-1.5)
+% \node [matrix,column sep=2.2cm] (tipsii) at (1.5,-1.5)
% {
% \node[align=left](a1)
% {
-% Personal name\\
-% }; & & & & &
+% Personal\\ name\\
+% }; &
% \node[align=left](a2)
% {
% Sobriquet / title:\\
@@ -315,52 +538,73 @@
% \path (arg2) -- (a2);
% \end{scope}
%\end{tikzpicture}
+%\end{enumerate}
+%\clearpage
%
% \section{Usage}
%
% \subsection{Package Options}
% \label{sec:options}
%
-% Package options are designed to address how one expects name data to be entered, how names are displayed both semantically and typographically, and how they are indexed in different document sections. \textbf{Default options are in boldface}:\\
+% |\usepackage[|\meta{$option_1$}|,|\meta{$option_2$}|,|\dots|]{nameauth}|\medskip
+%
+% \noindent Package options address the following:
+% \begin{enumerate}\small\setlength{\itemsep}{0pt}
+% \item The way name data are entered
+% \item Semantic display of names (full/short, commas/none, reversed/caps)
+% \item Typographic display of names (formatted or not)
+% \item Indexing and sorting of names in the index
+% \end{enumerate}
+% {\hfill\bfseries Default options are in boldface.\hfill}\bigskip
%
%\noindent{\large\bfseries Show/Hide Affix Commas}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{nocomma} & \bfseries Suppress commas between surnames and affixes, following the \emph{Chicago Manual of Style} and other conventions.\\[1ex]
% \quad\texttt{comma} & Retain commas between surnames and affixes.\\[2ex]
% \end{tabular}\\
-% This option is set only at load time. The default |nocomma| option works better with Eastern names and modern standards, \emph{e.g.}, \Name[James Earl]{Carter, Jr.}. The |comma| option works with Western names and older standards, putting a comma before affixes, \emph{e.g.}, \ForgetName[James Earl]{Carter, Jr.}\ShowComma\Name[James Earl]{Carter, Jr.}. One can switch options without retyping names and force commas with \cmd{\ShowComma} (Section~\ref{sec:Affix}).
+% This option is set at load time. If you use \emph{modern standards} or Eastern names, choose the default |nocomma| option to get, \emph{e.g.}, \Name[James Earl]{Carter, Jr.}.
%
-% Before version 0.9 the \textsf{nameauth} package assumed the |comma| option and its limits on \cmd{\AKA} and \cmd{\PName}. The older syntax remains only for backward compatibility.\\
+% If you need to adopt \emph{older standards} that use commas between surnames and affixes, you have two choices:
+% \begin{itemize}\small\setlength{\itemsep}{0pt}
+% \item First, the |comma| option produces, \emph{e.g.}, \ForgetName[James Earl]{Carter, Jr.}\ShowComma\Name[James Earl]{Carter, Jr.}. Yet it limits the use of macros like \cmd{\AKA} and \cmd{\PName}.\footnote{Before version 0.9 the \textsf{nameauth} package assumed the |comma| option.}
+% \item Second, Section~\ref{sec:Affix} shows how one can use \cmd{\ShowComma} with the |nocomma| option to get similar results, but with more flexibility.
+% \end{itemize}
%
% \noindent{\large\bfseries Enable/Disable Formatting}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{mainmatter} & \bfseries Enable typographic formatting attributes (see formatting options below), starting at the beginning of a document.\\[1ex]
-% \quad\texttt{frontmatter} & Disable typographic formatting, but retain automatic full and short forms. See Section~\ref{sec:SectionFormat}.\\[2ex]
+% \quad\texttt{frontmatter} & Disable typographic formatting, but retain automatic full and short forms.\\[2ex]
% \end{tabular}\\
-% The default starts formatting names immediately. The |frontmatter| option is equivalent to \cmd{\NamesInactive}. It disables typographic name formatting until formatting is enabled with \cmd{\NamesActive}. It has no effect on syntactic name formatting, \emph{i.e.}, the use of longer or shorter names depending on the context. It is designed for material provided by editors and contributors.\\
+% The default starts formatting names immediately. Use the |frontmatter| option to suppress name formatting until you want it to start via \cmd{\NamesActive}. These options have no additional effects on the index. See Section~\ref{sec:SectionFormat}.\bigskip
%
% \noindent{\large\bfseries Enable/Disable Indexing}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{index} & \bfseries Create index entries in place with names.\\[1ex]
-% \quad\texttt{noindex} & Suppress indexing of names. See Section~\ref{sec:SectionIndex}.\\[2ex]
+% \quad\texttt{noindex} & Suppress indexing of names.\\[2ex]
% \end{tabular}\\
-% The default starts indexing names right away. The |noindex| option is equivalent to \cmd{\IndexInactive}. It disables the indexing of names until \cmd{\IndexActive} enables it. This applies only to naming and indexing macros in the \textsf{nameauth} package.
-% \clearpage
+% The default starts indexing names right away. The |noindex| option disables the indexing of names until \cmd{\IndexActive} enables it. This applies only to naming and indexing macros in the \textsf{nameauth} package. See Section~\ref{sec:SectionIndex}.\clearpage
+%
+% \noindent{\large\bfseries Enable/Disable Index Sorting}\\[2ex]
+% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
+% \quad\bfseries\texttt{pretag} & \bfseries Create sort keys used with \texttt{makeindex}.\\[1ex]
+% \quad\texttt{nopretag} & Do not create sort keys. \\[2ex]
+% \end{tabular}\\
+% The default allows \cmd{\PretagName} to create sort keys used in \texttt{makeindex} / \texttt{texindy}. Seldom would one change this option. See Section~\ref{sec:IndexSort}.\bigskip
%
% \noindent{\large\bfseries Capitalize Entire Surnames}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{normalcaps} & \bfseries Do not perform any special capitalization.\\[1ex]
-% \quad\texttt{allcaps} & Capitalize entire surnames, \emph{e.g.}, romanized Eastern names. See Section~\ref{sec:Eastern}. \\[2ex]
+% \quad\texttt{allcaps} & Capitalize entire surnames, such as romanized Eastern names.\\[2ex]
% \end{tabular}\\
-% This only affects the body text. To get caps in both the body text and the index, the user should type in the caps manually. Section-level control of family name capitalization occurs with \cmd{\AllCapsActive} and \cmd{\AllCapsInactive}. \cmd{\CapName} has the same effect on the individual instance of a name.\medskip
+% This only affects names printed in the body text. To get caps in both the body text and the index, the user should type in the caps manually\,---\,an easy task with the simplified interface. Section~\ref{sec:Eastern} details macros that enable capitalization on a section-level and per-name basis.\bigskip
%
% \noindent{\large\bfseries Reverse Name Order}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
% \quad\bfseries\texttt{notreversed} & \bfseries Print names in the order specified by \cmd{\Name} and the other macros.\\[1ex]
-% \quad\texttt{allreversed} & Print name forms in ``smart'' reverse order. See Sections~\ref{sec:Affix} and~\ref{sec:Eastern}.\\[1ex]
-% \quad\texttt{allrevcomma} & Print all names in Western ``Surname, Forenames'' order. See Section~\ref{sec:LastFirst}.\\[2ex]
+% \quad\texttt{allreversed} & Print name forms in ``smart'' reverse order.\\[1ex]
+% \quad\texttt{allrevcomma} & Print all names in Western ``Surname, Forenames'' order.\\[2ex]
% \end{tabular}\\
-% \cmd{\ReverseActive} and \cmd{\ReverseInactive} are used for reversing name order at the section level. \cmd{\ReverseCommaActive} and \cmd{\ReverseCommaInactive} can be used to create lists for educators and officials in the Western-style last-comma-first order, which is \emph{not} the same as the |comma| option or \cmd{\ShowComma}. For individual instances of names, \cmd{\RevName} and \cmd{\RevComma} have the same respective effects.\medskip
+% See Sections~\ref{sec:Affix}, \ref{sec:Eastern}, and~\ref{sec:LastFirst} for related macros to control name reversing by section or by name. So-called ``last-comma-first'' lists of names are \emph{not} the same as the |comma| option.\bigskip
%
% \noindent{\large\bfseries Formatting Attributes}\\[2ex]
% \begin{tabular}{p{0.22\textwidth}p{0.6\textwidth}}
@@ -368,26 +612,26 @@
% \quad\bfseries\texttt{smallcaps} & \bfseries Set the first use of a name in small caps.\\[1ex]
% \quad\texttt{italic} & Italicize the first occurrence of a name.\\[1ex]
% \quad\texttt{boldface} & Set the first use of a name in boldface.\\[1ex]
-% \quad\texttt{noformat} & Do not define a default format. Can be used with custom formatting. See Section~\ref{sec:formatting}.\\[2ex]
+% \quad\texttt{noformat} & Do not define a default format. Can be used with custom formatting.\\[2ex]
% \end{tabular}\\
-% The default is |smallcaps| because this package was developed to aid the editing and translation of older German and Latin documents.
+% The default is |smallcaps| because this package was developed to aid the editing and translation of older German and Latin documents. Section~\ref{sec:formatting} details even more possibilities for presenting the first use of names.
% \clearpage
%
% \subsection{Quick Start Guide}
% \label{sec:start}
%
%\subsubsection{Main Interface}
-% \DescribeMacro{\Name}
-% The main workhorse of this package is \cmd{\Name.} More detail begins in Section~\ref{sec:Naming}. This overview shows how to work with the classes of names in Section~\ref{sec:NameTypes}. We abbreviate the command parameters \meta{forename(s)} with \meta{FNN} and \meta{surname(s)} with \meta{SNN}. Note again that the |nocomma| option generally works best, especially with Eastern, medieval, and ancient names.\\
+% See Section~\ref{sec:Naming} for a proper description of \cmd{\Name}. Here we see briefly how to work with the classes of names in Section~\ref{sec:NameTypes}. We abbreviate the command parameters \meta{forename(s)} with \meta{FNN} and \meta{surname(s)} with \meta{SNN}. The |nocomma| option works best with affixes, Eastern, and ancient names.\bigskip
%
-%\noindent{\large\bfseries Western Names}\\[1ex]
+%\noindent{\large\bfseries Western Names}
+%\begin{quote}
%\begin{tikzpicture}[line/.style={draw,thick}]
-% \node [matrix,column sep=4cm] (tipsi) at (1.5,2.5)
+% \node [matrix,column sep=2.5cm] (tipsi) at (1.5,2.5)
% {
-% \node(opt){\quad\small Add to force full name.}; &
-% \node[text width=3cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
+% \node(opt){\small Add to force full name.}; &
+% \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
% };
-% \node [matrix] (macro) at (2,1)
+% \node [matrix] (macro) at (1.1,1)
% {
% \node(cmd){\bfseries\cmd{\Name}}; &
% \node(star){\bfseries\texttt{*}}; &
@@ -396,17 +640,17 @@
% \node(arg3){\bfseries\oarg{Alternate FNN}}; &
% \node(braces){\bfseries|{}|}; \\
% };
-% \node [matrix,column sep=1em] (tipsii) at (1.5,-1)
+% \node [matrix,column sep=1em] (tipsii) at (1,-1)
% {
-% \node[align=left](a1)
+% \node[align=center](a1)
% {
% Forename(s)\\used in index\\(\emph{e.g.}: initials,\\legal name)
% }; & & &
-% \node[align=left](a2)
+% \node[align=center](a2)
% {
% Surname(s)\\Surname(s)|,| Affix
% }; & &
-% \node[align=left](a3)
+% \node[align=center](a3)
% {
% \meta{empty}\\Nickname(s)\\Full forenames, etc.
% }; \\
@@ -419,16 +663,24 @@
% \path (arg3) -- (a3);
% \end{scope}
%\end{tikzpicture}
+%\end{quote}
+% Usual forms:
+% \begin{quote}\small
+% \cmd{\Name}\oarg{FNN}\marg{SNN}\hfill|\Name[George]{Washington}|\IndexName[George]{Washington}\\
+% \cmd{\Name}\oarg{FNN}\marg{SNN|,| Affix}\hfill|\Name[John David]{Rockefeller, II}|\IndexName[John David]{Rockefeller, II}\\[1ex]
+% You must include the \meta{FNN} field with alternate forenames. The \meta{Alternate FNN} are swapped with the \meta{FNN}, but only in the body text:\\[1ex]
+% \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate FNN}\\\hbox{}\hfill |\Name[Bob]{Hope}[Leslie Townes]|\IndexName[Bob]{Hope}\\
+% \cmd{\Name}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate FNN}\\\hbox{}\hfill |\Name[John David]{Rockefeller, IV}[Jay]|\IndexName[John David]{Rockefeller, IV}
+% \end{quote}
+% The older syntax is \cmd{\Name}\marg{SNN}\oarg{Affix}. See Section~\ref{sec:obsolete} for its usage and its shortcomings. It remains for backward compatibility.\bigskip
%
-% \noindent Use \cmd{\Name}\oarg{FNN}\marg{SNN} and \cmd{\Name}\oarg{FNN}\marg{SNN|,| Affix}. For nicknames and alternate forenames use \cmd{\Name}\oarg{FNN}\marg{SNN}\oarg{Alternate FNN} and \cmd{\Name}\oarg{FNN}\marg{SNN|,| Affix}\oarg{Alternate FNN}. The \meta{Alternate FNN} are swapped with the non-empty \meta{FNN}, but only in the body text. The older, obsolete syntax is \cmd{\Name}\marg{SNN}\oarg{Affix}.
-%
-%\begin{multicols}{2}
-%\noindent{\large\bfseries Eastern Names in the Text, Western-style Index}\\[1ex]
+%\noindent{\large\bfseries Eastern Names in the Text, Western-style Index}
+%\begin{quote}
%\begin{tikzpicture}[line/.style={draw,thick}]
-% \node [matrix,column sep=1em] (tipsi) at (0,2)
+% \node [matrix,column sep=1.5cm] (tipsi) at (0.5,2)
% {
-% \node(opt){\small For full name.}; &
-% \node(grp){\small If brackets follow.}; \\
+% \node(opt){\small Add to force full name.}; &
+% \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
% };
% \node [matrix] (macro) at (0,1)
% {
@@ -456,14 +708,16 @@
% \path (arg2) -- (a2);
% \end{scope}
%\end{tikzpicture}
-% One uses the |allreversed| option or \cmd{\ReverseActive} or \cmd{\RevName} as appropriate (see above). The names in the body text will be in Eastern order, while they are indexed in Western fashion: \meta{SNN}, \meta{FNN}. This is the ``non-native'' form of Eastern names.\columnbreak
+%\end{quote}
+% Technically, these are Western name forms without affixes. The reversing macros (Section~\ref{sec:Eastern}) cause them to display in Eastern order in the body text only. The index entries are Western in fashion: \meta{SNN}, \meta{FNN}. This ``non-native'' form of Eastern names excludes all comma-delimited forms and the old syntax.\clearpage
%
-%\noindent{\large\bfseries Eastern Names in the Text, Eastern-style Index}\\[1ex]
+%\noindent{\large\bfseries Eastern Names in the Text, Eastern-style Index}
+%\begin{quote}
%\begin{tikzpicture}[line/.style={draw,thick}]
-% \node [matrix,column sep=1em] (tipsi) at (0,2)
+% \node [matrix,column sep=1cm] (tipsi) at (0.5,2)
% {
-% \node(opt){\small For full name.}; &
-% \node(grp){\small If brackets follow.}; \\
+% \node(opt){\small Add to force full name.}; &
+% \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
% };
% \node [matrix] (macro) at (0,1)
% {
@@ -474,11 +728,11 @@
% };
% \node [matrix,column sep=1em] (tipsii) at (0.5,0)
% {
-% \node[align=left](a1)
+% \node(a1)
% {
% \quad Family name
% }; &
-% \node[align=left](a2)
+% \node(a2)
% {
% \quad Given name
% }; \\
@@ -490,24 +744,30 @@
% \path (arg1) -- (a2);
% \end{scope}
%\end{tikzpicture}
+%\end{quote}
+% Usual form:
+% \begin{quote}\small
+% \cmd{\Name}\marg{SNN, FNN}\hfill|\Name{Yamamoto, Isoroku}|\IndexName{Yamamoto, Isoroku}
+% \end{quote}
+% These names truly are Eastern names. They will take the form \meta{SNN FNN} in the index even if the reversing macros (Section~\ref{sec:Eastern}) put the names in Western order in the body text. We call this the ``native'' form of Eastern names.
%
-% \noindent These names names will appear in the index using the Eastern form \meta{SNN FNN} even if \cmd{\RevName} and friends are used to create a Western-order name in the body text. This is the ``native'' form of Eastern names. The older, obsolete syntax is \cmd{\Name}\marg{SNN}\oarg{FNN}
-%\end{multicols}
-%\clearpage
-%\noindent{\large\bfseries Ancient Names}\\[-1.5ex]
+% The old form of Eastern names is \cmd{\Name}\marg{SNN}\oarg{FNN}. Again, this is retained only for backward compatibility. Cf. Section~\ref{sec:obsolete}.\bigskip
+%
+%\noindent{\large\bfseries Ancient Names}
+%\begin{quote}
%\begin{tikzpicture}[line/.style={draw,thick}]
% \node [matrix,column sep=1em] (tipsi) at (2,2)
% {
% \node(opt){\quad\small Add to force full name.}; &
-% \node[text width=3cm,align=left](a1){\small Mononym\break Mononym, Affix}; &
-% \node[text width=3cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
+% \node[text width=3cm,align=left](a1){\small Mononym\hfil\break Mononym, Affix}; &
+% \node[text width=3.5cm,align=left](grp){\small Add only if text in brackets |[ ]| follows.}; \\
% };
% \node [matrix] (macro) at (1,1)
% {
-% \node(cmd){\cmd{\Name}}; &
+% \node(cmd){\bfseries\cmd{\Name}}; &
% \node(star){\bfseries\texttt{*}}; &
% \node(arg1){\bfseries\marg{SNN}}; &
-% \node(braces){\bfseries|{}|}; \\\\
+% \node(braces){\bfseries|{}|}; \\
% };\\
% \begin{scope}[every path/.style=line]
% \path (opt) -- (star);
@@ -515,87 +775,125 @@
% \path (arg1) -- (a1);
% \end{scope}
%\end{tikzpicture}
+%\end{quote}
+% Usual form:
+% \begin{quote}\small
+% \cmd{\Name}\marg{SNN}\hfill|\Name{Aristotle}|\IndexName{Aristotle}\\
+% \cmd{\Name}\marg{SNN, affix}\hfill|\Name{Elizabeth, I}|\IndexName{Elizabeth, I}
+% \end{quote}
%
-% \noindent Use the forms \cmd{\Name}\marg{Mononym} or \cmd{\Name}\marg{Mononym|,| Affix}. The older, obsolete syntax is \cmd{\Name}\marg{Mononym}\oarg{Affix}.\vspace{-1.5ex}
+% \noindent These forms are used for royalty, ancient figures, and other monomyms.\footnote{Technically, the native Eastern forms and the \meta{Mononym, Affix} forms are identical, although used in different contexts. You would not wish to reverse a royal name, for example.} The older syntax is \cmd{\Name}\marg{Mononym}\oarg{Affix}. Cf. Section~\ref{sec:obsolete}.
%
% \subsubsection{Simplefied Interface}
+% \label{sec:simplestart}%
%
-% \DescribeMacro{nameauth} The |nameauth| environment saves typing via shorthands. It is best used in the document preamble. Otherwise one must add |%| at the end of each line.\vspace{-1ex}
+% \DescribeEnv{nameauth}
+% The |nameauth| environment allows one to save typing and aid consistency by using shorthands. It produces control sequences that are fully compatible with the main interface. Although not required, |nameauth| is best used in the document preamble to avoid undefined control sequences.\footnote{The |nameauth| environment uses \cmd{\ignorespaces} to mitigate the need for trailing \texttt{\%.}}
%
% \begin{quote}
% |\begin{nameauth}|\\
% | \<| \meta{cseq1} |&| \meta{arg1} |&| \meta{arg2} |&| \meta{arg3} |>|\\
% | \<| \meta{cseq2} |&| \meta{arg1} |&| \meta{arg2} |&| \meta{arg3} |>| \dots\\
% |\end{nameauth}|
-% \end{quote}\vspace{-1ex}
-% Each \meta{cseq} creates three macros. |\|\meta{cseq} itself calls \cmd{\Name}. |\L|\meta{cseq} (think ``Long'') calls \cmd{\Name*}. |\S|\meta{cseq} (think ``Short'') calls \cmd{\FName}. In the text, include trailing braces |{|\,|}| if text in brackets |[|\,|]| follows. Leading and trailing spaces in each field are stripped. There \emph{must} be four argument fields per line:\vspace{-0.5ex}
+% \end{quote}
+%
+% Please bear in mind that |\<| in this context is a control sequence. If you forget it or miss the backslash you will get errors. Leading and trailing spaces in each |&|-delimited field are stripped, as is also the case in the main interface. There \emph{must} be four argument fields (three ampersands) per line.
+%
+% Each \meta{cseq} creates three macros. In the document text, |\|\meta{cseq} itself calls \cmd{\Name}. |\L|\meta{cseq} (think ``Long'') calls \cmd{\Name*}. |\S|\meta{cseq} (think ``Short'') calls \cmd{\FName}. In the document text, as with \cmd{\Name}, include trailing braces |{|\,|}| if text in brackets |[|\,|]| follows any of the shorthands.
+%
+% The following example illustrates a fairly complete set of names:
%
% \begin{quote}
-%|\begin{nameauth}|\\[0.2ex]
-%| \< Wash & George & Washington & >|\hfill\emph{Western}\\[0.2ex]
-%| \< Soto & Hernando & de Soto & >|\hfill\emph{particle}\\[0.2ex]
-%| \< JRock & John David & Rockefeller, II & >|\hfill\emph{affix}\\[0.2ex]
-%| \< JayR & John David & Rockefeller, IV & Jay >|\hfill\emph{nickname}\footnote{Careful here! \cmd{\SJayR} always gives ``Jay.'' See Section \ref{sec:Fname}.}\\[0.2ex]
-%| \< Aris & & Aristotle & >|\hfill\emph{ancient}\\[0.2ex]
-%| \< Eliz & & Elizabeth, I & >|\hfill\emph{royal}\\[0.2ex]
-%| \< Konoe & Fumimaro & Konoe & >|\hfill\emph{Eastern/Western index}\\[0.2ex]
-%| \< Yamt & & Yamamoto, Isoroku & >|\hfill\emph{Eastern/Eastern index}\\[0.2ex]
-%|\end{nameauth}|
-% \end{quote}\vspace{-2ex}
-% \begin{multicols}{2}
-% \noindent|\Wash|: \Wash \\
-% |\Wash|: \Wash \\
-% |\LWash|: \LWash \\
-% |\SWash|: \SWash \\
-% |\RevComma\LWash|: \RevComma\LWash \\
-% |\Soto|: \Soto \\
-% |\Soto|: \Soto \\
-% |\CapThis\Soto|: \CapThis\Soto \\
-% |\JRock|: \JRock \\
-% |\JRock|: \JRock \\
-% |\JayR|: \JayR \\
-% |\SJayR\ \JayR|: \SJayR\ \JayR\\[1ex]
-% |\Aris|: \Aris \\
-% |\Eliz|: \Eliz \\
-% |\Eliz|: \Eliz \\
-% |\Konoe|: \Konoe \\
-% |\RevName\LKonoe|: \RevName\LKonoe \\
-% |\CapName\LKonoe|: \CapName\LKonoe \\
-% |\CapName\RevName\LKonoe|: \\ \indent\CapName\RevName\LKonoe \\
-% |\Yamt|: \Yamt \\
-% |\CapName\LYamt|: \\ \indent\CapName\LYamt \\
-% |\RevName\LYamt|: \RevName\LYamt \\
+% |\begin{nameauth}|\\[0.2ex]
+% | \< Wash & George & Washington & >|\hfill\emph{Western}\\
+% | \< Soto & Hernando & de Soto & >|\hfill\emph{particle}\\
+% | \< JRock & John David & Rockefeller, II & >|\hfill\emph{affix}\\
+% | \< JayR & John David & Rockefeller, IV & Jay >|\hfill\emph{nickname}\footnote{\cmd{\SJayR} always gives ``Jay.'' See Section \ref{sec:Fname} for possible difficulties when using this variation. Use \cmd{\AKA} to create a \emph{see} reference from \AKA[John David]{Rockefeller, IV}[Jay]{Rockefeller} to his full index entry: ``Rockefeller, John David, IV.'' For more on \cmd{\AKA} see Section~\ref{sec:AKA}.}\\
+% | \< Aris & & Aristotle & >|\hfill\emph{ancient}\\
+% | \< Eliz & & Elizabeth, I & >|\hfill\emph{royal}\\
+% | \< Atil & & Atilla, the Hun & >|\hfill\emph{ancient}\\
+% | \< Konoe & Fumimaro & Konoe & >|\hfill\emph{Eastern/Western index}\\
+% | \< Yamt & & Yamamoto, Isoroku & >|\hfill\emph{Eastern/Eastern index}\\
+% |\end{nameauth}|
+% \end{quote}
+%
+% The following control sequences in the body text illustrate how this environment works. Please pay attention to first and subsequent uses, as well as how the L and S versions and other control sequences modify names:
+%
+% \begin{multicols}{2}\small
+% \noindent\textbf{Basic Uses:}\\
+% |\Wash|\hfill \Wash \\
+% |\LWash|\hfill \LWash \\
+% |\Wash|\hfill \Wash \\
+% |\SWash|\hfill \SWash \\[1ex]
+% \textbf{Western Reversed with Comma:}\\
+% |\RevComma\LWash|\hfill \RevComma\LWash \\[1ex]
+% \textbf{Particles:}\\
+% |\Soto|\hfill \Soto \\
+% |\Soto|\hfill \Soto \\
+% |\CapThis\Soto|\hfill \CapThis\Soto \\[1.1ex]
+% \textbf{Affixes:}\\
+% |\JRock|\hfill \JRock \\
+% |\LJRock|\hfill \LJRock \\
+% |\JRock|\hfill \JRock \\[1.1ex]
+% \textbf{Nicknames:} (See Section~\ref{sec:Fname})\\
+% |\JayR|\hfill \JayR \\
+% |\SJayR\ \JayR|\hfill \SJayR\ \JayR\\[1ex]
+% \textbf{Ancient:}\\
+% |\Aris|\hfill \Aris \\
+% |\Aris|\hfill \Aris \columnbreak\\
+% \textbf{Medieval/Royal:}\\
+% |\Eliz|\hfill \Eliz \\
+% |\Eliz|\hfill \Eliz \\
+% |\Atil|\hfill \Atil \\
+% |\Atil|\hfill \Atil \\[2ex]
+% \textbf{Western / Western Index:}\\
+% |\Konoe|\hfill \Konoe \\
+% |\LKonoe|\hfill \LKonoe \\
+% |\Konoe|\hfill \Konoe \\[2ex]
+% \textbf{Eastern / Western Index:}\\
+% |\CapName\RevName\LKonoe|\\\hbox{}\hfill \indent\dag\CapName\RevName\LKonoe \\
+% |\CapName\Konoe|\hfill \dag\CapName\Konoe \\[2ex]
+% \textbf{Eastern / Eastern Index:}\\
+% |\CapName\Yamt|\hfill \CapName\Yamt \\
+% |\CapName\LYamt|\hfill \CapName\LYamt \\
+% |\CapName\Yamt|\hfill \CapName\Yamt \\[2ex]
+% \textbf{Western / Eastern Index:}\\
+% |\RevName\LYamt|\hfill \RevName\LYamt \\
+% |\Yamt|\hfill \Yamt
% \end{multicols}
%
+% In this manual we use a dagger (\dag) to indicate all Eastern names with Western forms in the index. The use is encouraged to compare the index entries with the body text in order to understand better what the macros are doing.\clearpage
+%
% \subsubsection{Older Syntax}
+% \label{sec:obsolete}
%
-% An older form of syntax remains for backward compatibility with early versions, especially with the |comma| option. It lacks some of the error checking and robustness of the new syntax and limits the use of several macros. Never mix the older and newer syntax! For the sake of completeness we have:
+% An ``obsolete'' syntax remains for backward compatibility with early versions of \textsf{nameauth} and with the |comma| option. Please avoid mixing the older and newer forms. The old form lacks some error checking and robustness contained in the new syntax and limits the use of several macros:
%
% \begin{quote}
-% |\Name{Dagobert}[I]|\hfill\emph{royal name}\\[0.5ex]
-% |\Name{Yoshida}[Shigeru]|\hfill\emph{Eastern name}\\[0.5ex]
+% |\Name{Dagobert}[I]|\hfill\emph{royal name}\\
+% |\Name{Yoshida}[Shigeru]|\hfill\emph{Eastern name}\\
% |\begin{nameauth}|\\[0.5ex]
-% | \< Dagb & & Dagobert & I >|\hfill\emph{royal name}\\[0.5ex]
-% | \< Yosh & & Yoshida & Shigeru >|\hfill\emph{Eastern name}\\[0.5ex]
-%|\end{nameauth}|
+% | \< Dagb & & Dagobert & I >|\hfill\emph{royal name}\\
+% | \< Yosh & & Yoshida & Shigeru >|\hfill\emph{Eastern name}\\
+% |\end{nameauth}|
% \end{quote}
%
-% \begin{multicols}{2}
-% \noindent|\Dagb|: \Dagb \\
-% |\Dagb|: \Dagb \\
-% |\LDagb|: \LDagb \\
-% |\CapName\Yosh|: \CapName\Yosh\\
-% |\CapName\RevName\LYosh|: \\ \indent\CapName\RevName\LYosh
-% \end{multicols}
+% \noindent|\Dagb| gives \Dagb, while the next |\Dagb| produces \Dagb. In similar fashion as before, we see |\LDagb| \LDagb, |\CapName\Yosh| \CapName\Yosh, and |\CapName\RevName\LYosh| \CapName\RevName\LYosh.
%
% \begin{itemize}
-% \item This older syntax could produce weird results. |\Name{Henry}[VIII]| prints ``\Name{Henry}[VIII]'' and ``\Name{Henry}[VIII]'' as expected. \IndexInactive Using |\Name[Henry]{VIII}| (an error) prints either ``\Name*[Henry]{VIII}'' or just ``\Name[Henry]{VIII}.'' Both |\Name{Henry}[VIII]| and |\Name[Henry]{VIII}| produce the same ``first-use'' control sequence. |\Name[Henry]{VIII}[Tudor]| gives ``\Name*[Henry]{VIII}[Tudor]'' and ``\Name[Henry]{VIII}[Tudor].''
+% \item In the old syntax, |\Name{Henry}[VIII]| prints ``\Name{Henry}[VIII]'' and ``\Name{Henry}[VIII].'' If you mix |\Name{Henry}[VIII]| with the newer |\Name{Henry, VIII}| they both print \Name{Henry, VIII} and \Name{Henry, VIII} in the body text. Yet they generate different control sequences for both first/subsequent uses and index tags.\footnote{Technically you can mix the two, as I do here. This package is all about offering choices, not restricting authors. Yet you must force first and subsequent uses with \cmd{\ForgetName} and \cmd{\SubvertName}, and make common index tags, \emph{e.g.}: \cmd{\TagName}\texttt{\{Henry, VIII\}\{, king\}} and \cmd{\TagName}\texttt{\{Henry\}[VIII]\{, king\}}. That undermines the time-saving features offered by this package. Since authors have personal styles and workflows, this package tries its best to embrace the horror of inherent ambiguity in names and their usage.}
+%
+% \item\IndexInactive Erroneously typing |\Name[Henry]{VIII}| prints ``\Name*[Henry]{VIII}'' and ``\Name[Henry]{VIII},'' as well as producing a malformed index entry. As of version 2.0, this kind of malformed input creates no side effects for well-formed input.
+%
+% \item Avoid forms like |\Name[Henry]{VIII}[Tudor]| which gives ``\Name*[Henry]{VIII}[Tudor]'' and ``\Name[Henry]{VIII}[Tudor].'' Again, this classifies as malformed input.
+%
+% \item Also avoid |\Name{Henry, VIII}[Tudor]| unless you really want ``\Name*{Henry, VIII}[Tudor]'' and ``\Name{Henry, VIII}[Tudor]'' in the body text and ``Henry VIII'' in the index.
%
-% The newer syntax fixes many of these problems. |\Name{Henry, VIII}| gives ``\Name{Henry, VIII}'' and ``\Name{Henry, VIII}.'' It produces unambiguous control sequences and index entries from those above. Avoid |\Name{Henry, VIII}[Tudor]|; this gives ``\Name*{Henry, VIII}[Tudor]'' and ``\Name{Henry, VIII}[Tudor]'' in the text and ``Henry VIII'' in the index. Instead of that, add ``Tudor'' manually to |\Name{Henry, VIII}| in the text and use a tag in the index (Section \ref{sec:TagName}).
+% \item One solution to incorporate the house designation adds ``Tudor'' as needed in the text to |\Name{Henry, VIII}| and uses a tag in the index: |\TagName{Henry, VIII}{ Tudor}| (see Section \ref{sec:TagName}).
%
-% \item Avoid mixing the older and newer syntax! |\Name{Mononym, Affix}| and |\Name{Mononym}[Affix]| are different names! You get both \Name{Mononym, Affix} and \Name{Mononym}[Affix]. Index tags for |\Name*[Henry]{VIII}| will not work with |\Name{Henry, VIII}|, and vice versa.\ForgetName{Henry}[VIII]\ForgetName[Henry]{VIII}\ForgetName{Henry, VIII}
+% \item\IndexActive The older syntax will not work with some macros. From the film \emph{Men in Black III}, |\AKA{Boris}[the Animal]{Just Boris}| fails. \cmd{\PName} fails for the same reasons. See also Section~\ref{sec:AKA}
%
-% \item The older syntax will not work with some macros. From the film \emph{Men in Black III}, |\AKA{Boris}[the Animal]{Just Boris}| fails. |\Name{Boris,| |the| |Animal}| |\AKA{Boris,| |the| |Animal}{Just| |Boris}| works, and you get \Name{Boris, the Animal} being ``\AKA{Boris, the Animal}{Just Boris}.''
+% \item This form does work: |\Name{Boris,| |the| |Animal}| |\AKA{Boris,| |the| |Animal}{Just| |Boris}|. You get \Name{Boris, the Animal} being ``\AKA{Boris, the Animal}{Just Boris}.''
% \end{itemize}
% \clearpage
%
@@ -603,38 +901,68 @@
% \label{sec:error}
%
% \begin{itemize}
-% \item Keep it simple! Avoid macros that you do not need.
+% \item Keep it simple! Avoid unneeded macros and use the simplified interface.
%
-% \item Use the simplified interface or check your use of braces and brackets with naming macros to avoid execution halting and errors like ``Paragraph ended\dots'' and ``Missing \meta{grouping token} inserted.''
+% \item Check braces and brackets with naming macros to avoid errors like ``Paragraph ended\dots'' and ``Missing \meta{grouping token} inserted.''
%
-% \item For stage names, etc., try using, \emph{e.g.}, |\Name[J.]{Kreskin}[The Amazing]| |(\AKA[J.]{Kreskin}[Joseph]{Kresge})|. You get \Name[J.]{Kreskin}[The Amazing] (\AKA[J.]{Kreskin}[Joseph]{Kresge}), with ``Kreskin, J.'' in the index. You must have initials or something in the first optional field for this to work, or else it will fail.
+% \item For stage names, etc., try using \emph{e.g.}: |\Name[J.]{Kreskin}[The Amazing]| |(\AKA[J.]{Kreskin}[Joseph]{Kresge})|. As a result you get \Name[J.]{Kreskin}[The Amazing] (\AKA[J.]{Kreskin}[Joseph]{Kresge}). The corresponding index entry will be ``Kreskin, J.'' You must have a name in the first optional field for this to work.
%
-% \item Special cases like \textsc{``Iron Mike'' Tyson}\IndexName[Mike]{Tyson} can be handled with the intricate use of \cmd{\ForgetName} and \cmd{\SubvertName}, but it is easier to use manual formatting along with \cmd{\IndexName}. Using |``\AKA[Mike]{Tyson}{Iron Mike}''| creates ``\AKA[Mike]{Tyson}{Iron Mike}'' in the text and a \emph{see}-type cross-reference to the main name in the index. See Section~\ref{sec:AKA}.
+% \item Let this package help your workflow as you need it, instead of trying to figure out all its intricacies. Special cases like ``Iron Mike'' Tyson as the nickname for \Name[Mike]{Tyson} may be handled in a number of ways.
+% \begin{enumerate}
+% \item Follow |``Iron Mike''| with |\IndexName[Mike]{Tyson}| and do whatever you want in the text.
+% \item |\SubvertName[Mike]{Tyson}\FName[Mike]{Tyson}[Iron| |Mike]%|\\ |\Name[Mike]{Tyson}| gives ``\SubvertName[Mike]{Tyson}\FName[Mike]{Tyson}[Iron Mike] \Name[Mike]{Tyson}.'' You are responsible for typesetting the first use and you can \cmd{\let} the whole thing to a control sequence.
+% \item Use |``\AKA[Mike]{Tyson}{Iron Mike}''| to create ``\AKA[Mike]{Tyson}{Iron Mike}'' in the text and a \emph{see}-type cross-reference to ``Tyson, Mike'' in the index. Be sure to have an occurrence of |\Name[Mike]{Tyson}| in the text. See also Section~\ref{sec:AKA}.
+% \end{enumerate}
%
-% \item Avoid spaces between initials in first names. Either use \cmd{\frenchspacing} or \emph{consistently} put fractional spaces between them. See also Bringhurst's \emph{Elements of Typographic Style}.
+% \item Omit spaces between initials if possible; see also Bringhurst's \emph{Elements of Typographic Style}. If your publisher wants spaces between initials, use \cmd{\frenchspacing}\footnote{Although there should be no difference between \cmd{\frenchspacing} and \cmd{\nonfrenchspacing} when it comes to initials, some classes or packages may affect that.} or put thin spaces |\,| between them. Consider:
+% \begin{quote}
+% |\begin{nameauth}|\\
+% | \< White & E.\,B. & White & >|\\
+% |\end{nameauth}|
+% \begin{nameauth}
+% \< White & E.\,B. & White & >
+% \end{nameauth}
+% \end{quote}
+% Compare the following:
+% \begin{quote}
+% |\White| and |\LWhite|\hfill (\White\ and \LWhite)\\
+% Normal:\hfill\frenchspacing \textsc{E. B. White} and E. B. White.
+% \end{quote}
%
% \item One way to spot errors is to compare index entries with names in the body text. All macros that produce output also emit meaningful warnings. \cmd{\PName} produces warnings via \cmd{\Name} and \cmd{\AKA}.
%
-% \item Not all warnings are created equal. For example, \cmd{\AKA} warns one if used multiple times for the same name. That may or may not be what one wants and is left to the author. Other warnings, especially in the case of indexing macros, indicate that the macro produced no output.\\
-% \end{itemize}
+% \item Please pay greater attention to the warnings produced by \cmd{\IndexName}, \cmd{\TagName}, \cmd{\UntagName}, and \cmd{\ExcludeName}. Many other warnings are FYI.
+%
+% \item The |nameauth| environment only generates a warning when you overwrite a control sequence designator with a new name.
+%
+% \item Inserting an empty string in a required field will generate an error.
+% \end{itemize}\clearpage
%
% \noindent Warnings result from:
%
-% \begin{enumerate}\setlength{\itemsep}{-0.4ex}
-% \item Using a cross-reference \oarg{alternate FNN}\marg{alternate SNN}\oarg{alt. names} created by \cmd{\AKA} as a reference in \cmd{\Name}, \cmd{\FName}, and \cmd{\PName}.
-% \item Using a reference \oarg{FNN}\marg{SNN}\oarg{Alternate names} created by \cmd{\Name}, \cmd{\FName}, and \cmd{\PName} as a cross-reference in \cmd{\AKA}.
-% \item Using \cmd{\AKA} to create the same cross-reference multiple times.
-% \item Using \cmd{\IndexName} to index a cross-reference as a main entry.
-% \item Using \cmd{\TagName} to tag a cross-reference.
-% \item Using \cmd{\ExcludeName} to exclude a name that has already been used.
-% \item Using \cmd{\Name}, \cmd{\FName}, \cmd{\PName}, and \cmd{\AKA} to refer to names and cross-references excluded by \cmd{\ExcludeName}.
-% \end{enumerate}
+% \begin{itemize}
+% \item Using a cross-reference \oarg{alternate FNN}\marg{alternate SNN}\oarg{alt. names} created by \cmd{\AKA} as a name reference in \cmd{\Name}, \cmd{\FName}, and \cmd{\PName}. They merely will print a name in the body text.
+% \item Using a name reference \oarg{FNN}\marg{SNN}\oarg{Alternate names} created by \cmd{\Name}, \cmd{\FName}, and \cmd{\PName} as a cross-reference in \cmd{\AKA}. It merely will print a name in the body text.
+% \item Using \cmd{\AKA} to create the same cross-reference multiple times or with a cross-reference created by \cmd{\ExcludeName}. It merely will print a name in the body text, but not the index.
+% \item Using \cmd{\IndexName} to index a cross-reference made via \cmd{\AKA} or via the mechanism in \cmd{\ExcludeName} as a main entry. It will do nothing.
+% \item Using \cmd{\TagName}, \cmd{\UntagName}, and \cmd{\PretagName} with cross-references. The first two will do nothing. However, \cmd{\PretagName} will ``pretag'' a cross-reference. This is the desired behavior.
+% \item Using \cmd{\ExcludeName} with cross-references. It will do nothing.
+% \item Using \cmd{\ExcludeName} to exclude a name that has already been used. Likewise, it will do nothing.
+% \item Using \cmd{\Name}, \cmd{\FName}, \cmd{\PName}, and \cmd{\AKA} to refer to names and cross-references excluded by \cmd{\ExcludeName}. They merely will print a name in the body text.
+% \item Using the |nameauth| environment to redefine shorthands, such as:
+% \begin{quote}
+% |\begin{nameauth}|\\
+% | \< White & E.\,B. & White & >|\\
+% | \< White & E. B. & White & >|\\
+% |\end{nameauth}|
+% \end{quote}
+% \end{itemize}
% \clearpage
%
% \subsection{Naming Macros}
% \label{sec:Naming}
%
-% \subsubsection{Surnames: \texttt{\textbackslash Name} and \texttt{\textbackslash Name*}}
+% \subsubsection{\texttt{\textbackslash Name} and \texttt{\textbackslash Name*}}
%
% \DescribeMacro{\Name}
% \DescribeMacro{\Name*}
@@ -666,19 +994,23 @@
%
% \cmd{\Name} displays and indexes names, as illustrated in Section~\ref{sec:PatRef}. It always prints the \meta{SNN} field. \cmd{\Name} prints the ``full name'' at the first occurrence, then the partial form thereafter. \cmd{\Name*} always prints the full name.
%
-% The \meta{Alternate names} field replaces the \meta{FNN} field in the text only if the \meta{FNN} field is not empty; see the example for \Name[M.T.]{Cicero}[Marcus Tullius] above. One can use a nickname in some instances while keeping the indexed form constant. Thus, |\Name[M.T.]{Cicero}[Marcus Tullius]| and |\Name[M.T.]{Cicero}| are equivalent, while |\Name{Cicero}[Marcus Tullius]| and |\Name{Cicero}| are not. If you are using the newer syntax, avoid forms like |\Name{Charles}[the Bald]|.
+% The \meta{Alternate names} field replaces the \meta{FNN} field in the text only if the \meta{FNN} field is not empty; see ``\Name[M.T.]{Cicero}[Marcus Tullius]'' above. One can use a nickname in some instances while keeping the indexed form constant.
+%
+%Thus, regarding their index entries and first/subsequent uses in \textsf{nameauth}, |\Name[M.T.]{Cicero}[Marcus Tullius]| and |\Name[M.T.]{Cicero}| are equivalent, while |\Name{Cicero}[Marcus Tullius]| and |\Name{Cicero}| are not. Generally avoid older forms like |\Name{Charles}[the Bald]|.
%
% \begin{quote}
-%|\begin{nameauth}% In the preamble!|\\[0.2ex]
-%| \< Einstein & Albert & Einstein & >|\\[0.2ex]
-%| \< Cicero & M.T. & Cicero & >|\\[0.2ex]
-%| \< Confucius & & Confucius & >|\\[0.2ex]
-%| \< CBald & & Charles, the Bald & >|\\[0.2ex]
+%|\begin{nameauth}|\\
+%| \< Einstein & Albert & Einstein & >|\\
+%| \< Cicero & M.T. & Cicero & >|\\
+%| \< Confucius & & Confucius & >|\\
+%| \< CBald & & Charles, the Bald & >|\\
%|\end{nameauth}|
%\end{quote}
%
% \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
-% Above we see the same setup with the new interface in the preamble. In the body text, |\Einstein, \LEinstein, and \Einstein| produce \Einstein, \LEinstein, and \Einstein. |\CBald\ and \CBald| give \CBald\ and \CBald. In the next section we shall see why |\Cicero[Marcus Tullius]| is preferred to get \Cicero[Marcus Tullius].
+% Above we see the same setup with the simplified interface. In the body text, |\Einstein, \LEinstein, and \Einstein| produce \Einstein, \LEinstein, and \Einstein. |\CBald\ and \CBald| give \CBald\ and \CBald. The next section demonstrates that |\LCicero[Marcus Tullius]| allows for \Cicero\ to be both \LCicero[Marcus Tullius] and \LCicero.
+% \clearpage
+%
% \subsubsection{Forenames: \texttt{\textbackslash FName}}
% \label{sec:Fname}
%
@@ -688,7 +1020,7 @@
% \begin{quote}
% \cmd{\FName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
-% The first reference to \cmd{\FName} always is a full name. That prevents a first-name-only reference before a person has been introduced. Intentionally, \cmd{\FName} \emph{never} gives the first name with Eastern names. You must type the first name and then use \cmd{\IndexName}. For examples we see below:
+% The first reference to \cmd{\FName} always is a full name. That prevents a first-name-only reference before a person has been introduced. Intentionally, \cmd{\FName} \emph{never} gives the first name with Eastern names. For examples we see below:
% \ForgetName[Albert]{Einstein}\ForgetName{Confucius}\ForgetName[M.T.]{Cicero}\ForgetName{Charles, the Bald}%
%
% \begin{quote}\small
@@ -704,9 +1036,10 @@
% \end{tabular}\\
% \end{quote}
%
-% Nicknames are used instead of the regular first names by including them in the \meta{Alternate names} field. For example, when writing of aviation hero \Name[Chesley B.]{Sullenberger, III} use |``\FName[Chesley B.]{Sullenberger, III}[Sully]''| to get the nickname ``\FName[Chesley B.]{Sullenberger, III}[Sully].''
+% The \Cicero\ example shows how the \meta{Alternate names} field can work. Be careful with nicknames: |``\FName[Chesley B.]{Sullenberger, III}[Sully]''| produces ``\FName[Chesley B.]{Sullenberger, III}[Sully]'' and ``\FName[Chesley B.]{Sullenberger, III}[Sully].'' This is not a ``bug'' as such, as the \Name[M.T.]{Cicero} example illustrates. Names are very context-sensitive.
+%
+% With |\SEinstein,| |\SConfucius,| |\SCicero,| and |\SCBald| we get \SEinstein, \SConfucius, \SCicero, and \SCBald\ when using the simplified interface example from the previous page. |\SCicero[Marcus Tullius]| gives \SCicero[Marcus Tullius]. The simplified interface allows you to use a ``default nickname.'' In Section~\ref{sec:simplestart} |\SJayR| gives \ForgetName[John David]{Rockefeller, IV}\SJayR\ and \SJayR, but the index entry ``Rockefeller, John David, IV.'' Yet default nicknames are not always what they seem:
%
-% With the simplified interface, |\SEinstein, \SConfucius, and \SCBald| give \SEinstein, \SConfucius, and \SCBald. You must choose whether you want the nickname or the formal name as the default. For example:
% \begin{nameauth}%
% \< Ches & Chesley B. & Sullenberger, III & >%
% \< Sully & Chesley B. & Sullenberger, III & Sully >%
@@ -715,35 +1048,32 @@
% |\begin{nameauth}|\\
% | \< Ches & Chesley B. & Sullenberger, III & >|\\
% | \< Sully & Chesley B. & Sullenberger, III & Sully >|\\
-%|\end{nameauth}|
+% |\end{nameauth}|
% \end{quote}
-% Subsequent references to |\SChes| produce ``\SChes.'' Subsequent references to |\SSully| produce ``\SSully.'' Now here it gets tricky: |\SChes[Sully]| gives ``\SChes[Sully]'' as expected. However, |\SSully[Chesley B.]| expands to what it says, not what you mean: |\FName[Chesley B.]{Sullenberger, III}[Sully][Chesley B.]|. That clearly gives you ``\SSully[Chesley B.].'' Use the nickname field with caution!
-%
-% \subsubsection{Full Stop Detection}
%
-% Affixes and initials could result in the period of an abbreviation like ``Jr.,'' ``Sr.,'' ``d.\,J.'' (\textit{der J\"ungere}), and ``d.\,\"A.'' (\textit{der \"Altere}) followed by the sentence full stop. These macros check for such collisions and drop the extra full stop as needed:
+% \ForgetName[Chesley B.]{Sullenberger, III} The first use |\Ches| prints ``\Ches.'' Later, |\SChes| and |\SSully| print ``\SChes'' and ``\SSully.'' While |\SChes[Sully]| always gives, ``\SChes[Sully],'' |\SSully[Chesley B.]| prints ``\SSully[Chesley B.].''
%
-% \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.}
-% \begin{tabular}{ll}
-% {\large\strut}|\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\
-% {\large\strut}|\Name[Martin Luther]{King, Jr.}.| & \Name[Martin Luther]{King, Jr.}.\\
-% {\large\strut}|\Name[Martin Luther]{King, Jr.}| & \Name[Martin Luther]{King, Jr.} (\emph{e.g.}, in a sentence)\\
-% {\large\strut}|\Name*[Martin Luther]{King, Jr.}.| & \Name*[Martin Luther]{King, Jr.}.\\
-% {\large\strut}|\Name*[Martin Luther]{King, Jr.}| & \Name*[Martin Luther]{King, Jr.}
-% \end{tabular}
+% |\SSully[Chesley B.]| expands to what it should be, not what you might expect it to be:\hfil |\FName[Chesley B.]{Sullenberger, III}[Sully][Chesley B.]|. Thus we prefer |\LCicero[Marcus Tullius]| and |\SCicero[Marcus Tullius]|:
+% \begin{quote}
+% |\begin{nameauth}|\\
+% | \< Cicero & M.T. & Cicero & >|\hfill \emph{preferred}\\
+% | \< Cicero & M.T. & Cicero & Marcus Tullius >|\hfill \emph{not preferred}
+% |\end{nameauth}|
% \end{quote}
%
-% \noindent Full-stop detection also works with \cmd{\FName}. If a name reference is enclosed, \emph{e.g.}, between grouping tokens, detection will not work.
+% This package offers preferred choices, but its design does not force you to use them because names and their uses have many variants.\clearpage
%
% \subsection{Affixes and Eastern Names}
%
-% \subsubsection{Comma-Delimited Affixes}
+% \subsubsection{Affixes Need Commas}
% \label{sec:Affix}
%
-% Comma-delimited affixes handle several different name types. The first is Western names with affixes. One must use |\Name[Oskar]{Hammerstein, II}| to get \Name[Oskar]{Hammerstein, II} and \Name[Oskar]{Hammerstein, II}. \emph{Always include a comma as an affix delimiter.} Extra spaces and trailing commas are ignored. Other name types include royal, medieval, and Eastern names:
+% Comma-delimited affixes handle several different name types. \emph{Always include a comma as an affix delimiter}, even when the |nocomma| option does not print the comma. Extra spaces and trailing commas are ignored. Other name types include royal, medieval, and Eastern names:
%
-% \begin{quote}\ForgetName{Sun, Yat-sen}
+% \begin{quote}\small\ForgetName{Sun, Yat-sen}
% \begin{tabular}{ll}\hline
+% {\large\strut}|\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\
+% {\large\strut}|\Name[Oskar]{Hammerstein, II}| & \Name[Oskar]{Hammerstein, II}\\\hline
% {\large\strut}|\Name{Louis, XIV}| & \Name{Louis, XIV}\\
% {\large\strut}|\Name{Louis, XIV}| & \Name{Louis, XIV}\\\hline
% {\large\strut}|\Name{Sun, Yat-sen}| & \Name{Sun, Yat-sen}\\
@@ -751,17 +1081,17 @@
% \end{tabular}
% \end{quote}
%
-% One can type |\Name*{Louis, XIV}, the| |``\AKA{Louis, XIV}{Sun King}''| and get \Name*{Louis, XIV}, the ``\AKA{Louis, XIV}{Sun King}'' in the text with an appropriate \emph{see} reference from ``Sun King'' to ``Louis XIV'' in the index (Section \ref{sec:AKA}).
+% One must use comma-delimited suffixes when cross-referencing affixed Western names, royal names, some medieval names, and Eastern names with \cmd{\AKA}; see Section~\ref{sec:AKA}.\\
%
% \DescribeMacro{\KeepAffix}
-% Put \cmd{\KeepAffix} before \cmd{\Name} or \cmd{\AKA} if a line break or page break divides a \meta{SNN, affix} pair. This puts a non-breaking space between \emph{SNN} and \emph{affix} in the body text, but not in the index. Other options to fix bad breaks include using \cmd{\hbox}, kerning and spacing in the \textsf{microtype} package, etc.
+% Put \cmd{\KeepAffix} before \cmd{\Name} or \cmd{\AKA} if a line break or page break divides a \meta{SNN, affix} pair. This puts a non-breaking space between \emph{SNN} and \emph{affix} in the body text, but not in the index. Other options to fix bad breaks include using \cmd{\hbox}, kerning and spacing in the \textsf{microtype} package, etc.\\
%
% \DescribeMacro{\ShowComma}
-% The |comma| option is restrictive and used to reproduce older texts. \cmd{\ShowComma} gets the same results on a per-name basis while using the default |nocomma| option. With |\ShowComma\Name[Louis]{Gossett, Jr.}| one gets \ShowComma\Name[Louis]{Gossett, Jr.}. One must use \cmd{\ShowComma} consistently or risk errors in the body text and index.
+% The |comma| option is restrictive and used to reproduce older texts. \cmd{\ShowComma} gets the same results on a per-name basis while using the default |nocomma| option. With |\ShowComma\Name[Louis]{Gossett, Jr.}| one gets \ShowComma\Name[Louis]{Gossett, Jr.}. One must use \cmd{\ShowComma} consistently or risk errors in the body text and index.\\
%
-% Avoid using the older syntax, shown below. It does not handle Western names with affixes and some other name types. \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms. Thus we have:
+% Avoid using the older syntax, shown below, except with the |comma| option. It does not handle Western names with affixes and some other name types. \cmd{\AKA} and \cmd{\PName} cannot create cross-references to these forms. These older forms include:
%
-% \begin{quote}\ForgetName{Henry}[VIII]
+% \begin{quote}\small\ForgetName{Henry}[VIII]
% \begin{tabular}{ll}\hline
% {\large\strut}|\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\
% {\large\strut}|\Name{Henry}[VIII]| & \Name{Henry}[VIII]\\\hline
@@ -769,52 +1099,52 @@
% {\large\strut}|\Name{Chiang}[Kai-shek]| & \Name{Chiang}[Kai-shek]\\\hline
% \end{tabular}
% \end{quote}
-% These older forms work because no \meta{FNN} are present. Otherwise you would get weird nicknames. Again, please avoid using the older syntax.
+% These older forms work because no \meta{FNN} are present. Otherwise you would get weird nicknames. Again, please avoid using the older syntax.\clearpage
%
% \subsubsection{Eastern Names}
% \label{sec:Eastern}
%
-% The \textsf{nameauth} package offers two ways to handle romanized Eastern names. \cmd{\RevName}\cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN} and equivalents will produce an Eastern name in the body text and the Western form \meta{SNN}, \meta{FNN} in the index, including the comma. One might call this ``non-native'' mode.
+% The \textsf{nameauth} package offers ``non-native'' and ``native'' ways to handle romanized Eastern names. \cmd{\RevName}\cmd{\Name}\oarg{Eastern FNN}\marg{Eastern SNN} will produce an Eastern name in the body text and the Western form \meta{SNN}, \meta{FNN} in the index, including the comma. We call this ``non-native'' mode.
%
-% In contrast, both \cmd{\Name}\marg{Eastern SNN, Eastern FNN} and the older syntax \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN} produce an Eastern form \meta{SNN} \meta{FNN} in the body text and index without any comma. This can be called ``native'' mode. The goal for offering these two ``modes'' is to allow for greatest flexibility in indexing requirements, not favoring one over another.
+% In contrast, both \cmd{\Name}\marg{Eastern SNN, Eastern FNN} and the older syntax \cmd{\Name}\marg{Eastern SNN}\oarg{Eastern FNN} produce an Eastern name form in the body text: \meta{SNN} \meta{FNN} as well as in the index. This form has no comma in the index. We call this ``native'' mode. Offering these two modes gives the greatest flexibility in indexing requirements.\\
%
% \DescribeMacro{\ReverseActive}
% \DescribeMacro{\ReverseInactive}
% \DescribeMacro{\RevName}
-% The reverse output mechanism makes the ``non-native'' mode compatible with the ``native'' mode in the body text. One chooses the style of index entry desired, then uses the ``native'' or ``non-native'' approach as desired. In addition to the class options described in Section~\ref{sec:options}, \cmd{\ReverseActive} and \cmd{\ReverseInactive} toggle reversing on a larger scale, while \cmd{\RevName} is used once per \cmd{\Name}.
+% The ``smart'' reverse output mechanism converts between Western and Eastern forms in the text, but not the index. If one wants a Western-format index, then pick non-native mode. If Eastern forms are okay in the index, then pick native mode. In addition to the class options described in Section~\ref{sec:options}, \cmd{\ReverseActive} and \cmd{\ReverseInactive} toggle reversing on a larger scale, while \cmd{\RevName} is used once per \cmd{\Name}.
%
-% A list of Japanese music artists illustrates the use of \cmd{\RevName}. Both \Name[Aiko]{Nakano} and \Name[Yoko]{Kanno} are listed in Western order, then ``non-native'' Eastern order. The others are all listed in ``native'' Eastern mode, then reversed to Western order. Their index entries reflect that:
+% This list of Japanese music artists shows \cmd{\RevName} in action. Names in Western order, then non-native Eastern order are marked with a dagger ({\dag}). All other names are in native Eastern, then Western order. Forms using the old syntax are in parentheses. Name formatting is turned off in order to focus on reversing:
%
% \NamesInactive
-% \begin{quote}
+% \begin{quote}\small
% \begin{tabular}{lll}\hline
% {\large\strut} & \emph{unchanged} & |\RevName|\\
-% {\large\strut}|\Name*[Aiko]{Nakano}| & \Name*[Aiko]{Nakano} & \RevName\Name*[Aiko]{Nakano}\\
+% {\large\strut}\dag|\Name*[Aiko]{Nakano}| & \dag\Name*[Aiko]{Nakano} & \dag\RevName\Name*[Aiko]{Nakano}\\
% {\large\strut}|\Name*{Arai, Akino}| & \Name*{Arai, Akino} & \RevName\Name*{Arai, Akino}\\
-% {\large\strut}|\Name*{Ishida}[Yoko]| & \Name*{Ishida}[Yoko] & \RevName\Name*{Ishida}[Yoko]\\
+% {\large\strut}(|\Name*{Ishida}[Yoko]|) & (\Name*{Ishida}[Yoko]) & (\RevName\Name*{Ishida}[Yoko])\\
% {\large\strut}|\Name*{Yohko}| & \Name*{Yohko} & \RevName\Name*{Yohko}\\\hline
% \end{tabular}\\
% \end{quote}
% \NamesActive
%
% \DescribeMacro{\AllCapsActive}
-% \DescribeMacro{\AllCapsInctive}
+% \DescribeMacro{\AllCapsInactive}
% \DescribeMacro{\CapName}
-% Use \cmd{\AllCapsActive}, \cmd{\AllCapsInactive}, and \cmd{\CapName} for fully-capitalized family names in the body text. These macros are analogous to the reversing macros above and may be used alone or with those macros, \emph{e.g.} \cmd{\CapName}\cmd{\RevName}\cmd{\Name}:
+% Use \cmd{\AllCapsActive}, \cmd{\AllCapsInactive}, and \cmd{\CapName} for fully-capitalized family names in the body text. These macros are analogous to the reversing macros above and may be used alone or with those and other state-toggling macros, \emph{e.g.} \cmd{\CapName}\cmd{\RevName}\cmd{\Name}. Names in Western order, then non-native Eastern order are marked with a dagger ({\dag}). All other names are in native Eastern, then Western order. Forms using the old syntax are in parentheses. Name formatting is turned off in order to focus on capitalizing and reversing:
%
% \NamesInactive
-% \begin{quote}
-% \begin{tabular}{lll}\hline
+% \begin{quote}\small
+% \begin{tabular}{l@{ }l@{ }l}\hline
% {\large\strut} & \emph{unchanged} & |\CapName\RevName|\\
-% {\large\strut}|\Name*[Yoko]{Kanno}| & \CapName\Name*[Yoko]{Kanno} & \CapName\RevName\Name*[Yoko]{Kanno}\\
+% {\large\strut}\dag|\Name*[Yoko]{Kanno}| & \dag\CapName\Name*[Yoko]{Kanno} & \dag\CapName\RevName\Name*[Yoko]{Kanno}\\
% {\large\strut}|\Name*{Shikata, Akiko}| & \CapName\Name*{Shikata, Akiko} & \CapName\RevName\Name*{Shikata, Akiko}\\
-% {\large\strut}|\Name*{Nogawa}[Sakura]| & \CapName\Name*{Nogawa}[Sakura] & \CapName\RevName\Name*{Nogawa}[Sakura]\\
+% {\large\strut}(|\Name*{Nogawa}[Sakura]|) & (\CapName\Name*{Nogawa}[Sakura]) & (\CapName\RevName\Name*{Nogawa}[Sakura])\\
% {\large\strut}|\Name*{Yohko}| & \CapName\Name*{Yohko} & \CapName\RevName\Name*{Yohko}\\\hline
% \end{tabular}\\
% \end{quote}
% \NamesActive
%
-% The reversing and capitalization macros also work with \cmd{\AKA}. They affect only the text, not the index. Whoever wants all-cap forms in the index will have to capitalize everything manually or modify the macros. Note also that the above examples include the older syntax. Remember that index entries for \Name*[Aiko]{Nakano} and \Name*[Yoko]{Kanno} are Western-form; the others are Eastern-form.
+% Notice how capitalization is independent of formatting. The reversing and capitalization macros also work with \cmd{\AKA}. They affect only the text, not the index. Whoever wants all-cap forms in the index will have to capitalize everything manually or modify the macros.\clearpage
%
% \subsection{Other Naming Topics}
%
@@ -824,42 +1154,98 @@
%\DescribeMacro{\ReverseCommaActive}
%\DescribeMacro{\ReverseCommaInactive}
%\DescribeMacro{\RevComma}
-% Another set of reversing macros, \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}, allows the easy generation of lists with surnames, followed by a comma, then forenames. The first two are broad toggles, while the third works on a per-name basis. Here is a good place to show incompatibility between Eastern, medieval, and royal names on the one hand and Western names on the other. An indiscriminate use of \cmd{\RevComma}\cmd{\Name}\dots\ can yield:
+% The reversing macros \cmd{\ReverseCommaActive}, \cmd{\ReverseCommaInactive}, and \cmd{\RevComma}\ allow the easy generation of name lists ordered as \meta{surname}, \meta{forename(s)}. The first two are broad toggles, while the third works on a per-name basis. Eastern, medieval, and royal names do not work with these macros. Name formatting has been turned off to focus on reversing and commas:
%
% \NamesInactive
-% \begin{quote}
+% \begin{quote}\small
% \begin{tabular}{lll}
% {\large\strut}\Name*[J.S.]{Mill}[John Stuart] & \RevComma\Name*[J.S.]{Mill}[John Stuart] & OK\\
% {\large\strut}\Name*[Oskar]{Hammerstein, II} & \RevComma\Name*[Oskar]{Hammerstein, II} & OK\\
-% {\large\strut}\Name*{John, Eriugena} & \RevComma\Name*{John, Eriugena} & medieval incompatible\\
-% {\large\strut}\Name*{Mao}[Tse-tung] & \RevComma\Name*{Mao}[Tse-tung] & Eastern inconpatible\\
+% {\large\strut}\Name*{John, Eriugena} & \RevComma\Name*{John, Eriugena} & incompatible\\
+% {\large\strut}\Name*{Mao}[Tse-tung] & \RevComma\Name*{Mao}[Tse-tung] & incompatible\\
% {\large\strut}\Name*{Anaximander} & \RevComma\Name*{Anaximander} & OK\\
% \end{tabular}
% \end{quote}
% \NamesActive
%
-% It is not possible for this package to be all things to all names, but it tries in good faith to be as cross-cultural as possible.
-%
% \subsubsection{Naming Standards}
%
% \DescribeMacro{\CapThis}
% According to the \emph{Chicago Manual of Style}, English names with the particles \emph{de}, \emph{de\ la}, \emph{d'}, \emph{von}, \emph{van}, and \emph{ten} generally keep them with the last name, using varied capitalization. \emph{Le}, \emph{La}, and \emph{L'} always are capitalized unless preceded by \emph{de}.
%
-% In English, these particles go in the \meta{SNN} field of \cmd{\Name}, \emph{e.g.}, \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare}. To capitalize \emph{de} when it arises at the beginning of a sentence, use |\CapThis\Name[Walter]{de la Mare}|. \CapThis\Name[Walter]{de la Mare} will think it fair. Non-English contexts do not always bind particles to surnames. Using \cmd{\FName} with alternate forenames allows greater flexibility here. See Section~\ref{sec:Particles}.
+% In English, these particles go in the \meta{SNN} field of \cmd{\Name}, \emph{e.g.}, \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare}. To capitalize \emph{de} when it arises at the beginning of a sentence, use |\CapThis\Name[Walter]{de la Mare}|. \CapThis\Name[Walter]{de la Mare} will think it fair. Non-English contexts do not always bind particles to surnames. Using \cmd{\Name} and \cmd{\FName} with alternate forenames helps to address this issue of different standards. See also Section~\ref{sec:Particles}.
+%
+% \subsubsection{Fault Tolerance}
+%
+% Especially since version 2.0, the \textsf{nameauth} package has been redesigned to help prevent malformed input from generating odd side effects. For example, |\Name[Henry]{VIII}| and |\Name{Henry}[VIII]| used to create the same control sequence and allow one to affect the well-formed input via the malformed input. That no longer happens. Furthermore, we guard against deliberately empty required values being passed to the naming macros.
+%
+% Perhaps a vexing issue with older versions of the package was that leading and trailing spaces in the input could cause significant and obscure errors. Currently, both leading and trailing spaces\,---\,but not medial spaces\,---\,are ignored in the naming macros, making the following equivalent:
+%
+% \begin{quote}\small\ForgetName[Martin Luther]{King, Jr.}
+% \begin{tabular}{ll}
+% \textit{Macro Example} & \textit{Resulting text}\\
+% |\Name*[ Martin Luther]{King, Jr.}| & \Name*[ Martin Luther]{King, Jr.}\\
+% |\Name*[Martin Luther ]{King, Jr.}| & \Name*[Martin Luther ]{King, Jr.}\\
+% |\Name*[ Martin Luther ]{King, Jr.}| & \Name*[ Martin Luther ]{King, Jr.}\\
+% |\Name*[Martin Luther]{ King, Jr.}| & \Name*[Martin Luther]{ King, Jr.}\\
+% |\Name*[Martin Luther]{King, Jr. }| & \Name*[Martin Luther]{King, Jr. }\\
+% |\Name*[Martin Luther]{ King, Jr. }| & \Name*[Martin Luther]{ King, Jr. }\\
+% \end{tabular}
+% \end{quote}
+%
+% All name input fields of \cmd{\Name}, \cmd{\FName}, \cmd{\AKA}, and \cmd{\IndexName} are so protected. The other macros really are not affected by these issues.
+%
+% \subsubsection{Hyphenation}
+%
+% The simplified interface trivializes the consistent insertion of optional hyphens in names, as we see below:
%
-% \subsubsection{Hints for \textsf{babel}}
+% \begin{quote}
+% |\begin{nameauth}|\\
+% | \< Bier & Johann & Bier\-mann & >|\\
+% |\end{nameauth}|
+% \end{quote}
+% produces \Bier\ and \Bier. This should prevent the break ``Bi-ermann,'' which could happen otherwise. You can even tag and untag such forms. The bad break above was manufactured, while the bad break below is actual.
+%
+% \newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}
+% Bad breaks can be fixed with the \textsf{babel} or \textsf{polyglossia} packages. \Name[John]{Strietelmeier} can have a bad break in English, as you see. Using \textsf{babel}, we can use the following example so that |\de{\Name*[John]{Strietelmeier}}| generates \de{\Name*[John]{Strietelmeier}} and helps prevent bad breaks:
+%
+% \begin{quote}
+% |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}|
+% \end{quote}
+%
+% \subsubsection{Indexing and \textsf{babel}}
% \label{sec:babel}
+% Using\marginpar{\raggedleft \textsf{texindy}} \textsf{babel} with Roman page numbers will put \cmd{\textlatin} in the index entries if one includes a language that does not use the Latin alphabet\,---\,even if the main language does. The \texttt{texindy} program will ignore such references. This issue can affect \textsf{nameauth.} One workaround for \texttt{texindy} could enclose text with any macros that write to the index in an environment or a \cmd{\long} macro defined like:
+%
+% \begin{quote}
+% |\newcommand{\fix}[1]{\def\textlatin##1{##1}#1}|
+% \end{quote}
%
-% The\marginpar{\raggedleft Hyphens} simplified interface trivializes the consistent insertion of optional hyphens in names arguments. Name hyphenation also can be aided by using the \textsf{babel} or \textsf{polyglossia} packages. With English as the main language, a name of German origin might break poorly. For example, \Name[John]{Strietelmeier} might break thus: ``Stri-\break etelmeier.'' Using |\newcommand{\de}[1]{\foreignlanguage{ngerman}{#1}}| and |\de{\Name[John]{Strietelmeier}}| (with \textsf{babel}) prevents such breaks.
+% \subsubsection{Detecting Punctuation}
%
-% Using\marginpar{\raggedleft \textsf{texindy}} \textsf{babel} with Roman page numbers will put \cmd{\textlatin} in the index entries if one includes a language that does not use the Latin alphabet\,---\,even if the main language does. The \textsf{texindy} program will ignore all such references. This issue can affect \textsf{nameauth.} One workaround for \textsf{texindy} could enclose text with any macros that write to the index in an environment or a \cmd{\long} macro defined like:
-% \begin{quote}|\newcommand{\fix}[1]{\def\textlatin##1{##1}#1}|\end{quote}
+% In Western names, some affixes with full stops could appear at the end of a sentence. Such affixes include ``Jr.'' (junior), ``Sr.'' (senior), ``d.\,J.'' (\textit{der J\"ungere}), and ``d.\,\"A.'' (\textit{der \"Altere}). Consider this example, where some lines have two full stops and some do not:
+%
+% \begin{quote}\footnotesize\ForgetName[Martin Luther]{King, Jr.}
+% \begin{tabular}{l@{ }l@{\hbox to 1em{\hfil}}l}
+% \textit{Macro Example} & & \textit{Resulting text}\\
+% |\Name[Martin Luther]{King, Jr.}.| & $2\rightarrow1$ & \Name[Martin Luther]{King, Jr.}.\\
+% |\Name[Martin Luther]{King, Jr.}.| & $2\rightarrow1$ & \Name[Martin Luther]{King, Jr.}.\\
+% |\Name[Martin Luther]{King, Jr.}|\texttt{\textvisiblespace} & $1\rightarrow0$ & \Name[Martin Luther]{King, Jr.}\\
+% |\Name*[Martin Luther]{King, Jr.}.| & $2\rightarrow1$ & \Name*[Martin Luther]{King, Jr.}.\\
+% |\Name*[Martin Luther]{King, Jr.}|\texttt{\textvisiblespace} & $1\rightarrow1$ & \Name*[Martin Luther]{King, Jr.}\\
+% |{\Name*[Martin Luther]{King, Jr.}}.| & $2\rightarrow2$ & {\Name*[Martin Luther]{King, Jr.}}.\footnotemark\\
+% \end{tabular}\footnotetext{Example of how to frustrate the full stop detection mechanism.}
+% \end{quote}
+%
+% \cmd{\Name}, \cmd{\FName}, and \cmd{\AKA} all check for a trailing full stop in the printed name in the text. If it exists, and if the next token is also a full stop, they gobble the trailing full stop. Grouping tokens, among other items, can frustrate this detection, as shown in the previous example.
%
% \subsubsection{Accented Names}
% \label{sec:accents}
%
-% Using \textsf{xindy} (\textsf{texindy}) and \textsf{xelatex} or \textsf{lualatex} is recommended for accented names. Under NFSS these Unicode characters are available (with \textsf{inputenc}/\textsf{fontenc}):
-% \begin{quote}
+% For texts that contain significant amounts of accented characters, using \texttt{xindy} (\texttt{texindy}) and \texttt{xelatex} or \texttt{lualatex} is recommended.
+%
+% Under NFSS your results may vary with the |utf8| input encoding and |T1| or |TS1| font encoding. First of all, at the start of a name field, you need to put Unicode characters in braces or use control sequences, \emph{e.g.}, |\Name{{Æ}thelred, II}| and |\Name{\AE thelred, II}|. With |\Name[Johann]{Andreä}| we see that subsequent letters need no changes. For the first letter in any argument field of the \textsf{nameauth} macros, if you fail to put accented letters in braces or use control sequences, you will get an error and execution will halt. You can use these glyphs:
+% \begin{quote}\small
% \begin{tabular}{llll}
% \scshape À Á Â Ã Ä Å Æ & \scshape Ç È É Ê Ë & \scshape Ì Í Î Ï Ð Ñ & \scshape first use \\
% À Á Â Ã Ä Å Æ & Ç È É Ê Ë & Ì Í Î Ï Ð Ñ & second use \\[1ex]
@@ -878,125 +1264,180 @@
% \end{tabular}
% \end{quote}
%
-% One may use expandable control sequences in names (thanks \Name*[Robert]{Schlicht}). Protected or unexpandable control sequences via |\protected@edef| or |\noexpand| may generate, respectively, empty index entries or unbalanced groups/erroneous entries in the auxiliary files. Thanks to \Name[Patrick]{Cousot} for pointing this out.
-%
-%This cannot be changed because \textsf{nameauth} uses |\protected@edef| when it parses the name parameters. This is needed to work with \textsf{makeindex}, \textsf{texindy}, \textsf{microtype}, and other packages and \LaTeX\ engines.
+% The first example below shows that Unicode characters and control sequences are not interchangeable. Notice again that only the first Unicode character need be a control sequence or put in braces:
+% \begin{quote}
+% \IndexInactive%
+% |\Name[Johann]{Andre\"a}|\hfill \Name[Johann]{Andre\"a}\\
+% |\Name[Johann]{Andre\"a}|\hfill \Name[Johann]{Andre\"a}\\
+% \IndexActive%
+% |\Name[Johann]{Andreä}|\hfill \Name[Johann]{Andreä}\\
+% |\Name[Johann]{Andreä}|\hfill \Name[Johann]{Andreä}\\[2ex]
+% \IndexInactive%
+% |\Name{\AE thelred, II}|\hfill \Name{\AE thelred, II}\\
+% |\Name{\AE thelred, II}|\hfill \Name{\AE thelred, II}\\
+% \IndexActive%
+% |\Name{{Æ}thelred, II}|\hfill \Name{{Æ}thelred, II}\\
+% |\Name{{Æ}thelred, II}|\hfill \Name{{Æ}thelred, II}
+% \end{quote}
%
-% Additional accents and glyphs can be used with Unicode input, NFSS, \textsf{inputenc}, and \textsf{fontenc} when using fonts with TS1 glyphs, \emph{e.g.}, |\usepackage{lmodern}| (per the table on pages 455--63 in \emph{The Latex Companion}):
-% \begin{quote}
+% Additional accents and glyphs can be used with Unicode input, NFSS, \textsf{inputenc}, and \textsf{fontenc} when using fonts with TS1 glyphs, \emph{e.g.}, |\usepackage{lmodern}| (per the table on pages 455--63 in \emph{The Latex Companion}):
+% \begin{quote}
% |\usepackage{newunicodechar}|\\
% |\DeclareTextSymbolDefault{\textlongs}{TS1}|\\
% |\DeclareTextSymbol{\textlongs}{TS1}{115}|\\
% |\newunicodechar{ſ}{\textlongs}|
% \end{quote}
-% That lets you type ``In Congreſs, July 4, 1776.'' Similarly, the following allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz\=ali}\IndexActive: |\newunicodechar{ā}{\=a}|
+% That lets you type ``In Congreſs, July 4, 1776.'' |\newunicodechar{ā}{\=a}| allows |\Name{Ghazāli}| to generate \IndexInactive\Name{Ghaz\=ali}\IndexActive.
%
-% To get proper sorting with accents and |makeindex -g|, consider creating your own |.ist| file (pages 659--65 in \emph{The Latex Companion}) or the following form:\break |\IndexInactive\Name{|\meta{actual}|}\index{|\meta{sortkey}|@|\meta{actual}|}\IndexActive.|
+% Control sequences like |\=a| fail when using \texttt{makeindex} and \texttt{gind.ist}, such as with the \textsf{ltxdoc} class, because the equal sign is an ``actual'' character instead of |@|. Using |\index{Gh{\=a}zali}| halts execution. Using |\index{Gh\=azali}| gives an ``azali'' entry sorted under ``Gh'' (thanks \Name[Dan]{Luecking}). This issue is not specific to \textsf{nameauth} and affects any document where one uses \texttt{gind.ist}.
%
-% Control sequences like |\=a| fail when using \textsf{makeindex} and \texttt{gind.ist} because the equal sign is an ``actual'' character instead of |@|. |\index{Gh{\=a}zali}| halts execution. |\index{Gh\=azali}| gives an ``azali'' entry sorted under ``Gh'' (thanks \Name[Dan]{Luecking}). This issue is not specific to \textsf{nameauth}.
+%One may use expandable control sequences in names (thanks \Name*[Robert]{Schlicht}). Also, you can define letters with \cmd{\edef} and \cmd{\noexpand} to use in names, as some do to ``protect'' accented letters in names. As of version 2.0 of \textsf{nameauth} helpful concerns expressed by \Name[Patrick]{Cousot} have been addressed.
%
-% This package tries to work with multiple languages and typesetting engines. The following preamble snippet illustrates how that can be done:\\
+% \subsubsection{Index Sorting}
+% \label{sec:IndexSort}
%
-% \begin{tabular}{ll}
+% The general practice for sorting with \texttt{makeindex -g} involves creating your own |.ist| file (pages 659--65 in \emph{The Latex Companion}). Otherwise use the following form that works with both \texttt{makeindex} and \texttt{texindy}:
+% \begin{quote}
+% |\index{|\meta{sortkey}|@|\meta{actual}|}|
+% \end{quote}
+%Before version 2.0 of \textsf{nameauth}, one had to sort and index a name like \Name[Jan]{{Ł}ukasiewicz} by putting it between \cmd{\IndexInactive} and \cmd{\IndexActive} while creating a manual index entry.\\
+%
+% \DescribeMacro{\PretagName}
+% Fortunately, the current versions of \textsf{nameauth} have adopted an easier solution. The syntax of \cmd{\PretagName} is like that of \cmd{\TagName}:
+% \begin{quote}
+% \cmd{\PretagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
+% \end{quote}
+% The \cmd{\PretagName} macro does not work exactly like the \cmd{\TagName} and \cmd{\UntagName} macros (see Section~\ref{sec:TagName} and following). The main differences are:
+% \begin{itemize}\setlength{\itemsep}{0pt}
+% \item You can ``pretag'' any name and any cross-reference.
+% \item You can ``tag'' and ``untag'' only names, not cross-references.
+% \item There is no command to undo a ``pretag.''
+% \end{itemize}
+% The \cmd{\PretagName} macro creates a sort key terminated with the ``actual'' character, which is |@| by default. Do not include the ``actual'' character in the pretag.
+% Now, sorting index entries is as simple as:
+% \begin{quote}
+% |\PretagName[Jan]{{Ł}ukasiewicz}{Lukasiewicz, Jan}|\\
+% |\PretagName{{Æ}thelred, II}{Aethelred 2}|
+% \end{quote}
+%
+% One need only pretag names once in the preamble. Every time that \Name[Jan]{{Ł}ukasiewicz} or \Name{{Æ}thelred, II} are referenced, the proper index entry will be created. If you create a cross-reference with \cmd{\AKA} and you want to pretag it, see Section~\ref{sec:AKA}.\\
+%
+% \DescribeMacro{\IndexActual}
+% If you need to change the ``actual'' character, such as with \texttt{gind.ist}, put |\IndexActual{=}| in the preamble.\\
+%
+% \bgroup\setlength{\fboxsep}{5pt}\noindent\fbox{\parbox{0.97\textwidth}{\strut\hfil You cannot use index tags if the \textsf{nameauth} indexing feature is inactive.\hfil}}\egroup\clearpage
+%
+% This package tries to work with multiple languages and typesetting engines. The following preamble snippet illustrates how that can be done:
+% \begin{quote}\small
% |\usepackage{ifxetex}|\\
% |\usepackage{ifluatex}|\\
-% |\ifxetex| & |% uses fontspec|\\
+% |\ifxetex|\hfill |% uses fontspec|\\
% \hbox{\quad}|\usepackage{fontspec}|\\
% \hbox{\quad}|\defaultfontfeatures{Mapping=tex-text}|\\
% \hbox{\quad}|\usepackage{xunicode}|\\
% \hbox{\quad}|\usepackage{xltxtra}|\\
% |\else|\\
-% \hbox{\quad}|\ifluatex| & |% also uses fontspec|\\
+% \hbox{\quad}|\ifluatex|\hfill |% also uses fontspec|\\
% \hbox{\quad}\hbox{\quad}|\usepackage{fontspec}|\\
% \hbox{\quad}\hbox{\quad}|\defaultfontfeatures{Ligatures=TeX}|\\
-% \hbox{\quad}|\else| & |% traditional NFSS|\\
+% \hbox{\quad}|\else|\hfill |% traditional NFSS|\\
% \hbox{\qquad}|\usepackage[utf8]{inputenc}|\\
% \hbox{\qquad}|\usepackage[TS1,T1]{fontenc}|\\
% \hbox{\quad}|\fi|\\
% |\fi|
-% \end{tabular}
+% \end{quote}
%
-% \medskip The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:\\
+% The following can be used in the text itself to allow for conditional processing that helps one to document work under multiple engines:
%
-% \begin{tabular}{l}
-% |\ifxetex |\meta{xelatex text}|%|\\
-% |\else%|\\
-% \hbox{\quad}|\ifluatex%|\\
+% \begin{quote}\small
+% |\ifxetex| \meta{xelatex text}|%|\\
+% |\else|\\
+% \hbox{\quad}|\ifluatex|\\
% \hbox{\qquad}|\ifpdf |\meta{lualatex in pdf mode text}|%|\\
% \hbox{\qquad}|\else |\meta{lualatex in dvi mode text}|%|\\
-% \hbox{\qquad}|\fi%|\\
-% \hbox{\quad}|\else%|\\
+% \hbox{\qquad}|\fi|\\
+% \hbox{\quad}|\else|\\
% \hbox{\qquad}|\ifpdf |\meta{pdflatex text}|%|\\
% \hbox{\qquad}|\else |\meta{latex text}|%|\\
-% \hbox{\qquad}|\fi%|\\
-% \hbox{\quad}|\fi%|\\
+% \hbox{\qquad}|\fi|\\
+% \hbox{\quad}|\fi|\\
% |\fi|
-% \end{tabular}
+% \end{quote}
%
% \subsubsection{Custom Formatting}
% \label{sec:formatting}
%
% \DescribeMacro{\NamesFormat}
-% The first instance of a name is formatted with \cmd{\NamesFormat} when formatting is active. Additionally, the \texttt{alwaysformat} option will cause every name to be formatted when formatting is active. Beyond using the package options, one can redefine \cmd{\NamesFormat} to create some custom effects. For example, if you wanted to suppress formatting in footnotes, you could do something like:
+% When formatting is active, \cmd{\NamesFormat} is called at the first instance of a name, and at every instance of a name when the \texttt{alwaysformat} option is used. Beyond using the package options, one also can redefine \cmd{\NamesFormat} to create custom effects. For example, one might change or suppress formatting in all footnotes:
%
-% \begin{quote}
+% \begin{quote}\small
% |\makeatletter|\\
% |\let\@oldfntext\@makefntext|\\
% |\long\def\@makefntext#1{\def\NamesFormat{}\@oldfntext{#1}}|\\
% |\makeatother|
% \end{quote}
%
-% \noindent This approach synchronizes the ``first use'' feature in the text and the footnotes, but only suppresses the formatting. It takes advantage of the deep nesting of \cmd{\@makefntext} and a localized \cmd{\def} to make a temporary change.\smallskip
+% \noindent This approach will not print the first use of a name in the body text if it already occured in the footnotes unless one uses \cmd{\ForgetName} to force that. This example takes advantage of the deep scoping of \cmd{\@makefntext} in order to use a localized \cmd{\def} to make a temporary change. The next section shows how one can use a completely independent system of first and subsequent use in the footnotes.\clearpage
%
% A second example puts the mention of first names in boldface, with additional notations in the margin if possible:
-%\begin{quote}
+%\begin{quote}\small
% |\let\oldformat\NamesFormat|\\
% |\renewcommand{\NamesFormat}[1]%|\\
-% \hbox to 1cm{\hfil}|{\textbf{#1}\ifinner\else%|\break
-% \hbox to 1cm{\hfil}|\marginpar{\raggedleft\scriptsize #1}\fi}|%
+% | {\textbf{#1}\ifinner\else|\\
+% | \marginpar{\raggedleft\scriptsize #1}\fi}|\\
+% |\PretagName{Vlad, Ţepeş}{Vlad Tepes}%|
%
% \let\oldformat\NamesFormat%
% \renewcommand{\NamesFormat}[1]{\textbf{#1}\ifinner\else\marginpar{\raggedleft\scriptsize #1}\fi}%
-% \bgroup\small\ttfamily%
-% |\Name{Vlad III, Dracula}| was known as |\AKA{Vlad III, Dracula}%|\break|{Vlad}[Ţepeş]|, |``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler],''|\break after his death. He was the son of |\Name{Vlad II, Dracul}|, a\break member of the Order of the Dragon. Later references to\break |\Name{Vlad III, Dracula}| appear thus.\egroup
+% {\footnotesize |\Name{Vlad| |III,| |Dracula},| |known| |as| |\AKA{Vlad| |III,| |Dracula}{Vlad, Ţepeş},| |``\AKA*{Vlad| |III,| |Dracula}{Vlad}[the| |Impaler]''| |after| |his| |death,| |was| |the| |son| |of| |\Name{Vlad| |II,| |Dracul},| |a| |member| |of| |the| |Order| |of| |the| |Dragon.| |Later| |references| |to| |``\Name{Vlad| |III,| |Dracula}''| |appear| |thus.|}\smallskip
%
-% \Name{Vlad III, Dracula} was known as \AKA{Vlad III, Dracula}{Vlad}[Ţepeş], ``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler],'' after his death. He was the son of \Name{Vlad II, Dracul}, a member of the Order of the Dragon. Later references to \Name{Vlad III, Dracula} appear thus.
+% \Name{Vlad III, Dracula}, known as \AKA{Vlad III, Dracula}{Vlad, Ţepeş}, ``\AKA*{Vlad III, Dracula}{Vlad}[the Impaler]'' after his death, was the son of \Name{Vlad II, Dracul}, a member of the Order of the Dragon. Later references to ``\Name{Vlad III, Dracula}'' appear thus.
% \end{quote}
%
-% The |quote| environment permits local changes to \cmd{\NamesFormat} so they revert back to give: \ForgetName{Vlad III, Dracula}\Name{Vlad III, Dracula} and \Name{Vlad III, Dracula}. For references to ``Vlad'' one could use |\Name{Vlad, III Dracula}| instead. Do not mix |\Name{Vlad III, Dracula}| with |\Name{Vlad, III Dracula}| or the old syntax, lest errors bite! You would get multiple index entries with \cmd{\Name}, unwanted cross-references with \cmd{\AKA} and unexpected forms in the text. The simplified interface helps one to avoid this.
+% The |quote| environment used above permits local changes to \cmd{\NamesFormat} so they revert back to the default: \ForgetName{Vlad III, Dracula}\Name{Vlad III, Dracula} and \Name{Vlad III, Dracula}. For references to ``Vlad'' instead of ``\Name{Vlad III, Dracula}'' one could use |\Name{Vlad, III Dracula}|.\footnote{Do not mix \cmd{\Name}\texttt{\{Vlad III, Dracula\}} with \cmd{\Name}\texttt{\{Vlad, III Dracula\}} or the old syntax, lest errors bite! You would get multiple index entries with \cmd{\Name}, unwanted cross-references with \cmd{\AKA} and unexpected forms in the text. The simplified interface helps one to avoid this.}
%
% \subsubsection{Disable Formatting}
% \label{sec:SectionFormat}
%
% \DescribeMacro{\NamesActive}
% \DescribeMacro{\NamesInactive}
-% Using the \texttt{frontmatter} option deactivates formatting until \cmd{\NamesActive} occurs. Another macro, \cmd{\NamesInactive}, will deactivate formatting again. These two macros toggle two independent systems of formatting and first use. Here we switch to the ``front matter'' mode with \cmd{\NamesInactive}:
+% Using the \texttt{frontmatter} option deactivates formatting until \cmd{\NamesActive} occurs. Another macro, \cmd{\NamesInactive}, will deactivate formatting again. These two macros toggle two independent systems of formatting and first use.
+%
+% Here we switch to the ``front matter'' mode with \cmd{\NamesInactive}:
% \NamesInactive
-% \begin{quote}
+% \begin{quote}\small
% \begin{tabular}{ll}
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
-%|\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
+% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
% \end{tabular}
% \end{quote}
+%
% Then we switch back to ``main matter'' mode with \cmd{\NamesActive}:
% \NamesActive
-% \begin{quote}
+% \begin{quote}\small
% \begin{tabular}{ll}
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Rudolph]{Carnap}| & \Name[Rudolph]{Carnap}\\
% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
-%|\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
+% |\Name[Nicolas]{Malebranche}| & \Name[Nicolas]{Malebranche}\\
% \end{tabular}
% \end{quote}
%
-% Notice that we have two independent cases of ``first use'' above. Consider the two ``species'' of names to be ``formatted'' and ``non-formatted,'' intended for independent sections of the document like front matter and main matter.
+% Notice that we have two independent cases of ``first use'' above. Consider the two ``species'' of names to be ``non-formatted'' and ``formatted,'' intended for front matter and main matter. Yet one could use this, \emph{e.g.}, in footnotes:
+% \begin{quote}\small
+% |\makeatletter|\\
+% |\let\@oldfntext\@makefntext|\\
+% |\long\def\@makefntext#1{%|\\
+% | \NamesInactive\@oldfntext{#1}\NamesActive%|\\
+% |}\makeatother|
+% \end{quote}
%
-% \subsubsection{Tweaks: \texttt{\textbackslash ForgetName} and \texttt{\textbackslash SubvertName}}
+% \subsection{Tweaks: \texttt{\textbackslash ForgetName} and \texttt{\textbackslash SubvertName}}
% \label{sec:Tweaks}
%
-% Perhaps the easiest way to avoid the ``interspecies clashes'' above are the two macros presented here. They are meant for tweaking text at or near final draft stage. They affect both front matter and main matter.
+% Perhaps the easiest way to avoid the ``interspecies clashes'' above are the two macros presented here. They are meant for tweaking text at or near final draft stage. They affect both front matter and main matter.\\
%
% \DescribeMacro{\ForgetName}
% This macro is a ``dirty trick'' of sorts that takes the same optional and mandatory parameters used by \cmd{\Name}. It handles its arguments in the same way, except that it ignores the final parameter if \meta{FNN} are present. The syntax is:
@@ -1004,7 +1445,7 @@
% \cmd{\ForgetName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
-% \noindent This macro causes \cmd{\Name} and friends to ``forget'' prior uses of a name. The next use of that name will print as if it were a ``first use.'' Index entries and cross-references are \emph{never} forgotten by this package.
+% \noindent This macro causes \cmd{\Name} and friends to ``forget'' prior uses of a name. The next use of that name will print as if it were a ``first use,'' even if it is not. Index entries and cross-references are \emph{never} forgotten by this package.\\
%
% \DescribeMacro{\SubvertName}
% This macro is the opposite of the one above. It takes the same parameters. It handles its arguments in the same manner. The syntax is:
@@ -1012,7 +1453,7 @@
% \cmd{\SubvertName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
-% \noindent This macro causes \cmd{\Name} and friends to think that a prior use of a name already has occurred. The next use of that name will print as if it were a ``subsequent use.''
+% \noindent This macro causes \cmd{\Name} and friends to think that a prior use of a name already has occurred. The next use of that name will print as if it were a ``subsequent use,'' even if it is not.
%
% \subsection{Name Variant Macros}
% \subsubsection{\texttt{\textbackslash AKA}}
@@ -1022,105 +1463,112 @@
% \DescribeMacro{\AKA*}
% \cmd{\AKA} (meaning \textit{also known as}) handles pseudonyms, stage names, \emph{noms de plume}, and so on in order to replace typing manual cross-references in the index:
%
-% \begin{quote}
-% \bgroup\ttfamily\small
-% |\Name{Jean, sans Peur}| (|\AKA{Jean, sans Peur}{Jean the Fearless}|) reigned as Duke of Burgundy from 1404 to 1419.
-% \egroup
+% \begin{quote}\small
+% |\Name{Jean, sans Peur}| |(\AKA{Jean,| |sans| |Peur}{Jean| |the| |Fearless})|\\ {\ttfamily was Duke of Burgundy 1404|--|1419.}
%
-% \TagName{Jean, sans Peur}{, duke}%
-% \Name{Jean, sans Peur} (\AKA{Jean, sans Peur}{Jean the Fearless}) reigned as Duke of Burgundy from 1404 to 1419.%
+% \Name{Jean, sans Peur} (\AKA{Jean, sans Peur}{Jean the Fearless}) was Duke of Burgundy 1404--1419.%
% \end{quote}
%
-% Notice that ``John the Fearless'' receives no special formatting. This is intentional, as it reflects the idea of formatting only main index entries, not cross-references. Nevertheless, the reversing and capitalizing mechanisms do work with \cmd{\AKA}. The syntax for \cmd{\AKA} is:
+% Notice that ``Jean the Fearless'' receives no special formatting. This is intentional, as it reflects the idea of formatting only those names with main index entries. Nevertheless, the reversing and capitalizing mechanisms do work with \cmd{\AKA}. The syntax for \cmd{\AKA} is:
%
% \begin{quote}
% \cmd{\AKA}\oarg{FNN}\marg{SNN}\oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names}\\
% \cmd{\AKA*}\oarg{FNN}\marg{SNN}\oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names}
% \end{quote}
%
-% \noindent Only the \meta{FNN} and \meta{SNN} arguments from \cmd{\Name} and friends may be cross-referenced. The new syntax allows \cmd{\AKA} to cross-reference all name types. Both macros create a cross-reference in the index from the \meta{Alt. FNN}, \meta{Alt. SNN}, and \meta{Alt. names} fields to a name defined by \meta{FNN} and \meta{SNN}, regardless of whether that name has been used. Both prevent double periods at the end of a sentence.
+% \noindent Only the \meta{FNN} and \meta{SNN} arguments from \cmd{\Name} and friends may be cross-referenced. The new syntax allows \cmd{\AKA} to cross-reference all name types. Both macros create a cross-reference in the index from the \meta{Alt. FNN}, \meta{Alt. SNN}, and \meta{Alt. names} fields to a name defined by \meta{FNN} and \meta{SNN}, regardless of whether that name has been used.
%
-% Both macros print only the \meta{Alt. FNN} and \meta{Alt. SNN} fields in the body text. If the \meta{Alt. names} field is present, \cmd{\AKA} swaps \meta{Alt. names} with \meta{Alt. FNN} in the body text. \cmd{\AKA*} just prints \meta{Alt. names} (if present) in the body text. Section~\ref{sec:TagName} further illustrates \cmd{\AKA}, \cmd{\AKA*}, and index tagging.
+% Both macros print only the \meta{Alt. FNN} and \meta{Alt. SNN} fields in the body text. If the \meta{Alt. names} field is present, \cmd{\AKA} swaps \meta{Alt. names} with \meta{Alt. FNN} in the body text. \cmd{\AKA*} just prints \meta{Alt. names} (if present) in the body text. See also Section~\ref{sec:TagName}.\clearpage
%
% For the following name types, \cmd{\AKA} and \cmd{\AKA*} yield the same results, using \Name[Bob]{Hope}, \ForgetName{Louis, XIV}\Name{Louis, XIV}, and \Name{Lao-tzu} as examples:
-% \begin{quote}\footnotesize
+%
+% \begin{quote}\small
% \begin{tabular}{ll}\hline
% {\large\strut}|\AKA[Bob]{Hope}[Leslie Townes]{Hope}| & \AKA[Bob]{Hope}[Leslie Townes]{Hope}\\
% {\large\strut}|\AKA{Louis, XIV}{Sun King}| & \AKA{Louis, XIV}{Sun King}\\
-% {\large\strut}|\AKA{Louis}[XIV]{Sun King}| & FAIL\\
% {\large\strut}|\AKA{Lao-tzu}{Li, Er}| & \AKA{Lao-tzu}{Li, Er}\\\hline
% \end{tabular}
% \end{quote}
-% \cmd{\AKA} fails with the old syntax. One can use the \meta{Alt. names} field with the names above, but that field does not generate a cross-reference. The \meta{Alt. names} field (whis is a part of the cross-reference) was envisaged for names like \Name{Gregory, I}:
-% \begin{quote}\footnotesize
+%
+% \cmd{\AKA} ignores the \meta{Alt. names} field with the names above. The \meta{Alt. names} field as part of the cross-reference was envisaged for names like \Name{Gregory, I}:
+% \begin{quote}\small
% \begin{tabular}{ll}\hline
% {\large\strut}|\AKA{Gregory, I}{Gregory}[the Great]| & \AKA{Gregory, I}{Gregory}[the Great]\\
-% {\large\strut}|\AKA*{Gregory, I}{Gregory}[the Great]| & \AKA*{Gregory, I}{Gregory}[the Great]\\
-% {\large\strut}|\AKA{Gregory}[I]{Gregory}[the Great]| & FAIL\\
-% {\large\strut}|\AKA*{Gregory}[I]{Gregory}[the Great]| & FAIL\\\hline
+% {\large\strut}|\AKA*{Gregory, I}{Gregory}[the Great]| & \AKA*{Gregory, I}{Gregory}[the Great]\\\hline
% \end{tabular}
% \end{quote}
-% |\Name*{Gregory,| |I}| |``\AKA*{Gregory,| |I}{Gregory}[the| |Great]''| produces \Name*{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' in the text and a \emph{see} reference from Gregory the Great to Gregory I in the index. This may look like the old syntax, but it is not. The comma-delimited affix form in \meta{Alt. SNN} is designed for Eastern names, while \meta{Alt. names} is not. One can refer to \Name[Lafcadio]{Hearn} with |\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|: \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}.
+% Using |\Name*{Gregory,| |I}| |``\AKA*{Gregory,| |I}{Gregory}[the| |Great]''| prints \Name*{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' in the text. The index has a \emph{see} reference from ``Gregory the Great'' to ``Gregory I.''
%
-% Using \cmd{\RevComma} before |\AKA[Bob]{Hope}[Leslie Townes]{Hope}| produces \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}, while \cmd{\RevName} omits the comma. \CapThis\AKA[Charles]{du Fresne}{du Cange} refers to \Name[Charles]{du Fresne}: |\CapThis\AKA[Charles]{du Fresne}{du Cange}|. See also Section~\ref{sec:Particles} on how to deal with different standards for particles.
+% A few points for \cmd{\AKA} and \cmd{\AKA*} follow:
+% \begin{itemize}
+% \item With \cmd{\AKA}, \oarg{FNN}\marg{SNN} is the main name. The cross-reference is \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names}. Please do not think that \meta{Alt. FNN} belongs to the main name or \cmd{\AKA} will fail.
+% \item \cmd{\AKA} fails with the old syntax: |\AKA{Louis}[XIV]{Sun King}|. \cmd{\AKA} and \cmd{\AKA*} fail with the old form: |\AKA{Gregory}[I]{Gregory}[the Great]|.
+% \item The \meta{Alt. SNN} field uses comma-delimited suffixes.
+% \item The \meta{Alt. names} field does not use comma-delimited suffixes.
+% \item Eastern names work: One can refer to \Name[Lafcadio]{Hearn} as \CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}: |\CapName\AKA[Lafcadio]{Hearn}{Koizumi, Yakumo}|.
+% \item Particles work: \CapThis\AKA[Charles]{du Fresne}{du Cange} is the alternate name for \Name[Charles]{du Fresne}, which is capitalized via \cmd{\CapThis}\cmd{\AKA}. See also Section~\ref{sec:Particles}.
+% \item Reversing works, \emph{e.g.} \cmd{\RevComma}: \RevComma\AKA[Bob]{Hope}[Leslie Townes]{Hope}.
+% \item The name fields of \cmd{\PretagName} correspond with the \oarg{Alt. FNN}\marg{Alt. SNN}\oarg{Alt. names} fields of \cmd{\AKA}: |\AKA{Vlad| |III,| |Dracula}{Vlad,| |Ţepeş}| corresponds with |\PretagName{Vlad,| |Ţepeş}{Vlad| |Tepes}|. It fails with |\PretagName{Vlad}[Ţepeş]{Vlad| |Tepes}|.
+% \end{itemize}
%
-% Here we show \cmd{\AKA} used as a name in the running text:
+% \cmd{\AKA} will not create multiple cross-references. Handle the special case where one moniker applies to multiple people with a manual solution, \emph{e.g.}, ``Snellius'' for both \Name*[Willebrord]{Snel van Royen} and his son \Name*[Rudolph]{Snel van Royen}:
%
-% \begin{quote}
-% \bgroup\ttfamily
-% Today we consider |\AKA[George]{Eliot}[Mary Anne]{Evans}| and her literary contributions as |\Name[George]{Eliot}|.
-% \egroup
+%\begin{quote}\footnotesize
+% |\index{Snellius|\verb!|!{}|see{Snel|\,|van|\,|Royen,|\,|Rudolph;| |Snel|\,|van|\,|Royen,|\,|Willebrord}}|
+% \index{Snellius|see{Snel van Royen, Rudolph;%
+% Snel van Royen, Willebrord}}
+%\end{quote}
%
-% Today we consider \AKA[George]{Eliot}[Mary Anne]{Evans} and her literary contributions as \Name[George]{Eliot}.
-% \end{quote}
-%
-% Cross-references generated by \cmd{\AKA} and \cmd{\AKA*} are meant only to be \emph{see} references, never page entries. See also Section~\ref{sec:error}. In certain cases, the alternate name might need to be indexed with page numbers and \emph{see also} references. Do not use \cmd{\AKA} in those cases, rather, consider the following:
+% Cross-references generated by \cmd{\AKA} and \cmd{\AKA*} are meant only to be \emph{see} references, never page entries. See also Section~\ref{sec:error}. In certain cases, the alternate name might need to be indexed with page numbers and \emph{see also} references. Do not use \cmd{\AKA} in those cases, rather, consider the following:\clearpage
%
% \label{manualxref}\label{Rambam}%
-% Refer, \emph{e.g.}, to |\Name{Maimonides}| |(\AKA{Maimonides}{Moses| |ben-Maimon})|: \Name{Maimonides} (\AKA{Maimonides}{Moses ben-Maimon}). That is a name and a \emph{see} reference. Now one must refer to |\Name{Rambam}|: \Name{Rambam} before making a cross-reference to \Name{Maimonides}. Add \verb!\index{Rambam|seealso{Maimonides}}! at the end of the document to ensure that it is the last entry.\footnote{Different standards exist for punctuating index entries and cross-references. Check with your publisher, style guide, docs for \textsf{xindy} and \textsf{makeindex}, and \textsf{http://tex.stackexchange.com}.}
-%
-% \cmd{\AKA} purposefully will not create multiple instances of a cross-reference. To deal with the special case where one moniker applies to multiple people, \emph{e.g.}, ``Snellius'' for both \Name*[Willebrord]{Snel van Royen} and his son \Name*[Rudolph]{Snel van Royen}, use a manual solution:\\[2ex]
-%|\index{Snellius|\verb!|!{}|see{Snel|\,|van|\,|Royen,|\,|Rudolph;| |Snel|\,|van|\,|Royen,|\,|Willebrord}}|
-%\index{Snellius|see{Snel van Royen, Rudolph; Snel van Royen, Willebrord}}
+%\begin{itemize}
+% \item Refer to the person intended, \emph{e.g.}, \Name{Maimonides} (\AKA{Maimonides}{Moses ben-Maimon}):\\ |\Name{Maimonides}| |(\AKA{Maimonides}{Moses| |ben-Maimon})|
+% \item We now have a name and a \emph{see} reference. Now one must refer to the alternate name, \emph{e.g.}, \Name{Rambam}: |\Name{Rambam}|.
+% \item The alternate name must occur before making a cross-reference to the main name, in this case, \Name{Maimonides}.
+% \item Add \verb!\index{Rambam|seealso{Maimonides}}! at the end of the document to ensure that it is the last entry among the cross-references. Generally, \emph{see also} references follow \emph{see} references in an index entry.\footnote{Different standards exist for punctuating index entries and cross-references. Check with your publisher, style guide, docs for \textsf{xindy} and \textsf{makeindex}, and \textsf{http://tex.stackexchange.com}.}
+%\end{itemize}
%
-% The old syntax (|\Name{Jean}[sans Peur]|) does not work with \cmd{\AKA}. Even with the new syntax, using \textsf{makeindex} may require some manual entries:
+% Even with the new syntax, using \textsf{makeindex} may require some manual entries:
%
-% \begin{quote}
-% \bgroup\ttfamily\small
-% \verb+\index{Doctor Angelicus@\textit{Doctor Angelicus}|see{Thomas Aquinas}}+
-% \verb+\index{Thomas of Aquino|see{Thomas Aquinas}}+\\
-% Perhaps the greatest medieval theologian was |\Name{Thomas}[Aquinas]| (Thomas of Aquino), also known as |\textit{Doctor Angelicus}|. His name ``Aquinas'' is not a surname.
-% \egroup
-%
-% \index{Doctor Angelicus=\textit{Doctor Angelicus}|see{Thomas Aquinas}}
-% \index{Thomas of Aquino|see{Thomas Aquinas}}
-% Perhaps the greatest medieval theologian was \Name{Thomas}[Aquinas] (Thomas of Aquino), also known as \textit{Doctor Angelicus}. His name ``Aquinas'' is not a surname.
+% \begin{quote}\small
+% {\ttfamily\footnotesize|\index{Doctor Angelicus@\textit{Doctor Angelicus}%|\\
+% \verb+|see{Thomas Aquinas}}%+\\
+% \verb+\index{Thomas of Aquino|see{Thomas Aquinas}}%+\\
+% Perhaps the greatest medieval theologian was |\Name{Thomas, Aquinas}|\break
+% (Thomas of Aquino), also known as |\textit{Doctor Angelicus}|. ``Aquinas'' is not a surname.}
+%
+% \index{Doctor Angelicus=\textit{Doctor Angelicus}%
+% |see{Thomas Aquinas}}%
+% \index{Thomas of Aquino|see{Thomas Aquinas}}%
+% Perhaps the greatest medieval theologian was%
+% \Name{Thomas, Aquinas} (Thomas of Aquino), also known as%
+% \textit{Doctor Angelicus}. ``Aquinas'' is not a surname.
% \end{quote}
%
% \subsubsection{\texttt{\textbackslash PName}}
%
% \DescribeMacro{\PName}
-% \cmd{\PName} is a ``convenience macro'' meant for English-style Western names that sacrifices flexibility for simplicity. It generates a Western-style main name followed by a cross-reference in parentheses with the following syntax:
-% \begin{quote}
+% \cmd{\PName} is a ``convenience macro'' meant for Western names. It generates a main name followed by a cross-reference in parentheses with the following syntax:
+% \begin{quote}\small
% \cmd{\PName}\oarg{FNN}\marg{SNN}\oarg{other FNN}\marg{other SNN}\oarg{other alt.}
% \end{quote}
%
-% Although \cmd{\PName} creates an easy shortcut, its drawbacks are many. It only can use the \meta{FNN}\meta{SNN} form of \cmd{\AKA}. It cannot use \cmd{\AKA*}. \cmd{\PName} really is ill-suited to work with \cmd{\CapName}, \cmd{\CapThis}, \cmd{\RevComma}, \cmd{\RevName}, and the related package options. Use it if it is useful, and \emph{caveat auctor}.
+% Although \cmd{\PName} creates an easy shortcut, its drawbacks are many. It only can use the \meta{FNN}\meta{SNN} form of \cmd{\AKA}. It cannot use \cmd{\AKA*}. \cmd{\PName} really is ill-suited to work with \cmd{\CapName}, \cmd{\CapThis}, \cmd{\RevComma}, \cmd{\RevName}, and the related package options. Use it as needed, and \emph{caveat auctor}.
%
-% The author determines the name that is indexed (the first name) and the subsequent name that only occurs as a \emph{see} reference. That subsequent name is never shortened in the text. To do that, using the table below, one would type, \emph{e.g.}, |Arouet\IndexName{Voltaire}| or use the \Name{Rambam} example above. \cmd{\PName} can generate the following examples:
+% The author determines the name that is indexed (the first name) and the subsequent name that only occurs as a \emph{see} reference. That subsequent name is never shortened in the text. To do that, using the table below, one would type, \emph{e.g.}, |Arouet\IndexName{Voltaire}| or use the \Name{Rambam} example above. \cmd{\PName} can generate the following examples:\medskip
%
-% \begin{quote}\footnotesize
-% \begin{tabular}{@{}p{0.5\textwidth}@{}p{0.37\textwidth}@{}}\hline
+% {\footnotesize%
+% \begin{tabular}{p{0.55\textwidth}@{}p{0.37\textwidth}}\hline
% {\large\strut}|\PName[Mark]{Twain}[Samuel L.]{Clemens}| & \PName[Mark]{Twain}[Samuel L.]{Clemens}\\
% {\large\strut}|\PName*[Mark]{Twain}[Samuel L.]{Clemens}| & \PName*[Mark]{Twain}[Samuel L.]{Clemens}\\
% {\large\strut}|\PName[Mark]{Twain}[Samuel L.]{Clemens}| & \PName[Mark]{Twain}[Samuel L.]{Clemens}\\\hline
% {\large\strut}|\PName{Voltaire}[François-Marie]{Arouet}| & \PName{Voltaire}[François-Marie]{Arouet}\\
% {\large\strut}|\PName*{Voltaire}[François-Marie]{Arouet}| & \PName*{Voltaire}[François-Marie]{Arouet}\\
% {\large\strut}|\PName{Voltaire}[François-Marie]{Arouet}| & \PName{Voltaire}[François-Marie]{Arouet}\\\hline
-% \end{tabular}
-% \end{quote}
+% \end{tabular}}\\
%
-% If one used |\PName{William, I}[William]{the Conqueror}| the body text would look right but the index cross-reference would be in error. Medieval and Eastern names are not suited for \cmd{\PName}. For them use \cmd{\AKA.}
+% If one used |\PName{William, I}[William]{the Conqueror}| the body text would look right but the index cross-reference would be in error. Medieval and Eastern names are not suited for \cmd{\PName}. For them use \cmd{\AKA.}\clearpage
%
% \subsection{Indexing Macros}
% \subsubsection{\texttt{\textbackslash IndexName}}
@@ -1133,30 +1581,37 @@
%
% \cmd{\IndexName} complies with the new syntax. If \meta{FNN} are absent, it indexes \meta{Alternate names} as an affix using the old syntax; otherwise it ignores \meta{Alternate names}. If indexing is switched off (see Section~\ref{sec:SectionIndex}), this macro does nothing. It will not create index entries for names used with \cmd{\AKA} as cross-references.
%
-% The indexing mechanism in the \textsf{nameauth} package follows \emph{Chicago Manual of Style} standards regarding Western names and affixes. Thus the name \LChes\ becomes ``Sullenberger, Chesley B., III'' in the index. This formatting only occurs for Western names (where \meta{FNN} are present).
+% The indexing mechanism in the \textsf{nameauth} package follows \emph{Chicago Manual of Style} standards regarding Western names and affixes. Thus the name \LChes\ becomes ``Sullenberger, Chesley B., III'' in the index. This formatting only occurs for Western names (where \meta{FNN} are present).
%
% \subsubsection{\texttt{\textbackslash TagName}}
% \label{sec:TagName}
%
% \DescribeMacro{\TagName}
-% This macro creates an index tag that will appear in all entries for a corresponding \cmd{\Name} from the point of invocation until the end of the document or corresponding \cmd{\UntagName}. Both \cmd{\TagName} and \cmd{\UntagName} handle their arguments like \cmd{\IndexName}. Tag names in the preamble if possible. If used in the body to create or switch index tags, put a comment delimiter at the end of the macro.
+% This macro creates an index tag that will be appended to all index entries for a corresponding \cmd{\Name} from when it is invoked until the end of the document or a corresponding \cmd{\UntagName}. Both \cmd{\TagName} and \cmd{\UntagName} handle their arguments like \cmd{\IndexName}. If global tags are desired, tag names in the preamble.
% \begin{quote}
% \cmd{\TagName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}\marg{tag}
% \end{quote}
%
-% Tags created by \cmd{\TagName} can be helpful in the indexes of history texts. Several features of this package are designed for historical research. Suppose you are working with medieval subject matter. The following macros come in handy:\\
-%
-% \begin{tabular}{p{2in}p{2in}}
-% |\TagName{Leo, I}{, pope}| |\TagName{Gregory, I}{, pope}| & Tag these names at the beginning of the document.\\
+% Tags created by \cmd{\TagName} can be helpful in the indexes of history texts. Several features of this package are designed for historical research. Suppose you are working with medieval subject matter. The following macros come in handy:
+% \begin{quote}\small
+% \begin{tabular}{p{0.5\textwidth}p{0.28\textwidth}}
+% |\TagName{Leo, I}{, pope}| |\TagName{Gregory, I}{, pope}| & (in the preamble)\\
% \dots & \\
-% |\Name*{Leo, I}| |\Name*{Gregory, I}| & First references to \ForgetName{Leo, I}\Name*{Leo, I} and \ForgetName{Gregory, I}\Name*{Gregory, I}\\
+% |\Name*{Leo,| |I}| |\Name*{Gregory,| |I}| & (first references to \ForgetName{Leo, I}\Name*{Leo, I} and \ForgetName{Gregory, I}\Name*{Gregory, I})\\
% \dots & \\
% |\Name*{Leo, I} was known as| |\AKA{Leo, I}{Leo}[the Great].| & \Name*{Leo, I} was known as \AKA{Leo, I}{Leo}[the Great].\\
% \dots & \\
-% |\Name{Gregory, I}| |``\AKA*{Gregory, I}%| |{Gregory}[the Great]''| & \Name{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great]'' was another major pope.\\
-% \end{tabular}\\[1ex]
+% |\Name{Gregory,| |I}| |``\AKA*{Gregory,| |I}%| |{Gregory}[the Great],''| |another| |major| |pope.| & \Name{Gregory, I} ``\AKA*{Gregory, I}{Gregory}[the Great],'' another major pope.\\
+% \end{tabular}
+% \end{quote}
+%
+% Here \cmd{\TagName} causes the \textsf{nameauth} indexing macros to append ``\texttt{,\textvisiblespace pope}'' to the index entries for \Name*{Gregory, I} and \Name*{Leo, I}.
+%
+% Tags are literal text that can be daggers, asterisks, and even specials. For example, all fictional names in the index of this manual have an asterisk without any spaces before it. If space is desired between the entry and the tag, one must add the space at the start of the tag. Tagging aids scholarly indexing and can include life/regnal dates and other information.
+%
+% \cmd{\TagName} works with all name types, not just medieval names. Back in Section~\ref{sec:start} we had the example of \AKA[James Earl]{Carter, Jr.}[Jimmy]{Carter} (cross-reference in the index). \cmd{\TagName} adds ``\texttt{,\textvisiblespace president}'' to his index entry\IndexName[James Earl]{Carter, Jr.}.
%
-% \cmd{\TagName} causes the index entries for \Name*{Gregory, I} and \Name*{Leo, I} to have the tag ``,\textvisiblespace pope'' added automatically. One must add a space manually at the front of a tag if one wants it. Otherwise one could add asterisks, daggers, and so on instead of a space and some text, sich as regnal or life dates, etc. The tag is literal text for whatever you need. For example, all fictional names in the index of this manual have an asterisk without any spaces. Tagging aids scholarly indexing.
+% You can use the \marg{tag} field of \cmd{\TagName} to add specials to index entries for names. Every name in this document is tagged with at least \verb!{|hyperpage}! to allow hyperlinks in the index using the \textsf{ltxdoc} class and \textsf{hypdoc} package.
%
% \subsubsection{\texttt{\textbackslash UntagName}}
%
@@ -1168,23 +1623,23 @@
%
% By using \cmd{\TagName} and \cmd{\UntagName}, one can disambiguate different people with the same name. For example:
%
-% \begin{quote}
+% \begin{quote}\small
% \ttfamily This refers to |\Name*[John]{Smith}|.\\
% Now another |\ForgetName[John]{Smith}%|\\
-% |\TagName[John]{Smith}{ (the other one)}\Name[John]{Smith}|.\\
+% |\TagName[John]{Smith}{ (other)}\Name[John]{Smith}|.\\
% Then a third |\ForgetName[John]{Smith}%|\\
-% |\TagName[John]{Smith}{ (the third)}\Name[John]{Smith}|.\\
-% Then the first |\UntagName[John]{Smith}\Name*[John]{Smith}|.\\
+% |\TagName[John]{Smith}{ (third)}\Name[John]{Smith}|.\\
+% Then the first |\UntagName[John]{Smith}\Name*[John]{Smith}|.
%
% \normalfont This refers to \Name*[John]{Smith}.\hfill\emph{index}: Smith, John\\
-% Now another \ForgetName[John]{Smith}\TagName[John]{Smith}{* (the other one)}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (the other one)\\
-% Then a third \ForgetName[John]{Smith}\TagName[John]{Smith}{* (the third)}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (the third)\\
-% Then the first \TagName[John]{Smith}{*}\Name*[John]{Smith}.\hfill\emph{index}: Smith, John
+% Now another \ForgetName[John]{Smith}\TagName[John]{Smith}{* (other)\string|hyperpage}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (second)\\
+% Then a third \ForgetName[John]{Smith}\TagName[John]{Smith}{* (third)\string|hyperpage}\Name[John]{Smith}.\hfill\emph{index}: Smith, John (third)\\
+% Then the first \TagName[John]{Smith}{*\string|hyperpage}\Name*[John]{Smith}.\hfill\emph{index}: Smith, John
% \end{quote}
%
-% The tweaking macros \cmd{\ForgetName} and \cmd{\SubvertName} make it seem like you are dealing with three people who have the same name. The index tags will group together those entries with the same tag.
+% The tweaking macros \cmd{\ForgetName} and \cmd{\SubvertName} make it seem like you are dealing with three people who have the same name. The index tags will group together those entries with the same tag.\footnote{Since this document, unlike the example above, puts an asterisk by all fictional names in the index, it puts an asterisk at the beginning of the tags above and does not \cmd{\UntagName} \Name*[John]{Smith}, but retags him with an asterisk again.}
%
-% Since this document puts an asterisk by all fictional names in the index, it puts an asterisk at the beginning of the tags above and does not \cmd{\UntagName} \Name*[John]{Smith}, but retags him with an asterisk again.
+% Please remember to note the differences between \cmd{\TagName} and \cmd{\UntagName} on the one hand and \cmd{\PretagName} on the other. See Section~\ref{sec:IndexSort}.
%
% \subsubsection{Global Name Exclusion}
%
@@ -1194,193 +1649,273 @@
% \cmd{\ExcludeName}\oarg{FNN}\marg{SNN}\oarg{Alternate names}
% \end{quote}
%
-% For example, |\ExcludeName[Kris]{Kringle}|\ExcludeName[Kris]{Kringle} will permit \Name[Kris]{Kringle} and \Name[Kris]{Kringle} to appear in the body text via |\Name[Kris]{Kringle}|, but no index entry can occur for this name. |\ExcludeName[Santa]{Claus}|\ExcludeName[Santa]{Claus} will prevent |\AKA[Kris]{Kringle}[Santa]{Claus}| \AKA[Kris]{Kringle}[Santa]{Claus} from generating a cross-reference. It is likelier that you would enclose \cmd{\Name}, etc. between \cmd{\IndexInactive} and \cmd{\IndexActive} (below) in order to suppress just one index entry.
+% For example, |\ExcludeName[Kris]{Kringle}|\ExcludeName[Kris]{Kringle} will permit \Name[Kris]{Kringle} and \Name[Kris]{Kringle} to appear in the body text via |\Name[Kris]{Kringle}|, but no index entry can occur for this name.
+% |\ExcludeName[Santa]{Claus}|\ExcludeName[Santa]{Claus} will prevent |\AKA[Kris]{Kringle}[Santa]{Claus}| \AKA[Kris]{Kringle}[Santa]{Claus} from generating a cross-reference in the index. Instead of the global \cmd{\ExcludeName}, it is likelier that you would enclose \cmd{\Name}, etc. between \cmd{\IndexInactive} and \cmd{\IndexActive}.\clearpage
%
-% \subsubsection{Indexing Certain Sections}
+% \subsubsection{Indexing Control}
% \label{sec:SectionIndex}
%
% \DescribeMacro{\IndexActive}
% \DescribeMacro{\IndexInactive}
-% Using the \texttt{noindex} option deactivates indexing until \cmd{\IndexActive} occurs. Another macro, \cmd{\IndexInactive}, will deactivate indexing again. These can be used throughout the document, independently of \cmd{\ExcludeName}.
+% Using the \texttt{noindex} option deactivates the indexing function of this package until \cmd{\IndexActive} occurs. Another macro, \cmd{\IndexInactive}, will deactivate indexing again. These can be used throughout the document, independently of \cmd{\ExcludeName}. They are global in scope, as are the other toggle macros in this package, so one must be explicit in turning indexing on and off.
%
% \subsection{Variant Spellings}
%
-% Handling variant name spellings can be complicated. For example, one might settle on the form \Name[W.E.B.]{Du Bois} in one's name authority. Yet an essay might use an alternate spelling for \Name[W.E.B.]{Du Bois}, namely, \IndexInactive\Name*[W.E.B.]{DuBois}\IndexActive, where the publisher would not grant the right to alter the spelling. In that case, do the following in that document section:
+% This section illustrates why this package is called ``nameauth.'' Here we get to an example where the macros work together to implement a name authority.
+%
+% Handling variant name spellings can be complicated. For example, let us assume that you are editing a collection of essays. You might settle on the form \Name[W.E.B.]{Du Bois} in your name authority. An essay in that collection might use the alternate spelling \IndexInactive\Name*[W.E.B.]{DuBois}\IndexActive. The author or publisher who owns that work might not grant you permission to alter the spelling. In that case, you could add an alternate spelling. Using the simplified interface, it would be:
+% \begin{nameauth}
+% \< DuBois & W.E.B. & Du Bois & >
+% \< AltDuBois & W.E.B. & DuBois & >
+% \end{nameauth}
+% \begin{quote}
+% |\begin{nameauth}|\\
+% | \< DuBois & W.E.B. & Du Bois & >|\\
+% | \< AltDuBois & W.E.B. & DuBois & >|\\
+% |\end{nameauth}|
+% \end{quote}
+%
+% If you wanted to index the alternate spelling with its own entry, the trivial use of \cmd{\AltDuBois} allows that easily. All you need do is make cross-references to each variant in the index so that the reader is aware of them.
+%
+% Nevertheless, \DuBois\ and \IndexInactive\AltDuBois\IndexActive\ differ only by spaces. For several good reasons, such as fault tolerance in typing, the first/subsequent use mechanism ignores spaces and sees them as \emph{the same name}. Use |\ForgetName[W.E.B.]{Du Bois}| to trigger the first use of \cmd{\AltDuBois} in that section.
%
-% \begin{enumerate}\setlength\itemsep{0pt}
-% \item Use |\ForgetName| for the first use when spaces are the only variation between name forms because the mechanism for determining whether or not a name has occurred ignores spaces.
-% \item Wrap \cmd{\Name} and friends between \cmd{\IndexInactive} and \cmd{\IndexActive}.
+% If you wanted to index the variants under only one name entry, it gets more complicated. You could do the following:
+%
+% \begin{enumerate}\setlength{\itemsep}{0pt}
+% \item Use |\ForgetName[W.E.B.]{Du Bois}| at the start of the section.
+% \item Wrap \cmd{\AltDuBois} between \cmd{\IndexInactive} and \cmd{\IndexActive}.
% \item Call \cmd{\IndexName} with the authoritative form right after \cmd{\IndexActive}.
% \item Create a cross-reference in the index.
% \end{enumerate}
-% This can look like:
+% This can be automated at the start of the section with something like:
% \begin{quote}%
-% \gdef\DuBoisAlt{\IndexInactive\Name[W.E.B.]{DuBois}\IndexActive\IndexName[W.E.B.]{Du Bois}}%
-% |\gdef\DuBoisAlt{\IndexInactive\Name[W.E.B.]{DuBois}%|\\|\IndexActive\IndexName[W.E.B.]{Du Bois}}|\\
-% \verb!\index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}!\dots\\[2ex]
-% \dots{}|\ForgetName[W.E.B.]{DuBois}|\dots|\DuBoisAlt|
+% \ForgetName[W.E.B.]{DuBois}%
+% \gdef\OtherDuBois{\IndexInactive\AltDuBois\IndexActive\IndexName[W.E.B.]{Du Bois}}%
+% \index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}%
+% |\ForgetName[W.E.B.]{DuBois}|\\
+% |\gdef\OtherDuBois{\IndexInactive\AltDuBois\IndexActive%|\\| \IndexName[W.E.B.]{Du Bois}}|\\
+% \verb!\index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}!
% \end{quote}
%
-% The alternate section mentions \ForgetName[W.E.B.]{DuBois}\DuBoisAlt\index{DuBois, W.E.B.|see{Du Bois, W.E.B.}}, then just \DuBoisAlt\ thereafter. The index will only hold the standard entry for \Name*[W.E.B.]{Du Bois}: ``Du Bois, W.E.B.'' and a cross-reference from the variant ``DuBois, W.E.B.'' to the standard entry.
+% The alternate section mentions \cmd{\OtherDuBois} starting with a first use: \OtherDuBois. Subsequent uses of \cmd{\OtherDuBois} print \OtherDuBois. Of course, one could get more complex than the example above. The index will only hold the standard entry for \Name*[W.E.B.]{Du Bois}: ``Du Bois, W.E.B.'' and a cross-reference from the variant ``DuBois, W.E.B.'' to the standard entry.
+%
% \clearpage
+%
% \subsection{Naming Pattern Reference}
% \label{sec:PatRef}
%
% \subsubsection{Basic Naming}
-% \noindent{\bfseries Western Names}\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
+% \noindent{\bfseries Western Names}\\[2ex]{\small
+% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\hline{\large\strut}
% \textit{First reference in the text}:\newline\hbox to 1em{\hfil}\ForgetName[John]{Smith}\Name[John]{Smith} &
-% |\Name*[John]{Smith}|\newline |\Name[John]{Smith}|\newline |\FName[John]{Smith}|\\{\large\strut}
-% \textit{Subsequent full name}:\newline\hbox to 1em{\hfil}\Name*[John]{Smith} & |\Name*[John]{Smith}|\newline\\{\large\strut}
+% |\Name*[John]{Smith}|\newline |\Name[John]{Smith}|\newline |\FName[John]{Smith}|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*[John]{Smith} & |\Name*[John]{Smith}|\\{\large\strut}
% \textit{Subsequent surname}: \Name[John]{Smith} & |\Name[John]{Smith}|\\{\large\strut}
% \textit{Subsequent forename}: \FName[John]{Smith} & |\FName[John]{Smith}|\\\hline{\large\strut}
-% \textit{Long first reference}: \ForgetName[J.Q.]{Public}\newline\hbox to 1em{\hfil}\Name[J.Q.]{Public}[Jane Q.] & |\Name*[J.Q.]{Public}[Jane Q.]|\newline |\Name[J.Q.]{Public}[Jane Q.]|\newline |\FName[J.Q.]{Public}[Jane Q.]|\\{\large\strut}
+% \textit{Long first reference}: \ForgetName[J.Q.]{Public}\newline\hbox to 1em{\hfil}\Name[J.Q.]{Public}[Jane Q.] & |\Name*[J.Q.]{Public}[Jane Q.]|\newline |\Name[J.Q.]{Public}[Jane Q.]|\newline |\FName[J.Q.]{Public}[Jane Q.]|\\[1ex]{\large\strut}
% \textit{Subsequent full}: \Name*[J.Q.]{Public} & |\Name*[J.Q.]{Public}|\\{\large\strut}
-% \textit{Alternate forenames}:\newline\hbox to 1em{\hfil}\Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\newline\\{\large\strut}
-% {\large\strut}\textit{Alternate forename}: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\\hline
-% \end{tabular}\\[2ex]
+% \textit{Alternate}: \Name*[J.Q.]{Public}[Jane Qetsiyah] & |\Name*[J.Q.]{Public}[Jane Qetsiyah]|\\{\large\strut}
+% {\large\strut}\textit{Alternate}: \FName[J.Q.]{Public}[Janie] & |\FName[J.Q.]{Public}[Janie]|\\\hline
+% \end{tabular}}
+% \vfil
%
-% \noindent{\bfseries Western Plus Affixes}\\[1ex]
-% Always use a comma to delimit name/affix pairs.\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
-% \textit{First reference}:\newline\hbox to 1em{\hfil}\ForgetName[George S.]{Patton, Jr.}\Name[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\newline |\Name[George S.]{Patton, Jr.}|\newline |\FName[George S.]{Patton, Jr.}|\\{\large\strut}
-% \textit{Subsequent full}:\newline\hbox to 1em{\hfil}\Name*[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\newline\\{\large\strut}
+% \noindent{\bfseries Western Plus Affixes}\\[2ex]
+% Always use a comma to delimit name/affix pairs.\\[2ex]{\small
+% \begin{tabular}{p{0.42\textwidth}@{}p{0.53\textwidth}}\hline{\large\strut}
+% \textit{First reference}:\newline\hbox to 1em{\hfil}\ForgetName[George S.]{Patton, Jr.}\Name[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\newline |\Name[George S.]{Patton, Jr.}|\newline |\FName[George S.]{Patton, Jr.}|\\[1ex]{\large\strut}
+% \textit{Subsequent}: \Name*[George S.]{Patton, Jr.} & |\Name*[George S.]{Patton, Jr.}|\\{\large\strut}
% \textit{Subsequent surname}: \Name[George S.]{Patton, Jr.} & |\Name[George S.]{Patton, Jr.}|\\{\large\strut}
% {\large\strut}\textit{Subsequent forename}: \FName[George S.]{Patton, Jr.}[George] & |\FName[George S.]{Patton, Jr.}[George]|\\\hline
-% \end{tabular}
-% \begin{quote}
-%|\begin{nameauth}% In the preamble!|\\[0.2ex]
-%| \< Smith & John & Smith & >|\\[0.2ex]
-%| \< JQP & J.Q. & Public & >|\\[0.2ex]
-%| \< Patton & George S. & Patton, Jr. & >|\\[0.2ex]
-%|\end{nameauth}|
-%\end{quote}
-%
-% \ForgetName[John]{Smith}\ForgetName[J.Q.]{Public}|\Smith, \LSmith, \Smith, and \SSmith| give \Smith, \LSmith, \Smith, and \SSmith. |\JQP[Jane Q.],| |\LJQP[Jane Q.],| |and| |\JQP[Jane Q.]| make \JQP[Jane Q.], \LJQP[Jane Q.], and \JQP[Jane Q.]. |\LJQP[Jane| |Qetsiyah]\| |and| |\SJQP[Janie]| produce \LJQP[Jane Qetsiyah]\ and \SJQP[Janie].
+% \end{tabular}}
+% \vfil
%
-% \ForgetName[George S.]{Patton, Jr.}|\Patton,| |\LPatton,| |\Patton,| |and| |\SPatton| give \KeepAffix\Patton, \LPatton, \Patton, and \SPatton. For the alternate forename, |\SPatton[George]| yields \SPatton[George].\clearpage
+%\noindent |\begin{nameauth}|\\
+%| \< Smith & John & Smith & >|\\
+%| \< JQP & J.Q. & Public & >|\\
+%| \< Patton & George S. & Patton, Jr. & >|\\
+%|\end{nameauth}|
+% \vfil
+%
+% \ForgetName[John]{Smith}\ForgetName[J.Q.]{Public}\ForgetName[George S.]{Patton, Jr.}%
+% \noindent |\Smith, \LSmith, \Smith, and \SSmith|:\\
+% \indent \Smith, \LSmith, \Smith, and \SSmith\\[1ex]
+% |\JQP[Jane Q.],| |\LJQP[Jane Q.],| |and| |\JQP[Jane Q.]|:\\
+% \indent \JQP[Jane Q.], \LJQP[Jane Q.], and \JQP[Jane Q.]\\[1ex]
+% |\LJQP[Jane| |Qetsiyah]\| |and| |\SJQP[Janie]|:\\
+% \indent \LJQP[Jane Qetsiyah]\ and \SJQP[Janie]\\[1ex]
+% \noindent |\Patton,| |\LPatton,| |\Patton,| |and| |\SPatton|:\\
+% \indent \Patton, \LPatton, \Patton, and \SPatton.\\[1ex]
+% |\SPatton[George]| prints \SPatton[George].
+% \clearpage
%
-% \noindent{\bfseries New Syntax: Royal, Eastern, and Ancient}\\[1ex]
-% Using |\Name{Demetrius, I Soter}| keeps the number with the affix. To keep the number with the name, use |\Name{Demetrius I, Soter}|. See also Section~\ref{sec:Affix}.\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
-% {\large\strut}\textit{First reference}: \ForgetName{Francis, I}\Name{Francis, I} & |\Name*{Francis, I}|\newline |\Name{Francis, I}|\newline |\FName{Francis, I}|\\{\large\strut}
-% \textit{Subsequent full}: \Name*{Francis, I} & |\Name*{Francis, I}|\\{\large\strut}
-% \textit{Subsequent name}: \Name{Francis, I} & |\Name{Francis, I}|\newline |\FName{Francis, I}|\\{\large\strut}
-% \textit{First reference}: \newline\hbox to 1em{\hfil}\ForgetName{Demetrius, I Soter}\Name{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\newline |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\{\large\strut}
-% \textit{Subsequent full name}: \newline\hbox to 1em{\hfil}\Name*{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\newline\\{\large\strut}
+% \noindent{\bfseries New Syntax: Royal, Eastern, and Ancient}\\[2ex]
+% Using |\Name{Demetrius, I Soter}| keeps the number with the affix. To keep the number with the name, use |\Name{Demetrius I, Soter}|. See also Section~\ref{sec:Affix}.\\[2ex]{\small
+% \begin{tabular}{p{0.53\textwidth}@{}p{0.42\textwidth}}\hline{\large\strut}
+% {\large\strut}\textit{First reference}: \ForgetName{Francis, I}\Name{Francis, I} & |\Name*{Francis, I}|\newline |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*{Francis, I} & |\Name*{Francis, I}|\\[1ex]{\large\strut}
+% \textit{Subsequent name}: \Name{Francis, I} & |\Name{Francis, I}|\newline |\FName{Francis, I}|\\[1ex]{\large\strut}
+% \textit{First reference}: \newline\hbox to 1em{\hfil}\ForgetName{Demetrius, I Soter}\Name{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\newline |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*{Demetrius, I Soter} & |\Name*{Demetrius, I Soter}|\\[1ex]{\large\strut}
% {\large\strut}\textit{Subsequent name}: \Name{Demetrius, I Soter} & |\Name{Demetrius, I Soter}|\newline |\FName{Demetrius, I Soter}|\\\hline{\large\strut}
-% {\large\strut}\textit{First reference}: \ForgetName{Sun, Yat-sen}\Name{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\{\large\strut}
-% \textit{Subsequent full name}: \newline\hbox to 1em{\hfil}\Name*{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline\\{\large\strut}
+% {\large\strut}\textit{First reference}: \ForgetName{Sun, Yat-sen}\Name{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\newline |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*{Sun, Yat-sen} & |\Name*{Sun, Yat-sen}|\\[1ex]{\large\strut}
% {\large\strut}\textit{Subsequent name}: \Name{Sun, Yat-sen} & |\Name{Sun, Yat-sen}|\newline |\FName{Sun, Yat-sen}|\\\hline{\large\strut}
% {\large\strut}\textit{First mononym reference}:\newline\hbox to 1em{\hfil}\ForgetName{Plato}\Name{Plato} &
-% |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\{\large\strut}
-% {\large\strut}\textit{Subsequent mononym}: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\\hline
-% \end{tabular}
-% \begin{quote}
-%|\begin{nameauth}% In the preamble!|\\[0.2ex]
-%| \< Francis & & Francis, I & >|\\[0.2ex]
-%| \< Dem & & Demetrius, I Soter & >|\\[0.2ex]
-%| \< Sun & & Sun, Yat-sen & >|\\[0.2ex]
-%| \< Plato & & Plato & >|\\[0.2ex]
+% |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\[1ex]{\large\strut}
+% {\large\strut}\textit{Subsequent}: \Name{Plato} & |\Name*{Plato}|\newline |\Name{Plato}|\newline |\FName{Plato}|\\\hline
+% \end{tabular}}
+% \vfil
+%
+%\noindent |\begin{nameauth}|\\
+%| \< Francis & & Francis, I & >|\\
+%| \< Dem & & Demetrius, I Soter & >|\\
+%| \< Sun & & Sun, Yat-sen & >|\\
+%| \< Plato & & Plato & >|\\
%|\end{nameauth}|
-%\end{quote}
-%
-% \ForgetName{Francis, I}\ForgetName{Demetrius, I Soter}\ForgetName{Sun, Yat-sen}\ForgetName{Plato}|\Francis,| |\LFrancis,| |\Francis,| |and| |\SFrancis| give \Francis, \KeepAffix\LFrancis, \Francis, and \SFrancis. |\Dem,| |\LDem,| |\Dem,| |and \SDem| make \Dem, \LDem, \Dem, and \SDem. |\Sun,| |\LSun,| |\Sun,| |and \SSun| produce \Sun, \LSun, \Sun, and \SSun. |\Plato,| |\LPlato,| |\Plato,| |and \SPlato| yield \Plato, \LPlato, \Plato, and \SPlato.
-%
-% Note that |\KeepAffix\LFrancis| was used to prevent a bad break above. |\KeepAffix\Patton| prevented a bad break on the previous page.
+% \vfil
+%
+% \ForgetName{Francis, I}\ForgetName{Demetrius, I Soter}\ForgetName{Sun, Yat-sen}\ForgetName{Plato}%
+% \noindent |\Francis,| |\LFrancis,| |\Francis,| |and| |\SFrancis|:\\
+% \indent \Francis, \LFrancis, \Francis, and \SFrancis\\[1ex]
+% |\Dem,| |\LDem,| |\Dem,| |and \SDem|:\\
+% \indent \Dem, \LDem, \Dem, and \SDem\\[1ex]
+% |\Sun,| |\LSun,| |\Sun,| |and \SSun|:\\
+% \indent \Sun, \LSun, \Sun, and \SSun\\[1ex]
+% |\Plato,| |\LPlato,| |\Plato,| |and \SPlato|:\\
+% \indent \Plato, \LPlato, \Plato, and \SPlato.
+% \vfil
+% You also can ``stack'' \cmd{\CapThis}, \cmd{\CapName}, \cmd{\RevName}, \cmd{\KeepAffix}, and so on in front of these control sequences. |\CapName\LSun| generates \CapName\LSun.
% \clearpage
%
-% \noindent{\bfseries Old Syntax: Royal and Eastern}\\[1ex]
-% Please note that these forms are not recommended. |\Name{Ptolemy}[I Soter]| keeps the number with the affix. To keep the number with the name, use |\Name{Ptolemy I}[Soter]|. See also Section~\ref{sec:Affix}.\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
-% First ref: \ForgetName{Henry}[VIII]\Name{Henry}[VIII] & |\Name*{Henry}[VIII]|\newline |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\{\large\strut}
-% Subsequent refs: \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\{\large\strut}
-% Subsequent refs: \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\{\large\strut}
-% First ref: \ForgetName{Ptolemy}[I Soter]\Name{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\newline |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\{\large\strut}
-% Subsequent refs: \Name*{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\\{\large\strut}
-% Subsequent refs: \Name{Ptolemy}[I Soter] & |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\\hline{\large\strut}
-% First reference:\newline \hbox to 1em{\hfil}\ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\newline |\Name{Mao}[Tse-tung]|\\{\large\strut}
-% Subsequent refs: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\{\large\strut}
-% Subsequent refs: \Name{Mao}[Tse-tung] & |\Name{Mao}[Tse-tung]|\newline |\FName{Mao}[Tse-tung]|\\\hline
-% \end{tabular}
-% \begin{quote}
-%|\begin{nameauth}% In the preamble!|\\[0.2ex]
-%| \< Henry & & Henry & VIII >|\\[0.2ex]
-%| \< Ptol & & Ptolemy & I Soter >|\\[0.2ex]
-%| \< Mao & & Mao & Tse-tung >|\\[0.2ex]
+% \noindent{\bfseries Old Syntax: Royal and Eastern}\\[2ex]
+% Avoid these forms except with the |comma| option. |\Name{Ptolemy}[I Soter]| keeps the number with the affix. Use |\Name{Ptolemy I}[Soter]| to keep the number with the name. See also Section~\ref{sec:Affix}.\\[2ex]{\small
+% \begin{tabular}{p{0.53\textwidth}@{}p{0.42\textwidth}}\hline{\large\strut}
+% \textit{First reference}: \ForgetName{Henry}[VIII]\Name{Henry}[VIII] & |\Name*{Henry}[VIII]|\newline |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*{Henry}[VIII] & |\Name*{Henry}[VIII]|\\[1ex]{\large\strut}
+% \textit{Subsequent name}: \Name{Henry}[VIII] & |\Name{Henry}[VIII]|\newline |\FName{Henry}[VIII]|\\[1ex]{\large\strut}
+% \textit{First reference}: \ForgetName{Ptolemy}[I Soter]\Name{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\newline |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*{Ptolemy}[I Soter] & |\Name*{Ptolemy}[I Soter]|\\[1ex]{\large\strut}
+% \textit{Subsequent name}: \Name{Ptolemy}[I Soter] & |\Name{Ptolemy}[I Soter]|\newline |\FName{Ptolemy}[I Soter]|\\\hline{\large\strut}
+% \textit{First reference}:\newline \hbox to 1em{\hfil}\ForgetName{Mao}[Tse-tung]\Name{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\newline |\Name{Mao}[Tse-tung]|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*{Mao}[Tse-tung] & |\Name*{Mao}[Tse-tung]|\\[1ex]{\large\strut}
+% \textit{Subsequent name}: \Name{Mao}[Tse-tung] & |\Name{Mao}[Tse-tung]|\newline |\FName{Mao}[Tse-tung]|\\\hline
+% \end{tabular}}
+% \vfil
+%
+%\noindent |\begin{nameauth}|\\
+%| \< Henry & & Henry & VIII >|\\
+%| \< Ptol & & Ptolemy & I Soter >|\\
+%| \< Mao & & Mao & Tse-tung >|\\
%|\end{nameauth}|
-%\end{quote}
-% \ForgetName{Ptolemy}[I Soter]\ForgetName{Henry}[VIII]\ForgetName{Mao}[Tse-tung]|\Henry, \LHenry, \Henry, and \SHenry| give \Henry, \LHenry, \Henry, and \SHenry. |\Ptol,| |\LPtol,| |\Ptol,| |and \SPtol| make \Ptol, \LPtol, \Ptol, and \SPtol. |\Mao, \LMao, \Mao, and \SMao| produce \Mao, \LMao, \Mao, and \SMao.
+% \vfil
%
-% Avoid mixing syntax. If you take |\Name{Antiochus, IV}|\IndexName{Antiochus, IV} and add a sobriquet like |\Name{Antiochus, IV}[Epiphanes]| you will get two different names in the index. \cmd{\AKA} may look like it blends old and new syntax, but it really does not.
+% \ForgetName{Ptolemy}[I Soter]\ForgetName{Henry}[VIII]\ForgetName{Mao}[Tse-tung]%
+% \noindent |\Henry, \LHenry, \Henry, and \SHenry|:\\
+% \indent \Henry, \LHenry, \Henry, and \SHenry\\[1ex]
+% |\Ptol,| |\LPtol,| |\Ptol,| |and \SPtol|:\\
+% \indent \Ptol, \LPtol, \Ptol, and \SPtol\\[1ex]
+% |\Mao, \LMao, \Mao, and \SMao|:\\
+% \indent \Mao, \LMao, \Mao, and \SMao
+% \vfil
%
-% Workarounds include |\Name{Antiochus, IV Epiphanes}| to get \IndexInactive\Name{Antiochus, IV Epiphanes} and \Name{Antiochus, IV Epiphanes} in the text and ``Antiochus IV Epiphanes'' in the index. Use |\Name{Antiochus~IV, Epiphanes}| to keep the numeral with the name (best done with the simplified interface). Maybe the best way is to use something like |\TagName{Antiochus,| |IV}{| |Epiphanes,| |king}| with |\Name{Antiochus,| |IV}| and include ``Epiphanes'' manually as needed.
+% Avoid mixing old and new syntax. In the body text, |\Name{Antiochus, IV}| and |\Name{Antiochus,| |IV}[Epiphanes]| look alike, but their index entries differ.
%
-% Remember also that you can ``stack'' modifiers like \cmd{\CapThis}, \cmd{\CapName}, \cmd{\RevName}, \cmd{\KeepAffix}, and so on in front of the control sequences of the simplified interface. |\CapName\LMao| generates \CapName\LMao.
+% \begin{itemize}
+% \item Use |\Name{Antiochus, IV Epiphanes}| to get \IndexInactive\Name{Antiochus, IV Epiphanes} and \Name{Antiochus, IV Epiphanes} in the text and ``Antiochus IV Epiphanes'' in the index.
+%
+% \item Use |\Name{Antiochus~IV, Epiphanes}| to get \Name{Antiochus~IV, Epiphanes} and \Name{Antiochus~IV, Epiphanes} in the text and ``Antiochus IV Epiphanes'' in the index.\IndexActive
+%
+% \item Use |\Name{Antiochus,| |IV}| to get \Name{Antiochus, IV} and \Name{Antiochus, IV} in the text. Use something like |\TagName{Antiochus,| |IV}{| |Epiphanes}| to get ``Antiochus IV Epiphanes'' in the index and add ``Epiphanes'' in the text.
+% \end{itemize}
% \clearpage
%
% \subsubsection{Particles}
% \label{sec:Particles}
-% The following illustrate the American style of particulate names.\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
-% First: \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare} & |\Name*[Walter]{de la Mare}|\newline |\Name[Walter]{de la Mare}|\newline |\FName[Walter]{de la Mare}|\\{\large\strut}
-% Next reference: \Name[Walter]{de la Mare} & |\Name[Walter]{de la Mare}|\\{\large\strut}
-% At start of sentence: \CapThis\Name[Walter]{de la Mare} & |\CapThis\Name[Walter]{de la Mare}|\\{\large\strut}
-% Forename: \FName[Walter]{de la Mare} & |\FName[Walter]{de la Mare}|\\\hline
-% \end{tabular}\\[2ex]
-%
-% \noindent The Continental style differs slightly. These first three forms below put the particles in the index. Long macros are split for readability.\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
-% The (admittedly long) first use:\newline\small\Name[Johann Wolfgang von]{Goethe} & |\Name*[Johann Wolfgang von]{Goethe}|\newline |\Name[Johann Wolfgang von]{Goethe}|\newline |\FName[Johann Wolfgang von]{Goethe}|\\{\large\strut}
-% Subsequent: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\{\large\strut}
-% Forenames: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang] & |\FName[Johann Wolfgang von]{Goethe}%|\newline|[Johann Wolfgang]|\\\hline
-% \end{tabular}\\[2ex]
-%
-% \noindent These latter examples of the Continental style use the nickname feature to omit the particles from the index. Long macros are split for readability.\\[1ex]
-% \begin{tabular}{p{0.45\textwidth}@{}p{0.55\textwidth}}\hline{\large\strut}
-% First: \Name[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}[Adolf von]|\newline |\FName[Adolf]{Harnack}[Adolf von]|\\{\large\strut}
-% Next full name:\newline\hbox to 1em{\hfil}\Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\{\large\strut}
-% Subsequent surname: \Name[Adolf]{Harnack}[Adolf von] & |\Name[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}|\\{\large\strut}
-% Subsequent forename: \FName[Adolf]{Harnack} & |\FName[Adolf]{Harnack}|\\\hline
-% \end{tabular}
-% \begin{quote}
-%|\begin{nameauth}% In the preamble!|\\[0.2ex]
-%| \< DLM & Walter & de la Mare & >|\\[0.2ex]
-%| \< JWG & Johann Wolfgang von & Goethe & >|\\[0.2ex]
-%| \< Harnack & Adolf & Harnack & >|\\[0.2ex]
+% The following illustrate the American style of particulate names.\\[2ex]{\small
+% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\hline{\large\strut}
+% \textit{First}: \ForgetName[Walter]{de la Mare}\Name[Walter]{de la Mare} & |\Name*[Walter]{de la Mare}|\newline |\Name[Walter]{de la Mare}|\newline |\FName[Walter]{de la Mare}|\\[1ex]{\large\strut}
+% \textit{Subsequent}: \Name[Walter]{de la Mare} & |\Name[Walter]{de la Mare}|\\{\large\strut}
+% \textit{Start of sentence}: \CapThis\Name[Walter]{de la Mare} & |\CapThis\Name[Walter]{de la Mare}|\\{\large\strut}
+% \textit{Forename}: \FName[Walter]{de la Mare} & |\FName[Walter]{de la Mare}|\\\hline
+% \end{tabular}}\\[2ex]
+%
+% \noindent The Continental style differs slightly. These first three forms below put the particles in the index. Long macros are split for readability.\\[2ex]{\small
+% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\hline{\large\strut}
+% \textit{The (admittedly long) first use}:\newline\small\Name[Johann Wolfgang von]{Goethe} & |\Name*[Johann Wolfgang von]{Goethe}|\newline |\Name[Johann Wolfgang von]{Goethe}|\newline |\FName[Johann Wolfgang von]{Goethe}|\\[1ex]{\large\strut}
+% \textit{Subsequent}: \Name[Johann Wolfgang von]{Goethe} & |\Name[Johann Wolfgang von]{Goethe}|\\[1ex]{\large\strut}
+% \textit{Forenames}: \FName[Johann Wolfgang von]{Goethe}[Johann Wolfgang] & |\FName[Johann Wolfgang von]{Goethe}%|\newline|[Johann Wolfgang]|\\\hline
+% \end{tabular}}\\[2ex]
+%
+% \noindent These latter examples of the Continental style use the nickname feature to omit the particles from the index.\\[2ex]{\small
+% \begin{tabular}{p{0.45\textwidth}@{}p{0.50\textwidth}}\hline{\large\strut}
+% \textit{First}: \Name[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}[Adolf von]|\newline |\FName[Adolf]{Harnack}[Adolf von]|\\[1ex]{\large\strut}
+% \textit{Subsequent full}: \Name*[Adolf]{Harnack}[Adolf von] & |\Name*[Adolf]{Harnack}[Adolf von]|\newline\\{\large\strut}
+% \textit{Subsequent surname}: \Name[Adolf]{Harnack}[Adolf von] & |\Name[Adolf]{Harnack}[Adolf von]|\newline |\Name[Adolf]{Harnack}|\\[1ex]{\large\strut}
+% \textit{Subsequent forename}: \FName[Adolf]{Harnack} & |\FName[Adolf]{Harnack}|\\\hline
+% \end{tabular}}
+% \vfil
+%
+%\noindent |\begin{nameauth}|\\
+%| \< DLM & Walter & de la Mare & >|\\
+%| \< JWG & Johann Wolfgang von & Goethe & >|\\
+%| \< Harnack & Adolf & Harnack & >|\\
%|\end{nameauth}|
-%\end{quote}
-%\ForgetName[Walter]{de la Mare}\ForgetName[Johann Wolfgang von]{Goethe}\ForgetName[Adolf]{Harnack}|\DLM\| |and| |\CapThis\DLM| produce \DLM\ and \CapThis\DLM. |\JWG\| |and| |\JWG| give \JWG\ and \JWG. Using the alternate forenames option, |\Harnack[Adolf von]\| |and| |\Harnack| yield \Harnack[Adolf von]\ and \Harnack, but you will not see \Harnack's ``von'' in the index.
+%\vfil
+%
+% \ForgetName[Walter]{de la Mare}\ForgetName[Johann Wolfgang von]{Goethe}\ForgetName[Adolf]{Harnack}%
+% \noindent |\DLM\| |and| |\CapThis\DLM|:\\
+% \indent \DLM\ and \CapThis\DLM.\\[1ex]
+% |\JWG\| |and| |\JWG|:\\
+% \indent \JWG\ and \JWG.\\[1ex]
+% |\Harnack[Adolf von]\| |and| |\Harnack|:\\
+% \indent \Harnack[Adolf von]\ and \Harnack\\[1ex]
+% You will not see \Harnack's ``von'' in the index because it was used only in the alternate forenames field.
% \index{Rambam|seealso{Maimonides}}
% \clearpage
%
-% \StopEventually{\PrintChanges\clearpage\PrintIndex}
+%\StopEventually{^^A
+% \clearpage\PrintChanges
+% \clearpage\PrintIndex
+%}
%
% \section{Implementation}
%
% \iffalse
%<*package>
% \fi
-% \subsection{Package Options and Required Packages}
-%
-% Used internally to control printed name forms. |@nameauth@FullName| is only used to decide long or short forms in subsequent occurrences of names. The next Boolean, |@nameauth@FirstName|, switches surnames and forenames in the short form. |@nameauth@AltAKA| determines the cross-references that \cmd{\AKA} will print.
+% \small
+% \subsection{Boolean Values}
+% We begin with Boolean values that control printed name forms. |@nameauth@FullName| toggles long or short forms in subsequent name uses. |@nameauth@FirstName| is used when printing only first names. |@nameauth@AltAKA| determines if \cmd{\AKA} will print a longer or shorter name, depending on the starred or unstarred form.
% \begin{macrocode}
\newif\if@nameauth@FullName
\newif\if@nameauth@FirstName
\newif\if@nameauth@AltAKA
% \end{macrocode}
-% The next Boolean values control formatting. The first is toggled with \cmd{\NamesActive} and \cmd{\NamesInctive}; the second with \cmd{\IndexActive} and \cmd{\IndexInctive}. The first four are set with package options. The last two are set with \cmd{\ShowComma} and \cmd{\KeepAffix}, cleared by each instance of \cmd{\Name} and \cmd{\AKA}.
+% The next few Boolean values control formatting. The first is toggled with \cmd{\NamesActive} and \cmd{\NamesInctive} or the front and main matter options. The next toggles the formatting of first occurrences of names. The last forces name formatting whenever formatting is active, or allows normal operation.
% \begin{macrocode}
\newif\if@nameauth@DoFormat
-\newif\if@nameauth@DoIndex
+\newif\if@nameauth@FirstFormat
\newif\if@nameauth@AlwaysFormat
+% \end{macrocode}
+% The |comma| and |nocomma| options toggle the first value below, while \cmd{\ShowComma} toggles the second. Each instance of \cmd{\Name} and \cmd{\AKA} reset |@nameauth@ShowComma|.
+% \begin{macrocode}
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
+% \end{macrocode}
+% \cmd{\KeepAffix} toggles the value below. Each instance of \cmd{\Name} and \cmd{\AKA} reset it.
+% \begin{macrocode}
\newif\if@nameauth@NBSP
% \end{macrocode}
-% These Boolean values are used for detection of affixes and final periods.
+% \cmd{\IndexActive} and \cmd{\IndexInctive} toggle the value below.
+% \begin{macrocode}
+\newif\if@nameauth@DoIndex
+% \end{macrocode}
+% The |pretag| and |nopretag| options toggle the value below.
+% \begin{macrocode}
+\newif\if@nameauth@Pretag
+% \end{macrocode}
+% This Boolean value is used for detection of affixes and final periods.
% \begin{macrocode}
-\newif\if@nameauth@Comma
\newif\if@nameauth@Punct
% \end{macrocode}
% This Boolean value is triggered by \cmd{\CapThis}.
@@ -1396,10 +1931,12 @@
\newif\if@nameauth@RevAllComma
\newif\if@nameauth@RevThisComma
% \end{macrocode}
-% The following package options interact with many of the prior Boolean values. Suppressing and showing commas is set at load time and should not be changed in the document or else significant errors will result. Most options can be changed with user interface macros. Avoid changing the internal Boolean values directly.
-% \changes{v1.7}{2013/04/02}{Change options processing to prevent errors}
+% \clearpage\noindent
+% \subsection{Package Options}
+% The following package options interact with many of the prior Boolean values. Suppressing and showing commas is set at load time. Most options can be changed with user interface macros. Avoid changing the internal Boolean values directly.
% \begin{macrocode}
\newcommand{\NamesFormat}{}
+\def\@nameauth@Actual{@}
\DeclareOption{mainmatter}{\@nameauth@DoFormattrue}
\DeclareOption{frontmatter}{\@nameauth@DoFormatfalse}
\DeclareOption{smallcaps}{\renewcommand{\NamesFormat}{\scshape}}
@@ -1409,14 +1946,26 @@
\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue}
\DeclareOption{allcaps}{\@nameauth@AllCapstrue}
\DeclareOption{normalcaps}{\@nameauth@AllCapsfalse}
-\DeclareOption{allreversed}{\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse}
-\DeclareOption{allrevcomma}{\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
-\DeclareOption{notreversed}{\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
+\DeclareOption{allreversed}%
+ {\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse}
+\DeclareOption{allrevcomma}%
+ {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
+\DeclareOption{notreversed}%
+ {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
\DeclareOption{comma}{\@nameauth@AlwaysCommatrue}
\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
-\ExecuteOptions{nocomma,mainmatter,index,normalcaps,notreversed,smallcaps}
+\DeclareOption{pretag}{\@nameauth@Pretagtrue}
+\DeclareOption{nopretag}{\@nameauth@Pretagfalse}
+\ExecuteOptions%
+ {nocomma,%
+ mainmatter,%
+ index,%
+ pretag,%
+ normalcaps,%
+ notreversed,%
+ smallcaps}
\ProcessOptions\relax
% \end{macrocode}
% Now we load the required packages. They facilitate the first/subsequent name uses, the parsing of arguments, and the implementation of starred forms.
@@ -1426,44 +1975,36 @@
\RequirePackage{suffix}
\RequirePackage{xargs}
% \end{macrocode}
-%
+% \clearpage\noindent
% \subsection{Internal Macros}
-% \begin{macro}{\@nameauth@CleanName}
-% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
+% \begin{macro}{\@nameauth@Clean}
% Thanks to \Name*[Heiko]{Oberdiek}, this macro produces a ``sanitized'' string, even using accented characters, based on the parameters of \cmd{\Name} and friends. With this we can construct a control sequence name and test for it to determine the existence of pseudonyms and the first or subsequent occurrences of a name.
% \begin{macrocode}
-\newcommand*{\@nameauth@CleanName}[1]%
-{%
- \expandafter\zap@space\detokenize{#1} \@empty%
-}
+\newcommand*{\@nameauth@Clean}[1]%
+ {\expandafter\zap@space\detokenize{#1} \@empty}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Root}
-% \changes{v0.85}{2012/02/05}{Revise suffix handling}
-% \changes{v0.9}{2012/02/10}{renamed macro; suffix handling expandable}
% \changes{v1.4}{2012/07/24}{Made more robust}
% The following two macros parse \meta{SNN} into a radix and a comma-delimited suffix, returning only the radix. They (and their parameters) are expandable in order to facilitate proper indexing functionality. They form the kernel of the suffix removal and comma suppression features.
% \begin{macrocode}
\newcommand*{\@nameauth@Root}[1]%
-{%
- \@nameauth@TrimRoot#1,\@empty\relax%
-}
+ {\@nameauth@TrimRoot#1,\@empty\relax}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@TrimRoot}
-% \changes{v0.85}{2012/02/05}{Divide suffix handling into functional parts}
-% \changes{v0.9}{2012/02/10}{Renamed macro; suffix handling expandable}
+% \changes{v0.9}{2012/02/10}{Suffix handling expandable}
+% \changes{v2.0}{2015/11/11}{trim spaces}
% Throw out the comma and suffix, return the radix.
% \begin{macrocode}
-\def\@nameauth@TrimRoot#1,#2\relax{#1}
+\def\@nameauth@TrimRoot#1,#2\relax{\trim@spaces{#1}}
% \end{macrocode}
% \end{macro}
%
-% \clearpage
% \begin{macro}{\@nameauth@CapRoot}
-% \changes{v0.95}{2012/02/17}{Added macro}
+% \changes{v0.95}{2012/02/17}{Added}
% The next two macros implement the particulate name capitalization mechanism by returning a radix where the first letter is capitalized.
% \begin{macrocode}
\newcommand*{\@nameauth@CapRoot}[1]%
@@ -1472,7 +2013,8 @@
% \end{macro}
%
% \begin{macro}{\@nameauth@CR}
-% \changes{v0.95}{2012/02/17}{Added macro}
+% \changes{v0.95}{2012/02/17}{Added}
+% \changes{v1.26}{2012/04/24}{Fixed}
% Grab the first letter as one parameter, and everything before \cmd{\relax} as the second. Capitalize the first and return it with the second.
% \begin{macrocode}
\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}}
@@ -1480,7 +2022,7 @@
% \end{macro}
%
% \begin{macro}{\@nameauth@AllCapRoot}
-% \changes{v1.5}{2013/02/22}{Added macro}
+% \changes{v1.5}{2013/02/22}{Added}
% This macro returns a fully-capitalized radix. It is used for generating capitalized Eastern family names in the body text.
% \begin{macrocode}
\newcommand*{\@nameauth@AllCapRoot}[1]%
@@ -1489,8 +2031,7 @@
% \end{macro}
%
% \begin{macro}{\@nameauth@Suffix}
-% \changes{v0.9}{2012/02/10}{added macro}
-% \changes{v1.4}{2012/07/24}{Made more robust}
+% \changes{v0.9}{2012/02/10}{Added}
% The following two macros parse \meta{SNN} into a radix and a comma-delimited suffix, returning only the suffix. Anything before a comma is stripped off by |\@nameauth@Suffix|, but a comma must be present in the parameter. Leading spaces are removed to allow consistent formatting.
% \begin{macrocode}
\newcommand*{\@nameauth@Suffix}[1]%
@@ -1499,9 +2040,8 @@
% \end{macro}
%
% \begin{macro}{\@nameauth@TrimSuffix}
-% \changes{v0.9}{2012/02/10}{added macro}
-% \changes{v1.4}{2012/07/24}{Made more robust}
-% \changes{v1.5}{2013/02/22}{Added space removal}
+% \changes{v0.9}{2012/02/10}{Added}
+% \changes{v1.5}{2013/02/22}{Trim spaces}
% Throw out the radix, comma, and \cmd{\relax}; return the suffix with no leading spaces.
% \begin{macrocode}
\def\@nameauth@TrimSuffix#1,#2\relax{\trim@spaces{#2}}
@@ -1509,8 +2049,7 @@
% \end{macro}
%
% \begin{macro}{\@nameauth@TestDot}
-% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
-% This macro, based on a snippet by \Name*[Uwe]{Lueck}, checks for a period at the end of its parameter, ignoring medial periods. It determines whether we need to call \cmd{\@nameauth@CheckDot} below.
+% This macro, based on a snippet by \Name*[Uwe]{Lueck}, checks for a period at the end of its parameter. It determines whether we need to call \cmd{\@nameauth@CheckDot} below.
% \begin{macrocode}
\newcommand*{\@nameauth@TestDot}[1]%
{%
@@ -1524,440 +2063,594 @@
% \end{macro}
%
% \begin{macro}{\@nameauth@CheckDot}
-% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% We assume that \cmd{\expandafter} precedes the invocation of \cmd{\@nameauth@CheckDot}, which only is called if the terminal character of the input is a period. We evaluate the lookahead \cmd{\@token} while keeping it on the list of input tokens.
% \begin{macrocode}
-\def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot}
+\newcommand*{\@nameauth@CheckDot}%
+ {\futurelet\@token\@nameauth@EvalDot}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@EvalDot}
-% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% If \cmd{\@token} is a full stop, we gobble the token.
% \begin{macrocode}
-\def\@nameauth@EvalDot%
+\newcommand*{\@nameauth@EvalDot}%
{\let\@period=.\ifx\@token\@period\expandafter\@gobble \fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@FmtName}
-% \changes{v0.8}{2012/01/29}{Renamed macro to help compatibility}
% \changes{v0.85}{2012/02/05}{Add comma suppression}
-% \changes{v0.9}{2012/02/10}{Redesigned macro}
-% \changes{v0.94}{2012/02/15}{Added particle caps}
-% \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}}
-% The following macros format the output of \cmd{\Name}, etc. \cmd{\@nameauth@FmtName} is where the first occurrences of a name are formatted. Notice how \cmd{\NamesFormat} sits between a \cmd{\bgroup} and an \cmd{\egroup} to localize the font change. The \cmd{\NamesFormat} hook has been discussed previously.
-% \begin{macrocode}
-\newcommand{\@nameauth@FmtName}[1]%
-{%
- \@nameauth@TestDot{#1}%
- \if@nameauth@DoFormat%
- \bgroup\NamesFormat{#1}\egroup%
- \else%
- #1%
- \fi%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@nameauth@FmtName*}
-% \cmd{\@nameauth@FmtName} is where subsequent occurrences of a name are formatted. |\if@nameauth@AlwaysFormat| causes formatting to occur always (when possible).
+% \changes{v0.94}{2012/02/15}{Add particle caps}
+% \changes{v0.95}{2012/02/17}{Works with \textsf{microtype}}
+% \changes{v2.0}{2015/11/11}{One macro instead of two}
+% The following macros format the output of \cmd{\Name}, etc. \cmd{\@nameauth@FmtName} prints names in the body text, either formatted or not. Notice how \cmd{\NamesFormat} (Section~\ref{sec:formatting}) sits between a \cmd{\bgroup} and an \cmd{\egroup} to localize the font change. |@nameauth@AlwaysFormat| will force formatting when possible.
% \begin{macrocode}
-\WithSuffix\newcommand\@nameauth@FmtName*[1]%
+\newcommand*{\@nameauth@FmtName}[1]%
{%
+ \if@nameauth@AlwaysFormat\@nameauth@FirstFormattrue\fi
\@nameauth@TestDot{#1}%
- \if@nameauth@DoFormat%
- \if@nameauth@AlwaysFormat%
+ \if@nameauth@DoFormat
+ \if@nameauth@FirstFormat
\bgroup\NamesFormat{#1}\egroup%
- \else%
+ \else
#1%
- \fi%
- \else%
+ \fi
+ \else
#1%
- \fi%
+ \fi
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@nameauth@Index}
-% \changes{v0.94}{2012/02/15}{Added macro}
-% \changes{v1.9}{2015/07/09}{babel workaround}
+% \changes{v0.94}{2012/02/15}{Added}
+% \changes{v2.0}{2015/11/11}{Redesigned tagging}
% If the indexing flag is true, create an index entry, otherwise do nothing.
% \begin{macrocode}
-\newcommandx\@nameauth@Index[2][2=\@empty]%
+\newcommand*{\@nameauth@Index}[2]%
{%
- \ifx#2\@empty%
- \if@nameauth@DoIndex\index{#1}\fi%
- \else%
- \ifcsname#2\endcsname%
- \if@nameauth@DoIndex\index{#1\csname#2\endcsname}\fi%
- \else%
- \if@nameauth@DoIndex\index{#1}\fi%
- \fi%
- \fi%
+ \def\cseq{#1}%
+ \ifcsname\cseq!TAG\endcsname
+ \ifcsname\cseq!PRE\endcsname
+ \if@nameauth@DoIndex
+ \index{\csname\cseq!PRE\endcsname#2\csname\cseq!TAG\endcsname}%
+ \fi
+ \else
+ \if@nameauth@DoIndex\index{#2\csname\cseq!TAG\endcsname}\fi
+ \fi
+ \else
+ \ifcsname\cseq!PRE\endcsname
+ \if@nameauth@DoIndex\index{\csname\cseq!PRE\endcsname#2}\fi
+ \else
+ \if@nameauth@DoIndex\index{#2}\fi
+ \fi
+ \fi
}
% \end{macrocode}
% \end{macro}
+% \clearpage\noindent
% \subsection{User Interface Macros}
-% The following macros have been documented previously. Either they call the internal macros or set Boolean values.
+% The following macros have been documented previously. Either they call the internal macros or they set Boolean values.
% \begin{macro}{\CapThis}
-% \changes{v0.94}{2012/02/15}{Added macro}
+% \changes{v0.94}{2012/02/15}{Added}
+% Capitalize first letter of name.
% \begin{macrocode}
-\newcommand{\CapThis}{\@nameauth@DoCapstrue}
+\newcommand*{\CapThis}{\@nameauth@DoCapstrue}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\CapName}
-% \changes{v1.5}{2013/02/22}{Added macro}
+% \changes{v1.5}{2013/02/22}{Added}
% Capitalize entire name.
% \begin{macrocode}
-\newcommand{\CapName}{\@nameauth@AllThistrue}
+\newcommand*{\CapName}{\@nameauth@AllThistrue}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\RevName}
-% \changes{v1.5}{2013/02/22}{Added macro}
+% \changes{v1.5}{2013/02/22}{Added}
% Reverse name order.
% \begin{macrocode}
-\newcommand{\RevName}{\@nameauth@RevThistrue}
+\newcommand*{\RevName}{\@nameauth@RevThistrue}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\RevComma}
-% \changes{v1.5}{2013/02/22}{Added macro}
+% \changes{v1.5}{2013/02/22}{Added}
% Last name, comma, first name.
% \begin{macrocode}
-\newcommand{\RevComma}%
+\newcommand*{\RevComma}%
{\@nameauth@RevThistrue\@nameauth@RevThisCommatrue}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ShowComma}
-% \changes{v1.4}{2012/07/24}{Added macro}
+% \changes{v1.4}{2012/07/24}{Added}
% Put comma between name and suffix one time.
% \begin{macrocode}
-\newcommand{\ShowComma}{\@nameauth@ShowCommatrue}
+\newcommand*{\ShowComma}{\@nameauth@ShowCommatrue}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\KeepAffix}
-% \changes{v1.9}{2015/07/09}{Added macro}
+% \changes{v1.9}{2015/07/09}{Added}
% Trigger a name-suffix pair to be separated by a non-breaking space.
% \begin{macrocode}
-\newcommand{\KeepAffix}{\@nameauth@NBSPtrue}
+\newcommand*{\KeepAffix}{\@nameauth@NBSPtrue}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\NamesInactive}
+% Switch to the ``non-formatted'' species of names.
+% \begin{macrocode}
+\newcommand*{\NamesInactive}{\@nameauth@DoFormatfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NamesActive}
+% Switch to the ``formatted'' species of names.
+% \begin{macrocode}
+\newcommand*{\NamesActive}{\@nameauth@DoFormattrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AllCapsInactive}
+% Turn off global surname capitalization.
+% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macrocode}
+\newcommand*{\AllCapsInactive}{\@nameauth@AllCapsfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\AllCapsActive}
+% Turn on global surname capitalization.
+% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macrocode}
+\newcommand*{\AllCapsActive}{\@nameauth@AllCapstrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ReverseInactive}
+% Turn off global name reversing.
+% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macrocode}
+\newcommand*{\ReverseInactive}{\@nameauth@RevAllfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ReverseActive}
+% Turn on global name reversing.
+% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macrocode}
+\newcommand*{\ReverseActive}{\@nameauth@RevAlltrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ReverseCommaInactive}
+% Turn off global ``last-name-comma-first.''
+% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macrocode}
+\newcommand*{\ReverseCommaInactive}%
+ {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ReverseCommaActive}
+% Turn on global ``last-name-comma-first.''
+% \changes{v1.5}{2013/02/22}{Added}
+% \begin{macrocode}
+\newcommand*{\ReverseCommaActive}%
+ {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IndexInactive}
+% \changes{v0.94}{2012/02/15}{Added}
+% turn off global indexing of names.
+% \begin{macrocode}
+\newcommand*{\IndexInactive}{\@nameauth@DoIndexfalse}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IndexActive}
+% \changes{v0.94}{2012/02/15}{Added}
+% turn on global indexing of names.
+% \begin{macrocode}
+\newcommand*{\IndexActive}{\@nameauth@DoIndextrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\IndexActual}
+% \changes{v2.0}{2015/11/11}{Added}
+% turn on global indexing of names.
+% \begin{macrocode}
+\newcommand*{\IndexActual}[1]{\gdef\@nameauth@Actual{#1}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\Name}
-% \changes{v0.75}{2012/01/19}{Added ``sobriquet'' feature}
-% \changes{v0.8}{2012/01/29}{Merged all major functionality here}
-% \changes{v0.85}{2012/02/05}{Add comma suppression to indexing}
-% \changes{v0.9}{2012/02/10}{Redesigned macro}
-% \changes{v0.94}{2012/02/15}{Error checking expanded}
-% \changes{v0.95}{2012/02/17}{Fixed incompatibility with \textsf{microtype}}
-% \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.}
-% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
-% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
-% \changes{v1.4}{2012/07/24}{Made more robust}
-% \changes{v1.5}{2013/02/22}{Added reversing and caps mechanisms}
+% \changes{v0.85}{2012/02/05}{Add comma suppression}
+% \changes{v0.96}{2012/02/19}{Works w/ \textsf{microtype}, \textsf{memoir}}
+% \changes{v1.5}{2013/02/22}{Add reversing and caps}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% Here is the heart of the package. \Name*[Marc van]{Dongen} provided the basic structure. Parsing, indexing, and formatting are in discrete elements.
% \begin{macrocode}
-\newcommandx\Name[3][1=\@empty, 3=\@empty]%
+\newcommandx*\Name[3][1=\@empty, 3=\@empty]%
{%
+ \let\ex\expandafter%
\leavevmode\hbox{}%
- \protected@edef\testi{#1}%
- \protected@edef\testii{#2}%
- \protected@edef\testiii{#3}%
- \if@nameauth@AllCaps\@nameauth@AllThistrue\fi%
- \if@nameauth@RevAll\@nameauth@RevThistrue\fi%
- \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi%
+% \end{macrocode}
+% Names occur in horizontal mode; we ensure that.
+% \begin{macrocode}
+ \protected@edef\testa{#1}%
+ \protected@edef\arga{\trim@spaces{#1}}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testbr{\@nameauth@Root{#2}}%
+ \protected@edef\testc{#3}%
+ \protected@edef\argc{\trim@spaces{#3}}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \Name: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name malformed}%
+ \fi
+ \fi
+% \end{macrocode}
+% We make copies of the arguments to test them and make parsing decisions.
+% \begin{macrocode}
+ \if@nameauth@AllCaps\@nameauth@AllThistrue\fi
+ \if@nameauth@RevAll\@nameauth@RevThistrue\fi
+ \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi
+% \end{macrocode}
+% If global caps. reversing, and commas are true, set the local flags true.
+%
+% The code below handles non-breaking and regular spaces, as well as commas, in the text and the index by setting up which kind we want to use. These will be inserted as appropriate as the output is formatted.
+% \begin{macrocode}
\protected@edef\ISpace{\space}%
\protected@edef\Space{\space}%
- \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi%
- \if@nameauth@AlwaysComma%
+ \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi
+ \if@nameauth@AlwaysComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@ShowComma%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \if@nameauth@ShowComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+% \end{macrocode}
+% \clearpage\noindent
+% The section below parses any ``surnames'' into name/suffix pairs and figures out how to capitalize and reverse them as needed, storing the results for the main parser.
+% \begin{macrocode}
\protected@edef\RawShort{\@nameauth@Root{#2}}%
\protected@edef\CapShort{\@nameauth@CapRoot{#2}}%
\protected@edef\AllCapShort{\@nameauth@AllCapRoot{#2}}%
\let\IndexShort\RawShort%
- \ifx\testii\RawShort%
- \protected@edef\Suffix{\@empty}%
- \let\IndexSurnames\RawShort%
+ \ifx\testb\testbr
+ \protected@edef\Suff{\@empty}%
+ \let\IndexSNN\RawShort%
\let\Reversed\RawShort%
- \let\Surnames\RawShort%
+ \let\SNN\RawShort%
\let\PrintShort\RawShort%
- \if@nameauth@DoCaps%
+ \if@nameauth@DoCaps
\let\Reversed\CapShort%
- \let\Surnames\CapShort%
+ \let\SNN\CapShort%
\let\PrintShort\CapShort%
- \fi%
- \if@nameauth@AllThis%
+ \fi
+ \if@nameauth@AllThis
\let\Reversed\AllCapShort%
- \let\Surnames\AllCapShort%
+ \let\SNN\AllCapShort%
\let\PrintShort\AllCapShort%
- \fi%
- \else%
- \protected@edef\Suffix{\@nameauth@Suffix{#2}}%
- \protected@edef\IndexSurnames{\RawShort\ISpace\Suffix}%
- \protected@edef\Reversed{\Suffix\Space\RawShort}%
- \protected@edef\Surnames{\RawShort\Space\Suffix}%
- \if@nameauth@RevThis%
- \let\PrintShort\Suffix%
- \else%
+ \fi
+ \else
+ \protected@edef\Suff{\@nameauth@Suffix{#2}}%
+ \protected@edef\IndexSNN{\RawShort\ISpace\Suff}%
+ \protected@edef\Reversed{\Suff\Space\RawShort}%
+ \protected@edef\SNN{\RawShort\Space\Suff}%
+ \if@nameauth@RevThis
+ \let\PrintShort\Suff%
+ \else
\let\PrintShort\RawShort%
- \fi%
- \if@nameauth@DoCaps%
- \protected@edef\Reversed{\Suffix\Space\CapShort}%
- \protected@edef\Surnames{\CapShort\Space\Suffix}%
- \if@nameauth@RevThis%
- \let\PrintShort\Suffix%
- \else%
+ \fi
+ \if@nameauth@DoCaps
+ \protected@edef\Reversed{\Suff\Space\CapShort}%
+ \protected@edef\SNN{\CapShort\Space\Suff}%
+ \if@nameauth@RevThis
+ \let\PrintShort\Suff%
+ \else
\let\PrintShort\CapShort%
- \fi%
- \fi%
- \if@nameauth@AllThis%
- \protected@edef\Reversed{\Suffix\Space\AllCapShort}%
- \protected@edef\Surnames{\AllCapShort\Space\Suffix}%
- \if@nameauth@RevThis%
- \let\PrintShort\Suffix%
- \else%
+ \fi
+ \fi
+ \if@nameauth@AllThis
+ \protected@edef\Reversed{\Suff\Space\AllCapShort}%
+ \protected@edef\SNN{\AllCapShort\Space\Suff}%
+ \if@nameauth@RevThis
+ \let\PrintShort\Suff%
+ \else
\let\PrintShort\AllCapShort%
- \fi%
- \fi%
- \fi%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% \clearpage\noindent Here we parse names.
+% \begin{macrocode}
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+% \end{macrocode}
+% This is the section for momonyms, royal name/suffix pairs, and native Eastern names where comma-delimited suffixes are used. The first conditional below checks if we are trying to use an alternate name cross-reference as a main name (code !PN for pseudonym). If we are using a legitimate name, we generate an index entry.
+% \begin{macrocode}
+ \ifcsname\csb!PN\endcsname
\PackageWarning{nameauth}%
- {macro \Name: Xref: #2 cannot be a page reference.}%
- \else%
- \@nameauth@Index{\IndexSurnames}[\@nameauth@CleanName{#2}!TAG!]%
- \fi%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
- \if@nameauth@FirstName%
- \@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
- \@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ {macro \Name: Xref: #2 cannot be a page reference}%
+ \else
+ \@nameauth@Index{\csb}{\IndexSNN}%
+ \fi
+% \end{macrocode}
+% If formatting is active, we handle first and subsequent formatting of names in the main matter (code !MN for main matter name). First we handle subsequent uses. We need \cmd{\expandafter} to enable the punctuation detection.
+% \begin{macrocode}
+ \if@nameauth@DoFormat
+ \ifcsname\csb!MN\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
- \if@nameauth@FirstName%
- \@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
- \@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ \fi
+ \if@nameauth@FullName
+ \@nameauth@FullNamefalse%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+% \end{macrocode}
+% Handle first uses.
+% \begin{macrocode}
+ \@nameauth@FirstFormattrue%
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
+ \csgdef{\csb!MN}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% \clearpage\noindent
+% Take care of names in the front matter (code !NF for non-formatted). First handle subsequent uses.
+% \begin{macrocode}
+ \ifcsname\csb!NF\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \fi
+ \if@nameauth@FullName
+ \@nameauth@FullNamefalse%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+% \end{macrocode}
+% Handle first uses.
+% \begin{macrocode}
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
+ \csgdef{\csb!NF}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% This is the section that handles the old syntax for royal names and native Eastern names. The first conditional below checks if we are trying to use an alternate name cross-reference as a main name (code !PN for pseudonym). If we are using a legitimate name, we generate an index entry.
+% \begin{macrocode}
+ \ifcsname\csbc!PN\endcsname
\PackageWarning{nameauth}%
- {macro \Name: Xref: #2 #3 cannot be a page reference.}%
- \else%
- \@nameauth@Index{\IndexSurnames\ISpace#3}[\@nameauth@CleanName{#2#3}!TAG!]%
- \fi%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
- \if@nameauth@FirstName%
+ {macro \Name: Xref: #2 #3 cannot be a page reference}%
+ \else
+ \@nameauth@Index{\csbc}{\IndexSNN\ISpace\argc}%
+ \fi
+% \end{macrocode}
+% \clearpage\noindent
+% If formatting is active, we handle first and subsequent formatting of names in the main matter (code !MN for main matter name). First we handle subsequent uses.
+% \begin{macrocode}
+ \if@nameauth@DoFormat
+ \ifcsname\csbc!MN\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\space#3}%
- \fi%
- \else%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testiii}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \else
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\argc}%
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% Handle first uses.
+% \begin{macrocode}
+ \@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Surnames\expandafter\space#3}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
- \if@nameauth@FirstName%
+ \csgdef{\csbc!MN}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% \clearpage\noindent
+% Take care of names in the front matter (code !NF for non-formatted). First handle subsequent uses.
+% \begin{macrocode}
+ \ifcsname\csbc!NF\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\space#3}%
- \fi%
- \else%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testiii}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \else
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\argc}%
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% Handle first uses.
+% \begin{macrocode}
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\space\testiii}%
- \fi%
- \fi%
- \fi%
- \fi%
- \else%
- \if@nameauth@RevThisComma%
+ \csgdef{\csbc!NF}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% \clearpage\noindent
+% This is the section that handles Western names and non-native Eastern names. The first pair of conditionals handle the |comma| option, \cmd{RevThisComma}, and alternate forenames. The next conditional below checks if we are trying to use an alternate name cross-reference as a main name (code !PN for pseudonym). If we are using a legitimate name, we generate an index entry.
+% \begin{macrocode}
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \ifx\testiii\@empty%
- \protected@edef\Forenames{#1}%
- \else%
- \protected@edef\Forenames{#3}%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \ifx\testc\@empty
+ \let\FNN\arga%
+ \else
+ \let\FNN\argc%
\fi
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ \ifcsname\csab!PN\endcsname
\PackageWarning{nameauth}%
- {macro \Name: Xref: #1 #2 cannot be a page reference.}%
- \else%
- \ifx\Suffix\@empty%
- \@nameauth@Index{\IndexShort, #1}[\@nameauth@CleanName{#1#2}!TAG!]%
- \else%
- \@nameauth@Index{\IndexShort, #1, \Suffix}[\@nameauth@CleanName{#1#2}!TAG!]%
- \fi%
- \fi%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
- \if@nameauth@FirstName%
+ {macro \Name: Xref: #1 #2 cannot be a page reference}%
+ \else
+ \ifx\Suff\@empty
+ \@nameauth@Index{\csab}{\IndexShort,\space\arga}%
+ \else
+ \@nameauth@Index{\csab}{\IndexShort,\space\arga,\space\Suff}%
+ \fi
+ \fi
+% \end{macrocode}
+% If formatting is active, we handle first and subsequent formatting of names in the main matter (code !MN for main matter name). First we handle subsequent uses.
+% \begin{macrocode}
+ \if@nameauth@DoFormat
+ \ifcsname\csab!MN\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \let\PrintShort\Forenames%
- \fi%
- \if@nameauth@FullName%
+ \let\PrintShort\FNN%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+% \end{macrocode}
+% \clearpage\noindent
+% Handle first uses.
+% \begin{macrocode}
+ \@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
- \if@nameauth@FirstName%
+ \csgdef{\csab!MN}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% Take care of names in the front matter (code !NF for non-formatted). First handle subsequent uses.
+% \begin{macrocode}
+ \ifcsname\csab!NF\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \let\PrintShort\Forenames%
- \fi%
- \if@nameauth@FullName%
+ \let\PrintShort\FNN%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+% \end{macrocode}
+% Handle first uses.
+% \begin{macrocode}
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \fi%
- \fi%
- \fi%
+ \csgdef{\csab!NF}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% \clearpage\noindent
+% Reset all the ``per name'' Boolean values.
+% \begin{macrocode}
+ \@nameauth@FirstFormatfalse%
\@nameauth@NBSPfalse%
\@nameauth@DoCapsfalse%
\@nameauth@AllThisfalse%
\@nameauth@ShowCommafalse%
\@nameauth@RevThisfalse%
\@nameauth@RevThisCommafalse%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+% \end{macrocode}
+% Call the full stop detection.
+% \begin{macrocode}
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
% \end{macrocode}
% \end{macro}
@@ -1966,22 +2659,16 @@
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\Name*} sets a Boolean value and calls \cmd{\Name}.
% \begin{macrocode}
-\WithSuffix\newcommandx\Name*[3][1=\@empty, 3=\@empty]%
- {\@nameauth@FullNametrue\Name[#1]{#2}[#3]}
+\WithSuffix\def\Name*{\@nameauth@FullNametrue\Name}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\FName}
-% \changes{v0.9}{2012/02/10}{Added macro}
-% \changes{v0.94}{2012/02/15}{Error checking expanded}
-% \changes{v0.96}{2012/02/19}{Fixed occasional incompatibility with \textsf{memoir}.}
-% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
-% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
+% \changes{v0.9}{2012/02/10}{Added}
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\FName} sets a Boolean value and calls \cmd{\Name}.
% \begin{macrocode}
-\newcommandx\FName[3][1=\@empty, 3=\@empty]%
- {\@nameauth@FirstNametrue\Name[#1]{#2}[#3]}
+\def\FName{\@nameauth@FirstNametrue\Name}
% \end{macrocode}
% \end{macro}
%
@@ -1989,214 +2676,300 @@
% \changes{v1.4}{2012/07/24}{Refactored}
% \cmd{\FName} and \cmd{\FName*} are identical.
% \begin{macrocode}
-\WithSuffix\newcommandx\FName*[3][1=\@empty, 3=\@empty]%
- {\@nameauth@FirstNametrue\Name[#1]{#2}[#3]}
+\WithSuffix\def\FName*{\@nameauth@FirstNametrue\Name}
% \end{macrocode}
% \end{macro}
%
-% \clearpage
% \begin{macro}{\AKA}
-% \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility}
-% \changes{v0.86}{2012/02/06}{Fixed some regressions}
-% \changes{v0.9}{2012/02/10}{Added starred mode; redesigned}
-% \changes{v0.94}{2012/02/15}{Added error checking}
-% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
-% \changes{v1.1}{2012/03/08}{Fixed warning reporting.}
-% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
-% \changes{v1.4}{2012/07/24}{Made more robust}
-% \changes{v1.5}{2013/02/22}{Added reversing and caps mechanisms}
+% \changes{v0.85}{2012/02/05}{Add comma suppression}
+% \changes{v0.9}{2012/02/10}{Add starred mode; redesigned}
+% \changes{v1.26}{2012/04/24}{Fix sorting of name suffixes}
+% \changes{v1.5}{2013/02/22}{Add reversing and caps}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% \cmd{\AKA} prints an alternate name and creates index cross-references. It prevents multiple generation of cross-references and suppresses double periods.
% \begin{macrocode}
-\newcommandx\AKA[5][1=\@empty, 3=\@empty, 5=\@empty]%
+\newcommandx*\AKA[5][1=\@empty, 3=\@empty, 5=\@empty]%
{%
+ \let\ex\expandafter%
\leavevmode\hbox{}%
- \protected@edef\testi{#1}%
- \protected@edef\testii{#2}%
- \protected@edef\testiii{#3}%
- \protected@edef\testiv{#4}%
- \protected@edef\testv{#5}%
- \if@nameauth@AllCaps\@nameauth@AllThistrue\fi%
- \if@nameauth@RevAll\@nameauth@RevThistrue\fi%
- \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi%
+% \end{macrocode}
+% Names occur in horizontal mode; we ensure that.
+% \begin{macrocode}
+ \protected@edef\testa{#1}%
+ \protected@edef\arga{\trim@spaces{#1}}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testbr{\@nameauth@Root{#2}}%
+ \protected@edef\testc{#3}%
+ \protected@edef\argc{\trim@spaces{#3}}%
+ \protected@edef\testd{\trim@spaces{#4}}%
+ \protected@edef\testdr{\@nameauth@Root{#4}}%
+ \protected@edef\teste{#5}%
+ \protected@edef\arge{\trim@spaces{#5}}%
+ \def\csd{\@nameauth@Clean{#4}}%
+ \def\csde{\@nameauth@Clean{#4#5}}%
+ \def\cscd{\@nameauth@Clean{#3!#4}}%
+% \end{macrocode}
+% Above we make copies of the arguments to test them and make parsing decisions.
+% \clearpage\noindent
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testd\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name missing}%
+ \else
+ \ifx\csd\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name malformed}%
+ \fi
+ \fi
+% \end{macrocode}
+% We test for one kind of malformed input input.
+% \begin{macrocode}
+ \if@nameauth@AllCaps\@nameauth@AllThistrue\fi
+ \if@nameauth@RevAll\@nameauth@RevThistrue\fi
+ \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi
+% \end{macrocode}
+% If global caps. reversing, and commas are true, set the local flags true.
+%
+% The code below handles non-breaking and regular spaces, as well as commas, in the text and the index by setting up which kind we want to use. These will be inserted as appropriate as the output is formatted.
+% \begin{macrocode}
\protected@edef\ISpace{\space}%
\protected@edef\Space{\space}%
- \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi%
- \if@nameauth@AlwaysComma%
+ \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi
+ \if@nameauth@AlwaysComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@ShowComma%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \if@nameauth@ShowComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \protected@edef\Shortii{\@nameauth@Root{#2}}%
- \protected@edef\Shortiv{\@nameauth@Root{#4}}%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+% \end{macrocode}
+% \clearpage\noindent
+% The section below parses any ``surnames'' into name/suffix pairs and figures out how to capitalize and reverse them as needed, storing the results for the main parser. We have to handle several more combinations here than with \cmd{\Name} above.
+% \begin{macrocode}
+ \protected@edef\Shortb{\@nameauth@Root{#2}}%
+ \protected@edef\Shortd{\@nameauth@Root{#4}}%
\protected@edef\CapShort{\@nameauth@CapRoot{#4}}%
\protected@edef\AllCapShort{\@nameauth@AllCapRoot{#4}}%
- \ifx\testii\Shortii%
- \let\Surnamesii\Shortii%
- \protected@edef\Suffixii{\@empty}%
- \else%
- \protected@edef\Suffixii{\@nameauth@Suffix{#2}}%
- \protected@edef\Surnamesii{\Shortii\ISpace\Suffixii}%
- \fi%
- \ifx\testiv\Shortiv%
- \protected@edef\Suffixiv{\@empty}%
- \let\ISurnamesiv\Shortiv%
- \let\Reversed\Shortiv%
- \let\Surnamesiv\Shortiv%
- \if@nameauth@DoCaps%
- \let\Surnamesiv\CapShort%
+ \ifx\testb\testbr
+ \let\SNNb\Shortb%
+ \protected@edef\Suffb{\@empty}%
+ \else
+ \protected@edef\Suffb{\@nameauth@Suffix{#2}}%
+ \protected@edef\SNNb{\Shortb\ISpace\Suffb}%
+ \fi
+ \ifx\testd\testdr
+ \protected@edef\Suffd{\@empty}%
+ \let\ISNNd\Shortd%
+ \let\Reversed\Shortd%
+ \let\SNNd\Shortd%
+ \if@nameauth@DoCaps
+ \let\SNNd\CapShort%
\let\Reversed\CapShort%
- \fi%
- \if@nameauth@AllThis%
- \let\Surnamesiv\AllCapShort%
+ \fi
+ \if@nameauth@AllThis
+ \let\SNNd\AllCapShort%
\let\Reversed\AllCapShort%
- \fi%
- \else%
- \protected@edef\Suffixiv{\@nameauth@Suffix{#4}}%
- \protected@edef\ISurnamesiv{\Shortiv\ISpace\Suffixiv}%
- \protected@edef\Reversed{\Suffixiv\Space\Shortiv}%
- \protected@edef\Surnamesiv{\Shortiv\Space\Suffixiv}%
- \if@nameauth@DoCaps%
- \protected@edef\Reversed{\Suffixiv\Space\CapShort}%
- \protected@edef\Surnamesiv{\CapShort\Space\Suffixiv}%
- \fi%
- \if@nameauth@AllThis%
- \protected@edef\Reversed{\Suffixiv\Space\AllCapShort}%
- \protected@edef\Surnamesiv{\AllCapShort\Space\Suffixiv}%
- \fi%
- \fi%
- \ifx\testiii\@empty%
- \ifx\testv\@empty%
- \ifcsname\@nameauth@CleanName{#4!PN!}\endcsname%
+ \fi
+ \else
+ \protected@edef\Suffd{\@nameauth@Suffix{#4}}%
+ \protected@edef\ISNNd{\Shortd\ISpace\Suffd}%
+ \protected@edef\Reversed{\Suffd\Space\Shortd}%
+ \protected@edef\SNNd{\Shortd\Space\Suffd}%
+ \if@nameauth@DoCaps
+ \protected@edef\Reversed{\Suffd\Space\CapShort}%
+ \protected@edef\SNNd{\CapShort\Space\Suffd}%
+ \fi
+ \if@nameauth@AllThis
+ \protected@edef\Reversed{\Suffd\Space\AllCapShort}%
+ \protected@edef\SNNd{\AllCapShort\Space\Suffd}%
+ \fi
+ \fi
+% \end{macrocode}
+% \clearpage\noindent Here we parse names.
+% \begin{macrocode}
+ \ifx\testc\@empty
+ \ifx\teste\@empty
+% \end{macrocode}
+% For mononyms and name/suffix pairs: If a pseudonym has not been generated by \cmd{\AKA} or \cmd{\ExcludeName}, and if the proposed pseudonym is not already a mainmatter or frontmatter name, then generate a \textit{see} reference from the pseudonym to a name that will appear in the index.
+% \begin{macrocode}
+ \ifcsname\csd!PN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: XRef: #4 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4!MN!}\endcsname%
+ {macro \AKA: XRef: #4 exists}%
+ \else
+ \ifcsname\csd!MN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
+ {macro \AKA: Name reference: #4 exists; no xref}%
+ \else
+ \ifcsname\csd!NF\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#4!PN!}}{}%
- \ifx\testi\@empty%
- \@nameauth@Index{\ISurnamesiv|see{\Surnamesii}}%
- \else%
- \ifx\Suffixii\@empty \@nameauth@Index{\ISurnamesiv|see{\Surnamesii, #1}}%
- \else \@nameauth@Index{\ISurnamesiv|see{\Shortii, #1, \Suffixii}}\fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \if@nameauth@RevThisComma%
+ {macro \AKA: Name reference: #4 exists; no xref}%
+ \else
+ \csgdef{\csd!PN}{}%
+ \ifx\testa\@empty
+ \@nameauth@Index{\csd}%
+ {\ISNNd|see{\SNNb}}%
+ \else
+ \ifx\Suffb\@empty
+ \@nameauth@Index{\csd}%
+ {\ISNNd|see{\SNNb,\space\arga}}%
+ \else
+ \@nameauth@Index{\csd}%
+ {\ISNNd|see{\Shortb,\space\arga,\space\Suffb}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% \noindent Print an appropriate version of the pseudonym (capped, reversed, etc.) in the text with no special formatting even if no cross-reference was generated in the index. Again, \cmd{\expandafter} is used for the punctuation detection.
+% \begin{macrocode}
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesiv}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!PN!}\endcsname%
+ \if@nameauth@NBSP
+ \protected@edef\Space{,\nobreakspace}%
+ \fi
+ \fi
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNNd}%
+ \fi
+ \else
+% \end{macrocode}
+% \clearpage\noindent
+% For name/affix using the old syntax: If a pseudonym has not been generated by \cmd{\AKA} or \cmd{\ExcludeName}, and if the proposed pseudonym is not already a mainmatter or frontmatter name, then generate a \textit{see} reference from the pseudonym to a name that will appear in the index.
+% \begin{macrocode}
+ \ifcsname\csde!PN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: XRef: #4 #5 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!MN!}\endcsname%
+ {macro \AKA: XRef: #4 #5 exists}%
+ \else
+ \ifcsname\csde!MN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 #5 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
+ {macro \AKA: Name reference: #4 #5 exists; no xref}%
+ \else
+ \ifcsname\csde!NF\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 #5 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#4#5!PN!}}{}%
- \ifx\testi\@empty%
- \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Surnamesii}}%
- \else%
- \ifx\Suffixii\@empty \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Surnamesii, #1}}%
- \else \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Shortii, #1, \Suffixii}}\fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \if@nameauth@RevThisComma%
+ {macro \AKA: Name reference: #4 #5 exists; no xref}%
+ \else
+ \csgdef{\csde!PN}{}%
+ \ifx\testa\@empty
+ \@nameauth@Index{\csde}%
+ {\ISNNd\ISpace\arge|see{\SNNb}}%
+ \else
+ \ifx\Suffb\@empty
+ \@nameauth@Index{\csde}%
+ {\ISNNd\ISpace\arge|see{\SNNb,\space\arga}}%
+ \else
+ \@nameauth@Index{\csde}%
+ {\ISNNd\ISpace\arge|see{\Shortb,\space\arga,\space\Suffb}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% Print an appropriate version of the pseudonym (capped, reversed, etc.) in the text with no special formatting even if no cross-reference was generated in the index.
+% \begin{macrocode}
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@AltAKA%
- \if@nameauth@RevThis%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testv}%
- \fi%
- \else%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\expandafter\testv\expandafter\Space\Surnamesiv}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\expandafter\Surnamesiv\expandafter\space\testv}%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname%
+ \if@nameauth@NBSP
+ \protected@edef\Space{,\nobreakspace}%
+ \fi
+ \fi
+ \if@nameauth@AltAKA
+ \ex\@nameauth@FmtName\ex{\arge}%
+ \else
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\arge\ex\Space\SNNd}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNNd\ex\space\arge}%
+ \fi
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% For Western names and affixes: If a pseudonym has not been generated by \cmd{\AKA} or \cmd{\ExcludeName}, and if the proposed pseudonym is not already a mainmatter or frontmatter name, then generate a \textit{see} reference from the pseudonym to a name that will appear in the index.
+% \begin{macrocode}
+ \ifcsname\cscd!PN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: XRef: #3 #4 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname%
+ {macro \AKA: XRef: #3 #4 exists}%
+ \else
+ \ifcsname\cscd!MN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #3 #4 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname%
+ {macro \AKA: Name reference: #3 #4 exists; no xref}%
+ \else
+ \ifcsname\cscd!NF\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #3 #4 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#3#4!PN!}}{}%
- \ifx\testi\@empty%
- \ifx\Suffixiv\@empty \@nameauth@Index{\ISurnamesiv, #3|see{\Surnamesii}}%
- \else \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii}}\fi%
- \else%
- \ifx\Suffixii\@empty%
- \ifx\Suffixiv\@empty%
- \@nameauth@Index{\ISurnamesiv, #3|see{\Surnamesii, #1}}%
- \else%
- \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii, #1}}%
- \fi%
- \else%
- \ifx\Suffixiv\@empty%
- \@nameauth@Index{\ISurnamesiv, #3|see{\Shortii, #1, \Suffixii}}%
- \else%
- \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Shortii, #1, \Suffixii}}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \if@nameauth@RevThisComma%
+ {macro \AKA: Name reference: #3 #4 exists; no xref}%
+ \else
+ \csgdef{\cscd!PN}{}%
+ \ifx\testa\@empty
+ \ifx\Suffd\@empty
+ \@nameauth@Index{\cscd}%
+ {\ISNNd,\space\argc|see{\SNNb}}%
+ \else
+ \@nameauth@Index{\cscd}%
+ {\Shortd,\space\argc,\space\Suffd|see{\SNNb}}%
+ \fi
+ \else
+ \ifx\Suffb\@empty
+ \ifx\Suffd\@empty
+ \@nameauth@Index{\cscd}%
+ {\ISNNd,\space\argc|see{\SNNb,\space\arga}}%
+ \else
+ \@nameauth@Index{\cscd}%
+ {\Shortd,\space\argc,\space\Suffd|see{\SNNb,\space\arga}}%
+ \fi
+ \else
+ \ifx\Suffd\@empty
+ \@nameauth@Index{\cscd}%
+ {\ISNNd,\space\argc|see{\Shortb,\space\arga,\space\Suffb}}%
+ \else
+ \@nameauth@Index{\cscd}%
+ {\Shortd,\space\argc,\space\Suffd|see{\Shortb,\space\arga,\space\Suffb}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+% \end{macrocode}
+% \clearpage\noindent
+% \noindent Print an appropriate version of the pseudonym (capped, reversed, etc.) in the text with no special formatting even if no cross-reference was generated in the index.
+% \begin{macrocode}
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \ifx\testv\@empty%
- \protected@edef\Forenames{#3}%
- \else%
- \protected@edef\Forenames{#5}%
- \fi%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnamesiv\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnamesiv}%
- \fi%
- \fi%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \ifx\teste\@empty
+ \let\FNN\argc%
+ \else
+ \let\FNN\arge%
+ \fi
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNNd\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNNd}%
+ \fi
+ \fi
+% \end{macrocode}
+% Reset all the ``per name'' Boolean values.
+% \begin{macrocode}
\@nameauth@NBSPfalse%
\@nameauth@AltAKAfalse%
\@nameauth@DoCapsfalse%
@@ -2204,20 +2977,19 @@
\@nameauth@ShowCommafalse%
\@nameauth@RevThisfalse%
\@nameauth@RevThisCommafalse%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+% \end{macrocode}
+% Call the full stop detection.
+% \begin{macrocode}
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\AKA*}
-% \changes{v0.9}{2012/02/10}{Added macro}
+% \changes{v0.9}{2012/02/10}{Added}
% This starred form sets a Boolean to print only the alternate name parameter, if that exists, and calls \cmd{\AKA}.
% \begin{macrocode}
-\WithSuffix\newcommandx\AKA*[5][1=\@empty,3=\@empty,5=\@empty]%
-{%
- \@nameauth@AltAKAtrue%
- \AKA[#1]{#2}[#3]{#4}[#5]%
-}
+\WithSuffix\def\AKA*{\@nameauth@AltAKAtrue\AKA}
% \end{macrocode}
% \end{macro}
%
@@ -2225,7 +2997,7 @@
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% \cmd{\PName} is a convenience macro that calls \cmd{\Name}, then \cmd{\AKA}.
% \begin{macrocode}
-\newcommandx\PName[5][1=\@empty,3=\@empty,5=\@empty]%
+\newcommandx*\PName[5][1=\@empty,3=\@empty,5=\@empty]%
{%
\Name[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
}
@@ -2236,191 +3008,320 @@
% \changes{v0.85}{2012/02/05}{Add comma suppression}
% This just calls \cmd{\Name*}, then \cmd{\AKA}.
% \begin{macrocode}
-\WithSuffix\newcommandx\PName*[5][1=\@empty,3=\@empty,5=\@empty]%
-{%
- \Name*[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
-}
+\WithSuffix\def\PName*{\@nameauth@FullNametrue\PName}
% \end{macrocode}
% \end{macro}
+% \clearpage\noindent
%
% \begin{macro}{\TagName}
-% \changes{v1.2}{2012/02/25}{Added macro.}
-% \changes{v1.9}{2015/07/09}{fix collisions}
+% \changes{v1.2}{2012/02/25}{Added}
+% \changes{v1.9}{2015/07/09}{Fix cs collisions}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input; redesign tagging}
% This creates an index entry tag that is applied to a name that is not already used as a cross reference via \cmd{\AKA}.
% \begin{macrocode}
-\newcommandx\TagName[4][1=\@empty, 3=\@empty]%
+\newcommandx*\TagName[4][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro \textbackslash TagName Cannot tag xref: #2.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2}!TAG!}{#4}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and then we parse the arguments, defining the tag control sequences.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
\PackageWarning{nameauth}%
- {macro \textbackslash TagName Cannot tag xref: #2 #3.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3}!TAG!}{#4}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ {macro \TagName: not tagging xref: #2}%
+ \else
+ \csgdef{\csb!TAG}{#4}%
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
\PackageWarning{nameauth}%
- {macro \textbackslash TagName Cannot tag xref: #1 #2.}%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2}!TAG!}{#4}%
- \fi%
- \fi%
+ {macro \TagName: not tagging xref: #2 #3}%
+ \else
+ \csgdef{\csbc!TAG}{#4}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \TagName: not tagging xref: #1 #2}%
+ \else
+ \csgdef{\csab!TAG}{#4}%
+ \fi
+ \fi
}
% \end{macrocode}
% \end{macro}
+% \clearpage\noindent
%
% \begin{macro}{\UntagName}
-% \changes{v1.2}{2012/02/25}{Added macro.}
-% \changes{v1.9}{2015/07/09}{Ensure global undef, fix collisions}
+% \changes{v1.2}{2012/02/25}{Added}
+% \changes{v1.9}{2015/07/09}{Ensure global undef, fix cs collisions}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input; redesign tagging}
% This deletes an index entry tag.
% \begin{macrocode}
-\newcommandx\UntagName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\UntagName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \global\csundef{\@nameauth@CleanName{#2}!TAG!}%
- \else%
- \global\csundef{\@nameauth@CleanName{#2#3}!TAG!}%
- \fi%
- \else%
- \global\csundef{\@nameauth@CleanName{#1#2}!TAG!}%
- \fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and then we parse the arguments, undefining the tag control sequences.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \UntagName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \UntagName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \global\csundef{\csb!TAG}%
+ \else
+ \global\csundef{\csbc!TAG}%
+ \fi
+ \else
+ \global\csundef{\csab!TAG}%
+ \fi
}
% \end{macrocode}
% \end{macro}
+% \clearpage\noindent
+%
+% \begin{macro}{\PretagName}
+% \changes{v2.0}{2015/11/11}{Added}
+% This creates an index entry tag that is applied before a name.
+% \begin{macrocode}
+\newcommandx*\PretagName[4][1=\@empty, 3=\@empty]%
+{%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and then we parse the arguments, defining the tag control sequences.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \PretagName: tagging xref: #2}%
+ \fi
+ \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi
+ \else
+ \ifcsname\csbc!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \PretagName: tagging xref: #2 #3}%
+ \fi
+ \if@nameauth@Pretag\csgdef{\csbc!PRE}{#4\@nameauth@Actual}\fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \PretagName: tagging xref: #1 #2}%
+ \fi
+ \if@nameauth@Pretag\csgdef{\csab!PRE}{#4\@nameauth@Actual}\fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \clearpage\noindent
%
% \begin{macro}{\IndexName}
-% \changes{v0.75}{2012/01/19}{Optional parameter added; mandatory parameter deleted}
-% \changes{v0.85}{2012/02/05}{Add comma suppression, ltxdoc compatibility}
-% \changes{v0.86}{2012/02/06}{Slight tweak using \cmd{\edef}}
-% \changes{v0.9}{2012/02/10}{redesigned macro}
-% \changes{v1.0}{2012/02/20}{Fixed compatibility issues.}
-% \changes{v1.2}{2012/02/25}{Added warnings.}
-% \changes{v1.26}{2012/04/24}{Fixed sorting of name suffixes in index}
-% \changes{v1.4}{2012/07/24}{Made more robust}
+% \changes{v0.75}{2012/01/19}{Use current parameters}
+% \changes{v0.85}{2012/02/05}{Add comma suppression}
+% \changes{v1.26}{2012/04/24}{Fix name suffix sorting}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input; trim spaces; redesign tagging}
% This creates an index entry that is not already a pseudonym. It prints nothing. It does ensure consistent formatting.
% \begin{macrocode}
-\newcommandx\IndexName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\IndexName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testii{#2}%
- \protected@edef\testiii{#3}%
+ \protected@edef\testa{#1}%
+ \protected@edef\arga{\trim@spaces{#1}}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testbr{\@nameauth@Root{#2}}%
+ \protected@edef\testc{#3}%
+ \protected@edef\argc{\trim@spaces{#3}}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and make parsing decisions. Below we handle the types of spaces or commas that will be inserted into the index entries.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \IndexName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \IndexName: Essential name malformed}%
+ \fi
+ \fi
\protected@edef\Space{\space}%
- \if@nameauth@AlwaysComma%
+ \if@nameauth@AlwaysComma
\protected@edef\Space{,\space}%
- \fi%
- \if@nameauth@ShowComma%
+ \fi
+ \if@nameauth@ShowComma
\protected@edef\Space{,\space}%
- \fi%
- \protected@edef\Short{\@nameauth@Root{#2}}%
- \ifx\testii\Short%
- \let\Surnames\Short%
- \protected@edef\Suffix{\@empty}%
- \else%
- \protected@edef\Suffix{\@nameauth@Suffix{#2}}%
- \protected@edef\Surnames{\Short\Space\Suffix}%
- \fi%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro \IndexName: XRef: #2 exists.}%
- \else%
- \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}!TAG!]%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \fi
+% \end{macrocode}
+% Now we deal with suffixes, and whether to handle them for Western or Eastern names.
+% \begin{macrocode}
+ \let\Short\testbr%
+ \ifx\testb\testbr
+ \let\SNN\Short%
+ \protected@edef\Suff{\@empty}%
+ \else
+ \protected@edef\Suff{\@nameauth@Suffix{#2}}%
+ \protected@edef\SNN{\Short\Space\Suff}%
+ \fi
+% \end{macrocode}
+% \clearpage\noindent
+% We create the appropriate index entries with tags, letting the internal indexing macro sort that out. We do not create an index entry in the case that a name has been used as a pseudonym by \cmd{\AKA} or \cmd{\ExcludeName}.
+% \begin{macrocode}
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
\PackageWarning{nameauth}%
- {macro \IndexName: XRef: #2 #3 exists.}%
- \else%
- \@nameauth@Index{\Surnames\Space#3}[\@nameauth@CleanName{#2#3}!TAG!]%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ {macro \IndexName: XRef: #2 exists}%
+ \else
+ \@nameauth@Index{\csb}{\SNN}%
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
\PackageWarning{nameauth}%
- {macro \IndexName: XRef: #1 #2 exists.}%
- \else%
- \ifx\Suffix\@empty \@nameauth@Index{\Short, #1}[\@nameauth@CleanName{#1#2}!TAG!]%
- \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}!TAG!]\fi%
- \fi%
- \fi%
+ {macro \IndexName: XRef: #2 #3 exists}%
+ \else
+ \@nameauth@Index{\csbc}{\SNN\Space\argc}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \IndexName: XRef: #1 #2 exists}%
+ \else
+ \ifx\Suff\@empty
+ \@nameauth@Index{\csab}{\Short,\space\arga}%
+ \else
+ \@nameauth@Index{\csab}{\Short,\space\arga,\space\Suff}%
+ \fi
+ \fi
+ \fi
\@nameauth@ShowCommafalse%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ExcludeName}
-% \changes{v0.94}{2012/02/15}{Added macro}
+% \changes{v0.94}{2012/02/15}{Added}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input}
% This macro prevents a name from being formatted or indexed, making \cmd{\Name} and friends print their arguments, emit a warning, and continue.
% \begin{macrocode}
-\newcommandx\ExcludeName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\ExcludeName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname\relax%
- \else%
- \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and make parsing decisions. Below we parse the name arguments and create a pseudonym control sequence if it does not exist.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \ExcludeName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \ExcludeName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \ExcludeName: Xref: #2 already exists}%
+ \else
+ \ifcsname\csb!MN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 already exists; no exclusion.}%
- \else%
- \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
+ {macro \ExcludeName: Reference: #2 exists; no exclusion}%
+ \else
+ \ifcsname\csb!NF\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 already exists; no exclusion.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2!PN!}}{}%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname\relax%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
+ {macro \ExcludeName: Reference: #2 exists; no exclusion}%
+ \else
+ \csgdef{\csb!PN}{}%
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \ExcludeName: Xref: #2 #3 already exists}%
+ \else
+ \ifcsname\csbc!MN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
+ {macro \ExcludeName: Reference: #2 #3 exists; no exclusion}%
+ \else
+ \ifcsname\csbc!NF\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}%
- \fi%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ {macro \ExcludeName: Reference: #2 #3 exists; no exclusion}%
+ \else
+ \csgdef{\csbc!PN}{}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: XRef: #1 #2 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
+ {macro \ExcludeName: XRef: #1 #2 already exists}%
+ \else
+ \ifcsname\csab!MN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
+ {macro \ExcludeName: Reference: #1 #2 exists; no exclusion}%
+ \else
+ \ifcsname\csab!NF\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}%
- \fi%
- \fi%
- \fi%
- \fi%
+ {macro \ExcludeName: Reference: #1 #2 exists; no exclusion}%
+ \else
+ \csgdef{\csab!PN}{}%
+ \fi
+ \fi
+ \fi
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -2428,182 +3329,174 @@
% \begin{macro}{\ForgetName}
% \changes{v0.75}{2012/01/19}{New parameter added}
% \changes{v1.9}{2015/07/09}{Ensure global undef}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input}
% This undefines a control sequence to force the ``first use'' option of \cmd{\Name}.
% \begin{macrocode}
-\newcommandx\ForgetName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\ForgetName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \global\csundef{\@nameauth@CleanName{#2!MN!}}%
- \global\csundef{\@nameauth@CleanName{#2!NF!}}%
- \else%
- \global\csundef{\@nameauth@CleanName{#2#3!MN!}}%
- \global\csundef{\@nameauth@CleanName{#2#3!NF!}}%
- \fi%
- \else%
- \global\csundef{\@nameauth@CleanName{#1#2!MN!}}%
- \global\csundef{\@nameauth@CleanName{#1#2!NF!}}%
- \fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and then we parse the arguments, undefining the control sequences.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \ForgetName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \ForgetName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \global\csundef{\csb!MN}%
+ \global\csundef{\csb!NF}%
+ \else
+ \global\csundef{\csbc!MN}%
+ \global\csundef{\csbc!NF}%
+ \fi
+ \else
+ \global\csundef{\csab!MN}%
+ \global\csundef{\csab!NF}%
+ \fi
}
% \end{macrocode}
% \end{macro}
+% \clearpage\noindent
%
% \begin{macro}{\SubvertName}
-% \changes{v0.9}{2012/02/10}{Added macro}
+% \changes{v0.9}{2012/02/10}{Added}
+% \changes{v2.0}{2015/11/11}{Isolate malformed input}
% This defines a control sequence to suppress the ``first use'' of \cmd{\Name}.
% \begin{macrocode}
-\newcommandx\SubvertName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\SubvertName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
- \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
- \fi%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
- \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
- \fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+% \end{macrocode}
+% We make copies of the arguments to test them and then we parse the arguments, defining the control sequences.
+% \begin{macrocode}
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \SubvertName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \SubvertName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \csgdef{\csb!MN}{}%
+ \csgdef{\csb!NF}{}%
+ \else
+ \csgdef{\csbc!MN}{}%
+ \csgdef{\csbc!NF}{}%
+ \fi
+ \else
+ \csgdef{\csab!MN}{}%
+ \csgdef{\csab!NF}{}%
+ \fi
}
% \end{macrocode}
% \end{macro}
%
+% \clearpage\noindent
% \begin{environment}{nameauth}
-% \changes{v1.6}{2013/03/10}{Added |nameauth| environment}
+% \changes{v1.6}{2013/03/10}{Added}
+% \changes{v2.0}{2015/11/11}{Redesigned argument handling}
% The |nameauth| environment provides a means to implement shorthand references to names in a document.
% \begin{macrocode}
\newenvironment{nameauth}{%
\begingroup%
+ \let\ex\expandafter%
\csdef{<}##1&##2&##3&##4>{%
\protected@edef\arga{\trim@spaces{##1}}%
- \protected@edef\argb{\trim@spaces{##2}}%
- \protected@edef\argc{\trim@spaces{##3}}%
- \protected@edef\argd{\trim@spaces{##4}}%
+ \protected@edef\testb{\trim@spaces{##2}}%
+ \protected@edef\testc{\trim@spaces{##3}}%
+ \protected@edef\testd{\trim@spaces{##4}}%
+ \newtoks\tokb%
+ \newtoks\tokc%
+ \newtoks\tokd%
+ \tokb\expandafter{##2}%
+ \tokc\expandafter{##3}%
+ \tokd\expandafter{##4}%
\ifx\arga\@empty
\PackageError{nameauth}%
- {environment nameauth: Control sequence missing.}%
+ {environment nameauth: Control sequence missing}%
\else
- \ifx\argc\@empty
+ \ifx\testc\@empty
\PackageError{nameauth}%
- {environment nameauth: Essential name missing.}%
+ {environment nameauth: Essential name missing}%
\else
- \ifx\argd\@empty
- \ifx\argb\@empty
- \csxdef{\arga}{\Name{\argc}}%
- \csxdef{L\arga}{\Name*{\argc}}%
- \csxdef{S\arga}{\FName{\argc}}%
+ \ifcsname\arga\endcsname
+ \PackageWarning{nameauth}%
+ {environment nameauth: Redefinition of shorthands}%
+ \fi
+ \ifx\testd\@empty
+ \ifx\testb\@empty
+ \ex\csxdef\ex{\ex\arga\ex}\ex{\ex\Name\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex L\ex\arga\ex}\ex{\ex\Name\ex*\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex S\ex\arga\ex}\ex{\ex\FName\ex{\the\tokc}}%
\else
- \csxdef{\arga}{\Name[\argb]{\argc}}%
- \csxdef{L\arga}{\Name*[\argb]{\argc}}%
- \csxdef{S\arga}{\FName[\argb]{\argc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
+ \ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex[\ex\the\ex\tokb\ex]%
+ \ex{\the\tokc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex*%
+ \ex\ex\ex[\ex\the\ex\tokb\ex]\ex{\the\tokc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\FName\ex\ex\ex[%
+ \ex\the\ex\tokb\ex]\ex{\the\tokc}}%
\fi
\else
- \ifx\argb\@empty
- \csxdef{\arga}{\Name{\argc}[\argd]}%
- \csxdef{L\arga}{\Name*{\argc}[\argd]}%
- \csxdef{S\arga}{\FName{\argc}[\argd]}%
+ \ifx\testb\@empty
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
+ \ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex{\ex\the\ex\tokc\ex}%
+ \ex[\the\tokd]}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\Name%
+ \ex\ex\ex*\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\FName\ex\ex\ex{%
+ \ex\the\ex\tokc\ex}\ex[\the\tokd]}%
\else
- \csxdef{\arga}{\Name[\argb]{\argc}[\argd]}%
- \csxdef{L\arga}{\Name*[\argb]{\argc}[\argd]}%
- \csxdef{S\arga}{\FName[\argb]{\argc}[\argd]}%
+ \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex\arga\ex\ex\ex\ex\ex\ex\ex}%
+ \ex\ex\ex\ex\ex\ex\ex{\ex\ex\ex\ex\ex\ex\ex\Name%
+ \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\tokb%
+ \ex\ex\ex]\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex L\ex\ex\ex\ex\ex\ex\ex\arga%
+ \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex\Name\ex\ex\ex\ex\ex\ex\ex*%
+ \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\tokb%
+ \ex\ex\ex]\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex S\ex\ex\ex\ex\ex\ex\ex\arga%
+ \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex\FName\ex\ex\ex\ex\ex\ex\ex[%
+ \ex\ex\ex\the\ex\ex\ex\tokb\ex\ex\ex]%
+ \ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
\fi
\fi
\fi
\fi
\ignorespaces%
- }%
-}{\endgroup}
+ }\ignorespaces%
+}{\endgroup\ignorespaces}
% \end{macrocode}
% \end{environment}
%
-% \begin{macro}{\NamesInactive}
-% Switch to the ``non-formatted'' species of names.
-% \begin{macrocode}
-\newcommand{\NamesInactive}{\@nameauth@DoFormatfalse}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\NamesActive}
-% Switch to the ``formatted'' species of names.
-% \begin{macrocode}
-\newcommand{\NamesActive}{\@nameauth@DoFormattrue}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AllCapsInactive}
-% Turn off global surname capitalization.
-% \changes{v1.5}{2013/02/22}{Added macro}
-% \begin{macrocode}
-\newcommand{\AllCapsInactive}{\@nameauth@AllCapsfalse}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\AllCapsActive}
-% Turn on global surname capitalization.
-% \changes{v1.5}{2013/02/22}{Added macro}
-% \begin{macrocode}
-\newcommand{\AllCapsActive}{\@nameauth@AllCapstrue}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ReverseInactive}
-% Turn off global name reversing.
-% \changes{v1.5}{2013/02/22}{Added macro}
-% \begin{macrocode}
-\newcommand{\ReverseInactive}{\@nameauth@RevAllfalse}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ReverseActive}
-% Turn on global name reversing.
-% \changes{v1.5}{2013/02/22}{Added macro}
-% \begin{macrocode}
-\newcommand{\ReverseActive}{\@nameauth@RevAlltrue}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ReverseCommaInactive}
-% Turn off global ``last-name-comma-first.''
-% \changes{v1.5}{2013/02/22}{Added macro}
-% \begin{macrocode}
-\newcommand{\ReverseCommaInactive}%
- {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\ReverseCommaActive}
-% Turn on global ``last-name-comma-first.''
-% \changes{v1.5}{2013/02/22}{Added macro}
-% \begin{macrocode}
-\newcommand{\ReverseCommaActive}%
- {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\IndexInactive}
-% \changes{v0.94}{2012/02/15}{Added macro}
-% turn off global indexing of names.
-% \begin{macrocode}
-\newcommand{\IndexInactive}{\@nameauth@DoIndexfalse}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\IndexActive}
-% \changes{v0.94}{2012/02/15}{Added macro}
-% turn on global indexing of names.
-% \begin{macrocode}
-\newcommand{\IndexActive}{\@nameauth@DoIndextrue}
-% \end{macrocode}
-% \end{macro}
-% \clearpage
-% \Finale
+%\Finale
\endinput
-% \iffalse
%</package>
-% \fi
diff --git a/Master/texmf-dist/source/latex/nameauth/nameauth.ins b/Master/texmf-dist/source/latex/nameauth/nameauth.ins
index 94a0506e1c7..27d91d5f245 100644
--- a/Master/texmf-dist/source/latex/nameauth/nameauth.ins
+++ b/Master/texmf-dist/source/latex/nameauth/nameauth.ins
@@ -1,55 +1,72 @@
%%
-%% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net>
+%% This is file `nameauth.ins',
+%% generated with the docstrip utility.
%%
-%% This file may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License, either version 1.2 of this license
-%% or (at your option) any later version. The latest version of this
-%% license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% and version 1.2 or later is part of all distributions of LaTeX version
-%% 1999/12/01 or later.
+%% The original source files were:
%%
-
+%% nameauth.dtx (with options: `install')
+%% --------:| ----------------------------------------------------------------
+%% nameauth:| Name authority mechanism for consistency in text and index
+%% Author:| Charles P. Schaum
+%% E-mail:| charles dot schaum at comcast dot net
+%% License:| Released under the LaTeX Project Public License v1.3c or later
+%% See:| http://www.latex-project.org/lppl.txt
+%%
\input docstrip.tex
\keepsilent
-
-\usedir{tex/latex/nameauth}
-
+\askforoverwritefalse
\preamble
+--------:| ----------------------------------------------------------------
+nameauth:| Name authority mechanism for consistency in text and index
+ Author:| Charles P. Schaum
+ E-mail:| charles dot schaum at comcast dot net
+ License:| Released under the LaTeX Project Public License v1.3c or later
+ See:| http://www.latex-project.org/lppl.txt
-This is a generated file.
+\endpreamble
+\postamble
-Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net>
+Copyright (C) 2015 by Charles P. Schaum <charles dot schaum at comcast dot net>
-This file may be distributed and/or modified under the conditions of
-the LaTeX Project Public License, either version 1.2 of this license
-or (at your option) any later version. The latest version of this
-license is in:
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License (LPPL), either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in the file:
- http://www.latex-project.org/lppl.txt
+http://www.latex-project.org/lppl.txt
-and version 1.2 or later is part of all distributions of LaTeX version
-1999/12/01 or later.
+This work is "maintained" (as per LPPL maintenance status) by
+Charles P. Schaum.
-\endpreamble
+This work consists of the file nameauth.dtx and a Makefile.
+Running "make" generates the derived files README, nameauth.pdf and nameauth.sty.
+Running "make inst" installs the files in the user's TeX tree.
+Running "make install" installs the files in the local TeX tree.
-\generate{\file{nameauth.sty}{\from{nameauth.dtx}{package}}}
-
-\obeyspaces
-\Msg{*************************************************************}
-\Msg{* *}
-\Msg{* To finish the installation you have to move the following *}
-\Msg{* file into a directory searched by TeX: *}
-\Msg{* *}
-\Msg{* nameauth.sty *}
-\Msg{* *}
-\Msg{* To produce the documentation run the file nameauth.dtx *}
-\Msg{* through LaTeX. *}
-\Msg{* *}
-\Msg{* Happy TeXing! *}
-\Msg{* *}
-\Msg{*************************************************************}
+\endpostamble
+\usedir{tex/latex/nameauth}
+\generate{
+ \file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
\endbatchfile
+%%
+%% Copyright (C) 2015 by Charles P. Schaum <charles dot schaum at comcast dot net>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (LPPL), either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Charles P. Schaum.
+%%
+%% This work consists of the file nameauth.dtx and a Makefile.
+%% Running "make" generates the derived files README, nameauth.pdf and nameauth.sty.
+%% Running "make inst" installs the files in the user's TeX tree.
+%% Running "make install" installs the files in the local TeX tree.
+%%
+%%
+%% End of file `nameauth.ins'.
diff --git a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
index e6ae07608af..a78b978c695 100644
--- a/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
+++ b/Master/texmf-dist/tex/latex/nameauth/nameauth.sty
@@ -5,34 +5,27 @@
%% The original source files were:
%%
%% nameauth.dtx (with options: `package')
+%% --------:| ----------------------------------------------------------------
+%% nameauth:| Name authority mechanism for consistency in text and index
+%% Author:| Charles P. Schaum
+%% E-mail:| charles dot schaum at comcast dot net
+%% License:| Released under the LaTeX Project Public License v1.3c or later
+%% See:| http://www.latex-project.org/lppl.txt
%%
-%% This is a generated file.
-%%
-%% Copyright (C) 2011 by Charles P. Schaum <charles dot schaum at comcast dot net>
-%%
-%% This file may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License, either version 1.2 of this license
-%% or (at your option) any later version. The latest version of this
-%% license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% and version 1.2 or later is part of all distributions of LaTeX version
-%% 1999/12/01 or later.
-%%
-\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{nameauth}
- [2015/07/09 v1.9 name authority macros to aid consistent display and indexing of names]
+ [2015/11/11 v2.0 Name authority mechanism for consistency in text and index]
\newif\if@nameauth@FullName
\newif\if@nameauth@FirstName
\newif\if@nameauth@AltAKA
\newif\if@nameauth@DoFormat
-\newif\if@nameauth@DoIndex
+\newif\if@nameauth@FirstFormat
\newif\if@nameauth@AlwaysFormat
\newif\if@nameauth@AlwaysComma
\newif\if@nameauth@ShowComma
\newif\if@nameauth@NBSP
-\newif\if@nameauth@Comma
+\newif\if@nameauth@DoIndex
+\newif\if@nameauth@Pretag
\newif\if@nameauth@Punct
\newif\if@nameauth@DoCaps
\newif\if@nameauth@AllCaps
@@ -42,6 +35,7 @@
\newif\if@nameauth@RevAllComma
\newif\if@nameauth@RevThisComma
\newcommand{\NamesFormat}{}
+\def\@nameauth@Actual{@}
\DeclareOption{mainmatter}{\@nameauth@DoFormattrue}
\DeclareOption{frontmatter}{\@nameauth@DoFormatfalse}
\DeclareOption{smallcaps}{\renewcommand{\NamesFormat}{\scshape}}
@@ -51,28 +45,36 @@
\DeclareOption{alwaysformat}{\@nameauth@AlwaysFormattrue}
\DeclareOption{allcaps}{\@nameauth@AllCapstrue}
\DeclareOption{normalcaps}{\@nameauth@AllCapsfalse}
-\DeclareOption{allreversed}{\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse}
-\DeclareOption{allrevcomma}{\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
-\DeclareOption{notreversed}{\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
+\DeclareOption{allreversed}%
+ {\@nameauth@RevAlltrue\@nameauth@RevAllCommafalse}
+\DeclareOption{allrevcomma}%
+ {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
+\DeclareOption{notreversed}%
+ {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
\DeclareOption{comma}{\@nameauth@AlwaysCommatrue}
\DeclareOption{nocomma}{\@nameauth@AlwaysCommafalse}
\DeclareOption{index}{\@nameauth@DoIndextrue}
\DeclareOption{noindex}{\@nameauth@DoIndexfalse}
-\ExecuteOptions{nocomma,mainmatter,index,normalcaps,notreversed,smallcaps}
+\DeclareOption{pretag}{\@nameauth@Pretagtrue}
+\DeclareOption{nopretag}{\@nameauth@Pretagfalse}
+\ExecuteOptions%
+ {nocomma,%
+ mainmatter,%
+ index,%
+ pretag,%
+ normalcaps,%
+ notreversed,%
+ smallcaps}
\ProcessOptions\relax
\RequirePackage{etoolbox}
\RequirePackage{trimspaces}
\RequirePackage{suffix}
\RequirePackage{xargs}
-\newcommand*{\@nameauth@CleanName}[1]%
-{%
- \expandafter\zap@space\detokenize{#1} \@empty%
-}
+\newcommand*{\@nameauth@Clean}[1]%
+ {\expandafter\zap@space\detokenize{#1} \@empty}
\newcommand*{\@nameauth@Root}[1]%
-{%
- \@nameauth@TrimRoot#1,\@empty\relax%
-}
-\def\@nameauth@TrimRoot#1,#2\relax{#1}
+ {\@nameauth@TrimRoot#1,\@empty\relax}
+\def\@nameauth@TrimRoot#1,#2\relax{\trim@spaces{#1}}
\newcommand*{\@nameauth@CapRoot}[1]%
{\@nameauth@CR#1\relax}
\def\@nameauth@CR#1#2\relax{\uppercase{#1}\@nameauth@Root{#2}}
@@ -89,548 +91,609 @@
\@nameauth@Punctfalse%
\TestDot#1\TestEnd.\TestEnd\TestStop%
}
-\def\@nameauth@CheckDot{\futurelet\@token\@nameauth@EvalDot}
-\def\@nameauth@EvalDot%
+\newcommand*{\@nameauth@CheckDot}%
+ {\futurelet\@token\@nameauth@EvalDot}
+\newcommand*{\@nameauth@EvalDot}%
{\let\@period=.\ifx\@token\@period\expandafter\@gobble \fi}
-\newcommand{\@nameauth@FmtName}[1]%
+\newcommand*{\@nameauth@FmtName}[1]%
{%
+ \if@nameauth@AlwaysFormat\@nameauth@FirstFormattrue\fi
\@nameauth@TestDot{#1}%
- \if@nameauth@DoFormat%
- \bgroup\NamesFormat{#1}\egroup%
- \else%
- #1%
- \fi%
-}
-\WithSuffix\newcommand\@nameauth@FmtName*[1]%
-{%
- \@nameauth@TestDot{#1}%
- \if@nameauth@DoFormat%
- \if@nameauth@AlwaysFormat%
+ \if@nameauth@DoFormat
+ \if@nameauth@FirstFormat
\bgroup\NamesFormat{#1}\egroup%
- \else%
+ \else
#1%
- \fi%
- \else%
+ \fi
+ \else
#1%
- \fi%
+ \fi
}
-\newcommandx\@nameauth@Index[2][2=\@empty]%
+\newcommand*{\@nameauth@Index}[2]%
{%
- \ifx#2\@empty%
- \if@nameauth@DoIndex\index{#1}\fi%
- \else%
- \ifcsname#2\endcsname%
- \if@nameauth@DoIndex\index{#1\csname#2\endcsname}\fi%
- \else%
- \if@nameauth@DoIndex\index{#1}\fi%
- \fi%
- \fi%
+ \def\cseq{#1}%
+ \ifcsname\cseq!TAG\endcsname
+ \ifcsname\cseq!PRE\endcsname
+ \if@nameauth@DoIndex
+ \index{\csname\cseq!PRE\endcsname#2\csname\cseq!TAG\endcsname}%
+ \fi
+ \else
+ \if@nameauth@DoIndex\index{#2\csname\cseq!TAG\endcsname}\fi
+ \fi
+ \else
+ \ifcsname\cseq!PRE\endcsname
+ \if@nameauth@DoIndex\index{\csname\cseq!PRE\endcsname#2}\fi
+ \else
+ \if@nameauth@DoIndex\index{#2}\fi
+ \fi
+ \fi
}
-\newcommand{\CapThis}{\@nameauth@DoCapstrue}
-\newcommand{\CapName}{\@nameauth@AllThistrue}
-\newcommand{\RevName}{\@nameauth@RevThistrue}
-\newcommand{\RevComma}%
+\newcommand*{\CapThis}{\@nameauth@DoCapstrue}
+\newcommand*{\CapName}{\@nameauth@AllThistrue}
+\newcommand*{\RevName}{\@nameauth@RevThistrue}
+\newcommand*{\RevComma}%
{\@nameauth@RevThistrue\@nameauth@RevThisCommatrue}
-\newcommand{\ShowComma}{\@nameauth@ShowCommatrue}
-\newcommand{\KeepAffix}{\@nameauth@NBSPtrue}
-\newcommandx\Name[3][1=\@empty, 3=\@empty]%
+\newcommand*{\ShowComma}{\@nameauth@ShowCommatrue}
+\newcommand*{\KeepAffix}{\@nameauth@NBSPtrue}
+\newcommand*{\NamesInactive}{\@nameauth@DoFormatfalse}
+\newcommand*{\NamesActive}{\@nameauth@DoFormattrue}
+\newcommand*{\AllCapsInactive}{\@nameauth@AllCapsfalse}
+\newcommand*{\AllCapsActive}{\@nameauth@AllCapstrue}
+\newcommand*{\ReverseInactive}{\@nameauth@RevAllfalse}
+\newcommand*{\ReverseActive}{\@nameauth@RevAlltrue}
+\newcommand*{\ReverseCommaInactive}%
+ {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
+\newcommand*{\ReverseCommaActive}%
+ {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
+\newcommand*{\IndexInactive}{\@nameauth@DoIndexfalse}
+\newcommand*{\IndexActive}{\@nameauth@DoIndextrue}
+\newcommand*{\IndexActual}[1]{\gdef\@nameauth@Actual{#1}}
+\newcommandx*\Name[3][1=\@empty, 3=\@empty]%
{%
+ \let\ex\expandafter%
\leavevmode\hbox{}%
- \protected@edef\testi{#1}%
- \protected@edef\testii{#2}%
- \protected@edef\testiii{#3}%
- \if@nameauth@AllCaps\@nameauth@AllThistrue\fi%
- \if@nameauth@RevAll\@nameauth@RevThistrue\fi%
- \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\arga{\trim@spaces{#1}}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testbr{\@nameauth@Root{#2}}%
+ \protected@edef\testc{#3}%
+ \protected@edef\argc{\trim@spaces{#3}}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \Name: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name malformed}%
+ \fi
+ \fi
+ \if@nameauth@AllCaps\@nameauth@AllThistrue\fi
+ \if@nameauth@RevAll\@nameauth@RevThistrue\fi
+ \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi
\protected@edef\ISpace{\space}%
\protected@edef\Space{\space}%
- \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi%
- \if@nameauth@AlwaysComma%
+ \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi
+ \if@nameauth@AlwaysComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@ShowComma%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \if@nameauth@ShowComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
\protected@edef\RawShort{\@nameauth@Root{#2}}%
\protected@edef\CapShort{\@nameauth@CapRoot{#2}}%
\protected@edef\AllCapShort{\@nameauth@AllCapRoot{#2}}%
\let\IndexShort\RawShort%
- \ifx\testii\RawShort%
- \protected@edef\Suffix{\@empty}%
- \let\IndexSurnames\RawShort%
+ \ifx\testb\testbr
+ \protected@edef\Suff{\@empty}%
+ \let\IndexSNN\RawShort%
\let\Reversed\RawShort%
- \let\Surnames\RawShort%
+ \let\SNN\RawShort%
\let\PrintShort\RawShort%
- \if@nameauth@DoCaps%
+ \if@nameauth@DoCaps
\let\Reversed\CapShort%
- \let\Surnames\CapShort%
+ \let\SNN\CapShort%
\let\PrintShort\CapShort%
- \fi%
- \if@nameauth@AllThis%
+ \fi
+ \if@nameauth@AllThis
\let\Reversed\AllCapShort%
- \let\Surnames\AllCapShort%
+ \let\SNN\AllCapShort%
\let\PrintShort\AllCapShort%
- \fi%
- \else%
- \protected@edef\Suffix{\@nameauth@Suffix{#2}}%
- \protected@edef\IndexSurnames{\RawShort\ISpace\Suffix}%
- \protected@edef\Reversed{\Suffix\Space\RawShort}%
- \protected@edef\Surnames{\RawShort\Space\Suffix}%
- \if@nameauth@RevThis%
- \let\PrintShort\Suffix%
- \else%
+ \fi
+ \else
+ \protected@edef\Suff{\@nameauth@Suffix{#2}}%
+ \protected@edef\IndexSNN{\RawShort\ISpace\Suff}%
+ \protected@edef\Reversed{\Suff\Space\RawShort}%
+ \protected@edef\SNN{\RawShort\Space\Suff}%
+ \if@nameauth@RevThis
+ \let\PrintShort\Suff%
+ \else
\let\PrintShort\RawShort%
- \fi%
- \if@nameauth@DoCaps%
- \protected@edef\Reversed{\Suffix\Space\CapShort}%
- \protected@edef\Surnames{\CapShort\Space\Suffix}%
- \if@nameauth@RevThis%
- \let\PrintShort\Suffix%
- \else%
+ \fi
+ \if@nameauth@DoCaps
+ \protected@edef\Reversed{\Suff\Space\CapShort}%
+ \protected@edef\SNN{\CapShort\Space\Suff}%
+ \if@nameauth@RevThis
+ \let\PrintShort\Suff%
+ \else
\let\PrintShort\CapShort%
- \fi%
- \fi%
- \if@nameauth@AllThis%
- \protected@edef\Reversed{\Suffix\Space\AllCapShort}%
- \protected@edef\Surnames{\AllCapShort\Space\Suffix}%
- \if@nameauth@RevThis%
- \let\PrintShort\Suffix%
- \else%
+ \fi
+ \fi
+ \if@nameauth@AllThis
+ \protected@edef\Reversed{\Suff\Space\AllCapShort}%
+ \protected@edef\SNN{\AllCapShort\Space\Suff}%
+ \if@nameauth@RevThis
+ \let\PrintShort\Suff%
+ \else
\let\PrintShort\AllCapShort%
- \fi%
- \fi%
- \fi%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
+ \fi
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
\PackageWarning{nameauth}%
- {macro \Name: Xref: #2 cannot be a page reference.}%
- \else%
- \@nameauth@Index{\IndexSurnames}[\@nameauth@CleanName{#2}!TAG!]%
- \fi%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
- \if@nameauth@FirstName%
- \@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
- \@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ {macro \Name: Xref: #2 cannot be a page reference}%
+ \else
+ \@nameauth@Index{\csb}{\IndexSNN}%
+ \fi
+ \if@nameauth@DoFormat
+ \ifcsname\csb!MN\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter{\Surnames}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
- \if@nameauth@FirstName%
- \@nameauth@FullNamefalse%
- \@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
- \@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ \fi
+ \if@nameauth@FullName
+ \@nameauth@FullNamefalse%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+ \@nameauth@FirstFormattrue%
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
+ \csgdef{\csb!MN}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csb!NF\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnames}%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \fi
+ \if@nameauth@FullName
+ \@nameauth@FullNamefalse%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+ \@nameauth@FullNamefalse%
+ \@nameauth@FirstNamefalse%
+ \csgdef{\csb!NF}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNN}%
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
\PackageWarning{nameauth}%
- {macro \Name: Xref: #2 #3 cannot be a page reference.}%
- \else%
- \@nameauth@Index{\IndexSurnames\ISpace#3}[\@nameauth@CleanName{#2#3}!TAG!]%
- \fi%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
- \if@nameauth@FirstName%
+ {macro \Name: Xref: #2 #3 cannot be a page reference}%
+ \else
+ \@nameauth@Index{\csbc}{\IndexSNN\ISpace\argc}%
+ \fi
+ \if@nameauth@DoFormat
+ \ifcsname\csbc!MN\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\space#3}%
- \fi%
- \else%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testiii}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \else
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\argc}%
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \fi
+ \else
+ \@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Surnames\expandafter\space#3}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
- \if@nameauth@FirstName%
+ \csgdef{\csbc!MN}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csbc!NF\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \fi%
- \if@nameauth@FullName%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\space#3}%
- \fi%
- \else%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testiii}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \else
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\argc}%
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \fi
+ \else
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\testiii\expandafter\space\Surnames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\space\testiii}%
- \fi%
- \fi%
- \fi%
- \fi%
- \else%
- \if@nameauth@RevThisComma%
+ \csgdef{\csbc!NF}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\argc\ex\space\SNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\space\argc}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \ifx\testiii\@empty%
- \protected@edef\Forenames{#1}%
- \else%
- \protected@edef\Forenames{#3}%
- \fi
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \ifx\testc\@empty
+ \let\FNN\arga%
+ \else
+ \let\FNN\argc%
+ \fi
+ \ifcsname\csab!PN\endcsname
\PackageWarning{nameauth}%
- {macro \Name: Xref: #1 #2 cannot be a page reference.}%
- \else%
- \ifx\Suffix\@empty%
- \@nameauth@Index{\IndexShort, #1}[\@nameauth@CleanName{#1#2}!TAG!]%
- \else%
- \@nameauth@Index{\IndexShort, #1, \Suffix}[\@nameauth@CleanName{#1#2}!TAG!]%
- \fi%
- \fi%
- \if@nameauth@DoFormat%
- \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
- \if@nameauth@FirstName%
+ {macro \Name: Xref: #1 #2 cannot be a page reference}%
+ \else
+ \ifx\Suff\@empty
+ \@nameauth@Index{\csab}{\IndexShort,\space\arga}%
+ \else
+ \@nameauth@Index{\csab}{\IndexShort,\space\arga,\space\Suff}%
+ \fi
+ \fi
+ \if@nameauth@DoFormat
+ \ifcsname\csab!MN\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \let\PrintShort\Forenames%
- \fi%
- \if@nameauth@FullName%
+ \let\PrintShort\FNN%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
+ \@nameauth@FirstFormattrue%
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
- \if@nameauth@FirstName%
+ \csgdef{\csab!MN}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!NF\endcsname
+ \if@nameauth@FirstName
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \let\PrintShort\Forenames%
- \fi%
- \if@nameauth@FullName%
+ \let\PrintShort\FNN%
+ \fi
+ \if@nameauth@FullName
\@nameauth@FullNamefalse%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\PrintShort}%
- \fi%
- \else%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \else
+ \ex\@nameauth@FmtName\ex{\PrintShort}%
+ \fi
+ \else
\@nameauth@FullNamefalse%
\@nameauth@FirstNamefalse%
- \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnames\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnames}%
- \fi%
- \fi%
- \fi%
- \fi%
+ \csgdef{\csab!NF}{}%
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNN\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNN}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \@nameauth@FirstFormatfalse%
\@nameauth@NBSPfalse%
\@nameauth@DoCapsfalse%
\@nameauth@AllThisfalse%
\@nameauth@ShowCommafalse%
\@nameauth@RevThisfalse%
\@nameauth@RevThisCommafalse%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
-\WithSuffix\newcommandx\Name*[3][1=\@empty, 3=\@empty]%
- {\@nameauth@FullNametrue\Name[#1]{#2}[#3]}
-\newcommandx\FName[3][1=\@empty, 3=\@empty]%
- {\@nameauth@FirstNametrue\Name[#1]{#2}[#3]}
-\WithSuffix\newcommandx\FName*[3][1=\@empty, 3=\@empty]%
- {\@nameauth@FirstNametrue\Name[#1]{#2}[#3]}
-\newcommandx\AKA[5][1=\@empty, 3=\@empty, 5=\@empty]%
+\WithSuffix\def\Name*{\@nameauth@FullNametrue\Name}
+\def\FName{\@nameauth@FirstNametrue\Name}
+\WithSuffix\def\FName*{\@nameauth@FirstNametrue\Name}
+\newcommandx*\AKA[5][1=\@empty, 3=\@empty, 5=\@empty]%
{%
+ \let\ex\expandafter%
\leavevmode\hbox{}%
- \protected@edef\testi{#1}%
- \protected@edef\testii{#2}%
- \protected@edef\testiii{#3}%
- \protected@edef\testiv{#4}%
- \protected@edef\testv{#5}%
- \if@nameauth@AllCaps\@nameauth@AllThistrue\fi%
- \if@nameauth@RevAll\@nameauth@RevThistrue\fi%
- \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\arga{\trim@spaces{#1}}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testbr{\@nameauth@Root{#2}}%
+ \protected@edef\testc{#3}%
+ \protected@edef\argc{\trim@spaces{#3}}%
+ \protected@edef\testd{\trim@spaces{#4}}%
+ \protected@edef\testdr{\@nameauth@Root{#4}}%
+ \protected@edef\teste{#5}%
+ \protected@edef\arge{\trim@spaces{#5}}%
+ \def\csd{\@nameauth@Clean{#4}}%
+ \def\csde{\@nameauth@Clean{#4#5}}%
+ \def\cscd{\@nameauth@Clean{#3!#4}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testd\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name missing}%
+ \else
+ \ifx\csd\@empty
+ \PackageError{nameauth}%
+ {macro \AKA: Essential name malformed}%
+ \fi
+ \fi
+ \if@nameauth@AllCaps\@nameauth@AllThistrue\fi
+ \if@nameauth@RevAll\@nameauth@RevThistrue\fi
+ \if@nameauth@RevAllComma\@nameauth@RevThisCommatrue\fi
\protected@edef\ISpace{\space}%
\protected@edef\Space{\space}%
- \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi%
- \if@nameauth@AlwaysComma%
+ \if@nameauth@NBSP\protected@edef\Space{\nobreakspace}\fi
+ \if@nameauth@AlwaysComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@ShowComma%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \if@nameauth@ShowComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \protected@edef\Shortii{\@nameauth@Root{#2}}%
- \protected@edef\Shortiv{\@nameauth@Root{#4}}%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \protected@edef\Shortb{\@nameauth@Root{#2}}%
+ \protected@edef\Shortd{\@nameauth@Root{#4}}%
\protected@edef\CapShort{\@nameauth@CapRoot{#4}}%
\protected@edef\AllCapShort{\@nameauth@AllCapRoot{#4}}%
- \ifx\testii\Shortii%
- \let\Surnamesii\Shortii%
- \protected@edef\Suffixii{\@empty}%
- \else%
- \protected@edef\Suffixii{\@nameauth@Suffix{#2}}%
- \protected@edef\Surnamesii{\Shortii\ISpace\Suffixii}%
- \fi%
- \ifx\testiv\Shortiv%
- \protected@edef\Suffixiv{\@empty}%
- \let\ISurnamesiv\Shortiv%
- \let\Reversed\Shortiv%
- \let\Surnamesiv\Shortiv%
- \if@nameauth@DoCaps%
- \let\Surnamesiv\CapShort%
+ \ifx\testb\testbr
+ \let\SNNb\Shortb%
+ \protected@edef\Suffb{\@empty}%
+ \else
+ \protected@edef\Suffb{\@nameauth@Suffix{#2}}%
+ \protected@edef\SNNb{\Shortb\ISpace\Suffb}%
+ \fi
+ \ifx\testd\testdr
+ \protected@edef\Suffd{\@empty}%
+ \let\ISNNd\Shortd%
+ \let\Reversed\Shortd%
+ \let\SNNd\Shortd%
+ \if@nameauth@DoCaps
+ \let\SNNd\CapShort%
\let\Reversed\CapShort%
- \fi%
- \if@nameauth@AllThis%
- \let\Surnamesiv\AllCapShort%
+ \fi
+ \if@nameauth@AllThis
+ \let\SNNd\AllCapShort%
\let\Reversed\AllCapShort%
- \fi%
- \else%
- \protected@edef\Suffixiv{\@nameauth@Suffix{#4}}%
- \protected@edef\ISurnamesiv{\Shortiv\ISpace\Suffixiv}%
- \protected@edef\Reversed{\Suffixiv\Space\Shortiv}%
- \protected@edef\Surnamesiv{\Shortiv\Space\Suffixiv}%
- \if@nameauth@DoCaps%
- \protected@edef\Reversed{\Suffixiv\Space\CapShort}%
- \protected@edef\Surnamesiv{\CapShort\Space\Suffixiv}%
- \fi%
- \if@nameauth@AllThis%
- \protected@edef\Reversed{\Suffixiv\Space\AllCapShort}%
- \protected@edef\Surnamesiv{\AllCapShort\Space\Suffixiv}%
- \fi%
- \fi%
- \ifx\testiii\@empty%
- \ifx\testv\@empty%
- \ifcsname\@nameauth@CleanName{#4!PN!}\endcsname%
+ \fi
+ \else
+ \protected@edef\Suffd{\@nameauth@Suffix{#4}}%
+ \protected@edef\ISNNd{\Shortd\ISpace\Suffd}%
+ \protected@edef\Reversed{\Suffd\Space\Shortd}%
+ \protected@edef\SNNd{\Shortd\Space\Suffd}%
+ \if@nameauth@DoCaps
+ \protected@edef\Reversed{\Suffd\Space\CapShort}%
+ \protected@edef\SNNd{\CapShort\Space\Suffd}%
+ \fi
+ \if@nameauth@AllThis
+ \protected@edef\Reversed{\Suffd\Space\AllCapShort}%
+ \protected@edef\SNNd{\AllCapShort\Space\Suffd}%
+ \fi
+ \fi
+ \ifx\testc\@empty
+ \ifx\teste\@empty
+ \ifcsname\csd!PN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: XRef: #4 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4!MN!}\endcsname%
+ {macro \AKA: XRef: #4 exists}%
+ \else
+ \ifcsname\csd!MN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
+ {macro \AKA: Name reference: #4 exists; no xref}%
+ \else
+ \ifcsname\csd!NF\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#4!PN!}}{}%
- \ifx\testi\@empty%
- \@nameauth@Index{\ISurnamesiv|see{\Surnamesii}}%
- \else%
- \ifx\Suffixii\@empty \@nameauth@Index{\ISurnamesiv|see{\Surnamesii, #1}}%
- \else \@nameauth@Index{\ISurnamesiv|see{\Shortii, #1, \Suffixii}}\fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \if@nameauth@RevThisComma%
+ {macro \AKA: Name reference: #4 exists; no xref}%
+ \else
+ \csgdef{\csd!PN}{}%
+ \ifx\testa\@empty
+ \@nameauth@Index{\csd}%
+ {\ISNNd|see{\SNNb}}%
+ \else
+ \ifx\Suffb\@empty
+ \@nameauth@Index{\csd}%
+ {\ISNNd|see{\SNNb,\space\arga}}%
+ \else
+ \@nameauth@Index{\csd}%
+ {\ISNNd|see{\Shortb,\space\arga,\space\Suffb}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Reversed}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\Surnamesiv}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!PN!}\endcsname%
+ \if@nameauth@NBSP
+ \protected@edef\Space{,\nobreakspace}%
+ \fi
+ \fi
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\Reversed}%
+ \else
+ \ex\@nameauth@FmtName\ex{\SNNd}%
+ \fi
+ \else
+ \ifcsname\csde!PN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: XRef: #4 #5 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!MN!}\endcsname%
+ {macro \AKA: XRef: #4 #5 exists}%
+ \else
+ \ifcsname\csde!MN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 #5 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#4#5!NF!}\endcsname%
+ {macro \AKA: Name reference: #4 #5 exists; no xref}%
+ \else
+ \ifcsname\csde!NF\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #4 #5 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#4#5!PN!}}{}%
- \ifx\testi\@empty%
- \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Surnamesii}}%
- \else%
- \ifx\Suffixii\@empty \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Surnamesii, #1}}%
- \else \@nameauth@Index{\ISurnamesiv\ISpace#5|see{\Shortii, #1, \Suffixii}}\fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \if@nameauth@RevThisComma%
+ {macro \AKA: Name reference: #4 #5 exists; no xref}%
+ \else
+ \csgdef{\csde!PN}{}%
+ \ifx\testa\@empty
+ \@nameauth@Index{\csde}%
+ {\ISNNd\ISpace\arge|see{\SNNb}}%
+ \else
+ \ifx\Suffb\@empty
+ \@nameauth@Index{\csde}%
+ {\ISNNd\ISpace\arge|see{\SNNb,\space\arga}}%
+ \else
+ \@nameauth@Index{\csde}%
+ {\ISNNd\ISpace\arge|see{\Shortb,\space\arga,\space\Suffb}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \if@nameauth@AltAKA%
- \if@nameauth@RevThis%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\testv}%
- \fi%
- \else%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\expandafter\testv\expandafter\Space\Surnamesiv}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{\expandafter\Surnamesiv\expandafter\space\testv}%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!PN!}\endcsname%
+ \if@nameauth@NBSP
+ \protected@edef\Space{,\nobreakspace}%
+ \fi
+ \fi
+ \if@nameauth@AltAKA
+ \ex\@nameauth@FmtName\ex{\arge}%
+ \else
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\arge\ex\Space\SNNd}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\SNNd\ex\space\arge}%
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname\cscd!PN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: XRef: #3 #4 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!MN!}\endcsname%
+ {macro \AKA: XRef: #3 #4 exists}%
+ \else
+ \ifcsname\cscd!MN\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #3 #4 already exists; no see ref.}%
- \else%
- \ifcsname\@nameauth@CleanName{#3#4!NF!}\endcsname%
+ {macro \AKA: Name reference: #3 #4 exists; no xref}%
+ \else
+ \ifcsname\cscd!NF\endcsname
\PackageWarning{nameauth}%
- {macro \AKA: Name reference: #3 #4 already exists; no see ref.}%
- \else%
- \csgdef{\@nameauth@CleanName{#3#4!PN!}}{}%
- \ifx\testi\@empty%
- \ifx\Suffixiv\@empty \@nameauth@Index{\ISurnamesiv, #3|see{\Surnamesii}}%
- \else \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii}}\fi%
- \else%
- \ifx\Suffixii\@empty%
- \ifx\Suffixiv\@empty%
- \@nameauth@Index{\ISurnamesiv, #3|see{\Surnamesii, #1}}%
- \else%
- \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Surnamesii, #1}}%
- \fi%
- \else%
- \ifx\Suffixiv\@empty%
- \@nameauth@Index{\ISurnamesiv, #3|see{\Shortii, #1, \Suffixii}}%
- \else%
- \@nameauth@Index{\Shortiv, #3, \Suffixiv|see{\Shortii, #1, \Suffixii}}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \if@nameauth@RevThisComma%
+ {macro \AKA: Name reference: #3 #4 exists; no xref}%
+ \else
+ \csgdef{\cscd!PN}{}%
+ \ifx\testa\@empty
+ \ifx\Suffd\@empty
+ \@nameauth@Index{\cscd}%
+ {\ISNNd,\space\argc|see{\SNNb}}%
+ \else
+ \@nameauth@Index{\cscd}%
+ {\Shortd,\space\argc,\space\Suffd|see{\SNNb}}%
+ \fi
+ \else
+ \ifx\Suffb\@empty
+ \ifx\Suffd\@empty
+ \@nameauth@Index{\cscd}%
+ {\ISNNd,\space\argc|see{\SNNb,\space\arga}}%
+ \else
+ \@nameauth@Index{\cscd}%
+ {\Shortd,\space\argc,\space\Suffd|see{\SNNb,\space\arga}}%
+ \fi
+ \else
+ \ifx\Suffd\@empty
+ \@nameauth@Index{\cscd}%
+ {\ISNNd,\space\argc|see{\Shortb,\space\arga,\space\Suffb}}%
+ \else
+ \@nameauth@Index{\cscd}%
+ {\Shortd,\space\argc,\space\Suffd|see{\Shortb,\space\arga,\space\Suffb}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@nameauth@RevThisComma
\protected@edef\ISpace{,\space}%
\protected@edef\Space{,\space}%
- \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi%
- \fi%
- \ifx\testv\@empty%
- \protected@edef\Forenames{#3}%
- \else%
- \protected@edef\Forenames{#5}%
- \fi%
- \if@nameauth@RevThis%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Surnamesiv\expandafter\Space\Forenames}%
- \else%
- \expandafter\@nameauth@FmtName\expandafter*\expandafter{%
- \expandafter\Forenames\expandafter\space\Surnamesiv}%
- \fi%
- \fi%
+ \if@nameauth@NBSP\protected@edef\Space{,\nobreakspace}\fi
+ \fi
+ \ifx\teste\@empty
+ \let\FNN\argc%
+ \else
+ \let\FNN\arge%
+ \fi
+ \if@nameauth@RevThis
+ \ex\@nameauth@FmtName\ex{\ex\SNNd\ex\Space\FNN}%
+ \else
+ \ex\@nameauth@FmtName\ex{\ex\FNN\ex\space\SNNd}%
+ \fi
+ \fi
\@nameauth@NBSPfalse%
\@nameauth@AltAKAfalse%
\@nameauth@DoCapsfalse%
@@ -638,253 +701,414 @@
\@nameauth@ShowCommafalse%
\@nameauth@RevThisfalse%
\@nameauth@RevThisCommafalse%
- \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi%
+ \if@nameauth@Punct\expandafter\@nameauth@CheckDot\fi
}
-\WithSuffix\newcommandx\AKA*[5][1=\@empty,3=\@empty,5=\@empty]%
+\WithSuffix\def\AKA*{\@nameauth@AltAKAtrue\AKA}
+\newcommandx*\PName[5][1=\@empty,3=\@empty,5=\@empty]%
{%
- \@nameauth@AltAKAtrue%
- \AKA[#1]{#2}[#3]{#4}[#5]%
+ \Name[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
}
-\newcommandx\PName[5][1=\@empty,3=\@empty,5=\@empty]%
+\WithSuffix\def\PName*{\@nameauth@FullNametrue\PName}
+\newcommandx*\TagName[4][1=\@empty, 3=\@empty]%
{%
- \Name[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \TagName: not tagging xref: #2}%
+ \else
+ \csgdef{\csb!TAG}{#4}%
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \TagName: not tagging xref: #2 #3}%
+ \else
+ \csgdef{\csbc!TAG}{#4}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \TagName: not tagging xref: #1 #2}%
+ \else
+ \csgdef{\csab!TAG}{#4}%
+ \fi
+ \fi
}
-\WithSuffix\newcommandx\PName*[5][1=\@empty,3=\@empty,5=\@empty]%
+\newcommandx*\UntagName[3][1=\@empty, 3=\@empty]%
{%
- \Name*[#1]{#2}\space(\AKA[#1]{#2}[#3]{#4}[#5])%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \UntagName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \UntagName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \global\csundef{\csb!TAG}%
+ \else
+ \global\csundef{\csbc!TAG}%
+ \fi
+ \else
+ \global\csundef{\csab!TAG}%
+ \fi
}
-\newcommandx\TagName[4][1=\@empty, 3=\@empty]%
+\newcommandx*\PretagName[4][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro \textbackslash TagName Cannot tag xref: #2.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2}!TAG!}{#4}%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \TagName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
\PackageWarning{nameauth}%
- {macro \textbackslash TagName Cannot tag xref: #2 #3.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3}!TAG!}{#4}%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ {macro \PretagName: tagging xref: #2}%
+ \fi
+ \if@nameauth@Pretag\csgdef{\csb!PRE}{#4\@nameauth@Actual}\fi
+ \else
+ \ifcsname\csbc!PN\endcsname
\PackageWarning{nameauth}%
- {macro \textbackslash TagName Cannot tag xref: #1 #2.}%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2}!TAG!}{#4}%
- \fi%
- \fi%
-}
-\newcommandx\UntagName[3][1=\@empty, 3=\@empty]%
-{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \global\csundef{\@nameauth@CleanName{#2}!TAG!}%
- \else%
- \global\csundef{\@nameauth@CleanName{#2#3}!TAG!}%
- \fi%
- \else%
- \global\csundef{\@nameauth@CleanName{#1#2}!TAG!}%
- \fi%
+ {macro \PretagName: tagging xref: #2 #3}%
+ \fi
+ \if@nameauth@Pretag\csgdef{\csbc!PRE}{#4\@nameauth@Actual}\fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \PretagName: tagging xref: #1 #2}%
+ \fi
+ \if@nameauth@Pretag\csgdef{\csab!PRE}{#4\@nameauth@Actual}\fi
+ \fi
}
-\newcommandx\IndexName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\IndexName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testii{#2}%
- \protected@edef\testiii{#3}%
+ \protected@edef\testa{#1}%
+ \protected@edef\arga{\trim@spaces{#1}}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testbr{\@nameauth@Root{#2}}%
+ \protected@edef\testc{#3}%
+ \protected@edef\argc{\trim@spaces{#3}}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \IndexName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \IndexName: Essential name malformed}%
+ \fi
+ \fi
\protected@edef\Space{\space}%
- \if@nameauth@AlwaysComma%
+ \if@nameauth@AlwaysComma
\protected@edef\Space{,\space}%
- \fi%
- \if@nameauth@ShowComma%
+ \fi
+ \if@nameauth@ShowComma
\protected@edef\Space{,\space}%
- \fi%
- \protected@edef\Short{\@nameauth@Root{#2}}%
- \ifx\testii\Short%
- \let\Surnames\Short%
- \protected@edef\Suffix{\@empty}%
- \else%
- \protected@edef\Suffix{\@nameauth@Suffix{#2}}%
- \protected@edef\Surnames{\Short\Space\Suffix}%
- \fi%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname%
+ \fi
+ \let\Short\testbr%
+ \ifx\testb\testbr
+ \let\SNN\Short%
+ \protected@edef\Suff{\@empty}%
+ \else
+ \protected@edef\Suff{\@nameauth@Suffix{#2}}%
+ \protected@edef\SNN{\Short\Space\Suff}%
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
\PackageWarning{nameauth}%
- {macro \IndexName: XRef: #2 exists.}%
- \else%
- \@nameauth@Index{\Surnames}[\@nameauth@CleanName{#2}!TAG!]%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname%
- \PackageWarning{nameauth}%
- {macro \IndexName: XRef: #2 #3 exists.}%
- \else%
- \@nameauth@Index{\Surnames\Space#3}[\@nameauth@CleanName{#2#3}!TAG!]%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ {macro \IndexName: XRef: #2 exists}%
+ \else
+ \@nameauth@Index{\csb}{\SNN}%
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
\PackageWarning{nameauth}%
- {macro \IndexName: XRef: #1 #2 exists.}%
- \else%
- \ifx\Suffix\@empty \@nameauth@Index{\Short, #1}[\@nameauth@CleanName{#1#2}!TAG!]%
- \else \@nameauth@Index{\Short, #1, \Suffix}[\@nameauth@CleanName{#1#2}!TAG!]\fi%
- \fi%
- \fi%
+ {macro \IndexName: XRef: #2 #3 exists}%
+ \else
+ \@nameauth@Index{\csbc}{\SNN\Space\argc}%
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \IndexName: XRef: #1 #2 exists}%
+ \else
+ \ifx\Suff\@empty
+ \@nameauth@Index{\csab}{\Short,\space\arga}%
+ \else
+ \@nameauth@Index{\csab}{\Short,\space\arga,\space\Suff}%
+ \fi
+ \fi
+ \fi
\@nameauth@ShowCommafalse%
}
-\newcommandx\ExcludeName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\ExcludeName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \ifcsname\@nameauth@CleanName{#2!PN!}\endcsname\relax%
- \else%
- \ifcsname\@nameauth@CleanName{#2!MN!}\endcsname%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \ExcludeName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \ExcludeName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \ifcsname\csb!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \ExcludeName: Xref: #2 already exists}%
+ \else
+ \ifcsname\csb!MN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 already exists; no exclusion.}%
- \else%
- \ifcsname\@nameauth@CleanName{#2!NF!}\endcsname%
+ {macro \ExcludeName: Reference: #2 exists; no exclusion}%
+ \else
+ \ifcsname\csb!NF\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 already exists; no exclusion.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2!PN!}}{}%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!PN!}\endcsname\relax%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!MN!}\endcsname%
+ {macro \ExcludeName: Reference: #2 exists; no exclusion}%
+ \else
+ \csgdef{\csb!PN}{}%
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname\csbc!PN\endcsname
+ \PackageWarning{nameauth}%
+ {macro \ExcludeName: Xref: #2 #3 already exists}%
+ \else
+ \ifcsname\csbc!MN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}%
- \else%
- \ifcsname\@nameauth@CleanName{#2#3!NF!}\endcsname%
+ {macro \ExcludeName: Reference: #2 #3 exists; no exclusion}%
+ \else
+ \ifcsname\csbc!NF\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #2 #3 already exists; no exclusion.}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!PN!}}{}%
- \fi%
- \fi%
- \fi%
- \fi%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!PN!}\endcsname%
+ {macro \ExcludeName: Reference: #2 #3 exists; no exclusion}%
+ \else
+ \csgdef{\csbc!PN}{}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifcsname\csab!PN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: XRef: #1 #2 exists.}%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!MN!}\endcsname%
+ {macro \ExcludeName: XRef: #1 #2 already exists}%
+ \else
+ \ifcsname\csab!MN\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}%
- \else%
- \ifcsname\@nameauth@CleanName{#1#2!NF!}\endcsname%
+ {macro \ExcludeName: Reference: #1 #2 exists; no exclusion}%
+ \else
+ \ifcsname\csab!NF\endcsname
\PackageWarning{nameauth}%
- {macro \ExcludeName: Reference: #1 #2 already exists; no exclusion.}%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2!PN!}}{}%
- \fi%
- \fi%
- \fi%
- \fi%
+ {macro \ExcludeName: Reference: #1 #2 exists; no exclusion}%
+ \else
+ \csgdef{\csab!PN}{}%
+ \fi
+ \fi
+ \fi
+ \fi
}
-\newcommandx\ForgetName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\ForgetName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \global\csundef{\@nameauth@CleanName{#2!MN!}}%
- \global\csundef{\@nameauth@CleanName{#2!NF!}}%
- \else%
- \global\csundef{\@nameauth@CleanName{#2#3!MN!}}%
- \global\csundef{\@nameauth@CleanName{#2#3!NF!}}%
- \fi%
- \else%
- \global\csundef{\@nameauth@CleanName{#1#2!MN!}}%
- \global\csundef{\@nameauth@CleanName{#1#2!NF!}}%
- \fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \ForgetName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \ForgetName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \global\csundef{\csb!MN}%
+ \global\csundef{\csb!NF}%
+ \else
+ \global\csundef{\csbc!MN}%
+ \global\csundef{\csbc!NF}%
+ \fi
+ \else
+ \global\csundef{\csab!MN}%
+ \global\csundef{\csab!NF}%
+ \fi
}
-\newcommandx\SubvertName[3][1=\@empty, 3=\@empty]%
+\newcommandx*\SubvertName[3][1=\@empty, 3=\@empty]%
{%
- \protected@edef\testi{#1}%
- \protected@edef\testiii{#3}%
- \ifx\testi\@empty%
- \ifx\testiii\@empty%
- \csgdef{\@nameauth@CleanName{#2!MN!}}{}%
- \csgdef{\@nameauth@CleanName{#2!NF!}}{}%
- \else%
- \csgdef{\@nameauth@CleanName{#2#3!MN!}}{}%
- \csgdef{\@nameauth@CleanName{#2#3!NF!}}{}%
- \fi%
- \else%
- \csgdef{\@nameauth@CleanName{#1#2!MN!}}{}%
- \csgdef{\@nameauth@CleanName{#1#2!NF!}}{}%
- \fi%
+ \protected@edef\testa{#1}%
+ \protected@edef\testb{\trim@spaces{#2}}%
+ \protected@edef\testc{#3}%
+ \def\csb{\@nameauth@Clean{#2}}%
+ \def\csbc{\@nameauth@Clean{#2#3}}%
+ \def\csab{\@nameauth@Clean{#1!#2}}%
+ \ifx\testb\@empty
+ \PackageError{nameauth}%
+ {macro \SubvertName: Essential name missing}%
+ \else
+ \ifx\csb\@empty
+ \PackageError{nameauth}%
+ {macro \SubvertName: Essential name malformed}%
+ \fi
+ \fi
+ \ifx\testa\@empty
+ \ifx\testc\@empty
+ \csgdef{\csb!MN}{}%
+ \csgdef{\csb!NF}{}%
+ \else
+ \csgdef{\csbc!MN}{}%
+ \csgdef{\csbc!NF}{}%
+ \fi
+ \else
+ \csgdef{\csab!MN}{}%
+ \csgdef{\csab!NF}{}%
+ \fi
}
\newenvironment{nameauth}{%
\begingroup%
+ \let\ex\expandafter%
\csdef{<}##1&##2&##3&##4>{%
\protected@edef\arga{\trim@spaces{##1}}%
- \protected@edef\argb{\trim@spaces{##2}}%
- \protected@edef\argc{\trim@spaces{##3}}%
- \protected@edef\argd{\trim@spaces{##4}}%
+ \protected@edef\testb{\trim@spaces{##2}}%
+ \protected@edef\testc{\trim@spaces{##3}}%
+ \protected@edef\testd{\trim@spaces{##4}}%
+ \newtoks\tokb%
+ \newtoks\tokc%
+ \newtoks\tokd%
+ \tokb\expandafter{##2}%
+ \tokc\expandafter{##3}%
+ \tokd\expandafter{##4}%
\ifx\arga\@empty
\PackageError{nameauth}%
- {environment nameauth: Control sequence missing.}%
+ {environment nameauth: Control sequence missing}%
\else
- \ifx\argc\@empty
+ \ifx\testc\@empty
\PackageError{nameauth}%
- {environment nameauth: Essential name missing.}%
+ {environment nameauth: Essential name missing}%
\else
- \ifx\argd\@empty
- \ifx\argb\@empty
- \csxdef{\arga}{\Name{\argc}}%
- \csxdef{L\arga}{\Name*{\argc}}%
- \csxdef{S\arga}{\FName{\argc}}%
+ \ifcsname\arga\endcsname
+ \PackageWarning{nameauth}%
+ {environment nameauth: Redefinition of shorthands}%
+ \fi
+ \ifx\testd\@empty
+ \ifx\testb\@empty
+ \ex\csxdef\ex{\ex\arga\ex}\ex{\ex\Name\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex L\ex\arga\ex}\ex{\ex\Name\ex*\ex{\the\tokc}}%
+ \ex\csgdef\ex{\ex S\ex\arga\ex}\ex{\ex\FName\ex{\the\tokc}}%
\else
- \csxdef{\arga}{\Name[\argb]{\argc}}%
- \csxdef{L\arga}{\Name*[\argb]{\argc}}%
- \csxdef{S\arga}{\FName[\argb]{\argc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
+ \ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex[\ex\the\ex\tokb\ex]%
+ \ex{\the\tokc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex*%
+ \ex\ex\ex[\ex\the\ex\tokb\ex]\ex{\the\tokc}}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\FName\ex\ex\ex[%
+ \ex\the\ex\tokb\ex]\ex{\the\tokc}}%
\fi
\else
- \ifx\argb\@empty
- \csxdef{\arga}{\Name{\argc}[\argd]}%
- \csxdef{L\arga}{\Name*{\argc}[\argd]}%
- \csxdef{S\arga}{\FName{\argc}[\argd]}%
+ \ifx\testb\@empty
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex\arga\ex\ex\ex}%
+ \ex\ex\ex{\ex\ex\ex\Name\ex\ex\ex{\ex\the\ex\tokc\ex}%
+ \ex[\the\tokd]}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex L\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\Name%
+ \ex\ex\ex*\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\ex\ex\csgdef\ex\ex\ex{\ex\ex\ex S\ex\ex\ex\arga%
+ \ex\ex\ex}\ex\ex\ex{\ex\ex\ex\FName\ex\ex\ex{%
+ \ex\the\ex\tokc\ex}\ex[\the\tokd]}%
\else
- \csxdef{\arga}{\Name[\argb]{\argc}[\argd]}%
- \csxdef{L\arga}{\Name*[\argb]{\argc}[\argd]}%
- \csxdef{S\arga}{\FName[\argb]{\argc}[\argd]}%
+ \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex\arga\ex\ex\ex\ex\ex\ex\ex}%
+ \ex\ex\ex\ex\ex\ex\ex{\ex\ex\ex\ex\ex\ex\ex\Name%
+ \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\tokb%
+ \ex\ex\ex]\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex L\ex\ex\ex\ex\ex\ex\ex\arga%
+ \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex\Name\ex\ex\ex\ex\ex\ex\ex*%
+ \ex\ex\ex\ex\ex\ex\ex[\ex\ex\ex\the\ex\ex\ex\tokb%
+ \ex\ex\ex]\ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
+ \ex\ex\ex\ex\ex\ex\ex\csgdef\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex S\ex\ex\ex\ex\ex\ex\ex\arga%
+ \ex\ex\ex\ex\ex\ex\ex}\ex\ex\ex\ex\ex\ex\ex{%
+ \ex\ex\ex\ex\ex\ex\ex\FName\ex\ex\ex\ex\ex\ex\ex[%
+ \ex\ex\ex\the\ex\ex\ex\tokb\ex\ex\ex]%
+ \ex\ex\ex{\ex\the\ex\tokc\ex}\ex[\the\tokd]}%
\fi
\fi
\fi
\fi
\ignorespaces%
- }%
-}{\endgroup}
-\newcommand{\NamesInactive}{\@nameauth@DoFormatfalse}
-\newcommand{\NamesActive}{\@nameauth@DoFormattrue}
-\newcommand{\AllCapsInactive}{\@nameauth@AllCapsfalse}
-\newcommand{\AllCapsActive}{\@nameauth@AllCapstrue}
-\newcommand{\ReverseInactive}{\@nameauth@RevAllfalse}
-\newcommand{\ReverseActive}{\@nameauth@RevAlltrue}
-\newcommand{\ReverseCommaInactive}%
- {\@nameauth@RevAllfalse\@nameauth@RevAllCommafalse}
-\newcommand{\ReverseCommaActive}%
- {\@nameauth@RevAlltrue\@nameauth@RevAllCommatrue}
-\newcommand{\IndexInactive}{\@nameauth@DoIndexfalse}
-\newcommand{\IndexActive}{\@nameauth@DoIndextrue}
-\endinput
+ }\ignorespaces%
+}{\endgroup\ignorespaces}
+%%
+%% Copyright (C) 2015 by Charles P. Schaum <charles dot schaum at comcast dot net>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License (LPPL), either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Charles P. Schaum.
+%%
+%% This work consists of the file nameauth.dtx and a Makefile.
+%% Running "make" generates the derived files README, nameauth.pdf and nameauth.sty.
+%% Running "make inst" installs the files in the user's TeX tree.
+%% Running "make install" installs the files in the local TeX tree.
+%%
%%
%% End of file `nameauth.sty'.